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

    
The identifier of an Amazon Redshift event.
 
     private String eventId;

    
The category of an Amazon Redshift event.
 
The description of an Amazon Redshift event.
 
     private String eventDescription;

    
The severity of the event.

Values: ERROR, INFO

 
     private String severity;

    
The identifier of an Amazon Redshift event.

Returns:
The identifier of an Amazon Redshift event.
 
     public String getEventId() {
         return ;
     }
    
    
The identifier of an Amazon Redshift event.

Parameters:
eventId The identifier of an Amazon Redshift event.
 
     public void setEventId(String eventId) {
         this. = eventId;
     }
    
    
The identifier of an Amazon Redshift event.

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

Parameters:
eventId The identifier of an Amazon Redshift event.
Returns:
A reference to this updated object so that method calls can be chained together.
 
     public EventInfoMap withEventId(String eventId) {
         this. = eventId;
         return this;
     }

    
The category of an Amazon Redshift event.

Returns:
The category of an Amazon Redshift event.
 
     public java.util.List<StringgetEventCategories() {
         if ( == null) {
                = new com.amazonaws.internal.ListWithAutoConstructFlag<String>();
               .setAutoConstruct(true);
         }
         return ;
     }
    
    
The category of an Amazon Redshift event.

Parameters:
eventCategories The category of an Amazon Redshift event.
 
     public void setEventCategories(java.util.Collection<StringeventCategories) {
         if (eventCategories == null) {
             this. = null;
             return;
         }
        com.amazonaws.internal.ListWithAutoConstructFlag<StringeventCategoriesCopy = new com.amazonaws.internal.ListWithAutoConstructFlag<String>(eventCategories.size());
        eventCategoriesCopy.addAll(eventCategories);
        this. = eventCategoriesCopy;
    }
    
    
The category of an Amazon Redshift event.

NOTE: This method appends the values to the existing list (if any). Use setEventCategories(java.util.Collection) or withEventCategories(java.util.Collection) if you want to override the existing values.

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

Parameters:
eventCategories The category of an Amazon Redshift event.
Returns:
A reference to this updated object so that method calls can be chained together.
    public EventInfoMap withEventCategories(String... eventCategories) {
        if (getEventCategories() == nullsetEventCategories(new java.util.ArrayList<String>(eventCategories.length));
        for (String value : eventCategories) {
            getEventCategories().add(value);
        }
        return this;
    }
    
    
The category of an Amazon Redshift event.

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

Parameters:
eventCategories The category of an Amazon Redshift event.
Returns:
A reference to this updated object so that method calls can be chained together.
    public EventInfoMap withEventCategories(java.util.Collection<StringeventCategories) {
        if (eventCategories == null) {
            this. = null;
        } else {
            com.amazonaws.internal.ListWithAutoConstructFlag<StringeventCategoriesCopy = new com.amazonaws.internal.ListWithAutoConstructFlag<String>(eventCategories.size());
            eventCategoriesCopy.addAll(eventCategories);
            this. = eventCategoriesCopy;
        }
        return this;
    }

    
The description of an Amazon Redshift event.

Returns:
The description of an Amazon Redshift event.
    public String getEventDescription() {
        return ;
    }
    
    
The description of an Amazon Redshift event.

Parameters:
eventDescription The description of an Amazon Redshift event.
    public void setEventDescription(String eventDescription) {
        this. = eventDescription;
    }
    
    
The description of an Amazon Redshift event.

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

Parameters:
eventDescription The description of an Amazon Redshift event.
Returns:
A reference to this updated object so that method calls can be chained together.
    public EventInfoMap withEventDescription(String eventDescription) {
        this. = eventDescription;
        return this;
    }

    
The severity of the event.

Values: ERROR, INFO

Returns:
The severity of the event.

Values: ERROR, INFO

    public String getSeverity() {
        return ;
    }
    
    
The severity of the event.

Values: ERROR, INFO

Parameters:
severity The severity of the event.

Values: ERROR, INFO

    public void setSeverity(String severity) {
        this. = severity;
    }
    
    
The severity of the event.

Values: ERROR, INFO

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

Parameters:
severity The severity of the event.

Values: ERROR, INFO

Returns:
A reference to this updated object so that method calls can be chained together.
    public EventInfoMap withSeverity(String severity) {
        this. = severity;
        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 (getEventId() != nullsb.append("EventId: " + getEventId() + ",");
        if (getEventCategories() != nullsb.append("EventCategories: " + getEventCategories() + ",");
        if (getEventDescription() != nullsb.append("EventDescription: " + getEventDescription() + ",");
        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 + ((getEventId() == null) ? 0 : getEventId().hashCode()); 
        hashCode = prime * hashCode + ((getEventCategories() == null) ? 0 : getEventCategories().hashCode()); 
        hashCode = prime * hashCode + ((getEventDescription() == null) ? 0 : getEventDescription().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 EventInfoMap == falsereturn false;
        EventInfoMap other = (EventInfoMap)obj;
        
        if (other.getEventId() == null ^ this.getEventId() == nullreturn false;
        if (other.getEventId() != null && other.getEventId().equals(this.getEventId()) == falsereturn false
        if (other.getEventCategories() == null ^ this.getEventCategories() == nullreturn false;
        if (other.getEventCategories() != null && other.getEventCategories().equals(this.getEventCategories()) == falsereturn false
        if (other.getEventDescription() == null ^ this.getEventDescription() == nullreturn false;
        if (other.getEventDescription() != null && other.getEventDescription().equals(this.getEventDescription()) == 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 EventInfoMap clone() {
        try {
            return (EventInfoMapsuper.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