commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
Loading...
Searching...
No Matches
lib
commercetools-api
src
Models
ProductType
AttributeDefinitionDraftBuilder.php
1
<?php
2
3
declare(strict_types=1);
9
namespace
Commercetools\Api\Models\ProductType
;
10
11
use
Commercetools\Api\Models\Common\LocalizedString
;
12
use
Commercetools\Api\Models\Common\LocalizedStringBuilder
;
13
use
Commercetools\Base\Builder
;
14
use
Commercetools\Base\DateTimeImmutableCollection
;
15
use
Commercetools\Base\JsonObject
;
16
use
Commercetools\Base\JsonObjectModel
;
17
use
Commercetools\Base\MapperFactory
;
18
use stdClass;
19
23
final
class
AttributeDefinitionDraftBuilder
implements
Builder
24
{
29
private
$type;
30
35
private
$name;
36
41
private
$label;
42
47
private
$isRequired;
48
53
private
$attributeConstraint;
54
59
private
$inputTip;
60
65
private
$inputHint;
66
71
private
$isSearchable;
72
80
public
function
getType
()
81
{
82
return
$this->type instanceof
AttributeTypeBuilder
? $this->type->
build
() : $this->type;
83
}
84
93
public
function
getName
()
94
{
95
return
$this->name;
96
}
97
104
public
function
getLabel
()
105
{
106
return
$this->label instanceof
LocalizedStringBuilder
? $this->label->
build
() : $this->label;
107
}
108
115
public
function
getIsRequired
()
116
{
117
return
$this->isRequired;
118
}
119
126
public
function
getAttributeConstraint
()
127
{
128
return
$this->attributeConstraint;
129
}
130
137
public
function
getInputTip
()
138
{
139
return
$this->inputTip instanceof
LocalizedStringBuilder
? $this->inputTip->
build
() : $this->inputTip;
140
}
141
148
public
function
getInputHint
()
149
{
150
return
$this->inputHint;
151
}
152
163
public
function
getIsSearchable
()
164
{
165
return
$this->isSearchable;
166
}
167
172
public
function
withType
(?
AttributeType
$type)
173
{
174
$this->type = $type;
175
176
return
$this;
177
}
178
183
public
function
withName
(?
string
$name)
184
{
185
$this->name = $name;
186
187
return
$this;
188
}
189
194
public
function
withLabel
(?
LocalizedString
$label)
195
{
196
$this->label = $label;
197
198
return
$this;
199
}
200
205
public
function
withIsRequired
(?
bool
$isRequired)
206
{
207
$this->isRequired = $isRequired;
208
209
return
$this;
210
}
211
216
public
function
withAttributeConstraint
(?
string
$attributeConstraint)
217
{
218
$this->attributeConstraint = $attributeConstraint;
219
220
return
$this;
221
}
222
227
public
function
withInputTip
(?
LocalizedString
$inputTip)
228
{
229
$this->inputTip = $inputTip;
230
231
return
$this;
232
}
233
238
public
function
withInputHint
(?
string
$inputHint)
239
{
240
$this->inputHint = $inputHint;
241
242
return
$this;
243
}
244
249
public
function
withIsSearchable
(?
bool
$isSearchable)
250
{
251
$this->isSearchable = $isSearchable;
252
253
return
$this;
254
}
255
260
public
function
withTypeBuilder
(?
AttributeTypeBuilder
$type)
261
{
262
$this->type = $type;
263
264
return
$this;
265
}
266
271
public
function
withLabelBuilder
(?
LocalizedStringBuilder
$label)
272
{
273
$this->label = $label;
274
275
return
$this;
276
}
277
282
public
function
withInputTipBuilder
(?
LocalizedStringBuilder
$inputTip)
283
{
284
$this->inputTip = $inputTip;
285
286
return
$this;
287
}
288
289
public
function
build
():
AttributeDefinitionDraft
290
{
291
return
new
AttributeDefinitionDraftModel
(
292
$this->type instanceof
AttributeTypeBuilder
? $this->type->
build
() : $this->type,
293
$this->name,
294
$this->label instanceof
LocalizedStringBuilder
? $this->label->
build
() : $this->label,
295
$this->isRequired,
296
$this->attributeConstraint,
297
$this->inputTip instanceof
LocalizedStringBuilder
? $this->inputTip->
build
() : $this->inputTip,
298
$this->inputHint,
299
$this->isSearchable
300
);
301
}
302
303
public
static
function
of
():
AttributeDefinitionDraftBuilder
304
{
305
return
new
self
();
306
}
307
}
Commercetools\Api\Models\Common\LocalizedStringBuilder
Definition
LocalizedStringBuilder.php:20
Commercetools\Api\Models\Common\LocalizedStringBuilder\build
build()
Definition
LocalizedStringBuilder.php:42
Commercetools\Api\Models\ProductType\AttributeDefinitionDraftBuilder
Definition
AttributeDefinitionDraftBuilder.php:24
Commercetools\Api\Models\ProductType\AttributeDefinitionDraftBuilder\getIsSearchable
getIsSearchable()
Definition
AttributeDefinitionDraftBuilder.php:163
Commercetools\Api\Models\ProductType\AttributeDefinitionDraftBuilder\withAttributeConstraint
withAttributeConstraint(?string $attributeConstraint)
Definition
AttributeDefinitionDraftBuilder.php:216
Commercetools\Api\Models\ProductType\AttributeDefinitionDraftBuilder\getName
getName()
Definition
AttributeDefinitionDraftBuilder.php:93
Commercetools\Api\Models\ProductType\AttributeDefinitionDraftBuilder\getType
getType()
Definition
AttributeDefinitionDraftBuilder.php:80
Commercetools\Api\Models\ProductType\AttributeDefinitionDraftBuilder\of
static of()
Definition
AttributeDefinitionDraftBuilder.php:303
Commercetools\Api\Models\ProductType\AttributeDefinitionDraftBuilder\withLabel
withLabel(?LocalizedString $label)
Definition
AttributeDefinitionDraftBuilder.php:194
Commercetools\Api\Models\ProductType\AttributeDefinitionDraftBuilder\getAttributeConstraint
getAttributeConstraint()
Definition
AttributeDefinitionDraftBuilder.php:126
Commercetools\Api\Models\ProductType\AttributeDefinitionDraftBuilder\withLabelBuilder
withLabelBuilder(?LocalizedStringBuilder $label)
Definition
AttributeDefinitionDraftBuilder.php:271
Commercetools\Api\Models\ProductType\AttributeDefinitionDraftBuilder\getIsRequired
getIsRequired()
Definition
AttributeDefinitionDraftBuilder.php:115
Commercetools\Api\Models\ProductType\AttributeDefinitionDraftBuilder\withType
withType(?AttributeType $type)
Definition
AttributeDefinitionDraftBuilder.php:172
Commercetools\Api\Models\ProductType\AttributeDefinitionDraftBuilder\withIsRequired
withIsRequired(?bool $isRequired)
Definition
AttributeDefinitionDraftBuilder.php:205
Commercetools\Api\Models\ProductType\AttributeDefinitionDraftBuilder\build
build()
Definition
AttributeDefinitionDraftBuilder.php:289
Commercetools\Api\Models\ProductType\AttributeDefinitionDraftBuilder\withInputTip
withInputTip(?LocalizedString $inputTip)
Definition
AttributeDefinitionDraftBuilder.php:227
Commercetools\Api\Models\ProductType\AttributeDefinitionDraftBuilder\getLabel
getLabel()
Definition
AttributeDefinitionDraftBuilder.php:104
Commercetools\Api\Models\ProductType\AttributeDefinitionDraftBuilder\withIsSearchable
withIsSearchable(?bool $isSearchable)
Definition
AttributeDefinitionDraftBuilder.php:249
Commercetools\Api\Models\ProductType\AttributeDefinitionDraftBuilder\withInputTipBuilder
withInputTipBuilder(?LocalizedStringBuilder $inputTip)
Definition
AttributeDefinitionDraftBuilder.php:282
Commercetools\Api\Models\ProductType\AttributeDefinitionDraftBuilder\withInputHint
withInputHint(?string $inputHint)
Definition
AttributeDefinitionDraftBuilder.php:238
Commercetools\Api\Models\ProductType\AttributeDefinitionDraftBuilder\getInputHint
getInputHint()
Definition
AttributeDefinitionDraftBuilder.php:148
Commercetools\Api\Models\ProductType\AttributeDefinitionDraftBuilder\withName
withName(?string $name)
Definition
AttributeDefinitionDraftBuilder.php:183
Commercetools\Api\Models\ProductType\AttributeDefinitionDraftBuilder\getInputTip
getInputTip()
Definition
AttributeDefinitionDraftBuilder.php:137
Commercetools\Api\Models\ProductType\AttributeDefinitionDraftBuilder\withTypeBuilder
withTypeBuilder(?AttributeTypeBuilder $type)
Definition
AttributeDefinitionDraftBuilder.php:260
Commercetools\Api\Models\ProductType\AttributeDefinitionDraftModel
Definition
AttributeDefinitionDraftModel.php:23
Commercetools\Api\Models\ProductType\AttributeTypeBuilder
Definition
AttributeTypeBuilder.php:22
Commercetools\Api\Models\ProductType\AttributeTypeBuilder\build
build()
Definition
AttributeTypeBuilder.php:23
Commercetools\Base\DateTimeImmutableCollection
Definition
DateTimeImmutableCollection.php:21
Commercetools\Base\JsonObjectModel
Definition
JsonObjectModel.php:15
Commercetools\Base\MapperFactory
Definition
MapperFactory.php:16
Commercetools\Api\Models\Common\LocalizedString
Definition
LocalizedString.php:14
Commercetools\Api\Models\ProductType\AttributeDefinitionDraft
Definition
AttributeDefinitionDraft.php:16
Commercetools\Api\Models\ProductType\AttributeType
Definition
AttributeType.php:15
Commercetools\Base\Builder
Definition
Builder.php:16
Commercetools\Base\JsonObject
Definition
JsonObject.php:15
Commercetools\Api\Models\ProductType
Definition
AttributeBooleanType.php:9
Generated by
1.9.8