Skip to content

Commit

Permalink
feat(specs): only use shortname in the source input [skip-bc] (genera…
Browse files Browse the repository at this point in the history
…ted)

algolia/api-clients-automation#4287

Co-authored-by: algolia-bot <[email protected]>
Co-authored-by: Pierre Millot <[email protected]>
  • Loading branch information
algolia-bot and millotp committed Jan 8, 2025
1 parent 8b9d2b8 commit 44a05a2
Show file tree
Hide file tree
Showing 6 changed files with 2 additions and 468 deletions.
35 changes: 0 additions & 35 deletions lib/Model/Ingestion/DockerImageType.php

This file was deleted.

35 changes: 0 additions & 35 deletions lib/Model/Ingestion/DockerRegistry.php

This file was deleted.

104 changes: 1 addition & 103 deletions lib/Model/Ingestion/SourceDocker.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,7 @@ class SourceDocker extends AbstractModel implements ModelInterface, \ArrayAccess
* @var string[]
*/
protected static $modelTypes = [
'imageType' => '\Algolia\AlgoliaSearch\Model\Ingestion\DockerImageType',
'registry' => '\Algolia\AlgoliaSearch\Model\Ingestion\DockerRegistry',
'image' => 'string',
'version' => 'string',
'configuration' => 'object',
];

Expand All @@ -33,10 +30,7 @@ class SourceDocker extends AbstractModel implements ModelInterface, \ArrayAccess
* @var string[]
*/
protected static $modelFormats = [
'imageType' => null,
'registry' => null,
'image' => null,
'version' => null,
'configuration' => null,
];

Expand All @@ -47,10 +41,7 @@ class SourceDocker extends AbstractModel implements ModelInterface, \ArrayAccess
* @var string[]
*/
protected static $attributeMap = [
'imageType' => 'imageType',
'registry' => 'registry',
'image' => 'image',
'version' => 'version',
'configuration' => 'configuration',
];

Expand All @@ -60,10 +51,7 @@ class SourceDocker extends AbstractModel implements ModelInterface, \ArrayAccess
* @var string[]
*/
protected static $setters = [
'imageType' => 'setImageType',
'registry' => 'setRegistry',
'image' => 'setImage',
'version' => 'setVersion',
'configuration' => 'setConfiguration',
];

Expand All @@ -73,10 +61,7 @@ class SourceDocker extends AbstractModel implements ModelInterface, \ArrayAccess
* @var string[]
*/
protected static $getters = [
'imageType' => 'getImageType',
'registry' => 'getRegistry',
'image' => 'getImage',
'version' => 'getVersion',
'configuration' => 'getConfiguration',
];

Expand All @@ -94,18 +79,9 @@ class SourceDocker extends AbstractModel implements ModelInterface, \ArrayAccess
*/
public function __construct(?array $data = null)
{
if (isset($data['imageType'])) {
$this->container['imageType'] = $data['imageType'];
}
if (isset($data['registry'])) {
$this->container['registry'] = $data['registry'];
}
if (isset($data['image'])) {
$this->container['image'] = $data['image'];
}
if (isset($data['version'])) {
$this->container['version'] = $data['version'];
}
if (isset($data['configuration'])) {
$this->container['configuration'] = $data['configuration'];
}
Expand Down Expand Up @@ -171,12 +147,6 @@ public function listInvalidProperties()
{
$invalidProperties = [];

if (!isset($this->container['imageType']) || null === $this->container['imageType']) {
$invalidProperties[] = "'imageType' can't be null";
}
if (!isset($this->container['registry']) || null === $this->container['registry']) {
$invalidProperties[] = "'registry' can't be null";
}
if (!isset($this->container['image']) || null === $this->container['image']) {
$invalidProperties[] = "'image' can't be null";
}
Expand All @@ -198,54 +168,6 @@ public function valid()
return 0 === count($this->listInvalidProperties());
}

/**
* Gets imageType.
*
* @return DockerImageType
*/
public function getImageType()
{
return $this->container['imageType'] ?? null;
}

/**
* Sets imageType.
*
* @param DockerImageType $imageType imageType
*
* @return self
*/
public function setImageType($imageType)
{
$this->container['imageType'] = $imageType;

return $this;
}

/**
* Gets registry.
*
* @return DockerRegistry
*/
public function getRegistry()
{
return $this->container['registry'] ?? null;
}

/**
* Sets registry.
*
* @param DockerRegistry $registry registry
*
* @return self
*/
public function setRegistry($registry)
{
$this->container['registry'] = $registry;

return $this;
}

/**
* Gets image.
*
Expand All @@ -259,7 +181,7 @@ public function getImage()
/**
* Sets image.
*
* @param string $image docker image name
* @param string $image shortname of the image, as returned by the referential
*
* @return self
*/
Expand All @@ -270,30 +192,6 @@ public function setImage($image)
return $this;
}

/**
* Gets version.
*
* @return null|string
*/
public function getVersion()
{
return $this->container['version'] ?? null;
}

/**
* Sets version.
*
* @param null|string $version docker image version
*
* @return self
*/
public function setVersion($version)
{
$this->container['version'] = $version;

return $this;
}

/**
* Gets configuration.
*
Expand Down
Loading

0 comments on commit 44a05a2

Please sign in to comment.