// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: DataExtractionOSM/src/osmand_region_info.proto

package net.osmand.map;

public final class OsmandRegionInfo {
  private OsmandRegionInfo() {}
  public static void registerAllExtensions(
      com.google.protobuf.ExtensionRegistryLite registry) {
  }
  public static final class OsmAndRegionInfo extends
      com.google.protobuf.GeneratedMessageLite {
    // Use OsmAndRegionInfo.newBuilder() to construct.
    private OsmAndRegionInfo() {
      initFields();
    }
    private OsmAndRegionInfo(boolean noInit) {}
    
    private static final OsmAndRegionInfo defaultInstance;
    public static OsmAndRegionInfo getDefaultInstance() {
      return defaultInstance;
    }
    
    @Override
	public OsmAndRegionInfo getDefaultInstanceForType() {
      return defaultInstance;
    }
    
    // optional .OsmAndRegions regionInfo = 1;
    public static final int REGIONINFO_FIELD_NUMBER = 1;
    private boolean hasRegionInfo;
    private net.osmand.map.OsmandRegionInfo.OsmAndRegions regionInfo_;
    public boolean hasRegionInfo() { return hasRegionInfo; }
    public net.osmand.map.OsmandRegionInfo.OsmAndRegions getRegionInfo() { return regionInfo_; }
    
    private void initFields() {
      regionInfo_ = net.osmand.map.OsmandRegionInfo.OsmAndRegions.getDefaultInstance();
    }
    @Override
	public final boolean isInitialized() {
      if (hasRegionInfo()) {
        if (!getRegionInfo().isInitialized()) return false;
      }
      return true;
    }
    
    @Override
	public void writeTo(com.google.protobuf.CodedOutputStream output)
                        throws java.io.IOException {
      getSerializedSize();
      if (hasRegionInfo()) {
        output.writeMessage(1, getRegionInfo());
      }
    }
    
    private int memoizedSerializedSize = -1;
    @Override
	public int getSerializedSize() {
      int size = memoizedSerializedSize;
      if (size != -1) return size;
    
      size = 0;
      if (hasRegionInfo()) {
        size += com.google.protobuf.CodedOutputStream
          .computeMessageSize(1, getRegionInfo());
      }
      memoizedSerializedSize = size;
      return size;
    }
    
    public static net.osmand.map.OsmandRegionInfo.OsmAndRegionInfo parseFrom(
        com.google.protobuf.ByteString data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return newBuilder().mergeFrom(data).buildParsed();
    }
    public static net.osmand.map.OsmandRegionInfo.OsmAndRegionInfo parseFrom(
        com.google.protobuf.ByteString data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return newBuilder().mergeFrom(data, extensionRegistry)
               .buildParsed();
    }
    public static net.osmand.map.OsmandRegionInfo.OsmAndRegionInfo parseFrom(byte[] data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return newBuilder().mergeFrom(data).buildParsed();
    }
    public static net.osmand.map.OsmandRegionInfo.OsmAndRegionInfo parseFrom(
        byte[] data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return newBuilder().mergeFrom(data, extensionRegistry)
               .buildParsed();
    }
    public static net.osmand.map.OsmandRegionInfo.OsmAndRegionInfo parseFrom(java.io.InputStream input)
        throws java.io.IOException {
      return newBuilder().mergeFrom(input).buildParsed();
    }
    public static net.osmand.map.OsmandRegionInfo.OsmAndRegionInfo parseFrom(
        java.io.InputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return newBuilder().mergeFrom(input, extensionRegistry)
               .buildParsed();
    }
    public static net.osmand.map.OsmandRegionInfo.OsmAndRegionInfo parseDelimitedFrom(java.io.InputStream input)
        throws java.io.IOException {
      Builder builder = newBuilder();
      if (builder.mergeDelimitedFrom(input)) {
        return builder.buildParsed();
      } else {
        return null;
      }
    }
    public static net.osmand.map.OsmandRegionInfo.OsmAndRegionInfo parseDelimitedFrom(
        java.io.InputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      Builder builder = newBuilder();
      if (builder.mergeDelimitedFrom(input, extensionRegistry)) {
        return builder.buildParsed();
      } else {
        return null;
      }
    }
    public static net.osmand.map.OsmandRegionInfo.OsmAndRegionInfo parseFrom(
        com.google.protobuf.CodedInputStream input)
        throws java.io.IOException {
      return newBuilder().mergeFrom(input).buildParsed();
    }
    public static net.osmand.map.OsmandRegionInfo.OsmAndRegionInfo parseFrom(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return newBuilder().mergeFrom(input, extensionRegistry)
               .buildParsed();
    }
    
    public static Builder newBuilder() { return Builder.create(); }
    @Override
	public Builder newBuilderForType() { return newBuilder(); }
    public static Builder newBuilder(net.osmand.map.OsmandRegionInfo.OsmAndRegionInfo prototype) {
      return newBuilder().mergeFrom(prototype);
    }
    @Override
	public Builder toBuilder() { return newBuilder(this); }
    
    public static final class Builder extends
        com.google.protobuf.GeneratedMessageLite.Builder<
          net.osmand.map.OsmandRegionInfo.OsmAndRegionInfo, Builder> {
      private net.osmand.map.OsmandRegionInfo.OsmAndRegionInfo result;
      
      // Construct using net.osmand.map.OsmandRegionInfo.OsmAndRegionInfo.newBuilder()
      private Builder() {}
      
      private static Builder create() {
        Builder builder = new Builder();
        builder.result = new net.osmand.map.OsmandRegionInfo.OsmAndRegionInfo();
        return builder;
      }
      
      @Override
	protected net.osmand.map.OsmandRegionInfo.OsmAndRegionInfo internalGetResult() {
        return result;
      }
      
      @Override
	public Builder clear() {
        if (result == null) {
          throw new IllegalStateException(
            "Cannot call clear() after build().");
        }
        result = new net.osmand.map.OsmandRegionInfo.OsmAndRegionInfo();
        return this;
      }
      
      @Override
	public Builder clone() {
        return create().mergeFrom(result);
      }
      
      @Override
	public net.osmand.map.OsmandRegionInfo.OsmAndRegionInfo getDefaultInstanceForType() {
        return net.osmand.map.OsmandRegionInfo.OsmAndRegionInfo.getDefaultInstance();
      }
      
      @Override
	public boolean isInitialized() {
        return result.isInitialized();
      }
      @Override
	public net.osmand.map.OsmandRegionInfo.OsmAndRegionInfo build() {
        if (result != null && !isInitialized()) {
          throw newUninitializedMessageException(result);
        }
        return buildPartial();
      }
      
      private net.osmand.map.OsmandRegionInfo.OsmAndRegionInfo buildParsed()
          throws com.google.protobuf.InvalidProtocolBufferException {
        if (!isInitialized()) {
          throw newUninitializedMessageException(
            result).asInvalidProtocolBufferException();
        }
        return buildPartial();
      }
      
      @Override
	public net.osmand.map.OsmandRegionInfo.OsmAndRegionInfo buildPartial() {
        if (result == null) {
          throw new IllegalStateException(
            "build() has already been called on this Builder.");
        }
        net.osmand.map.OsmandRegionInfo.OsmAndRegionInfo returnMe = result;
        result = null;
        return returnMe;
      }
      
      @Override
	public Builder mergeFrom(net.osmand.map.OsmandRegionInfo.OsmAndRegionInfo other) {
        if (other == net.osmand.map.OsmandRegionInfo.OsmAndRegionInfo.getDefaultInstance()) return this;
        if (other.hasRegionInfo()) {
          mergeRegionInfo(other.getRegionInfo());
        }
        return this;
      }
      
      @Override
	public Builder mergeFrom(
          com.google.protobuf.CodedInputStream input,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws java.io.IOException {
        while (true) {
          int tag = input.readTag();
          switch (tag) {
            case 0:
              return this;
            default: {
              if (!parseUnknownField(input, extensionRegistry, tag)) {
                return this;
              }
              break;
            }
            case 10: {
              net.osmand.map.OsmandRegionInfo.OsmAndRegions.Builder subBuilder = net.osmand.map.OsmandRegionInfo.OsmAndRegions.newBuilder();
              if (hasRegionInfo()) {
                subBuilder.mergeFrom(getRegionInfo());
              }
              input.readMessage(subBuilder, extensionRegistry);
              setRegionInfo(subBuilder.buildPartial());
              break;
            }
          }
        }
      }
      
      
      // optional .OsmAndRegions regionInfo = 1;
      public boolean hasRegionInfo() {
        return result.hasRegionInfo();
      }
      public net.osmand.map.OsmandRegionInfo.OsmAndRegions getRegionInfo() {
        return result.getRegionInfo();
      }
      public Builder setRegionInfo(net.osmand.map.OsmandRegionInfo.OsmAndRegions value) {
        if (value == null) {
          throw new NullPointerException();
        }
        result.hasRegionInfo = true;
        result.regionInfo_ = value;
        return this;
      }
      public Builder setRegionInfo(net.osmand.map.OsmandRegionInfo.OsmAndRegions.Builder builderForValue) {
        result.hasRegionInfo = true;
        result.regionInfo_ = builderForValue.build();
        return this;
      }
      public Builder mergeRegionInfo(net.osmand.map.OsmandRegionInfo.OsmAndRegions value) {
        if (result.hasRegionInfo() &&
            result.regionInfo_ != net.osmand.map.OsmandRegionInfo.OsmAndRegions.getDefaultInstance()) {
          result.regionInfo_ =
            net.osmand.map.OsmandRegionInfo.OsmAndRegions.newBuilder(result.regionInfo_).mergeFrom(value).buildPartial();
        } else {
          result.regionInfo_ = value;
        }
        result.hasRegionInfo = true;
        return this;
      }
      public Builder clearRegionInfo() {
        result.hasRegionInfo = false;
        result.regionInfo_ = net.osmand.map.OsmandRegionInfo.OsmAndRegions.getDefaultInstance();
        return this;
      }
      
      // @@protoc_insertion_point(builder_scope:OsmAndRegionInfo)
    }
    
    static {
      defaultInstance = new OsmAndRegionInfo(true);
      net.osmand.map.OsmandRegionInfo.internalForceInit();
      defaultInstance.initFields();
    }
    
    // @@protoc_insertion_point(class_scope:OsmAndRegionInfo)
  }
  
  public static final class OsmAndRegions extends
      com.google.protobuf.GeneratedMessageLite {
    // Use OsmAndRegions.newBuilder() to construct.
    private OsmAndRegions() {
      initFields();
    }
    private OsmAndRegions(boolean noInit) {}
    
    private static final OsmAndRegions defaultInstance;
    public static OsmAndRegions getDefaultInstance() {
      return defaultInstance;
    }
    
    @Override
	public OsmAndRegions getDefaultInstanceForType() {
      return defaultInstance;
    }
    
    // repeated .OsmAndRegion regions = 3;
    public static final int REGIONS_FIELD_NUMBER = 3;
    private java.util.List<net.osmand.map.OsmandRegionInfo.OsmAndRegion> regions_ =
      java.util.Collections.emptyList();
    public java.util.List<net.osmand.map.OsmandRegionInfo.OsmAndRegion> getRegionsList() {
      return regions_;
    }
    public int getRegionsCount() { return regions_.size(); }
    public net.osmand.map.OsmandRegionInfo.OsmAndRegion getRegions(int index) {
      return regions_.get(index);
    }
    
    private void initFields() {
    }
    @Override
	public final boolean isInitialized() {
      for (net.osmand.map.OsmandRegionInfo.OsmAndRegion element : getRegionsList()) {
        if (!element.isInitialized()) return false;
      }
      return true;
    }
    
    @Override
	public void writeTo(com.google.protobuf.CodedOutputStream output)
                        throws java.io.IOException {
      getSerializedSize();
      for (net.osmand.map.OsmandRegionInfo.OsmAndRegion element : getRegionsList()) {
        output.writeMessage(3, element);
      }
    }
    
    private int memoizedSerializedSize = -1;
    @Override
	public int getSerializedSize() {
      int size = memoizedSerializedSize;
      if (size != -1) return size;
    
      size = 0;
      for (net.osmand.map.OsmandRegionInfo.OsmAndRegion element : getRegionsList()) {
        size += com.google.protobuf.CodedOutputStream
          .computeMessageSize(3, element);
      }
      memoizedSerializedSize = size;
      return size;
    }
    
    public static net.osmand.map.OsmandRegionInfo.OsmAndRegions parseFrom(
        com.google.protobuf.ByteString data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return newBuilder().mergeFrom(data).buildParsed();
    }
    public static net.osmand.map.OsmandRegionInfo.OsmAndRegions parseFrom(
        com.google.protobuf.ByteString data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return newBuilder().mergeFrom(data, extensionRegistry)
               .buildParsed();
    }
    public static net.osmand.map.OsmandRegionInfo.OsmAndRegions parseFrom(byte[] data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return newBuilder().mergeFrom(data).buildParsed();
    }
    public static net.osmand.map.OsmandRegionInfo.OsmAndRegions parseFrom(
        byte[] data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return newBuilder().mergeFrom(data, extensionRegistry)
               .buildParsed();
    }
    public static net.osmand.map.OsmandRegionInfo.OsmAndRegions parseFrom(java.io.InputStream input)
        throws java.io.IOException {
      return newBuilder().mergeFrom(input).buildParsed();
    }
    public static net.osmand.map.OsmandRegionInfo.OsmAndRegions parseFrom(
        java.io.InputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return newBuilder().mergeFrom(input, extensionRegistry)
               .buildParsed();
    }
    public static net.osmand.map.OsmandRegionInfo.OsmAndRegions parseDelimitedFrom(java.io.InputStream input)
        throws java.io.IOException {
      Builder builder = newBuilder();
      if (builder.mergeDelimitedFrom(input)) {
        return builder.buildParsed();
      } else {
        return null;
      }
    }
    public static net.osmand.map.OsmandRegionInfo.OsmAndRegions parseDelimitedFrom(
        java.io.InputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      Builder builder = newBuilder();
      if (builder.mergeDelimitedFrom(input, extensionRegistry)) {
        return builder.buildParsed();
      } else {
        return null;
      }
    }
    public static net.osmand.map.OsmandRegionInfo.OsmAndRegions parseFrom(
        com.google.protobuf.CodedInputStream input)
        throws java.io.IOException {
      return newBuilder().mergeFrom(input).buildParsed();
    }
    public static net.osmand.map.OsmandRegionInfo.OsmAndRegions parseFrom(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return newBuilder().mergeFrom(input, extensionRegistry)
               .buildParsed();
    }
    
    public static Builder newBuilder() { return Builder.create(); }
    @Override
	public Builder newBuilderForType() { return newBuilder(); }
    public static Builder newBuilder(net.osmand.map.OsmandRegionInfo.OsmAndRegions prototype) {
      return newBuilder().mergeFrom(prototype);
    }
    @Override
	public Builder toBuilder() { return newBuilder(this); }
    
    public static final class Builder extends
        com.google.protobuf.GeneratedMessageLite.Builder<
          net.osmand.map.OsmandRegionInfo.OsmAndRegions, Builder> {
      private net.osmand.map.OsmandRegionInfo.OsmAndRegions result;
      
      // Construct using net.osmand.map.OsmandRegionInfo.OsmAndRegions.newBuilder()
      private Builder() {}
      
      private static Builder create() {
        Builder builder = new Builder();
        builder.result = new net.osmand.map.OsmandRegionInfo.OsmAndRegions();
        return builder;
      }
      
      @Override
	protected net.osmand.map.OsmandRegionInfo.OsmAndRegions internalGetResult() {
        return result;
      }
      
      @Override
	public Builder clear() {
        if (result == null) {
          throw new IllegalStateException(
            "Cannot call clear() after build().");
        }
        result = new net.osmand.map.OsmandRegionInfo.OsmAndRegions();
        return this;
      }
      
      @Override
	public Builder clone() {
        return create().mergeFrom(result);
      }
      
      @Override
	public net.osmand.map.OsmandRegionInfo.OsmAndRegions getDefaultInstanceForType() {
        return net.osmand.map.OsmandRegionInfo.OsmAndRegions.getDefaultInstance();
      }
      
      @Override
	public boolean isInitialized() {
        return result.isInitialized();
      }
      @Override
	public net.osmand.map.OsmandRegionInfo.OsmAndRegions build() {
        if (result != null && !isInitialized()) {
          throw newUninitializedMessageException(result);
        }
        return buildPartial();
      }
      
      private net.osmand.map.OsmandRegionInfo.OsmAndRegions buildParsed()
          throws com.google.protobuf.InvalidProtocolBufferException {
        if (!isInitialized()) {
          throw newUninitializedMessageException(
            result).asInvalidProtocolBufferException();
        }
        return buildPartial();
      }
      
      @Override
	public net.osmand.map.OsmandRegionInfo.OsmAndRegions buildPartial() {
        if (result == null) {
          throw new IllegalStateException(
            "build() has already been called on this Builder.");
        }
        if (result.regions_ != java.util.Collections.EMPTY_LIST) {
          result.regions_ =
            java.util.Collections.unmodifiableList(result.regions_);
        }
        net.osmand.map.OsmandRegionInfo.OsmAndRegions returnMe = result;
        result = null;
        return returnMe;
      }
      
      @Override
	public Builder mergeFrom(net.osmand.map.OsmandRegionInfo.OsmAndRegions other) {
        if (other == net.osmand.map.OsmandRegionInfo.OsmAndRegions.getDefaultInstance()) return this;
        if (!other.regions_.isEmpty()) {
          if (result.regions_.isEmpty()) {
            result.regions_ = new java.util.ArrayList<net.osmand.map.OsmandRegionInfo.OsmAndRegion>();
          }
          result.regions_.addAll(other.regions_);
        }
        return this;
      }
      
      @Override
	public Builder mergeFrom(
          com.google.protobuf.CodedInputStream input,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws java.io.IOException {
        while (true) {
          int tag = input.readTag();
          switch (tag) {
            case 0:
              return this;
            default: {
              if (!parseUnknownField(input, extensionRegistry, tag)) {
                return this;
              }
              break;
            }
            case 26: {
              net.osmand.map.OsmandRegionInfo.OsmAndRegion.Builder subBuilder = net.osmand.map.OsmandRegionInfo.OsmAndRegion.newBuilder();
              input.readMessage(subBuilder, extensionRegistry);
              addRegions(subBuilder.buildPartial());
              break;
            }
          }
        }
      }
      
      
      // repeated .OsmAndRegion regions = 3;
      public java.util.List<net.osmand.map.OsmandRegionInfo.OsmAndRegion> getRegionsList() {
        return java.util.Collections.unmodifiableList(result.regions_);
      }
      public int getRegionsCount() {
        return result.getRegionsCount();
      }
      public net.osmand.map.OsmandRegionInfo.OsmAndRegion getRegions(int index) {
        return result.getRegions(index);
      }
      public Builder setRegions(int index, net.osmand.map.OsmandRegionInfo.OsmAndRegion value) {
        if (value == null) {
          throw new NullPointerException();
        }
        result.regions_.set(index, value);
        return this;
      }
      public Builder setRegions(int index, net.osmand.map.OsmandRegionInfo.OsmAndRegion.Builder builderForValue) {
        result.regions_.set(index, builderForValue.build());
        return this;
      }
      public Builder addRegions(net.osmand.map.OsmandRegionInfo.OsmAndRegion value) {
        if (value == null) {
          throw new NullPointerException();
        }
        if (result.regions_.isEmpty()) {
          result.regions_ = new java.util.ArrayList<net.osmand.map.OsmandRegionInfo.OsmAndRegion>();
        }
        result.regions_.add(value);
        return this;
      }
      public Builder addRegions(net.osmand.map.OsmandRegionInfo.OsmAndRegion.Builder builderForValue) {
        if (result.regions_.isEmpty()) {
          result.regions_ = new java.util.ArrayList<net.osmand.map.OsmandRegionInfo.OsmAndRegion>();
        }
        result.regions_.add(builderForValue.build());
        return this;
      }
      public Builder addAllRegions(
          java.lang.Iterable<? extends net.osmand.map.OsmandRegionInfo.OsmAndRegion> values) {
        if (result.regions_.isEmpty()) {
          result.regions_ = new java.util.ArrayList<net.osmand.map.OsmandRegionInfo.OsmAndRegion>();
        }
        super.addAll(values, result.regions_);
        return this;
      }
      public Builder clearRegions() {
        result.regions_ = java.util.Collections.emptyList();
        return this;
      }
      
      // @@protoc_insertion_point(builder_scope:OsmAndRegions)
    }
    
    static {
      defaultInstance = new OsmAndRegions(true);
      net.osmand.map.OsmandRegionInfo.internalForceInit();
      defaultInstance.initFields();
    }
    
    // @@protoc_insertion_point(class_scope:OsmAndRegions)
  }
  
  public static final class OsmAndRegion extends
      com.google.protobuf.GeneratedMessageLite {
    // Use OsmAndRegion.newBuilder() to construct.
    private OsmAndRegion() {
      initFields();
    }
    private OsmAndRegion(boolean noInit) {}
    
    private static final OsmAndRegion defaultInstance;
    public static OsmAndRegion getDefaultInstance() {
      return defaultInstance;
    }
    
    @Override
	public OsmAndRegion getDefaultInstanceForType() {
      return defaultInstance;
    }
    
    // optional string continentName = 1;
    public static final int CONTINENTNAME_FIELD_NUMBER = 1;
    private boolean hasContinentName;
    private java.lang.String continentName_ = "";
    public boolean hasContinentName() { return hasContinentName; }
    public java.lang.String getContinentName() { return continentName_; }
    
    // required string name = 2;
    public static final int NAME_FIELD_NUMBER = 2;
    private boolean hasName;
    private java.lang.String name_ = "";
    public boolean hasName() { return hasName; }
    public java.lang.String getName() { return name_; }
    
    // repeated int32 degX = 4 [packed = true];
    public static final int DEGX_FIELD_NUMBER = 4;
    private java.util.List<java.lang.Integer> degX_ =
      java.util.Collections.emptyList();
    public java.util.List<java.lang.Integer> getDegXList() {
      return degX_;
    }
    public int getDegXCount() { return degX_.size(); }
    public int getDegX(int index) {
      return degX_.get(index);
    }
    private int degXMemoizedSerializedSize = -1;
    
    // repeated int32 degY = 5 [packed = true];
    public static final int DEGY_FIELD_NUMBER = 5;
    private java.util.List<java.lang.Integer> degY_ =
      java.util.Collections.emptyList();
    public java.util.List<java.lang.Integer> getDegYList() {
      return degY_;
    }
    public int getDegYCount() { return degY_.size(); }
    public int getDegY(int index) {
      return degY_.get(index);
    }
    private int degYMemoizedSerializedSize = -1;
    
    // repeated .OsmAndRegion subregions = 8;
    public static final int SUBREGIONS_FIELD_NUMBER = 8;
    private java.util.List<net.osmand.map.OsmandRegionInfo.OsmAndRegion> subregions_ =
      java.util.Collections.emptyList();
    public java.util.List<net.osmand.map.OsmandRegionInfo.OsmAndRegion> getSubregionsList() {
      return subregions_;
    }
    public int getSubregionsCount() { return subregions_.size(); }
    public net.osmand.map.OsmandRegionInfo.OsmAndRegion getSubregions(int index) {
      return subregions_.get(index);
    }
    
    private void initFields() {
    }
    @Override
	public final boolean isInitialized() {
      if (!hasName) return false;
      for (net.osmand.map.OsmandRegionInfo.OsmAndRegion element : getSubregionsList()) {
        if (!element.isInitialized()) return false;
      }
      return true;
    }
    
    @Override
	public void writeTo(com.google.protobuf.CodedOutputStream output)
                        throws java.io.IOException {
      getSerializedSize();
      if (hasContinentName()) {
        output.writeString(1, getContinentName());
      }
      if (hasName()) {
        output.writeString(2, getName());
      }
      if (getDegXList().size() > 0) {
        output.writeRawVarint32(34);
        output.writeRawVarint32(degXMemoizedSerializedSize);
      }
      for (int element : getDegXList()) {
        output.writeInt32NoTag(element);
      }
      if (getDegYList().size() > 0) {
        output.writeRawVarint32(42);
        output.writeRawVarint32(degYMemoizedSerializedSize);
      }
      for (int element : getDegYList()) {
        output.writeInt32NoTag(element);
      }
      for (net.osmand.map.OsmandRegionInfo.OsmAndRegion element : getSubregionsList()) {
        output.writeMessage(8, element);
      }
    }
    
    private int memoizedSerializedSize = -1;
    @Override
	public int getSerializedSize() {
      int size = memoizedSerializedSize;
      if (size != -1) return size;
    
      size = 0;
      if (hasContinentName()) {
        size += com.google.protobuf.CodedOutputStream
          .computeStringSize(1, getContinentName());
      }
      if (hasName()) {
        size += com.google.protobuf.CodedOutputStream
          .computeStringSize(2, getName());
      }
      {
        int dataSize = 0;
        for (int element : getDegXList()) {
          dataSize += com.google.protobuf.CodedOutputStream
            .computeInt32SizeNoTag(element);
        }
        size += dataSize;
        if (!getDegXList().isEmpty()) {
          size += 1;
          size += com.google.protobuf.CodedOutputStream
              .computeInt32SizeNoTag(dataSize);
        }
        degXMemoizedSerializedSize = dataSize;
      }
      {
        int dataSize = 0;
        for (int element : getDegYList()) {
          dataSize += com.google.protobuf.CodedOutputStream
            .computeInt32SizeNoTag(element);
        }
        size += dataSize;
        if (!getDegYList().isEmpty()) {
          size += 1;
          size += com.google.protobuf.CodedOutputStream
              .computeInt32SizeNoTag(dataSize);
        }
        degYMemoizedSerializedSize = dataSize;
      }
      for (net.osmand.map.OsmandRegionInfo.OsmAndRegion element : getSubregionsList()) {
        size += com.google.protobuf.CodedOutputStream
          .computeMessageSize(8, element);
      }
      memoizedSerializedSize = size;
      return size;
    }
    
    public static net.osmand.map.OsmandRegionInfo.OsmAndRegion parseFrom(
        com.google.protobuf.ByteString data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return newBuilder().mergeFrom(data).buildParsed();
    }
    public static net.osmand.map.OsmandRegionInfo.OsmAndRegion parseFrom(
        com.google.protobuf.ByteString data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return newBuilder().mergeFrom(data, extensionRegistry)
               .buildParsed();
    }
    public static net.osmand.map.OsmandRegionInfo.OsmAndRegion parseFrom(byte[] data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return newBuilder().mergeFrom(data).buildParsed();
    }
    public static net.osmand.map.OsmandRegionInfo.OsmAndRegion parseFrom(
        byte[] data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return newBuilder().mergeFrom(data, extensionRegistry)
               .buildParsed();
    }
    public static net.osmand.map.OsmandRegionInfo.OsmAndRegion parseFrom(java.io.InputStream input)
        throws java.io.IOException {
      return newBuilder().mergeFrom(input).buildParsed();
    }
    public static net.osmand.map.OsmandRegionInfo.OsmAndRegion parseFrom(
        java.io.InputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return newBuilder().mergeFrom(input, extensionRegistry)
               .buildParsed();
    }
    public static net.osmand.map.OsmandRegionInfo.OsmAndRegion parseDelimitedFrom(java.io.InputStream input)
        throws java.io.IOException {
      Builder builder = newBuilder();
      if (builder.mergeDelimitedFrom(input)) {
        return builder.buildParsed();
      } else {
        return null;
      }
    }
    public static net.osmand.map.OsmandRegionInfo.OsmAndRegion parseDelimitedFrom(
        java.io.InputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      Builder builder = newBuilder();
      if (builder.mergeDelimitedFrom(input, extensionRegistry)) {
        return builder.buildParsed();
      } else {
        return null;
      }
    }
    public static net.osmand.map.OsmandRegionInfo.OsmAndRegion parseFrom(
        com.google.protobuf.CodedInputStream input)
        throws java.io.IOException {
      return newBuilder().mergeFrom(input).buildParsed();
    }
    public static net.osmand.map.OsmandRegionInfo.OsmAndRegion parseFrom(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return newBuilder().mergeFrom(input, extensionRegistry)
               .buildParsed();
    }
    
    public static Builder newBuilder() { return Builder.create(); }
    @Override
	public Builder newBuilderForType() { return newBuilder(); }
    public static Builder newBuilder(net.osmand.map.OsmandRegionInfo.OsmAndRegion prototype) {
      return newBuilder().mergeFrom(prototype);
    }
    @Override
	public Builder toBuilder() { return newBuilder(this); }
    
    public static final class Builder extends
        com.google.protobuf.GeneratedMessageLite.Builder<
          net.osmand.map.OsmandRegionInfo.OsmAndRegion, Builder> {
      private net.osmand.map.OsmandRegionInfo.OsmAndRegion result;
      
      // Construct using net.osmand.map.OsmandRegionInfo.OsmAndRegion.newBuilder()
      private Builder() {}
      
      private static Builder create() {
        Builder builder = new Builder();
        builder.result = new net.osmand.map.OsmandRegionInfo.OsmAndRegion();
        return builder;
      }
      
      @Override
	protected net.osmand.map.OsmandRegionInfo.OsmAndRegion internalGetResult() {
        return result;
      }
      
      @Override
	public Builder clear() {
        if (result == null) {
          throw new IllegalStateException(
            "Cannot call clear() after build().");
        }
        result = new net.osmand.map.OsmandRegionInfo.OsmAndRegion();
        return this;
      }
      
      @Override
	public Builder clone() {
        return create().mergeFrom(result);
      }
      
      @Override
	public net.osmand.map.OsmandRegionInfo.OsmAndRegion getDefaultInstanceForType() {
        return net.osmand.map.OsmandRegionInfo.OsmAndRegion.getDefaultInstance();
      }
      
      @Override
	public boolean isInitialized() {
        return result.isInitialized();
      }
      @Override
	public net.osmand.map.OsmandRegionInfo.OsmAndRegion build() {
        if (result != null && !isInitialized()) {
          throw newUninitializedMessageException(result);
        }
        return buildPartial();
      }
      
      private net.osmand.map.OsmandRegionInfo.OsmAndRegion buildParsed()
          throws com.google.protobuf.InvalidProtocolBufferException {
        if (!isInitialized()) {
          throw newUninitializedMessageException(
            result).asInvalidProtocolBufferException();
        }
        return buildPartial();
      }
      
      @Override
	public net.osmand.map.OsmandRegionInfo.OsmAndRegion buildPartial() {
        if (result == null) {
          throw new IllegalStateException(
            "build() has already been called on this Builder.");
        }
        if (result.degX_ != java.util.Collections.EMPTY_LIST) {
          result.degX_ =
            java.util.Collections.unmodifiableList(result.degX_);
        }
        if (result.degY_ != java.util.Collections.EMPTY_LIST) {
          result.degY_ =
            java.util.Collections.unmodifiableList(result.degY_);
        }
        if (result.subregions_ != java.util.Collections.EMPTY_LIST) {
          result.subregions_ =
            java.util.Collections.unmodifiableList(result.subregions_);
        }
        net.osmand.map.OsmandRegionInfo.OsmAndRegion returnMe = result;
        result = null;
        return returnMe;
      }
      
      @Override
	public Builder mergeFrom(net.osmand.map.OsmandRegionInfo.OsmAndRegion other) {
        if (other == net.osmand.map.OsmandRegionInfo.OsmAndRegion.getDefaultInstance()) return this;
        if (other.hasContinentName()) {
          setContinentName(other.getContinentName());
        }
        if (other.hasName()) {
          setName(other.getName());
        }
        if (!other.degX_.isEmpty()) {
          if (result.degX_.isEmpty()) {
            result.degX_ = new java.util.ArrayList<java.lang.Integer>();
          }
          result.degX_.addAll(other.degX_);
        }
        if (!other.degY_.isEmpty()) {
          if (result.degY_.isEmpty()) {
            result.degY_ = new java.util.ArrayList<java.lang.Integer>();
          }
          result.degY_.addAll(other.degY_);
        }
        if (!other.subregions_.isEmpty()) {
          if (result.subregions_.isEmpty()) {
            result.subregions_ = new java.util.ArrayList<net.osmand.map.OsmandRegionInfo.OsmAndRegion>();
          }
          result.subregions_.addAll(other.subregions_);
        }
        return this;
      }
      
      @Override
	public Builder mergeFrom(
          com.google.protobuf.CodedInputStream input,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws java.io.IOException {
        while (true) {
          int tag = input.readTag();
          switch (tag) {
            case 0:
              return this;
            default: {
              if (!parseUnknownField(input, extensionRegistry, tag)) {
                return this;
              }
              break;
            }
            case 10: {
              setContinentName(input.readString());
              break;
            }
            case 18: {
              setName(input.readString());
              break;
            }
            case 32: {
              addDegX(input.readInt32());
              break;
            }
            case 34: {
              int length = input.readRawVarint32();
              int limit = input.pushLimit(length);
              while (input.getBytesUntilLimit() > 0) {
                addDegX(input.readInt32());
              }
              input.popLimit(limit);
              break;
            }
            case 40: {
              addDegY(input.readInt32());
              break;
            }
            case 42: {
              int length = input.readRawVarint32();
              int limit = input.pushLimit(length);
              while (input.getBytesUntilLimit() > 0) {
                addDegY(input.readInt32());
              }
              input.popLimit(limit);
              break;
            }
            case 66: {
              net.osmand.map.OsmandRegionInfo.OsmAndRegion.Builder subBuilder = net.osmand.map.OsmandRegionInfo.OsmAndRegion.newBuilder();
              input.readMessage(subBuilder, extensionRegistry);
              addSubregions(subBuilder.buildPartial());
              break;
            }
          }
        }
      }
      
      
      // optional string continentName = 1;
      public boolean hasContinentName() {
        return result.hasContinentName();
      }
      public java.lang.String getContinentName() {
        return result.getContinentName();
      }
      public Builder setContinentName(java.lang.String value) {
        if (value == null) {
    throw new NullPointerException();
  }
  result.hasContinentName = true;
        result.continentName_ = value;
        return this;
      }
      public Builder clearContinentName() {
        result.hasContinentName = false;
        result.continentName_ = getDefaultInstance().getContinentName();
        return this;
      }
      
      // required string name = 2;
      public boolean hasName() {
        return result.hasName();
      }
      public java.lang.String getName() {
        return result.getName();
      }
      public Builder setName(java.lang.String value) {
        if (value == null) {
    throw new NullPointerException();
  }
  result.hasName = true;
        result.name_ = value;
        return this;
      }
      public Builder clearName() {
        result.hasName = false;
        result.name_ = getDefaultInstance().getName();
        return this;
      }
      
      // repeated int32 degX = 4 [packed = true];
      public java.util.List<java.lang.Integer> getDegXList() {
        return java.util.Collections.unmodifiableList(result.degX_);
      }
      public int getDegXCount() {
        return result.getDegXCount();
      }
      public int getDegX(int index) {
        return result.getDegX(index);
      }
      public Builder setDegX(int index, int value) {
        result.degX_.set(index, value);
        return this;
      }
      public Builder addDegX(int value) {
        if (result.degX_.isEmpty()) {
          result.degX_ = new java.util.ArrayList<java.lang.Integer>();
        }
        result.degX_.add(value);
        return this;
      }
      public Builder addAllDegX(
          java.lang.Iterable<? extends java.lang.Integer> values) {
        if (result.degX_.isEmpty()) {
          result.degX_ = new java.util.ArrayList<java.lang.Integer>();
        }
        super.addAll(values, result.degX_);
        return this;
      }
      public Builder clearDegX() {
        result.degX_ = java.util.Collections.emptyList();
        return this;
      }
      
      // repeated int32 degY = 5 [packed = true];
      public java.util.List<java.lang.Integer> getDegYList() {
        return java.util.Collections.unmodifiableList(result.degY_);
      }
      public int getDegYCount() {
        return result.getDegYCount();
      }
      public int getDegY(int index) {
        return result.getDegY(index);
      }
      public Builder setDegY(int index, int value) {
        result.degY_.set(index, value);
        return this;
      }
      public Builder addDegY(int value) {
        if (result.degY_.isEmpty()) {
          result.degY_ = new java.util.ArrayList<java.lang.Integer>();
        }
        result.degY_.add(value);
        return this;
      }
      public Builder addAllDegY(
          java.lang.Iterable<? extends java.lang.Integer> values) {
        if (result.degY_.isEmpty()) {
          result.degY_ = new java.util.ArrayList<java.lang.Integer>();
        }
        super.addAll(values, result.degY_);
        return this;
      }
      public Builder clearDegY() {
        result.degY_ = java.util.Collections.emptyList();
        return this;
      }
      
      // repeated .OsmAndRegion subregions = 8;
      public java.util.List<net.osmand.map.OsmandRegionInfo.OsmAndRegion> getSubregionsList() {
        return java.util.Collections.unmodifiableList(result.subregions_);
      }
      public int getSubregionsCount() {
        return result.getSubregionsCount();
      }
      public net.osmand.map.OsmandRegionInfo.OsmAndRegion getSubregions(int index) {
        return result.getSubregions(index);
      }
      public Builder setSubregions(int index, net.osmand.map.OsmandRegionInfo.OsmAndRegion value) {
        if (value == null) {
          throw new NullPointerException();
        }
        result.subregions_.set(index, value);
        return this;
      }
      public Builder setSubregions(int index, net.osmand.map.OsmandRegionInfo.OsmAndRegion.Builder builderForValue) {
        result.subregions_.set(index, builderForValue.build());
        return this;
      }
      public Builder addSubregions(net.osmand.map.OsmandRegionInfo.OsmAndRegion value) {
        if (value == null) {
          throw new NullPointerException();
        }
        if (result.subregions_.isEmpty()) {
          result.subregions_ = new java.util.ArrayList<net.osmand.map.OsmandRegionInfo.OsmAndRegion>();
        }
        result.subregions_.add(value);
        return this;
      }
      public Builder addSubregions(net.osmand.map.OsmandRegionInfo.OsmAndRegion.Builder builderForValue) {
        if (result.subregions_.isEmpty()) {
          result.subregions_ = new java.util.ArrayList<net.osmand.map.OsmandRegionInfo.OsmAndRegion>();
        }
        result.subregions_.add(builderForValue.build());
        return this;
      }
      public Builder addAllSubregions(
          java.lang.Iterable<? extends net.osmand.map.OsmandRegionInfo.OsmAndRegion> values) {
        if (result.subregions_.isEmpty()) {
          result.subregions_ = new java.util.ArrayList<net.osmand.map.OsmandRegionInfo.OsmAndRegion>();
        }
        super.addAll(values, result.subregions_);
        return this;
      }
      public Builder clearSubregions() {
        result.subregions_ = java.util.Collections.emptyList();
        return this;
      }
      
      // @@protoc_insertion_point(builder_scope:OsmAndRegion)
    }
    
    static {
      defaultInstance = new OsmAndRegion(true);
      net.osmand.map.OsmandRegionInfo.internalForceInit();
      defaultInstance.initFields();
    }
    
    // @@protoc_insertion_point(class_scope:OsmAndRegion)
  }
  
  
  static {
  }
  
  public static void internalForceInit() {}
  
  // @@protoc_insertion_point(outer_class_scope)
}
