commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
Loading...
Searching...
No Matches
ToolCustomizationModel.php
1<?php
2
3declare(strict_types=1);
10
15use stdClass;
16
21{
26 protected $tool;
27
32 protected $description;
33
38 protected $parameters;
39
40
44 public function __construct(
45 ?string $tool = null,
46 ?string $description = null,
48 ) {
49 $this->tool = $tool;
50 $this->description = $description;
51 $this->parameters = $parameters;
52 }
53
60 public function getTool()
61 {
62 if (is_null($this->tool)) {
64 $data = $this->raw(self::FIELD_TOOL);
65 if (is_null($data)) {
66 return null;
67 }
68 $this->tool = (string) $data;
69 }
70
71 return $this->tool;
72 }
73
80 public function getDescription()
81 {
82 if (is_null($this->description)) {
84 $data = $this->raw(self::FIELD_DESCRIPTION);
85 if (is_null($data)) {
86 return null;
87 }
88 $this->description = (string) $data;
89 }
90
91 return $this->description;
92 }
93
100 public function getParameters()
101 {
102 if (is_null($this->parameters)) {
104 $data = $this->raw(self::FIELD_PARAMETERS);
105 if (is_null($data)) {
106 return null;
107 }
108 $this->parameters = ParameterOverrideCollection::fromArray($data);
109 }
110
111 return $this->parameters;
112 }
113
114
118 public function setTool(?string $tool): void
119 {
120 $this->tool = $tool;
121 }
122
126 public function setDescription(?string $description): void
127 {
128 $this->description = $description;
129 }
130
135 {
136 $this->parameters = $parameters;
137 }
138}
__construct(?string $tool=null, ?string $description=null, ?ParameterOverrideCollection $parameters=null)
static fromArray(array $data)