Class Location.Builder (1.83.0)

public static final class Location.Builder extends GeneratedMessage.Builder<Location.Builder> implements LocationOrBuilder

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

Protobuf type google.cloud.optimization.v1.Location

Implements

LocationOrBuilder

Static Methods

getDescriptor()

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

Methods

build()

public Location build()
Returns
Type Description
Location

buildPartial()

public Location buildPartial()
Returns
Type Description
Location

clear()

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

clearHeading()

public Location.Builder clearHeading()

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()

public Location.Builder clearLatLng()

The waypoint's geographic coordinates.

.google.type.LatLng lat_lng = 1;

Returns
Type Description
Location.Builder

getDefaultInstanceForType()

public Location getDefaultInstanceForType()
Returns
Type Description
Location

getDescriptorForType()

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

getHeading()

public int getHeading()

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()

public LatLng getLatLng()

The waypoint's geographic coordinates.

.google.type.LatLng lat_lng = 1;

Returns
Type Description
com.google.type.LatLng

The latLng.

getLatLngBuilder()

public LatLng.Builder getLatLngBuilder()

The waypoint's geographic coordinates.

.google.type.LatLng lat_lng = 1;

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

getLatLngOrBuilder()

public LatLngOrBuilder getLatLngOrBuilder()

The waypoint's geographic coordinates.

.google.type.LatLng lat_lng = 1;

Returns
Type Description
com.google.type.LatLngOrBuilder

hasHeading()

public boolean hasHeading()

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()

public boolean hasLatLng()

The waypoint's geographic coordinates.

.google.type.LatLng lat_lng = 1;

Returns
Type Description
boolean

Whether the latLng field is set.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(Location other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeLatLng(LatLng value)

public Location.Builder mergeLatLng(LatLng value)

The waypoint's geographic coordinates.

.google.type.LatLng lat_lng = 1;

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

setHeading(int value)

public Location.Builder setHeading(int value)

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)

public Location.Builder setLatLng(LatLng value)

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)

public Location.Builder setLatLng(LatLng.Builder builderForValue)

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