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

com.pulumi.azurenative.datafactory.inputs.ServiceNowV2LinkedServiceArgs Maven / Gradle / Ivy

There is a newer version: 2.72.0
Show 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.azurenative.datafactory.inputs;

import com.pulumi.azurenative.datafactory.enums.ServiceNowV2AuthenticationType;
import com.pulumi.azurenative.datafactory.inputs.AzureKeyVaultSecretReferenceArgs;
import com.pulumi.azurenative.datafactory.inputs.IntegrationRuntimeReferenceArgs;
import com.pulumi.azurenative.datafactory.inputs.ParameterSpecificationArgs;
import com.pulumi.azurenative.datafactory.inputs.SecureStringArgs;
import com.pulumi.core.Either;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import com.pulumi.core.internal.Codegen;
import com.pulumi.exceptions.MissingRequiredPropertyException;
import java.lang.Object;
import java.lang.String;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


/**
 * ServiceNowV2 server linked service.
 * 
 */
public final class ServiceNowV2LinkedServiceArgs extends com.pulumi.resources.ResourceArgs {

    public static final ServiceNowV2LinkedServiceArgs Empty = new ServiceNowV2LinkedServiceArgs();

    /**
     * List of tags that can be used for describing the linked service.
     * 
     */
    @Import(name="annotations")
    private @Nullable Output> annotations;

    /**
     * @return List of tags that can be used for describing the linked service.
     * 
     */
    public Optional>> annotations() {
        return Optional.ofNullable(this.annotations);
    }

    /**
     * The authentication type to use.
     * 
     */
    @Import(name="authenticationType", required=true)
    private Output> authenticationType;

    /**
     * @return The authentication type to use.
     * 
     */
    public Output> authenticationType() {
        return this.authenticationType;
    }

    /**
     * The client id for OAuth2 authentication.
     * 
     */
    @Import(name="clientId")
    private @Nullable Output clientId;

    /**
     * @return The client id for OAuth2 authentication.
     * 
     */
    public Optional> clientId() {
        return Optional.ofNullable(this.clientId);
    }

    /**
     * The client secret for OAuth2 authentication.
     * 
     */
    @Import(name="clientSecret")
    private @Nullable Output> clientSecret;

    /**
     * @return The client secret for OAuth2 authentication.
     * 
     */
    public Optional>> clientSecret() {
        return Optional.ofNullable(this.clientSecret);
    }

    /**
     * The integration runtime reference.
     * 
     */
    @Import(name="connectVia")
    private @Nullable Output connectVia;

    /**
     * @return The integration runtime reference.
     * 
     */
    public Optional> connectVia() {
        return Optional.ofNullable(this.connectVia);
    }

    /**
     * Linked service description.
     * 
     */
    @Import(name="description")
    private @Nullable Output description;

    /**
     * @return Linked service description.
     * 
     */
    public Optional> description() {
        return Optional.ofNullable(this.description);
    }

    /**
     * The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string.
     * 
     */
    @Import(name="encryptedCredential")
    private @Nullable Output encryptedCredential;

    /**
     * @return The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string.
     * 
     */
    public Optional> encryptedCredential() {
        return Optional.ofNullable(this.encryptedCredential);
    }

    /**
     * The endpoint of the ServiceNowV2 server. (i.e. <instance>.service-now.com)
     * 
     */
    @Import(name="endpoint", required=true)
    private Output endpoint;

    /**
     * @return The endpoint of the ServiceNowV2 server. (i.e. <instance>.service-now.com)
     * 
     */
    public Output endpoint() {
        return this.endpoint;
    }

    /**
     * GrantType for OAuth2 authentication. Default value is password.
     * 
     */
    @Import(name="grantType")
    private @Nullable Output grantType;

    /**
     * @return GrantType for OAuth2 authentication. Default value is password.
     * 
     */
    public Optional> grantType() {
        return Optional.ofNullable(this.grantType);
    }

    /**
     * Parameters for linked service.
     * 
     */
    @Import(name="parameters")
    private @Nullable Output> parameters;

    /**
     * @return Parameters for linked service.
     * 
     */
    public Optional>> parameters() {
        return Optional.ofNullable(this.parameters);
    }

    /**
     * The password corresponding to the user name for Basic and OAuth2 authentication.
     * 
     */
    @Import(name="password")
    private @Nullable Output> password;

    /**
     * @return The password corresponding to the user name for Basic and OAuth2 authentication.
     * 
     */
    public Optional>> password() {
        return Optional.ofNullable(this.password);
    }

    /**
     * Type of linked service.
     * Expected value is 'ServiceNowV2'.
     * 
     */
    @Import(name="type", required=true)
    private Output type;

    /**
     * @return Type of linked service.
     * Expected value is 'ServiceNowV2'.
     * 
     */
    public Output type() {
        return this.type;
    }

