Class Control.Builder (2.30.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
TypeDescription
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
NameDescription
valuesIterable<? extends com.google.api.MethodPolicy>
Returns
TypeDescription
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
NameDescription
valueMethodPolicy
Returns
TypeDescription
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
NameDescription
builderForValueMethodPolicy.Builder
Returns
TypeDescription
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
NameDescription
indexint
valueMethodPolicy
Returns
TypeDescription
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
NameDescription
indexint
builderForValueMethodPolicy.Builder
Returns
TypeDescription
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
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
MethodPolicy.Builder

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public Control.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
Control.Builder
Overrides

build()

public Control build()
Returns
TypeDescription
Control

buildPartial()

public Control buildPartial()
Returns
TypeDescription
Control

clear()

public Control.Builder clear()
Returns
TypeDescription
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
TypeDescription
Control.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

public Control.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
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
TypeDescription
Control.Builder

clearOneof(Descriptors.OneofDescriptor oneof)

public Control.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
Control.Builder
Overrides

clone()

public Control.Builder clone()
Returns
TypeDescription
Control.Builder
Overrides

getDefaultInstanceForType()

public Control getDefaultInstanceForType()
Returns
TypeDescription
Control

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
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
TypeDescription
List<Builder>

getMethodPoliciesCount()

public int getMethodPoliciesCount()

Defines policies applying to the API methods of the service.

repeated .google.api.MethodPolicy method_policies = 4;

Returns
TypeDescription
int

getMethodPoliciesList()

public List<MethodPolicy> getMethodPoliciesList()

Defines policies applying to the API methods of the service.

repeated .google.api.MethodPolicy method_policies = 4;

Returns
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
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
TypeDescription
List<? extends com.google.api.MethodPolicyOrBuilder>

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(Control other)

public Control.Builder mergeFrom(Control other)
Parameter
NameDescription
otherControl
Returns
TypeDescription
Control.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public Control.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Control.Builder
Overrides
Exceptions
TypeDescription
IOException

mergeFrom(Message other)

public Control.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
Control.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

public final Control.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
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
NameDescription
valueString

The environment to set.

Returns
TypeDescription
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
NameDescription
valueByteString

The bytes for environment to set.

Returns
TypeDescription
Control.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

public Control.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
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
NameDescription
indexint
valueMethodPolicy
Returns
TypeDescription
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
NameDescription
indexint
builderForValueMethodPolicy.Builder
Returns
TypeDescription
Control.Builder

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

public Control.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
Control.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

public final Control.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
Control.Builder
Overrides