Class Location.Builder (1.46.0)

publicstaticfinalclass Location.BuilderextendsGeneratedMessageV3.Builder<Location.Builder>implementsLocationOrBuilder

Encapsulates a location (a geographic point, and an optional heading).

Protobuf type google.cloud.optimization.v1.Location

Implements

LocationOrBuilder

Inherited Members

com.google.protobuf.GeneratedMessageV3.Builder.getUnknownFieldSetBuilder()
com.google.protobuf.GeneratedMessageV3.Builder.internalGetMapFieldReflection(int)
com.google.protobuf.GeneratedMessageV3.Builder.internalGetMutableMapFieldReflection(int)
com.google.protobuf.GeneratedMessageV3.Builder.mergeUnknownLengthDelimitedField(int,com.google.protobuf.ByteString)
com.google.protobuf.GeneratedMessageV3.Builder.mergeUnknownVarintField(int,int)
com.google.protobuf.GeneratedMessageV3.Builder.parseUnknownField(com.google.protobuf.CodedInputStream,com.google.protobuf.ExtensionRegistryLite,int)
com.google.protobuf.GeneratedMessageV3.Builder.setUnknownFieldSetBuilder(com.google.protobuf.UnknownFieldSet.Builder)

Static Methods

getDescriptor()

publicstaticfinalDescriptors.DescriptorgetDescriptor()
Returns
Type Description
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

publicLocation.BuilderaddRepeatedField(Descriptors.FieldDescriptorfield,Objectvalue)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
Location.Builder
Overrides

build()

publicLocationbuild()
Returns
Type Description
Location

buildPartial()

publicLocationbuildPartial()
Returns
Type Description
Location

clear()

publicLocation.Builderclear()
Returns
Type Description
Location.Builder
Overrides

clearField(Descriptors.FieldDescriptor field)

publicLocation.BuilderclearField(Descriptors.FieldDescriptorfield)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
Location.Builder
Overrides

clearHeading()

publicLocation.BuilderclearHeading()

The compass heading associated with the direction of the flow of traffic. This value is used to specify the side of the road to use for pickup and drop-off. Heading values can be from 0 to 360, where 0 specifies a heading of due North, 90 specifies a heading of due East, etc.

optional int32 heading = 2;

Returns
Type Description
Location.Builder

This builder for chaining.

clearLatLng()

publicLocation.BuilderclearLatLng()

The waypoint's geographic coordinates.

.google.type.LatLng lat_lng = 1;

Returns
Type Description
Location.Builder

clearOneof(Descriptors.OneofDescriptor oneof)

publicLocation.BuilderclearOneof(Descriptors.OneofDescriptoroneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
Location.Builder
Overrides

clone()

publicLocation.Builderclone()
Returns
Type Description
Location.Builder
Overrides

getDefaultInstanceForType()

publicLocationgetDefaultInstanceForType()
Returns
Type Description
Location

getDescriptorForType()

publicDescriptors.DescriptorgetDescriptorForType()
Returns
Type Description
Descriptor
Overrides

getHeading()

publicintgetHeading()

The compass heading associated with the direction of the flow of traffic. This value is used to specify the side of the road to use for pickup and drop-off. Heading values can be from 0 to 360, where 0 specifies a heading of due North, 90 specifies a heading of due East, etc.

optional int32 heading = 2;

Returns
Type Description
int

The heading.

getLatLng()

publicLatLnggetLatLng()

The waypoint's geographic coordinates.

.google.type.LatLng lat_lng = 1;

Returns
Type Description
com.google.type.LatLng

The latLng.

getLatLngBuilder()

publicLatLng.BuildergetLatLngBuilder()

The waypoint's geographic coordinates.

.google.type.LatLng lat_lng = 1;

Returns
Type Description
com.google.type.LatLng.Builder

getLatLngOrBuilder()

publicLatLngOrBuildergetLatLngOrBuilder()

The waypoint's geographic coordinates.

.google.type.LatLng lat_lng = 1;

Returns
Type Description
com.google.type.LatLngOrBuilder

hasHeading()

publicbooleanhasHeading()

The compass heading associated with the direction of the flow of traffic. This value is used to specify the side of the road to use for pickup and drop-off. Heading values can be from 0 to 360, where 0 specifies a heading of due North, 90 specifies a heading of due East, etc.

optional int32 heading = 2;

Returns
Type Description
boolean

Whether the heading field is set.

hasLatLng()

publicbooleanhasLatLng()

The waypoint's geographic coordinates.

.google.type.LatLng lat_lng = 1;

Returns
Type Description
boolean

Whether the latLng field is set.

internalGetFieldAccessorTable()

protectedGeneratedMessageV3.FieldAccessorTableinternalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

publicfinalbooleanisInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(Location other)

publicLocation.BuildermergeFrom(Locationother)
Parameter
Name Description
other Location
Returns
Type Description
Location.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

publicLocation.BuildermergeFrom(CodedInputStreaminput,ExtensionRegistryLiteextensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Location.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

publicLocation.BuildermergeFrom(Messageother)
Parameter
Name Description
other Message
Returns
Type Description
Location.Builder
Overrides

mergeLatLng(LatLng value)

publicLocation.BuildermergeLatLng(LatLngvalue)

The waypoint's geographic coordinates.

.google.type.LatLng lat_lng = 1;

Parameter
Name Description
value com.google.type.LatLng
Returns
Type Description
Location.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

publicfinalLocation.BuildermergeUnknownFields(UnknownFieldSetunknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
Location.Builder
Overrides

setField(Descriptors.FieldDescriptor field, Object value)

publicLocation.BuildersetField(Descriptors.FieldDescriptorfield,Objectvalue)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
Location.Builder
Overrides

setHeading(int value)

publicLocation.BuildersetHeading(intvalue)

The compass heading associated with the direction of the flow of traffic. This value is used to specify the side of the road to use for pickup and drop-off. Heading values can be from 0 to 360, where 0 specifies a heading of due North, 90 specifies a heading of due East, etc.

optional int32 heading = 2;

Parameter
Name Description
value int

The heading to set.

Returns
Type Description
Location.Builder

This builder for chaining.

setLatLng(LatLng value)

publicLocation.BuildersetLatLng(LatLngvalue)

The waypoint's geographic coordinates.

.google.type.LatLng lat_lng = 1;

Parameter
Name Description
value com.google.type.LatLng
Returns
Type Description
Location.Builder

setLatLng(LatLng.Builder builderForValue)

publicLocation.BuildersetLatLng(LatLng.BuilderbuilderForValue)

The waypoint's geographic coordinates.

.google.type.LatLng lat_lng = 1;

Parameter
Name Description
builderForValue com.google.type.LatLng.Builder
Returns
Type Description
Location.Builder

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

publicLocation.BuildersetRepeatedField(Descriptors.FieldDescriptorfield,intindex,Objectvalue)
Parameters
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
Location.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

publicfinalLocation.BuildersetUnknownFields(UnknownFieldSetunknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
Location.Builder
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年10月30日 UTC.