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

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

/*
 * Copyright 2016-2021 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. *

*

* Uses the date-time format specified in RFC * 3339 section 5.6, Internet Date/Time Format. The value cannot contain spaces. For example, * 2020-03-22T13:22:13.933Z. *

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

*

* Uses the date-time format specified in RFC * 3339 section 5.6, Internet Date/Time Format. The value cannot contain spaces. For example, * 2020-03-22T13:22:13.933Z. *

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

*

* Uses the date-time format specified in RFC 3339 section 5.6, Internet Date/Time * Format. The value cannot contain spaces. For example, 2020-03-22T13:22:13.933Z. */ public void setCreateDate(String createDate) { this.createDate = createDate; } /** *

* Indicates when the version was created. *

*

* Uses the date-time format specified in RFC * 3339 section 5.6, Internet Date/Time Format. The value cannot contain spaces. For example, * 2020-03-22T13:22:13.933Z. *

* * @return Indicates when the version was created.

*

* Uses the date-time format specified in RFC 3339 section 5.6, Internet Date/Time * Format. The value cannot contain spaces. For example, 2020-03-22T13:22:13.933Z. */ public String getCreateDate() { return this.createDate; } /** *

* Indicates when the version was created. *

*

* Uses the date-time format specified in RFC * 3339 section 5.6, Internet Date/Time Format. The value cannot contain spaces. For example, * 2020-03-22T13:22:13.933Z. *

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

*

* Uses the date-time format specified in RFC 3339 section 5.6, Internet Date/Time * Format. The value cannot contain spaces. For example, 2020-03-22T13:22:13.933Z. * @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 - 2024 Weber Informatics LLC | Privacy Policy