
com.amazonaws.services.nimblestudio.model.CreateStreamingSessionRequest Maven / Gradle / Ivy
/*
* Copyright 2016-2021 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.nimblestudio.model;
import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.AmazonWebServiceRequest;
/**
*
*
* @see AWS API
* Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class CreateStreamingSessionRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable {
/**
*
* Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If you don’t specify
* a client token, the AWS SDK automatically generates a client token and uses it for the request to ensure
* idempotency.
*
*/
private String clientToken;
/**
*
* The EC2 Instance type used for the streaming session.
*
*/
private String ec2InstanceType;
/**
*
* The launch profile ID.
*
*/
private String launchProfileId;
/**
*
* The user ID of the user that owns the streaming session.
*
*/
private String ownedBy;
/**
*
* The ID of the streaming image.
*
*/
private String streamingImageId;
/**
*
* The studio ID.
*
*/
private String studioId;
/**
*
* A collection of labels, in the form of key:value pairs, that apply to this resource.
*
*/
private java.util.Map tags;
/**
*
* Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If you don’t specify
* a client token, the AWS SDK automatically generates a client token and uses it for the request to ensure
* idempotency.
*
*
* @param clientToken
* Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If you don’t
* specify a client token, the AWS SDK automatically generates a client token and uses it for the request to
* ensure idempotency.
*/
public void setClientToken(String clientToken) {
this.clientToken = clientToken;
}
/**
*
* Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If you don’t specify
* a client token, the AWS SDK automatically generates a client token and uses it for the request to ensure
* idempotency.
*
*
* @return Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If you don’t
* specify a client token, the AWS SDK automatically generates a client token and uses it for the request to
* ensure idempotency.
*/
public String getClientToken() {
return this.clientToken;
}
/**
*
* Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If you don’t specify
* a client token, the AWS SDK automatically generates a client token and uses it for the request to ensure
* idempotency.
*
*
* @param clientToken
* Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If you don’t
* specify a client token, the AWS SDK automatically generates a client token and uses it for the request to
* ensure idempotency.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateStreamingSessionRequest withClientToken(String clientToken) {
setClientToken(clientToken);
return this;
}
/**
*
* The EC2 Instance type used for the streaming session.
*
*
* @param ec2InstanceType
* The EC2 Instance type used for the streaming session.
* @see StreamingInstanceType
*/
public void setEc2InstanceType(String ec2InstanceType) {
this.ec2InstanceType = ec2InstanceType;
}
/**
*
* The EC2 Instance type used for the streaming session.
*
*
* @return The EC2 Instance type used for the streaming session.
* @see StreamingInstanceType
*/
public String getEc2InstanceType() {
return this.ec2InstanceType;
}
/**
*
* The EC2 Instance type used for the streaming session.
*
*
* @param ec2InstanceType
* The EC2 Instance type used for the streaming session.
* @return Returns a reference to this object so that method calls can be chained together.
* @see StreamingInstanceType
*/
public CreateStreamingSessionRequest withEc2InstanceType(String ec2InstanceType) {
setEc2InstanceType(ec2InstanceType);
return this;
}
/**
*
* The EC2 Instance type used for the streaming session.
*
*
* @param ec2InstanceType
* The EC2 Instance type used for the streaming session.
* @return Returns a reference to this object so that method calls can be chained together.
* @see StreamingInstanceType
*/
public CreateStreamingSessionRequest withEc2InstanceType(StreamingInstanceType ec2InstanceType) {
this.ec2InstanceType = ec2InstanceType.toString();
return this;
}
/**
*
* The launch profile ID.
*
*
* @param launchProfileId
* The launch profile ID.
*/
public void setLaunchProfileId(String launchProfileId) {
this.launchProfileId = launchProfileId;
}
/**
*
* The launch profile ID.
*
*
* @return The launch profile ID.
*/
public String getLaunchProfileId() {
return this.launchProfileId;
}
/**
*
* The launch profile ID.
*
*
* @param launchProfileId
* The launch profile ID.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateStreamingSessionRequest withLaunchProfileId(String launchProfileId) {
setLaunchProfileId(launchProfileId);
return this;
}
/**
*
* The user ID of the user that owns the streaming session.
*
*
* @param ownedBy
* The user ID of the user that owns the streaming session.
*/
public void setOwnedBy(String ownedBy) {
this.ownedBy = ownedBy;
}
/**
*
* The user ID of the user that owns the streaming session.
*
*
* @return The user ID of the user that owns the streaming session.
*/
public String getOwnedBy() {
return this.ownedBy;
}
/**
*
* The user ID of the user that owns the streaming session.
*
*
* @param ownedBy
* The user ID of the user that owns the streaming session.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateStreamingSessionRequest withOwnedBy(String ownedBy) {
setOwnedBy(ownedBy);
return this;
}
/**
*
* The ID of the streaming image.
*
*
* @param streamingImageId
* The ID of the streaming image.
*/
public void setStreamingImageId(String streamingImageId) {
this.streamingImageId = streamingImageId;
}
/**
*
* The ID of the streaming image.
*
*
* @return The ID of the streaming image.
*/
public String getStreamingImageId() {
return this.streamingImageId;
}
/**
*
* The ID of the streaming image.
*
*
* @param streamingImageId
* The ID of the streaming image.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateStreamingSessionRequest withStreamingImageId(String streamingImageId) {
setStreamingImageId(streamingImageId);
return this;
}
/**
*
* The studio ID.
*
*
* @param studioId
* The studio ID.
*/
public void setStudioId(String studioId) {
this.studioId = studioId;
}
/**
*
* The studio ID.
*
*
* @return The studio ID.
*/
public String getStudioId() {
return this.studioId;
}
/**
*
* The studio ID.
*
*
* @param studioId
* The studio ID.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateStreamingSessionRequest withStudioId(String studioId) {
setStudioId(studioId);
return this;
}
/**
*
* A collection of labels, in the form of key:value pairs, that apply to this resource.
*
*
* @return A collection of labels, in the form of key:value pairs, that apply to this resource.
*/
public java.util.Map getTags() {
return tags;
}
/**
*
* A collection of labels, in the form of key:value pairs, that apply to this resource.
*
*
* @param tags
* A collection of labels, in the form of key:value pairs, that apply to this resource.
*/
public void setTags(java.util.Map tags) {
this.tags = tags;
}
/**
*
* A collection of labels, in the form of key:value pairs, that apply to this resource.
*
*
* @param tags
* A collection of labels, in the form of key:value pairs, that apply to this resource.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateStreamingSessionRequest withTags(java.util.Map tags) {
setTags(tags);
return this;
}
/**
* Add a single Tags entry
*
* @see CreateStreamingSessionRequest#withTags
* @returns a reference to this object so that method calls can be chained together.
*/
public CreateStreamingSessionRequest 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 CreateStreamingSessionRequest 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 (getClientToken() != null)
sb.append("ClientToken: ").append(getClientToken()).append(",");
if (getEc2InstanceType() != null)
sb.append("Ec2InstanceType: ").append(getEc2InstanceType()).append(",");
if (getLaunchProfileId() != null)
sb.append("LaunchProfileId: ").append(getLaunchProfileId()).append(",");
if (getOwnedBy() != null)
sb.append("OwnedBy: ").append(getOwnedBy()).append(",");
if (getStreamingImageId() != null)
sb.append("StreamingImageId: ").append(getStreamingImageId()).append(",");
if (getStudioId() != null)
sb.append("StudioId: ").append(getStudioId()).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 CreateStreamingSessionRequest == false)
return false;
CreateStreamingSessionRequest other = (CreateStreamingSessionRequest) obj;
if (other.getClientToken() == null ^ this.getClientToken() == null)
return false;
if (other.getClientToken() != null && other.getClientToken().equals(this.getClientToken()) == false)
return false;
if (other.getEc2InstanceType() == null ^ this.getEc2InstanceType() == null)
return false;
if (other.getEc2InstanceType() != null && other.getEc2InstanceType().equals(this.getEc2InstanceType()) == false)
return false;
if (other.getLaunchProfileId() == null ^ this.getLaunchProfileId() == null)
return false;
if (other.getLaunchProfileId() != null && other.getLaunchProfileId().equals(this.getLaunchProfileId()) == false)
return false;
if (other.getOwnedBy() == null ^ this.getOwnedBy() == null)
return false;
if (other.getOwnedBy() != null && other.getOwnedBy().equals(this.getOwnedBy()) == false)
return false;
if (other.getStreamingImageId() == null ^ this.getStreamingImageId() == null)
return false;
if (other.getStreamingImageId() != null && other.getStreamingImageId().equals(this.getStreamingImageId()) == false)
return false;
if (other.getStudioId() == null ^ this.getStudioId() == null)
return false;
if (other.getStudioId() != null && other.getStudioId().equals(this.getStudioId()) == 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 + ((getClientToken() == null) ? 0 : getClientToken().hashCode());
hashCode = prime * hashCode + ((getEc2InstanceType() == null) ? 0 : getEc2InstanceType().hashCode());
hashCode = prime * hashCode + ((getLaunchProfileId() == null) ? 0 : getLaunchProfileId().hashCode());
hashCode = prime * hashCode + ((getOwnedBy() == null) ? 0 : getOwnedBy().hashCode());
hashCode = prime * hashCode + ((getStreamingImageId() == null) ? 0 : getStreamingImageId().hashCode());
hashCode = prime * hashCode + ((getStudioId() == null) ? 0 : getStudioId().hashCode());
hashCode = prime * hashCode + ((getTags() == null) ? 0 : getTags().hashCode());
return hashCode;
}
@Override
public CreateStreamingSessionRequest clone() {
return (CreateStreamingSessionRequest) super.clone();
}
}