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