Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  /*
   * Copyright 2010-2015 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.codedeploy.model;
 

Information about a deployment lifecycle event.

 
 public class LifecycleEvent implements SerializableCloneable {

    
The deployment lifecycle event name, such as ApplicationStop, BeforeInstall, AfterInstall, ApplicationStart, or ValidateService.
 
     private String lifecycleEventName;

    
Diagnostic information about the deployment lifecycle event.
 
     private Diagnostics diagnostics;

    
A timestamp indicating when the deployment lifecycle event started.
 
     private java.util.Date startTime;

    
A timestamp indicating when the deployment lifecycle event ended.
 
     private java.util.Date endTime;

    
The deployment lifecycle event status:
  • Pending: The deployment lifecycle event is pending.
  • InProgress: The deployment lifecycle event is in progress.
  • Succeeded: The deployment lifecycle event has succeeded.
  • Failed: The deployment lifecycle event has failed.
  • Skipped: The deployment lifecycle event has been skipped.
  • Unknown: The deployment lifecycle event is unknown.

Constraints:
Allowed Values: Pending, InProgress, Succeeded, Failed, Skipped, Unknown

 
     private String status;

    
The deployment lifecycle event name, such as ApplicationStop, BeforeInstall, AfterInstall, ApplicationStart, or ValidateService.

Returns:
The deployment lifecycle event name, such as ApplicationStop, BeforeInstall, AfterInstall, ApplicationStart, or ValidateService.
 
     public String getLifecycleEventName() {
         return ;
     }
    
    
The deployment lifecycle event name, such as ApplicationStop, BeforeInstall, AfterInstall, ApplicationStart, or ValidateService.

Parameters:
lifecycleEventName The deployment lifecycle event name, such as ApplicationStop, BeforeInstall, AfterInstall, ApplicationStart, or ValidateService.
 
     public void setLifecycleEventName(String lifecycleEventName) {
         this. = lifecycleEventName;
     }
    
    
The deployment lifecycle event name, such as ApplicationStop, BeforeInstall, AfterInstall, ApplicationStart, or ValidateService.

Returns a reference to this object so that method calls can be chained together.

Parameters:
lifecycleEventName The deployment lifecycle event name, such as ApplicationStop, BeforeInstall, AfterInstall, ApplicationStart, or ValidateService.
Returns:
A reference to this updated object so that method calls can be chained together.
 
     public LifecycleEvent withLifecycleEventName(String lifecycleEventName) {
         this. = lifecycleEventName;
         return this;
     }

    
Diagnostic information about the deployment lifecycle event.

Returns:
Diagnostic information about the deployment lifecycle event.
    public Diagnostics getDiagnostics() {
        return ;
    }
    
    
Diagnostic information about the deployment lifecycle event.

Parameters:
diagnostics Diagnostic information about the deployment lifecycle event.
    public void setDiagnostics(Diagnostics diagnostics) {
        this. = diagnostics;
    }
    
    
Diagnostic information about the deployment lifecycle event.

Returns a reference to this object so that method calls can be chained together.

Parameters:
diagnostics Diagnostic information about the deployment lifecycle event.
Returns:
A reference to this updated object so that method calls can be chained together.
    public LifecycleEvent withDiagnostics(Diagnostics diagnostics) {
        this. = diagnostics;
        return this;
    }

    
A timestamp indicating when the deployment lifecycle event started.

Returns:
A timestamp indicating when the deployment lifecycle event started.
    public java.util.Date getStartTime() {
        return ;
    }
    
    
A timestamp indicating when the deployment lifecycle event started.

Parameters:
startTime A timestamp indicating when the deployment lifecycle event started.
    public void setStartTime(java.util.Date startTime) {
        this. = startTime;
    }
    
    
A timestamp indicating when the deployment lifecycle event started.

Returns a reference to this object so that method calls can be chained together.

Parameters:
startTime A timestamp indicating when the deployment lifecycle event started.
Returns:
A reference to this updated object so that method calls can be chained together.
    public LifecycleEvent withStartTime(java.util.Date startTime) {
        this. = startTime;
        return this;
    }

    
A timestamp indicating when the deployment lifecycle event ended.

Returns:
A timestamp indicating when the deployment lifecycle event ended.
    public java.util.Date getEndTime() {
        return ;
    }
    
    
A timestamp indicating when the deployment lifecycle event ended.

Parameters:
endTime A timestamp indicating when the deployment lifecycle event ended.
    public void setEndTime(java.util.Date endTime) {
        this. = endTime;
    }
    
    
A timestamp indicating when the deployment lifecycle event ended.

Returns a reference to this object so that method calls can be chained together.

Parameters:
endTime A timestamp indicating when the deployment lifecycle event ended.
Returns:
A reference to this updated object so that method calls can be chained together.
    public LifecycleEvent withEndTime(java.util.Date endTime) {
        this. = endTime;
        return this;
    }

    
The deployment lifecycle event status:
  • Pending: The deployment lifecycle event is pending.
  • InProgress: The deployment lifecycle event is in progress.
  • Succeeded: The deployment lifecycle event has succeeded.
  • Failed: The deployment lifecycle event has failed.
  • Skipped: The deployment lifecycle event has been skipped.
  • Unknown: The deployment lifecycle event is unknown.

Constraints:
Allowed Values: Pending, InProgress, Succeeded, Failed, Skipped, Unknown

Returns:
The deployment lifecycle event status:
  • Pending: The deployment lifecycle event is pending.
  • InProgress: The deployment lifecycle event is in progress.
  • Succeeded: The deployment lifecycle event has succeeded.
  • Failed: The deployment lifecycle event has failed.
  • Skipped: The deployment lifecycle event has been skipped.
  • Unknown: The deployment lifecycle event is unknown.
See also:
LifecycleEventStatus
    public String getStatus() {
        return ;
    }
    
    
The deployment lifecycle event status:
  • Pending: The deployment lifecycle event is pending.
  • InProgress: The deployment lifecycle event is in progress.
  • Succeeded: The deployment lifecycle event has succeeded.
  • Failed: The deployment lifecycle event has failed.
  • Skipped: The deployment lifecycle event has been skipped.
  • Unknown: The deployment lifecycle event is unknown.

Constraints:
Allowed Values: Pending, InProgress, Succeeded, Failed, Skipped, Unknown

Parameters:
status The deployment lifecycle event status:
  • Pending: The deployment lifecycle event is pending.
  • InProgress: The deployment lifecycle event is in progress.
  • Succeeded: The deployment lifecycle event has succeeded.
  • Failed: The deployment lifecycle event has failed.
  • Skipped: The deployment lifecycle event has been skipped.
  • Unknown: The deployment lifecycle event is unknown.
See also:
LifecycleEventStatus
    public void setStatus(String status) {
        this. = status;
    }
    
    
The deployment lifecycle event status:
  • Pending: The deployment lifecycle event is pending.
  • InProgress: The deployment lifecycle event is in progress.
  • Succeeded: The deployment lifecycle event has succeeded.
  • Failed: The deployment lifecycle event has failed.
  • Skipped: The deployment lifecycle event has been skipped.
  • Unknown: The deployment lifecycle event is unknown.

Returns a reference to this object so that method calls can be chained together.

Constraints:
Allowed Values: Pending, InProgress, Succeeded, Failed, Skipped, Unknown

Parameters:
status The deployment lifecycle event status:
  • Pending: The deployment lifecycle event is pending.
  • InProgress: The deployment lifecycle event is in progress.
  • Succeeded: The deployment lifecycle event has succeeded.
  • Failed: The deployment lifecycle event has failed.
  • Skipped: The deployment lifecycle event has been skipped.
  • Unknown: The deployment lifecycle event is unknown.
Returns:
A reference to this updated object so that method calls can be chained together.
See also:
LifecycleEventStatus
    public LifecycleEvent withStatus(String status) {
        this. = status;
        return this;
    }

    
The deployment lifecycle event status:
  • Pending: The deployment lifecycle event is pending.
  • InProgress: The deployment lifecycle event is in progress.
  • Succeeded: The deployment lifecycle event has succeeded.
  • Failed: The deployment lifecycle event has failed.
  • Skipped: The deployment lifecycle event has been skipped.
  • Unknown: The deployment lifecycle event is unknown.

Constraints:
Allowed Values: Pending, InProgress, Succeeded, Failed, Skipped, Unknown

Parameters:
status The deployment lifecycle event status:
  • Pending: The deployment lifecycle event is pending.
  • InProgress: The deployment lifecycle event is in progress.
  • Succeeded: The deployment lifecycle event has succeeded.
  • Failed: The deployment lifecycle event has failed.
  • Skipped: The deployment lifecycle event has been skipped.
  • Unknown: The deployment lifecycle event is unknown.
See also:
LifecycleEventStatus
    public void setStatus(LifecycleEventStatus status) {
        this. = status.toString();
    }
    
    
The deployment lifecycle event status:
  • Pending: The deployment lifecycle event is pending.
  • InProgress: The deployment lifecycle event is in progress.
  • Succeeded: The deployment lifecycle event has succeeded.
  • Failed: The deployment lifecycle event has failed.
  • Skipped: The deployment lifecycle event has been skipped.
  • Unknown: The deployment lifecycle event is unknown.

Returns a reference to this object so that method calls can be chained together.

Constraints:
Allowed Values: Pending, InProgress, Succeeded, Failed, Skipped, Unknown

Parameters:
status The deployment lifecycle event status:
  • Pending: The deployment lifecycle event is pending.
  • InProgress: The deployment lifecycle event is in progress.
  • Succeeded: The deployment lifecycle event has succeeded.
  • Failed: The deployment lifecycle event has failed.
  • Skipped: The deployment lifecycle event has been skipped.
  • Unknown: The deployment lifecycle event is unknown.
Returns:
A reference to this updated object so that method calls can be chained together.
See also:
LifecycleEventStatus
        this. = status.toString();
        return this;
    }

    
Returns a string representation of this object; useful for testing and debugging.

Returns:
A string representation of this object.
See also:
java.lang.Object.toString()
    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append("{");
        if (getLifecycleEventName() != nullsb.append("LifecycleEventName: " + getLifecycleEventName() + ",");
        if (getDiagnostics() != nullsb.append("Diagnostics: " + getDiagnostics() + ",");
        if (getStartTime() != nullsb.append("StartTime: " + getStartTime() + ",");
        if (getEndTime() != nullsb.append("EndTime: " + getEndTime() + ",");
        if (getStatus() != nullsb.append("Status: " + getStatus() );
        sb.append("}");
        return sb.toString();
    }
    
    @Override
    public int hashCode() {
        final int prime = 31;
        int hashCode = 1;
        
        hashCode = prime * hashCode + ((getLifecycleEventName() == null) ? 0 : getLifecycleEventName().hashCode()); 
        hashCode = prime * hashCode + ((getDiagnostics() == null) ? 0 : getDiagnostics().hashCode()); 
        hashCode = prime * hashCode + ((getStartTime() == null) ? 0 : getStartTime().hashCode()); 
        hashCode = prime * hashCode + ((getEndTime() == null) ? 0 : getEndTime().hashCode()); 
        hashCode = prime * hashCode + ((getStatus() == null) ? 0 : getStatus().hashCode()); 
        return hashCode;
    }
    
    @Override
    public boolean equals(Object obj) {
        if (this == objreturn true;
        if (obj == nullreturn false;
        if (obj instanceof LifecycleEvent == falsereturn false;
        LifecycleEvent other = (LifecycleEvent)obj;
        
        if (other.getLifecycleEventName() == null ^ this.getLifecycleEventName() == nullreturn false;
        if (other.getLifecycleEventName() != null && other.getLifecycleEventName().equals(this.getLifecycleEventName()) == falsereturn false
        if (other.getDiagnostics() == null ^ this.getDiagnostics() == nullreturn false;
        if (other.getDiagnostics() != null && other.getDiagnostics().equals(this.getDiagnostics()) == falsereturn false
        if (other.getStartTime() == null ^ this.getStartTime() == nullreturn false;
        if (other.getStartTime() != null && other.getStartTime().equals(this.getStartTime()) == falsereturn false
        if (other.getEndTime() == null ^ this.getEndTime() == nullreturn false;
        if (other.getEndTime() != null && other.getEndTime().equals(this.getEndTime()) == falsereturn false
        if (other.getStatus() == null ^ this.getStatus() == nullreturn false;
        if (other.getStatus() != null && other.getStatus().equals(this.getStatus()) == falsereturn false
        return true;
    }
    
    @Override
    public LifecycleEvent clone() {
        try {
            return (LifecycleEventsuper.clone();
        
        } catch (CloneNotSupportedException e) {
            throw new IllegalStateException(
                    "Got a CloneNotSupportedException from Object.clone() "
                    + "even though we're Cloneable!",
                    e);
        }
        
    }
}
    
New to GrepCode? Check out our FAQ X