001package com.box.sdkgen.schemas.v2025r0.hubcollaborationcreaterequestv2025r0; 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 HubCollaborationCreateRequestV2025R0AccessibleByField extends SerializableObject { 011 012 /** The type of collaborator to invite. Possible values are `user` or `group`. */ 013 protected final String type; 014 015 /** 016 * The ID of the user or group. 017 * 018 * <p>Alternatively, use `login` to specify a user by email address. 019 */ 020 protected String id; 021 022 /** 023 * The email address of the user who gets access to the item. 024 * 025 * <p>Alternatively, use `id` to specify a user by user ID. 026 */ 027 protected String login; 028 029 public HubCollaborationCreateRequestV2025R0AccessibleByField(@JsonProperty("type") String type) { 030 super(); 031 this.type = type; 032 } 033 034 protected HubCollaborationCreateRequestV2025R0AccessibleByField(Builder builder) { 035 super(); 036 this.type = builder.type; 037 this.id = builder.id; 038 this.login = builder.login; 039 markNullableFieldsAsSet(builder.getExplicitlySetNullableFields()); 040 } 041 042 public String getType() { 043 return type; 044 } 045 046 public String getId() { 047 return id; 048 } 049 050 public String getLogin() { 051 return login; 052 } 053 054 @Override 055 public boolean equals(Object o) { 056 if (this == o) { 057 return true; 058 } 059 if (o == null || getClass() != o.getClass()) { 060 return false; 061 } 062 HubCollaborationCreateRequestV2025R0AccessibleByField casted = 063 (HubCollaborationCreateRequestV2025R0AccessibleByField) o; 064 return Objects.equals(type, casted.type) 065 && Objects.equals(id, casted.id) 066 && Objects.equals(login, casted.login); 067 } 068 069 @Override 070 public int hashCode() { 071 return Objects.hash(type, id, login); 072 } 073 074 @Override 075 public String toString() { 076 return "HubCollaborationCreateRequestV2025R0AccessibleByField{" 077 + "type='" 078 + type 079 + '\'' 080 + ", " 081 + "id='" 082 + id 083 + '\'' 084 + ", " 085 + "login='" 086 + login 087 + '\'' 088 + "}"; 089 } 090 091 public static class Builder extends NullableFieldTracker { 092 093 protected final String type; 094 095 protected String id; 096 097 protected String login; 098 099 public Builder(String type) { 100 super(); 101 this.type = type; 102 } 103 104 public Builder id(String id) { 105 this.id = id; 106 return this; 107 } 108 109 public Builder login(String login) { 110 this.login = login; 111 return this; 112 } 113 114 public HubCollaborationCreateRequestV2025R0AccessibleByField build() { 115 return new HubCollaborationCreateRequestV2025R0AccessibleByField(this); 116 } 117 } 118}