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

com.pulumi.azurenative.authorization.outputs.GetPolicyExemptionResult Maven / Gradle / Ivy

There is a newer version: 2.89.2
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.authorization.outputs;

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.Objects;
import java.util.Optional;
import javax.annotation.Nullable;

@CustomType
public final class GetPolicyExemptionResult {
    /**
     * @return The option whether validate the exemption is at or under the assignment scope.
     * 
     */
    private @Nullable String assignmentScopeValidation;
    /**
     * @return The description of the policy exemption.
     * 
     */
    private @Nullable String description;
    /**
     * @return The display name of the policy exemption.
     * 
     */
    private @Nullable String displayName;
    /**
     * @return The policy exemption category. Possible values are Waiver and Mitigated.
     * 
     */
    private String exemptionCategory;
    /**
     * @return The expiration date and time (in UTC ISO 8601 format yyyy-MM-ddTHH:mm:ssZ) of the policy exemption.
     * 
     */
    private @Nullable String expiresOn;
    /**
     * @return The ID of the policy exemption.
     * 
     */
    private String id;
    /**
     * @return The policy exemption 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 exemption.
     * 
     */
    private String name;
    /**
     * @return The ID of the policy assignment that is being exempted.
     * 
     */
    private String policyAssignmentId;
    /**
     * @return The policy definition reference ID list when the associated policy assignment is an assignment of a policy set definition.
     * 
     */
    private @Nullable List policyDefinitionReferenceIds;
    /**
     * @return The resource selector list to filter policies by resource properties.
     * 
     */
    private @Nullable List resourceSelectors;
    /**
     * @return Azure Resource Manager metadata containing createdBy and modifiedBy information.
     * 
     */
    private SystemDataResponse systemData;
    /**
     * @return The type of the resource (Microsoft.Authorization/policyExemptions).
     * 
     */
    private String type;

    private GetPolicyExemptionResult() {}
    /**
     * @return The option whether validate the exemption is at or under the assignment scope.
     * 
     */
    public Optional assignmentScopeValidation() {
        return Optional.ofNullable(this.assignmentScopeValidation);
    }
    /**
     * @return The description of the policy exemption.
     * 
     */
    public Optional description() {
        return Optional.ofNullable(this.description);
    }
    /**
     * @return The display name of the policy exemption.
     * 
     */
    public Optional displayName() {
        return Optional.ofNullable(this.displayName);
    }
    /**
     * @return The policy exemption category. Possible values are Waiver and Mitigated.
     * 
     */
    public String exemptionCategory() {
        return this.exemptionCategory;
    }
    /**
     * @return The expiration date and time (in UTC ISO 8601 format yyyy-MM-ddTHH:mm:ssZ) of the policy exemption.
     * 
     */
    public Optional expiresOn() {
        return Optional.ofNullable(this.expiresOn);
    }
    /**
     * @return The ID of the policy exemption.
     * 
     */
    public String id() {
        return this.id;
    }
    /**
     * @return The policy exemption 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 exemption.
     * 
     */
    public String name() {
        return this.name;
    }
    /**
     * @return The ID of the policy assignment that is being exempted.
     * 
     */
    public String policyAssignmentId() {
        return this.policyAssignmentId;
    }
    /**
     * @return The policy definition reference ID list when the associated policy assignment is an assignment of a policy set definition.
     * 
     */
    public List policyDefinitionReferenceIds() {
        return this.policyDefinitionReferenceIds == null ? List.of() : this.policyDefinitionReferenceIds;
    }
    /**
     * @return The resource selector list to filter policies by resource properties.
     * 
     */
    public List resourceSelectors() {
        return this.resourceSelectors == null ? List.of() : this.resourceSelectors;
    }
    /**
     * @return Azure Resource Manager metadata containing createdBy and modifiedBy information.
     * 
     */
    public SystemDataResponse systemData() {
        return this.systemData;
    }
    /**
     * @return The type of the resource (Microsoft.Authorization/policyExemptions).
     * 
     */
    public String type() {
        return this.type;
    }

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

