Class MethodSettings.Builder (2.37.1)

public static final class MethodSettings.Builder extends GeneratedMessageV3.Builder<MethodSettings.Builder> implements MethodSettingsOrBuilder

Describes the generator configuration for a method.

Protobuf type google.api.MethodSettings

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

Methods

addAllAutoPopulatedFields(Iterable<String> values)

public MethodSettings.Builder addAllAutoPopulatedFields(Iterable<String> values)

List of top-level fields of the request message, that should be automatically populated by the client libraries based on their (google.api.field_info).format. Currently supported format: UUID4.

Example of a YAML configuration:

publishing: method_settings:

  • selector: google.example.v1.ExampleService.CreateExample auto_populated_fields:
    • request_id

repeated string auto_populated_fields = 3;

Parameter
NameDescription
valuesIterable<String>

The autoPopulatedFields to add.

Returns
TypeDescription
MethodSettings.Builder

This builder for chaining.

addAutoPopulatedFields(String value)

public MethodSettings.Builder addAutoPopulatedFields(String value)

List of top-level fields of the request message, that should be automatically populated by the client libraries based on their (google.api.field_info).format. Currently supported format: UUID4.

Example of a YAML configuration:

publishing: method_settings:

  • selector: google.example.v1.ExampleService.CreateExample auto_populated_fields:
    • request_id

repeated string auto_populated_fields = 3;

Parameter
NameDescription
valueString

The autoPopulatedFields to add.

Returns
TypeDescription
MethodSettings.Builder

This builder for chaining.

addAutoPopulatedFieldsBytes(ByteString value)

public MethodSettings.Builder addAutoPopulatedFieldsBytes(ByteString value)

List of top-level fields of the request message, that should be automatically populated by the client libraries based on their (google.api.field_info).format. Currently supported format: UUID4.

Example of a YAML configuration:

publishing: method_settings:

  • selector: google.example.v1.ExampleService.CreateExample auto_populated_fields:
    • request_id

repeated string auto_populated_fields = 3;

Parameter
NameDescription
valueByteString

The bytes of the autoPopulatedFields to add.

Returns
TypeDescription
MethodSettings.Builder

This builder for chaining.

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public MethodSettings build()
Returns
TypeDescription
MethodSettings

buildPartial()

public MethodSettings buildPartial()
Returns
TypeDescription
MethodSettings

clear()

public MethodSettings.Builder clear()
Returns
TypeDescription
MethodSettings.Builder
Overrides

clearAutoPopulatedFields()

public MethodSettings.Builder clearAutoPopulatedFields()

List of top-level fields of the request message, that should be automatically populated by the client libraries based on their (google.api.field_info).format. Currently supported format: UUID4.

Example of a YAML configuration:

publishing: method_settings:

  • selector: google.example.v1.ExampleService.CreateExample auto_populated_fields:
    • request_id

repeated string auto_populated_fields = 3;

Returns
TypeDescription
MethodSettings.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

public MethodSettings.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
MethodSettings.Builder
Overrides

clearLongRunning()

public MethodSettings.Builder clearLongRunning()

Describes settings to use for long-running operations when generating API methods for RPCs. Complements RPCs that use the annotations in google/longrunning/operations.proto.

Example of a YAML configuration::

publishing: method_settings:

  • selector: google.cloud.speech.v2.Speech.BatchRecognize long_running: initial_poll_delay: seconds: 60 # 1 minute poll_delay_multiplier: 1.5 max_poll_delay: seconds: 360 # 6 minutes total_poll_timeout: seconds: 54000 # 90 minutes

.google.api.MethodSettings.LongRunning long_running = 2;

Returns
TypeDescription
MethodSettings.Builder

clearOneof(Descriptors.OneofDescriptor oneof)

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

clearSelector()

public MethodSettings.Builder clearSelector()

The fully qualified name of the method, for which the options below apply. This is used to find the method to apply the options.

string selector = 1;

Returns
TypeDescription
MethodSettings.Builder

This builder for chaining.

clone()

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

getAutoPopulatedFields(int index)

public String getAutoPopulatedFields(int index)

List of top-level fields of the request message, that should be automatically populated by the client libraries based on their (google.api.field_info).format. Currently supported format: UUID4.

Example of a YAML configuration:

publishing: method_settings:

  • selector: google.example.v1.ExampleService.CreateExample auto_populated_fields:
    • request_id

repeated string auto_populated_fields = 3;

Parameter
NameDescription
indexint

The index of the element to return.

Returns
TypeDescription
String

