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