Class Location.Builder (1.45.0)

public static final class Location.Builder extends GeneratedMessageV3.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

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

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

clearField(Descriptors.FieldDescriptor field)

public Location.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field FieldDescriptor
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

clearOneof(Descriptors.OneofDescriptor oneof)

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

clone()

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

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 GeneratedMessageV3.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

mergeUnknownFields(UnknownFieldSet unknownFields)

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

setField(Descriptors.FieldDescriptor field, Object value)

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

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

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

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

setUnknownFields(UnknownFieldSet unknownFields)

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