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

com.amazonaws.services.mediatailor.model.AvailMatchingCriteria Maven / Gradle / Ivy

Go to download

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

The newest version!
/*
 * 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.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;

/**
 * 

* MediaTailor only places (consumes) prefetched ads if the ad break meets the criteria defined by the dynamic * variables. This gives you granular control over which ad break to place the prefetched ads into. *

*

* As an example, let's say that you set DynamicVariable to scte.event_id and * Operator to EQUALS, and your playback configuration has an ADS URL of * https://my.ads.server.com/path?&podId=[scte.avail_num]&event=[scte.event_id]&duration=[session.avail_duration_secs] * . And the prefetch request to the ADS contains these values * https://my.ads.server.com/path?&podId=3&event=my-awesome-event&duration=30. MediaTailor will * only insert the prefetched ads into the ad break if has a SCTE marker with an event id of * my-awesome-event, since it must match the event id that MediaTailor uses to query the ADS. *

*

* You can specify up to five AvailMatchingCriteria. If you specify multiple * AvailMatchingCriteria, MediaTailor combines them to match using a logical AND. You can * model logical OR combinations by creating multiple prefetch schedules. *

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

* The dynamic variable(s) that MediaTailor should use as avail matching criteria. MediaTailor only places the * prefetched ads into the avail if the avail matches the criteria defined by the dynamic variable. For information * about dynamic variables, see Using * dynamic ad variables in the MediaTailor User Guide. *

*

* You can include up to 100 dynamic variables. *

*/ private String dynamicVariable; /** *

* For the DynamicVariable specified in AvailMatchingCriteria, the Operator that is used * for the comparison. *

*/ private String operator; /** *

* The dynamic variable(s) that MediaTailor should use as avail matching criteria. MediaTailor only places the * prefetched ads into the avail if the avail matches the criteria defined by the dynamic variable. For information * about dynamic variables, see Using * dynamic ad variables in the MediaTailor User Guide. *

*

* You can include up to 100 dynamic variables. *

* * @param dynamicVariable * The dynamic variable(s) that MediaTailor should use as avail matching criteria. MediaTailor only places * the prefetched ads into the avail if the avail matches the criteria defined by the dynamic variable. For * information about dynamic variables, see Using dynamic ad variables in * the MediaTailor User Guide.

*

* You can include up to 100 dynamic variables. */ public void setDynamicVariable(String dynamicVariable) { this.dynamicVariable = dynamicVariable; } /** *

* The dynamic variable(s) that MediaTailor should use as avail matching criteria. MediaTailor only places the * prefetched ads into the avail if the avail matches the criteria defined by the dynamic variable. For information * about dynamic variables, see Using * dynamic ad variables in the MediaTailor User Guide. *

*

* You can include up to 100 dynamic variables. *

* * @return The dynamic variable(s) that MediaTailor should use as avail matching criteria. MediaTailor only places * the prefetched ads into the avail if the avail matches the criteria defined by the dynamic variable. For * information about dynamic variables, see Using dynamic ad variables in * the MediaTailor User Guide.

*

* You can include up to 100 dynamic variables. */ public String getDynamicVariable() { return this.dynamicVariable; } /** *

* The dynamic variable(s) that MediaTailor should use as avail matching criteria. MediaTailor only places the * prefetched ads into the avail if the avail matches the criteria defined by the dynamic variable. For information * about dynamic variables, see Using * dynamic ad variables in the MediaTailor User Guide. *

*

* You can include up to 100 dynamic variables. *

* * @param dynamicVariable * The dynamic variable(s) that MediaTailor should use as avail matching criteria. MediaTailor only places * the prefetched ads into the avail if the avail matches the criteria defined by the dynamic variable. For * information about dynamic variables, see Using dynamic ad variables in * the MediaTailor User Guide.

*

* You can include up to 100 dynamic variables. * @return Returns a reference to this object so that method calls can be chained together. */ public AvailMatchingCriteria withDynamicVariable(String dynamicVariable) { setDynamicVariable(dynamicVariable); return this; } /** *

* For the DynamicVariable specified in AvailMatchingCriteria, the Operator that is used * for the comparison. *

* * @param operator * For the DynamicVariable specified in AvailMatchingCriteria, the Operator that is * used for the comparison. * @see Operator */ public void setOperator(String operator) { this.operator = operator; } /** *

* For the DynamicVariable specified in AvailMatchingCriteria, the Operator that is used * for the comparison. *

* * @return For the DynamicVariable specified in AvailMatchingCriteria, the Operator that * is used for the comparison. * @see Operator */ public String getOperator() { return this.operator; } /** *

* For the DynamicVariable specified in AvailMatchingCriteria, the Operator that is used * for the comparison. *

* * @param operator * For the DynamicVariable specified in AvailMatchingCriteria, the Operator that is * used for the comparison. * @return Returns a reference to this object so that method calls can be chained together. * @see Operator */ public AvailMatchingCriteria withOperator(String operator) { setOperator(operator); return this; } /** *

* For the DynamicVariable specified in AvailMatchingCriteria, the Operator that is used * for the comparison. *

* * @param operator * For the DynamicVariable specified in AvailMatchingCriteria, the Operator that is * used for the comparison. * @return Returns a reference to this object so that method calls can be chained together. * @see Operator */ public AvailMatchingCriteria withOperator(Operator operator) { this.operator = operator.toString(); 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 (getDynamicVariable() != null) sb.append("DynamicVariable: ").append(getDynamicVariable()).append(","); if (getOperator() != null) sb.append("Operator: ").append(getOperator()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof AvailMatchingCriteria == false) return false; AvailMatchingCriteria other = (AvailMatchingCriteria) obj; if (other.getDynamicVariable() == null ^ this.getDynamicVariable() == null) return false; if (other.getDynamicVariable() != null && other.getDynamicVariable().equals(this.getDynamicVariable()) == false) return false; if (other.getOperator() == null ^ this.getOperator() == null) return false; if (other.getOperator() != null && other.getOperator().equals(this.getOperator()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getDynamicVariable() == null) ? 0 : getDynamicVariable().hashCode()); hashCode = prime * hashCode + ((getOperator() == null) ? 0 : getOperator().hashCode()); return hashCode; } @Override public AvailMatchingCriteria clone() { try { return (AvailMatchingCriteria) 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.mediatailor.model.transform.AvailMatchingCriteriaMarshaller.getInstance().marshall(this, protocolMarshaller); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy