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

com.amazonaws.services.ec2.model.EnableFastSnapshotRestoreSuccessItem Maven / Gradle / Ivy

Go to download

The AWS Java SDK for Amazon EC2 module holds the client classes that are used for communicating with Amazon EC2 Service

The 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.ec2.model;

import java.io.Serializable;
import javax.annotation.Generated;

/**
 * 

* Describes fast snapshot restores that were successfully enabled. *

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

* The ID of the snapshot. *

*/ private String snapshotId; /** *

* The Availability Zone. *

*/ private String availabilityZone; /** *

* The state of fast snapshot restores. *

*/ private String state; /** *

* The reason for the state transition. The possible values are as follows: *

*
    *
  • *

    * Client.UserInitiated - The state successfully transitioned to enabling or * disabling. *

    *
  • *
  • *

    * Client.UserInitiated - Lifecycle state transition - The state successfully transitioned to * optimizing, enabled, or disabled. *

    *
  • *
*/ private String stateTransitionReason; /** *

* The ID of the Amazon Web Services account that enabled fast snapshot restores on the snapshot. *

*/ private String ownerId; /** *

* The Amazon Web Services owner alias that enabled fast snapshot restores on the snapshot. This is intended for * future use. *

*/ private String ownerAlias; /** *

* The time at which fast snapshot restores entered the enabling state. *

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

* The time at which fast snapshot restores entered the optimizing state. *

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

* The time at which fast snapshot restores entered the enabled state. *

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

* The time at which fast snapshot restores entered the disabling state. *

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

* The time at which fast snapshot restores entered the disabled state. *

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

* The ID of the snapshot. *

* * @param snapshotId * The ID of the snapshot. */ public void setSnapshotId(String snapshotId) { this.snapshotId = snapshotId; } /** *

* The ID of the snapshot. *

* * @return The ID of the snapshot. */ public String getSnapshotId() { return this.snapshotId; } /** *

* The ID of the snapshot. *

* * @param snapshotId * The ID of the snapshot. * @return Returns a reference to this object so that method calls can be chained together. */ public EnableFastSnapshotRestoreSuccessItem withSnapshotId(String snapshotId) { setSnapshotId(snapshotId); return this; } /** *

* The Availability Zone. *

* * @param availabilityZone * The Availability Zone. */ public void setAvailabilityZone(String availabilityZone) { this.availabilityZone = availabilityZone; } /** *

* The Availability Zone. *

* * @return The Availability Zone. */ public String getAvailabilityZone() { return this.availabilityZone; } /** *

* The Availability Zone. *

* * @param availabilityZone * The Availability Zone. * @return Returns a reference to this object so that method calls can be chained together. */ public EnableFastSnapshotRestoreSuccessItem withAvailabilityZone(String availabilityZone) { setAvailabilityZone(availabilityZone); return this; } /** *

* The state of fast snapshot restores. *

* * @param state * The state of fast snapshot restores. * @see FastSnapshotRestoreStateCode */ public void setState(String state) { this.state = state; } /** *

* The state of fast snapshot restores. *

* * @return The state of fast snapshot restores. * @see FastSnapshotRestoreStateCode */ public String getState() { return this.state; } /** *

* The state of fast snapshot restores. *

* * @param state * The state of fast snapshot restores. * @return Returns a reference to this object so that method calls can be chained together. * @see FastSnapshotRestoreStateCode */ public EnableFastSnapshotRestoreSuccessItem withState(String state) { setState(state); return this; } /** *

* The state of fast snapshot restores. *

* * @param state * The state of fast snapshot restores. * @return Returns a reference to this object so that method calls can be chained together. * @see FastSnapshotRestoreStateCode */ public EnableFastSnapshotRestoreSuccessItem withState(FastSnapshotRestoreStateCode state) { this.state = state.toString(); return this; } /** *

* The reason for the state transition. The possible values are as follows: *

*
    *
  • *

    * Client.UserInitiated - The state successfully transitioned to enabling or * disabling. *

    *
  • *
  • *

    * Client.UserInitiated - Lifecycle state transition - The state successfully transitioned to * optimizing, enabled, or disabled. *

    *
  • *
* * @param stateTransitionReason * The reason for the state transition. The possible values are as follows:

*
    *
  • *

    * Client.UserInitiated - The state successfully transitioned to enabling or * disabling. *

    *
  • *
  • *

    * Client.UserInitiated - Lifecycle state transition - The state successfully transitioned to * optimizing, enabled, or disabled. *

    *
  • */ public void setStateTransitionReason(String stateTransitionReason) { this.stateTransitionReason = stateTransitionReason; } /** *

    * The reason for the state transition. The possible values are as follows: *

    *
      *
    • *

      * Client.UserInitiated - The state successfully transitioned to enabling or * disabling. *

      *
    • *
    • *

      * Client.UserInitiated - Lifecycle state transition - The state successfully transitioned to * optimizing, enabled, or disabled. *

      *
    • *
    * * @return The reason for the state transition. The possible values are as follows:

    *
      *
    • *

      * Client.UserInitiated - The state successfully transitioned to enabling or * disabling. *

      *
    • *
    • *

      * Client.UserInitiated - Lifecycle state transition - The state successfully transitioned to * optimizing, enabled, or disabled. *

      *
    • */ public String getStateTransitionReason() { return this.stateTransitionReason; } /** *

      * The reason for the state transition. The possible values are as follows: *

      *
        *
      • *

        * Client.UserInitiated - The state successfully transitioned to enabling or * disabling. *

        *
      • *
      • *

        * Client.UserInitiated - Lifecycle state transition - The state successfully transitioned to * optimizing, enabled, or disabled. *

        *
      • *
      * * @param stateTransitionReason * The reason for the state transition. The possible values are as follows:

      *
        *
      • *

        * Client.UserInitiated - The state successfully transitioned to enabling or * disabling. *

        *
      • *
      • *

        * Client.UserInitiated - Lifecycle state transition - The state successfully transitioned to * optimizing, enabled, or disabled. *

        *
      • * @return Returns a reference to this object so that method calls can be chained together. */ public EnableFastSnapshotRestoreSuccessItem withStateTransitionReason(String stateTransitionReason) { setStateTransitionReason(stateTransitionReason); return this; } /** *

        * The ID of the Amazon Web Services account that enabled fast snapshot restores on the snapshot. *

        * * @param ownerId * The ID of the Amazon Web Services account that enabled fast snapshot restores on the snapshot. */ public void setOwnerId(String ownerId) { this.ownerId = ownerId; } /** *

        * The ID of the Amazon Web Services account that enabled fast snapshot restores on the snapshot. *

        * * @return The ID of the Amazon Web Services account that enabled fast snapshot restores on the snapshot. */ public String getOwnerId() { return this.ownerId; } /** *

        * The ID of the Amazon Web Services account that enabled fast snapshot restores on the snapshot. *

        * * @param ownerId * The ID of the Amazon Web Services account that enabled fast snapshot restores on the snapshot. * @return Returns a reference to this object so that method calls can be chained together. */ public EnableFastSnapshotRestoreSuccessItem withOwnerId(String ownerId) { setOwnerId(ownerId); return this; } /** *

        * The Amazon Web Services owner alias that enabled fast snapshot restores on the snapshot. This is intended for * future use. *

        * * @param ownerAlias * The Amazon Web Services owner alias that enabled fast snapshot restores on the snapshot. This is intended * for future use. */ public void setOwnerAlias(String ownerAlias) { this.ownerAlias = ownerAlias; } /** *

        * The Amazon Web Services owner alias that enabled fast snapshot restores on the snapshot. This is intended for * future use. *

        * * @return The Amazon Web Services owner alias that enabled fast snapshot restores on the snapshot. This is intended * for future use. */ public String getOwnerAlias() { return this.ownerAlias; } /** *

        * The Amazon Web Services owner alias that enabled fast snapshot restores on the snapshot. This is intended for * future use. *

        * * @param ownerAlias * The Amazon Web Services owner alias that enabled fast snapshot restores on the snapshot. This is intended * for future use. * @return Returns a reference to this object so that method calls can be chained together. */ public EnableFastSnapshotRestoreSuccessItem withOwnerAlias(String ownerAlias) { setOwnerAlias(ownerAlias); return this; } /** *

        * The time at which fast snapshot restores entered the enabling state. *

        * * @param enablingTime * The time at which fast snapshot restores entered the enabling state. */ public void setEnablingTime(java.util.Date enablingTime) { this.enablingTime = enablingTime; } /** *

        * The time at which fast snapshot restores entered the enabling state. *

        * * @return The time at which fast snapshot restores entered the enabling state. */ public java.util.Date getEnablingTime() { return this.enablingTime; } /** *

        * The time at which fast snapshot restores entered the enabling state. *

        * * @param enablingTime * The time at which fast snapshot restores entered the enabling state. * @return Returns a reference to this object so that method calls can be chained together. */ public EnableFastSnapshotRestoreSuccessItem withEnablingTime(java.util.Date enablingTime) { setEnablingTime(enablingTime); return this; } /** *

        * The time at which fast snapshot restores entered the optimizing state. *

        * * @param optimizingTime * The time at which fast snapshot restores entered the optimizing state. */ public void setOptimizingTime(java.util.Date optimizingTime) { this.optimizingTime = optimizingTime; } /** *

        * The time at which fast snapshot restores entered the optimizing state. *

        * * @return The time at which fast snapshot restores entered the optimizing state. */ public java.util.Date getOptimizingTime() { return this.optimizingTime; } /** *

        * The time at which fast snapshot restores entered the optimizing state. *

        * * @param optimizingTime * The time at which fast snapshot restores entered the optimizing state. * @return Returns a reference to this object so that method calls can be chained together. */ public EnableFastSnapshotRestoreSuccessItem withOptimizingTime(java.util.Date optimizingTime) { setOptimizingTime(optimizingTime); return this; } /** *

        * The time at which fast snapshot restores entered the enabled state. *

        * * @param enabledTime * The time at which fast snapshot restores entered the enabled state. */ public void setEnabledTime(java.util.Date enabledTime) { this.enabledTime = enabledTime; } /** *

        * The time at which fast snapshot restores entered the enabled state. *

        * * @return The time at which fast snapshot restores entered the enabled state. */ public java.util.Date getEnabledTime() { return this.enabledTime; } /** *

        * The time at which fast snapshot restores entered the enabled state. *

        * * @param enabledTime * The time at which fast snapshot restores entered the enabled state. * @return Returns a reference to this object so that method calls can be chained together. */ public EnableFastSnapshotRestoreSuccessItem withEnabledTime(java.util.Date enabledTime) { setEnabledTime(enabledTime); return this; } /** *

        * The time at which fast snapshot restores entered the disabling state. *

        * * @param disablingTime * The time at which fast snapshot restores entered the disabling state. */ public void setDisablingTime(java.util.Date disablingTime) { this.disablingTime = disablingTime; } /** *

        * The time at which fast snapshot restores entered the disabling state. *

        * * @return The time at which fast snapshot restores entered the disabling state. */ public java.util.Date getDisablingTime() { return this.disablingTime; } /** *

        * The time at which fast snapshot restores entered the disabling state. *

        * * @param disablingTime * The time at which fast snapshot restores entered the disabling state. * @return Returns a reference to this object so that method calls can be chained together. */ public EnableFastSnapshotRestoreSuccessItem withDisablingTime(java.util.Date disablingTime) { setDisablingTime(disablingTime); return this; } /** *

        * The time at which fast snapshot restores entered the disabled state. *

        * * @param disabledTime * The time at which fast snapshot restores entered the disabled state. */ public void setDisabledTime(java.util.Date disabledTime) { this.disabledTime = disabledTime; } /** *

        * The time at which fast snapshot restores entered the disabled state. *

        * * @return The time at which fast snapshot restores entered the disabled state. */ public java.util.Date getDisabledTime() { return this.disabledTime; } /** *

        * The time at which fast snapshot restores entered the disabled state. *

        * * @param disabledTime * The time at which fast snapshot restores entered the disabled state. * @return Returns a reference to this object so that method calls can be chained together. */ public EnableFastSnapshotRestoreSuccessItem withDisabledTime(java.util.Date disabledTime) { setDisabledTime(disabledTime); 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 (getSnapshotId() != null) sb.append("SnapshotId: ").append(getSnapshotId()).append(","); if (getAvailabilityZone() != null) sb.append("AvailabilityZone: ").append(getAvailabilityZone()).append(","); if (getState() != null) sb.append("State: ").append(getState()).append(","); if (getStateTransitionReason() != null) sb.append("StateTransitionReason: ").append(getStateTransitionReason()).append(","); if (getOwnerId() != null) sb.append("OwnerId: ").append(getOwnerId()).append(","); if (getOwnerAlias() != null) sb.append("OwnerAlias: ").append(getOwnerAlias()).append(","); if (getEnablingTime() != null) sb.append("EnablingTime: ").append(getEnablingTime()).append(","); if (getOptimizingTime() != null) sb.append("OptimizingTime: ").append(getOptimizingTime()).append(","); if (getEnabledTime() != null) sb.append("EnabledTime: ").append(getEnabledTime()).append(","); if (getDisablingTime() != null) sb.append("DisablingTime: ").append(getDisablingTime()).append(","); if (getDisabledTime() != null) sb.append("DisabledTime: ").append(getDisabledTime()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof EnableFastSnapshotRestoreSuccessItem == false) return false; EnableFastSnapshotRestoreSuccessItem other = (EnableFastSnapshotRestoreSuccessItem) obj; if (other.getSnapshotId() == null ^ this.getSnapshotId() == null) return false; if (other.getSnapshotId() != null && other.getSnapshotId().equals(this.getSnapshotId()) == false) return false; if (other.getAvailabilityZone() == null ^ this.getAvailabilityZone() == null) return false; if (other.getAvailabilityZone() != null && other.getAvailabilityZone().equals(this.getAvailabilityZone()) == false) return false; if (other.getState() == null ^ this.getState() == null) return false; if (other.getState() != null && other.getState().equals(this.getState()) == false) return false; if (other.getStateTransitionReason() == null ^ this.getStateTransitionReason() == null) return false; if (other.getStateTransitionReason() != null && other.getStateTransitionReason().equals(this.getStateTransitionReason()) == false) return false; if (other.getOwnerId() == null ^ this.getOwnerId() == null) return false; if (other.getOwnerId() != null && other.getOwnerId().equals(this.getOwnerId()) == false) return false; if (other.getOwnerAlias() == null ^ this.getOwnerAlias() == null) return false; if (other.getOwnerAlias() != null && other.getOwnerAlias().equals(this.getOwnerAlias()) == false) return false; if (other.getEnablingTime() == null ^ this.getEnablingTime() == null) return false; if (other.getEnablingTime() != null && other.getEnablingTime().equals(this.getEnablingTime()) == false) return false; if (other.getOptimizingTime() == null ^ this.getOptimizingTime() == null) return false; if (other.getOptimizingTime() != null && other.getOptimizingTime().equals(this.getOptimizingTime()) == false) return false; if (other.getEnabledTime() == null ^ this.getEnabledTime() == null) return false; if (other.getEnabledTime() != null && other.getEnabledTime().equals(this.getEnabledTime()) == false) return false; if (other.getDisablingTime() == null ^ this.getDisablingTime() == null) return false; if (other.getDisablingTime() != null && other.getDisablingTime().equals(this.getDisablingTime()) == false) return false; if (other.getDisabledTime() == null ^ this.getDisabledTime() == null) return false; if (other.getDisabledTime() != null && other.getDisabledTime().equals(this.getDisabledTime()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getSnapshotId() == null) ? 0 : getSnapshotId().hashCode()); hashCode = prime * hashCode + ((getAvailabilityZone() == null) ? 0 : getAvailabilityZone().hashCode()); hashCode = prime * hashCode + ((getState() == null) ? 0 : getState().hashCode()); hashCode = prime * hashCode + ((getStateTransitionReason() == null) ? 0 : getStateTransitionReason().hashCode()); hashCode = prime * hashCode + ((getOwnerId() == null) ? 0 : getOwnerId().hashCode()); hashCode = prime * hashCode + ((getOwnerAlias() == null) ? 0 : getOwnerAlias().hashCode()); hashCode = prime * hashCode + ((getEnablingTime() == null) ? 0 : getEnablingTime().hashCode()); hashCode = prime * hashCode + ((getOptimizingTime() == null) ? 0 : getOptimizingTime().hashCode()); hashCode = prime * hashCode + ((getEnabledTime() == null) ? 0 : getEnabledTime().hashCode()); hashCode = prime * hashCode + ((getDisablingTime() == null) ? 0 : getDisablingTime().hashCode()); hashCode = prime * hashCode + ((getDisabledTime() == null) ? 0 : getDisabledTime().hashCode()); return hashCode; } @Override public EnableFastSnapshotRestoreSuccessItem clone() { try { return (EnableFastSnapshotRestoreSuccessItem) super.clone(); } catch (CloneNotSupportedException e) { throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e); } } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy