This object represents a policy rule, which specifies a set of conditions that must be met and the action that YouTube should take when those conditions are met. For a rule to be valid, all of the rule's conditions must be satisfied.
JSON representation |
---|
{
"action": string,
"conditions": {
object ( |
Fields | |
---|---|
action |
The policy that YouTube should enforce if the rule's conditions are all valid for an asset or for an attempt to view that asset on YouTube. |
conditions |
A set of conditions that must be met for the rule's action (and subactions) to be enforced. For a rule to be valid, all of its conditions must be met. |
subaction[] |
A list of additional actions that YouTube should take if the conditions in the rule are met. |
Conditions
Represents conditions for a policy rule. YouTube enforces a rights policy if any of the rules specified for the policy are valid. For a rule to be valid, all of the rule's conditions must be satisfied, and a condition is true when all set parts are satisfied. Unset conditions are disregarded (or always satisfied) for a rule. For example, if a rule does not specify a
MatchDuration
, then the length of the actual match duration could not cause the rule to not be satisfied. If no conditions are set, the condition as a whole is always true.
JSON representation |
---|
{ "requiredTerritories": { object ( |
Fields | |
---|---|
requiredTerritories |
This watch condition specifies where users are (or or not) allowed to watch (or listen to) an asset. YouTube determines whether the condition is satisfied based on the user's location. |
matchDuration[] |
This match condition specifies an amount of time that the user- or partner- uploaded content needs to match a reference file for the rule to apply. |
matchPercent[] |
This match condition specifies a percentage of the user- or partner-uploaded content that needs to match a reference file for the rule to apply. |
referenceDuration[] |
This match condition indicates that the reference must be a certain duration for the rule to apply. |
referencePercent[] |
This match condition indicates that the specified percentage of a reference file must match the user- or partner-uploaded content for the rule to apply. |
contentMatchType[] |
This match condition specifies whether the user- or partner-uploaded content needs to match the audio, video or audiovisual content of a reference file for the rule to apply. |
TerritoryCondition
Territory condition used by policy rule's conditions.
JSON representation |
---|
{ "type": string, "territories": [ string ] } |
Fields | |
---|---|
type |
This field indicates whether the associated policy rule is or is not valid in the specified territories. |
territories[] |
A list of territories. Each territory is an ISO 3166 two-letter country code.. |
IntervalCondition
Identifies the minimum and maximum values associated with a match condition. If a potential match falls within the specified range, then the condition is satisfied.
JSON representation |
---|
{ "low": number, "high": number } |
Fields | |
---|---|
low |
The minimum (inclusive) allowed value for the condition to be satisfied. The default value is |
high |
The maximum (inclusive) allowed value for the condition to be satisfied. The default value is |