    /**
     * The user name used to connect to the ServiceNowV2 server for Basic and OAuth2 authentication.
     * 
     */
    @Import(name="username")
    private @Nullable Output username;

    /**
     * @return The user name used to connect to the ServiceNowV2 server for Basic and OAuth2 authentication.
     * 
     */
    public Optional> username() {
        return Optional.ofNullable(this.username);
    }

    /**
     * Version of the linked service.
     * 
     */
    @Import(name="version")
    private @Nullable Output version;

    /**
     * @return Version of the linked service.
     * 
     */
    public Optional> version() {
        return Optional.ofNullable(this.version);
    }

    private ServiceNowV2LinkedServiceArgs() {}

    private ServiceNowV2LinkedServiceArgs(ServiceNowV2LinkedServiceArgs $) {
        this.annotations = $.annotations;
        this.authenticationType = $.authenticationType;
        this.clientId = $.clientId;
        this.clientSecret = $.clientSecret;
        this.connectVia = $.connectVia;
        this.description = $.description;
        this.encryptedCredential = $.encryptedCredential;
        this.endpoint = $.endpoint;
        this.grantType = $.grantType;
        this.parameters = $.parameters;
        this.password = $.password;
        this.type = $.type;
        this.username = $.username;
        this.version = $.version;
    }

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

    public static final class Builder {
        private ServiceNowV2LinkedServiceArgs $;

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

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

        /**
         * @param annotations List of tags that can be used for describing the linked service.
         * 
         * @return builder
         * 
         */
        public Builder annotations(@Nullable Output> annotations) {
            $.annotations = annotations;
            return this;
        }

        /**
         * @param annotations List of tags that can be used for describing the linked service.
         * 
         * @return builder
         * 
         */
        public Builder annotations(List annotations) {
            return annotations(Output.of(annotations));
        }

        /**
         * @param annotations List of tags that can be used for describing the linked service.
         * 
         * @return builder
         * 
         */
        public Builder annotations(Object... annotations) {
            return annotations(List.of(annotations));
        }

        /**
         * @param authenticationType The authentication type to use.
         * 
         * @return builder
         * 
         */
        public Builder authenticationType(Output> authenticationType) {
            $.authenticationType = authenticationType;
            return this;
        }

        /**
         * @param authenticationType The authentication type to use.
         * 
         * @return builder
         * 
         */
        public Builder authenticationType(Either authenticationType) {
            return authenticationType(Output.of(authenticationType));
        }

        /**
         * @param authenticationType The authentication type to use.
         * 
         * @return builder
         * 
         */
        public Builder authenticationType(String authenticationType) {
            return authenticationType(Either.ofLeft(authenticationType));
        }

        /**
         * @param authenticationType The authentication type to use.
         * 
         * @return builder
         * 
         */
        public Builder authenticationType(ServiceNowV2AuthenticationType authenticationType) {
            return authenticationType(Either.ofRight(authenticationType));
        }

        /**
         * @param clientId The client id for OAuth2 authentication.
         * 
         * @return builder
         * 
         */
        public Builder clientId(@Nullable Output clientId) {
            $.clientId = clientId;
            return this;
        }

        /**
         * @param clientId The client id for OAuth2 authentication.
         * 
         * @return builder
         * 
         */
        public Builder clientId(Object clientId) {
            return clientId(Output.of(clientId));
        }

        /**
         * @param clientSecret The client secret for OAuth2 authentication.
         * 
         * @return builder
         * 
         */
        public Builder clientSecret(@Nullable Output> clientSecret) {
            $.clientSecret = clientSecret;
            return this;
        }

        /**
         * @param clientSecret The client secret for OAuth2 authentication.
         * 
         * @return builder
         * 
         */
        public Builder clientSecret(Either clientSecret) {
            return clientSecret(Output.of(clientSecret));
        }

        /**
         * @param clientSecret The client secret for OAuth2 authentication.
         * 
         * @return builder
         * 
         */
        public Builder clientSecret(AzureKeyVaultSecretReferenceArgs clientSecret) {
            return clientSecret(Either.ofLeft(clientSecret));
        }

        /**
         * @param clientSecret The client secret for OAuth2 authentication.
         * 
         * @return builder
         * 
         */
        public Builder clientSecret(SecureStringArgs clientSecret) {
            return clientSecret(Either.ofRight(clientSecret));
        }

        /**
         * @param connectVia The integration runtime reference.
         * 
         * @return builder
         * 
         */
        public Builder connectVia(@Nullable Output connectVia) {
            $.connectVia = connectVia;
            return this;
        }

        /**
         * @param connectVia The integration runtime reference.
         * 
         * @return builder
         * 
         */
        public Builder connectVia(IntegrationRuntimeReferenceArgs connectVia) {
            return connectVia(Output.of(connectVia));
        }

