Class SystemParameters.Builder (2.43.0)

public static final class SystemParameters.Builder extends GeneratedMessageV3.Builder<SystemParameters.Builder> implements SystemParametersOrBuilder

System parameter configuration

A system parameter is a special kind of parameter defined by the API system, not by an individual API. It is typically mapped to an HTTP header and/or a URL query parameter. This configuration specifies which methods change the names of the system parameters.

Protobuf type google.api.SystemParameters

Static Methods

getDescriptor()

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

Methods

addAllRules(Iterable<? extends SystemParameterRule> values)

public SystemParameters.Builder addAllRules(Iterable<? extends SystemParameterRule> values)

Define system parameters.

The parameters defined here will override the default parameters implemented by the system. If this field is missing from the service config, default system parameters will be used. Default system parameters and names is implementation-dependent.

Example: define api key for all methods

 system_parameters
   rules:
     - selector: "*"
       parameters:
         - name: api_key
           url_query_parameter: api_key

Example: define 2 api key names for a specific method.

 system_parameters
   rules:
     - selector: "/ListShelves"
       parameters:
         - name: api_key
           http_header: Api-Key1
         - name: api_key
           http_header: Api-Key2

NOTE: All service configuration rules follow "last one wins" order.

repeated .google.api.SystemParameterRule rules = 1;

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

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

addRules(SystemParameterRule value)

public SystemParameters.Builder addRules(SystemParameterRule value)

Define system parameters.

The parameters defined here will override the default parameters implemented by the system. If this field is missing from the service config, default system parameters will be used. Default system parameters and names is implementation-dependent.

Example: define api key for all methods

 system_parameters
   rules:
     - selector: "*"
       parameters:
         - name: api_key
           url_query_parameter: api_key

Example: define 2 api key names for a specific method.

 system_parameters
   rules:
     - selector: "/ListShelves"
       parameters:
         - name: api_key
           http_header: Api-Key1
         - name: api_key
           http_header: Api-Key2

NOTE: All service configuration rules follow "last one wins" order.

repeated .google.api.SystemParameterRule rules = 1;

Parameter
Name Description
value SystemParameterRule
Returns
Type Description
SystemParameters.Builder

addRules(SystemParameterRule.Builder builderForValue)

public SystemParameters.Builder addRules(SystemParameterRule.Builder builderForValue)

Define system parameters.

The parameters defined here will override the default parameters implemented by the system. If this field is missing from the service config, default system parameters will be used. Default system parameters and names is implementation-dependent.

Example: define api key for all methods

 system_parameters
   rules:
     - selector: "*"
       parameters:
         - name: api_key
           url_query_parameter: api_key

Example: define 2 api key names for a specific method.

 system_parameters
   rules:
     - selector: "/ListShelves"
       parameters:
         - name: api_key
           http_header: Api-Key1
         - name: api_key
           http_header: Api-Key2

NOTE: All service configuration rules follow "last one wins" order.

repeated .google.api.SystemParameterRule rules = 1;

Parameter
Name Description
builderForValue SystemParameterRule.Builder
Returns
Type Description
SystemParameters.Builder

addRules(int index, SystemParameterRule value)

public SystemParameters.Builder addRules(int index, SystemParameterRule value)

Define system parameters.

The parameters defined here will override the default parameters implemented by the system. If this field is missing from the service config, default system parameters will be used. Default system parameters and names is implementation-dependent.

Example: define api key for all methods

 system_parameters
   rules:
     - selector: "*"
       parameters:
         - name: api_key
           url_query_parameter: api_key

Example: define 2 api key names for a specific method.

 system_parameters
   rules:
     - selector: "/ListShelves"
       parameters:
         - name: api_key
           http_header: Api-Key1
         - name: api_key
           http_header: Api-Key2

NOTE: All service configuration rules follow "last one wins" order.

repeated .google.api.SystemParameterRule rules = 1;

Parameters
Name Description
index int
value SystemParameterRule
Returns
Type Description
SystemParameters.Builder

addRules(int index, SystemParameterRule.Builder builderForValue)

public SystemParameters.Builder addRules(int index, SystemParameterRule.Builder builderForValue)

Define system parameters.

The parameters defined here will override the default parameters implemented by the system. If this field is missing from the service config, default system parameters will be used. Default system parameters and names is implementation-dependent.

Example: define api key for all methods

 system_parameters
   rules:
     - selector: "*"
       parameters:
         - name: api_key
           url_query_parameter: api_key

Example: define 2 api key names for a specific method.

 system_parameters
   rules:
     - selector: "/ListShelves"
       parameters:
         - name: api_key
           http_header: Api-Key1
         - name: api_key
           http_header: Api-Key2

NOTE: All service configuration rules follow "last one wins" order.

repeated .google.api.SystemParameterRule rules = 1;

Parameters
Name Description
index int
builderForValue SystemParameterRule.Builder
Returns
Type Description
SystemParameters.Builder

addRulesBuilder()

public SystemParameterRule.Builder addRulesBuilder()

Define system parameters.

The parameters defined here will override the default parameters implemented by the system. If this field is missing from the service config, default system parameters will be used. Default system parameters and names is implementation-dependent.

Example: define api key for all methods

 system_parameters
   rules:
     - selector: "*"
       parameters:
         - name: api_key
           url_query_parameter: api_key

Example: define 2 api key names for a specific method.

 system_parameters
   rules:
     - selector: "/ListShelves"
       parameters:
         - name: api_key
           http_header: Api-Key1
         - name: api_key
           http_header: Api-Key2

NOTE: All service configuration rules follow "last one wins" order.

repeated .google.api.SystemParameterRule rules = 1;

Returns
Type Description
SystemParameterRule.Builder

addRulesBuilder(int index)

public SystemParameterRule.Builder addRulesBuilder(int index)

Define system parameters.

The parameters defined here will override the default parameters implemented by the system. If this field is missing from the service config, default system parameters will be used. Default system parameters and names is implementation-dependent.

Example: define api key for all methods

 system_parameters
   rules:
     - selector: "*"
       parameters:
         - name: api_key
           url_query_parameter: api_key

Example: define 2 api key names for a specific method.

 system_parameters
   rules:
     - selector: "/ListShelves"
       parameters:
         - name: api_key
           http_header: Api-Key1
         - name: api_key
           http_header: Api-Key2

NOTE: All service configuration rules follow "last one wins" order.

repeated .google.api.SystemParameterRule rules = 1;

Parameter
Name Description
index int
Returns
Type Description
SystemParameterRule.Builder

build()

public SystemParameters build()
Returns
Type Description
SystemParameters

buildPartial()

public SystemParameters buildPartial()
Returns
Type Description
SystemParameters

clear()

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

clearField(Descriptors.FieldDescriptor field)

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

clearOneof(Descriptors.OneofDescriptor oneof)

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

clearRules()

public SystemParameters.Builder clearRules()

Define system parameters.

The parameters defined here will override the default parameters implemented by the system. If this field is missing from the service config, default system parameters will be used. Default system parameters and names is implementation-dependent.

Example: define api key for all methods

 system_parameters
   rules:
     - selector: "*"
       parameters:
         - name: api_key
           url_query_parameter: api_key

Example: define 2 api key names for a specific method.

 system_parameters
   rules:
     - selector: "/ListShelves"
       parameters:
         - name: api_key
           http_header: Api-Key1
         - name: api_key
           http_header: Api-Key2

NOTE: All service configuration rules follow "last one wins" order.

repeated .google.api.SystemParameterRule rules = 1;

Returns
Type Description
SystemParameters.Builder

clone()

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

getDefaultInstanceForType()

public SystemParameters getDefaultInstanceForType()
Returns
Type Description
SystemParameters

getDescriptorForType()

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

getRules(int index)

public SystemParameterRule getRules(int index)

Define system parameters.

The parameters defined here will override the default parameters implemented by the system. If this field is missing from the service config, default system parameters will be used. Default system parameters and names is implementation-dependent.

Example: define api key for all methods

 system_parameters
   rules:
     - selector: "*"
       parameters:
         - name: api_key
           url_query_parameter: api_key

