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

com.pulumi.azurenative.datafactory.outputs.ServicePrincipalCredentialResponse Maven / Gradle / Ivy

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

import com.pulumi.azurenative.datafactory.outputs.AzureKeyVaultSecretReferenceResponse;
import com.pulumi.core.annotations.CustomType;
import com.pulumi.exceptions.MissingRequiredPropertyException;
import java.lang.Object;
import java.lang.String;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;

@CustomType
public final class ServicePrincipalCredentialResponse {
    /**
     * @return List of tags that can be used for describing the Credential.
     * 
     */
    private @Nullable List annotations;
    /**
     * @return Credential description.
     * 
     */
    private @Nullable String description;
    /**
     * @return The app ID of the service principal used to authenticate
     * 
     */
    private @Nullable Object servicePrincipalId;
    /**
     * @return The key of the service principal used to authenticate.
     * 
     */
    private @Nullable AzureKeyVaultSecretReferenceResponse servicePrincipalKey;
    /**
     * @return The ID of the tenant to which the service principal belongs
     * 
     */
    private @Nullable Object tenant;
    /**
     * @return Type of credential.
     * Expected value is 'ServicePrincipal'.
     * 
     */
    private String type;

    private ServicePrincipalCredentialResponse() {}
    /**
     * @return List of tags that can be used for describing the Credential.
     * 
     */
    public List annotations() {
        return this.annotations == null ? List.of() : this.annotations;
    }
    /**
     * @return Credential description.
     * 
     */
    public Optional description() {
        return Optional.ofNullable(this.description);
    }
    /**
     * @return The app ID of the service principal used to authenticate
     * 
     */
    public Optional servicePrincipalId() {
        return Optional.ofNullable(this.servicePrincipalId);
    }
    /**
     * @return The key of the service principal used to authenticate.
     * 
     */
    public Optional servicePrincipalKey() {
        return Optional.ofNullable(this.servicePrincipalKey);
    }
    /**
     * @return The ID of the tenant to which the service principal belongs
     * 
     */
    public Optional tenant() {
        return Optional.ofNullable(this.tenant);
    }
    /**
     * @return Type of credential.
     * Expected value is 'ServicePrincipal'.
     * 
     */
    public String type() {
        return this.type;
    }

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

    public static Builder builder(ServicePrincipalCredentialResponse defaults) {
        return new Builder(defaults);
    }
    @CustomType.Builder
    public static final class Builder {
        private @Nullable List annotations;
        private @Nullable String description;
        private @Nullable Object servicePrincipalId;
        private @Nullable AzureKeyVaultSecretReferenceResponse servicePrincipalKey;
        private @Nullable Object tenant;
        private String type;
        public Builder() {}
        public Builder(ServicePrincipalCredentialResponse defaults) {
    	      Objects.requireNonNull(defaults);
    	      this.annotations = defaults.annotations;
    	      this.description = defaults.description;
    	      this.servicePrincipalId = defaults.servicePrincipalId;
    	      this.servicePrincipalKey = defaults.servicePrincipalKey;
    	      this.tenant = defaults.tenant;
    	      this.type = defaults.type;
        }

        @CustomType.Setter
        public Builder annotations(@Nullable List annotations) {

            this.annotations = annotations;
            return this;
        }
        public Builder annotations(Object... annotations) {
            return annotations(List.of(annotations));
        }
        @CustomType.Setter
        public Builder description(@Nullable String description) {

            this.description = description;
            return this;
        }
        @CustomType.Setter
        public Builder servicePrincipalId(@Nullable Object servicePrincipalId) {

            this.servicePrincipalId = servicePrincipalId;
            return this;
        }
        @CustomType.Setter
        public Builder servicePrincipalKey(@Nullable AzureKeyVaultSecretReferenceResponse servicePrincipalKey) {

            this.servicePrincipalKey = servicePrincipalKey;
            return this;
        }
        @CustomType.Setter
        public Builder tenant(@Nullable Object tenant) {

            this.tenant = tenant;
            return this;
        }
        @CustomType.Setter
        public Builder type(String type) {
            if (type == null) {
              throw new MissingRequiredPropertyException("ServicePrincipalCredentialResponse", "type");
            }
            this.type = type;
            return this;
        }
        public ServicePrincipalCredentialResponse build() {
            final var _resultValue = new ServicePrincipalCredentialResponse();
            _resultValue.annotations = annotations;
            _resultValue.description = description;
            _resultValue.servicePrincipalId = servicePrincipalId;
            _resultValue.servicePrincipalKey = servicePrincipalKey;
            _resultValue.tenant = tenant;
            _resultValue.type = type;
            return _resultValue;
        }
    }
}