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

com.pulumi.azurenative.authorization.outputs.GetPolicyAssignmentResult 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.authorization.outputs;

import com.pulumi.azurenative.authorization.outputs.IdentityResponse;
import com.pulumi.azurenative.authorization.outputs.NonComplianceMessageResponse;
import com.pulumi.azurenative.authorization.outputs.OverrideResponse;
import com.pulumi.azurenative.authorization.outputs.ParameterValuesValueResponse;
import com.pulumi.azurenative.authorization.outputs.ResourceSelectorResponse;
import com.pulumi.azurenative.authorization.outputs.SystemDataResponse;
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.Map;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;

@CustomType
public final class GetPolicyAssignmentResult {
    /**
     * @return This message will be part of response in case of policy violation.
     * 
     */
    private @Nullable String description;
    /**
     * @return The display name of the policy assignment.
     * 
     */
    private @Nullable String displayName;
    /**
     * @return The policy assignment enforcement mode. Possible values are Default and DoNotEnforce.
     * 
     */
    private @Nullable String enforcementMode;
    /**
     * @return The ID of the policy assignment.
     * 
     */
    private String id;
    /**
     * @return The managed identity associated with the policy assignment.
     * 
     */
    private @Nullable IdentityResponse identity;
    /**
     * @return The location of the policy assignment. Only required when utilizing managed identity.
     * 
     */
    private @Nullable String location;
    /**
     * @return The policy assignment metadata. Metadata is an open ended object and is typically a collection of key value pairs.
     * 
     */
    private @Nullable Object metadata;
    /**
     * @return The name of the policy assignment.
     * 
     */
    private String name;
    /**
     * @return The messages that describe why a resource is non-compliant with the policy.
     * 
     */
    private @Nullable List nonComplianceMessages;
    /**
     * @return The policy's excluded scopes.
     * 
     */
    private @Nullable List notScopes;
    /**
     * @return The policy property value override.
     * 
     */
    private @Nullable List overrides;
    /**
     * @return The parameter values for the assigned policy rule. The keys are the parameter names.
     * 
     */
    private @Nullable Map parameters;
    /**
     * @return The ID of the policy definition or policy set definition being assigned.
     * 
     */
    private @Nullable String policyDefinitionId;
    /**
     * @return The resource selector list to filter policies by resource properties.
     * 
     */
    private @Nullable List resourceSelectors;
    /**
     * @return The scope for the policy assignment.
     * 
     */
    private String scope;
    /**
     * @return The system metadata relating to this resource.
     * 
     */
    private SystemDataResponse systemData;
    /**
     * @return The type of the policy assignment.
     * 
     */
    private String type;

    private GetPolicyAssignmentResult() {}
    /**
     * @return This message will be part of response in case of policy violation.
     * 
     */
    public Optional description() {
        return Optional.ofNullable(this.description);
    }
    /**
     * @return The display name of the policy assignment.
     * 
     */
    public Optional displayName() {
        return Optional.ofNullable(this.displayName);
    }
    /**
     * @return The policy assignment enforcement mode. Possible values are Default and DoNotEnforce.
     * 
     */
    public Optional enforcementMode() {
        return Optional.ofNullable(this.enforcementMode);
    }
    /**
     * @return The ID of the policy assignment.
     * 
     */
    public String id() {
        return this.id;
    }
    /**
     * @return The managed identity associated with the policy assignment.
     * 
     */
    public Optional identity() {
        return Optional.ofNullable(this.identity);
    }
    /**
     * @return The location of the policy assignment. Only required when utilizing managed identity.
     * 
     */
    public Optional location() {
        return Optional.ofNullable(this.location);
    }
    /**
     * @return The policy assignment metadata. Metadata is an open ended object and is typically a collection of key value pairs.
     * 
     */
    public Optional metadata() {
        return Optional.ofNullable(this.metadata);
    }
    /**
     * @return The name of the policy assignment.
     * 
     */
    public String name() {
        return this.name;
    }
    /**
     * @return The messages that describe why a resource is non-compliant with the policy.
     * 
     */
    public List nonComplianceMessages() {
        return this.nonComplianceMessages == null ? List.of() : this.nonComplianceMessages;
    }
    /**
     * @return The policy's excluded scopes.
     * 
     */
    public List notScopes() {
        return this.notScopes == null ? List.of() : this.notScopes;
    }
    /**
     * @return The policy property value override.
     * 
     */
    public List overrides() {
        return this.overrides == null ? List.of() : this.overrides;
    }
    /**
     * @return The parameter values for the assigned policy rule. The keys are the parameter names.
     * 
     */
    public Map parameters() {
        return this.parameters == null ? Map.of() : this.parameters;
    }
    /**
     * @return The ID of the policy definition or policy set definition being assigned.
     * 
     */
    public Optional policyDefinitionId() {
        return Optional.ofNullable(this.policyDefinitionId);
    }
    /**
     * @return The resource selector list to filter policies by resource properties.
     * 
     */
    public List resourceSelectors() {
        return this.resourceSelectors == null ? List.of() : this.resourceSelectors;
    }
    /**
     * @return The scope for the policy assignment.
     * 
     */
    public String scope() {
        return this.scope;
    }
    /**
     * @return The system metadata relating to this resource.
     * 
     */
    public SystemDataResponse systemData() {
        return this.systemData;
    }
    /**
     * @return The type of the policy assignment.
     * 
     */
    public String type() {
        return this.type;
    }

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

