001package com.box.sdkgen.schemas.storagepolicyassignment;
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 StoragePolicyAssignmentAssignedToField extends SerializableObject {
010
011  /** The unique identifier for this object. */
012  protected String id;
013
014  /** The type for this object. */
015  protected String type;
016
017  public StoragePolicyAssignmentAssignedToField() {
018    super();
019  }
020
021  protected StoragePolicyAssignmentAssignedToField(Builder builder) {
022    super();
023    this.id = builder.id;
024    this.type = builder.type;
025    markNullableFieldsAsSet(builder.getExplicitlySetNullableFields());
026  }
027
028  public String getId() {
029    return id;
030  }
031
032  public String getType() {
033    return type;
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    StoragePolicyAssignmentAssignedToField casted = (StoragePolicyAssignmentAssignedToField) o;
045    return Objects.equals(id, casted.id) && Objects.equals(type, casted.type);
046  }
047
048  @Override
049  public int hashCode() {
050    return Objects.hash(id, type);
051  }
052
053  @Override
054  public String toString() {
055    return "StoragePolicyAssignmentAssignedToField{"
056        + "id='"
057        + id
058        + '\''
059        + ", "
060        + "type='"
061        + type
062        + '\''
063        + "}";
064  }
065
066  public static class Builder extends NullableFieldTracker {
067
068    protected String id;
069
070    protected String type;
071
072    public Builder id(String id) {
073      this.id = id;
074      return this;
075    }
076
077    public Builder type(String type) {
078      this.type = type;
079      return this;
080    }
081
082    public StoragePolicyAssignmentAssignedToField build() {
083      return new StoragePolicyAssignmentAssignedToField(this);
084    }
085  }
086}