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.ecs.model;
 
 
 public class ServiceEvent implements SerializableCloneable {

    
The ID string of the event.
 
     private String id;

    
The Unix time in seconds and milliseconds when the event was triggered.
 
     private java.util.Date createdAt;

    
The event message.
 
     private String message;

    
The ID string of the event.

Returns:
The ID string of the event.
 
     public String getId() {
         return ;
     }
    
    
The ID string of the event.

Parameters:
id The ID string of the event.
 
     public void setId(String id) {
         this. = id;
     }
    
    
The ID string of the event.

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

Parameters:
id The ID string of the event.
Returns:
A reference to this updated object so that method calls can be chained together.
 
     public ServiceEvent withId(String id) {
         this. = id;
         return this;
     }

    
The Unix time in seconds and milliseconds when the event was triggered.

Returns:
The Unix time in seconds and milliseconds when the event was triggered.
 
     public java.util.Date getCreatedAt() {
         return ;
     }
    
    
The Unix time in seconds and milliseconds when the event was triggered.

Parameters:
createdAt The Unix time in seconds and milliseconds when the event was triggered.
 
     public void setCreatedAt(java.util.Date createdAt) {
         this. = createdAt;
     }
    
    
The Unix time in seconds and milliseconds when the event was triggered.

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

Parameters:
createdAt The Unix time in seconds and milliseconds when the event was triggered.
Returns:
A reference to this updated object so that method calls can be chained together.
    public ServiceEvent withCreatedAt(java.util.Date createdAt) {
        this. = createdAt;
        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 ServiceEvent withMessage(String message) {
        this. = message;
        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 (getId() != nullsb.append("Id: " + getId() + ",");
        if (getCreatedAt() != nullsb.append("CreatedAt: " + getCreatedAt() + ",");
        if (getMessage() != nullsb.append("Message: " + getMessage() );
        sb.append("}");
        return sb.toString();
    }
    
    @Override
    public int hashCode() {
        final int prime = 31;
        int hashCode = 1;
        
        hashCode = prime * hashCode + ((getId() == null) ? 0 : getId().hashCode()); 
        hashCode = prime * hashCode + ((getCreatedAt() == null) ? 0 : getCreatedAt().hashCode()); 
        hashCode = prime * hashCode + ((getMessage() == null) ? 0 : getMessage().hashCode()); 
        return hashCode;
    }
    
    @Override
    public boolean equals(Object obj) {
        if (this == objreturn true;
        if (obj == nullreturn false;
        if (obj instanceof ServiceEvent == falsereturn false;
        ServiceEvent other = (ServiceEvent)obj;
        
        if (other.getId() == null ^ this.getId() == nullreturn false;
        if (other.getId() != null && other.getId().equals(this.getId()) == falsereturn false
        if (other.getCreatedAt() == null ^ this.getCreatedAt() == nullreturn false;
        if (other.getCreatedAt() != null && other.getCreatedAt().equals(this.getCreatedAt()) == falsereturn false
        if (other.getMessage() == null ^ this.getMessage() == nullreturn false;
        if (other.getMessage() != null && other.getMessage().equals(this.getMessage()) == falsereturn false
        return true;
    }
    
    @Override
    public ServiceEvent clone() {
        try {
            return (ServiceEventsuper.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