com.amazonaws.services.securityhub.model.AwsApiGatewayV2ApiDetails 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 version 2 API in Amazon API Gateway.
*
*
* @see AWS API Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class AwsApiGatewayV2ApiDetails implements Serializable, Cloneable, StructuredPojo {
/**
*
* The URI of the API.
*
*
* Uses the format <api-id>.execute-api.<region>.amazonaws.com
*
*
* The stage name is typically appended to the URI to form a complete path to a deployed API stage.
*
*/
private String apiEndpoint;
/**
*
* The identifier of the API.
*
*/
private String apiId;
/**
*
* An API key selection expression. Supported only for WebSocket APIs.
*
*/
private String apiKeySelectionExpression;
/**
*
* 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;
/**
*
* A description of the API.
*
*/
private String description;
/**
*
* The version identifier for the API.
*
*/
private String version;
/**
*
* The name of the API.
*
*/
private String name;
/**
*
* The API protocol for the API.
*
*
* Valid values: WEBSOCKET
| HTTP
*
*/
private String protocolType;
/**
*
* The route selection expression for the API.
*
*
* For HTTP APIs, must be ${request.method} ${request.path}
. This is the default value for HTTP APIs.
*
*
* For WebSocket APIs, there is no default value.
*
*/
private String routeSelectionExpression;
/**
*
* A cross-origin resource sharing (CORS) configuration. Supported only for HTTP APIs.
*
*/
private AwsCorsConfiguration corsConfiguration;
/**
*
* The URI of the API.
*
*
* Uses the format <api-id>.execute-api.<region>.amazonaws.com
*
*
* The stage name is typically appended to the URI to form a complete path to a deployed API stage.
*
*
* @param apiEndpoint
* The URI of the API.
*
* Uses the format <api-id>.execute-api.<region>.amazonaws.com
*
*
* The stage name is typically appended to the URI to form a complete path to a deployed API stage.
*/
public void setApiEndpoint(String apiEndpoint) {
this.apiEndpoint = apiEndpoint;
}
/**
*
* The URI of the API.
*
*
* Uses the format <api-id>.execute-api.<region>.amazonaws.com
*
*
* The stage name is typically appended to the URI to form a complete path to a deployed API stage.
*
*
* @return The URI of the API.
*
* Uses the format <api-id>.execute-api.<region>.amazonaws.com
*
*
* The stage name is typically appended to the URI to form a complete path to a deployed API stage.
*/
public String getApiEndpoint() {
return this.apiEndpoint;
}
/**
*
* The URI of the API.
*
*
* Uses the format <api-id>.execute-api.<region>.amazonaws.com
*
*
* The stage name is typically appended to the URI to form a complete path to a deployed API stage.
*
*
* @param apiEndpoint
* The URI of the API.
*
* Uses the format <api-id>.execute-api.<region>.amazonaws.com
*
*
* The stage name is typically appended to the URI to form a complete path to a deployed API stage.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public AwsApiGatewayV2ApiDetails withApiEndpoint(String apiEndpoint) {
setApiEndpoint(apiEndpoint);
return this;
}
/**
*
* The identifier of the API.
*
*
* @param apiId
* The identifier of the API.
*/
public void setApiId(String apiId) {
this.apiId = apiId;
}
/**
*
* The identifier of the API.
*
*
* @return The identifier of the API.
*/
public String getApiId() {
return this.apiId;
}
/**
*
* The identifier of the API.
*
*
* @param apiId
* The identifier of the API.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public AwsApiGatewayV2ApiDetails withApiId(String apiId) {
setApiId(apiId);
return this;
}
/**
*
* An API key selection expression. Supported only for WebSocket APIs.
*
*
* @param apiKeySelectionExpression
* An API key selection expression. Supported only for WebSocket APIs.
*/
public void setApiKeySelectionExpression(String apiKeySelectionExpression) {
this.apiKeySelectionExpression = apiKeySelectionExpression;
}
/**
*
* An API key selection expression. Supported only for WebSocket APIs.
*
*
* @return An API key selection expression. Supported only for WebSocket APIs.
*/
public String getApiKeySelectionExpression() {
return this.apiKeySelectionExpression;
}
/**
*
* An API key selection expression. Supported only for WebSocket APIs.
*
*
* @param apiKeySelectionExpression
* An API key selection expression. Supported only for WebSocket APIs.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public AwsApiGatewayV2ApiDetails withApiKeySelectionExpression(String apiKeySelectionExpression) {
setApiKeySelectionExpression(apiKeySelectionExpression);
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 AwsApiGatewayV2ApiDetails withCreatedDate(String createdDate) {
setCreatedDate(createdDate);
return this;
}
/**
*
* A description of the API.
*
*
* @param description
* A description of the API.
*/
public void setDescription(String description) {
this.description = description;
}
/**
*
* A description of the API.
*
*
* @return A description of the API.
*/
public String getDescription() {
return this.description;
}
/**
*
* A description of the API.
*
*
* @param description
* A description of the API.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public AwsApiGatewayV2ApiDetails withDescription(String description) {
setDescription(description);
return this;
}
/**
*
* The version identifier for the API.
*
*
* @param version
* The version identifier for the API.
*/
public void setVersion(String version) {
this.version = version;
}
/**
*
* The version identifier for the API.
*
*
* @return The version identifier for the API.
*/
public String getVersion() {
return this.version;
}
/**
*
* The version identifier for the API.
*
*
* @param version
* The version identifier for the API.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public AwsApiGatewayV2ApiDetails withVersion(String version) {
setVersion(version);
return this;
}
/**
*
* The name of the API.
*
*
* @param name
* The name of the API.
*/
public void setName(String name) {
this.name = name;
}
/**
*
* The name of the API.
*
*
* @return The name of the API.
*/
public String getName() {
return this.name;
}
/**
*
* The name of the API.
*
*
* @param name
* The name of the API.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public AwsApiGatewayV2ApiDetails withName(String name) {
setName(name);
return this;
}
/**
*
* The API protocol for the API.
*
*
* Valid values: WEBSOCKET
| HTTP
*
*
* @param protocolType
* The API protocol for the API.
*
* Valid values: WEBSOCKET
| HTTP
*/
public void setProtocolType(String protocolType) {
this.protocolType = protocolType;
}
/**
*
* The API protocol for the API.
*
*
* Valid values: WEBSOCKET
| HTTP
*
*
* @return The API protocol for the API.
*
* Valid values: WEBSOCKET
| HTTP
*/
public String getProtocolType() {
return this.protocolType;
}
/**
*
* The API protocol for the API.
*
*
* Valid values: WEBSOCKET
| HTTP
*
*
* @param protocolType
* The API protocol for the API.
*
* Valid values: WEBSOCKET
| HTTP
* @return Returns a reference to this object so that method calls can be chained together.
*/
public AwsApiGatewayV2ApiDetails withProtocolType(String protocolType) {
setProtocolType(protocolType);
return this;
}
/**
*
* The route selection expression for the API.
*
*
* For HTTP APIs, must be ${request.method} ${request.path}
. This is the default value for HTTP APIs.
*
*
* For WebSocket APIs, there is no default value.
*
*
* @param routeSelectionExpression
* The route selection expression for the API.
*
* For HTTP APIs, must be ${request.method} ${request.path}
. This is the default value for HTTP
* APIs.
*
*
* For WebSocket APIs, there is no default value.
*/
public void setRouteSelectionExpression(String routeSelectionExpression) {
this.routeSelectionExpression = routeSelectionExpression;
}
/**
*
* The route selection expression for the API.
*
*
* For HTTP APIs, must be ${request.method} ${request.path}
. This is the default value for HTTP APIs.
*
*
* For WebSocket APIs, there is no default value.
*
*
* @return The route selection expression for the API.
*
* For HTTP APIs, must be ${request.method} ${request.path}
. This is the default value for HTTP
* APIs.
*
*
* For WebSocket APIs, there is no default value.
*/
public String getRouteSelectionExpression() {
return this.routeSelectionExpression;
}
/**
*
* The route selection expression for the API.
*
*
* For HTTP APIs, must be ${request.method} ${request.path}
. This is the default value for HTTP APIs.
*
*
* For WebSocket APIs, there is no default value.
*
*
* @param routeSelectionExpression
* The route selection expression for the API.
*
* For HTTP APIs, must be ${request.method} ${request.path}
. This is the default value for HTTP
* APIs.
*
*
* For WebSocket APIs, there is no default value.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public AwsApiGatewayV2ApiDetails withRouteSelectionExpression(String routeSelectionExpression) {
setRouteSelectionExpression(routeSelectionExpression);
return this;
}
/**
*
* A cross-origin resource sharing (CORS) configuration. Supported only for HTTP APIs.
*
*
* @param corsConfiguration
* A cross-origin resource sharing (CORS) configuration. Supported only for HTTP APIs.
*/
public void setCorsConfiguration(AwsCorsConfiguration corsConfiguration) {
this.corsConfiguration = corsConfiguration;
}
/**
*
* A cross-origin resource sharing (CORS) configuration. Supported only for HTTP APIs.
*
*
* @return A cross-origin resource sharing (CORS) configuration. Supported only for HTTP APIs.
*/
public AwsCorsConfiguration getCorsConfiguration() {
return this.corsConfiguration;
}
/**
*
* A cross-origin resource sharing (CORS) configuration. Supported only for HTTP APIs.
*
*
* @param corsConfiguration
* A cross-origin resource sharing (CORS) configuration. Supported only for HTTP APIs.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public AwsApiGatewayV2ApiDetails withCorsConfiguration(AwsCorsConfiguration corsConfiguration) {
setCorsConfiguration(corsConfiguration);
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 (getApiEndpoint() != null)
sb.append("ApiEndpoint: ").append(getApiEndpoint()).append(",");
if (getApiId() != null)
sb.append("ApiId: ").append(getApiId()).append(",");
if (getApiKeySelectionExpression() != null)
sb.append("ApiKeySelectionExpression: ").append(getApiKeySelectionExpression()).append(",");
if (getCreatedDate() != null)
sb.append("CreatedDate: ").append(getCreatedDate()).append(",");
if (getDescription() != null)
sb.append("Description: ").append(getDescription()).append(",");
if (getVersion() != null)
sb.append("Version: ").append(getVersion()).append(",");
if (getName() != null)
sb.append("Name: ").append(getName()).append(",");
if (getProtocolType() != null)
sb.append("ProtocolType: ").append(getProtocolType()).append(",");
if (getRouteSelectionExpression() != null)
sb.append("RouteSelectionExpression: ").append(getRouteSelectionExpression()).append(",");
if (getCorsConfiguration() != null)
sb.append("CorsConfiguration: ").append(getCorsConfiguration());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof AwsApiGatewayV2ApiDetails == false)
return false;
AwsApiGatewayV2ApiDetails other = (AwsApiGatewayV2ApiDetails) obj;
if (other.getApiEndpoint() == null ^ this.getApiEndpoint() == null)
return false;
if (other.getApiEndpoint() != null && other.getApiEndpoint().equals(this.getApiEndpoint()) == false)
return false;
if (other.getApiId() == null ^ this.getApiId() == null)
return false;
if (other.getApiId() != null && other.getApiId().equals(this.getApiId()) == false)
return false;
if (other.getApiKeySelectionExpression() == null ^ this.getApiKeySelectionExpression() == null)
return false;
if (other.getApiKeySelectionExpression() != null && other.getApiKeySelectionExpression().equals(this.getApiKeySelectionExpression()) == 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.getDescription() == null ^ this.getDescription() == null)
return false;
if (other.getDescription() != null && other.getDescription().equals(this.getDescription()) == 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.getName() == null ^ this.getName() == null)
return false;
if (other.getName() != null && other.getName().equals(this.getName()) == false)
return false;
if (other.getProtocolType() == null ^ this.getProtocolType() == null)
return false;
if (other.getProtocolType() != null && other.getProtocolType().equals(this.getProtocolType()) == false)
return false;
if (other.getRouteSelectionExpression() == null ^ this.getRouteSelectionExpression() == null)
return false;
if (other.getRouteSelectionExpression() != null && other.getRouteSelectionExpression().equals(this.getRouteSelectionExpression()) == false)
return false;
if (other.getCorsConfiguration() == null ^ this.getCorsConfiguration() == null)
return false;
if (other.getCorsConfiguration() != null && other.getCorsConfiguration().equals(this.getCorsConfiguration()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getApiEndpoint() == null) ? 0 : getApiEndpoint().hashCode());
hashCode = prime * hashCode + ((getApiId() == null) ? 0 : getApiId().hashCode());
hashCode = prime * hashCode + ((getApiKeySelectionExpression() == null) ? 0 : getApiKeySelectionExpression().hashCode());
hashCode = prime * hashCode + ((getCreatedDate() == null) ? 0 : getCreatedDate().hashCode());
hashCode = prime * hashCode + ((getDescription() == null) ? 0 : getDescription().hashCode());
hashCode = prime * hashCode + ((getVersion() == null) ? 0 : getVersion().hashCode());
hashCode = prime * hashCode + ((getName() == null) ? 0 : getName().hashCode());
hashCode = prime * hashCode + ((getProtocolType() == null) ? 0 : getProtocolType().hashCode());
hashCode = prime * hashCode + ((getRouteSelectionExpression() == null) ? 0 : getRouteSelectionExpression().hashCode());
hashCode = prime * hashCode + ((getCorsConfiguration() == null) ? 0 : getCorsConfiguration().hashCode());
return hashCode;
}
@Override
public AwsApiGatewayV2ApiDetails clone() {
try {
return (AwsApiGatewayV2ApiDetails) 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.AwsApiGatewayV2ApiDetailsMarshaller.getInstance().marshall(this, protocolMarshaller);
}
}