Example: define 2 api key names for a specific method.

 system_parameters
   rules:
     - selector: "/ListShelves"
       parameters:
         - name: api_key
           http_header: Api-Key1
         - name: api_key
           http_header: Api-Key2

NOTE: All service configuration rules follow "last one wins" order.

repeated .google.api.SystemParameterRule rules = 1;

Parameter
Name Description
index int
Returns
Type Description
SystemParameterRule

getRulesBuilder(int index)

public SystemParameterRule.Builder getRulesBuilder(int index)

Define system parameters.

The parameters defined here will override the default parameters implemented by the system. If this field is missing from the service config, default system parameters will be used. Default system parameters and names is implementation-dependent.

Example: define api key for all methods

 system_parameters
   rules:
     - selector: "*"
       parameters:
         - name: api_key
           url_query_parameter: api_key

Example: define 2 api key names for a specific method.

 system_parameters
   rules:
     - selector: "/ListShelves"
       parameters:
         - name: api_key
           http_header: Api-Key1
         - name: api_key
           http_header: Api-Key2

NOTE: All service configuration rules follow "last one wins" order.

repeated .google.api.SystemParameterRule rules = 1;

Parameter
Name Description
index int
Returns
Type Description
SystemParameterRule.Builder

getRulesBuilderList()

public List<SystemParameterRule.Builder> getRulesBuilderList()

Define system parameters.

The parameters defined here will override the default parameters implemented by the system. If this field is missing from the service config, default system parameters will be used. Default system parameters and names is implementation-dependent.

Example: define api key for all methods

 system_parameters
   rules:
     - selector: "*"
       parameters:
         - name: api_key
           url_query_parameter: api_key

Example: define 2 api key names for a specific method.

 system_parameters
   rules:
     - selector: "/ListShelves"
       parameters:
         - name: api_key
           http_header: Api-Key1
         - name: api_key
           http_header: Api-Key2

NOTE: All service configuration rules follow "last one wins" order.

repeated .google.api.SystemParameterRule rules = 1;

Returns
Type Description
List<Builder>

getRulesCount()

public int getRulesCount()

Define system parameters.

The parameters defined here will override the default parameters implemented by the system. If this field is missing from the service config, default system parameters will be used. Default system parameters and names is implementation-dependent.

Example: define api key for all methods

 system_parameters
   rules:
     - selector: "*"
       parameters:
         - name: api_key
           url_query_parameter: api_key

Example: define 2 api key names for a specific method.

 system_parameters
   rules:
     - selector: "/ListShelves"
       parameters:
         - name: api_key
           http_header: Api-Key1
         - name: api_key
           http_header: Api-Key2

NOTE: All service configuration rules follow "last one wins" order.

repeated .google.api.SystemParameterRule rules = 1;

Returns
Type Description
int

getRulesList()

public List<SystemParameterRule> getRulesList()

Define system parameters.

The parameters defined here will override the default parameters implemented by the system. If this field is missing from the service config, default system parameters will be used. Default system parameters and names is implementation-dependent.

Example: define api key for all methods

 system_parameters
   rules:
     - selector: "*"
       parameters:
         - name: api_key
           url_query_parameter: api_key

Example: define 2 api key names for a specific method.

 system_parameters
   rules:
     - selector: "/ListShelves"
       parameters:
         - name: api_key
           http_header: Api-Key1
         - name: api_key
           http_header: Api-Key2

NOTE: All service configuration rules follow "last one wins" order.

repeated .google.api.SystemParameterRule rules = 1;

Returns
Type Description
List<SystemParameterRule>

getRulesOrBuilder(int index)

public SystemParameterRuleOrBuilder getRulesOrBuilder(int index)

Define system parameters.

The parameters defined here will override the default parameters implemented by the system. If this field is missing from the service config, default system parameters will be used. Default system parameters and names is implementation-dependent.

Example: define api key for all methods

 system_parameters
   rules:
     - selector: "*"
       parameters:
         - name: api_key
           url_query_parameter: api_key

