Class Viewport

java.lang.Object
com.google.protobuf.AbstractMessageLite<MessageType,BuilderType>
com.google.protobuf.GeneratedMessageLite<Viewport,Viewport.Builder>
com.google.geo.type.Viewport
All Implemented Interfaces:
ViewportOrBuilder, com.google.protobuf.MessageLite, com.google.protobuf.MessageLiteOrBuilder

public final class Viewport extends com.google.protobuf.GeneratedMessageLite<Viewport,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
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static final class 
    A latitude-longitude viewport, represented as two diagonally opposite `low` and `high` points.

    Nested classes/interfaces inherited from class com.google.protobuf.GeneratedMessageLite

    com.google.protobuf.GeneratedMessageLite.DefaultInstanceBasedParser<T extends com.google.protobuf.GeneratedMessageLite<T,?>>, com.google.protobuf.GeneratedMessageLite.ExtendableBuilder<MessageType extends com.google.protobuf.GeneratedMessageLite.ExtendableMessage<MessageType,BuilderType>,BuilderType extends com.google.protobuf.GeneratedMessageLite.ExtendableBuilder<MessageType,BuilderType>>, com.google.protobuf.GeneratedMessageLite.ExtendableMessage<MessageType extends com.google.protobuf.GeneratedMessageLite.ExtendableMessage<MessageType,BuilderType>,BuilderType extends com.google.protobuf.GeneratedMessageLite.ExtendableBuilder<MessageType,BuilderType>>, com.google.protobuf.GeneratedMessageLite.ExtendableMessageOrBuilder<MessageType extends com.google.protobuf.GeneratedMessageLite.ExtendableMessage<MessageType,BuilderType>,BuilderType extends com.google.protobuf.GeneratedMessageLite.ExtendableBuilder<MessageType,BuilderType>>, com.google.protobuf.GeneratedMessageLite.GeneratedExtension<ContainingType extends com.google.protobuf.MessageLite,Type extends Object>, com.google.protobuf.GeneratedMessageLite.MethodToInvoke, com.google.protobuf.GeneratedMessageLite.SerializedForm

    Nested classes/interfaces inherited from class com.google.protobuf.AbstractMessageLite

    com.google.protobuf.AbstractMessageLite.InternalOneOfEnum
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
     
    static final int
     

    Fields inherited from class com.google.protobuf.GeneratedMessageLite

    unknownFields

    Fields inherited from class com.google.protobuf.AbstractMessageLite

    memoizedHashCode
  • Method Summary

    Modifier and Type
    Method
    Description
    protected final Object
    dynamicMethod(com.google.protobuf.GeneratedMessageLite.MethodToInvoke method, Object arg0, Object arg1)
     
    static Viewport
     
    Required.
    Required.
    boolean
    Required.
    boolean
    Required.
     
    newBuilder(Viewport prototype)
     
    static Viewport
     
    static Viewport
    parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
    static Viewport
    parseFrom(byte[] data)
     
    static Viewport
    parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
    static Viewport
    parseFrom(com.google.protobuf.ByteString data)
     
    static Viewport
    parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
    static Viewport
    parseFrom(com.google.protobuf.CodedInputStream input)
     
    static Viewport
    parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
    static Viewport
     
    static Viewport
    parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
    static Viewport
     
    static Viewport
    parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
    static com.google.protobuf.Parser<Viewport>
     

    Methods inherited from class com.google.protobuf.GeneratedMessageLite

    createBuilder, createBuilder, dynamicMethod, dynamicMethod, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyLongList, emptyProtobufList, equals, getDefaultInstanceForType, getParserForType, getSerializedSize, hashCode, isInitialized, isInitialized, makeImmutable, mergeLengthDelimitedField, mergeUnknownFields, mergeVarintField, mutableCopy, mutableCopy, mutableCopy, mutableCopy, mutableCopy, mutableCopy, newBuilderForType, newMessageInfo, newRepeatedGeneratedExtension, newSingularGeneratedExtension, parseDelimitedFrom, parseDelimitedFrom, parseFrom, parseFrom, parseFrom, parseFrom, parseFrom, parseFrom, parseFrom, parseFrom, parseFrom, parseFrom, parsePartialFrom, parseUnknownField, registerDefaultInstance, toBuilder, toString, writeTo

    Methods inherited from class com.google.protobuf.AbstractMessageLite

    addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeTo

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait

    Methods inherited from interface com.google.protobuf.MessageLiteOrBuilder

    getDefaultInstanceForType, isInitialized
  • Field Details

  • Method Details

    • hasLow

      public boolean hasLow()
       Required. The low point of the viewport.
       
      .google.type.LatLng low = 1 [json_name = "low"];
      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 [json_name = "low"];
      Specified by:
      getLow in interface ViewportOrBuilder
      Returns:
      The low.
    • hasHigh

      public boolean hasHigh()
       Required. The high point of the viewport.
       
      .google.type.LatLng high = 2 [json_name = "high"];
      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 [json_name = "high"];
      Specified by:
      getHigh in interface ViewportOrBuilder
      Returns:
      The high.
    • parseFrom

      public static Viewport parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static Viewport parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static Viewport parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static Viewport parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static Viewport parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static Viewport parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static Viewport parseFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

      public static Viewport parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

      public static Viewport parseDelimitedFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

      public static Viewport parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • parseFrom

      public static Viewport parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

      public static Viewport parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • newBuilder

      public static Viewport.Builder newBuilder()
    • newBuilder

      public static Viewport.Builder newBuilder(Viewport prototype)
    • dynamicMethod

      protected final Object dynamicMethod(com.google.protobuf.GeneratedMessageLite.MethodToInvoke method, Object arg0, Object arg1)
      Specified by:
      dynamicMethod in class com.google.protobuf.GeneratedMessageLite<Viewport,Viewport.Builder>
    • getDefaultInstance

      public static Viewport getDefaultInstance()
    • parser

      public static com.google.protobuf.Parser<Viewport> parser()