Skip to content

Commit

Permalink
Merge pull request #78 from aziontech/generated-sdk
Browse files Browse the repository at this point in the history
Auto-generated SDK
  • Loading branch information
diegoazion authored Oct 30, 2023
2 parents fea6a55 + e0f28e0 commit e3b4e67
Show file tree
Hide file tree
Showing 18 changed files with 120 additions and 17 deletions.
2 changes: 1 addition & 1 deletion edgefunctions/.openapi-generator/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
6.6.0
7.0.1
2 changes: 1 addition & 1 deletion edgefunctions/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"license": "unlicense",
"authors": [
{
"name": "OpenAPI-Generator contributors",
"name": "OpenAPI",
"homepage": "https://openapi-generator.tech"
}
],
Expand Down
1 change: 1 addition & 0 deletions edgefunctions/docs/Model/CreateEdgeFunctionRequest.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ Name | Type | Description | Notes
**language** | **string** | | [optional]
**code** | **string** | | [optional]
**json_args** | **mixed** | | [optional]
**initiator_type** | **string** | | [optional]
**active** | **bool** | | [optional]
**is_proprietary_code** | **bool** | | [optional]

Expand Down
2 changes: 1 addition & 1 deletion edgefunctions/lib/Api/EdgeFunctionsApi.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
*
* The version of the OpenAPI document: 2.0.0
* Generated by: https://openapi-generator.tech
* OpenAPI Generator version: 6.6.0
* OpenAPI Generator version: 7.0.1
*/

/**
Expand Down
2 changes: 1 addition & 1 deletion edgefunctions/lib/ApiException.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
*
* The version of the OpenAPI document: 2.0.0
* Generated by: https://openapi-generator.tech
* OpenAPI Generator version: 6.6.0
* OpenAPI Generator version: 7.0.1
*/

/**
Expand Down
2 changes: 1 addition & 1 deletion edgefunctions/lib/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
*
* The version of the OpenAPI document: 2.0.0
* Generated by: https://openapi-generator.tech
* OpenAPI Generator version: 6.6.0
* OpenAPI Generator version: 7.0.1
*/

/**
Expand Down
2 changes: 1 addition & 1 deletion edgefunctions/lib/HeaderSelector.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
*
* The version of the OpenAPI document: 2.0.0
* Generated by: https://openapi-generator.tech
* OpenAPI Generator version: 6.6.0
* OpenAPI Generator version: 7.0.1
*/

/**
Expand Down
2 changes: 1 addition & 1 deletion edgefunctions/lib/Model/BadRequestResponse.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
*
* The version of the OpenAPI document: 2.0.0
* Generated by: https://openapi-generator.tech
* OpenAPI Generator version: 6.6.0
* OpenAPI Generator version: 7.0.1
*/

/**
Expand Down
70 changes: 69 additions & 1 deletion edgefunctions/lib/Model/CreateEdgeFunctionRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
*
* The version of the OpenAPI document: 2.0.0
* Generated by: https://openapi-generator.tech
* OpenAPI Generator version: 6.6.0
* OpenAPI Generator version: 7.0.1
*/

/**
Expand Down Expand Up @@ -61,6 +61,7 @@ class CreateEdgeFunctionRequest implements ModelInterface, ArrayAccess, \JsonSer
'language' => 'string',
'code' => 'string',
'json_args' => 'mixed',
'initiator_type' => 'string',
'active' => 'bool',
'is_proprietary_code' => 'bool'
];
Expand All @@ -77,6 +78,7 @@ class CreateEdgeFunctionRequest implements ModelInterface, ArrayAccess, \JsonSer
'language' => null,
'code' => null,
'json_args' => null,
'initiator_type' => null,
'active' => null,
'is_proprietary_code' => null
];
Expand All @@ -91,6 +93,7 @@ class CreateEdgeFunctionRequest implements ModelInterface, ArrayAccess, \JsonSer
'language' => false,
'code' => false,
'json_args' => true,
'initiator_type' => false,
'active' => false,
'is_proprietary_code' => false
];
Expand Down Expand Up @@ -185,6 +188,7 @@ public function isNullableSetToNull(string $property): bool
'language' => 'language',
'code' => 'code',
'json_args' => 'json_args',
'initiator_type' => 'initiator_type',
'active' => 'active',
'is_proprietary_code' => 'is_proprietary_code'
];
Expand All @@ -199,6 +203,7 @@ public function isNullableSetToNull(string $property): bool
'language' => 'setLanguage',
'code' => 'setCode',
'json_args' => 'setJsonArgs',
'initiator_type' => 'setInitiatorType',
'active' => 'setActive',
'is_proprietary_code' => 'setIsProprietaryCode'
];
Expand All @@ -213,6 +218,7 @@ public function isNullableSetToNull(string $property): bool
'language' => 'getLanguage',
'code' => 'getCode',
'json_args' => 'getJsonArgs',
'initiator_type' => 'getInitiatorType',
'active' => 'getActive',
'is_proprietary_code' => 'getIsProprietaryCode'
];
Expand Down Expand Up @@ -258,6 +264,21 @@ public function getModelName()
return self::$openAPIModelName;
}

public const INITIATOR_TYPE_APPLICATION = 'edge_application';
public const INITIATOR_TYPE_FIREWALL = 'edge_firewall';

/**
* Gets allowable values of the enum
*
* @return string[]
*/
public function getInitiatorTypeAllowableValues()
{
return [
self::INITIATOR_TYPE_APPLICATION,
self::INITIATOR_TYPE_FIREWALL,
];
}

/**
* Associative array for storing property values
Expand All @@ -278,6 +299,7 @@ public function __construct(array $data = null)
$this->setIfExists('language', $data ?? [], null);
$this->setIfExists('code', $data ?? [], null);
$this->setIfExists('json_args', $data ?? [], null);
$this->setIfExists('initiator_type', $data ?? [], null);
$this->setIfExists('active', $data ?? [], null);
$this->setIfExists('is_proprietary_code', $data ?? [], null);
}
Expand Down Expand Up @@ -309,6 +331,15 @@ public function listInvalidProperties()
{
$invalidProperties = [];

$allowedValues = $this->getInitiatorTypeAllowableValues();
if (!is_null($this->container['initiator_type']) && !in_array($this->container['initiator_type'], $allowedValues, true)) {
$invalidProperties[] = sprintf(
"invalid value '%s' for 'initiator_type', must be one of '%s'",
$this->container['initiator_type'],
implode("', '", $allowedValues)
);
}

return $invalidProperties;
}

Expand Down Expand Up @@ -439,6 +470,43 @@ public function setJsonArgs($json_args)
return $this;
}

/**
* Gets initiator_type
*
* @return string|null
*/
public function getInitiatorType()
{
return $this->container['initiator_type'];
}

/**
* Sets initiator_type
*
* @param string|null $initiator_type initiator_type
*
* @return self
*/
public function setInitiatorType($initiator_type)
{
if (is_null($initiator_type)) {
throw new \InvalidArgumentException('non-nullable initiator_type cannot be null');
}
$allowedValues = $this->getInitiatorTypeAllowableValues();
if (!in_array($initiator_type, $allowedValues, true)) {
throw new \InvalidArgumentException(
sprintf(
"Invalid value '%s' for 'initiator_type', must be one of '%s'",
$initiator_type,
implode("', '", $allowedValues)
)
);
}
$this->container['initiator_type'] = $initiator_type;

return $this;
}

/**
* Gets active
*
Expand Down
2 changes: 1 addition & 1 deletion edgefunctions/lib/Model/EdgeFunctionResponse.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
*
* The version of the OpenAPI document: 2.0.0
* Generated by: https://openapi-generator.tech
* OpenAPI Generator version: 6.6.0
* OpenAPI Generator version: 7.0.1
*/

/**
Expand Down
2 changes: 1 addition & 1 deletion edgefunctions/lib/Model/ErrorResponse.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
*
* The version of the OpenAPI document: 2.0.0
* Generated by: https://openapi-generator.tech
* OpenAPI Generator version: 6.6.0
* OpenAPI Generator version: 7.0.1
*/

