diff --git a/wscli-php-sdk/swagger-php-sdk/SwaggerClient-php/README.md b/wscli-php-sdk/swagger-php-sdk/SwaggerClient-php/README.md index 8ee4b8f..5a6b0ee 100644 --- a/wscli-php-sdk/swagger-php-sdk/SwaggerClient-php/README.md +++ b/wscli-php-sdk/swagger-php-sdk/SwaggerClient-php/README.md @@ -104,6 +104,7 @@ Class | Method | HTTP request | Description ## Documentation For Models + - [CertDescription](docs/Model/CertDescription.md) - [CertsAndKeys](docs/Model/CertsAndKeys.md) - [DeleteKeyReq](docs/Model/DeleteKeyReq.md) - [DeleteKeyResp](docs/Model/DeleteKeyResp.md) diff --git a/wscli-php-sdk/swagger-php-sdk/SwaggerClient-php/docs/Model/CertDescription.md b/wscli-php-sdk/swagger-php-sdk/SwaggerClient-php/docs/Model/CertDescription.md new file mode 100644 index 0000000..10bc00e --- /dev/null +++ b/wscli-php-sdk/swagger-php-sdk/SwaggerClient-php/docs/Model/CertDescription.md @@ -0,0 +1,15 @@ +# CertDescription + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**cert_name** | **string** | | +**expires** | **string** | | +**issuer** | **string** | | +**pem** | **string** | | +**serial** | **string** | | +**subject** | **string** | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/wscli-php-sdk/swagger-php-sdk/SwaggerClient-php/docs/Model/ListCertsResp.md b/wscli-php-sdk/swagger-php-sdk/SwaggerClient-php/docs/Model/ListCertsResp.md index 27db158..40bcf77 100644 --- a/wscli-php-sdk/swagger-php-sdk/SwaggerClient-php/docs/Model/ListCertsResp.md +++ b/wscli-php-sdk/swagger-php-sdk/SwaggerClient-php/docs/Model/ListCertsResp.md @@ -3,7 +3,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**certs** | **string[]** | | +**certs** | [**\Swagger\Client\Model\CertDescription[]**](CertDescription.md) | | **response_code** | **string** | | **response_text** | **string** | | diff --git a/wscli-php-sdk/swagger-php-sdk/SwaggerClient-php/lib/Model/CertDescription.php b/wscli-php-sdk/swagger-php-sdk/SwaggerClient-php/lib/Model/CertDescription.php new file mode 100644 index 0000000..b98c1af --- /dev/null +++ b/wscli-php-sdk/swagger-php-sdk/SwaggerClient-php/lib/Model/CertDescription.php @@ -0,0 +1,395 @@ + 'string', + 'expires' => 'string', + 'issuer' => 'string', + 'pem' => 'string', + 'serial' => 'string', + 'subject' => 'string' + ]; + + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of attributes where the key is the local name, and the value is the original name + * @var string[] + */ + protected static $attributeMap = [ + 'cert_name' => 'CertName', + 'expires' => 'Expires', + 'issuer' => 'Issuer', + 'pem' => 'PEM', + 'serial' => 'Serial', + 'subject' => 'Subject' + ]; + + + /** + * Array of attributes to setter functions (for deserialization of responses) + * @var string[] + */ + protected static $setters = [ + 'cert_name' => 'setCertName', + 'expires' => 'setExpires', + 'issuer' => 'setIssuer', + 'pem' => 'setPem', + 'serial' => 'setSerial', + 'subject' => 'setSubject' + ]; + + + /** + * Array of attributes to getter functions (for serialization of requests) + * @var string[] + */ + protected static $getters = [ + 'cert_name' => 'getCertName', + 'expires' => 'getExpires', + 'issuer' => 'getIssuer', + 'pem' => 'getPem', + 'serial' => 'getSerial', + 'subject' => 'getSubject' + ]; + + public static function attributeMap() + { + return self::$attributeMap; + } + + public static function setters() + { + return self::$setters; + } + + public static function getters() + { + return self::$getters; + } + + + + + + /** + * Associative array for storing property values + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * @param mixed[] $data Associated array of property values initializing the model + */ + public function __construct(array $data = null) + { + $this->container['cert_name'] = isset($data['cert_name']) ? $data['cert_name'] : null; + $this->container['expires'] = isset($data['expires']) ? $data['expires'] : null; + $this->container['issuer'] = isset($data['issuer']) ? $data['issuer'] : null; + $this->container['pem'] = isset($data['pem']) ? $data['pem'] : null; + $this->container['serial'] = isset($data['serial']) ? $data['serial'] : null; + $this->container['subject'] = isset($data['subject']) ? $data['subject'] : null; + } + + /** + * show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalid_properties = []; + + if ($this->container['cert_name'] === null) { + $invalid_properties[] = "'cert_name' can't be null"; + } + if ($this->container['expires'] === null) { + $invalid_properties[] = "'expires' can't be null"; + } + if ($this->container['issuer'] === null) { + $invalid_properties[] = "'issuer' can't be null"; + } + if ($this->container['pem'] === null) { + $invalid_properties[] = "'pem' can't be null"; + } + if ($this->container['serial'] === null) { + $invalid_properties[] = "'serial' can't be null"; + } + if ($this->container['subject'] === null) { + $invalid_properties[] = "'subject' can't be null"; + } + return $invalid_properties; + } + + /** + * validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + + if ($this->container['cert_name'] === null) { + return false; + } + if ($this->container['expires'] === null) { + return false; + } + if ($this->container['issuer'] === null) { + return false; + } + if ($this->container['pem'] === null) { + return false; + } + if ($this->container['serial'] === null) { + return false; + } + if ($this->container['subject'] === null) { + return false; + } + return true; + } + + + /** + * Gets cert_name + * @return string + */ + public function getCertName() + { + return $this->container['cert_name']; + } + + /** + * Sets cert_name + * @param string $cert_name + * @return $this + */ + public function setCertName($cert_name) + { + $this->container['cert_name'] = $cert_name; + + return $this; + } + + /** + * Gets expires + * @return string + */ + public function getExpires() + { + return $this->container['expires']; + } + + /** + * Sets expires + * @param string $expires + * @return $this + */ + public function setExpires($expires) + { + $this->container['expires'] = $expires; + + return $this; + } + + /** + * Gets issuer + * @return string + */ + public function getIssuer() + { + return $this->container['issuer']; + } + + /** + * Sets issuer + * @param string $issuer + * @return $this + */ + public function setIssuer($issuer) + { + $this->container['issuer'] = $issuer; + + return $this; + } + + /** + * Gets pem + * @return string + */ + public function getPem() + { + return $this->container['pem']; + } + + /** + * Sets pem + * @param string $pem + * @return $this + */ + public function setPem($pem) + { + $this->container['pem'] = $pem; + + return $this; + } + + /** + * Gets serial + * @return string + */ + public function getSerial() + { + return $this->container['serial']; + } + + /** + * Sets serial + * @param string $serial + * @return $this + */ + public function setSerial($serial) + { + $this->container['serial'] = $serial; + + return $this; + } + + /** + * Gets subject + * @return string + */ + public function getSubject() + { + return $this->container['subject']; + } + + /** + * Sets subject + * @param string $subject + * @return $this + */ + public function setSubject($subject) + { + $this->container['subject'] = $subject; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * @param integer $offset Offset + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * @param integer $offset Offset + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * @param integer $offset Offset + * @param mixed $value Value to be set + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * @param integer $offset Offset + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\Swagger\Client\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\Swagger\Client\ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/wscli-php-sdk/swagger-php-sdk/SwaggerClient-php/lib/Model/ListCertsResp.php b/wscli-php-sdk/swagger-php-sdk/SwaggerClient-php/lib/Model/ListCertsResp.php index 5f48804..76b02f1 100644 --- a/wscli-php-sdk/swagger-php-sdk/SwaggerClient-php/lib/Model/ListCertsResp.php +++ b/wscli-php-sdk/swagger-php-sdk/SwaggerClient-php/lib/Model/ListCertsResp.php @@ -54,7 +54,7 @@ class ListCertsResp implements ArrayAccess * @var string[] */ protected static $swaggerTypes = [ - 'certs' => 'string[]', + 'certs' => '\Swagger\Client\Model\CertDescription[]', 'response_code' => 'string', 'response_text' => 'string' ]; @@ -177,7 +177,7 @@ public function valid() /** * Gets certs - * @return string[] + * @return \Swagger\Client\Model\CertDescription[] */ public function getCerts() { @@ -186,7 +186,7 @@ public function getCerts() /** * Sets certs - * @param string[] $certs + * @param \Swagger\Client\Model\CertDescription[] $certs * @return $this */ public function setCerts($certs) diff --git a/wscli-php-sdk/swagger-php-sdk/SwaggerClient-php/test/Model/CertDescriptionTest.php b/wscli-php-sdk/swagger-php-sdk/SwaggerClient-php/test/Model/CertDescriptionTest.php new file mode 100644 index 0000000..c25f0a5 --- /dev/null +++ b/wscli-php-sdk/swagger-php-sdk/SwaggerClient-php/test/Model/CertDescriptionTest.php @@ -0,0 +1,133 @@ +