Class ListLocationsResponse.Builder (2.7.4)
Note: Some or all of the information on this page might not apply
to Trusted Cloud. For a list of services that are available in
Trusted Cloud, see Services available for
Trusted Cloud .
Version 2.7.4keyboard_arrow_down
public static final class ListLocationsResponse . Builder extends GeneratedMessageV3 . Builder<ListLocationsResponse . Builder > implements ListLocationsResponseOrBuilder
The response message for Locations.ListLocations .
Protobuf type google.cloud.location.ListLocationsResponse
Static Methods
getDescriptor()
public static final Descriptors . Descriptor getDescriptor ()
Returns
Methods
addAllLocations(Iterable<? extends Location> values)
public ListLocationsResponse . Builder addAllLocations ( Iterable <? extends Location > values )
A list of locations that matches the specified filter in the request.
repeated .google.cloud.location.Location locations = 1;
Parameter
Name
Description
values
Iterable <? extends com.google.cloud.location.Location >
Returns
addLocations(Location value)
public ListLocationsResponse . Builder addLocations ( Location value )
A list of locations that matches the specified filter in the request.
repeated .google.cloud.location.Location locations = 1;
Parameter
Returns
addLocations(Location.Builder builderForValue)
public ListLocationsResponse . Builder addLocations ( Location . Builder builderForValue )
A list of locations that matches the specified filter in the request.
repeated .google.cloud.location.Location locations = 1;
Parameter
Returns
addLocations(int index, Location value)
public ListLocationsResponse . Builder addLocations ( int index , Location value )
A list of locations that matches the specified filter in the request.
repeated .google.cloud.location.Location locations = 1;
Parameters
Returns
addLocations(int index, Location.Builder builderForValue)
public ListLocationsResponse . Builder addLocations ( int index , Location . Builder builderForValue )
A list of locations that matches the specified filter in the request.
repeated .google.cloud.location.Location locations = 1;
Parameters
Returns
addLocationsBuilder()
public Location . Builder addLocationsBuilder ()
A list of locations that matches the specified filter in the request.
repeated .google.cloud.location.Location locations = 1;
Returns
addLocationsBuilder(int index)
public Location . Builder addLocationsBuilder ( int index )
A list of locations that matches the specified filter in the request.
repeated .google.cloud.location.Location locations = 1;
Parameter
Name
Description
index
int
Returns
addRepeatedField(Descriptors.FieldDescriptor field, Object value)
public ListLocationsResponse . Builder addRepeatedField ( Descriptors . FieldDescriptor field , Object value )
Parameters
Returns
Overrides
build()
public ListLocationsResponse build ()
Returns
buildPartial()
public ListLocationsResponse buildPartial ()
Returns
clear()
public ListLocationsResponse . Builder clear ()
Returns
Overrides
clearField(Descriptors.FieldDescriptor field)
public ListLocationsResponse . Builder clearField ( Descriptors . FieldDescriptor field )
Parameter
Returns
Overrides
clearLocations()
public ListLocationsResponse . Builder clearLocations ()
A list of locations that matches the specified filter in the request.
repeated .google.cloud.location.Location locations = 1;
Returns
clearNextPageToken()
public ListLocationsResponse . Builder clearNextPageToken ()
The standard List next-page token.
string next_page_token = 2;
Returns
clearOneof(Descriptors.OneofDescriptor oneof)
public ListLocationsResponse . Builder clearOneof ( Descriptors . OneofDescriptor oneof )
Parameter
Returns
Overrides
clone()
public ListLocationsResponse . Builder clone ()
Returns
Overrides
getDefaultInstanceForType()
public ListLocationsResponse getDefaultInstanceForType ()
Returns
getDescriptorForType()
public Descriptors . Descriptor getDescriptorForType ()
Returns
Overrides
getLocations(int index)
public Location getLocations ( int index )
A list of locations that matches the specified filter in the request.
repeated .google.cloud.location.Location locations = 1;
Parameter
Name
Description
index
int
Returns
getLocationsBuilder(int index)
public Location . Builder getLocationsBuilder ( int index )
A list of locations that matches the specified filter in the request.
repeated .google.cloud.location.Location locations = 1;
Parameter
Name
Description
index
int
Returns
getLocationsBuilderList()
public List<Location . Builder > getLocationsBuilderList ()
A list of locations that matches the specified filter in the request.
repeated .google.cloud.location.Location locations = 1;
Returns
getLocationsCount()
public int getLocationsCount ()
A list of locations that matches the specified filter in the request.
repeated .google.cloud.location.Location locations = 1;
Returns
getLocationsList()
public List<Location> getLocationsList ()
A list of locations that matches the specified filter in the request.
repeated .google.cloud.location.Location locations = 1;
Returns
getLocationsOrBuilder(int index)
public LocationOrBuilder getLocationsOrBuilder ( int index )
A list of locations that matches the specified filter in the request.
repeated .google.cloud.location.Location locations = 1;
Parameter
Name
Description
index
int
Returns
getLocationsOrBuilderList()
public List <? extends LocationOrBuilder > getLocationsOrBuilderList ()
A list of locations that matches the specified filter in the request.
repeated .google.cloud.location.Location locations = 1;
Returns
Type
Description
List <? extends com.google.cloud.location.LocationOrBuilder >
getNextPageToken()
public String getNextPageToken ()
The standard List next-page token.
string next_page_token = 2;
Returns
Type
Description
String
The nextPageToken.
getNextPageTokenBytes()
public ByteString getNextPageTokenBytes ()
The standard List next-page token.
string next_page_token = 2;
Returns
Type
Description
ByteString
The bytes for nextPageToken.
internalGetFieldAccessorTable()
protected GeneratedMessageV3 . FieldAccessorTable internalGetFieldAccessorTable ()
Returns
Overrides
isInitialized()
public final boolean isInitialized ()
Returns
Overrides
mergeFrom(ListLocationsResponse other)
public ListLocationsResponse . Builder mergeFrom ( ListLocationsResponse other )
Parameter
Returns
public ListLocationsResponse . Builder mergeFrom ( CodedInputStream input , ExtensionRegistryLite extensionRegistry )
Parameters
Returns
Overrides
Exceptions
mergeFrom(Message other)
public ListLocationsResponse . Builder mergeFrom ( Message other )
Parameter
Returns
Overrides
mergeUnknownFields(UnknownFieldSet unknownFields)
public final ListLocationsResponse . Builder mergeUnknownFields ( UnknownFieldSet unknownFields )
Parameter
Returns
Overrides
removeLocations(int index)
public ListLocationsResponse . Builder removeLocations ( int index )
A list of locations that matches the specified filter in the request.
repeated .google.cloud.location.Location locations = 1;
Parameter
Name
Description
index
int
Returns
setField(Descriptors.FieldDescriptor field, Object value)
public ListLocationsResponse . Builder setField ( Descriptors . FieldDescriptor field , Object value )
Parameters
Returns
Overrides
setLocations(int index, Location value)
public ListLocationsResponse . Builder setLocations ( int index , Location value )
A list of locations that matches the specified filter in the request.
repeated .google.cloud.location.Location locations = 1;
Parameters
Returns
setLocations(int index, Location.Builder builderForValue)
public ListLocationsResponse . Builder setLocations ( int index , Location . Builder builderForValue )
A list of locations that matches the specified filter in the request.
repeated .google.cloud.location.Location locations = 1;
Parameters
Returns
setNextPageToken(String value)
public ListLocationsResponse . Builder setNextPageToken ( String value )
The standard List next-page token.
string next_page_token = 2;
Parameter
Name
Description
value
String
The nextPageToken to set.
Returns
setNextPageTokenBytes(ByteString value)
public ListLocationsResponse . Builder setNextPageTokenBytes ( ByteString value )
The standard List next-page token.
string next_page_token = 2;
Parameter
Name
Description
value
ByteString
The bytes for nextPageToken to set.
Returns
setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
public ListLocationsResponse . Builder setRepeatedField ( Descriptors . FieldDescriptor field , int index , Object value )
Parameters
Returns
Overrides
setUnknownFields(UnknownFieldSet unknownFields)
public final ListLocationsResponse . Builder setUnknownFields ( UnknownFieldSet unknownFields )
Parameter
Returns
Overrides
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License , and code samples are licensed under the Apache 2.0 License . For details, see the Google Developers Site Policies . Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-08-15 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-15 UTC."],[],[],null,[]]