All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.amazonaws.services.identitymanagement.model.AccessKeyLastUsed Maven / Gradle / Ivy

Go to download

The AWS Java SDK for AWS IAM module holds the client classes that are used for communicating with AWS Identity and Access Management Service

There is a newer version: 1.12.782
Show newest version
/*
 * Copyright 2010-2016 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.identitymanagement.model;

import java.io.Serializable;

/**
 * 

* Contains information about the last time an AWS access key was used. *

*

* This data type is used as a response element in the * GetAccessKeyLastUsed action. *

*/ public class AccessKeyLastUsed implements Serializable, Cloneable { /** *

* The date and time, in ISO 8601 * date-time format, when the access key was most recently used. This * field is null when: *

*
    *
  • *

    * The user does not have an access key. *

    *
  • *
  • *

    * An access key exists but has never been used, at least not since IAM * started tracking this information on April 22nd, 2015. *

    *
  • *
  • *

    * There is no sign-in data associated with the user *

    *
  • *
*/ private java.util.Date lastUsedDate; /** *

* The name of the AWS service with which this access key was most recently * used. This field is null when: *

*
    *
  • *

    * The user does not have an access key. *

    *
  • *
  • *

    * An access key exists but has never been used, at least not since IAM * started tracking this information on April 22nd, 2015. *

    *
  • *
  • *

    * There is no sign-in data associated with the user *

    *
  • *
*/ private String serviceName; /** *

* The AWS region where this access key was most recently used. This field * is null when: *

*
    *
  • *

    * The user does not have an access key. *

    *
  • *
  • *

    * An access key exists but has never been used, at least not since IAM * started tracking this information on April 22nd, 2015. *

    *
  • *
  • *

    * There is no sign-in data associated with the user *

    *
  • *
*

* For more information about AWS regions, see Regions * and Endpoints in the Amazon Web Services General Reference. *

*/ private String region; /** *

* The date and time, in ISO 8601 * date-time format, when the access key was most recently used. This * field is null when: *

*
    *
  • *

    * The user does not have an access key. *

    *
  • *
  • *

    * An access key exists but has never been used, at least not since IAM * started tracking this information on April 22nd, 2015. *

    *
  • *
  • *

    * There is no sign-in data associated with the user *

    *
  • *
* * @param lastUsedDate * The date and time, in ISO * 8601 date-time format, when the access key was most recently * used. This field is null when:

*
    *
  • *

    * The user does not have an access key. *

    *
  • *
  • *

    * An access key exists but has never been used, at least not since * IAM started tracking this information on April 22nd, 2015. *

    *
  • *
  • *

    * There is no sign-in data associated with the user *

    *
  • */ public void setLastUsedDate(java.util.Date lastUsedDate) { this.lastUsedDate = lastUsedDate; } /** *

    * The date and time, in ISO 8601 * date-time format, when the access key was most recently used. This * field is null when: *

    *
      *
    • *

      * The user does not have an access key. *

      *
    • *
    • *

      * An access key exists but has never been used, at least not since IAM * started tracking this information on April 22nd, 2015. *

      *
    • *
    • *

      * There is no sign-in data associated with the user *

      *
    • *
    * * @return The date and time, in ISO 8601 date-time * format, when the access key was most recently used. This * field is null when:

    *
      *
    • *

      * The user does not have an access key. *

      *
    • *
    • *

      * An access key exists but has never been used, at least not since * IAM started tracking this information on April 22nd, 2015. *

      *
    • *
    • *

      * There is no sign-in data associated with the user *

      *
    • */ public java.util.Date getLastUsedDate() { return this.lastUsedDate; } /** *

      * The date and time, in ISO 8601 * date-time format, when the access key was most recently used. This * field is null when: *

      *
        *
      • *

        * The user does not have an access key. *

        *
      • *
      • *

        * An access key exists but has never been used, at least not since IAM * started tracking this information on April 22nd, 2015. *

        *
      • *
      • *

        * There is no sign-in data associated with the user *

        *
      • *
      * * @param lastUsedDate * The date and time, in ISO * 8601 date-time format, when the access key was most recently * used. This field is null when:

      *
        *
      • *

        * The user does not have an access key. *

        *
      • *
      • *

        * An access key exists but has never been used, at least not since * IAM started tracking this information on April 22nd, 2015. *

        *
      • *
      • *

        * There is no sign-in data associated with the user *

        *
      • * @return Returns a reference to this object so that method calls can be * chained together. */ public AccessKeyLastUsed withLastUsedDate(java.util.Date lastUsedDate) { setLastUsedDate(lastUsedDate); return this; } /** *

        * The name of the AWS service with which this access key was most recently * used. This field is null when: *

        *
          *
        • *

          * The user does not have an access key. *

          *
        • *
        • *

          * An access key exists but has never been used, at least not since IAM * started tracking this information on April 22nd, 2015. *

          *
        • *
        • *

          * There is no sign-in data associated with the user *

          *
        • *
        * * @param serviceName * The name of the AWS service with which this access key was most * recently used. This field is null when:

        *
          *
        • *

          * The user does not have an access key. *

          *
        • *
        • *

          * An access key exists but has never been used, at least not since * IAM started tracking this information on April 22nd, 2015. *

          *
        • *
        • *

          * There is no sign-in data associated with the user *

          *
        • */ public void setServiceName(String serviceName) { this.serviceName = serviceName; } /** *

          * The name of the AWS service with which this access key was most recently * used. This field is null when: *

          *
            *
          • *

            * The user does not have an access key. *

            *
          • *
          • *

            * An access key exists but has never been used, at least not since IAM * started tracking this information on April 22nd, 2015. *

            *
          • *
          • *

            * There is no sign-in data associated with the user *

            *
          • *
          * * @return The name of the AWS service with which this access key was most * recently used. This field is null when:

          *
            *
          • *

            * The user does not have an access key. *

            *
          • *
          • *

            * An access key exists but has never been used, at least not since * IAM started tracking this information on April 22nd, 2015. *

            *
          • *
          • *

            * There is no sign-in data associated with the user *

            *
          • */ public String getServiceName() { return this.serviceName; } /** *

            * The name of the AWS service with which this access key was most recently * used. This field is null when: *

            *
              *
            • *

              * The user does not have an access key. *

              *
            • *
            • *

              * An access key exists but has never been used, at least not since IAM * started tracking this information on April 22nd, 2015. *

              *
            • *
            • *

              * There is no sign-in data associated with the user *

              *
            • *
            * * @param serviceName * The name of the AWS service with which this access key was most * recently used. This field is null when:

            *
              *
            • *

              * The user does not have an access key. *

              *
            • *
            • *

              * An access key exists but has never been used, at least not since * IAM started tracking this information on April 22nd, 2015. *

              *
            • *
            • *

              * There is no sign-in data associated with the user *

              *
            • * @return Returns a reference to this object so that method calls can be * chained together. */ public AccessKeyLastUsed withServiceName(String serviceName) { setServiceName(serviceName); return this; } /** *

              * The AWS region where this access key was most recently used. This field * is null when: *

              *
                *
              • *

                * The user does not have an access key. *

                *
              • *
              • *

                * An access key exists but has never been used, at least not since IAM * started tracking this information on April 22nd, 2015. *

                *
              • *
              • *

                * There is no sign-in data associated with the user *

                *
              • *
              *

              * For more information about AWS regions, see Regions * and Endpoints in the Amazon Web Services General Reference. *

              * * @param region * The AWS region where this access key was most recently used. This * field is null when:

              *
                *
              • *

                * The user does not have an access key. *

                *
              • *
              • *

                * An access key exists but has never been used, at least not since * IAM started tracking this information on April 22nd, 2015. *

                *
              • *
              • *

                * There is no sign-in data associated with the user *

                *
              • *
              *

              * For more information about AWS regions, see Regions and Endpoints in the Amazon Web Services General * Reference. */ public void setRegion(String region) { this.region = region; } /** *

              * The AWS region where this access key was most recently used. This field * is null when: *

              *
                *
              • *

                * The user does not have an access key. *

                *
              • *
              • *

                * An access key exists but has never been used, at least not since IAM * started tracking this information on April 22nd, 2015. *

                *
              • *
              • *

                * There is no sign-in data associated with the user *

                *
              • *
              *

              * For more information about AWS regions, see Regions * and Endpoints in the Amazon Web Services General Reference. *

              * * @return The AWS region where this access key was most recently used. This * field is null when:

              *
                *
              • *

                * The user does not have an access key. *

                *
              • *
              • *

                * An access key exists but has never been used, at least not since * IAM started tracking this information on April 22nd, 2015. *

                *
              • *
              • *

                * There is no sign-in data associated with the user *

                *
              • *
              *

              * For more information about AWS regions, see Regions and Endpoints in the Amazon Web Services General * Reference. */ public String getRegion() { return this.region; } /** *

              * The AWS region where this access key was most recently used. This field * is null when: *

              *
                *
              • *

                * The user does not have an access key. *

                *
              • *
              • *

                * An access key exists but has never been used, at least not since IAM * started tracking this information on April 22nd, 2015. *

                *
              • *
              • *

                * There is no sign-in data associated with the user *

                *
              • *
              *

              * For more information about AWS regions, see Regions * and Endpoints in the Amazon Web Services General Reference. *

              * * @param region * The AWS region where this access key was most recently used. This * field is null when:

              *
                *
              • *

                * The user does not have an access key. *

                *
              • *
              • *

                * An access key exists but has never been used, at least not since * IAM started tracking this information on April 22nd, 2015. *

                *
              • *
              • *

                * There is no sign-in data associated with the user *

                *
              • *
              *

              * For more information about AWS regions, see Regions and Endpoints in the Amazon Web Services General * Reference. * @return Returns a reference to this object so that method calls can be * chained together. */ public AccessKeyLastUsed withRegion(String region) { setRegion(region); return this; } /** * Returns a string representation of this object; useful for testing and * debugging. * * @return A string representation of this object. * * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getLastUsedDate() != null) sb.append("LastUsedDate: " + getLastUsedDate() + ","); if (getServiceName() != null) sb.append("ServiceName: " + getServiceName() + ","); if (getRegion() != null) sb.append("Region: " + getRegion()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof AccessKeyLastUsed == false) return false; AccessKeyLastUsed other = (AccessKeyLastUsed) obj; if (other.getLastUsedDate() == null ^ this.getLastUsedDate() == null) return false; if (other.getLastUsedDate() != null && other.getLastUsedDate().equals(this.getLastUsedDate()) == false) return false; if (other.getServiceName() == null ^ this.getServiceName() == null) return false; if (other.getServiceName() != null && other.getServiceName().equals(this.getServiceName()) == false) return false; if (other.getRegion() == null ^ this.getRegion() == null) return false; if (other.getRegion() != null && other.getRegion().equals(this.getRegion()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getLastUsedDate() == null) ? 0 : getLastUsedDate() .hashCode()); hashCode = prime * hashCode + ((getServiceName() == null) ? 0 : getServiceName().hashCode()); hashCode = prime * hashCode + ((getRegion() == null) ? 0 : getRegion().hashCode()); return hashCode; } @Override public AccessKeyLastUsed clone() { try { return (AccessKeyLastUsed) super.clone(); } catch (CloneNotSupportedException e) { throw new IllegalStateException( "Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e); } } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy