com.amazonaws.services.qconnect.model.SessionData Maven / Gradle / Ivy
Show all versions of aws-java-sdk-qconnect 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.qconnect.model;
import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;
/**
*
* Information about the session.
*
*
* @see AWS API
* Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class SessionData implements Serializable, Cloneable, StructuredPojo {
/**
*
* The description of the session.
*
*/
private String description;
/**
*
* The configuration information for the session integration.
*
*/
private SessionIntegrationConfiguration integrationConfiguration;
/**
*
* The name of the session.
*
*/
private String name;
/**
*
* The Amazon Resource Name (ARN) of the session.
*
*/
private String sessionArn;
/**
*
* The identifier of the session.
*
*/
private String sessionId;
/**
*
* An object that can be used to specify Tag conditions.
*
*/
private TagFilter tagFilter;
/**
*
* The tags used to organize, track, or control access for this resource.
*
*/
private java.util.Map tags;
/**
*
* The description of the session.
*
*
* @param description
* The description of the session.
*/
public void setDescription(String description) {
this.description = description;
}
/**
*
* The description of the session.
*
*
* @return The description of the session.
*/
public String getDescription() {
return this.description;
}
/**
*
* The description of the session.
*
*
* @param description
* The description of the session.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public SessionData withDescription(String description) {
setDescription(description);
return this;
}
/**
*
* The configuration information for the session integration.
*
*
* @param integrationConfiguration
* The configuration information for the session integration.
*/
public void setIntegrationConfiguration(SessionIntegrationConfiguration integrationConfiguration) {
this.integrationConfiguration = integrationConfiguration;
}
/**
*
* The configuration information for the session integration.
*
*
* @return The configuration information for the session integration.
*/
public SessionIntegrationConfiguration getIntegrationConfiguration() {
return this.integrationConfiguration;
}
/**
*
* The configuration information for the session integration.
*
*
* @param integrationConfiguration
* The configuration information for the session integration.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public SessionData withIntegrationConfiguration(SessionIntegrationConfiguration integrationConfiguration) {
setIntegrationConfiguration(integrationConfiguration);
return this;
}
/**
*
* The name of the session.
*
*
* @param name
* The name of the session.
*/
public void setName(String name) {
this.name = name;
}
/**
*
* The name of the session.
*
*
* @return The name of the session.
*/
public String getName() {
return this.name;
}
/**
*
* The name of the session.
*
*
* @param name
* The name of the session.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public SessionData withName(String name) {
setName(name);
return this;
}
/**
*
* The Amazon Resource Name (ARN) of the session.
*
*
* @param sessionArn
* The Amazon Resource Name (ARN) of the session.
*/
public void setSessionArn(String sessionArn) {
this.sessionArn = sessionArn;
}
/**
*
* The Amazon Resource Name (ARN) of the session.
*
*
* @return The Amazon Resource Name (ARN) of the session.
*/
public String getSessionArn() {
return this.sessionArn;
}
/**
*
* The Amazon Resource Name (ARN) of the session.
*
*
* @param sessionArn
* The Amazon Resource Name (ARN) of the session.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public SessionData withSessionArn(String sessionArn) {
setSessionArn(sessionArn);
return this;
}
/**
*
* The identifier of the session.
*
*
* @param sessionId
* The identifier of the session.
*/
public void setSessionId(String sessionId) {
this.sessionId = sessionId;
}
/**
*
* The identifier of the session.
*
*
* @return The identifier of the session.
*/
public String getSessionId() {
return this.sessionId;
}
/**
*
* The identifier of the session.
*
*
* @param sessionId
* The identifier of the session.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public SessionData withSessionId(String sessionId) {
setSessionId(sessionId);
return this;
}
/**
*
* An object that can be used to specify Tag conditions.
*
*
* @param tagFilter
* An object that can be used to specify Tag conditions.
*/
public void setTagFilter(TagFilter tagFilter) {
this.tagFilter = tagFilter;
}
/**
*
* An object that can be used to specify Tag conditions.
*
*
* @return An object that can be used to specify Tag conditions.
*/
public TagFilter getTagFilter() {
return this.tagFilter;
}
/**
*
* An object that can be used to specify Tag conditions.
*
*
* @param tagFilter
* An object that can be used to specify Tag conditions.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public SessionData withTagFilter(TagFilter tagFilter) {
setTagFilter(tagFilter);
return this;
}
/**
*
* The tags used to organize, track, or control access for this resource.
*
*
* @return The tags used to organize, track, or control access for this resource.
*/
public java.util.Map getTags() {
return tags;
}
/**
*
* The tags used to organize, track, or control access for this resource.
*
*
* @param tags
* The tags used to organize, track, or control access for this resource.
*/
public void setTags(java.util.Map tags) {
this.tags = tags;
}
/**
*
* The tags used to organize, track, or control access for this resource.
*
*
* @param tags
* The tags used to organize, track, or control access for this resource.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public SessionData withTags(java.util.Map tags) {
setTags(tags);
return this;
}
/**
* Add a single Tags entry
*
* @see SessionData#withTags
* @returns a reference to this object so that method calls can be chained together.
*/
public SessionData addTagsEntry(String key, String value) {
if (null == this.tags) {
this.tags = new java.util.HashMap();
}
if (this.tags.containsKey(key))
throw new IllegalArgumentException("Duplicated keys (" + key.toString() + ") are provided.");
this.tags.put(key, value);
return this;
}
/**
* Removes all the entries added into Tags.
*
* @return Returns a reference to this object so that method calls can be chained together.
*/
public SessionData clearTagsEntries() {
this.tags = null;
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 (getDescription() != null)
sb.append("Description: ").append(getDescription()).append(",");
if (getIntegrationConfiguration() != null)
sb.append("IntegrationConfiguration: ").append(getIntegrationConfiguration()).append(",");
if (getName() != null)
sb.append("Name: ").append(getName()).append(",");
if (getSessionArn() != null)
sb.append("SessionArn: ").append(getSessionArn()).append(",");
if (getSessionId() != null)
sb.append("SessionId: ").append(getSessionId()).append(",");
if (getTagFilter() != null)
sb.append("TagFilter: ").append(getTagFilter()).append(",");
if (getTags() != null)
sb.append("Tags: ").append(getTags());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof SessionData == false)
return false;
SessionData other = (SessionData) obj;
if (other.getDescription() == null ^ this.getDescription() == null)
return false;
if (other.getDescription() != null && other.getDescription().equals(this.getDescription()) == false)
return false;
if (other.getIntegrationConfiguration() == null ^ this.getIntegrationConfiguration() == null)
return false;
if (other.getIntegrationConfiguration() != null && other.getIntegrationConfiguration().equals(this.getIntegrationConfiguration()) == 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.getSessionArn() == null ^ this.getSessionArn() == null)
return false;
if (other.getSessionArn() != null && other.getSessionArn().equals(this.getSessionArn()) == false)
return false;
if (other.getSessionId() == null ^ this.getSessionId() == null)
return false;
if (other.getSessionId() != null && other.getSessionId().equals(this.getSessionId()) == false)
return false;
if (other.getTagFilter() == null ^ this.getTagFilter() == null)
return false;
if (other.getTagFilter() != null && other.getTagFilter().equals(this.getTagFilter()) == false)
return false;
if (other.getTags() == null ^ this.getTags() == null)
return false;
if (other.getTags() != null && other.getTags().equals(this.getTags()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getDescription() == null) ? 0 : getDescription().hashCode());
hashCode = prime * hashCode + ((getIntegrationConfiguration() == null) ? 0 : getIntegrationConfiguration().hashCode());
hashCode = prime * hashCode + ((getName() == null) ? 0 : getName().hashCode());
hashCode = prime * hashCode + ((getSessionArn() == null) ? 0 : getSessionArn().hashCode());
hashCode = prime * hashCode + ((getSessionId() == null) ? 0 : getSessionId().hashCode());
hashCode = prime * hashCode + ((getTagFilter() == null) ? 0 : getTagFilter().hashCode());
hashCode = prime * hashCode + ((getTags() == null) ? 0 : getTags().hashCode());
return hashCode;
}
@Override
public SessionData clone() {
try {
return (SessionData) 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.qconnect.model.transform.SessionDataMarshaller.getInstance().marshall(this, protocolMarshaller);
}
}