001package com.box.sdkgen.schemas.v2025r0.hubcollaborationcreaterequestv2025r0; 002 003import com.box.sdkgen.internal.SerializableObject; 004import com.fasterxml.jackson.annotation.JsonFilter; 005import com.fasterxml.jackson.annotation.JsonProperty; 006import java.util.Objects; 007 008/** Request body for creating a new Box Hub collaboration. */ 009@JsonFilter("nullablePropertyFilter") 010public class HubCollaborationCreateRequestV2025R0 extends SerializableObject { 011 012 /** Box Hubs reference. */ 013 protected final HubCollaborationCreateRequestV2025R0HubField hub; 014 015 /** The user or group who gets access to the item. */ 016 @JsonProperty("accessible_by") 017 protected final HubCollaborationCreateRequestV2025R0AccessibleByField accessibleBy; 018 019 /** 020 * The level of access granted to a Box Hub. Possible values are `editor`, `viewer`, and 021 * `co-owner`. 022 */ 023 protected final String role; 024 025 public HubCollaborationCreateRequestV2025R0( 026 @JsonProperty("hub") HubCollaborationCreateRequestV2025R0HubField hub, 027 @JsonProperty("accessible_by") 028 HubCollaborationCreateRequestV2025R0AccessibleByField accessibleBy, 029 @JsonProperty("role") String role) { 030 super(); 031 this.hub = hub; 032 this.accessibleBy = accessibleBy; 033 this.role = role; 034 } 035 036 public HubCollaborationCreateRequestV2025R0HubField getHub() { 037 return hub; 038 } 039 040 public HubCollaborationCreateRequestV2025R0AccessibleByField getAccessibleBy() { 041 return accessibleBy; 042 } 043 044 public String getRole() { 045 return role; 046 } 047 048 @Override 049 public boolean equals(Object o) { 050 if (this == o) { 051 return true; 052 } 053 if (o == null || getClass() != o.getClass()) { 054 return false; 055 } 056 HubCollaborationCreateRequestV2025R0 casted = (HubCollaborationCreateRequestV2025R0) o; 057 return Objects.equals(hub, casted.hub) 058 && Objects.equals(accessibleBy, casted.accessibleBy) 059 && Objects.equals(role, casted.role); 060 } 061 062 @Override 063 public int hashCode() { 064 return Objects.hash(hub, accessibleBy, role); 065 } 066 067 @Override 068 public String toString() { 069 return "HubCollaborationCreateRequestV2025R0{" 070 + "hub='" 071 + hub 072 + '\'' 073 + ", " 074 + "accessibleBy='" 075 + accessibleBy 076 + '\'' 077 + ", " 078 + "role='" 079 + role 080 + '\'' 081 + "}"; 082 } 083}