commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
Loading...
Searching...
No Matches
McpServerDraftModel.php
1<?php
2
3declare(strict_types=1);
10
17use stdClass;
18
23{
28 protected $key;
29
34 protected $name;
35
40 protected $description;
41
47
52 protected $state;
53
58 protected $mcpServer;
59
60
64 public function __construct(
65 ?string $key = null,
66 ?LocalizedString $name = null,
68 ?string $authenticationMode = null,
69 ?string $state = null,
71 ) {
72 $this->key = $key;
73 $this->name = $name;
74 $this->description = $description;
75 $this->authenticationMode = $authenticationMode;
76 $this->state = $state;
77 $this->mcpServer = $mcpServer;
78 }
79
86 public function getKey()
87 {
88 if (is_null($this->key)) {
90 $data = $this->raw(self::FIELD_KEY);
91 if (is_null($data)) {
92 return null;
93 }
94 $this->key = (string) $data;
95 }
96
97 return $this->key;
98 }
99
106 public function getName()
107 {
108 if (is_null($this->name)) {
110 $data = $this->raw(self::FIELD_NAME);
111 if (is_null($data)) {
112 return null;
113 }
114
115 $this->name = LocalizedStringModel::of($data);
116 }
117
118 return $this->name;
119 }
120
127 public function getDescription()
128 {
129 if (is_null($this->description)) {
131 $data = $this->raw(self::FIELD_DESCRIPTION);
132 if (is_null($data)) {
133 return null;
134 }
135
136 $this->description = LocalizedStringModel::of($data);
137 }
138
139 return $this->description;
140 }
141
148 public function getAuthenticationMode()
149 {
150 if (is_null($this->authenticationMode)) {
152 $data = $this->raw(self::FIELD_AUTHENTICATION_MODE);
153 if (is_null($data)) {
154 return null;
155 }
156 $this->authenticationMode = (string) $data;
157 }
158
160 }
161
168 public function getState()
169 {
170 if (is_null($this->state)) {
172 $data = $this->raw(self::FIELD_STATE);
173 if (is_null($data)) {
174 return null;
175 }
176 $this->state = (string) $data;
177 }
178
179 return $this->state;
180 }
181
188 public function getMcpServer()
189 {
190 if (is_null($this->mcpServer)) {
192 $data = $this->raw(self::FIELD_MCP_SERVER);
193 if (is_null($data)) {
194 return null;
195 }
197 $this->mcpServer = $className::of($data);
198 }
199
200 return $this->mcpServer;
201 }
202
203
207 public function setKey(?string $key): void
208 {
209 $this->key = $key;
210 }
211
215 public function setName(?LocalizedString $name): void
216 {
217 $this->name = $name;
218 }
219
224 {
225 $this->description = $description;
226 }
227
231 public function setAuthenticationMode(?string $authenticationMode): void
232 {
233 $this->authenticationMode = $authenticationMode;
234 }
235
239 public function setState(?string $state): void
240 {
241 $this->state = $state;
242 }
243
248 {
249 $this->mcpServer = $mcpServer;
250 }
251}
__construct(?string $key=null, ?LocalizedString $name=null, ?LocalizedString $description=null, ?string $authenticationMode=null, ?string $state=null, ?McpServerConfigDraft $mcpServer=null)