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

com.amazonaws.services.ram.model.ReplacePermissionAssociationsWork 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.ram.model;

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

/**
 * 

* A structure that represents the background work that RAM performs when you invoke the * ReplacePermissionAssociations operation. *

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

* The unique identifier for the background task associated with one ReplacePermissionAssociations request. *

*/ private String id; /** *

* The Amazon Resource Name * (ARN) of the managed permission that this background task is replacing. *

*/ private String fromPermissionArn; /** *

* The version of the managed permission that this background task is replacing. *

*/ private String fromPermissionVersion; /** *

* The ARN of the managed permission that this background task is associating with the resource shares in place of * the managed permission and version specified in fromPermissionArn and * fromPermissionVersion. *

*/ private String toPermissionArn; /** *

* The version of the managed permission that this background task is associating with the resource shares. This is * always the version that is currently the default for this managed permission. *

*/ private String toPermissionVersion; /** *

* Specifies the current status of the background tasks for the specified ID. The output is one of the following * strings: *

*
    *
  • *

    * IN_PROGRESS *

    *
  • *
  • *

    * COMPLETED *

    *
  • *
  • *

    * FAILED *

    *
  • *
*/ private String status; /** *

* Specifies the reason for a FAILED status. This field is present only when there status * is FAILED. *

*/ private String statusMessage; /** *

* The date and time when this asynchronous background task was created. *

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

* The date and time when the status of this background task was last updated. *

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

* The unique identifier for the background task associated with one ReplacePermissionAssociations request. *

* * @param id * The unique identifier for the background task associated with one ReplacePermissionAssociations * request. */ public void setId(String id) { this.id = id; } /** *

* The unique identifier for the background task associated with one ReplacePermissionAssociations request. *

* * @return The unique identifier for the background task associated with one ReplacePermissionAssociations * request. */ public String getId() { return this.id; } /** *

* The unique identifier for the background task associated with one ReplacePermissionAssociations request. *

* * @param id * The unique identifier for the background task associated with one ReplacePermissionAssociations * request. * @return Returns a reference to this object so that method calls can be chained together. */ public ReplacePermissionAssociationsWork withId(String id) { setId(id); return this; } /** *

* The Amazon Resource Name * (ARN) of the managed permission that this background task is replacing. *

* * @param fromPermissionArn * The Amazon Resource * Name (ARN) of the managed permission that this background task is replacing. */ public void setFromPermissionArn(String fromPermissionArn) { this.fromPermissionArn = fromPermissionArn; } /** *

* The Amazon Resource Name * (ARN) of the managed permission that this background task is replacing. *

* * @return The Amazon Resource * Name (ARN) of the managed permission that this background task is replacing. */ public String getFromPermissionArn() { return this.fromPermissionArn; } /** *

* The Amazon Resource Name * (ARN) of the managed permission that this background task is replacing. *

* * @param fromPermissionArn * The Amazon Resource * Name (ARN) of the managed permission that this background task is replacing. * @return Returns a reference to this object so that method calls can be chained together. */ public ReplacePermissionAssociationsWork withFromPermissionArn(String fromPermissionArn) { setFromPermissionArn(fromPermissionArn); return this; } /** *

* The version of the managed permission that this background task is replacing. *

* * @param fromPermissionVersion * The version of the managed permission that this background task is replacing. */ public void setFromPermissionVersion(String fromPermissionVersion) { this.fromPermissionVersion = fromPermissionVersion; } /** *

* The version of the managed permission that this background task is replacing. *

* * @return The version of the managed permission that this background task is replacing. */ public String getFromPermissionVersion() { return this.fromPermissionVersion; } /** *

* The version of the managed permission that this background task is replacing. *

* * @param fromPermissionVersion * The version of the managed permission that this background task is replacing. * @return Returns a reference to this object so that method calls can be chained together. */ public ReplacePermissionAssociationsWork withFromPermissionVersion(String fromPermissionVersion) { setFromPermissionVersion(fromPermissionVersion); return this; } /** *

* The ARN of the managed permission that this background task is associating with the resource shares in place of * the managed permission and version specified in fromPermissionArn and * fromPermissionVersion. *

* * @param toPermissionArn * The ARN of the managed permission that this background task is associating with the resource shares in * place of the managed permission and version specified in fromPermissionArn and * fromPermissionVersion. */ public void setToPermissionArn(String toPermissionArn) { this.toPermissionArn = toPermissionArn; } /** *

* The ARN of the managed permission that this background task is associating with the resource shares in place of * the managed permission and version specified in fromPermissionArn and * fromPermissionVersion. *

* * @return The ARN of the managed permission that this background task is associating with the resource shares in * place of the managed permission and version specified in fromPermissionArn and * fromPermissionVersion. */ public String getToPermissionArn() { return this.toPermissionArn; } /** *

* The ARN of the managed permission that this background task is associating with the resource shares in place of * the managed permission and version specified in fromPermissionArn and * fromPermissionVersion. *

* * @param toPermissionArn * The ARN of the managed permission that this background task is associating with the resource shares in * place of the managed permission and version specified in fromPermissionArn and * fromPermissionVersion. * @return Returns a reference to this object so that method calls can be chained together. */ public ReplacePermissionAssociationsWork withToPermissionArn(String toPermissionArn) { setToPermissionArn(toPermissionArn); return this; } /** *

* The version of the managed permission that this background task is associating with the resource shares. This is * always the version that is currently the default for this managed permission. *

* * @param toPermissionVersion * The version of the managed permission that this background task is associating with the resource shares. * This is always the version that is currently the default for this managed permission. */ public void setToPermissionVersion(String toPermissionVersion) { this.toPermissionVersion = toPermissionVersion; } /** *

* The version of the managed permission that this background task is associating with the resource shares. This is * always the version that is currently the default for this managed permission. *

* * @return The version of the managed permission that this background task is associating with the resource shares. * This is always the version that is currently the default for this managed permission. */ public String getToPermissionVersion() { return this.toPermissionVersion; } /** *

* The version of the managed permission that this background task is associating with the resource shares. This is * always the version that is currently the default for this managed permission. *

* * @param toPermissionVersion * The version of the managed permission that this background task is associating with the resource shares. * This is always the version that is currently the default for this managed permission. * @return Returns a reference to this object so that method calls can be chained together. */ public ReplacePermissionAssociationsWork withToPermissionVersion(String toPermissionVersion) { setToPermissionVersion(toPermissionVersion); return this; } /** *

* Specifies the current status of the background tasks for the specified ID. The output is one of the following * strings: *

*
    *
  • *

    * IN_PROGRESS *

    *
  • *
  • *

    * COMPLETED *

    *
  • *
  • *

    * FAILED *

    *
  • *
* * @param status * Specifies the current status of the background tasks for the specified ID. The output is one of the * following strings:

*
    *
  • *

    * IN_PROGRESS *

    *
  • *
  • *

    * COMPLETED *

    *
  • *
  • *

    * FAILED *

    *
  • * @see ReplacePermissionAssociationsWorkStatus */ public void setStatus(String status) { this.status = status; } /** *

    * Specifies the current status of the background tasks for the specified ID. The output is one of the following * strings: *

    *
      *
    • *

      * IN_PROGRESS *

      *
    • *
    • *

      * COMPLETED *

      *
    • *
    • *

      * FAILED *

      *
    • *
    * * @return Specifies the current status of the background tasks for the specified ID. The output is one of the * following strings:

    *
      *
    • *

      * IN_PROGRESS *

      *
    • *
    • *

      * COMPLETED *

      *
    • *
    • *

      * FAILED *

      *
    • * @see ReplacePermissionAssociationsWorkStatus */ public String getStatus() { return this.status; } /** *

      * Specifies the current status of the background tasks for the specified ID. The output is one of the following * strings: *

      *
        *
      • *

        * IN_PROGRESS *

        *
      • *
      • *

        * COMPLETED *

        *
      • *
      • *

        * FAILED *

        *
      • *
      * * @param status * Specifies the current status of the background tasks for the specified ID. The output is one of the * following strings:

      *
        *
      • *

        * IN_PROGRESS *

        *
      • *
      • *

        * COMPLETED *

        *
      • *
      • *

        * FAILED *

        *
      • * @return Returns a reference to this object so that method calls can be chained together. * @see ReplacePermissionAssociationsWorkStatus */ public ReplacePermissionAssociationsWork withStatus(String status) { setStatus(status); return this; } /** *

        * Specifies the current status of the background tasks for the specified ID. The output is one of the following * strings: *

        *
          *
        • *

          * IN_PROGRESS *

          *
        • *
        • *

          * COMPLETED *

          *
        • *
        • *

          * FAILED *

          *
        • *
        * * @param status * Specifies the current status of the background tasks for the specified ID. The output is one of the * following strings:

        *
          *
        • *

          * IN_PROGRESS *

          *
        • *
        • *

          * COMPLETED *

          *
        • *
        • *

          * FAILED *

          *
        • * @return Returns a reference to this object so that method calls can be chained together. * @see ReplacePermissionAssociationsWorkStatus */ public ReplacePermissionAssociationsWork withStatus(ReplacePermissionAssociationsWorkStatus status) { this.status = status.toString(); return this; } /** *

          * Specifies the reason for a FAILED status. This field is present only when there status * is FAILED. *

          * * @param statusMessage * Specifies the reason for a FAILED status. This field is present only when there * status is FAILED. */ public void setStatusMessage(String statusMessage) { this.statusMessage = statusMessage; } /** *

          * Specifies the reason for a FAILED status. This field is present only when there status * is FAILED. *

          * * @return Specifies the reason for a FAILED status. This field is present only when there * status is FAILED. */ public String getStatusMessage() { return this.statusMessage; } /** *

          * Specifies the reason for a FAILED status. This field is present only when there status * is FAILED. *

          * * @param statusMessage * Specifies the reason for a FAILED status. This field is present only when there * status is FAILED. * @return Returns a reference to this object so that method calls can be chained together. */ public ReplacePermissionAssociationsWork withStatusMessage(String statusMessage) { setStatusMessage(statusMessage); return this; } /** *

          * The date and time when this asynchronous background task was created. *

          * * @param creationTime * The date and time when this asynchronous background task was created. */ public void setCreationTime(java.util.Date creationTime) { this.creationTime = creationTime; } /** *

          * The date and time when this asynchronous background task was created. *

          * * @return The date and time when this asynchronous background task was created. */ public java.util.Date getCreationTime() { return this.creationTime; } /** *

          * The date and time when this asynchronous background task was created. *

          * * @param creationTime * The date and time when this asynchronous background task was created. * @return Returns a reference to this object so that method calls can be chained together. */ public ReplacePermissionAssociationsWork withCreationTime(java.util.Date creationTime) { setCreationTime(creationTime); return this; } /** *

          * The date and time when the status of this background task was last updated. *

          * * @param lastUpdatedTime * The date and time when the status of this background task was last updated. */ public void setLastUpdatedTime(java.util.Date lastUpdatedTime) { this.lastUpdatedTime = lastUpdatedTime; } /** *

          * The date and time when the status of this background task was last updated. *

          * * @return The date and time when the status of this background task was last updated. */ public java.util.Date getLastUpdatedTime() { return this.lastUpdatedTime; } /** *

          * The date and time when the status of this background task was last updated. *

          * * @param lastUpdatedTime * The date and time when the status of this background task was last updated. * @return Returns a reference to this object so that method calls can be chained together. */ public ReplacePermissionAssociationsWork withLastUpdatedTime(java.util.Date lastUpdatedTime) { setLastUpdatedTime(lastUpdatedTime); 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 (getId() != null) sb.append("Id: ").append(getId()).append(","); if (getFromPermissionArn() != null) sb.append("FromPermissionArn: ").append(getFromPermissionArn()).append(","); if (getFromPermissionVersion() != null) sb.append("FromPermissionVersion: ").append(getFromPermissionVersion()).append(","); if (getToPermissionArn() != null) sb.append("ToPermissionArn: ").append(getToPermissionArn()).append(","); if (getToPermissionVersion() != null) sb.append("ToPermissionVersion: ").append(getToPermissionVersion()).append(","); if (getStatus() != null) sb.append("Status: ").append(getStatus()).append(","); if (getStatusMessage() != null) sb.append("StatusMessage: ").append(getStatusMessage()).append(","); if (getCreationTime() != null) sb.append("CreationTime: ").append(getCreationTime()).append(","); if (getLastUpdatedTime() != null) sb.append("LastUpdatedTime: ").append(getLastUpdatedTime()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof ReplacePermissionAssociationsWork == false) return false; ReplacePermissionAssociationsWork other = (ReplacePermissionAssociationsWork) obj; if (other.getId() == null ^ this.getId() == null) return false; if (other.getId() != null && other.getId().equals(this.getId()) == false) return false; if (other.getFromPermissionArn() == null ^ this.getFromPermissionArn() == null) return false; if (other.getFromPermissionArn() != null && other.getFromPermissionArn().equals(this.getFromPermissionArn()) == false) return false; if (other.getFromPermissionVersion() == null ^ this.getFromPermissionVersion() == null) return false; if (other.getFromPermissionVersion() != null && other.getFromPermissionVersion().equals(this.getFromPermissionVersion()) == false) return false; if (other.getToPermissionArn() == null ^ this.getToPermissionArn() == null) return false; if (other.getToPermissionArn() != null && other.getToPermissionArn().equals(this.getToPermissionArn()) == false) return false; if (other.getToPermissionVersion() == null ^ this.getToPermissionVersion() == null) return false; if (other.getToPermissionVersion() != null && other.getToPermissionVersion().equals(this.getToPermissionVersion()) == false) return false; if (other.getStatus() == null ^ this.getStatus() == null) return false; if (other.getStatus() != null && other.getStatus().equals(this.getStatus()) == false) return false; if (other.getStatusMessage() == null ^ this.getStatusMessage() == null) return false; if (other.getStatusMessage() != null && other.getStatusMessage().equals(this.getStatusMessage()) == false) return false; if (other.getCreationTime() == null ^ this.getCreationTime() == null) return false; if (other.getCreationTime() != null && other.getCreationTime().equals(this.getCreationTime()) == false) return false; if (other.getLastUpdatedTime() == null ^ this.getLastUpdatedTime() == null) return false; if (other.getLastUpdatedTime() != null && other.getLastUpdatedTime().equals(this.getLastUpdatedTime()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getId() == null) ? 0 : getId().hashCode()); hashCode = prime * hashCode + ((getFromPermissionArn() == null) ? 0 : getFromPermissionArn().hashCode()); hashCode = prime * hashCode + ((getFromPermissionVersion() == null) ? 0 : getFromPermissionVersion().hashCode()); hashCode = prime * hashCode + ((getToPermissionArn() == null) ? 0 : getToPermissionArn().hashCode()); hashCode = prime * hashCode + ((getToPermissionVersion() == null) ? 0 : getToPermissionVersion().hashCode()); hashCode = prime * hashCode + ((getStatus() == null) ? 0 : getStatus().hashCode()); hashCode = prime * hashCode + ((getStatusMessage() == null) ? 0 : getStatusMessage().hashCode()); hashCode = prime * hashCode + ((getCreationTime() == null) ? 0 : getCreationTime().hashCode()); hashCode = prime * hashCode + ((getLastUpdatedTime() == null) ? 0 : getLastUpdatedTime().hashCode()); return hashCode; } @Override public ReplacePermissionAssociationsWork clone() { try { return (ReplacePermissionAssociationsWork) 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.ram.model.transform.ReplacePermissionAssociationsWorkMarshaller.getInstance().marshall(this, protocolMarshaller); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy