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

com.pulumi.azure.apimanagement.outputs.ApiOperationRequestQueryParameter 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.azure.apimanagement.outputs;

import com.pulumi.azure.apimanagement.outputs.ApiOperationRequestQueryParameterExample;
import com.pulumi.core.annotations.CustomType;
import com.pulumi.exceptions.MissingRequiredPropertyException;
import java.lang.Boolean;
import java.lang.String;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;

@CustomType
public final class ApiOperationRequestQueryParameter {
    /**
     * @return The default value for this Query Parameter.
     * 
     */
    private @Nullable String defaultValue;
    /**
     * @return A description of this Query Parameter.
     * 
     */
    private @Nullable String description;
    /**
     * @return One or more `example` blocks as defined above.
     * 
     */
    private @Nullable List examples;
    /**
     * @return The Name of this Query Parameter.
     * 
     */
    private String name;
    /**
     * @return Is this Query Parameter Required?
     * 
     */
    private Boolean required;
    /**
     * @return The name of the Schema.
     * 
     */
    private @Nullable String schemaId;
    /**
     * @return The Type of this Query Parameter, such as a `string`.
     * 
     */
    private String type;
    /**
     * @return The type name defined by the Schema.
     * 
     */
    private @Nullable String typeName;
    /**
     * @return One or more acceptable values for this Query Parameter.
     * 
     */
    private @Nullable List values;

    private ApiOperationRequestQueryParameter() {}
    /**
     * @return The default value for this Query Parameter.
     * 
     */
    public Optional defaultValue() {
        return Optional.ofNullable(this.defaultValue);
    }
    /**
     * @return A description of this Query Parameter.
     * 
     */
    public Optional description() {
        return Optional.ofNullable(this.description);
    }
    /**
     * @return One or more `example` blocks as defined above.
     * 
     */
    public List examples() {
        return this.examples == null ? List.of() : this.examples;
    }
    /**
     * @return The Name of this Query Parameter.
     * 
     */
    public String name() {
        return this.name;
    }
    /**
     * @return Is this Query Parameter Required?
     * 
     */
    public Boolean required() {
        return this.required;
    }
    /**
     * @return The name of the Schema.
     * 
     */
    public Optional schemaId() {
        return Optional.ofNullable(this.schemaId);
    }
    /**
     * @return The Type of this Query Parameter, such as a `string`.
     * 
     */
    public String type() {
        return this.type;
    }
    /**
     * @return The type name defined by the Schema.
     * 
     */
    public Optional typeName() {
        return Optional.ofNullable(this.typeName);
    }
    /**
     * @return One or more acceptable values for this Query Parameter.
     * 
     */
    public List values() {
        return this.values == null ? List.of() : this.values;
    }

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

    public static Builder builder(ApiOperationRequestQueryParameter defaults) {
        return new Builder(defaults);
    }
    @CustomType.Builder
    public static final class Builder {
        private @Nullable String defaultValue;
        private @Nullable String description;
        private @Nullable List examples;
        private String name;
        private Boolean required;
        private @Nullable String schemaId;
        private String type;
        private @Nullable String typeName;
        private @Nullable List values;
        public Builder() {}
        public Builder(ApiOperationRequestQueryParameter defaults) {
    	      Objects.requireNonNull(defaults);
    	      this.defaultValue = defaults.defaultValue;
    	      this.description = defaults.description;
    	      this.examples = defaults.examples;
    	      this.name = defaults.name;
    	      this.required = defaults.required;
    	      this.schemaId = defaults.schemaId;
    	      this.type = defaults.type;
    	      this.typeName = defaults.typeName;
    	      this.values = defaults.values;
        }

        @CustomType.Setter
        public Builder defaultValue(@Nullable String defaultValue) {

            this.defaultValue = defaultValue;
            return this;
        }
        @CustomType.Setter
        public Builder description(@Nullable String description) {

            this.description = description;
            return this;
        }
        @CustomType.Setter
        public Builder examples(@Nullable List examples) {

            this.examples = examples;
            return this;
        }
        public Builder examples(ApiOperationRequestQueryParameterExample... examples) {
            return examples(List.of(examples));
        }
        @CustomType.Setter
        public Builder name(String name) {
            if (name == null) {
              throw new MissingRequiredPropertyException("ApiOperationRequestQueryParameter", "name");
            }
            this.name = name;
            return this;
        }
        @CustomType.Setter
        public Builder required(Boolean required) {
            if (required == null) {
              throw new MissingRequiredPropertyException("ApiOperationRequestQueryParameter", "required");
            }
            this.required = required;
            return this;
        }
        @CustomType.Setter
        public Builder schemaId(@Nullable String schemaId) {

            this.schemaId = schemaId;
            return this;
        }
        @CustomType.Setter
        public Builder type(String type) {
            if (type == null) {
              throw new MissingRequiredPropertyException("ApiOperationRequestQueryParameter", "type");
            }
            this.type = type;
            return this;
        }
        @CustomType.Setter
        public Builder typeName(@Nullable String typeName) {

            this.typeName = typeName;
            return this;
        }
        @CustomType.Setter
        public Builder values(@Nullable List values) {

            this.values = values;
            return this;
        }
        public Builder values(String... values) {
            return values(List.of(values));
        }
        public ApiOperationRequestQueryParameter build() {
            final var _resultValue = new ApiOperationRequestQueryParameter();
            _resultValue.defaultValue = defaultValue;
            _resultValue.description = description;
            _resultValue.examples = examples;
            _resultValue.name = name;
            _resultValue.required = required;
            _resultValue.schemaId = schemaId;
            _resultValue.type = type;
            _resultValue.typeName = typeName;
            _resultValue.values = values;
            return _resultValue;
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy