commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
Loading...
Searching...
No Matches
lib
commercetools-import
src
Models
Errors
InvalidFieldsUpdateErrorModel.php
1
<?php
2
3
declare(strict_types=1);
9
namespace
Commercetools\Import\Models\Errors
;
10
11
use
Commercetools\Base\DateTimeImmutableCollection
;
12
use
Commercetools\Base\JsonObject
;
13
use
Commercetools\Base\JsonObjectModel
;
14
use
Commercetools\Base\MapperFactory
;
15
use stdClass;
16
20
final
class
InvalidFieldsUpdateErrorModel
extends
JsonObjectModel
implements
InvalidFieldsUpdateError
21
{
22
public
const
DISCRIMINATOR_VALUE
=
'InvalidFieldUpdate'
;
27
protected
$code
;
28
33
protected
$message
;
34
39
protected
$fields
;
40
41
45
public
function
__construct
(
46
?
string
$message
=
null
,
47
?array
$fields
=
null
,
48
?
string
$code
=
null
49
) {
50
$this->message =
$message
;
51
$this->fields =
$fields
;
52
$this->code =
$code
??
self::DISCRIMINATOR_VALUE
;
53
}
54
61
public
function
getCode
()
62
{
63
if
(is_null($this->code)) {
65
$data = $this->
raw
(self::FIELD_CODE);
66
if
(is_null($data)) {
67
return
null
;
68
}
69
$this->code = (string) $data;
70
}
71
72
return
$this->code
;
73
}
74
81
public
function
getMessage
()
82
{
83
if
(is_null($this->message)) {
85
$data = $this->
raw
(self::FIELD_MESSAGE);
86
if
(is_null($data)) {
87
return
null
;
88
}
89
$this->message = (string) $data;
90
}
91
92
return
$this->message
;
93
}
94
101
public
function
getFields
()
102
{
103
if
(is_null($this->fields)) {
105
$data = $this->
raw
(self::FIELD_FIELDS);
106
if
(is_null($data)) {
107
return
null
;
108
}
109
$this->fields = $data;
110
}
111
112
return
$this->fields
;
113
}
114
115
119
public
function
setMessage
(?
string
$message
): void
120
{
121
$this->message =
$message
;
122
}
123
127
public
function
setFields
(?array
$fields
): void
128
{
129
$this->fields =
$fields
;
130
}
131
}
Commercetools\Base\BaseJsonObject\raw
raw(string $field)
Definition
BaseJsonObject.php:57
Commercetools\Base\DateTimeImmutableCollection
Definition
DateTimeImmutableCollection.php:21
Commercetools\Base\JsonObjectModel
Definition
JsonObjectModel.php:15
Commercetools\Base\MapperFactory
Definition
MapperFactory.php:16
Commercetools\Import\Models\Errors\InvalidFieldsUpdateErrorModel
Definition
InvalidFieldsUpdateErrorModel.php:21
Commercetools\Import\Models\Errors\InvalidFieldsUpdateErrorModel\getMessage
getMessage()
Definition
InvalidFieldsUpdateErrorModel.php:81
Commercetools\Import\Models\Errors\InvalidFieldsUpdateErrorModel\setMessage
setMessage(?string $message)
Definition
InvalidFieldsUpdateErrorModel.php:119
Commercetools\Import\Models\Errors\InvalidFieldsUpdateErrorModel\getFields
getFields()
Definition
InvalidFieldsUpdateErrorModel.php:101
Commercetools\Import\Models\Errors\InvalidFieldsUpdateErrorModel\$message
$message
Definition
InvalidFieldsUpdateErrorModel.php:33
Commercetools\Import\Models\Errors\InvalidFieldsUpdateErrorModel\DISCRIMINATOR_VALUE
const DISCRIMINATOR_VALUE
Definition
InvalidFieldsUpdateErrorModel.php:22
Commercetools\Import\Models\Errors\InvalidFieldsUpdateErrorModel\$code
$code
Definition
InvalidFieldsUpdateErrorModel.php:27
Commercetools\Import\Models\Errors\InvalidFieldsUpdateErrorModel\__construct
__construct(?string $message=null, ?array $fields=null, ?string $code=null)
Definition
InvalidFieldsUpdateErrorModel.php:45
Commercetools\Import\Models\Errors\InvalidFieldsUpdateErrorModel\getCode
getCode()
Definition
InvalidFieldsUpdateErrorModel.php:61
Commercetools\Import\Models\Errors\InvalidFieldsUpdateErrorModel\$fields
$fields
Definition
InvalidFieldsUpdateErrorModel.php:39
Commercetools\Import\Models\Errors\InvalidFieldsUpdateErrorModel\setFields
setFields(?array $fields)
Definition
InvalidFieldsUpdateErrorModel.php:127
Commercetools\Base\JsonObject
Definition
JsonObject.php:15
Commercetools\Import\Models\Errors\InvalidFieldsUpdateError
Definition
InvalidFieldsUpdateError.php:15
Commercetools\Import\Models\Errors
Definition
AccessDeniedError.php:9
Generated by
1.9.8