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

com.pulumi.azurenative.apimanagement.GlobalSchemaArgs 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.SchemaType;
import com.pulumi.core.Either;
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 GlobalSchemaArgs extends com.pulumi.resources.ResourceArgs {

    public static final GlobalSchemaArgs Empty = new GlobalSchemaArgs();

    /**
     * Free-form schema entity description.
     * 
     */
    @Import(name="description")
    private @Nullable Output description;

    /**
     * @return Free-form schema entity description.
     * 
     */
    public Optional> description() {
        return Optional.ofNullable(this.description);
    }

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

    /**
     * Schema Type. Immutable.
     * 
     */
    @Import(name="schemaType", required=true)
    private Output> schemaType;

    /**
     * @return Schema Type. Immutable.
     * 
     */
    public Output> schemaType() {
        return this.schemaType;
    }

    /**
     * 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-encoded string for non json-based schema.
     * 
     */
    @Import(name="value")
    private @Nullable Output value;

    /**
     * @return Json-encoded string for non json-based schema.
     * 
     */
    public Optional> value() {
        return Optional.ofNullable(this.value);
    }

    private GlobalSchemaArgs() {}

    private GlobalSchemaArgs(GlobalSchemaArgs $) {
        this.description = $.description;
        this.resourceGroupName = $.resourceGroupName;
        this.schemaId = $.schemaId;
        this.schemaType = $.schemaType;
        this.serviceName = $.serviceName;
        this.value = $.value;
    }

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

    public static final class Builder {
        private GlobalSchemaArgs $;

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

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

        /**
         * @param description Free-form schema entity description.
         * 
         * @return builder
         * 
         */
        public Builder description(@Nullable Output description) {
            $.description = description;
            return this;
        }

        /**
         * @param description Free-form schema entity description.
         * 
         * @return builder
         * 
         */
        public Builder description(String description) {
            return description(Output.of(description));
        }

        /**
         * @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 schemaType Schema Type. Immutable.
         * 
         * @return builder
         * 
         */
        public Builder schemaType(Output> schemaType) {
            $.schemaType = schemaType;
            return this;
        }

        /**
         * @param schemaType Schema Type. Immutable.
         * 
         * @return builder
         * 
         */
        public Builder schemaType(Either schemaType) {
            return schemaType(Output.of(schemaType));
        }

        /**
         * @param schemaType Schema Type. Immutable.
         * 
         * @return builder
         * 
         */
        public Builder schemaType(String schemaType) {
            return schemaType(Either.ofLeft(schemaType));
        }

        /**
         * @param schemaType Schema Type. Immutable.
         * 
         * @return builder
         * 
         */
        public Builder schemaType(SchemaType schemaType) {
            return schemaType(Either.ofRight(schemaType));
        }

        /**
         * @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-encoded string for non json-based schema.
         * 
         * @return builder
         * 
         */
        public Builder value(@Nullable Output value) {
            $.value = value;
            return this;
        }

        /**
         * @param value Json-encoded string for non json-based schema.
         * 
         * @return builder
         * 
         */
        public Builder value(Object value) {
            return value(Output.of(value));
        }

        public GlobalSchemaArgs build() {
            if ($.resourceGroupName == null) {
                throw new MissingRequiredPropertyException("GlobalSchemaArgs", "resourceGroupName");
            }
            if ($.schemaType == null) {
                throw new MissingRequiredPropertyException("GlobalSchemaArgs", "schemaType");
            }
            if ($.serviceName == null) {
                throw new MissingRequiredPropertyException("GlobalSchemaArgs", "serviceName");
            }
            return $;
        }
    }

}