All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.pulumi.snowflake.inputs.TablePrimaryKeyArgs Maven / Gradle / Ivy

The newest version!
// *** 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.snowflake.inputs;

import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import com.pulumi.exceptions.MissingRequiredPropertyException;
import java.lang.String;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


public final class TablePrimaryKeyArgs extends com.pulumi.resources.ResourceArgs {

    public static final TablePrimaryKeyArgs Empty = new TablePrimaryKeyArgs();

    /**
     * Columns to use in primary key
     * 
     */
    @Import(name="keys", required=true)
    private Output> keys;

    /**
     * @return Columns to use in primary key
     * 
     */
    public Output> keys() {
        return this.keys;
    }

    /**
     * Name of constraint
     * 
     */
    @Import(name="name")
    private @Nullable Output name;

    /**
     * @return Name of constraint
     * 
     */
    public Optional> name() {
        return Optional.ofNullable(this.name);
    }

    private TablePrimaryKeyArgs() {}

    private TablePrimaryKeyArgs(TablePrimaryKeyArgs $) {
        this.keys = $.keys;
        this.name = $.name;
    }

    public static Builder builder() {
        return new Builder();
    }
    public static Builder builder(TablePrimaryKeyArgs defaults) {
        return new Builder(defaults);
    }

    public static final class Builder {
        private TablePrimaryKeyArgs $;

        public Builder() {
            $ = new TablePrimaryKeyArgs();
        }

        public Builder(TablePrimaryKeyArgs defaults) {
            $ = new TablePrimaryKeyArgs(Objects.requireNonNull(defaults));
        }

        /**
         * @param keys Columns to use in primary key
         * 
         * @return builder
         * 
         */
        public Builder keys(Output> keys) {
            $.keys = keys;
            return this;
        }

        /**
         * @param keys Columns to use in primary key
         * 
         * @return builder
         * 
         */
        public Builder keys(List keys) {
            return keys(Output.of(keys));
        }

        /**
         * @param keys Columns to use in primary key
         * 
         * @return builder
         * 
         */
        public Builder keys(String... keys) {
            return keys(List.of(keys));
        }

        /**
         * @param name Name of constraint
         * 
         * @return builder
         * 
         */
        public Builder name(@Nullable Output name) {
            $.name = name;
            return this;
        }

        /**
         * @param name Name of constraint
         * 
         * @return builder
         * 
         */
        public Builder name(String name) {
            return name(Output.of(name));
        }

        public TablePrimaryKeyArgs build() {
            if ($.keys == null) {
                throw new MissingRequiredPropertyException("TablePrimaryKeyArgs", "keys");
            }
            return $;
        }
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy