com.amazonaws.services.mediatailor.model.CreateLiveSourceRequest 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.AmazonWebServiceRequest;
/**
*
* @see AWS API
* Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class CreateLiveSourceRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable {
/**
*
* A list of HTTP package configuration parameters for this live source.
*
*/
private java.util.List httpPackageConfigurations;
/**
*
* The name of the live source.
*
*/
private String liveSourceName;
/**
*
* The name of the source location.
*
*/
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;
/**
*
* 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 CreateLiveSourceRequest 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 CreateLiveSourceRequest withHttpPackageConfigurations(java.util.Collection httpPackageConfigurations) {
setHttpPackageConfigurations(httpPackageConfigurations);
return this;
}
/**
*
* The name of the live source.
*
*
* @param liveSourceName
* The name of the live source.
*/
public void setLiveSourceName(String liveSourceName) {
this.liveSourceName = liveSourceName;
}
/**
*
* The name of the live source.
*
*
* @return The name of the live source.
*/
public String getLiveSourceName() {
return this.liveSourceName;
}
/**
*
* The name of the live source.
*
*
* @param liveSourceName
* The name of the live source.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateLiveSourceRequest withLiveSourceName(String liveSourceName) {
setLiveSourceName(liveSourceName);
return this;
}
/**
*
* The name of the source location.
*
*
* @param sourceLocationName
* The name of the source location.
*/
public void setSourceLocationName(String sourceLocationName) {
this.sourceLocationName = sourceLocationName;
}
/**
*
* The name of the source location.
*
*
* @return The name of the source location.
*/
public String getSourceLocationName() {
return this.sourceLocationName;
}
/**
*
* The name of the source location.
*
*
* @param sourceLocationName
* The name of the source location.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateLiveSourceRequest 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 CreateLiveSourceRequest withTags(java.util.Map tags) {
setTags(tags);
return this;
}
/**
* Add a single Tags entry
*
* @see CreateLiveSourceRequest#withTags
* @returns a reference to this object so that method calls can be chained together.
*/
public CreateLiveSourceRequest 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 CreateLiveSourceRequest 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 (getHttpPackageConfigurations() != null)
sb.append("HttpPackageConfigurations: ").append(getHttpPackageConfigurations()).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 CreateLiveSourceRequest == false)
return false;
CreateLiveSourceRequest other = (CreateLiveSourceRequest) obj;
if (other.getHttpPackageConfigurations() == null ^ this.getHttpPackageConfigurations() == null)
return false;
if (other.getHttpPackageConfigurations() != null && other.getHttpPackageConfigurations().equals(this.getHttpPackageConfigurations()) == 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 + ((getHttpPackageConfigurations() == null) ? 0 : getHttpPackageConfigurations().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 CreateLiveSourceRequest clone() {
return (CreateLiveSourceRequest) super.clone();
}
}