commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
ResourceDeletedDeliveryPayloadBuilder.php
1 <?php
2 
3 declare(strict_types=1);
10 
20 use DateTimeImmutable;
21 use stdClass;
22 
27 {
32  private $projectKey;
33 
38  private $resource;
39 
44  private $resourceUserProvidedIdentifiers;
45 
50  private $version;
51 
56  private $modifiedAt;
57 
62  private $dataErasure;
63 
71  public function getProjectKey()
72  {
73  return $this->projectKey;
74  }
75 
82  public function getResource()
83  {
84  return $this->resource instanceof ReferenceBuilder ? $this->resource->build() : $this->resource;
85  }
86 
94  {
95  return $this->resourceUserProvidedIdentifiers instanceof UserProvidedIdentifiersBuilder ? $this->resourceUserProvidedIdentifiers->build() : $this->resourceUserProvidedIdentifiers;
96  }
97 
104  public function getVersion()
105  {
106  return $this->version;
107  }
108 
115  public function getModifiedAt()
116  {
117  return $this->modifiedAt;
118  }
119 
126  public function getDataErasure()
127  {
128  return $this->dataErasure;
129  }
130 
135  public function withProjectKey(?string $projectKey)
136  {
137  $this->projectKey = $projectKey;
138 
139  return $this;
140  }
141 
146  public function withResource(?Reference $resource)
147  {
148  $this->resource = $resource;
149 
150  return $this;
151  }
152 
157  public function withResourceUserProvidedIdentifiers(?UserProvidedIdentifiers $resourceUserProvidedIdentifiers)
158  {
159  $this->resourceUserProvidedIdentifiers = $resourceUserProvidedIdentifiers;
160 
161  return $this;
162  }
163 
168  public function withVersion(?int $version)
169  {
170  $this->version = $version;
171 
172  return $this;
173  }
174 
179  public function withModifiedAt(?DateTimeImmutable $modifiedAt)
180  {
181  $this->modifiedAt = $modifiedAt;
182 
183  return $this;
184  }
185 
190  public function withDataErasure(?bool $dataErasure)
191  {
192  $this->dataErasure = $dataErasure;
193 
194  return $this;
195  }
196 
201  public function withResourceBuilder(?ReferenceBuilder $resource)
202  {
203  $this->resource = $resource;
204 
205  return $this;
206  }
207 
212  public function withResourceUserProvidedIdentifiersBuilder(?UserProvidedIdentifiersBuilder $resourceUserProvidedIdentifiers)
213  {
214  $this->resourceUserProvidedIdentifiers = $resourceUserProvidedIdentifiers;
215 
216  return $this;
217  }
218 
220  {
222  $this->projectKey,
223  $this->resource instanceof ReferenceBuilder ? $this->resource->build() : $this->resource,
224  $this->resourceUserProvidedIdentifiers instanceof UserProvidedIdentifiersBuilder ? $this->resourceUserProvidedIdentifiers->build() : $this->resourceUserProvidedIdentifiers,
225  $this->version,
226  $this->modifiedAt,
227  $this->dataErasure
228  );
229  }
230 
231  public static function of(): ResourceDeletedDeliveryPayloadBuilder
232  {
233  return new self();
234  }
235 }
withResourceUserProvidedIdentifiersBuilder(?UserProvidedIdentifiersBuilder $resourceUserProvidedIdentifiers)
withResourceUserProvidedIdentifiers(?UserProvidedIdentifiers $resourceUserProvidedIdentifiers)