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

com.amazonaws.services.securityhub.model.AwsIamPolicyVersion Maven / Gradle / Ivy

/*
 * 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.securityhub.model;

import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;

/**
 * 

* A version of an IAM policy. *

* * @see AWS * API Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class AwsIamPolicyVersion implements Serializable, Cloneable, StructuredPojo { /** *

* The identifier of the policy version. *

*/ private String versionId; /** *

* Whether the version is the default version. *

*/ private Boolean isDefaultVersion; /** *

* Indicates when the version was created. *

*

* This field accepts only the specified formats. Timestamps can end with Z or * ("+" / "-") time-hour [":" time-minute]. The time-secfrac after seconds is limited to a maximum of 9 * digits. The offset is bounded by +/-18:00. Here are valid timestamp formats with examples: *

*
    *
  • *

    * YYYY-MM-DDTHH:MM:SSZ (for example, 2019-01-31T23:00:00Z) *

    *
  • *
  • *

    * YYYY-MM-DDTHH:MM:SS.mmmmmmmmmZ (for example, 2019-01-31T23:00:00.123456789Z) *

    *
  • *
  • *

    * YYYY-MM-DDTHH:MM:SS+HH:MM (for example, 2024-01-04T15:25:10+17:59) *

    *
  • *
  • *

    * YYYY-MM-DDTHH:MM:SS-HHMM (for example, 2024-01-04T15:25:10-1759) *

    *
  • *
  • *

    * YYYY-MM-DDTHH:MM:SS.mmmmmmmmm+HH:MM (for example, 2024-01-04T15:25:10.123456789+17:59) *

    *
  • *
*/ private String createDate; /** *

* The identifier of the policy version. *

* * @param versionId * The identifier of the policy version. */ public void setVersionId(String versionId) { this.versionId = versionId; } /** *

* The identifier of the policy version. *

* * @return The identifier of the policy version. */ public String getVersionId() { return this.versionId; } /** *

* The identifier of the policy version. *

* * @param versionId * The identifier of the policy version. * @return Returns a reference to this object so that method calls can be chained together. */ public AwsIamPolicyVersion withVersionId(String versionId) { setVersionId(versionId); return this; } /** *

* Whether the version is the default version. *

* * @param isDefaultVersion * Whether the version is the default version. */ public void setIsDefaultVersion(Boolean isDefaultVersion) { this.isDefaultVersion = isDefaultVersion; } /** *

* Whether the version is the default version. *

* * @return Whether the version is the default version. */ public Boolean getIsDefaultVersion() { return this.isDefaultVersion; } /** *

* Whether the version is the default version. *

* * @param isDefaultVersion * Whether the version is the default version. * @return Returns a reference to this object so that method calls can be chained together. */ public AwsIamPolicyVersion withIsDefaultVersion(Boolean isDefaultVersion) { setIsDefaultVersion(isDefaultVersion); return this; } /** *

* Whether the version is the default version. *

* * @return Whether the version is the default version. */ public Boolean isDefaultVersion() { return this.isDefaultVersion; } /** *

* Indicates when the version was created. *

*

* This field accepts only the specified formats. Timestamps can end with Z or * ("+" / "-") time-hour [":" time-minute]. The time-secfrac after seconds is limited to a maximum of 9 * digits. The offset is bounded by +/-18:00. Here are valid timestamp formats with examples: *

*
    *
  • *

    * YYYY-MM-DDTHH:MM:SSZ (for example, 2019-01-31T23:00:00Z) *

    *
  • *
  • *

    * YYYY-MM-DDTHH:MM:SS.mmmmmmmmmZ (for example, 2019-01-31T23:00:00.123456789Z) *

    *
  • *
  • *

    * YYYY-MM-DDTHH:MM:SS+HH:MM (for example, 2024-01-04T15:25:10+17:59) *

    *
  • *
  • *

    * YYYY-MM-DDTHH:MM:SS-HHMM (for example, 2024-01-04T15:25:10-1759) *

    *
  • *
  • *

    * YYYY-MM-DDTHH:MM:SS.mmmmmmmmm+HH:MM (for example, 2024-01-04T15:25:10.123456789+17:59) *

    *
  • *
* * @param createDate * Indicates when the version was created.

*

* This field accepts only the specified formats. Timestamps can end with Z or * ("+" / "-") time-hour [":" time-minute]. The time-secfrac after seconds is limited to a * maximum of 9 digits. The offset is bounded by +/-18:00. Here are valid timestamp formats with examples: *

*
    *
  • *

    * YYYY-MM-DDTHH:MM:SSZ (for example, 2019-01-31T23:00:00Z) *

    *
  • *
  • *

    * YYYY-MM-DDTHH:MM:SS.mmmmmmmmmZ (for example, 2019-01-31T23:00:00.123456789Z) *

    *
  • *
  • *

    * YYYY-MM-DDTHH:MM:SS+HH:MM (for example, 2024-01-04T15:25:10+17:59) *

    *
  • *
  • *

    * YYYY-MM-DDTHH:MM:SS-HHMM (for example, 2024-01-04T15:25:10-1759) *

    *
  • *
  • *

    * YYYY-MM-DDTHH:MM:SS.mmmmmmmmm+HH:MM (for example, * 2024-01-04T15:25:10.123456789+17:59) *

    *
  • */ public void setCreateDate(String createDate) { this.createDate = createDate; } /** *

    * Indicates when the version was created. *

    *

    * This field accepts only the specified formats. Timestamps can end with Z or * ("+" / "-") time-hour [":" time-minute]. The time-secfrac after seconds is limited to a maximum of 9 * digits. The offset is bounded by +/-18:00. Here are valid timestamp formats with examples: *

    *
      *
    • *

      * YYYY-MM-DDTHH:MM:SSZ (for example, 2019-01-31T23:00:00Z) *

      *
    • *
    • *

      * YYYY-MM-DDTHH:MM:SS.mmmmmmmmmZ (for example, 2019-01-31T23:00:00.123456789Z) *

      *
    • *
    • *

      * YYYY-MM-DDTHH:MM:SS+HH:MM (for example, 2024-01-04T15:25:10+17:59) *

      *
    • *
    • *

      * YYYY-MM-DDTHH:MM:SS-HHMM (for example, 2024-01-04T15:25:10-1759) *

      *
    • *
    • *

      * YYYY-MM-DDTHH:MM:SS.mmmmmmmmm+HH:MM (for example, 2024-01-04T15:25:10.123456789+17:59) *

      *
    • *
    * * @return Indicates when the version was created.

    *

    * This field accepts only the specified formats. Timestamps can end with Z or * ("+" / "-") time-hour [":" time-minute]. The time-secfrac after seconds is limited to a * maximum of 9 digits. The offset is bounded by +/-18:00. Here are valid timestamp formats with examples: *

    *
      *
    • *

      * YYYY-MM-DDTHH:MM:SSZ (for example, 2019-01-31T23:00:00Z) *

      *
    • *
    • *

      * YYYY-MM-DDTHH:MM:SS.mmmmmmmmmZ (for example, 2019-01-31T23:00:00.123456789Z) *

      *
    • *
    • *

      * YYYY-MM-DDTHH:MM:SS+HH:MM (for example, 2024-01-04T15:25:10+17:59) *

      *
    • *
    • *

      * YYYY-MM-DDTHH:MM:SS-HHMM (for example, 2024-01-04T15:25:10-1759) *

      *
    • *
    • *

      * YYYY-MM-DDTHH:MM:SS.mmmmmmmmm+HH:MM (for example, * 2024-01-04T15:25:10.123456789+17:59) *

      *
    • */ public String getCreateDate() { return this.createDate; } /** *

      * Indicates when the version was created. *

      *

      * This field accepts only the specified formats. Timestamps can end with Z or * ("+" / "-") time-hour [":" time-minute]. The time-secfrac after seconds is limited to a maximum of 9 * digits. The offset is bounded by +/-18:00. Here are valid timestamp formats with examples: *

      *
        *
      • *

        * YYYY-MM-DDTHH:MM:SSZ (for example, 2019-01-31T23:00:00Z) *

        *
      • *
      • *

        * YYYY-MM-DDTHH:MM:SS.mmmmmmmmmZ (for example, 2019-01-31T23:00:00.123456789Z) *

        *
      • *
      • *

        * YYYY-MM-DDTHH:MM:SS+HH:MM (for example, 2024-01-04T15:25:10+17:59) *

        *
      • *
      • *

        * YYYY-MM-DDTHH:MM:SS-HHMM (for example, 2024-01-04T15:25:10-1759) *

        *
      • *
      • *

        * YYYY-MM-DDTHH:MM:SS.mmmmmmmmm+HH:MM (for example, 2024-01-04T15:25:10.123456789+17:59) *

        *
      • *
      * * @param createDate * Indicates when the version was created.

      *

      * This field accepts only the specified formats. Timestamps can end with Z or * ("+" / "-") time-hour [":" time-minute]. The time-secfrac after seconds is limited to a * maximum of 9 digits. The offset is bounded by +/-18:00. Here are valid timestamp formats with examples: *

      *
        *
      • *

        * YYYY-MM-DDTHH:MM:SSZ (for example, 2019-01-31T23:00:00Z) *

        *
      • *
      • *

        * YYYY-MM-DDTHH:MM:SS.mmmmmmmmmZ (for example, 2019-01-31T23:00:00.123456789Z) *

        *
      • *
      • *

        * YYYY-MM-DDTHH:MM:SS+HH:MM (for example, 2024-01-04T15:25:10+17:59) *

        *
      • *
      • *

        * YYYY-MM-DDTHH:MM:SS-HHMM (for example, 2024-01-04T15:25:10-1759) *

        *
      • *
      • *

        * YYYY-MM-DDTHH:MM:SS.mmmmmmmmm+HH:MM (for example, * 2024-01-04T15:25:10.123456789+17:59) *

        *
      • * @return Returns a reference to this object so that method calls can be chained together. */ public AwsIamPolicyVersion withCreateDate(String createDate) { setCreateDate(createDate); 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 (getVersionId() != null) sb.append("VersionId: ").append(getVersionId()).append(","); if (getIsDefaultVersion() != null) sb.append("IsDefaultVersion: ").append(getIsDefaultVersion()).append(","); if (getCreateDate() != null) sb.append("CreateDate: ").append(getCreateDate()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof AwsIamPolicyVersion == false) return false; AwsIamPolicyVersion other = (AwsIamPolicyVersion) obj; if (other.getVersionId() == null ^ this.getVersionId() == null) return false; if (other.getVersionId() != null && other.getVersionId().equals(this.getVersionId()) == false) return false; if (other.getIsDefaultVersion() == null ^ this.getIsDefaultVersion() == null) return false; if (other.getIsDefaultVersion() != null && other.getIsDefaultVersion().equals(this.getIsDefaultVersion()) == false) return false; if (other.getCreateDate() == null ^ this.getCreateDate() == null) return false; if (other.getCreateDate() != null && other.getCreateDate().equals(this.getCreateDate()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getVersionId() == null) ? 0 : getVersionId().hashCode()); hashCode = prime * hashCode + ((getIsDefaultVersion() == null) ? 0 : getIsDefaultVersion().hashCode()); hashCode = prime * hashCode + ((getCreateDate() == null) ? 0 : getCreateDate().hashCode()); return hashCode; } @Override public AwsIamPolicyVersion clone() { try { return (AwsIamPolicyVersion) 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.securityhub.model.transform.AwsIamPolicyVersionMarshaller.getInstance().marshall(this, protocolMarshaller); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy