commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
Loading...
Searching...
No Matches
CommerceMcpServerConfigDraftModel.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 $tools;
40
46
52
58
59
63 public function __construct(
64 ?string $majorVersion = null,
65 ?array $tools = null,
68 ?string $toolOutputFormatting = null,
69 ?string $type = null
70 ) {
71 $this->majorVersion = $majorVersion;
72 $this->tools = $tools;
73 $this->toolCustomizations = $toolCustomizations;
74 $this->jsonOutputFiltering = $jsonOutputFiltering;
75 $this->toolOutputFormatting = $toolOutputFormatting;
76 $this->type = $type ?? self::DISCRIMINATOR_VALUE;
77 }
78
85 public function getType()
86 {
87 if (is_null($this->type)) {
89 $data = $this->raw(self::FIELD_TYPE);
90 if (is_null($data)) {
91 return null;
92 }
93 $this->type = (string) $data;
94 }
95
96 return $this->type;
97 }
98
105 public function getMajorVersion()
106 {
107 if (is_null($this->majorVersion)) {
109 $data = $this->raw(self::FIELD_MAJOR_VERSION);
110 if (is_null($data)) {
111 return null;
112 }
113 $this->majorVersion = (string) $data;
114 }
115
116 return $this->majorVersion;
117 }
118
125 public function getTools()
126 {
127 if (is_null($this->tools)) {
129 $data = $this->raw(self::FIELD_TOOLS);
130 if (is_null($data)) {
131 return null;
132 }
133 $this->tools = $data;
134 }
135
136 return $this->tools;
137 }
138
145 public function getToolCustomizations()
146 {
147 if (is_null($this->toolCustomizations)) {
149 $data = $this->raw(self::FIELD_TOOL_CUSTOMIZATIONS);
150 if (is_null($data)) {
151 return null;
152 }
153 $this->toolCustomizations = ToolCustomizationCollection::fromArray($data);
154 }
155
157 }
158
165 public function getJsonOutputFiltering()
166 {
167 if (is_null($this->jsonOutputFiltering)) {
169 $data = $this->raw(self::FIELD_JSON_OUTPUT_FILTERING);
170 if (is_null($data)) {
171 return null;
172 }
173
174 $this->jsonOutputFiltering = McpServerJsonOutputFilteringModel::of($data);
175 }
176
178 }
179
186 public function getToolOutputFormatting()
187 {
188 if (is_null($this->toolOutputFormatting)) {
190 $data = $this->raw(self::FIELD_TOOL_OUTPUT_FORMATTING);
191 if (is_null($data)) {
192 return null;
193 }
194 $this->toolOutputFormatting = (string) $data;
195 }
196
198 }
199
200
204 public function setMajorVersion(?string $majorVersion): void
205 {
206 $this->majorVersion = $majorVersion;
207 }
208
212 public function setTools(?array $tools): void
213 {
214 $this->tools = $tools;
215 }
216
221 {
222 $this->toolCustomizations = $toolCustomizations;
223 }
224
229 {
230 $this->jsonOutputFiltering = $jsonOutputFiltering;
231 }
232
236 public function setToolOutputFormatting(?string $toolOutputFormatting): void
237 {
238 $this->toolOutputFormatting = $toolOutputFormatting;
239 }
240}
__construct(?string $majorVersion=null, ?array $tools=null, ?ToolCustomizationCollection $toolCustomizations=null, ?McpServerJsonOutputFiltering $jsonOutputFiltering=null, ?string $toolOutputFormatting=null, ?string $type=null)
static fromArray(array $data)