Class Location.Builder (1.9.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
TypeDescription
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public Location.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
Location.Builder
Overrides

build()

public Location build()
Returns
TypeDescription
Location

buildPartial()

public Location buildPartial()
Returns
TypeDescription
Location

clear()

public Location.Builder clear()
Returns
TypeDescription
Location.Builder
Overrides

clearField(Descriptors.FieldDescriptor field)

public Location.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
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
TypeDescription
Location.Builder

This builder for chaining.

clearLatLng()

public Location.Builder clearLatLng()

The waypoint's geographic coordinates.

.google.type.LatLng lat_lng = 1;

Returns
TypeDescription
Location.Builder

clearOneof(Descriptors.OneofDescriptor oneof)

public Location.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
Location.Builder
Overrides

clone()

public Location.Builder clone()
Returns
TypeDescription
Location.Builder
Overrides

getDefaultInstanceForType()

public Location getDefaultInstanceForType()
Returns
TypeDescription
Location

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
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
TypeDescription
int

The heading.

getLatLng()

public LatLng getLatLng()

The waypoint's geographic coordinates.

.google.type.LatLng lat_lng = 1;

Returns
TypeDescription
com.google.type.LatLng

The latLng.

getLatLngBuilder()

public LatLng.Builder getLatLngBuilder()

The waypoint's geographic coordinates.

.google.type.LatLng lat_lng = 1;

Returns
TypeDescription
com.google.type.LatLng.Builder

getLatLngOrBuilder()

public LatLngOrBuilder getLatLngOrBuilder()

The waypoint's geographic coordinates.

.google.type.LatLng lat_lng = 1;

Returns
TypeDescription
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
TypeDescription
boolean

Whether the heading field is set.

hasLatLng()

public boolean hasLatLng()

The waypoint's geographic coordinates.

.google.type.LatLng lat_lng = 1;

Returns
TypeDescription
boolean

Whether the latLng field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(Location other)

public Location.Builder mergeFrom(Location other)
Parameter
NameDescription
otherLocation
Returns
TypeDescription
Location.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public Location.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Location.Builder
Overrides Exceptions
TypeDescription
IOException

mergeFrom(Message other)

public Location.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
Location.Builder
Overrides

mergeLatLng(LatLng value)

public Location.Builder mergeLatLng(LatLng value)

The waypoint's geographic coordinates.

.google.type.LatLng lat_lng = 1;

Parameter
NameDescription
valuecom.google.type.LatLng
Returns
TypeDescription
Location.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

public final Location.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
Location.Builder
Overrides

setField(Descriptors.FieldDescriptor field, Object value)

public Location.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
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
NameDescription
valueint

The heading to set.

Returns
TypeDescription
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
NameDescription
valuecom.google.type.LatLng
Returns
TypeDescription
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
NameDescription
builderForValuecom.google.type.LatLng.Builder
Returns
TypeDescription
Location.Builder

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

public Location.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
Location.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

public final Location.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
Location.Builder
Overrides