Please wait. This can take some minutes ...
Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance.
Project price only 1 $
You can buy this project and download/modify it how often you want.
software.amazon.awssdk.services.apigateway.model.GetRestApiResponse Maven / Gradle / Ivy
Go to download
The AWS Java SDK for Amazon API Gateway module holds the client classes that are used for communicating
with Amazon API
Gateway
/*
* Copyright 2014-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
* the License. A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
* CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
* and limitations under the License.
*/
package software.amazon.awssdk.services.apigateway.model;
import java.time.Instant;
import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.Optional;
import java.util.function.BiConsumer;
import java.util.function.Consumer;
import java.util.function.Function;
import software.amazon.awssdk.annotations.Generated;
import software.amazon.awssdk.core.SdkField;
import software.amazon.awssdk.core.SdkPojo;
import software.amazon.awssdk.core.protocol.MarshallLocation;
import software.amazon.awssdk.core.protocol.MarshallingType;
import software.amazon.awssdk.core.traits.ListTrait;
import software.amazon.awssdk.core.traits.LocationTrait;
import software.amazon.awssdk.core.traits.MapTrait;
import software.amazon.awssdk.core.util.DefaultSdkAutoConstructList;
import software.amazon.awssdk.core.util.DefaultSdkAutoConstructMap;
import software.amazon.awssdk.utils.ToString;
import software.amazon.awssdk.utils.builder.CopyableBuilder;
import software.amazon.awssdk.utils.builder.ToCopyableBuilder;
/**
*
* Represents a REST API.
*
*
*/
@Generated("software.amazon.awssdk:codegen")
public final class GetRestApiResponse extends ApiGatewayResponse implements
ToCopyableBuilder {
private static final SdkField ID_FIELD = SdkField. builder(MarshallingType.STRING)
.getter(getter(GetRestApiResponse::id)).setter(setter(Builder::id))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("id").build()).build();
private static final SdkField NAME_FIELD = SdkField. builder(MarshallingType.STRING)
.getter(getter(GetRestApiResponse::name)).setter(setter(Builder::name))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("name").build()).build();
private static final SdkField DESCRIPTION_FIELD = SdkField. builder(MarshallingType.STRING)
.getter(getter(GetRestApiResponse::description)).setter(setter(Builder::description))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("description").build()).build();
private static final SdkField CREATED_DATE_FIELD = SdkField. builder(MarshallingType.INSTANT)
.getter(getter(GetRestApiResponse::createdDate)).setter(setter(Builder::createdDate))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("createdDate").build()).build();
private static final SdkField VERSION_FIELD = SdkField. builder(MarshallingType.STRING)
.getter(getter(GetRestApiResponse::version)).setter(setter(Builder::version))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("version").build()).build();
private static final SdkField> WARNINGS_FIELD = SdkField
.> builder(MarshallingType.LIST)
.getter(getter(GetRestApiResponse::warnings))
.setter(setter(Builder::warnings))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("warnings").build(),
ListTrait
.builder()
.memberLocationName(null)
.memberFieldInfo(
SdkField. builder(MarshallingType.STRING)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD)
.locationName("member").build()).build()).build()).build();
private static final SdkField> BINARY_MEDIA_TYPES_FIELD = SdkField
.> builder(MarshallingType.LIST)
.getter(getter(GetRestApiResponse::binaryMediaTypes))
.setter(setter(Builder::binaryMediaTypes))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("binaryMediaTypes").build(),
ListTrait
.builder()
.memberLocationName(null)
.memberFieldInfo(
SdkField. builder(MarshallingType.STRING)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD)
.locationName("member").build()).build()).build()).build();
private static final SdkField MINIMUM_COMPRESSION_SIZE_FIELD = SdkField. builder(MarshallingType.INTEGER)
.getter(getter(GetRestApiResponse::minimumCompressionSize)).setter(setter(Builder::minimumCompressionSize))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("minimumCompressionSize").build())
.build();
private static final SdkField API_KEY_SOURCE_FIELD = SdkField. builder(MarshallingType.STRING)
.getter(getter(GetRestApiResponse::apiKeySourceAsString)).setter(setter(Builder::apiKeySource))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("apiKeySource").build()).build();
private static final SdkField ENDPOINT_CONFIGURATION_FIELD = SdkField
. builder(MarshallingType.SDK_POJO).getter(getter(GetRestApiResponse::endpointConfiguration))
.setter(setter(Builder::endpointConfiguration)).constructor(EndpointConfiguration::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("endpointConfiguration").build())
.build();
private static final SdkField POLICY_FIELD = SdkField. builder(MarshallingType.STRING)
.getter(getter(GetRestApiResponse::policy)).setter(setter(Builder::policy))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("policy").build()).build();
private static final SdkField> TAGS_FIELD = SdkField
.> builder(MarshallingType.MAP)
.getter(getter(GetRestApiResponse::tags))
.setter(setter(Builder::tags))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("tags").build(),
MapTrait.builder()
.keyLocationName("key")
.valueLocationName("value")
.valueFieldInfo(
SdkField. builder(MarshallingType.STRING)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD)
.locationName("value").build()).build()).build()).build();
private static final List> SDK_FIELDS = Collections.unmodifiableList(Arrays.asList(ID_FIELD, NAME_FIELD,
DESCRIPTION_FIELD, CREATED_DATE_FIELD, VERSION_FIELD, WARNINGS_FIELD, BINARY_MEDIA_TYPES_FIELD,
MINIMUM_COMPRESSION_SIZE_FIELD, API_KEY_SOURCE_FIELD, ENDPOINT_CONFIGURATION_FIELD, POLICY_FIELD, TAGS_FIELD));
private final String id;
private final String name;
private final String description;
private final Instant createdDate;
private final String version;
private final List warnings;
private final List binaryMediaTypes;
private final Integer minimumCompressionSize;
private final String apiKeySource;
private final EndpointConfiguration endpointConfiguration;
private final String policy;
private final Map tags;
private GetRestApiResponse(BuilderImpl builder) {
super(builder);
this.id = builder.id;
this.name = builder.name;
this.description = builder.description;
this.createdDate = builder.createdDate;
this.version = builder.version;
this.warnings = builder.warnings;
this.binaryMediaTypes = builder.binaryMediaTypes;
this.minimumCompressionSize = builder.minimumCompressionSize;
this.apiKeySource = builder.apiKeySource;
this.endpointConfiguration = builder.endpointConfiguration;
this.policy = builder.policy;
this.tags = builder.tags;
}
/**
*
* The API's identifier. This identifier is unique across all of your APIs in API Gateway.
*
*
* @return The API's identifier. This identifier is unique across all of your APIs in API Gateway.
*/
public String id() {
return id;
}
/**
*
* The API's name.
*
*
* @return The API's name.
*/
public String name() {
return name;
}
/**
*
* The API's description.
*
*
* @return The API's description.
*/
public String description() {
return description;
}
/**
*
* The timestamp when the API was created.
*
*
* @return The timestamp when the API was created.
*/
public Instant createdDate() {
return createdDate;
}
/**
*
* A version identifier for the API.
*
*
* @return A version identifier for the API.
*/
public String version() {
return version;
}
/**
*
* The warning messages reported when failonwarnings
is turned on during API import.
*
*
* Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
*
*
* @return The warning messages reported when failonwarnings
is turned on during API import.
*/
public List warnings() {
return warnings;
}
/**
*
* The list of binary media types supported by the RestApi . By default, the RestApi supports only
* UTF-8-encoded text payloads.
*
*
* Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
*
*
* @return The list of binary media types supported by the RestApi . By default, the RestApi supports
* only UTF-8-encoded text payloads.
*/
public List binaryMediaTypes() {
return binaryMediaTypes;
}
/**
*
* A nullable integer that is used to enable compression (with non-negative between 0 and 10485760 (10M) bytes,
* inclusive) or disable compression (with a null value) on an API. When compression is enabled, compression or
* decompression is not applied on the payload if the payload size is smaller than this value. Setting it to zero
* allows compression for any payload size.
*
*
* @return A nullable integer that is used to enable compression (with non-negative between 0 and 10485760 (10M)
* bytes, inclusive) or disable compression (with a null value) on an API. When compression is enabled,
* compression or decompression is not applied on the payload if the payload size is smaller than this
* value. Setting it to zero allows compression for any payload size.
*/
public Integer minimumCompressionSize() {
return minimumCompressionSize;
}
/**
*
* The source of the API key for metering requests according to a usage plan. Valid values are:
*
* HEADER
to read the API key from the X-API-Key
header of a request.
* AUTHORIZER
to read the API key from the UsageIdentifierKey
from a custom
* authorizer.
*
*
*
* If the service returns an enum value that is not available in the current SDK version, {@link #apiKeySource} will
* return {@link ApiKeySourceType#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available from
* {@link #apiKeySourceAsString}.
*
*
* @return The source of the API key for metering requests according to a usage plan. Valid values are:
*
* HEADER
to read the API key from the X-API-Key
header of a request.
* AUTHORIZER
to read the API key from the UsageIdentifierKey
from a custom
* authorizer.
*
* @see ApiKeySourceType
*/
public ApiKeySourceType apiKeySource() {
return ApiKeySourceType.fromValue(apiKeySource);
}
/**
*
* The source of the API key for metering requests according to a usage plan. Valid values are:
*
* HEADER
to read the API key from the X-API-Key
header of a request.
* AUTHORIZER
to read the API key from the UsageIdentifierKey
from a custom
* authorizer.
*
*
*
* If the service returns an enum value that is not available in the current SDK version, {@link #apiKeySource} will
* return {@link ApiKeySourceType#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available from
* {@link #apiKeySourceAsString}.
*
*
* @return The source of the API key for metering requests according to a usage plan. Valid values are:
*
* HEADER
to read the API key from the X-API-Key
header of a request.
* AUTHORIZER
to read the API key from the UsageIdentifierKey
from a custom
* authorizer.
*
* @see ApiKeySourceType
*/
public String apiKeySourceAsString() {
return apiKeySource;
}
/**
*
* The endpoint configuration of this RestApi showing the endpoint types of the API.
*
*
* @return The endpoint configuration of this RestApi showing the endpoint types of the API.
*/
public EndpointConfiguration endpointConfiguration() {
return endpointConfiguration;
}
/**
* A stringified JSON policy document that applies to this RestApi regardless of the caller and Method
* configuration.
*
* @return A stringified JSON policy document that applies to this RestApi regardless of the caller and
* Method configuration.
*/
public String policy() {
return policy;
}
/**
*
* The collection of tags. Each tag element is associated with a given resource.
*
*
* Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
*
*
* @return The collection of tags. Each tag element is associated with a given resource.
*/
public Map tags() {
return tags;
}
@Override
public Builder toBuilder() {
return new BuilderImpl(this);
}
public static Builder builder() {
return new BuilderImpl();
}
public static Class extends Builder> serializableBuilderClass() {
return BuilderImpl.class;
}
@Override
public int hashCode() {
int hashCode = 1;
hashCode = 31 * hashCode + super.hashCode();
hashCode = 31 * hashCode + Objects.hashCode(id());
hashCode = 31 * hashCode + Objects.hashCode(name());
hashCode = 31 * hashCode + Objects.hashCode(description());
hashCode = 31 * hashCode + Objects.hashCode(createdDate());
hashCode = 31 * hashCode + Objects.hashCode(version());
hashCode = 31 * hashCode + Objects.hashCode(warnings());
hashCode = 31 * hashCode + Objects.hashCode(binaryMediaTypes());
hashCode = 31 * hashCode + Objects.hashCode(minimumCompressionSize());
hashCode = 31 * hashCode + Objects.hashCode(apiKeySourceAsString());
hashCode = 31 * hashCode + Objects.hashCode(endpointConfiguration());
hashCode = 31 * hashCode + Objects.hashCode(policy());
hashCode = 31 * hashCode + Objects.hashCode(tags());
return hashCode;
}
@Override
public boolean equals(Object obj) {
return super.equals(obj) && equalsBySdkFields(obj);
}
@Override
public boolean equalsBySdkFields(Object obj) {
if (this == obj) {
return true;
}
if (obj == null) {
return false;
}
if (!(obj instanceof GetRestApiResponse)) {
return false;
}
GetRestApiResponse other = (GetRestApiResponse) obj;
return Objects.equals(id(), other.id()) && Objects.equals(name(), other.name())
&& Objects.equals(description(), other.description()) && Objects.equals(createdDate(), other.createdDate())
&& Objects.equals(version(), other.version()) && Objects.equals(warnings(), other.warnings())
&& Objects.equals(binaryMediaTypes(), other.binaryMediaTypes())
&& Objects.equals(minimumCompressionSize(), other.minimumCompressionSize())
&& Objects.equals(apiKeySourceAsString(), other.apiKeySourceAsString())
&& Objects.equals(endpointConfiguration(), other.endpointConfiguration())
&& Objects.equals(policy(), other.policy()) && Objects.equals(tags(), other.tags());
}
/**
* Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be
* redacted from this string using a placeholder value.
*/
@Override
public String toString() {
return ToString.builder("GetRestApiResponse").add("Id", id()).add("Name", name()).add("Description", description())
.add("CreatedDate", createdDate()).add("Version", version()).add("Warnings", warnings())
.add("BinaryMediaTypes", binaryMediaTypes()).add("MinimumCompressionSize", minimumCompressionSize())
.add("ApiKeySource", apiKeySourceAsString()).add("EndpointConfiguration", endpointConfiguration())
.add("Policy", policy()).add("Tags", tags()).build();
}
public Optional getValueForField(String fieldName, Class clazz) {
switch (fieldName) {
case "id":
return Optional.ofNullable(clazz.cast(id()));
case "name":
return Optional.ofNullable(clazz.cast(name()));
case "description":
return Optional.ofNullable(clazz.cast(description()));
case "createdDate":
return Optional.ofNullable(clazz.cast(createdDate()));
case "version":
return Optional.ofNullable(clazz.cast(version()));
case "warnings":
return Optional.ofNullable(clazz.cast(warnings()));
case "binaryMediaTypes":
return Optional.ofNullable(clazz.cast(binaryMediaTypes()));
case "minimumCompressionSize":
return Optional.ofNullable(clazz.cast(minimumCompressionSize()));
case "apiKeySource":
return Optional.ofNullable(clazz.cast(apiKeySourceAsString()));
case "endpointConfiguration":
return Optional.ofNullable(clazz.cast(endpointConfiguration()));
case "policy":
return Optional.ofNullable(clazz.cast(policy()));
case "tags":
return Optional.ofNullable(clazz.cast(tags()));
default:
return Optional.empty();
}
}
@Override
public List> sdkFields() {
return SDK_FIELDS;
}
private static Function getter(Function g) {
return obj -> g.apply((GetRestApiResponse) obj);
}
private static BiConsumer setter(BiConsumer s) {
return (obj, val) -> s.accept((Builder) obj, val);
}
public interface Builder extends ApiGatewayResponse.Builder, SdkPojo, CopyableBuilder {
/**
*
* The API's identifier. This identifier is unique across all of your APIs in API Gateway.
*
*
* @param id
* The API's identifier. This identifier is unique across all of your APIs in API Gateway.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder id(String id);
/**
*
* The API's name.
*
*
* @param name
* The API's name.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder name(String name);
/**
*
* The API's description.
*
*
* @param description
* The API's description.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder description(String description);
/**
*
* The timestamp when the API was created.
*
*
* @param createdDate
* The timestamp when the API was created.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder createdDate(Instant createdDate);
/**
*
* A version identifier for the API.
*
*
* @param version
* A version identifier for the API.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder version(String version);
/**
*
* The warning messages reported when failonwarnings
is turned on during API import.
*
*
* @param warnings
* The warning messages reported when failonwarnings
is turned on during API import.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder warnings(Collection warnings);
/**
*
* The warning messages reported when failonwarnings
is turned on during API import.
*
*
* @param warnings
* The warning messages reported when failonwarnings
is turned on during API import.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder warnings(String... warnings);
/**
*
* The list of binary media types supported by the RestApi . By default, the RestApi supports only
* UTF-8-encoded text payloads.
*
*
* @param binaryMediaTypes
* The list of binary media types supported by the RestApi . By default, the RestApi
* supports only UTF-8-encoded text payloads.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder binaryMediaTypes(Collection binaryMediaTypes);
/**
*
* The list of binary media types supported by the RestApi . By default, the RestApi supports only
* UTF-8-encoded text payloads.
*
*
* @param binaryMediaTypes
* The list of binary media types supported by the RestApi . By default, the RestApi
* supports only UTF-8-encoded text payloads.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder binaryMediaTypes(String... binaryMediaTypes);
/**
*
* A nullable integer that is used to enable compression (with non-negative between 0 and 10485760 (10M) bytes,
* inclusive) or disable compression (with a null value) on an API. When compression is enabled, compression or
* decompression is not applied on the payload if the payload size is smaller than this value. Setting it to
* zero allows compression for any payload size.
*
*
* @param minimumCompressionSize
* A nullable integer that is used to enable compression (with non-negative between 0 and 10485760 (10M)
* bytes, inclusive) or disable compression (with a null value) on an API. When compression is enabled,
* compression or decompression is not applied on the payload if the payload size is smaller than this
* value. Setting it to zero allows compression for any payload size.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder minimumCompressionSize(Integer minimumCompressionSize);
/**
*
* The source of the API key for metering requests according to a usage plan. Valid values are:
*
* HEADER
to read the API key from the X-API-Key
header of a request.
* AUTHORIZER
to read the API key from the UsageIdentifierKey
from a custom
* authorizer.
*
*
*
* @param apiKeySource
* The source of the API key for metering requests according to a usage plan. Valid values are:
*
* HEADER
to read the API key from the X-API-Key
header of a request.
* AUTHORIZER
to read the API key from the UsageIdentifierKey
from a custom
* authorizer.
*
* @see ApiKeySourceType
* @return Returns a reference to this object so that method calls can be chained together.
* @see ApiKeySourceType
*/
Builder apiKeySource(String apiKeySource);
/**
*
* The source of the API key for metering requests according to a usage plan. Valid values are:
*
* HEADER
to read the API key from the X-API-Key
header of a request.
* AUTHORIZER
to read the API key from the UsageIdentifierKey
from a custom
* authorizer.
*
*
*
* @param apiKeySource
* The source of the API key for metering requests according to a usage plan. Valid values are:
*
* HEADER
to read the API key from the X-API-Key
header of a request.
* AUTHORIZER
to read the API key from the UsageIdentifierKey
from a custom
* authorizer.
*
* @see ApiKeySourceType
* @return Returns a reference to this object so that method calls can be chained together.
* @see ApiKeySourceType
*/
Builder apiKeySource(ApiKeySourceType apiKeySource);
/**
*
* The endpoint configuration of this RestApi showing the endpoint types of the API.
*
*
* @param endpointConfiguration
* The endpoint configuration of this RestApi showing the endpoint types of the API.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder endpointConfiguration(EndpointConfiguration endpointConfiguration);
/**
*
* The endpoint configuration of this RestApi showing the endpoint types of the API.
*
* This is a convenience that creates an instance of the {@link EndpointConfiguration.Builder} avoiding the need
* to create one manually via {@link EndpointConfiguration#builder()}.
*
* When the {@link Consumer} completes, {@link EndpointConfiguration.Builder#build()} is called immediately and
* its result is passed to {@link #endpointConfiguration(EndpointConfiguration)}.
*
* @param endpointConfiguration
* a consumer that will call methods on {@link EndpointConfiguration.Builder}
* @return Returns a reference to this object so that method calls can be chained together.
* @see #endpointConfiguration(EndpointConfiguration)
*/
default Builder endpointConfiguration(Consumer endpointConfiguration) {
return endpointConfiguration(EndpointConfiguration.builder().applyMutation(endpointConfiguration).build());
}
/**
* A stringified JSON policy document that applies to this RestApi regardless of the caller and Method
* configuration.
*
* @param policy
* A stringified JSON policy document that applies to this RestApi regardless of the caller and
* Method configuration.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder policy(String policy);
/**
*
* The collection of tags. Each tag element is associated with a given resource.
*
*
* @param tags
* The collection of tags. Each tag element is associated with a given resource.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder tags(Map tags);
}
static final class BuilderImpl extends ApiGatewayResponse.BuilderImpl implements Builder {
private String id;
private String name;
private String description;
private Instant createdDate;
private String version;
private List warnings = DefaultSdkAutoConstructList.getInstance();
private List binaryMediaTypes = DefaultSdkAutoConstructList.getInstance();
private Integer minimumCompressionSize;
private String apiKeySource;
private EndpointConfiguration endpointConfiguration;
private String policy;
private Map tags = DefaultSdkAutoConstructMap.getInstance();
private BuilderImpl() {
}
private BuilderImpl(GetRestApiResponse model) {
super(model);
id(model.id);
name(model.name);
description(model.description);
createdDate(model.createdDate);
version(model.version);
warnings(model.warnings);
binaryMediaTypes(model.binaryMediaTypes);
minimumCompressionSize(model.minimumCompressionSize);
apiKeySource(model.apiKeySource);
endpointConfiguration(model.endpointConfiguration);
policy(model.policy);
tags(model.tags);
}
public final String getId() {
return id;
}
@Override
public final Builder id(String id) {
this.id = id;
return this;
}
public final void setId(String id) {
this.id = id;
}
public final String getName() {
return name;
}
@Override
public final Builder name(String name) {
this.name = name;
return this;
}
public final void setName(String name) {
this.name = name;
}
public final String getDescription() {
return description;
}
@Override
public final Builder description(String description) {
this.description = description;
return this;
}
public final void setDescription(String description) {
this.description = description;
}
public final Instant getCreatedDate() {
return createdDate;
}
@Override
public final Builder createdDate(Instant createdDate) {
this.createdDate = createdDate;
return this;
}
public final void setCreatedDate(Instant createdDate) {
this.createdDate = createdDate;
}
public final String getVersion() {
return version;
}
@Override
public final Builder version(String version) {
this.version = version;
return this;
}
public final void setVersion(String version) {
this.version = version;
}
public final Collection getWarnings() {
return warnings;
}
@Override
public final Builder warnings(Collection warnings) {
this.warnings = ListOfStringCopier.copy(warnings);
return this;
}
@Override
@SafeVarargs
public final Builder warnings(String... warnings) {
warnings(Arrays.asList(warnings));
return this;
}
public final void setWarnings(Collection warnings) {
this.warnings = ListOfStringCopier.copy(warnings);
}
public final Collection getBinaryMediaTypes() {
return binaryMediaTypes;
}
@Override
public final Builder binaryMediaTypes(Collection binaryMediaTypes) {
this.binaryMediaTypes = ListOfStringCopier.copy(binaryMediaTypes);
return this;
}
@Override
@SafeVarargs
public final Builder binaryMediaTypes(String... binaryMediaTypes) {
binaryMediaTypes(Arrays.asList(binaryMediaTypes));
return this;
}
public final void setBinaryMediaTypes(Collection binaryMediaTypes) {
this.binaryMediaTypes = ListOfStringCopier.copy(binaryMediaTypes);
}
public final Integer getMinimumCompressionSize() {
return minimumCompressionSize;
}
@Override
public final Builder minimumCompressionSize(Integer minimumCompressionSize) {
this.minimumCompressionSize = minimumCompressionSize;
return this;
}
public final void setMinimumCompressionSize(Integer minimumCompressionSize) {
this.minimumCompressionSize = minimumCompressionSize;
}
public final String getApiKeySourceAsString() {
return apiKeySource;
}
@Override
public final Builder apiKeySource(String apiKeySource) {
this.apiKeySource = apiKeySource;
return this;
}
@Override
public final Builder apiKeySource(ApiKeySourceType apiKeySource) {
this.apiKeySource(apiKeySource == null ? null : apiKeySource.toString());
return this;
}
public final void setApiKeySource(String apiKeySource) {
this.apiKeySource = apiKeySource;
}
public final EndpointConfiguration.Builder getEndpointConfiguration() {
return endpointConfiguration != null ? endpointConfiguration.toBuilder() : null;
}
@Override
public final Builder endpointConfiguration(EndpointConfiguration endpointConfiguration) {
this.endpointConfiguration = endpointConfiguration;
return this;
}
public final void setEndpointConfiguration(EndpointConfiguration.BuilderImpl endpointConfiguration) {
this.endpointConfiguration = endpointConfiguration != null ? endpointConfiguration.build() : null;
}
public final String getPolicy() {
return policy;
}
@Override
public final Builder policy(String policy) {
this.policy = policy;
return this;
}
public final void setPolicy(String policy) {
this.policy = policy;
}
public final Map getTags() {
return tags;
}
@Override
public final Builder tags(Map tags) {
this.tags = MapOfStringToStringCopier.copy(tags);
return this;
}
public final void setTags(Map tags) {
this.tags = MapOfStringToStringCopier.copy(tags);
}
@Override
public GetRestApiResponse build() {
return new GetRestApiResponse(this);
}
@Override
public List> sdkFields() {
return SDK_FIELDS;
}
}
}