001package com.box.sdkgen.schemas.v2025r0.keysafesettingsv2025r0; 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 com.fasterxml.jackson.annotation.JsonProperty; 008import java.util.Objects; 009 010/** The KeySafe settings. */ 011@JsonFilter("nullablePropertyFilter") 012public class KeysafeSettingsV2025R0 extends SerializableObject { 013 014 /** Whether KeySafe addon is enabled for the enterprise. */ 015 @JsonProperty("keysafe_enabled") 016 protected Boolean keysafeEnabled; 017 018 /** The cloud provider. */ 019 @JsonProperty("cloud_provider") 020 @Nullable 021 protected String cloudProvider; 022 023 /** The key ID. */ 024 @JsonProperty("key_id") 025 @Nullable 026 protected String keyId; 027 028 /** The account ID. */ 029 @JsonProperty("account_id") 030 @Nullable 031 protected String accountId; 032 033 /** The location ID. */ 034 @JsonProperty("location_id") 035 @Nullable 036 protected String locationId; 037 038 /** The project ID. */ 039 @JsonProperty("project_id") 040 @Nullable 041 protected String projectId; 042 043 /** The key ring ID. */ 044 @JsonProperty("keyring_id") 045 @Nullable 046 protected String keyringId; 047 048 public KeysafeSettingsV2025R0() { 049 super(); 050 } 051 052 protected KeysafeSettingsV2025R0(Builder builder) { 053 super(); 054 this.keysafeEnabled = builder.keysafeEnabled; 055 this.cloudProvider = builder.cloudProvider; 056 this.keyId = builder.keyId; 057 this.accountId = builder.accountId; 058 this.locationId = builder.locationId; 059 this.projectId = builder.projectId; 060 this.keyringId = builder.keyringId; 061 markNullableFieldsAsSet(builder.getExplicitlySetNullableFields()); 062 } 063 064 public Boolean getKeysafeEnabled() { 065 return keysafeEnabled; 066 } 067 068 public String getCloudProvider() { 069 return cloudProvider; 070 } 071 072 public String getKeyId() { 073 return keyId; 074 } 075 076 public String getAccountId() { 077 return accountId; 078 } 079 080 public String getLocationId() { 081 return locationId; 082 } 083 084 public String getProjectId() { 085 return projectId; 086 } 087 088 public String getKeyringId() { 089 return keyringId; 090 } 091 092 @Override 093 public boolean equals(Object o) { 094 if (this == o) { 095 return true; 096 } 097 if (o == null || getClass() != o.getClass()) { 098 return false; 099 } 100 KeysafeSettingsV2025R0 casted = (KeysafeSettingsV2025R0) o; 101 return Objects.equals(keysafeEnabled, casted.keysafeEnabled) 102 && Objects.equals(cloudProvider, casted.cloudProvider) 103 && Objects.equals(keyId, casted.keyId) 104 && Objects.equals(accountId, casted.accountId) 105 && Objects.equals(locationId, casted.locationId) 106 && Objects.equals(projectId, casted.projectId) 107 && Objects.equals(keyringId, casted.keyringId); 108 } 109 110 @Override 111 public int hashCode() { 112 return Objects.hash( 113 keysafeEnabled, cloudProvider, keyId, accountId, locationId, projectId, keyringId); 114 } 115 116 @Override 117 public String toString() { 118 return "KeysafeSettingsV2025R0{" 119 + "keysafeEnabled='" 120 + keysafeEnabled 121 + '\'' 122 + ", " 123 + "cloudProvider='" 124 + cloudProvider 125 + '\'' 126 + ", " 127 + "keyId='" 128 + keyId 129 + '\'' 130 + ", " 131 + "accountId='" 132 + accountId 133 + '\'' 134 + ", " 135 + "locationId='" 136 + locationId 137 + '\'' 138 + ", " 139 + "projectId='" 140 + projectId 141 + '\'' 142 + ", " 143 + "keyringId='" 144 + keyringId 145 + '\'' 146 + "}"; 147 } 148 149 public static class Builder extends NullableFieldTracker { 150 151 protected Boolean keysafeEnabled; 152 153 protected String cloudProvider; 154 155 protected String keyId; 156 157 protected String accountId; 158 159 protected String locationId; 160 161 protected String projectId; 162 163 protected String keyringId; 164 165 public Builder keysafeEnabled(Boolean keysafeEnabled) { 166 this.keysafeEnabled = keysafeEnabled; 167 return this; 168 } 169 170 public Builder cloudProvider(String cloudProvider) { 171 this.cloudProvider = cloudProvider; 172 this.markNullableFieldAsSet("cloud_provider"); 173 return this; 174 } 175 176 public Builder keyId(String keyId) { 177 this.keyId = keyId; 178 this.markNullableFieldAsSet("key_id"); 179 return this; 180 } 181 182 public Builder accountId(String accountId) { 183 this.accountId = accountId; 184 this.markNullableFieldAsSet("account_id"); 185 return this; 186 } 187 188 public Builder locationId(String locationId) { 189 this.locationId = locationId; 190 this.markNullableFieldAsSet("location_id"); 191 return this; 192 } 193 194 public Builder projectId(String projectId) { 195 this.projectId = projectId; 196 this.markNullableFieldAsSet("project_id"); 197 return this; 198 } 199 200 public Builder keyringId(String keyringId) { 201 this.keyringId = keyringId; 202 this.markNullableFieldAsSet("keyring_id"); 203 return this; 204 } 205 206 public KeysafeSettingsV2025R0 build() { 207 return new KeysafeSettingsV2025R0(this); 208 } 209 } 210}