All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.amazonaws.services.elastictranscoder.model.JobAlbumArt Maven / Gradle / Ivy

Go to download

The AWS Java SDK for Amazon Elastic Transcoder module holds the client classes that are used for communicating with Amazon Elastic Transcoder Service

There is a newer version: 1.9.35
Show newest version
/*
 * Copyright 2010-2016 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.elastictranscoder.model;

import java.io.Serializable;

/**
 * 

* The .jpg or .png file associated with an audio file. *

*/ public class JobAlbumArt implements Serializable, Cloneable { /** *

* A policy that determines how Elastic Transcoder will handle the existence * of multiple album artwork files. *

*

*

    *
  • Replace: The specified album art will replace any * existing album art.
  • *
  • Prepend: The specified album art will be placed in front * of any existing album art.
  • *
  • Append: The specified album art will be placed after any * existing album art.
  • *
  • Fallback: If the original input file contains artwork, * Elastic Transcoder will use that artwork for the output. If the original * input does not contain artwork, Elastic Transcoder will use the specified * album art file.
  • *
*

*/ private String mergePolicy; /** *

* The file to be used as album art. There can be multiple artworks * associated with an audio file, to a maximum of 20. Valid formats are * .jpg and .png *

*/ private com.amazonaws.internal.SdkInternalList artwork; /** *

* A policy that determines how Elastic Transcoder will handle the existence * of multiple album artwork files. *

*

*

    *
  • Replace: The specified album art will replace any * existing album art.
  • *
  • Prepend: The specified album art will be placed in front * of any existing album art.
  • *
  • Append: The specified album art will be placed after any * existing album art.
  • *
  • Fallback: If the original input file contains artwork, * Elastic Transcoder will use that artwork for the output. If the original * input does not contain artwork, Elastic Transcoder will use the specified * album art file.
  • *
*

* * @param mergePolicy * A policy that determines how Elastic Transcoder will handle the * existence of multiple album artwork files.

*

*

    *
  • Replace: The specified album art will replace any * existing album art.
  • *
  • Prepend: The specified album art will be placed * in front of any existing album art.
  • *
  • Append: The specified album art will be placed * after any existing album art.
  • *
  • Fallback: If the original input file contains * artwork, Elastic Transcoder will use that artwork for the output. * If the original input does not contain artwork, Elastic Transcoder * will use the specified album art file.
  • *
*/ public void setMergePolicy(String mergePolicy) { this.mergePolicy = mergePolicy; } /** *

* A policy that determines how Elastic Transcoder will handle the existence * of multiple album artwork files. *

*

*

    *
  • Replace: The specified album art will replace any * existing album art.
  • *
  • Prepend: The specified album art will be placed in front * of any existing album art.
  • *
  • Append: The specified album art will be placed after any * existing album art.
  • *
  • Fallback: If the original input file contains artwork, * Elastic Transcoder will use that artwork for the output. If the original * input does not contain artwork, Elastic Transcoder will use the specified * album art file.
  • *
*

* * @return A policy that determines how Elastic Transcoder will handle the * existence of multiple album artwork files.

*

*

    *
  • Replace: The specified album art will replace * any existing album art.
  • *
  • Prepend: The specified album art will be placed * in front of any existing album art.
  • *
  • Append: The specified album art will be placed * after any existing album art.
  • *
  • Fallback: If the original input file contains * artwork, Elastic Transcoder will use that artwork for the output. * If the original input does not contain artwork, Elastic * Transcoder will use the specified album art file.
  • *
*/ public String getMergePolicy() { return this.mergePolicy; } /** *

* A policy that determines how Elastic Transcoder will handle the existence * of multiple album artwork files. *

*

*

    *
  • Replace: The specified album art will replace any * existing album art.
  • *
  • Prepend: The specified album art will be placed in front * of any existing album art.
  • *
  • Append: The specified album art will be placed after any * existing album art.
  • *
  • Fallback: If the original input file contains artwork, * Elastic Transcoder will use that artwork for the output. If the original * input does not contain artwork, Elastic Transcoder will use the specified * album art file.
  • *
*

* * @param mergePolicy * A policy that determines how Elastic Transcoder will handle the * existence of multiple album artwork files.

*

*

    *
  • Replace: The specified album art will replace any * existing album art.
  • *
  • Prepend: The specified album art will be placed * in front of any existing album art.
  • *
  • Append: The specified album art will be placed * after any existing album art.
  • *
  • Fallback: If the original input file contains * artwork, Elastic Transcoder will use that artwork for the output. * If the original input does not contain artwork, Elastic Transcoder * will use the specified album art file.
  • *
* @return Returns a reference to this object so that method calls can be * chained together. */ public JobAlbumArt withMergePolicy(String mergePolicy) { setMergePolicy(mergePolicy); return this; } /** *

* The file to be used as album art. There can be multiple artworks * associated with an audio file, to a maximum of 20. Valid formats are * .jpg and .png *

* * @return The file to be used as album art. There can be multiple artworks * associated with an audio file, to a maximum of 20. Valid formats * are .jpg and .png */ public java.util.List getArtwork() { if (artwork == null) { artwork = new com.amazonaws.internal.SdkInternalList(); } return artwork; } /** *

* The file to be used as album art. There can be multiple artworks * associated with an audio file, to a maximum of 20. Valid formats are * .jpg and .png *

* * @param artwork * The file to be used as album art. There can be multiple artworks * associated with an audio file, to a maximum of 20. Valid formats * are .jpg and .png */ public void setArtwork(java.util.Collection artwork) { if (artwork == null) { this.artwork = null; return; } this.artwork = new com.amazonaws.internal.SdkInternalList( artwork); } /** *

* The file to be used as album art. There can be multiple artworks * associated with an audio file, to a maximum of 20. Valid formats are * .jpg and .png *

*

* NOTE: This method appends the values to the existing list (if * any). Use {@link #setArtwork(java.util.Collection)} or * {@link #withArtwork(java.util.Collection)} if you want to override the * existing values. *

* * @param artwork * The file to be used as album art. There can be multiple artworks * associated with an audio file, to a maximum of 20. Valid formats * are .jpg and .png * @return Returns a reference to this object so that method calls can be * chained together. */ public JobAlbumArt withArtwork(Artwork... artwork) { if (this.artwork == null) { setArtwork(new com.amazonaws.internal.SdkInternalList( artwork.length)); } for (Artwork ele : artwork) { this.artwork.add(ele); } return this; } /** *

* The file to be used as album art. There can be multiple artworks * associated with an audio file, to a maximum of 20. Valid formats are * .jpg and .png *

* * @param artwork * The file to be used as album art. There can be multiple artworks * associated with an audio file, to a maximum of 20. Valid formats * are .jpg and .png * @return Returns a reference to this object so that method calls can be * chained together. */ public JobAlbumArt withArtwork(java.util.Collection artwork) { setArtwork(artwork); return this; } /** * Returns a string representation of this object; useful for testing and * debugging. * * @return A string representation of this object. * * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getMergePolicy() != null) sb.append("MergePolicy: " + getMergePolicy() + ","); if (getArtwork() != null) sb.append("Artwork: " + getArtwork()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof JobAlbumArt == false) return false; JobAlbumArt other = (JobAlbumArt) obj; if (other.getMergePolicy() == null ^ this.getMergePolicy() == null) return false; if (other.getMergePolicy() != null && other.getMergePolicy().equals(this.getMergePolicy()) == false) return false; if (other.getArtwork() == null ^ this.getArtwork() == null) return false; if (other.getArtwork() != null && other.getArtwork().equals(this.getArtwork()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getMergePolicy() == null) ? 0 : getMergePolicy().hashCode()); hashCode = prime * hashCode + ((getArtwork() == null) ? 0 : getArtwork().hashCode()); return hashCode; } @Override public JobAlbumArt clone() { try { return (JobAlbumArt) super.clone(); } catch (CloneNotSupportedException e) { throw new IllegalStateException( "Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e); } } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy