com.amazonaws.services.mediatailor.model.CreateLiveSourceResult Maven / Gradle / Ivy
Show all versions of aws-java-sdk-mediatailor 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.mediatailor.model;
import java.io.Serializable;
import javax.annotation.Generated;
/**
*
* @see AWS API
* Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class CreateLiveSourceResult extends com.amazonaws.AmazonWebServiceResult implements Serializable, Cloneable {
/**
*
* The ARN to assign to the live source.
*
*/
private String arn;
/**
*
* The time the live source was created.
*
*/
private java.util.Date creationTime;
/**
*
* A list of HTTP package configuration parameters for this live source.
*
*/
private java.util.List httpPackageConfigurations;
/**
*
* The time the live source was last modified.
*
*/
private java.util.Date lastModifiedTime;
/**
*
* The name to assign to the live source.
*
*/
private String liveSourceName;
/**
*
* The name to assign to the source location of the live source.
*
*/
private String sourceLocationName;
/**
*
* The tags to assign to the live source. Tags are key-value pairs that you can associate with Amazon resources to
* help with organization, access control, and cost tracking. For more information, see Tagging AWS Elemental MediaTailor
* Resources.
*
*/
private java.util.Map tags;
/**
*
* The ARN to assign to the live source.
*
*
* @param arn
* The ARN to assign to the live source.
*/
public void setArn(String arn) {
this.arn = arn;
}
/**
*
* The ARN to assign to the live source.
*
*
* @return The ARN to assign to the live source.
*/
public String getArn() {
return this.arn;
}
/**
*
* The ARN to assign to the live source.
*
*
* @param arn
* The ARN to assign to the live source.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateLiveSourceResult withArn(String arn) {
setArn(arn);
return this;
}
/**
*
* The time the live source was created.
*
*
* @param creationTime
* The time the live source was created.
*/
public void setCreationTime(java.util.Date creationTime) {
this.creationTime = creationTime;
}
/**
*
* The time the live source was created.
*
*
* @return The time the live source was created.
*/
public java.util.Date getCreationTime() {
return this.creationTime;
}
/**
*
* The time the live source was created.
*
*
* @param creationTime
* The time the live source was created.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateLiveSourceResult withCreationTime(java.util.Date creationTime) {
setCreationTime(creationTime);
return this;
}
/**
*
* A list of HTTP package configuration parameters for this live source.
*
*
* @return A list of HTTP package configuration parameters for this live source.
*/
public java.util.List getHttpPackageConfigurations() {
return httpPackageConfigurations;
}
/**
*
* A list of HTTP package configuration parameters for this live source.
*
*
* @param httpPackageConfigurations
* A list of HTTP package configuration parameters for this live source.
*/
public void setHttpPackageConfigurations(java.util.Collection httpPackageConfigurations) {
if (httpPackageConfigurations == null) {
this.httpPackageConfigurations = null;
return;
}
this.httpPackageConfigurations = new java.util.ArrayList(httpPackageConfigurations);
}
/**
*
* A list of HTTP package configuration parameters for this live source.
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setHttpPackageConfigurations(java.util.Collection)} or
* {@link #withHttpPackageConfigurations(java.util.Collection)} if you want to override the existing values.
*
*
* @param httpPackageConfigurations
* A list of HTTP package configuration parameters for this live source.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateLiveSourceResult withHttpPackageConfigurations(HttpPackageConfiguration... httpPackageConfigurations) {
if (this.httpPackageConfigurations == null) {
setHttpPackageConfigurations(new java.util.ArrayList(httpPackageConfigurations.length));
}
for (HttpPackageConfiguration ele : httpPackageConfigurations) {
this.httpPackageConfigurations.add(ele);
}
return this;
}
/**
*
* A list of HTTP package configuration parameters for this live source.
*
*
* @param httpPackageConfigurations
* A list of HTTP package configuration parameters for this live source.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateLiveSourceResult withHttpPackageConfigurations(java.util.Collection httpPackageConfigurations) {
setHttpPackageConfigurations(httpPackageConfigurations);
return this;
}
/**
*
* The time the live source was last modified.
*
*
* @param lastModifiedTime
* The time the live source was last modified.
*/
public void setLastModifiedTime(java.util.Date lastModifiedTime) {
this.lastModifiedTime = lastModifiedTime;
}
/**
*
* The time the live source was last modified.
*
*
* @return The time the live source was last modified.
*/
public java.util.Date getLastModifiedTime() {
return this.lastModifiedTime;
}
/**
*
* The time the live source was last modified.
*
*
* @param lastModifiedTime
* The time the live source was last modified.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateLiveSourceResult withLastModifiedTime(java.util.Date lastModifiedTime) {
setLastModifiedTime(lastModifiedTime);
return this;
}
/**
*
* The name to assign to the live source.
*
*
* @param liveSourceName
* The name to assign to the live source.
*/
public void setLiveSourceName(String liveSourceName) {
this.liveSourceName = liveSourceName;
}
/**
*
* The name to assign to the live source.
*
*
* @return The name to assign to the live source.
*/
public String getLiveSourceName() {
return this.liveSourceName;
}
/**
*
* The name to assign to the live source.
*
*
* @param liveSourceName
* The name to assign to the live source.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateLiveSourceResult withLiveSourceName(String liveSourceName) {
setLiveSourceName(liveSourceName);
return this;
}
/**
*
* The name to assign to the source location of the live source.
*
*
* @param sourceLocationName
* The name to assign to the source location of the live source.
*/
public void setSourceLocationName(String sourceLocationName) {
this.sourceLocationName = sourceLocationName;
}
/**
*
* The name to assign to the source location of the live source.
*
*
* @return The name to assign to the source location of the live source.
*/
public String getSourceLocationName() {
return this.sourceLocationName;
}
/**
*
* The name to assign to the source location of the live source.
*
*
* @param sourceLocationName
* The name to assign to the source location of the live source.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateLiveSourceResult withSourceLocationName(String sourceLocationName) {
setSourceLocationName(sourceLocationName);
return this;
}
/**
*
* The tags to assign to the live source. Tags are key-value pairs that you can associate with Amazon resources to
* help with organization, access control, and cost tracking. For more information, see Tagging AWS Elemental MediaTailor
* Resources.
*
*
* @return The tags to assign to the live source. Tags are key-value pairs that you can associate with Amazon
* resources to help with organization, access control, and cost tracking. For more information, see Tagging AWS Elemental MediaTailor
* Resources.
*/
public java.util.Map getTags() {
return tags;
}
/**
*
* The tags to assign to the live source. Tags are key-value pairs that you can associate with Amazon resources to
* help with organization, access control, and cost tracking. For more information, see Tagging AWS Elemental MediaTailor
* Resources.
*
*
* @param tags
* The tags to assign to the live source. Tags are key-value pairs that you can associate with Amazon
* resources to help with organization, access control, and cost tracking. For more information, see Tagging AWS Elemental MediaTailor
* Resources.
*/
public void setTags(java.util.Map tags) {
this.tags = tags;
}
/**
*
* The tags to assign to the live source. Tags are key-value pairs that you can associate with Amazon resources to
* help with organization, access control, and cost tracking. For more information, see Tagging AWS Elemental MediaTailor
* Resources.
*
*
* @param tags
* The tags to assign to the live source. Tags are key-value pairs that you can associate with Amazon
* resources to help with organization, access control, and cost tracking. For more information, see Tagging AWS Elemental MediaTailor
* Resources.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateLiveSourceResult withTags(java.util.Map tags) {
setTags(tags);
return this;
}
/**
* Add a single Tags entry
*
* @see CreateLiveSourceResult#withTags
* @returns a reference to this object so that method calls can be chained together.
*/
public CreateLiveSourceResult 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 CreateLiveSourceResult 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 (getArn() != null)
sb.append("Arn: ").append(getArn()).append(",");
if (getCreationTime() != null)
sb.append("CreationTime: ").append(getCreationTime()).append(",");
if (getHttpPackageConfigurations() != null)
sb.append("HttpPackageConfigurations: ").append(getHttpPackageConfigurations()).append(",");
if (getLastModifiedTime() != null)
sb.append("LastModifiedTime: ").append(getLastModifiedTime()).append(",");
if (getLiveSourceName() != null)
sb.append("LiveSourceName: ").append(getLiveSourceName()).append(",");
if (getSourceLocationName() != null)
sb.append("SourceLocationName: ").append(getSourceLocationName()).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 CreateLiveSourceResult == false)
return false;
CreateLiveSourceResult other = (CreateLiveSourceResult) obj;
if (other.getArn() == null ^ this.getArn() == null)
return false;
if (other.getArn() != null && other.getArn().equals(this.getArn()) == false)
return false;
if (other.getCreationTime() == null ^ this.getCreationTime() == null)
return false;
if (other.getCreationTime() != null && other.getCreationTime().equals(this.getCreationTime()) == false)
return false;
if (other.getHttpPackageConfigurations() == null ^ this.getHttpPackageConfigurations() == null)
return false;
if (other.getHttpPackageConfigurations() != null && other.getHttpPackageConfigurations().equals(this.getHttpPackageConfigurations()) == false)
return false;
if (other.getLastModifiedTime() == null ^ this.getLastModifiedTime() == null)
return false;
if (other.getLastModifiedTime() != null && other.getLastModifiedTime().equals(this.getLastModifiedTime()) == false)
return false;
if (other.getLiveSourceName() == null ^ this.getLiveSourceName() == null)
return false;
if (other.getLiveSourceName() != null && other.getLiveSourceName().equals(this.getLiveSourceName()) == false)
return false;
if (other.getSourceLocationName() == null ^ this.getSourceLocationName() == null)
return false;
if (other.getSourceLocationName() != null && other.getSourceLocationName().equals(this.getSourceLocationName()) == 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 + ((getArn() == null) ? 0 : getArn().hashCode());
hashCode = prime * hashCode + ((getCreationTime() == null) ? 0 : getCreationTime().hashCode());
hashCode = prime * hashCode + ((getHttpPackageConfigurations() == null) ? 0 : getHttpPackageConfigurations().hashCode());
hashCode = prime * hashCode + ((getLastModifiedTime() == null) ? 0 : getLastModifiedTime().hashCode());
hashCode = prime * hashCode + ((getLiveSourceName() == null) ? 0 : getLiveSourceName().hashCode());
hashCode = prime * hashCode + ((getSourceLocationName() == null) ? 0 : getSourceLocationName().hashCode());
hashCode = prime * hashCode + ((getTags() == null) ? 0 : getTags().hashCode());
return hashCode;
}
@Override
public CreateLiveSourceResult clone() {
try {
return (CreateLiveSourceResult) super.clone();
} catch (CloneNotSupportedException e) {
throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e);
}
}
}