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.elasticbeanstalk.model;
 

Describes an event.

 
 public class EventDescription implements SerializableCloneable {

    
The date when the event occurred.
 
     private java.util.Date eventDate;

    
The event message.
 
     private String message;

    
The application associated with the event.

Constraints:
Length: 1 - 100

 
     private String applicationName;

    
The release label for the application version associated with this event.

Constraints:
Length: 1 - 100

 
     private String versionLabel;

    
The name of the configuration associated with this event.

Constraints:
Length: 1 - 100

 
     private String templateName;

    
The name of the environment associated with this event.

Constraints:
Length: 4 - 23

 
     private String environmentName;

    
The web service request ID for the activity of this event.
 
     private String requestId;

    
The severity level of this event.

Constraints:
Allowed Values: TRACE, DEBUG, INFO, WARN, ERROR, FATAL

 
     private String severity;

    
Default constructor for a new EventDescription object. Callers should use the setter or fluent setter (with...) methods to initialize this object after creating it.
 
     public EventDescription() {}
    
    
The date when the event occurred.

Returns:
The date when the event occurred.
 
     public java.util.Date getEventDate() {
         return ;
     }
    
    
The date when the event occurred.

Parameters:
eventDate The date when the event occurred.
    public void setEventDate(java.util.Date eventDate) {
        this. = eventDate;
    }
    
    
The date when the event occurred.

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

Parameters:
eventDate The date when the event occurred.
Returns:
A reference to this updated object so that method calls can be chained together.
    public EventDescription withEventDate(java.util.Date eventDate) {
        this. = eventDate;
        return this;
    }

    
The event message.

Returns:
The event message.
    public String getMessage() {
        return ;
    }
    
    
The event message.

Parameters:
message The event message.
    public void setMessage(String message) {
        this. = message;
    }
    
    
The event message.

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

Parameters:
message The event message.
Returns:
A reference to this updated object so that method calls can be chained together.
    public EventDescription withMessage(String message) {
        this. = message;
        return this;
    }

    
The application associated with the event.

Constraints:
Length: 1 - 100

Returns:
The application associated with the event.
    public String getApplicationName() {
        return ;
    }
    
    
The application associated with the event.

Constraints:
Length: 1 - 100

Parameters:
applicationName The application associated with the event.
    public void setApplicationName(String applicationName) {
        this. = applicationName;
    }
    
    
The application associated with the event.

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

Constraints:
Length: 1 - 100

Parameters:
applicationName The application associated with the event.
Returns:
A reference to this updated object so that method calls can be chained together.
    public EventDescription withApplicationName(String applicationName) {
        this. = applicationName;
        return this;
    }

    
The release label for the application version associated with this event.

Constraints:
Length: 1 - 100

Returns:
The release label for the application version associated with this event.
    public String getVersionLabel() {
        return ;
    }
    
    
The release label for the application version associated with this event.

Constraints:
Length: 1 - 100

Parameters:
versionLabel The release label for the application version associated with this event.
    public void setVersionLabel(String versionLabel) {
        this. = versionLabel;
    }
    
    
The release label for the application version associated with this event.

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

Constraints:
Length: 1 - 100

Parameters:
versionLabel The release label for the application version associated with this event.
Returns:
A reference to this updated object so that method calls can be chained together.
    public EventDescription withVersionLabel(String versionLabel) {
        this. = versionLabel;
        return this;
    }

    
The name of the configuration associated with this event.

Constraints:
Length: 1 - 100

Returns:
The name of the configuration associated with this event.
    public String getTemplateName() {
        return ;
    }
    
    
The name of the configuration associated with this event.

Constraints:
Length: 1 - 100

Parameters:
templateName The name of the configuration associated with this event.
    public void setTemplateName(String templateName) {
        this. = templateName;
    }
    
    
The name of the configuration associated with this event.

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

Constraints:
Length: 1 - 100

Parameters:
templateName The name of the configuration associated with this event.
Returns:
A reference to this updated object so that method calls can be chained together.
    public EventDescription withTemplateName(String templateName) {
        this. = templateName;
        return this;
    }

    
The name of the environment associated with this event.

Constraints:
Length: 4 - 23

Returns:
The name of the environment associated with this event.
    public String getEnvironmentName() {
        return ;
    }
    
    
The name of the environment associated with this event.

Constraints:
Length: 4 - 23

Parameters:
environmentName The name of the environment associated with this event.
    public void setEnvironmentName(String environmentName) {
        this. = environmentName;
    }
    
    
The name of the environment associated with this event.

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

Constraints:
Length: 4 - 23

Parameters:
environmentName The name of the environment associated with this event.
Returns:
A reference to this updated object so that method calls can be chained together.
    public EventDescription withEnvironmentName(String environmentName) {
        this. = environmentName;
        return this;
    }

    
The web service request ID for the activity of this event.

Returns:
The web service request ID for the activity of this event.
    public String getRequestId() {
        return ;
    }
    
    
The web service request ID for the activity of this event.

Parameters:
requestId The web service request ID for the activity of this event.
    public void setRequestId(String requestId) {
        this. = requestId;
    }
    
    
The web service request ID for the activity of this event.

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

Parameters:
requestId The web service request ID for the activity of this event.
Returns:
A reference to this updated object so that method calls can be chained together.
    public EventDescription withRequestId(String requestId) {
        this. = requestId;
        return this;
    }

    
The severity level of this event.

Constraints:
Allowed Values: TRACE, DEBUG, INFO, WARN, ERROR, FATAL

Returns:
The severity level of this event.
See also:
EventSeverity
    public String getSeverity() {
        return ;
    }
    
    
The severity level of this event.

Constraints:
Allowed Values: TRACE, DEBUG, INFO, WARN, ERROR, FATAL

Parameters:
severity The severity level of this event.
See also:
EventSeverity
    public void setSeverity(String severity) {
        this. = severity;
    }
    
    
The severity level of this event.

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

Constraints:
Allowed Values: TRACE, DEBUG, INFO, WARN, ERROR, FATAL

Parameters:
severity The severity level of this event.
Returns:
A reference to this updated object so that method calls can be chained together.
See also:
EventSeverity
    public EventDescription withSeverity(String severity) {
        this. = severity;
        return this;
    }

    
The severity level of this event.

Constraints:
Allowed Values: TRACE, DEBUG, INFO, WARN, ERROR, FATAL

Parameters:
severity The severity level of this event.
See also:
EventSeverity
    public void setSeverity(EventSeverity severity) {
        this. = severity.toString();
    }
    
    
The severity level of this event.

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

Constraints:
Allowed Values: TRACE, DEBUG, INFO, WARN, ERROR, FATAL

Parameters:
severity The severity level of this event.
Returns:
A reference to this updated object so that method calls can be chained together.
See also:
EventSeverity
    public EventDescription withSeverity(EventSeverity severity) {
        this. = severity.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 (getEventDate() != nullsb.append("EventDate: " + getEventDate() + ",");
        if (getMessage() != nullsb.append("Message: " + getMessage() + ",");
        if (getApplicationName() != nullsb.append("ApplicationName: " + getApplicationName() + ",");
        if (getVersionLabel() != nullsb.append("VersionLabel: " + getVersionLabel() + ",");
        if (getTemplateName() != nullsb.append("TemplateName: " + getTemplateName() + ",");
        if (getEnvironmentName() != nullsb.append("EnvironmentName: " + getEnvironmentName() + ",");
        if (getRequestId() != nullsb.append("RequestId: " + getRequestId() + ",");
        if (getSeverity() != nullsb.append("Severity: " + getSeverity() );
        sb.append("}");
        return sb.toString();
    }
    
    @Override
    public int hashCode() {
        final int prime = 31;
        int hashCode = 1;
        
        hashCode = prime * hashCode + ((getEventDate() == null) ? 0 : getEventDate().hashCode()); 
        hashCode = prime * hashCode + ((getMessage() == null) ? 0 : getMessage().hashCode()); 
        hashCode = prime * hashCode + ((getApplicationName() == null) ? 0 : getApplicationName().hashCode()); 
        hashCode = prime * hashCode + ((getVersionLabel() == null) ? 0 : getVersionLabel().hashCode()); 
        hashCode = prime * hashCode + ((getTemplateName() == null) ? 0 : getTemplateName().hashCode()); 
        hashCode = prime * hashCode + ((getEnvironmentName() == null) ? 0 : getEnvironmentName().hashCode()); 
        hashCode = prime * hashCode + ((getRequestId() == null) ? 0 : getRequestId().hashCode()); 
        hashCode = prime * hashCode + ((getSeverity() == null) ? 0 : getSeverity().hashCode()); 
        return hashCode;
    }
    
    @Override
    public boolean equals(Object obj) {
        if (this == objreturn true;
        if (obj == nullreturn false;
        if (obj instanceof EventDescription == falsereturn false;
        EventDescription other = (EventDescription)obj;
        
        if (other.getEventDate() == null ^ this.getEventDate() == nullreturn false;
        if (other.getEventDate() != null && other.getEventDate().equals(this.getEventDate()) == falsereturn false
        if (other.getMessage() == null ^ this.getMessage() == nullreturn false;
        if (other.getMessage() != null && other.getMessage().equals(this.getMessage()) == falsereturn false
        if (other.getApplicationName() == null ^ this.getApplicationName() == nullreturn false;
        if (other.getApplicationName() != null && other.getApplicationName().equals(this.getApplicationName()) == falsereturn false
        if (other.getVersionLabel() == null ^ this.getVersionLabel() == nullreturn false;
        if (other.getVersionLabel() != null && other.getVersionLabel().equals(this.getVersionLabel()) == falsereturn false
        if (other.getTemplateName() == null ^ this.getTemplateName() == nullreturn false;
        if (other.getTemplateName() != null && other.getTemplateName().equals(this.getTemplateName()) == falsereturn false
        if (other.getEnvironmentName() == null ^ this.getEnvironmentName() == nullreturn false;
        if (other.getEnvironmentName() != null && other.getEnvironmentName().equals(this.getEnvironmentName()) == falsereturn false
        if (other.getRequestId() == null ^ this.getRequestId() == nullreturn false;
        if (other.getRequestId() != null && other.getRequestId().equals(this.getRequestId()) == falsereturn false
        if (other.getSeverity() == null ^ this.getSeverity() == nullreturn false;
        if (other.getSeverity() != null && other.getSeverity().equals(this.getSeverity()) == falsereturn false
        return true;
    }
    
    @Override
    public EventDescription clone() {
        try {
            return (EventDescriptionsuper.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