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.
 
     private String status;

    

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:
The deployment lifecycle event name, such as ApplicationStop, BeforeInstall, AfterInstall, ApplicationStart, or ValidateService.
 
     public String getLifecycleEventName() {
         return this.;
     }

    

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.
Returns:
Returns a reference to this object so that method calls can be chained together.
    public LifecycleEvent withLifecycleEventName(String lifecycleEventName) {
        setLifecycleEventName(lifecycleEventName);
        return this;
    }

    

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:
Diagnostic information about the deployment lifecycle event.
    public Diagnostics getDiagnostics() {
        return this.;
    }

    

Diagnostic information about the deployment lifecycle event.

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

    

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 timestamp indicating when the deployment lifecycle event started.
    public java.util.Date getStartTime() {
        return this.;
    }

    

A timestamp indicating when the deployment lifecycle event started.

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

    

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 timestamp indicating when the deployment lifecycle event ended.
    public java.util.Date getEndTime() {
        return this.;
    }

    

A timestamp indicating when the deployment lifecycle event ended.

Parameters:
endTime A timestamp indicating when the deployment lifecycle event ended.
Returns:
Returns a reference to this object so that method calls can be chained together.
    public LifecycleEvent withEndTime(java.util.Date endTime) {
        setEndTime(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.

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:
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 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.

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:
Returns a reference to this object so that method calls can be chained together.
See also:
LifecycleEventStatus
    public LifecycleEvent withStatus(String status) {
        setStatus(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.

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:
Returns a reference to this object so that method calls can be chained together.
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.

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:
Returns a reference to this object so that method calls can be chained together.
See also:
LifecycleEventStatus
        setStatus(status);
        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() != null)
            sb.append("LifecycleEventName: " + getLifecycleEventName() + ",");
        if (getDiagnostics() != null)
            sb.append("Diagnostics: " + getDiagnostics() + ",");
        if (getStartTime() != null)
            sb.append("StartTime: " + getStartTime() + ",");
        if (getEndTime() != null)
            sb.append("EndTime: " + getEndTime() + ",");
        if (getStatus() != null)
            sb.append("Status: " + getStatus());
        sb.append("}");
        return sb.toString();
    }
    @Override
    public boolean equals(Object obj) {
        if (this == obj)
            return true;
        if (obj == null)
            return false;
        if (obj instanceof LifecycleEvent == false)
            return false;
        LifecycleEvent other = (LifecycleEventobj;
        if (other.getLifecycleEventName() == null
                ^ this.getLifecycleEventName() == null)
            return false;
        if (other.getLifecycleEventName() != null
                && other.getLifecycleEventName().equals(
                        this.getLifecycleEventName()) == false)
            return false;
        if (other.getDiagnostics() == null ^ this.getDiagnostics() == null)
            return false;
        if (other.getDiagnostics() != null
                && other.getDiagnostics().equals(this.getDiagnostics()) == false)
            return false;
        if (other.getStartTime() == null ^ this.getStartTime() == null)
            return false;
        if (other.getStartTime() != null
                && other.getStartTime().equals(this.getStartTime()) == false)
            return false;
        if (other.getEndTime() == null ^ this.getEndTime() == null)
            return false;
        if (other.getEndTime() != null
                && other.getEndTime().equals(this.getEndTime()) == false)
            return false;
        if (other.getStatus() == null ^ this.getStatus() == null)
            return false;
        if (other.getStatus() != null
                && other.getStatus().equals(this.getStatus()) == false)
            return false;
        return true;
    }
    @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 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