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

com.amazonaws.services.servicediscovery.model.Operation Maven / Gradle / Ivy

Go to download

The AWS Java SDK for Amazon Route 53 Auto Naming module holds the client classes that are used for communicating with Amazon Route 53 Auto Naming Service

There is a newer version: 1.12.772
Show newest version
/*
 * 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.servicediscovery.model;

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

/**
 * 

* A complex type that contains information about a specified operation. *

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

* The ID of the operation that you want to get information about. *

*/ private String id; /** *

* The name of the operation that's associated with the specified ID. *

*/ private String type; /** *

* The status of the operation. Values include the following: *

*
*
SUBMITTED
*
*

* This is the initial state that occurs immediately after you submit a request. *

*
*
PENDING
*
*

* Cloud Map is performing the operation. *

*
*
SUCCESS
*
*

* The operation succeeded. *

*
*
FAIL
*
*

* The operation failed. For the failure reason, see ErrorMessage. *

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

* If the value of Status is FAIL, the reason that the operation failed. *

*/ private String errorMessage; /** *

* The code associated with ErrorMessage. Values for ErrorCode include the following: *

*
    *
  • *

    * ACCESS_DENIED *

    *
  • *
  • *

    * CANNOT_CREATE_HOSTED_ZONE *

    *
  • *
  • *

    * EXPIRED_TOKEN *

    *
  • *
  • *

    * HOSTED_ZONE_NOT_FOUND *

    *
  • *
  • *

    * INTERNAL_FAILURE *

    *
  • *
  • *

    * INVALID_CHANGE_BATCH *

    *
  • *
  • *

    * THROTTLED_REQUEST *

    *
  • *
*/ private String errorCode; /** *

* The date and time that the request was submitted, in Unix date/time format and Coordinated Universal Time (UTC). * The value of CreateDate is accurate to milliseconds. For example, the value * 1516925490.087 represents Friday, January 26, 2018 12:11:30.087 AM. *

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

* The date and time that the value of Status changed to the current value, in Unix date/time format * and Coordinated Universal Time (UTC). The value of UpdateDate is accurate to milliseconds. For * example, the value 1516925490.087 represents Friday, January 26, 2018 12:11:30.087 AM. *

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

* The name of the target entity that's associated with the operation: *

*
*
NAMESPACE
*
*

* The namespace ID is returned in the ResourceId property. *

*
*
SERVICE
*
*

* The service ID is returned in the ResourceId property. *

*
*
INSTANCE
*
*

* The instance ID is returned in the ResourceId property. *

*
*
*/ private java.util.Map targets; /** *

* The ID of the operation that you want to get information about. *

* * @param id * The ID of the operation that you want to get information about. */ public void setId(String id) { this.id = id; } /** *

* The ID of the operation that you want to get information about. *

* * @return The ID of the operation that you want to get information about. */ public String getId() { return this.id; } /** *

* The ID of the operation that you want to get information about. *

* * @param id * The ID of the operation that you want to get information about. * @return Returns a reference to this object so that method calls can be chained together. */ public Operation withId(String id) { setId(id); return this; } /** *

* The name of the operation that's associated with the specified ID. *

* * @param type * The name of the operation that's associated with the specified ID. * @see OperationType */ public void setType(String type) { this.type = type; } /** *

* The name of the operation that's associated with the specified ID. *

* * @return The name of the operation that's associated with the specified ID. * @see OperationType */ public String getType() { return this.type; } /** *

* The name of the operation that's associated with the specified ID. *

* * @param type * The name of the operation that's associated with the specified ID. * @return Returns a reference to this object so that method calls can be chained together. * @see OperationType */ public Operation withType(String type) { setType(type); return this; } /** *

* The name of the operation that's associated with the specified ID. *

* * @param type * The name of the operation that's associated with the specified ID. * @return Returns a reference to this object so that method calls can be chained together. * @see OperationType */ public Operation withType(OperationType type) { this.type = type.toString(); return this; } /** *

* The status of the operation. Values include the following: *

*
*
SUBMITTED
*
*

* This is the initial state that occurs immediately after you submit a request. *

*
*
PENDING
*
*

* Cloud Map is performing the operation. *

*
*
SUCCESS
*
*

* The operation succeeded. *

*
*
FAIL
*
*

* The operation failed. For the failure reason, see ErrorMessage. *

*
*
* * @param status * The status of the operation. Values include the following:

*
*
SUBMITTED
*
*

* This is the initial state that occurs immediately after you submit a request. *

*
*
PENDING
*
*

* Cloud Map is performing the operation. *

*
*
SUCCESS
*
*

* The operation succeeded. *

*
*
FAIL
*
*

* The operation failed. For the failure reason, see ErrorMessage. *

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

* The status of the operation. Values include the following: *

*
*
SUBMITTED
*
*

* This is the initial state that occurs immediately after you submit a request. *

*
*
PENDING
*
*

* Cloud Map is performing the operation. *

*
*
SUCCESS
*
*

* The operation succeeded. *

*
*
FAIL
*
*

* The operation failed. For the failure reason, see ErrorMessage. *

*
*
* * @return The status of the operation. Values include the following:

*
*
SUBMITTED
*
*

* This is the initial state that occurs immediately after you submit a request. *

*
*
PENDING
*
*

* Cloud Map is performing the operation. *

*
*
SUCCESS
*
*

* The operation succeeded. *

*
*
FAIL
*
*

* The operation failed. For the failure reason, see ErrorMessage. *

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

* The status of the operation. Values include the following: *

*
*
SUBMITTED
*
*

* This is the initial state that occurs immediately after you submit a request. *

*
*
PENDING
*
*

* Cloud Map is performing the operation. *

*
*
SUCCESS
*
*

* The operation succeeded. *

*
*
FAIL
*
*

* The operation failed. For the failure reason, see ErrorMessage. *

*
*
* * @param status * The status of the operation. Values include the following:

*
*
SUBMITTED
*
*

* This is the initial state that occurs immediately after you submit a request. *

*
*
PENDING
*
*

* Cloud Map is performing the operation. *

*
*
SUCCESS
*
*

* The operation succeeded. *

*
*
FAIL
*
*

* The operation failed. For the failure reason, see ErrorMessage. *

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

* The status of the operation. Values include the following: *

*
*
SUBMITTED
*
*

* This is the initial state that occurs immediately after you submit a request. *

*
*
PENDING
*
*

* Cloud Map is performing the operation. *

*
*
SUCCESS
*
*

* The operation succeeded. *

*
*
FAIL
*
*

* The operation failed. For the failure reason, see ErrorMessage. *

*
*
* * @param status * The status of the operation. Values include the following:

*
*
SUBMITTED
*
*

* This is the initial state that occurs immediately after you submit a request. *

*
*
PENDING
*
*

* Cloud Map is performing the operation. *

*
*
SUCCESS
*
*

* The operation succeeded. *

*
*
FAIL
*
*

* The operation failed. For the failure reason, see ErrorMessage. *

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

* If the value of Status is FAIL, the reason that the operation failed. *

* * @param errorMessage * If the value of Status is FAIL, the reason that the operation failed. */ public void setErrorMessage(String errorMessage) { this.errorMessage = errorMessage; } /** *

* If the value of Status is FAIL, the reason that the operation failed. *

* * @return If the value of Status is FAIL, the reason that the operation failed. */ public String getErrorMessage() { return this.errorMessage; } /** *

* If the value of Status is FAIL, the reason that the operation failed. *

* * @param errorMessage * If the value of Status is FAIL, the reason that the operation failed. * @return Returns a reference to this object so that method calls can be chained together. */ public Operation withErrorMessage(String errorMessage) { setErrorMessage(errorMessage); return this; } /** *

* The code associated with ErrorMessage. Values for ErrorCode include the following: *

*
    *
  • *

    * ACCESS_DENIED *

    *
  • *
  • *

    * CANNOT_CREATE_HOSTED_ZONE *

    *
  • *
  • *

    * EXPIRED_TOKEN *

    *
  • *
  • *

    * HOSTED_ZONE_NOT_FOUND *

    *
  • *
  • *

    * INTERNAL_FAILURE *

    *
  • *
  • *

    * INVALID_CHANGE_BATCH *

    *
  • *
  • *

    * THROTTLED_REQUEST *

    *
  • *
* * @param errorCode * The code associated with ErrorMessage. Values for ErrorCode include the * following:

*
    *
  • *

    * ACCESS_DENIED *

    *
  • *
  • *

    * CANNOT_CREATE_HOSTED_ZONE *

    *
  • *
  • *

    * EXPIRED_TOKEN *

    *
  • *
  • *

    * HOSTED_ZONE_NOT_FOUND *

    *
  • *
  • *

    * INTERNAL_FAILURE *

    *
  • *
  • *

    * INVALID_CHANGE_BATCH *

    *
  • *
  • *

    * THROTTLED_REQUEST *

    *
  • */ public void setErrorCode(String errorCode) { this.errorCode = errorCode; } /** *

    * The code associated with ErrorMessage. Values for ErrorCode include the following: *

    *
      *
    • *

      * ACCESS_DENIED *

      *
    • *
    • *

      * CANNOT_CREATE_HOSTED_ZONE *

      *
    • *
    • *

      * EXPIRED_TOKEN *

      *
    • *
    • *

      * HOSTED_ZONE_NOT_FOUND *

      *
    • *
    • *

      * INTERNAL_FAILURE *

      *
    • *
    • *

      * INVALID_CHANGE_BATCH *

      *
    • *
    • *

      * THROTTLED_REQUEST *

      *
    • *
    * * @return The code associated with ErrorMessage. Values for ErrorCode include the * following:

    *
      *
    • *

      * ACCESS_DENIED *

      *
    • *
    • *

      * CANNOT_CREATE_HOSTED_ZONE *

      *
    • *
    • *

      * EXPIRED_TOKEN *

      *
    • *
    • *

      * HOSTED_ZONE_NOT_FOUND *

      *
    • *
    • *

      * INTERNAL_FAILURE *

      *
    • *
    • *

      * INVALID_CHANGE_BATCH *

      *
    • *
    • *

      * THROTTLED_REQUEST *

      *
    • */ public String getErrorCode() { return this.errorCode; } /** *

      * The code associated with ErrorMessage. Values for ErrorCode include the following: *

      *
        *
      • *

        * ACCESS_DENIED *

        *
      • *
      • *

        * CANNOT_CREATE_HOSTED_ZONE *

        *
      • *
      • *

        * EXPIRED_TOKEN *

        *
      • *
      • *

        * HOSTED_ZONE_NOT_FOUND *

        *
      • *
      • *

        * INTERNAL_FAILURE *

        *
      • *
      • *

        * INVALID_CHANGE_BATCH *

        *
      • *
      • *

        * THROTTLED_REQUEST *

        *
      • *
      * * @param errorCode * The code associated with ErrorMessage. Values for ErrorCode include the * following:

      *
        *
      • *

        * ACCESS_DENIED *

        *
      • *
      • *

        * CANNOT_CREATE_HOSTED_ZONE *

        *
      • *
      • *

        * EXPIRED_TOKEN *

        *
      • *
      • *

        * HOSTED_ZONE_NOT_FOUND *

        *
      • *
      • *

        * INTERNAL_FAILURE *

        *
      • *
      • *

        * INVALID_CHANGE_BATCH *

        *
      • *
      • *

        * THROTTLED_REQUEST *

        *
      • * @return Returns a reference to this object so that method calls can be chained together. */ public Operation withErrorCode(String errorCode) { setErrorCode(errorCode); return this; } /** *

        * The date and time that the request was submitted, in Unix date/time format and Coordinated Universal Time (UTC). * The value of CreateDate is accurate to milliseconds. For example, the value * 1516925490.087 represents Friday, January 26, 2018 12:11:30.087 AM. *

        * * @param createDate * The date and time that the request was submitted, in Unix date/time format and Coordinated Universal Time * (UTC). The value of CreateDate is accurate to milliseconds. For example, the value * 1516925490.087 represents Friday, January 26, 2018 12:11:30.087 AM. */ public void setCreateDate(java.util.Date createDate) { this.createDate = createDate; } /** *

        * The date and time that the request was submitted, in Unix date/time format and Coordinated Universal Time (UTC). * The value of CreateDate is accurate to milliseconds. For example, the value * 1516925490.087 represents Friday, January 26, 2018 12:11:30.087 AM. *

        * * @return The date and time that the request was submitted, in Unix date/time format and Coordinated Universal Time * (UTC). The value of CreateDate is accurate to milliseconds. For example, the value * 1516925490.087 represents Friday, January 26, 2018 12:11:30.087 AM. */ public java.util.Date getCreateDate() { return this.createDate; } /** *

        * The date and time that the request was submitted, in Unix date/time format and Coordinated Universal Time (UTC). * The value of CreateDate is accurate to milliseconds. For example, the value * 1516925490.087 represents Friday, January 26, 2018 12:11:30.087 AM. *

        * * @param createDate * The date and time that the request was submitted, in Unix date/time format and Coordinated Universal Time * (UTC). The value of CreateDate is accurate to milliseconds. For example, the value * 1516925490.087 represents Friday, January 26, 2018 12:11:30.087 AM. * @return Returns a reference to this object so that method calls can be chained together. */ public Operation withCreateDate(java.util.Date createDate) { setCreateDate(createDate); return this; } /** *

        * The date and time that the value of Status changed to the current value, in Unix date/time format * and Coordinated Universal Time (UTC). The value of UpdateDate is accurate to milliseconds. For * example, the value 1516925490.087 represents Friday, January 26, 2018 12:11:30.087 AM. *

        * * @param updateDate * The date and time that the value of Status changed to the current value, in Unix date/time * format and Coordinated Universal Time (UTC). The value of UpdateDate is accurate to * milliseconds. For example, the value 1516925490.087 represents Friday, January 26, 2018 * 12:11:30.087 AM. */ public void setUpdateDate(java.util.Date updateDate) { this.updateDate = updateDate; } /** *

        * The date and time that the value of Status changed to the current value, in Unix date/time format * and Coordinated Universal Time (UTC). The value of UpdateDate is accurate to milliseconds. For * example, the value 1516925490.087 represents Friday, January 26, 2018 12:11:30.087 AM. *

        * * @return The date and time that the value of Status changed to the current value, in Unix date/time * format and Coordinated Universal Time (UTC). The value of UpdateDate is accurate to * milliseconds. For example, the value 1516925490.087 represents Friday, January 26, 2018 * 12:11:30.087 AM. */ public java.util.Date getUpdateDate() { return this.updateDate; } /** *

        * The date and time that the value of Status changed to the current value, in Unix date/time format * and Coordinated Universal Time (UTC). The value of UpdateDate is accurate to milliseconds. For * example, the value 1516925490.087 represents Friday, January 26, 2018 12:11:30.087 AM. *

        * * @param updateDate * The date and time that the value of Status changed to the current value, in Unix date/time * format and Coordinated Universal Time (UTC). The value of UpdateDate is accurate to * milliseconds. For example, the value 1516925490.087 represents Friday, January 26, 2018 * 12:11:30.087 AM. * @return Returns a reference to this object so that method calls can be chained together. */ public Operation withUpdateDate(java.util.Date updateDate) { setUpdateDate(updateDate); return this; } /** *

        * The name of the target entity that's associated with the operation: *

        *
        *
        NAMESPACE
        *
        *

        * The namespace ID is returned in the ResourceId property. *

        *
        *
        SERVICE
        *
        *

        * The service ID is returned in the ResourceId property. *

        *
        *
        INSTANCE
        *
        *

        * The instance ID is returned in the ResourceId property. *

        *
        *
        * * @return The name of the target entity that's associated with the operation:

        *
        *
        NAMESPACE
        *
        *

        * The namespace ID is returned in the ResourceId property. *

        *
        *
        SERVICE
        *
        *

        * The service ID is returned in the ResourceId property. *

        *
        *
        INSTANCE
        *
        *

        * The instance ID is returned in the ResourceId property. *

        *
        */ public java.util.Map getTargets() { return targets; } /** *

        * The name of the target entity that's associated with the operation: *

        *
        *
        NAMESPACE
        *
        *

        * The namespace ID is returned in the ResourceId property. *

        *
        *
        SERVICE
        *
        *

        * The service ID is returned in the ResourceId property. *

        *
        *
        INSTANCE
        *
        *

        * The instance ID is returned in the ResourceId property. *

        *
        *
        * * @param targets * The name of the target entity that's associated with the operation:

        *
        *
        NAMESPACE
        *
        *

        * The namespace ID is returned in the ResourceId property. *

        *
        *
        SERVICE
        *
        *

        * The service ID is returned in the ResourceId property. *

        *
        *
        INSTANCE
        *
        *

        * The instance ID is returned in the ResourceId property. *

        *
        */ public void setTargets(java.util.Map targets) { this.targets = targets; } /** *

        * The name of the target entity that's associated with the operation: *

        *
        *
        NAMESPACE
        *
        *

        * The namespace ID is returned in the ResourceId property. *

        *
        *
        SERVICE
        *
        *

        * The service ID is returned in the ResourceId property. *

        *
        *
        INSTANCE
        *
        *

        * The instance ID is returned in the ResourceId property. *

        *
        *
        * * @param targets * The name of the target entity that's associated with the operation:

        *
        *
        NAMESPACE
        *
        *

        * The namespace ID is returned in the ResourceId property. *

        *
        *
        SERVICE
        *
        *

        * The service ID is returned in the ResourceId property. *

        *
        *
        INSTANCE
        *
        *

        * The instance ID is returned in the ResourceId property. *

        *
        * @return Returns a reference to this object so that method calls can be chained together. */ public Operation withTargets(java.util.Map targets) { setTargets(targets); return this; } /** * Add a single Targets entry * * @see Operation#withTargets * @returns a reference to this object so that method calls can be chained together. */ public Operation addTargetsEntry(String key, String value) { if (null == this.targets) { this.targets = new java.util.HashMap(); } if (this.targets.containsKey(key)) throw new IllegalArgumentException("Duplicated keys (" + key.toString() + ") are provided."); this.targets.put(key, value); return this; } /** * Removes all the entries added into Targets. * * @return Returns a reference to this object so that method calls can be chained together. */ public Operation clearTargetsEntries() { this.targets = null; 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 (getType() != null) sb.append("Type: ").append(getType()).append(","); if (getStatus() != null) sb.append("Status: ").append(getStatus()).append(","); if (getErrorMessage() != null) sb.append("ErrorMessage: ").append(getErrorMessage()).append(","); if (getErrorCode() != null) sb.append("ErrorCode: ").append(getErrorCode()).append(","); if (getCreateDate() != null) sb.append("CreateDate: ").append(getCreateDate()).append(","); if (getUpdateDate() != null) sb.append("UpdateDate: ").append(getUpdateDate()).append(","); if (getTargets() != null) sb.append("Targets: ").append(getTargets()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof Operation == false) return false; Operation other = (Operation) obj; if (other.getId() == null ^ this.getId() == null) return false; if (other.getId() != null && other.getId().equals(this.getId()) == false) return false; if (other.getType() == null ^ this.getType() == null) return false; if (other.getType() != null && other.getType().equals(this.getType()) == 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.getErrorMessage() == null ^ this.getErrorMessage() == null) return false; if (other.getErrorMessage() != null && other.getErrorMessage().equals(this.getErrorMessage()) == false) return false; if (other.getErrorCode() == null ^ this.getErrorCode() == null) return false; if (other.getErrorCode() != null && other.getErrorCode().equals(this.getErrorCode()) == false) return false; if (other.getCreateDate() == null ^ this.getCreateDate() == null) return false; if (other.getCreateDate() != null && other.getCreateDate().equals(this.getCreateDate()) == false) return false; if (other.getUpdateDate() == null ^ this.getUpdateDate() == null) return false; if (other.getUpdateDate() != null && other.getUpdateDate().equals(this.getUpdateDate()) == false) return false; if (other.getTargets() == null ^ this.getTargets() == null) return false; if (other.getTargets() != null && other.getTargets().equals(this.getTargets()) == 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 + ((getType() == null) ? 0 : getType().hashCode()); hashCode = prime * hashCode + ((getStatus() == null) ? 0 : getStatus().hashCode()); hashCode = prime * hashCode + ((getErrorMessage() == null) ? 0 : getErrorMessage().hashCode()); hashCode = prime * hashCode + ((getErrorCode() == null) ? 0 : getErrorCode().hashCode()); hashCode = prime * hashCode + ((getCreateDate() == null) ? 0 : getCreateDate().hashCode()); hashCode = prime * hashCode + ((getUpdateDate() == null) ? 0 : getUpdateDate().hashCode()); hashCode = prime * hashCode + ((getTargets() == null) ? 0 : getTargets().hashCode()); return hashCode; } @Override public Operation clone() { try { return (Operation) 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.servicediscovery.model.transform.OperationMarshaller.getInstance().marshall(this, protocolMarshaller); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy