/* * 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.location.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.AmazonWebServiceRequest; /** * * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class CreateKeyRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable { /** *
* An optional description for the API key resource. *
*/ private String description; /** *
* The optional timestamp for when the API key resource will expire in ISO 8601 format:
* YYYY-MM-DDThh:mm:ss.sssZ
. One of NoExpiry
or ExpireTime
must be set.
*
* A custom name for the API key resource. *
** Requirements: *
** Contain only alphanumeric characters (A–Z, a–z, 0–9), hyphens (-), periods (.), and underscores (_). *
** Must be a unique API key name. *
*
* No spaces allowed. For example, ExampleAPIKey
.
*
* Optionally set to true
to set no expiration time for the API key. One of NoExpiry
or
* ExpireTime
must be set.
*
* The API key restrictions for the API key resource. *
*/ private ApiKeyRestrictions restrictions; /** ** Applies one or more tags to the map resource. A tag is a key-value pair that helps manage, identify, search, and * filter your resources by labelling them. *
*
* Format: "key" : "value"
*
* Restrictions: *
** Maximum 50 tags per resource *
** Each resource tag must be unique with a maximum of one value. *
** Maximum key length: 128 Unicode characters in UTF-8 *
** Maximum value length: 256 Unicode characters in UTF-8 *
** Can use alphanumeric characters (A–Z, a–z, 0–9), and the following characters: + - = . _ : / @. *
** Cannot use "aws:" as a prefix for a key. *
** An optional description for the API key resource. *
* * @param description * An optional description for the API key resource. */ public void setDescription(String description) { this.description = description; } /** ** An optional description for the API key resource. *
* * @return An optional description for the API key resource. */ public String getDescription() { return this.description; } /** ** An optional description for the API key resource. *
* * @param description * An optional description for the API key resource. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateKeyRequest withDescription(String description) { setDescription(description); return this; } /** *
* The optional timestamp for when the API key resource will expire in ISO 8601 format:
* YYYY-MM-DDThh:mm:ss.sssZ
. One of NoExpiry
or ExpireTime
must be set.
*
YYYY-MM-DDThh:mm:ss.sssZ
. One of NoExpiry
or ExpireTime
must be
* set.
*/
public void setExpireTime(java.util.Date expireTime) {
this.expireTime = expireTime;
}
/**
*
* The optional timestamp for when the API key resource will expire in ISO 8601 format:
* YYYY-MM-DDThh:mm:ss.sssZ
. One of NoExpiry
or ExpireTime
must be set.
*
YYYY-MM-DDThh:mm:ss.sssZ
. One of NoExpiry
or ExpireTime
must be
* set.
*/
public java.util.Date getExpireTime() {
return this.expireTime;
}
/**
*
* The optional timestamp for when the API key resource will expire in ISO 8601 format:
* YYYY-MM-DDThh:mm:ss.sssZ
. One of NoExpiry
or ExpireTime
must be set.
*
YYYY-MM-DDThh:mm:ss.sssZ
. One of NoExpiry
or ExpireTime
must be
* set.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateKeyRequest withExpireTime(java.util.Date expireTime) {
setExpireTime(expireTime);
return this;
}
/**
* * A custom name for the API key resource. *
** Requirements: *
** Contain only alphanumeric characters (A–Z, a–z, 0–9), hyphens (-), periods (.), and underscores (_). *
** Must be a unique API key name. *
*
* No spaces allowed. For example, ExampleAPIKey
.
*
* Requirements: *
** Contain only alphanumeric characters (A–Z, a–z, 0–9), hyphens (-), periods (.), and underscores (_). *
** Must be a unique API key name. *
*
* No spaces allowed. For example, ExampleAPIKey
.
*
* A custom name for the API key resource. *
** Requirements: *
** Contain only alphanumeric characters (A–Z, a–z, 0–9), hyphens (-), periods (.), and underscores (_). *
** Must be a unique API key name. *
*
* No spaces allowed. For example, ExampleAPIKey
.
*
* Requirements: *
** Contain only alphanumeric characters (A–Z, a–z, 0–9), hyphens (-), periods (.), and underscores (_). *
** Must be a unique API key name. *
*
* No spaces allowed. For example, ExampleAPIKey
.
*
* A custom name for the API key resource. *
** Requirements: *
** Contain only alphanumeric characters (A–Z, a–z, 0–9), hyphens (-), periods (.), and underscores (_). *
** Must be a unique API key name. *
*
* No spaces allowed. For example, ExampleAPIKey
.
*
* Requirements: *
** Contain only alphanumeric characters (A–Z, a–z, 0–9), hyphens (-), periods (.), and underscores (_). *
** Must be a unique API key name. *
*
* No spaces allowed. For example, ExampleAPIKey
.
*
* Optionally set to true
to set no expiration time for the API key. One of NoExpiry
or
* ExpireTime
must be set.
*
true
to set no expiration time for the API key. One of
* NoExpiry
or ExpireTime
must be set.
*/
public void setNoExpiry(Boolean noExpiry) {
this.noExpiry = noExpiry;
}
/**
*
* Optionally set to true
to set no expiration time for the API key. One of NoExpiry
or
* ExpireTime
must be set.
*
true
to set no expiration time for the API key. One of
* NoExpiry
or ExpireTime
must be set.
*/
public Boolean getNoExpiry() {
return this.noExpiry;
}
/**
*
* Optionally set to true
to set no expiration time for the API key. One of NoExpiry
or
* ExpireTime
must be set.
*
true
to set no expiration time for the API key. One of
* NoExpiry
or ExpireTime
must be set.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateKeyRequest withNoExpiry(Boolean noExpiry) {
setNoExpiry(noExpiry);
return this;
}
/**
*
* Optionally set to true
to set no expiration time for the API key. One of NoExpiry
or
* ExpireTime
must be set.
*
true
to set no expiration time for the API key. One of
* NoExpiry
or ExpireTime
must be set.
*/
public Boolean isNoExpiry() {
return this.noExpiry;
}
/**
* * The API key restrictions for the API key resource. *
* * @param restrictions * The API key restrictions for the API key resource. */ public void setRestrictions(ApiKeyRestrictions restrictions) { this.restrictions = restrictions; } /** ** The API key restrictions for the API key resource. *
* * @return The API key restrictions for the API key resource. */ public ApiKeyRestrictions getRestrictions() { return this.restrictions; } /** ** The API key restrictions for the API key resource. *
* * @param restrictions * The API key restrictions for the API key resource. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateKeyRequest withRestrictions(ApiKeyRestrictions restrictions) { setRestrictions(restrictions); return this; } /** ** Applies one or more tags to the map resource. A tag is a key-value pair that helps manage, identify, search, and * filter your resources by labelling them. *
*
* Format: "key" : "value"
*
* Restrictions: *
** Maximum 50 tags per resource *
** Each resource tag must be unique with a maximum of one value. *
** Maximum key length: 128 Unicode characters in UTF-8 *
** Maximum value length: 256 Unicode characters in UTF-8 *
** Can use alphanumeric characters (A–Z, a–z, 0–9), and the following characters: + - = . _ : / @. *
** Cannot use "aws:" as a prefix for a key. *
*
* Format: "key" : "value"
*
* Restrictions: *
** Maximum 50 tags per resource *
** Each resource tag must be unique with a maximum of one value. *
** Maximum key length: 128 Unicode characters in UTF-8 *
** Maximum value length: 256 Unicode characters in UTF-8 *
** Can use alphanumeric characters (A–Z, a–z, 0–9), and the following characters: + - = . _ : / @. *
** Cannot use "aws:" as a prefix for a key. *
** Applies one or more tags to the map resource. A tag is a key-value pair that helps manage, identify, search, and * filter your resources by labelling them. *
*
* Format: "key" : "value"
*
* Restrictions: *
** Maximum 50 tags per resource *
** Each resource tag must be unique with a maximum of one value. *
** Maximum key length: 128 Unicode characters in UTF-8 *
** Maximum value length: 256 Unicode characters in UTF-8 *
** Can use alphanumeric characters (A–Z, a–z, 0–9), and the following characters: + - = . _ : / @. *
** Cannot use "aws:" as a prefix for a key. *
*
* Format: "key" : "value"
*
* Restrictions: *
** Maximum 50 tags per resource *
** Each resource tag must be unique with a maximum of one value. *
** Maximum key length: 128 Unicode characters in UTF-8 *
** Maximum value length: 256 Unicode characters in UTF-8 *
** Can use alphanumeric characters (A–Z, a–z, 0–9), and the following characters: + - = . _ : / @. *
** Cannot use "aws:" as a prefix for a key. *
** Applies one or more tags to the map resource. A tag is a key-value pair that helps manage, identify, search, and * filter your resources by labelling them. *
*
* Format: "key" : "value"
*
* Restrictions: *
** Maximum 50 tags per resource *
** Each resource tag must be unique with a maximum of one value. *
** Maximum key length: 128 Unicode characters in UTF-8 *
** Maximum value length: 256 Unicode characters in UTF-8 *
** Can use alphanumeric characters (A–Z, a–z, 0–9), and the following characters: + - = . _ : / @. *
** Cannot use "aws:" as a prefix for a key. *
*
* Format: "key" : "value"
*
* Restrictions: *
** Maximum 50 tags per resource *
** Each resource tag must be unique with a maximum of one value. *
** Maximum key length: 128 Unicode characters in UTF-8 *
** Maximum value length: 256 Unicode characters in UTF-8 *
** Can use alphanumeric characters (A–Z, a–z, 0–9), and the following characters: + - = . _ : / @. *
** Cannot use "aws:" as a prefix for a key. *
*