/* * 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; /** *
* A resource that can be distributed to callers for executing Method resources that require an API key. API keys can be * mapped to any Stage on any RestApi, which indicates that the callers with the API key can make requests to that * stage. *
*/ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class GetApiKeyResult extends com.amazonaws.AmazonWebServiceResult* The identifier of the API Key. *
*/ private String id; /** ** The value of the API Key. *
*/ private String value; /** ** The name of the API Key. *
*/ private String name; /** ** An AWS Marketplace customer identifier , when integrating with the AWS SaaS Marketplace. *
*/ private String customerId; /** ** The description of the API Key. *
*/ private String description; /** ** Specifies whether the API Key can be used by callers. *
*/ private Boolean enabled; /** ** The timestamp when the API Key was created. *
*/ private java.util.Date createdDate; /** ** The timestamp when the API Key was last updated. *
*/ private java.util.Date lastUpdatedDate; /** ** A list of Stage resources that are associated with the ApiKey resource. *
*/ private java.util.List* The collection of tags. Each tag element is associated with a given resource. *
*/ private java.util.Map* The identifier of the API Key. *
* * @param id * The identifier of the API Key. */ public void setId(String id) { this.id = id; } /** ** The identifier of the API Key. *
* * @return The identifier of the API Key. */ public String getId() { return this.id; } /** ** The identifier of the API Key. *
* * @param id * The identifier of the API Key. * @return Returns a reference to this object so that method calls can be chained together. */ public GetApiKeyResult withId(String id) { setId(id); return this; } /** ** The value of the API Key. *
* * @param value * The value of the API Key. */ public void setValue(String value) { this.value = value; } /** ** The value of the API Key. *
* * @return The value of the API Key. */ public String getValue() { return this.value; } /** ** The value of the API Key. *
* * @param value * The value of the API Key. * @return Returns a reference to this object so that method calls can be chained together. */ public GetApiKeyResult withValue(String value) { setValue(value); return this; } /** ** The name of the API Key. *
* * @param name * The name of the API Key. */ public void setName(String name) { this.name = name; } /** ** The name of the API Key. *
* * @return The name of the API Key. */ public String getName() { return this.name; } /** ** The name of the API Key. *
* * @param name * The name of the API Key. * @return Returns a reference to this object so that method calls can be chained together. */ public GetApiKeyResult withName(String name) { setName(name); return this; } /** ** An AWS Marketplace customer identifier , when integrating with the AWS SaaS Marketplace. *
* * @param customerId * An AWS Marketplace customer identifier , when integrating with the AWS SaaS Marketplace. */ public void setCustomerId(String customerId) { this.customerId = customerId; } /** ** An AWS Marketplace customer identifier , when integrating with the AWS SaaS Marketplace. *
* * @return An AWS Marketplace customer identifier , when integrating with the AWS SaaS Marketplace. */ public String getCustomerId() { return this.customerId; } /** ** An AWS Marketplace customer identifier , when integrating with the AWS SaaS Marketplace. *
* * @param customerId * An AWS Marketplace customer identifier , when integrating with the AWS SaaS Marketplace. * @return Returns a reference to this object so that method calls can be chained together. */ public GetApiKeyResult withCustomerId(String customerId) { setCustomerId(customerId); return this; } /** ** The description of the API Key. *
* * @param description * The description of the API Key. */ public void setDescription(String description) { this.description = description; } /** ** The description of the API Key. *
* * @return The description of the API Key. */ public String getDescription() { return this.description; } /** ** The description of the API Key. *
* * @param description * The description of the API Key. * @return Returns a reference to this object so that method calls can be chained together. */ public GetApiKeyResult withDescription(String description) { setDescription(description); return this; } /** ** Specifies whether the API Key can be used by callers. *
* * @param enabled * Specifies whether the API Key can be used by callers. */ public void setEnabled(Boolean enabled) { this.enabled = enabled; } /** ** Specifies whether the API Key can be used by callers. *
* * @return Specifies whether the API Key can be used by callers. */ public Boolean getEnabled() { return this.enabled; } /** ** Specifies whether the API Key can be used by callers. *
* * @param enabled * Specifies whether the API Key can be used by callers. * @return Returns a reference to this object so that method calls can be chained together. */ public GetApiKeyResult withEnabled(Boolean enabled) { setEnabled(enabled); return this; } /** ** Specifies whether the API Key can be used by callers. *
* * @return Specifies whether the API Key can be used by callers. */ public Boolean isEnabled() { return this.enabled; } /** ** The timestamp when the API Key was created. *
* * @param createdDate * The timestamp when the API Key was created. */ public void setCreatedDate(java.util.Date createdDate) { this.createdDate = createdDate; } /** ** The timestamp when the API Key was created. *
* * @return The timestamp when the API Key was created. */ public java.util.Date getCreatedDate() { return this.createdDate; } /** ** The timestamp when the API Key was created. *
* * @param createdDate * The timestamp when the API Key was created. * @return Returns a reference to this object so that method calls can be chained together. */ public GetApiKeyResult withCreatedDate(java.util.Date createdDate) { setCreatedDate(createdDate); return this; } /** ** The timestamp when the API Key was last updated. *
* * @param lastUpdatedDate * The timestamp when the API Key was last updated. */ public void setLastUpdatedDate(java.util.Date lastUpdatedDate) { this.lastUpdatedDate = lastUpdatedDate; } /** ** The timestamp when the API Key was last updated. *
* * @return The timestamp when the API Key was last updated. */ public java.util.Date getLastUpdatedDate() { return this.lastUpdatedDate; } /** ** The timestamp when the API Key was last updated. *
* * @param lastUpdatedDate * The timestamp when the API Key was last updated. * @return Returns a reference to this object so that method calls can be chained together. */ public GetApiKeyResult withLastUpdatedDate(java.util.Date lastUpdatedDate) { setLastUpdatedDate(lastUpdatedDate); return this; } /** ** A list of Stage resources that are associated with the ApiKey resource. *
* * @return A list of Stage resources that are associated with the ApiKey resource. */ public java.util.List* A list of Stage resources that are associated with the ApiKey resource. *
* * @param stageKeys * A list of Stage resources that are associated with the ApiKey resource. */ public void setStageKeys(java.util.Collection* A list of Stage resources that are associated with the ApiKey resource. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setStageKeys(java.util.Collection)} or {@link #withStageKeys(java.util.Collection)} if you want to * override the existing values. *
* * @param stageKeys * A list of Stage resources that are associated with the ApiKey resource. * @return Returns a reference to this object so that method calls can be chained together. */ public GetApiKeyResult withStageKeys(String... stageKeys) { if (this.stageKeys == null) { setStageKeys(new java.util.ArrayList* A list of Stage resources that are associated with the ApiKey resource. *
* * @param stageKeys * A list of Stage resources that are associated with the ApiKey resource. * @return Returns a reference to this object so that method calls can be chained together. */ public GetApiKeyResult withStageKeys(java.util.Collection* 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* 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* 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 GetApiKeyResult withTags(java.util.Map