com.amazonaws.services.securityhub.model.AwsApiGatewayRestApiDetails Maven / Gradle / Ivy
Show all versions of aws-java-sdk-securityhub Show documentation
/*
* Copyright 2016-2021 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.securityhub.model;
import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;
/**
*
* Contains information about a REST API in version 1 of Amazon API Gateway.
*
*
* @see AWS API Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class AwsApiGatewayRestApiDetails implements Serializable, Cloneable, StructuredPojo {
/**
*
* The identifier of the REST API.
*
*/
private String id;
/**
*
* The name of the REST API.
*
*/
private String name;
/**
*
* A description of the REST API.
*
*/
private String description;
/**
*
* Indicates when the API was created.
*
*
* Uses the date-time
format specified in RFC
* 3339 section 5.6, Internet Date/Time Format. The value cannot contain spaces. For example,
* 2020-03-22T13:22:13.933Z
.
*
*/
private String createdDate;
/**
*
* The version identifier for the REST API.
*
*/
private String version;
/**
*
* The list of binary media types supported by the REST API.
*
*/
private java.util.List binaryMediaTypes;
/**
*
* The minimum size in bytes of a payload before compression is enabled.
*
*
* If null
, then compression is disabled.
*
*
* If 0, then all payloads are compressed.
*
*/
private Integer minimumCompressionSize;
/**
*
* The source of the API key for metering requests according to a usage plan.
*
*
* HEADER
indicates whether to read the API key from the X-API-Key header of a request.
*
*
* AUTHORIZER
indicates whether to read the API key from the UsageIdentifierKey
from a
* custom authorizer.
*
*/
private String apiKeySource;
/**
*
* The endpoint configuration of the REST API.
*
*/
private AwsApiGatewayEndpointConfiguration endpointConfiguration;
/**
*
* The identifier of the REST API.
*
*
* @param id
* The identifier of the REST API.
*/
public void setId(String id) {
this.id = id;
}
/**
*
* The identifier of the REST API.
*
*
* @return The identifier of the REST API.
*/
public String getId() {
return this.id;
}
/**
*
* The identifier of the REST API.
*
*
* @param id
* The identifier of the REST API.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public AwsApiGatewayRestApiDetails withId(String id) {
setId(id);
return this;
}
/**
*
* The name of the REST API.
*
*
* @param name
* The name of the REST API.
*/
public void setName(String name) {
this.name = name;
}
/**
*
* The name of the REST API.
*
*
* @return The name of the REST API.
*/
public String getName() {
return this.name;
}
/**
*
* The name of the REST API.
*
*
* @param name
* The name of the REST API.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public AwsApiGatewayRestApiDetails withName(String name) {
setName(name);
return this;
}
/**
*
* A description of the REST API.
*
*
* @param description
* A description of the REST API.
*/
public void setDescription(String description) {
this.description = description;
}
/**
*
* A description of the REST API.
*
*
* @return A description of the REST API.
*/
public String getDescription() {
return this.description;
}
/**
*
* A description of the REST API.
*
*
* @param description
* A description of the REST API.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public AwsApiGatewayRestApiDetails withDescription(String description) {
setDescription(description);
return this;
}
/**
*
* Indicates when the API was created.
*
*
* Uses the date-time
format specified in RFC
* 3339 section 5.6, Internet Date/Time Format. The value cannot contain spaces. For example,
* 2020-03-22T13:22:13.933Z
.
*
*
* @param createdDate
* Indicates when the API was created.
*
* Uses the date-time
format specified in RFC 3339 section 5.6, Internet Date/Time
* Format. The value cannot contain spaces. For example, 2020-03-22T13:22:13.933Z
.
*/
public void setCreatedDate(String createdDate) {
this.createdDate = createdDate;
}
/**
*
* Indicates when the API was created.
*
*
* Uses the date-time
format specified in RFC
* 3339 section 5.6, Internet Date/Time Format. The value cannot contain spaces. For example,
* 2020-03-22T13:22:13.933Z
.
*
*
* @return Indicates when the API was created.
*
* Uses the date-time
format specified in RFC 3339 section 5.6, Internet Date/Time
* Format. The value cannot contain spaces. For example, 2020-03-22T13:22:13.933Z
.
*/
public String getCreatedDate() {
return this.createdDate;
}
/**
*
* Indicates when the API was created.
*
*
* Uses the date-time
format specified in RFC
* 3339 section 5.6, Internet Date/Time Format. The value cannot contain spaces. For example,
* 2020-03-22T13:22:13.933Z
.
*
*
* @param createdDate
* Indicates when the API was created.
*
* Uses the date-time
format specified in RFC 3339 section 5.6, Internet Date/Time
* Format. The value cannot contain spaces. For example, 2020-03-22T13:22:13.933Z
.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public AwsApiGatewayRestApiDetails withCreatedDate(String createdDate) {
setCreatedDate(createdDate);
return this;
}
/**
*
* The version identifier for the REST API.
*
*
* @param version
* The version identifier for the REST API.
*/
public void setVersion(String version) {
this.version = version;
}
/**
*
* The version identifier for the REST API.
*
*
* @return The version identifier for the REST API.
*/
public String getVersion() {
return this.version;
}
/**
*
* The version identifier for the REST API.
*
*
* @param version
* The version identifier for the REST API.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public AwsApiGatewayRestApiDetails withVersion(String version) {
setVersion(version);
return this;
}
/**
*
* The list of binary media types supported by the REST API.
*
*
* @return The list of binary media types supported by the REST API.
*/
public java.util.List getBinaryMediaTypes() {
return binaryMediaTypes;
}
/**
*
* The list of binary media types supported by the REST API.
*
*
* @param binaryMediaTypes
* The list of binary media types supported by the REST API.
*/
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 REST API.
*
*
* 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 REST API.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public AwsApiGatewayRestApiDetails 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 REST API.
*
*
* @param binaryMediaTypes
* The list of binary media types supported by the REST API.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public AwsApiGatewayRestApiDetails withBinaryMediaTypes(java.util.Collection binaryMediaTypes) {
setBinaryMediaTypes(binaryMediaTypes);
return this;
}
/**
*
* The minimum size in bytes of a payload before compression is enabled.
*
*
* If null
, then compression is disabled.
*
*
* If 0, then all payloads are compressed.
*
*
* @param minimumCompressionSize
* The minimum size in bytes of a payload before compression is enabled.
*
* If null
, then compression is disabled.
*
*
* If 0, then all payloads are compressed.
*/
public void setMinimumCompressionSize(Integer minimumCompressionSize) {
this.minimumCompressionSize = minimumCompressionSize;
}
/**
*
* The minimum size in bytes of a payload before compression is enabled.
*
*
* If null
, then compression is disabled.
*
*
* If 0, then all payloads are compressed.
*
*
* @return The minimum size in bytes of a payload before compression is enabled.
*
* If null
, then compression is disabled.
*
*
* If 0, then all payloads are compressed.
*/
public Integer getMinimumCompressionSize() {
return this.minimumCompressionSize;
}
/**
*
* The minimum size in bytes of a payload before compression is enabled.
*
*
* If null
, then compression is disabled.
*
*
* If 0, then all payloads are compressed.
*
*
* @param minimumCompressionSize
* The minimum size in bytes of a payload before compression is enabled.
*
* If null
, then compression is disabled.
*
*
* If 0, then all payloads are compressed.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public AwsApiGatewayRestApiDetails withMinimumCompressionSize(Integer minimumCompressionSize) {
setMinimumCompressionSize(minimumCompressionSize);
return this;
}
/**
*
* The source of the API key for metering requests according to a usage plan.
*
*
* HEADER
indicates whether to read the API key from the X-API-Key header of a request.
*
*
* AUTHORIZER
indicates whether 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.
*
* HEADER
indicates whether to read the API key from the X-API-Key header of a request.
*
*
* AUTHORIZER
indicates whether to read the API key from the UsageIdentifierKey
* from a custom authorizer.
*/
public void setApiKeySource(String apiKeySource) {
this.apiKeySource = apiKeySource;
}
/**
*
* The source of the API key for metering requests according to a usage plan.
*
*
* HEADER
indicates whether to read the API key from the X-API-Key header of a request.
*
*
* AUTHORIZER
indicates whether 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.
*
* HEADER
indicates whether to read the API key from the X-API-Key header of a request.
*
*
* AUTHORIZER
indicates whether to read the API key from the UsageIdentifierKey
* from a custom authorizer.
*/
public String getApiKeySource() {
return this.apiKeySource;
}
/**
*
* The source of the API key for metering requests according to a usage plan.
*
*
* HEADER
indicates whether to read the API key from the X-API-Key header of a request.
*
*
* AUTHORIZER
indicates whether 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.
*
* HEADER
indicates whether to read the API key from the X-API-Key header of a request.
*
*
* AUTHORIZER
indicates whether 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.
*/
public AwsApiGatewayRestApiDetails withApiKeySource(String apiKeySource) {
setApiKeySource(apiKeySource);
return this;
}
/**
*
* The endpoint configuration of the REST API.
*
*
* @param endpointConfiguration
* The endpoint configuration of the REST API.
*/
public void setEndpointConfiguration(AwsApiGatewayEndpointConfiguration endpointConfiguration) {
this.endpointConfiguration = endpointConfiguration;
}
/**
*
* The endpoint configuration of the REST API.
*
*
* @return The endpoint configuration of the REST API.
*/
public AwsApiGatewayEndpointConfiguration getEndpointConfiguration() {
return this.endpointConfiguration;
}
/**
*
* The endpoint configuration of the REST API.
*
*
* @param endpointConfiguration
* The endpoint configuration of the REST API.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public AwsApiGatewayRestApiDetails withEndpointConfiguration(AwsApiGatewayEndpointConfiguration endpointConfiguration) {
setEndpointConfiguration(endpointConfiguration);
return this;
}
/**
* 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 (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());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof AwsApiGatewayRestApiDetails == false)
return false;
AwsApiGatewayRestApiDetails other = (AwsApiGatewayRestApiDetails) 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.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;
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 + ((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());
return hashCode;
}
@Override
public AwsApiGatewayRestApiDetails clone() {
try {
return (AwsApiGatewayRestApiDetails) super.clone();
} catch (CloneNotSupportedException e) {
throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e);
}
}
@com.amazonaws.annotation.SdkInternalApi
@Override
public void marshall(ProtocolMarshaller protocolMarshaller) {
com.amazonaws.services.securityhub.model.transform.AwsApiGatewayRestApiDetailsMarshaller.getInstance().marshall(this, protocolMarshaller);
}
}