/**
Expand Down
2 changes: 1 addition & 1 deletion edgefunctions/lib/Model/Links.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
*
* The version of the OpenAPI document: 2.0.0
* Generated by: https://openapi-generator.tech
* OpenAPI Generator version: 6.6.0
* OpenAPI Generator version: 7.0.1
*/

/**
Expand Down
2 changes: 1 addition & 1 deletion edgefunctions/lib/Model/ListEdgeFunctionResponse.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
*
* The version of the OpenAPI document: 2.0.0
* Generated by: https://openapi-generator.tech
* OpenAPI Generator version: 6.6.0
* OpenAPI Generator version: 7.0.1
*/

/**
Expand Down
2 changes: 1 addition & 1 deletion edgefunctions/lib/Model/ModelInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
*
* The version of the OpenAPI document: 2.0.0
* Generated by: https://openapi-generator.tech
* OpenAPI Generator version: 6.6.0
* OpenAPI Generator version: 7.0.1
*/

/**
Expand Down
2 changes: 1 addition & 1 deletion edgefunctions/lib/Model/PatchEdgeFunctionRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
*
* The version of the OpenAPI document: 2.0.0
* Generated by: https://openapi-generator.tech
* OpenAPI Generator version: 6.6.0
* OpenAPI Generator version: 7.0.1
*/

/**
Expand Down
36 changes: 35 additions & 1 deletion edgefunctions/lib/Model/PutEdgeFunctionRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
*
* The version of the OpenAPI document: 2.0.0
* Generated by: https://openapi-generator.tech
* OpenAPI Generator version: 6.6.0
* OpenAPI Generator version: 7.0.1
*/

/**
Expand Down Expand Up @@ -264,6 +264,21 @@ public function getModelName()
return self::$openAPIModelName;
}

public const INITIATOR_TYPE_APPLICATION = 'edge_application';
public const INITIATOR_TYPE_FIREWALL = 'edge_firewall';

/**
* Gets allowable values of the enum
*
* @return string[]
*/
public function getInitiatorTypeAllowableValues()
{
return [
self::INITIATOR_TYPE_APPLICATION,
self::INITIATOR_TYPE_FIREWALL,
];
}

/**
* Associative array for storing property values
Expand Down Expand Up @@ -316,6 +331,15 @@ public function listInvalidProperties()
{
$invalidProperties = [];

$allowedValues = $this->getInitiatorTypeAllowableValues();
if (!is_null($this->container['initiator_type']) && !in_array($this->container['initiator_type'], $allowedValues, true)) {
$invalidProperties[] = sprintf(
"invalid value '%s' for 'initiator_type', must be one of '%s'",
$this->container['initiator_type'],
implode("', '", $allowedValues)
);
}

return $invalidProperties;
}

Expand Down Expand Up @@ -468,6 +492,16 @@ public function setInitiatorType($initiator_type)
if (is_null($initiator_type)) {
throw new \InvalidArgumentException('non-nullable initiator_type cannot be null');
}
$allowedValues = $this->getInitiatorTypeAllowableValues();
if (!in_array($initiator_type, $allowedValues, true)) {
throw new \InvalidArgumentException(
sprintf(
"Invalid value '%s' for 'initiator_type', must be one of '%s'",
$initiator_type,
implode("', '", $allowedValues)
)
);
}
$this->container['initiator_type'] = $initiator_type;

return $this;
Expand Down
2 changes: 1 addition & 1 deletion edgefunctions/lib/Model/Results.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
*
* The version of the OpenAPI document: 2.0.0
* Generated by: https://openapi-generator.tech
* OpenAPI Generator version: 6.6.0
* OpenAPI Generator version: 7.0.1
*/

/**
Expand Down
2 changes: 1 addition & 1 deletion edgefunctions/lib/ObjectSerializer.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
*
* The version of the OpenAPI document: 2.0.0
* Generated by: https://openapi-generator.tech
* OpenAPI Generator version: 6.6.0
* OpenAPI Generator version: 7.0.1
*/

/**
Expand Down

0 comments on commit e3b4e67

Please sign in to comment.