Class EndpointControlPolicy.Builder (0.3.0)

public static final class EndpointControlPolicy.Builder extends GeneratedMessage.Builder<EndpointControlPolicy.Builder> implements EndpointControlPolicyOrBuilder

Defines project/location level endpoint control policy.

Protobuf type google.cloud.ces.v1beta.EndpointControlPolicy

Static Methods

getDescriptor()

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

Methods

addAllAllowedOrigins(Iterable<String> values)

public EndpointControlPolicy.Builder addAllAllowedOrigins(Iterable<String> values)

Optional. The allowed HTTP(s) origins that tools in the App are able to directly call. The enforcement depends on the value of enforcement_scope and the VPC-SC status of the project. If a port number is not provided, all ports will be allowed. Otherwise, the port number must match exactly. For example, "https://example.com" will match "https://example.com:443" and any other port. "https://example.com:443" will only match "https://example.com:443".

repeated string allowed_origins = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
values Iterable<String>

The allowedOrigins to add.

Returns
Type Description
EndpointControlPolicy.Builder

This builder for chaining.

addAllowedOrigins(String value)

public EndpointControlPolicy.Builder addAllowedOrigins(String value)

Optional. The allowed HTTP(s) origins that tools in the App are able to directly call. The enforcement depends on the value of enforcement_scope and the VPC-SC status of the project. If a port number is not provided, all ports will be allowed. Otherwise, the port number must match exactly. For example, "https://example.com" will match "https://example.com:443" and any other port. "https://example.com:443" will only match "https://example.com:443".

repeated string allowed_origins = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value String

The allowedOrigins to add.

Returns
Type Description
EndpointControlPolicy.Builder

This builder for chaining.

addAllowedOriginsBytes(ByteString value)

public EndpointControlPolicy.Builder addAllowedOriginsBytes(ByteString value)

Optional. The allowed HTTP(s) origins that tools in the App are able to directly call. The enforcement depends on the value of enforcement_scope and the VPC-SC status of the project. If a port number is not provided, all ports will be allowed. Otherwise, the port number must match exactly. For example, "https://example.com" will match "https://example.com:443" and any other port. "https://example.com:443" will only match "https://example.com:443".

repeated string allowed_origins = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value ByteString

The bytes of the allowedOrigins to add.

Returns
Type Description
EndpointControlPolicy.Builder

This builder for chaining.

build()

public EndpointControlPolicy build()
Returns
Type Description
EndpointControlPolicy

buildPartial()

public EndpointControlPolicy buildPartial()
Returns
Type Description
EndpointControlPolicy

clear()

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

clearAllowedOrigins()

public EndpointControlPolicy.Builder clearAllowedOrigins()

Optional. The allowed HTTP(s) origins that tools in the App are able to directly call. The enforcement depends on the value of enforcement_scope and the VPC-SC status of the project. If a port number is not provided, all ports will be allowed. Otherwise, the port number must match exactly. For example, "https://example.com" will match "https://example.com:443" and any other port. "https://example.com:443" will only match "https://example.com:443".

repeated string allowed_origins = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
EndpointControlPolicy.Builder

This builder for chaining.

clearEnforcementScope()

public EndpointControlPolicy.Builder clearEnforcementScope()

Optional. The scope in which this policy's allowed_origins list is enforced.

.google.cloud.ces.v1beta.EndpointControlPolicy.EnforcementScope enforcement_scope = 1 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
EndpointControlPolicy.Builder

This builder for chaining.

getAllowedOrigins(int index)

public String getAllowedOrigins(int index)

Optional. The allowed HTTP(s) origins that tools in the App are able to directly call. The enforcement depends on the value of enforcement_scope and the VPC-SC status of the project. If a port number is not provided, all ports will be allowed. Otherwise, the port number must match exactly. For example, "https://example.com" will match "https://example.com:443" and any other port. "https://example.com:443" will only match "https://example.com:443".

repeated string allowed_origins = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int

The index of the element to return.

Returns
Type Description
String

The allowedOrigins at the given index.

getAllowedOriginsBytes(int index)

public ByteString getAllowedOriginsBytes(int index)

Optional. The allowed HTTP(s) origins that tools in the App are able to directly call. The enforcement depends on the value of enforcement_scope and the VPC-SC status of the project. If a port number is not provided, all ports will be allowed. Otherwise, the port number must match exactly. For example, "https://example.com" will match "https://example.com:443" and any other port. "https://example.com:443" will only match "https://example.com:443".

repeated string allowed_origins = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int

The index of the value to return.

Returns
Type Description
ByteString

The bytes of the allowedOrigins at the given index.

getAllowedOriginsCount()

public int getAllowedOriginsCount()

Optional. The allowed HTTP(s) origins that tools in the App are able to directly call. The enforcement depends on the value of enforcement_scope and the VPC-SC status of the project. If a port number is not provided, all ports will be allowed. Otherwise, the port number must match exactly. For example, "https://example.com" will match "https://example.com:443" and any other port. "https://example.com:443" will only match "https://example.com:443".

repeated string allowed_origins = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
int

The count of allowedOrigins.

getAllowedOriginsList()

public ProtocolStringList getAllowedOriginsList()

Optional. The allowed HTTP(s) origins that tools in the App are able to directly call. The enforcement depends on the value of enforcement_scope and the VPC-SC status of the project. If a port number is not provided, all ports will be allowed. Otherwise, the port number must match exactly. For example, "https://example.com" will match "https://example.com:443" and any other port. "https://example.com:443" will only match "https://example.com:443".

repeated string allowed_origins = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ProtocolStringList

A list containing the allowedOrigins.

getDefaultInstanceForType()

public EndpointControlPolicy getDefaultInstanceForType()
Returns
Type Description
EndpointControlPolicy

getDescriptorForType()

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

getEnforcementScope()

public EndpointControlPolicy.EnforcementScope getEnforcementScope()

Optional. The scope in which this policy's allowed_origins list is enforced.

.google.cloud.ces.v1beta.EndpointControlPolicy.EnforcementScope enforcement_scope = 1 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
EndpointControlPolicy.EnforcementScope

The enforcementScope.

getEnforcementScopeValue()

public int getEnforcementScopeValue()

Optional. The scope in which this policy's allowed_origins list is enforced.

.google.cloud.ces.v1beta.EndpointControlPolicy.EnforcementScope enforcement_scope = 1 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
int

The enum numeric value on the wire for enforcementScope.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(EndpointControlPolicy other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

setAllowedOrigins(int index, String value)

public EndpointControlPolicy.Builder setAllowedOrigins(int index, String value)

Optional. The allowed HTTP(s) origins that tools in the App are able to directly call. The enforcement depends on the value of enforcement_scope and the VPC-SC status of the project. If a port number is not provided, all ports will be allowed. Otherwise, the port number must match exactly. For example, "https://example.com" will match "https://example.com:443" and any other port. "https://example.com:443" will only match "https://example.com:443".

repeated string allowed_origins = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameters
Name Description
index int

The index to set the value at.

value String

The allowedOrigins to set.

Returns
Type Description
EndpointControlPolicy.Builder

This builder for chaining.

setEnforcementScope(EndpointControlPolicy.EnforcementScope value)

public EndpointControlPolicy.Builder setEnforcementScope(EndpointControlPolicy.EnforcementScope value)

Optional. The scope in which this policy's allowed_origins list is enforced.

.google.cloud.ces.v1beta.EndpointControlPolicy.EnforcementScope enforcement_scope = 1 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value EndpointControlPolicy.EnforcementScope

The enforcementScope to set.

Returns
Type Description
EndpointControlPolicy.Builder

This builder for chaining.

setEnforcementScopeValue(int value)

public EndpointControlPolicy.Builder setEnforcementScopeValue(int value)

Optional. The scope in which this policy's allowed_origins list is enforced.

.google.cloud.ces.v1beta.EndpointControlPolicy.EnforcementScope enforcement_scope = 1 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value int

The enum numeric value on the wire for enforcementScope to set.

Returns
Type Description
EndpointControlPolicy.Builder

This builder for chaining.