Class Location.Builder

  • All Implemented Interfaces:
    LocationOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
    Enclosing class:
    Location

    public static final class Location.Builder
    extends com.google.protobuf.GeneratedMessageV3.Builder<Location.Builder>
    implements LocationOrBuilder
     Encapsulates a location (a geographic point, and an optional heading).
     
    Protobuf type google.cloud.optimization.v1.Location
    • Method Detail

      • getDescriptor

        public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
      • internalGetFieldAccessorTable

        protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
        Specified by:
        internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3.Builder<Location.Builder>
      • clear

        public Location.Builder clear()
        Specified by:
        clear in interface com.google.protobuf.Message.Builder
        Specified by:
        clear in interface com.google.protobuf.MessageLite.Builder
        Overrides:
        clear in class com.google.protobuf.GeneratedMessageV3.Builder<Location.Builder>
      • getDescriptorForType

        public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
        Specified by:
        getDescriptorForType in interface com.google.protobuf.Message.Builder
        Specified by:
        getDescriptorForType in interface com.google.protobuf.MessageOrBuilder
        Overrides:
        getDescriptorForType in class com.google.protobuf.GeneratedMessageV3.Builder<Location.Builder>
      • getDefaultInstanceForType

        public Location getDefaultInstanceForType()
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder
      • build

        public Location build()
        Specified by:
        build in interface com.google.protobuf.Message.Builder
        Specified by:
        build in interface com.google.protobuf.MessageLite.Builder
      • buildPartial

        public Location buildPartial()
        Specified by:
        buildPartial in interface com.google.protobuf.Message.Builder
        Specified by:
        buildPartial in interface com.google.protobuf.MessageLite.Builder
      • clone

        public Location.Builder clone()
        Specified by:
        clone in interface com.google.protobuf.Message.Builder
        Specified by:
        clone in interface com.google.protobuf.MessageLite.Builder
        Overrides:
        clone in class com.google.protobuf.GeneratedMessageV3.Builder<Location.Builder>
      • setField

        public Location.Builder setField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                         Object value)
        Specified by:
        setField in interface com.google.protobuf.Message.Builder
        Overrides:
        setField in class com.google.protobuf.GeneratedMessageV3.Builder<Location.Builder>
      • clearField

        public Location.Builder clearField​(com.google.protobuf.Descriptors.FieldDescriptor field)
        Specified by:
        clearField in interface com.google.protobuf.Message.Builder
        Overrides:
        clearField in class com.google.protobuf.GeneratedMessageV3.Builder<Location.Builder>
      • clearOneof

        public Location.Builder clearOneof​(com.google.protobuf.Descriptors.OneofDescriptor oneof)
        Specified by:
        clearOneof in interface com.google.protobuf.Message.Builder
        Overrides:
        clearOneof in class com.google.protobuf.GeneratedMessageV3.Builder<Location.Builder>
      • setRepeatedField

        public Location.Builder setRepeatedField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                                 int index,
                                                 Object value)
        Specified by:
        setRepeatedField in interface com.google.protobuf.Message.Builder
        Overrides:
        setRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<Location.Builder>
      • addRepeatedField

        public Location.Builder addRepeatedField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                                 Object value)
        Specified by:
        addRepeatedField in interface com.google.protobuf.Message.Builder
        Overrides:
        addRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<Location.Builder>
      • mergeFrom

        public Location.Builder mergeFrom​(com.google.protobuf.Message other)
        Specified by:
        mergeFrom in interface com.google.protobuf.Message.Builder
        Overrides:
        mergeFrom in class com.google.protobuf.AbstractMessage.Builder<Location.Builder>
      • isInitialized

        public final boolean isInitialized()
        Specified by:
        isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
        Overrides:
        isInitialized in class com.google.protobuf.GeneratedMessageV3.Builder<Location.Builder>
      • mergeFrom

        public Location.Builder mergeFrom​(com.google.protobuf.CodedInputStream input,
                                          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                   throws IOException
        Specified by:
        mergeFrom in interface com.google.protobuf.Message.Builder
        Specified by:
        mergeFrom in interface com.google.protobuf.MessageLite.Builder
        Overrides:
        mergeFrom in class com.google.protobuf.AbstractMessage.Builder<Location.Builder>
        Throws:
        IOException
      • hasLatLng

        public boolean hasLatLng()
         The waypoint's geographic coordinates.
         
        .google.type.LatLng lat_lng = 1;
        Specified by:
        hasLatLng in interface LocationOrBuilder
        Returns:
        Whether the latLng field is set.
      • getLatLng

        public com.google.type.LatLng getLatLng()
         The waypoint's geographic coordinates.
         
        .google.type.LatLng lat_lng = 1;
        Specified by:
        getLatLng in interface LocationOrBuilder
        Returns:
        The latLng.
      • setLatLng

        public Location.Builder setLatLng​(com.google.type.LatLng value)
         The waypoint's geographic coordinates.
         
        .google.type.LatLng lat_lng = 1;
      • setLatLng

        public Location.Builder setLatLng​(com.google.type.LatLng.Builder builderForValue)
         The waypoint's geographic coordinates.
         
        .google.type.LatLng lat_lng = 1;
      • mergeLatLng

        public Location.Builder mergeLatLng​(com.google.type.LatLng value)
         The waypoint's geographic coordinates.
         
        .google.type.LatLng lat_lng = 1;
      • clearLatLng

        public Location.Builder clearLatLng()
         The waypoint's geographic coordinates.
         
        .google.type.LatLng lat_lng = 1;
      • getLatLngBuilder

        public com.google.type.LatLng.Builder getLatLngBuilder()
         The waypoint's geographic coordinates.
         
        .google.type.LatLng lat_lng = 1;
      • getLatLngOrBuilder

        public com.google.type.LatLngOrBuilder getLatLngOrBuilder()
         The waypoint's geographic coordinates.
         
        .google.type.LatLng lat_lng = 1;
        Specified by:
        getLatLngOrBuilder in interface LocationOrBuilder
      • 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;
        Specified by:
        hasHeading in interface LocationOrBuilder
        Returns:
        Whether the heading field is set.
      • 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;
        Specified by:
        getHeading in interface LocationOrBuilder
        Returns:
        The heading.
      • setHeading

        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;
        Parameters:
        value - The heading to set.
        Returns:
        This builder for chaining.
      • 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:
        This builder for chaining.
      • setUnknownFields

        public final Location.Builder setUnknownFields​(com.google.protobuf.UnknownFieldSet unknownFields)
        Specified by:
        setUnknownFields in interface com.google.protobuf.Message.Builder
        Overrides:
        setUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<Location.Builder>
      • mergeUnknownFields

        public final Location.Builder mergeUnknownFields​(com.google.protobuf.UnknownFieldSet unknownFields)
        Specified by:
        mergeUnknownFields in interface com.google.protobuf.Message.Builder
        Overrides:
        mergeUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<Location.Builder>