The autoPopulatedFields at the given index.

getAutoPopulatedFieldsBytes(int index)

public ByteString getAutoPopulatedFieldsBytes(int index)

List of top-level fields of the request message, that should be automatically populated by the client libraries based on their (google.api.field_info).format. Currently supported format: UUID4.

Example of a YAML configuration:

publishing: method_settings:

  • selector: google.example.v1.ExampleService.CreateExample auto_populated_fields:
    • request_id

repeated string auto_populated_fields = 3;

Parameter
NameDescription
indexint

The index of the value to return.

Returns
TypeDescription
ByteString

The bytes of the autoPopulatedFields at the given index.

getAutoPopulatedFieldsCount()

public int getAutoPopulatedFieldsCount()

List of top-level fields of the request message, that should be automatically populated by the client libraries based on their (google.api.field_info).format. Currently supported format: UUID4.

Example of a YAML configuration:

publishing: method_settings:

  • selector: google.example.v1.ExampleService.CreateExample auto_populated_fields:
    • request_id

repeated string auto_populated_fields = 3;

Returns
TypeDescription
int

The count of autoPopulatedFields.

getAutoPopulatedFieldsList()

public ProtocolStringList getAutoPopulatedFieldsList()

List of top-level fields of the request message, that should be automatically populated by the client libraries based on their (google.api.field_info).format. Currently supported format: UUID4.

Example of a YAML configuration:

publishing: method_settings:

  • selector: google.example.v1.ExampleService.CreateExample auto_populated_fields:
    • request_id

repeated string auto_populated_fields = 3;

Returns
TypeDescription
ProtocolStringList

A list containing the autoPopulatedFields.

getDefaultInstanceForType()

public MethodSettings getDefaultInstanceForType()
Returns
TypeDescription
MethodSettings

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getLongRunning()

public MethodSettings.LongRunning getLongRunning()

Describes settings to use for long-running operations when generating API methods for RPCs. Complements RPCs that use the annotations in google/longrunning/operations.proto.

Example of a YAML configuration::

publishing: method_settings:

  • selector: google.cloud.speech.v2.Speech.BatchRecognize long_running: initial_poll_delay: seconds: 60 # 1 minute poll_delay_multiplier: 1.5 max_poll_delay: seconds: 360 # 6 minutes total_poll_timeout: seconds: 54000 # 90 minutes

.google.api.MethodSettings.LongRunning long_running = 2;

Returns
TypeDescription
MethodSettings.LongRunning

The longRunning.

getLongRunningBuilder()

public MethodSettings.LongRunning.Builder getLongRunningBuilder()

Describes settings to use for long-running operations when generating API methods for RPCs. Complements RPCs that use the annotations in google/longrunning/operations.proto.

Example of a YAML configuration::

publishing: method_settings:

  • selector: google.cloud.speech.v2.Speech.BatchRecognize long_running: initial_poll_delay: seconds: 60 # 1 minute poll_delay_multiplier: 1.5 max_poll_delay: seconds: 360 # 6 minutes total_poll_timeout: seconds: 54000 # 90 minutes

.google.api.MethodSettings.LongRunning long_running = 2;

Returns
TypeDescription
MethodSettings.LongRunning.Builder

getLongRunningOrBuilder()

public MethodSettings.LongRunningOrBuilder getLongRunningOrBuilder()

Describes settings to use for long-running operations when generating API methods for RPCs. Complements RPCs that use the annotations in google/longrunning/operations.proto.

Example of a YAML configuration::

publishing: method_settings:

  • selector: google.cloud.speech.v2.Speech.BatchRecognize long_running: initial_poll_delay: seconds: 60 # 1 minute poll_delay_multiplier: 1.5 max_poll_delay: seconds: 360 # 6 minutes total_poll_timeout: seconds: 54000 # 90 minutes

.google.api.MethodSettings.LongRunning long_running = 2;

Returns
TypeDescription
MethodSettings.LongRunningOrBuilder

getSelector()

public String getSelector()

The fully qualified name of the method, for which the options below apply. This is used to find the method to apply the options.

string selector = 1;

Returns
TypeDescription
String

The selector.

getSelectorBytes()

public ByteString getSelectorBytes()

The fully qualified name of the method, for which the options below apply. This is used to find the method to apply the options.

string selector = 1;

Returns
TypeDescription
ByteString

The bytes for selector.

hasLongRunning()

public boolean hasLongRunning()

Describes settings to use for long-running operations when generating API methods for RPCs. Complements RPCs that use the annotations in google/longrunning/operations.proto.

