| @@ 21-206 (lines=186) @@ | ||
| 18 | /** | |
| 19 | * User Profile Model. | |
| 20 | */ | |
| 21 | class UserProfileModel extends AbstractModel implements ResourceModelInterface | |
| 22 | { | |
| 23 | /** | |
| 24 | * Account ID. | |
| 25 | * | |
| 26 |      * @SA\Type("string") | |
| 27 |      * @SA\SerializedName("accountId") | |
| 28 | * | |
| 29 | * @var string|null | |
| 30 | */ | |
| 31 | protected $accountId; | |
| 32 | ||
| 33 | /** | |
| 34 | * Email address associated with account. | |
| 35 | * | |
| 36 |      * @SA\Type("string") | |
| 37 |      * @SA\SerializedName("email") | |
| 38 | * | |
| 39 | * @var string|null | |
| 40 | */ | |
| 41 | protected $email; | |
| 42 | ||
| 43 | /** | |
| 44 | * Role in account. | |
| 45 | * | |
| 46 | * Enum: User, Collaborator | |
| 47 | * | |
| 48 | * @see \Zibios\WrikePhpLibrary\Enum\UserRoleEnum | |
| 49 | * | |
| 50 |      * @SA\Type("string") | |
| 51 |      * @SA\SerializedName("role") | |
| 52 | * | |
| 53 | * @var string|null | |
| 54 | */ | |
| 55 | protected $role; | |
| 56 | ||
| 57 | /** | |
| 58 | * Is user external. | |
| 59 | * | |
| 60 |      * @SA\Type("boolean") | |
| 61 |      * @SA\SerializedName("external") | |
| 62 | * | |
| 63 | * @var bool|null | |
| 64 | */ | |
| 65 | protected $external; | |
| 66 | ||
| 67 | /** | |
| 68 | * Is user account admin. | |
| 69 | * | |
| 70 |      * @SA\Type("boolean") | |
| 71 |      * @SA\SerializedName("admin") | |
| 72 | * | |
| 73 | * @var bool|null | |
| 74 | */ | |
| 75 | protected $admin; | |
| 76 | ||
| 77 | /** | |
| 78 | * Is user account owner. | |
| 79 | * | |
| 80 |      * @SA\Type("boolean") | |
| 81 |      * @SA\SerializedName("owner") | |
| 82 | * | |
| 83 | * @var bool|null | |
| 84 | */ | |
| 85 | protected $owner; | |
| 86 | ||
| 87 | /** | |
| 88 | * @return null|string | |
| 89 | */ | |
| 90 | public function getAccountId() | |
| 91 |     { | |
| 92 | return $this->accountId; | |
| 93 | } | |
| 94 | ||
| 95 | /** | |
| 96 | * @param null|string $accountId | |
| 97 | * | |
| 98 | * @return $this | |
| 99 | */ | |
| 100 | public function setAccountId($accountId) | |
| 101 |     { | |
| 102 | $this->accountId = $accountId; | |
| 103 | ||
| 104 | return $this; | |
| 105 | } | |
| 106 | ||
| 107 | /** | |
| 108 | * @return null|string | |
| 109 | */ | |
| 110 | public function getEmail() | |
| 111 |     { | |
| 112 | return $this->email; | |
| 113 | } | |
| 114 | ||
| 115 | /** | |
| 116 | * @param null|string $email | |
| 117 | * | |
| 118 | * @return $this | |
| 119 | */ | |
| 120 | public function setEmail($email) | |
| 121 |     { | |
| 122 | $this->email = $email; | |
| 123 | ||
| 124 | return $this; | |
| 125 | } | |
| 126 | ||
| 127 | /** | |
| 128 | * @return null|string | |
| 129 | */ | |
| 130 | public function getRole() | |
| 131 |     { | |
| 132 | return $this->role; | |
| 133 | } | |
| 134 | ||
| 135 | /** | |
| 136 | * @param null|string $role | |
| 137 | * | |
| 138 | * @return $this | |
| 139 | */ | |
| 140 | public function setRole($role) | |
| 141 |     { | |
| 142 | $this->role = $role; | |
| 143 | ||
| 144 | return $this; | |
| 145 | } | |
| 146 | ||
| 147 | /** | |
| 148 | * @return bool|null | |
| 149 | */ | |
| 150 | public function getExternal() | |
| 151 |     { | |
| 152 | return $this->external; | |
| 153 | } | |
| 154 | ||
| 155 | /** | |
| 156 | * @param bool|null $external | |
| 157 | * | |
| 158 | * @return $this | |
| 159 | */ | |
| 160 | public function setExternal($external) | |
| 161 |     { | |
| 162 | $this->external = $external; | |
| 163 | ||
| 164 | return $this; | |
| 165 | } | |
| 166 | ||
| 167 | /** | |
| 168 | * @return bool|null | |
| 169 | */ | |
| 170 | public function getAdmin() | |
| 171 |     { | |
| 172 | return $this->admin; | |
| 173 | } | |
| 174 | ||
| 175 | /** | |
| 176 | * @param bool|null $admin | |
| 177 | * | |
| 178 | * @return $this | |
| 179 | */ | |
| 180 | public function setAdmin($admin) | |
| 181 |     { | |
| 182 | $this->admin = $admin; | |
| 183 | ||
| 184 | return $this; | |
| 185 | } | |
| 186 | ||
| 187 | /** | |
| 188 | * @return bool|null | |
| 189 | */ | |
| 190 | public function getOwner() | |
| 191 |     { | |
| 192 | return $this->owner; | |
| 193 | } | |
| 194 | ||
| 195 | /** | |
| 196 | * @param bool|null $owner | |
| 197 | * | |
| 198 | * @return $this | |
| 199 | */ | |
| 200 | public function setOwner($owner) | |
| 201 |     { | |
| 202 | $this->owner = $owner; | |
| 203 | ||
| 204 | return $this; | |
| 205 | } | |
| 206 | } | |
| 207 | ||
| @@ 21-211 (lines=191) @@ | ||
| 18 | /** | |
| 19 | * Custom Field Resource Model. | |
| 20 | */ | |
| 21 | class CustomFieldResourceModel extends AbstractModel implements ResourceModelInterface | |
| 22 | { | |
| 23 | /** | |
| 24 | * Custom Field ID. | |
| 25 | * | |
| 26 | * Comment: Custom Field ID | |
| 27 | * | |
| 28 |      * @SA\Type("string") | |
| 29 |      * @SA\SerializedName("id") | |
| 30 | * | |
| 31 | * @var string|null | |
| 32 | */ | |
| 33 | protected $id; | |
| 34 | ||
| 35 | /** | |
| 36 | * Account ID. | |
| 37 | * | |
| 38 | * Comment: Account ID | |
| 39 | * | |
| 40 |      * @SA\Type("string") | |
| 41 |      * @SA\SerializedName("accountId") | |
| 42 | * | |
| 43 | * @var string|null | |
| 44 | */ | |
| 45 | protected $accountId; | |
| 46 | ||
| 47 | /** | |
| 48 | * Custom field title. | |
| 49 | * | |
| 50 |      * @SA\Type("string") | |
| 51 |      * @SA\SerializedName("title") | |
| 52 | * | |
| 53 | * @var string|null | |
| 54 | */ | |
| 55 | protected $title; | |
| 56 | ||
| 57 | /** | |
| 58 | * Custom field type | |
| 59 | * Type of custom field, Enum: Text, DropDown, Numeric, Money, Percentage, Date, Duration, Checkbox. | |
| 60 | * | |
| 61 | * @see \Zibios\WrikePhpLibrary\Enum\CustomFieldTypeEnum | |
| 62 | * | |
| 63 |      * @SA\Type("string") | |
| 64 |      * @SA\SerializedName("type") | |
| 65 | * | |
| 66 | * @var string|null | |
| 67 | */ | |
| 68 | protected $type; | |
| 69 | ||
| 70 | /** | |
| 71 | * List of user IDs, who share the custom field. | |
| 72 | * | |
| 73 | * Comment: Contact ID list | |
| 74 | * | |
| 75 |      * @SA\Type("array<string>") | |
| 76 |      * @SA\SerializedName("sharedIds") | |
| 77 | * | |
| 78 | * @var array|string[]|null | |
| 79 | */ | |
| 80 | protected $sharedIds; | |
| 81 | ||
| 82 | /** | |
| 83 | * Deleted flag is present and set to true, if custom field is deleted/hidden. | |
| 84 | * | |
| 85 |      * @SA\Type("boolean") | |
| 86 |      * @SA\SerializedName("deleted") | |
| 87 | * | |
| 88 | * @var bool|null | |
| 89 | */ | |
| 90 | protected $deleted; | |
| 91 | ||
| 92 | /** | |
| 93 | * @return string|null | |
| 94 | */ | |
| 95 | public function getId() | |
| 96 |     { | |
| 97 | return $this->id; | |
| 98 | } | |
| 99 | ||
| 100 | /** | |
| 101 | * @param string|null $id | |
| 102 | * | |
| 103 | * @return $this | |
| 104 | */ | |
| 105 | public function setId($id) | |
| 106 |     { | |
| 107 | $this->id = $id; | |
| 108 | ||
| 109 | return $this; | |
| 110 | } | |
| 111 | ||
| 112 | /** | |
| 113 | * @return string|null | |
| 114 | */ | |
| 115 | public function getAccountId() | |
| 116 |     { | |
| 117 | return $this->accountId; | |
| 118 | } | |
| 119 | ||
| 120 | /** | |
| 121 | * @param string|null $accountId | |
| 122 | * | |
| 123 | * @return $this | |
| 124 | */ | |
| 125 | public function setAccountId($accountId) | |
| 126 |     { | |
| 127 | $this->accountId = $accountId; | |
| 128 | ||
| 129 | return $this; | |
| 130 | } | |
| 131 | ||
| 132 | /** | |
| 133 | * @return string|null | |
| 134 | */ | |
| 135 | public function getTitle() | |
| 136 |     { | |
| 137 | return $this->title; | |
| 138 | } | |
| 139 | ||
| 140 | /** | |
| 141 | * @param string|null $title | |
| 142 | * | |
| 143 | * @return $this | |
| 144 | */ | |
| 145 | public function setTitle($title) | |
| 146 |     { | |
| 147 | $this->title = $title; | |
| 148 | ||
| 149 | return $this; | |
| 150 | } | |
| 151 | ||
| 152 | /** | |
| 153 | * @return null|string | |
| 154 | */ | |
| 155 | public function getType() | |
| 156 |     { | |
| 157 | return $this->type; | |
| 158 | } | |
| 159 | ||
| 160 | /** | |
| 161 | * @param null|string $type | |
| 162 | * | |
| 163 | * @return $this | |
| 164 | */ | |
| 165 | public function setType($type) | |
| 166 |     { | |
| 167 | $this->type = $type; | |
| 168 | ||
| 169 | return $this; | |
| 170 | } | |
| 171 | ||
| 172 | /** | |
| 173 | * @return array|string[]|null | |
| 174 | */ | |
| 175 | public function getSharedIds() | |
| 176 |     { | |
| 177 | return $this->sharedIds; | |
| 178 | } | |
| 179 | ||
| 180 | /** | |
| 181 | * @param array|string[]|null $sharedIds | |
| 182 | * | |
| 183 | * @return $this | |
| 184 | */ | |
| 185 | public function setSharedIds($sharedIds) | |
| 186 |     { | |
| 187 | $this->sharedIds = $sharedIds; | |
| 188 | ||
| 189 | return $this; | |
| 190 | } | |
| 191 | ||
| 192 | /** | |
| 193 | * @return bool|null | |
| 194 | */ | |
| 195 | public function getDeleted() | |
| 196 |     { | |
| 197 | return $this->deleted; | |
| 198 | } | |
| 199 | ||
| 200 | /** | |
| 201 | * @param bool|null $deleted | |
| 202 | * | |
| 203 | * @return $this | |
| 204 | */ | |
| 205 | public function setDeleted($deleted) | |
| 206 |     { | |
| 207 | $this->deleted = $deleted; | |
| 208 | ||
| 209 | return $this; | |
| 210 | } | |
| 211 | } | |
| 212 | ||