001package com.box.sdkgen.schemas.v2025r0.hubcollaborationv2025r0; 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@JsonFilter("nullablePropertyFilter") 011public 012class HubCollaborationV2025R0AcceptanceRequirementsStatusTwoFactorAuthenticationRequirementField 013 extends SerializableObject { 014 015 /** 016 * Whether or not the enterprise that owns the content requires two-factor authentication to be 017 * enabled in order to collaborate on the content. 018 */ 019 @JsonProperty("enterprise_has_two_factor_auth_enabled") 020 protected Boolean enterpriseHasTwoFactorAuthEnabled; 021 022 /** 023 * Whether or not the user has two-factor authentication enabled. The field is `null` when 024 * two-factor authentication is not required. 025 */ 026 @JsonProperty("user_has_two_factor_authentication_enabled") 027 @Nullable 028 protected Boolean userHasTwoFactorAuthenticationEnabled; 029 030 public 031 HubCollaborationV2025R0AcceptanceRequirementsStatusTwoFactorAuthenticationRequirementField() { 032 super(); 033 } 034 035 protected 036 HubCollaborationV2025R0AcceptanceRequirementsStatusTwoFactorAuthenticationRequirementField( 037 Builder builder) { 038 super(); 039 this.enterpriseHasTwoFactorAuthEnabled = builder.enterpriseHasTwoFactorAuthEnabled; 040 this.userHasTwoFactorAuthenticationEnabled = builder.userHasTwoFactorAuthenticationEnabled; 041 markNullableFieldsAsSet(builder.getExplicitlySetNullableFields()); 042 } 043 044 public Boolean getEnterpriseHasTwoFactorAuthEnabled() { 045 return enterpriseHasTwoFactorAuthEnabled; 046 } 047 048 public Boolean getUserHasTwoFactorAuthenticationEnabled() { 049 return userHasTwoFactorAuthenticationEnabled; 050 } 051 052 @Override 053 public boolean equals(Object o) { 054 if (this == o) { 055 return true; 056 } 057 if (o == null || getClass() != o.getClass()) { 058 return false; 059 } 060 HubCollaborationV2025R0AcceptanceRequirementsStatusTwoFactorAuthenticationRequirementField 061 casted = 062 (HubCollaborationV2025R0AcceptanceRequirementsStatusTwoFactorAuthenticationRequirementField) 063 o; 064 return Objects.equals( 065 enterpriseHasTwoFactorAuthEnabled, casted.enterpriseHasTwoFactorAuthEnabled) 066 && Objects.equals( 067 userHasTwoFactorAuthenticationEnabled, casted.userHasTwoFactorAuthenticationEnabled); 068 } 069 070 @Override 071 public int hashCode() { 072 return Objects.hash(enterpriseHasTwoFactorAuthEnabled, userHasTwoFactorAuthenticationEnabled); 073 } 074 075 @Override 076 public String toString() { 077 return "HubCollaborationV2025R0AcceptanceRequirementsStatusTwoFactorAuthenticationRequirementField{" 078 + "enterpriseHasTwoFactorAuthEnabled='" 079 + enterpriseHasTwoFactorAuthEnabled 080 + '\'' 081 + ", " 082 + "userHasTwoFactorAuthenticationEnabled='" 083 + userHasTwoFactorAuthenticationEnabled 084 + '\'' 085 + "}"; 086 } 087 088 public static class Builder extends NullableFieldTracker { 089 090 protected Boolean enterpriseHasTwoFactorAuthEnabled; 091 092 protected Boolean userHasTwoFactorAuthenticationEnabled; 093 094 public Builder enterpriseHasTwoFactorAuthEnabled(Boolean enterpriseHasTwoFactorAuthEnabled) { 095 this.enterpriseHasTwoFactorAuthEnabled = enterpriseHasTwoFactorAuthEnabled; 096 return this; 097 } 098 099 public Builder userHasTwoFactorAuthenticationEnabled( 100 Boolean userHasTwoFactorAuthenticationEnabled) { 101 this.userHasTwoFactorAuthenticationEnabled = userHasTwoFactorAuthenticationEnabled; 102 this.markNullableFieldAsSet("user_has_two_factor_authentication_enabled"); 103 return this; 104 } 105 106 public 107 HubCollaborationV2025R0AcceptanceRequirementsStatusTwoFactorAuthenticationRequirementField 108 build() { 109 return new HubCollaborationV2025R0AcceptanceRequirementsStatusTwoFactorAuthenticationRequirementField( 110 this); 111 } 112 } 113}