Class Control.Builder (2.40.0)

public static final class Control.Builder extends GeneratedMessageV3.Builder<Control.Builder> implements ControlOrBuilder

Selects and configures the service controller used by the service.

Example:

 control:
   environment: servicecontrol.googleapis.com

Protobuf type google.api.Control

Implements

ControlOrBuilder

Static Methods

getDescriptor()

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

Methods

addAllMethodPolicies(Iterable<? extends MethodPolicy> values)

public Control.Builder addAllMethodPolicies(Iterable<? extends MethodPolicy> values)

Defines policies applying to the API methods of the service.

repeated .google.api.MethodPolicy method_policies = 4;

Parameter
Name Description
values Iterable<? extends com.google.api.MethodPolicy>
Returns
Type Description
Control.Builder

addMethodPolicies(MethodPolicy value)

public Control.Builder addMethodPolicies(MethodPolicy value)

Defines policies applying to the API methods of the service.

repeated .google.api.MethodPolicy method_policies = 4;

Parameter
Name Description
value MethodPolicy
Returns
Type Description
Control.Builder

addMethodPolicies(MethodPolicy.Builder builderForValue)

public Control.Builder addMethodPolicies(MethodPolicy.Builder builderForValue)

Defines policies applying to the API methods of the service.

repeated .google.api.MethodPolicy method_policies = 4;

Parameter
Name Description
builderForValue MethodPolicy.Builder
Returns
Type Description
Control.Builder

addMethodPolicies(int index, MethodPolicy value)

public Control.Builder addMethodPolicies(int index, MethodPolicy value)

Defines policies applying to the API methods of the service.

repeated .google.api.MethodPolicy method_policies = 4;

Parameters
Name Description
index int
value MethodPolicy
Returns
Type Description
Control.Builder

addMethodPolicies(int index, MethodPolicy.Builder builderForValue)

public Control.Builder addMethodPolicies(int index, MethodPolicy.Builder builderForValue)

Defines policies applying to the API methods of the service.

repeated .google.api.MethodPolicy method_policies = 4;

Parameters
Name Description
index int
builderForValue MethodPolicy.Builder
Returns
Type Description
Control.Builder

addMethodPoliciesBuilder()

public MethodPolicy.Builder addMethodPoliciesBuilder()

Defines policies applying to the API methods of the service.

repeated .google.api.MethodPolicy method_policies = 4;

Returns
Type Description
MethodPolicy.Builder

addMethodPoliciesBuilder(int index)

public MethodPolicy.Builder addMethodPoliciesBuilder(int index)

Defines policies applying to the API methods of the service.

repeated .google.api.MethodPolicy method_policies = 4;

Parameter
Name Description
index int
Returns
Type Description
MethodPolicy.Builder

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public Control.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
Control.Builder
Overrides

build()

public Control build()
Returns
Type Description
Control

buildPartial()

public Control buildPartial()
Returns
Type Description
Control

clear()

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

clearEnvironment()

public Control.Builder clearEnvironment()

The service controller environment to use. If empty, no control plane feature (like quota and billing) will be enabled. The recommended value for most services is servicecontrol.googleapis.com

string environment = 1;

Returns
Type Description
Control.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

public Control.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
Control.Builder
Overrides

clearMethodPolicies()

public Control.Builder clearMethodPolicies()

Defines policies applying to the API methods of the service.

repeated .google.api.MethodPolicy method_policies = 4;

Returns
Type Description
Control.Builder

clearOneof(Descriptors.OneofDescriptor oneof)

public Control.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
Control.Builder
Overrides

clone()

public Control.Builder clone()
Returns
Type Description
Control.Builder
Overrides

getDefaultInstanceForType()

public Control getDefaultInstanceForType()
Returns
Type Description
Control

getDescriptorForType()

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

getEnvironment()

public String getEnvironment()

The service controller environment to use. If empty, no control plane feature (like quota and billing) will be enabled. The recommended value for most services is servicecontrol.googleapis.com

string environment = 1;

Returns
Type Description
String

The environment.

getEnvironmentBytes()

public ByteString getEnvironmentBytes()

The service controller environment to use. If empty, no control plane feature (like quota and billing) will be enabled. The recommended value for most services is servicecontrol.googleapis.com

string environment = 1;

Returns
Type Description
ByteString

The bytes for environment.

getMethodPolicies(int index)

public MethodPolicy getMethodPolicies(int index)

Defines policies applying to the API methods of the service.

repeated .google.api.MethodPolicy method_policies = 4;

Parameter
Name Description
index int
Returns
Type Description
MethodPolicy

getMethodPoliciesBuilder(int index)

public MethodPolicy.Builder getMethodPoliciesBuilder(int index)

Defines policies applying to the API methods of the service.

repeated .google.api.MethodPolicy method_policies = 4;

Parameter
Name Description
index int
Returns
Type Description
MethodPolicy.Builder

getMethodPoliciesBuilderList()

public List<MethodPolicy.Builder> getMethodPoliciesBuilderList()

Defines policies applying to the API methods of the service.

repeated .google.api.MethodPolicy method_policies = 4;

Returns
Type Description
List<Builder>

getMethodPoliciesCount()

public int getMethodPoliciesCount()

Defines policies applying to the API methods of the service.

repeated .google.api.MethodPolicy method_policies = 4;

Returns
Type Description
int

getMethodPoliciesList()

public List<MethodPolicy> getMethodPoliciesList()

Defines policies applying to the API methods of the service.

repeated .google.api.MethodPolicy method_policies = 4;

Returns
Type Description
List<MethodPolicy>

getMethodPoliciesOrBuilder(int index)

public MethodPolicyOrBuilder getMethodPoliciesOrBuilder(int index)

Defines policies applying to the API methods of the service.

repeated .google.api.MethodPolicy method_policies = 4;

Parameter
Name Description
index int
Returns
Type Description
MethodPolicyOrBuilder

getMethodPoliciesOrBuilderList()

public List<? extends MethodPolicyOrBuilder> getMethodPoliciesOrBuilderList()

Defines policies applying to the API methods of the service.

repeated .google.api.MethodPolicy method_policies = 4;

Returns
Type Description
List<? extends com.google.api.MethodPolicyOrBuilder>

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(Control other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeUnknownFields(UnknownFieldSet unknownFields)

public final Control.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
Control.Builder
Overrides

removeMethodPolicies(int index)

public Control.Builder removeMethodPolicies(int index)

Defines policies applying to the API methods of the service.

repeated .google.api.MethodPolicy method_policies = 4;

Parameter
Name Description
index int
Returns
Type Description
Control.Builder

setEnvironment(String value)

public Control.Builder setEnvironment(String value)

The service controller environment to use. If empty, no control plane feature (like quota and billing) will be enabled. The recommended value for most services is servicecontrol.googleapis.com

string environment = 1;

Parameter
Name Description
value String

The environment to set.

Returns
Type Description
Control.Builder

This builder for chaining.

setEnvironmentBytes(ByteString value)

public Control.Builder setEnvironmentBytes(ByteString value)

The service controller environment to use. If empty, no control plane feature (like quota and billing) will be enabled. The recommended value for most services is servicecontrol.googleapis.com

string environment = 1;

Parameter
Name Description
value ByteString

The bytes for environment to set.

Returns
Type Description
Control.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

public Control.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
Control.Builder
Overrides

setMethodPolicies(int index, MethodPolicy value)

public Control.Builder setMethodPolicies(int index, MethodPolicy value)

Defines policies applying to the API methods of the service.

repeated .google.api.MethodPolicy method_policies = 4;

Parameters
Name Description
index int
value MethodPolicy
Returns
Type Description
Control.Builder

setMethodPolicies(int index, MethodPolicy.Builder builderForValue)

public Control.Builder setMethodPolicies(int index, MethodPolicy.Builder builderForValue)

Defines policies applying to the API methods of the service.

repeated .google.api.MethodPolicy method_policies = 4;

Parameters
Name Description
index int
builderForValue MethodPolicy.Builder
Returns
Type Description
Control.Builder

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

public Control.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
Control.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

public final Control.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
Control.Builder
Overrides