com.amazonaws.services.mediatailor.model.CreateSourceLocationResult 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 CreateSourceLocationResult extends com.amazonaws.AmazonWebServiceResult implements Serializable, Cloneable {
/**
*
* Access configuration parameters. Configures the type of authentication used to access content from your source
* location.
*
*/
private AccessConfiguration accessConfiguration;
/**
*
* The ARN to assign to the source location.
*
*/
private String arn;
/**
*
* The time the source location was created.
*
*/
private java.util.Date creationTime;
/**
*
* The optional configuration for the server that serves segments.
*
*/
private DefaultSegmentDeliveryConfiguration defaultSegmentDeliveryConfiguration;
/**
*
* The source's HTTP package configurations.
*
*/
private HttpConfiguration httpConfiguration;
/**
*
* The time the source location was last modified.
*
*/
private java.util.Date lastModifiedTime;
/**
*
* The segment delivery configurations for the source location. For information about MediaTailor configurations,
* see Working with configurations
* in AWS Elemental MediaTailor.
*
*/
private java.util.List segmentDeliveryConfigurations;
/**
*
* The name to assign to the source location.
*
*/
private String sourceLocationName;
/**
*
* The tags to assign to the source location. 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;
/**
*
* Access configuration parameters. Configures the type of authentication used to access content from your source
* location.
*
*
* @param accessConfiguration
* Access configuration parameters. Configures the type of authentication used to access content from your
* source location.
*/
public void setAccessConfiguration(AccessConfiguration accessConfiguration) {
this.accessConfiguration = accessConfiguration;
}
/**
*
* Access configuration parameters. Configures the type of authentication used to access content from your source
* location.
*
*
* @return Access configuration parameters. Configures the type of authentication used to access content from your
* source location.
*/
public AccessConfiguration getAccessConfiguration() {
return this.accessConfiguration;
}
/**
*
* Access configuration parameters. Configures the type of authentication used to access content from your source
* location.
*
*
* @param accessConfiguration
* Access configuration parameters. Configures the type of authentication used to access content from your
* source location.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateSourceLocationResult withAccessConfiguration(AccessConfiguration accessConfiguration) {
setAccessConfiguration(accessConfiguration);
return this;
}
/**
*
* The ARN to assign to the source location.
*
*
* @param arn
* The ARN to assign to the source location.
*/
public void setArn(String arn) {
this.arn = arn;
}
/**
*
* The ARN to assign to the source location.
*
*
* @return The ARN to assign to the source location.
*/
public String getArn() {
return this.arn;
}
/**
*
* The ARN to assign to the source location.
*
*
* @param arn
* The ARN to assign to the source location.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateSourceLocationResult withArn(String arn) {
setArn(arn);
return this;
}
/**
*
* The time the source location was created.
*
*
* @param creationTime
* The time the source location was created.
*/
public void setCreationTime(java.util.Date creationTime) {
this.creationTime = creationTime;
}
/**
*
* The time the source location was created.
*
*
* @return The time the source location was created.
*/
public java.util.Date getCreationTime() {
return this.creationTime;
}
/**
*
* The time the source location was created.
*
*
* @param creationTime
* The time the source location was created.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateSourceLocationResult withCreationTime(java.util.Date creationTime) {
setCreationTime(creationTime);
return this;
}
/**
*
* The optional configuration for the server that serves segments.
*
*
* @param defaultSegmentDeliveryConfiguration
* The optional configuration for the server that serves segments.
*/
public void setDefaultSegmentDeliveryConfiguration(DefaultSegmentDeliveryConfiguration defaultSegmentDeliveryConfiguration) {
this.defaultSegmentDeliveryConfiguration = defaultSegmentDeliveryConfiguration;
}
/**
*
* The optional configuration for the server that serves segments.
*
*
* @return The optional configuration for the server that serves segments.
*/
public DefaultSegmentDeliveryConfiguration getDefaultSegmentDeliveryConfiguration() {
return this.defaultSegmentDeliveryConfiguration;
}
/**
*
* The optional configuration for the server that serves segments.
*
*
* @param defaultSegmentDeliveryConfiguration
* The optional configuration for the server that serves segments.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateSourceLocationResult withDefaultSegmentDeliveryConfiguration(DefaultSegmentDeliveryConfiguration defaultSegmentDeliveryConfiguration) {
setDefaultSegmentDeliveryConfiguration(defaultSegmentDeliveryConfiguration);
return this;
}
/**
*
* The source's HTTP package configurations.
*
*
* @param httpConfiguration
* The source's HTTP package configurations.
*/
public void setHttpConfiguration(HttpConfiguration httpConfiguration) {
this.httpConfiguration = httpConfiguration;
}
/**
*
* The source's HTTP package configurations.
*
*
* @return The source's HTTP package configurations.
*/
public HttpConfiguration getHttpConfiguration() {
return this.httpConfiguration;
}
/**
*
* The source's HTTP package configurations.
*
*
* @param httpConfiguration
* The source's HTTP package configurations.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateSourceLocationResult withHttpConfiguration(HttpConfiguration httpConfiguration) {
setHttpConfiguration(httpConfiguration);
return this;
}
/**
*
* The time the source location was last modified.
*
*
* @param lastModifiedTime
* The time the source location was last modified.
*/
public void setLastModifiedTime(java.util.Date lastModifiedTime) {
this.lastModifiedTime = lastModifiedTime;
}
/**
*
* The time the source location was last modified.
*
*
* @return The time the source location was last modified.
*/
public java.util.Date getLastModifiedTime() {
return this.lastModifiedTime;
}
/**
*
* The time the source location was last modified.
*
*
* @param lastModifiedTime
* The time the source location was last modified.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateSourceLocationResult withLastModifiedTime(java.util.Date lastModifiedTime) {
setLastModifiedTime(lastModifiedTime);
return this;
}
/**
*
* The segment delivery configurations for the source location. For information about MediaTailor configurations,
* see Working with configurations
* in AWS Elemental MediaTailor.
*
*
* @return The segment delivery configurations for the source location. For information about MediaTailor
* configurations, see Working with configurations
* in AWS Elemental MediaTailor.
*/
public java.util.List getSegmentDeliveryConfigurations() {
return segmentDeliveryConfigurations;
}
/**
*
* The segment delivery configurations for the source location. For information about MediaTailor configurations,
* see Working with configurations
* in AWS Elemental MediaTailor.
*
*
* @param segmentDeliveryConfigurations
* The segment delivery configurations for the source location. For information about MediaTailor
* configurations, see Working with configurations
* in AWS Elemental MediaTailor.
*/
public void setSegmentDeliveryConfigurations(java.util.Collection segmentDeliveryConfigurations) {
if (segmentDeliveryConfigurations == null) {
this.segmentDeliveryConfigurations = null;
return;
}
this.segmentDeliveryConfigurations = new java.util.ArrayList(segmentDeliveryConfigurations);
}
/**
*
* The segment delivery configurations for the source location. For information about MediaTailor configurations,
* see Working with configurations
* in AWS Elemental MediaTailor.
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setSegmentDeliveryConfigurations(java.util.Collection)} or
* {@link #withSegmentDeliveryConfigurations(java.util.Collection)} if you want to override the existing values.
*
*
* @param segmentDeliveryConfigurations
* The segment delivery configurations for the source location. For information about MediaTailor
* configurations, see Working with configurations
* in AWS Elemental MediaTailor.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateSourceLocationResult withSegmentDeliveryConfigurations(SegmentDeliveryConfiguration... segmentDeliveryConfigurations) {
if (this.segmentDeliveryConfigurations == null) {
setSegmentDeliveryConfigurations(new java.util.ArrayList(segmentDeliveryConfigurations.length));
}
for (SegmentDeliveryConfiguration ele : segmentDeliveryConfigurations) {
this.segmentDeliveryConfigurations.add(ele);
}
return this;
}
/**
*
* The segment delivery configurations for the source location. For information about MediaTailor configurations,
* see Working with configurations
* in AWS Elemental MediaTailor.
*
*
* @param segmentDeliveryConfigurations
* The segment delivery configurations for the source location. For information about MediaTailor
* configurations, see Working with configurations
* in AWS Elemental MediaTailor.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateSourceLocationResult withSegmentDeliveryConfigurations(java.util.Collection segmentDeliveryConfigurations) {
setSegmentDeliveryConfigurations(segmentDeliveryConfigurations);
return this;
}
/**
*
* The name to assign to the source location.
*
*
* @param sourceLocationName
* The name to assign to the source location.
*/
public void setSourceLocationName(String sourceLocationName) {
this.sourceLocationName = sourceLocationName;
}
/**
*
* The name to assign to the source location.
*
*
* @return The name to assign to the source location.
*/
public String getSourceLocationName() {
return this.sourceLocationName;
}
/**
*
* The name to assign to the source location.
*
*
* @param sourceLocationName
* The name to assign to the source location.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateSourceLocationResult withSourceLocationName(String sourceLocationName) {
setSourceLocationName(sourceLocationName);
return this;
}
/**
*
* The tags to assign to the source location. 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 source location. 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 source location. 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 source location. 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 source location. 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 source location. 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 CreateSourceLocationResult withTags(java.util.Map tags) {
setTags(tags);
return this;
}
/**
* Add a single Tags entry
*
* @see CreateSourceLocationResult#withTags
* @returns a reference to this object so that method calls can be chained together.
*/
public CreateSourceLocationResult 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 CreateSourceLocationResult 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 (getAccessConfiguration() != null)
sb.append("AccessConfiguration: ").append(getAccessConfiguration()).append(",");
if (getArn() != null)
sb.append("Arn: ").append(getArn()).append(",");
if (getCreationTime() != null)
sb.append("CreationTime: ").append(getCreationTime()).append(",");
if (getDefaultSegmentDeliveryConfiguration() != null)
sb.append("DefaultSegmentDeliveryConfiguration: ").append(getDefaultSegmentDeliveryConfiguration()).append(",");
if (getHttpConfiguration() != null)
sb.append("HttpConfiguration: ").append(getHttpConfiguration()).append(",");
if (getLastModifiedTime() != null)
sb.append("LastModifiedTime: ").append(getLastModifiedTime()).append(",");
if (getSegmentDeliveryConfigurations() != null)
sb.append("SegmentDeliveryConfigurations: ").append(getSegmentDeliveryConfigurations()).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 CreateSourceLocationResult == false)
return false;
CreateSourceLocationResult other = (CreateSourceLocationResult) obj;
if (other.getAccessConfiguration() == null ^ this.getAccessConfiguration() == null)
return false;
if (other.getAccessConfiguration() != null && other.getAccessConfiguration().equals(this.getAccessConfiguration()) == false)
return false;
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.getDefaultSegmentDeliveryConfiguration() == null ^ this.getDefaultSegmentDeliveryConfiguration() == null)
return false;
if (other.getDefaultSegmentDeliveryConfiguration() != null
&& other.getDefaultSegmentDeliveryConfiguration().equals(this.getDefaultSegmentDeliveryConfiguration()) == false)
return false;
if (other.getHttpConfiguration() == null ^ this.getHttpConfiguration() == null)
return false;
if (other.getHttpConfiguration() != null && other.getHttpConfiguration().equals(this.getHttpConfiguration()) == 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.getSegmentDeliveryConfigurations() == null ^ this.getSegmentDeliveryConfigurations() == null)
return false;
if (other.getSegmentDeliveryConfigurations() != null
&& other.getSegmentDeliveryConfigurations().equals(this.getSegmentDeliveryConfigurations()) == 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 + ((getAccessConfiguration() == null) ? 0 : getAccessConfiguration().hashCode());
hashCode = prime * hashCode + ((getArn() == null) ? 0 : getArn().hashCode());
hashCode = prime * hashCode + ((getCreationTime() == null) ? 0 : getCreationTime().hashCode());
hashCode = prime * hashCode + ((getDefaultSegmentDeliveryConfiguration() == null) ? 0 : getDefaultSegmentDeliveryConfiguration().hashCode());
hashCode = prime * hashCode + ((getHttpConfiguration() == null) ? 0 : getHttpConfiguration().hashCode());
hashCode = prime * hashCode + ((getLastModifiedTime() == null) ? 0 : getLastModifiedTime().hashCode());
hashCode = prime * hashCode + ((getSegmentDeliveryConfigurations() == null) ? 0 : getSegmentDeliveryConfigurations().hashCode());
hashCode = prime * hashCode + ((getSourceLocationName() == null) ? 0 : getSourceLocationName().hashCode());
hashCode = prime * hashCode + ((getTags() == null) ? 0 : getTags().hashCode());
return hashCode;
}
@Override
public CreateSourceLocationResult clone() {
try {
return (CreateSourceLocationResult) super.clone();
} catch (CloneNotSupportedException e) {
throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e);
}
}
}