001package com.box.sdkgen.managers.archives; 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 CreateArchiveV2025R0RequestBody extends SerializableObject { 011 012 /** The name of the archive. */ 013 protected final String name; 014 015 /** The description of the archive. */ 016 protected String description; 017 018 /** The ID of the storage policy that the archive is assigned to. */ 019 @JsonProperty("storage_policy_id") 020 protected String storagePolicyId; 021 022 public CreateArchiveV2025R0RequestBody(@JsonProperty("name") String name) { 023 super(); 024 this.name = name; 025 } 026 027 protected CreateArchiveV2025R0RequestBody(Builder builder) { 028 super(); 029 this.name = builder.name; 030 this.description = builder.description; 031 this.storagePolicyId = builder.storagePolicyId; 032 markNullableFieldsAsSet(builder.getExplicitlySetNullableFields()); 033 } 034 035 public String getName() { 036 return name; 037 } 038 039 public String getDescription() { 040 return description; 041 } 042 043 public String getStoragePolicyId() { 044 return storagePolicyId; 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 CreateArchiveV2025R0RequestBody casted = (CreateArchiveV2025R0RequestBody) o; 056 return Objects.equals(name, casted.name) 057 && Objects.equals(description, casted.description) 058 && Objects.equals(storagePolicyId, casted.storagePolicyId); 059 } 060 061 @Override 062 public int hashCode() { 063 return Objects.hash(name, description, storagePolicyId); 064 } 065 066 @Override 067 public String toString() { 068 return "CreateArchiveV2025R0RequestBody{" 069 + "name='" 070 + name 071 + '\'' 072 + ", " 073 + "description='" 074 + description 075 + '\'' 076 + ", " 077 + "storagePolicyId='" 078 + storagePolicyId 079 + '\'' 080 + "}"; 081 } 082 083 public static class Builder extends NullableFieldTracker { 084 085 protected final String name; 086 087 protected String description; 088 089 protected String storagePolicyId; 090 091 public Builder(String name) { 092 super(); 093 this.name = name; 094 } 095 096 public Builder description(String description) { 097 this.description = description; 098 return this; 099 } 100 101 public Builder storagePolicyId(String storagePolicyId) { 102 this.storagePolicyId = storagePolicyId; 103 return this; 104 } 105 106 public CreateArchiveV2025R0RequestBody build() { 107 return new CreateArchiveV2025R0RequestBody(this); 108 } 109 } 110}