    public static Builder builder(GetPolicyExemptionResult defaults) {
        return new Builder(defaults);
    }
    @CustomType.Builder
    public static final class Builder {
        private @Nullable String assignmentScopeValidation;
        private @Nullable String description;
        private @Nullable String displayName;
        private String exemptionCategory;
        private @Nullable String expiresOn;
        private String id;
        private @Nullable Object metadata;
        private String name;
        private String policyAssignmentId;
        private @Nullable List policyDefinitionReferenceIds;
        private @Nullable List resourceSelectors;
        private SystemDataResponse systemData;
        private String type;
        public Builder() {}
        public Builder(GetPolicyExemptionResult defaults) {
    	      Objects.requireNonNull(defaults);
    	      this.assignmentScopeValidation = defaults.assignmentScopeValidation;
    	      this.description = defaults.description;
    	      this.displayName = defaults.displayName;
    	      this.exemptionCategory = defaults.exemptionCategory;
    	      this.expiresOn = defaults.expiresOn;
    	      this.id = defaults.id;
    	      this.metadata = defaults.metadata;
    	      this.name = defaults.name;
    	      this.policyAssignmentId = defaults.policyAssignmentId;
    	      this.policyDefinitionReferenceIds = defaults.policyDefinitionReferenceIds;
    	      this.resourceSelectors = defaults.resourceSelectors;
    	      this.systemData = defaults.systemData;
    	      this.type = defaults.type;
        }

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

            this.assignmentScopeValidation = assignmentScopeValidation;
            return this;
        }
        @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 exemptionCategory(String exemptionCategory) {
            if (exemptionCategory == null) {
              throw new MissingRequiredPropertyException("GetPolicyExemptionResult", "exemptionCategory");
            }
            this.exemptionCategory = exemptionCategory;
            return this;
        }
        @CustomType.Setter
        public Builder expiresOn(@Nullable String expiresOn) {

            this.expiresOn = expiresOn;
            return this;
        }
        @CustomType.Setter
        public Builder id(String id) {
            if (id == null) {
              throw new MissingRequiredPropertyException("GetPolicyExemptionResult", "id");
            }
            this.id = id;
            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("GetPolicyExemptionResult", "name");
            }
            this.name = name;
            return this;
        }
        @CustomType.Setter
        public Builder policyAssignmentId(String policyAssignmentId) {
            if (policyAssignmentId == null) {
              throw new MissingRequiredPropertyException("GetPolicyExemptionResult", "policyAssignmentId");
            }
            this.policyAssignmentId = policyAssignmentId;
            return this;
        }
        @CustomType.Setter
        public Builder policyDefinitionReferenceIds(@Nullable List policyDefinitionReferenceIds) {

            this.policyDefinitionReferenceIds = policyDefinitionReferenceIds;
            return this;
        }
        public Builder policyDefinitionReferenceIds(String... policyDefinitionReferenceIds) {
            return policyDefinitionReferenceIds(List.of(policyDefinitionReferenceIds));
        }
        @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 systemData(SystemDataResponse systemData) {
            if (systemData == null) {
              throw new MissingRequiredPropertyException("GetPolicyExemptionResult", "systemData");
            }
            this.systemData = systemData;
            return this;
        }
        @CustomType.Setter
        public Builder type(String type) {
            if (type == null) {
              throw new MissingRequiredPropertyException("GetPolicyExemptionResult", "type");
            }
            this.type = type;
            return this;
        }
        public GetPolicyExemptionResult build() {
            final var _resultValue = new GetPolicyExemptionResult();
            _resultValue.assignmentScopeValidation = assignmentScopeValidation;
            _resultValue.description = description;
            _resultValue.displayName = displayName;
            _resultValue.exemptionCategory = exemptionCategory;
            _resultValue.expiresOn = expiresOn;
            _resultValue.id = id;
            _resultValue.metadata = metadata;
            _resultValue.name = name;
            _resultValue.policyAssignmentId = policyAssignmentId;
            _resultValue.policyDefinitionReferenceIds = policyDefinitionReferenceIds;
            _resultValue.resourceSelectors = resourceSelectors;
            _resultValue.systemData = systemData;
            _resultValue.type = type;
            return _resultValue;
        }
    }
}