
com.pulumi.azurenative.apimanagement.outputs.ParameterContractResponse 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.azurenative.apimanagement.outputs;
import com.pulumi.azurenative.apimanagement.outputs.ParameterExampleContractResponse;
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.Map;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;
@CustomType
public final class ParameterContractResponse {
/**
* @return Default parameter value.
*
*/
private @Nullable String defaultValue;
/**
* @return Parameter description.
*
*/
private @Nullable String description;
/**
* @return Exampled defined for the parameter.
*
*/
private @Nullable Map examples;
/**
* @return Parameter name.
*
*/
private String name;
/**
* @return Specifies whether parameter is required or not.
*
*/
private @Nullable Boolean required;
/**
* @return Schema identifier.
*
*/
private @Nullable String schemaId;
/**
* @return Parameter type.
*
*/
private String type;
/**
* @return Type name defined by the schema.
*
*/
private @Nullable String typeName;
/**
* @return Parameter values.
*
*/
private @Nullable List values;
private ParameterContractResponse() {}
/**
* @return Default parameter value.
*
*/
public Optional defaultValue() {
return Optional.ofNullable(this.defaultValue);
}
/**
* @return Parameter description.
*
*/
public Optional description() {
return Optional.ofNullable(this.description);
}
/**
* @return Exampled defined for the parameter.
*
*/
public Map examples() {
return this.examples == null ? Map.of() : this.examples;
}
/**
* @return Parameter name.
*
*/
public String name() {
return this.name;
}
/**
* @return Specifies whether parameter is required or not.
*
*/
public Optional required() {
return Optional.ofNullable(this.required);
}
/**
* @return Schema identifier.
*
*/
public Optional schemaId() {
return Optional.ofNullable(this.schemaId);
}
/**
* @return Parameter type.
*
*/
public String type() {
return this.type;
}
/**
* @return Type name defined by the schema.
*
*/
public Optional typeName() {
return Optional.ofNullable(this.typeName);
}
/**
* @return Parameter values.
*
*/
public List values() {
return this.values == null ? List.of() : this.values;
}
public static Builder builder() {
return new Builder();
}
public static Builder builder(ParameterContractResponse defaults) {
return new Builder(defaults);
}
@CustomType.Builder
public static final class Builder {
private @Nullable String defaultValue;
private @Nullable String description;
private @Nullable Map examples;
private String name;
private @Nullable Boolean required;
private @Nullable String schemaId;
private String type;
private @Nullable String typeName;
private @Nullable List values;
public Builder() {}
public Builder(ParameterContractResponse 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 Map examples) {
this.examples = examples;
return this;
}
@CustomType.Setter
public Builder name(String name) {
if (name == null) {
throw new MissingRequiredPropertyException("ParameterContractResponse", "name");
}
this.name = name;
return this;
}
@CustomType.Setter
public Builder required(@Nullable Boolean 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("ParameterContractResponse", "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 ParameterContractResponse build() {
final var _resultValue = new ParameterContractResponse();
_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 - 2025 Weber Informatics LLC | Privacy Policy