/* * 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. *

*/ private java.util.Date expireTime; /** *

* A custom name for the API key resource. *

*

* Requirements: *

* */ private String keyName; /** *

* Optionally set to true to set no expiration time for the API key. One of NoExpiry or * ExpireTime must be set. *

*/ private Boolean noExpiry; /** *

* 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: *

* */ private java.util.Map tags; /** *

* 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. *

* * @param 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. */ 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. *

* * @return 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. */ 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. *

* * @param 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. * @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: *

* * * @param keyName * A custom name for the API key resource.

*

* Requirements: *

*