commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
Loading...
Searching...
No Matches
AgentResponsesRequestBuilder.php
1<?php
2
3declare(strict_types=1);
10
20use stdClass;
21
26{
31 private $outputType;
32
37 private $locale;
38
43 private $prompt;
44
49 private $businessUnit;
50
55 private $store;
56
63 public function getOutputType()
64 {
65 return $this->outputType;
66 }
67
74 public function getLocale()
75 {
76 return $this->locale;
77 }
78
85 public function getPrompt()
86 {
87 return $this->prompt;
88 }
89
96 public function getBusinessUnit()
97 {
98 return $this->businessUnit instanceof BusinessUnitResourceIdentifierBuilder ? $this->businessUnit->build() : $this->businessUnit;
99 }
100
107 public function getStore()
108 {
109 return $this->store instanceof StoreResourceIdentifierBuilder ? $this->store->build() : $this->store;
110 }
111
116 public function withOutputType(?string $outputType)
117 {
118 $this->outputType = $outputType;
119
120 return $this;
121 }
122
127 public function withLocale(?string $locale)
128 {
129 $this->locale = $locale;
130
131 return $this;
132 }
133
138 public function withPrompt(?string $prompt)
139 {
140 $this->prompt = $prompt;
141
142 return $this;
143 }
144
149 public function withBusinessUnit(?BusinessUnitResourceIdentifier $businessUnit)
150 {
151 $this->businessUnit = $businessUnit;
152
153 return $this;
154 }
155
160 public function withStore(?StoreResourceIdentifier $store)
161 {
162 $this->store = $store;
163
164 return $this;
165 }
166
172 {
173 $this->businessUnit = $businessUnit;
174
175 return $this;
176 }
177
183 {
184 $this->store = $store;
185
186 return $this;
187 }
188
189 public function build(): AgentResponsesRequest
190 {
192 $this->outputType,
193 $this->locale,
194 $this->prompt,
195 $this->businessUnit instanceof BusinessUnitResourceIdentifierBuilder ? $this->businessUnit->build() : $this->businessUnit,
196 $this->store instanceof StoreResourceIdentifierBuilder ? $this->store->build() : $this->store
197 );
198 }
199
200 public static function of(): AgentResponsesRequestBuilder
201 {
202 return new self();
203 }
204}
withBusinessUnitBuilder(?BusinessUnitResourceIdentifierBuilder $businessUnit)