com.amazonaws.services.location.model.ListKeysResponseEntry Maven / Gradle / Ivy
Show all versions of aws-java-sdk-location Show documentation
/*
* Copyright 2019-2024 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.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;
/**
*
* An API key resource listed in your Amazon Web Services account.
*
*
* @see AWS API
* Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class ListKeysResponseEntry implements Serializable, Cloneable, StructuredPojo {
/**
*
* The name of the API key resource.
*
*/
private String keyName;
/**
*
* The timestamp for when the API key resource will expire, in ISO 8601 format:
* YYYY-MM-DDThh:mm:ss.sssZ
.
*
*/
private java.util.Date expireTime;
/**
*
* The optional description for the API key resource.
*
*/
private String description;
private ApiKeyRestrictions restrictions;
/**
*
* The timestamp of when the API key was created, in ISO 8601 format:
* YYYY-MM-DDThh:mm:ss.sssZ
.
*
*/
private java.util.Date createTime;
/**
*
* The timestamp of when the API key was last updated, in ISO 8601 format:
* YYYY-MM-DDThh:mm:ss.sssZ
.
*
*/
private java.util.Date updateTime;
/**
*
* The name of the API key resource.
*
*
* @param keyName
* The name of the API key resource.
*/
public void setKeyName(String keyName) {
this.keyName = keyName;
}
/**
*
* The name of the API key resource.
*
*
* @return The name of the API key resource.
*/
public String getKeyName() {
return this.keyName;
}
/**
*
* The name of the API key resource.
*
*
* @param keyName
* The name of the API key resource.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ListKeysResponseEntry withKeyName(String keyName) {
setKeyName(keyName);
return this;
}
/**
*
* The timestamp for when the API key resource will expire, in ISO 8601 format:
* YYYY-MM-DDThh:mm:ss.sssZ
.
*
*
* @param expireTime
* The timestamp for when the API key resource will expire, in ISO 8601 format:
* YYYY-MM-DDThh:mm:ss.sssZ
.
*/
public void setExpireTime(java.util.Date expireTime) {
this.expireTime = expireTime;
}
/**
*
* The timestamp for when the API key resource will expire, in ISO 8601 format:
* YYYY-MM-DDThh:mm:ss.sssZ
.
*
*
* @return The timestamp for when the API key resource will expire, in ISO 8601 format:
* YYYY-MM-DDThh:mm:ss.sssZ
.
*/
public java.util.Date getExpireTime() {
return this.expireTime;
}
/**
*
* The timestamp for when the API key resource will expire, in ISO 8601 format:
* YYYY-MM-DDThh:mm:ss.sssZ
.
*
*
* @param expireTime
* The timestamp for when the API key resource will expire, in ISO 8601 format:
* YYYY-MM-DDThh:mm:ss.sssZ
.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ListKeysResponseEntry withExpireTime(java.util.Date expireTime) {
setExpireTime(expireTime);
return this;
}
/**
*
* The optional description for the API key resource.
*
*
* @param description
* The optional description for the API key resource.
*/
public void setDescription(String description) {
this.description = description;
}
/**
*
* The optional description for the API key resource.
*
*
* @return The optional description for the API key resource.
*/
public String getDescription() {
return this.description;
}
/**
*
* The optional description for the API key resource.
*
*
* @param description
* The optional description for the API key resource.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ListKeysResponseEntry withDescription(String description) {
setDescription(description);
return this;
}
/**
* @param restrictions
*/
public void setRestrictions(ApiKeyRestrictions restrictions) {
this.restrictions = restrictions;
}
/**
* @return
*/
public ApiKeyRestrictions getRestrictions() {
return this.restrictions;
}
/**
* @param restrictions
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ListKeysResponseEntry withRestrictions(ApiKeyRestrictions restrictions) {
setRestrictions(restrictions);
return this;
}
/**
*
* The timestamp of when the API key was created, in ISO 8601 format:
* YYYY-MM-DDThh:mm:ss.sssZ
.
*
*
* @param createTime
* The timestamp of when the API key was created, in ISO 8601 format:
* YYYY-MM-DDThh:mm:ss.sssZ
.
*/
public void setCreateTime(java.util.Date createTime) {
this.createTime = createTime;
}
/**
*
* The timestamp of when the API key was created, in ISO 8601 format:
* YYYY-MM-DDThh:mm:ss.sssZ
.
*
*
* @return The timestamp of when the API key was created, in ISO 8601 format:
* YYYY-MM-DDThh:mm:ss.sssZ
.
*/
public java.util.Date getCreateTime() {
return this.createTime;
}
/**
*
* The timestamp of when the API key was created, in ISO 8601 format:
* YYYY-MM-DDThh:mm:ss.sssZ
.
*
*
* @param createTime
* The timestamp of when the API key was created, in ISO 8601 format:
* YYYY-MM-DDThh:mm:ss.sssZ
.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ListKeysResponseEntry withCreateTime(java.util.Date createTime) {
setCreateTime(createTime);
return this;
}
/**
*
* The timestamp of when the API key was last updated, in ISO 8601 format:
* YYYY-MM-DDThh:mm:ss.sssZ
.
*
*
* @param updateTime
* The timestamp of when the API key was last updated, in ISO 8601 format:
* YYYY-MM-DDThh:mm:ss.sssZ
.
*/
public void setUpdateTime(java.util.Date updateTime) {
this.updateTime = updateTime;
}
/**
*
* The timestamp of when the API key was last updated, in ISO 8601 format:
* YYYY-MM-DDThh:mm:ss.sssZ
.
*
*
* @return The timestamp of when the API key was last updated, in ISO 8601 format:
* YYYY-MM-DDThh:mm:ss.sssZ
.
*/
public java.util.Date getUpdateTime() {
return this.updateTime;
}
/**
*
* The timestamp of when the API key was last updated, in ISO 8601 format:
* YYYY-MM-DDThh:mm:ss.sssZ
.
*
*
* @param updateTime
* The timestamp of when the API key was last updated, in ISO 8601 format:
* YYYY-MM-DDThh:mm:ss.sssZ
.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ListKeysResponseEntry withUpdateTime(java.util.Date updateTime) {
setUpdateTime(updateTime);
return this;
}
/**
* Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be
* redacted from this string using a placeholder value.
*
* @return A string representation of this object.
*
* @see java.lang.Object#toString()
*/
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("{");
if (getKeyName() != null)
sb.append("KeyName: ").append(getKeyName()).append(",");
if (getExpireTime() != null)
sb.append("ExpireTime: ").append(getExpireTime()).append(",");
if (getDescription() != null)
sb.append("Description: ").append(getDescription()).append(",");
if (getRestrictions() != null)
sb.append("Restrictions: ").append(getRestrictions()).append(",");
if (getCreateTime() != null)
sb.append("CreateTime: ").append(getCreateTime()).append(",");
if (getUpdateTime() != null)
sb.append("UpdateTime: ").append(getUpdateTime());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof ListKeysResponseEntry == false)
return false;
ListKeysResponseEntry other = (ListKeysResponseEntry) obj;
if (other.getKeyName() == null ^ this.getKeyName() == null)
return false;
if (other.getKeyName() != null && other.getKeyName().equals(this.getKeyName()) == false)
return false;
if (other.getExpireTime() == null ^ this.getExpireTime() == null)
return false;
if (other.getExpireTime() != null && other.getExpireTime().equals(this.getExpireTime()) == false)
return false;
if (other.getDescription() == null ^ this.getDescription() == null)
return false;
if (other.getDescription() != null && other.getDescription().equals(this.getDescription()) == false)
return false;
if (other.getRestrictions() == null ^ this.getRestrictions() == null)
return false;
if (other.getRestrictions() != null && other.getRestrictions().equals(this.getRestrictions()) == false)
return false;
if (other.getCreateTime() == null ^ this.getCreateTime() == null)
return false;
if (other.getCreateTime() != null && other.getCreateTime().equals(this.getCreateTime()) == false)
return false;
if (other.getUpdateTime() == null ^ this.getUpdateTime() == null)
return false;
if (other.getUpdateTime() != null && other.getUpdateTime().equals(this.getUpdateTime()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getKeyName() == null) ? 0 : getKeyName().hashCode());
hashCode = prime * hashCode + ((getExpireTime() == null) ? 0 : getExpireTime().hashCode());
hashCode = prime * hashCode + ((getDescription() == null) ? 0 : getDescription().hashCode());
hashCode = prime * hashCode + ((getRestrictions() == null) ? 0 : getRestrictions().hashCode());
hashCode = prime * hashCode + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
hashCode = prime * hashCode + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());
return hashCode;
}
@Override
public ListKeysResponseEntry clone() {
try {
return (ListKeysResponseEntry) super.clone();
} catch (CloneNotSupportedException e) {
throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e);
}
}
@com.amazonaws.annotation.SdkInternalApi
@Override
public void marshall(ProtocolMarshaller protocolMarshaller) {
com.amazonaws.services.location.model.transform.ListKeysResponseEntryMarshaller.getInstance().marshall(this, protocolMarshaller);
}
}