@Generated(value="com.amazonaws:aws-java-sdk-code-generator") public class ApiKey extends Object implements Serializable, Cloneable, StructuredPojo
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.
Constructor and Description |
---|
ApiKey() |
Modifier and Type | Method and Description |
---|---|
ApiKey |
addTagsEntry(String key,
String value)
Add a single Tags entry
|
ApiKey |
clearTagsEntries()
Removes all the entries added into Tags.
|
ApiKey |
clone() |
boolean |
equals(Object obj) |
Date |
getCreatedDate()
The timestamp when the API Key was created.
|
String |
getCustomerId()
An Amazon Web Services Marketplace customer identifier, when integrating with the Amazon Web Services SaaS
Marketplace.
|
String |
getDescription()
The description of the API Key.
|
Boolean |
getEnabled()
Specifies whether the API Key can be used by callers.
|
String |
getId()
The identifier of the API Key.
|
Date |
getLastUpdatedDate()
The timestamp when the API Key was last updated.
|
String |
getName()
The name of the API Key.
|
List<String> |
getStageKeys()
A list of Stage resources that are associated with the ApiKey resource.
|
Map<String,String> |
getTags()
The collection of tags.
|
String |
getValue()
The value of the API Key.
|
int |
hashCode() |
Boolean |
isEnabled()
Specifies whether the API Key can be used by callers.
|
void |
marshall(ProtocolMarshaller protocolMarshaller)
Marshalls this structured data using the given
ProtocolMarshaller . |
void |
setCreatedDate(Date createdDate)
The timestamp when the API Key was created.
|
void |
setCustomerId(String customerId)
An Amazon Web Services Marketplace customer identifier, when integrating with the Amazon Web Services SaaS
Marketplace.
|
void |
setDescription(String description)
The description of the API Key.
|
void |
setEnabled(Boolean enabled)
Specifies whether the API Key can be used by callers.
|
void |
setId(String id)
The identifier of the API Key.
|
void |
setLastUpdatedDate(Date lastUpdatedDate)
The timestamp when the API Key was last updated.
|
void |
setName(String name)
The name of the API Key.
|
void |
setStageKeys(Collection<String> stageKeys)
A list of Stage resources that are associated with the ApiKey resource.
|
void |
setTags(Map<String,String> tags)
The collection of tags.
|
void |
setValue(String value)
The value of the API Key.
|
String |
toString()
Returns a string representation of this object.
|
ApiKey |
withCreatedDate(Date createdDate)
The timestamp when the API Key was created.
|
ApiKey |
withCustomerId(String customerId)
An Amazon Web Services Marketplace customer identifier, when integrating with the Amazon Web Services SaaS
Marketplace.
|
ApiKey |
withDescription(String description)
The description of the API Key.
|
ApiKey |
withEnabled(Boolean enabled)
Specifies whether the API Key can be used by callers.
|
ApiKey |
withId(String id)
The identifier of the API Key.
|
ApiKey |
withLastUpdatedDate(Date lastUpdatedDate)
The timestamp when the API Key was last updated.
|
ApiKey |
withName(String name)
The name of the API Key.
|
ApiKey |
withStageKeys(Collection<String> stageKeys)
A list of Stage resources that are associated with the ApiKey resource.
|
ApiKey |
withStageKeys(String... stageKeys)
A list of Stage resources that are associated with the ApiKey resource.
|
ApiKey |
withTags(Map<String,String> tags)
The collection of tags.
|
ApiKey |
withValue(String value)
The value of the API Key.
|
public void setId(String id)
The identifier of the API Key.
id
- The identifier of the API Key.public String getId()
The identifier of the API Key.
public ApiKey withId(String id)
The identifier of the API Key.
id
- The identifier of the API Key.public void setValue(String value)
The value of the API Key.
value
- The value of the API Key.public String getValue()
The value of the API Key.
public ApiKey withValue(String value)
The value of the API Key.
value
- The value of the API Key.public void setName(String name)
The name of the API Key.
name
- The name of the API Key.public String getName()
The name of the API Key.
public ApiKey withName(String name)
The name of the API Key.
name
- The name of the API Key.public void setCustomerId(String customerId)
An Amazon Web Services Marketplace customer identifier, when integrating with the Amazon Web Services SaaS Marketplace.
customerId
- An Amazon Web Services Marketplace customer identifier, when integrating with the Amazon Web Services SaaS
Marketplace.public String getCustomerId()
An Amazon Web Services Marketplace customer identifier, when integrating with the Amazon Web Services SaaS Marketplace.
public ApiKey withCustomerId(String customerId)
An Amazon Web Services Marketplace customer identifier, when integrating with the Amazon Web Services SaaS Marketplace.
customerId
- An Amazon Web Services Marketplace customer identifier, when integrating with the Amazon Web Services SaaS
Marketplace.public void setDescription(String description)
The description of the API Key.
description
- The description of the API Key.public String getDescription()
The description of the API Key.
public ApiKey withDescription(String description)
The description of the API Key.
description
- The description of the API Key.public void setEnabled(Boolean enabled)
Specifies whether the API Key can be used by callers.
enabled
- Specifies whether the API Key can be used by callers.public Boolean getEnabled()
Specifies whether the API Key can be used by callers.
public ApiKey withEnabled(Boolean enabled)
Specifies whether the API Key can be used by callers.
enabled
- Specifies whether the API Key can be used by callers.public Boolean isEnabled()
Specifies whether the API Key can be used by callers.
public void setCreatedDate(Date createdDate)
The timestamp when the API Key was created.
createdDate
- The timestamp when the API Key was created.public Date getCreatedDate()
The timestamp when the API Key was created.
public ApiKey withCreatedDate(Date createdDate)
The timestamp when the API Key was created.
createdDate
- The timestamp when the API Key was created.public void setLastUpdatedDate(Date lastUpdatedDate)
The timestamp when the API Key was last updated.
lastUpdatedDate
- The timestamp when the API Key was last updated.public Date getLastUpdatedDate()
The timestamp when the API Key was last updated.
public ApiKey withLastUpdatedDate(Date lastUpdatedDate)
The timestamp when the API Key was last updated.
lastUpdatedDate
- The timestamp when the API Key was last updated.public List<String> getStageKeys()
A list of Stage resources that are associated with the ApiKey resource.
public void setStageKeys(Collection<String> stageKeys)
A list of Stage resources that are associated with the ApiKey resource.
stageKeys
- A list of Stage resources that are associated with the ApiKey resource.public ApiKey withStageKeys(String... stageKeys)
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
setStageKeys(java.util.Collection)
or withStageKeys(java.util.Collection)
if you want to
override the existing values.
stageKeys
- A list of Stage resources that are associated with the ApiKey resource.public ApiKey withStageKeys(Collection<String> stageKeys)
A list of Stage resources that are associated with the ApiKey resource.
stageKeys
- A list of Stage resources that are associated with the ApiKey resource.public Map<String,String> getTags()
The collection of tags. Each tag element is associated with a given resource.
public void setTags(Map<String,String> tags)
The collection of tags. Each tag element is associated with a given resource.
tags
- The collection of tags. Each tag element is associated with a given resource.public ApiKey withTags(Map<String,String> tags)
The collection of tags. Each tag element is associated with a given resource.
tags
- The collection of tags. Each tag element is associated with a given resource.public ApiKey clearTagsEntries()
public String toString()
toString
in class Object
Object.toString()
public void marshall(ProtocolMarshaller protocolMarshaller)
StructuredPojo
ProtocolMarshaller
.marshall
in interface StructuredPojo
protocolMarshaller
- Implementation of ProtocolMarshaller
used to marshall this object's data.