com.pulumi.azurenative.datamigration.inputs.MongoDbShardKeySettingArgs Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of azure-native Show documentation
Show all versions of azure-native Show documentation
A native Pulumi package for creating and managing Azure resources.
// *** WARNING: this file was generated by pulumi-java-gen. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
package com.pulumi.azurenative.datamigration.inputs;
import com.pulumi.azurenative.datamigration.inputs.MongoDbShardKeyFieldArgs;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import com.pulumi.exceptions.MissingRequiredPropertyException;
import java.lang.Boolean;
import java.util.List;
import java.util.Objects;
/**
* Describes a MongoDB shard key
*
*/
public final class MongoDbShardKeySettingArgs extends com.pulumi.resources.ResourceArgs {
public static final MongoDbShardKeySettingArgs Empty = new MongoDbShardKeySettingArgs();
/**
* The fields within the shard key
*
*/
@Import(name="fields", required=true)
private Output> fields;
/**
* @return The fields within the shard key
*
*/
public Output> fields() {
return this.fields;
}
/**
* Whether the shard key is unique
*
*/
@Import(name="isUnique", required=true)
private Output isUnique;
/**
* @return Whether the shard key is unique
*
*/
public Output isUnique() {
return this.isUnique;
}
private MongoDbShardKeySettingArgs() {}
private MongoDbShardKeySettingArgs(MongoDbShardKeySettingArgs $) {
this.fields = $.fields;
this.isUnique = $.isUnique;
}
public static Builder builder() {
return new Builder();
}
public static Builder builder(MongoDbShardKeySettingArgs defaults) {
return new Builder(defaults);
}
public static final class Builder {
private MongoDbShardKeySettingArgs $;
public Builder() {
$ = new MongoDbShardKeySettingArgs();
}
public Builder(MongoDbShardKeySettingArgs defaults) {
$ = new MongoDbShardKeySettingArgs(Objects.requireNonNull(defaults));
}
/**
* @param fields The fields within the shard key
*
* @return builder
*
*/
public Builder fields(Output> fields) {
$.fields = fields;
return this;
}
/**
* @param fields The fields within the shard key
*
* @return builder
*
*/
public Builder fields(List fields) {
return fields(Output.of(fields));
}
/**
* @param fields The fields within the shard key
*
* @return builder
*
*/
public Builder fields(MongoDbShardKeyFieldArgs... fields) {
return fields(List.of(fields));
}
/**
* @param isUnique Whether the shard key is unique
*
* @return builder
*
*/
public Builder isUnique(Output isUnique) {
$.isUnique = isUnique;
return this;
}
/**
* @param isUnique Whether the shard key is unique
*
* @return builder
*
*/
public Builder isUnique(Boolean isUnique) {
return isUnique(Output.of(isUnique));
}
public MongoDbShardKeySettingArgs build() {
if ($.fields == null) {
throw new MissingRequiredPropertyException("MongoDbShardKeySettingArgs", "fields");
}
if ($.isUnique == null) {
throw new MissingRequiredPropertyException("MongoDbShardKeySettingArgs", "isUnique");
}
return $;
}
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy