commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
Loading...
Searching...
No Matches
CommerceMcpServerConfigModel.php
1<?php
2
3declare(strict_types=1);
10
15use stdClass;
16
21{
22 public const DISCRIMINATOR_VALUE = 'CommerceMCP';
27 protected $type;
28
33 protected $majorVersion;
34
39 protected $url;
40
45 protected $tools;
46
52
58
64
65
69 public function __construct(
70 ?string $majorVersion = null,
71 ?string $url = null,
72 ?array $tools = null,
75 ?string $toolOutputFormatting = null,
76 ?string $type = null
77 ) {
78 $this->majorVersion = $majorVersion;
79 $this->url = $url;
80 $this->tools = $tools;
81 $this->toolCustomizations = $toolCustomizations;
82 $this->jsonOutputFiltering = $jsonOutputFiltering;
83 $this->toolOutputFormatting = $toolOutputFormatting;
84 $this->type = $type ?? self::DISCRIMINATOR_VALUE;
85 }
86
93 public function getType()
94 {
95 if (is_null($this->type)) {
97 $data = $this->raw(self::FIELD_TYPE);
98 if (is_null($data)) {
99 return null;
100 }
101 $this->type = (string) $data;
102 }
103
104 return $this->type;
105 }
106
113 public function getMajorVersion()
114 {
115 if (is_null($this->majorVersion)) {
117 $data = $this->raw(self::FIELD_MAJOR_VERSION);
118 if (is_null($data)) {
119 return null;
120 }
121 $this->majorVersion = (string) $data;
122 }
123
124 return $this->majorVersion;
125 }
126
134 public function getUrl()
135 {
136 if (is_null($this->url)) {
138 $data = $this->raw(self::FIELD_URL);
139 if (is_null($data)) {
140 return null;
141 }
142 $this->url = (string) $data;
143 }
144
145 return $this->url;
146 }
147
154 public function getTools()
155 {
156 if (is_null($this->tools)) {
158 $data = $this->raw(self::FIELD_TOOLS);
159 if (is_null($data)) {
160 return null;
161 }
162 $this->tools = $data;
163 }
164
165 return $this->tools;
166 }
167
174 public function getToolCustomizations()
175 {
176 if (is_null($this->toolCustomizations)) {
178 $data = $this->raw(self::FIELD_TOOL_CUSTOMIZATIONS);
179 if (is_null($data)) {
180 return null;
181 }
182 $this->toolCustomizations = ToolCustomizationCollection::fromArray($data);
183 }
184
186 }
187
194 public function getJsonOutputFiltering()
195 {
196 if (is_null($this->jsonOutputFiltering)) {
198 $data = $this->raw(self::FIELD_JSON_OUTPUT_FILTERING);
199 if (is_null($data)) {
200 return null;
201 }
202
203 $this->jsonOutputFiltering = McpServerJsonOutputFilteringModel::of($data);
204 }
205
207 }
208
215 public function getToolOutputFormatting()
216 {
217 if (is_null($this->toolOutputFormatting)) {
219 $data = $this->raw(self::FIELD_TOOL_OUTPUT_FORMATTING);
220 if (is_null($data)) {
221 return null;
222 }
223 $this->toolOutputFormatting = (string) $data;
224 }
225
227 }
228
229
233 public function setMajorVersion(?string $majorVersion): void
234 {
235 $this->majorVersion = $majorVersion;
236 }
237
241 public function setUrl(?string $url): void
242 {
243 $this->url = $url;
244 }
245
249 public function setTools(?array $tools): void
250 {
251 $this->tools = $tools;
252 }
253
258 {
259 $this->toolCustomizations = $toolCustomizations;
260 }
261
266 {
267 $this->jsonOutputFiltering = $jsonOutputFiltering;
268 }
269
273 public function setToolOutputFormatting(?string $toolOutputFormatting): void
274 {
275 $this->toolOutputFormatting = $toolOutputFormatting;
276 }
277}
setToolCustomizations(?ToolCustomizationCollection $toolCustomizations)
setJsonOutputFiltering(?McpServerJsonOutputFiltering $jsonOutputFiltering)
__construct(?string $majorVersion=null, ?string $url=null, ?array $tools=null, ?ToolCustomizationCollection $toolCustomizations=null, ?McpServerJsonOutputFiltering $jsonOutputFiltering=null, ?string $toolOutputFormatting=null, ?string $type=null)
static fromArray(array $data)