com.mux.sdk.models.ReferrerDomainRestriction Maven / Gradle / Ivy
/*
* Mux API
* Mux is how developers build online video. This API encompasses both Mux Video and Mux Data functionality to help you build your video-related projects better and faster than ever before.
*
* The version of the OpenAPI document: v1
* Contact: [email protected]
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
package com.mux.sdk.models;
import java.util.Objects;
import java.util.Arrays;
import com.google.gson.TypeAdapter;
import com.google.gson.annotations.JsonAdapter;
import com.google.gson.annotations.SerializedName;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.IOException;
/**
* A list of domains allowed to play your videos.
*/
@ApiModel(description = "A list of domains allowed to play your videos.")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
public class ReferrerDomainRestriction {
public static final String SERIALIZED_NAME_ALLOWED_DOMAINS = "allowed_domains";
@SerializedName(SERIALIZED_NAME_ALLOWED_DOMAINS)
private java.util.List allowedDomains = null;
public static final String SERIALIZED_NAME_ALLOW_NO_REFERRER = "allow_no_referrer";
@SerializedName(SERIALIZED_NAME_ALLOW_NO_REFERRER)
private Boolean allowNoReferrer = false;
public ReferrerDomainRestriction allowedDomains(java.util.List allowedDomains) {
this.allowedDomains = allowedDomains;
return this;
}
public ReferrerDomainRestriction addAllowedDomainsItem(String allowedDomainsItem) {
if (this.allowedDomains == null) {
this.allowedDomains = new java.util.ArrayList<>();
}
this.allowedDomains.add(allowedDomainsItem);
return this;
}
/**
* List of domains allowed to play videos. Possible values are * `[]` Empty Array indicates deny video playback requests for all domains * `[\"*\"]` A Single Wildcard `*` entry means allow video playback requests from any domain * `[\"*.example.com\", \"foo.com\"]` A list of up to 10 domains or valid dns-style wildcards
* @return allowedDomains
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "List of domains allowed to play videos. Possible values are * `[]` Empty Array indicates deny video playback requests for all domains * `[\"*\"]` A Single Wildcard `*` entry means allow video playback requests from any domain * `[\"*.example.com\", \"foo.com\"]` A list of up to 10 domains or valid dns-style wildcards ")
public java.util.List getAllowedDomains() {
return allowedDomains;
}
public void setAllowedDomains(java.util.List allowedDomains) {
this.allowedDomains = allowedDomains;
}
public ReferrerDomainRestriction allowNoReferrer(Boolean allowNoReferrer) {
this.allowNoReferrer = allowNoReferrer;
return this;
}
/**
* A boolean to determine whether to allow or deny HTTP requests without `Referer` HTTP request header. Playback requests coming from non-web/native applications like iOS, Android or smart TVs will not have a `Referer` HTTP header. Set this value to `true` to allow these playback requests.
* @return allowNoReferrer
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "A boolean to determine whether to allow or deny HTTP requests without `Referer` HTTP request header. Playback requests coming from non-web/native applications like iOS, Android or smart TVs will not have a `Referer` HTTP header. Set this value to `true` to allow these playback requests.")
public Boolean getAllowNoReferrer() {
return allowNoReferrer;
}
public void setAllowNoReferrer(Boolean allowNoReferrer) {
this.allowNoReferrer = allowNoReferrer;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
ReferrerDomainRestriction referrerDomainRestriction = (ReferrerDomainRestriction) o;
return Objects.equals(this.allowedDomains, referrerDomainRestriction.allowedDomains) &&
Objects.equals(this.allowNoReferrer, referrerDomainRestriction.allowNoReferrer);
}
@Override
public int hashCode() {
return Objects.hash(allowedDomains, allowNoReferrer);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class ReferrerDomainRestriction {\n");
sb.append(" allowedDomains: ").append(toIndentedString(allowedDomains)).append("\n");
sb.append(" allowNoReferrer: ").append(toIndentedString(allowNoReferrer)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy