/* * Copyright 2018-2023 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 com.amazonaws.services.apigateway.model; import java.io.Serializable; import javax.annotation.Generated; /** *

* Represents a REST API. *

*/ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class CreateRestApiResult extends com.amazonaws.AmazonWebServiceResult implements Serializable, Cloneable { /** *

* The API's identifier. This identifier is unique across all of your APIs in API Gateway. *

*/ private String id; /** *

* The API's name. *

*/ private String name; /** *

* The API's description. *

*/ private String description; /** *

* The timestamp when the API was created. *

*/ private java.util.Date createdDate; /** *

* A version identifier for the API. *

*/ private String version; /** *

* The warning messages reported when failonwarnings is turned on during API import. *

*/ private java.util.List warnings; /** *

* The list of binary media types supported by the RestApi. By default, the RestApi supports only UTF-8-encoded text * payloads. *

*/ private java.util.List 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. *

*/ private 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. *

*/ private String apiKeySource; /** *

* The endpoint configuration of this RestApi showing the endpoint types of the API. *

*/ private EndpointConfiguration endpointConfiguration; /** *

* A stringified JSON policy document that applies to this RestApi regardless of the caller and Method * configuration. *

*/ private String policy; /** *

* The collection of tags. Each tag element is associated with a given resource. *

*/ private java.util.Map tags; /** *

* Specifies whether clients can invoke your API by using the default execute-api endpoint. By default, * clients can invoke your API with the default https://{api_id}.execute-api.{region}.amazonaws.com * endpoint. To require that clients use a custom domain name to invoke your API, disable the default endpoint. *

*/ private Boolean disableExecuteApiEndpoint; /** *

* 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. */ public void setId(String id) { this.id = id; } /** *

* 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 getId() { return this.id; } /** *

* 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. */ public CreateRestApiResult withId(String id) { setId(id); return this; } /** *

* The API's name. *

* * @param name * The API's name. */ public void setName(String name) { this.name = name; } /** *

* The API's name. *

* * @return The API's name. */ public String getName() { return this.name; } /** *

* 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. */ public CreateRestApiResult withName(String name) { setName(name); return this; } /** *

* The API's description. *

* * @param description * The API's description. */ public void setDescription(String description) { this.description = description; } /** *

* The API's description. *

* * @return The API's description. */ public String getDescription() { return this.description; } /** *

* 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. */ public CreateRestApiResult withDescription(String description) { setDescription(description); return this; } /** *

* The timestamp when the API was created. *

* * @param createdDate * The timestamp when the API was created. */ public void setCreatedDate(java.util.Date createdDate) { this.createdDate = createdDate; } /** *

* The timestamp when the API was created. *

* * @return The timestamp when the API was created. */ public java.util.Date getCreatedDate() { return this.createdDate; } /** *

* 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. */ public CreateRestApiResult withCreatedDate(java.util.Date createdDate) { setCreatedDate(createdDate); return this; } /** *

* A version identifier for the API. *

* * @param version * A version identifier for the API. */ public void setVersion(String version) { this.version = version; } /** *

* A version identifier for the API. *

* * @return A version identifier for the API. */ public String getVersion() { return this.version; } /** *

* 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. */ public CreateRestApiResult withVersion(String version) { setVersion(version); return this; } /** *

* The warning messages reported when failonwarnings is turned on during API import. *

* * @return The warning messages reported when failonwarnings is turned on during API import. */ public java.util.List getWarnings() { return 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. */ public void setWarnings(java.util.Collection warnings) { if (warnings == null) { this.warnings = null; return; } this.warnings = new java.util.ArrayList(warnings); } /** *

* The warning messages reported when failonwarnings is turned on during API import. *

*

* NOTE: This method appends the values to the existing list (if any). Use * {@link #setWarnings(java.util.Collection)} or {@link #withWarnings(java.util.Collection)} if you want to override * the existing values. *

* * @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. */ public CreateRestApiResult withWarnings(String... warnings) { if (this.warnings == null) { setWarnings(new java.util.ArrayList(warnings.length)); } for (String ele : warnings) { this.warnings.add(ele); } return this; } /** *

* 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. */ public CreateRestApiResult withWarnings(java.util.Collection warnings) { setWarnings(warnings); return this; } /** *

* The list of binary media types supported by the RestApi. By default, the RestApi supports only UTF-8-encoded text * payloads. *

* * @return The list of binary media types supported by the RestApi. By default, the RestApi supports only * UTF-8-encoded text payloads. */ public java.util.List getBinaryMediaTypes() { return 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. */ public void setBinaryMediaTypes(java.util.Collection binaryMediaTypes) { if (binaryMediaTypes == null) { this.binaryMediaTypes = null; return; } this.binaryMediaTypes = new java.util.ArrayList(binaryMediaTypes); } /** *

* The list of binary media types supported by the RestApi. By default, the RestApi supports only UTF-8-encoded text * payloads. *

*

* NOTE: This method appends the values to the existing list (if any). Use * {@link #setBinaryMediaTypes(java.util.Collection)} or {@link #withBinaryMediaTypes(java.util.Collection)} if you * want to override the existing values. *

* * @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. */ public CreateRestApiResult withBinaryMediaTypes(String... binaryMediaTypes) { if (this.binaryMediaTypes == null) { setBinaryMediaTypes(new java.util.ArrayList(binaryMediaTypes.length)); } for (String ele : binaryMediaTypes) { this.binaryMediaTypes.add(ele); } return this; } /** *

* 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. */ public CreateRestApiResult withBinaryMediaTypes(java.util.Collection binaryMediaTypes) { setBinaryMediaTypes(binaryMediaTypes); return this; } /** *

* 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. */ public void setMinimumCompressionSize(Integer minimumCompressionSize) { this.minimumCompressionSize = 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 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 getMinimumCompressionSize() { return this.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. *

* * @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. */ public CreateRestApiResult withMinimumCompressionSize(Integer minimumCompressionSize) { setMinimumCompressionSize(minimumCompressionSize); return this; } /** *

* 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 */ public void setApiKeySource(String apiKeySource) { this.apiKeySource = 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. *

* * @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 getApiKeySource() { return this.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. * @return Returns a reference to this object so that method calls can be chained together. * @see ApiKeySourceType */ public CreateRestApiResult withApiKeySource(String apiKeySource) { setApiKeySource(apiKeySource); return this; } /** *

* 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. * @return Returns a reference to this object so that method calls can be chained together. * @see ApiKeySourceType */ public CreateRestApiResult withApiKeySource(ApiKeySourceType apiKeySource) { this.apiKeySource = apiKeySource.toString(); return this; } /** *

* 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. */ public void setEndpointConfiguration(EndpointConfiguration endpointConfiguration) { this.endpointConfiguration = endpointConfiguration; } /** *

* 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 getEndpointConfiguration() { return this.endpointConfiguration; } /** *

* 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. */ public CreateRestApiResult withEndpointConfiguration(EndpointConfiguration endpointConfiguration) { setEndpointConfiguration(endpointConfiguration); return this; } /** *

* 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. */ public void setPolicy(String policy) { this.policy = policy; } /** *

* 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 getPolicy() { return this.policy; } /** *

* 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. */ public CreateRestApiResult withPolicy(String policy) { setPolicy(policy); return this; } /** *

* The collection of tags. Each tag element is associated with a given resource. *

* * @return The collection of tags. Each tag element is associated with a given resource. */ public java.util.Map getTags() { return tags; } /** *

* 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. */ public void setTags(java.util.Map tags) { this.tags = tags; } /** *

* 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. */ public CreateRestApiResult withTags(java.util.Map tags) { setTags(tags); return this; } /** * Add a single Tags entry * * @see CreateRestApiResult#withTags * @returns a reference to this object so that method calls can be chained together. */ public CreateRestApiResult addTagsEntry(String key, String value) { if (null == this.tags) { this.tags = new java.util.HashMap(); } if (this.tags.containsKey(key)) throw new IllegalArgumentException("Duplicated keys (" + key.toString() + ") are provided."); this.tags.put(key, value); return this; } /** * Removes all the entries added into Tags. * * @return Returns a reference to this object so that method calls can be chained together. */ public CreateRestApiResult clearTagsEntries() { this.tags = null; return this; } /** *

* Specifies whether clients can invoke your API by using the default execute-api endpoint. By default, * clients can invoke your API with the default https://{api_id}.execute-api.{region}.amazonaws.com * endpoint. To require that clients use a custom domain name to invoke your API, disable the default endpoint. *

* * @param disableExecuteApiEndpoint * Specifies whether clients can invoke your API by using the default execute-api endpoint. By * default, clients can invoke your API with the default * https://{api_id}.execute-api.{region}.amazonaws.com endpoint. To require that clients use a * custom domain name to invoke your API, disable the default endpoint. */ public void setDisableExecuteApiEndpoint(Boolean disableExecuteApiEndpoint) { this.disableExecuteApiEndpoint = disableExecuteApiEndpoint; } /** *

* Specifies whether clients can invoke your API by using the default execute-api endpoint. By default, * clients can invoke your API with the default https://{api_id}.execute-api.{region}.amazonaws.com * endpoint. To require that clients use a custom domain name to invoke your API, disable the default endpoint. *

* * @return Specifies whether clients can invoke your API by using the default execute-api endpoint. By * default, clients can invoke your API with the default * https://{api_id}.execute-api.{region}.amazonaws.com endpoint. To require that clients use a * custom domain name to invoke your API, disable the default endpoint. */ public Boolean getDisableExecuteApiEndpoint() { return this.disableExecuteApiEndpoint; } /** *

* Specifies whether clients can invoke your API by using the default execute-api endpoint. By default, * clients can invoke your API with the default https://{api_id}.execute-api.{region}.amazonaws.com * endpoint. To require that clients use a custom domain name to invoke your API, disable the default endpoint. *

* * @param disableExecuteApiEndpoint * Specifies whether clients can invoke your API by using the default execute-api endpoint. By * default, clients can invoke your API with the default * https://{api_id}.execute-api.{region}.amazonaws.com endpoint. To require that clients use a * custom domain name to invoke your API, disable the default endpoint. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateRestApiResult withDisableExecuteApiEndpoint(Boolean disableExecuteApiEndpoint) { setDisableExecuteApiEndpoint(disableExecuteApiEndpoint); return this; } /** *

* Specifies whether clients can invoke your API by using the default execute-api endpoint. By default, * clients can invoke your API with the default https://{api_id}.execute-api.{region}.amazonaws.com * endpoint. To require that clients use a custom domain name to invoke your API, disable the default endpoint. *

* * @return Specifies whether clients can invoke your API by using the default execute-api endpoint. By * default, clients can invoke your API with the default * https://{api_id}.execute-api.{region}.amazonaws.com endpoint. To require that clients use a * custom domain name to invoke your API, disable the default endpoint. */ public Boolean isDisableExecuteApiEndpoint() { return this.disableExecuteApiEndpoint; } /** * 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. * * @return A string representation of this object. * * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getId() != null) sb.append("Id: ").append(getId()).append(","); if (getName() != null) sb.append("Name: ").append(getName()).append(","); if (getDescription() != null) sb.append("Description: ").append(getDescription()).append(","); if (getCreatedDate() != null) sb.append("CreatedDate: ").append(getCreatedDate()).append(","); if (getVersion() != null) sb.append("Version: ").append(getVersion()).append(","); if (getWarnings() != null) sb.append("Warnings: ").append(getWarnings()).append(","); if (getBinaryMediaTypes() != null) sb.append("BinaryMediaTypes: ").append(getBinaryMediaTypes()).append(","); if (getMinimumCompressionSize() != null) sb.append("MinimumCompressionSize: ").append(getMinimumCompressionSize()).append(","); if (getApiKeySource() != null) sb.append("ApiKeySource: ").append(getApiKeySource()).append(","); if (getEndpointConfiguration() != null) sb.append("EndpointConfiguration: ").append(getEndpointConfiguration()).append(","); if (getPolicy() != null) sb.append("Policy: ").append(getPolicy()).append(","); if (getTags() != null) sb.append("Tags: ").append(getTags()).append(","); if (getDisableExecuteApiEndpoint() != null) sb.append("DisableExecuteApiEndpoint: ").append(getDisableExecuteApiEndpoint()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof CreateRestApiResult == false) return false; CreateRestApiResult other = (CreateRestApiResult) obj; if (other.getId() == null ^ this.getId() == null) return false; if (other.getId() != null && other.getId().equals(this.getId()) == false) return false; if (other.getName() == null ^ this.getName() == null) return false; if (other.getName() != null && other.getName().equals(this.getName()) == false) return false; if (other.getDescription() == null ^ this.getDescription() == null) return false; if (other.getDescription() != null && other.getDescription().equals(this.getDescription()) == false) return false; if (other.getCreatedDate() == null ^ this.getCreatedDate() == null) return false; if (other.getCreatedDate() != null && other.getCreatedDate().equals(this.getCreatedDate()) == false) return false; if (other.getVersion() == null ^ this.getVersion() == null) return false; if (other.getVersion() != null && other.getVersion().equals(this.getVersion()) == false) return false; if (other.getWarnings() == null ^ this.getWarnings() == null) return false; if (other.getWarnings() != null && other.getWarnings().equals(this.getWarnings()) == false) return false; if (other.getBinaryMediaTypes() == null ^ this.getBinaryMediaTypes() == null) return false; if (other.getBinaryMediaTypes() != null && other.getBinaryMediaTypes().equals(this.getBinaryMediaTypes()) == false) return false; if (other.getMinimumCompressionSize() == null ^ this.getMinimumCompressionSize() == null) return false; if (other.getMinimumCompressionSize() != null && other.getMinimumCompressionSize().equals(this.getMinimumCompressionSize()) == false) return false; if (other.getApiKeySource() == null ^ this.getApiKeySource() == null) return false; if (other.getApiKeySource() != null && other.getApiKeySource().equals(this.getApiKeySource()) == false) return false; if (other.getEndpointConfiguration() == null ^ this.getEndpointConfiguration() == null) return false; if (other.getEndpointConfiguration() != null && other.getEndpointConfiguration().equals(this.getEndpointConfiguration()) == false) return false; if (other.getPolicy() == null ^ this.getPolicy() == null) return false; if (other.getPolicy() != null && other.getPolicy().equals(this.getPolicy()) == false) return false; if (other.getTags() == null ^ this.getTags() == null) return false; if (other.getTags() != null && other.getTags().equals(this.getTags()) == false) return false; if (other.getDisableExecuteApiEndpoint() == null ^ this.getDisableExecuteApiEndpoint() == null) return false; if (other.getDisableExecuteApiEndpoint() != null && other.getDisableExecuteApiEndpoint().equals(this.getDisableExecuteApiEndpoint()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getId() == null) ? 0 : getId().hashCode()); hashCode = prime * hashCode + ((getName() == null) ? 0 : getName().hashCode()); hashCode = prime * hashCode + ((getDescription() == null) ? 0 : getDescription().hashCode()); hashCode = prime * hashCode + ((getCreatedDate() == null) ? 0 : getCreatedDate().hashCode()); hashCode = prime * hashCode + ((getVersion() == null) ? 0 : getVersion().hashCode()); hashCode = prime * hashCode + ((getWarnings() == null) ? 0 : getWarnings().hashCode()); hashCode = prime * hashCode + ((getBinaryMediaTypes() == null) ? 0 : getBinaryMediaTypes().hashCode()); hashCode = prime * hashCode + ((getMinimumCompressionSize() == null) ? 0 : getMinimumCompressionSize().hashCode()); hashCode = prime * hashCode + ((getApiKeySource() == null) ? 0 : getApiKeySource().hashCode()); hashCode = prime * hashCode + ((getEndpointConfiguration() == null) ? 0 : getEndpointConfiguration().hashCode()); hashCode = prime * hashCode + ((getPolicy() == null) ? 0 : getPolicy().hashCode()); hashCode = prime * hashCode + ((getTags() == null) ? 0 : getTags().hashCode()); hashCode = prime * hashCode + ((getDisableExecuteApiEndpoint() == null) ? 0 : getDisableExecuteApiEndpoint().hashCode()); return hashCode; } @Override public CreateRestApiResult clone() { try { return (CreateRestApiResult) super.clone(); } catch (CloneNotSupportedException e) { throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e); } } }