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

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

There is a newer version: 2.72.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.ProductState;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import com.pulumi.exceptions.MissingRequiredPropertyException;
import java.lang.Boolean;
import java.lang.Integer;
import java.lang.String;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


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

    public static final WorkspaceProductArgs Empty = new WorkspaceProductArgs();

    /**
     * whether subscription approval is required. If false, new subscriptions will be approved automatically enabling developers to call the product’s APIs immediately after subscribing. If true, administrators must manually approve the subscription before the developer can any of the product’s APIs. Can be present only if subscriptionRequired property is present and has a value of false.
     * 
     */
    @Import(name="approvalRequired")
    private @Nullable Output approvalRequired;

    /**
     * @return whether subscription approval is required. If false, new subscriptions will be approved automatically enabling developers to call the product’s APIs immediately after subscribing. If true, administrators must manually approve the subscription before the developer can any of the product’s APIs. Can be present only if subscriptionRequired property is present and has a value of false.
     * 
     */
    public Optional> approvalRequired() {
        return Optional.ofNullable(this.approvalRequired);
    }

    /**
     * Product description. May include HTML formatting tags.
     * 
     */
    @Import(name="description")
    private @Nullable Output description;

    /**
     * @return Product description. May include HTML formatting tags.
     * 
     */
    public Optional> description() {
        return Optional.ofNullable(this.description);
    }

    /**
     * Product name.
     * 
     */
    @Import(name="displayName", required=true)
    private Output displayName;

    /**
     * @return Product name.
     * 
     */
    public Output displayName() {
        return this.displayName;
    }

    /**
     * Product identifier. Must be unique in the current API Management service instance.
     * 
     */
    @Import(name="productId")
    private @Nullable Output productId;

    /**
     * @return Product identifier. Must be unique in the current API Management service instance.
     * 
     */
    public Optional> productId() {
        return Optional.ofNullable(this.productId);
    }

    /**
     * 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;
    }

    /**
     * whether product is published or not. Published products are discoverable by users of developer portal. Non published products are visible only to administrators. Default state of Product is notPublished.
     * 
     */
    @Import(name="state")
    private @Nullable Output state;

    /**
     * @return whether product is published or not. Published products are discoverable by users of developer portal. Non published products are visible only to administrators. Default state of Product is notPublished.
     * 
     */
    public Optional> state() {
        return Optional.ofNullable(this.state);
    }

    /**
     * Whether a product subscription is required for accessing APIs included in this product. If true, the product is referred to as "protected" and a valid subscription key is required for a request to an API included in the product to succeed. If false, the product is referred to as "open" and requests to an API included in the product can be made without a subscription key. If property is omitted when creating a new product it's value is assumed to be true.
     * 
     */
    @Import(name="subscriptionRequired")
    private @Nullable Output subscriptionRequired;

    /**
     * @return Whether a product subscription is required for accessing APIs included in this product. If true, the product is referred to as "protected" and a valid subscription key is required for a request to an API included in the product to succeed. If false, the product is referred to as "open" and requests to an API included in the product can be made without a subscription key. If property is omitted when creating a new product it's value is assumed to be true.
     * 
     */
    public Optional> subscriptionRequired() {
        return Optional.ofNullable(this.subscriptionRequired);
    }

    /**
     * Whether the number of subscriptions a user can have to this product at the same time. Set to null or omit to allow unlimited per user subscriptions. Can be present only if subscriptionRequired property is present and has a value of false.
     * 
     */
    @Import(name="subscriptionsLimit")
    private @Nullable Output subscriptionsLimit;

    /**
     * @return Whether the number of subscriptions a user can have to this product at the same time. Set to null or omit to allow unlimited per user subscriptions. Can be present only if subscriptionRequired property is present and has a value of false.
     * 
     */
    public Optional> subscriptionsLimit() {
        return Optional.ofNullable(this.subscriptionsLimit);
    }

    /**
     * Product terms of use. Developers trying to subscribe to the product will be presented and required to accept these terms before they can complete the subscription process.
     * 
     */
    @Import(name="terms")
    private @Nullable Output terms;

    /**
     * @return Product terms of use. Developers trying to subscribe to the product will be presented and required to accept these terms before they can complete the subscription process.
     * 
     */
    public Optional> terms() {
        return Optional.ofNullable(this.terms);
    }

    /**
     * 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 WorkspaceProductArgs() {}

    private WorkspaceProductArgs(WorkspaceProductArgs $) {
        this.approvalRequired = $.approvalRequired;
        this.description = $.description;
        this.displayName = $.displayName;
        this.productId = $.productId;
        this.resourceGroupName = $.resourceGroupName;
        this.serviceName = $.serviceName;
        this.state = $.state;
        this.subscriptionRequired = $.subscriptionRequired;
        this.subscriptionsLimit = $.subscriptionsLimit;
        this.terms = $.terms;
        this.workspaceId = $.workspaceId;
    }

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

    public static final class Builder {
        private WorkspaceProductArgs $;

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

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

        /**
         * @param approvalRequired whether subscription approval is required. If false, new subscriptions will be approved automatically enabling developers to call the product’s APIs immediately after subscribing. If true, administrators must manually approve the subscription before the developer can any of the product’s APIs. Can be present only if subscriptionRequired property is present and has a value of false.
         * 
         * @return builder
         * 
         */
        public Builder approvalRequired(@Nullable Output approvalRequired) {
            $.approvalRequired = approvalRequired;
            return this;
        }

        /**
         * @param approvalRequired whether subscription approval is required. If false, new subscriptions will be approved automatically enabling developers to call the product’s APIs immediately after subscribing. If true, administrators must manually approve the subscription before the developer can any of the product’s APIs. Can be present only if subscriptionRequired property is present and has a value of false.
         * 
         * @return builder
         * 
         */
        public Builder approvalRequired(Boolean approvalRequired) {
            return approvalRequired(Output.of(approvalRequired));
        }

        /**
         * @param description Product description. May include HTML formatting tags.
         * 
         * @return builder
         * 
         */
        public Builder description(@Nullable Output description) {
            $.description = description;
            return this;
        }

        /**
         * @param description Product description. May include HTML formatting tags.
         * 
         * @return builder
         * 
         */
        public Builder description(String description) {
            return description(Output.of(description));
        }

        /**
         * @param displayName Product name.
         * 
         * @return builder
         * 
         */
        public Builder displayName(Output displayName) {
            $.displayName = displayName;
            return this;
        }

        /**
         * @param displayName Product name.
         * 
         * @return builder
         * 
         */
        public Builder displayName(String displayName) {
            return displayName(Output.of(displayName));
        }

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

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

        /**
         * @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 state whether product is published or not. Published products are discoverable by users of developer portal. Non published products are visible only to administrators. Default state of Product is notPublished.
         * 
         * @return builder
         * 
         */
        public Builder state(@Nullable Output state) {
            $.state = state;
            return this;
        }

        /**
         * @param state whether product is published or not. Published products are discoverable by users of developer portal. Non published products are visible only to administrators. Default state of Product is notPublished.
         * 
         * @return builder
         * 
         */
        public Builder state(ProductState state) {
            return state(Output.of(state));
        }

        /**
         * @param subscriptionRequired Whether a product subscription is required for accessing APIs included in this product. If true, the product is referred to as "protected" and a valid subscription key is required for a request to an API included in the product to succeed. If false, the product is referred to as "open" and requests to an API included in the product can be made without a subscription key. If property is omitted when creating a new product it's value is assumed to be true.
         * 
         * @return builder
         * 
         */
        public Builder subscriptionRequired(@Nullable Output subscriptionRequired) {
            $.subscriptionRequired = subscriptionRequired;
            return this;
        }

        /**
         * @param subscriptionRequired Whether a product subscription is required for accessing APIs included in this product. If true, the product is referred to as "protected" and a valid subscription key is required for a request to an API included in the product to succeed. If false, the product is referred to as "open" and requests to an API included in the product can be made without a subscription key. If property is omitted when creating a new product it's value is assumed to be true.
         * 
         * @return builder
         * 
         */
        public Builder subscriptionRequired(Boolean subscriptionRequired) {
            return subscriptionRequired(Output.of(subscriptionRequired));
        }

        /**
         * @param subscriptionsLimit Whether the number of subscriptions a user can have to this product at the same time. Set to null or omit to allow unlimited per user subscriptions. Can be present only if subscriptionRequired property is present and has a value of false.
         * 
         * @return builder
         * 
         */
        public Builder subscriptionsLimit(@Nullable Output subscriptionsLimit) {
            $.subscriptionsLimit = subscriptionsLimit;
            return this;
        }

        /**
         * @param subscriptionsLimit Whether the number of subscriptions a user can have to this product at the same time. Set to null or omit to allow unlimited per user subscriptions. Can be present only if subscriptionRequired property is present and has a value of false.
         * 
         * @return builder
         * 
         */
        public Builder subscriptionsLimit(Integer subscriptionsLimit) {
            return subscriptionsLimit(Output.of(subscriptionsLimit));
        }

        /**
         * @param terms Product terms of use. Developers trying to subscribe to the product will be presented and required to accept these terms before they can complete the subscription process.
         * 
         * @return builder
         * 
         */
        public Builder terms(@Nullable Output terms) {
            $.terms = terms;
            return this;
        }

        /**
         * @param terms Product terms of use. Developers trying to subscribe to the product will be presented and required to accept these terms before they can complete the subscription process.
         * 
         * @return builder
         * 
         */
        public Builder terms(String terms) {
            return terms(Output.of(terms));
        }

        /**
         * @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 WorkspaceProductArgs build() {
            if ($.displayName == null) {
                throw new MissingRequiredPropertyException("WorkspaceProductArgs", "displayName");
            }
            if ($.resourceGroupName == null) {
                throw new MissingRequiredPropertyException("WorkspaceProductArgs", "resourceGroupName");
            }
            if ($.serviceName == null) {
                throw new MissingRequiredPropertyException("WorkspaceProductArgs", "serviceName");
            }
            if ($.workspaceId == null) {
                throw new MissingRequiredPropertyException("WorkspaceProductArgs", "workspaceId");
            }
            return $;
        }
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy