Skip to content

Commit

Permalink
CI commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Afosto committed Mar 5, 2021
1 parent 3a65b6a commit 2269644
Show file tree
Hide file tree
Showing 80 changed files with 3,855 additions and 0 deletions.
185 changes: 185 additions & 0 deletions src/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -5271,6 +5271,191 @@ public function createNumber(\Afosto\Sdk\Model\IamPhoneNumberModel $body, string
return $this->executePsr7Endpoint(new \Afosto\Sdk\Endpoint\CreateNumber($body), $fetch);
}

/**
* Returns a list of available repositories.
*
* @param array $queryParameters {
*
* @var string $secret
* }
*
* @param array $headerParameters {
*
* @var string $x-page
* @var string $x-page-size
* }
*
* @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
*
* @throws \Afosto\Sdk\Exception\ListRepositoriesBadRequestException
* @throws \Afosto\Sdk\Exception\ListRepositoriesUnauthorizedException
* @throws \Afosto\Sdk\Exception\ListRepositoriesForbiddenException
* @throws \Afosto\Sdk\Exception\ListRepositoriesNotFoundException
* @throws \Afosto\Sdk\Exception\ListRepositoriesInternalServerErrorException
* @throws \Afosto\Sdk\Exception\ListRepositoriesServiceUnavailableException
*
* @return \Afosto\Sdk\Model\TplRepository[]|\Psr\Http\Message\ResponseInterface|null
*/
public function listRepositories(array $queryParameters = [], array $headerParameters = [], string $fetch = self::FETCH_OBJECT)
{
return $this->executePsr7Endpoint(new \Afosto\Sdk\Endpoint\ListRepositories($queryParameters, $headerParameters), $fetch);
}

/**
* View a single repository.
*
* @param array $queryParameters {
*
* @var string $secret
* }
*
* @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
*
* @throws \Afosto\Sdk\Exception\ViewRepositoryBadRequestException
* @throws \Afosto\Sdk\Exception\ViewRepositoryUnauthorizedException
* @throws \Afosto\Sdk\Exception\ViewRepositoryForbiddenException
* @throws \Afosto\Sdk\Exception\ViewRepositoryNotFoundException
* @throws \Afosto\Sdk\Exception\ViewRepositoryInternalServerErrorException
* @throws \Afosto\Sdk\Exception\ViewRepositoryServiceUnavailableException
*
* @return \Afosto\Sdk\Model\TplRepository|\Psr\Http\Message\ResponseInterface|null
*/
public function viewRepository(string $id, array $queryParameters = [], string $fetch = self::FETCH_OBJECT)
{
return $this->executePsr7Endpoint(new \Afosto\Sdk\Endpoint\ViewRepository($id, $queryParameters), $fetch);
}

/**
* List a single repository's builds.
*
* @param array $queryParameters {
*
* @var string $secret
* }
*
* @param array $headerParameters {
*
* @var string $x-page
* @var string $x-page-size
* }
*
* @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
*
* @throws \Afosto\Sdk\Exception\ListBuildsBadRequestException
* @throws \Afosto\Sdk\Exception\ListBuildsUnauthorizedException
* @throws \Afosto\Sdk\Exception\ListBuildsForbiddenException
* @throws \Afosto\Sdk\Exception\ListBuildsNotFoundException
* @throws \Afosto\Sdk\Exception\ListBuildsInternalServerErrorException
* @throws \Afosto\Sdk\Exception\ListBuildsServiceUnavailableException
*
* @return \Afosto\Sdk\Model\TplBuild[]|\Psr\Http\Message\ResponseInterface|null
*/
public function listBuilds(string $id, array $queryParameters = [], array $headerParameters = [], string $fetch = self::FETCH_OBJECT)
{
return $this->executePsr7Endpoint(new \Afosto\Sdk\Endpoint\ListBuilds($id, $queryParameters, $headerParameters), $fetch);
}

/**
* List a single build.
*
* @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
*
* @throws \Afosto\Sdk\Exception\ViewBuildBadRequestException
* @throws \Afosto\Sdk\Exception\ViewBuildUnauthorizedException
* @throws \Afosto\Sdk\Exception\ViewBuildForbiddenException
* @throws \Afosto\Sdk\Exception\ViewBuildNotFoundException
* @throws \Afosto\Sdk\Exception\ViewBuildInternalServerErrorException
* @throws \Afosto\Sdk\Exception\ViewBuildServiceUnavailableException
*
* @return \Afosto\Sdk\Model\TplBuild|\Psr\Http\Message\ResponseInterface|null
*/
public function viewBuild(string $id, string $fetch = self::FETCH_OBJECT)
{
return $this->executePsr7Endpoint(new \Afosto\Sdk\Endpoint\ViewBuild($id), $fetch);
}

/**
* Returns a list of themes.
*
* @param array $headerParameters {
*
* @var string $x-page
* @var string $x-page-size
* }
*
* @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
*
* @throws \Afosto\Sdk\Exception\ListThemesBadRequestException
* @throws \Afosto\Sdk\Exception\ListThemesUnauthorizedException
* @throws \Afosto\Sdk\Exception\ListThemesForbiddenException
* @throws \Afosto\Sdk\Exception\ListThemesNotFoundException
* @throws \Afosto\Sdk\Exception\ListThemesInternalServerErrorException
* @throws \Afosto\Sdk\Exception\ListThemesServiceUnavailableException
*
* @return \Afosto\Sdk\Model\TplTheme[]|\Psr\Http\Message\ResponseInterface|null
*/
public function listThemes(array $headerParameters = [], string $fetch = self::FETCH_OBJECT)
{
return $this->executePsr7Endpoint(new \Afosto\Sdk\Endpoint\ListThemes($headerParameters), $fetch);
}

/**
* Add a theme.
*
* @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
*
* @throws \Afosto\Sdk\Exception\CreateThemeBadRequestException
* @throws \Afosto\Sdk\Exception\CreateThemeUnauthorizedException
* @throws \Afosto\Sdk\Exception\CreateThemeForbiddenException
* @throws \Afosto\Sdk\Exception\CreateThemeNotFoundException
* @throws \Afosto\Sdk\Exception\CreateThemeInternalServerErrorException
* @throws \Afosto\Sdk\Exception\CreateThemeServiceUnavailableException
*
* @return \Afosto\Sdk\Model\TplTheme|\Psr\Http\Message\ResponseInterface|null
*/
public function createTheme(\Afosto\Sdk\Model\TplThemeCreateModel $body, string $fetch = self::FETCH_OBJECT)
{
return $this->executePsr7Endpoint(new \Afosto\Sdk\Endpoint\CreateTheme($body), $fetch);
}

/**
* Returns a list of themes.
*
* @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
*
* @throws \Afosto\Sdk\Exception\ViewThemeBadRequestException
* @throws \Afosto\Sdk\Exception\ViewThemeUnauthorizedException
* @throws \Afosto\Sdk\Exception\ViewThemeForbiddenException
* @throws \Afosto\Sdk\Exception\ViewThemeNotFoundException
* @throws \Afosto\Sdk\Exception\ViewThemeInternalServerErrorException
* @throws \Afosto\Sdk\Exception\ViewThemeServiceUnavailableException
*
* @return \Afosto\Sdk\Model\TplTheme[]|\Psr\Http\Message\ResponseInterface|null
*/
public function viewTheme(string $id, string $fetch = self::FETCH_OBJECT)
{
return $this->executePsr7Endpoint(new \Afosto\Sdk\Endpoint\ViewTheme($id), $fetch);
}

/**
* Update a theme.
*
* @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
*
* @throws \Afosto\Sdk\Exception\UpdateThemeBadRequestException
* @throws \Afosto\Sdk\Exception\UpdateThemeUnauthorizedException
* @throws \Afosto\Sdk\Exception\UpdateThemeForbiddenException
* @throws \Afosto\Sdk\Exception\UpdateThemeNotFoundException
* @throws \Afosto\Sdk\Exception\UpdateThemeInternalServerErrorException
* @throws \Afosto\Sdk\Exception\UpdateThemeServiceUnavailableException
*
* @return \Afosto\Sdk\Model\TplTheme|\Psr\Http\Message\ResponseInterface|null
*/
public function updateTheme(string $id, \Afosto\Sdk\Model\TplThemeUpdateModel $body, string $fetch = self::FETCH_OBJECT)
{
return $this->executePsr7Endpoint(new \Afosto\Sdk\Endpoint\UpdateTheme($id, $body), $fetch);
}

/**
* @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
*
Expand Down
81 changes: 81 additions & 0 deletions src/Endpoint/CreateTheme.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
<?php

declare(strict_types=1);

/*
* This file has been auto generated by Jane,
*
* Do no edit it directly.
*/

namespace Afosto\Sdk\Endpoint;

class CreateTheme extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements \Jane\OpenApiRuntime\Client\Psr7Endpoint
{
/**
* Add a theme.
*/
public function __construct(\Afosto\Sdk\Model\TplThemeCreateModel $body)
{
$this->body = $body;
}

use \Jane\OpenApiRuntime\Client\Psr7EndpointTrait;

public function getMethod(): string
{
return 'POST';
}

public function getUri(): string
{
return '/tpl/templates/themes';
}

public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array
{
return $this->getSerializedBody($serializer);
}

public function getExtraHeaders(): array
{
return ['Accept' => ['application/json']];
}

/**
* {@inheritdoc}
*
* @throws \Afosto\Sdk\Exception\CreateThemeBadRequestException
* @throws \Afosto\Sdk\Exception\CreateThemeUnauthorizedException
* @throws \Afosto\Sdk\Exception\CreateThemeForbiddenException
* @throws \Afosto\Sdk\Exception\CreateThemeNotFoundException
* @throws \Afosto\Sdk\Exception\CreateThemeInternalServerErrorException
* @throws \Afosto\Sdk\Exception\CreateThemeServiceUnavailableException
*
* @return \Afosto\Sdk\Model\TplTheme|null
*/
protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType)
{
if (200 === $status) {
return $serializer->deserialize($body, 'Afosto\\Sdk\\Model\\TplTheme', 'json');
}
if (400 === $status) {
throw new \Afosto\Sdk\Exception\CreateThemeBadRequestException($serializer->deserialize($body, 'Afosto\\Sdk\\Model\\Error', 'json'));
}
if (401 === $status) {
throw new \Afosto\Sdk\Exception\CreateThemeUnauthorizedException($serializer->deserialize($body, 'Afosto\\Sdk\\Model\\Error', 'json'));
}
if (403 === $status) {
throw new \Afosto\Sdk\Exception\CreateThemeForbiddenException($serializer->deserialize($body, 'Afosto\\Sdk\\Model\\Error', 'json'));
}
if (404 === $status) {
throw new \Afosto\Sdk\Exception\CreateThemeNotFoundException($serializer->deserialize($body, 'Afosto\\Sdk\\Model\\Error', 'json'));
}
if (500 === $status) {
throw new \Afosto\Sdk\Exception\CreateThemeInternalServerErrorException($serializer->deserialize($body, 'Afosto\\Sdk\\Model\\Error', 'json'));
}
if (503 === $status) {
throw new \Afosto\Sdk\Exception\CreateThemeServiceUnavailableException($serializer->deserialize($body, 'Afosto\\Sdk\\Model\\Error', 'json'));
}
}
}
119 changes: 119 additions & 0 deletions src/Endpoint/ListBuilds.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,119 @@
<?php

declare(strict_types=1);

/*
* This file has been auto generated by Jane,
*
* Do no edit it directly.
*/

namespace Afosto\Sdk\Endpoint;

class ListBuilds extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements \Jane\OpenApiRuntime\Client\Psr7Endpoint
{
protected $id;

/**
* List a single repository's builds.
*
* @param array $queryParameters {
*
* @var string $secret
* }
*
* @param array $headerParameters {
*
* @var string $x-page
* @var string $x-page-size
* }
*/
public function __construct(string $id, array $queryParameters = [], array $headerParameters = [])
{
$this->id = $id;
$this->queryParameters = $queryParameters;
$this->headerParameters = $headerParameters;
}

use \Jane\OpenApiRuntime\Client\Psr7EndpointTrait;

public function getMethod(): string
{
return 'GET';
}

public function getUri(): string
{
return str_replace(['{id}'], [$this->id], '/tpl/templates/repositories/{id}/builds');
}

public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array
{
return [[], null];
}

public function getExtraHeaders(): array
{
return ['Accept' => ['application/json']];
}

protected function getQueryOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver
{
$optionsResolver = parent::getQueryOptionsResolver();
$optionsResolver->setDefined(['secret']);
$optionsResolver->setRequired([]);
$optionsResolver->setDefaults([]);
$optionsResolver->setAllowedTypes('secret', ['string']);

return $optionsResolver;
}

protected function getHeadersOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver
{
$optionsResolver = parent::getHeadersOptionsResolver();
$optionsResolver->setDefined(['x-page', 'x-page-size']);
$optionsResolver->setRequired([]);
$optionsResolver->setDefaults([]);
$optionsResolver->setAllowedTypes('x-page', ['string']);
$optionsResolver->setAllowedTypes('x-page-size', ['string']);

return $optionsResolver;
}

/**
* {@inheritdoc}
*
* @throws \Afosto\Sdk\Exception\ListBuildsBadRequestException
* @throws \Afosto\Sdk\Exception\ListBuildsUnauthorizedException
* @throws \Afosto\Sdk\Exception\ListBuildsForbiddenException
* @throws \Afosto\Sdk\Exception\ListBuildsNotFoundException
* @throws \Afosto\Sdk\Exception\ListBuildsInternalServerErrorException
* @throws \Afosto\Sdk\Exception\ListBuildsServiceUnavailableException
*
* @return \Afosto\Sdk\Model\TplBuild[]|null
*/
protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType)
{
if (200 === $status) {
return $serializer->deserialize($body, 'Afosto\\Sdk\\Model\\TplBuild[]', 'json');
}
if (400 === $status) {
throw new \Afosto\Sdk\Exception\ListBuildsBadRequestException($serializer->deserialize($body, 'Afosto\\Sdk\\Model\\Error', 'json'));
}
if (401 === $status) {
throw new \Afosto\Sdk\Exception\ListBuildsUnauthorizedException($serializer->deserialize($body, 'Afosto\\Sdk\\Model\\Error', 'json'));
}
if (403 === $status) {
throw new \Afosto\Sdk\Exception\ListBuildsForbiddenException($serializer->deserialize($body, 'Afosto\\Sdk\\Model\\Error', 'json'));
}
if (404 === $status) {
throw new \Afosto\Sdk\Exception\ListBuildsNotFoundException($serializer->deserialize($body, 'Afosto\\Sdk\\Model\\Error', 'json'));
}
if (500 === $status) {
throw new \Afosto\Sdk\Exception\ListBuildsInternalServerErrorException($serializer->deserialize($body, 'Afosto\\Sdk\\Model\\Error', 'json'));
}
if (503 === $status) {
throw new \Afosto\Sdk\Exception\ListBuildsServiceUnavailableException($serializer->deserialize($body, 'Afosto\\Sdk\\Model\\Error', 'json'));
}
}
}
Loading

0 comments on commit 2269644

Please sign in to comment.