-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #16 from saasus-platform/feature/generate-AwsMarke…
…tplaceClient Generate Client for AWS Marketplace Integration API
- Loading branch information
Showing
130 changed files
with
6,042 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
61 changes: 61 additions & 0 deletions
61
generated/Auth/Endpoint/ConfirmSignUpWithAwsMarketplace.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
<?php | ||
|
||
namespace AntiPatternInc\Saasus\Sdk\Auth\Endpoint; | ||
|
||
class ConfirmSignUpWithAwsMarketplace extends \AntiPatternInc\Saasus\Sdk\Auth\Runtime\Client\BaseEndpoint implements \AntiPatternInc\Saasus\Sdk\Auth\Runtime\Client\Endpoint | ||
{ | ||
/** | ||
* AWS Marketplaceと連携したユーザー新規登録を確定します。AWS Marketplaceと連携したテナントを新規作成します。 | ||
Registration Tokenが有効でない場合はエラーを返却します。 | ||
Confirm a new use registeration linked to AWS Marketplace. Create a new tenant linked to AWS Marketplace. | ||
If the Registration Token is not valid, an error is returned. | ||
* | ||
* @param null|\AntiPatternInc\Saasus\Sdk\Auth\Model\ConfirmSignUpWithAwsMarketplaceParam $requestBody | ||
*/ | ||
public function __construct(?\AntiPatternInc\Saasus\Sdk\Auth\Model\ConfirmSignUpWithAwsMarketplaceParam $requestBody = null) | ||
{ | ||
$this->body = $requestBody; | ||
} | ||
use \AntiPatternInc\Saasus\Sdk\Auth\Runtime\Client\EndpointTrait; | ||
public function getMethod() : string | ||
{ | ||
return 'POST'; | ||
} | ||
public function getUri() : string | ||
{ | ||
return '/aws-marketplace/sign-up-confirm'; | ||
} | ||
public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null) : array | ||
{ | ||
if ($this->body instanceof \AntiPatternInc\Saasus\Sdk\Auth\Model\ConfirmSignUpWithAwsMarketplaceParam) { | ||
return array(array('Content-Type' => array('application/json')), $serializer->serialize($this->body, 'json')); | ||
} | ||
return array(array(), null); | ||
} | ||
public function getExtraHeaders() : array | ||
{ | ||
return array('Accept' => array('application/json')); | ||
} | ||
/** | ||
* {@inheritdoc} | ||
* | ||
* @throws \AntiPatternInc\Saasus\Sdk\Auth\Exception\ConfirmSignUpWithAwsMarketplaceInternalServerErrorException | ||
* | ||
* @return null|\AntiPatternInc\Saasus\Sdk\Auth\Model\Tenant | ||
*/ | ||
protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) | ||
{ | ||
if (is_null($contentType) === false && (201 === $status && mb_strpos($contentType, 'application/json') !== false)) { | ||
return $serializer->deserialize($body, 'AntiPatternInc\\Saasus\\Sdk\\Auth\\Model\\Tenant', 'json'); | ||
} | ||
if (is_null($contentType) === false && (500 === $status && mb_strpos($contentType, 'application/json') !== false)) { | ||
throw new \AntiPatternInc\Saasus\Sdk\Auth\Exception\ConfirmSignUpWithAwsMarketplaceInternalServerErrorException($serializer->deserialize($body, 'AntiPatternInc\\Saasus\\Sdk\\Auth\\Model\\Error', 'json')); | ||
} | ||
} | ||
public function getAuthenticationScopes() : array | ||
{ | ||
return array('Bearer'); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
<?php | ||
|
||
namespace AntiPatternInc\Saasus\Sdk\Auth\Endpoint; | ||
|
||
class LinkAwsMarketplace extends \AntiPatternInc\Saasus\Sdk\Auth\Runtime\Client\BaseEndpoint implements \AntiPatternInc\Saasus\Sdk\Auth\Runtime\Client\Endpoint | ||
{ | ||
/** | ||
* AWS Marketplaceと既存のテナントを連携します。 | ||
Registration Tokenが有効でない場合はエラーを返却します。 | ||
Link an existing tenant with AWS Marketplace. | ||
If the Registration Token is not valid, an error is returned. | ||
* | ||
* @param null|\AntiPatternInc\Saasus\Sdk\Auth\Model\LinkAwsMarketplaceParam $requestBody | ||
*/ | ||
public function __construct(?\AntiPatternInc\Saasus\Sdk\Auth\Model\LinkAwsMarketplaceParam $requestBody = null) | ||
{ | ||
$this->body = $requestBody; | ||
} | ||
use \AntiPatternInc\Saasus\Sdk\Auth\Runtime\Client\EndpointTrait; | ||
public function getMethod() : string | ||
{ | ||
return 'PATCH'; | ||
} | ||
public function getUri() : string | ||
{ | ||
return '/aws-marketplace/link'; | ||
} | ||
public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null) : array | ||
{ | ||
if ($this->body instanceof \AntiPatternInc\Saasus\Sdk\Auth\Model\LinkAwsMarketplaceParam) { | ||
return array(array('Content-Type' => array('application/json')), $serializer->serialize($this->body, 'json')); | ||
} | ||
return array(array(), null); | ||
} | ||
public function getExtraHeaders() : array | ||
{ | ||
return array('Accept' => array('application/json')); | ||
} | ||
/** | ||
* {@inheritdoc} | ||
* | ||
* @throws \AntiPatternInc\Saasus\Sdk\Auth\Exception\LinkAwsMarketplaceInternalServerErrorException | ||
* | ||
* @return null | ||
*/ | ||
protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) | ||
{ | ||
if (200 === $status) { | ||
return null; | ||
} | ||
if (is_null($contentType) === false && (500 === $status && mb_strpos($contentType, 'application/json') !== false)) { | ||
throw new \AntiPatternInc\Saasus\Sdk\Auth\Exception\LinkAwsMarketplaceInternalServerErrorException($serializer->deserialize($body, 'AntiPatternInc\\Saasus\\Sdk\\Auth\\Model\\Error', 'json')); | ||
} | ||
} | ||
public function getAuthenticationScopes() : array | ||
{ | ||
return array('Bearer'); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
<?php | ||
|
||
namespace AntiPatternInc\Saasus\Sdk\Auth\Endpoint; | ||
|
||
class SignUpWithAwsMarketplace extends \AntiPatternInc\Saasus\Sdk\Auth\Runtime\Client\BaseEndpoint implements \AntiPatternInc\Saasus\Sdk\Auth\Runtime\Client\Endpoint | ||
{ | ||
/** | ||
* AWS Marketplaceと連携したユーザーを新規登録します。登録されたメールアドレスに対して仮パスワードを送信します。 | ||
Registration Tokenが有効でない場合はエラーを返却します。 | ||
Register a new user linked to AWS Marketplace. A temporary password will be sent to the registered email. | ||
If the Registration Token is not valid, an error is returned. | ||
* | ||
* @param null|\AntiPatternInc\Saasus\Sdk\Auth\Model\SignUpWithAwsMarketplaceParam $requestBody | ||
*/ | ||
public function __construct(?\AntiPatternInc\Saasus\Sdk\Auth\Model\SignUpWithAwsMarketplaceParam $requestBody = null) | ||
{ | ||
$this->body = $requestBody; | ||
} | ||
use \AntiPatternInc\Saasus\Sdk\Auth\Runtime\Client\EndpointTrait; | ||
public function getMethod() : string | ||
{ | ||
return 'POST'; | ||
} | ||
public function getUri() : string | ||
{ | ||
return '/aws-marketplace/sign-up'; | ||
} | ||
public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null) : array | ||
{ | ||
if ($this->body instanceof \AntiPatternInc\Saasus\Sdk\Auth\Model\SignUpWithAwsMarketplaceParam) { | ||
return array(array('Content-Type' => array('application/json')), $serializer->serialize($this->body, 'json')); | ||
} | ||
return array(array(), null); | ||
} | ||
public function getExtraHeaders() : array | ||
{ | ||
return array('Accept' => array('application/json')); | ||
} | ||
/** | ||
* {@inheritdoc} | ||
* | ||
* @throws \AntiPatternInc\Saasus\Sdk\Auth\Exception\SignUpWithAwsMarketplaceInternalServerErrorException | ||
* | ||
* @return null|\AntiPatternInc\Saasus\Sdk\Auth\Model\SaasUser | ||
*/ | ||
protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) | ||
{ | ||
if (is_null($contentType) === false && (201 === $status && mb_strpos($contentType, 'application/json') !== false)) { | ||
return $serializer->deserialize($body, 'AntiPatternInc\\Saasus\\Sdk\\Auth\\Model\\SaasUser', 'json'); | ||
} | ||
if (is_null($contentType) === false && (500 === $status && mb_strpos($contentType, 'application/json') !== false)) { | ||
throw new \AntiPatternInc\Saasus\Sdk\Auth\Exception\SignUpWithAwsMarketplaceInternalServerErrorException($serializer->deserialize($body, 'AntiPatternInc\\Saasus\\Sdk\\Auth\\Model\\Error', 'json')); | ||
} | ||
} | ||
public function getAuthenticationScopes() : array | ||
{ | ||
return array('Bearer'); | ||
} | ||
} |
20 changes: 20 additions & 0 deletions
20
generated/Auth/Exception/ConfirmSignUpWithAwsMarketplaceInternalServerErrorException.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<?php | ||
|
||
namespace AntiPatternInc\Saasus\Sdk\Auth\Exception; | ||
|
||
class ConfirmSignUpWithAwsMarketplaceInternalServerErrorException extends InternalServerErrorException | ||
{ | ||
/** | ||
* @var \AntiPatternInc\Saasus\Sdk\Auth\Model\Error | ||
*/ | ||
private $error; | ||
public function __construct(\AntiPatternInc\Saasus\Sdk\Auth\Model\Error $error) | ||
{ | ||
parent::__construct('Internal Server Error'); | ||
$this->error = $error; | ||
} | ||
public function getError() : \AntiPatternInc\Saasus\Sdk\Auth\Model\Error | ||
{ | ||
return $this->error; | ||
} | ||
} |
20 changes: 20 additions & 0 deletions
20
generated/Auth/Exception/DeleteRoleBadRequestException.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<?php | ||
|
||
namespace AntiPatternInc\Saasus\Sdk\Auth\Exception; | ||
|
||
class DeleteRoleBadRequestException extends BadRequestException | ||
{ | ||
/** | ||
* @var \AntiPatternInc\Saasus\Sdk\Auth\Model\Error | ||
*/ | ||
private $error; | ||
public function __construct(\AntiPatternInc\Saasus\Sdk\Auth\Model\Error $error) | ||
{ | ||
parent::__construct('Bad Request'); | ||
$this->error = $error; | ||
} | ||
public function getError() : \AntiPatternInc\Saasus\Sdk\Auth\Model\Error | ||
{ | ||
return $this->error; | ||
} | ||
} |
20 changes: 20 additions & 0 deletions
20
generated/Auth/Exception/LinkAwsMarketplaceInternalServerErrorException.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<?php | ||
|
||
namespace AntiPatternInc\Saasus\Sdk\Auth\Exception; | ||
|
||
class LinkAwsMarketplaceInternalServerErrorException extends InternalServerErrorException | ||
{ | ||
/** | ||
* @var \AntiPatternInc\Saasus\Sdk\Auth\Model\Error | ||
*/ | ||
private $error; | ||
public function __construct(\AntiPatternInc\Saasus\Sdk\Auth\Model\Error $error) | ||
{ | ||
parent::__construct('Internal Server Error'); | ||
$this->error = $error; | ||
} | ||
public function getError() : \AntiPatternInc\Saasus\Sdk\Auth\Model\Error | ||
{ | ||
return $this->error; | ||
} | ||
} |
20 changes: 20 additions & 0 deletions
20
generated/Auth/Exception/SignUpWithAwsMarketplaceInternalServerErrorException.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<?php | ||
|
||
namespace AntiPatternInc\Saasus\Sdk\Auth\Exception; | ||
|
||
class SignUpWithAwsMarketplaceInternalServerErrorException extends InternalServerErrorException | ||
{ | ||
/** | ||
* @var \AntiPatternInc\Saasus\Sdk\Auth\Model\Error | ||
*/ | ||
private $error; | ||
public function __construct(\AntiPatternInc\Saasus\Sdk\Auth\Model\Error $error) | ||
{ | ||
parent::__construct('Internal Server Error'); | ||
$this->error = $error; | ||
} | ||
public function getError() : \AntiPatternInc\Saasus\Sdk\Auth\Model\Error | ||
{ | ||
return $this->error; | ||
} | ||
} |
Oops, something went wrong.