commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
Loading...
Searching...
No Matches
McpServerSetDescriptionActionModel.php
1<?php
2
3declare(strict_types=1);
10
17use stdClass;
18
23{
24 public const DISCRIMINATOR_VALUE = 'setDescription';
29 protected $action;
30
35 protected $description;
36
37
41 public function __construct(
43 ?string $action = null
44 ) {
45 $this->description = $description;
46 $this->action = $action ?? self::DISCRIMINATOR_VALUE;
47 }
48
55 public function getAction()
56 {
57 if (is_null($this->action)) {
59 $data = $this->raw(self::FIELD_ACTION);
60 if (is_null($data)) {
61 return null;
62 }
63 $this->action = (string) $data;
64 }
65
66 return $this->action;
67 }
68
75 public function getDescription()
76 {
77 if (is_null($this->description)) {
79 $data = $this->raw(self::FIELD_DESCRIPTION);
80 if (is_null($data)) {
81 return null;
82 }
83
84 $this->description = LocalizedStringModel::of($data);
85 }
86
87 return $this->description;
88 }
89
90
95 {
96 $this->description = $description;
97 }
98}