com.amazonaws.services.chime.model.Room Maven / Gradle / Ivy
Show all versions of aws-java-sdk-chime Show documentation
/*
* Copyright 2019-2024 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.chime.model;
import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;
/**
*
* The Amazon Chime chat room details.
*
*
* @see AWS API Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class Room implements Serializable, Cloneable, StructuredPojo {
/**
*
* The room ID.
*
*/
private String roomId;
/**
*
* The room name.
*
*/
private String name;
/**
*
* The Amazon Chime account ID.
*
*/
private String accountId;
/**
*
* The identifier of the room creator.
*
*/
private String createdBy;
/**
*
* The room creation timestamp, in ISO 8601 format.
*
*/
private java.util.Date createdTimestamp;
/**
*
* The room update timestamp, in ISO 8601 format.
*
*/
private java.util.Date updatedTimestamp;
/**
*
* The room ID.
*
*
* @param roomId
* The room ID.
*/
public void setRoomId(String roomId) {
this.roomId = roomId;
}
/**
*
* The room ID.
*
*
* @return The room ID.
*/
public String getRoomId() {
return this.roomId;
}
/**
*
* The room ID.
*
*
* @param roomId
* The room ID.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Room withRoomId(String roomId) {
setRoomId(roomId);
return this;
}
/**
*
* The room name.
*
*
* @param name
* The room name.
*/
public void setName(String name) {
this.name = name;
}
/**
*
* The room name.
*
*
* @return The room name.
*/
public String getName() {
return this.name;
}
/**
*
* The room name.
*
*
* @param name
* The room name.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Room withName(String name) {
setName(name);
return this;
}
/**
*
* The Amazon Chime account ID.
*
*
* @param accountId
* The Amazon Chime account ID.
*/
public void setAccountId(String accountId) {
this.accountId = accountId;
}
/**
*
* The Amazon Chime account ID.
*
*
* @return The Amazon Chime account ID.
*/
public String getAccountId() {
return this.accountId;
}
/**
*
* The Amazon Chime account ID.
*
*
* @param accountId
* The Amazon Chime account ID.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Room withAccountId(String accountId) {
setAccountId(accountId);
return this;
}
/**
*
* The identifier of the room creator.
*
*
* @param createdBy
* The identifier of the room creator.
*/
public void setCreatedBy(String createdBy) {
this.createdBy = createdBy;
}
/**
*
* The identifier of the room creator.
*
*
* @return The identifier of the room creator.
*/
public String getCreatedBy() {
return this.createdBy;
}
/**
*
* The identifier of the room creator.
*
*
* @param createdBy
* The identifier of the room creator.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Room withCreatedBy(String createdBy) {
setCreatedBy(createdBy);
return this;
}
/**
*
* The room creation timestamp, in ISO 8601 format.
*
*
* @param createdTimestamp
* The room creation timestamp, in ISO 8601 format.
*/
public void setCreatedTimestamp(java.util.Date createdTimestamp) {
this.createdTimestamp = createdTimestamp;
}
/**
*
* The room creation timestamp, in ISO 8601 format.
*
*
* @return The room creation timestamp, in ISO 8601 format.
*/
public java.util.Date getCreatedTimestamp() {
return this.createdTimestamp;
}
/**
*
* The room creation timestamp, in ISO 8601 format.
*
*
* @param createdTimestamp
* The room creation timestamp, in ISO 8601 format.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Room withCreatedTimestamp(java.util.Date createdTimestamp) {
setCreatedTimestamp(createdTimestamp);
return this;
}
/**
*
* The room update timestamp, in ISO 8601 format.
*
*
* @param updatedTimestamp
* The room update timestamp, in ISO 8601 format.
*/
public void setUpdatedTimestamp(java.util.Date updatedTimestamp) {
this.updatedTimestamp = updatedTimestamp;
}
/**
*
* The room update timestamp, in ISO 8601 format.
*
*
* @return The room update timestamp, in ISO 8601 format.
*/
public java.util.Date getUpdatedTimestamp() {
return this.updatedTimestamp;
}
/**
*
* The room update timestamp, in ISO 8601 format.
*
*
* @param updatedTimestamp
* The room update timestamp, in ISO 8601 format.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Room withUpdatedTimestamp(java.util.Date updatedTimestamp) {
setUpdatedTimestamp(updatedTimestamp);
return this;
}
/**
* Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be
* redacted from this string using a placeholder value.
*
* @return A string representation of this object.
*
* @see java.lang.Object#toString()
*/
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("{");
if (getRoomId() != null)
sb.append("RoomId: ").append(getRoomId()).append(",");
if (getName() != null)
sb.append("Name: ").append("***Sensitive Data Redacted***").append(",");
if (getAccountId() != null)
sb.append("AccountId: ").append(getAccountId()).append(",");
if (getCreatedBy() != null)
sb.append("CreatedBy: ").append(getCreatedBy()).append(",");
if (getCreatedTimestamp() != null)
sb.append("CreatedTimestamp: ").append(getCreatedTimestamp()).append(",");
if (getUpdatedTimestamp() != null)
sb.append("UpdatedTimestamp: ").append(getUpdatedTimestamp());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof Room == false)
return false;
Room other = (Room) obj;
if (other.getRoomId() == null ^ this.getRoomId() == null)
return false;
if (other.getRoomId() != null && other.getRoomId().equals(this.getRoomId()) == false)
return false;
if (other.getName() == null ^ this.getName() == null)
return false;
if (other.getName() != null && other.getName().equals(this.getName()) == false)
return false;
if (other.getAccountId() == null ^ this.getAccountId() == null)
return false;
if (other.getAccountId() != null && other.getAccountId().equals(this.getAccountId()) == false)
return false;
if (other.getCreatedBy() == null ^ this.getCreatedBy() == null)
return false;
if (other.getCreatedBy() != null && other.getCreatedBy().equals(this.getCreatedBy()) == false)
return false;
if (other.getCreatedTimestamp() == null ^ this.getCreatedTimestamp() == null)
return false;
if (other.getCreatedTimestamp() != null && other.getCreatedTimestamp().equals(this.getCreatedTimestamp()) == false)
return false;
if (other.getUpdatedTimestamp() == null ^ this.getUpdatedTimestamp() == null)
return false;
if (other.getUpdatedTimestamp() != null && other.getUpdatedTimestamp().equals(this.getUpdatedTimestamp()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getRoomId() == null) ? 0 : getRoomId().hashCode());
hashCode = prime * hashCode + ((getName() == null) ? 0 : getName().hashCode());
hashCode = prime * hashCode + ((getAccountId() == null) ? 0 : getAccountId().hashCode());
hashCode = prime * hashCode + ((getCreatedBy() == null) ? 0 : getCreatedBy().hashCode());
hashCode = prime * hashCode + ((getCreatedTimestamp() == null) ? 0 : getCreatedTimestamp().hashCode());
hashCode = prime * hashCode + ((getUpdatedTimestamp() == null) ? 0 : getUpdatedTimestamp().hashCode());
return hashCode;
}
@Override
public Room clone() {
try {
return (Room) super.clone();
} catch (CloneNotSupportedException e) {
throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e);
}
}
@com.amazonaws.annotation.SdkInternalApi
@Override
public void marshall(ProtocolMarshaller protocolMarshaller) {
com.amazonaws.services.chime.model.transform.RoomMarshaller.getInstance().marshall(this, protocolMarshaller);
}
}