    public static Builder builder(GetPolicyAssignmentResult defaults) {
        return new Builder(defaults);
    }
    @CustomType.Builder
    public static final class Builder {
        private @Nullable String description;
        private @Nullable String displayName;
        private @Nullable String enforcementMode;
        private String id;
        private @Nullable IdentityResponse identity;
        private @Nullable String location;
        private @Nullable Object metadata;
        private String name;
        private @Nullable List nonComplianceMessages;
        private @Nullable List notScopes;
        private @Nullable List overrides;
        private @Nullable Map parameters;
        private @Nullable String policyDefinitionId;
        private @Nullable List resourceSelectors;
        private String scope;
        private SystemDataResponse systemData;
        private String type;
        public Builder() {}
        public Builder(GetPolicyAssignmentResult defaults) {
    	      Objects.requireNonNull(defaults);
    	      this.description = defaults.description;
    	      this.displayName = defaults.displayName;
    	      this.enforcementMode = defaults.enforcementMode;
    	      this.id = defaults.id;
    	      this.identity = defaults.identity;
    	      this.location = defaults.location;
    	      this.metadata = defaults.metadata;
    	      this.name = defaults.name;
    	      this.nonComplianceMessages = defaults.nonComplianceMessages;
    	      this.notScopes = defaults.notScopes;
    	      this.overrides = defaults.overrides;
    	      this.parameters = defaults.parameters;
    	      this.policyDefinitionId = defaults.policyDefinitionId;
    	      this.resourceSelectors = defaults.resourceSelectors;
    	      this.scope = defaults.scope;
    	      this.systemData = defaults.systemData;
    	      this.type = defaults.type;
        }

        @CustomType.Setter
        public Builder description(@Nullable String description) {

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

            this.displayName = displayName;
            return this;
        }
        @CustomType.Setter
        public Builder enforcementMode(@Nullable String enforcementMode) {

            this.enforcementMode = enforcementMode;
            return this;
        }
        @CustomType.Setter
        public Builder id(String id) {
            if (id == null) {
              throw new MissingRequiredPropertyException("GetPolicyAssignmentResult", "id");
            }
            this.id = id;
            return this;
        }
        @CustomType.Setter
        public Builder identity(@Nullable IdentityResponse identity) {

            this.identity = identity;
            return this;
        }
        @CustomType.Setter
        public Builder location(@Nullable String location) {

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

            this.metadata = metadata;
            return this;
        }
        @CustomType.Setter
        public Builder name(String name) {
            if (name == null) {
              throw new MissingRequiredPropertyException("GetPolicyAssignmentResult", "name");
            }
            this.name = name;
            return this;
        }
        @CustomType.Setter
        public Builder nonComplianceMessages(@Nullable List nonComplianceMessages) {

            this.nonComplianceMessages = nonComplianceMessages;
            return this;
        }
        public Builder nonComplianceMessages(NonComplianceMessageResponse... nonComplianceMessages) {
            return nonComplianceMessages(List.of(nonComplianceMessages));
        }
        @CustomType.Setter
        public Builder notScopes(@Nullable List notScopes) {

            this.notScopes = notScopes;
            return this;
        }
        public Builder notScopes(String... notScopes) {
            return notScopes(List.of(notScopes));
        }
        @CustomType.Setter
        public Builder overrides(@Nullable List overrides) {

            this.overrides = overrides;
            return this;
        }
        public Builder overrides(OverrideResponse... overrides) {
            return overrides(List.of(overrides));
        }
        @CustomType.Setter
        public Builder parameters(@Nullable Map parameters) {

            this.parameters = parameters;
            return this;
        }
        @CustomType.Setter
        public Builder policyDefinitionId(@Nullable String policyDefinitionId) {

            this.policyDefinitionId = policyDefinitionId;
            return this;
        }
        @CustomType.Setter
        public Builder resourceSelectors(@Nullable List resourceSelectors) {

            this.resourceSelectors = resourceSelectors;
            return this;
        }
        public Builder resourceSelectors(ResourceSelectorResponse... resourceSelectors) {
            return resourceSelectors(List.of(resourceSelectors));
        }
        @CustomType.Setter
        public Builder scope(String scope) {
            if (scope == null) {
              throw new MissingRequiredPropertyException("GetPolicyAssignmentResult", "scope");
            }
            this.scope = scope;
            return this;
        }
        @CustomType.Setter
        public Builder systemData(SystemDataResponse systemData) {
            if (systemData == null) {
              throw new MissingRequiredPropertyException("GetPolicyAssignmentResult", "systemData");
            }
            this.systemData = systemData;
            return this;
        }
        @CustomType.Setter
        public Builder type(String type) {
            if (type == null) {
              throw new MissingRequiredPropertyException("GetPolicyAssignmentResult", "type");
            }
            this.type = type;
            return this;
        }
        public GetPolicyAssignmentResult build() {
            final var _resultValue = new GetPolicyAssignmentResult();
            _resultValue.description = description;
            _resultValue.displayName = displayName;
            _resultValue.enforcementMode = enforcementMode;
            _resultValue.id = id;
            _resultValue.identity = identity;
            _resultValue.location = location;
            _resultValue.metadata = metadata;
            _resultValue.name = name;
            _resultValue.nonComplianceMessages = nonComplianceMessages;
            _resultValue.notScopes = notScopes;
            _resultValue.overrides = overrides;
            _resultValue.parameters = parameters;
            _resultValue.policyDefinitionId = policyDefinitionId;
            _resultValue.resourceSelectors = resourceSelectors;
            _resultValue.scope = scope;
            _resultValue.systemData = systemData;
            _resultValue.type = type;
            return _resultValue;
        }
    }
}