All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.amazonaws.services.health.model.EventDetails Maven / Gradle / Ivy

/*
 * Copyright 2012-2017 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.health.model;

import java.io.Serializable;
import javax.annotation.Generated;

/**
 * 

* Detailed information about an event. A combination of an Event object, an EventDescription object, and * additional metadata about the event. Returned by the DescribeEventDetails operation. *

* * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class EventDetails implements Serializable, Cloneable { /** *

* Summary information about the event. *

*/ private Event event; /** *

* The most recent description of the event. *

*/ private EventDescription eventDescription; /** *

* Additional metadata about the event. *

*/ private java.util.Map eventMetadata; /** *

* Summary information about the event. *

* * @param event * Summary information about the event. */ public void setEvent(Event event) { this.event = event; } /** *

* Summary information about the event. *

* * @return Summary information about the event. */ public Event getEvent() { return this.event; } /** *

* Summary information about the event. *

* * @param event * Summary information about the event. * @return Returns a reference to this object so that method calls can be chained together. */ public EventDetails withEvent(Event event) { setEvent(event); return this; } /** *

* The most recent description of the event. *

* * @param eventDescription * The most recent description of the event. */ public void setEventDescription(EventDescription eventDescription) { this.eventDescription = eventDescription; } /** *

* The most recent description of the event. *

* * @return The most recent description of the event. */ public EventDescription getEventDescription() { return this.eventDescription; } /** *

* The most recent description of the event. *

* * @param eventDescription * The most recent description of the event. * @return Returns a reference to this object so that method calls can be chained together. */ public EventDetails withEventDescription(EventDescription eventDescription) { setEventDescription(eventDescription); return this; } /** *

* Additional metadata about the event. *

* * @return Additional metadata about the event. */ public java.util.Map getEventMetadata() { return eventMetadata; } /** *

* Additional metadata about the event. *

* * @param eventMetadata * Additional metadata about the event. */ public void setEventMetadata(java.util.Map eventMetadata) { this.eventMetadata = eventMetadata; } /** *

* Additional metadata about the event. *

* * @param eventMetadata * Additional metadata about the event. * @return Returns a reference to this object so that method calls can be chained together. */ public EventDetails withEventMetadata(java.util.Map eventMetadata) { setEventMetadata(eventMetadata); return this; } public EventDetails addEventMetadataEntry(String key, String value) { if (null == this.eventMetadata) { this.eventMetadata = new java.util.HashMap(); } if (this.eventMetadata.containsKey(key)) throw new IllegalArgumentException("Duplicated keys (" + key.toString() + ") are provided."); this.eventMetadata.put(key, value); return this; } /** * Removes all the entries added into EventMetadata. * * @return Returns a reference to this object so that method calls can be chained together. */ public EventDetails clearEventMetadataEntries() { this.eventMetadata = null; return this; } /** * Returns a string representation of this object; useful for testing and debugging. * * @return A string representation of this object. * * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getEvent() != null) sb.append("Event: ").append(getEvent()).append(","); if (getEventDescription() != null) sb.append("EventDescription: ").append(getEventDescription()).append(","); if (getEventMetadata() != null) sb.append("EventMetadata: ").append(getEventMetadata()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof EventDetails == false) return false; EventDetails other = (EventDetails) obj; if (other.getEvent() == null ^ this.getEvent() == null) return false; if (other.getEvent() != null && other.getEvent().equals(this.getEvent()) == false) return false; if (other.getEventDescription() == null ^ this.getEventDescription() == null) return false; if (other.getEventDescription() != null && other.getEventDescription().equals(this.getEventDescription()) == false) return false; if (other.getEventMetadata() == null ^ this.getEventMetadata() == null) return false; if (other.getEventMetadata() != null && other.getEventMetadata().equals(this.getEventMetadata()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getEvent() == null) ? 0 : getEvent().hashCode()); hashCode = prime * hashCode + ((getEventDescription() == null) ? 0 : getEventDescription().hashCode()); hashCode = prime * hashCode + ((getEventMetadata() == null) ? 0 : getEventMetadata().hashCode()); return hashCode; } @Override public EventDetails clone() { try { return (EventDetails) super.clone(); } catch (CloneNotSupportedException e) { throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e); } } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy