commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
StateSetNameActionBuilder.php
1 <?php
2 
3 declare(strict_types=1);
10 
18 use stdClass;
19 
23 final class StateSetNameActionBuilder implements Builder
24 {
29  private $name;
30 
38  public function getName()
39  {
40  return $this->name instanceof LocalizedStringBuilder ? $this->name->build() : $this->name;
41  }
42 
47  public function withName(?LocalizedString $name)
48  {
49  $this->name = $name;
50 
51  return $this;
52  }
53 
58  public function withNameBuilder(?LocalizedStringBuilder $name)
59  {
60  $this->name = $name;
61 
62  return $this;
63  }
64 
65  public function build(): StateSetNameAction
66  {
67  return new StateSetNameActionModel(
68  $this->name instanceof LocalizedStringBuilder ? $this->name->build() : $this->name
69  );
70  }
71 
72  public static function of(): StateSetNameActionBuilder
73  {
74  return new self();
75  }
76 }