/* * 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.apigatewayv2.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.protocol.StructuredPojo; import com.amazonaws.protocol.ProtocolMarshaller; /** *
* Represents an API. *
*/ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class Api implements Serializable, Cloneable, StructuredPojo { /** ** The URI of the API, of the form {api-id}.execute-api.{region}.amazonaws.com. The stage name is typically appended * to this URI to form a complete path to a deployed API stage. *
*/ private String apiEndpoint; /** ** Specifies whether an API is managed by API Gateway. You can't update or delete a managed API by using API * Gateway. A managed API can be deleted only through the tooling or service that created it. *
*/ private Boolean apiGatewayManaged; /** ** The API ID. *
*/ private String apiId; /** ** An API key selection expression. Supported only for WebSocket APIs. See API Key Selection Expressions. *
*/ private String apiKeySelectionExpression; /** ** A CORS configuration. Supported only for HTTP APIs. *
*/ private Cors corsConfiguration; /** ** The timestamp when the API was created. *
*/ private java.util.Date createdDate; /** ** The description of the API. *
*/ private String description; /** ** Avoid validating models when creating a deployment. Supported only for WebSocket APIs. *
*/ private Boolean disableSchemaValidation; /** ** 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 validation information during API import. This may include particular properties of your OpenAPI definition * which are ignored during import. Supported only for HTTP APIs. *
*/ private java.util.List* The name of the API. *
*/ private String name; /** ** The API protocol. *
*/ private String protocolType; /** ** The route selection expression for the API. For HTTP APIs, the routeSelectionExpression must be ${request.method} * ${request.path}. If not provided, this will be the default for HTTP APIs. This property is required for WebSocket * APIs. *
*/ private String routeSelectionExpression; /** ** A collection of tags associated with the API. *
*/ private java.util.Map* 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* The URI of the API, of the form {api-id}.execute-api.{region}.amazonaws.com. The stage name is typically appended * to this URI to form a complete path to a deployed API stage. *
* * @param apiEndpoint * The URI of the API, of the form {api-id}.execute-api.{region}.amazonaws.com. The stage name is typically * appended to this URI to form a complete path to a deployed API stage. */ public void setApiEndpoint(String apiEndpoint) { this.apiEndpoint = apiEndpoint; } /** ** The URI of the API, of the form {api-id}.execute-api.{region}.amazonaws.com. The stage name is typically appended * to this URI to form a complete path to a deployed API stage. *
* * @return The URI of the API, of the form {api-id}.execute-api.{region}.amazonaws.com. The stage name is typically * appended to this URI to form a complete path to a deployed API stage. */ public String getApiEndpoint() { return this.apiEndpoint; } /** ** The URI of the API, of the form {api-id}.execute-api.{region}.amazonaws.com. The stage name is typically appended * to this URI to form a complete path to a deployed API stage. *
* * @param apiEndpoint * The URI of the API, of the form {api-id}.execute-api.{region}.amazonaws.com. The stage name is typically * appended to this 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 Api withApiEndpoint(String apiEndpoint) { setApiEndpoint(apiEndpoint); return this; } /** ** Specifies whether an API is managed by API Gateway. You can't update or delete a managed API by using API * Gateway. A managed API can be deleted only through the tooling or service that created it. *
* * @param apiGatewayManaged * Specifies whether an API is managed by API Gateway. You can't update or delete a managed API by using API * Gateway. A managed API can be deleted only through the tooling or service that created it. */ public void setApiGatewayManaged(Boolean apiGatewayManaged) { this.apiGatewayManaged = apiGatewayManaged; } /** ** Specifies whether an API is managed by API Gateway. You can't update or delete a managed API by using API * Gateway. A managed API can be deleted only through the tooling or service that created it. *
* * @return Specifies whether an API is managed by API Gateway. You can't update or delete a managed API by using API * Gateway. A managed API can be deleted only through the tooling or service that created it. */ public Boolean getApiGatewayManaged() { return this.apiGatewayManaged; } /** ** Specifies whether an API is managed by API Gateway. You can't update or delete a managed API by using API * Gateway. A managed API can be deleted only through the tooling or service that created it. *
* * @param apiGatewayManaged * Specifies whether an API is managed by API Gateway. You can't update or delete a managed API by using API * Gateway. A managed API can be deleted only through the tooling or service that created it. * @return Returns a reference to this object so that method calls can be chained together. */ public Api withApiGatewayManaged(Boolean apiGatewayManaged) { setApiGatewayManaged(apiGatewayManaged); return this; } /** ** Specifies whether an API is managed by API Gateway. You can't update or delete a managed API by using API * Gateway. A managed API can be deleted only through the tooling or service that created it. *
* * @return Specifies whether an API is managed by API Gateway. You can't update or delete a managed API by using API * Gateway. A managed API can be deleted only through the tooling or service that created it. */ public Boolean isApiGatewayManaged() { return this.apiGatewayManaged; } /** ** The API ID. *
* * @param apiId * The API ID. */ public void setApiId(String apiId) { this.apiId = apiId; } /** ** The API ID. *
* * @return The API ID. */ public String getApiId() { return this.apiId; } /** ** The API ID. *
* * @param apiId * The API ID. * @return Returns a reference to this object so that method calls can be chained together. */ public Api withApiId(String apiId) { setApiId(apiId); return this; } /** ** An API key selection expression. Supported only for WebSocket APIs. See API Key Selection Expressions. *
* * @param apiKeySelectionExpression * An API key selection expression. Supported only for WebSocket APIs. See API Key Selection Expressions. */ public void setApiKeySelectionExpression(String apiKeySelectionExpression) { this.apiKeySelectionExpression = apiKeySelectionExpression; } /** ** An API key selection expression. Supported only for WebSocket APIs. See API Key Selection Expressions. *
* * @return An API key selection expression. Supported only for WebSocket APIs. See API Key Selection Expressions. */ public String getApiKeySelectionExpression() { return this.apiKeySelectionExpression; } /** ** An API key selection expression. Supported only for WebSocket APIs. See API Key Selection Expressions. *
* * @param apiKeySelectionExpression * An API key selection expression. Supported only for WebSocket APIs. See API Key Selection Expressions. * @return Returns a reference to this object so that method calls can be chained together. */ public Api withApiKeySelectionExpression(String apiKeySelectionExpression) { setApiKeySelectionExpression(apiKeySelectionExpression); return this; } /** ** A CORS configuration. Supported only for HTTP APIs. *
* * @param corsConfiguration * A CORS configuration. Supported only for HTTP APIs. */ public void setCorsConfiguration(Cors corsConfiguration) { this.corsConfiguration = corsConfiguration; } /** ** A CORS configuration. Supported only for HTTP APIs. *
* * @return A CORS configuration. Supported only for HTTP APIs. */ public Cors getCorsConfiguration() { return this.corsConfiguration; } /** ** A CORS configuration. Supported only for HTTP APIs. *
* * @param corsConfiguration * A CORS configuration. Supported only for HTTP APIs. * @return Returns a reference to this object so that method calls can be chained together. */ public Api withCorsConfiguration(Cors corsConfiguration) { setCorsConfiguration(corsConfiguration); 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 Api withCreatedDate(java.util.Date createdDate) { setCreatedDate(createdDate); return this; } /** ** The description of the API. *
* * @param description * The description of the API. */ public void setDescription(String description) { this.description = description; } /** ** The description of the API. *
* * @return The description of the API. */ public String getDescription() { return this.description; } /** ** The description of the API. *
* * @param description * The description of the API. * @return Returns a reference to this object so that method calls can be chained together. */ public Api withDescription(String description) { setDescription(description); return this; } /** ** Avoid validating models when creating a deployment. Supported only for WebSocket APIs. *
* * @param disableSchemaValidation * Avoid validating models when creating a deployment. Supported only for WebSocket APIs. */ public void setDisableSchemaValidation(Boolean disableSchemaValidation) { this.disableSchemaValidation = disableSchemaValidation; } /** ** Avoid validating models when creating a deployment. Supported only for WebSocket APIs. *
* * @return Avoid validating models when creating a deployment. Supported only for WebSocket APIs. */ public Boolean getDisableSchemaValidation() { return this.disableSchemaValidation; } /** ** Avoid validating models when creating a deployment. Supported only for WebSocket APIs. *
* * @param disableSchemaValidation * Avoid validating models when creating a deployment. Supported only for WebSocket APIs. * @return Returns a reference to this object so that method calls can be chained together. */ public Api withDisableSchemaValidation(Boolean disableSchemaValidation) { setDisableSchemaValidation(disableSchemaValidation); return this; } /** ** Avoid validating models when creating a deployment. Supported only for WebSocket APIs. *
* * @return Avoid validating models when creating a deployment. Supported only for WebSocket APIs. */ public Boolean isDisableSchemaValidation() { return this.disableSchemaValidation; } /** ** 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 Api 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; } /** ** The validation information during API import. This may include particular properties of your OpenAPI definition * which are ignored during import. Supported only for HTTP APIs. *
* * @return The validation information during API import. This may include particular properties of your OpenAPI * definition which are ignored during import. Supported only for HTTP APIs. */ public java.util.List* The validation information during API import. This may include particular properties of your OpenAPI definition * which are ignored during import. Supported only for HTTP APIs. *
* * @param importInfo * The validation information during API import. This may include particular properties of your OpenAPI * definition which are ignored during import. Supported only for HTTP APIs. */ public void setImportInfo(java.util.Collection* The validation information during API import. This may include particular properties of your OpenAPI definition * which are ignored during import. Supported only for HTTP APIs. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setImportInfo(java.util.Collection)} or {@link #withImportInfo(java.util.Collection)} if you want to * override the existing values. *
* * @param importInfo * The validation information during API import. This may include particular properties of your OpenAPI * definition which are ignored during import. Supported only for HTTP APIs. * @return Returns a reference to this object so that method calls can be chained together. */ public Api withImportInfo(String... importInfo) { if (this.importInfo == null) { setImportInfo(new java.util.ArrayList* The validation information during API import. This may include particular properties of your OpenAPI definition * which are ignored during import. Supported only for HTTP APIs. *
* * @param importInfo * The validation information during API import. This may include particular properties of your OpenAPI * definition which are ignored during import. Supported only for HTTP APIs. * @return Returns a reference to this object so that method calls can be chained together. */ public Api withImportInfo(java.util.Collection* 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 Api withName(String name) { setName(name); return this; } /** ** The API protocol. *
* * @param protocolType * The API protocol. * @see ProtocolType */ public void setProtocolType(String protocolType) { this.protocolType = protocolType; } /** ** The API protocol. *
* * @return The API protocol. * @see ProtocolType */ public String getProtocolType() { return this.protocolType; } /** ** The API protocol. *
* * @param protocolType * The API protocol. * @return Returns a reference to this object so that method calls can be chained together. * @see ProtocolType */ public Api withProtocolType(String protocolType) { setProtocolType(protocolType); return this; } /** ** The API protocol. *
* * @param protocolType * The API protocol. * @return Returns a reference to this object so that method calls can be chained together. * @see ProtocolType */ public Api withProtocolType(ProtocolType protocolType) { this.protocolType = protocolType.toString(); return this; } /** ** The route selection expression for the API. For HTTP APIs, the routeSelectionExpression must be ${request.method} * ${request.path}. If not provided, this will be the default for HTTP APIs. This property is required for WebSocket * APIs. *
* * @param routeSelectionExpression * The route selection expression for the API. For HTTP APIs, the routeSelectionExpression must be * ${request.method} ${request.path}. If not provided, this will be the default for HTTP APIs. This property * is required for WebSocket APIs. */ public void setRouteSelectionExpression(String routeSelectionExpression) { this.routeSelectionExpression = routeSelectionExpression; } /** ** The route selection expression for the API. For HTTP APIs, the routeSelectionExpression must be ${request.method} * ${request.path}. If not provided, this will be the default for HTTP APIs. This property is required for WebSocket * APIs. *
* * @return The route selection expression for the API. For HTTP APIs, the routeSelectionExpression must be * ${request.method} ${request.path}. If not provided, this will be the default for HTTP APIs. This property * is required for WebSocket APIs. */ public String getRouteSelectionExpression() { return this.routeSelectionExpression; } /** ** The route selection expression for the API. For HTTP APIs, the routeSelectionExpression must be ${request.method} * ${request.path}. If not provided, this will be the default for HTTP APIs. This property is required for WebSocket * APIs. *
* * @param routeSelectionExpression * The route selection expression for the API. For HTTP APIs, the routeSelectionExpression must be * ${request.method} ${request.path}. If not provided, this will be the default for HTTP APIs. This property * is required for WebSocket APIs. * @return Returns a reference to this object so that method calls can be chained together. */ public Api withRouteSelectionExpression(String routeSelectionExpression) { setRouteSelectionExpression(routeSelectionExpression); return this; } /** ** A collection of tags associated with the API. *
* * @return A collection of tags associated with the API. */ public java.util.Map* A collection of tags associated with the API. *
* * @param tags * A collection of tags associated with the API. */ public void setTags(java.util.Map* A collection of tags associated with the API. *
* * @param tags * A collection of tags associated with the API. * @return Returns a reference to this object so that method calls can be chained together. */ public Api withTags(java.util.Map* 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 Api 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* 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* 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 Api withWarnings(String... warnings) { if (this.warnings == null) { setWarnings(new java.util.ArrayList* 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 Api withWarnings(java.util.Collection