
com.pulumi.azurenative.apimanagement.outputs.RepresentationContractResponse 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.ParameterContractResponse;
import com.pulumi.azurenative.apimanagement.outputs.ParameterExampleContractResponse;
import com.pulumi.core.annotations.CustomType;
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;
@CustomType
public final class RepresentationContractResponse {
/**
* @return Specifies a registered or custom content type for this representation, e.g. application/xml.
*
*/
private String contentType;
/**
* @return Exampled defined for the representation.
*
*/
private @Nullable Map examples;
/**
* @return Collection of form parameters. Required if 'contentType' value is either 'application/x-www-form-urlencoded' or 'multipart/form-data'..
*
*/
private @Nullable List formParameters;
/**
* @return Schema identifier. Applicable only if 'contentType' value is neither 'application/x-www-form-urlencoded' nor 'multipart/form-data'.
*
*/
private @Nullable String schemaId;
/**
* @return Type name defined by the schema. Applicable only if 'contentType' value is neither 'application/x-www-form-urlencoded' nor 'multipart/form-data'.
*
*/
private @Nullable String typeName;
private RepresentationContractResponse() {}
/**
* @return Specifies a registered or custom content type for this representation, e.g. application/xml.
*
*/
public String contentType() {
return this.contentType;
}
/**
* @return Exampled defined for the representation.
*
*/
public Map examples() {
return this.examples == null ? Map.of() : this.examples;
}
/**
* @return Collection of form parameters. Required if 'contentType' value is either 'application/x-www-form-urlencoded' or 'multipart/form-data'..
*
*/
public List formParameters() {
return this.formParameters == null ? List.of() : this.formParameters;
}
/**
* @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);
}
/**
* @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);
}
public static Builder builder() {
return new Builder();
}
public static Builder builder(RepresentationContractResponse defaults) {
return new Builder(defaults);
}
@CustomType.Builder
public static final class Builder {
private String contentType;
private @Nullable Map examples;
private @Nullable List formParameters;
private @Nullable String schemaId;
private @Nullable String typeName;
public Builder() {}
public Builder(RepresentationContractResponse defaults) {
Objects.requireNonNull(defaults);
this.contentType = defaults.contentType;
this.examples = defaults.examples;
this.formParameters = defaults.formParameters;
this.schemaId = defaults.schemaId;
this.typeName = defaults.typeName;
}
@CustomType.Setter
public Builder contentType(String contentType) {
if (contentType == null) {
throw new MissingRequiredPropertyException("RepresentationContractResponse", "contentType");
}
this.contentType = contentType;
return this;
}
@CustomType.Setter
public Builder examples(@Nullable Map examples) {
this.examples = examples;
return this;
}
@CustomType.Setter
public Builder formParameters(@Nullable List formParameters) {
this.formParameters = formParameters;
return this;
}
public Builder formParameters(ParameterContractResponse... formParameters) {
return formParameters(List.of(formParameters));
}
@CustomType.Setter
public Builder schemaId(@Nullable String schemaId) {
this.schemaId = schemaId;
return this;
}
@CustomType.Setter
public Builder typeName(@Nullable String typeName) {
this.typeName = typeName;
return this;
}
public RepresentationContractResponse build() {
final var _resultValue = new RepresentationContractResponse();
_resultValue.contentType = contentType;
_resultValue.examples = examples;
_resultValue.formParameters = formParameters;
_resultValue.schemaId = schemaId;
_resultValue.typeName = typeName;
return _resultValue;
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy