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

com.amazonaws.services.medialive.model.HlsMediaStoreSettings Maven / Gradle / Ivy

Go to download

The AWS Java SDK for AWS Elemental MediaLive module holds the client classes that are used for communicating with AWS Elemental MediaLive Service

There is a newer version: 1.12.772
Show newest version
/*
 * Copyright 2018-2023 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.medialive.model;

import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;

/**
 * Hls Media Store Settings
 * 
 * @see AWS
 *      API Documentation
 */
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class HlsMediaStoreSettings implements Serializable, Cloneable, StructuredPojo {

    /** Number of seconds to wait before retrying connection to the CDN if the connection is lost. */
    private Integer connectionRetryInterval;
    /** Size in seconds of file cache for streaming outputs. */
    private Integer filecacheDuration;
    /** When set to temporal, output files are stored in non-persistent memory for faster reading and writing. */
    private String mediaStoreStorageClass;
    /**
     * Number of retry attempts that will be made before the Live Event is put into an error state. Applies only if the
     * CDN destination URI begins with "s3" or "mediastore". For other URIs, the value is always 3.
     */
    private Integer numRetries;
    /**
     * If a streaming output fails, number of seconds to wait until a restart is initiated. A value of 0 means never
     * restart.
     */
    private Integer restartDelay;

    /**
     * Number of seconds to wait before retrying connection to the CDN if the connection is lost.
     * 
     * @param connectionRetryInterval
     *        Number of seconds to wait before retrying connection to the CDN if the connection is lost.
     */

    public void setConnectionRetryInterval(Integer connectionRetryInterval) {
        this.connectionRetryInterval = connectionRetryInterval;
    }

    /**
     * Number of seconds to wait before retrying connection to the CDN if the connection is lost.
     * 
     * @return Number of seconds to wait before retrying connection to the CDN if the connection is lost.
     */

    public Integer getConnectionRetryInterval() {
        return this.connectionRetryInterval;
    }

    /**
     * Number of seconds to wait before retrying connection to the CDN if the connection is lost.
     * 
     * @param connectionRetryInterval
     *        Number of seconds to wait before retrying connection to the CDN if the connection is lost.
     * @return Returns a reference to this object so that method calls can be chained together.
     */

    public HlsMediaStoreSettings withConnectionRetryInterval(Integer connectionRetryInterval) {
        setConnectionRetryInterval(connectionRetryInterval);
        return this;
    }

    /**
     * Size in seconds of file cache for streaming outputs.
     * 
     * @param filecacheDuration
     *        Size in seconds of file cache for streaming outputs.
     */

    public void setFilecacheDuration(Integer filecacheDuration) {
        this.filecacheDuration = filecacheDuration;
    }

    /**
     * Size in seconds of file cache for streaming outputs.
     * 
     * @return Size in seconds of file cache for streaming outputs.
     */

    public Integer getFilecacheDuration() {
        return this.filecacheDuration;
    }

    /**
     * Size in seconds of file cache for streaming outputs.
     * 
     * @param filecacheDuration
     *        Size in seconds of file cache for streaming outputs.
     * @return Returns a reference to this object so that method calls can be chained together.
     */

    public HlsMediaStoreSettings withFilecacheDuration(Integer filecacheDuration) {
        setFilecacheDuration(filecacheDuration);
        return this;
    }

    /**
     * When set to temporal, output files are stored in non-persistent memory for faster reading and writing.
     * 
     * @param mediaStoreStorageClass
     *        When set to temporal, output files are stored in non-persistent memory for faster reading and writing.
     * @see HlsMediaStoreStorageClass
     */

    public void setMediaStoreStorageClass(String mediaStoreStorageClass) {
        this.mediaStoreStorageClass = mediaStoreStorageClass;
    }

    /**
     * When set to temporal, output files are stored in non-persistent memory for faster reading and writing.
     * 
     * @return When set to temporal, output files are stored in non-persistent memory for faster reading and writing.
     * @see HlsMediaStoreStorageClass
     */

    public String getMediaStoreStorageClass() {
        return this.mediaStoreStorageClass;
    }

    /**
     * When set to temporal, output files are stored in non-persistent memory for faster reading and writing.
     * 
     * @param mediaStoreStorageClass
     *        When set to temporal, output files are stored in non-persistent memory for faster reading and writing.
     * @return Returns a reference to this object so that method calls can be chained together.
     * @see HlsMediaStoreStorageClass
     */

    public HlsMediaStoreSettings withMediaStoreStorageClass(String mediaStoreStorageClass) {
        setMediaStoreStorageClass(mediaStoreStorageClass);
        return this;
    }

    /**
     * When set to temporal, output files are stored in non-persistent memory for faster reading and writing.
     * 
     * @param mediaStoreStorageClass
     *        When set to temporal, output files are stored in non-persistent memory for faster reading and writing.
     * @return Returns a reference to this object so that method calls can be chained together.
     * @see HlsMediaStoreStorageClass
     */

    public HlsMediaStoreSettings withMediaStoreStorageClass(HlsMediaStoreStorageClass mediaStoreStorageClass) {
        this.mediaStoreStorageClass = mediaStoreStorageClass.toString();
        return this;
    }

    /**
     * Number of retry attempts that will be made before the Live Event is put into an error state. Applies only if the
     * CDN destination URI begins with "s3" or "mediastore". For other URIs, the value is always 3.
     * 
     * @param numRetries
     *        Number of retry attempts that will be made before the Live Event is put into an error state. Applies only
     *        if the CDN destination URI begins with "s3" or "mediastore". For other URIs, the value is always 3.
     */

    public void setNumRetries(Integer numRetries) {
        this.numRetries = numRetries;
    }

    /**
     * Number of retry attempts that will be made before the Live Event is put into an error state. Applies only if the
     * CDN destination URI begins with "s3" or "mediastore". For other URIs, the value is always 3.
     * 
     * @return Number of retry attempts that will be made before the Live Event is put into an error state. Applies only
     *         if the CDN destination URI begins with "s3" or "mediastore". For other URIs, the value is always 3.
     */

    public Integer getNumRetries() {
        return this.numRetries;
    }

    /**
     * Number of retry attempts that will be made before the Live Event is put into an error state. Applies only if the
     * CDN destination URI begins with "s3" or "mediastore". For other URIs, the value is always 3.
     * 
     * @param numRetries
     *        Number of retry attempts that will be made before the Live Event is put into an error state. Applies only
     *        if the CDN destination URI begins with "s3" or "mediastore". For other URIs, the value is always 3.
     * @return Returns a reference to this object so that method calls can be chained together.
     */

    public HlsMediaStoreSettings withNumRetries(Integer numRetries) {
        setNumRetries(numRetries);
        return this;
    }

    /**
     * If a streaming output fails, number of seconds to wait until a restart is initiated. A value of 0 means never
     * restart.
     * 
     * @param restartDelay
     *        If a streaming output fails, number of seconds to wait until a restart is initiated. A value of 0 means
     *        never restart.
     */

    public void setRestartDelay(Integer restartDelay) {
        this.restartDelay = restartDelay;
    }

    /**
     * If a streaming output fails, number of seconds to wait until a restart is initiated. A value of 0 means never
     * restart.
     * 
     * @return If a streaming output fails, number of seconds to wait until a restart is initiated. A value of 0 means
     *         never restart.
     */

    public Integer getRestartDelay() {
        return this.restartDelay;
    }

    /**
     * If a streaming output fails, number of seconds to wait until a restart is initiated. A value of 0 means never
     * restart.
     * 
     * @param restartDelay
     *        If a streaming output fails, number of seconds to wait until a restart is initiated. A value of 0 means
     *        never restart.
     * @return Returns a reference to this object so that method calls can be chained together.
     */

    public HlsMediaStoreSettings withRestartDelay(Integer restartDelay) {
        setRestartDelay(restartDelay);
        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 (getConnectionRetryInterval() != null)
            sb.append("ConnectionRetryInterval: ").append(getConnectionRetryInterval()).append(",");
        if (getFilecacheDuration() != null)
            sb.append("FilecacheDuration: ").append(getFilecacheDuration()).append(",");
        if (getMediaStoreStorageClass() != null)
            sb.append("MediaStoreStorageClass: ").append(getMediaStoreStorageClass()).append(",");
        if (getNumRetries() != null)
            sb.append("NumRetries: ").append(getNumRetries()).append(",");
        if (getRestartDelay() != null)
            sb.append("RestartDelay: ").append(getRestartDelay());
        sb.append("}");
        return sb.toString();
    }

    @Override
    public boolean equals(Object obj) {
        if (this == obj)
            return true;
        if (obj == null)
            return false;

        if (obj instanceof HlsMediaStoreSettings == false)
            return false;
        HlsMediaStoreSettings other = (HlsMediaStoreSettings) obj;
        if (other.getConnectionRetryInterval() == null ^ this.getConnectionRetryInterval() == null)
            return false;
        if (other.getConnectionRetryInterval() != null && other.getConnectionRetryInterval().equals(this.getConnectionRetryInterval()) == false)
            return false;
        if (other.getFilecacheDuration() == null ^ this.getFilecacheDuration() == null)
            return false;
        if (other.getFilecacheDuration() != null && other.getFilecacheDuration().equals(this.getFilecacheDuration()) == false)
            return false;
        if (other.getMediaStoreStorageClass() == null ^ this.getMediaStoreStorageClass() == null)
            return false;
        if (other.getMediaStoreStorageClass() != null && other.getMediaStoreStorageClass().equals(this.getMediaStoreStorageClass()) == false)
            return false;
        if (other.getNumRetries() == null ^ this.getNumRetries() == null)
            return false;
        if (other.getNumRetries() != null && other.getNumRetries().equals(this.getNumRetries()) == false)
            return false;
        if (other.getRestartDelay() == null ^ this.getRestartDelay() == null)
            return false;
        if (other.getRestartDelay() != null && other.getRestartDelay().equals(this.getRestartDelay()) == false)
            return false;
        return true;
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int hashCode = 1;

        hashCode = prime * hashCode + ((getConnectionRetryInterval() == null) ? 0 : getConnectionRetryInterval().hashCode());
        hashCode = prime * hashCode + ((getFilecacheDuration() == null) ? 0 : getFilecacheDuration().hashCode());
        hashCode = prime * hashCode + ((getMediaStoreStorageClass() == null) ? 0 : getMediaStoreStorageClass().hashCode());
        hashCode = prime * hashCode + ((getNumRetries() == null) ? 0 : getNumRetries().hashCode());
        hashCode = prime * hashCode + ((getRestartDelay() == null) ? 0 : getRestartDelay().hashCode());
        return hashCode;
    }

    @Override
    public HlsMediaStoreSettings clone() {
        try {
            return (HlsMediaStoreSettings) 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.medialive.model.transform.HlsMediaStoreSettingsMarshaller.getInstance().marshall(this, protocolMarshaller);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy