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

com.pulumi.aws.apigatewayv2.ModelArgs Maven / Gradle / Ivy

// *** 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.aws.apigatewayv2;

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


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

    public static final ModelArgs Empty = new ModelArgs();

    /**
     * API identifier.
     * 
     */
    @Import(name="apiId", required=true)
    private Output apiId;

    /**
     * @return API identifier.
     * 
     */
    public Output apiId() {
        return this.apiId;
    }

    /**
     * The content-type for the model, for example, `application/json`. Must be between 1 and 256 characters in length.
     * 
     */
    @Import(name="contentType", required=true)
    private Output contentType;

    /**
     * @return The content-type for the model, for example, `application/json`. Must be between 1 and 256 characters in length.
     * 
     */
    public Output contentType() {
        return this.contentType;
    }

    /**
     * Description of the model. Must be between 1 and 128 characters in length.
     * 
     */
    @Import(name="description")
    private @Nullable Output description;

    /**
     * @return Description of the model. Must be between 1 and 128 characters in length.
     * 
     */
    public Optional> description() {
        return Optional.ofNullable(this.description);
    }

    /**
     * Name of the model. Must be alphanumeric. Must be between 1 and 128 characters in length.
     * 
     */
    @Import(name="name")
    private @Nullable Output name;

    /**
     * @return Name of the model. Must be alphanumeric. Must be between 1 and 128 characters in length.
     * 
     */
    public Optional> name() {
        return Optional.ofNullable(this.name);
    }

    /**
     * Schema for the model. This should be a [JSON schema draft 4](https://tools.ietf.org/html/draft-zyp-json-schema-04) model. Must be less than or equal to 32768 characters in length.
     * 
     */
    @Import(name="schema", required=true)
    private Output schema;

    /**
     * @return Schema for the model. This should be a [JSON schema draft 4](https://tools.ietf.org/html/draft-zyp-json-schema-04) model. Must be less than or equal to 32768 characters in length.
     * 
     */
    public Output schema() {
        return this.schema;
    }

    private ModelArgs() {}

    private ModelArgs(ModelArgs $) {
        this.apiId = $.apiId;
        this.contentType = $.contentType;
        this.description = $.description;
        this.name = $.name;
        this.schema = $.schema;
    }

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

    public static final class Builder {
        private ModelArgs $;

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

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

        /**
         * @param apiId API identifier.
         * 
         * @return builder
         * 
         */
        public Builder apiId(Output apiId) {
            $.apiId = apiId;
            return this;
        }

        /**
         * @param apiId API identifier.
         * 
         * @return builder
         * 
         */
        public Builder apiId(String apiId) {
            return apiId(Output.of(apiId));
        }

        /**
         * @param contentType The content-type for the model, for example, `application/json`. Must be between 1 and 256 characters in length.
         * 
         * @return builder
         * 
         */
        public Builder contentType(Output contentType) {
            $.contentType = contentType;
            return this;
        }

        /**
         * @param contentType The content-type for the model, for example, `application/json`. Must be between 1 and 256 characters in length.
         * 
         * @return builder
         * 
         */
        public Builder contentType(String contentType) {
            return contentType(Output.of(contentType));
        }

        /**
         * @param description Description of the model. Must be between 1 and 128 characters in length.
         * 
         * @return builder
         * 
         */
        public Builder description(@Nullable Output description) {
            $.description = description;
            return this;
        }

        /**
         * @param description Description of the model. Must be between 1 and 128 characters in length.
         * 
         * @return builder
         * 
         */
        public Builder description(String description) {
            return description(Output.of(description));
        }

        /**
         * @param name Name of the model. Must be alphanumeric. Must be between 1 and 128 characters in length.
         * 
         * @return builder
         * 
         */
        public Builder name(@Nullable Output name) {
            $.name = name;
            return this;
        }

        /**
         * @param name Name of the model. Must be alphanumeric. Must be between 1 and 128 characters in length.
         * 
         * @return builder
         * 
         */
        public Builder name(String name) {
            return name(Output.of(name));
        }

        /**
         * @param schema Schema for the model. This should be a [JSON schema draft 4](https://tools.ietf.org/html/draft-zyp-json-schema-04) model. Must be less than or equal to 32768 characters in length.
         * 
         * @return builder
         * 
         */
        public Builder schema(Output schema) {
            $.schema = schema;
            return this;
        }

        /**
         * @param schema Schema for the model. This should be a [JSON schema draft 4](https://tools.ietf.org/html/draft-zyp-json-schema-04) model. Must be less than or equal to 32768 characters in length.
         * 
         * @return builder
         * 
         */
        public Builder schema(String schema) {
            return schema(Output.of(schema));
        }

        public ModelArgs build() {
            if ($.apiId == null) {
                throw new MissingRequiredPropertyException("ModelArgs", "apiId");
            }
            if ($.contentType == null) {
                throw new MissingRequiredPropertyException("ModelArgs", "contentType");
            }
            if ($.schema == null) {
                throw new MissingRequiredPropertyException("ModelArgs", "schema");
            }
            return $;
        }
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy