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

com.pulumi.azurenative.apimanagement.inputs.RepresentationContractArgs 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.inputs;

import com.pulumi.azurenative.apimanagement.inputs.ParameterContractArgs;
import com.pulumi.azurenative.apimanagement.inputs.ParameterExampleContractArgs;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import com.pulumi.exceptions.MissingRequiredPropertyException;
import java.lang.String;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


/**
 * Operation request/response representation details.
 * 
 */
public final class RepresentationContractArgs extends com.pulumi.resources.ResourceArgs {

    public static final RepresentationContractArgs Empty = new RepresentationContractArgs();

    /**
     * Specifies a registered or custom content type for this representation, e.g. application/xml.
     * 
     */
    @Import(name="contentType", required=true)
    private Output contentType;

    /**
     * @return Specifies a registered or custom content type for this representation, e.g. application/xml.
     * 
     */
    public Output contentType() {
        return this.contentType;
    }

    /**
     * Exampled defined for the representation.
     * 
     */
    @Import(name="examples")
    private @Nullable Output> examples;

    /**
     * @return Exampled defined for the representation.
     * 
     */
    public Optional>> examples() {
        return Optional.ofNullable(this.examples);
    }

    /**
     * Collection of form parameters. Required if 'contentType' value is either 'application/x-www-form-urlencoded' or 'multipart/form-data'..
     * 
     */
    @Import(name="formParameters")
    private @Nullable Output> formParameters;

    /**
     * @return Collection of form parameters. Required if 'contentType' value is either 'application/x-www-form-urlencoded' or 'multipart/form-data'..
     * 
     */
    public Optional>> formParameters() {
        return Optional.ofNullable(this.formParameters);
    }

    /**
     * Schema identifier. Applicable only if 'contentType' value is neither 'application/x-www-form-urlencoded' nor 'multipart/form-data'.
     * 
     */
    @Import(name="schemaId")
    private @Nullable Output schemaId;

    /**
     * @return Schema identifier. Applicable only if 'contentType' value is neither 'application/x-www-form-urlencoded' nor 'multipart/form-data'.
     * 
     */
    public Optional> schemaId() {
        return Optional.ofNullable(this.schemaId);
    }

    /**
     * Type name defined by the schema. Applicable only if 'contentType' value is neither 'application/x-www-form-urlencoded' nor 'multipart/form-data'.
     * 
     */
    @Import(name="typeName")
    private @Nullable Output typeName;

    /**
     * @return Type name defined by the schema. Applicable only if 'contentType' value is neither 'application/x-www-form-urlencoded' nor 'multipart/form-data'.
     * 
     */
    public Optional> typeName() {
        return Optional.ofNullable(this.typeName);
    }

    private RepresentationContractArgs() {}

    private RepresentationContractArgs(RepresentationContractArgs $) {
        this.contentType = $.contentType;
        this.examples = $.examples;
        this.formParameters = $.formParameters;
        this.schemaId = $.schemaId;
        this.typeName = $.typeName;
    }

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

    public static final class Builder {
        private RepresentationContractArgs $;

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

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

        /**
         * @param contentType Specifies a registered or custom content type for this representation, e.g. application/xml.
         * 
         * @return builder
         * 
         */
        public Builder contentType(Output contentType) {
            $.contentType = contentType;
            return this;
        }

        /**
         * @param contentType Specifies a registered or custom content type for this representation, e.g. application/xml.
         * 
         * @return builder
         * 
         */
        public Builder contentType(String contentType) {
            return contentType(Output.of(contentType));
        }

        /**
         * @param examples Exampled defined for the representation.
         * 
         * @return builder
         * 
         */
        public Builder examples(@Nullable Output> examples) {
            $.examples = examples;
            return this;
        }

        /**
         * @param examples Exampled defined for the representation.
         * 
         * @return builder
         * 
         */
        public Builder examples(Map examples) {
            return examples(Output.of(examples));
        }

        /**
         * @param formParameters Collection of form parameters. Required if 'contentType' value is either 'application/x-www-form-urlencoded' or 'multipart/form-data'..
         * 
         * @return builder
         * 
         */
        public Builder formParameters(@Nullable Output> formParameters) {
            $.formParameters = formParameters;
            return this;
        }

        /**
         * @param formParameters Collection of form parameters. Required if 'contentType' value is either 'application/x-www-form-urlencoded' or 'multipart/form-data'..
         * 
         * @return builder
         * 
         */
        public Builder formParameters(List formParameters) {
            return formParameters(Output.of(formParameters));
        }

        /**
         * @param formParameters Collection of form parameters. Required if 'contentType' value is either 'application/x-www-form-urlencoded' or 'multipart/form-data'..
         * 
         * @return builder
         * 
         */
        public Builder formParameters(ParameterContractArgs... formParameters) {
            return formParameters(List.of(formParameters));
        }

        /**
         * @param schemaId Schema identifier. Applicable only if 'contentType' value is neither 'application/x-www-form-urlencoded' nor 'multipart/form-data'.
         * 
         * @return builder
         * 
         */
        public Builder schemaId(@Nullable Output schemaId) {
            $.schemaId = schemaId;
            return this;
        }

        /**
         * @param schemaId Schema identifier. Applicable only if 'contentType' value is neither 'application/x-www-form-urlencoded' nor 'multipart/form-data'.
         * 
         * @return builder
         * 
         */
        public Builder schemaId(String schemaId) {
            return schemaId(Output.of(schemaId));
        }

        /**
         * @param typeName Type name defined by the schema. Applicable only if 'contentType' value is neither 'application/x-www-form-urlencoded' nor 'multipart/form-data'.
         * 
         * @return builder
         * 
         */
        public Builder typeName(@Nullable Output typeName) {
            $.typeName = typeName;
            return this;
        }

        /**
         * @param typeName Type name defined by the schema. Applicable only if 'contentType' value is neither 'application/x-www-form-urlencoded' nor 'multipart/form-data'.
         * 
         * @return builder
         * 
         */
        public Builder typeName(String typeName) {
            return typeName(Output.of(typeName));
        }

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

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy