com.amazonaws.services.iot.model.DescribeEventConfigurationsResult Maven / Gradle / Ivy
/*
* Copyright 2010-2018 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.iot.model;
import java.io.Serializable;
public class DescribeEventConfigurationsResult implements Serializable {
/**
*
* The event configurations.
*
*/
private java.util.Map eventConfigurations;
/**
*
* The creation date of the event configuration.
*
*/
private java.util.Date creationDate;
/**
*
* The date the event configurations were last modified.
*
*/
private java.util.Date lastModifiedDate;
/**
*
* The event configurations.
*
*
* @return
* The event configurations.
*
*/
public java.util.Map getEventConfigurations() {
return eventConfigurations;
}
/**
*
* The event configurations.
*
*
* @param eventConfigurations
* The event configurations.
*
*/
public void setEventConfigurations(java.util.Map eventConfigurations) {
this.eventConfigurations = eventConfigurations;
}
/**
*
* The event configurations.
*
*
* Returns a reference to this object so that method calls can be chained
* together.
*
* @param eventConfigurations
* The event configurations.
*
* @return A reference to this updated object so that method calls can be
* chained together.
*/
public DescribeEventConfigurationsResult withEventConfigurations(
java.util.Map eventConfigurations) {
this.eventConfigurations = eventConfigurations;
return this;
}
/**
*
* The event configurations.
*
*
* The method adds a new key-value pair into eventConfigurations parameter,
* and returns a reference to this object so that method calls can be
* chained together.
*
* @param key The key of the entry to be added into eventConfigurations.
* @param value The corresponding value of the entry to be added into
* eventConfigurations.
* @return A reference to this updated object so that method calls can be
* chained together.
*/
public DescribeEventConfigurationsResult addeventConfigurationsEntry(String key,
Configuration value) {
if (null == this.eventConfigurations) {
this.eventConfigurations = new java.util.HashMap();
}
if (this.eventConfigurations.containsKey(key))
throw new IllegalArgumentException("Duplicated keys (" + key.toString()
+ ") are provided.");
this.eventConfigurations.put(key, value);
return this;
}
/**
* Removes all the entries added into eventConfigurations.
*
* Returns a reference to this object so that method calls can be chained
* together.
*/
public DescribeEventConfigurationsResult cleareventConfigurationsEntries() {
this.eventConfigurations = null;
return this;
}
/**
*
* The creation date of the event configuration.
*
*
* @return
* The creation date of the event configuration.
*
*/
public java.util.Date getCreationDate() {
return creationDate;
}
/**
*
* The creation date of the event configuration.
*
*
* @param creationDate
* The creation date of the event configuration.
*
*/
public void setCreationDate(java.util.Date creationDate) {
this.creationDate = creationDate;
}
/**
*
* The creation date of the event configuration.
*
*
* Returns a reference to this object so that method calls can be chained
* together.
*
* @param creationDate
* The creation date of the event configuration.
*
* @return A reference to this updated object so that method calls can be
* chained together.
*/
public DescribeEventConfigurationsResult withCreationDate(java.util.Date creationDate) {
this.creationDate = creationDate;
return this;
}
/**
*
* The date the event configurations were last modified.
*
*
* @return
* The date the event configurations were last modified.
*
*/
public java.util.Date getLastModifiedDate() {
return lastModifiedDate;
}
/**
*
* The date the event configurations were last modified.
*
*
* @param lastModifiedDate
* The date the event configurations were last modified.
*
*/
public void setLastModifiedDate(java.util.Date lastModifiedDate) {
this.lastModifiedDate = lastModifiedDate;
}
/**
*
* The date the event configurations were last modified.
*
*
* Returns a reference to this object so that method calls can be chained
* together.
*
* @param lastModifiedDate
* The date the event configurations were last modified.
*
* @return A reference to this updated object so that method calls can be
* chained together.
*/
public DescribeEventConfigurationsResult withLastModifiedDate(java.util.Date lastModifiedDate) {
this.lastModifiedDate = lastModifiedDate;
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 (getEventConfigurations() != null)
sb.append("eventConfigurations: " + getEventConfigurations() + ",");
if (getCreationDate() != null)
sb.append("creationDate: " + getCreationDate() + ",");
if (getLastModifiedDate() != null)
sb.append("lastModifiedDate: " + getLastModifiedDate());
sb.append("}");
return sb.toString();
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode
+ ((getEventConfigurations() == null) ? 0 : getEventConfigurations().hashCode());
hashCode = prime * hashCode
+ ((getCreationDate() == null) ? 0 : getCreationDate().hashCode());
hashCode = prime * hashCode
+ ((getLastModifiedDate() == null) ? 0 : getLastModifiedDate().hashCode());
return hashCode;
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof DescribeEventConfigurationsResult == false)
return false;
DescribeEventConfigurationsResult other = (DescribeEventConfigurationsResult) obj;
if (other.getEventConfigurations() == null ^ this.getEventConfigurations() == null)
return false;
if (other.getEventConfigurations() != null
&& other.getEventConfigurations().equals(this.getEventConfigurations()) == false)
return false;
if (other.getCreationDate() == null ^ this.getCreationDate() == null)
return false;
if (other.getCreationDate() != null
&& other.getCreationDate().equals(this.getCreationDate()) == false)
return false;
if (other.getLastModifiedDate() == null ^ this.getLastModifiedDate() == null)
return false;
if (other.getLastModifiedDate() != null
&& other.getLastModifiedDate().equals(this.getLastModifiedDate()) == false)
return false;
return true;
}
}