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

com.pulumi.azurenative.apimanagement.WorkspacePolicyArgs Maven / Gradle / Ivy

There is a newer version: 2.78.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.apimanagement;

import com.pulumi.azurenative.apimanagement.enums.PolicyContentFormat;
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.String;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


public final class WorkspacePolicyArgs extends com.pulumi.resources.ResourceArgs {

    public static final WorkspacePolicyArgs Empty = new WorkspacePolicyArgs();

    /**
     * Format of the policyContent.
     * 
     */
    @Import(name="format")
    private @Nullable Output> format;

    /**
     * @return Format of the policyContent.
     * 
     */
    public Optional>> format() {
        return Optional.ofNullable(this.format);
    }

    /**
     * The identifier of the Policy.
     * 
     */
    @Import(name="policyId")
    private @Nullable Output policyId;

    /**
     * @return The identifier of the Policy.
     * 
     */
    public Optional> policyId() {
        return Optional.ofNullable(this.policyId);
    }

    /**
     * The name of the resource group. The name is case insensitive.
     * 
     */
    @Import(name="resourceGroupName", required=true)
    private Output resourceGroupName;

    /**
     * @return The name of the resource group. The name is case insensitive.
     * 
     */
    public Output resourceGroupName() {
        return this.resourceGroupName;
    }

    /**
     * The name of the API Management service.
     * 
     */
    @Import(name="serviceName", required=true)
    private Output serviceName;

    /**
     * @return The name of the API Management service.
     * 
     */
    public Output serviceName() {
        return this.serviceName;
    }

    /**
     * Contents of the Policy as defined by the format.
     * 
     */
    @Import(name="value", required=true)
    private Output value;

    /**
     * @return Contents of the Policy as defined by the format.
     * 
     */
    public Output value() {
        return this.value;
    }

    /**
     * Workspace identifier. Must be unique in the current API Management service instance.
     * 
     */
    @Import(name="workspaceId", required=true)
    private Output workspaceId;

    /**
     * @return Workspace identifier. Must be unique in the current API Management service instance.
     * 
     */
    public Output workspaceId() {
        return this.workspaceId;
    }

    private WorkspacePolicyArgs() {}

    private WorkspacePolicyArgs(WorkspacePolicyArgs $) {
        this.format = $.format;
        this.policyId = $.policyId;
        this.resourceGroupName = $.resourceGroupName;
        this.serviceName = $.serviceName;
        this.value = $.value;
        this.workspaceId = $.workspaceId;
    }

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

    public static final class Builder {
        private WorkspacePolicyArgs $;

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

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

        /**
         * @param format Format of the policyContent.
         * 
         * @return builder
         * 
         */
        public Builder format(@Nullable Output> format) {
            $.format = format;
            return this;
        }

        /**
         * @param format Format of the policyContent.
         * 
         * @return builder
         * 
         */
        public Builder format(Either format) {
            return format(Output.of(format));
        }

        /**
         * @param format Format of the policyContent.
         * 
         * @return builder
         * 
         */
        public Builder format(String format) {
            return format(Either.ofLeft(format));
        }

        /**
         * @param format Format of the policyContent.
         * 
         * @return builder
         * 
         */
        public Builder format(PolicyContentFormat format) {
            return format(Either.ofRight(format));
        }

        /**
         * @param policyId The identifier of the Policy.
         * 
         * @return builder
         * 
         */
        public Builder policyId(@Nullable Output policyId) {
            $.policyId = policyId;
            return this;
        }

        /**
         * @param policyId The identifier of the Policy.
         * 
         * @return builder
         * 
         */
        public Builder policyId(String policyId) {
            return policyId(Output.of(policyId));
        }

        /**
         * @param resourceGroupName The name of the resource group. The name is case insensitive.
         * 
         * @return builder
         * 
         */
        public Builder resourceGroupName(Output resourceGroupName) {
            $.resourceGroupName = resourceGroupName;
            return this;
        }

        /**
         * @param resourceGroupName The name of the resource group. The name is case insensitive.
         * 
         * @return builder
         * 
         */
        public Builder resourceGroupName(String resourceGroupName) {
            return resourceGroupName(Output.of(resourceGroupName));
        }

        /**
         * @param serviceName The name of the API Management service.
         * 
         * @return builder
         * 
         */
        public Builder serviceName(Output serviceName) {
            $.serviceName = serviceName;
            return this;
        }

        /**
         * @param serviceName The name of the API Management service.
         * 
         * @return builder
         * 
         */
        public Builder serviceName(String serviceName) {
            return serviceName(Output.of(serviceName));
        }

        /**
         * @param value Contents of the Policy as defined by the format.
         * 
         * @return builder
         * 
         */
        public Builder value(Output value) {
            $.value = value;
            return this;
        }

        /**
         * @param value Contents of the Policy as defined by the format.
         * 
         * @return builder
         * 
         */
        public Builder value(String value) {
            return value(Output.of(value));
        }

        /**
         * @param workspaceId Workspace identifier. Must be unique in the current API Management service instance.
         * 
         * @return builder
         * 
         */
        public Builder workspaceId(Output workspaceId) {
            $.workspaceId = workspaceId;
            return this;
        }

        /**
         * @param workspaceId Workspace identifier. Must be unique in the current API Management service instance.
         * 
         * @return builder
         * 
         */
        public Builder workspaceId(String workspaceId) {
            return workspaceId(Output.of(workspaceId));
        }

        public WorkspacePolicyArgs build() {
            $.format = Codegen.stringProp("format").left(PolicyContentFormat.class).output().arg($.format).def("xml").getNullable();
            if ($.resourceGroupName == null) {
                throw new MissingRequiredPropertyException("WorkspacePolicyArgs", "resourceGroupName");
            }
            if ($.serviceName == null) {
                throw new MissingRequiredPropertyException("WorkspacePolicyArgs", "serviceName");
            }
            if ($.value == null) {
                throw new MissingRequiredPropertyException("WorkspacePolicyArgs", "value");
            }
            if ($.workspaceId == null) {
                throw new MissingRequiredPropertyException("WorkspacePolicyArgs", "workspaceId");
            }
            return $;
        }
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy