commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
lib
commercetools-import
src
Models
Errors
ResourceDeletionErrorModel.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
ResourceDeletionErrorModel
extends
JsonObjectModel
implements
ResourceDeletionError
21
{
22
public
const
DISCRIMINATOR_VALUE
=
'ResourceDeletion'
;
27
protected
$code
;
28
33
protected
$message
;
34
39
protected
$resource
;
40
41
45
public
function
__construct
(
46
?
string
$message
=
null
,
47
$resource
=
null
,
48
?
string
$code
=
null
49
) {
50
$this->message =
$message
;
51
$this->resource =
$resource
;
52
$this->code =
$code
??
self::DISCRIMINATOR_VALUE
;
53
}
54
59
public
function
getCode
()
60
{
61
if
(is_null($this->code)) {
63
$data = $this->
raw
(self::FIELD_CODE);
64
if
(is_null($data)) {
65
return
null
;
66
}
67
$this->code = (string) $data;
68
}
69
70
return
$this->code
;
71
}
72
77
public
function
getMessage
()
78
{
79
if
(is_null($this->message)) {
81
$data = $this->
raw
(self::FIELD_MESSAGE);
82
if
(is_null($data)) {
83
return
null
;
84
}
85
$this->message = (string) $data;
86
}
87
88
return
$this->message
;
89
}
90
95
public
function
getResource
()
96
{
97
if
(is_null($this->resource)) {
99
$data = $this->
raw
(self::FIELD_RESOURCE);
100
if
(is_null($data)) {
101
return
null
;
102
}
103
$this->resource = $data;
104
}
105
106
return
$this->resource
;
107
}
108
109
113
public
function
setMessage
(?
string
$message
): void
114
{
115
$this->message =
$message
;
116
}
117
121
public
function
setResource
(
$resource
): void
122
{
123
$this->resource =
$resource
;
124
}
125
}
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\ResourceDeletionErrorModel
Definition:
ResourceDeletionErrorModel.php:21
Commercetools\Import\Models\Errors\ResourceDeletionErrorModel\getResource
getResource()
Definition:
ResourceDeletionErrorModel.php:95
Commercetools\Import\Models\Errors\ResourceDeletionErrorModel\$resource
$resource
Definition:
ResourceDeletionErrorModel.php:39
Commercetools\Import\Models\Errors\ResourceDeletionErrorModel\setResource
setResource($resource)
Definition:
ResourceDeletionErrorModel.php:121
Commercetools\Import\Models\Errors\ResourceDeletionErrorModel\$message
$message
Definition:
ResourceDeletionErrorModel.php:33
Commercetools\Import\Models\Errors\ResourceDeletionErrorModel\getCode
getCode()
Definition:
ResourceDeletionErrorModel.php:59
Commercetools\Import\Models\Errors\ResourceDeletionErrorModel\$code
$code
Definition:
ResourceDeletionErrorModel.php:27
Commercetools\Import\Models\Errors\ResourceDeletionErrorModel\__construct
__construct(?string $message=null, $resource=null, ?string $code=null)
Definition:
ResourceDeletionErrorModel.php:45
Commercetools\Import\Models\Errors\ResourceDeletionErrorModel\DISCRIMINATOR_VALUE
const DISCRIMINATOR_VALUE
Definition:
ResourceDeletionErrorModel.php:22
Commercetools\Import\Models\Errors\ResourceDeletionErrorModel\getMessage
getMessage()
Definition:
ResourceDeletionErrorModel.php:77
Commercetools\Import\Models\Errors\ResourceDeletionErrorModel\setMessage
setMessage(?string $message)
Definition:
ResourceDeletionErrorModel.php:113
Commercetools\Base\JsonObject
Definition:
JsonObject.php:15
Commercetools\Import\Models\Errors\ResourceDeletionError
Definition:
ResourceDeletionError.php:15
Commercetools\Import\Models\Errors
Definition:
AccessDeniedError.php:9
Generated by
1.9.1