001package com.box.sdkgen.schemas.templatesignerinput;
002
003import com.box.sdkgen.internal.NullableFieldTracker;
004import com.box.sdkgen.internal.SerializableObject;
005import com.fasterxml.jackson.annotation.JsonFilter;
006import java.util.Objects;
007
008@JsonFilter("nullablePropertyFilter")
009public class TemplateSignerInputCoordinatesField extends SerializableObject {
010
011  /** Relative x coordinate to the page the input is on, ranging from 0 to 1. */
012  protected Double x;
013
014  /** Relative y coordinate to the page the input is on, ranging from 0 to 1. */
015  protected Double y;
016
017  public TemplateSignerInputCoordinatesField() {
018    super();
019  }
020
021  protected TemplateSignerInputCoordinatesField(Builder builder) {
022    super();
023    this.x = builder.x;
024    this.y = builder.y;
025    markNullableFieldsAsSet(builder.getExplicitlySetNullableFields());
026  }
027
028  public Double getX() {
029    return x;
030  }
031
032  public Double getY() {
033    return y;
034  }
035
036  @Override
037  public boolean equals(Object o) {
038    if (this == o) {
039      return true;
040    }
041    if (o == null || getClass() != o.getClass()) {
042      return false;
043    }
044    TemplateSignerInputCoordinatesField casted = (TemplateSignerInputCoordinatesField) o;
045    return Objects.equals(x, casted.x) && Objects.equals(y, casted.y);
046  }
047
048  @Override
049  public int hashCode() {
050    return Objects.hash(x, y);
051  }
052
053  @Override
054  public String toString() {
055    return "TemplateSignerInputCoordinatesField{"
056        + "x='"
057        + x
058        + '\''
059        + ", "
060        + "y='"
061        + y
062        + '\''
063        + "}";
064  }
065
066  public static class Builder extends NullableFieldTracker {
067
068    protected Double x;
069
070    protected Double y;
071
072    public Builder x(Double x) {
073      this.x = x;
074      return this;
075    }
076
077    public Builder y(Double y) {
078      this.y = y;
079      return this;
080    }
081
082    public TemplateSignerInputCoordinatesField build() {
083      return new TemplateSignerInputCoordinatesField(this);
084    }
085  }
086}