Class MediaLocation.Builder (0.54.0)

public static final class MediaLocation.Builder extends GeneratedMessage.Builder<MediaLocation.Builder> implements MediaLocationOrBuilder

Config that associates a media location with a security policy and the authentication credentials needed to access the content.

Protobuf type google.ads.admanager.v1.MediaLocation

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

Methods

build()

public MediaLocation build()
Returns
Type Description
MediaLocation

buildPartial()

public MediaLocation buildPartial()
Returns
Type Description
MediaLocation

clear()

public MediaLocation.Builder clear()
Returns
Type Description
MediaLocation.Builder
Overrides

clearDisplayName()

public MediaLocation.Builder clearDisplayName()

Output only. The name of the media location. This value is read-only and is assigned by Google.

optional string display_name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
MediaLocation.Builder

This builder for chaining.

clearSecurityPolicy()

public MediaLocation.Builder clearSecurityPolicy()

Optional. The security policy and authentication credentials needed to access the content in this media location. Optional; if omitted, no security policy will be applied (indicating a public/unprotected location). Must NOT be configured for ad media delivery locations (doing so will trigger a validation error).

.google.ads.admanager.v1.CdnSecurityPolicy security_policy = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
MediaLocation.Builder

clearUrlPrefix()

public MediaLocation.Builder clearUrlPrefix()

Required. The URL prefix of the media location. This value is required for a valid media location.

optional string url_prefix = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
MediaLocation.Builder

This builder for chaining.

getDefaultInstanceForType()

public MediaLocation getDefaultInstanceForType()
Returns
Type Description
MediaLocation

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
Overrides

getDisplayName()

public String getDisplayName()

Output only. The name of the media location. This value is read-only and is assigned by Google.

optional string display_name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
String

The displayName.

getDisplayNameBytes()

public ByteString getDisplayNameBytes()

Output only. The name of the media location. This value is read-only and is assigned by Google.

optional string display_name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
ByteString

The bytes for displayName.

getSecurityPolicy()

public CdnSecurityPolicy getSecurityPolicy()

Optional. The security policy and authentication credentials needed to access the content in this media location. Optional; if omitted, no security policy will be applied (indicating a public/unprotected location). Must NOT be configured for ad media delivery locations (doing so will trigger a validation error).

.google.ads.admanager.v1.CdnSecurityPolicy security_policy = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
CdnSecurityPolicy

The securityPolicy.

getSecurityPolicyBuilder()

public CdnSecurityPolicy.Builder getSecurityPolicyBuilder()

Optional. The security policy and authentication credentials needed to access the content in this media location. Optional; if omitted, no security policy will be applied (indicating a public/unprotected location). Must NOT be configured for ad media delivery locations (doing so will trigger a validation error).

.google.ads.admanager.v1.CdnSecurityPolicy security_policy = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
CdnSecurityPolicy.Builder

getSecurityPolicyOrBuilder()

public CdnSecurityPolicyOrBuilder getSecurityPolicyOrBuilder()

Optional. The security policy and authentication credentials needed to access the content in this media location. Optional; if omitted, no security policy will be applied (indicating a public/unprotected location). Must NOT be configured for ad media delivery locations (doing so will trigger a validation error).

.google.ads.admanager.v1.CdnSecurityPolicy security_policy = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
CdnSecurityPolicyOrBuilder

getUrlPrefix()

public String getUrlPrefix()

Required. The URL prefix of the media location. This value is required for a valid media location.

optional string url_prefix = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
String

The urlPrefix.

getUrlPrefixBytes()

public ByteString getUrlPrefixBytes()

Required. The URL prefix of the media location. This value is required for a valid media location.

optional string url_prefix = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
ByteString

The bytes for urlPrefix.

hasDisplayName()

public boolean hasDisplayName()

Output only. The name of the media location. This value is read-only and is assigned by Google.

optional string display_name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
boolean

