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
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
addRepeatedField(Descriptors.FieldDescriptor field, Object value)
public SystemParameters.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Returns
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
Returns
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
Returns
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
Returns
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
Returns
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
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
Returns
build()
public SystemParameters build()
Returns
buildPartial()
public SystemParameters buildPartial()
Returns
clear()
public SystemParameters.Builder clear()
Returns
Overrides
clearField(Descriptors.FieldDescriptor field)
public SystemParameters.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Returns
Overrides
clearOneof(Descriptors.OneofDescriptor oneof)
public SystemParameters.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Returns
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
clone()
public SystemParameters.Builder clone()
Returns
Overrides
getDefaultInstanceForType()
public SystemParameters getDefaultInstanceForType()
Returns
getDescriptorForType()
public Descriptors.Descriptor getDescriptorForType()
Returns
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
Returns
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
Returns
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
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
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
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
Returns
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
Overrides
isInitialized()
public final boolean isInitialized()
Returns
Overrides
mergeFrom(SystemParameters other)
public SystemParameters.Builder mergeFrom(SystemParameters other)
Parameter
Returns
public SystemParameters.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Overrides
Exceptions
mergeFrom(Message other)
public SystemParameters.Builder mergeFrom(Message other)
Parameter
Returns
Overrides
mergeUnknownFields(UnknownFieldSet unknownFields)
public final SystemParameters.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Returns
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
Returns
setField(Descriptors.FieldDescriptor field, Object value)
public SystemParameters.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Returns
Overrides
setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
public SystemParameters.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Returns
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
Returns
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
Returns
setUnknownFields(UnknownFieldSet unknownFields)
public final SystemParameters.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Returns
Overrides