001package com.box.sdkgen.box.jwtauth;
002
003import com.box.sdkgen.internal.NullableFieldTracker;
004import com.box.sdkgen.internal.SerializableObject;
005import com.fasterxml.jackson.annotation.JsonFilter;
006import com.fasterxml.jackson.annotation.JsonProperty;
007import java.util.Objects;
008
009@JsonFilter("nullablePropertyFilter")
010public class JwtConfigFile extends SerializableObject {
011
012  /** Enterprise ID */
013  @JsonProperty("enterpriseID")
014  protected String enterpriseId;
015
016  /** User ID */
017  @JsonProperty("userID")
018  protected String userId;
019
020  /** App settings */
021  protected final JwtConfigAppSettings boxAppSettings;
022
023  public JwtConfigFile(@JsonProperty("boxAppSettings") JwtConfigAppSettings boxAppSettings) {
024    super();
025    this.boxAppSettings = boxAppSettings;
026  }
027
028  protected JwtConfigFile(Builder builder) {
029    super();
030    this.enterpriseId = builder.enterpriseId;
031    this.userId = builder.userId;
032    this.boxAppSettings = builder.boxAppSettings;
033    markNullableFieldsAsSet(builder.getExplicitlySetNullableFields());
034  }
035
036  public String getEnterpriseId() {
037    return enterpriseId;
038  }
039
040  public String getUserId() {
041    return userId;
042  }
043
044  public JwtConfigAppSettings getBoxAppSettings() {
045    return boxAppSettings;
046  }
047
048  @Override
049  public boolean equals(Object o) {
050    if (this == o) {
051      return true;
052    }
053    if (o == null || getClass() != o.getClass()) {
054      return false;
055    }
056    JwtConfigFile casted = (JwtConfigFile) o;
057    return Objects.equals(enterpriseId, casted.enterpriseId)
058        && Objects.equals(userId, casted.userId)
059        && Objects.equals(boxAppSettings, casted.boxAppSettings);
060  }
061
062  @Override
063  public int hashCode() {
064    return Objects.hash(enterpriseId, userId, boxAppSettings);
065  }
066
067  @Override
068  public String toString() {
069    return "JwtConfigFile{"
070        + "enterpriseId='"
071        + enterpriseId
072        + '\''
073        + ", "
074        + "userId='"
075        + userId
076        + '\''
077        + ", "
078        + "boxAppSettings='"
079        + boxAppSettings
080        + '\''
081        + "}";
082  }
083
084  public static class Builder extends NullableFieldTracker {
085
086    protected String enterpriseId;
087
088    protected String userId;
089
090    protected final JwtConfigAppSettings boxAppSettings;
091
092    public Builder(JwtConfigAppSettings boxAppSettings) {
093      super();
094      this.boxAppSettings = boxAppSettings;
095    }
096
097    public Builder enterpriseId(String enterpriseId) {
098      this.enterpriseId = enterpriseId;
099      return this;
100    }
101
102    public Builder userId(String userId) {
103      this.userId = userId;
104      return this;
105    }
106
107    public JwtConfigFile build() {
108      return new JwtConfigFile(this);
109    }
110  }
111}