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

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


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

    public static final WorkspaceApiSchemaArgs Empty = new WorkspaceApiSchemaArgs();

    /**
     * API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number.
     * 
     */
    @Import(name="apiId", required=true)
    private Output apiId;

    /**
     * @return API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number.
     * 
     */
    public Output apiId() {
        return this.apiId;
    }

    /**
     * Types definitions. Used for Swagger/OpenAPI v2/v3 schemas only, null otherwise.
     * 
     */
    @Import(name="components")
    private @Nullable Output components;

    /**
     * @return Types definitions. Used for Swagger/OpenAPI v2/v3 schemas only, null otherwise.
     * 
     */
    public Optional> components() {
        return Optional.ofNullable(this.components);
    }

    /**
     * Must be a valid a media type used in a Content-Type header as defined in the RFC 2616. Media type of the schema document (e.g. application/json, application/xml). </br> - `Swagger` Schema use `application/vnd.ms-azure-apim.swagger.definitions+json` </br> - `WSDL` Schema use `application/vnd.ms-azure-apim.xsd+xml` </br> - `OpenApi` Schema use `application/vnd.oai.openapi.components+json` </br> - `WADL Schema` use `application/vnd.ms-azure-apim.wadl.grammars+xml`.
     * 
     */
    @Import(name="contentType", required=true)
    private Output contentType;

    /**
     * @return Must be a valid a media type used in a Content-Type header as defined in the RFC 2616. Media type of the schema document (e.g. application/json, application/xml). </br> - `Swagger` Schema use `application/vnd.ms-azure-apim.swagger.definitions+json` </br> - `WSDL` Schema use `application/vnd.ms-azure-apim.xsd+xml` </br> - `OpenApi` Schema use `application/vnd.oai.openapi.components+json` </br> - `WADL Schema` use `application/vnd.ms-azure-apim.wadl.grammars+xml`.
     * 
     */
    public Output contentType() {
        return this.contentType;
    }

    /**
     * Types definitions. Used for Swagger/OpenAPI v1 schemas only, null otherwise.
     * 
     */
    @Import(name="definitions")
    private @Nullable Output definitions;

    /**
     * @return Types definitions. Used for Swagger/OpenAPI v1 schemas only, null otherwise.
     * 
     */
    public Optional> definitions() {
        return Optional.ofNullable(this.definitions);
    }

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

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

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

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

    /**
     * Json escaped string defining the document representing the Schema. Used for schemas other than Swagger/OpenAPI.
     * 
     */
    @Import(name="value")
    private @Nullable Output value;

    /**
     * @return Json escaped string defining the document representing the Schema. Used for schemas other than Swagger/OpenAPI.
     * 
     */
    public Optional> value() {
        return Optional.ofNullable(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 WorkspaceApiSchemaArgs() {}

    private WorkspaceApiSchemaArgs(WorkspaceApiSchemaArgs $) {
        this.apiId = $.apiId;
        this.components = $.components;
        this.contentType = $.contentType;
        this.definitions = $.definitions;
        this.resourceGroupName = $.resourceGroupName;
        this.schemaId = $.schemaId;
        this.serviceName = $.serviceName;
        this.value = $.value;
        this.workspaceId = $.workspaceId;
    }

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

    public static final class Builder {
        private WorkspaceApiSchemaArgs $;

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

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

        /**
         * @param apiId API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number.
         * 
         * @return builder
         * 
         */
        public Builder apiId(Output apiId) {
            $.apiId = apiId;
            return this;
        }

        /**
         * @param apiId API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number.
         * 
         * @return builder
         * 
         */
        public Builder apiId(String apiId) {
            return apiId(Output.of(apiId));
        }

        /**
         * @param components Types definitions. Used for Swagger/OpenAPI v2/v3 schemas only, null otherwise.
         * 
         * @return builder
         * 
         */
        public Builder components(@Nullable Output components) {
            $.components = components;
            return this;
        }

        /**
         * @param components Types definitions. Used for Swagger/OpenAPI v2/v3 schemas only, null otherwise.
         * 
         * @return builder
         * 
         */
        public Builder components(Object components) {
            return components(Output.of(components));
        }

        /**
         * @param contentType Must be a valid a media type used in a Content-Type header as defined in the RFC 2616. Media type of the schema document (e.g. application/json, application/xml). </br> - `Swagger` Schema use `application/vnd.ms-azure-apim.swagger.definitions+json` </br> - `WSDL` Schema use `application/vnd.ms-azure-apim.xsd+xml` </br> - `OpenApi` Schema use `application/vnd.oai.openapi.components+json` </br> - `WADL Schema` use `application/vnd.ms-azure-apim.wadl.grammars+xml`.
         * 
         * @return builder
         * 
         */
        public Builder contentType(Output contentType) {
            $.contentType = contentType;
            return this;
        }

        /**
         * @param contentType Must be a valid a media type used in a Content-Type header as defined in the RFC 2616. Media type of the schema document (e.g. application/json, application/xml). </br> - `Swagger` Schema use `application/vnd.ms-azure-apim.swagger.definitions+json` </br> - `WSDL` Schema use `application/vnd.ms-azure-apim.xsd+xml` </br> - `OpenApi` Schema use `application/vnd.oai.openapi.components+json` </br> - `WADL Schema` use `application/vnd.ms-azure-apim.wadl.grammars+xml`.
         * 
         * @return builder
         * 
         */
        public Builder contentType(String contentType) {
            return contentType(Output.of(contentType));
        }

        /**
         * @param definitions Types definitions. Used for Swagger/OpenAPI v1 schemas only, null otherwise.
         * 
         * @return builder
         * 
         */
        public Builder definitions(@Nullable Output definitions) {
            $.definitions = definitions;
            return this;
        }

        /**
         * @param definitions Types definitions. Used for Swagger/OpenAPI v1 schemas only, null otherwise.
         * 
         * @return builder
         * 
         */
        public Builder definitions(Object definitions) {
            return definitions(Output.of(definitions));
        }

        /**
         * @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 schemaId Schema id identifier. Must be unique in the current API Management service instance.
         * 
         * @return builder
         * 
         */
        public Builder schemaId(@Nullable Output schemaId) {
            $.schemaId = schemaId;
            return this;
        }

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

        /**
         * @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 Json escaped string defining the document representing the Schema. Used for schemas other than Swagger/OpenAPI.
         * 
         * @return builder
         * 
         */
        public Builder value(@Nullable Output value) {
            $.value = value;
            return this;
        }

        /**
         * @param value Json escaped string defining the document representing the Schema. Used for schemas other than Swagger/OpenAPI.
         * 
         * @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 WorkspaceApiSchemaArgs build() {
            if ($.apiId == null) {
                throw new MissingRequiredPropertyException("WorkspaceApiSchemaArgs", "apiId");
            }
            if ($.contentType == null) {
                throw new MissingRequiredPropertyException("WorkspaceApiSchemaArgs", "contentType");
            }
            if ($.resourceGroupName == null) {
                throw new MissingRequiredPropertyException("WorkspaceApiSchemaArgs", "resourceGroupName");
            }
            if ($.serviceName == null) {
                throw new MissingRequiredPropertyException("WorkspaceApiSchemaArgs", "serviceName");
            }
            if ($.workspaceId == null) {
                throw new MissingRequiredPropertyException("WorkspaceApiSchemaArgs", "workspaceId");
            }
            return $;
        }
    }

}