001package com.box.sdkgen.schemas.legalholdpolicy; 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 LegalHoldPolicyAssignmentCountsField extends SerializableObject { 011 012 /** The number of users this policy is applied to with the `access` type assignment. */ 013 protected Long user; 014 015 /** The number of folders this policy is applied to. */ 016 protected Long folder; 017 018 /** The number of files this policy is applied to. */ 019 protected Long file; 020 021 /** The number of file versions this policy is applied to. */ 022 @JsonProperty("file_version") 023 protected Long fileVersion; 024 025 /** The number of users this policy is applied to with the `ownership` type assignment. */ 026 protected Long ownership; 027 028 /** The number of users this policy is applied to with the `interactions` type assignment. */ 029 protected Long interactions; 030 031 public LegalHoldPolicyAssignmentCountsField() { 032 super(); 033 } 034 035 protected LegalHoldPolicyAssignmentCountsField(Builder builder) { 036 super(); 037 this.user = builder.user; 038 this.folder = builder.folder; 039 this.file = builder.file; 040 this.fileVersion = builder.fileVersion; 041 this.ownership = builder.ownership; 042 this.interactions = builder.interactions; 043 markNullableFieldsAsSet(builder.getExplicitlySetNullableFields()); 044 } 045 046 public Long getUser() { 047 return user; 048 } 049 050 public Long getFolder() { 051 return folder; 052 } 053 054 public Long getFile() { 055 return file; 056 } 057 058 public Long getFileVersion() { 059 return fileVersion; 060 } 061 062 public Long getOwnership() { 063 return ownership; 064 } 065 066 public Long getInteractions() { 067 return interactions; 068 } 069 070 @Override 071 public boolean equals(Object o) { 072 if (this == o) { 073 return true; 074 } 075 if (o == null || getClass() != o.getClass()) { 076 return false; 077 } 078 LegalHoldPolicyAssignmentCountsField casted = (LegalHoldPolicyAssignmentCountsField) o; 079 return Objects.equals(user, casted.user) 080 && Objects.equals(folder, casted.folder) 081 && Objects.equals(file, casted.file) 082 && Objects.equals(fileVersion, casted.fileVersion) 083 && Objects.equals(ownership, casted.ownership) 084 && Objects.equals(interactions, casted.interactions); 085 } 086 087 @Override 088 public int hashCode() { 089 return Objects.hash(user, folder, file, fileVersion, ownership, interactions); 090 } 091 092 @Override 093 public String toString() { 094 return "LegalHoldPolicyAssignmentCountsField{" 095 + "user='" 096 + user 097 + '\'' 098 + ", " 099 + "folder='" 100 + folder 101 + '\'' 102 + ", " 103 + "file='" 104 + file 105 + '\'' 106 + ", " 107 + "fileVersion='" 108 + fileVersion 109 + '\'' 110 + ", " 111 + "ownership='" 112 + ownership 113 + '\'' 114 + ", " 115 + "interactions='" 116 + interactions 117 + '\'' 118 + "}"; 119 } 120 121 public static class Builder extends NullableFieldTracker { 122 123 protected Long user; 124 125 protected Long folder; 126 127 protected Long file; 128 129 protected Long fileVersion; 130 131 protected Long ownership; 132 133 protected Long interactions; 134 135 public Builder user(Long user) { 136 this.user = user; 137 return this; 138 } 139 140 public Builder folder(Long folder) { 141 this.folder = folder; 142 return this; 143 } 144 145 public Builder file(Long file) { 146 this.file = file; 147 return this; 148 } 149 150 public Builder fileVersion(Long fileVersion) { 151 this.fileVersion = fileVersion; 152 return this; 153 } 154 155 public Builder ownership(Long ownership) { 156 this.ownership = ownership; 157 return this; 158 } 159 160 public Builder interactions(Long interactions) { 161 this.interactions = interactions; 162 return this; 163 } 164 165 public LegalHoldPolicyAssignmentCountsField build() { 166 return new LegalHoldPolicyAssignmentCountsField(this); 167 } 168 } 169}