        /**
         * @param description Linked service description.
         * 
         * @return builder
         * 
         */
        public Builder description(@Nullable Output description) {
            $.description = description;
            return this;
        }

        /**
         * @param description Linked service description.
         * 
         * @return builder
         * 
         */
        public Builder description(String description) {
            return description(Output.of(description));
        }

        /**
         * @param encryptedCredential The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string.
         * 
         * @return builder
         * 
         */
        public Builder encryptedCredential(@Nullable Output encryptedCredential) {
            $.encryptedCredential = encryptedCredential;
            return this;
        }

        /**
         * @param encryptedCredential The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string.
         * 
         * @return builder
         * 
         */
        public Builder encryptedCredential(String encryptedCredential) {
            return encryptedCredential(Output.of(encryptedCredential));
        }

        /**
         * @param endpoint The endpoint of the ServiceNowV2 server. (i.e. <instance>.service-now.com)
         * 
         * @return builder
         * 
         */
        public Builder endpoint(Output endpoint) {
            $.endpoint = endpoint;
            return this;
        }

        /**
         * @param endpoint The endpoint of the ServiceNowV2 server. (i.e. <instance>.service-now.com)
         * 
         * @return builder
         * 
         */
        public Builder endpoint(Object endpoint) {
            return endpoint(Output.of(endpoint));
        }

        /**
         * @param grantType GrantType for OAuth2 authentication. Default value is password.
         * 
         * @return builder
         * 
         */
        public Builder grantType(@Nullable Output grantType) {
            $.grantType = grantType;
            return this;
        }

        /**
         * @param grantType GrantType for OAuth2 authentication. Default value is password.
         * 
         * @return builder
         * 
         */
        public Builder grantType(Object grantType) {
            return grantType(Output.of(grantType));
        }

        /**
         * @param parameters Parameters for linked service.
         * 
         * @return builder
         * 
         */
        public Builder parameters(@Nullable Output> parameters) {
            $.parameters = parameters;
            return this;
        }

        /**
         * @param parameters Parameters for linked service.
         * 
         * @return builder
         * 
         */
        public Builder parameters(Map parameters) {
            return parameters(Output.of(parameters));
        }

        /**
         * @param password The password corresponding to the user name for Basic and OAuth2 authentication.
         * 
         * @return builder
         * 
         */
        public Builder password(@Nullable Output> password) {
            $.password = password;
            return this;
        }

        /**
         * @param password The password corresponding to the user name for Basic and OAuth2 authentication.
         * 
         * @return builder
         * 
         */
        public Builder password(Either password) {
            return password(Output.of(password));
        }

        /**
         * @param password The password corresponding to the user name for Basic and OAuth2 authentication.
         * 
         * @return builder
         * 
         */
        public Builder password(AzureKeyVaultSecretReferenceArgs password) {
            return password(Either.ofLeft(password));
        }

        /**
         * @param password The password corresponding to the user name for Basic and OAuth2 authentication.
         * 
         * @return builder
         * 
         */
        public Builder password(SecureStringArgs password) {
            return password(Either.ofRight(password));
        }

        /**
         * @param type Type of linked service.
         * Expected value is 'ServiceNowV2'.
         * 
         * @return builder
         * 
         */
        public Builder type(Output type) {
            $.type = type;
            return this;
        }

        /**
         * @param type Type of linked service.
         * Expected value is 'ServiceNowV2'.
         * 
         * @return builder
         * 
         */
        public Builder type(String type) {
            return type(Output.of(type));
        }

        /**
         * @param username The user name used to connect to the ServiceNowV2 server for Basic and OAuth2 authentication.
         * 
         * @return builder
         * 
         */
        public Builder username(@Nullable Output username) {
            $.username = username;
            return this;
        }

        /**
         * @param username The user name used to connect to the ServiceNowV2 server for Basic and OAuth2 authentication.
         * 
         * @return builder
         * 
         */
        public Builder username(Object username) {
            return username(Output.of(username));
        }

        /**
         * @param version Version of the linked service.
         * 
         * @return builder
         * 
         */
        public Builder version(@Nullable Output version) {
            $.version = version;
            return this;
        }

        /**
         * @param version Version of the linked service.
         * 
         * @return builder
         * 
         */
        public Builder version(String version) {
            return version(Output.of(version));
        }

        public ServiceNowV2LinkedServiceArgs build() {
            if ($.authenticationType == null) {
                throw new MissingRequiredPropertyException("ServiceNowV2LinkedServiceArgs", "authenticationType");
            }
            if ($.endpoint == null) {
                throw new MissingRequiredPropertyException("ServiceNowV2LinkedServiceArgs", "endpoint");
            }
            $.type = Codegen.stringProp("type").output().arg($.type).require();
            return $;
        }
    }

}