com.amazonaws.services.mediatailor.model.VodSource 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;
import com.amazonaws.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;
/**
*
* VOD source configuration parameters.
*
*
* @see AWS API
* Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class VodSource implements Serializable, Cloneable, StructuredPojo {
/**
*
* The ARN for the VOD source.
*
*/
private String arn;
/**
*
* The timestamp that indicates when the VOD source was created.
*
*/
private java.util.Date creationTime;
/**
*
* The HTTP package configurations for the VOD source.
*
*/
private java.util.List httpPackageConfigurations;
/**
*
* The timestamp that indicates when the VOD source was last modified.
*
*/
private java.util.Date lastModifiedTime;
/**
*
* The name of the source location that the VOD source is associated with.
*
*/
private String sourceLocationName;
/**
*
* The tags assigned to the VOD 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 name of the VOD source.
*
*/
private String vodSourceName;
/**
*
* The ARN for the VOD source.
*
*
* @param arn
* The ARN for the VOD source.
*/
public void setArn(String arn) {
this.arn = arn;
}
/**
*
* The ARN for the VOD source.
*
*
* @return The ARN for the VOD source.
*/
public String getArn() {
return this.arn;
}
/**
*
* The ARN for the VOD source.
*
*
* @param arn
* The ARN for the VOD source.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public VodSource withArn(String arn) {
setArn(arn);
return this;
}
/**
*
* The timestamp that indicates when the VOD source was created.
*
*
* @param creationTime
* The timestamp that indicates when the VOD source was created.
*/
public void setCreationTime(java.util.Date creationTime) {
this.creationTime = creationTime;
}
/**
*
* The timestamp that indicates when the VOD source was created.
*
*
* @return The timestamp that indicates when the VOD source was created.
*/
public java.util.Date getCreationTime() {
return this.creationTime;
}
/**
*
* The timestamp that indicates when the VOD source was created.
*
*
* @param creationTime
* The timestamp that indicates when the VOD source was created.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public VodSource withCreationTime(java.util.Date creationTime) {
setCreationTime(creationTime);
return this;
}
/**
*
* The HTTP package configurations for the VOD source.
*
*
* @return The HTTP package configurations for the VOD source.
*/
public java.util.List getHttpPackageConfigurations() {
return httpPackageConfigurations;
}
/**
*
* The HTTP package configurations for the VOD source.
*
*
* @param httpPackageConfigurations
* The HTTP package configurations for the VOD source.
*/
public void setHttpPackageConfigurations(java.util.Collection httpPackageConfigurations) {
if (httpPackageConfigurations == null) {
this.httpPackageConfigurations = null;
return;
}
this.httpPackageConfigurations = new java.util.ArrayList(httpPackageConfigurations);
}
/**
*
* The HTTP package configurations for the VOD 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
* The HTTP package configurations for the VOD source.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public VodSource withHttpPackageConfigurations(HttpPackageConfiguration... httpPackageConfigurations) {
if (this.httpPackageConfigurations == null) {
setHttpPackageConfigurations(new java.util.ArrayList(httpPackageConfigurations.length));
}
for (HttpPackageConfiguration ele : httpPackageConfigurations) {
this.httpPackageConfigurations.add(ele);
}
return this;
}
/**
*
* The HTTP package configurations for the VOD source.
*
*
* @param httpPackageConfigurations
* The HTTP package configurations for the VOD source.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public VodSource withHttpPackageConfigurations(java.util.Collection httpPackageConfigurations) {
setHttpPackageConfigurations(httpPackageConfigurations);
return this;
}
/**
*
* The timestamp that indicates when the VOD source was last modified.
*
*
* @param lastModifiedTime
* The timestamp that indicates when the VOD source was last modified.
*/
public void setLastModifiedTime(java.util.Date lastModifiedTime) {
this.lastModifiedTime = lastModifiedTime;
}
/**
*
* The timestamp that indicates when the VOD source was last modified.
*
*
* @return The timestamp that indicates when the VOD source was last modified.
*/
public java.util.Date getLastModifiedTime() {
return this.lastModifiedTime;
}
/**
*
* The timestamp that indicates when the VOD source was last modified.
*
*
* @param lastModifiedTime
* The timestamp that indicates when the VOD source was last modified.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public VodSource withLastModifiedTime(java.util.Date lastModifiedTime) {
setLastModifiedTime(lastModifiedTime);
return this;
}
/**
*
* The name of the source location that the VOD source is associated with.
*
*
* @param sourceLocationName
* The name of the source location that the VOD source is associated with.
*/
public void setSourceLocationName(String sourceLocationName) {
this.sourceLocationName = sourceLocationName;
}
/**
*
* The name of the source location that the VOD source is associated with.
*
*
* @return The name of the source location that the VOD source is associated with.
*/
public String getSourceLocationName() {
return this.sourceLocationName;
}
/**
*
* The name of the source location that the VOD source is associated with.
*
*
* @param sourceLocationName
* The name of the source location that the VOD source is associated with.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public VodSource withSourceLocationName(String sourceLocationName) {
setSourceLocationName(sourceLocationName);
return this;
}
/**
*
* The tags assigned to the VOD 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 assigned to the VOD 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 assigned to the VOD 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 assigned to the VOD 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 assigned to the VOD 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 assigned to the VOD 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 VodSource withTags(java.util.Map tags) {
setTags(tags);
return this;
}
/**
* Add a single Tags entry
*
* @see VodSource#withTags
* @returns a reference to this object so that method calls can be chained together.
*/
public VodSource 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 VodSource clearTagsEntries() {
this.tags = null;
return this;
}
/**
*
* The name of the VOD source.
*
*
* @param vodSourceName
* The name of the VOD source.
*/
public void setVodSourceName(String vodSourceName) {
this.vodSourceName = vodSourceName;
}
/**
*
* The name of the VOD source.
*
*
* @return The name of the VOD source.
*/
public String getVodSourceName() {
return this.vodSourceName;
}
/**
*
* The name of the VOD source.
*
*
* @param vodSourceName
* The name of the VOD source.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public VodSource withVodSourceName(String vodSourceName) {
setVodSourceName(vodSourceName);
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 (getSourceLocationName() != null)
sb.append("SourceLocationName: ").append(getSourceLocationName()).append(",");
if (getTags() != null)
sb.append("Tags: ").append(getTags()).append(",");
if (getVodSourceName() != null)
sb.append("VodSourceName: ").append(getVodSourceName());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof VodSource == false)
return false;
VodSource other = (VodSource) 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.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;
if (other.getVodSourceName() == null ^ this.getVodSourceName() == null)
return false;
if (other.getVodSourceName() != null && other.getVodSourceName().equals(this.getVodSourceName()) == 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 + ((getSourceLocationName() == null) ? 0 : getSourceLocationName().hashCode());
hashCode = prime * hashCode + ((getTags() == null) ? 0 : getTags().hashCode());
hashCode = prime * hashCode + ((getVodSourceName() == null) ? 0 : getVodSourceName().hashCode());
return hashCode;
}
@Override
public VodSource clone() {
try {
return (VodSource) 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.mediatailor.model.transform.VodSourceMarshaller.getInstance().marshall(this, protocolMarshaller);
}
}