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

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

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

import com.pulumi.azurenative.authorization.outputs.ParameterDefinitionsValueResponse;
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.Map;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;

@CustomType
public final class GetPolicyDefinitionResult {
    /**
     * @return The policy definition description.
     * 
     */
    private @Nullable String description;
    /**
     * @return The display name of the policy definition.
     * 
     */
    private @Nullable String displayName;
    /**
     * @return The ID of the policy definition.
     * 
     */
    private String id;
    /**
     * @return The policy definition metadata.  Metadata is an open ended object and is typically a collection of key value pairs.
     * 
     */
    private @Nullable Object metadata;
    /**
     * @return The policy definition mode. Some examples are All, Indexed, Microsoft.KeyVault.Data.
     * 
     */
    private @Nullable String mode;
    /**
     * @return The name of the policy definition.
     * 
     */
    private String name;
    /**
     * @return The parameter definitions for parameters used in the policy rule. The keys are the parameter names.
     * 
     */
    private @Nullable Map parameters;
    /**
     * @return The policy rule.
     * 
     */
    private @Nullable Object policyRule;
    /**
     * @return The type of policy definition. Possible values are NotSpecified, BuiltIn, Custom, and Static.
     * 
     */
    private @Nullable String policyType;
    /**
     * @return The system metadata relating to this resource.
     * 
     */
    private SystemDataResponse systemData;
    /**
     * @return The type of the resource (Microsoft.Authorization/policyDefinitions).
     * 
     */
    private String type;

    private GetPolicyDefinitionResult() {}
    /**
     * @return The policy definition description.
     * 
     */
    public Optional description() {
        return Optional.ofNullable(this.description);
    }
    /**
     * @return The display name of the policy definition.
     * 
     */
    public Optional displayName() {
        return Optional.ofNullable(this.displayName);
    }
    /**
     * @return The ID of the policy definition.
     * 
     */
    public String id() {
        return this.id;
    }
    /**
     * @return The policy definition 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 policy definition mode. Some examples are All, Indexed, Microsoft.KeyVault.Data.
     * 
     */
    public Optional mode() {
        return Optional.ofNullable(this.mode);
    }
    /**
     * @return The name of the policy definition.
     * 
     */
    public String name() {
        return this.name;
    }
    /**
     * @return The parameter definitions for parameters used in the policy rule. The keys are the parameter names.
     * 
     */
    public Map parameters() {
        return this.parameters == null ? Map.of() : this.parameters;
    }
    /**
     * @return The policy rule.
     * 
     */
    public Optional policyRule() {
        return Optional.ofNullable(this.policyRule);
    }
    /**
     * @return The type of policy definition. Possible values are NotSpecified, BuiltIn, Custom, and Static.
     * 
     */
    public Optional policyType() {
        return Optional.ofNullable(this.policyType);
    }
    /**
     * @return The system metadata relating to this resource.
     * 
     */
    public SystemDataResponse systemData() {
        return this.systemData;
    }
    /**
     * @return The type of the resource (Microsoft.Authorization/policyDefinitions).
     * 
     */
    public String type() {
        return this.type;
    }

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

    public static Builder builder(GetPolicyDefinitionResult defaults) {
        return new Builder(defaults);
    }
    @CustomType.Builder
    public static final class Builder {
        private @Nullable String description;
        private @Nullable String displayName;
        private String id;
        private @Nullable Object metadata;
        private @Nullable String mode;
        private String name;
        private @Nullable Map parameters;
        private @Nullable Object policyRule;
        private @Nullable String policyType;
        private SystemDataResponse systemData;
        private String type;
        public Builder() {}
        public Builder(GetPolicyDefinitionResult defaults) {
    	      Objects.requireNonNull(defaults);
    	      this.description = defaults.description;
    	      this.displayName = defaults.displayName;
    	      this.id = defaults.id;
    	      this.metadata = defaults.metadata;
    	      this.mode = defaults.mode;
    	      this.name = defaults.name;
    	      this.parameters = defaults.parameters;
    	      this.policyRule = defaults.policyRule;
    	      this.policyType = defaults.policyType;
    	      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 id(String id) {
            if (id == null) {
              throw new MissingRequiredPropertyException("GetPolicyDefinitionResult", "id");
            }
            this.id = id;
            return this;
        }
        @CustomType.Setter
        public Builder metadata(@Nullable Object metadata) {

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

            this.mode = mode;
            return this;
        }
        @CustomType.Setter
        public Builder name(String name) {
            if (name == null) {
              throw new MissingRequiredPropertyException("GetPolicyDefinitionResult", "name");
            }
            this.name = name;
            return this;
        }
        @CustomType.Setter
        public Builder parameters(@Nullable Map parameters) {

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

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

            this.policyType = policyType;
            return this;
        }
        @CustomType.Setter
        public Builder systemData(SystemDataResponse systemData) {
            if (systemData == null) {
              throw new MissingRequiredPropertyException("GetPolicyDefinitionResult", "systemData");
            }
            this.systemData = systemData;
            return this;
        }
        @CustomType.Setter
        public Builder type(String type) {
            if (type == null) {
              throw new MissingRequiredPropertyException("GetPolicyDefinitionResult", "type");
            }
            this.type = type;
            return this;
        }
        public GetPolicyDefinitionResult build() {
            final var _resultValue = new GetPolicyDefinitionResult();
            _resultValue.description = description;
            _resultValue.displayName = displayName;
            _resultValue.id = id;
            _resultValue.metadata = metadata;
            _resultValue.mode = mode;
            _resultValue.name = name;
            _resultValue.parameters = parameters;
            _resultValue.policyRule = policyRule;
            _resultValue.policyType = policyType;
            _resultValue.systemData = systemData;
            _resultValue.type = type;
            return _resultValue;
        }
    }
}