Whether the displayName field is set.

hasSecurityPolicy()

public boolean hasSecurityPolicy()

Optional. The security policy and authentication credentials needed to access the content in this media location. Optional; if omitted, no security policy will be applied (indicating a public/unprotected location). Must NOT be configured for ad media delivery locations (doing so will trigger a validation error).

.google.ads.admanager.v1.CdnSecurityPolicy security_policy = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

Whether the securityPolicy field is set.

hasUrlPrefix()

public boolean hasUrlPrefix()

Required. The URL prefix of the media location. This value is required for a valid media location.

optional string url_prefix = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
boolean

Whether the urlPrefix field is set.

internalGetFieldAccessorTable()

protected GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(MediaLocation other)

public MediaLocation.Builder mergeFrom(MediaLocation other)
Parameter
Name Description
other MediaLocation
Returns
Type Description
MediaLocation.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public MediaLocation.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
MediaLocation.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

public MediaLocation.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
MediaLocation.Builder
Overrides

mergeSecurityPolicy(CdnSecurityPolicy value)

public MediaLocation.Builder mergeSecurityPolicy(CdnSecurityPolicy value)

Optional. The security policy and authentication credentials needed to access the content in this media location. Optional; if omitted, no security policy will be applied (indicating a public/unprotected location). Must NOT be configured for ad media delivery locations (doing so will trigger a validation error).

.google.ads.admanager.v1.CdnSecurityPolicy security_policy = 3 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value CdnSecurityPolicy
Returns
Type Description
MediaLocation.Builder

setDisplayName(String value)

public MediaLocation.Builder setDisplayName(String value)

Output only. The name of the media location. This value is read-only and is assigned by Google.

optional string display_name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value String

The displayName to set.

Returns
Type Description
MediaLocation.Builder

This builder for chaining.

setDisplayNameBytes(ByteString value)

public MediaLocation.Builder setDisplayNameBytes(ByteString value)

Output only. The name of the media location. This value is read-only and is assigned by Google.

optional string display_name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value ByteString

The bytes for displayName to set.

Returns
Type Description
MediaLocation.Builder

This builder for chaining.

setSecurityPolicy(CdnSecurityPolicy value)

public MediaLocation.Builder setSecurityPolicy(CdnSecurityPolicy value)

Optional. The security policy and authentication credentials needed to access the content in this media location. Optional; if omitted, no security policy will be applied (indicating a public/unprotected location). Must NOT be configured for ad media delivery locations (doing so will trigger a validation error).

.google.ads.admanager.v1.CdnSecurityPolicy security_policy = 3 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value CdnSecurityPolicy
Returns
Type Description
MediaLocation.Builder

setSecurityPolicy(CdnSecurityPolicy.Builder builderForValue)

public MediaLocation.Builder setSecurityPolicy(CdnSecurityPolicy.Builder builderForValue)

Optional. The security policy and authentication credentials needed to access the content in this media location. Optional; if omitted, no security policy will be applied (indicating a public/unprotected location). Must NOT be configured for ad media delivery locations (doing so will trigger a validation error).

.google.ads.admanager.v1.CdnSecurityPolicy security_policy = 3 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
builderForValue CdnSecurityPolicy.Builder
Returns
Type Description
MediaLocation.Builder

setUrlPrefix(String value)

public MediaLocation.Builder setUrlPrefix(String value)

Required. The URL prefix of the media location. This value is required for a valid media location.

optional string url_prefix = 2 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value String

The urlPrefix to set.

Returns
Type Description
MediaLocation.Builder

This builder for chaining.

setUrlPrefixBytes(ByteString value)

public MediaLocation.Builder setUrlPrefixBytes(ByteString value)

Required. The URL prefix of the media location. This value is required for a valid media location.

optional string url_prefix = 2 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value ByteString

The bytes for urlPrefix to set.

Returns
Type Description
MediaLocation.Builder

This builder for chaining.