-
Notifications
You must be signed in to change notification settings - Fork 89
Expand file tree
/
Copy pathExtensionActionDefinitionPatch.php
More file actions
501 lines (448 loc) · 12.5 KB
/
ExtensionActionDefinitionPatch.php
File metadata and controls
501 lines (448 loc) · 12.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
<?php
/**
* ExtensionActionDefinitionPatch
*
* PHP version 7.4
*
* @category Class
* @package HubSpot\Client\Automation\Actions
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
*/
/**
* Custom Workflow Actions
*
* Create custom workflow actions
*
* The version of the OpenAPI document: v4
* Generated by: https://openapi-generator.tech
* OpenAPI Generator version: 6.0.1
*/
/**
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
namespace HubSpot\Client\Automation\Actions\Model;
use \ArrayAccess;
use \HubSpot\Client\Automation\Actions\ObjectSerializer;
/**
* ExtensionActionDefinitionPatch Class Doc Comment
*
* @category Class
* @description Fields on custom workflow action to be updated.
* @package HubSpot\Client\Automation\Actions
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
* @implements \ArrayAccess<string, mixed>
*/
class ExtensionActionDefinitionPatch implements ModelInterface, ArrayAccess, \JsonSerializable
{
public const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $openAPIModelName = 'ExtensionActionDefinitionPatch';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $openAPITypes = [
'action_url' => 'string',
'published' => 'bool',
'input_fields' => '\HubSpot\Client\Automation\Actions\Model\InputFieldDefinition[]',
'object_request_options' => '\HubSpot\Client\Automation\Actions\Model\ObjectRequestOptions',
'input_field_dependencies' => '\HubSpot\Client\Automation\Actions\Model\ExtensionActionDefinitionPatchInputFieldDependenciesInner[]',
'labels' => 'array<string,\HubSpot\Client\Automation\Actions\Model\ActionLabels>',
'object_types' => 'string[]'
];
/**
* Array of property to format mappings. Used for (de)serialization
*
* @var string[]
* @phpstan-var array<string, string|null>
* @psalm-var array<string, string|null>
*/
protected static $openAPIFormats = [
'action_url' => null,
'published' => null,
'input_fields' => null,
'object_request_options' => null,
'input_field_dependencies' => null,
'labels' => null,
'object_types' => null
];
/**
* Array of property to type mappings. Used for (de)serialization
*
* @return array
*/
public static function openAPITypes()
{
return self::$openAPITypes;
}
/**
* Array of property to format mappings. Used for (de)serialization
*
* @return array
*/
public static function openAPIFormats()
{
return self::$openAPIFormats;
}
/**
* Array of attributes where the key is the local name,
* and the value is the original name
*
* @var string[]
*/
protected static $attributeMap = [
'action_url' => 'actionUrl',
'published' => 'published',
'input_fields' => 'inputFields',
'object_request_options' => 'objectRequestOptions',
'input_field_dependencies' => 'inputFieldDependencies',
'labels' => 'labels',
'object_types' => 'objectTypes'
];
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = [
'action_url' => 'setActionUrl',
'published' => 'setPublished',
'input_fields' => 'setInputFields',
'object_request_options' => 'setObjectRequestOptions',
'input_field_dependencies' => 'setInputFieldDependencies',
'labels' => 'setLabels',
'object_types' => 'setObjectTypes'
];
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = [
'action_url' => 'getActionUrl',
'published' => 'getPublished',
'input_fields' => 'getInputFields',
'object_request_options' => 'getObjectRequestOptions',
'input_field_dependencies' => 'getInputFieldDependencies',
'labels' => 'getLabels',
'object_types' => 'getObjectTypes'
];
/**
* Array of attributes where the key is the local name,
* and the value is the original name
*
* @return array
*/
public static function attributeMap()
{
return self::$attributeMap;
}
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @return array
*/
public static function setters()
{
return self::$setters;
}
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @return array
*/
public static function getters()
{
return self::$getters;
}
/**
* The original name of the model.
*
* @return string
*/
public function getModelName()
{
return self::$openAPIModelName;
}
/**
* Associative array for storing property values
*
* @var mixed[]
*/
protected $container = [];
/**
* Constructor
*
* @param mixed[] $data Associated array of property values
* initializing the model
*/
public function __construct(?array $data = null)
{
$this->container['action_url'] = $data['action_url'] ?? null;
$this->container['published'] = $data['published'] ?? null;
$this->container['input_fields'] = $data['input_fields'] ?? null;
$this->container['object_request_options'] = $data['object_request_options'] ?? null;
$this->container['input_field_dependencies'] = $data['input_field_dependencies'] ?? null;
$this->container['labels'] = $data['labels'] ?? null;
$this->container['object_types'] = $data['object_types'] ?? null;
}
/**
* Show all the invalid properties with reasons.
*
* @return array invalid properties with reasons
*/
public function listInvalidProperties()
{
$invalidProperties = [];
return $invalidProperties;
}
/**
* Validate all the properties in the model
* return true if all passed
*
* @return bool True if all properties are valid
*/
public function valid()
{
return count($this->listInvalidProperties()) === 0;
}
/**
* Gets action_url
*
* @return string|null
*/
public function getActionUrl()
{
return $this->container['action_url'];
}
/**
* Sets action_url
*
* @param string|null $action_url The URL that will accept an HTTPS request each time workflows executes the custom action.
*
* @return self
*/
public function setActionUrl($action_url)
{
$this->container['action_url'] = $action_url;
return $this;
}
/**
* Gets published
*
* @return bool|null
*/
public function getPublished()
{
return $this->container['published'];
}
/**
* Sets published
*
* @param bool|null $published Whether this custom action is published to customers.
*
* @return self
*/
public function setPublished($published)
{
$this->container['published'] = $published;
return $this;
}
/**
* Gets input_fields
*
* @return \HubSpot\Client\Automation\Actions\Model\InputFieldDefinition[]|null
*/
public function getInputFields()
{
return $this->container['input_fields'];
}
/**
* Sets input_fields
*
* @param \HubSpot\Client\Automation\Actions\Model\InputFieldDefinition[]|null $input_fields The list of input fields to display in this custom action.
*
* @return self
*/
public function setInputFields($input_fields)
{
$this->container['input_fields'] = $input_fields;
return $this;
}
/**
* Gets object_request_options
*
* @return \HubSpot\Client\Automation\Actions\Model\ObjectRequestOptions|null
*/
public function getObjectRequestOptions()
{
return $this->container['object_request_options'];
}
/**
* Sets object_request_options
*
* @param \HubSpot\Client\Automation\Actions\Model\ObjectRequestOptions|null $object_request_options object_request_options
*
* @return self
*/
public function setObjectRequestOptions($object_request_options)
{
$this->container['object_request_options'] = $object_request_options;
return $this;
}
/**
* Gets input_field_dependencies
*
* @return \HubSpot\Client\Automation\Actions\Model\ExtensionActionDefinitionPatchInputFieldDependenciesInner[]|null
*/
public function getInputFieldDependencies()
{
return $this->container['input_field_dependencies'];
}
/**
* Sets input_field_dependencies
*
* @param \HubSpot\Client\Automation\Actions\Model\ExtensionActionDefinitionPatchInputFieldDependenciesInner[]|null $input_field_dependencies A list of dependencies between the input fields. These configure when the input fields should be visible.
*
* @return self
*/
public function setInputFieldDependencies($input_field_dependencies)
{
$this->container['input_field_dependencies'] = $input_field_dependencies;
return $this;
}
/**
* Gets labels
*
* @return array<string,\HubSpot\Client\Automation\Actions\Model\ActionLabels>|null
*/
public function getLabels()
{
return $this->container['labels'];
}
/**
* Sets labels
*
* @param array<string,\HubSpot\Client\Automation\Actions\Model\ActionLabels>|null $labels The user-facing labels for the custom action.
*
* @return self
*/
public function setLabels($labels)
{
$this->container['labels'] = $labels;
return $this;
}
/**
* Gets object_types
*
* @return string[]|null
*/
public function getObjectTypes()
{
return $this->container['object_types'];
}
/**
* Sets object_types
*
* @param string[]|null $object_types The object types that this custom action supports.
*
* @return self
*/
public function setObjectTypes($object_types)
{
$this->container['object_types'] = $object_types;
return $this;
}
/**
* Returns true if offset exists. False otherwise.
*
* @param integer $offset Offset
*
* @return boolean
*/
public function offsetExists($offset): bool
{
return isset($this->container[$offset]);
}
/**
* Gets offset.
*
* @param integer $offset Offset
*
* @return mixed|null
*/
#[\ReturnTypeWillChange]
public function offsetGet($offset)
{
return $this->container[$offset] ?? null;
}
/**
* Sets value based on offset.
*
* @param int|null $offset Offset
* @param mixed $value Value to be set
*
* @return void
*/
public function offsetSet($offset, $value): void
{
if (is_null($offset)) {
$this->container[] = $value;
} else {
$this->container[$offset] = $value;
}
}
/**
* Unsets offset.
*
* @param integer $offset Offset
*
* @return void
*/
public function offsetUnset($offset): void
{
unset($this->container[$offset]);
}
/**
* Serializes the object to a value that can be serialized natively by json_encode().
* @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php
*
* @return mixed Returns data which can be serialized by json_encode(), which is a value
* of any type other than a resource.
*/
#[\ReturnTypeWillChange]
public function jsonSerialize()
{
return ObjectSerializer::sanitizeForSerialization($this);
}
/**
* Gets the string presentation of the object
*
* @return string
*/
public function __toString()
{
return json_encode(
ObjectSerializer::sanitizeForSerialization($this),
JSON_PRETTY_PRINT
);
}
/**
* Gets a header-safe presentation of the object
*
* @return string
*/
public function toHeaderValue()
{
return json_encode(ObjectSerializer::sanitizeForSerialization($this));
}
}