001package com.box.sdkgen.managers.legalholdpolicies; 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 UpdateLegalHoldPolicyByIdRequestBody extends SerializableObject { 011 012 /** The name of the policy. */ 013 @JsonProperty("policy_name") 014 protected String policyName; 015 016 /** A description for the policy. */ 017 protected String description; 018 019 /** Notes around why the policy was released. */ 020 @JsonProperty("release_notes") 021 protected String releaseNotes; 022 023 public UpdateLegalHoldPolicyByIdRequestBody() { 024 super(); 025 } 026 027 protected UpdateLegalHoldPolicyByIdRequestBody(Builder builder) { 028 super(); 029 this.policyName = builder.policyName; 030 this.description = builder.description; 031 this.releaseNotes = builder.releaseNotes; 032 markNullableFieldsAsSet(builder.getExplicitlySetNullableFields()); 033 } 034 035 public String getPolicyName() { 036 return policyName; 037 } 038 039 public String getDescription() { 040 return description; 041 } 042 043 public String getReleaseNotes() { 044 return releaseNotes; 045 } 046 047 @Override 048 public boolean equals(Object o) { 049 if (this == o) { 050 return true; 051 } 052 if (o == null || getClass() != o.getClass()) { 053 return false; 054 } 055 UpdateLegalHoldPolicyByIdRequestBody casted = (UpdateLegalHoldPolicyByIdRequestBody) o; 056 return Objects.equals(policyName, casted.policyName) 057 && Objects.equals(description, casted.description) 058 && Objects.equals(releaseNotes, casted.releaseNotes); 059 } 060 061 @Override 062 public int hashCode() { 063 return Objects.hash(policyName, description, releaseNotes); 064 } 065 066 @Override 067 public String toString() { 068 return "UpdateLegalHoldPolicyByIdRequestBody{" 069 + "policyName='" 070 + policyName 071 + '\'' 072 + ", " 073 + "description='" 074 + description 075 + '\'' 076 + ", " 077 + "releaseNotes='" 078 + releaseNotes 079 + '\'' 080 + "}"; 081 } 082 083 public static class Builder extends NullableFieldTracker { 084 085 protected String policyName; 086 087 protected String description; 088 089 protected String releaseNotes; 090 091 public Builder policyName(String policyName) { 092 this.policyName = policyName; 093 return this; 094 } 095 096 public Builder description(String description) { 097 this.description = description; 098 return this; 099 } 100 101 public Builder releaseNotes(String releaseNotes) { 102 this.releaseNotes = releaseNotes; 103 return this; 104 } 105 106 public UpdateLegalHoldPolicyByIdRequestBody build() { 107 return new UpdateLegalHoldPolicyByIdRequestBody(this); 108 } 109 } 110}