Example: define 2 api key names for a specific method.

 system_parameters
   rules:
     - selector: "/ListShelves"
       parameters:
         - name: api_key
           http_header: Api-Key1
         - name: api_key
           http_header: Api-Key2

NOTE: All service configuration rules follow "last one wins" order.

repeated .google.api.SystemParameterRule rules = 1;

Parameter
Name Description
index int
Returns
Type Description
SystemParameterRuleOrBuilder

getRulesOrBuilderList()

public List<? extends SystemParameterRuleOrBuilder> getRulesOrBuilderList()

Define system parameters.

The parameters defined here will override the default parameters implemented by the system. If this field is missing from the service config, default system parameters will be used. Default system parameters and names is implementation-dependent.

Example: define api key for all methods

 system_parameters
   rules:
     - selector: "*"
       parameters:
         - name: api_key
           url_query_parameter: api_key

Example: define 2 api key names for a specific method.

 system_parameters
   rules:
     - selector: "/ListShelves"
       parameters:
         - name: api_key
           http_header: Api-Key1
         - name: api_key
           http_header: Api-Key2

NOTE: All service configuration rules follow "last one wins" order.

repeated .google.api.SystemParameterRule rules = 1;

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

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(SystemParameters other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeUnknownFields(UnknownFieldSet unknownFields)

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

removeRules(int index)

public SystemParameters.Builder removeRules(int index)

Define system parameters.

The parameters defined here will override the default parameters implemented by the system. If this field is missing from the service config, default system parameters will be used. Default system parameters and names is implementation-dependent.

Example: define api key for all methods

 system_parameters
   rules:
     - selector: "*"
       parameters:
         - name: api_key
           url_query_parameter: api_key

Example: define 2 api key names for a specific method.

 system_parameters
   rules:
     - selector: "/ListShelves"
       parameters:
         - name: api_key
           http_header: Api-Key1
         - name: api_key
           http_header: Api-Key2

NOTE: All service configuration rules follow "last one wins" order.

repeated .google.api.SystemParameterRule rules = 1;

Parameter
Name Description
index int
Returns
Type Description
SystemParameters.Builder

setField(Descriptors.FieldDescriptor field, Object value)

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

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

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

setRules(int index, SystemParameterRule value)

public SystemParameters.Builder setRules(int index, SystemParameterRule value)

Define system parameters.

The parameters defined here will override the default parameters implemented by the system. If this field is missing from the service config, default system parameters will be used. Default system parameters and names is implementation-dependent.

Example: define api key for all methods

 system_parameters
   rules:
     - selector: "*"
       parameters:
         - name: api_key
           url_query_parameter: api_key

Example: define 2 api key names for a specific method.

 system_parameters
   rules:
     - selector: "/ListShelves"
       parameters:
         - name: api_key
           http_header: Api-Key1
         - name: api_key
           http_header: Api-Key2

NOTE: All service configuration rules follow "last one wins" order.

repeated .google.api.SystemParameterRule rules = 1;

Parameters
Name Description
index int
value SystemParameterRule
Returns
Type Description
SystemParameters.Builder

setRules(int index, SystemParameterRule.Builder builderForValue)

public SystemParameters.Builder setRules(int index, SystemParameterRule.Builder builderForValue)

Define system parameters.

The parameters defined here will override the default parameters implemented by the system. If this field is missing from the service config, default system parameters will be used. Default system parameters and names is implementation-dependent.

Example: define api key for all methods

 system_parameters
   rules:
     - selector: "*"
       parameters:
         - name: api_key
           url_query_parameter: api_key

Example: define 2 api key names for a specific method.

 system_parameters
   rules:
     - selector: "/ListShelves"
       parameters:
         - name: api_key
           http_header: Api-Key1
         - name: api_key
           http_header: Api-Key2

NOTE: All service configuration rules follow "last one wins" order.

repeated .google.api.SystemParameterRule rules = 1;

Parameters
Name Description
index int
builderForValue SystemParameterRule.Builder
Returns
Type Description
SystemParameters.Builder

setUnknownFields(UnknownFieldSet unknownFields)

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