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

com.pulumi.azurenative.apimanagement.WorkspaceSubscriptionArgs 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.SubscriptionState;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import com.pulumi.exceptions.MissingRequiredPropertyException;
import java.lang.Boolean;
import java.lang.String;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


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

    public static final WorkspaceSubscriptionArgs Empty = new WorkspaceSubscriptionArgs();

    /**
     * Determines whether tracing can be enabled
     * 
     */
    @Import(name="allowTracing")
    private @Nullable Output allowTracing;

    /**
     * @return Determines whether tracing can be enabled
     * 
     */
    public Optional> allowTracing() {
        return Optional.ofNullable(this.allowTracing);
    }

    /**
     * Determines the type of application which send the create user request. Default is legacy publisher portal.
     * 
     */
    @Import(name="appType")
    private @Nullable Output appType;

    /**
     * @return Determines the type of application which send the create user request. Default is legacy publisher portal.
     * 
     */
    public Optional> appType() {
        return Optional.ofNullable(this.appType);
    }

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

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

    /**
     * Notify change in Subscription State.
     *  - If false, do not send any email notification for change of state of subscription
     *  - If true, send email notification of change of state of subscription
     * 
     */
    @Import(name="notify")
    private @Nullable Output notify;

    /**
     * @return Notify change in Subscription State.
     *  - If false, do not send any email notification for change of state of subscription
     *  - If true, send email notification of change of state of subscription
     * 
     */
    public Optional> notify_() {
        return Optional.ofNullable(this.notify);
    }

    /**
     * User (user id path) for whom subscription is being created in form /users/{userId}
     * 
     */
    @Import(name="ownerId")
    private @Nullable Output ownerId;

    /**
     * @return User (user id path) for whom subscription is being created in form /users/{userId}
     * 
     */
    public Optional> ownerId() {
        return Optional.ofNullable(this.ownerId);
    }

    /**
     * Primary subscription key. If not specified during request key will be generated automatically.
     * 
     */
    @Import(name="primaryKey")
    private @Nullable Output primaryKey;

    /**
     * @return Primary subscription key. If not specified during request key will be generated automatically.
     * 
     */
    public Optional> primaryKey() {
        return Optional.ofNullable(this.primaryKey);
    }

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

    /**
     * Scope like /products/{productId} or /apis or /apis/{apiId}.
     * 
     */
    @Import(name="scope", required=true)
    private Output scope;

    /**
     * @return Scope like /products/{productId} or /apis or /apis/{apiId}.
     * 
     */
    public Output scope() {
        return this.scope;
    }

    /**
     * Secondary subscription key. If not specified during request key will be generated automatically.
     * 
     */
    @Import(name="secondaryKey")
    private @Nullable Output secondaryKey;

    /**
     * @return Secondary subscription key. If not specified during request key will be generated automatically.
     * 
     */
    public Optional> secondaryKey() {
        return Optional.ofNullable(this.secondaryKey);
    }

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

    /**
     * Subscription entity Identifier. The entity represents the association between a user and a product in API Management.
     * 
     */
    @Import(name="sid")
    private @Nullable Output sid;

    /**
     * @return Subscription entity Identifier. The entity represents the association between a user and a product in API Management.
     * 
     */
    public Optional> sid() {
        return Optional.ofNullable(this.sid);
    }

    /**
     * Initial subscription state. If no value is specified, subscription is created with Submitted state. Possible states are * active – the subscription is active, * suspended – the subscription is blocked, and the subscriber cannot call any APIs of the product, * submitted – the subscription request has been made by the developer, but has not yet been approved or rejected, * rejected – the subscription request has been denied by an administrator, * cancelled – the subscription has been cancelled by the developer or administrator, * expired – the subscription reached its expiration date and was deactivated.
     * 
     */
    @Import(name="state")
    private @Nullable Output state;

    /**
     * @return Initial subscription state. If no value is specified, subscription is created with Submitted state. Possible states are * active – the subscription is active, * suspended – the subscription is blocked, and the subscriber cannot call any APIs of the product, * submitted – the subscription request has been made by the developer, but has not yet been approved or rejected, * rejected – the subscription request has been denied by an administrator, * cancelled – the subscription has been cancelled by the developer or administrator, * expired – the subscription reached its expiration date and was deactivated.
     * 
     */
    public Optional> state() {
        return Optional.ofNullable(this.state);
    }

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

    private WorkspaceSubscriptionArgs(WorkspaceSubscriptionArgs $) {
        this.allowTracing = $.allowTracing;
        this.appType = $.appType;
        this.displayName = $.displayName;
        this.notify = $.notify;
        this.ownerId = $.ownerId;
        this.primaryKey = $.primaryKey;
        this.resourceGroupName = $.resourceGroupName;
        this.scope = $.scope;
        this.secondaryKey = $.secondaryKey;
        this.serviceName = $.serviceName;
        this.sid = $.sid;
        this.state = $.state;
        this.workspaceId = $.workspaceId;
    }

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

    public static final class Builder {
        private WorkspaceSubscriptionArgs $;

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

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

        /**
         * @param allowTracing Determines whether tracing can be enabled
         * 
         * @return builder
         * 
         */
        public Builder allowTracing(@Nullable Output allowTracing) {
            $.allowTracing = allowTracing;
            return this;
        }

        /**
         * @param allowTracing Determines whether tracing can be enabled
         * 
         * @return builder
         * 
         */
        public Builder allowTracing(Boolean allowTracing) {
            return allowTracing(Output.of(allowTracing));
        }

        /**
         * @param appType Determines the type of application which send the create user request. Default is legacy publisher portal.
         * 
         * @return builder
         * 
         */
        public Builder appType(@Nullable Output appType) {
            $.appType = appType;
            return this;
        }

        /**
         * @param appType Determines the type of application which send the create user request. Default is legacy publisher portal.
         * 
         * @return builder
         * 
         */
        public Builder appType(String appType) {
            return appType(Output.of(appType));
        }

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

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

        /**
         * @param notify Notify change in Subscription State.
         *  - If false, do not send any email notification for change of state of subscription
         *  - If true, send email notification of change of state of subscription
         * 
         * @return builder
         * 
         */
        public Builder notify_(@Nullable Output notify) {
            $.notify = notify;
            return this;
        }

        /**
         * @param notify Notify change in Subscription State.
         *  - If false, do not send any email notification for change of state of subscription
         *  - If true, send email notification of change of state of subscription
         * 
         * @return builder
         * 
         */
        public Builder notify_(Boolean notify) {
            return notify_(Output.of(notify));
        }

        /**
         * @param ownerId User (user id path) for whom subscription is being created in form /users/{userId}
         * 
         * @return builder
         * 
         */
        public Builder ownerId(@Nullable Output ownerId) {
            $.ownerId = ownerId;
            return this;
        }

        /**
         * @param ownerId User (user id path) for whom subscription is being created in form /users/{userId}
         * 
         * @return builder
         * 
         */
        public Builder ownerId(String ownerId) {
            return ownerId(Output.of(ownerId));
        }

        /**
         * @param primaryKey Primary subscription key. If not specified during request key will be generated automatically.
         * 
         * @return builder
         * 
         */
        public Builder primaryKey(@Nullable Output primaryKey) {
            $.primaryKey = primaryKey;
            return this;
        }

        /**
         * @param primaryKey Primary subscription key. If not specified during request key will be generated automatically.
         * 
         * @return builder
         * 
         */
        public Builder primaryKey(String primaryKey) {
            return primaryKey(Output.of(primaryKey));
        }

        /**
         * @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 scope Scope like /products/{productId} or /apis or /apis/{apiId}.
         * 
         * @return builder
         * 
         */
        public Builder scope(Output scope) {
            $.scope = scope;
            return this;
        }

        /**
         * @param scope Scope like /products/{productId} or /apis or /apis/{apiId}.
         * 
         * @return builder
         * 
         */
        public Builder scope(String scope) {
            return scope(Output.of(scope));
        }

        /**
         * @param secondaryKey Secondary subscription key. If not specified during request key will be generated automatically.
         * 
         * @return builder
         * 
         */
        public Builder secondaryKey(@Nullable Output secondaryKey) {
            $.secondaryKey = secondaryKey;
            return this;
        }

        /**
         * @param secondaryKey Secondary subscription key. If not specified during request key will be generated automatically.
         * 
         * @return builder
         * 
         */
        public Builder secondaryKey(String secondaryKey) {
            return secondaryKey(Output.of(secondaryKey));
        }

        /**
         * @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 sid Subscription entity Identifier. The entity represents the association between a user and a product in API Management.
         * 
         * @return builder
         * 
         */
        public Builder sid(@Nullable Output sid) {
            $.sid = sid;
            return this;
        }

        /**
         * @param sid Subscription entity Identifier. The entity represents the association between a user and a product in API Management.
         * 
         * @return builder
         * 
         */
        public Builder sid(String sid) {
            return sid(Output.of(sid));
        }

        /**
         * @param state Initial subscription state. If no value is specified, subscription is created with Submitted state. Possible states are * active – the subscription is active, * suspended – the subscription is blocked, and the subscriber cannot call any APIs of the product, * submitted – the subscription request has been made by the developer, but has not yet been approved or rejected, * rejected – the subscription request has been denied by an administrator, * cancelled – the subscription has been cancelled by the developer or administrator, * expired – the subscription reached its expiration date and was deactivated.
         * 
         * @return builder
         * 
         */
        public Builder state(@Nullable Output state) {
            $.state = state;
            return this;
        }

        /**
         * @param state Initial subscription state. If no value is specified, subscription is created with Submitted state. Possible states are * active – the subscription is active, * suspended – the subscription is blocked, and the subscriber cannot call any APIs of the product, * submitted – the subscription request has been made by the developer, but has not yet been approved or rejected, * rejected – the subscription request has been denied by an administrator, * cancelled – the subscription has been cancelled by the developer or administrator, * expired – the subscription reached its expiration date and was deactivated.
         * 
         * @return builder
         * 
         */
        public Builder state(SubscriptionState state) {
            return state(Output.of(state));
        }

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

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy