Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions changes.md
Original file line number Diff line number Diff line change
Expand Up @@ -407,6 +407,9 @@
<details>
<summary>Added Property(s)</summary>

- added property `retentionPolicy` to type `ImportContainer`
- added property `expiresAt` to type `ImportContainer`
- added property `retentionPolicy` to type `ImportContainerDraft`
- added property `/^[a-zA-Z]{2,3}(?:-[a-zA-Z]{4})?(?:-(?:[a-zA-Z]{2}|\d{3}))?$/` to type `SearchKeywords`
- added property `attributes` to type `ProductImport`
- added property `attributes` to type `ProductDraftImport`
Expand All @@ -426,6 +429,10 @@
<details>
<summary>Added Type(s)</summary>

- added type `StrategyEnum`
- added type `RetentionPolicy`
- added type `TimeToLiveConfig`
- added type `TimeToLiveRetentionPolicy`
- added type `AttributeLevel`
</details>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,13 @@ interface ImportContainer extends JsonObject
public const FIELD_KEY = 'key';
public const FIELD_RESOURCE_TYPE = 'resourceType';
public const FIELD_VERSION = 'version';
public const FIELD_RETENTION_POLICY = 'retentionPolicy';
public const FIELD_CREATED_AT = 'createdAt';
public const FIELD_LAST_MODIFIED_AT = 'lastModifiedAt';
public const FIELD_EXPIRES_AT = 'expiresAt';

/**
* <p>User-defined unique identifier for the ImportContainer.
* Keys can only contain alphanumeric characters (a-Z, 0-9), underscores and hyphens (_, -).</p>
* <p>User-defined unique identifier for the ImportContainer.</p>
*

* @return null|string
Expand All @@ -47,21 +48,37 @@ public function getResourceType();
public function getVersion();

/**
* <p>The time when the ImportContainer was created.</p>
* <p>The retention policy of the ImportContainer.</p>
*

* @return null|RetentionPolicy
*/
public function getRetentionPolicy();

/**
* <p>Date and time (UTC) the ImportContainer was initially created.</p>
*

* @return null|DateTimeImmutable
*/
public function getCreatedAt();

/**
* <p>The last time when the ImportContainer was modified.</p>
* <p>Date and time (UTC) the ImportContainer was last updated.</p>
*

* @return null|DateTimeImmutable
*/
public function getLastModifiedAt();

/**
* <p>Date and time (UTC) the ImportContainer is automatically deleted. Only present if a <code>retentionPolicy</code> is set. ImportContainers without <code>expiresAt</code> are permanent until <a href="#delete-importcontainer">manually deleted</a>.</p>
*

* @return null|DateTimeImmutable
*/
public function getExpiresAt();

/**
* @param ?string $key
*/
Expand All @@ -77,6 +94,11 @@ public function setResourceType(?string $resourceType): void;
*/
public function setVersion(?int $version): void;

/**
* @param ?RetentionPolicy $retentionPolicy
*/
public function setRetentionPolicy(?RetentionPolicy $retentionPolicy): void;

/**
* @param ?DateTimeImmutable $createdAt
*/
Expand All @@ -86,4 +108,9 @@ public function setCreatedAt(?DateTimeImmutable $createdAt): void;
* @param ?DateTimeImmutable $lastModifiedAt
*/
public function setLastModifiedAt(?DateTimeImmutable $lastModifiedAt): void;

/**
* @param ?DateTimeImmutable $expiresAt
*/
public function setExpiresAt(?DateTimeImmutable $expiresAt): void;
}
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,12 @@ final class ImportContainerBuilder implements Builder
*/
private $version;

/**

* @var null|RetentionPolicy|RetentionPolicyBuilder
*/
private $retentionPolicy;

/**

* @var ?DateTimeImmutable
Expand All @@ -52,8 +58,13 @@ final class ImportContainerBuilder implements Builder
private $lastModifiedAt;

/**
* <p>User-defined unique identifier for the ImportContainer.
* Keys can only contain alphanumeric characters (a-Z, 0-9), underscores and hyphens (_, -).</p>

* @var ?DateTimeImmutable
*/
private $expiresAt;

/**
* <p>User-defined unique identifier for the ImportContainer.</p>
*

* @return null|string
Expand Down Expand Up @@ -87,7 +98,18 @@ public function getVersion()
}

/**
* <p>The time when the ImportContainer was created.</p>
* <p>The retention policy of the ImportContainer.</p>
*

* @return null|RetentionPolicy
*/
public function getRetentionPolicy()
{
return $this->retentionPolicy instanceof RetentionPolicyBuilder ? $this->retentionPolicy->build() : $this->retentionPolicy;
}

/**
* <p>Date and time (UTC) the ImportContainer was initially created.</p>
*

* @return null|DateTimeImmutable
Expand All @@ -98,7 +120,7 @@ public function getCreatedAt()
}

/**
* <p>The last time when the ImportContainer was modified.</p>
* <p>Date and time (UTC) the ImportContainer was last updated.</p>
*

* @return null|DateTimeImmutable
Expand All @@ -108,6 +130,17 @@ public function getLastModifiedAt()
return $this->lastModifiedAt;
}

/**
* <p>Date and time (UTC) the ImportContainer is automatically deleted. Only present if a <code>retentionPolicy</code> is set. ImportContainers without <code>expiresAt</code> are permanent until <a href="#delete-importcontainer">manually deleted</a>.</p>
*

* @return null|DateTimeImmutable
*/
public function getExpiresAt()
{
return $this->expiresAt;
}

/**
* @param ?string $key
* @return $this
Expand Down Expand Up @@ -141,6 +174,17 @@ public function withVersion(?int $version)
return $this;
}

/**
* @param ?RetentionPolicy $retentionPolicy
* @return $this
*/
public function withRetentionPolicy(?RetentionPolicy $retentionPolicy)
{
$this->retentionPolicy = $retentionPolicy;

return $this;
}

/**
* @param ?DateTimeImmutable $createdAt
* @return $this
Expand All @@ -163,15 +207,38 @@ public function withLastModifiedAt(?DateTimeImmutable $lastModifiedAt)
return $this;
}

/**
* @param ?DateTimeImmutable $expiresAt
* @return $this
*/
public function withExpiresAt(?DateTimeImmutable $expiresAt)
{
$this->expiresAt = $expiresAt;

return $this;
}

/**
* @deprecated use withRetentionPolicy() instead
* @return $this
*/
public function withRetentionPolicyBuilder(?RetentionPolicyBuilder $retentionPolicy)
{
$this->retentionPolicy = $retentionPolicy;

return $this;
}

public function build(): ImportContainer
{
return new ImportContainerModel(
$this->key,
$this->resourceType,
$this->version,
$this->retentionPolicy instanceof RetentionPolicyBuilder ? $this->retentionPolicy->build() : $this->retentionPolicy,
$this->createdAt,
$this->lastModifiedAt
$this->lastModifiedAt,
$this->expiresAt
);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ interface ImportContainerDraft extends JsonObject
{
public const FIELD_KEY = 'key';
public const FIELD_RESOURCE_TYPE = 'resourceType';
public const FIELD_RETENTION_POLICY = 'retentionPolicy';

/**
* <p>User-defined unique identifier of the ImportContainer.
* Keys can only contain alphanumeric characters (a-Z, 0-9), underscores and hyphens (_, -).</p>
* <p>User-defined unique identifier of the ImportContainer.</p>
*

* @return null|string
Expand All @@ -34,6 +34,14 @@ public function getKey();
*/
public function getResourceType();

/**
* <p>Set a retention policy to automatically delete the ImportContainer after a defined period.</p>
*

* @return null|RetentionPolicy
*/
public function getRetentionPolicy();

/**
* @param ?string $key
*/
Expand All @@ -43,4 +51,9 @@ public function setKey(?string $key): void;
* @param ?string $resourceType
*/
public function setResourceType(?string $resourceType): void;

/**
* @param ?RetentionPolicy $retentionPolicy
*/
public function setRetentionPolicy(?RetentionPolicy $retentionPolicy): void;
}
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,13 @@ final class ImportContainerDraftBuilder implements Builder
private $resourceType;

/**
* <p>User-defined unique identifier of the ImportContainer.
* Keys can only contain alphanumeric characters (a-Z, 0-9), underscores and hyphens (_, -).</p>

* @var null|RetentionPolicy|RetentionPolicyBuilder
*/
private $retentionPolicy;

/**
* <p>User-defined unique identifier of the ImportContainer.</p>
*

* @return null|string
Expand All @@ -56,6 +61,17 @@ public function getResourceType()
return $this->resourceType;
}

/**
* <p>Set a retention policy to automatically delete the ImportContainer after a defined period.</p>
*

* @return null|RetentionPolicy
*/
public function getRetentionPolicy()
{
return $this->retentionPolicy instanceof RetentionPolicyBuilder ? $this->retentionPolicy->build() : $this->retentionPolicy;
}

/**
* @param ?string $key
* @return $this
Expand All @@ -78,12 +94,34 @@ public function withResourceType(?string $resourceType)
return $this;
}

/**
* @param ?RetentionPolicy $retentionPolicy
* @return $this
*/
public function withRetentionPolicy(?RetentionPolicy $retentionPolicy)
{
$this->retentionPolicy = $retentionPolicy;

return $this;
}

/**
* @deprecated use withRetentionPolicy() instead
* @return $this
*/
public function withRetentionPolicyBuilder(?RetentionPolicyBuilder $retentionPolicy)
{
$this->retentionPolicy = $retentionPolicy;

return $this;
}

public function build(): ImportContainerDraft
{
return new ImportContainerDraftModel(
$this->key,
$this->resourceType
$this->resourceType,
$this->retentionPolicy instanceof RetentionPolicyBuilder ? $this->retentionPolicy->build() : $this->retentionPolicy
);
}

Expand Down
Loading