/*
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
 * in compliance with the License. You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software distributed under the License
 * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
 * or implied. See the License for the specific language governing permissions and limitations under
 * the License.
 */
/*
 * This code was generated by https://github.com/googleapis/google-api-java-client-services/
 * Modify at your own risk.
 */

package com.google.api.services.contentwarehouse.v1.model;

/**
 * The grade level of a segment represents the relative altitude of the segment at a particular
 * point along the segment. This level is in relation to other segments at the same point. For
 * example, you might have a freeway at level = 0 and an overpass at level = 2. Vertical segments
 * are represented by a polyline containing only 1 vertex and exactly two grade_level in
 * segment.proto whose indices are 0. grade_level(0) represents the relative height at the start
 * point of the segments, and grade_level(1) represents the one at the end point.
 *
 * <p> This is the Java data model class that specifies how to parse/serialize into the JSON that is
 * transmitted over HTTP when working with the Document AI Warehouse API. For a detailed explanation
 * see:
 * <a href="https://developers.google.com/api-client-library/java/google-http-java-client/json">https://developers.google.com/api-client-library/java/google-http-java-client/json</a>
 * </p>
 *
 * @author Google, Inc.
 */
@SuppressWarnings("javadoc")
public final class GeostoreGradeLevelProto extends com.google.api.client.json.GenericJson {

  /**
   * The index of the point along the segment, where 0 is the starting point. This means that the
   * index of a point along a segment and its sibling will be different.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.Integer index;

  /**
   * The grade level of the indexed point. The grade level can be thought of as a relative vertical
   * ordering with respect to other segments at the same point, where larger/more positive numbers
   * are "higher". Negative grade level values are allowed and are typically used for points below
   * grade level (0 is a common choice to represent the level of points at the ground level). For
   * vertical segments, the height, i.e. the vertical length, is represented by difference of levels
   * in millimeters. For example, feature.segment().grade_level(0).level() == 0 and
   * feature.segment().grade_level(1).level() == 5000, then the length of the vertical segment
   * feature is 5000 millimeters (5 meters).
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.Integer level;

  /**
   * The index of the point along the segment, where 0 is the starting point. This means that the
   * index of a point along a segment and its sibling will be different.
   * @return value or {@code null} for none
   */
  public java.lang.Integer getIndex() {
    return index;
  }

  /**
   * The index of the point along the segment, where 0 is the starting point. This means that the
   * index of a point along a segment and its sibling will be different.
   * @param index index or {@code null} for none
   */
  public GeostoreGradeLevelProto setIndex(java.lang.Integer index) {
    this.index = index;
    return this;
  }

  /**
   * The grade level of the indexed point. The grade level can be thought of as a relative vertical
   * ordering with respect to other segments at the same point, where larger/more positive numbers
   * are "higher". Negative grade level values are allowed and are typically used for points below
   * grade level (0 is a common choice to represent the level of points at the ground level). For
   * vertical segments, the height, i.e. the vertical length, is represented by difference of levels
   * in millimeters. For example, feature.segment().grade_level(0).level() == 0 and
   * feature.segment().grade_level(1).level() == 5000, then the length of the vertical segment
   * feature is 5000 millimeters (5 meters).
   * @return value or {@code null} for none
   */
  public java.lang.Integer getLevel() {
    return level;
  }

  /**
   * The grade level of the indexed point. The grade level can be thought of as a relative vertical
   * ordering with respect to other segments at the same point, where larger/more positive numbers
   * are "higher". Negative grade level values are allowed and are typically used for points below
   * grade level (0 is a common choice to represent the level of points at the ground level). For
   * vertical segments, the height, i.e. the vertical length, is represented by difference of levels
   * in millimeters. For example, feature.segment().grade_level(0).level() == 0 and
   * feature.segment().grade_level(1).level() == 5000, then the length of the vertical segment
   * feature is 5000 millimeters (5 meters).
   * @param level level or {@code null} for none
   */
  public GeostoreGradeLevelProto setLevel(java.lang.Integer level) {
    this.level = level;
    return this;
  }

  @Override
  public GeostoreGradeLevelProto set(String fieldName, Object value) {
    return (GeostoreGradeLevelProto) super.set(fieldName, value);
  }

  @Override
  public GeostoreGradeLevelProto clone() {
    return (GeostoreGradeLevelProto) super.clone();
  }

}
