Class Viewport.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderType>
com.google.protobuf.GeneratedMessageV3.Builder<Viewport.Builder>
com.google.geo.type.Viewport.Builder
All Implemented Interfaces:
ViewportOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
Enclosing class:
Viewport

public static final class Viewport.Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Viewport.Builder> implements ViewportOrBuilder
 A latitude-longitude viewport, represented as two diagonally opposite `low`
 and `high` points. A viewport is considered a closed region, i.e. it includes
 its boundary. The latitude bounds must range between -90 to 90 degrees
 inclusive, and the longitude bounds must range between -180 to 180 degrees
 inclusive. Various cases include:
  - If `low` = `high`, the viewport consists of that single point.
  - If `low.longitude` > `high.longitude`, the longitude range is inverted
    (the viewport crosses the 180 degree longitude line).
  - If `low.longitude` = -180 degrees and `high.longitude` = 180 degrees,
    the viewport includes all longitudes.
  - If `low.longitude` = 180 degrees and `high.longitude` = -180 degrees,
    the longitude range is empty.
  - If `low.latitude` > `high.latitude`, the latitude range is empty.
 Both `low` and `high` must be populated, and the represented box cannot be
 empty (as specified by the definitions above). An empty viewport will result
 in an error.
 For example, this viewport fully encloses New York City:
 {
     "low": {
         "latitude": 40.477398,
         "longitude": -74.259087
     },
     "high": {
         "latitude": 40.91618,
         "longitude": -73.70018
     }
 }
 
Protobuf type google.geo.type.Viewport
  • Method Details

    • 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<Viewport.Builder>
    • clear

      public Viewport.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<Viewport.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<Viewport.Builder>
    • getDefaultInstanceForType

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

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

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

      public Viewport.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<Viewport.Builder>
    • setField

      public Viewport.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<Viewport.Builder>
    • clearField

      public Viewport.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<Viewport.Builder>
    • clearOneof

      public Viewport.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<Viewport.Builder>
    • setRepeatedField

      public Viewport.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<Viewport.Builder>
    • addRepeatedField

      public Viewport.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<Viewport.Builder>
    • mergeFrom

      public Viewport.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<Viewport.Builder>
    • mergeFrom

      public Viewport.Builder mergeFrom(Viewport other)
    • isInitialized

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

      public Viewport.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<Viewport.Builder>
      Throws:
      IOException
    • hasLow

      public boolean hasLow()
       Required. The low point of the viewport.
       
      .google.type.LatLng low = 1;
      Specified by:
      hasLow in interface ViewportOrBuilder
      Returns:
      Whether the low field is set.
    • getLow

      public LatLng getLow()
       Required. The low point of the viewport.
       
      .google.type.LatLng low = 1;
      Specified by:
      getLow in interface ViewportOrBuilder
      Returns:
      The low.
    • setLow

      public Viewport.Builder setLow(LatLng value)
       Required. The low point of the viewport.
       
      .google.type.LatLng low = 1;
    • setLow

      public Viewport.Builder setLow(LatLng.Builder builderForValue)
       Required. The low point of the viewport.
       
      .google.type.LatLng low = 1;
    • mergeLow

      public Viewport.Builder mergeLow(LatLng value)
       Required. The low point of the viewport.
       
      .google.type.LatLng low = 1;
    • clearLow

      public Viewport.Builder clearLow()
       Required. The low point of the viewport.
       
      .google.type.LatLng low = 1;
    • getLowBuilder

      public LatLng.Builder getLowBuilder()
       Required. The low point of the viewport.
       
      .google.type.LatLng low = 1;
    • getLowOrBuilder

      public LatLngOrBuilder getLowOrBuilder()
       Required. The low point of the viewport.
       
      .google.type.LatLng low = 1;
      Specified by:
      getLowOrBuilder in interface ViewportOrBuilder
    • hasHigh

      public boolean hasHigh()
       Required. The high point of the viewport.
       
      .google.type.LatLng high = 2;
      Specified by:
      hasHigh in interface ViewportOrBuilder
      Returns:
      Whether the high field is set.
    • getHigh

      public LatLng getHigh()
       Required. The high point of the viewport.
       
      .google.type.LatLng high = 2;
      Specified by:
      getHigh in interface ViewportOrBuilder
      Returns:
      The high.
    • setHigh

      public Viewport.Builder setHigh(LatLng value)
       Required. The high point of the viewport.
       
      .google.type.LatLng high = 2;
    • setHigh

      public Viewport.Builder setHigh(LatLng.Builder builderForValue)
       Required. The high point of the viewport.
       
      .google.type.LatLng high = 2;
    • mergeHigh

      public Viewport.Builder mergeHigh(LatLng value)
       Required. The high point of the viewport.
       
      .google.type.LatLng high = 2;
    • clearHigh

      public Viewport.Builder clearHigh()
       Required. The high point of the viewport.
       
      .google.type.LatLng high = 2;
    • getHighBuilder

      public LatLng.Builder getHighBuilder()
       Required. The high point of the viewport.
       
      .google.type.LatLng high = 2;
    • getHighOrBuilder

      public LatLngOrBuilder getHighOrBuilder()
       Required. The high point of the viewport.
       
      .google.type.LatLng high = 2;
      Specified by:
      getHighOrBuilder in interface ViewportOrBuilder
    • setUnknownFields

      public final Viewport.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<Viewport.Builder>
    • mergeUnknownFields

      public final Viewport.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<Viewport.Builder>