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

import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import java.lang.String;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


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

    public static final PolicyArgs Empty = new PolicyArgs();

    /**
     * The ID of the API Management service. Changing this forces a new API Management service Policy to be created.
     * 
     */
    @Import(name="apiManagementId", required=true)
    private Output<String> apiManagementId;

    /**
     * @return The ID of the API Management service. Changing this forces a new API Management service Policy to be created.
     * 
     */
    public Output<String> apiManagementId() {
        return this.apiManagementId;
    }

    /**
     * The XML Content for this Policy as a string.
     * 
     */
    @Import(name="xmlContent")
    private @Nullable Output<String> xmlContent;

    /**
     * @return The XML Content for this Policy as a string.
     * 
     */
    public Optional<Output<String>> xmlContent() {
        return Optional.ofNullable(this.xmlContent);
    }

    /**
     * A link to a Policy XML Document, which must be publicly available.
     * 
     */
    @Import(name="xmlLink")
    private @Nullable Output<String> xmlLink;

    /**
     * @return A link to a Policy XML Document, which must be publicly available.
     * 
     */
    public Optional<Output<String>> xmlLink() {
        return Optional.ofNullable(this.xmlLink);
    }

    private PolicyArgs() {}

    private PolicyArgs(PolicyArgs $) {
        this.apiManagementId = $.apiManagementId;
        this.xmlContent = $.xmlContent;
        this.xmlLink = $.xmlLink;
    }

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

    public static final class Builder {
        private PolicyArgs $;

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

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

        /**
         * @param apiManagementId The ID of the API Management service. Changing this forces a new API Management service Policy to be created.
         * 
         * @return builder
         * 
         */
        public Builder apiManagementId(Output<String> apiManagementId) {
            $.apiManagementId = apiManagementId;
            return this;
        }

        /**
         * @param apiManagementId The ID of the API Management service. Changing this forces a new API Management service Policy to be created.
         * 
         * @return builder
         * 
         */
        public Builder apiManagementId(String apiManagementId) {
            return apiManagementId(Output.of(apiManagementId));
        }

        /**
         * @param xmlContent The XML Content for this Policy as a string.
         * 
         * @return builder
         * 
         */
        public Builder xmlContent(@Nullable Output<String> xmlContent) {
            $.xmlContent = xmlContent;
            return this;
        }

        /**
         * @param xmlContent The XML Content for this Policy as a string.
         * 
         * @return builder
         * 
         */
        public Builder xmlContent(String xmlContent) {
            return xmlContent(Output.of(xmlContent));
        }

        /**
         * @param xmlLink A link to a Policy XML Document, which must be publicly available.
         * 
         * @return builder
         * 
         */
        public Builder xmlLink(@Nullable Output<String> xmlLink) {
            $.xmlLink = xmlLink;
            return this;
        }

        /**
         * @param xmlLink A link to a Policy XML Document, which must be publicly available.
         * 
         * @return builder
         * 
         */
        public Builder xmlLink(String xmlLink) {
            return xmlLink(Output.of(xmlLink));
        }

        public PolicyArgs build() {
            $.apiManagementId = Objects.requireNonNull($.apiManagementId, "expected parameter 'apiManagementId' to be non-null");
            return $;
        }
    }

}
