// *** 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.azure.automation;

import com.pulumi.azure.automation.inputs.ConnectionTypeFieldArgs;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import java.lang.Boolean;
import java.lang.String;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


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

    public static final ConnectionTypeArgs Empty = new ConnectionTypeArgs();

    /**
     * The name of the automation account in which the Connection is created. Changing this forces a new resource to be created.
     * 
     */
    @Import(name="automationAccountName", required=true)
    private Output<String> automationAccountName;

    /**
     * @return The name of the automation account in which the Connection is created. Changing this forces a new resource to be created.
     * 
     */
    public Output<String> automationAccountName() {
        return this.automationAccountName;
    }

    /**
     * One or more `field` blocks as defined below. Changing this forces a new Automation to be created.
     * 
     */
    @Import(name="fields", required=true)
    private Output<List<ConnectionTypeFieldArgs>> fields;

    /**
     * @return One or more `field` blocks as defined below. Changing this forces a new Automation to be created.
     * 
     */
    public Output<List<ConnectionTypeFieldArgs>> fields() {
        return this.fields;
    }

    /**
     * Whether the connection type is global. Changing this forces a new Automation to be created.
     * 
     */
    @Import(name="isGlobal")
    private @Nullable Output<Boolean> isGlobal;

    /**
     * @return Whether the connection type is global. Changing this forces a new Automation to be created.
     * 
     */
    public Optional<Output<Boolean>> isGlobal() {
        return Optional.ofNullable(this.isGlobal);
    }

    /**
     * The name which should be used for this Automation Connection Type. Changing this forces a new Automation to be created.
     * 
     */
    @Import(name="name")
    private @Nullable Output<String> name;

    /**
     * @return The name which should be used for this Automation Connection Type. Changing this forces a new Automation to be created.
     * 
     */
    public Optional<Output<String>> name() {
        return Optional.ofNullable(this.name);
    }

    /**
     * The name of the Resource Group where the Automation should exist. Changing this forces a new Automation to be created.
     * 
     */
    @Import(name="resourceGroupName", required=true)
    private Output<String> resourceGroupName;

    /**
     * @return The name of the Resource Group where the Automation should exist. Changing this forces a new Automation to be created.
     * 
     */
    public Output<String> resourceGroupName() {
        return this.resourceGroupName;
    }

    private ConnectionTypeArgs() {}

    private ConnectionTypeArgs(ConnectionTypeArgs $) {
        this.automationAccountName = $.automationAccountName;
        this.fields = $.fields;
        this.isGlobal = $.isGlobal;
        this.name = $.name;
        this.resourceGroupName = $.resourceGroupName;
    }

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

    public static final class Builder {
        private ConnectionTypeArgs $;

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

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

        /**
         * @param automationAccountName The name of the automation account in which the Connection is created. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder automationAccountName(Output<String> automationAccountName) {
            $.automationAccountName = automationAccountName;
            return this;
        }

        /**
         * @param automationAccountName The name of the automation account in which the Connection is created. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder automationAccountName(String automationAccountName) {
            return automationAccountName(Output.of(automationAccountName));
        }

        /**
         * @param fields One or more `field` blocks as defined below. Changing this forces a new Automation to be created.
         * 
         * @return builder
         * 
         */
        public Builder fields(Output<List<ConnectionTypeFieldArgs>> fields) {
            $.fields = fields;
            return this;
        }

        /**
         * @param fields One or more `field` blocks as defined below. Changing this forces a new Automation to be created.
         * 
         * @return builder
         * 
         */
        public Builder fields(List<ConnectionTypeFieldArgs> fields) {
            return fields(Output.of(fields));
        }

        /**
         * @param fields One or more `field` blocks as defined below. Changing this forces a new Automation to be created.
         * 
         * @return builder
         * 
         */
        public Builder fields(ConnectionTypeFieldArgs... fields) {
            return fields(List.of(fields));
        }

        /**
         * @param isGlobal Whether the connection type is global. Changing this forces a new Automation to be created.
         * 
         * @return builder
         * 
         */
        public Builder isGlobal(@Nullable Output<Boolean> isGlobal) {
            $.isGlobal = isGlobal;
            return this;
        }

        /**
         * @param isGlobal Whether the connection type is global. Changing this forces a new Automation to be created.
         * 
         * @return builder
         * 
         */
        public Builder isGlobal(Boolean isGlobal) {
            return isGlobal(Output.of(isGlobal));
        }

        /**
         * @param name The name which should be used for this Automation Connection Type. Changing this forces a new Automation to be created.
         * 
         * @return builder
         * 
         */
        public Builder name(@Nullable Output<String> name) {
            $.name = name;
            return this;
        }

        /**
         * @param name The name which should be used for this Automation Connection Type. Changing this forces a new Automation to be created.
         * 
         * @return builder
         * 
         */
        public Builder name(String name) {
            return name(Output.of(name));
        }

        /**
         * @param resourceGroupName The name of the Resource Group where the Automation should exist. Changing this forces a new Automation to be created.
         * 
         * @return builder
         * 
         */
        public Builder resourceGroupName(Output<String> resourceGroupName) {
            $.resourceGroupName = resourceGroupName;
            return this;
        }

        /**
         * @param resourceGroupName The name of the Resource Group where the Automation should exist. Changing this forces a new Automation to be created.
         * 
         * @return builder
         * 
         */
        public Builder resourceGroupName(String resourceGroupName) {
            return resourceGroupName(Output.of(resourceGroupName));
        }

        public ConnectionTypeArgs build() {
            $.automationAccountName = Objects.requireNonNull($.automationAccountName, "expected parameter 'automationAccountName' to be non-null");
            $.fields = Objects.requireNonNull($.fields, "expected parameter 'fields' to be non-null");
            $.resourceGroupName = Objects.requireNonNull($.resourceGroupName, "expected parameter 'resourceGroupName' to be non-null");
            return $;
        }
    }

}
