content: /*
   ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
   ~                                                                               ~
   ~ The MIT License (MIT)                                                         ~
   ~                                                                               ~
   ~ Copyright (c) 2015-2025 miaixz.org gitlab4j and other contributors.           ~
   ~                                                                               ~
   ~ Permission is hereby granted, free of charge, to any person obtaining a copy  ~
   ~ of this software and associated documentation files (the "Software"), to deal ~
   ~ in the Software without restriction, including without limitation the rights  ~
   ~ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell     ~
   ~ copies of the Software, and to permit persons to whom the Software is         ~
   ~ furnished to do so, subject to the following conditions:                      ~
   ~                                                                               ~
   ~ The above copyright notice and this permission notice shall be included in    ~
   ~ all copies or substantial portions of the Software.                           ~
   ~                                                                               ~
   ~ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR    ~
   ~ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,      ~
   ~ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE   ~
   ~ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER        ~
   ~ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, ~
   ~ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN     ~
   ~ THE SOFTWARE.                                                                 ~
   ~                                                                               ~
   ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
  */
  package org.miaixz.bus.gitlab.models;
  
  import java.io.Serializable;
  
  import org.miaixz.bus.gitlab.support.JacksonJson;
  import org.miaixz.bus.gitlab.support.JacksonJsonEnumHelper;
  
  import com.fasterxml.jackson.annotation.JsonCreator;
  import com.fasterxml.jackson.annotation.JsonValue;
  import java.io.Serial;
  
  public class Position implements Serializable {
  
      @Serial
      private static final long serialVersionUID = 2852270036770L;
  
      public static enum PositionType {
  
          TEXT, IMAGE, FILE;
  
          private static JacksonJsonEnumHelper<PositionType> enumHelper = new JacksonJsonEnumHelper<>(PositionType.class,
                  false, false);
  
          @JsonCreator
          public static PositionType forValue(String value) {
              return enumHelper.forValue(value);
          }
  
          @JsonValue
          public String toValue() {
              return (enumHelper.toString(this));
          }
  
          @Override
          public String toString() {
              return (enumHelper.toString(this));
          }
      }
  
      private String baseSha;
      private String startSha;
      private String headSha;
      private String oldPath;
      private String newPath;
      private PositionType positionType;
  
      private Integer oldLine;
      private Integer newLine;
  
      private Integer width;
      private Integer height;
      private Double x;
      private Double y;
  
      public String getBaseSha() {
          return baseSha;
      }
  
      public void setBaseSha(String baseSha) {
          this.baseSha = baseSha;
      }
  
      public Position withBaseSha(String baseSha) {
          this.baseSha = baseSha;
          return (this);
      }
  
      public String getStartSha() {
          return startSha;
      }
  
      public void setStartSha(String startSha) {
          this.startSha = startSha;
      }
  
      public Position withStartSha(String startSha) {
          this.startSha = startSha;
          return (this);
      }
  
      public String getHeadSha() {
          return headSha;
      }
  
      public void setHeadSha(String headSha) {
          this.headSha = headSha;
      }
  
      public Position withHeadSha(String headSha) {
          this.headSha = headSha;
          return (this);
      }
  
      public String getOldPath() {
          return oldPath;
      }
  
      public void setOldPath(String oldPath) {
          this.oldPath = oldPath;
      }
  
      public Position withOldPath(String oldPath) {
          this.oldPath = oldPath;
          return (this);
      }
  
      public String getNewPath() {
          return newPath;
      }
  
      public void setNewPath(String newPath) {
          this.newPath = newPath;
      }
  
      public Position withNewPath(String newPath) {
          this.newPath = newPath;
          return (this);
      }
  
      public PositionType getPositionType() {
          return positionType;
      }
  
      public void setPositionType(PositionType positionType) {
          this.positionType = positionType;
      }
  
      public Position withPositionType(PositionType positionType) {
          this.positionType = positionType;
          return (this);
      }
  
      public Integer getOldLine() {
          return oldLine;
      }
  
      public void setOldLine(Integer oldLine) {
          this.oldLine = oldLine;
      }
  
      public Position withOldLine(Integer oldLine) {
          this.oldLine = oldLine;
          return (this);
      }
  
      public Integer getNewLine() {
          return newLine;
      }
  
      public void setNewLine(Integer newLine) {
          this.newLine = newLine;
      }
  
      public Position withNewLine(Integer newLine) {
          this.newLine = newLine;
          return (this);
      }
  
      public Integer getWidth() {
          return width;
      }
  
      public void setWidth(Integer width) {
          this.width = width;
      }
  
      public Position withWidth(Integer width) {
          this.width = width;
          return (this);
      }
  
      public Integer getHeight() {
          return height;
      }
  
      public void setHeight(Integer height) {
          this.height = height;
      }
  
      public Position withHeight(Integer height) {
          this.height = height;
          return (this);
      }
  
      public Double getX() {
          return x;
      }
  
      public void setX(Double x) {
          this.x = x;
      }
  
      public Position withX(Double x) {
          this.x = x;
          return (this);
      }
  
      public Double getY() {
          return y;
      }
  
      public void setY(Double y) {
          this.y = y;
      }
  
      public Position withY(Double y) {
          this.y = y;
          return (this);
      }
  
      @Override
      public String toString() {
          return (JacksonJson.toJsonString(this));
      }
  
  }
  