-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
303 additions
and
3 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,300 @@ | ||
<?php | ||
/** | ||
* InviteStatement | ||
* | ||
* @category Class | ||
* | ||
* @author Authress Developers | ||
* | ||
* @link https://authress.io/app/#/api | ||
*/ | ||
|
||
namespace AuthressSdk\Model; | ||
|
||
use ArrayAccess; | ||
use AuthressSdk\ObjectSerializer; | ||
|
||
/** | ||
* InviteStatement Class Doc Comment | ||
* | ||
* @category Class | ||
* | ||
* @author Authress Developers | ||
* | ||
* @link https://authress.io/app/#/api | ||
*/ | ||
class InviteStatement implements ModelInterface, ArrayAccess | ||
{ | ||
public const DISCRIMINATOR = null; | ||
|
||
/** | ||
* The original name of the model. | ||
* | ||
* @var string | ||
*/ | ||
protected static $swaggerModelName = 'InviteStatement'; | ||
|
||
/** | ||
* Array of property to type mappings. Used for (de)serialization | ||
* | ||
* @var string[] | ||
*/ | ||
protected static $swaggerTypes = [ | ||
'roles' => 'string[]', | ||
'resources' => '\AuthressSdk\Model\V1recordsResources[]' | ||
]; | ||
|
||
/** | ||
* Array of property to format mappings. Used for (de)serialization | ||
* | ||
* @var string[] | ||
*/ | ||
protected static $swaggerFormats = [ | ||
'roles' => null, | ||
'resources' => null | ||
]; | ||
/** | ||
* Array of attributes where the key is the local name, | ||
* and the value is the original name | ||
* | ||
* @var string[] | ||
*/ | ||
protected static $attributeMap = [ | ||
'roles' => 'roles', | ||
'resources' => 'resources' | ||
]; | ||
/** | ||
* Array of attributes to setter functions (for deserialization of responses) | ||
* | ||
* @var string[] | ||
*/ | ||
protected static $setters = [ | ||
'roles' => 'setRoles', | ||
'resources' => 'setResources' | ||
]; | ||
/** | ||
* Array of attributes to getter functions (for serialization of requests) | ||
* | ||
* @var string[] | ||
*/ | ||
protected static $getters = [ | ||
'roles' => 'getRoles', | ||
'resources' => 'getResources' | ||
]; | ||
/** | ||
* Associative array for storing property values | ||
* | ||
* @var array | ||
*/ | ||
protected $container = []; | ||
|
||
/** | ||
* Constructor | ||
* | ||
* @param array $data Associated array of property values | ||
* initializing the model | ||
*/ | ||
public function __construct(array $data = null) | ||
{ | ||
$this->container['roles'] = $data['roles'] ?? null; | ||
$this->container['resources'] = $data['resources'] ?? null; | ||
} | ||
|
||
/** | ||
* Array of property to type mappings. Used for (de)serialization | ||
* | ||
* @return array | ||
*/ | ||
public static function swaggerTypes() | ||
{ | ||
return self::$swaggerTypes; | ||
} | ||
|
||
/** | ||
* Array of property to format mappings. Used for (de)serialization | ||
* | ||
* @return array | ||
*/ | ||
public static function swaggerFormats() | ||
{ | ||
return self::$swaggerFormats; | ||
} | ||
|
||
/** | ||
* Array of attributes where the key is the local name, | ||
* and the value is the original name | ||
* | ||
* @return array | ||
*/ | ||
public static function attributeMap() | ||
{ | ||
return self::$attributeMap; | ||
} | ||
|
||
/** | ||
* Array of attributes to setter functions (for deserialization of responses) | ||
* | ||
* @return array | ||
*/ | ||
public static function setters() | ||
{ | ||
return self::$setters; | ||
} | ||
|
||
/** | ||
* Array of attributes to getter functions (for serialization of requests) | ||
* | ||
* @return array | ||
*/ | ||
public static function getters() | ||
{ | ||
return self::$getters; | ||
} | ||
|
||
/** | ||
* Validate all the properties in the model | ||
* return true if all passed | ||
* | ||
* @return bool True if all properties are valid | ||
*/ | ||
public function valid() | ||
{ | ||
return count($this->listInvalidProperties()) === 0; | ||
} | ||
|
||
/** | ||
* Show all the invalid properties with reasons. | ||
* | ||
* @return array invalid properties with reasons | ||
*/ | ||
public function listInvalidProperties() | ||
{ | ||
$invalidProperties = []; | ||
|
||
if ($this->container['roles'] === null) { | ||
$invalidProperties[] = "'roles' can't be null"; | ||
} | ||
if ($this->container['resources'] === null) { | ||
$invalidProperties[] = "'resources' can't be null"; | ||
} | ||
return $invalidProperties; | ||
} | ||
|
||
/** | ||
* Gets roles | ||
* | ||
* @return string[] | ||
*/ | ||
public function getRoles() | ||
{ | ||
return $this->container['roles']; | ||
} | ||
|
||
/** | ||
* Sets roles | ||
* | ||
* @param string[] $roles roles | ||
* | ||
* @return $this | ||
*/ | ||
public function setRoles($roles) | ||
{ | ||
$this->container['roles'] = $roles; | ||
|
||
return $this; | ||
} | ||
|
||
/** | ||
* Gets resources | ||
* | ||
* @return \AuthressSdk\Model\V1recordsResources[] | ||
*/ | ||
public function getResources() | ||
{ | ||
return $this->container['resources']; | ||
} | ||
|
||
/** | ||
* Sets resources | ||
* | ||
* @param \AuthressSdk\Model\V1recordsResources[] $resources resources | ||
* | ||
* @return $this | ||
*/ | ||
public function setResources($resources) | ||
{ | ||
$this->container['resources'] = $resources; | ||
|
||
return $this; | ||
} | ||
|
||
/** | ||
* Returns true if offset exists. False otherwise. | ||
* | ||
* @param int $offset Offset | ||
* | ||
* @return bool | ||
*/ | ||
public function offsetExists($offset) | ||
{ | ||
return isset($this->container[$offset]); | ||
} | ||
|
||
/** | ||
* Gets offset. | ||
* | ||
* @param int $offset Offset | ||
* | ||
* @return mixed | ||
*/ | ||
public function offsetGet($offset) | ||
{ | ||
return $this->container[$offset] ?? null; | ||
} | ||
|
||
/** | ||
* Sets value based on offset. | ||
* | ||
* @param int $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 int $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( | ||
ObjectSerializer::sanitizeForSerialization($this), | ||
\JSON_PRETTY_PRINT | ||
); | ||
} | ||
|
||
return json_encode(ObjectSerializer::sanitizeForSerialization($this)); | ||
} | ||
} |