Example of a YAML configuration::

publishing: method_settings:

  • selector: google.cloud.speech.v2.Speech.BatchRecognize long_running: initial_poll_delay: seconds: 60 # 1 minute poll_delay_multiplier: 1.5 max_poll_delay: seconds: 360 # 6 minutes total_poll_timeout: seconds: 54000 # 90 minutes

.google.api.MethodSettings.LongRunning long_running = 2;

Returns
TypeDescription
boolean

Whether the longRunning field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(MethodSettings other)

public MethodSettings.Builder mergeFrom(MethodSettings other)
Parameter
NameDescription
otherMethodSettings
Returns
TypeDescription
MethodSettings.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeLongRunning(MethodSettings.LongRunning value)

public MethodSettings.Builder mergeLongRunning(MethodSettings.LongRunning value)

Describes settings to use for long-running operations when generating API methods for RPCs. Complements RPCs that use the annotations in google/longrunning/operations.proto.

Example of a YAML configuration::

publishing: method_settings:

  • selector: google.cloud.speech.v2.Speech.BatchRecognize long_running: initial_poll_delay: seconds: 60 # 1 minute poll_delay_multiplier: 1.5 max_poll_delay: seconds: 360 # 6 minutes total_poll_timeout: seconds: 54000 # 90 minutes

.google.api.MethodSettings.LongRunning long_running = 2;

Parameter
NameDescription
valueMethodSettings.LongRunning
Returns
TypeDescription
MethodSettings.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

public final MethodSettings.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
MethodSettings.Builder
Overrides

setAutoPopulatedFields(int index, String value)

public MethodSettings.Builder setAutoPopulatedFields(int index, String value)

List of top-level fields of the request message, that should be automatically populated by the client libraries based on their (google.api.field_info).format. Currently supported format: UUID4.

Example of a YAML configuration:

publishing: method_settings:

  • selector: google.example.v1.ExampleService.CreateExample auto_populated_fields:
    • request_id

repeated string auto_populated_fields = 3;

Parameters
NameDescription
indexint

The index to set the value at.

valueString

The autoPopulatedFields to set.

Returns
TypeDescription
MethodSettings.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

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

setLongRunning(MethodSettings.LongRunning value)

public MethodSettings.Builder setLongRunning(MethodSettings.LongRunning value)

Describes settings to use for long-running operations when generating API methods for RPCs. Complements RPCs that use the annotations in google/longrunning/operations.proto.

Example of a YAML configuration::

publishing: method_settings:

  • selector: google.cloud.speech.v2.Speech.BatchRecognize long_running: initial_poll_delay: seconds: 60 # 1 minute poll_delay_multiplier: 1.5 max_poll_delay: seconds: 360 # 6 minutes total_poll_timeout: seconds: 54000 # 90 minutes

.google.api.MethodSettings.LongRunning long_running = 2;

Parameter
NameDescription
valueMethodSettings.LongRunning
Returns
TypeDescription
MethodSettings.Builder

setLongRunning(MethodSettings.LongRunning.Builder builderForValue)

public MethodSettings.Builder setLongRunning(MethodSettings.LongRunning.Builder builderForValue)

Describes settings to use for long-running operations when generating API methods for RPCs. Complements RPCs that use the annotations in google/longrunning/operations.proto.

Example of a YAML configuration::

publishing: method_settings:

  • selector: google.cloud.speech.v2.Speech.BatchRecognize long_running: initial_poll_delay: seconds: 60 # 1 minute poll_delay_multiplier: 1.5 max_poll_delay: seconds: 360 # 6 minutes total_poll_timeout: seconds: 54000 # 90 minutes

.google.api.MethodSettings.LongRunning long_running = 2;

Parameter
NameDescription
builderForValueMethodSettings.LongRunning.Builder
Returns
TypeDescription
MethodSettings.Builder

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

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

setSelector(String value)

public MethodSettings.Builder setSelector(String value)

The fully qualified name of the method, for which the options below apply. This is used to find the method to apply the options.

string selector = 1;

Parameter
NameDescription
valueString

The selector to set.

Returns
TypeDescription
MethodSettings.Builder

This builder for chaining.

setSelectorBytes(ByteString value)

public MethodSettings.Builder setSelectorBytes(ByteString value)

The fully qualified name of the method, for which the options below apply. This is used to find the method to apply the options.

string selector = 1;

Parameter
NameDescription
valueByteString

The bytes for selector to set.

Returns
TypeDescription
MethodSettings.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

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