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