001package com.box.sdkgen.schemas.v2025r0.externalcollabsecuritysettingsv2025r0; 002 003import com.box.sdkgen.internal.Nullable; 004import com.box.sdkgen.internal.NullableFieldTracker; 005import com.box.sdkgen.internal.SerializableObject; 006import com.box.sdkgen.internal.utils.DateTimeUtils; 007import com.fasterxml.jackson.annotation.JsonFilter; 008import com.fasterxml.jackson.annotation.JsonProperty; 009import com.fasterxml.jackson.databind.annotation.JsonDeserialize; 010import com.fasterxml.jackson.databind.annotation.JsonSerialize; 011import java.time.OffsetDateTime; 012import java.util.List; 013import java.util.Objects; 014 015/** External collaboration security settings. */ 016@JsonFilter("nullablePropertyFilter") 017public class ExternalCollabSecuritySettingsV2025R0 extends SerializableObject { 018 019 /** 020 * List of domains that are not allowed for external collaboration. Applies if state is 021 * `denylist`. 022 */ 023 @JsonProperty("denylist_domains") 024 protected List<String> denylistDomains; 025 026 /** 027 * List of email addresses that are not allowed for external collaboration. Applies if state is 028 * `denylist`. 029 */ 030 @JsonProperty("denylist_emails") 031 protected List<String> denylistEmails; 032 033 /** 034 * List of domains that are allowed for external collaboration. Applies if state is `allowlist`. 035 */ 036 @JsonProperty("allowlist_domains") 037 protected List<String> allowlistDomains; 038 039 /** 040 * List of email addresses that are allowed for external collaboration. Applies if state is 041 * `allowlist`. 042 */ 043 @JsonProperty("allowlist_emails") 044 protected List<String> allowlistEmails; 045 046 /** 047 * The state of the external collaboration security settings. Possible values include `enabled`, 048 * `disabled`, `allowlist`, and `denylist`. 049 */ 050 @Nullable protected String state; 051 052 /** 053 * The status of the scheduling to apply external collaboration security settings. Possible values 054 * include `in_progress`, `scheduled`, `completed`, `failed`, and `scheduled_immediate`. 055 */ 056 @JsonProperty("scheduled_status") 057 @Nullable 058 protected String scheduledStatus; 059 060 /** Scheduled at. */ 061 @JsonProperty("scheduled_at") 062 @JsonSerialize(using = DateTimeUtils.DateTimeSerializer.class) 063 @JsonDeserialize(using = DateTimeUtils.DateTimeDeserializer.class) 064 @Nullable 065 protected OffsetDateTime scheduledAt; 066 067 /** 068 * Factor type for the external collaborators authentication. Possible values include `totp`, 069 * `any`, or `unknown`. 070 */ 071 @JsonProperty("factor_type_settings") 072 @Nullable 073 protected String factorTypeSettings; 074 075 public ExternalCollabSecuritySettingsV2025R0() { 076 super(); 077 } 078 079 protected ExternalCollabSecuritySettingsV2025R0(Builder builder) { 080 super(); 081 this.denylistDomains = builder.denylistDomains; 082 this.denylistEmails = builder.denylistEmails; 083 this.allowlistDomains = builder.allowlistDomains; 084 this.allowlistEmails = builder.allowlistEmails; 085 this.state = builder.state; 086 this.scheduledStatus = builder.scheduledStatus; 087 this.scheduledAt = builder.scheduledAt; 088 this.factorTypeSettings = builder.factorTypeSettings; 089 markNullableFieldsAsSet(builder.getExplicitlySetNullableFields()); 090 } 091 092 public List<String> getDenylistDomains() { 093 return denylistDomains; 094 } 095 096 public List<String> getDenylistEmails() { 097 return denylistEmails; 098 } 099 100 public List<String> getAllowlistDomains() { 101 return allowlistDomains; 102 } 103 104 public List<String> getAllowlistEmails() { 105 return allowlistEmails; 106 } 107 108 public String getState() { 109 return state; 110 } 111 112 public String getScheduledStatus() { 113 return scheduledStatus; 114 } 115 116 public OffsetDateTime getScheduledAt() { 117 return scheduledAt; 118 } 119 120 public String getFactorTypeSettings() { 121 return factorTypeSettings; 122 } 123 124 @Override 125 public boolean equals(Object o) { 126 if (this == o) { 127 return true; 128 } 129 if (o == null || getClass() != o.getClass()) { 130 return false; 131 } 132 ExternalCollabSecuritySettingsV2025R0 casted = (ExternalCollabSecuritySettingsV2025R0) o; 133 return Objects.equals(denylistDomains, casted.denylistDomains) 134 && Objects.equals(denylistEmails, casted.denylistEmails) 135 && Objects.equals(allowlistDomains, casted.allowlistDomains) 136 && Objects.equals(allowlistEmails, casted.allowlistEmails) 137 && Objects.equals(state, casted.state) 138 && Objects.equals(scheduledStatus, casted.scheduledStatus) 139 && Objects.equals(scheduledAt, casted.scheduledAt) 140 && Objects.equals(factorTypeSettings, casted.factorTypeSettings); 141 } 142 143 @Override 144 public int hashCode() { 145 return Objects.hash( 146 denylistDomains, 147 denylistEmails, 148 allowlistDomains, 149 allowlistEmails, 150 state, 151 scheduledStatus, 152 scheduledAt, 153 factorTypeSettings); 154 } 155 156 @Override 157 public String toString() { 158 return "ExternalCollabSecuritySettingsV2025R0{" 159 + "denylistDomains='" 160 + denylistDomains 161 + '\'' 162 + ", " 163 + "denylistEmails='" 164 + denylistEmails 165 + '\'' 166 + ", " 167 + "allowlistDomains='" 168 + allowlistDomains 169 + '\'' 170 + ", " 171 + "allowlistEmails='" 172 + allowlistEmails 173 + '\'' 174 + ", " 175 + "state='" 176 + state 177 + '\'' 178 + ", " 179 + "scheduledStatus='" 180 + scheduledStatus 181 + '\'' 182 + ", " 183 + "scheduledAt='" 184 + scheduledAt 185 + '\'' 186 + ", " 187 + "factorTypeSettings='" 188 + factorTypeSettings 189 + '\'' 190 + "}"; 191 } 192 193 public static class Builder extends NullableFieldTracker { 194 195 protected List<String> denylistDomains; 196 197 protected List<String> denylistEmails; 198 199 protected List<String> allowlistDomains; 200 201 protected List<String> allowlistEmails; 202 203 protected String state; 204 205 protected String scheduledStatus; 206 207 protected OffsetDateTime scheduledAt; 208 209 protected String factorTypeSettings; 210 211 public Builder denylistDomains(List<String> denylistDomains) { 212 this.denylistDomains = denylistDomains; 213 return this; 214 } 215 216 public Builder denylistEmails(List<String> denylistEmails) { 217 this.denylistEmails = denylistEmails; 218 return this; 219 } 220 221 public Builder allowlistDomains(List<String> allowlistDomains) { 222 this.allowlistDomains = allowlistDomains; 223 return this; 224 } 225 226 public Builder allowlistEmails(List<String> allowlistEmails) { 227 this.allowlistEmails = allowlistEmails; 228 return this; 229 } 230 231 public Builder state(String state) { 232 this.state = state; 233 this.markNullableFieldAsSet("state"); 234 return this; 235 } 236 237 public Builder scheduledStatus(String scheduledStatus) { 238 this.scheduledStatus = scheduledStatus; 239 this.markNullableFieldAsSet("scheduled_status"); 240 return this; 241 } 242 243 public Builder scheduledAt(OffsetDateTime scheduledAt) { 244 this.scheduledAt = scheduledAt; 245 this.markNullableFieldAsSet("scheduled_at"); 246 return this; 247 } 248 249 public Builder factorTypeSettings(String factorTypeSettings) { 250 this.factorTypeSettings = factorTypeSettings; 251 this.markNullableFieldAsSet("factor_type_settings"); 252 return this; 253 } 254 255 public ExternalCollabSecuritySettingsV2025R0 build() { 256 return new ExternalCollabSecuritySettingsV2025R0(this); 257 } 258 } 259}