com.amazonaws.services.mediapackagev2.model.ForceEndpointErrorConfiguration Maven / Gradle / Ivy
Show all versions of aws-java-sdk-mediapackagev2 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.mediapackagev2.model;
import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;
/**
*
* The failover settings for the endpoint.
*
*
* @see AWS API Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class ForceEndpointErrorConfiguration implements Serializable, Cloneable, StructuredPojo {
/**
*
* The failover conditions for the endpoint. The options are:
*
*
* -
*
* STALE_MANIFEST
- The manifest stalled and there are no new segments or parts.
*
*
* -
*
* INCOMPLETE_MANIFEST
- There is a gap in the manifest.
*
*
* -
*
* MISSING_DRM_KEY
- Key rotation is enabled but we're unable to fetch the key for the current key
* period.
*
*
* -
*
* SLATE_INPUT
- The segments which contain slate content are considered to be missing content.
*
*
*
*/
private java.util.List endpointErrorConditions;
/**
*
* The failover conditions for the endpoint. The options are:
*
*
* -
*
* STALE_MANIFEST
- The manifest stalled and there are no new segments or parts.
*
*
* -
*
* INCOMPLETE_MANIFEST
- There is a gap in the manifest.
*
*
* -
*
* MISSING_DRM_KEY
- Key rotation is enabled but we're unable to fetch the key for the current key
* period.
*
*
* -
*
* SLATE_INPUT
- The segments which contain slate content are considered to be missing content.
*
*
*
*
* @return The failover conditions for the endpoint. The options are:
*
* -
*
* STALE_MANIFEST
- The manifest stalled and there are no new segments or parts.
*
*
* -
*
* INCOMPLETE_MANIFEST
- There is a gap in the manifest.
*
*
* -
*
* MISSING_DRM_KEY
- Key rotation is enabled but we're unable to fetch the key for the current
* key period.
*
*
* -
*
* SLATE_INPUT
- The segments which contain slate content are considered to be missing content.
*
*
* @see EndpointErrorCondition
*/
public java.util.List getEndpointErrorConditions() {
return endpointErrorConditions;
}
/**
*
* The failover conditions for the endpoint. The options are:
*
*
* -
*
* STALE_MANIFEST
- The manifest stalled and there are no new segments or parts.
*
*
* -
*
* INCOMPLETE_MANIFEST
- There is a gap in the manifest.
*
*
* -
*
* MISSING_DRM_KEY
- Key rotation is enabled but we're unable to fetch the key for the current key
* period.
*
*
* -
*
* SLATE_INPUT
- The segments which contain slate content are considered to be missing content.
*
*
*
*
* @param endpointErrorConditions
* The failover conditions for the endpoint. The options are:
*
* -
*
* STALE_MANIFEST
- The manifest stalled and there are no new segments or parts.
*
*
* -
*
* INCOMPLETE_MANIFEST
- There is a gap in the manifest.
*
*
* -
*
* MISSING_DRM_KEY
- Key rotation is enabled but we're unable to fetch the key for the current
* key period.
*
*
* -
*
* SLATE_INPUT
- The segments which contain slate content are considered to be missing content.
*
*
* @see EndpointErrorCondition
*/
public void setEndpointErrorConditions(java.util.Collection endpointErrorConditions) {
if (endpointErrorConditions == null) {
this.endpointErrorConditions = null;
return;
}
this.endpointErrorConditions = new java.util.ArrayList(endpointErrorConditions);
}
/**
*
* The failover conditions for the endpoint. The options are:
*
*
* -
*
* STALE_MANIFEST
- The manifest stalled and there are no new segments or parts.
*
*
* -
*
* INCOMPLETE_MANIFEST
- There is a gap in the manifest.
*
*
* -
*
* MISSING_DRM_KEY
- Key rotation is enabled but we're unable to fetch the key for the current key
* period.
*
*
* -
*
* SLATE_INPUT
- The segments which contain slate content are considered to be missing content.
*
*
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setEndpointErrorConditions(java.util.Collection)} or
* {@link #withEndpointErrorConditions(java.util.Collection)} if you want to override the existing values.
*
*
* @param endpointErrorConditions
* The failover conditions for the endpoint. The options are:
*
* -
*
* STALE_MANIFEST
- The manifest stalled and there are no new segments or parts.
*
*
* -
*
* INCOMPLETE_MANIFEST
- There is a gap in the manifest.
*
*
* -
*
* MISSING_DRM_KEY
- Key rotation is enabled but we're unable to fetch the key for the current
* key period.
*
*
* -
*
* SLATE_INPUT
- The segments which contain slate content are considered to be missing content.
*
*
* @return Returns a reference to this object so that method calls can be chained together.
* @see EndpointErrorCondition
*/
public ForceEndpointErrorConfiguration withEndpointErrorConditions(String... endpointErrorConditions) {
if (this.endpointErrorConditions == null) {
setEndpointErrorConditions(new java.util.ArrayList(endpointErrorConditions.length));
}
for (String ele : endpointErrorConditions) {
this.endpointErrorConditions.add(ele);
}
return this;
}
/**
*
* The failover conditions for the endpoint. The options are:
*
*
* -
*
* STALE_MANIFEST
- The manifest stalled and there are no new segments or parts.
*
*
* -
*
* INCOMPLETE_MANIFEST
- There is a gap in the manifest.
*
*
* -
*
* MISSING_DRM_KEY
- Key rotation is enabled but we're unable to fetch the key for the current key
* period.
*
*
* -
*
* SLATE_INPUT
- The segments which contain slate content are considered to be missing content.
*
*
*
*
* @param endpointErrorConditions
* The failover conditions for the endpoint. The options are:
*
* -
*
* STALE_MANIFEST
- The manifest stalled and there are no new segments or parts.
*
*
* -
*
* INCOMPLETE_MANIFEST
- There is a gap in the manifest.
*
*
* -
*
* MISSING_DRM_KEY
- Key rotation is enabled but we're unable to fetch the key for the current
* key period.
*
*
* -
*
* SLATE_INPUT
- The segments which contain slate content are considered to be missing content.
*
*
* @return Returns a reference to this object so that method calls can be chained together.
* @see EndpointErrorCondition
*/
public ForceEndpointErrorConfiguration withEndpointErrorConditions(java.util.Collection endpointErrorConditions) {
setEndpointErrorConditions(endpointErrorConditions);
return this;
}
/**
*
* The failover conditions for the endpoint. The options are:
*
*
* -
*
* STALE_MANIFEST
- The manifest stalled and there are no new segments or parts.
*
*
* -
*
* INCOMPLETE_MANIFEST
- There is a gap in the manifest.
*
*
* -
*
* MISSING_DRM_KEY
- Key rotation is enabled but we're unable to fetch the key for the current key
* period.
*
*
* -
*
* SLATE_INPUT
- The segments which contain slate content are considered to be missing content.
*
*
*
*
* @param endpointErrorConditions
* The failover conditions for the endpoint. The options are:
*
* -
*
* STALE_MANIFEST
- The manifest stalled and there are no new segments or parts.
*
*
* -
*
* INCOMPLETE_MANIFEST
- There is a gap in the manifest.
*
*
* -
*
* MISSING_DRM_KEY
- Key rotation is enabled but we're unable to fetch the key for the current
* key period.
*
*
* -
*
* SLATE_INPUT
- The segments which contain slate content are considered to be missing content.
*
*
* @return Returns a reference to this object so that method calls can be chained together.
* @see EndpointErrorCondition
*/
public ForceEndpointErrorConfiguration withEndpointErrorConditions(EndpointErrorCondition... endpointErrorConditions) {
java.util.ArrayList endpointErrorConditionsCopy = new java.util.ArrayList(endpointErrorConditions.length);
for (EndpointErrorCondition value : endpointErrorConditions) {
endpointErrorConditionsCopy.add(value.toString());
}
if (getEndpointErrorConditions() == null) {
setEndpointErrorConditions(endpointErrorConditionsCopy);
} else {
getEndpointErrorConditions().addAll(endpointErrorConditionsCopy);
}
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 (getEndpointErrorConditions() != null)
sb.append("EndpointErrorConditions: ").append(getEndpointErrorConditions());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof ForceEndpointErrorConfiguration == false)
return false;
ForceEndpointErrorConfiguration other = (ForceEndpointErrorConfiguration) obj;
if (other.getEndpointErrorConditions() == null ^ this.getEndpointErrorConditions() == null)
return false;
if (other.getEndpointErrorConditions() != null && other.getEndpointErrorConditions().equals(this.getEndpointErrorConditions()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getEndpointErrorConditions() == null) ? 0 : getEndpointErrorConditions().hashCode());
return hashCode;
}
@Override
public ForceEndpointErrorConfiguration clone() {
try {
return (ForceEndpointErrorConfiguration) 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.mediapackagev2.model.transform.ForceEndpointErrorConfigurationMarshaller.getInstance().marshall(this, protocolMarshaller);
}
}