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

com.amazonaws.services.ivs.model.UpdatePlaybackRestrictionPolicyRequest Maven / Gradle / Ivy

/*
 * 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.ivs.model;

import java.io.Serializable;
import javax.annotation.Generated;

import com.amazonaws.AmazonWebServiceRequest;

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

    /**
     * 

* ARN of the playback-restriction-policy to be updated. *

*/ private String arn; /** *

* A list of country codes that control geoblocking restriction. Allowed values are the officially assigned ISO 3166-1 alpha-2 codes. Default: All countries (an * empty array). *

*/ private java.util.List allowedCountries; /** *

* A list of origin sites that control CORS restriction. Allowed values are the same as valid values of the Origin * header defined at https://developer.mozilla * .org/en-US/docs/Web/HTTP/Headers/Origin. Default: All origins (an empty array). *

*/ private java.util.List allowedOrigins; /** *

* Whether channel playback is constrained by origin site. Default: false. *

*/ private Boolean enableStrictOriginEnforcement; /** *

* Playback-restriction-policy name. The value does not need to be unique. *

*/ private String name; /** *

* ARN of the playback-restriction-policy to be updated. *

* * @param arn * ARN of the playback-restriction-policy to be updated. */ public void setArn(String arn) { this.arn = arn; } /** *

* ARN of the playback-restriction-policy to be updated. *

* * @return ARN of the playback-restriction-policy to be updated. */ public String getArn() { return this.arn; } /** *

* ARN of the playback-restriction-policy to be updated. *

* * @param arn * ARN of the playback-restriction-policy to be updated. * @return Returns a reference to this object so that method calls can be chained together. */ public UpdatePlaybackRestrictionPolicyRequest withArn(String arn) { setArn(arn); return this; } /** *

* A list of country codes that control geoblocking restriction. Allowed values are the officially assigned ISO 3166-1 alpha-2 codes. Default: All countries (an * empty array). *

* * @return A list of country codes that control geoblocking restriction. Allowed values are the officially assigned * ISO 3166-1 alpha-2 codes. Default: All * countries (an empty array). */ public java.util.List getAllowedCountries() { return allowedCountries; } /** *

* A list of country codes that control geoblocking restriction. Allowed values are the officially assigned ISO 3166-1 alpha-2 codes. Default: All countries (an * empty array). *

* * @param allowedCountries * A list of country codes that control geoblocking restriction. Allowed values are the officially assigned * ISO 3166-1 alpha-2 codes. Default: All * countries (an empty array). */ public void setAllowedCountries(java.util.Collection allowedCountries) { if (allowedCountries == null) { this.allowedCountries = null; return; } this.allowedCountries = new java.util.ArrayList(allowedCountries); } /** *

* A list of country codes that control geoblocking restriction. Allowed values are the officially assigned ISO 3166-1 alpha-2 codes. Default: All countries (an * empty array). *

*

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

* * @param allowedCountries * A list of country codes that control geoblocking restriction. Allowed values are the officially assigned * ISO 3166-1 alpha-2 codes. Default: All * countries (an empty array). * @return Returns a reference to this object so that method calls can be chained together. */ public UpdatePlaybackRestrictionPolicyRequest withAllowedCountries(String... allowedCountries) { if (this.allowedCountries == null) { setAllowedCountries(new java.util.ArrayList(allowedCountries.length)); } for (String ele : allowedCountries) { this.allowedCountries.add(ele); } return this; } /** *

* A list of country codes that control geoblocking restriction. Allowed values are the officially assigned ISO 3166-1 alpha-2 codes. Default: All countries (an * empty array). *

* * @param allowedCountries * A list of country codes that control geoblocking restriction. Allowed values are the officially assigned * ISO 3166-1 alpha-2 codes. Default: All * countries (an empty array). * @return Returns a reference to this object so that method calls can be chained together. */ public UpdatePlaybackRestrictionPolicyRequest withAllowedCountries(java.util.Collection allowedCountries) { setAllowedCountries(allowedCountries); return this; } /** *

* A list of origin sites that control CORS restriction. Allowed values are the same as valid values of the Origin * header defined at https://developer.mozilla * .org/en-US/docs/Web/HTTP/Headers/Origin. Default: All origins (an empty array). *

* * @return A list of origin sites that control CORS restriction. Allowed values are the same as valid values of the * Origin header defined at https: * //developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Origin. Default: All origins (an empty array). */ public java.util.List getAllowedOrigins() { return allowedOrigins; } /** *

* A list of origin sites that control CORS restriction. Allowed values are the same as valid values of the Origin * header defined at https://developer.mozilla * .org/en-US/docs/Web/HTTP/Headers/Origin. Default: All origins (an empty array). *

* * @param allowedOrigins * A list of origin sites that control CORS restriction. Allowed values are the same as valid values of the * Origin header defined at https:/ * /developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Origin. Default: All origins (an empty array). */ public void setAllowedOrigins(java.util.Collection allowedOrigins) { if (allowedOrigins == null) { this.allowedOrigins = null; return; } this.allowedOrigins = new java.util.ArrayList(allowedOrigins); } /** *

* A list of origin sites that control CORS restriction. Allowed values are the same as valid values of the Origin * header defined at https://developer.mozilla * .org/en-US/docs/Web/HTTP/Headers/Origin. Default: All origins (an empty array). *

*

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

* * @param allowedOrigins * A list of origin sites that control CORS restriction. Allowed values are the same as valid values of the * Origin header defined at https:/ * /developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Origin. Default: All origins (an empty array). * @return Returns a reference to this object so that method calls can be chained together. */ public UpdatePlaybackRestrictionPolicyRequest withAllowedOrigins(String... allowedOrigins) { if (this.allowedOrigins == null) { setAllowedOrigins(new java.util.ArrayList(allowedOrigins.length)); } for (String ele : allowedOrigins) { this.allowedOrigins.add(ele); } return this; } /** *

* A list of origin sites that control CORS restriction. Allowed values are the same as valid values of the Origin * header defined at https://developer.mozilla * .org/en-US/docs/Web/HTTP/Headers/Origin. Default: All origins (an empty array). *

* * @param allowedOrigins * A list of origin sites that control CORS restriction. Allowed values are the same as valid values of the * Origin header defined at https:/ * /developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Origin. Default: All origins (an empty array). * @return Returns a reference to this object so that method calls can be chained together. */ public UpdatePlaybackRestrictionPolicyRequest withAllowedOrigins(java.util.Collection allowedOrigins) { setAllowedOrigins(allowedOrigins); return this; } /** *

* Whether channel playback is constrained by origin site. Default: false. *

* * @param enableStrictOriginEnforcement * Whether channel playback is constrained by origin site. Default: false. */ public void setEnableStrictOriginEnforcement(Boolean enableStrictOriginEnforcement) { this.enableStrictOriginEnforcement = enableStrictOriginEnforcement; } /** *

* Whether channel playback is constrained by origin site. Default: false. *

* * @return Whether channel playback is constrained by origin site. Default: false. */ public Boolean getEnableStrictOriginEnforcement() { return this.enableStrictOriginEnforcement; } /** *

* Whether channel playback is constrained by origin site. Default: false. *

* * @param enableStrictOriginEnforcement * Whether channel playback is constrained by origin site. Default: false. * @return Returns a reference to this object so that method calls can be chained together. */ public UpdatePlaybackRestrictionPolicyRequest withEnableStrictOriginEnforcement(Boolean enableStrictOriginEnforcement) { setEnableStrictOriginEnforcement(enableStrictOriginEnforcement); return this; } /** *

* Whether channel playback is constrained by origin site. Default: false. *

* * @return Whether channel playback is constrained by origin site. Default: false. */ public Boolean isEnableStrictOriginEnforcement() { return this.enableStrictOriginEnforcement; } /** *

* Playback-restriction-policy name. The value does not need to be unique. *

* * @param name * Playback-restriction-policy name. The value does not need to be unique. */ public void setName(String name) { this.name = name; } /** *

* Playback-restriction-policy name. The value does not need to be unique. *

* * @return Playback-restriction-policy name. The value does not need to be unique. */ public String getName() { return this.name; } /** *

* Playback-restriction-policy name. The value does not need to be unique. *

* * @param name * Playback-restriction-policy name. The value does not need to be unique. * @return Returns a reference to this object so that method calls can be chained together. */ public UpdatePlaybackRestrictionPolicyRequest withName(String name) { setName(name); 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 (getArn() != null) sb.append("Arn: ").append(getArn()).append(","); if (getAllowedCountries() != null) sb.append("AllowedCountries: ").append(getAllowedCountries()).append(","); if (getAllowedOrigins() != null) sb.append("AllowedOrigins: ").append(getAllowedOrigins()).append(","); if (getEnableStrictOriginEnforcement() != null) sb.append("EnableStrictOriginEnforcement: ").append(getEnableStrictOriginEnforcement()).append(","); if (getName() != null) sb.append("Name: ").append(getName()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof UpdatePlaybackRestrictionPolicyRequest == false) return false; UpdatePlaybackRestrictionPolicyRequest other = (UpdatePlaybackRestrictionPolicyRequest) obj; if (other.getArn() == null ^ this.getArn() == null) return false; if (other.getArn() != null && other.getArn().equals(this.getArn()) == false) return false; if (other.getAllowedCountries() == null ^ this.getAllowedCountries() == null) return false; if (other.getAllowedCountries() != null && other.getAllowedCountries().equals(this.getAllowedCountries()) == false) return false; if (other.getAllowedOrigins() == null ^ this.getAllowedOrigins() == null) return false; if (other.getAllowedOrigins() != null && other.getAllowedOrigins().equals(this.getAllowedOrigins()) == false) return false; if (other.getEnableStrictOriginEnforcement() == null ^ this.getEnableStrictOriginEnforcement() == null) return false; if (other.getEnableStrictOriginEnforcement() != null && other.getEnableStrictOriginEnforcement().equals(this.getEnableStrictOriginEnforcement()) == false) return false; if (other.getName() == null ^ this.getName() == null) return false; if (other.getName() != null && other.getName().equals(this.getName()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getArn() == null) ? 0 : getArn().hashCode()); hashCode = prime * hashCode + ((getAllowedCountries() == null) ? 0 : getAllowedCountries().hashCode()); hashCode = prime * hashCode + ((getAllowedOrigins() == null) ? 0 : getAllowedOrigins().hashCode()); hashCode = prime * hashCode + ((getEnableStrictOriginEnforcement() == null) ? 0 : getEnableStrictOriginEnforcement().hashCode()); hashCode = prime * hashCode + ((getName() == null) ? 0 : getName().hashCode()); return hashCode; } @Override public UpdatePlaybackRestrictionPolicyRequest clone() { return (UpdatePlaybackRestrictionPolicyRequest) super.clone(); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy