diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 9b537057b..430641e5f 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -14,7 +14,11 @@ // Set *default* container specific settings.json values on container create. "settings": {}, // Add the IDs of extensions you want installed when the container is created. - "extensions": ["ms-dotnettools.csharp", "eamodio.gitlens"], + "extensions": [ + "ms-dotnettools.csharp", + "eamodio.gitlens", + "ms-python.python" + ], // Use 'forwardPorts' to make a list of ports inside the container available locally. // "forwardPorts": [5000, 5001], // [Optional] To reuse of your local HTTPS dev cert: diff --git a/.openapi-docs/openapi_inheritance.json b/.openapi-docs/openapi_inheritance.json index 7b6a89b13..8f0e77fba 100644 --- a/.openapi-docs/openapi_inheritance.json +++ b/.openapi-docs/openapi_inheritance.json @@ -3,7 +3,7 @@ "info": { "title": "pollination-server", "description": "Pollination Server OpenAPI Definition", - "version": "0.14.0", + "version": "0.23.0", "contact": { "name": "PollinationSolutions", "url": "https://pollination.cloud", @@ -159,6 +159,168 @@ } } }, + "/accounts/check/{name}": { + "get": { + "tags": [ + "Accounts" + ], + "summary": "Check if an account with this name exists", + "description": "Check if an account name is taken", + "operationId": "check_account_name", + "parameters": [ + { + "required": true, + "schema": { + "title": "Name", + "type": "string" + }, + "name": "name", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": {} + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/accounts/{name}/quotas": { + "get": { + "tags": [ + "Accounts" + ], + "summary": "List Quotas", + "operationId": "list_quotas", + "parameters": [ + { + "required": true, + "schema": { + "title": "Name", + "type": "string" + }, + "name": "name", + "in": "path" + }, + { + "description": "The types of quotas to get", + "required": false, + "schema": { + "title": "Quota type", + "type": "array", + "items": { + "$ref": "#/components/schemas/QuotaType" + }, + "description": "The types of quotas to get" + }, + "name": "type", + "in": "query" + }, + { + "description": "Whether to return only quotas which are exhausted", + "required": false, + "schema": { + "title": "Is exhausted", + "type": "boolean", + "description": "Whether to return only quotas which are exhausted" + }, + "name": "exhausted", + "in": "query" + }, + { + "description": "Whether to return only quotas which are enforced", + "required": false, + "schema": { + "title": "Is enforced", + "type": "boolean", + "description": "Whether to return only quotas which are enforced" + }, + "name": "enforced", + "in": "query" + }, + { + "description": "Page number starting from 1", + "required": false, + "schema": { + "title": "Page number", + "minimum": 1.0, + "type": "integer", + "description": "Page number starting from 1", + "default": 1 + }, + "name": "page", + "in": "query" + }, + { + "description": "Number of items per page", + "required": false, + "schema": { + "title": "Items per page", + "maximum": 100.0, + "type": "integer", + "description": "Number of items per page", + "default": 25 + }, + "name": "per-page", + "in": "query" + } + ], + "responses": { + "200": { + "description": "Retrieved", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/QuotaList" + } + } + } + }, + "403": { + "description": "Access forbidden" + }, + "500": { + "description": "Server error" + }, + "400": { + "description": "Invalid request" + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "JWTAuth": [] + }, + { + "APIKeyAuth": [] + } + ] + } + }, "/tokens": { "get": { "tags": [ @@ -661,7 +823,8 @@ } } } - } + }, + "deprecated": true } }, "/users/{name}": { @@ -707,94 +870,37 @@ } } }, - "/orgs": { + "/licenses/pools": { "get": { "tags": [ - "Orgs" + "Licenses" ], - "summary": "List Orgs", - "description": "search for orgs using query parameters", - "operationId": "list_orgs", + "summary": "Get Available Pools", + "description": "Get license pools available to authenticated user", + "operationId": "get_available_pools", "parameters": [ { - "description": "You know, for search", - "required": false, - "schema": { - "title": "Search query", - "type": "array", - "items": { - "type": "string" - }, - "description": "You know, for search", - "default": [] - }, - "name": "search", - "in": "query" - }, - { - "description": "The account name", - "required": false, - "schema": { - "title": "Account Name", - "type": "array", - "items": { - "type": "string" - }, - "description": "The account name", - "default": [] - }, - "name": "name", - "in": "query" - }, - { - "description": "The username of a user", + "description": "Owner of the project", "required": false, "schema": { - "title": "Member username", + "title": "Repository Owner", "type": "array", "items": { "type": "string" }, - "description": "The username of a user", - "default": [] - }, - "name": "member", - "in": "query" - }, - { - "description": "Page number starting from 1", - "required": false, - "schema": { - "title": "Page number", - "minimum": 1.0, - "type": "integer", - "description": "Page number starting from 1", - "default": 1 - }, - "name": "page", - "in": "query" - }, - { - "description": "Number of items per page", - "required": false, - "schema": { - "title": "Items per page", - "maximum": 100.0, - "type": "integer", - "description": "Number of items per page", - "default": 25 + "description": "Owner of the project" }, - "name": "per-page", + "name": "owner", "in": "query" } ], "responses": { "200": { - "description": "Retrieved", + "description": "Successful Response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/OrganizationList" + "$ref": "#/components/schemas/LicensePoolList" } } } @@ -818,47 +924,47 @@ "APIKeyAuth": [] } ] - }, - "post": { + } + }, + "/licenses/pools/{pool_id}": { + "put": { "tags": [ - "Orgs" + "Licenses" + ], + "summary": "Update Pool", + "description": "Update the license pool", + "operationId": "update_license_pool", + "parameters": [ + { + "required": true, + "schema": { + "title": "Pool Id", + "type": "string", + "format": "uuid" + }, + "name": "pool_id", + "in": "path" + } ], - "summary": "Create an Org", - "description": "Create a new org.", - "operationId": "create_org", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/OrganizationCreate" + "$ref": "#/components/schemas/LicensePoolUpdate" } } }, "required": true }, "responses": { - "201": { - "description": "Success", + "200": { + "description": "Successful Response", "content": { "application/json": { - "schema": { - "$ref": "#/components/schemas/CreatedContent" - } + "schema": {} } } }, - "403": { - "description": "Access forbidden" - }, - "500": { - "description": "Server error" - }, - "400": { - "description": "Invalid request" - }, - "202": { - "description": "Accepted" - }, "422": { "description": "Validation Error", "content": { @@ -880,48 +986,35 @@ ] } }, - "/orgs/{name}": { - "get": { + "/licenses/pools/{pool_id}/regenerate": { + "post": { "tags": [ - "Orgs" + "Licenses" ], - "summary": "Get an Org", - "description": "Retrieve a org by name", - "operationId": "get_org", + "summary": "Regenerate", + "description": "Regenerate the license associated with the pool", + "operationId": "regenerate_license_pool", "parameters": [ { "required": true, "schema": { - "title": "Name", - "type": "string" + "title": "Pool Id", + "type": "string", + "format": "uuid" }, - "name": "name", + "name": "pool_id", "in": "path" } ], "responses": { "200": { - "description": "Retrieved", + "description": "Successful Response", "content": { "application/json": { - "schema": { - "$ref": "#/components/schemas/Organization" - } + "schema": {} } } }, - "403": { - "description": "Access forbidden" - }, - "500": { - "description": "Server error" - }, - "400": { - "description": "Invalid request" - }, - "404": { - "description": "Not found" - }, "422": { "description": "Validation Error", "content": { @@ -941,22 +1034,25 @@ "APIKeyAuth": [] } ] - }, - "put": { + } + }, + "/licenses/pools/{pool_id}/permissions": { + "delete": { "tags": [ - "Orgs" + "Licenses" ], - "summary": "Update an Org", - "description": "Update a org (must have org `owner` role)", - "operationId": "update_org", + "summary": "Delete Pool Access", + "description": "Revoke access to the license pool", + "operationId": "revoke_access_to_pool", "parameters": [ { "required": true, "schema": { - "title": "Name", - "type": "string" + "title": "Pool Id", + "type": "string", + "format": "uuid" }, - "name": "name", + "name": "pool_id", "in": "path" } ], @@ -964,35 +1060,23 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/OrganizationUpdate" + "$ref": "#/components/schemas/LicensePoolPolicySubjectList" } } }, "required": true }, "responses": { - "202": { - "description": "Accepted", + "200": { + "description": "Successful Response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UpdateAccepted" + "$ref": "#/components/schemas/LicensePoolPublic" } } } }, - "403": { - "description": "Access forbidden" - }, - "500": { - "description": "Server error" - }, - "400": { - "description": "Invalid request" - }, - "404": { - "description": "Not found" - }, "422": { "description": "Validation Error", "content": { @@ -1013,36 +1097,45 @@ } ] }, - "delete": { + "patch": { "tags": [ - "Orgs" + "Licenses" ], - "summary": "Delete an Org", - "description": "Delete a org (must have `admin` permission)", - "operationId": "delete_org", + "summary": "Grant Pool Access", + "description": "Grant access to the license pool", + "operationId": "grant_access_to_pool", "parameters": [ { "required": true, "schema": { - "title": "Name", - "type": "string" + "title": "Pool Id", + "type": "string", + "format": "uuid" }, - "name": "name", + "name": "pool_id", "in": "path" } ], - "responses": { - "204": { - "description": "Accepted" - }, - "403": { - "description": "Access forbidden" - }, - "500": { - "description": "Server error" + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/LicensePoolAccessPolicyList" + } + } }, - "400": { - "description": "Invalid request" + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/LicensePoolPublic" + } + } + } }, "422": { "description": "Validation Error", @@ -1065,32 +1158,33 @@ ] } }, - "/orgs/{name}/members": { + "/licenses/pools/{pool_id}/license": { "get": { "tags": [ - "Orgs" + "Licenses" ], - "summary": "List organization members", - "description": "Retrieve a org's members", - "operationId": "get_org_members", + "summary": "Get Pool License", + "description": "Get the license associated with a pool", + "operationId": "get_pool_license", "parameters": [ { "required": true, "schema": { - "title": "Name", - "type": "string" + "title": "Pool Id", + "type": "string", + "format": "uuid" }, - "name": "name", + "name": "pool_id", "in": "path" } ], "responses": { "200": { - "description": "Retrieved", + "description": "Successful Response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/OrganizationMemberList" + "$ref": "#/components/schemas/LicensePublic" } } } @@ -1105,68 +1199,47 @@ } } } - } + }, + "security": [ + { + "JWTAuth": [] + }, + { + "APIKeyAuth": [] + } + ] } }, - "/orgs/{name}/members/{username}/{role}": { - "patch": { + "/licenses/pools/{pool_id}/activations": { + "get": { "tags": [ - "Orgs" + "Licenses" ], - "summary": "Add or update the role of an Org Member", - "description": "Upsert a member role to the org (must have org `owner` role)", - "operationId": "upsert_org_member", + "summary": "Get Activations", + "description": "Get the activations for the license", + "operationId": "get_license_activations", "parameters": [ { "required": true, "schema": { - "title": "Name", - "type": "string" - }, - "name": "name", - "in": "path" - }, - { - "required": true, - "schema": { - "title": "Username", + "title": "Pool Id", "type": "string" }, - "name": "username", - "in": "path" - }, - { - "required": true, - "schema": { - "$ref": "#/components/schemas/OrganizationRoleEnum" - }, - "name": "role", + "name": "pool_id", "in": "path" } ], "responses": { - "202": { - "description": "Accepted", + "200": { + "description": "Successful Response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UpdateAccepted" + "$ref": "#/components/schemas/ActivationList" } } } }, - "403": { - "description": "Access forbidden" - }, - "500": { - "description": "Server error" - }, - "400": { - "description": "Invalid request" - }, - "404": { - "description": "Not found" - }, "422": { "description": "Validation Error", "content": { @@ -1188,46 +1261,37 @@ ] } }, - "/orgs/{name}/members/{username}": { + "/licenses/pools/{pool_id}/activations/{activation_id}": { "delete": { "tags": [ - "Orgs" + "Licenses" ], - "summary": "Remove an Org member", - "description": "Remove a member from the org (must have org `owner` role)", - "operationId": "delete_org_member", + "summary": "Delete Activation", + "description": "Delete the activation", + "operationId": "delete_activation", "parameters": [ { "required": true, "schema": { - "title": "Name", + "title": "Pool Id", "type": "string" }, - "name": "name", + "name": "pool_id", "in": "path" }, { "required": true, "schema": { - "title": "Username", + "title": "Activation Id", "type": "string" }, - "name": "username", + "name": "activation_id", "in": "path" } ], "responses": { "204": { - "description": "Accepted" - }, - "403": { - "description": "Access forbidden" - }, - "500": { - "description": "Server error" - }, - "400": { - "description": "Invalid request" + "description": "Successful Response" }, "422": { "description": "Validation Error", @@ -1250,24 +1314,15 @@ ] } }, - "/orgs/{org_name}/teams": { + "/orgs": { "get": { "tags": [ - "Teams" + "Orgs" ], - "summary": "List Teams", + "summary": "List Orgs", "description": "search for orgs using query parameters", - "operationId": "list_org_teams", + "operationId": "list_orgs", "parameters": [ - { - "required": true, - "schema": { - "title": "Org Name", - "type": "string" - }, - "name": "org_name", - "in": "path" - }, { "description": "You know, for search", "required": false, @@ -1299,15 +1354,15 @@ "in": "query" }, { - "description": "The ID of a user", + "description": "The username of a user", "required": false, "schema": { - "title": "Member ID", + "title": "Member username", "type": "array", "items": { "type": "string" }, - "description": "The ID of a user", + "description": "The username of a user", "default": [] }, "name": "member", @@ -1346,7 +1401,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/TeamList" + "$ref": "#/components/schemas/OrganizationList" } } } @@ -1361,31 +1416,28 @@ } } } - } + }, + "security": [ + { + "JWTAuth": [] + }, + { + "APIKeyAuth": [] + } + ] }, "post": { "tags": [ - "Teams" - ], - "summary": "Create a Team", - "description": "Create a new team (must be parent org member)", - "operationId": "create_team", - "parameters": [ - { - "required": true, - "schema": { - "title": "Org Name", - "type": "string" - }, - "name": "org_name", - "in": "path" - } + "Orgs" ], + "summary": "Create an Org", + "description": "Create a new org.", + "operationId": "create_org", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/TeamCreate" + "$ref": "#/components/schemas/OrganizationCreate" } } }, @@ -1435,31 +1487,22 @@ ] } }, - "/orgs/{org_name}/teams/{team_slug}": { + "/orgs/{name}": { "get": { "tags": [ - "Teams" + "Orgs" ], - "summary": "Get a Team", - "description": "Retrieve a team by name", - "operationId": "get_team", + "summary": "Get an Org", + "description": "Retrieve a org by name", + "operationId": "get_org", "parameters": [ { "required": true, "schema": { - "title": "Org Name", + "title": "Name", "type": "string" }, - "name": "org_name", - "in": "path" - }, - { - "required": true, - "schema": { - "title": "Team Slug", - "type": "string" - }, - "name": "team_slug", + "name": "name", "in": "path" } ], @@ -1469,7 +1512,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Team" + "$ref": "#/components/schemas/Organization" } } } @@ -1496,32 +1539,31 @@ } } } - } + }, + "security": [ + { + "JWTAuth": [] + }, + { + "APIKeyAuth": [] + } + ] }, "put": { "tags": [ - "Teams" + "Orgs" ], - "summary": "Update a Team", - "description": "Update a team (must have team or org `owner` role)", - "operationId": "update_team", + "summary": "Update an Org", + "description": "Update a org (must have org `owner` role)", + "operationId": "update_org", "parameters": [ { "required": true, "schema": { - "title": "Org Name", - "type": "string" - }, - "name": "org_name", - "in": "path" - }, - { - "required": true, - "schema": { - "title": "Team Slug", + "title": "Name", "type": "string" }, - "name": "team_slug", + "name": "name", "in": "path" } ], @@ -1529,7 +1571,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/TeamUpdate" + "$ref": "#/components/schemas/OrganizationUpdate" } } }, @@ -1580,28 +1622,19 @@ }, "delete": { "tags": [ - "Teams" + "Orgs" ], - "summary": "Delete a Team", - "description": "Delete a team (must have team or org `owner` role)", - "operationId": "delete_team", + "summary": "Delete an Org", + "description": "Delete a org (must have `admin` permission)", + "operationId": "delete_org", "parameters": [ { "required": true, "schema": { - "title": "Org Name", - "type": "string" - }, - "name": "org_name", - "in": "path" - }, - { - "required": true, - "schema": { - "title": "Team Slug", + "title": "Name", "type": "string" }, - "name": "team_slug", + "name": "name", "in": "path" } ], @@ -1639,31 +1672,22 @@ ] } }, - "/orgs/{org_name}/teams/{team_slug}/members": { + "/orgs/{name}/members": { "get": { "tags": [ - "Teams" + "Orgs" ], - "summary": "List team members", - "description": "Retrieve a tean's members", - "operationId": "get_org_team_members", + "summary": "List organization members", + "description": "Retrieve a org's members", + "operationId": "get_org_members", "parameters": [ { "required": true, "schema": { - "title": "Org Name", - "type": "string" - }, - "name": "org_name", - "in": "path" - }, - { - "required": true, - "schema": { - "title": "Team Slug", + "title": "Name", "type": "string" }, - "name": "team_slug", + "name": "name", "in": "path" } ], @@ -1673,7 +1697,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/TeamMemberList" + "$ref": "#/components/schemas/OrganizationMemberList" } } } @@ -1691,31 +1715,22 @@ } } }, - "/orgs/{org_name}/teams/{team_slug}/members/{username}/{role}": { + "/orgs/{name}/members/{username}/{role}": { "patch": { "tags": [ - "Teams" + "Orgs" ], - "summary": "Add or update the role of an Team Member", - "description": "Upsert a member role to the team (must have org or team `owner` role)", - "operationId": "upsert_org_team_member", + "summary": "Add or update the role of an Org Member", + "description": "Upsert a member role to the org (must have org `owner` role)", + "operationId": "upsert_org_member", "parameters": [ { "required": true, "schema": { - "title": "Org Name", - "type": "string" - }, - "name": "org_name", - "in": "path" - }, - { - "required": true, - "schema": { - "title": "Team Slug", + "title": "Name", "type": "string" }, - "name": "team_slug", + "name": "name", "in": "path" }, { @@ -1730,7 +1745,7 @@ { "required": true, "schema": { - "$ref": "#/components/schemas/TeamRoleEnum" + "$ref": "#/components/schemas/OrganizationRoleEnum" }, "name": "role", "in": "path" @@ -1780,31 +1795,22 @@ ] } }, - "/orgs/{org_name}/teams/{team_slug}/members/{username}": { + "/orgs/{name}/members/{username}": { "delete": { "tags": [ - "Teams" + "Orgs" ], - "summary": "Remove a team member", + "summary": "Remove an Org member", "description": "Remove a member from the org (must have org `owner` role)", - "operationId": "delete_org_team_member", + "operationId": "delete_org_member", "parameters": [ { "required": true, "schema": { - "title": "Org Name", - "type": "string" - }, - "name": "org_name", - "in": "path" - }, - { - "required": true, - "schema": { - "title": "Team Slug", + "title": "Name", "type": "string" }, - "name": "team_slug", + "name": "name", "in": "path" }, { @@ -1851,125 +1857,67 @@ ] } }, - "/projects": { + "/orgs/{org_name}/teams": { "get": { "tags": [ - "Projects" + "Teams" ], - "summary": "List Projects", - "operationId": "list_projects", + "summary": "List Teams", + "description": "search for orgs using query parameters", + "operationId": "list_org_teams", "parameters": [ { - "description": "Search string to find projects", - "required": false, - "schema": { - "title": "Search Query", - "type": "string", - "description": "Search string to find projects" - }, - "name": "search", - "in": "query" - }, - { - "description": "The ID of a project to search for", - "required": false, + "required": true, "schema": { - "title": "Project ID", - "type": "array", - "items": { - "type": "string" - }, - "description": "The ID of a project to search for", - "default": [] + "title": "Org Name", + "type": "string" }, - "name": "ids", - "in": "query" + "name": "org_name", + "in": "path" }, { - "description": "The name of the project", + "description": "You know, for search", "required": false, "schema": { - "title": "Project Name", + "title": "Search query", "type": "array", "items": { "type": "string" }, - "description": "The name of the project", + "description": "You know, for search", "default": [] }, - "name": "names", + "name": "search", "in": "query" }, { - "description": "Owner of the project", + "description": "The account name", "required": false, "schema": { - "title": "Project Owner", + "title": "Account Name", "type": "array", "items": { "type": "string" }, - "description": "Owner of the project", + "description": "The account name", "default": [] }, - "name": "owner", - "in": "query" - }, - { - "description": "Boolean check for public/private projects", - "required": false, - "schema": { - "title": "Public Project", - "type": "boolean", - "description": "Boolean check for public/private projects" - }, - "name": "public", + "name": "name", "in": "query" }, { - "description": "Filter by permission on given resource", + "description": "The ID of a user", "required": false, "schema": { - "title": "Permission Name", + "title": "Member ID", "type": "array", "items": { "type": "string" }, - "description": "Filter by permission on given resource", + "description": "The ID of a user", "default": [] }, - "name": "permissions", - "in": "query" - }, - { - "description": "Key to sort the list by", - "required": false, - "schema": { - "title": "Sort By", - "allOf": [ - { - "$ref": "#/components/schemas/ProjectSortKey" - } - ], - "description": "Key to sort the list by" - }, - "name": "sort_by", - "in": "query" - }, - { - "description": "The order to sort the list", - "required": false, - "schema": { - "title": "Sort Order", - "allOf": [ - { - "$ref": "#/components/schemas/SortEnum" - } - ], - "description": "The order to sort the list", - "default": "ascending" - }, - "name": "sort_order", + "name": "member", "in": "query" }, { @@ -2005,20 +1953,11 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ProjectList" + "$ref": "#/components/schemas/TeamList" } } } }, - "403": { - "description": "Access forbidden" - }, - "500": { - "description": "Server error" - }, - "400": { - "description": "Invalid request" - }, "422": { "description": "Validation Error", "content": { @@ -2029,32 +1968,23 @@ } } } - }, - "security": [ - { - "JWTAuth": [] - }, - { - "APIKeyAuth": [] - } - ] - } - }, - "/projects/{owner}": { + } + }, "post": { "tags": [ - "Projects" + "Teams" ], - "summary": "Create a Project", - "operationId": "create_project", + "summary": "Create a Team", + "description": "Create a new team (must be parent org member)", + "operationId": "create_team", "parameters": [ { "required": true, "schema": { - "title": "Owner", + "title": "Org Name", "type": "string" }, - "name": "owner", + "name": "org_name", "in": "path" } ], @@ -2062,7 +1992,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ProjectCreate" + "$ref": "#/components/schemas/TeamCreate" } } }, @@ -2112,30 +2042,31 @@ ] } }, - "/projects/{owner}/{name}": { + "/orgs/{org_name}/teams/{team_slug}": { "get": { "tags": [ - "Projects" + "Teams" ], - "summary": "Get a project", - "operationId": "get_project", + "summary": "Get a Team", + "description": "Retrieve a team by name", + "operationId": "get_team", "parameters": [ { "required": true, "schema": { - "title": "Owner", + "title": "Org Name", "type": "string" }, - "name": "owner", + "name": "org_name", "in": "path" }, { "required": true, "schema": { - "title": "Name", + "title": "Team Slug", "type": "string" }, - "name": "name", + "name": "team_slug", "in": "path" } ], @@ -2145,7 +2076,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Project" + "$ref": "#/components/schemas/Team" } } } @@ -2172,39 +2103,32 @@ } } } - }, - "security": [ - { - "JWTAuth": [] - }, - { - "APIKeyAuth": [] - } - ] + } }, "put": { "tags": [ - "Projects" + "Teams" ], - "summary": "Update a Project", - "operationId": "update", + "summary": "Update a Team", + "description": "Update a team (must have team or org `owner` role)", + "operationId": "update_team", "parameters": [ { "required": true, "schema": { - "title": "Owner", + "title": "Org Name", "type": "string" }, - "name": "owner", + "name": "org_name", "in": "path" }, { "required": true, "schema": { - "title": "Name", + "title": "Team Slug", "type": "string" }, - "name": "name", + "name": "team_slug", "in": "path" } ], @@ -2212,7 +2136,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ProjectUpdate" + "$ref": "#/components/schemas/TeamUpdate" } } }, @@ -2263,27 +2187,28 @@ }, "delete": { "tags": [ - "Projects" + "Teams" ], - "summary": "Delete a Project", - "operationId": "delete_project", + "summary": "Delete a Team", + "description": "Delete a team (must have team or org `owner` role)", + "operationId": "delete_team", "parameters": [ { "required": true, "schema": { - "title": "Owner", + "title": "Org Name", "type": "string" }, - "name": "owner", + "name": "org_name", "in": "path" }, { "required": true, "schema": { - "title": "Name", + "title": "Team Slug", "type": "string" }, - "name": "name", + "name": "team_slug", "in": "path" } ], @@ -2321,94 +2246,110 @@ ] } }, - "/projects/{owner}/{name}/permissions": { + "/orgs/{org_name}/teams/{team_slug}/members": { "get": { "tags": [ - "Projects" + "Teams" ], - "summary": "Get project access permissions", - "operationId": "get_project_access_permissions", + "summary": "List team members", + "description": "Retrieve a tean's members", + "operationId": "get_org_team_members", "parameters": [ { "required": true, "schema": { - "title": "Owner", + "title": "Org Name", "type": "string" }, - "name": "owner", + "name": "org_name", "in": "path" }, { "required": true, "schema": { - "title": "Name", + "title": "Team Slug", "type": "string" }, - "name": "name", + "name": "team_slug", "in": "path" + } + ], + "responses": { + "200": { + "description": "Retrieved", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TeamMemberList" + } + } + } }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/orgs/{org_name}/teams/{team_slug}/members/{username}/{role}": { + "patch": { + "tags": [ + "Teams" + ], + "summary": "Add or update the role of an Team Member", + "description": "Upsert a member role to the team (must have org or team `owner` role)", + "operationId": "upsert_org_team_member", + "parameters": [ { - "description": "Page number starting from 1", - "required": false, + "required": true, "schema": { - "title": "Page number", - "minimum": 1.0, - "type": "integer", - "description": "Page number starting from 1", - "default": 1 + "title": "Org Name", + "type": "string" }, - "name": "page", - "in": "query" + "name": "org_name", + "in": "path" }, { - "description": "Number of items per page", - "required": false, + "required": true, "schema": { - "title": "Items per page", - "maximum": 100.0, - "type": "integer", - "description": "Number of items per page", - "default": 25 + "title": "Team Slug", + "type": "string" }, - "name": "per-page", - "in": "query" + "name": "team_slug", + "in": "path" }, { - "description": "The type of access policy subject", - "required": false, + "required": true, "schema": { - "title": "Subject Type", - "type": "array", - "items": { - "type": "string" - }, - "description": "The type of access policy subject" + "title": "Username", + "type": "string" }, - "name": "subject_type", - "in": "query" + "name": "username", + "in": "path" }, { - "description": "An access policy permission string", - "required": false, + "required": true, "schema": { - "title": "PERMISSION", - "type": "array", - "items": { - "type": "string" - }, - "description": "An access policy permission string" + "$ref": "#/components/schemas/TeamRoleEnum" }, - "name": "permission", - "in": "query" + "name": "role", + "in": "path" } ], "responses": { - "200": { - "description": "Retrieved", + "202": { + "description": "Accepted", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ProjectAccessPolicyList" + "$ref": "#/components/schemas/UpdateAccepted" } } } @@ -2422,6 +2363,9 @@ "400": { "description": "Invalid request" }, + "404": { + "description": "Not found" + }, "422": { "description": "Validation Error", "content": { @@ -2441,43 +2385,45 @@ "APIKeyAuth": [] } ] - }, + } + }, + "/orgs/{org_name}/teams/{team_slug}/members/{username}": { "delete": { "tags": [ - "Projects" + "Teams" ], - "summary": "Remove a Project permissions", - "operationId": "delete_project_org_permission", + "summary": "Remove a team member", + "description": "Remove a member from the org (must have org `owner` role)", + "operationId": "delete_org_team_member", "parameters": [ { "required": true, "schema": { - "title": "Owner", + "title": "Org Name", "type": "string" }, - "name": "owner", + "name": "org_name", "in": "path" }, { "required": true, "schema": { - "title": "Name", + "title": "Team Slug", "type": "string" }, - "name": "name", + "name": "team_slug", + "in": "path" + }, + { + "required": true, + "schema": { + "title": "Username", + "type": "string" + }, + "name": "username", "in": "path" } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProjectPolicySubject" - } - } - }, - "required": true - }, "responses": { "204": { "description": "Accepted" @@ -2510,122 +2456,127 @@ "APIKeyAuth": [] } ] - }, - "patch": { + } + }, + "/projects": { + "get": { "tags": [ "Projects" ], - "summary": "Upsert a new permission to a project", - "operationId": "upsert_project_permission", + "summary": "List Projects", + "operationId": "list_projects", "parameters": [ { - "required": true, + "description": "Search string to find projects", + "required": false, "schema": { - "title": "Owner", - "type": "string" + "title": "Search Query", + "type": "string", + "description": "Search string to find projects" }, - "name": "owner", - "in": "path" + "name": "search", + "in": "query" }, { - "required": true, + "description": "The ID of a project to search for", + "required": false, "schema": { - "title": "Name", - "type": "string" + "title": "Project ID", + "type": "array", + "items": { + "type": "string" + }, + "description": "The ID of a project to search for", + "default": [] }, - "name": "name", - "in": "path" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProjectAccessPolicy" - } - } - }, - "required": true - }, - "responses": { - "202": { - "description": "Accepted", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UpdateAccepted" - } - } - } - }, - "403": { - "description": "Access forbidden" - }, - "500": { - "description": "Server error" - }, - "400": { - "description": "Invalid request" + "name": "ids", + "in": "query" }, - "404": { - "description": "Not found" + { + "description": "The name of the project", + "required": false, + "schema": { + "title": "Project Name", + "type": "array", + "items": { + "type": "string" + }, + "description": "The name of the project", + "default": [] + }, + "name": "names", + "in": "query" }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "security": [ { - "JWTAuth": [] + "description": "Owner of the project", + "required": false, + "schema": { + "title": "Project Owner", + "type": "array", + "items": { + "type": "string" + }, + "description": "Owner of the project", + "default": [] + }, + "name": "owner", + "in": "query" }, { - "APIKeyAuth": [] - } - ] - } - }, - "/projects/{owner}/{name}/recipes": { - "get": { - "tags": [ - "Projects" - ], - "summary": "Get project recipes", - "operationId": "get_project_recipes", - "parameters": [ + "description": "Boolean check for public/private projects", + "required": false, + "schema": { + "title": "Public Project", + "type": "boolean", + "description": "Boolean check for public/private projects" + }, + "name": "public", + "in": "query" + }, { - "required": true, + "description": "Filter by permission on given resource", + "required": false, "schema": { - "title": "Owner", - "type": "string" + "title": "Permission Name", + "type": "array", + "items": { + "type": "string" + }, + "description": "Filter by permission on given resource", + "default": [] }, - "name": "owner", - "in": "path" + "name": "permissions", + "in": "query" }, { - "required": true, + "description": "Key to sort the list by", + "required": false, "schema": { - "title": "Name", - "type": "string" + "title": "Sort By", + "allOf": [ + { + "$ref": "#/components/schemas/ProjectSortKey" + } + ], + "description": "Key to sort the list by" }, - "name": "name", - "in": "path" + "name": "sort_by", + "in": "query" }, { - "description": "Search string to find recipes", + "description": "The order to sort the list", "required": false, "schema": { - "title": "Search Query", - "type": "string", - "description": "Search string to find recipes" + "title": "Sort Order", + "allOf": [ + { + "$ref": "#/components/schemas/SortEnum" + } + ], + "description": "The order to sort the list", + "default": "ascending" }, - "name": "search", + "name": "sort_order", "in": "query" }, { @@ -2661,7 +2612,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/RecipeInterfaceList" + "$ref": "#/components/schemas/ProjectList" } } } @@ -2696,13 +2647,13 @@ ] } }, - "/projects/{owner}/{name}/recipes/filters": { - "get": { + "/projects/{owner}": { + "post": { "tags": [ "Projects" ], - "summary": "Get project recipe filters", - "operationId": "get_project_recipe_filters", + "summary": "Create a Project", + "operationId": "create_project", "parameters": [ { "required": true, @@ -2712,50 +2663,25 @@ }, "name": "owner", "in": "path" - }, - { - "required": true, - "schema": { - "title": "Name", - "type": "string" - }, - "name": "name", - "in": "path" - }, - { - "description": "Page number starting from 1", - "required": false, - "schema": { - "title": "Page number", - "minimum": 1.0, - "type": "integer", - "description": "Page number starting from 1", - "default": 1 - }, - "name": "page", - "in": "query" - }, - { - "description": "Number of items per page", - "required": false, - "schema": { - "title": "Items per page", - "maximum": 100.0, - "type": "integer", - "description": "Number of items per page", - "default": 25 - }, - "name": "per-page", - "in": "query" } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProjectCreate" + } + } + }, + "required": true + }, "responses": { - "200": { - "description": "Retrieved", + "201": { + "description": "Success", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ProjectRecipeFilterList" + "$ref": "#/components/schemas/CreatedContent" } } } @@ -2769,6 +2695,9 @@ "400": { "description": "Invalid request" }, + "202": { + "description": "Accepted" + }, "422": { "description": "Validation Error", "content": { @@ -2788,13 +2717,15 @@ "APIKeyAuth": [] } ] - }, - "post": { + } + }, + "/projects/{owner}/{name}": { + "get": { "tags": [ "Projects" ], - "summary": "Upsert a recipe filter to a project", - "operationId": "create_project_recipe_filter", + "summary": "Get a project", + "operationId": "get_project", "parameters": [ { "required": true, @@ -2815,23 +2746,13 @@ "in": "path" } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProjectRecipeFilter" - } - } - }, - "required": true - }, "responses": { - "202": { - "description": "Accepted", + "200": { + "description": "Retrieved", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ProjectRecipeFilter" + "$ref": "#/components/schemas/Project" } } } @@ -2868,12 +2789,12 @@ } ] }, - "delete": { + "put": { "tags": [ "Projects" ], - "summary": "Remove a Project recipe filter", - "operationId": "delete_project_recipe_filter", + "summary": "Update a Project", + "operationId": "update", "parameters": [ { "required": true, @@ -2898,12 +2819,81 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ProjectRecipeFilter" + "$ref": "#/components/schemas/ProjectUpdate" } } }, "required": true }, + "responses": { + "202": { + "description": "Accepted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateAccepted" + } + } + } + }, + "403": { + "description": "Access forbidden" + }, + "500": { + "description": "Server error" + }, + "400": { + "description": "Invalid request" + }, + "404": { + "description": "Not found" + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "JWTAuth": [] + }, + { + "APIKeyAuth": [] + } + ] + }, + "delete": { + "tags": [ + "Projects" + ], + "summary": "Delete a Project", + "operationId": "delete_project", + "parameters": [ + { + "required": true, + "schema": { + "title": "Owner", + "type": "string" + }, + "name": "owner", + "in": "path" + }, + { + "required": true, + "schema": { + "title": "Name", + "type": "string" + }, + "name": "name", + "in": "path" + } + ], "responses": { "204": { "description": "Accepted" @@ -2938,18 +2928,18 @@ ] } }, - "/projects/{owner}/{name}/artifacts": { + "/projects/{owner}/{name}/permissions": { "get": { "tags": [ - "Artifacts" + "Projects" ], - "summary": "List artifacts in a project folder", - "operationId": "list_artifacts", + "summary": "Get project access permissions", + "operationId": "get_project_access_permissions", "parameters": [ { "required": true, "schema": { - "title": "Project Owner", + "title": "Owner", "type": "string" }, "name": "owner", @@ -2958,26 +2948,12 @@ { "required": true, "schema": { - "title": "Project Name", + "title": "Name", "type": "string" }, "name": "name", "in": "path" }, - { - "description": "The path to an file within a project folder", - "required": false, - "schema": { - "title": "Project File Path", - "type": "array", - "items": { - "type": "string" - }, - "description": "The path to an file within a project folder" - }, - "name": "path", - "in": "query" - }, { "description": "Page number starting from 1", "required": false, @@ -3003,6 +2979,34 @@ }, "name": "per-page", "in": "query" + }, + { + "description": "The type of access policy subject", + "required": false, + "schema": { + "title": "Subject Type", + "type": "array", + "items": { + "type": "string" + }, + "description": "The type of access policy subject" + }, + "name": "subject_type", + "in": "query" + }, + { + "description": "An access policy permission string", + "required": false, + "schema": { + "title": "PERMISSION", + "type": "array", + "items": { + "type": "string" + }, + "description": "An access policy permission string" + }, + "name": "permission", + "in": "query" } ], "responses": { @@ -3011,15 +3015,20 @@ "content": { "application/json": { "schema": { - "title": "Response Get List Owner Name Artifacts Get", - "type": "array", - "items": { - "$ref": "#/components/schemas/FileMeta" - } + "$ref": "#/components/schemas/ProjectAccessPolicyList" } } } }, + "403": { + "description": "Access forbidden" + }, + "500": { + "description": "Server error" + }, + "400": { + "description": "Invalid request" + }, "422": { "description": "Validation Error", "content": { @@ -3040,17 +3049,17 @@ } ] }, - "post": { + "delete": { "tags": [ - "Artifacts" + "Projects" ], - "summary": "Get an Artifact upload link.", - "operationId": "create_artifact", + "summary": "Remove a Project permissions", + "operationId": "delete_project_org_permission", "parameters": [ { "required": true, "schema": { - "title": "Project Owner", + "title": "Owner", "type": "string" }, "name": "owner", @@ -3059,7 +3068,7 @@ { "required": true, "schema": { - "title": "Project Name", + "title": "Name", "type": "string" }, "name": "name", @@ -3070,22 +3079,24 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/KeyRequest" + "$ref": "#/components/schemas/ProjectPolicySubject" } } }, "required": true }, "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/S3UploadRequest" - } - } - } + "204": { + "description": "Accepted" + }, + "403": { + "description": "Access forbidden" + }, + "500": { + "description": "Server error" + }, + "400": { + "description": "Invalid request" }, "422": { "description": "Validation Error", @@ -3107,17 +3118,17 @@ } ] }, - "delete": { + "patch": { "tags": [ - "Artifacts" + "Projects" ], - "summary": "Delete one or many artifacts by key/prefix", - "operationId": "delete_artifact", + "summary": "Upsert a new permission to a project", + "operationId": "upsert_project_permission", "parameters": [ { "required": true, "schema": { - "title": "Project Owner", + "title": "Owner", "type": "string" }, "name": "owner", @@ -3126,90 +3137,79 @@ { "required": true, "schema": { - "title": "Project Name", + "title": "Name", "type": "string" }, "name": "name", "in": "path" - }, - { - "description": "The path to an file within a project folder", - "required": false, - "schema": { - "title": "Project File Path", - "type": "array", - "items": { - "type": "string" - }, - "description": "The path to an file within a project folder" - }, - "name": "path", - "in": "query" - }, - { - "description": "Page number starting from 1", - "required": false, - "schema": { - "title": "Page number", - "minimum": 1.0, - "type": "integer", - "description": "Page number starting from 1", - "default": 1 - }, - "name": "page", - "in": "query" - }, - { - "description": "Number of items per page", - "required": false, - "schema": { - "title": "Items per page", - "maximum": 100.0, - "type": "integer", - "description": "Number of items per page", - "default": 25 - }, - "name": "per-page", - "in": "query" } ], - "responses": { - "204": { - "description": "Successful Response" + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProjectAccessPolicy" + } + } }, - "422": { - "description": "Validation Error", + "required": true + }, + "responses": { + "202": { + "description": "Accepted", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/HTTPValidationError" + "$ref": "#/components/schemas/UpdateAccepted" } } } - } - }, - "security": [ - { - "JWTAuth": [] }, - { - "APIKeyAuth": [] - } - ] - } - }, - "/projects/{owner}/{name}/artifacts/download": { - "get": { + "403": { + "description": "Access forbidden" + }, + "500": { + "description": "Server error" + }, + "400": { + "description": "Invalid request" + }, + "404": { + "description": "Not found" + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "JWTAuth": [] + }, + { + "APIKeyAuth": [] + } + ] + } + }, + "/projects/{owner}/{name}/recipes": { + "get": { "tags": [ - "Artifacts" + "Projects" ], - "summary": "Download an artifact from the project folder", - "operationId": "download_artifact", + "summary": "Get project recipes", + "operationId": "get_project_recipes", "parameters": [ { "required": true, "schema": { - "title": "Project Owner", + "title": "Owner", "type": "string" }, "name": "owner", @@ -3218,21 +3218,47 @@ { "required": true, "schema": { - "title": "Project Name", + "title": "Name", "type": "string" }, "name": "name", "in": "path" }, { - "description": "The path to an file within a project folder", + "description": "Search string to find recipes", "required": false, "schema": { - "title": "Project File Path", + "title": "Search Query", "type": "string", - "description": "The path to an file within a project folder" + "description": "Search string to find recipes" }, - "name": "path", + "name": "search", + "in": "query" + }, + { + "description": "Page number starting from 1", + "required": false, + "schema": { + "title": "Page number", + "minimum": 1.0, + "type": "integer", + "description": "Page number starting from 1", + "default": 1 + }, + "name": "page", + "in": "query" + }, + { + "description": "Number of items per page", + "required": false, + "schema": { + "title": "Items per page", + "maximum": 100.0, + "type": "integer", + "description": "Number of items per page", + "default": 25 + }, + "name": "per-page", "in": "query" } ], @@ -3241,7 +3267,9 @@ "description": "Retrieved", "content": { "application/json": { - "schema": {} + "schema": { + "$ref": "#/components/schemas/RecipeInterfaceList" + } } } }, @@ -3254,9 +3282,6 @@ "400": { "description": "Invalid request" }, - "404": { - "description": "Not found" - }, "422": { "description": "Validation Error", "content": { @@ -3278,125 +3303,31 @@ ] } }, - "/recipes": { + "/projects/{owner}/{name}/recipes/filters": { "get": { "tags": [ - "Recipes" + "Projects" ], - "summary": "List recipes", - "operationId": "list_recipes", + "summary": "Get project recipe filters", + "operationId": "get_project_recipe_filters", "parameters": [ { - "description": "You know, for search", - "required": false, - "schema": { - "title": "Search query", - "type": "array", - "items": { - "type": "string" - }, - "description": "You know, for search" - }, - "name": "search", - "in": "query" - }, - { - "description": "The account name", - "required": false, - "schema": { - "title": "Repository Name", - "type": "array", - "items": { - "type": "string" - }, - "description": "The account name" - }, - "name": "name", - "in": "query" - }, - { - "description": "Owner of the project", - "required": false, + "required": true, "schema": { - "title": "Repository Owner", - "type": "array", - "items": { - "type": "string" - }, - "description": "Owner of the project" + "title": "Owner", + "type": "string" }, "name": "owner", - "in": "query" - }, - { - "description": "Boolean check for public/private projects", - "required": false, - "schema": { - "title": "Public Repository", - "type": "boolean", - "description": "Boolean check for public/private projects" - }, - "name": "public", - "in": "query" - }, - { - "description": "A keyword to index the repository by", - "required": false, - "schema": { - "title": "Repository Keywords", - "type": "array", - "items": { - "type": "string" - }, - "description": "A keyword to index the repository by" - }, - "name": "keyword", - "in": "query" - }, - { - "description": "Filter by permission on given resource", - "required": false, - "schema": { - "title": "Permission Name", - "type": "array", - "items": { - "type": "string" - }, - "description": "Filter by permission on given resource" - }, - "name": "permission", - "in": "query" - }, - { - "description": "Key to sort the list by", - "required": false, - "schema": { - "title": "Sort By", - "allOf": [ - { - "$ref": "#/components/schemas/RepositorySortKey" - } - ], - "description": "Key to sort the list by" - }, - "name": "sort_by", - "in": "query" + "in": "path" }, { - "description": "The order to sort the list", - "required": false, + "required": true, "schema": { - "title": "Sort Order", - "allOf": [ - { - "$ref": "#/components/schemas/SortEnum" - } - ], - "description": "The order to sort the list", - "default": "ascending" + "title": "Name", + "type": "string" }, - "name": "sort_order", - "in": "query" + "name": "name", + "in": "path" }, { "description": "Page number starting from 1", @@ -3431,11 +3362,20 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/RepositoryList" + "$ref": "#/components/schemas/ProjectRecipeFilterList" } } } }, + "403": { + "description": "Access forbidden" + }, + "500": { + "description": "Server error" + }, + "400": { + "description": "Invalid request" + }, "422": { "description": "Validation Error", "content": { @@ -3455,16 +3395,13 @@ "APIKeyAuth": [] } ] - } - }, - "/recipes/{owner}": { + }, "post": { "tags": [ - "Recipes" + "Projects" ], - "summary": "Create a Recipe", - "description": "Create a new recipe.", - "operationId": "create_recipe", + "summary": "Upsert a recipe filter to a project", + "operationId": "create_project_recipe_filter", "parameters": [ { "required": true, @@ -3474,25 +3411,34 @@ }, "name": "owner", "in": "path" + }, + { + "required": true, + "schema": { + "title": "Name", + "type": "string" + }, + "name": "name", + "in": "path" } ], "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/RepositoryCreate" + "$ref": "#/components/schemas/ProjectRecipeFilter" } } }, "required": true }, "responses": { - "201": { - "description": "Success", + "202": { + "description": "Accepted", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CreatedContent" + "$ref": "#/components/schemas/ProjectRecipeFilter" } } } @@ -3506,8 +3452,8 @@ "400": { "description": "Invalid request" }, - "202": { - "description": "Accepted" + "404": { + "description": "Not found" }, "422": { "description": "Validation Error", @@ -3528,16 +3474,13 @@ "APIKeyAuth": [] } ] - } - }, - "/recipes/{owner}/{name}": { - "get": { + }, + "delete": { "tags": [ - "Recipes" + "Projects" ], - "summary": "Get a recipe", - "description": "Retrieve a recipe by name", - "operationId": "get_recipe", + "summary": "Remove a Project recipe filter", + "operationId": "delete_project_recipe_filter", "parameters": [ { "required": true, @@ -3558,17 +3501,20 @@ "in": "path" } ], - "responses": { - "200": { - "description": "Retrieved", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Repository" - } + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProjectRecipeFilter" } } }, + "required": true + }, + "responses": { + "204": { + "description": "Accepted" + }, "403": { "description": "Access forbidden" }, @@ -3578,9 +3524,6 @@ "400": { "description": "Invalid request" }, - "404": { - "description": "Not found" - }, "422": { "description": "Validation Error", "content": { @@ -3600,19 +3543,20 @@ "APIKeyAuth": [] } ] - }, - "put": { + } + }, + "/projects/{owner}/{name}/artifacts": { + "get": { "tags": [ - "Recipes" + "Artifacts" ], - "summary": "Update a Recipe", - "description": "Update a recipe (must have `contribute` permission)", - "operationId": "update_recipe", + "summary": "List artifacts in a project folder", + "operationId": "list_artifacts", "parameters": [ { "required": true, "schema": { - "title": "Owner", + "title": "Project Owner", "type": "string" }, "name": "owner", @@ -3621,46 +3565,68 @@ { "required": true, "schema": { - "title": "Name", + "title": "Project Name", "type": "string" }, "name": "name", "in": "path" + }, + { + "description": "The path to an file within a project folder", + "required": false, + "schema": { + "title": "Project File Path", + "type": "array", + "items": { + "type": "string" + }, + "description": "The path to an file within a project folder" + }, + "name": "path", + "in": "query" + }, + { + "description": "Page number starting from 1", + "required": false, + "schema": { + "title": "Page number", + "minimum": 1.0, + "type": "integer", + "description": "Page number starting from 1", + "default": 1 + }, + "name": "page", + "in": "query" + }, + { + "description": "Number of items per page", + "required": false, + "schema": { + "title": "Items per page", + "maximum": 100.0, + "type": "integer", + "description": "Number of items per page", + "default": 25 + }, + "name": "per-page", + "in": "query" } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RepositoryUpdate" - } - } - }, - "required": true - }, "responses": { - "202": { - "description": "Accepted", + "200": { + "description": "Retrieved", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UpdateAccepted" + "title": "Response Get List Owner Name Artifacts Get", + "type": "array", + "items": { + "$ref": "#/components/schemas/FileMeta" + } } } } }, - "403": { - "description": "Access forbidden" - }, - "500": { - "description": "Server error" - }, - "400": { - "description": "Invalid request" - }, - "404": { - "description": "Not found" - }, "422": { "description": "Validation Error", "content": { @@ -3681,18 +3647,17 @@ } ] }, - "delete": { + "post": { "tags": [ - "Recipes" + "Artifacts" ], - "summary": "Delete a Recipe", - "description": "Delete a recipe (must have `admin` permission)", - "operationId": "delete_recipe", + "summary": "Get an Artifact upload link.", + "operationId": "create_artifact", "parameters": [ { "required": true, "schema": { - "title": "Owner", + "title": "Project Owner", "type": "string" }, "name": "owner", @@ -3701,25 +3666,33 @@ { "required": true, "schema": { - "title": "Name", + "title": "Project Name", "type": "string" }, "name": "name", "in": "path" } ], - "responses": { - "204": { - "description": "Accepted" - }, - "403": { - "description": "Access forbidden" - }, - "500": { - "description": "Server error" + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/KeyRequest" + } + } }, - "400": { - "description": "Invalid request" + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/S3UploadRequest" + } + } + } }, "422": { "description": "Validation Error", @@ -3740,21 +3713,18 @@ "APIKeyAuth": [] } ] - } - }, - "/recipes/{owner}/{name}/tags": { - "get": { + }, + "delete": { "tags": [ - "Recipes" + "Artifacts" ], - "summary": "Get a recipe tags", - "description": "Retrieve a recipe by name", - "operationId": "list_recipe_tags", + "summary": "Delete one or many artifacts by key/prefix", + "operationId": "delete_artifact", "parameters": [ { "required": true, "schema": { - "title": "Owner", + "title": "Project Owner", "type": "string" }, "name": "owner", @@ -3763,41 +3733,24 @@ { "required": true, "schema": { - "title": "Name", + "title": "Project Name", "type": "string" }, "name": "name", "in": "path" }, { - "description": "Key to sort the list by", - "required": false, - "schema": { - "title": "Sort By", - "allOf": [ - { - "$ref": "#/components/schemas/PackageSortKey" - } - ], - "description": "Key to sort the list by" - }, - "name": "sort_by", - "in": "query" - }, - { - "description": "The order to sort the list", + "description": "The path to an file within a project folder", "required": false, "schema": { - "title": "Sort Order", - "allOf": [ - { - "$ref": "#/components/schemas/SortEnum" - } - ], - "description": "The order to sort the list", - "default": "ascending" + "title": "Project File Path", + "type": "array", + "items": { + "type": "string" + }, + "description": "The path to an file within a project folder" }, - "name": "sort_order", + "name": "path", "in": "query" }, { @@ -3828,27 +3781,8 @@ } ], "responses": { - "200": { - "description": "Retrieved", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RecipePackageList" - } - } - } - }, - "403": { - "description": "Access forbidden" - }, - "500": { - "description": "Server error" - }, - "400": { - "description": "Invalid request" - }, - "404": { - "description": "Not found" + "204": { + "description": "Successful Response" }, "422": { "description": "Validation Error", @@ -3869,19 +3803,20 @@ "APIKeyAuth": [] } ] - }, - "post": { + } + }, + "/projects/{owner}/{name}/artifacts/download": { + "get": { "tags": [ - "Recipes" + "Artifacts" ], - "summary": "Create a new Recipe package", - "description": "Create a new recipe package version", - "operationId": "create_recipe_package", + "summary": "Download an artifact from the project folder", + "operationId": "download_artifact", "parameters": [ { "required": true, "schema": { - "title": "Owner", + "title": "Project Owner", "type": "string" }, "name": "owner", @@ -3890,31 +3825,30 @@ { "required": true, "schema": { - "title": "Name", + "title": "Project Name", "type": "string" }, "name": "name", "in": "path" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/NewRecipePackage" - } - } }, - "required": true - }, + { + "description": "The path to an file within a project folder", + "required": false, + "schema": { + "title": "Project File Path", + "type": "string", + "description": "The path to an file within a project folder" + }, + "name": "path", + "in": "query" + } + ], "responses": { "200": { - "description": "Success", + "description": "Retrieved", "content": { "application/json": { - "schema": { - "$ref": "#/components/schemas/CreatedContent" - } + "schema": {} } } }, @@ -3951,113 +3885,125 @@ ] } }, - "/recipes/{owner}/{name}/tags/{tag}": { + "/recipes": { "get": { "tags": [ "Recipes" ], - "summary": "Get a recipe tag", - "description": "Retrieve a recipe tag by name and tag", - "operationId": "get_recipe_by_tag", + "summary": "List recipes", + "operationId": "list_recipes", "parameters": [ { - "required": true, + "description": "You know, for search", + "required": false, "schema": { - "title": "Owner", - "type": "string" + "title": "Search query", + "type": "array", + "items": { + "type": "string" + }, + "description": "You know, for search" }, - "name": "owner", - "in": "path" + "name": "search", + "in": "query" }, { - "required": true, + "description": "The account name", + "required": false, "schema": { - "title": "Name", - "type": "string" + "title": "Repository Name", + "type": "array", + "items": { + "type": "string" + }, + "description": "The account name" }, "name": "name", - "in": "path" + "in": "query" }, { - "required": true, + "description": "Owner of the project", + "required": false, "schema": { - "title": "Tag", - "type": "string" + "title": "Repository Owner", + "type": "array", + "items": { + "type": "string" + }, + "description": "Owner of the project" }, - "name": "tag", - "in": "path" - } - ], - "responses": { - "200": { - "description": "Retrieved", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RecipePackage" - } - } - } - }, - "403": { - "description": "Access forbidden" - }, - "500": { - "description": "Server error" - }, - "400": { - "description": "Invalid request" + "name": "owner", + "in": "query" }, - "404": { - "description": "Not found" + { + "description": "Boolean check for public/private projects", + "required": false, + "schema": { + "title": "Public Repository", + "type": "boolean", + "description": "Boolean check for public/private projects" + }, + "name": "public", + "in": "query" }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "security": [ { - "JWTAuth": [] + "description": "A keyword to index the repository by", + "required": false, + "schema": { + "title": "Repository Keywords", + "type": "array", + "items": { + "type": "string" + }, + "description": "A keyword to index the repository by" + }, + "name": "keyword", + "in": "query" }, { - "APIKeyAuth": [] - } - ] - } - }, - "/recipes/{owner}/{name}/permissions": { - "get": { - "tags": [ - "Recipes" - ], - "summary": "Get recipe access permissions", - "description": "Retrieve a recipe's access permissions (must have `write` permission)", - "operationId": "get_recipe_access_permissions", - "parameters": [ + "description": "Filter by permission on given resource", + "required": false, + "schema": { + "title": "Permission Name", + "type": "array", + "items": { + "type": "string" + }, + "description": "Filter by permission on given resource" + }, + "name": "permission", + "in": "query" + }, { - "required": true, + "description": "Key to sort the list by", + "required": false, "schema": { - "title": "Owner", - "type": "string" + "title": "Sort By", + "allOf": [ + { + "$ref": "#/components/schemas/RepositorySortKey" + } + ], + "description": "Key to sort the list by" }, - "name": "owner", - "in": "path" + "name": "sort_by", + "in": "query" }, { - "required": true, + "description": "The order to sort the list", + "required": false, "schema": { - "title": "Name", - "type": "string" + "title": "Sort Order", + "allOf": [ + { + "$ref": "#/components/schemas/SortEnum" + } + ], + "description": "The order to sort the list", + "default": "ascending" }, - "name": "name", - "in": "path" + "name": "sort_order", + "in": "query" }, { "description": "Page number starting from 1", @@ -4084,34 +4030,6 @@ }, "name": "per-page", "in": "query" - }, - { - "description": "The type of access policy subject", - "required": false, - "schema": { - "title": "Subject Type", - "type": "array", - "items": { - "type": "string" - }, - "description": "The type of access policy subject" - }, - "name": "subject_type", - "in": "query" - }, - { - "description": "An access policy permission string", - "required": false, - "schema": { - "title": "PERMISSION", - "type": "array", - "items": { - "type": "string" - }, - "description": "An access policy permission string" - }, - "name": "permission", - "in": "query" } ], "responses": { @@ -4120,20 +4038,11 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/RepositoryAccessPolicyList" + "$ref": "#/components/schemas/RepositoryList" } } } }, - "403": { - "description": "Access forbidden" - }, - "500": { - "description": "Server error" - }, - "400": { - "description": "Invalid request" - }, "422": { "description": "Validation Error", "content": { @@ -4153,14 +4062,16 @@ "APIKeyAuth": [] } ] - }, - "delete": { + } + }, + "/recipes/{owner}": { + "post": { "tags": [ "Recipes" ], - "summary": "Remove a Repository permissions", - "description": "Delete a recipe's access policy (must have `admin` permission)", - "operationId": "delete_recipe_org_permission", + "summary": "Create a Recipe", + "description": "Create a new recipe.", + "operationId": "create_recipe", "parameters": [ { "required": true, @@ -4170,31 +4081,101 @@ }, "name": "owner", "in": "path" - }, - { - "required": true, - "schema": { - "title": "Name", - "type": "string" - }, - "name": "name", - "in": "path" } ], "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/RepositoryPolicySubject" + "$ref": "#/components/schemas/RepositoryCreate" } } }, "required": true }, "responses": { - "204": { - "description": "Accepted" - }, + "201": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreatedContent" + } + } + } + }, + "403": { + "description": "Access forbidden" + }, + "500": { + "description": "Server error" + }, + "400": { + "description": "Invalid request" + }, + "202": { + "description": "Accepted" + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "JWTAuth": [] + }, + { + "APIKeyAuth": [] + } + ] + } + }, + "/recipes/{owner}/{name}": { + "get": { + "tags": [ + "Recipes" + ], + "summary": "Get a recipe", + "description": "Retrieve a recipe by name", + "operationId": "get_recipe", + "parameters": [ + { + "required": true, + "schema": { + "title": "Owner", + "type": "string" + }, + "name": "owner", + "in": "path" + }, + { + "required": true, + "schema": { + "title": "Name", + "type": "string" + }, + "name": "name", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Retrieved", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Repository" + } + } + } + }, "403": { "description": "Access forbidden" }, @@ -4204,6 +4185,9 @@ "400": { "description": "Invalid request" }, + "404": { + "description": "Not found" + }, "422": { "description": "Validation Error", "content": { @@ -4224,13 +4208,13 @@ } ] }, - "patch": { + "put": { "tags": [ "Recipes" ], - "summary": "Upsert a new permission to a recipe", - "description": "Upsert a recipe's access policy (must have `admin` permission)", - "operationId": "upsert_recipe_permission", + "summary": "Update a Recipe", + "description": "Update a recipe (must have `contribute` permission)", + "operationId": "update_recipe", "parameters": [ { "required": true, @@ -4255,7 +4239,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/RepositoryAccessPolicy" + "$ref": "#/components/schemas/RepositoryUpdate" } } }, @@ -4303,96 +4287,94 @@ "APIKeyAuth": [] } ] - } - }, - "/plugins": { - "get": { + }, + "delete": { "tags": [ - "Plugins" + "Recipes" ], - "summary": "List plugins", - "operationId": "list_plugins", + "summary": "Delete a Recipe", + "description": "Delete a recipe (must have `admin` permission)", + "operationId": "delete_recipe", "parameters": [ { - "description": "You know, for search", - "required": false, + "required": true, "schema": { - "title": "Search query", - "type": "array", - "items": { - "type": "string" - }, - "description": "You know, for search" + "title": "Owner", + "type": "string" }, - "name": "search", - "in": "query" + "name": "owner", + "in": "path" }, { - "description": "The account name", - "required": false, + "required": true, "schema": { - "title": "Repository Name", - "type": "array", - "items": { - "type": "string" - }, - "description": "The account name" + "title": "Name", + "type": "string" }, "name": "name", - "in": "query" + "in": "path" + } + ], + "responses": { + "204": { + "description": "Accepted" }, - { - "description": "Owner of the project", - "required": false, - "schema": { - "title": "Repository Owner", - "type": "array", - "items": { - "type": "string" - }, - "description": "Owner of the project" - }, - "name": "owner", - "in": "query" + "403": { + "description": "Access forbidden" + }, + "500": { + "description": "Server error" + }, + "400": { + "description": "Invalid request" }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ { - "description": "Boolean check for public/private projects", - "required": false, - "schema": { - "title": "Public Repository", - "type": "boolean", - "description": "Boolean check for public/private projects" - }, - "name": "public", - "in": "query" + "JWTAuth": [] }, { - "description": "A keyword to index the repository by", - "required": false, + "APIKeyAuth": [] + } + ] + } + }, + "/recipes/{owner}/{name}/tags": { + "get": { + "tags": [ + "Recipes" + ], + "summary": "Get a recipe tags", + "description": "Retrieve a recipe by name", + "operationId": "list_recipe_tags", + "parameters": [ + { + "required": true, "schema": { - "title": "Repository Keywords", - "type": "array", - "items": { - "type": "string" - }, - "description": "A keyword to index the repository by" + "title": "Owner", + "type": "string" }, - "name": "keyword", - "in": "query" + "name": "owner", + "in": "path" }, { - "description": "Filter by permission on given resource", - "required": false, + "required": true, "schema": { - "title": "Permission Name", - "type": "array", - "items": { - "type": "string" - }, - "description": "Filter by permission on given resource" + "title": "Name", + "type": "string" }, - "name": "permission", - "in": "query" + "name": "name", + "in": "path" }, { "description": "Key to sort the list by", @@ -4401,7 +4383,7 @@ "title": "Sort By", "allOf": [ { - "$ref": "#/components/schemas/RepositorySortKey" + "$ref": "#/components/schemas/PackageSortKey" } ], "description": "Key to sort the list by" @@ -4458,11 +4440,23 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/RepositoryList" + "$ref": "#/components/schemas/RecipePackageList" } } } }, + "403": { + "description": "Access forbidden" + }, + "500": { + "description": "Server error" + }, + "400": { + "description": "Invalid request" + }, + "404": { + "description": "Not found" + }, "422": { "description": "Validation Error", "content": { @@ -4482,18 +4476,16 @@ "APIKeyAuth": [] } ] - } - }, - "/plugins/{owner}": { + }, "post": { "tags": [ - "Plugins" + "Recipes" ], - "summary": "Create a Plugin", - "description": "Create a new plugin.", - "operationId": "create_plugin", - "parameters": [ - { + "summary": "Create a new Recipe package", + "description": "Create a new recipe package version", + "operationId": "create_recipe_package", + "parameters": [ + { "required": true, "schema": { "title": "Owner", @@ -4501,20 +4493,29 @@ }, "name": "owner", "in": "path" + }, + { + "required": true, + "schema": { + "title": "Name", + "type": "string" + }, + "name": "name", + "in": "path" } ], "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/RepositoryCreate" + "$ref": "#/components/schemas/NewRecipePackage" } } }, "required": true }, "responses": { - "201": { + "200": { "description": "Success", "content": { "application/json": { @@ -4533,8 +4534,8 @@ "400": { "description": "Invalid request" }, - "202": { - "description": "Accepted" + "404": { + "description": "Not found" }, "422": { "description": "Validation Error", @@ -4557,14 +4558,14 @@ ] } }, - "/plugins/{owner}/{name}": { + "/recipes/{owner}/{name}/tags/{tag}": { "get": { "tags": [ - "Plugins" + "Recipes" ], - "summary": "Get a plugin", - "description": "Retrieve a plugin by name", - "operationId": "get_plugin", + "summary": "Get a recipe tag", + "description": "Retrieve a recipe tag by name and tag", + "operationId": "get_recipe_by_tag", "parameters": [ { "required": true, @@ -4583,6 +4584,15 @@ }, "name": "name", "in": "path" + }, + { + "required": true, + "schema": { + "title": "Tag", + "type": "string" + }, + "name": "tag", + "in": "path" } ], "responses": { @@ -4591,7 +4601,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Repository" + "$ref": "#/components/schemas/RecipePackage" } } } @@ -4627,14 +4637,16 @@ "APIKeyAuth": [] } ] - }, - "put": { + } + }, + "/recipes/{owner}/{name}/permissions": { + "get": { "tags": [ - "Plugins" + "Recipes" ], - "summary": "Update a Plugin", - "description": "Update a plugin (must have `contribute` permission)", - "operationId": "update_plugin", + "summary": "Get recipe access permissions", + "description": "Retrieve a recipe's access permissions (must have `write` permission)", + "operationId": "get_recipe_access_permissions", "parameters": [ { "required": true, @@ -4653,25 +4665,69 @@ }, "name": "name", "in": "path" + }, + { + "description": "Page number starting from 1", + "required": false, + "schema": { + "title": "Page number", + "minimum": 1.0, + "type": "integer", + "description": "Page number starting from 1", + "default": 1 + }, + "name": "page", + "in": "query" + }, + { + "description": "Number of items per page", + "required": false, + "schema": { + "title": "Items per page", + "maximum": 100.0, + "type": "integer", + "description": "Number of items per page", + "default": 25 + }, + "name": "per-page", + "in": "query" + }, + { + "description": "The type of access policy subject", + "required": false, + "schema": { + "title": "Subject Type", + "type": "array", + "items": { + "type": "string" + }, + "description": "The type of access policy subject" + }, + "name": "subject_type", + "in": "query" + }, + { + "description": "An access policy permission string", + "required": false, + "schema": { + "title": "PERMISSION", + "type": "array", + "items": { + "type": "string" + }, + "description": "An access policy permission string" + }, + "name": "permission", + "in": "query" } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RepositoryUpdate" - } - } - }, - "required": true - }, "responses": { - "202": { - "description": "Accepted", + "200": { + "description": "Retrieved", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UpdateAccepted" + "$ref": "#/components/schemas/RepositoryAccessPolicyList" } } } @@ -4685,9 +4741,6 @@ "400": { "description": "Invalid request" }, - "404": { - "description": "Not found" - }, "422": { "description": "Validation Error", "content": { @@ -4710,11 +4763,11 @@ }, "delete": { "tags": [ - "Plugins" + "Recipes" ], - "summary": "Delete a Plugin", - "description": "Delete a plugin (must have `admin` permission)", - "operationId": "delete_plugin", + "summary": "Remove a Repository permissions", + "description": "Delete a recipe's access policy (must have `admin` permission)", + "operationId": "delete_recipe_org_permission", "parameters": [ { "required": true, @@ -4735,6 +4788,16 @@ "in": "path" } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RepositoryPolicySubject" + } + } + }, + "required": true + }, "responses": { "204": { "description": "Accepted" @@ -4767,16 +4830,14 @@ "APIKeyAuth": [] } ] - } - }, - "/plugins/{owner}/{name}/tags": { - "get": { + }, + "patch": { "tags": [ - "Plugins" + "Recipes" ], - "summary": "Get a plugin tags", - "description": "Retrieve a plugin by name", - "operationId": "list_plugin_tags", + "summary": "Upsert a new permission to a recipe", + "description": "Upsert a recipe's access policy (must have `admin` permission)", + "operationId": "upsert_recipe_permission", "parameters": [ { "required": true, @@ -4795,72 +4856,25 @@ }, "name": "name", "in": "path" - }, - { - "description": "Key to sort the list by", - "required": false, - "schema": { - "title": "Sort By", - "allOf": [ - { - "$ref": "#/components/schemas/PackageSortKey" - } - ], - "description": "Key to sort the list by" - }, - "name": "sort_by", - "in": "query" - }, - { - "description": "The order to sort the list", - "required": false, - "schema": { - "title": "Sort Order", - "allOf": [ - { - "$ref": "#/components/schemas/SortEnum" - } - ], - "description": "The order to sort the list", - "default": "ascending" - }, - "name": "sort_order", - "in": "query" - }, - { - "description": "Page number starting from 1", - "required": false, - "schema": { - "title": "Page number", - "minimum": 1.0, - "type": "integer", - "description": "Page number starting from 1", - "default": 1 - }, - "name": "page", - "in": "query" - }, - { - "description": "Number of items per page", - "required": false, - "schema": { - "title": "Items per page", - "maximum": 100.0, - "type": "integer", - "description": "Number of items per page", - "default": 25 - }, - "name": "per-page", - "in": "query" } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RepositoryAccessPolicy" + } + } + }, + "required": true + }, "responses": { - "200": { - "description": "Retrieved", + "202": { + "description": "Accepted", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PluginPackageList" + "$ref": "#/components/schemas/UpdateAccepted" } } } @@ -4896,31 +4910,203 @@ "APIKeyAuth": [] } ] - }, - "post": { + } + }, + "/plugins": { + "get": { "tags": [ "Plugins" ], - "summary": "Create a new Plugin package", - "description": "Create a new plugin package version", - "operationId": "create_plugin_package", + "summary": "List plugins", + "operationId": "list_plugins", "parameters": [ { - "required": true, + "description": "You know, for search", + "required": false, "schema": { - "title": "Owner", - "type": "string" - }, - "name": "owner", - "in": "path" - }, - { + "title": "Search query", + "type": "array", + "items": { + "type": "string" + }, + "description": "You know, for search" + }, + "name": "search", + "in": "query" + }, + { + "description": "The account name", + "required": false, + "schema": { + "title": "Repository Name", + "type": "array", + "items": { + "type": "string" + }, + "description": "The account name" + }, + "name": "name", + "in": "query" + }, + { + "description": "Owner of the project", + "required": false, + "schema": { + "title": "Repository Owner", + "type": "array", + "items": { + "type": "string" + }, + "description": "Owner of the project" + }, + "name": "owner", + "in": "query" + }, + { + "description": "Boolean check for public/private projects", + "required": false, + "schema": { + "title": "Public Repository", + "type": "boolean", + "description": "Boolean check for public/private projects" + }, + "name": "public", + "in": "query" + }, + { + "description": "A keyword to index the repository by", + "required": false, + "schema": { + "title": "Repository Keywords", + "type": "array", + "items": { + "type": "string" + }, + "description": "A keyword to index the repository by" + }, + "name": "keyword", + "in": "query" + }, + { + "description": "Filter by permission on given resource", + "required": false, + "schema": { + "title": "Permission Name", + "type": "array", + "items": { + "type": "string" + }, + "description": "Filter by permission on given resource" + }, + "name": "permission", + "in": "query" + }, + { + "description": "Key to sort the list by", + "required": false, + "schema": { + "title": "Sort By", + "allOf": [ + { + "$ref": "#/components/schemas/RepositorySortKey" + } + ], + "description": "Key to sort the list by" + }, + "name": "sort_by", + "in": "query" + }, + { + "description": "The order to sort the list", + "required": false, + "schema": { + "title": "Sort Order", + "allOf": [ + { + "$ref": "#/components/schemas/SortEnum" + } + ], + "description": "The order to sort the list", + "default": "ascending" + }, + "name": "sort_order", + "in": "query" + }, + { + "description": "Page number starting from 1", + "required": false, + "schema": { + "title": "Page number", + "minimum": 1.0, + "type": "integer", + "description": "Page number starting from 1", + "default": 1 + }, + "name": "page", + "in": "query" + }, + { + "description": "Number of items per page", + "required": false, + "schema": { + "title": "Items per page", + "maximum": 100.0, + "type": "integer", + "description": "Number of items per page", + "default": 25 + }, + "name": "per-page", + "in": "query" + } + ], + "responses": { + "200": { + "description": "Retrieved", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RepositoryList" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "JWTAuth": [] + }, + { + "APIKeyAuth": [] + } + ] + } + }, + "/plugins/{owner}": { + "post": { + "tags": [ + "Plugins" + ], + "summary": "Create a Plugin", + "description": "Create a new plugin.", + "operationId": "create_plugin", + "parameters": [ + { "required": true, "schema": { - "title": "Name", + "title": "Owner", "type": "string" }, - "name": "name", + "name": "owner", "in": "path" } ], @@ -4928,14 +5114,14 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/NewPluginPackage" + "$ref": "#/components/schemas/RepositoryCreate" } } }, "required": true }, "responses": { - "200": { + "201": { "description": "Success", "content": { "application/json": { @@ -4954,8 +5140,8 @@ "400": { "description": "Invalid request" }, - "404": { - "description": "Not found" + "202": { + "description": "Accepted" }, "422": { "description": "Validation Error", @@ -4978,14 +5164,14 @@ ] } }, - "/plugins/{owner}/{name}/tags/{tag}": { + "/plugins/{owner}/{name}": { "get": { "tags": [ "Plugins" ], - "summary": "Get a plugin tag", - "description": "Retrieve a plugin tag by name and tag", - "operationId": "get_plugin_by_tag", + "summary": "Get a plugin", + "description": "Retrieve a plugin by name", + "operationId": "get_plugin", "parameters": [ { "required": true, @@ -5004,15 +5190,6 @@ }, "name": "name", "in": "path" - }, - { - "required": true, - "schema": { - "title": "Tag", - "type": "string" - }, - "name": "tag", - "in": "path" } ], "responses": { @@ -5021,7 +5198,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PluginPackage" + "$ref": "#/components/schemas/Repository" } } } @@ -5057,16 +5234,14 @@ "APIKeyAuth": [] } ] - } - }, - "/plugins/{owner}/{name}/permissions": { - "get": { + }, + "put": { "tags": [ "Plugins" ], - "summary": "Get plugin access permissions", - "description": "Retrieve a plugin's access permissions (must have `write` permission)", - "operationId": "get_plugin_access_permissions", + "summary": "Update a Plugin", + "description": "Update a plugin (must have `contribute` permission)", + "operationId": "update_plugin", "parameters": [ { "required": true, @@ -5085,72 +5260,28 @@ }, "name": "name", "in": "path" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RepositoryUpdate" + } + } }, - { - "description": "Page number starting from 1", - "required": false, - "schema": { - "title": "Page number", - "minimum": 1.0, - "type": "integer", - "description": "Page number starting from 1", - "default": 1 - }, - "name": "page", - "in": "query" - }, - { - "description": "Number of items per page", - "required": false, - "schema": { - "title": "Items per page", - "maximum": 100.0, - "type": "integer", - "description": "Number of items per page", - "default": 25 - }, - "name": "per-page", - "in": "query" - }, - { - "description": "The type of access policy subject", - "required": false, - "schema": { - "title": "Subject Type", - "type": "array", - "items": { - "type": "string" - }, - "description": "The type of access policy subject" - }, - "name": "subject_type", - "in": "query" - }, - { - "description": "An access policy permission string", - "required": false, - "schema": { - "title": "PERMISSION", - "type": "array", - "items": { - "type": "string" - }, - "description": "An access policy permission string" - }, - "name": "permission", - "in": "query" - } - ], - "responses": { - "200": { - "description": "Retrieved", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RepositoryAccessPolicyList" - } - } - } + "required": true + }, + "responses": { + "202": { + "description": "Accepted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateAccepted" + } + } + } }, "403": { "description": "Access forbidden" @@ -5161,6 +5292,9 @@ "400": { "description": "Invalid request" }, + "404": { + "description": "Not found" + }, "422": { "description": "Validation Error", "content": { @@ -5185,9 +5319,9 @@ "tags": [ "Plugins" ], - "summary": "Remove a Repository permissions", - "description": "Delete a plugin's access policy (must have `admin` permission)", - "operationId": "delete_plugin_org_permission", + "summary": "Delete a Plugin", + "description": "Delete a plugin (must have `admin` permission)", + "operationId": "delete_plugin", "parameters": [ { "required": true, @@ -5208,16 +5342,6 @@ "in": "path" } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RepositoryPolicySubject" - } - } - }, - "required": true - }, "responses": { "204": { "description": "Accepted" @@ -5250,14 +5374,16 @@ "APIKeyAuth": [] } ] - }, - "patch": { + } + }, + "/plugins/{owner}/{name}/tags": { + "get": { "tags": [ "Plugins" ], - "summary": "Upsert a new permission to a plugin", - "description": "Upsert a plugin's access policy (must have `admin` permission)", - "operationId": "upsert_plugin_permission", + "summary": "Get a plugin tags", + "description": "Retrieve a plugin by name", + "operationId": "list_plugin_tags", "parameters": [ { "required": true, @@ -5276,25 +5402,72 @@ }, "name": "name", "in": "path" + }, + { + "description": "Key to sort the list by", + "required": false, + "schema": { + "title": "Sort By", + "allOf": [ + { + "$ref": "#/components/schemas/PackageSortKey" + } + ], + "description": "Key to sort the list by" + }, + "name": "sort_by", + "in": "query" + }, + { + "description": "The order to sort the list", + "required": false, + "schema": { + "title": "Sort Order", + "allOf": [ + { + "$ref": "#/components/schemas/SortEnum" + } + ], + "description": "The order to sort the list", + "default": "ascending" + }, + "name": "sort_order", + "in": "query" + }, + { + "description": "Page number starting from 1", + "required": false, + "schema": { + "title": "Page number", + "minimum": 1.0, + "type": "integer", + "description": "Page number starting from 1", + "default": 1 + }, + "name": "page", + "in": "query" + }, + { + "description": "Number of items per page", + "required": false, + "schema": { + "title": "Items per page", + "maximum": 100.0, + "type": "integer", + "description": "Number of items per page", + "default": 25 + }, + "name": "per-page", + "in": "query" } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RepositoryAccessPolicy" - } - } - }, - "required": true - }, "responses": { - "202": { - "description": "Accepted", + "200": { + "description": "Retrieved", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UpdateAccepted" + "$ref": "#/components/schemas/PluginPackageList" } } } @@ -5330,37 +5503,67 @@ "APIKeyAuth": [] } ] - } - }, - "/registries/{owner}/index.json": { - "get": { + }, + "post": { "tags": [ - "Registries" + "Plugins" ], - "summary": "Get Registry Index", - "operationId": "get_registry_index", + "summary": "Create a new Plugin package", + "description": "Create a new plugin package version", + "operationId": "create_plugin_package", "parameters": [ { "required": true, "schema": { - "title": "Registry Owner", + "title": "Owner", "type": "string" }, "name": "owner", "in": "path" + }, + { + "required": true, + "schema": { + "title": "Name", + "type": "string" + }, + "name": "name", + "in": "path" } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NewPluginPackage" + } + } + }, + "required": true + }, "responses": { "200": { - "description": "Retrieved", + "description": "Success", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/RepositoryIndex" + "$ref": "#/components/schemas/CreatedContent" } } } }, + "403": { + "description": "Access forbidden" + }, + "500": { + "description": "Server error" + }, + "400": { + "description": "Invalid request" + }, + "404": { + "description": "Not found" + }, "422": { "description": "Validation Error", "content": { @@ -5382,18 +5585,19 @@ ] } }, - "/registries/{owner}/{type}/{name}/{digest}": { + "/plugins/{owner}/{name}/tags/{tag}": { "get": { "tags": [ - "Registries" + "Plugins" ], - "summary": "Get Package", - "operationId": "get_package", + "summary": "Get a plugin tag", + "description": "Retrieve a plugin tag by name and tag", + "operationId": "get_plugin_by_tag", "parameters": [ { "required": true, "schema": { - "title": "Registry Owner", + "title": "Owner", "type": "string" }, "name": "owner", @@ -5402,16 +5606,7 @@ { "required": true, "schema": { - "title": "Repository Type", - "type": "string" - }, - "name": "type", - "in": "path" - }, - { - "required": true, - "schema": { - "title": "Repository Name", + "title": "Name", "type": "string" }, "name": "name", @@ -5420,10 +5615,10 @@ { "required": true, "schema": { - "title": "Package Digest", + "title": "Tag", "type": "string" }, - "name": "digest", + "name": "tag", "in": "path" } ], @@ -5432,11 +5627,24 @@ "description": "Retrieved", "content": { "application/json": { - "schema": {} - }, - "application/x-tar": {} + "schema": { + "$ref": "#/components/schemas/PluginPackage" + } + } } }, + "403": { + "description": "Access forbidden" + }, + "500": { + "description": "Server error" + }, + "400": { + "description": "Invalid request" + }, + "404": { + "description": "Not found" + }, "422": { "description": "Validation Error", "content": { @@ -5458,18 +5666,19 @@ ] } }, - "/registries/{owner}/{type}/{name}/{digest}/json": { + "/plugins/{owner}/{name}/permissions": { "get": { "tags": [ - "Registries" + "Plugins" ], - "summary": "Get Package in JSON format", - "operationId": "get_package_json", - "parameters": [ + "summary": "Get plugin access permissions", + "description": "Retrieve a plugin's access permissions (must have `write` permission)", + "operationId": "get_plugin_access_permissions", + "parameters": [ { "required": true, "schema": { - "title": "Registry Owner", + "title": "Owner", "type": "string" }, "name": "owner", @@ -5478,29 +5687,65 @@ { "required": true, "schema": { - "title": "Repository Type", + "title": "Name", "type": "string" }, - "name": "type", + "name": "name", "in": "path" }, { - "required": true, + "description": "Page number starting from 1", + "required": false, "schema": { - "title": "Repository Name", - "type": "string" + "title": "Page number", + "minimum": 1.0, + "type": "integer", + "description": "Page number starting from 1", + "default": 1 }, - "name": "name", - "in": "path" + "name": "page", + "in": "query" }, { - "required": true, + "description": "Number of items per page", + "required": false, "schema": { - "title": "Package Digest", - "type": "string" + "title": "Items per page", + "maximum": 100.0, + "type": "integer", + "description": "Number of items per page", + "default": 25 }, - "name": "digest", - "in": "path" + "name": "per-page", + "in": "query" + }, + { + "description": "The type of access policy subject", + "required": false, + "schema": { + "title": "Subject Type", + "type": "array", + "items": { + "type": "string" + }, + "description": "The type of access policy subject" + }, + "name": "subject_type", + "in": "query" + }, + { + "description": "An access policy permission string", + "required": false, + "schema": { + "title": "PERMISSION", + "type": "array", + "items": { + "type": "string" + }, + "description": "An access policy permission string" + }, + "name": "permission", + "in": "query" } ], "responses": { @@ -5509,19 +5754,20 @@ "content": { "application/json": { "schema": { - "title": "Response Get Package Json Owner Type Name Digest Json Get", - "anyOf": [ - { - "$ref": "#/components/schemas/Recipe" - }, - { - "$ref": "#/components/schemas/Plugin" - } - ] + "$ref": "#/components/schemas/RepositoryAccessPolicyList" } } } }, + "403": { + "description": "Access forbidden" + }, + "500": { + "description": "Server error" + }, + "400": { + "description": "Invalid request" + }, "422": { "description": "Validation Error", "content": { @@ -5541,44 +5787,56 @@ "APIKeyAuth": [] } ] - } - }, - "/registries/{owner}/plugins": { - "post": { + }, + "delete": { "tags": [ - "Registries" + "Plugins" ], - "summary": "Push a plugin to the registry", - "operationId": "post_plugin", + "summary": "Remove a Repository permissions", + "description": "Delete a plugin's access policy (must have `admin` permission)", + "operationId": "delete_plugin_org_permission", "parameters": [ { "required": true, "schema": { - "title": "Registry Owner", + "title": "Owner", "type": "string" }, "name": "owner", "in": "path" + }, + { + "required": true, + "schema": { + "title": "Name", + "type": "string" + }, + "name": "name", + "in": "path" } ], "requestBody": { "content": { - "multipart/form-data": { + "application/json": { "schema": { - "$ref": "#/components/schemas/Body_post_plugin__owner__plugins_post" + "$ref": "#/components/schemas/RepositoryPolicySubject" } } }, "required": true }, "responses": { - "201": { - "description": "Created", - "content": { - "application/json": { - "schema": {} - } - } + "204": { + "description": "Accepted" + }, + "403": { + "description": "Access forbidden" + }, + "500": { + "description": "Server error" + }, + "400": { + "description": "Invalid request" }, "422": { "description": "Validation Error", @@ -5599,45 +5857,67 @@ "APIKeyAuth": [] } ] - } - }, - "/registries/{owner}/recipes": { - "post": { + }, + "patch": { "tags": [ - "Registries" + "Plugins" ], - "summary": "Push an Recipe to the registry", - "operationId": "post_recipe", + "summary": "Upsert a new permission to a plugin", + "description": "Upsert a plugin's access policy (must have `admin` permission)", + "operationId": "upsert_plugin_permission", "parameters": [ { "required": true, "schema": { - "title": "Registry Owner", + "title": "Owner", "type": "string" }, "name": "owner", "in": "path" + }, + { + "required": true, + "schema": { + "title": "Name", + "type": "string" + }, + "name": "name", + "in": "path" } ], "requestBody": { "content": { - "multipart/form-data": { + "application/json": { "schema": { - "$ref": "#/components/schemas/Body_post_recipe__owner__recipes_post" + "$ref": "#/components/schemas/RepositoryAccessPolicy" } } }, "required": true }, "responses": { - "201": { - "description": "Created", + "202": { + "description": "Accepted", "content": { "application/json": { - "schema": {} + "schema": { + "$ref": "#/components/schemas/UpdateAccepted" + } } } }, + "403": { + "description": "Access forbidden" + }, + "500": { + "description": "Server error" + }, + "400": { + "description": "Invalid request" + }, + "404": { + "description": "Not found" + }, "422": { "description": "Validation Error", "content": { @@ -5659,83 +5939,22 @@ ] } }, - "/projects/{owner}/{name}/jobs": { + "/registries/{owner}/index.json": { "get": { "tags": [ - "Jobs" + "Registries" ], - "summary": "List Jobs", - "description": "Retrieve a list of jobs.", - "operationId": "list_jobs", + "summary": "Get Registry Index", + "operationId": "get_registry_index", "parameters": [ { "required": true, "schema": { - "title": "Project Owner", + "title": "Registry Owner", "type": "string" }, "name": "owner", "in": "path" - }, - { - "required": true, - "schema": { - "title": "Project Name", - "type": "string" - }, - "name": "name", - "in": "path" - }, - { - "required": false, - "schema": { - "title": "Job IDs", - "type": "array", - "items": { - "type": "string" - } - }, - "name": "ids", - "in": "query" - }, - { - "required": false, - "schema": { - "title": "The status of the job", - "allOf": [ - { - "$ref": "#/components/schemas/JobStatusEnum" - } - ] - }, - "name": "status", - "in": "query" - }, - { - "description": "Page number starting from 1", - "required": false, - "schema": { - "title": "Page number", - "minimum": 1.0, - "type": "integer", - "description": "Page number starting from 1", - "default": 1 - }, - "name": "page", - "in": "query" - }, - { - "description": "Number of items per page", - "required": false, - "schema": { - "title": "Items per page", - "maximum": 100.0, - "type": "integer", - "description": "Number of items per page", - "default": 25 - }, - "name": "per-page", - "in": "query" } ], "responses": { @@ -5744,7 +5963,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CloudJobList" + "$ref": "#/components/schemas/RepositoryIndex" } } } @@ -5768,19 +5987,20 @@ "APIKeyAuth": [] } ] - }, - "post": { - "tags": [ - "Jobs" + } + }, + "/registries/{owner}/{type}/{name}/{digest}": { + "get": { + "tags": [ + "Registries" ], - "summary": "Schedule a job", - "description": "Create a new job.", - "operationId": "create_job", + "summary": "Get Package", + "operationId": "get_package", "parameters": [ { "required": true, "schema": { - "title": "Project Owner", + "title": "Registry Owner", "type": "string" }, "name": "owner", @@ -5789,50 +6009,39 @@ { "required": true, "schema": { - "title": "Project Name", + "title": "Repository Type", "type": "string" }, - "name": "name", + "name": "type", "in": "path" }, { - "required": false, + "required": true, "schema": { - "title": "Authorization", + "title": "Repository Name", "type": "string" }, - "name": "authorization", - "in": "header" + "name": "name", + "in": "path" }, { - "required": false, + "required": true, "schema": { - "title": "X-Pollination-Token", + "title": "Package Digest", "type": "string" }, - "name": "x-pollination-token", - "in": "header" + "name": "digest", + "in": "path" } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Job" - } - } - }, - "required": true - }, "responses": { - "201": { - "description": "Successful Response", + "200": { + "description": "Retrieved", "content": { "application/json": { - "schema": { - "$ref": "#/components/schemas/CreatedContent" - } - } + "schema": {} + }, + "application/x-tar": {} } }, "422": { @@ -5856,19 +6065,18 @@ ] } }, - "/projects/{owner}/{name}/jobs/{job_id}": { + "/registries/{owner}/{type}/{name}/{digest}/json": { "get": { "tags": [ - "Jobs" + "Registries" ], - "summary": "Get a Job", - "description": "Retrieve a job.", - "operationId": "get_job", + "summary": "Get Package in JSON format", + "operationId": "get_package_json", "parameters": [ { "required": true, "schema": { - "title": "Project Owner", + "title": "Registry Owner", "type": "string" }, "name": "owner", @@ -5877,7 +6085,16 @@ { "required": true, "schema": { - "title": "Project Name", + "title": "Repository Type", + "type": "string" + }, + "name": "type", + "in": "path" + }, + { + "required": true, + "schema": { + "title": "Repository Name", "type": "string" }, "name": "name", @@ -5886,11 +6103,21 @@ { "required": true, "schema": { - "title": "Job ID", + "title": "Package Digest", "type": "string" }, - "name": "job_id", + "name": "digest", "in": "path" + }, + { + "required": false, + "schema": { + "title": "Boolean toggle to return a baked recipe", + "type": "boolean", + "default": false + }, + "name": "baked", + "in": "query" } ], "responses": { @@ -5899,7 +6126,18 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CloudJob" + "title": "Response Get Package Json Owner Type Name Digest Json Get", + "anyOf": [ + { + "$ref": "#/components/schemas/Recipe" + }, + { + "$ref": "#/components/schemas/Plugin" + }, + { + "$ref": "#/components/schemas/BakedRecipe" + } + ] } } } @@ -5925,46 +6163,37 @@ ] } }, - "/projects/{owner}/{name}/jobs/{job_id}/cancel": { - "put": { + "/registries/{owner}/plugins": { + "post": { "tags": [ - "Jobs" + "Registries" ], - "summary": "Cancel a Job", - "description": "Retrieve a job.", - "operationId": "cancel_job", + "summary": "Push a plugin to the registry", + "operationId": "post_plugin", "parameters": [ { "required": true, "schema": { - "title": "Project Owner", + "title": "Registry Owner", "type": "string" }, "name": "owner", "in": "path" - }, - { - "required": true, - "schema": { - "title": "Project Name", - "type": "string" - }, - "name": "name", - "in": "path" - }, - { - "required": true, - "schema": { - "title": "Job ID", - "type": "string" - }, - "name": "job_id", - "in": "path" } ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "$ref": "#/components/schemas/Body_post_plugin__owner__plugins_post" + } + } + }, + "required": true + }, "responses": { - "202": { - "description": "Accepted", + "201": { + "description": "Created", "content": { "application/json": { "schema": {} @@ -5992,95 +6221,40 @@ ] } }, - "/projects/{owner}/{name}/jobs/{job_id}/artifacts": { - "get": { + "/registries/{owner}/recipes": { + "post": { "tags": [ - "Jobs" + "Registries" ], - "summary": "List files/folders in a job folder", - "description": "Retrieve a list of artifacts in a job folder", - "operationId": "search_job_folder", + "summary": "Push an Recipe to the registry", + "operationId": "post_recipe", "parameters": [ { "required": true, "schema": { - "title": "Project Owner", + "title": "Registry Owner", "type": "string" }, "name": "owner", "in": "path" - }, - { - "required": true, - "schema": { - "title": "Project Name", - "type": "string" - }, - "name": "name", - "in": "path" - }, - { - "required": true, - "schema": { - "title": "Job ID", - "type": "string" - }, - "name": "job_id", - "in": "path" - }, - { - "description": "The path to an file within a project folder", - "required": false, - "schema": { - "title": "Project File Path", - "type": "array", - "items": { - "type": "string" - }, - "description": "The path to an file within a project folder" - }, - "name": "path", - "in": "query" - }, - { - "description": "Page number starting from 1", - "required": false, - "schema": { - "title": "Page number", - "minimum": 1.0, - "type": "integer", - "description": "Page number starting from 1", - "default": 1 - }, - "name": "page", - "in": "query" - }, - { - "description": "Number of items per page", - "required": false, - "schema": { - "title": "Items per page", - "maximum": 100.0, - "type": "integer", - "description": "Number of items per page", - "default": 25 - }, - "name": "per-page", - "in": "query" } ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "$ref": "#/components/schemas/Body_post_recipe__owner__recipes_post" + } + } + }, + "required": true + }, "responses": { - "200": { - "description": "Retrieved", + "201": { + "description": "Created", "content": { "application/json": { - "schema": { - "title": "Response Search Job Folder Projects Owner Name Jobs Job Id Artifacts Get", - "type": "array", - "items": { - "$ref": "#/components/schemas/FileMeta" - } - } + "schema": {} } } }, @@ -6105,74 +6279,34 @@ ] } }, - "/projects/{owner}/{name}/jobs/{job_id}/artifacts/download": { + "/payments/{account_name}/methods": { "get": { "tags": [ - "Jobs" + "Payments" ], - "summary": "Download an artifact from the job folder", - "description": "Get a download link for an artifact in a job folder", - "operationId": "download_job_artifact", + "summary": "Get Payment Methods", + "operationId": "list_payment_methods", "parameters": [ { "required": true, "schema": { - "title": "Project Owner", + "title": "Account Name", "type": "string" }, - "name": "owner", + "name": "account_name", "in": "path" - }, - { - "required": true, - "schema": { - "title": "Project Name", - "type": "string" - }, - "name": "name", - "in": "path" - }, - { - "required": true, - "schema": { - "title": "Job id", - "type": "string" - }, - "name": "job_id", - "in": "path" - }, - { - "description": "The path to an file within a project folder", - "required": false, - "schema": { - "title": "Project File Path", - "type": "string", - "description": "The path to an file within a project folder" - }, - "name": "path", - "in": "query" - } - ], - "responses": { - "200": { - "description": "Retrieved", - "content": { - "application/json": { - "schema": {} - } - } - }, - "403": { - "description": "Access forbidden" - }, - "500": { - "description": "Server error" - }, - "400": { - "description": "Invalid request" - }, - "404": { - "description": "Not found" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PaymentMethodList" + } + } + } }, "422": { "description": "Validation Error", @@ -6193,94 +6327,41 @@ "APIKeyAuth": [] } ] - } - }, - "/projects/{owner}/{name}/results": { - "get": { + }, + "post": { "tags": [ - "Runs" + "Payments" ], - "summary": "Query run results", - "description": "Retrieve a list of run results.", - "operationId": "query_results", + "summary": "Add Payment Method", + "operationId": "create_payment_method", "parameters": [ { "required": true, "schema": { - "title": "Project Owner", - "type": "string" - }, - "name": "owner", - "in": "path" - }, - { - "required": true, - "schema": { - "title": "Project Name", + "title": "Account Name", "type": "string" }, - "name": "name", + "name": "account_name", "in": "path" - }, - { - "required": false, - "schema": { - "title": "Job IDs", - "type": "array", - "items": { - "type": "string" - } - }, - "name": "job_id", - "in": "query" - }, - { - "required": false, - "schema": { - "title": "The status of the job", - "allOf": [ - { - "$ref": "#/components/schemas/RunStatusEnum" - } - ] - }, - "name": "status", - "in": "query" - }, - { - "description": "Page number starting from 1", - "required": false, - "schema": { - "title": "Page number", - "minimum": 1.0, - "type": "integer", - "description": "Page number starting from 1", - "default": 1 - }, - "name": "page", - "in": "query" - }, - { - "description": "Number of items per page", - "required": false, - "schema": { - "title": "Items per page", - "maximum": 100.0, - "type": "integer", - "description": "Number of items per page", - "default": 25 - }, - "name": "per-page", - "in": "query" } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PaymentCreate" + } + } + }, + "required": true + }, "responses": { "200": { - "description": "Retrieved", + "description": "Successful Response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/RunResultList" + "$ref": "#/components/schemas/PaymentSetup" } } } @@ -6306,92 +6387,31 @@ ] } }, - "/projects/{owner}/{name}/runs": { + "/payments/{account_name}/methods/default": { "get": { "tags": [ - "Runs" + "Payments" ], - "summary": "List runs", - "description": "Retrieve a list of runs.", - "operationId": "list_runs", + "summary": "Get Default Payment Method", + "operationId": "get_default_payment_method", "parameters": [ { "required": true, "schema": { - "title": "Project Owner", - "type": "string" - }, - "name": "owner", - "in": "path" - }, - { - "required": true, - "schema": { - "title": "Project Name", + "title": "Account Name", "type": "string" }, - "name": "name", + "name": "account_name", "in": "path" - }, - { - "required": false, - "schema": { - "title": "Job IDs", - "type": "array", - "items": { - "type": "string" - } - }, - "name": "job_id", - "in": "query" - }, - { - "required": false, - "schema": { - "title": "The status of the job", - "allOf": [ - { - "$ref": "#/components/schemas/RunStatusEnum" - } - ] - }, - "name": "status", - "in": "query" - }, - { - "description": "Page number starting from 1", - "required": false, - "schema": { - "title": "Page number", - "minimum": 1.0, - "type": "integer", - "description": "Page number starting from 1", - "default": 1 - }, - "name": "page", - "in": "query" - }, - { - "description": "Number of items per page", - "required": false, - "schema": { - "title": "Items per page", - "maximum": 100.0, - "type": "integer", - "description": "Number of items per page", - "default": 25 - }, - "name": "per-page", - "in": "query" } ], "responses": { "200": { - "description": "Retrieved", + "description": "Successful Response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/RunList" + "$ref": "#/components/schemas/CardPublic" } } } @@ -6417,50 +6437,53 @@ ] } }, - "/projects/{owner}/{name}/runs/{run_id}": { + "/payments/inventory": { "get": { "tags": [ - "Runs" + "Payments" ], - "summary": "Get a Run", - "description": "Retrieve a run.", - "operationId": "get_run", + "summary": "Get Unfiltered Inventory", + "operationId": "get_unfiltered_inventory", + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Inventory" + } + } + } + } + }, + "deprecated": true + } + }, + "/payments/{account_name}/inventory": { + "get": { + "tags": [ + "Payments" + ], + "summary": "Get Inventory", + "operationId": "get_inventory", "parameters": [ { "required": true, "schema": { - "title": "Project Owner", - "type": "string" - }, - "name": "owner", - "in": "path" - }, - { - "required": true, - "schema": { - "title": "Project Name", - "type": "string" - }, - "name": "name", - "in": "path" - }, - { - "required": true, - "schema": { - "title": "Run ID", + "title": "Account Name", "type": "string" }, - "name": "run_id", + "name": "account_name", "in": "path" } ], "responses": { "200": { - "description": "Retrieved", + "description": "Successful Response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Run" + "$ref": "#/components/schemas/Inventory" } } } @@ -6486,49 +6509,42 @@ ] } }, - "/projects/{owner}/{name}/runs/{run_id}/cancel": { - "put": { + "/payments/{account_name}/subscribe": { + "post": { "tags": [ - "Runs" + "Payments" ], - "summary": "Cancel a run", - "description": "Stop a run.", - "operationId": "cancel_run", + "summary": "Subscribe", + "operationId": "subscribe", "parameters": [ { "required": true, "schema": { - "title": "Project Owner", - "type": "string" - }, - "name": "owner", - "in": "path" - }, - { - "required": true, - "schema": { - "title": "Project Name", - "type": "string" - }, - "name": "name", - "in": "path" - }, - { - "required": true, - "schema": { - "title": "Run id.", + "title": "Account Name", "type": "string" }, - "name": "run_id", + "name": "account_name", "in": "path" } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Subscribe" + } + } + }, + "required": true + }, "responses": { - "202": { - "description": "Accepted", + "200": { + "description": "Successful Response", "content": { "application/json": { - "schema": {} + "schema": { + "$ref": "#/components/schemas/CreatedContent" + } } } }, @@ -6553,73 +6569,35 @@ ] } }, - "/projects/{owner}/{name}/runs/{run_id}/outputs/{output_name}": { + "/payments/{account_name}/subscription": { "get": { "tags": [ - "Runs" + "Payments" ], - "summary": "Get run output by name", - "description": "get run output by name", - "operationId": "get_run_output", + "summary": "Get Subscription", + "operationId": "get_subscription", "parameters": [ { "required": true, "schema": { - "title": "Project Owner", - "type": "string" - }, - "name": "owner", - "in": "path" - }, - { - "required": true, - "schema": { - "title": "Project Name", - "type": "string" - }, - "name": "name", - "in": "path" - }, - { - "required": true, - "schema": { - "title": "Run ID", - "type": "string" - }, - "name": "run_id", - "in": "path" - }, - { - "required": true, - "schema": { - "title": "Output Name", + "title": "Account Name", "type": "string" }, - "name": "output_name", + "name": "account_name", "in": "path" } ], "responses": { "200": { - "description": "Retrieved", + "description": "Successful Response", "content": { "application/json": { - "schema": {} + "schema": { + "$ref": "#/components/schemas/Subscription" + } } } }, - "403": { - "description": "Access forbidden" - }, - "500": { - "description": "Server error" - }, - "400": { - "description": "Invalid request" - }, - "404": { - "description": "Not found" - }, "422": { "description": "Validation Error", "content": { @@ -6639,121 +6617,99 @@ "APIKeyAuth": [] } ] - } - }, - "/projects/{owner}/{name}/runs/{run_id}/steps": { - "get": { + }, + "put": { "tags": [ - "Runs" + "Payments" ], - "summary": "Query the steps of a run", - "description": "list run steps", - "operationId": "get_run_steps", + "summary": "Update Subscription", + "operationId": "update_subscription", "parameters": [ { "required": true, "schema": { - "title": "Project Owner", - "type": "string" - }, - "name": "owner", - "in": "path" - }, - { - "required": true, - "schema": { - "title": "Project Name", - "type": "string" - }, - "name": "name", - "in": "path" - }, - { - "required": true, - "schema": { - "title": "Run id.", + "title": "Account Name", "type": "string" }, - "name": "run_id", + "name": "account_name", "in": "path" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SubscriptionUpdate" + } + } }, - { - "required": false, - "schema": { - "title": "The status of the task", - "allOf": [ - { - "$ref": "#/components/schemas/StepStatusEnum" + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Subscription" } - ] - }, - "name": "status", - "in": "query" - }, - { - "required": false, - "schema": { - "title": "The specific step IDs to retrieve", - "type": "array", - "items": { - "type": "string" } - }, - "name": "step_id", - "in": "query" - }, - { - "required": false, - "schema": { - "title": "The newest run generation to retrieve steps from", - "type": "string" - }, - "name": "until_generation", - "in": "query" + } }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ { - "required": false, - "schema": { - "title": "The oldest run generation to retrieve steps from", - "type": "string" - }, - "name": "since_generation", - "in": "query" + "JWTAuth": [] }, { - "description": "Page number starting from 1", - "required": false, - "schema": { - "title": "Page number", - "minimum": 1.0, - "type": "integer", - "description": "Page number starting from 1", - "default": 1 - }, - "name": "page", - "in": "query" - }, + "APIKeyAuth": [] + } + ] + }, + "post": { + "tags": [ + "Payments" + ], + "summary": "Create Subscription", + "operationId": "create_subscription", + "parameters": [ { - "description": "Number of items per page", - "required": false, + "required": true, "schema": { - "title": "Items per page", - "maximum": 100.0, - "type": "integer", - "description": "Number of items per page", - "default": 25 + "title": "Account Name", + "type": "string" }, - "name": "per-page", - "in": "query" + "name": "account_name", + "in": "path" } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SubscriptionCreate" + } + } + }, + "required": true + }, "responses": { "200": { - "description": "Retrieved", + "description": "Successful Response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/StepList" + "$ref": "#/components/schemas/CreatedContent" } } } @@ -6769,6 +6725,7 @@ } } }, + "deprecated": true, "security": [ { "JWTAuth": [] @@ -6777,62 +6734,139 @@ "APIKeyAuth": [] } ] - } - }, - "/projects/{owner}/{name}/runs/{run_id}/steps/{step_id}/logs": { - "get": { + }, + "delete": { "tags": [ - "Runs" + "Payments" ], - "summary": "Get the logs of a specific step of the run", - "description": "get run step logs", - "operationId": "get_run_step_logs", + "summary": "Cancel Subscription", + "operationId": "cancel_subscription", "parameters": [ { "required": true, "schema": { - "title": "Project Owner", + "title": "Account Name", "type": "string" }, - "name": "owner", - "in": "path" - }, - { - "required": true, - "schema": { - "title": "Project Name", - "type": "string" - }, - "name": "name", + "name": "account_name", "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": {} + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "JWTAuth": [] }, + { + "APIKeyAuth": [] + } + ] + } + }, + "/payments/{account_name}/subscription/upcoming": { + "get": { + "tags": [ + "Payments" + ], + "summary": "Get Upcoming Subscription", + "operationId": "get_upcoming_subscription", + "parameters": [ { "required": true, "schema": { - "title": "Run id.", + "title": "Account Name", "type": "string" }, - "name": "run_id", + "name": "account_name", "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Subscription" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "JWTAuth": [] }, + { + "APIKeyAuth": [] + } + ] + } + }, + "/payments/{account_name}/subscription/preview": { + "put": { + "tags": [ + "Payments" + ], + "summary": "Preview Update Subscription", + "operationId": "preview_update_subscription", + "parameters": [ { "required": true, "schema": { - "title": "Run Task name.", + "title": "Account Name", "type": "string" }, - "name": "step_id", + "name": "account_name", "in": "path" } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SubscriptionUpdate" + } + } + }, + "required": true + }, "responses": { "200": { - "description": "Retrieved", + "description": "Successful Response", "content": { "application/json": { "schema": { - "title": "Response Get Step Logs Projects Owner Name Runs Run Id Steps Step Id Logs Get", - "type": "string" + "$ref": "#/components/schemas/UpdateInvoicePreview" } } } @@ -6858,67 +6892,98 @@ ] } }, - "/projects/{owner}/{name}/runs/{run_id}/artifacts": { + "/payments/{account_name}/invoices/next": { "get": { "tags": [ - "Runs" + "Payments" ], - "summary": "List artifacts in a run folder", - "description": "Retrieve a list of artifacts in a run folder", - "operationId": "list_run_artifacts", + "summary": "Get Next Invoice", + "operationId": "get_next_invoice", "parameters": [ { "required": true, "schema": { - "title": "Project Owner", + "title": "Account Name", "type": "string" }, - "name": "owner", + "name": "account_name", "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InvoicePreview" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "JWTAuth": [] }, + { + "APIKeyAuth": [] + } + ] + } + }, + "/payments/{account_name}/invoices": { + "get": { + "tags": [ + "Payments" + ], + "summary": "Get Invoice List", + "operationId": "get_invoice_list", + "parameters": [ { "required": true, "schema": { - "title": "Project Name", + "title": "Account Name", "type": "string" }, - "name": "name", + "name": "account_name", "in": "path" }, { - "required": true, + "required": false, "schema": { - "title": "Run id.", + "title": "ID of resource after which to start the list", "type": "string" }, - "name": "run_id", - "in": "path" + "name": "starting_after", + "in": "query" }, { - "description": "The path to an file within a project folder", "required": false, "schema": { - "title": "Project File Path", - "type": "array", - "items": { - "type": "string" - }, - "description": "The path to an file within a project folder" + "title": "ID of resource before which to end the list", + "type": "string" }, - "name": "path", + "name": "ending_before", "in": "query" }, { - "description": "Page number starting from 1", "required": false, "schema": { - "title": "Page number", - "minimum": 1.0, - "type": "integer", - "description": "Page number starting from 1", - "default": 1 + "title": "Number of resources per page", + "type": "integer" }, - "name": "page", + "name": "limit", "in": "query" }, { @@ -6937,15 +7002,11 @@ ], "responses": { "200": { - "description": "Retrieved", + "description": "Successful Response", "content": { "application/json": { "schema": { - "title": "Response Get List Artifacts Projects Owner Name Runs Run Id Artifacts Get", - "type": "array", - "items": { - "$ref": "#/components/schemas/FileMeta" - } + "$ref": "#/components/schemas/InvoiceList" } } } @@ -6961,7 +7022,6 @@ } } }, - "deprecated": true, "security": [ { "JWTAuth": [] @@ -6972,75 +7032,85 @@ ] } }, - "/projects/{owner}/{name}/runs/{run_id}/artifacts/download": { + "/payments/{account_name}/failed": { "get": { "tags": [ - "Runs" + "Payments" ], - "summary": "Download an artifact from the run folder", - "description": "Get a download link for an artifact in a run folder", - "operationId": "download_run_artifact", + "summary": "Get Failed Payment", + "operationId": "get_failed_payment", "parameters": [ { "required": true, "schema": { - "title": "Project Owner", + "title": "Account Name", "type": "string" }, - "name": "owner", + "name": "account_name", "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PaymentIntent" + } + } + } }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ { - "required": true, - "schema": { - "title": "Project Name", - "type": "string" - }, - "name": "name", - "in": "path" + "JWTAuth": [] }, + { + "APIKeyAuth": [] + } + ] + } + }, + "/payments/{account_name}/status": { + "get": { + "tags": [ + "Payments" + ], + "summary": "Get Status", + "operationId": "get_status", + "parameters": [ { "required": true, "schema": { - "title": "Run id.", + "title": "Account Name", "type": "string" }, - "name": "run_id", + "name": "account_name", "in": "path" - }, - { - "description": "The path to an file within a project folder", - "required": false, - "schema": { - "title": "Project File Path", - "type": "string", - "description": "The path to an file within a project folder" - }, - "name": "path", - "in": "query" } ], "responses": { "200": { - "description": "Retrieved", + "description": "Successful Response", "content": { "application/json": { - "schema": {} + "schema": { + "$ref": "#/components/schemas/Status" + } } } }, - "403": { - "description": "Access forbidden" - }, - "500": { - "description": "Server error" - }, - "400": { - "description": "Invalid request" - }, - "404": { - "description": "Not found" - }, "422": { "description": "Validation Error", "content": { @@ -7052,7 +7122,6 @@ } } }, - "deprecated": true, "security": [ { "JWTAuth": [] @@ -7062,62 +7131,4332 @@ } ] } - } - }, - "components": { + }, + "/subscriptions/{account_name}": { + "get": { + "tags": [ + "Subscriptions" + ], + "summary": "Get Subscription", + "operationId": "get_pollination_subscription", + "parameters": [ + { + "required": true, + "schema": { + "title": "Account Name", + "type": "string" + }, + "name": "account_name", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PollinationSubscription" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "JWTAuth": [] + }, + { + "APIKeyAuth": [] + } + ] + } + }, + "/subscriptions/{account_name}/upcoming": { + "get": { + "tags": [ + "Subscriptions" + ], + "summary": "Get Upcoming Subscription", + "operationId": "get_upcoming_pollination_subscription", + "parameters": [ + { + "required": true, + "schema": { + "title": "Account Name", + "type": "string" + }, + "name": "account_name", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PollinationSubscription" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "JWTAuth": [] + }, + { + "APIKeyAuth": [] + } + ] + } + }, + "/projects/{owner}/{name}/jobs": { + "get": { + "tags": [ + "Jobs" + ], + "summary": "List Jobs", + "description": "Retrieve a list of jobs.", + "operationId": "list_jobs", + "parameters": [ + { + "required": true, + "schema": { + "title": "Project Owner", + "type": "string" + }, + "name": "owner", + "in": "path" + }, + { + "required": true, + "schema": { + "title": "Project Name", + "type": "string" + }, + "name": "name", + "in": "path" + }, + { + "required": false, + "schema": { + "title": "Job IDs", + "type": "array", + "items": { + "type": "string" + } + }, + "name": "ids", + "in": "query" + }, + { + "required": false, + "schema": { + "title": "The status of the job", + "allOf": [ + { + "$ref": "#/components/schemas/JobStatusEnum" + } + ] + }, + "name": "status", + "in": "query" + }, + { + "description": "Page number starting from 1", + "required": false, + "schema": { + "title": "Page number", + "minimum": 1.0, + "type": "integer", + "description": "Page number starting from 1", + "default": 1 + }, + "name": "page", + "in": "query" + }, + { + "description": "Number of items per page", + "required": false, + "schema": { + "title": "Items per page", + "maximum": 100.0, + "type": "integer", + "description": "Number of items per page", + "default": 25 + }, + "name": "per-page", + "in": "query" + } + ], + "responses": { + "200": { + "description": "Retrieved", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CloudJobList" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "JWTAuth": [] + }, + { + "APIKeyAuth": [] + } + ] + }, + "post": { + "tags": [ + "Jobs" + ], + "summary": "Schedule a job", + "description": "Create a new job.", + "operationId": "create_job", + "parameters": [ + { + "required": true, + "schema": { + "title": "Project Owner", + "type": "string" + }, + "name": "owner", + "in": "path" + }, + { + "required": true, + "schema": { + "title": "Project Name", + "type": "string" + }, + "name": "name", + "in": "path" + }, + { + "required": false, + "schema": { + "title": "Authorization", + "type": "string" + }, + "name": "authorization", + "in": "header" + }, + { + "required": false, + "schema": { + "title": "X-Pollination-Token", + "type": "string" + }, + "name": "x-pollination-token", + "in": "header" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Job" + } + } + }, + "required": true + }, + "responses": { + "201": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreatedContent" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "JWTAuth": [] + }, + { + "APIKeyAuth": [] + } + ] + } + }, + "/projects/{owner}/{name}/jobs/{job_id}": { + "get": { + "tags": [ + "Jobs" + ], + "summary": "Get a Job", + "description": "Retrieve a job.", + "operationId": "get_job", + "parameters": [ + { + "required": true, + "schema": { + "title": "Project Owner", + "type": "string" + }, + "name": "owner", + "in": "path" + }, + { + "required": true, + "schema": { + "title": "Project Name", + "type": "string" + }, + "name": "name", + "in": "path" + }, + { + "required": true, + "schema": { + "title": "Job ID", + "type": "string" + }, + "name": "job_id", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Retrieved", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CloudJob" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "JWTAuth": [] + }, + { + "APIKeyAuth": [] + } + ] + }, + "delete": { + "tags": [ + "Jobs" + ], + "summary": "Delete a Job", + "description": "Delete a job.", + "operationId": "delete_job", + "parameters": [ + { + "required": true, + "schema": { + "title": "Project Owner", + "type": "string" + }, + "name": "owner", + "in": "path" + }, + { + "required": true, + "schema": { + "title": "Project Name", + "type": "string" + }, + "name": "name", + "in": "path" + }, + { + "required": true, + "schema": { + "title": "Job ID", + "type": "string" + }, + "name": "job_id", + "in": "path" + } + ], + "responses": { + "202": { + "description": "Accepted", + "content": { + "application/json": { + "schema": {} + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "JWTAuth": [] + }, + { + "APIKeyAuth": [] + } + ] + } + }, + "/projects/{owner}/{name}/jobs/{job_id}/cancel": { + "put": { + "tags": [ + "Jobs" + ], + "summary": "Cancel a Job", + "description": "Retrieve a job.", + "operationId": "cancel_job", + "parameters": [ + { + "required": true, + "schema": { + "title": "Project Owner", + "type": "string" + }, + "name": "owner", + "in": "path" + }, + { + "required": true, + "schema": { + "title": "Project Name", + "type": "string" + }, + "name": "name", + "in": "path" + }, + { + "required": true, + "schema": { + "title": "Job ID", + "type": "string" + }, + "name": "job_id", + "in": "path" + } + ], + "responses": { + "202": { + "description": "Accepted", + "content": { + "application/json": { + "schema": {} + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "JWTAuth": [] + }, + { + "APIKeyAuth": [] + } + ] + } + }, + "/projects/{owner}/{name}/jobs/{job_id}/artifacts": { + "get": { + "tags": [ + "Jobs" + ], + "summary": "List files/folders in a job folder", + "description": "Retrieve a list of artifacts in a job folder", + "operationId": "search_job_folder", + "parameters": [ + { + "required": true, + "schema": { + "title": "Project Owner", + "type": "string" + }, + "name": "owner", + "in": "path" + }, + { + "required": true, + "schema": { + "title": "Project Name", + "type": "string" + }, + "name": "name", + "in": "path" + }, + { + "required": true, + "schema": { + "title": "Job ID", + "type": "string" + }, + "name": "job_id", + "in": "path" + }, + { + "description": "The path to an file within a project folder", + "required": false, + "schema": { + "title": "Project File Path", + "type": "array", + "items": { + "type": "string" + }, + "description": "The path to an file within a project folder" + }, + "name": "path", + "in": "query" + }, + { + "description": "Page number starting from 1", + "required": false, + "schema": { + "title": "Page number", + "minimum": 1.0, + "type": "integer", + "description": "Page number starting from 1", + "default": 1 + }, + "name": "page", + "in": "query" + }, + { + "description": "Number of items per page", + "required": false, + "schema": { + "title": "Items per page", + "maximum": 100.0, + "type": "integer", + "description": "Number of items per page", + "default": 25 + }, + "name": "per-page", + "in": "query" + } + ], + "responses": { + "200": { + "description": "Retrieved", + "content": { + "application/json": { + "schema": { + "title": "Response Search Job Folder Projects Owner Name Jobs Job Id Artifacts Get", + "type": "array", + "items": { + "$ref": "#/components/schemas/FileMeta" + } + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "JWTAuth": [] + }, + { + "APIKeyAuth": [] + } + ] + } + }, + "/projects/{owner}/{name}/jobs/{job_id}/artifacts/download": { + "get": { + "tags": [ + "Jobs" + ], + "summary": "Download an artifact from the job folder", + "description": "Get a download link for an artifact in a job folder", + "operationId": "download_job_artifact", + "parameters": [ + { + "required": true, + "schema": { + "title": "Project Owner", + "type": "string" + }, + "name": "owner", + "in": "path" + }, + { + "required": true, + "schema": { + "title": "Project Name", + "type": "string" + }, + "name": "name", + "in": "path" + }, + { + "required": true, + "schema": { + "title": "Job id", + "type": "string" + }, + "name": "job_id", + "in": "path" + }, + { + "description": "The path to an file within a project folder", + "required": false, + "schema": { + "title": "Project File Path", + "type": "string", + "description": "The path to an file within a project folder" + }, + "name": "path", + "in": "query" + } + ], + "responses": { + "200": { + "description": "Retrieved", + "content": { + "application/json": { + "schema": {} + } + } + }, + "403": { + "description": "Access forbidden" + }, + "500": { + "description": "Server error" + }, + "400": { + "description": "Invalid request" + }, + "404": { + "description": "Not found" + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "JWTAuth": [] + }, + { + "APIKeyAuth": [] + } + ] + } + }, + "/projects/{owner}/{name}/results": { + "get": { + "tags": [ + "Runs" + ], + "summary": "Query run results", + "description": "Retrieve a list of run results.", + "operationId": "query_results", + "parameters": [ + { + "required": true, + "schema": { + "title": "Project Owner", + "type": "string" + }, + "name": "owner", + "in": "path" + }, + { + "required": true, + "schema": { + "title": "Project Name", + "type": "string" + }, + "name": "name", + "in": "path" + }, + { + "required": false, + "schema": { + "title": "Job IDs", + "type": "array", + "items": { + "type": "string" + } + }, + "name": "job_id", + "in": "query" + }, + { + "required": false, + "schema": { + "title": "The status of the job", + "allOf": [ + { + "$ref": "#/components/schemas/RunStatusEnum" + } + ] + }, + "name": "status", + "in": "query" + }, + { + "description": "Page number starting from 1", + "required": false, + "schema": { + "title": "Page number", + "minimum": 1.0, + "type": "integer", + "description": "Page number starting from 1", + "default": 1 + }, + "name": "page", + "in": "query" + }, + { + "description": "Number of items per page", + "required": false, + "schema": { + "title": "Items per page", + "maximum": 100.0, + "type": "integer", + "description": "Number of items per page", + "default": 25 + }, + "name": "per-page", + "in": "query" + } + ], + "responses": { + "200": { + "description": "Retrieved", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RunResultList" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "JWTAuth": [] + }, + { + "APIKeyAuth": [] + } + ] + } + }, + "/projects/{owner}/{name}/runs": { + "get": { + "tags": [ + "Runs" + ], + "summary": "List runs", + "description": "Retrieve a list of runs.", + "operationId": "list_runs", + "parameters": [ + { + "required": true, + "schema": { + "title": "Project Owner", + "type": "string" + }, + "name": "owner", + "in": "path" + }, + { + "required": true, + "schema": { + "title": "Project Name", + "type": "string" + }, + "name": "name", + "in": "path" + }, + { + "required": false, + "schema": { + "title": "Job IDs", + "type": "array", + "items": { + "type": "string" + } + }, + "name": "job_id", + "in": "query" + }, + { + "required": false, + "schema": { + "title": "The status of the job", + "allOf": [ + { + "$ref": "#/components/schemas/RunStatusEnum" + } + ] + }, + "name": "status", + "in": "query" + }, + { + "description": "Page number starting from 1", + "required": false, + "schema": { + "title": "Page number", + "minimum": 1.0, + "type": "integer", + "description": "Page number starting from 1", + "default": 1 + }, + "name": "page", + "in": "query" + }, + { + "description": "Number of items per page", + "required": false, + "schema": { + "title": "Items per page", + "maximum": 100.0, + "type": "integer", + "description": "Number of items per page", + "default": 25 + }, + "name": "per-page", + "in": "query" + } + ], + "responses": { + "200": { + "description": "Retrieved", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RunList" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "JWTAuth": [] + }, + { + "APIKeyAuth": [] + } + ] + } + }, + "/projects/{owner}/{name}/runs/{run_id}": { + "get": { + "tags": [ + "Runs" + ], + "summary": "Get a Run", + "description": "Retrieve a run.", + "operationId": "get_run", + "parameters": [ + { + "required": true, + "schema": { + "title": "Project Owner", + "type": "string" + }, + "name": "owner", + "in": "path" + }, + { + "required": true, + "schema": { + "title": "Project Name", + "type": "string" + }, + "name": "name", + "in": "path" + }, + { + "required": true, + "schema": { + "title": "Run ID", + "type": "string" + }, + "name": "run_id", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Retrieved", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Run" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "JWTAuth": [] + }, + { + "APIKeyAuth": [] + } + ] + } + }, + "/projects/{owner}/{name}/runs/{run_id}/cancel": { + "put": { + "tags": [ + "Runs" + ], + "summary": "Cancel a run", + "description": "Stop a run.", + "operationId": "cancel_run", + "parameters": [ + { + "required": true, + "schema": { + "title": "Project Owner", + "type": "string" + }, + "name": "owner", + "in": "path" + }, + { + "required": true, + "schema": { + "title": "Project Name", + "type": "string" + }, + "name": "name", + "in": "path" + }, + { + "required": true, + "schema": { + "title": "Run id.", + "type": "string" + }, + "name": "run_id", + "in": "path" + } + ], + "responses": { + "202": { + "description": "Accepted", + "content": { + "application/json": { + "schema": {} + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "JWTAuth": [] + }, + { + "APIKeyAuth": [] + } + ] + } + }, + "/projects/{owner}/{name}/runs/{run_id}/outputs/{output_name}": { + "get": { + "tags": [ + "Runs" + ], + "summary": "Get run output by name", + "description": "get run output by name", + "operationId": "get_run_output", + "parameters": [ + { + "required": true, + "schema": { + "title": "Project Owner", + "type": "string" + }, + "name": "owner", + "in": "path" + }, + { + "required": true, + "schema": { + "title": "Project Name", + "type": "string" + }, + "name": "name", + "in": "path" + }, + { + "required": true, + "schema": { + "title": "Run ID", + "type": "string" + }, + "name": "run_id", + "in": "path" + }, + { + "required": true, + "schema": { + "title": "Output Name", + "type": "string" + }, + "name": "output_name", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Retrieved", + "content": { + "application/json": { + "schema": {} + } + } + }, + "403": { + "description": "Access forbidden" + }, + "500": { + "description": "Server error" + }, + "400": { + "description": "Invalid request" + }, + "404": { + "description": "Not found" + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "JWTAuth": [] + }, + { + "APIKeyAuth": [] + } + ] + } + }, + "/projects/{owner}/{name}/runs/{run_id}/steps": { + "get": { + "tags": [ + "Runs" + ], + "summary": "Query the steps of a run", + "description": "list run steps", + "operationId": "get_run_steps", + "parameters": [ + { + "required": true, + "schema": { + "title": "Project Owner", + "type": "string" + }, + "name": "owner", + "in": "path" + }, + { + "required": true, + "schema": { + "title": "Project Name", + "type": "string" + }, + "name": "name", + "in": "path" + }, + { + "required": true, + "schema": { + "title": "Run id.", + "type": "string" + }, + "name": "run_id", + "in": "path" + }, + { + "required": false, + "schema": { + "title": "The status of the task", + "allOf": [ + { + "$ref": "#/components/schemas/StepStatusEnum" + } + ] + }, + "name": "status", + "in": "query" + }, + { + "required": false, + "schema": { + "title": "The specific step IDs to retrieve", + "type": "array", + "items": { + "type": "string" + } + }, + "name": "step_id", + "in": "query" + }, + { + "required": false, + "schema": { + "title": "The newest run generation to retrieve steps from", + "type": "string" + }, + "name": "until_generation", + "in": "query" + }, + { + "required": false, + "schema": { + "title": "The oldest run generation to retrieve steps from", + "type": "string" + }, + "name": "since_generation", + "in": "query" + }, + { + "description": "Page number starting from 1", + "required": false, + "schema": { + "title": "Page number", + "minimum": 1.0, + "type": "integer", + "description": "Page number starting from 1", + "default": 1 + }, + "name": "page", + "in": "query" + }, + { + "description": "Number of items per page", + "required": false, + "schema": { + "title": "Items per page", + "maximum": 100.0, + "type": "integer", + "description": "Number of items per page", + "default": 25 + }, + "name": "per-page", + "in": "query" + } + ], + "responses": { + "200": { + "description": "Retrieved", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/StepList" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "JWTAuth": [] + }, + { + "APIKeyAuth": [] + } + ] + } + }, + "/projects/{owner}/{name}/runs/{run_id}/steps/{step_id}/logs": { + "get": { + "tags": [ + "Runs" + ], + "summary": "Get the logs of a specific step of the run", + "description": "get run step logs", + "operationId": "get_run_step_logs", + "parameters": [ + { + "required": true, + "schema": { + "title": "Project Owner", + "type": "string" + }, + "name": "owner", + "in": "path" + }, + { + "required": true, + "schema": { + "title": "Project Name", + "type": "string" + }, + "name": "name", + "in": "path" + }, + { + "required": true, + "schema": { + "title": "Run id.", + "type": "string" + }, + "name": "run_id", + "in": "path" + }, + { + "required": true, + "schema": { + "title": "Run Task name.", + "type": "string" + }, + "name": "step_id", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Retrieved", + "content": { + "application/json": { + "schema": { + "title": "Response Get Step Logs Projects Owner Name Runs Run Id Steps Step Id Logs Get", + "type": "string" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "JWTAuth": [] + }, + { + "APIKeyAuth": [] + } + ] + } + }, + "/projects/{owner}/{name}/runs/{run_id}/artifacts": { + "get": { + "tags": [ + "Runs" + ], + "summary": "List artifacts in a run folder", + "description": "Retrieve a list of artifacts in a run folder", + "operationId": "list_run_artifacts", + "parameters": [ + { + "required": true, + "schema": { + "title": "Project Owner", + "type": "string" + }, + "name": "owner", + "in": "path" + }, + { + "required": true, + "schema": { + "title": "Project Name", + "type": "string" + }, + "name": "name", + "in": "path" + }, + { + "required": true, + "schema": { + "title": "Run id.", + "type": "string" + }, + "name": "run_id", + "in": "path" + }, + { + "description": "The path to an file within a project folder", + "required": false, + "schema": { + "title": "Project File Path", + "type": "array", + "items": { + "type": "string" + }, + "description": "The path to an file within a project folder" + }, + "name": "path", + "in": "query" + }, + { + "description": "Page number starting from 1", + "required": false, + "schema": { + "title": "Page number", + "minimum": 1.0, + "type": "integer", + "description": "Page number starting from 1", + "default": 1 + }, + "name": "page", + "in": "query" + }, + { + "description": "Number of items per page", + "required": false, + "schema": { + "title": "Items per page", + "maximum": 100.0, + "type": "integer", + "description": "Number of items per page", + "default": 25 + }, + "name": "per-page", + "in": "query" + } + ], + "responses": { + "200": { + "description": "Retrieved", + "content": { + "application/json": { + "schema": { + "title": "Response Get List Artifacts Projects Owner Name Runs Run Id Artifacts Get", + "type": "array", + "items": { + "$ref": "#/components/schemas/FileMeta" + } + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "deprecated": true, + "security": [ + { + "JWTAuth": [] + }, + { + "APIKeyAuth": [] + } + ] + } + }, + "/projects/{owner}/{name}/runs/{run_id}/artifacts/download": { + "get": { + "tags": [ + "Runs" + ], + "summary": "Download an artifact from the run folder", + "description": "Get a download link for an artifact in a run folder", + "operationId": "download_run_artifact", + "parameters": [ + { + "required": true, + "schema": { + "title": "Project Owner", + "type": "string" + }, + "name": "owner", + "in": "path" + }, + { + "required": true, + "schema": { + "title": "Project Name", + "type": "string" + }, + "name": "name", + "in": "path" + }, + { + "required": true, + "schema": { + "title": "Run id.", + "type": "string" + }, + "name": "run_id", + "in": "path" + }, + { + "description": "The path to an file within a project folder", + "required": false, + "schema": { + "title": "Project File Path", + "type": "string", + "description": "The path to an file within a project folder" + }, + "name": "path", + "in": "query" + } + ], + "responses": { + "200": { + "description": "Retrieved", + "content": { + "application/json": { + "schema": {} + } + } + }, + "403": { + "description": "Access forbidden" + }, + "500": { + "description": "Server error" + }, + "400": { + "description": "Invalid request" + }, + "404": { + "description": "Not found" + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "deprecated": true, + "security": [ + { + "JWTAuth": [] + }, + { + "APIKeyAuth": [] + } + ] + } + } + }, + "components": { "schemas": { - "InputReference": { + "JobStatusEnum": { + "title": "JobStatusEnum", + "description": "Enumaration of allowable status strings", + "enum": [ + "Created", + "Pre-Processing", + "Running", + "Failed", + "Cancelled", + "Completed", + "Unknown" + ], + "type": "string" + }, + "JobStatus": { + "allOf": [ + { + "$ref": "#/components/schemas/_OpenAPIGenBaseModel" + }, + { + "type": "object", + "properties": { + "id": { + "title": "Id", + "description": "The ID of the individual job.", + "type": "string" + }, + "started_at": { + "title": "Started At", + "description": "The time at which the job was started", + "type": "string", + "format": "date-time" + }, + "type": { + "title": "Type", + "default": "JobStatus", + "pattern": "^JobStatus$", + "type": "string", + "readOnly": true + }, + "annotations": { + "title": "Annotations", + "description": "An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "api_version": { + "title": "Api Version", + "default": "v1beta1", + "readOnly": true, + "pattern": "^v1beta1$", + "type": "string" + }, + "status": { + "description": "The status of this job.", + "default": "Unknown", + "allOf": [ + { + "$ref": "#/components/schemas/JobStatusEnum" + } + ] + }, + "message": { + "title": "Message", + "description": "Any message produced by the job. Usually error/debugging hints.", + "type": "string" + }, + "finished_at": { + "title": "Finished At", + "description": "The time at which the task was completed", + "type": "string", + "format": "date-time" + }, + "source": { + "title": "Source", + "description": "Source url for the status object. It can be a recipe or a function.", + "type": "string" + }, + "runs_pending": { + "title": "Runs Pending", + "description": "The count of runs that are pending", + "default": 0, + "type": "integer", + "format": "int32" + }, + "runs_running": { + "title": "Runs Running", + "description": "The count of runs that are running", + "default": 0, + "type": "integer", + "format": "int32" + }, + "runs_completed": { + "title": "Runs Completed", + "description": "The count of runs that have completed", + "default": 0, + "type": "integer", + "format": "int32" + }, + "runs_failed": { + "title": "Runs Failed", + "description": "The count of runs that have failed", + "default": 0, + "type": "integer", + "format": "int32" + }, + "runs_cancelled": { + "title": "Runs Cancelled", + "description": "The count of runs that have been cancelled", + "default": 0, + "type": "integer", + "format": "int32" + } + }, + "required": [ + "id", + "started_at" + ] + } + ], + "title": "JobStatus", + "description": "Parametric Job Status.", + "discriminator": { + "propertyName": "type" + } + }, + "HTTP": { + "allOf": [ + { + "$ref": "#/components/schemas/_ArtifactSource" + }, + { + "type": "object", + "required": [ + "url" + ], + "properties": { + "url": { + "title": "Url", + "description": "For a HTTP endpoint this can be http://climate.onebuilding.org.", + "type": "string" + }, + "type": { + "title": "Type", + "default": "HTTP", + "pattern": "^HTTP$", + "type": "string", + "readOnly": true + } + } + } + ], + "title": "HTTP", + "description": "HTTP Source\n\nA web HTTP to an FTP server or an API for example.", + "discriminator": { + "propertyName": "type" + } + }, + "S3": { + "allOf": [ + { + "$ref": "#/components/schemas/_ArtifactSource" + }, + { + "type": "object", + "required": [ + "key", + "endpoint", + "bucket" + ], + "properties": { + "key": { + "title": "Key", + "description": "The path inside the bucket to source artifacts from.", + "type": "string" + }, + "endpoint": { + "title": "Endpoint", + "description": "The HTTP endpoint to reach the S3 bucket.", + "type": "string" + }, + "bucket": { + "title": "Bucket", + "description": "The name of the S3 bucket on the host server.", + "type": "string" + }, + "credentials_path": { + "title": "Credentials Path", + "description": "Path to the file holding the AccessKey and SecretAccessKey to authenticate to the bucket. Assumes public bucket access if none are specified.", + "type": "string" + }, + "type": { + "title": "Type", + "default": "S3", + "pattern": "^S3$", + "type": "string", + "readOnly": true + } + } + } + ], + "title": "S3", + "description": "S3 Source\n\nAn S3 bucket artifact Source.", + "discriminator": { + "propertyName": "type" + } + }, + "ProjectFolder": { + "allOf": [ + { + "$ref": "#/components/schemas/_ArtifactSource" + }, + { + "type": "object", + "properties": { + "path": { + "title": "Path", + "description": "The path to a folder where files and folders can be sourced. For a local filesystem this can be \"C:\\Users\\me\\jobs\\test\".", + "type": "string" + }, + "type": { + "title": "Type", + "default": "ProjectFolder", + "pattern": "^ProjectFolder$", + "type": "string", + "readOnly": true + } + } + } + ], + "title": "ProjectFolder", + "description": "Project Folder Source\n\nThis is the path to a folder where files and folders can be sourced. In the context\nof a desktop run Workflow this folder will correspond to a local folder. In the\ncontext of a workflow run on Pollination this folder will correspond to a Project\nscoped folder.", + "discriminator": { + "propertyName": "type" + } + }, + "StepPathOutput": { + "allOf": [ + { + "$ref": "#/components/schemas/FunctionPathOutput" + }, + { + "type": "object", + "required": [ + "source" + ], + "properties": { + "source": { + "title": "Source", + "description": "The path to source the file from.", + "anyOf": [ + { + "$ref": "#/components/schemas/HTTP" + }, + { + "$ref": "#/components/schemas/S3" + }, + { + "$ref": "#/components/schemas/ProjectFolder" + } + ] + }, + "type": { + "title": "Type", + "default": "StepPathOutput", + "pattern": "^StepPathOutput$", + "type": "string", + "readOnly": true + } + } + } + ], + "title": "StepPathOutput", + "description": "A file or a folder output.", + "discriminator": { + "propertyName": "type" + } + }, + "IOAliasHandler": { + "allOf": [ + { + "$ref": "#/components/schemas/_OpenAPIGenBaseModel" + }, + { + "type": "object", + "properties": { + "language": { + "title": "Language", + "description": "Declare the language (e.g. python, csharp, etc.). This option allows the recipe to be flexible on handling different programming languages.", + "type": "string" + }, + "module": { + "title": "Module", + "description": "Target module or namespace to load the alias function.", + "example": "honeybee_rhino.handlers", + "type": "string" + }, + "function": { + "title": "Function", + "description": "Name of the function. The input value will be passed to this function as the first argument.", + "type": "string" + }, + "type": { + "title": "Type", + "default": "IOAliasHandler", + "pattern": "^IOAliasHandler$", + "type": "string", + "readOnly": true + }, + "annotations": { + "title": "Annotations", + "description": "An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "index": { + "title": "Index", + "description": "An integer to set the index for the order of execution. This input is only useful when there are more than one handler for the same platform and the output of one handler should be passed to another handler. This is also called chained handlers. By default all the handlers are indexed as 0 assuming they are not chained.", + "default": 0, + "type": "integer", + "format": "int32" + } + }, + "required": [ + "language", + "module", + "function" + ] + } + ], + "title": "IOAliasHandler", + "description": "Input and output alias handler object.", + "discriminator": { + "propertyName": "type" + } + }, + "TaskReference": { + "allOf": [ + { + "$ref": "#/components/schemas/_TaskReferenceBase" + }, + { + "type": "object", + "properties": { + "type": { + "title": "Type", + "default": "TaskReference", + "pattern": "^TaskReference$", + "type": "string", + "readOnly": true + } + } + } + ], + "title": "TaskReference", + "description": "A Task reference for parameters other than files or folders.", + "discriminator": { + "propertyName": "type" + } + }, + "FileReference": { + "allOf": [ + { + "$ref": "#/components/schemas/_BaseReference" + }, + { + "type": "object", + "required": [ + "path" + ], + "properties": { + "path": { + "title": "Path", + "description": "Relative path to a file.", + "type": "string" + }, + "type": { + "title": "Type", + "default": "FileReference", + "pattern": "^FileReference$", + "type": "string", + "readOnly": true + } + } + } + ], + "title": "FileReference", + "description": "Reference to a file.", + "discriminator": { + "propertyName": "type" + } + }, + "DAGJSONObjectOutputAlias": { + "allOf": [ + { + "$ref": "#/components/schemas/_DAGArtifactOutputAlias" + }, + { + "type": "object", + "required": [ + "from" + ], + "properties": { + "from": { + "title": "From", + "description": "Reference to a file or a task output. Task output must be file.", + "anyOf": [ + { + "$ref": "#/components/schemas/TaskReference" + }, + { + "$ref": "#/components/schemas/FileReference" + } + ] + }, + "type": { + "title": "Type", + "default": "DAGJSONObjectOutputAlias", + "pattern": "^DAGJSONObjectOutputAlias$", + "type": "string", + "readOnly": true + } + } + } + ], + "title": "DAGJSONObjectOutputAlias", + "description": "DAG alias object output.\n\nThis output loads the content from a file as a JSON object.", + "discriminator": { + "propertyName": "type" + } + }, + "RepositoryUpdate": { + "allOf": [ + { + "$ref": "#/components/schemas/_OpenAPIGenBaseModel" + }, + { + "type": "object", + "properties": { + "public": { + "title": "Public", + "description": "Whether or not a repository is publicly viewable", + "type": "boolean" + }, + "keywords": { + "title": "Keywords", + "description": "A list of keywords to index the repository by", + "example": [ + "daylight", + "radiance" + ], + "type": "array", + "items": { + "type": "string" + } + }, + "description": { + "title": "Description", + "description": "A description of the repository", + "example": "Run daylight simulations the easy way!", + "type": "string" + }, + "icon": { + "title": "Icon", + "description": "An icon to represent this repository", + "example": "https://avatars1.githubusercontent.com/u/38131342", + "type": "string" + }, + "type": { + "title": "Type", + "default": "RepositoryUpdate", + "type": "string", + "pattern": "^RepositoryUpdate$", + "readOnly": true + } + } + } + ], + "title": "RepositoryUpdate", + "discriminator": { + "propertyName": "type" + } + }, + "APITokenPrivate": { + "allOf": [ + { + "$ref": "#/components/schemas/APITokenCreate" + }, + { + "type": "object", + "required": [ + "token" + ], + "properties": { + "token": { + "title": "Token", + "description": "The decoded API token", + "type": "string" + }, + "type": { + "title": "Type", + "default": "APITokenPrivate", + "type": "string", + "pattern": "^APITokenPrivate$", + "readOnly": true + } + } + } + ], + "title": "APITokenPrivate", + "discriminator": { + "propertyName": "type" + } + }, + "SubjectType": { + "title": "SubjectType", + "description": "An enumeration.", + "enum": [ + "user", + "team" + ], + "type": "string" + }, + "PolicySubject": { + "allOf": [ + { + "$ref": "#/components/schemas/_OpenAPIGenBaseModel" + }, + { + "type": "object", + "properties": { + "subject_type": { + "$ref": "#/components/schemas/SubjectType" + }, + "name": { + "title": "Name", + "description": "The name of the policy subject", + "example": "ladybugbot", + "type": "string" + }, + "type": { + "title": "Type", + "default": "PolicySubject", + "type": "string", + "pattern": "^PolicySubject$", + "readOnly": true + } + }, + "required": [ + "subject_type", + "name" + ] + } + ], + "title": "PolicySubject", + "discriminator": { + "propertyName": "type" + } + }, + "Permission": { + "title": "Permission", + "description": "An enumeration.", + "enum": [ + "admin", + "write", + "read" + ], + "type": "string" + }, + "ProjectAccessPolicy": { + "allOf": [ + { + "$ref": "#/components/schemas/_OpenAPIGenBaseModel" + }, + { + "type": "object", + "required": [ + "subject", + "permission" + ], + "properties": { + "subject": { + "title": "Subject", + "description": "The subject of the access policy", + "allOf": [ + { + "$ref": "#/components/schemas/PolicySubject" + } + ] + }, + "permission": { + "description": "The permission given to the subject of the access policy", + "example": "write", + "allOf": [ + { + "$ref": "#/components/schemas/Permission" + } + ] + }, + "type": { + "title": "Type", + "default": "ProjectAccessPolicy", + "type": "string", + "pattern": "^ProjectAccessPolicy$", + "readOnly": true + } + } + } + ], + "title": "ProjectAccessPolicy", + "discriminator": { + "propertyName": "type" + } + }, + "ValueListReference": { + "allOf": [ + { + "$ref": "#/components/schemas/_BaseReference" + }, + { + "type": "object", + "required": [ + "value" + ], + "properties": { + "value": { + "title": "Value", + "description": "A fixed value for this reference.", + "type": "array", + "items": {} + }, + "type": { + "title": "Type", + "default": "ValueListReference", + "pattern": "^ValueListReference$", + "type": "string", + "readOnly": true + } + } + } + ], + "title": "ValueListReference", + "description": "A reference to a fixed value.", + "discriminator": { + "propertyName": "type" + } + }, + "DAGGenericOutputAlias": { + "allOf": [ + { + "$ref": "#/components/schemas/GenericOutput" + }, + { + "type": "object", + "required": [ + "platform", + "handler" + ], + "properties": { + "platform": { + "title": "Platform", + "description": "Name of the client platform (e.g. Grasshopper, Revit, etc). The value can be any strings as long as it has been agreed between client-side developer and author of the recipe.", + "type": "array", + "items": { + "type": "string" + } + }, + "handler": { + "title": "Handler", + "description": "List of process actions to process the input or output value.", + "type": "array", + "items": { + "$ref": "#/components/schemas/IOAliasHandler" + } + }, + "type": { + "title": "Type", + "default": "DAGGenericOutputAlias", + "pattern": "^DAGGenericOutputAlias$", + "type": "string", + "readOnly": true + } + } + } + ], + "title": "DAGGenericOutputAlias", + "description": "DAG generic alias output.\n\nIn most cases, you should not be using the generic output unless you need a dynamic\noutput that changes its type in different platforms because of returning different\nobjects in handler.", + "discriminator": { + "propertyName": "type" + } + }, + "DAGStringOutputAlias": { + "allOf": [ + { + "$ref": "#/components/schemas/_DAGArtifactOutputAlias" + }, + { + "type": "object", + "required": [ + "from" + ], + "properties": { + "from": { + "title": "From", + "description": "Reference to a file or a task output. Task output must be file.", + "anyOf": [ + { + "$ref": "#/components/schemas/TaskReference" + }, + { + "$ref": "#/components/schemas/FileReference" + } + ] + }, + "type": { + "title": "Type", + "default": "DAGStringOutputAlias", + "pattern": "^DAGStringOutputAlias$", + "type": "string", + "readOnly": true + } + } + } + ], + "title": "DAGStringOutputAlias", + "description": "DAG alias string output.\n\nThis output loads the content from a file as a string.", + "discriminator": { + "propertyName": "type" + } + }, + "DAGIntegerOutputAlias": { + "allOf": [ + { + "$ref": "#/components/schemas/_DAGArtifactOutputAlias" + }, + { + "type": "object", + "required": [ + "from" + ], + "properties": { + "from": { + "title": "From", + "description": "Reference to a file or a task output. Task output must be file.", + "anyOf": [ + { + "$ref": "#/components/schemas/TaskReference" + }, + { + "$ref": "#/components/schemas/FileReference" + } + ] + }, + "type": { + "title": "Type", + "default": "DAGIntegerOutputAlias", + "pattern": "^DAGIntegerOutputAlias$", + "type": "string", + "readOnly": true + } + } + } + ], + "title": "DAGIntegerOutputAlias", + "description": "DAG alias integer output.\n\nThis output loads the content from a file as an integer.", + "discriminator": { + "propertyName": "type" + } + }, + "DAGNumberOutputAlias": { + "allOf": [ + { + "$ref": "#/components/schemas/_DAGArtifactOutputAlias" + }, + { + "type": "object", + "required": [ + "from" + ], + "properties": { + "from": { + "title": "From", + "description": "Reference to a file or a task output. Task output must be file.", + "anyOf": [ + { + "$ref": "#/components/schemas/TaskReference" + }, + { + "$ref": "#/components/schemas/FileReference" + } + ] + }, + "type": { + "title": "Type", + "default": "DAGNumberOutputAlias", + "pattern": "^DAGNumberOutputAlias$", + "type": "string", + "readOnly": true + } + } + } + ], + "title": "DAGNumberOutputAlias", + "description": "DAG alias number output.\n\nThis output loads the content from a file as a floating number.", + "discriminator": { + "propertyName": "type" + } + }, + "DAGBooleanOutputAlias": { + "allOf": [ + { + "$ref": "#/components/schemas/_DAGArtifactOutputAlias" + }, + { + "type": "object", + "required": [ + "from" + ], + "properties": { + "from": { + "title": "From", + "description": "Reference to a file or a task output. Task output must be file.", + "anyOf": [ + { + "$ref": "#/components/schemas/TaskReference" + }, + { + "$ref": "#/components/schemas/FileReference" + } + ] + }, + "type": { + "title": "Type", + "default": "DAGBooleanOutputAlias", + "pattern": "^DAGBooleanOutputAlias$", + "type": "string", + "readOnly": true + } + } + } + ], + "title": "DAGBooleanOutputAlias", + "description": "DAG alias boolean output.\n\nThis output loads the content from a file as a boolean.", + "discriminator": { + "propertyName": "type" + } + }, + "FolderReference": { + "allOf": [ + { + "$ref": "#/components/schemas/_BaseReference" + }, + { + "type": "object", + "required": [ + "path" + ], + "properties": { + "path": { + "title": "Path", + "description": "Relative path to a folder.", + "type": "string" + }, + "type": { + "title": "Type", + "default": "FolderReference", + "pattern": "^FolderReference$", + "type": "string", + "readOnly": true + } + } + } + ], + "title": "FolderReference", + "description": "Reference to a folder.", + "discriminator": { + "propertyName": "type" + } + }, + "DAGFolderOutputAlias": { + "allOf": [ + { + "$ref": "#/components/schemas/_DAGArtifactOutputAlias" + }, + { + "type": "object", + "required": [ + "from" + ], + "properties": { + "from": { + "title": "From", + "description": "Reference to a folder or a task output. Task output must be folder.", + "anyOf": [ + { + "$ref": "#/components/schemas/TaskReference" + }, + { + "$ref": "#/components/schemas/FolderReference" + } + ] + }, + "type": { + "title": "Type", + "default": "DAGFolderOutputAlias", + "pattern": "^DAGFolderOutputAlias$", + "type": "string", + "readOnly": true + } + } + } + ], + "title": "DAGFolderOutputAlias", + "description": "DAG alias folder output.", + "discriminator": { + "propertyName": "type" + } + }, + "DAGFileOutputAlias": { + "allOf": [ + { + "$ref": "#/components/schemas/_DAGArtifactOutputAlias" + }, + { + "type": "object", + "required": [ + "from" + ], + "properties": { + "from": { + "title": "From", + "description": "Reference to a file or a task output. Task output must be file.", + "anyOf": [ + { + "$ref": "#/components/schemas/TaskReference" + }, + { + "$ref": "#/components/schemas/FileReference" + } + ] + }, + "type": { + "title": "Type", + "default": "DAGFileOutputAlias", + "pattern": "^DAGFileOutputAlias$", + "type": "string", + "readOnly": true + } + } + } + ], + "title": "DAGFileOutputAlias", + "description": "DAG alias file output.", + "discriminator": { + "propertyName": "type" + } + }, + "DAGPathOutputAlias": { + "allOf": [ + { + "$ref": "#/components/schemas/_DAGArtifactOutputAlias" + }, + { + "type": "object", + "required": [ + "from" + ], + "properties": { + "from": { + "title": "From", + "description": "Reference to a file, folder or a task output. Task output must either be a file or a folder.", + "anyOf": [ + { + "$ref": "#/components/schemas/TaskReference" + }, + { + "$ref": "#/components/schemas/FileReference" + }, + { + "$ref": "#/components/schemas/FolderReference" + } + ] + }, + "type": { + "title": "Type", + "default": "DAGPathOutputAlias", + "pattern": "^DAGPathOutputAlias$", + "type": "string", + "readOnly": true + } + } + } + ], + "title": "DAGPathOutputAlias", + "description": "DAG alias path output.", + "discriminator": { + "propertyName": "type" + } + }, + "ItemType": { + "title": "ItemType", + "description": "Type enum for items in a list.\n\nItems can not be files or folder. For a list of files you should copy them to a\nfolder and use FolderInput input instead of using ArrayInput.", + "enum": [ + "Generic", + "String", + "Integer", + "Number", + "Boolean", + "Array", + "JSONObject" + ], + "type": "string" + }, + "DAGArrayOutputAlias": { + "allOf": [ + { + "$ref": "#/components/schemas/_DAGArtifactOutputAlias" + }, + { + "type": "object", + "required": [ + "from" + ], + "properties": { + "from": { + "title": "From", + "description": "Reference to a file or a task output. Task output must be file.", + "anyOf": [ + { + "$ref": "#/components/schemas/TaskReference" + }, + { + "$ref": "#/components/schemas/FileReference" + } + ] + }, + "items_type": { + "description": "Type of items in this array. All the items in an array must be from the same type.", + "default": "String", + "allOf": [ + { + "$ref": "#/components/schemas/ItemType" + } + ] + }, + "type": { + "title": "Type", + "default": "DAGArrayOutputAlias", + "pattern": "^DAGArrayOutputAlias$", + "type": "string", + "readOnly": true + } + } + } + ], + "title": "DAGArrayOutputAlias", + "description": "DAG alias array output.\n\nThis output loads the content from a JSON file which must be a JSON Array.", + "discriminator": { + "propertyName": "type" + } + }, + "DAGLinkedOutputAlias": { + "allOf": [ + { + "$ref": "#/components/schemas/DAGGenericOutputAlias" + }, + { + "type": "object", + "properties": { + "type": { + "title": "Type", + "default": "DAGLinkedOutputAlias", + "pattern": "^DAGLinkedOutputAlias$", + "type": "string", + "readOnly": true + } + } + } + ], + "title": "DAGLinkedOutputAlias", + "description": "An Alias for Linked Outputs.\n\nA linked output alias will be translated to an object in the UI and stay linked to\nit.", + "discriminator": { + "propertyName": "type" + } + }, + "DAGFileOutput": { + "allOf": [ + { + "$ref": "#/components/schemas/GenericOutput" + }, + { + "type": "object", + "required": [ + "from" + ], + "properties": { + "from": { + "title": "From", + "description": "Reference to a file or a task output. Task output must be file.", + "anyOf": [ + { + "$ref": "#/components/schemas/TaskReference" + }, + { + "$ref": "#/components/schemas/FileReference" + } + ] + }, + "alias": { + "title": "Alias", + "description": "A list of additional processes for loading this output on different platforms.", + "type": "array", + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/DAGGenericOutputAlias" + }, + { + "$ref": "#/components/schemas/DAGStringOutputAlias" + }, + { + "$ref": "#/components/schemas/DAGIntegerOutputAlias" + }, + { + "$ref": "#/components/schemas/DAGNumberOutputAlias" + }, + { + "$ref": "#/components/schemas/DAGBooleanOutputAlias" + }, + { + "$ref": "#/components/schemas/DAGFolderOutputAlias" + }, + { + "$ref": "#/components/schemas/DAGFileOutputAlias" + }, + { + "$ref": "#/components/schemas/DAGPathOutputAlias" + }, + { + "$ref": "#/components/schemas/DAGArrayOutputAlias" + }, + { + "$ref": "#/components/schemas/DAGJSONObjectOutputAlias" + }, + { + "$ref": "#/components/schemas/DAGLinkedOutputAlias" + } + ] + } + }, + "required": { + "title": "Required", + "description": "A boolean to indicate if an artifact output is required. A False value makes the artifact optional.", + "default": true, + "type": "boolean" + }, + "type": { + "title": "Type", + "default": "DAGFileOutput", + "pattern": "^DAGFileOutput$", + "type": "string", + "readOnly": true + } + } + } + ], + "title": "DAGFileOutput", + "description": "DAG file output.", + "discriminator": { + "propertyName": "type" + } + }, + "QuotaPlan": { + "allOf": [ + { + "$ref": "#/components/schemas/_OpenAPIGenBaseModel" + }, + { + "type": "object", + "properties": { + "name": { + "title": "Name", + "description": "The name of the quota", + "type": "string" + }, + "resets": { + "title": "Resets", + "description": "Whether consumption is reset to 0 every month", + "default": false, + "type": "boolean" + }, + "limit": { + "title": "Limit", + "description": "The maximum amount of a resource that a subscription allows", + "type": "number", + "format": "double" + }, + "enforced": { + "title": "Enforced", + "description": "Whether the limit is triggers a blocking response from the server", + "default": false, + "type": "boolean" + }, + "type": { + "title": "Type", + "default": "QuotaPlan", + "type": "string", + "pattern": "^QuotaPlan$", + "readOnly": true + } + }, + "required": [ + "name" + ] + } + ], + "title": "QuotaPlan", + "description": "A quota plan", + "discriminator": { + "propertyName": "type" + } + }, + "AccountType": { + "title": "AccountType", + "description": "The type of account.", + "enum": [ + "org", + "user" + ], + "type": "string" + }, + "SubscriptionPlan": { + "allOf": [ + { + "$ref": "#/components/schemas/_OpenAPIGenBaseModel" + }, + { + "type": "object", + "properties": { + "slug": { + "title": "Slug", + "description": "A slug of the config plan used to create this subscription", + "type": "string" + }, + "name": { + "title": "Name", + "description": "A name of the config plan used to create this subscription", + "type": "string" + }, + "account_types": { + "description": "The types of account to which the plan can be applied", + "type": "array", + "items": { + "$ref": "#/components/schemas/AccountType" + }, + "uniqueItems": true + }, + "quotas": { + "title": "Quotas", + "description": "A list of quota plans for a given subscription", + "default": [], + "type": "array", + "items": { + "$ref": "#/components/schemas/QuotaPlan" + } + }, + "type": { + "title": "Type", + "default": "SubscriptionPlan", + "type": "string", + "pattern": "^SubscriptionPlan$", + "readOnly": true + } + }, + "required": [ + "slug", + "name", + "account_types" + ] + } + ], + "title": "SubscriptionPlan", + "description": "A Subscription plan", + "discriminator": { + "propertyName": "type" + } + }, + "QuotaType": { + "title": "QuotaType", + "description": "The type of comsumption-limited resource to which the quota refers.", + "enum": [ + "storage", + "compute_hours", + "parallel_workflow_containers", + "private_repositories", + "private_projects", + "teams", + "members", + "cpu_limit", + "memory_limit", + "rhino_plugin_license", + "revit_plugin_license" + ], + "type": "string" + }, + "QuotaExtension": { + "allOf": [ + { + "$ref": "#/components/schemas/_OpenAPIGenBaseModel" + }, + { + "type": "object", + "properties": { + "id": { + "title": "Id", + "description": "The ID of the quota extension", + "type": "string" + }, + "name": { + "title": "Name", + "description": "Name of the quota extension plan", + "type": "string" + }, + "type": { + "description": "The type of quota this applies to", + "allOf": [ + { + "$ref": "#/components/schemas/QuotaType" + } + ], + "readOnly": true + }, + "unit_amount": { + "title": "Unit Amount", + "description": "The amount by which this object extends a given quota", + "minimum": 0, + "type": "number", + "format": "double" + }, + "quantity": { + "title": "Quantity", + "description": "The number of times to count this extension", + "type": "integer", + "format": "int32" + } + }, + "required": [ + "id", + "name", + "type", + "unit_amount", + "quantity" + ] + } + ], + "title": "QuotaExtension", + "description": "A quota extension", + "discriminator": { + "propertyName": "type" + } + }, + "PollinationSubscription": { + "allOf": [ + { + "$ref": "#/components/schemas/Subscription" + }, + { + "type": "object", + "required": [ + "account_id", + "subscription_plan" + ], + "properties": { + "account_id": { + "title": "Account Id", + "description": "The ID of the account this subscription applies to", + "type": "string", + "format": "uuid" + }, + "subscription_plan": { + "title": "Subscription Plan", + "description": "A subscription plan", + "allOf": [ + { + "$ref": "#/components/schemas/SubscriptionPlan" + } + ] + }, + "external_id": { + "title": "External Id", + "description": "The ID of this subscription", + "type": "string" + }, + "quota_extensions": { + "title": "Quota Extensions", + "description": "A list of quota extension plans for a given subscription", + "default": [], + "type": "array", + "items": { + "$ref": "#/components/schemas/QuotaExtension" + } + }, + "type": { + "title": "Type", + "default": "PollinationSubscription", + "type": "string", + "pattern": "^PollinationSubscription$", + "readOnly": true + } + } + } + ], + "title": "PollinationSubscription", + "discriminator": { + "propertyName": "type" + } + }, + "DAGGenericInputAlias": { + "allOf": [ + { + "$ref": "#/components/schemas/GenericInput" + }, + { + "type": "object", + "required": [ + "platform", + "handler" + ], + "properties": { + "platform": { + "title": "Platform", + "description": "Name of the client platform (e.g. Grasshopper, Revit, etc). The value can be any strings as long as it has been agreed between client-side developer and author of the recipe.", + "type": "array", + "items": { + "type": "string" + } + }, + "handler": { + "title": "Handler", + "description": "List of process actions to process the input or output value.", + "type": "array", + "items": { + "$ref": "#/components/schemas/IOAliasHandler" + } + }, + "default": { + "title": "Default", + "description": "Default value for generic input.", + "type": "string" + }, + "required": { + "title": "Required", + "description": "A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided.", + "default": false, + "type": "boolean" + }, + "spec": { + "title": "Spec", + "description": "An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec.", + "type": "object" + }, + "type": { + "title": "Type", + "default": "DAGGenericInputAlias", + "pattern": "^DAGGenericInputAlias$", + "type": "string", + "readOnly": true + } + } + } + ], + "title": "DAGGenericInputAlias", + "description": "Base class for DAG Alias inputs.\n\nThis class adds a handler to input to handle the process of loading the input\nfrom different graphical interfaces.", + "discriminator": { + "propertyName": "type" + } + }, + "DAGStringInputAlias": { + "allOf": [ + { + "$ref": "#/components/schemas/DAGGenericInputAlias" + }, + { + "type": "object", + "properties": { + "type": { + "title": "Type", + "default": "DAGStringInputAlias", + "pattern": "^DAGStringInputAlias$", + "type": "string", + "readOnly": true + } + } + } + ], + "title": "DAGStringInputAlias", + "description": "An Alias String input.\n\nYou can add additional validation by defining a JSONSchema specification.\n\nSee http://json-schema.org/understanding-json-schema/reference/string.html#string for\nmore information.\n\n.. code-block:: python\n\n \"schema\": {\n \"type\": \"string\",\n \"maxLength\": 50,\n \"pattern\": \"(?i)(^.*\\.epw$)\"\n }", + "discriminator": { + "propertyName": "type" + } + }, + "DAGIntegerInputAlias": { + "allOf": [ + { + "$ref": "#/components/schemas/GenericInput" + }, + { + "type": "object", + "required": [ + "platform", + "handler" + ], + "properties": { + "platform": { + "title": "Platform", + "description": "Name of the client platform (e.g. Grasshopper, Revit, etc). The value can be any strings as long as it has been agreed between client-side developer and author of the recipe.", + "type": "array", + "items": { + "type": "string" + } + }, + "handler": { + "title": "Handler", + "description": "List of process actions to process the input or output value.", + "type": "array", + "items": { + "$ref": "#/components/schemas/IOAliasHandler" + } + }, + "default": { + "title": "Default", + "description": "Default value to use for an input if a value was not supplied.", + "type": "integer", + "format": "int32" + }, + "required": { + "title": "Required", + "description": "A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided.", + "default": false, + "type": "boolean" + }, + "spec": { + "title": "Spec", + "description": "An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec.", + "type": "object" + }, + "type": { + "title": "Type", + "default": "DAGIntegerInputAlias", + "pattern": "^DAGIntegerInputAlias$", + "type": "string", + "readOnly": true + } + } + } + ], + "title": "DAGIntegerInputAlias", + "description": "An alias integer input.\n\nYou can add additional validation by defining a JSONSchema specification.\n\nSee http://json-schema.org/understanding-json-schema/reference/numeric.html#numeric\nfor more information.", + "discriminator": { + "propertyName": "type" + } + }, + "DAGNumberInputAlias": { + "allOf": [ + { + "$ref": "#/components/schemas/GenericInput" + }, + { + "type": "object", + "required": [ + "platform", + "handler" + ], + "properties": { + "platform": { + "title": "Platform", + "description": "Name of the client platform (e.g. Grasshopper, Revit, etc). The value can be any strings as long as it has been agreed between client-side developer and author of the recipe.", + "type": "array", + "items": { + "type": "string" + } + }, + "handler": { + "title": "Handler", + "description": "List of process actions to process the input or output value.", + "type": "array", + "items": { + "$ref": "#/components/schemas/IOAliasHandler" + } + }, + "default": { + "title": "Default", + "description": "Default value to use for an input if a value was not supplied.", + "type": "number", + "format": "double" + }, + "required": { + "title": "Required", + "description": "A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided.", + "default": false, + "type": "boolean" + }, + "spec": { + "title": "Spec", + "description": "An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec.", + "type": "object" + }, + "type": { + "title": "Type", + "default": "DAGNumberInputAlias", + "pattern": "^DAGNumberInputAlias$", + "type": "string", + "readOnly": true + } + } + } + ], + "title": "DAGNumberInputAlias", + "description": "An alias number input.\n\nYou can add additional validation by defining a JSONSchema specification.\n\nSee http://json-schema.org/understanding-json-schema/reference/numeric.html#numeric\nfor more information.", + "discriminator": { + "propertyName": "type" + } + }, + "DAGBooleanInputAlias": { + "allOf": [ + { + "$ref": "#/components/schemas/GenericInput" + }, + { + "type": "object", + "required": [ + "platform", + "handler" + ], + "properties": { + "platform": { + "title": "Platform", + "description": "Name of the client platform (e.g. Grasshopper, Revit, etc). The value can be any strings as long as it has been agreed between client-side developer and author of the recipe.", + "type": "array", + "items": { + "type": "string" + } + }, + "handler": { + "title": "Handler", + "description": "List of process actions to process the input or output value.", + "type": "array", + "items": { + "$ref": "#/components/schemas/IOAliasHandler" + } + }, + "default": { + "title": "Default", + "description": "Default value to use for an input if a value was not supplied.", + "type": "boolean" + }, + "required": { + "title": "Required", + "description": "A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided.", + "default": false, + "type": "boolean" + }, + "spec": { + "title": "Spec", + "description": "An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec.", + "type": "object" + }, + "type": { + "title": "Type", + "default": "DAGBooleanInputAlias", + "pattern": "^DAGBooleanInputAlias$", + "type": "string", + "readOnly": true + } + } + } + ], + "title": "DAGBooleanInputAlias", + "description": "The boolean type matches only two special values: True and False.\n\nNote that values that evaluate to true or false, such as 1 and 0, are not accepted.\n\nYou can add additional validation by defining a JSONSchema specification.\n\nSee http://json-schema.org/understanding-json-schema/reference/boolean.html for more\ninformation.", + "discriminator": { + "propertyName": "type" + } + }, + "DAGFolderInputAlias": { + "allOf": [ + { + "$ref": "#/components/schemas/GenericInput" + }, + { + "type": "object", + "required": [ + "platform", + "handler" + ], + "properties": { + "platform": { + "title": "Platform", + "description": "Name of the client platform (e.g. Grasshopper, Revit, etc). The value can be any strings as long as it has been agreed between client-side developer and author of the recipe.", + "type": "array", + "items": { + "type": "string" + } + }, + "handler": { + "title": "Handler", + "description": "List of process actions to process the input or output value.", + "type": "array", + "items": { + "$ref": "#/components/schemas/IOAliasHandler" + } + }, + "default": { + "title": "Default", + "description": "The default source for file if the value is not provided.", + "anyOf": [ + { + "$ref": "#/components/schemas/HTTP" + }, + { + "$ref": "#/components/schemas/S3" + }, + { + "$ref": "#/components/schemas/ProjectFolder" + } + ] + }, + "required": { + "title": "Required", + "description": "A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided.", + "default": false, + "type": "boolean" + }, + "spec": { + "title": "Spec", + "description": "An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec.", + "type": "object" + }, + "type": { + "title": "Type", + "default": "DAGFolderInputAlias", + "pattern": "^DAGFolderInputAlias$", + "type": "string", + "readOnly": true + } + } + } + ], + "title": "DAGFolderInputAlias", + "description": "An alias folder input.\n\nFolder is a special string input. Unlike other string inputs, a folder will be copied\nfrom its location to execution folder when a workflow is executed.\n\nYou can add additional validation by defining a JSONSchema specification.\n\nSee http://json-schema.org/understanding-json-schema/reference/string.html#string for\nmore information.\n\n.. code-block:: python\n\n \"schema\": {\n \"type\": \"string\",\n \"maxLength\": 50,\n }", + "discriminator": { + "propertyName": "type" + } + }, + "DAGFileInputAlias": { + "allOf": [ + { + "$ref": "#/components/schemas/GenericInput" + }, + { + "type": "object", + "required": [ + "platform", + "handler" + ], + "properties": { + "platform": { + "title": "Platform", + "description": "Name of the client platform (e.g. Grasshopper, Revit, etc). The value can be any strings as long as it has been agreed between client-side developer and author of the recipe.", + "type": "array", + "items": { + "type": "string" + } + }, + "handler": { + "title": "Handler", + "description": "List of process actions to process the input or output value.", + "type": "array", + "items": { + "$ref": "#/components/schemas/IOAliasHandler" + } + }, + "default": { + "title": "Default", + "description": "The default source for file if the value is not provided.", + "anyOf": [ + { + "$ref": "#/components/schemas/HTTP" + }, + { + "$ref": "#/components/schemas/S3" + }, + { + "$ref": "#/components/schemas/ProjectFolder" + } + ] + }, + "required": { + "title": "Required", + "description": "A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided.", + "default": false, + "type": "boolean" + }, + "spec": { + "title": "Spec", + "description": "An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec.", + "type": "object" + }, + "extensions": { + "title": "Extensions", + "description": "Optional list of extensions for file. The check for extension is case-insensitive.", + "type": "array", + "items": { + "type": "string" + } + }, + "type": { + "title": "Type", + "default": "DAGFileInputAlias", + "pattern": "^DAGFileInputAlias$", + "type": "string", + "readOnly": true + } + } + } + ], + "title": "DAGFileInputAlias", + "description": "An alias file input.\n\nFile is a special string input. Unlike other string inputs, a file will be copied\nfrom its location to execution folder when a workflow is executed.\n\nYou can add additional validation by defining a JSONSchema specification.\n\nSee http://json-schema.org/understanding-json-schema/reference/string.html#string for\nmore information.\n\n.. code-block:: python\n\n # a file with maximum 50 characters with an ``epw`` extension.\n\n \"schema\": {\n \"type\": \"string\",\n \"maxLength\": 50,\n \"pattern\": \"(?i)(^.*\\.epw$)\"\n }", + "discriminator": { + "propertyName": "type" + } + }, + "DAGPathInputAlias": { + "allOf": [ + { + "$ref": "#/components/schemas/GenericInput" + }, + { + "type": "object", + "required": [ + "platform", + "handler" + ], + "properties": { + "platform": { + "title": "Platform", + "description": "Name of the client platform (e.g. Grasshopper, Revit, etc). The value can be any strings as long as it has been agreed between client-side developer and author of the recipe.", + "type": "array", + "items": { + "type": "string" + } + }, + "handler": { + "title": "Handler", + "description": "List of process actions to process the input or output value.", + "type": "array", + "items": { + "$ref": "#/components/schemas/IOAliasHandler" + } + }, + "default": { + "title": "Default", + "description": "The default source for file if the value is not provided.", + "anyOf": [ + { + "$ref": "#/components/schemas/HTTP" + }, + { + "$ref": "#/components/schemas/S3" + }, + { + "$ref": "#/components/schemas/ProjectFolder" + } + ] + }, + "required": { + "title": "Required", + "description": "A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided.", + "default": false, + "type": "boolean" + }, + "spec": { + "title": "Spec", + "description": "An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec.", + "type": "object" + }, + "extensions": { + "title": "Extensions", + "description": "Optional list of extensions for path. The check for extension is case-insensitive. The extension will only be validated for file inputs.", + "type": "array", + "items": { + "type": "string" + } + }, + "type": { + "title": "Type", + "default": "DAGPathInputAlias", + "pattern": "^DAGPathInputAlias$", + "type": "string", + "readOnly": true + } + } + } + ], + "title": "DAGPathInputAlias", + "description": "A file or a folder input.\n\nUse this input only in cases that the input can be either a file or folder. For file\nor folder-only inputs see File and Folder.\n\nPath is a special string input. Unlike other string inputs, a path will be copied\nfrom its location to execution folder when a workflow is executed.\n\nYou can add additional validation by defining a JSONSchema specification.\n\nSee http://json-schema.org/understanding-json-schema/reference/string.html#string for\nmore information.\n\n.. code-block:: python\n\n # a file with maximum 50 characters with an ``epw`` extension.\n\n \"schema\": {\n \"type\": \"string\",\n \"maxLength\": 50,\n \"pattern\": \"(?i)(^.*\\.epw$)\"\n }", + "discriminator": { + "propertyName": "type" + } + }, + "DAGArrayInputAlias": { + "allOf": [ + { + "$ref": "#/components/schemas/GenericInput" + }, + { + "type": "object", + "required": [ + "platform", + "handler" + ], + "properties": { + "platform": { + "title": "Platform", + "description": "Name of the client platform (e.g. Grasshopper, Revit, etc). The value can be any strings as long as it has been agreed between client-side developer and author of the recipe.", + "type": "array", + "items": { + "type": "string" + } + }, + "handler": { + "title": "Handler", + "description": "List of process actions to process the input or output value.", + "type": "array", + "items": { + "$ref": "#/components/schemas/IOAliasHandler" + } + }, + "default": { + "title": "Default", + "description": "Default value to use for an input if a value was not supplied.", + "type": "array", + "items": {} + }, + "required": { + "title": "Required", + "description": "A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided.", + "default": false, + "type": "boolean" + }, + "spec": { + "title": "Spec", + "description": "An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec.", + "type": "object" + }, + "items_type": { + "description": "Type of items in an array. All the items in an array must be from the same type.", + "default": "String", + "allOf": [ + { + "$ref": "#/components/schemas/ItemType" + } + ] + }, + "type": { + "title": "Type", + "default": "DAGArrayInputAlias", + "pattern": "^DAGArrayInputAlias$", + "type": "string", + "readOnly": true + } + } + } + ], + "title": "DAGArrayInputAlias", + "description": "A JSON array input.\n\nYou can add additional validation by defining a JSONSchema specification.\n\nSee http://json-schema.org/understanding-json-schema/reference/array.html for\nmore information.", + "discriminator": { + "propertyName": "type" + } + }, + "DAGJSONObjectInputAlias": { + "allOf": [ + { + "$ref": "#/components/schemas/GenericInput" + }, + { + "type": "object", + "required": [ + "platform", + "handler" + ], + "properties": { + "platform": { + "title": "Platform", + "description": "Name of the client platform (e.g. Grasshopper, Revit, etc). The value can be any strings as long as it has been agreed between client-side developer and author of the recipe.", + "type": "array", + "items": { + "type": "string" + } + }, + "handler": { + "title": "Handler", + "description": "List of process actions to process the input or output value.", + "type": "array", + "items": { + "$ref": "#/components/schemas/IOAliasHandler" + } + }, + "default": { + "title": "Default", + "description": "Default value to use for an input if a value was not supplied.", + "type": "object" + }, + "required": { + "title": "Required", + "description": "A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided.", + "default": false, + "type": "boolean" + }, + "spec": { + "title": "Spec", + "description": "An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec.", + "type": "object" + }, + "type": { + "title": "Type", + "default": "DAGJSONObjectInputAlias", + "pattern": "^DAGJSONObjectInputAlias$", + "type": "string", + "readOnly": true + } + } + } + ], + "title": "DAGJSONObjectInputAlias", + "description": "An alias JSON object input.\n\nJSON objects are similar to Python dictionaries.\n\nYou can add additional validation by defining a JSONSchema specification.\n\nSee http://json-schema.org/understanding-json-schema/reference/object.html for\nmore information.", + "discriminator": { + "propertyName": "type" + } + }, + "DAGLinkedInputAlias": { + "allOf": [ + { + "$ref": "#/components/schemas/DAGGenericInputAlias" + }, + { + "type": "object", + "properties": { + "type": { + "title": "Type", + "default": "DAGLinkedInputAlias", + "pattern": "^DAGLinkedInputAlias$", + "type": "string", + "readOnly": true + } + } + } + ], + "title": "DAGLinkedInputAlias", + "description": "An Alias for Linked Inputs.\n\nA linked input alias will be hidden in the UI and will be linked to an object in \nthe UI using the input handler.", + "discriminator": { + "propertyName": "type" + } + }, + "FunctionIntegerInput": { + "allOf": [ + { + "$ref": "#/components/schemas/GenericInput" + }, + { + "type": "object", + "properties": { + "default": { + "title": "Default", + "description": "Default value to use for an input if a value was not supplied.", + "type": "integer", + "format": "int32" + }, + "alias": { + "title": "Alias", + "description": "A list of aliases for this input in different platforms.", + "type": "array", + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/DAGGenericInputAlias" + }, + { + "$ref": "#/components/schemas/DAGStringInputAlias" + }, + { + "$ref": "#/components/schemas/DAGIntegerInputAlias" + }, + { + "$ref": "#/components/schemas/DAGNumberInputAlias" + }, + { + "$ref": "#/components/schemas/DAGBooleanInputAlias" + }, + { + "$ref": "#/components/schemas/DAGFolderInputAlias" + }, + { + "$ref": "#/components/schemas/DAGFileInputAlias" + }, + { + "$ref": "#/components/schemas/DAGPathInputAlias" + }, + { + "$ref": "#/components/schemas/DAGArrayInputAlias" + }, + { + "$ref": "#/components/schemas/DAGJSONObjectInputAlias" + }, + { + "$ref": "#/components/schemas/DAGLinkedInputAlias" + } + ] + } + }, + "required": { + "title": "Required", + "description": "A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided.", + "default": false, + "type": "boolean" + }, + "spec": { + "title": "Spec", + "description": "An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec.", + "type": "object" + }, + "type": { + "title": "Type", + "default": "FunctionIntegerInput", + "pattern": "^FunctionIntegerInput$", + "type": "string", + "readOnly": true + } + } + } + ], + "title": "FunctionIntegerInput", + "description": "An integer input.\n\nYou can add additional validation by defining a JSONSchema specification.\n\nSee http://json-schema.org/understanding-json-schema/reference/numeric.html#numeric\nfor more information.", + "discriminator": { + "propertyName": "type" + } + }, + "UserUpdate": { + "allOf": [ + { + "$ref": "#/components/schemas/_OpenAPIGenBaseModel" + }, + { + "type": "object", + "properties": { + "name": { + "title": "Name", + "description": "The display name for this user", + "example": "Ladybug Tools", + "type": "string" + }, + "picture_url": { + "title": "Picture Url", + "description": "URL to the picture associated with this user", + "example": "https://avatars1.githubusercontent.com/u/38131342", + "type": "string" + }, + "description": { + "title": "Description", + "description": "A description of the user", + "default": "", + "example": "Making environmental design knowledge and tools freely accessible to every person, project and design process", + "type": "string" + }, + "type": { + "title": "Type", + "default": "UserUpdate", + "type": "string", + "pattern": "^UserUpdate$", + "readOnly": true + } + }, + "required": [ + "name", + "picture_url" + ] + } + ], + "title": "UserUpdate", + "discriminator": { + "propertyName": "type" + } + }, + "DockerConfig": { + "allOf": [ + { + "$ref": "#/components/schemas/_OpenAPIGenBaseModel" + }, + { + "type": "object", + "properties": { + "image": { + "title": "Image", + "description": "Docker image name. Must include tag.", + "type": "string" + }, + "workdir": { + "title": "Workdir", + "description": "The working directory the entrypoint command of the container runsin. This is used to determine where to load artifacts when running in the container.", + "type": "string" + }, + "type": { + "title": "Type", + "default": "DockerConfig", + "pattern": "^DockerConfig", + "type": "string", + "readOnly": true + }, + "annotations": { + "title": "Annotations", + "description": "An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "registry": { + "title": "Registry", + "description": "The container registry URLs that this container should be pulled from. Will default to Dockerhub if none is specified.", + "type": "string" + } + }, + "required": [ + "image", + "workdir" + ] + } + ], + "title": "DockerConfig", + "description": "Plugin Configuration to run in a Docker container", + "discriminator": { + "propertyName": "type" + } + }, + "LocalConfig": { + "allOf": [ + { + "$ref": "#/components/schemas/_OpenAPIGenBaseModel" + }, + { + "type": "object", + "properties": { + "type": { + "title": "Type", + "default": "LocalConfig", + "pattern": "^LocalConfig", + "type": "string", + "readOnly": true + }, + "annotations": { + "title": "Annotations", + "description": "An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.", + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + } + ], + "title": "LocalConfig", + "description": "Plugin Configuration to run on a desktop.", + "discriminator": { + "propertyName": "type" + } + }, + "PluginConfig": { + "allOf": [ + { + "$ref": "#/components/schemas/_OpenAPIGenBaseModel" + }, + { + "type": "object", + "properties": { + "docker": { + "title": "Docker", + "description": "The configuration to use this plugin in a docker container", + "allOf": [ + { + "$ref": "#/components/schemas/DockerConfig" + } + ] + }, + "type": { + "title": "Type", + "default": "PluginConfig", + "pattern": "^PluginConfig", + "type": "string", + "readOnly": true + }, + "annotations": { + "title": "Annotations", + "description": "An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "local": { + "title": "Local", + "description": "The configuration to use this plugin locally", + "allOf": [ + { + "$ref": "#/components/schemas/LocalConfig" + } + ] + } + }, + "required": [ + "docker" + ] + } + ], + "title": "PluginConfig", + "description": "Plugin configuration.\n\nThe config is used to schedule functions on a desktop or in other contexts\n(ie: Docker).", + "discriminator": { + "propertyName": "type" + } + }, + "LicensePoolAccessPolicy": { + "allOf": [ + { + "$ref": "#/components/schemas/_OpenAPIGenBaseModel" + }, + { + "type": "object", + "required": [ + "subject" + ], + "properties": { + "subject": { + "title": "Subject", + "description": "The subject of the access policy", + "allOf": [ + { + "$ref": "#/components/schemas/PolicySubject" + } + ] + }, + "permission": { + "description": "Accessors may only have read access", + "allOf": [ + { + "$ref": "#/components/schemas/Permission" + } + ] + }, + "type": { + "title": "Type", + "default": "LicensePoolAccessPolicy", + "type": "string", + "pattern": "^LicensePoolAccessPolicy$", + "readOnly": true + } + } + } + ], + "title": "LicensePoolAccessPolicy", + "discriminator": { + "propertyName": "type" + } + }, + "LicensePoolAccessPolicyList": { + "allOf": [ + { + "$ref": "#/components/schemas/_OpenAPIGenBaseModel" + }, + { + "type": "object", + "properties": { + "resources": { + "title": "Resources", + "description": "The list of policies granting access to the pool", + "default": [], + "type": "array", + "items": { + "$ref": "#/components/schemas/LicensePoolAccessPolicy" + } + }, + "type": { + "title": "Type", + "default": "LicensePoolAccessPolicyList", + "type": "string", + "pattern": "^LicensePoolAccessPolicyList$", + "readOnly": true + } + } + } + ], + "title": "LicensePoolAccessPolicyList", + "discriminator": { + "propertyName": "type" + } + }, + "FunctionFolderOutput": { + "allOf": [ + { + "$ref": "#/components/schemas/PathOutput" + }, + { + "type": "object", + "properties": { + "type": { + "title": "Type", + "default": "FunctionFolderOutput", + "pattern": "^FunctionFolderOutput$", + "type": "string", + "readOnly": true + } + } + } + ], + "title": "FunctionFolderOutput", + "description": "Function Folder output.", + "discriminator": { + "propertyName": "type" + } + }, + "StepArrayInput": { + "allOf": [ + { + "$ref": "#/components/schemas/GenericInput" + }, + { + "type": "object", + "required": [ + "value" + ], + "properties": { + "value": { + "title": "Value", + "type": "array", + "items": {} + }, + "default": { + "title": "Default", + "description": "Default value to use for an input if a value was not supplied.", + "type": "array", + "items": {} + }, + "alias": { + "title": "Alias", + "description": "A list of aliases for this input in different platforms.", + "type": "array", + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/DAGGenericInputAlias" + }, + { + "$ref": "#/components/schemas/DAGStringInputAlias" + }, + { + "$ref": "#/components/schemas/DAGIntegerInputAlias" + }, + { + "$ref": "#/components/schemas/DAGNumberInputAlias" + }, + { + "$ref": "#/components/schemas/DAGBooleanInputAlias" + }, + { + "$ref": "#/components/schemas/DAGFolderInputAlias" + }, + { + "$ref": "#/components/schemas/DAGFileInputAlias" + }, + { + "$ref": "#/components/schemas/DAGPathInputAlias" + }, + { + "$ref": "#/components/schemas/DAGArrayInputAlias" + }, + { + "$ref": "#/components/schemas/DAGJSONObjectInputAlias" + }, + { + "$ref": "#/components/schemas/DAGLinkedInputAlias" + } + ] + } + }, + "required": { + "title": "Required", + "description": "A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided.", + "default": false, + "type": "boolean" + }, + "spec": { + "title": "Spec", + "description": "An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec.", + "type": "object" + }, + "items_type": { + "description": "Type of items in an array. All the items in an array must be from the same type.", + "default": "String", + "allOf": [ + { + "$ref": "#/components/schemas/ItemType" + } + ] + }, + "type": { + "title": "Type", + "default": "StepArrayInput", + "pattern": "^StepArrayInput$", + "type": "string", + "readOnly": true + } + } + } + ], + "title": "StepArrayInput", + "description": "A JSON array input.", + "discriminator": { + "propertyName": "type" + } + }, + "AccountPublic": { + "allOf": [ + { + "$ref": "#/components/schemas/_OpenAPIGenBaseModel" + }, + { + "type": "object", + "properties": { + "id": { + "title": "Id", + "example": "0ad77f99-8043-46e4-8220-7221487c3ee5", + "type": "string" + }, + "account_type": { + "title": "Account Type", + "example": "user", + "type": "string" + }, + "name": { + "title": "Name", + "example": "ladybugbot", + "type": "string" + }, + "display_name": { + "title": "Display Name", + "example": "Ladybug Bot", + "type": "string" + }, + "description": { + "title": "Description", + "example": "Beep Boop!", + "type": "string" + }, + "picture_url": { + "title": "Picture Url", + "description": "https://robohash.org/ladybugbot", + "type": "string" + }, + "type": { + "title": "Type", + "default": "AccountPublic", + "type": "string", + "pattern": "^AccountPublic$", + "readOnly": true + } + }, + "required": [ + "id", + "account_type", + "name" + ] + } + ], + "title": "AccountPublic", + "discriminator": { + "propertyName": "type" + } + }, + "RepositoryUserPermissions": { "allOf": [ { - "$ref": "#/components/schemas/_InputReferenceBase" + "$ref": "#/components/schemas/UserPermission" }, { "type": "object", "properties": { "type": { "title": "Type", - "default": "InputReference", - "pattern": "^InputReference$", + "default": "RepositoryUserPermissions", "type": "string", + "pattern": "^RepositoryUserPermissions$", "readOnly": true } } } ], - "title": "InputReference", - "description": "An input parameter reference which is not a file or a folder.\n\nFor a file or a folder use InputFileReference, InputFolderReference or\nInputPathReference instead.", + "title": "RepositoryUserPermissions", "discriminator": { "propertyName": "type" } }, - "TaskReference": { + "Repository": { "allOf": [ { - "$ref": "#/components/schemas/_TaskReferenceBase" + "$ref": "#/components/schemas/RepositoryCreate" }, { "type": "object", + "required": [ + "id", + "latest_tag", + "owner" + ], "properties": { + "id": { + "title": "Id", + "description": "The recipe unique ID", + "example": "5d5e7103-2c1e-413f-9332-f8ec4a9aace7", + "type": "string" + }, + "latest_tag": { + "title": "Latest Tag", + "description": "The latest package version to be indexed", + "example": "0.2.1", + "type": "string" + }, + "owner": { + "title": "Owner", + "description": "The owner of the repository", + "allOf": [ + { + "$ref": "#/components/schemas/AccountPublic" + } + ] + }, + "permissions": { + "title": "Permissions", + "description": "The permissions the user making the API call has on the resource", + "default": { + "admin": false, + "write": false, + "read": false + }, + "allOf": [ + { + "$ref": "#/components/schemas/RepositoryUserPermissions" + } + ] + }, + "slug": { + "title": "Slug", + "description": "The repository slug", + "example": "ladybug-tools/daylight-factor", + "type": "string" + }, "type": { "title": "Type", - "default": "TaskReference", - "pattern": "^TaskReference$", + "default": "Repository", "type": "string", + "pattern": "^Repository$", "readOnly": true } } } ], - "title": "TaskReference", - "description": "A Task reference for parameters other than files or folders.", + "title": "Repository", "discriminator": { "propertyName": "type" } }, - "ValueListReference": { + "RepositoryList": { "allOf": [ { - "$ref": "#/components/schemas/_BaseReference" + "$ref": "#/components/schemas/_OpenAPIGenBaseModel" + }, + { + "type": "object", + "required": [ + "page", + "per_page", + "page_count", + "total_count", + "resources" + ], + "properties": { + "page": { + "title": "Page", + "description": "The current page the pagination request is on", + "type": "integer", + "format": "int32" + }, + "per_page": { + "title": "Per Page", + "description": "The number of pages per pagination request", + "type": "integer", + "format": "int32" + }, + "page_count": { + "title": "Page Count", + "description": "The total number of pages", + "type": "integer", + "format": "int32" + }, + "total_count": { + "title": "Total Count", + "description": "The total number of resources matching the list request", + "type": "integer", + "format": "int32" + }, + "resources": { + "title": "Resources", + "type": "array", + "items": { + "$ref": "#/components/schemas/Repository" + } + }, + "next_page": { + "title": "Next Page", + "description": "The next page, if this on is not the last", + "type": "integer", + "format": "int32" + }, + "type": { + "title": "Type", + "default": "RepositoryList", + "type": "string", + "pattern": "^RepositoryList$", + "readOnly": true + } + } + } + ], + "title": "RepositoryList", + "description": "A list response from a pagination request", + "discriminator": { + "propertyName": "type" + } + }, + "StepStringInput": { + "allOf": [ + { + "$ref": "#/components/schemas/FunctionStringInput" }, { "type": "object", @@ -7127,134 +11466,296 @@ "properties": { "value": { "title": "Value", - "description": "A fixed value for this reference.", + "type": "string" + }, + "type": { + "title": "Type", + "default": "StepStringInput", + "pattern": "^StepStringInput$", + "type": "string", + "readOnly": true + } + } + } + ], + "title": "StepStringInput", + "description": "A String input.", + "discriminator": { + "propertyName": "type" + } + }, + "StepIntegerInput": { + "allOf": [ + { + "$ref": "#/components/schemas/GenericInput" + }, + { + "type": "object", + "required": [ + "value" + ], + "properties": { + "value": { + "title": "Value", + "type": "integer", + "format": "int32" + }, + "default": { + "title": "Default", + "description": "Default value to use for an input if a value was not supplied.", + "type": "integer", + "format": "int32" + }, + "alias": { + "title": "Alias", + "description": "A list of aliases for this input in different platforms.", "type": "array", - "items": {} + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/DAGGenericInputAlias" + }, + { + "$ref": "#/components/schemas/DAGStringInputAlias" + }, + { + "$ref": "#/components/schemas/DAGIntegerInputAlias" + }, + { + "$ref": "#/components/schemas/DAGNumberInputAlias" + }, + { + "$ref": "#/components/schemas/DAGBooleanInputAlias" + }, + { + "$ref": "#/components/schemas/DAGFolderInputAlias" + }, + { + "$ref": "#/components/schemas/DAGFileInputAlias" + }, + { + "$ref": "#/components/schemas/DAGPathInputAlias" + }, + { + "$ref": "#/components/schemas/DAGArrayInputAlias" + }, + { + "$ref": "#/components/schemas/DAGJSONObjectInputAlias" + }, + { + "$ref": "#/components/schemas/DAGLinkedInputAlias" + } + ] + } + }, + "required": { + "title": "Required", + "description": "A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided.", + "default": false, + "type": "boolean" + }, + "spec": { + "title": "Spec", + "description": "An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec.", + "type": "object" }, "type": { "title": "Type", - "default": "ValueListReference", - "pattern": "^ValueListReference$", + "default": "StepIntegerInput", + "pattern": "^StepIntegerInput$", "type": "string", "readOnly": true } } } ], - "title": "ValueListReference", - "description": "A reference to a fixed value.", + "title": "StepIntegerInput", + "description": "An integer input.", "discriminator": { "propertyName": "type" } }, - "DAGTaskLoop": { + "StepNumberInput": { "allOf": [ { - "$ref": "#/components/schemas/_OpenAPIGenBaseModel" + "$ref": "#/components/schemas/GenericInput" }, { "type": "object", + "required": [ + "value" + ], "properties": { + "value": { + "title": "Value", + "type": "number", + "format": "double" + }, + "default": { + "title": "Default", + "description": "Default value to use for an input if a value was not supplied.", + "type": "number", + "format": "double" + }, + "alias": { + "title": "Alias", + "description": "A list of aliases for this input in different platforms.", + "type": "array", + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/DAGGenericInputAlias" + }, + { + "$ref": "#/components/schemas/DAGStringInputAlias" + }, + { + "$ref": "#/components/schemas/DAGIntegerInputAlias" + }, + { + "$ref": "#/components/schemas/DAGNumberInputAlias" + }, + { + "$ref": "#/components/schemas/DAGBooleanInputAlias" + }, + { + "$ref": "#/components/schemas/DAGFolderInputAlias" + }, + { + "$ref": "#/components/schemas/DAGFileInputAlias" + }, + { + "$ref": "#/components/schemas/DAGPathInputAlias" + }, + { + "$ref": "#/components/schemas/DAGArrayInputAlias" + }, + { + "$ref": "#/components/schemas/DAGJSONObjectInputAlias" + }, + { + "$ref": "#/components/schemas/DAGLinkedInputAlias" + } + ] + } + }, + "required": { + "title": "Required", + "description": "A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided.", + "default": false, + "type": "boolean" + }, + "spec": { + "title": "Spec", + "description": "An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec.", + "type": "object" + }, "type": { "title": "Type", - "default": "DAGTaskLoop", - "pattern": "^DAGTaskLoop$", + "default": "StepNumberInput", + "pattern": "^StepNumberInput$", "type": "string", "readOnly": true - }, - "annotations": { - "title": "Annotations", - "description": "An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.", - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "from": { - "title": "From", - "description": "The task or DAG parameter to loop over (must be iterable).", - "anyOf": [ - { - "$ref": "#/components/schemas/InputReference" - }, - { - "$ref": "#/components/schemas/TaskReference" - }, - { - "$ref": "#/components/schemas/ValueListReference" - } - ] } } } ], - "title": "DAGTaskLoop", - "description": "Loop configuration for the task.\n\nThis will run the template provided multiple times and in parallel relative to an\ninput or task parameter which should be a list.", + "title": "StepNumberInput", + "description": "A number input.", "discriminator": { "propertyName": "type" } }, - "IOAliasHandler": { + "StepBooleanInput": { "allOf": [ { - "$ref": "#/components/schemas/_OpenAPIGenBaseModel" + "$ref": "#/components/schemas/GenericInput" }, { "type": "object", + "required": [ + "value" + ], "properties": { - "language": { - "title": "Language", - "description": "Declare the language (e.g. python, csharp, etc.). This option allows the recipe to be flexible on handling different programming languages.", - "type": "string" + "value": { + "title": "Value", + "type": "boolean" }, - "module": { - "title": "Module", - "description": "Target module or namespace to load the alias function.", - "example": "honeybee_rhino.handlers", - "type": "string" + "default": { + "title": "Default", + "description": "Default value to use for an input if a value was not supplied.", + "type": "boolean" }, - "function": { - "title": "Function", - "description": "Name of the function. The input value will be passed to this function as the first argument.", - "type": "string" + "alias": { + "title": "Alias", + "description": "A list of aliases for this input in different platforms.", + "type": "array", + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/DAGGenericInputAlias" + }, + { + "$ref": "#/components/schemas/DAGStringInputAlias" + }, + { + "$ref": "#/components/schemas/DAGIntegerInputAlias" + }, + { + "$ref": "#/components/schemas/DAGNumberInputAlias" + }, + { + "$ref": "#/components/schemas/DAGBooleanInputAlias" + }, + { + "$ref": "#/components/schemas/DAGFolderInputAlias" + }, + { + "$ref": "#/components/schemas/DAGFileInputAlias" + }, + { + "$ref": "#/components/schemas/DAGPathInputAlias" + }, + { + "$ref": "#/components/schemas/DAGArrayInputAlias" + }, + { + "$ref": "#/components/schemas/DAGJSONObjectInputAlias" + }, + { + "$ref": "#/components/schemas/DAGLinkedInputAlias" + } + ] + } + }, + "required": { + "title": "Required", + "description": "A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided.", + "default": false, + "type": "boolean" + }, + "spec": { + "title": "Spec", + "description": "An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec.", + "type": "object" }, "type": { "title": "Type", - "default": "IOAliasHandler", - "pattern": "^IOAliasHandler$", + "default": "StepBooleanInput", + "pattern": "^StepBooleanInput$", "type": "string", "readOnly": true - }, - "annotations": { - "title": "Annotations", - "description": "An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.", - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "index": { - "title": "Index", - "description": "An integer to set the index for the order of execution. This input is only useful when there are more than one handler for the same platform and the output of one handler should be passed to another handler. This is also called chained handlers. By default all the handlers are indexed as 0 assuming they are not chained.", - "default": 0, - "type": "integer", - "format": "int32" } - }, - "required": [ - "language", - "module", - "function" - ] + } } ], - "title": "IOAliasHandler", - "description": "Input and output alias handler object.", + "title": "StepBooleanInput", + "description": "The boolean type matches only two special values: True and False.", "discriminator": { "propertyName": "type" } }, - "DAGGenericInputAlias": { + "StepFolderInput": { "allOf": [ { "$ref": "#/components/schemas/GenericInput" @@ -7262,31 +11763,81 @@ { "type": "object", "required": [ - "platform", - "handler" + "source" ], "properties": { - "platform": { - "title": "Platform", - "description": "Name of the client platform (e.g. Grasshopper, Revit, etc). The value can be any strings as long as it has been agreed between client-side developer and author of the recipe.", - "type": "array", - "items": { - "type": "string" - } + "source": { + "title": "Source", + "description": "The path to source the file from.", + "anyOf": [ + { + "$ref": "#/components/schemas/HTTP" + }, + { + "$ref": "#/components/schemas/S3" + }, + { + "$ref": "#/components/schemas/ProjectFolder" + } + ] + }, + "default": { + "title": "Default", + "description": "The default source for file if the value is not provided.", + "anyOf": [ + { + "$ref": "#/components/schemas/HTTP" + }, + { + "$ref": "#/components/schemas/S3" + }, + { + "$ref": "#/components/schemas/ProjectFolder" + } + ] }, - "handler": { - "title": "Handler", - "description": "List of process actions to process the input or output value.", + "alias": { + "title": "Alias", + "description": "A list of aliases for this input in different platforms.", "type": "array", "items": { - "$ref": "#/components/schemas/IOAliasHandler" + "anyOf": [ + { + "$ref": "#/components/schemas/DAGGenericInputAlias" + }, + { + "$ref": "#/components/schemas/DAGStringInputAlias" + }, + { + "$ref": "#/components/schemas/DAGIntegerInputAlias" + }, + { + "$ref": "#/components/schemas/DAGNumberInputAlias" + }, + { + "$ref": "#/components/schemas/DAGBooleanInputAlias" + }, + { + "$ref": "#/components/schemas/DAGFolderInputAlias" + }, + { + "$ref": "#/components/schemas/DAGFileInputAlias" + }, + { + "$ref": "#/components/schemas/DAGPathInputAlias" + }, + { + "$ref": "#/components/schemas/DAGArrayInputAlias" + }, + { + "$ref": "#/components/schemas/DAGJSONObjectInputAlias" + }, + { + "$ref": "#/components/schemas/DAGLinkedInputAlias" + } + ] } }, - "default": { - "title": "Default", - "description": "Default value for generic input.", - "type": "string" - }, "required": { "title": "Required", "description": "A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided.", @@ -7298,47 +11849,28 @@ "description": "An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec.", "type": "object" }, + "path": { + "title": "Path", + "description": "Path to the target location that the input will be copied to. This path is relative to the working directory where the command is executed.", + "type": "string" + }, "type": { "title": "Type", - "default": "DAGGenericInputAlias", - "pattern": "^DAGGenericInputAlias$", - "type": "string", - "readOnly": true - } - } - } - ], - "title": "DAGGenericInputAlias", - "description": "Base class for DAG Alias inputs.\n\nThis class adds a handler to input to handle the process of loading the input\nfrom different graphical interfaces.", - "discriminator": { - "propertyName": "type" - } - }, - "DAGStringInputAlias": { - "allOf": [ - { - "$ref": "#/components/schemas/DAGGenericInputAlias" - }, - { - "type": "object", - "properties": { - "type": { - "title": "Type", - "default": "DAGStringInputAlias", - "pattern": "^DAGStringInputAlias$", + "default": "StepFolderInput", + "pattern": "^StepFolderInput$", "type": "string", "readOnly": true } } } ], - "title": "DAGStringInputAlias", - "description": "An Alias String input.\n\nYou can add additional validation by defining a JSONSchema specification.\n\nSee http://json-schema.org/understanding-json-schema/reference/string.html#string for\nmore information.\n\n.. code-block:: python\n\n \"schema\": {\n \"type\": \"string\",\n \"maxLength\": 50,\n \"pattern\": \"(?i)(^.*\\.epw$)\"\n }", + "title": "StepFolderInput", + "description": "A folder input.", "discriminator": { "propertyName": "type" } }, - "DAGIntegerInputAlias": { + "StepFileInput": { "allOf": [ { "$ref": "#/components/schemas/GenericInput" @@ -7346,32 +11878,81 @@ { "type": "object", "required": [ - "platform", - "handler" + "source" ], "properties": { - "platform": { - "title": "Platform", - "description": "Name of the client platform (e.g. Grasshopper, Revit, etc). The value can be any strings as long as it has been agreed between client-side developer and author of the recipe.", - "type": "array", - "items": { - "type": "string" - } + "source": { + "title": "Source", + "description": "The path to source the file from.", + "anyOf": [ + { + "$ref": "#/components/schemas/HTTP" + }, + { + "$ref": "#/components/schemas/S3" + }, + { + "$ref": "#/components/schemas/ProjectFolder" + } + ] }, - "handler": { - "title": "Handler", - "description": "List of process actions to process the input or output value.", + "default": { + "title": "Default", + "description": "The default source for file if the value is not provided.", + "anyOf": [ + { + "$ref": "#/components/schemas/HTTP" + }, + { + "$ref": "#/components/schemas/S3" + }, + { + "$ref": "#/components/schemas/ProjectFolder" + } + ] + }, + "alias": { + "title": "Alias", + "description": "A list of aliases for this input in different platforms.", "type": "array", "items": { - "$ref": "#/components/schemas/IOAliasHandler" + "anyOf": [ + { + "$ref": "#/components/schemas/DAGGenericInputAlias" + }, + { + "$ref": "#/components/schemas/DAGStringInputAlias" + }, + { + "$ref": "#/components/schemas/DAGIntegerInputAlias" + }, + { + "$ref": "#/components/schemas/DAGNumberInputAlias" + }, + { + "$ref": "#/components/schemas/DAGBooleanInputAlias" + }, + { + "$ref": "#/components/schemas/DAGFolderInputAlias" + }, + { + "$ref": "#/components/schemas/DAGFileInputAlias" + }, + { + "$ref": "#/components/schemas/DAGPathInputAlias" + }, + { + "$ref": "#/components/schemas/DAGArrayInputAlias" + }, + { + "$ref": "#/components/schemas/DAGJSONObjectInputAlias" + }, + { + "$ref": "#/components/schemas/DAGLinkedInputAlias" + } + ] } }, - "default": { - "title": "Default", - "description": "Default value to use for an input if a value was not supplied.", - "type": "integer", - "format": "int32" - }, "required": { "title": "Required", "description": "A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided.", @@ -7383,23 +11964,36 @@ "description": "An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec.", "type": "object" }, + "path": { + "title": "Path", + "description": "Path to the target location that the input will be copied to. This path is relative to the working directory where the command is executed.", + "type": "string" + }, + "extensions": { + "title": "Extensions", + "description": "Optional list of extensions for file. The check for extension is case-insensitive.", + "type": "array", + "items": { + "type": "string" + } + }, "type": { "title": "Type", - "default": "DAGIntegerInputAlias", - "pattern": "^DAGIntegerInputAlias$", + "default": "StepFileInput", + "pattern": "^StepFileInput$", "type": "string", "readOnly": true } } } ], - "title": "DAGIntegerInputAlias", - "description": "An alias integer input.\n\nYou can add additional validation by defining a JSONSchema specification.\n\nSee http://json-schema.org/understanding-json-schema/reference/numeric.html#numeric\nfor more information.", + "title": "StepFileInput", + "description": "A file input.", "discriminator": { "propertyName": "type" } }, - "DAGNumberInputAlias": { + "StepPathInput": { "allOf": [ { "$ref": "#/components/schemas/GenericInput" @@ -7407,32 +12001,81 @@ { "type": "object", "required": [ - "platform", - "handler" + "source" ], "properties": { - "platform": { - "title": "Platform", - "description": "Name of the client platform (e.g. Grasshopper, Revit, etc). The value can be any strings as long as it has been agreed between client-side developer and author of the recipe.", - "type": "array", - "items": { - "type": "string" - } + "source": { + "title": "Source", + "description": "The path to source the file from.", + "anyOf": [ + { + "$ref": "#/components/schemas/HTTP" + }, + { + "$ref": "#/components/schemas/S3" + }, + { + "$ref": "#/components/schemas/ProjectFolder" + } + ] }, - "handler": { - "title": "Handler", - "description": "List of process actions to process the input or output value.", + "default": { + "title": "Default", + "description": "The default source for file if the value is not provided.", + "anyOf": [ + { + "$ref": "#/components/schemas/HTTP" + }, + { + "$ref": "#/components/schemas/S3" + }, + { + "$ref": "#/components/schemas/ProjectFolder" + } + ] + }, + "alias": { + "title": "Alias", + "description": "A list of aliases for this input in different platforms.", "type": "array", "items": { - "$ref": "#/components/schemas/IOAliasHandler" + "anyOf": [ + { + "$ref": "#/components/schemas/DAGGenericInputAlias" + }, + { + "$ref": "#/components/schemas/DAGStringInputAlias" + }, + { + "$ref": "#/components/schemas/DAGIntegerInputAlias" + }, + { + "$ref": "#/components/schemas/DAGNumberInputAlias" + }, + { + "$ref": "#/components/schemas/DAGBooleanInputAlias" + }, + { + "$ref": "#/components/schemas/DAGFolderInputAlias" + }, + { + "$ref": "#/components/schemas/DAGFileInputAlias" + }, + { + "$ref": "#/components/schemas/DAGPathInputAlias" + }, + { + "$ref": "#/components/schemas/DAGArrayInputAlias" + }, + { + "$ref": "#/components/schemas/DAGJSONObjectInputAlias" + }, + { + "$ref": "#/components/schemas/DAGLinkedInputAlias" + } + ] } }, - "default": { - "title": "Default", - "description": "Default value to use for an input if a value was not supplied.", - "type": "number", - "format": "double" - }, "required": { "title": "Required", "description": "A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided.", @@ -7444,23 +12087,36 @@ "description": "An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec.", "type": "object" }, + "path": { + "title": "Path", + "description": "Path to the target location that the input will be copied to. This path is relative to the working directory where the command is executed.", + "type": "string" + }, + "extensions": { + "title": "Extensions", + "description": "Optional list of extensions for file. The check for extension is case-insensitive.", + "type": "array", + "items": { + "type": "string" + } + }, "type": { "title": "Type", - "default": "DAGNumberInputAlias", - "pattern": "^DAGNumberInputAlias$", + "default": "StepPathInput", + "pattern": "^StepPathInput$", "type": "string", "readOnly": true } } } ], - "title": "DAGNumberInputAlias", - "description": "An alias number input.\n\nYou can add additional validation by defining a JSONSchema specification.\n\nSee http://json-schema.org/understanding-json-schema/reference/numeric.html#numeric\nfor more information.", + "title": "StepPathInput", + "description": "A file or a folder input.", "discriminator": { "propertyName": "type" } }, - "DAGBooleanInputAlias": { + "StepJSONObjectInput": { "allOf": [ { "$ref": "#/components/schemas/GenericInput" @@ -7468,30 +12124,59 @@ { "type": "object", "required": [ - "platform", - "handler" + "value" ], "properties": { - "platform": { - "title": "Platform", - "description": "Name of the client platform (e.g. Grasshopper, Revit, etc). The value can be any strings as long as it has been agreed between client-side developer and author of the recipe.", - "type": "array", - "items": { - "type": "string" - } - }, - "handler": { - "title": "Handler", - "description": "List of process actions to process the input or output value.", - "type": "array", - "items": { - "$ref": "#/components/schemas/IOAliasHandler" - } + "value": { + "title": "Value", + "type": "object" }, "default": { "title": "Default", "description": "Default value to use for an input if a value was not supplied.", - "type": "boolean" + "type": "object" + }, + "alias": { + "title": "Alias", + "description": "A list of aliases for this input in different platforms.", + "type": "array", + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/DAGGenericInputAlias" + }, + { + "$ref": "#/components/schemas/DAGStringInputAlias" + }, + { + "$ref": "#/components/schemas/DAGIntegerInputAlias" + }, + { + "$ref": "#/components/schemas/DAGNumberInputAlias" + }, + { + "$ref": "#/components/schemas/DAGBooleanInputAlias" + }, + { + "$ref": "#/components/schemas/DAGFolderInputAlias" + }, + { + "$ref": "#/components/schemas/DAGFileInputAlias" + }, + { + "$ref": "#/components/schemas/DAGPathInputAlias" + }, + { + "$ref": "#/components/schemas/DAGArrayInputAlias" + }, + { + "$ref": "#/components/schemas/DAGJSONObjectInputAlias" + }, + { + "$ref": "#/components/schemas/DAGLinkedInputAlias" + } + ] + } }, "required": { "title": "Required", @@ -7506,231 +12191,160 @@ }, "type": { "title": "Type", - "default": "DAGBooleanInputAlias", - "pattern": "^DAGBooleanInputAlias$", + "default": "StepJSONObjectInput", + "pattern": "^StepJSONObjectInput$", "type": "string", "readOnly": true } } } ], - "title": "DAGBooleanInputAlias", - "description": "The boolean type matches only two special values: True and False.\n\nNote that values that evaluate to true or false, such as 1 and 0, are not accepted.\n\nYou can add additional validation by defining a JSONSchema specification.\n\nSee http://json-schema.org/understanding-json-schema/reference/boolean.html for more\ninformation.", + "title": "StepJSONObjectInput", + "description": "A JSON object input.", "discriminator": { "propertyName": "type" } }, - "HTTP": { + "StepStringOutput": { "allOf": [ { - "$ref": "#/components/schemas/_ArtifactSource" + "$ref": "#/components/schemas/FunctionStringOutput" }, { "type": "object", "required": [ - "url" + "value" ], "properties": { - "url": { - "title": "Url", - "description": "For a HTTP endpoint this can be http://climate.onebuilding.org.", + "value": { + "title": "Value", "type": "string" }, "type": { "title": "Type", - "default": "HTTP", - "pattern": "^HTTP$", + "default": "StepStringOutput", + "pattern": "^StepStringOutput$", "type": "string", "readOnly": true } } } ], - "title": "HTTP", - "description": "HTTP Source\n\nA web HTTP to an FTP server or an API for example.", + "title": "StepStringOutput", + "description": "A String output.", "discriminator": { "propertyName": "type" } }, - "S3": { + "StepIntegerOutput": { "allOf": [ { - "$ref": "#/components/schemas/_ArtifactSource" + "$ref": "#/components/schemas/FunctionIntegerOutput" }, { "type": "object", "required": [ - "key", - "endpoint", - "bucket" + "value" ], "properties": { - "key": { - "title": "Key", - "description": "The path inside the bucket to source artifacts from.", - "type": "string" - }, - "endpoint": { - "title": "Endpoint", - "description": "The HTTP endpoint to reach the S3 bucket.", - "type": "string" - }, - "bucket": { - "title": "Bucket", - "description": "The name of the S3 bucket on the host server.", - "type": "string" - }, - "credentials_path": { - "title": "Credentials Path", - "description": "Path to the file holding the AccessKey and SecretAccessKey to authenticate to the bucket. Assumes public bucket access if none are specified.", - "type": "string" + "value": { + "title": "Value", + "type": "integer", + "format": "int32" }, "type": { "title": "Type", - "default": "S3", - "pattern": "^S3$", + "default": "StepIntegerOutput", + "pattern": "^StepIntegerOutput$", "type": "string", "readOnly": true } } } ], - "title": "S3", - "description": "S3 Source\n\nAn S3 bucket artifact Source.", + "title": "StepIntegerOutput", + "description": "An integer output.", "discriminator": { "propertyName": "type" } }, - "ProjectFolder": { + "StepNumberOutput": { "allOf": [ { - "$ref": "#/components/schemas/_ArtifactSource" + "$ref": "#/components/schemas/FunctionNumberOutput" }, { "type": "object", + "required": [ + "value" + ], "properties": { - "path": { - "title": "Path", - "description": "The path to a folder where files and folders can be sourced. For a local filesystem this can be \"C:\\Users\\me\\jobs\\test\".", - "type": "string" + "value": { + "title": "Value", + "type": "number", + "format": "double" }, "type": { "title": "Type", - "default": "ProjectFolder", - "pattern": "^ProjectFolder$", + "default": "StepNumberOutput", + "pattern": "^StepNumberOutput$", "type": "string", "readOnly": true } } } ], - "title": "ProjectFolder", - "description": "Project Folder Source\n\nThis is the path to a folder where files and folders can be sourced. In the context\nof a desktop run Workflow this folder will correspond to a local folder. In the\ncontext of a workflow run on Pollination this folder will correspond to a Project\nscoped folder.", + "title": "StepNumberOutput", + "description": "A number output.", "discriminator": { "propertyName": "type" } }, - "DAGFolderInputAlias": { + "StepBooleanOutput": { "allOf": [ { - "$ref": "#/components/schemas/GenericInput" + "$ref": "#/components/schemas/FunctionBooleanOutput" }, { "type": "object", "required": [ - "platform", - "handler" + "value" ], "properties": { - "platform": { - "title": "Platform", - "description": "Name of the client platform (e.g. Grasshopper, Revit, etc). The value can be any strings as long as it has been agreed between client-side developer and author of the recipe.", - "type": "array", - "items": { - "type": "string" - } - }, - "handler": { - "title": "Handler", - "description": "List of process actions to process the input or output value.", - "type": "array", - "items": { - "$ref": "#/components/schemas/IOAliasHandler" - } - }, - "default": { - "title": "Default", - "description": "The default source for file if the value is not provided.", - "anyOf": [ - { - "$ref": "#/components/schemas/HTTP" - }, - { - "$ref": "#/components/schemas/S3" - }, - { - "$ref": "#/components/schemas/ProjectFolder" - } - ] - }, - "required": { - "title": "Required", - "description": "A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided.", - "default": false, + "value": { + "title": "Value", "type": "boolean" }, - "spec": { - "title": "Spec", - "description": "An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec.", - "type": "object" - }, "type": { "title": "Type", - "default": "DAGFolderInputAlias", - "pattern": "^DAGFolderInputAlias$", + "default": "StepBooleanOutput", + "pattern": "^StepBooleanOutput$", "type": "string", "readOnly": true } } } ], - "title": "DAGFolderInputAlias", - "description": "An alias folder input.\n\nFolder is a special string input. Unlike other string inputs, a folder will be copied\nfrom its location to execution folder when a workflow is executed.\n\nYou can add additional validation by defining a JSONSchema specification.\n\nSee http://json-schema.org/understanding-json-schema/reference/string.html#string for\nmore information.\n\n.. code-block:: python\n\n \"schema\": {\n \"type\": \"string\",\n \"maxLength\": 50,\n }", + "title": "StepBooleanOutput", + "description": "The boolean type matches only two special values: True and False.", "discriminator": { "propertyName": "type" } }, - "DAGFileInputAlias": { + "StepFolderOutput": { "allOf": [ { - "$ref": "#/components/schemas/GenericInput" + "$ref": "#/components/schemas/FunctionFolderOutput" }, { "type": "object", "required": [ - "platform", - "handler" + "source" ], "properties": { - "platform": { - "title": "Platform", - "description": "Name of the client platform (e.g. Grasshopper, Revit, etc). The value can be any strings as long as it has been agreed between client-side developer and author of the recipe.", - "type": "array", - "items": { - "type": "string" - } - }, - "handler": { - "title": "Handler", - "description": "List of process actions to process the input or output value.", - "type": "array", - "items": { - "$ref": "#/components/schemas/IOAliasHandler" - } - }, - "default": { - "title": "Default", - "description": "The default source for file if the value is not provided.", + "source": { + "title": "Source", + "description": "The path to source the file from.", "anyOf": [ { "$ref": "#/components/schemas/HTTP" @@ -7743,72 +12357,36 @@ } ] }, - "required": { - "title": "Required", - "description": "A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided.", - "default": false, - "type": "boolean" - }, - "spec": { - "title": "Spec", - "description": "An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec.", - "type": "object" - }, - "extensions": { - "title": "Extensions", - "description": "Optional list of extensions for file. The check for extension is case-insensitive.", - "type": "array", - "items": { - "type": "string" - } - }, "type": { "title": "Type", - "default": "DAGFileInputAlias", - "pattern": "^DAGFileInputAlias$", + "default": "StepFolderOutput", + "pattern": "^StepFolderOutput$", "type": "string", "readOnly": true } } } ], - "title": "DAGFileInputAlias", - "description": "An alias file input.\n\nFile is a special string input. Unlike other string inputs, a file will be copied\nfrom its location to execution folder when a workflow is executed.\n\nYou can add additional validation by defining a JSONSchema specification.\n\nSee http://json-schema.org/understanding-json-schema/reference/string.html#string for\nmore information.\n\n.. code-block:: python\n\n # a file with maximum 50 characters with an ``epw`` extension.\n\n \"schema\": {\n \"type\": \"string\",\n \"maxLength\": 50,\n \"pattern\": \"(?i)(^.*\\.epw$)\"\n }", + "title": "StepFolderOutput", + "description": "A folder output.", "discriminator": { "propertyName": "type" } }, - "DAGPathInputAlias": { + "StepFileOutput": { "allOf": [ { - "$ref": "#/components/schemas/GenericInput" + "$ref": "#/components/schemas/FunctionFileOutput" }, { "type": "object", "required": [ - "platform", - "handler" + "source" ], "properties": { - "platform": { - "title": "Platform", - "description": "Name of the client platform (e.g. Grasshopper, Revit, etc). The value can be any strings as long as it has been agreed between client-side developer and author of the recipe.", - "type": "array", - "items": { - "type": "string" - } - }, - "handler": { - "title": "Handler", - "description": "List of process actions to process the input or output value.", - "type": "array", - "items": { - "$ref": "#/components/schemas/IOAliasHandler" - } - }, - "default": { - "title": "Default", - "description": "The default source for file if the value is not provided.", + "source": { + "title": "Source", + "description": "The path to source the file from.", "anyOf": [ { "$ref": "#/components/schemas/HTTP" @@ -7821,102 +12399,40 @@ } ] }, - "required": { - "title": "Required", - "description": "A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided.", - "default": false, - "type": "boolean" - }, - "spec": { - "title": "Spec", - "description": "An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec.", - "type": "object" - }, - "extensions": { - "title": "Extensions", - "description": "Optional list of extensions for path. The check for extension is case-insensitive. The extension will only be validated for file inputs.", - "type": "array", - "items": { - "type": "string" - } - }, "type": { "title": "Type", - "default": "DAGPathInputAlias", - "pattern": "^DAGPathInputAlias$", + "default": "StepFileOutput", + "pattern": "^StepFileOutput$", "type": "string", "readOnly": true } } } ], - "title": "DAGPathInputAlias", - "description": "A file or a folder input.\n\nUse this input only in cases that the input can be either a file or folder. For file\nor folder-only inputs see File and Folder.\n\nPath is a special string input. Unlike other string inputs, a path will be copied\nfrom its location to execution folder when a workflow is executed.\n\nYou can add additional validation by defining a JSONSchema specification.\n\nSee http://json-schema.org/understanding-json-schema/reference/string.html#string for\nmore information.\n\n.. code-block:: python\n\n # a file with maximum 50 characters with an ``epw`` extension.\n\n \"schema\": {\n \"type\": \"string\",\n \"maxLength\": 50,\n \"pattern\": \"(?i)(^.*\\.epw$)\"\n }", + "title": "StepFileOutput", + "description": "A file output.", "discriminator": { "propertyName": "type" } }, - "ItemType": { - "title": "ItemType", - "description": "Type enum for items in a list.\n\nItems can not be files or folder. For a list of files you should copy them to a\nfolder and use FolderInput input instead of using ArrayInput.", - "enum": [ - "Generic", - "String", - "Integer", - "Number", - "Boolean", - "Array", - "JSONObject" - ], - "type": "string" - }, - "DAGArrayInputAlias": { + "StepArrayOutput": { "allOf": [ { - "$ref": "#/components/schemas/GenericInput" + "$ref": "#/components/schemas/FunctionStringOutput" }, { "type": "object", "required": [ - "platform", - "handler" + "value" ], "properties": { - "platform": { - "title": "Platform", - "description": "Name of the client platform (e.g. Grasshopper, Revit, etc). The value can be any strings as long as it has been agreed between client-side developer and author of the recipe.", - "type": "array", - "items": { - "type": "string" - } - }, - "handler": { - "title": "Handler", - "description": "List of process actions to process the input or output value.", - "type": "array", - "items": { - "$ref": "#/components/schemas/IOAliasHandler" - } - }, - "default": { - "title": "Default", - "description": "Default value to use for an input if a value was not supplied.", + "value": { + "title": "Value", "type": "array", "items": {} }, - "required": { - "title": "Required", - "description": "A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided.", - "default": false, - "type": "boolean" - }, - "spec": { - "title": "Spec", - "description": "An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec.", - "type": "object" - }, "items_type": { - "description": "Type of items in an array. All the items in an array must be from the same type.", + "description": "Type of items in this array. All the items in an array must be from the same type.", "default": "String", "allOf": [ { @@ -7926,209 +12442,225 @@ }, "type": { "title": "Type", - "default": "DAGArrayInputAlias", - "pattern": "^DAGArrayInputAlias$", + "default": "StepArrayOutput", + "pattern": "^StepArrayOutput$", "type": "string", "readOnly": true } } } ], - "title": "DAGArrayInputAlias", - "description": "A JSON array input.\n\nYou can add additional validation by defining a JSONSchema specification.\n\nSee http://json-schema.org/understanding-json-schema/reference/array.html for\nmore information.", + "title": "StepArrayOutput", + "description": "A JSON array output.", "discriminator": { "propertyName": "type" } }, - "DAGJSONObjectInputAlias": { + "StepJSONObjectOutput": { "allOf": [ { - "$ref": "#/components/schemas/GenericInput" + "$ref": "#/components/schemas/FunctionJSONObjectOutput" }, { "type": "object", "required": [ - "platform", - "handler" + "value" ], "properties": { - "platform": { - "title": "Platform", - "description": "Name of the client platform (e.g. Grasshopper, Revit, etc). The value can be any strings as long as it has been agreed between client-side developer and author of the recipe.", - "type": "array", - "items": { - "type": "string" - } - }, - "handler": { - "title": "Handler", - "description": "List of process actions to process the input or output value.", - "type": "array", - "items": { - "$ref": "#/components/schemas/IOAliasHandler" - } - }, - "default": { - "title": "Default", - "description": "Default value to use for an input if a value was not supplied.", - "type": "object" - }, - "required": { - "title": "Required", - "description": "A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided.", - "default": false, - "type": "boolean" - }, - "spec": { - "title": "Spec", - "description": "An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec.", + "value": { + "title": "Value", "type": "object" }, "type": { "title": "Type", - "default": "DAGJSONObjectInputAlias", - "pattern": "^DAGJSONObjectInputAlias$", + "default": "StepJSONObjectOutput", + "pattern": "^StepJSONObjectOutput$", "type": "string", "readOnly": true } } } ], - "title": "DAGJSONObjectInputAlias", - "description": "An alias JSON object input.\n\nJSON objects are similar to Python dictionaries.\n\nYou can add additional validation by defining a JSONSchema specification.\n\nSee http://json-schema.org/understanding-json-schema/reference/object.html for\nmore information.", - "discriminator": { - "propertyName": "type" - } + "title": "StepJSONObjectOutput", + "description": "A JSON object output.", + "discriminator": { + "propertyName": "type" + } + }, + "RunStatusEnum": { + "title": "RunStatusEnum", + "description": "Enumaration of allowable status strings", + "enum": [ + "Created", + "Scheduled", + "Running", + "Post-Processing", + "Failed", + "Cancelled", + "Succeeded", + "Unknown" + ], + "type": "string" + }, + "StepStatusEnum": { + "title": "StepStatusEnum", + "description": "Enumaration of allowable status strings", + "enum": [ + "Scheduled", + "Running", + "Failed", + "Succeeded", + "Skipped", + "Unknown" + ], + "type": "string" }, - "DAGLinkedInputAlias": { - "allOf": [ - { - "$ref": "#/components/schemas/DAGGenericInputAlias" - }, - { - "type": "object", - "properties": { - "type": { - "title": "Type", - "default": "DAGLinkedInputAlias", - "pattern": "^DAGLinkedInputAlias$", - "type": "string", - "readOnly": true - } - } - } + "StatusType": { + "title": "StatusType", + "description": "Type enum for status type.", + "enum": [ + "Function", + "DAG", + "Loop", + "Unknown" ], - "title": "DAGLinkedInputAlias", - "description": "An Alias for Linked Inputs.\n\nA linked input alias will be hidden in the UI and will be linked to an object in \nthe UI using the input handler.", - "discriminator": { - "propertyName": "type" - } + "type": "string" }, - "DAGBooleanInput": { + "StepStatus": { "allOf": [ { - "$ref": "#/components/schemas/GenericInput" + "$ref": "#/components/schemas/_OpenAPIGenBaseModel" }, { "type": "object", + "required": [ + "inputs", + "outputs", + "started_at", + "id", + "name", + "status_type", + "template_ref", + "children_ids", + "outbound_steps" + ], "properties": { - "default": { - "title": "Default", - "description": "Default value to use for an input if a value was not supplied.", - "type": "boolean" - }, - "alias": { - "title": "Alias", - "description": "A list of aliases for this input in different platforms.", + "inputs": { + "title": "Inputs", + "description": "The inputs used by this step.", "type": "array", "items": { "anyOf": [ { - "$ref": "#/components/schemas/DAGGenericInputAlias" + "$ref": "#/components/schemas/StepStringInput" }, { - "$ref": "#/components/schemas/DAGStringInputAlias" + "$ref": "#/components/schemas/StepIntegerInput" }, { - "$ref": "#/components/schemas/DAGIntegerInputAlias" + "$ref": "#/components/schemas/StepNumberInput" }, { - "$ref": "#/components/schemas/DAGNumberInputAlias" + "$ref": "#/components/schemas/StepBooleanInput" }, { - "$ref": "#/components/schemas/DAGBooleanInputAlias" + "$ref": "#/components/schemas/StepFolderInput" }, { - "$ref": "#/components/schemas/DAGFolderInputAlias" + "$ref": "#/components/schemas/StepFileInput" }, { - "$ref": "#/components/schemas/DAGFileInputAlias" + "$ref": "#/components/schemas/StepPathInput" }, { - "$ref": "#/components/schemas/DAGPathInputAlias" + "$ref": "#/components/schemas/StepArrayInput" }, { - "$ref": "#/components/schemas/DAGArrayInputAlias" + "$ref": "#/components/schemas/StepJSONObjectInput" + } + ] + } + }, + "outputs": { + "title": "Outputs", + "description": "The outputs produced by this step.", + "type": "array", + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/StepStringOutput" }, { - "$ref": "#/components/schemas/DAGJSONObjectInputAlias" + "$ref": "#/components/schemas/StepIntegerOutput" }, { - "$ref": "#/components/schemas/DAGLinkedInputAlias" + "$ref": "#/components/schemas/StepNumberOutput" + }, + { + "$ref": "#/components/schemas/StepBooleanOutput" + }, + { + "$ref": "#/components/schemas/StepFolderOutput" + }, + { + "$ref": "#/components/schemas/StepFileOutput" + }, + { + "$ref": "#/components/schemas/StepPathOutput" + }, + { + "$ref": "#/components/schemas/StepArrayOutput" + }, + { + "$ref": "#/components/schemas/StepJSONObjectOutput" } ] } }, - "required": { - "title": "Required", - "description": "A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided.", - "default": false, - "type": "boolean" + "started_at": { + "title": "Started At", + "description": "The time at which the task was started", + "type": "string", + "format": "date-time" }, - "spec": { - "title": "Spec", - "description": "An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec.", - "type": "object" + "id": { + "title": "Id", + "description": "The step unique ID", + "type": "string" }, - "type": { - "title": "Type", - "default": "DAGBooleanInput", - "pattern": "^DAGBooleanInput$", - "type": "string", - "readOnly": true - } - } - } - ], - "title": "DAGBooleanInput", - "description": "The boolean type matches only two special values: True and False.\n\nNote that values that evaluate to true or false, such as 1 and 0, are not accepted.\n\nYou can add additional validation by defining a JSONSchema specification.\n\nSee http://json-schema.org/understanding-json-schema/reference/boolean.html for more\ninformation.", - "discriminator": { - "propertyName": "type" - } - }, - "JobArgument": { - "allOf": [ - { - "$ref": "#/components/schemas/_OpenAPIGenBaseModel" - }, - { - "type": "object", - "properties": { "name": { "title": "Name", - "description": "Argument name. The name must match one of the input names from Job's DAG template.", + "description": "A human readable name for the step. Usually defined by the DAG task name but can be extended if the step is part of a loop for example. This name is unique within the boundary of the DAG/Job that generated it.", "type": "string" }, - "value": { - "title": "Value", - "description": "The value of the job argument." + "status_type": { + "description": "The type of step this status is for. Can be \"Function\", \"DAG\" or \"Loop\"", + "allOf": [ + { + "$ref": "#/components/schemas/StatusType" + } + ] }, - "type": { - "title": "Type", - "default": "JobArgument", - "pattern": "^JobArgument$", - "type": "string", - "readOnly": true + "template_ref": { + "title": "Template Ref", + "description": "The name of the template that spawned this step", + "type": "string" + }, + "children_ids": { + "title": "Children Ids", + "description": "A list of child step IDs", + "type": "array", + "items": { + "type": "string" + } + }, + "outbound_steps": { + "title": "Outbound Steps", + "description": "A list of the last step to ran in the context of this step. In the case of a DAG or a job this will be the last step that has been executed. It will remain empty for functions.", + "type": "array", + "items": { + "type": "string" + } }, "annotations": { "title": "Annotations", @@ -8137,314 +12669,386 @@ "additionalProperties": { "type": "string" } + }, + "message": { + "title": "Message", + "description": "Any message produced by the task. Usually error/debugging hints.", + "type": "string" + }, + "finished_at": { + "title": "Finished At", + "description": "The time at which the task was completed", + "type": "string", + "format": "date-time" + }, + "source": { + "title": "Source", + "description": "Source url for the status object. It can be a recipe or a function.", + "type": "string" + }, + "status": { + "description": "The status of this step.", + "default": "Unknown", + "allOf": [ + { + "$ref": "#/components/schemas/StepStatusEnum" + } + ] + }, + "command": { + "title": "Command", + "description": "The command used to run this step. Only applies to Function steps.", + "type": "string" + }, + "boundary_id": { + "title": "Boundary Id", + "description": "This indicates the step ID of the associated template root step in which this step belongs to. A DAG step will have the id of the parent DAG for example.", + "type": "string" + }, + "type": { + "title": "Type", + "default": "StepStatus", + "pattern": "^StepStatus$", + "type": "string", + "readOnly": true } - }, - "required": [ - "name", - "value" - ] + } } ], - "title": "JobArgument", - "description": "Job argument is an argument input for arguments which are not files or folders.", + "title": "StepStatus", + "description": "The Status of a Job Step", "discriminator": { "propertyName": "type" } }, - "DAGNumberInput": { + "RunStatus": { "allOf": [ { - "$ref": "#/components/schemas/GenericInput" + "$ref": "#/components/schemas/_OpenAPIGenBaseModel" }, { "type": "object", + "required": [ + "inputs", + "outputs", + "started_at", + "id", + "job_id" + ], "properties": { - "default": { - "title": "Default", - "description": "Default value to use for an input if a value was not supplied.", - "type": "number", - "format": "double" - }, - "alias": { - "title": "Alias", - "description": "A list of aliases for this input in different platforms.", + "inputs": { + "title": "Inputs", + "description": "The inputs used for this run.", "type": "array", "items": { "anyOf": [ { - "$ref": "#/components/schemas/DAGGenericInputAlias" + "$ref": "#/components/schemas/StepStringInput" }, { - "$ref": "#/components/schemas/DAGStringInputAlias" + "$ref": "#/components/schemas/StepIntegerInput" }, { - "$ref": "#/components/schemas/DAGIntegerInputAlias" + "$ref": "#/components/schemas/StepNumberInput" }, { - "$ref": "#/components/schemas/DAGNumberInputAlias" + "$ref": "#/components/schemas/StepBooleanInput" }, { - "$ref": "#/components/schemas/DAGBooleanInputAlias" + "$ref": "#/components/schemas/StepFolderInput" }, { - "$ref": "#/components/schemas/DAGFolderInputAlias" + "$ref": "#/components/schemas/StepFileInput" }, { - "$ref": "#/components/schemas/DAGFileInputAlias" + "$ref": "#/components/schemas/StepPathInput" }, { - "$ref": "#/components/schemas/DAGPathInputAlias" + "$ref": "#/components/schemas/StepArrayInput" }, { - "$ref": "#/components/schemas/DAGArrayInputAlias" + "$ref": "#/components/schemas/StepJSONObjectInput" + } + ] + } + }, + "outputs": { + "title": "Outputs", + "description": "The outputs produced by this run.", + "type": "array", + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/StepStringOutput" }, { - "$ref": "#/components/schemas/DAGJSONObjectInputAlias" + "$ref": "#/components/schemas/StepIntegerOutput" }, { - "$ref": "#/components/schemas/DAGLinkedInputAlias" + "$ref": "#/components/schemas/StepNumberOutput" + }, + { + "$ref": "#/components/schemas/StepBooleanOutput" + }, + { + "$ref": "#/components/schemas/StepFolderOutput" + }, + { + "$ref": "#/components/schemas/StepFileOutput" + }, + { + "$ref": "#/components/schemas/StepPathOutput" + }, + { + "$ref": "#/components/schemas/StepArrayOutput" + }, + { + "$ref": "#/components/schemas/StepJSONObjectOutput" } ] } }, - "required": { - "title": "Required", - "description": "A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided.", - "default": false, - "type": "boolean" + "started_at": { + "title": "Started At", + "description": "The time at which the task was started", + "type": "string", + "format": "date-time" }, - "spec": { - "title": "Spec", - "description": "An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec.", - "type": "object" + "id": { + "title": "Id", + "description": "The ID of the individual run.", + "type": "string" }, - "type": { - "title": "Type", - "default": "DAGNumberInput", - "pattern": "^DAGNumberInput$", - "type": "string", - "readOnly": true - } - } - } - ], - "title": "DAGNumberInput", - "description": "A number input.\n\nYou can add additional validation by defining a JSONSchema specification.\n\nSee http://json-schema.org/understanding-json-schema/reference/numeric.html#numeric\nfor more information.", - "discriminator": { - "propertyName": "type" - } - }, - "JobPathArgument": { - "allOf": [ - { - "$ref": "#/components/schemas/_OpenAPIGenBaseModel" - }, - { - "type": "object", - "properties": { - "name": { - "title": "Name", - "description": "Argument name. The name must match one of the input names from Job's template which can be a function or DAG.", + "job_id": { + "title": "Job Id", + "description": "The ID of the job that generated this run.", + "type": "string" + }, + "annotations": { + "title": "Annotations", + "description": "An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "message": { + "title": "Message", + "description": "Any message produced by the task. Usually error/debugging hints.", "type": "string" }, + "finished_at": { + "title": "Finished At", + "description": "The time at which the task was completed", + "type": "string", + "format": "date-time" + }, "source": { "title": "Source", - "description": "The path to source the file from.", - "anyOf": [ - { - "$ref": "#/components/schemas/HTTP" - }, - { - "$ref": "#/components/schemas/S3" - }, + "description": "Source url for the status object. It can be a recipe or a function.", + "type": "string" + }, + "api_version": { + "title": "Api Version", + "default": "v1beta1", + "readOnly": true, + "pattern": "^v1beta1$", + "type": "string" + }, + "entrypoint": { + "title": "Entrypoint", + "description": "The ID of the first step in the run.", + "type": "string" + }, + "status": { + "description": "The status of this run.", + "default": "Unknown", + "allOf": [ { - "$ref": "#/components/schemas/ProjectFolder" + "$ref": "#/components/schemas/RunStatusEnum" } ] }, + "steps": { + "title": "Steps", + "default": {}, + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/StepStatus" + } + }, "type": { "title": "Type", - "default": "JobPathArgument", - "pattern": "^JobPathArgument$", + "default": "RunStatus", + "pattern": "^RunStatus$", "type": "string", "readOnly": true - }, - "annotations": { - "title": "Annotations", - "description": "An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.", - "type": "object", - "additionalProperties": { - "type": "string" - } } - }, - "required": [ - "name", - "source" - ] + } } ], - "title": "JobPathArgument", - "description": "BaseModel with functionality to return the object as a yaml string.", + "title": "RunStatus", + "description": "Job Status.", "discriminator": { "propertyName": "type" } }, - "Job": { + "TeamUpdate": { "allOf": [ { - "$ref": "#/components/schemas/_OpenAPIGenBaseModel" + "$ref": "#/components/schemas/TeamCreate" }, { "type": "object", "properties": { - "source": { - "title": "Source", - "description": "The source url for downloading the recipe.", - "type": "string" - }, "type": { "title": "Type", - "default": "Job", - "pattern": "^Job$", + "default": "TeamUpdate", "type": "string", + "pattern": "^TeamUpdate$", "readOnly": true - }, - "annotations": { - "title": "Annotations", - "description": "An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.", - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "api_version": { - "title": "Api Version", - "default": "v1beta1", - "readOnly": true, - "pattern": "^v1beta1$", - "type": "string" - }, - "arguments": { - "title": "Arguments", - "description": "Input arguments for this job.", - "type": "array", - "items": { - "type": "array", - "items": { - "anyOf": [ - { - "$ref": "#/components/schemas/JobArgument" - }, - { - "$ref": "#/components/schemas/JobPathArgument" - } - ] - } - } - }, - "name": { - "title": "Name", - "description": "An optional name for this job. This name will be used a the display name for the run.", - "type": "string" - }, - "description": { - "title": "Description", - "description": "Run description.", - "type": "string" - }, - "labels": { - "title": "Labels", - "description": "Optional user data as a dictionary. User data is for user reference only and will not be used in the execution of the job.", - "type": "object", - "additionalProperties": { - "type": "string" - } } - }, - "required": [ - "source" - ] + } } ], - "title": "Job", - "description": "Queenbee Job.\n\nA Job is an object to submit a list of arguments to execute a Queenbee recipe.", + "title": "TeamUpdate", "discriminator": { "propertyName": "type" } }, - "FileReference": { + "DAGBooleanInput": { "allOf": [ { - "$ref": "#/components/schemas/_BaseReference" + "$ref": "#/components/schemas/GenericInput" }, { "type": "object", - "required": [ - "path" - ], "properties": { - "path": { - "title": "Path", - "description": "Relative path to a file.", - "type": "string" + "default": { + "title": "Default", + "description": "Default value to use for an input if a value was not supplied.", + "type": "boolean" + }, + "alias": { + "title": "Alias", + "description": "A list of aliases for this input in different platforms.", + "type": "array", + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/DAGGenericInputAlias" + }, + { + "$ref": "#/components/schemas/DAGStringInputAlias" + }, + { + "$ref": "#/components/schemas/DAGIntegerInputAlias" + }, + { + "$ref": "#/components/schemas/DAGNumberInputAlias" + }, + { + "$ref": "#/components/schemas/DAGBooleanInputAlias" + }, + { + "$ref": "#/components/schemas/DAGFolderInputAlias" + }, + { + "$ref": "#/components/schemas/DAGFileInputAlias" + }, + { + "$ref": "#/components/schemas/DAGPathInputAlias" + }, + { + "$ref": "#/components/schemas/DAGArrayInputAlias" + }, + { + "$ref": "#/components/schemas/DAGJSONObjectInputAlias" + }, + { + "$ref": "#/components/schemas/DAGLinkedInputAlias" + } + ] + } + }, + "required": { + "title": "Required", + "description": "A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided.", + "default": false, + "type": "boolean" + }, + "spec": { + "title": "Spec", + "description": "An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec.", + "type": "object" }, "type": { "title": "Type", - "default": "FileReference", - "pattern": "^FileReference$", + "default": "DAGBooleanInput", + "pattern": "^DAGBooleanInput$", "type": "string", "readOnly": true } } } ], - "title": "FileReference", - "description": "Reference to a file.", + "title": "DAGBooleanInput", + "description": "The boolean type matches only two special values: True and False.\n\nNote that values that evaluate to true or false, such as 1 and 0, are not accepted.\n\nYou can add additional validation by defining a JSONSchema specification.\n\nSee http://json-schema.org/understanding-json-schema/reference/boolean.html for more\ninformation.", "discriminator": { "propertyName": "type" } }, - "DAGIntegerOutputAlias": { + "PriceType": { + "title": "PriceType", + "description": "An enumeration.", + "enum": [ + "recurring", + "one_time" + ], + "type": "string" + }, + "PriceRecurrence": { "allOf": [ { - "$ref": "#/components/schemas/_DAGArtifactOutputAlias" + "$ref": "#/components/schemas/_OpenAPIGenBaseModel" }, { "type": "object", - "required": [ - "from" - ], "properties": { - "from": { - "title": "From", - "description": "Reference to a file or a task output. Task output must be file.", - "anyOf": [ - { - "$ref": "#/components/schemas/TaskReference" - }, - { - "$ref": "#/components/schemas/FileReference" - } - ] + "interval": { + "title": "Interval", + "type": "string" + }, + "interval_count": { + "title": "Interval Count", + "type": "integer", + "format": "int32" + }, + "usage_type": { + "title": "Usage Type", + "type": "string" }, "type": { "title": "Type", - "default": "DAGIntegerOutputAlias", - "pattern": "^DAGIntegerOutputAlias$", + "default": "PriceRecurrence", "type": "string", + "pattern": "^PriceRecurrence$", "readOnly": true } - } + }, + "required": [ + "interval", + "interval_count", + "usage_type" + ] } ], - "title": "DAGIntegerOutputAlias", - "description": "DAG alias integer output.\n\nThis output loads the content from a file as an integer.", + "title": "PriceRecurrence", "discriminator": { "propertyName": "type" } }, - "UserPermission": { + "PriceTier": { "allOf": [ { "$ref": "#/components/schemas/_OpenAPIGenBaseModel" @@ -8452,1142 +13056,771 @@ { "type": "object", "properties": { - "admin": { - "title": "Admin", - "description": "The user has admin permission to this resource", - "default": false, - "example": false, - "type": "boolean" + "unit_amount": { + "title": "Unit Amount", + "type": "integer", + "format": "int32" }, - "write": { - "title": "Write", - "description": "The user has write permission on this resource", - "default": false, - "example": false, - "type": "boolean" + "unit_amount_decimal": { + "title": "Unit Amount Decimal", + "type": "string" }, - "read": { - "title": "Read", - "description": "The user has read permission on this resource", - "default": false, - "example": true, - "type": "boolean" + "flat_amount": { + "title": "Flat Amount", + "type": "integer", + "format": "int32" + }, + "flat_amount_decimal": { + "title": "Flat Amount Decimal", + "type": "string" + }, + "up_to": { + "title": "Up To", + "type": "integer", + "format": "int32" }, "type": { "title": "Type", - "default": "UserPermission", + "default": "PriceTier", "type": "string", - "pattern": "^UserPermission$", + "pattern": "^PriceTier$", "readOnly": true } - } + }, + "required": [ + "unit_amount", + "unit_amount_decimal" + ] } ], - "title": "UserPermission", + "title": "PriceTier", "discriminator": { "propertyName": "type" } }, - "FunctionStringOutput": { + "Price": { "allOf": [ { - "$ref": "#/components/schemas/FunctionFileOutput" + "$ref": "#/components/schemas/ExternalResource" }, { "type": "object", + "required": [ + "product", + "active", + "currency", + "type" + ], "properties": { + "product": { + "title": "Product", + "type": "string" + }, + "active": { + "title": "Active", + "type": "boolean" + }, + "currency": { + "title": "Currency", + "type": "string" + }, "type": { - "title": "Type", - "default": "FunctionStringOutput", - "pattern": "^FunctionStringOutput$", - "type": "string", + "$ref": "#/components/schemas/PriceType", "readOnly": true + }, + "unit_amount": { + "title": "Unit Amount", + "type": "integer", + "format": "int32" + }, + "recurring": { + "$ref": "#/components/schemas/PriceRecurrence" + }, + "nickname": { + "title": "Nickname", + "type": "string" + }, + "tiers": { + "title": "Tiers", + "type": "array", + "items": { + "$ref": "#/components/schemas/PriceTier" + } } } } ], - "title": "FunctionStringOutput", - "description": "Function string output.\n\nThis output loads the content from a file as a string.", + "title": "Price", "discriminator": { "propertyName": "type" } }, - "DAGLinkedOutputAlias": { + "SubscriptionItem": { "allOf": [ { - "$ref": "#/components/schemas/DAGGenericOutputAlias" + "$ref": "#/components/schemas/ExternalResource" }, { "type": "object", "properties": { "type": { "title": "Type", - "default": "DAGLinkedOutputAlias", - "pattern": "^DAGLinkedOutputAlias$", + "default": "SubscriptionItem", "type": "string", + "pattern": "^SubscriptionItem$", "readOnly": true } } } ], - "title": "DAGLinkedOutputAlias", - "description": "An Alias for Linked Outputs.\n\nA linked output alias will be translated to an object in the UI and stay linked to\nit.", + "title": "SubscriptionItem", "discriminator": { "propertyName": "type" } }, - "DailyUsage": { + "CouponDuration": { + "title": "CouponDuration", + "description": "An enumeration.", + "enum": [ + "forever", + "once", + "repeating" + ], + "type": "string" + }, + "Coupon": { "allOf": [ { - "$ref": "#/components/schemas/_OpenAPIGenBaseModel" + "$ref": "#/components/schemas/ExternalResource" }, { "type": "object", + "required": [ + "name", + "valid", + "duration" + ], "properties": { - "date": { - "title": "Date", - "description": "The day this usage was aggregated for", - "type": "string", - "format": "date-time" + "name": { + "title": "Name", + "type": "string" }, - "cpu": { - "title": "Cpu", - "description": "cpu usage", - "default": 0, + "valid": { + "title": "Valid", + "type": "boolean" + }, + "duration": { + "$ref": "#/components/schemas/CouponDuration" + }, + "amount_off": { + "title": "Amount Off", "type": "number", "format": "double" }, - "memory": { - "title": "Memory", - "description": "memory usage", - "default": 0, + "percent_off": { + "title": "Percent Off", "type": "number", "format": "double" }, - "succeeded": { - "title": "Succeeded", - "description": "succeeded usage", - "default": 0, - "type": "integer", - "format": "int32" - }, - "failed": { - "title": "Failed", - "description": "failed usage", - "default": 0, + "duration_in_months": { + "title": "Duration In Months", "type": "integer", "format": "int32" }, "type": { "title": "Type", - "default": "DailyUsage", + "default": "Coupon", "type": "string", - "pattern": "^DailyUsage$", + "pattern": "^Coupon$", "readOnly": true } - }, - "required": [ - "date" - ] + } } ], - "title": "DailyUsage", + "title": "Coupon", "discriminator": { "propertyName": "type" } }, - "StepStringInput": { + "Discount": { "allOf": [ { - "$ref": "#/components/schemas/FunctionStringInput" + "$ref": "#/components/schemas/ExternalResource" }, { "type": "object", "required": [ - "value" + "start", + "coupon" ], "properties": { - "value": { - "title": "Value", + "start": { + "title": "Start", + "type": "string", + "format": "date-time" + }, + "coupon": { + "$ref": "#/components/schemas/Coupon" + }, + "end": { + "title": "End", + "type": "string", + "format": "date-time" + }, + "promotion_code": { + "title": "Promotion Code", "type": "string" }, "type": { - "title": "Type", - "default": "StepStringInput", - "pattern": "^StepStringInput$", + "title": "Type", + "default": "Discount", "type": "string", + "pattern": "^Discount$", "readOnly": true } } } ], - "title": "StepStringInput", - "description": "A String input.", + "title": "Discount", "discriminator": { "propertyName": "type" } }, - "StepIntegerInput": { + "KeyRequest": { "allOf": [ { - "$ref": "#/components/schemas/GenericInput" + "$ref": "#/components/schemas/_OpenAPIGenBaseModel" }, { "type": "object", - "required": [ - "value" - ], "properties": { - "value": { - "title": "Value", - "type": "integer", - "format": "int32" - }, - "default": { - "title": "Default", - "description": "Default value to use for an input if a value was not supplied.", - "type": "integer", - "format": "int32" - }, - "alias": { - "title": "Alias", - "description": "A list of aliases for this input in different platforms.", - "type": "array", - "items": { - "anyOf": [ - { - "$ref": "#/components/schemas/DAGGenericInputAlias" - }, - { - "$ref": "#/components/schemas/DAGStringInputAlias" - }, - { - "$ref": "#/components/schemas/DAGIntegerInputAlias" - }, - { - "$ref": "#/components/schemas/DAGNumberInputAlias" - }, - { - "$ref": "#/components/schemas/DAGBooleanInputAlias" - }, - { - "$ref": "#/components/schemas/DAGFolderInputAlias" - }, - { - "$ref": "#/components/schemas/DAGFileInputAlias" - }, - { - "$ref": "#/components/schemas/DAGPathInputAlias" - }, - { - "$ref": "#/components/schemas/DAGArrayInputAlias" - }, - { - "$ref": "#/components/schemas/DAGJSONObjectInputAlias" - }, - { - "$ref": "#/components/schemas/DAGLinkedInputAlias" - } - ] - } - }, - "required": { - "title": "Required", - "description": "A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided.", - "default": false, - "type": "boolean" - }, - "spec": { - "title": "Spec", - "description": "An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec.", - "type": "object" + "key": { + "title": "Key", + "type": "string" }, "type": { "title": "Type", - "default": "StepIntegerInput", - "pattern": "^StepIntegerInput$", + "default": "KeyRequest", "type": "string", + "pattern": "^KeyRequest$", "readOnly": true } - } + }, + "required": [ + "key" + ] } ], - "title": "StepIntegerInput", - "description": "An integer input.", + "title": "KeyRequest", "discriminator": { "propertyName": "type" } }, - "StepNumberInput": { + "UserPublic": { "allOf": [ { - "$ref": "#/components/schemas/GenericInput" + "$ref": "#/components/schemas/_OpenAPIGenBaseModel" }, { "type": "object", - "required": [ - "value" - ], "properties": { - "value": { - "title": "Value", - "type": "number", - "format": "double" - }, - "default": { - "title": "Default", - "description": "Default value to use for an input if a value was not supplied.", - "type": "number", - "format": "double" + "username": { + "title": "Username", + "description": "The lowercase account name for this user", + "example": "ladybugbot", + "type": "string" }, - "alias": { - "title": "Alias", - "description": "A list of aliases for this input in different platforms.", - "type": "array", - "items": { - "anyOf": [ - { - "$ref": "#/components/schemas/DAGGenericInputAlias" - }, - { - "$ref": "#/components/schemas/DAGStringInputAlias" - }, - { - "$ref": "#/components/schemas/DAGIntegerInputAlias" - }, - { - "$ref": "#/components/schemas/DAGNumberInputAlias" - }, - { - "$ref": "#/components/schemas/DAGBooleanInputAlias" - }, - { - "$ref": "#/components/schemas/DAGFolderInputAlias" - }, - { - "$ref": "#/components/schemas/DAGFileInputAlias" - }, - { - "$ref": "#/components/schemas/DAGPathInputAlias" - }, - { - "$ref": "#/components/schemas/DAGArrayInputAlias" - }, - { - "$ref": "#/components/schemas/DAGJSONObjectInputAlias" - }, - { - "$ref": "#/components/schemas/DAGLinkedInputAlias" - } - ] - } + "name": { + "title": "Name", + "description": "The display name for this user", + "example": "Ladybug Bot", + "type": "string" }, - "required": { - "title": "Required", - "description": "A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided.", - "default": false, - "type": "boolean" + "description": { + "title": "Description", + "description": "A short description of the user", + "example": "Beep Boop!", + "type": "string" }, - "spec": { - "title": "Spec", - "description": "An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec.", - "type": "object" + "picture": { + "title": "Picture", + "description": "URL to the picture associated with this user", + "example": "https://avatars1.githubusercontent.com/u/38131342", + "type": "string" }, "type": { "title": "Type", - "default": "StepNumberInput", - "pattern": "^StepNumberInput$", + "default": "UserPublic", "type": "string", + "pattern": "^UserPublic$", "readOnly": true } - } + }, + "required": [ + "username" + ] } ], - "title": "StepNumberInput", - "description": "A number input.", + "title": "UserPublic", "discriminator": { "propertyName": "type" } }, - "StepBooleanInput": { + "UserPublicList": { "allOf": [ { - "$ref": "#/components/schemas/GenericInput" + "$ref": "#/components/schemas/_OpenAPIGenBaseModel" }, { "type": "object", "required": [ - "value" + "page", + "per_page", + "page_count", + "total_count", + "resources" ], "properties": { - "value": { - "title": "Value", - "type": "boolean" + "page": { + "title": "Page", + "description": "The current page the pagination request is on", + "type": "integer", + "format": "int32" }, - "default": { - "title": "Default", - "description": "Default value to use for an input if a value was not supplied.", - "type": "boolean" + "per_page": { + "title": "Per Page", + "description": "The number of pages per pagination request", + "type": "integer", + "format": "int32" }, - "alias": { - "title": "Alias", - "description": "A list of aliases for this input in different platforms.", - "type": "array", - "items": { - "anyOf": [ - { - "$ref": "#/components/schemas/DAGGenericInputAlias" - }, - { - "$ref": "#/components/schemas/DAGStringInputAlias" - }, - { - "$ref": "#/components/schemas/DAGIntegerInputAlias" - }, - { - "$ref": "#/components/schemas/DAGNumberInputAlias" - }, - { - "$ref": "#/components/schemas/DAGBooleanInputAlias" - }, - { - "$ref": "#/components/schemas/DAGFolderInputAlias" - }, - { - "$ref": "#/components/schemas/DAGFileInputAlias" - }, - { - "$ref": "#/components/schemas/DAGPathInputAlias" - }, - { - "$ref": "#/components/schemas/DAGArrayInputAlias" - }, - { - "$ref": "#/components/schemas/DAGJSONObjectInputAlias" - }, - { - "$ref": "#/components/schemas/DAGLinkedInputAlias" - } - ] - } + "page_count": { + "title": "Page Count", + "description": "The total number of pages", + "type": "integer", + "format": "int32" }, - "required": { - "title": "Required", - "description": "A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided.", - "default": false, - "type": "boolean" + "total_count": { + "title": "Total Count", + "description": "The total number of resources matching the list request", + "type": "integer", + "format": "int32" }, - "spec": { - "title": "Spec", - "description": "An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec.", - "type": "object" + "resources": { + "title": "Resources", + "type": "array", + "items": { + "$ref": "#/components/schemas/UserPublic" + } + }, + "next_page": { + "title": "Next Page", + "description": "The next page, if this on is not the last", + "type": "integer", + "format": "int32" }, "type": { "title": "Type", - "default": "StepBooleanInput", - "pattern": "^StepBooleanInput$", + "default": "UserPublicList", "type": "string", + "pattern": "^UserPublicList$", "readOnly": true } } } ], - "title": "StepBooleanInput", - "description": "The boolean type matches only two special values: True and False.", + "title": "UserPublicList", + "description": "A list response from a pagination request", "discriminator": { "propertyName": "type" } }, - "StepFolderInput": { + "RepositoryCreate": { "allOf": [ { - "$ref": "#/components/schemas/GenericInput" + "$ref": "#/components/schemas/RepositoryUpdate" }, { "type": "object", "required": [ - "source" + "name" ], "properties": { - "source": { - "title": "Source", - "description": "The path to source the file from.", - "anyOf": [ - { - "$ref": "#/components/schemas/HTTP" - }, - { - "$ref": "#/components/schemas/S3" - }, - { - "$ref": "#/components/schemas/ProjectFolder" - } - ] - }, - "default": { - "title": "Default", - "description": "The default source for file if the value is not provided.", - "anyOf": [ - { - "$ref": "#/components/schemas/HTTP" - }, - { - "$ref": "#/components/schemas/S3" - }, - { - "$ref": "#/components/schemas/ProjectFolder" - } - ] - }, - "alias": { - "title": "Alias", - "description": "A list of aliases for this input in different platforms.", - "type": "array", - "items": { - "anyOf": [ - { - "$ref": "#/components/schemas/DAGGenericInputAlias" - }, - { - "$ref": "#/components/schemas/DAGStringInputAlias" - }, - { - "$ref": "#/components/schemas/DAGIntegerInputAlias" - }, - { - "$ref": "#/components/schemas/DAGNumberInputAlias" - }, - { - "$ref": "#/components/schemas/DAGBooleanInputAlias" - }, - { - "$ref": "#/components/schemas/DAGFolderInputAlias" - }, - { - "$ref": "#/components/schemas/DAGFileInputAlias" - }, - { - "$ref": "#/components/schemas/DAGPathInputAlias" - }, - { - "$ref": "#/components/schemas/DAGArrayInputAlias" - }, - { - "$ref": "#/components/schemas/DAGJSONObjectInputAlias" - }, - { - "$ref": "#/components/schemas/DAGLinkedInputAlias" - } - ] - } - }, - "required": { - "title": "Required", - "description": "A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided.", - "default": false, - "type": "boolean" - }, - "spec": { - "title": "Spec", - "description": "An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec.", - "type": "object" - }, - "path": { - "title": "Path", - "description": "Path to the target location that the input will be copied to. This path is relative to the working directory where the command is executed.", + "name": { + "title": "Name", + "description": "The name of the repository", + "example": "daylight-factor", "type": "string" }, "type": { "title": "Type", - "default": "StepFolderInput", - "pattern": "^StepFolderInput$", + "default": "RepositoryCreate", "type": "string", + "pattern": "^RepositoryCreate$", "readOnly": true } } } ], - "title": "StepFolderInput", - "description": "A folder input.", + "title": "RepositoryCreate", "discriminator": { "propertyName": "type" } }, - "StepFileInput": { + "Maintainer": { "allOf": [ { - "$ref": "#/components/schemas/GenericInput" + "$ref": "#/components/schemas/_OpenAPIGenBaseModel" }, { "type": "object", - "required": [ - "source" - ], "properties": { - "source": { - "title": "Source", - "description": "The path to source the file from.", - "anyOf": [ - { - "$ref": "#/components/schemas/HTTP" - }, - { - "$ref": "#/components/schemas/S3" - }, - { - "$ref": "#/components/schemas/ProjectFolder" - } - ] - }, - "default": { - "title": "Default", - "description": "The default source for file if the value is not provided.", - "anyOf": [ - { - "$ref": "#/components/schemas/HTTP" - }, - { - "$ref": "#/components/schemas/S3" - }, - { - "$ref": "#/components/schemas/ProjectFolder" - } - ] - }, - "alias": { - "title": "Alias", - "description": "A list of aliases for this input in different platforms.", - "type": "array", - "items": { - "anyOf": [ - { - "$ref": "#/components/schemas/DAGGenericInputAlias" - }, - { - "$ref": "#/components/schemas/DAGStringInputAlias" - }, - { - "$ref": "#/components/schemas/DAGIntegerInputAlias" - }, - { - "$ref": "#/components/schemas/DAGNumberInputAlias" - }, - { - "$ref": "#/components/schemas/DAGBooleanInputAlias" - }, - { - "$ref": "#/components/schemas/DAGFolderInputAlias" - }, - { - "$ref": "#/components/schemas/DAGFileInputAlias" - }, - { - "$ref": "#/components/schemas/DAGPathInputAlias" - }, - { - "$ref": "#/components/schemas/DAGArrayInputAlias" - }, - { - "$ref": "#/components/schemas/DAGJSONObjectInputAlias" - }, - { - "$ref": "#/components/schemas/DAGLinkedInputAlias" - } - ] - } - }, - "required": { - "title": "Required", - "description": "A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided.", - "default": false, - "type": "boolean" - }, - "spec": { - "title": "Spec", - "description": "An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec.", - "type": "object" - }, - "path": { - "title": "Path", - "description": "Path to the target location that the input will be copied to. This path is relative to the working directory where the command is executed.", + "name": { + "title": "Name", + "description": "The name of the author/maintainer person or organization.", "type": "string" }, - "extensions": { - "title": "Extensions", - "description": "Optional list of extensions for file. The check for extension is case-insensitive.", - "type": "array", - "items": { - "type": "string" - } - }, "type": { "title": "Type", - "default": "StepFileInput", - "pattern": "^StepFileInput$", + "default": "Maintainer", + "pattern": "^Maintainer$", "type": "string", "readOnly": true + }, + "annotations": { + "title": "Annotations", + "description": "An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "email": { + "title": "Email", + "description": "The email address of the author/maintainer person or organization.", + "type": "string" } - } + }, + "required": [ + "name" + ] } ], - "title": "StepFileInput", - "description": "A file input.", + "title": "Maintainer", + "description": "Maintainer information", "discriminator": { "propertyName": "type" } }, - "StepPathInput": { + "License": { "allOf": [ { - "$ref": "#/components/schemas/GenericInput" + "$ref": "#/components/schemas/_OpenAPIGenBaseModel" }, { "type": "object", - "required": [ - "source" - ], "properties": { - "source": { - "title": "Source", - "description": "The path to source the file from.", - "anyOf": [ - { - "$ref": "#/components/schemas/HTTP" - }, - { - "$ref": "#/components/schemas/S3" - }, - { - "$ref": "#/components/schemas/ProjectFolder" - } - ] - }, - "default": { - "title": "Default", - "description": "The default source for file if the value is not provided.", - "anyOf": [ - { - "$ref": "#/components/schemas/HTTP" - }, - { - "$ref": "#/components/schemas/S3" - }, - { - "$ref": "#/components/schemas/ProjectFolder" - } - ] - }, - "alias": { - "title": "Alias", - "description": "A list of aliases for this input in different platforms.", - "type": "array", - "items": { - "anyOf": [ - { - "$ref": "#/components/schemas/DAGGenericInputAlias" - }, - { - "$ref": "#/components/schemas/DAGStringInputAlias" - }, - { - "$ref": "#/components/schemas/DAGIntegerInputAlias" - }, - { - "$ref": "#/components/schemas/DAGNumberInputAlias" - }, - { - "$ref": "#/components/schemas/DAGBooleanInputAlias" - }, - { - "$ref": "#/components/schemas/DAGFolderInputAlias" - }, - { - "$ref": "#/components/schemas/DAGFileInputAlias" - }, - { - "$ref": "#/components/schemas/DAGPathInputAlias" - }, - { - "$ref": "#/components/schemas/DAGArrayInputAlias" - }, - { - "$ref": "#/components/schemas/DAGJSONObjectInputAlias" - }, - { - "$ref": "#/components/schemas/DAGLinkedInputAlias" - } - ] - } - }, - "required": { - "title": "Required", - "description": "A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided.", - "default": false, - "type": "boolean" - }, - "spec": { - "title": "Spec", - "description": "An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec.", - "type": "object" - }, - "path": { - "title": "Path", - "description": "Path to the target location that the input will be copied to. This path is relative to the working directory where the command is executed.", + "name": { + "title": "Name", + "description": "The license name used for the package.", "type": "string" }, - "extensions": { - "title": "Extensions", - "description": "Optional list of extensions for file. The check for extension is case-insensitive.", - "type": "array", - "items": { - "type": "string" - } - }, "type": { "title": "Type", - "default": "StepPathInput", - "pattern": "^StepPathInput$", + "default": "License", + "pattern": "^License$", "type": "string", "readOnly": true + }, + "annotations": { + "title": "Annotations", + "description": "An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "url": { + "title": "Url", + "description": "A URL to the license used for the package.", + "minLength": 1, + "maxLength": 65536, + "format": "uri", + "type": "string" } - } + }, + "required": [ + "name" + ] } ], - "title": "StepPathInput", - "description": "A file or a folder input.", + "title": "License", + "description": "License information for the Package", "discriminator": { "propertyName": "type" } }, - "StepArrayInput": { + "MetaData": { "allOf": [ { - "$ref": "#/components/schemas/GenericInput" + "$ref": "#/components/schemas/_OpenAPIGenBaseModel" }, { "type": "object", - "required": [ - "value" - ], "properties": { - "value": { - "title": "Value", + "name": { + "title": "Name", + "description": "Package name. Make it descriptive and helpful ;)", + "type": "string" + }, + "tag": { + "title": "Tag", + "description": "The tag of the package", + "type": "string" + }, + "type": { + "title": "Type", + "default": "MetaData", + "pattern": "^MetaData$", + "type": "string", + "readOnly": true + }, + "annotations": { + "title": "Annotations", + "description": "An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "app_version": { + "title": "App Version", + "description": "The version of the application code underlying the manifest", + "type": "string" + }, + "keywords": { + "title": "Keywords", + "description": "A list of keywords to search the package by", "type": "array", - "items": {} + "items": { + "type": "string" + } }, - "default": { - "title": "Default", - "description": "Default value to use for an input if a value was not supplied.", + "maintainers": { + "title": "Maintainers", + "description": "A list of maintainers for the package", "type": "array", - "items": {} + "items": { + "$ref": "#/components/schemas/Maintainer" + } }, - "alias": { - "title": "Alias", - "description": "A list of aliases for this input in different platforms.", + "home": { + "title": "Home", + "description": "The URL of this package's home page", + "type": "string" + }, + "sources": { + "title": "Sources", + "description": "A list of URLs to source code for this project", "type": "array", "items": { - "anyOf": [ - { - "$ref": "#/components/schemas/DAGGenericInputAlias" - }, - { - "$ref": "#/components/schemas/DAGStringInputAlias" - }, - { - "$ref": "#/components/schemas/DAGIntegerInputAlias" - }, - { - "$ref": "#/components/schemas/DAGNumberInputAlias" - }, - { - "$ref": "#/components/schemas/DAGBooleanInputAlias" - }, - { - "$ref": "#/components/schemas/DAGFolderInputAlias" - }, - { - "$ref": "#/components/schemas/DAGFileInputAlias" - }, - { - "$ref": "#/components/schemas/DAGPathInputAlias" - }, - { - "$ref": "#/components/schemas/DAGArrayInputAlias" - }, - { - "$ref": "#/components/schemas/DAGJSONObjectInputAlias" - }, - { - "$ref": "#/components/schemas/DAGLinkedInputAlias" - } - ] + "type": "string" } }, - "required": { - "title": "Required", - "description": "A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided.", - "default": false, + "icon": { + "title": "Icon", + "description": "A URL to an SVG or PNG image to be used as an icon", + "type": "string" + }, + "deprecated": { + "title": "Deprecated", + "description": "Whether this package is deprecated", "type": "boolean" }, - "spec": { - "title": "Spec", - "description": "An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec.", - "type": "object" + "description": { + "title": "Description", + "description": "A description of what this package does", + "type": "string" }, - "items_type": { - "description": "Type of items in an array. All the items in an array must be from the same type.", - "default": "String", + "license": { + "title": "License", + "description": "The license information.", "allOf": [ { - "$ref": "#/components/schemas/ItemType" + "$ref": "#/components/schemas/License" } ] - }, - "type": { - "title": "Type", - "default": "StepArrayInput", - "pattern": "^StepArrayInput$", - "type": "string", - "readOnly": true } - } + }, + "required": [ + "name", + "tag" + ] } ], - "title": "StepArrayInput", - "description": "A JSON array input.", + "title": "MetaData", + "description": "Package metadata information.", "discriminator": { "propertyName": "type" } }, - "StepJSONObjectInput": { + "DAGIntegerOutput": { "allOf": [ { - "$ref": "#/components/schemas/GenericInput" + "$ref": "#/components/schemas/GenericOutput" }, { "type": "object", "required": [ - "value" + "from" ], "properties": { - "value": { - "title": "Value", - "type": "object" - }, - "default": { - "title": "Default", - "description": "Default value to use for an input if a value was not supplied.", - "type": "object" + "from": { + "title": "From", + "description": "Reference to a file or a task output. Task output must be file.", + "anyOf": [ + { + "$ref": "#/components/schemas/TaskReference" + }, + { + "$ref": "#/components/schemas/FileReference" + } + ] }, "alias": { "title": "Alias", - "description": "A list of aliases for this input in different platforms.", + "description": "A list of additional processes for loading this output on different platforms.", "type": "array", "items": { "anyOf": [ { - "$ref": "#/components/schemas/DAGGenericInputAlias" + "$ref": "#/components/schemas/DAGGenericOutputAlias" }, { - "$ref": "#/components/schemas/DAGStringInputAlias" + "$ref": "#/components/schemas/DAGStringOutputAlias" }, { - "$ref": "#/components/schemas/DAGIntegerInputAlias" + "$ref": "#/components/schemas/DAGIntegerOutputAlias" }, { - "$ref": "#/components/schemas/DAGNumberInputAlias" + "$ref": "#/components/schemas/DAGNumberOutputAlias" }, { - "$ref": "#/components/schemas/DAGBooleanInputAlias" + "$ref": "#/components/schemas/DAGBooleanOutputAlias" }, { - "$ref": "#/components/schemas/DAGFolderInputAlias" + "$ref": "#/components/schemas/DAGFolderOutputAlias" }, { - "$ref": "#/components/schemas/DAGFileInputAlias" + "$ref": "#/components/schemas/DAGFileOutputAlias" }, { - "$ref": "#/components/schemas/DAGPathInputAlias" + "$ref": "#/components/schemas/DAGPathOutputAlias" }, { - "$ref": "#/components/schemas/DAGArrayInputAlias" + "$ref": "#/components/schemas/DAGArrayOutputAlias" }, { - "$ref": "#/components/schemas/DAGJSONObjectInputAlias" + "$ref": "#/components/schemas/DAGJSONObjectOutputAlias" }, { - "$ref": "#/components/schemas/DAGLinkedInputAlias" + "$ref": "#/components/schemas/DAGLinkedOutputAlias" } ] } }, "required": { "title": "Required", - "description": "A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided.", - "default": false, + "description": "A boolean to indicate if an artifact output is required. A False value makes the artifact optional.", + "default": true, "type": "boolean" }, - "spec": { - "title": "Spec", - "description": "An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec.", - "type": "object" - }, "type": { "title": "Type", - "default": "StepJSONObjectInput", - "pattern": "^StepJSONObjectInput$", + "default": "DAGIntegerOutput", + "pattern": "^DAGIntegerOutput$", "type": "string", "readOnly": true } } } ], - "title": "StepJSONObjectInput", - "description": "A JSON object input.", + "title": "DAGIntegerOutput", + "description": "DAG integer output.\n\nThis output loads the content from a file as an integer.", "discriminator": { "propertyName": "type" } }, - "StepStringOutput": { + "DailyUsage": { "allOf": [ { - "$ref": "#/components/schemas/FunctionStringOutput" + "$ref": "#/components/schemas/_OpenAPIGenBaseModel" }, { "type": "object", - "required": [ - "value" - ], "properties": { - "value": { - "title": "Value", - "type": "string" - }, - "type": { - "title": "Type", - "default": "StepStringOutput", - "pattern": "^StepStringOutput$", + "date": { + "title": "Date", + "description": "The day this usage was aggregated for", "type": "string", - "readOnly": true - } - } - } - ], - "title": "StepStringOutput", - "description": "A String output.", - "discriminator": { - "propertyName": "type" - } - }, - "StepIntegerOutput": { - "allOf": [ - { - "$ref": "#/components/schemas/FunctionIntegerOutput" - }, - { - "type": "object", - "required": [ - "value" - ], - "properties": { - "value": { - "title": "Value", - "type": "integer", - "format": "int32" + "format": "date-time" }, - "type": { - "title": "Type", - "default": "StepIntegerOutput", - "pattern": "^StepIntegerOutput$", - "type": "string", - "readOnly": true - } - } - } - ], - "title": "StepIntegerOutput", - "description": "An integer output.", - "discriminator": { - "propertyName": "type" - } - }, - "StepNumberOutput": { - "allOf": [ - { - "$ref": "#/components/schemas/FunctionNumberOutput" - }, - { - "type": "object", - "required": [ - "value" - ], - "properties": { - "value": { - "title": "Value", + "cpu": { + "title": "Cpu", + "description": "cpu usage", + "default": 0, "type": "number", "format": "double" }, - "type": { - "title": "Type", - "default": "StepNumberOutput", - "pattern": "^StepNumberOutput$", - "type": "string", - "readOnly": true - } - } - } - ], - "title": "StepNumberOutput", - "description": "A number output.", - "discriminator": { - "propertyName": "type" - } - }, - "StepBooleanOutput": { - "allOf": [ - { - "$ref": "#/components/schemas/FunctionBooleanOutput" - }, - { - "type": "object", - "required": [ - "value" - ], - "properties": { - "value": { - "title": "Value", - "type": "boolean" + "memory": { + "title": "Memory", + "description": "memory usage", + "default": 0, + "type": "number", + "format": "double" + }, + "succeeded": { + "title": "Succeeded", + "description": "succeeded usage", + "default": 0, + "type": "integer", + "format": "int32" + }, + "failed": { + "title": "Failed", + "description": "failed usage", + "default": 0, + "type": "integer", + "format": "int32" }, "type": { "title": "Type", - "default": "StepBooleanOutput", - "pattern": "^StepBooleanOutput$", + "default": "DailyUsage", "type": "string", + "pattern": "^DailyUsage$", "readOnly": true } - } + }, + "required": [ + "date" + ] } ], - "title": "StepBooleanOutput", - "description": "The boolean type matches only two special values: True and False.", + "title": "DailyUsage", "discriminator": { "propertyName": "type" } }, - "StepFolderOutput": { + "DAGFileInput": { "allOf": [ { - "$ref": "#/components/schemas/FunctionFolderOutput" + "$ref": "#/components/schemas/GenericInput" }, { "type": "object", - "required": [ - "source" - ], "properties": { - "source": { - "title": "Source", - "description": "The path to source the file from.", + "default": { + "title": "Default", + "description": "The default source for file if the value is not provided.", "anyOf": [ { "$ref": "#/components/schemas/HTTP" @@ -9600,626 +13833,791 @@ } ] }, + "alias": { + "title": "Alias", + "description": "A list of aliases for this input in different platforms.", + "type": "array", + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/DAGGenericInputAlias" + }, + { + "$ref": "#/components/schemas/DAGStringInputAlias" + }, + { + "$ref": "#/components/schemas/DAGIntegerInputAlias" + }, + { + "$ref": "#/components/schemas/DAGNumberInputAlias" + }, + { + "$ref": "#/components/schemas/DAGBooleanInputAlias" + }, + { + "$ref": "#/components/schemas/DAGFolderInputAlias" + }, + { + "$ref": "#/components/schemas/DAGFileInputAlias" + }, + { + "$ref": "#/components/schemas/DAGPathInputAlias" + }, + { + "$ref": "#/components/schemas/DAGArrayInputAlias" + }, + { + "$ref": "#/components/schemas/DAGJSONObjectInputAlias" + }, + { + "$ref": "#/components/schemas/DAGLinkedInputAlias" + } + ] + } + }, + "required": { + "title": "Required", + "description": "A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided.", + "default": false, + "type": "boolean" + }, + "spec": { + "title": "Spec", + "description": "An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec.", + "type": "object" + }, + "extensions": { + "title": "Extensions", + "description": "Optional list of extensions for file. The check for extension is case-insensitive.", + "type": "array", + "items": { + "type": "string" + } + }, "type": { "title": "Type", - "default": "StepFolderOutput", - "pattern": "^StepFolderOutput$", + "default": "DAGFileInput", + "pattern": "^DAGFileInput$", "type": "string", "readOnly": true } } } ], - "title": "StepFolderOutput", - "description": "A folder output.", + "title": "DAGFileInput", + "description": "A file input.\n\nFile is a special string input. Unlike other string inputs, a file will be copied\nfrom its location to execution folder when a workflow is executed.\n\nYou can add additional validation by defining a JSONSchema specification.\n\nSee http://json-schema.org/understanding-json-schema/reference/string.html#string for\nmore information.\n\n.. code-block:: python\n\n # a file with maximum 50 characters with an ``epw`` extension.\n\n \"schema\": {\n \"type\": \"string\",\n \"maxLength\": 50,\n \"pattern\": \"(?i)(^.*\\.epw$)\"\n }", "discriminator": { "propertyName": "type" } }, - "StepFileOutput": { + "DAGGenericInput": { "allOf": [ { - "$ref": "#/components/schemas/FunctionFileOutput" + "$ref": "#/components/schemas/GenericInput" }, { "type": "object", - "required": [ - "source" - ], "properties": { - "source": { - "title": "Source", - "description": "The path to source the file from.", - "anyOf": [ - { - "$ref": "#/components/schemas/HTTP" - }, - { - "$ref": "#/components/schemas/S3" - }, - { - "$ref": "#/components/schemas/ProjectFolder" - } - ] + "default": { + "title": "Default", + "description": "Default value for generic input.", + "type": "string" + }, + "alias": { + "title": "Alias", + "description": "A list of aliases for this input in different platforms.", + "type": "array", + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/DAGGenericInputAlias" + }, + { + "$ref": "#/components/schemas/DAGStringInputAlias" + }, + { + "$ref": "#/components/schemas/DAGIntegerInputAlias" + }, + { + "$ref": "#/components/schemas/DAGNumberInputAlias" + }, + { + "$ref": "#/components/schemas/DAGBooleanInputAlias" + }, + { + "$ref": "#/components/schemas/DAGFolderInputAlias" + }, + { + "$ref": "#/components/schemas/DAGFileInputAlias" + }, + { + "$ref": "#/components/schemas/DAGPathInputAlias" + }, + { + "$ref": "#/components/schemas/DAGArrayInputAlias" + }, + { + "$ref": "#/components/schemas/DAGJSONObjectInputAlias" + }, + { + "$ref": "#/components/schemas/DAGLinkedInputAlias" + } + ] + } + }, + "required": { + "title": "Required", + "description": "A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided.", + "default": false, + "type": "boolean" + }, + "spec": { + "title": "Spec", + "description": "An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec.", + "type": "object" }, "type": { "title": "Type", - "default": "StepFileOutput", - "pattern": "^StepFileOutput$", + "default": "DAGGenericInput", + "pattern": "^DAGGenericInput$", "type": "string", "readOnly": true } } } ], - "title": "StepFileOutput", - "description": "A file output.", + "title": "DAGGenericInput", + "description": "Base class for DAG inputs.\n\nThis class adds a handler to input to handle the process of loading the input\nfrom different graphical interfaces.", "discriminator": { "propertyName": "type" } }, - "StepPathOutput": { + "DAGStringInput": { "allOf": [ { - "$ref": "#/components/schemas/FunctionPathOutput" + "$ref": "#/components/schemas/DAGGenericInput" }, { "type": "object", - "required": [ - "source" - ], "properties": { - "source": { - "title": "Source", - "description": "The path to source the file from.", - "anyOf": [ - { - "$ref": "#/components/schemas/HTTP" - }, - { - "$ref": "#/components/schemas/S3" - }, - { - "$ref": "#/components/schemas/ProjectFolder" - } - ] - }, "type": { "title": "Type", - "default": "StepPathOutput", - "pattern": "^StepPathOutput$", + "default": "DAGStringInput", + "pattern": "^DAGStringInput$", "type": "string", "readOnly": true } } } ], - "title": "StepPathOutput", - "description": "A file or a folder output.", + "title": "DAGStringInput", + "description": "A String input.\n\nYou can add additional validation by defining a JSONSchema specification.\n\nSee http://json-schema.org/understanding-json-schema/reference/string.html#string for\nmore information.\n\n.. code-block:: python\n\n \"schema\": {\n \"type\": \"string\",\n \"maxLength\": 50,\n \"pattern\": \"(?i)(^.*\\.epw$)\"\n }", "discriminator": { "propertyName": "type" } }, - "StepArrayOutput": { + "DAGIntegerInput": { "allOf": [ { - "$ref": "#/components/schemas/FunctionStringOutput" + "$ref": "#/components/schemas/GenericInput" }, { "type": "object", - "required": [ - "value" - ], "properties": { - "value": { - "title": "Value", + "default": { + "title": "Default", + "description": "Default value to use for an input if a value was not supplied.", + "type": "integer", + "format": "int32" + }, + "alias": { + "title": "Alias", + "description": "A list of aliases for this input in different platforms.", "type": "array", - "items": {} + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/DAGGenericInputAlias" + }, + { + "$ref": "#/components/schemas/DAGStringInputAlias" + }, + { + "$ref": "#/components/schemas/DAGIntegerInputAlias" + }, + { + "$ref": "#/components/schemas/DAGNumberInputAlias" + }, + { + "$ref": "#/components/schemas/DAGBooleanInputAlias" + }, + { + "$ref": "#/components/schemas/DAGFolderInputAlias" + }, + { + "$ref": "#/components/schemas/DAGFileInputAlias" + }, + { + "$ref": "#/components/schemas/DAGPathInputAlias" + }, + { + "$ref": "#/components/schemas/DAGArrayInputAlias" + }, + { + "$ref": "#/components/schemas/DAGJSONObjectInputAlias" + }, + { + "$ref": "#/components/schemas/DAGLinkedInputAlias" + } + ] + } }, - "items_type": { - "description": "Type of items in this array. All the items in an array must be from the same type.", - "default": "String", - "allOf": [ - { - "$ref": "#/components/schemas/ItemType" - } - ] + "required": { + "title": "Required", + "description": "A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided.", + "default": false, + "type": "boolean" }, - "type": { - "title": "Type", - "default": "StepArrayOutput", - "pattern": "^StepArrayOutput$", - "type": "string", - "readOnly": true - } - } - } - ], - "title": "StepArrayOutput", - "description": "A JSON array output.", - "discriminator": { - "propertyName": "type" - } - }, - "StepJSONObjectOutput": { - "allOf": [ - { - "$ref": "#/components/schemas/FunctionJSONObjectOutput" - }, - { - "type": "object", - "required": [ - "value" - ], - "properties": { - "value": { - "title": "Value", + "spec": { + "title": "Spec", + "description": "An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec.", "type": "object" }, "type": { "title": "Type", - "default": "StepJSONObjectOutput", - "pattern": "^StepJSONObjectOutput$", + "default": "DAGIntegerInput", + "pattern": "^DAGIntegerInput$", "type": "string", "readOnly": true } } } ], - "title": "StepJSONObjectOutput", - "description": "A JSON object output.", + "title": "DAGIntegerInput", + "description": "An integer input.\n\nYou can add additional validation by defining a JSONSchema specification.\n\nSee http://json-schema.org/understanding-json-schema/reference/numeric.html#numeric\nfor more information.", "discriminator": { "propertyName": "type" } }, - "RunResultList": { + "DAGNumberInput": { "allOf": [ { - "$ref": "#/components/schemas/_OpenAPIGenBaseModel" + "$ref": "#/components/schemas/GenericInput" }, { "type": "object", - "required": [ - "page", - "per_page", - "page_count", - "total_count", - "resources" - ], "properties": { - "page": { - "title": "Page", - "description": "The current page the pagination request is on", - "type": "integer", - "format": "int32" - }, - "per_page": { - "title": "Per Page", - "description": "The number of pages per pagination request", - "type": "integer", - "format": "int32" - }, - "page_count": { - "title": "Page Count", - "description": "The total number of pages", - "type": "integer", - "format": "int32" - }, - "total_count": { - "title": "Total Count", - "description": "The total number of resources matching the list request", - "type": "integer", - "format": "int32" + "default": { + "title": "Default", + "description": "Default value to use for an input if a value was not supplied.", + "type": "number", + "format": "double" }, - "resources": { - "title": "Resources", + "alias": { + "title": "Alias", + "description": "A list of aliases for this input in different platforms.", "type": "array", "items": { - "type": "array", - "items": { - "anyOf": [ - { - "$ref": "#/components/schemas/StepStringInput" - }, - { - "$ref": "#/components/schemas/StepIntegerInput" - }, - { - "$ref": "#/components/schemas/StepNumberInput" - }, - { - "$ref": "#/components/schemas/StepBooleanInput" - }, - { - "$ref": "#/components/schemas/StepFolderInput" - }, - { - "$ref": "#/components/schemas/StepFileInput" - }, - { - "$ref": "#/components/schemas/StepPathInput" - }, - { - "$ref": "#/components/schemas/StepArrayInput" - }, - { - "$ref": "#/components/schemas/StepJSONObjectInput" - }, - { - "$ref": "#/components/schemas/StepStringOutput" - }, - { - "$ref": "#/components/schemas/StepIntegerOutput" - }, - { - "$ref": "#/components/schemas/StepNumberOutput" - }, - { - "$ref": "#/components/schemas/StepBooleanOutput" - }, - { - "$ref": "#/components/schemas/StepFolderOutput" - }, - { - "$ref": "#/components/schemas/StepFileOutput" - }, - { - "$ref": "#/components/schemas/StepPathOutput" - }, - { - "$ref": "#/components/schemas/StepArrayOutput" - }, - { - "$ref": "#/components/schemas/StepJSONObjectOutput" - } - ] - } + "anyOf": [ + { + "$ref": "#/components/schemas/DAGGenericInputAlias" + }, + { + "$ref": "#/components/schemas/DAGStringInputAlias" + }, + { + "$ref": "#/components/schemas/DAGIntegerInputAlias" + }, + { + "$ref": "#/components/schemas/DAGNumberInputAlias" + }, + { + "$ref": "#/components/schemas/DAGBooleanInputAlias" + }, + { + "$ref": "#/components/schemas/DAGFolderInputAlias" + }, + { + "$ref": "#/components/schemas/DAGFileInputAlias" + }, + { + "$ref": "#/components/schemas/DAGPathInputAlias" + }, + { + "$ref": "#/components/schemas/DAGArrayInputAlias" + }, + { + "$ref": "#/components/schemas/DAGJSONObjectInputAlias" + }, + { + "$ref": "#/components/schemas/DAGLinkedInputAlias" + } + ] } }, - "next_page": { - "title": "Next Page", - "description": "The next page, if this on is not the last", - "type": "integer", - "format": "int32" + "required": { + "title": "Required", + "description": "A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided.", + "default": false, + "type": "boolean" + }, + "spec": { + "title": "Spec", + "description": "An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec.", + "type": "object" }, "type": { "title": "Type", - "default": "RunResultList", + "default": "DAGNumberInput", + "pattern": "^DAGNumberInput$", "type": "string", - "pattern": "^RunResultList$", "readOnly": true } } } ], - "title": "RunResultList", - "description": "A list response from a pagination request", + "title": "DAGNumberInput", + "description": "A number input.\n\nYou can add additional validation by defining a JSONSchema specification.\n\nSee http://json-schema.org/understanding-json-schema/reference/numeric.html#numeric\nfor more information.", "discriminator": { "propertyName": "type" } }, - "AccountPublic": { + "DAGFolderInput": { "allOf": [ { - "$ref": "#/components/schemas/_OpenAPIGenBaseModel" + "$ref": "#/components/schemas/GenericInput" }, { "type": "object", "properties": { - "id": { - "title": "Id", - "example": "0ad77f99-8043-46e4-8220-7221487c3ee5", - "type": "string" - }, - "account_type": { - "title": "Account Type", - "example": "user", - "type": "string" - }, - "name": { - "title": "Name", - "example": "ladybugbot", - "type": "string" + "default": { + "title": "Default", + "description": "The default source for file if the value is not provided.", + "anyOf": [ + { + "$ref": "#/components/schemas/HTTP" + }, + { + "$ref": "#/components/schemas/S3" + }, + { + "$ref": "#/components/schemas/ProjectFolder" + } + ] }, - "display_name": { - "title": "Display Name", - "example": "Ladybug Bot", - "type": "string" + "alias": { + "title": "Alias", + "description": "A list of aliases for this input in different platforms.", + "type": "array", + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/DAGGenericInputAlias" + }, + { + "$ref": "#/components/schemas/DAGStringInputAlias" + }, + { + "$ref": "#/components/schemas/DAGIntegerInputAlias" + }, + { + "$ref": "#/components/schemas/DAGNumberInputAlias" + }, + { + "$ref": "#/components/schemas/DAGBooleanInputAlias" + }, + { + "$ref": "#/components/schemas/DAGFolderInputAlias" + }, + { + "$ref": "#/components/schemas/DAGFileInputAlias" + }, + { + "$ref": "#/components/schemas/DAGPathInputAlias" + }, + { + "$ref": "#/components/schemas/DAGArrayInputAlias" + }, + { + "$ref": "#/components/schemas/DAGJSONObjectInputAlias" + }, + { + "$ref": "#/components/schemas/DAGLinkedInputAlias" + } + ] + } }, - "description": { - "title": "Description", - "example": "Beep Boop!", - "type": "string" + "required": { + "title": "Required", + "description": "A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided.", + "default": false, + "type": "boolean" }, - "picture_url": { - "title": "Picture Url", - "description": "https://robohash.org/ladybugbot", - "type": "string" + "spec": { + "title": "Spec", + "description": "An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec.", + "type": "object" }, "type": { "title": "Type", - "default": "AccountPublic", + "default": "DAGFolderInput", + "pattern": "^DAGFolderInput$", "type": "string", - "pattern": "^AccountPublic$", "readOnly": true } - }, - "required": [ - "id", - "account_type", - "name" - ] + } } ], - "title": "AccountPublic", + "title": "DAGFolderInput", + "description": "A folder input.\n\nFolder is a special string input. Unlike other string inputs, a folder will be copied\nfrom its location to execution folder when a workflow is executed.\n\nYou can add additional validation by defining a JSONSchema specification.\n\nSee http://json-schema.org/understanding-json-schema/reference/string.html#string for\nmore information.\n\n.. code-block:: python\n\n \"schema\": {\n \"type\": \"string\",\n \"maxLength\": 50,\n }", "discriminator": { "propertyName": "type" } }, - "Usage": { + "DAGPathInput": { "allOf": [ { - "$ref": "#/components/schemas/_OpenAPIGenBaseModel" + "$ref": "#/components/schemas/GenericInput" }, { "type": "object", "properties": { - "start": { - "title": "Start", - "description": "The start date for this usage aggregation", - "type": "string", - "format": "date-time" - }, - "end": { - "title": "End", - "description": "The end date for this usage aggregation", - "type": "string", - "format": "date-time" - }, - "cpu": { - "title": "Cpu", - "description": "cpu usage", - "default": 0, - "type": "number", - "format": "double" + "default": { + "title": "Default", + "description": "The default source for file if the value is not provided.", + "anyOf": [ + { + "$ref": "#/components/schemas/HTTP" + }, + { + "$ref": "#/components/schemas/S3" + }, + { + "$ref": "#/components/schemas/ProjectFolder" + } + ] }, - "memory": { - "title": "Memory", - "description": "memory usage", - "default": 0, - "type": "number", - "format": "double" + "alias": { + "title": "Alias", + "description": "A list of aliases for this input in different platforms.", + "type": "array", + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/DAGGenericInputAlias" + }, + { + "$ref": "#/components/schemas/DAGStringInputAlias" + }, + { + "$ref": "#/components/schemas/DAGIntegerInputAlias" + }, + { + "$ref": "#/components/schemas/DAGNumberInputAlias" + }, + { + "$ref": "#/components/schemas/DAGBooleanInputAlias" + }, + { + "$ref": "#/components/schemas/DAGFolderInputAlias" + }, + { + "$ref": "#/components/schemas/DAGFileInputAlias" + }, + { + "$ref": "#/components/schemas/DAGPathInputAlias" + }, + { + "$ref": "#/components/schemas/DAGArrayInputAlias" + }, + { + "$ref": "#/components/schemas/DAGJSONObjectInputAlias" + }, + { + "$ref": "#/components/schemas/DAGLinkedInputAlias" + } + ] + } }, - "succeeded": { - "title": "Succeeded", - "description": "succeeded usage", - "default": 0, - "type": "integer", - "format": "int32" + "required": { + "title": "Required", + "description": "A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided.", + "default": false, + "type": "boolean" }, - "failed": { - "title": "Failed", - "description": "failed usage", - "default": 0, - "type": "integer", - "format": "int32" + "spec": { + "title": "Spec", + "description": "An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec.", + "type": "object" }, - "daily_usage": { - "title": "Daily Usage", - "description": "daily breakdown of usage", - "default": [], + "extensions": { + "title": "Extensions", + "description": "Optional list of extensions for path. The check for extension is case-insensitive. The extension will only be validated for file inputs.", "type": "array", "items": { - "$ref": "#/components/schemas/DailyUsage" + "type": "string" } }, "type": { "title": "Type", - "default": "Usage", + "default": "DAGPathInput", + "pattern": "^DAGPathInput$", "type": "string", - "pattern": "^Usage$", "readOnly": true } - }, - "required": [ - "start", - "end" - ] + } } ], - "title": "Usage", + "title": "DAGPathInput", + "description": "A file or a folder input.\n\nUse this input only in cases that the input can be either a file or folder. For file\nor folder-only inputs see File and Folder.\n\nPath is a special string input. Unlike other string inputs, a path will be copied\nfrom its location to execution folder when a workflow is executed.\n\nYou can add additional validation by defining a JSONSchema specification.\n\nSee http://json-schema.org/understanding-json-schema/reference/string.html#string for\nmore information.\n\n.. code-block:: python\n\n # a file with maximum 50 characters with an ``epw`` extension.\n\n \"schema\": {\n \"type\": \"string\",\n \"maxLength\": 50,\n \"pattern\": \"(?i)(^.*\\.epw$)\"\n }", "discriminator": { "propertyName": "type" } }, - "Project": { + "DAGArrayInput": { "allOf": [ { - "$ref": "#/components/schemas/ProjectCreate" + "$ref": "#/components/schemas/GenericInput" }, { "type": "object", - "required": [ - "id", - "owner", - "permissions", - "slug" - ], "properties": { - "id": { - "title": "Id", - "description": "The project ID", - "example": "50bb7fe0-8f19-499e-972e-1ebec8af2c71", - "type": "string" + "default": { + "title": "Default", + "description": "Default value to use for an input if a value was not supplied.", + "type": "array", + "items": {} }, - "owner": { - "title": "Owner", - "description": "The project owner", - "allOf": [ - { - "$ref": "#/components/schemas/AccountPublic" - } - ] + "alias": { + "title": "Alias", + "description": "A list of aliases for this input in different platforms.", + "type": "array", + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/DAGGenericInputAlias" + }, + { + "$ref": "#/components/schemas/DAGStringInputAlias" + }, + { + "$ref": "#/components/schemas/DAGIntegerInputAlias" + }, + { + "$ref": "#/components/schemas/DAGNumberInputAlias" + }, + { + "$ref": "#/components/schemas/DAGBooleanInputAlias" + }, + { + "$ref": "#/components/schemas/DAGFolderInputAlias" + }, + { + "$ref": "#/components/schemas/DAGFileInputAlias" + }, + { + "$ref": "#/components/schemas/DAGPathInputAlias" + }, + { + "$ref": "#/components/schemas/DAGArrayInputAlias" + }, + { + "$ref": "#/components/schemas/DAGJSONObjectInputAlias" + }, + { + "$ref": "#/components/schemas/DAGLinkedInputAlias" + } + ] + } }, - "permissions": { - "$ref": "#/components/schemas/UserPermission" + "required": { + "title": "Required", + "description": "A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided.", + "default": false, + "type": "boolean" }, - "slug": { - "title": "Slug", - "description": "The project name in slug format", - "example": "project-falcon", - "type": "string" + "spec": { + "title": "Spec", + "description": "An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec.", + "type": "object" }, - "usage": { - "title": "Usage", - "description": "The resource consumption of this project", + "items_type": { + "description": "Type of items in an array. All the items in an array must be from the same type.", + "default": "String", "allOf": [ { - "$ref": "#/components/schemas/Usage" + "$ref": "#/components/schemas/ItemType" } ] }, "type": { "title": "Type", - "default": "Project", + "default": "DAGArrayInput", + "pattern": "^DAGArrayInput$", "type": "string", - "pattern": "^Project$", "readOnly": true } } } ], - "title": "Project", + "title": "DAGArrayInput", + "description": "A JSON array input.\n\nYou can add additional validation by defining a JSONSchema specification.\n\nSee http://json-schema.org/understanding-json-schema/reference/array.html for\nmore information.", "discriminator": { "propertyName": "type" } }, - "DAGGenericOutputAlias": { + "DAGJSONObjectInput": { "allOf": [ { - "$ref": "#/components/schemas/GenericOutput" + "$ref": "#/components/schemas/GenericInput" }, { "type": "object", - "required": [ - "platform", - "handler" - ], "properties": { - "platform": { - "title": "Platform", - "description": "Name of the client platform (e.g. Grasshopper, Revit, etc). The value can be any strings as long as it has been agreed between client-side developer and author of the recipe.", - "type": "array", - "items": { - "type": "string" - } + "default": { + "title": "Default", + "description": "Default value to use for an input if a value was not supplied.", + "type": "object" }, - "handler": { - "title": "Handler", - "description": "List of process actions to process the input or output value.", + "alias": { + "title": "Alias", + "description": "A list of aliases for this input in different platforms.", "type": "array", "items": { - "$ref": "#/components/schemas/IOAliasHandler" + "anyOf": [ + { + "$ref": "#/components/schemas/DAGGenericInputAlias" + }, + { + "$ref": "#/components/schemas/DAGStringInputAlias" + }, + { + "$ref": "#/components/schemas/DAGIntegerInputAlias" + }, + { + "$ref": "#/components/schemas/DAGNumberInputAlias" + }, + { + "$ref": "#/components/schemas/DAGBooleanInputAlias" + }, + { + "$ref": "#/components/schemas/DAGFolderInputAlias" + }, + { + "$ref": "#/components/schemas/DAGFileInputAlias" + }, + { + "$ref": "#/components/schemas/DAGPathInputAlias" + }, + { + "$ref": "#/components/schemas/DAGArrayInputAlias" + }, + { + "$ref": "#/components/schemas/DAGJSONObjectInputAlias" + }, + { + "$ref": "#/components/schemas/DAGLinkedInputAlias" + } + ] } }, - "type": { - "title": "Type", - "default": "DAGGenericOutputAlias", - "pattern": "^DAGGenericOutputAlias$", - "type": "string", - "readOnly": true - } - } - } - ], - "title": "DAGGenericOutputAlias", - "description": "DAG generic alias output.\n\nIn most cases, you should not be using the generic output unless you need a dynamic\noutput that changes its type in different platforms because of returning different\nobjects in handler.", - "discriminator": { - "propertyName": "type" - } - }, - "DAGStringOutputAlias": { - "allOf": [ - { - "$ref": "#/components/schemas/_DAGArtifactOutputAlias" - }, - { - "type": "object", - "required": [ - "from" - ], - "properties": { - "from": { - "title": "From", - "description": "Reference to a file or a task output. Task output must be file.", - "anyOf": [ - { - "$ref": "#/components/schemas/TaskReference" - }, - { - "$ref": "#/components/schemas/FileReference" - } - ] + "required": { + "title": "Required", + "description": "A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided.", + "default": false, + "type": "boolean" + }, + "spec": { + "title": "Spec", + "description": "An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec.", + "type": "object" }, "type": { "title": "Type", - "default": "DAGStringOutputAlias", - "pattern": "^DAGStringOutputAlias$", + "default": "DAGJSONObjectInput", + "pattern": "^DAGJSONObjectInput$", "type": "string", "readOnly": true } } } ], - "title": "DAGStringOutputAlias", - "description": "DAG alias string output.\n\nThis output loads the content from a file as a string.", + "title": "DAGJSONObjectInput", + "description": "A JSON object input.\n\nJSON objects are similar to Python dictionaries.\n\nYou can add additional validation by defining a JSONSchema specification.\n\nSee http://json-schema.org/understanding-json-schema/reference/object.html for\nmore information.", "discriminator": { "propertyName": "type" } }, - "DAGNumberOutputAlias": { + "DAGGenericOutput": { "allOf": [ { - "$ref": "#/components/schemas/_DAGArtifactOutputAlias" + "$ref": "#/components/schemas/FromOutput" }, { "type": "object", - "required": [ - "from" - ], "properties": { - "from": { - "title": "From", - "description": "Reference to a file or a task output. Task output must be file.", - "anyOf": [ - { - "$ref": "#/components/schemas/TaskReference" - }, - { - "$ref": "#/components/schemas/FileReference" - } - ] + "alias": { + "title": "Alias", + "description": "A list of additional processes for loading this output on different platforms.", + "type": "array", + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/DAGGenericOutputAlias" + }, + { + "$ref": "#/components/schemas/DAGStringOutputAlias" + }, + { + "$ref": "#/components/schemas/DAGIntegerOutputAlias" + }, + { + "$ref": "#/components/schemas/DAGNumberOutputAlias" + }, + { + "$ref": "#/components/schemas/DAGBooleanOutputAlias" + }, + { + "$ref": "#/components/schemas/DAGFolderOutputAlias" + }, + { + "$ref": "#/components/schemas/DAGFileOutputAlias" + }, + { + "$ref": "#/components/schemas/DAGPathOutputAlias" + }, + { + "$ref": "#/components/schemas/DAGArrayOutputAlias" + }, + { + "$ref": "#/components/schemas/DAGJSONObjectOutputAlias" + }, + { + "$ref": "#/components/schemas/DAGLinkedOutputAlias" + } + ] + } }, "type": { "title": "Type", - "default": "DAGNumberOutputAlias", - "pattern": "^DAGNumberOutputAlias$", + "default": "DAGGenericOutput", + "pattern": "^DAGGenericOutput$", "type": "string", "readOnly": true } } } ], - "title": "DAGNumberOutputAlias", - "description": "DAG alias number output.\n\nThis output loads the content from a file as a floating number.", + "title": "DAGGenericOutput", + "description": "DAG generic output.\n\nIn most cases, you should not be using the generic output unless you need a dynamic\noutput that changes its type in different platforms because of returning different\nobjects in handler.", "discriminator": { "propertyName": "type" } }, - "DAGBooleanOutputAlias": { + "DAGStringOutput": { "allOf": [ { - "$ref": "#/components/schemas/_DAGArtifactOutputAlias" + "$ref": "#/components/schemas/GenericOutput" }, { "type": "object", @@ -10239,58 +14637,161 @@ } ] }, + "alias": { + "title": "Alias", + "description": "A list of additional processes for loading this output on different platforms.", + "type": "array", + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/DAGGenericOutputAlias" + }, + { + "$ref": "#/components/schemas/DAGStringOutputAlias" + }, + { + "$ref": "#/components/schemas/DAGIntegerOutputAlias" + }, + { + "$ref": "#/components/schemas/DAGNumberOutputAlias" + }, + { + "$ref": "#/components/schemas/DAGBooleanOutputAlias" + }, + { + "$ref": "#/components/schemas/DAGFolderOutputAlias" + }, + { + "$ref": "#/components/schemas/DAGFileOutputAlias" + }, + { + "$ref": "#/components/schemas/DAGPathOutputAlias" + }, + { + "$ref": "#/components/schemas/DAGArrayOutputAlias" + }, + { + "$ref": "#/components/schemas/DAGJSONObjectOutputAlias" + }, + { + "$ref": "#/components/schemas/DAGLinkedOutputAlias" + } + ] + } + }, + "required": { + "title": "Required", + "description": "A boolean to indicate if an artifact output is required. A False value makes the artifact optional.", + "default": true, + "type": "boolean" + }, "type": { "title": "Type", - "default": "DAGBooleanOutputAlias", - "pattern": "^DAGBooleanOutputAlias$", + "default": "DAGStringOutput", + "pattern": "^DAGStringOutput$", "type": "string", "readOnly": true } } } ], - "title": "DAGBooleanOutputAlias", - "description": "DAG alias boolean output.\n\nThis output loads the content from a file as a boolean.", + "title": "DAGStringOutput", + "description": "DAG string output.\n\nThis output loads the content from a file as a string.", "discriminator": { "propertyName": "type" } }, - "FolderReference": { + "DAGNumberOutput": { "allOf": [ { - "$ref": "#/components/schemas/_BaseReference" + "$ref": "#/components/schemas/GenericOutput" }, { "type": "object", "required": [ - "path" + "from" ], "properties": { - "path": { - "title": "Path", - "description": "Relative path to a folder.", - "type": "string" + "from": { + "title": "From", + "description": "Reference to a file or a task output. Task output must be file.", + "anyOf": [ + { + "$ref": "#/components/schemas/TaskReference" + }, + { + "$ref": "#/components/schemas/FileReference" + } + ] + }, + "alias": { + "title": "Alias", + "description": "A list of additional processes for loading this output on different platforms.", + "type": "array", + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/DAGGenericOutputAlias" + }, + { + "$ref": "#/components/schemas/DAGStringOutputAlias" + }, + { + "$ref": "#/components/schemas/DAGIntegerOutputAlias" + }, + { + "$ref": "#/components/schemas/DAGNumberOutputAlias" + }, + { + "$ref": "#/components/schemas/DAGBooleanOutputAlias" + }, + { + "$ref": "#/components/schemas/DAGFolderOutputAlias" + }, + { + "$ref": "#/components/schemas/DAGFileOutputAlias" + }, + { + "$ref": "#/components/schemas/DAGPathOutputAlias" + }, + { + "$ref": "#/components/schemas/DAGArrayOutputAlias" + }, + { + "$ref": "#/components/schemas/DAGJSONObjectOutputAlias" + }, + { + "$ref": "#/components/schemas/DAGLinkedOutputAlias" + } + ] + } + }, + "required": { + "title": "Required", + "description": "A boolean to indicate if an artifact output is required. A False value makes the artifact optional.", + "default": true, + "type": "boolean" }, "type": { "title": "Type", - "default": "FolderReference", - "pattern": "^FolderReference$", + "default": "DAGNumberOutput", + "pattern": "^DAGNumberOutput$", "type": "string", "readOnly": true } } } ], - "title": "FolderReference", - "description": "Reference to a folder.", + "title": "DAGNumberOutput", + "description": "DAG number output.\n\nThis output loads the content from a file as a floating number.", "discriminator": { "propertyName": "type" } }, - "DAGFolderOutputAlias": { + "DAGBooleanOutput": { "allOf": [ { - "$ref": "#/components/schemas/_DAGArtifactOutputAlias" + "$ref": "#/components/schemas/GenericOutput" }, { "type": "object", @@ -10300,36 +14801,84 @@ "properties": { "from": { "title": "From", - "description": "Reference to a folder or a task output. Task output must be folder.", + "description": "Reference to a file or a task output. Task output must be file.", "anyOf": [ { "$ref": "#/components/schemas/TaskReference" }, { - "$ref": "#/components/schemas/FolderReference" + "$ref": "#/components/schemas/FileReference" } ] }, + "alias": { + "title": "Alias", + "description": "A list of additional processes for loading this output on different platforms.", + "type": "array", + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/DAGGenericOutputAlias" + }, + { + "$ref": "#/components/schemas/DAGStringOutputAlias" + }, + { + "$ref": "#/components/schemas/DAGIntegerOutputAlias" + }, + { + "$ref": "#/components/schemas/DAGNumberOutputAlias" + }, + { + "$ref": "#/components/schemas/DAGBooleanOutputAlias" + }, + { + "$ref": "#/components/schemas/DAGFolderOutputAlias" + }, + { + "$ref": "#/components/schemas/DAGFileOutputAlias" + }, + { + "$ref": "#/components/schemas/DAGPathOutputAlias" + }, + { + "$ref": "#/components/schemas/DAGArrayOutputAlias" + }, + { + "$ref": "#/components/schemas/DAGJSONObjectOutputAlias" + }, + { + "$ref": "#/components/schemas/DAGLinkedOutputAlias" + } + ] + } + }, + "required": { + "title": "Required", + "description": "A boolean to indicate if an artifact output is required. A False value makes the artifact optional.", + "default": true, + "type": "boolean" + }, "type": { "title": "Type", - "default": "DAGFolderOutputAlias", - "pattern": "^DAGFolderOutputAlias$", + "default": "DAGBooleanOutput", + "pattern": "^DAGBooleanOutput$", "type": "string", "readOnly": true } } } ], - "title": "DAGFolderOutputAlias", - "description": "DAG alias folder output.", + "title": "DAGBooleanOutput", + "description": "DAG boolean output.\n\nThis output loads the content from a file as a boolean.", "discriminator": { "propertyName": "type" } }, - "DAGFileOutputAlias": { + "DAGFolderOutput": { "allOf": [ { - "$ref": "#/components/schemas/_DAGArtifactOutputAlias" + "$ref": "#/components/schemas/GenericOutput" }, { "type": "object", @@ -10339,36 +14888,84 @@ "properties": { "from": { "title": "From", - "description": "Reference to a file or a task output. Task output must be file.", + "description": "Reference to a folder or a task output. Task output must be folder.", "anyOf": [ { "$ref": "#/components/schemas/TaskReference" }, { - "$ref": "#/components/schemas/FileReference" + "$ref": "#/components/schemas/FolderReference" } ] }, + "alias": { + "title": "Alias", + "description": "A list of additional processes for loading this output on different platforms.", + "type": "array", + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/DAGGenericOutputAlias" + }, + { + "$ref": "#/components/schemas/DAGStringOutputAlias" + }, + { + "$ref": "#/components/schemas/DAGIntegerOutputAlias" + }, + { + "$ref": "#/components/schemas/DAGNumberOutputAlias" + }, + { + "$ref": "#/components/schemas/DAGBooleanOutputAlias" + }, + { + "$ref": "#/components/schemas/DAGFolderOutputAlias" + }, + { + "$ref": "#/components/schemas/DAGFileOutputAlias" + }, + { + "$ref": "#/components/schemas/DAGPathOutputAlias" + }, + { + "$ref": "#/components/schemas/DAGArrayOutputAlias" + }, + { + "$ref": "#/components/schemas/DAGJSONObjectOutputAlias" + }, + { + "$ref": "#/components/schemas/DAGLinkedOutputAlias" + } + ] + } + }, + "required": { + "title": "Required", + "description": "A boolean to indicate if an artifact output is required. A False value makes the artifact optional.", + "default": true, + "type": "boolean" + }, "type": { "title": "Type", - "default": "DAGFileOutputAlias", - "pattern": "^DAGFileOutputAlias$", + "default": "DAGFolderOutput", + "pattern": "^DAGFolderOutput$", "type": "string", "readOnly": true } } } ], - "title": "DAGFileOutputAlias", - "description": "DAG alias file output.", + "title": "DAGFolderOutput", + "description": "DAG folder output.", "discriminator": { "propertyName": "type" } }, - "DAGPathOutputAlias": { + "DAGPathOutput": { "allOf": [ { - "$ref": "#/components/schemas/_DAGArtifactOutputAlias" + "$ref": "#/components/schemas/GenericOutput" }, { "type": "object", @@ -10391,26 +14988,74 @@ } ] }, + "alias": { + "title": "Alias", + "description": "A list of additional processes for loading this output on different platforms.", + "type": "array", + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/DAGGenericOutputAlias" + }, + { + "$ref": "#/components/schemas/DAGStringOutputAlias" + }, + { + "$ref": "#/components/schemas/DAGIntegerOutputAlias" + }, + { + "$ref": "#/components/schemas/DAGNumberOutputAlias" + }, + { + "$ref": "#/components/schemas/DAGBooleanOutputAlias" + }, + { + "$ref": "#/components/schemas/DAGFolderOutputAlias" + }, + { + "$ref": "#/components/schemas/DAGFileOutputAlias" + }, + { + "$ref": "#/components/schemas/DAGPathOutputAlias" + }, + { + "$ref": "#/components/schemas/DAGArrayOutputAlias" + }, + { + "$ref": "#/components/schemas/DAGJSONObjectOutputAlias" + }, + { + "$ref": "#/components/schemas/DAGLinkedOutputAlias" + } + ] + } + }, + "required": { + "title": "Required", + "description": "A boolean to indicate if an artifact output is required. A False value makes the artifact optional.", + "default": true, + "type": "boolean" + }, "type": { "title": "Type", - "default": "DAGPathOutputAlias", - "pattern": "^DAGPathOutputAlias$", + "default": "DAGPathOutput", + "pattern": "^DAGPathOutput$", "type": "string", "readOnly": true } } } ], - "title": "DAGPathOutputAlias", - "description": "DAG alias path output.", + "title": "DAGPathOutput", + "description": "DAG path output.", "discriminator": { "propertyName": "type" } }, - "DAGArrayOutputAlias": { + "DAGArrayOutput": { "allOf": [ { - "$ref": "#/components/schemas/_DAGArtifactOutputAlias" + "$ref": "#/components/schemas/GenericOutput" }, { "type": "object", @@ -10430,6 +15075,54 @@ } ] }, + "alias": { + "title": "Alias", + "description": "A list of additional processes for loading this output on different platforms.", + "type": "array", + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/DAGGenericOutputAlias" + }, + { + "$ref": "#/components/schemas/DAGStringOutputAlias" + }, + { + "$ref": "#/components/schemas/DAGIntegerOutputAlias" + }, + { + "$ref": "#/components/schemas/DAGNumberOutputAlias" + }, + { + "$ref": "#/components/schemas/DAGBooleanOutputAlias" + }, + { + "$ref": "#/components/schemas/DAGFolderOutputAlias" + }, + { + "$ref": "#/components/schemas/DAGFileOutputAlias" + }, + { + "$ref": "#/components/schemas/DAGPathOutputAlias" + }, + { + "$ref": "#/components/schemas/DAGArrayOutputAlias" + }, + { + "$ref": "#/components/schemas/DAGJSONObjectOutputAlias" + }, + { + "$ref": "#/components/schemas/DAGLinkedOutputAlias" + } + ] + } + }, + "required": { + "title": "Required", + "description": "A boolean to indicate if an artifact output is required. A False value makes the artifact optional.", + "default": true, + "type": "boolean" + }, "items_type": { "description": "Type of items in this array. All the items in an array must be from the same type.", "default": "String", @@ -10441,60 +15134,21 @@ }, "type": { "title": "Type", - "default": "DAGArrayOutputAlias", - "pattern": "^DAGArrayOutputAlias$", - "type": "string", - "readOnly": true - } - } - } - ], - "title": "DAGArrayOutputAlias", - "description": "DAG alias array output.\n\nThis output loads the content from a JSON file which must be a JSON Array.", - "discriminator": { - "propertyName": "type" - } - }, - "DAGJSONObjectOutputAlias": { - "allOf": [ - { - "$ref": "#/components/schemas/_DAGArtifactOutputAlias" - }, - { - "type": "object", - "required": [ - "from" - ], - "properties": { - "from": { - "title": "From", - "description": "Reference to a file or a task output. Task output must be file.", - "anyOf": [ - { - "$ref": "#/components/schemas/TaskReference" - }, - { - "$ref": "#/components/schemas/FileReference" - } - ] - }, - "type": { - "title": "Type", - "default": "DAGJSONObjectOutputAlias", - "pattern": "^DAGJSONObjectOutputAlias$", + "default": "DAGArrayOutput", + "pattern": "^DAGArrayOutput$", "type": "string", "readOnly": true } } } ], - "title": "DAGJSONObjectOutputAlias", - "description": "DAG alias object output.\n\nThis output loads the content from a file as a JSON object.", + "title": "DAGArrayOutput", + "description": "DAG array output.\n\nThis output loads the content from a JSON file which must be a JSON Array.", "discriminator": { "propertyName": "type" } }, - "DAGArrayOutput": { + "DAGJSONObjectOutput": { "allOf": [ { "$ref": "#/components/schemas/GenericOutput" @@ -10565,133 +15219,233 @@ "default": true, "type": "boolean" }, - "items_type": { - "description": "Type of items in this array. All the items in an array must be from the same type.", - "default": "String", - "allOf": [ - { - "$ref": "#/components/schemas/ItemType" - } - ] - }, "type": { "title": "Type", - "default": "DAGArrayOutput", - "pattern": "^DAGArrayOutput$", + "default": "DAGJSONObjectOutput", + "pattern": "^DAGJSONObjectOutput$", "type": "string", "readOnly": true } } } ], - "title": "DAGArrayOutput", - "description": "DAG array output.\n\nThis output loads the content from a JSON file which must be a JSON Array.", + "title": "DAGJSONObjectOutput", + "description": "DAG object output.\n\nThis output loads the content from a file as a JSON object.", "discriminator": { "propertyName": "type" } }, - "FunctionBooleanInput": { + "RecipeInterface": { "allOf": [ { - "$ref": "#/components/schemas/GenericInput" + "$ref": "#/components/schemas/_OpenAPIGenBaseModel" }, { "type": "object", "properties": { - "default": { - "title": "Default", - "description": "Default value to use for an input if a value was not supplied.", - "type": "boolean" + "metadata": { + "title": "Metadata", + "description": "Recipe metadata information.", + "allOf": [ + { + "$ref": "#/components/schemas/MetaData" + } + ] }, - "alias": { - "title": "Alias", - "description": "A list of aliases for this input in different platforms.", + "type": { + "title": "Type", + "default": "RecipeInterface", + "pattern": "^RecipeInterface$", + "type": "string", + "readOnly": true + }, + "annotations": { + "title": "Annotations", + "description": "An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "api_version": { + "title": "Api Version", + "default": "v1beta1", + "readOnly": true, + "pattern": "^v1beta1$", + "type": "string" + }, + "source": { + "title": "Source", + "description": "A URL to the source this recipe from a registry.", + "type": "string" + }, + "inputs": { + "title": "Inputs", + "description": "A list of recipe inputs.", "type": "array", "items": { "anyOf": [ { - "$ref": "#/components/schemas/DAGGenericInputAlias" + "$ref": "#/components/schemas/DAGGenericInput" }, { - "$ref": "#/components/schemas/DAGStringInputAlias" + "$ref": "#/components/schemas/DAGStringInput" }, { - "$ref": "#/components/schemas/DAGIntegerInputAlias" + "$ref": "#/components/schemas/DAGIntegerInput" }, { - "$ref": "#/components/schemas/DAGNumberInputAlias" + "$ref": "#/components/schemas/DAGNumberInput" }, { - "$ref": "#/components/schemas/DAGBooleanInputAlias" + "$ref": "#/components/schemas/DAGBooleanInput" }, { - "$ref": "#/components/schemas/DAGFolderInputAlias" + "$ref": "#/components/schemas/DAGFolderInput" }, { - "$ref": "#/components/schemas/DAGFileInputAlias" + "$ref": "#/components/schemas/DAGFileInput" }, { - "$ref": "#/components/schemas/DAGPathInputAlias" + "$ref": "#/components/schemas/DAGPathInput" }, { - "$ref": "#/components/schemas/DAGArrayInputAlias" + "$ref": "#/components/schemas/DAGArrayInput" }, { - "$ref": "#/components/schemas/DAGJSONObjectInputAlias" + "$ref": "#/components/schemas/DAGJSONObjectInput" + } + ] + } + }, + "outputs": { + "title": "Outputs", + "description": "A list of recipe outputs.", + "type": "array", + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/DAGGenericOutput" }, { - "$ref": "#/components/schemas/DAGLinkedInputAlias" + "$ref": "#/components/schemas/DAGStringOutput" + }, + { + "$ref": "#/components/schemas/DAGIntegerOutput" + }, + { + "$ref": "#/components/schemas/DAGNumberOutput" + }, + { + "$ref": "#/components/schemas/DAGBooleanOutput" + }, + { + "$ref": "#/components/schemas/DAGFolderOutput" + }, + { + "$ref": "#/components/schemas/DAGFileOutput" + }, + { + "$ref": "#/components/schemas/DAGPathOutput" + }, + { + "$ref": "#/components/schemas/DAGArrayOutput" + }, + { + "$ref": "#/components/schemas/DAGJSONObjectOutput" } ] } + } + }, + "required": [ + "metadata" + ] + } + ], + "title": "RecipeInterface", + "description": "An interface object for creating a Recipe.\n\nRecipe information only includes metadata, source, inputs and outputs of a Recipe.\nThis object is useful for creating user interface for Recipes.", + "discriminator": { + "propertyName": "type" + } + }, + "RecipePackage": { + "allOf": [ + { + "$ref": "#/components/schemas/RepositoryPackage" + }, + { + "type": "object", + "required": [ + "manifest" + ], + "properties": { + "manifest": { + "$ref": "#/components/schemas/RecipeInterface" }, - "required": { - "title": "Required", - "description": "A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided.", - "default": false, - "type": "boolean" - }, - "spec": { - "title": "Spec", - "description": "An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec.", - "type": "object" + "type": { + "title": "Type", + "default": "RecipePackage", + "type": "string", + "pattern": "^RecipePackage$", + "readOnly": true + } + } + } + ], + "title": "RecipePackage", + "discriminator": { + "propertyName": "type" + } + }, + "PaymentCreate": { + "allOf": [ + { + "$ref": "#/components/schemas/_OpenAPIGenBaseModel" + }, + { + "type": "object", + "properties": { + "description": { + "title": "Description", + "description": "The description of this payment method", + "type": "string" }, "type": { "title": "Type", - "default": "FunctionBooleanInput", - "pattern": "^FunctionBooleanInput$", + "default": "PaymentCreate", "type": "string", + "pattern": "^PaymentCreate$", "readOnly": true } } } ], - "title": "FunctionBooleanInput", - "description": "The boolean type matches only two special values: True and False.\n\nNote that values that evaluate to true or false, such as 1 and 0, are not accepted.\n\nYou can add additional validation by defining a JSONSchema specification.\n\nSee http://json-schema.org/understanding-json-schema/reference/boolean.html for more\ninformation.", + "title": "PaymentCreate", "discriminator": { "propertyName": "type" } }, - "FunctionIntegerOutput": { + "ValueFolderReference": { "allOf": [ { - "$ref": "#/components/schemas/FunctionStringOutput" + "$ref": "#/components/schemas/ValueFileReference" }, { "type": "object", "properties": { "type": { "title": "Type", - "default": "FunctionIntegerOutput", - "pattern": "^FunctionIntegerOutput$", + "default": "ValueFolderReference", + "pattern": "^ValueFolderReference$", "type": "string", "readOnly": true } } } ], - "title": "FunctionIntegerOutput", - "description": "Function integer output.\n\nThis output loads the content from a file as an integer.", + "title": "ValueFolderReference", + "description": "A reference to a fixed folder.", "discriminator": { "propertyName": "type" } @@ -10743,100 +15497,75 @@ "propertyName": "type" } }, - "Maintainer": { + "TeamList": { "allOf": [ { "$ref": "#/components/schemas/_OpenAPIGenBaseModel" }, { "type": "object", + "required": [ + "page", + "per_page", + "page_count", + "total_count", + "resources" + ], "properties": { - "name": { - "title": "Name", - "description": "The name of the author/maintainer person or organization.", - "type": "string" + "page": { + "title": "Page", + "description": "The current page the pagination request is on", + "type": "integer", + "format": "int32" }, - "type": { - "title": "Type", - "default": "Maintainer", - "pattern": "^Maintainer$", - "type": "string", - "readOnly": true + "per_page": { + "title": "Per Page", + "description": "The number of pages per pagination request", + "type": "integer", + "format": "int32" }, - "annotations": { - "title": "Annotations", - "description": "An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.", - "type": "object", - "additionalProperties": { - "type": "string" + "page_count": { + "title": "Page Count", + "description": "The total number of pages", + "type": "integer", + "format": "int32" + }, + "total_count": { + "title": "Total Count", + "description": "The total number of resources matching the list request", + "type": "integer", + "format": "int32" + }, + "resources": { + "title": "Resources", + "type": "array", + "items": { + "$ref": "#/components/schemas/Team" } }, - "email": { - "title": "Email", - "description": "The email address of the author/maintainer person or organization.", - "type": "string" - } - }, - "required": [ - "name" - ] - } - ], - "title": "Maintainer", - "description": "Maintainer information", - "discriminator": { - "propertyName": "type" - } - }, - "License": { - "allOf": [ - { - "$ref": "#/components/schemas/_OpenAPIGenBaseModel" - }, - { - "type": "object", - "properties": { - "name": { - "title": "Name", - "description": "The license name used for the package.", - "type": "string" + "next_page": { + "title": "Next Page", + "description": "The next page, if this on is not the last", + "type": "integer", + "format": "int32" }, "type": { "title": "Type", - "default": "License", - "pattern": "^License$", + "default": "TeamList", "type": "string", + "pattern": "^TeamList$", "readOnly": true - }, - "annotations": { - "title": "Annotations", - "description": "An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.", - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "url": { - "title": "Url", - "description": "A URL to the license used for the package.", - "minLength": 1, - "maxLength": 65536, - "format": "uri", - "type": "string" } - }, - "required": [ - "name" - ] + } } ], - "title": "License", - "description": "License information for the Package", + "title": "TeamList", + "description": "A list response from a pagination request", "discriminator": { "propertyName": "type" } }, - "MetaData": { + "ResourcesDuration": { "allOf": [ { "$ref": "#/components/schemas/_OpenAPIGenBaseModel" @@ -10844,103 +15573,75 @@ { "type": "object", "properties": { - "name": { - "title": "Name", - "description": "Package name. Make it descriptive and helpful ;)", - "type": "string" + "cpu": { + "title": "Cpu", + "default": 0, + "type": "integer", + "format": "int32" }, - "tag": { - "title": "Tag", - "description": "The tag of the package", - "type": "string" + "memory": { + "title": "Memory", + "default": 0, + "type": "integer", + "format": "int32" }, "type": { "title": "Type", - "default": "MetaData", - "pattern": "^MetaData$", + "default": "ResourcesDuration", "type": "string", + "pattern": "^ResourcesDuration$", "readOnly": true + } + } + } + ], + "title": "ResourcesDuration", + "discriminator": { + "propertyName": "type" + } + }, + "RunProgress": { + "allOf": [ + { + "$ref": "#/components/schemas/_OpenAPIGenBaseModel" + }, + { + "type": "object", + "properties": { + "completed": { + "title": "Completed", + "default": 0, + "type": "integer", + "format": "int32" }, - "annotations": { - "title": "Annotations", - "description": "An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.", - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "app_version": { - "title": "App Version", - "description": "The version of the application code underlying the manifest", - "type": "string" - }, - "keywords": { - "title": "Keywords", - "description": "A list of keywords to search the package by", - "type": "array", - "items": { - "type": "string" - } - }, - "maintainers": { - "title": "Maintainers", - "description": "A list of maintainers for the package", - "type": "array", - "items": { - "$ref": "#/components/schemas/Maintainer" - } - }, - "home": { - "title": "Home", - "description": "The URL of this package's home page", - "type": "string" - }, - "sources": { - "title": "Sources", - "description": "A list of URLs to source code for this project", - "type": "array", - "items": { - "type": "string" - } - }, - "icon": { - "title": "Icon", - "description": "A URL to an SVG or PNG image to be used as an icon", - "type": "string" - }, - "deprecated": { - "title": "Deprecated", - "description": "Whether this package is deprecated", - "type": "boolean" + "running": { + "title": "Running", + "default": 0, + "type": "integer", + "format": "int32" }, - "description": { - "title": "Description", - "description": "A description of what this package does", - "type": "string" + "total": { + "title": "Total", + "default": 0, + "type": "integer", + "format": "int32" }, - "license": { - "title": "License", - "description": "The license information.", - "allOf": [ - { - "$ref": "#/components/schemas/License" - } - ] + "type": { + "title": "Type", + "default": "RunProgress", + "type": "string", + "pattern": "^RunProgress$", + "readOnly": true } - }, - "required": [ - "name", - "tag" - ] + } } ], - "title": "MetaData", - "description": "Package metadata information.", + "title": "RunProgress", "discriminator": { "propertyName": "type" } }, - "DockerConfig": { + "RunMeta": { "allOf": [ { "$ref": "#/components/schemas/_OpenAPIGenBaseModel" @@ -10948,130 +15649,163 @@ { "type": "object", "properties": { - "image": { - "title": "Image", - "description": "Docker image name. Must include tag.", - "type": "string" + "resources_duration": { + "title": "Resources Duration", + "description": "resource usage", + "default": { + "cpu": 0, + "memory": 0 + }, + "allOf": [ + { + "$ref": "#/components/schemas/ResourcesDuration" + } + ] }, - "workdir": { - "title": "Workdir", - "description": "The working directory the entrypoint command of the container runsin. This is used to determine where to load artifacts when running in the container.", - "type": "string" + "progress": { + "title": "Progress", + "description": "progress of the run", + "default": { + "completed": 0, + "running": 0, + "total": 0 + }, + "allOf": [ + { + "$ref": "#/components/schemas/RunProgress" + } + ] }, "type": { "title": "Type", - "default": "DockerConfig", - "pattern": "^DockerConfig", + "default": "RunMeta", "type": "string", + "pattern": "^RunMeta$", "readOnly": true - }, - "annotations": { - "title": "Annotations", - "description": "An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.", - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "registry": { - "title": "Registry", - "description": "The container registry URLs that this container should be pulled from. Will default to Dockerhub if none is specified.", - "type": "string" } - }, - "required": [ - "image", - "workdir" - ] + } } ], - "title": "DockerConfig", - "description": "Plugin Configuration to run in a Docker container", + "title": "RunMeta", "discriminator": { "propertyName": "type" } }, - "LocalConfig": { + "InputFolderReference": { "allOf": [ { - "$ref": "#/components/schemas/_OpenAPIGenBaseModel" + "$ref": "#/components/schemas/_InputReferenceBase" }, { "type": "object", "properties": { "type": { "title": "Type", - "default": "LocalConfig", - "pattern": "^LocalConfig", + "default": "InputFolderReference", + "pattern": "^InputFolderReference$", "type": "string", "readOnly": true - }, - "annotations": { - "title": "Annotations", - "description": "An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.", - "type": "object", - "additionalProperties": { - "type": "string" - } } } } ], - "title": "LocalConfig", - "description": "Plugin Configuration to run on a desktop.", + "title": "InputFolderReference", + "description": "An input folder reference", "discriminator": { "propertyName": "type" } }, - "PluginConfig": { + "Location": { "allOf": [ { - "$ref": "#/components/schemas/_OpenAPIGenBaseModel" + "$ref": "#/components/schemas/CryptlexBase" }, { "type": "object", "properties": { - "docker": { - "title": "Docker", - "description": "The configuration to use this plugin in a docker container", - "allOf": [ - { - "$ref": "#/components/schemas/DockerConfig" - } - ] + "ip_address": { + "title": "Ip Address", + "type": "string" + }, + "country_code": { + "title": "Country Code", + "type": "string" + }, + "country_name": { + "title": "Country Name", + "type": "string" + }, + "city": { + "title": "City", + "type": "string" + }, + "latitude": { + "title": "Latitude", + "type": "number", + "format": "double" + }, + "longitude": { + "title": "Longitude", + "type": "number", + "format": "double" }, "type": { "title": "Type", - "default": "PluginConfig", - "pattern": "^PluginConfig", + "default": "Location", "type": "string", + "pattern": "^Location$", "readOnly": true + } + } + } + ], + "title": "Location", + "discriminator": { + "propertyName": "type" + } + }, + "APIToken": { + "allOf": [ + { + "$ref": "#/components/schemas/_OpenAPIGenBaseModel" + }, + { + "type": "object", + "properties": { + "token_id": { + "title": "Token Id", + "description": "The unique ID of this API token", + "type": "string" }, - "annotations": { - "title": "Annotations", - "description": "An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.", + "name": { + "title": "Name", + "description": "The user friendly name of the API token", + "type": "string" + }, + "claims": { + "title": "Claims", + "description": "Key value pairs of auth claims the API token is entitled to", + "default": {}, "type": "object", "additionalProperties": { "type": "string" } }, - "local": { - "title": "Local", - "description": "The configuration to use this plugin locally", - "allOf": [ - { - "$ref": "#/components/schemas/LocalConfig" - } - ] + "type": { + "title": "Type", + "default": "APIToken", + "type": "string", + "pattern": "^APIToken$", + "readOnly": true } }, "required": [ - "docker" + "token_id", + "name" ] } ], - "title": "PluginConfig", - "description": "Plugin configuration.\n\nThe config is used to schedule functions on a desktop or in other contexts\n(ie: Docker).", + "title": "APIToken", "discriminator": { "propertyName": "type" } @@ -11100,7 +15834,7 @@ "propertyName": "type" } }, - "FunctionIntegerInput": { + "FunctionNumberInput": { "allOf": [ { "$ref": "#/components/schemas/GenericInput" @@ -11111,8 +15845,8 @@ "default": { "title": "Default", "description": "Default value to use for an input if a value was not supplied.", - "type": "integer", - "format": "int32" + "type": "number", + "format": "double" }, "alias": { "title": "Alias", @@ -11169,21 +15903,21 @@ }, "type": { "title": "Type", - "default": "FunctionIntegerInput", - "pattern": "^FunctionIntegerInput$", + "default": "FunctionNumberInput", + "pattern": "^FunctionNumberInput$", "type": "string", "readOnly": true } } } ], - "title": "FunctionIntegerInput", - "description": "An integer input.\n\nYou can add additional validation by defining a JSONSchema specification.\n\nSee http://json-schema.org/understanding-json-schema/reference/numeric.html#numeric\nfor more information.", + "title": "FunctionNumberInput", + "description": "A number input.\n\nYou can add additional validation by defining a JSONSchema specification.\n\nSee http://json-schema.org/understanding-json-schema/reference/numeric.html#numeric\nfor more information.", "discriminator": { "propertyName": "type" } }, - "FunctionNumberInput": { + "FunctionBooleanInput": { "allOf": [ { "$ref": "#/components/schemas/GenericInput" @@ -11194,8 +15928,7 @@ "default": { "title": "Default", "description": "Default value to use for an input if a value was not supplied.", - "type": "number", - "format": "double" + "type": "boolean" }, "alias": { "title": "Alias", @@ -11252,16 +15985,16 @@ }, "type": { "title": "Type", - "default": "FunctionNumberInput", - "pattern": "^FunctionNumberInput$", + "default": "FunctionBooleanInput", + "pattern": "^FunctionBooleanInput$", "type": "string", "readOnly": true } } } ], - "title": "FunctionNumberInput", - "description": "A number input.\n\nYou can add additional validation by defining a JSONSchema specification.\n\nSee http://json-schema.org/understanding-json-schema/reference/numeric.html#numeric\nfor more information.", + "title": "FunctionBooleanInput", + "description": "The boolean type matches only two special values: True and False.\n\nNote that values that evaluate to true or false, such as 1 and 0, are not accepted.\n\nYou can add additional validation by defining a JSONSchema specification.\n\nSee http://json-schema.org/understanding-json-schema/reference/boolean.html for more\ninformation.", "discriminator": { "propertyName": "type" } @@ -11756,7 +16489,31 @@ "propertyName": "type" } }, - "FunctionNumberOutput": { + "FunctionStringOutput": { + "allOf": [ + { + "$ref": "#/components/schemas/FunctionFileOutput" + }, + { + "type": "object", + "properties": { + "type": { + "title": "Type", + "default": "FunctionStringOutput", + "pattern": "^FunctionStringOutput$", + "type": "string", + "readOnly": true + } + } + } + ], + "title": "FunctionStringOutput", + "description": "Function string output.\n\nThis output loads the content from a file as a string.", + "discriminator": { + "propertyName": "type" + } + }, + "FunctionIntegerOutput": { "allOf": [ { "$ref": "#/components/schemas/FunctionStringOutput" @@ -11766,21 +16523,21 @@ "properties": { "type": { "title": "Type", - "default": "FunctionNumberOutput", - "pattern": "^FunctionNumberOutput$", + "default": "FunctionIntegerOutput", + "pattern": "^FunctionIntegerOutput$", "type": "string", "readOnly": true } } } ], - "title": "FunctionNumberOutput", - "description": "Function number output.\n\nThis output loads the content from a file as a floating number.", + "title": "FunctionIntegerOutput", + "description": "Function integer output.\n\nThis output loads the content from a file as an integer.", "discriminator": { "propertyName": "type" } }, - "FunctionBooleanOutput": { + "FunctionNumberOutput": { "allOf": [ { "$ref": "#/components/schemas/FunctionStringOutput" @@ -11790,40 +16547,40 @@ "properties": { "type": { "title": "Type", - "default": "FunctionBooleanOutput", - "pattern": "^FunctionBooleanOutput$", + "default": "FunctionNumberOutput", + "pattern": "^FunctionNumberOutput$", "type": "string", "readOnly": true } } } ], - "title": "FunctionBooleanOutput", - "description": "Function boolean output.\n\nThis output loads the content from a file as a boolean.", + "title": "FunctionNumberOutput", + "description": "Function number output.\n\nThis output loads the content from a file as a floating number.", "discriminator": { "propertyName": "type" } }, - "FunctionFolderOutput": { + "FunctionBooleanOutput": { "allOf": [ { - "$ref": "#/components/schemas/PathOutput" + "$ref": "#/components/schemas/FunctionStringOutput" }, { "type": "object", "properties": { "type": { "title": "Type", - "default": "FunctionFolderOutput", - "pattern": "^FunctionFolderOutput$", + "default": "FunctionBooleanOutput", + "pattern": "^FunctionBooleanOutput$", "type": "string", "readOnly": true } } } ], - "title": "FunctionFolderOutput", - "description": "Function Folder output.", + "title": "FunctionBooleanOutput", + "description": "Function boolean output.\n\nThis output loads the content from a file as a boolean.", "discriminator": { "propertyName": "type" } @@ -12126,36 +16883,115 @@ "propertyName": "type" } }, - "PluginPackage": { + "NewPluginPackage": { "allOf": [ { - "$ref": "#/components/schemas/RepositoryPackage" + "$ref": "#/components/schemas/_OpenAPIGenBaseModel" }, { "type": "object", + "properties": { + "manifest": { + "title": "Manifest", + "description": "The Plugin manifest to be created", + "allOf": [ + { + "$ref": "#/components/schemas/Plugin" + } + ] + }, + "readme": { + "title": "Readme", + "description": "The README file to attach to this package", + "default": "", + "type": "string" + }, + "type": { + "title": "Type", + "default": "NewPluginPackage", + "type": "string", + "pattern": "^NewPluginPackage$", + "readOnly": true + } + }, "required": [ "manifest" - ], + ] + } + ], + "title": "NewPluginPackage", + "discriminator": { + "propertyName": "type" + } + }, + "NewSubscriptionItem": { + "allOf": [ + { + "$ref": "#/components/schemas/_OpenAPIGenBaseModel" + }, + { + "type": "object", "properties": { - "manifest": { - "$ref": "#/components/schemas/Plugin" + "price": { + "$ref": "#/components/schemas/Price" + }, + "quantity": { + "title": "Quantity", + "type": "integer", + "format": "int32" }, "type": { "title": "Type", - "default": "PluginPackage", + "default": "NewSubscriptionItem", "type": "string", - "pattern": "^PluginPackage$", + "pattern": "^NewSubscriptionItem$", + "readOnly": true + } + }, + "required": [ + "price", + "quantity" + ] + } + ], + "title": "NewSubscriptionItem", + "discriminator": { + "propertyName": "type" + } + }, + "SubscriptionCreate": { + "allOf": [ + { + "$ref": "#/components/schemas/_OpenAPIGenBaseModel" + }, + { + "type": "object", + "properties": { + "items": { + "title": "Items", + "description": "The list of recurring price items and the quantity of each to attach to the new subscription", + "default": [], + "type": "array", + "items": { + "$ref": "#/components/schemas/NewSubscriptionItem" + } + }, + "type": { + "title": "Type", + "default": "SubscriptionCreate", + "type": "string", + "pattern": "^SubscriptionCreate$", "readOnly": true } } } ], - "title": "PluginPackage", + "title": "SubscriptionCreate", "discriminator": { "propertyName": "type" } }, - "PluginPackageList": { + "APITokenList": { "allOf": [ { "$ref": "#/components/schemas/_OpenAPIGenBaseModel" @@ -12198,7 +17034,7 @@ "title": "Resources", "type": "array", "items": { - "$ref": "#/components/schemas/PluginPackage" + "$ref": "#/components/schemas/APIToken" } }, "next_page": { @@ -12209,107 +17045,403 @@ }, "type": { "title": "Type", - "default": "PluginPackageList", + "default": "APITokenList", + "type": "string", + "pattern": "^APITokenList$", + "readOnly": true + } + } + } + ], + "title": "APITokenList", + "description": "A list response from a pagination request", + "discriminator": { + "propertyName": "type" + } + }, + "Period": { + "allOf": [ + { + "$ref": "#/components/schemas/_OpenAPIGenBaseModel" + }, + { + "type": "object", + "properties": { + "start": { + "title": "Start", + "type": "string", + "format": "date-time" + }, + "end": { + "title": "End", + "type": "string", + "format": "date-time" + }, + "type": { + "title": "Type", + "default": "Period", + "type": "string", + "pattern": "^Period$", + "readOnly": true + } + }, + "required": [ + "start", + "end" + ] + } + ], + "title": "Period", + "discriminator": { + "propertyName": "type" + } + }, + "LineItem": { + "allOf": [ + { + "$ref": "#/components/schemas/ExternalResource" + }, + { + "type": "object", + "required": [ + "amount", + "currency", + "description", + "period", + "price", + "proration", + "quantity", + "type" + ], + "properties": { + "amount": { + "title": "Amount", + "type": "integer", + "format": "int32" + }, + "currency": { + "title": "Currency", + "type": "string" + }, + "description": { + "title": "Description", + "type": "string" + }, + "period": { + "$ref": "#/components/schemas/Period" + }, + "price": { + "$ref": "#/components/schemas/Price" + }, + "proration": { + "title": "Proration", + "type": "boolean" + }, + "quantity": { + "title": "Quantity", + "type": "integer", + "format": "int32" + }, + "type": { + "title": "Type", + "type": "string", + "readOnly": true + } + } + } + ], + "title": "LineItem", + "discriminator": { + "propertyName": "type" + } + }, + "LineItemList": { + "allOf": [ + { + "$ref": "#/components/schemas/_OpenAPIGenBaseModel" + }, + { + "type": "object", + "required": [ + "has_more", + "data" + ], + "properties": { + "has_more": { + "title": "Has More", + "type": "boolean" + }, + "data": { + "title": "Data", + "type": "array", + "items": { + "$ref": "#/components/schemas/LineItem" + } + }, + "type": { + "title": "Type", + "default": "LineItemList", + "type": "string", + "pattern": "^LineItemList$", + "readOnly": true + } + } + } + ], + "title": "LineItemList", + "discriminator": { + "propertyName": "type" + } + }, + "CardPublic": { + "allOf": [ + { + "$ref": "#/components/schemas/_OpenAPIGenBaseModel" + }, + { + "type": "object", + "properties": { + "last4": { + "title": "Last4", + "description": "The last four digits of the card", + "type": "string" + }, + "exp_month": { + "title": "Exp Month", + "description": "The month the card expires", + "type": "integer", + "format": "int32" + }, + "exp_year": { + "title": "Exp Year", + "description": "The year the card expires", + "type": "integer", + "format": "int32" + }, + "type": { + "title": "Type", + "default": "CardPublic", + "type": "string", + "pattern": "^CardPublic$", + "readOnly": true + } + }, + "required": [ + "last4", + "exp_month", + "exp_year" + ] + } + ], + "title": "CardPublic", + "discriminator": { + "propertyName": "type" + } + }, + "InvoiceStatus": { + "title": "InvoiceStatus", + "description": "An enumeration.", + "enum": [ + "draft", + "open", + "paid", + "uncollectable", + "void" + ], + "type": "string" + }, + "InvoiceStatusTransitions": { + "allOf": [ + { + "$ref": "#/components/schemas/_OpenAPIGenBaseModel" + }, + { + "type": "object", + "properties": { + "finalized_at": { + "title": "Finalized At", + "type": "string", + "format": "date-time" + }, + "marked_uncollectible_at": { + "title": "Marked Uncollectible At", + "type": "string", + "format": "date-time" + }, + "paid_at": { + "title": "Paid At", + "type": "string", + "format": "date-time" + }, + "voided_at": { + "title": "Voided At", + "type": "string", + "format": "date-time" + }, + "type": { + "title": "Type", + "default": "InvoiceStatusTransitions", "type": "string", - "pattern": "^PluginPackageList$", + "pattern": "^InvoiceStatusTransitions$", "readOnly": true } } } ], - "title": "PluginPackageList", - "description": "A list response from a pagination request", + "title": "InvoiceStatusTransitions", "discriminator": { "propertyName": "type" } }, - "RepositoryCreate": { + "DiscountAmount": { "allOf": [ { - "$ref": "#/components/schemas/RepositoryUpdate" + "$ref": "#/components/schemas/_OpenAPIGenBaseModel" }, { "type": "object", - "required": [ - "name" - ], "properties": { - "name": { - "title": "Name", - "description": "The name of the repository", - "example": "daylight-factor", + "discount": { + "title": "Discount", "type": "string" }, + "amount": { + "title": "Amount", + "type": "integer", + "format": "int32" + }, "type": { "title": "Type", - "default": "RepositoryCreate", + "default": "DiscountAmount", "type": "string", - "pattern": "^RepositoryCreate$", + "pattern": "^DiscountAmount$", "readOnly": true } - } + }, + "required": [ + "discount", + "amount" + ] } ], - "title": "RepositoryCreate", + "title": "DiscountAmount", "discriminator": { "propertyName": "type" } }, - "ProjectCreate": { + "InvoicePreview": { "allOf": [ { "$ref": "#/components/schemas/_OpenAPIGenBaseModel" }, { "type": "object", + "required": [ + "collection_method", + "currency", + "customer", + "lines", + "period_start", + "period_end", + "status", + "status_transitions", + "subtotal", + "total" + ], "properties": { - "name": { - "title": "Name", - "description": "The name of the project. Must be unique to a given owner", - "example": "Project Falcon", + "collection_method": { + "title": "Collection Method", + "type": "string" + }, + "currency": { + "title": "Currency", + "type": "string" + }, + "customer": { + "title": "Customer", "type": "string" }, + "lines": { + "$ref": "#/components/schemas/LineItemList" + }, + "period_start": { + "title": "Period Start", + "type": "string", + "format": "date-time" + }, + "period_end": { + "title": "Period End", + "type": "string", + "format": "date-time" + }, + "status": { + "$ref": "#/components/schemas/InvoiceStatus" + }, + "status_transitions": { + "$ref": "#/components/schemas/InvoiceStatusTransitions" + }, + "subtotal": { + "title": "Subtotal", + "type": "integer", + "format": "int32" + }, + "total": { + "title": "Total", + "type": "integer", + "format": "int32" + }, + "auto_advance": { + "title": "Auto Advance", + "type": "boolean" + }, "description": { "title": "Description", - "description": "A description of the project", - "default": "", - "example": "I always wanted to have a project called project Falcon", "type": "string" }, - "public": { - "title": "Public", - "description": "Whether or not a project is publicly viewable", - "default": true, - "type": "boolean" + "hosted_invoice_url": { + "title": "Hosted Invoice Url", + "type": "string" + }, + "subscription": { + "title": "Subscription", + "type": "string" + }, + "discount": { + "$ref": "#/components/schemas/Discount" + }, + "total_discount_amounts": { + "title": "Total Discount Amounts", + "default": [], + "type": "array", + "items": { + "$ref": "#/components/schemas/DiscountAmount" + } + }, + "payment_method": { + "title": "Payment Method", + "description": "The payment method that will be billed when this invoice is due.", + "allOf": [ + { + "$ref": "#/components/schemas/CardPublic" + } + ] }, "type": { "title": "Type", - "default": "ProjectCreate", + "default": "InvoicePreview", "type": "string", - "pattern": "^ProjectCreate$", + "pattern": "^InvoicePreview$", "readOnly": true } - }, - "required": [ - "name" - ] + } } ], - "title": "ProjectCreate", + "title": "InvoicePreview", "discriminator": { "propertyName": "type" } }, - "SubjectType": { - "title": "SubjectType", - "description": "An enumeration.", - "enum": [ - "user", - "team" - ], - "type": "string" - }, - "PolicySubject": { + "Quota": { "allOf": [ { "$ref": "#/components/schemas/_OpenAPIGenBaseModel" @@ -12317,90 +17449,212 @@ { "type": "object", "properties": { - "subject_type": { - "$ref": "#/components/schemas/SubjectType" + "type": { + "description": "The type of resource", + "allOf": [ + { + "$ref": "#/components/schemas/QuotaType" + } + ], + "readOnly": true }, - "name": { - "title": "Name", - "description": "The name of the policy subject", - "example": "ladybugbot", - "type": "string" + "owner": { + "title": "Owner", + "description": "The quota owner", + "allOf": [ + { + "$ref": "#/components/schemas/AccountPublic" + } + ] }, - "type": { - "title": "Type", - "default": "PolicySubject", + "id": { + "title": "Id", + "description": "The unique ID for this Quota", "type": "string", - "pattern": "^PolicySubject$", - "readOnly": true + "format": "uuid" + }, + "period_start": { + "title": "Period Start", + "description": "The start of the quota usage tracking period", + "type": "string", + "format": "date-time" + }, + "limit": { + "title": "Limit", + "description": "The maximum amount of a resource the account can consume", + "type": "number", + "format": "double" + }, + "usage": { + "title": "Usage", + "description": "The current amount of a resource allocated to the account linked to the subscription", + "minimum": 0, + "type": "number", + "format": "double" + }, + "resets": { + "title": "Resets", + "description": "Whether consumption is reset to 0 every billing period", + "default": false, + "type": "boolean" + }, + "enforced": { + "title": "Enforced", + "description": "Whether the limit triggers a blocking response from the server", + "default": false, + "type": "boolean" + }, + "exceeded": { + "title": "Exceeded", + "description": "Whether the resource usage is greater than or equal to the limit", + "default": false, + "type": "boolean" + }, + "display_name": { + "title": "Display Name", + "description": "The human-readable name", + "type": "string" + }, + "description": { + "title": "Description", + "description": "The description", + "type": "string" + }, + "unit": { + "title": "Unit", + "description": "The unit in which the usage and limit are measured", + "type": "string" } }, "required": [ - "subject_type", - "name" + "type", + "owner" ] } ], - "title": "PolicySubject", + "title": "Quota", "discriminator": { "propertyName": "type" } }, - "Permission": { - "title": "Permission", - "description": "An enumeration.", - "enum": [ - "admin", - "write", - "read" - ], - "type": "string" - }, - "RepositoryAccessPolicy": { + "UpdateInvoicePreview": { "allOf": [ { "$ref": "#/components/schemas/_OpenAPIGenBaseModel" }, { "type": "object", - "required": [ - "subject", - "permission" - ], "properties": { - "subject": { - "title": "Subject", - "description": "The subject of the access policy", + "immediate": { + "title": "Immediate", + "description": "The invoice that will be finalized right after changes are applied", "allOf": [ { - "$ref": "#/components/schemas/PolicySubject" + "$ref": "#/components/schemas/InvoicePreview" } ] }, - "permission": { - "description": "The permission given to the subject of the access policy", - "example": "write", + "upcoming": { + "title": "Upcoming", + "description": "The invoice that will be finalized at the end of the current billing cycle", "allOf": [ { - "$ref": "#/components/schemas/Permission" + "$ref": "#/components/schemas/InvoicePreview" + } + ] + }, + "payment_method": { + "title": "Payment Method", + "description": "The payment method that will be billed when this invoice is due.", + "allOf": [ + { + "$ref": "#/components/schemas/CardPublic" } ] }, + "exceeded_quotas": { + "title": "Exceeded Quotas", + "description": "A list of quotas that would be exceeded by the update", + "default": [], + "type": "array", + "items": { + "$ref": "#/components/schemas/Quota" + } + }, "type": { "title": "Type", - "default": "RepositoryAccessPolicy", + "default": "UpdateInvoicePreview", "type": "string", - "pattern": "^RepositoryAccessPolicy$", + "pattern": "^UpdateInvoicePreview$", "readOnly": true } - } + }, + "required": [ + "immediate", + "upcoming" + ] } ], - "title": "RepositoryAccessPolicy", + "title": "UpdateInvoicePreview", "discriminator": { "propertyName": "type" } }, - "TeamCreate": { + "ProjectRecipeFilter": { + "allOf": [ + { + "$ref": "#/components/schemas/_OpenAPIGenBaseModel" + }, + { + "type": "object", + "properties": { + "owner": { + "title": "Owner", + "description": "The name of the account the recipe belongs to", + "example": "ladybug-tools", + "type": "string" + }, + "name": { + "title": "Name", + "description": "The name of the recipe", + "example": "daylight-factor", + "type": "string" + }, + "tag": { + "title": "Tag", + "description": "The specific recipe tag", + "example": "0.2.1", + "type": "string" + }, + "type": { + "title": "Type", + "default": "ProjectRecipeFilter", + "type": "string", + "pattern": "^ProjectRecipeFilter$", + "readOnly": true + } + }, + "required": [ + "owner", + "name" + ] + } + ], + "title": "ProjectRecipeFilter", + "discriminator": { + "propertyName": "type" + } + }, + "DependencyKind": { + "title": "DependencyKind", + "description": "Dependency kind.", + "enum": [ + "recipe", + "plugin" + ], + "type": "string" + }, + "Dependency": { "allOf": [ { "$ref": "#/components/schemas/_OpenAPIGenBaseModel" @@ -12408,184 +17662,154 @@ { "type": "object", "properties": { + "kind": { + "description": "The kind of dependency. It can be a recipe or an plugin.", + "allOf": [ + { + "$ref": "#/components/schemas/DependencyKind" + } + ] + }, "name": { "title": "Name", - "example": "Honeybee Contributors", + "description": "Workflow name. This name should be unique among all the resources in your resource. Use an alias if this is not the case.", "type": "string" }, - "description": { - "title": "Description", - "example": "The Honeybee team works on all things energy modelling", + "tag": { + "title": "Tag", + "description": "Tag of the resource.", + "type": "string" + }, + "source": { + "title": "Source", + "description": "URL to a repository where this resource can be found.", "type": "string" }, "type": { "title": "Type", - "default": "TeamCreate", + "default": "Dependency", + "pattern": "^Dependency$", "type": "string", - "pattern": "^TeamCreate$", "readOnly": true + }, + "annotations": { + "title": "Annotations", + "description": "An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "hash": { + "title": "Hash", + "description": "The digest hash of the dependency when retrieved from its source. This is locked when the resource dependencies are downloaded.", + "type": "string" + }, + "alias": { + "title": "Alias", + "description": "An optional alias to refer to this dependency. Useful if the name is already used somewhere else.", + "type": "string" } }, "required": [ - "name" + "kind", + "name", + "tag", + "source" ] } ], - "title": "TeamCreate", + "title": "Dependency", + "description": "Configuration to fetch a Recipe or Plugin that another Recipe depends on.", "discriminator": { "propertyName": "type" } }, - "Body_post_plugin__owner__plugins_post": { + "InputReference": { "allOf": [ { - "$ref": "#/components/schemas/_OpenAPIGenBaseModel" + "$ref": "#/components/schemas/_InputReferenceBase" }, { "type": "object", "properties": { - "package": { - "title": "Plugin Package", - "type": "string", - "format": "binary" - }, "type": { "title": "Type", - "default": "Body_post_plugin__owner__plugins_post", + "default": "InputReference", + "pattern": "^InputReference$", "type": "string", - "pattern": "^Body_post_plugin__owner__plugins_post$", "readOnly": true } - }, - "required": [ - "package" - ] + } } ], - "title": "Body_post_plugin__owner__plugins_post", + "title": "InputReference", + "description": "An input parameter reference which is not a file or a folder.\n\nFor a file or a folder use InputFileReference, InputFolderReference or\nInputPathReference instead.", "discriminator": { "propertyName": "type" } }, - "DAGJSONObjectOutput": { + "ItemReference": { "allOf": [ { - "$ref": "#/components/schemas/GenericOutput" + "$ref": "#/components/schemas/_BaseReference" }, { "type": "object", - "required": [ - "from" - ], "properties": { - "from": { - "title": "From", - "description": "Reference to a file or a task output. Task output must be file.", - "anyOf": [ - { - "$ref": "#/components/schemas/TaskReference" - }, - { - "$ref": "#/components/schemas/FileReference" - } - ] - }, - "alias": { - "title": "Alias", - "description": "A list of additional processes for loading this output on different platforms.", - "type": "array", - "items": { - "anyOf": [ - { - "$ref": "#/components/schemas/DAGGenericOutputAlias" - }, - { - "$ref": "#/components/schemas/DAGStringOutputAlias" - }, - { - "$ref": "#/components/schemas/DAGIntegerOutputAlias" - }, - { - "$ref": "#/components/schemas/DAGNumberOutputAlias" - }, - { - "$ref": "#/components/schemas/DAGBooleanOutputAlias" - }, - { - "$ref": "#/components/schemas/DAGFolderOutputAlias" - }, - { - "$ref": "#/components/schemas/DAGFileOutputAlias" - }, - { - "$ref": "#/components/schemas/DAGPathOutputAlias" - }, - { - "$ref": "#/components/schemas/DAGArrayOutputAlias" - }, - { - "$ref": "#/components/schemas/DAGJSONObjectOutputAlias" - }, - { - "$ref": "#/components/schemas/DAGLinkedOutputAlias" - } - ] - } - }, - "required": { - "title": "Required", - "description": "A boolean to indicate if an artifact output is required. A False value makes the artifact optional.", - "default": true, - "type": "boolean" + "variable": { + "title": "Variable", + "description": "The name of the looped item variable (use dot notation for nested json values)", + "type": "string" }, "type": { "title": "Type", - "default": "DAGJSONObjectOutput", - "pattern": "^DAGJSONObjectOutput$", + "default": "ItemReference", + "pattern": "^ItemReference$", "type": "string", "readOnly": true } } } ], - "title": "DAGJSONObjectOutput", - "description": "DAG object output.\n\nThis output loads the content from a file as a JSON object.", + "title": "ItemReference", + "description": "An Item Reference.", "discriminator": { "propertyName": "type" } }, - "Body_post_recipe__owner__recipes_post": { + "ValueReference": { "allOf": [ { - "$ref": "#/components/schemas/_OpenAPIGenBaseModel" + "$ref": "#/components/schemas/_BaseReference" }, { "type": "object", + "required": [ + "value" + ], "properties": { - "package": { - "title": "Recipe Package", - "type": "string", - "format": "binary" + "value": { + "title": "Value", + "description": "A fixed value for this reference." }, "type": { "title": "Type", - "default": "Body_post_recipe__owner__recipes_post", + "default": "ValueReference", + "pattern": "^ValueReference$", "type": "string", - "pattern": "^Body_post_recipe__owner__recipes_post$", "readOnly": true } - }, - "required": [ - "package" - ] + } } ], - "title": "Body_post_recipe__owner__recipes_post", + "title": "ValueReference", + "description": "A reference to a fixed value.", "discriminator": { "propertyName": "type" } }, - "ProjectRecipeFilter": { + "TaskArgument": { "allOf": [ { "$ref": "#/components/schemas/_OpenAPIGenBaseModel" @@ -12593,1457 +17817,1091 @@ { "type": "object", "properties": { - "owner": { - "title": "Owner", - "description": "The name of the account the recipe belongs to", - "example": "ladybug-tools", - "type": "string" - }, "name": { "title": "Name", - "description": "The name of the recipe", - "example": "daylight-factor", + "description": "Argument name. The name must match one of the input names from Task's template which can be a function or DAG.", "type": "string" }, - "tag": { - "title": "Tag", - "description": "The specific recipe tag", - "example": "0.2.1", - "type": "string" + "from": { + "title": "From", + "description": "A reference to a DAG input, a DAG output or another task output. You can also use the ValueReference type to hard-code an input value.", + "anyOf": [ + { + "$ref": "#/components/schemas/InputReference" + }, + { + "$ref": "#/components/schemas/TaskReference" + }, + { + "$ref": "#/components/schemas/ItemReference" + }, + { + "$ref": "#/components/schemas/ValueReference" + } + ] }, "type": { "title": "Type", - "default": "ProjectRecipeFilter", + "default": "TaskArgument", + "pattern": "^TaskArgument$", "type": "string", - "pattern": "^ProjectRecipeFilter$", "readOnly": true + }, + "annotations": { + "title": "Annotations", + "description": "An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.", + "type": "object", + "additionalProperties": { + "type": "string" + } } }, "required": [ - "owner", - "name" + "name", + "from" ] } ], - "title": "ProjectRecipeFilter", - "discriminator": { - "propertyName": "type" - } - }, - "TaskFileReference": { - "allOf": [ - { - "$ref": "#/components/schemas/_TaskReferenceBase" - }, - { - "type": "object", - "properties": { - "type": { - "title": "Type", - "default": "TaskFileReference", - "pattern": "^TaskFileReference$", - "type": "string", - "readOnly": true - } - } - } - ], - "title": "TaskFileReference", - "description": "A reference to a file that is generated in a task.", + "title": "TaskArgument", + "description": "Task argument for receiving inputs that are not files or folders.", "discriminator": { "propertyName": "type" } }, - "TaskFolderReference": { + "InputFileReference": { "allOf": [ { - "$ref": "#/components/schemas/_TaskReferenceBase" + "$ref": "#/components/schemas/_InputReferenceBase" }, { "type": "object", "properties": { "type": { "title": "Type", - "default": "TaskFolderReference", - "pattern": "^TaskFolderReference$", + "default": "InputFileReference", + "pattern": "^InputFileReference$", "type": "string", "readOnly": true } } } ], - "title": "TaskFolderReference", - "description": "A reference to a folder that is generated in a task.", + "title": "InputFileReference", + "description": "An input file reference", "discriminator": { "propertyName": "type" } }, - "UserCreate": { + "InputPathReference": { "allOf": [ { - "$ref": "#/components/schemas/UserUpdate" + "$ref": "#/components/schemas/_InputReferenceBase" }, { "type": "object", - "required": [ - "username" - ], "properties": { - "username": { - "title": "Username", - "description": "The unique name of the user in small case without spaces", - "example": "ladybugbot", - "type": "string" - }, "type": { "title": "Type", - "default": "UserCreate", + "default": "InputPathReference", + "pattern": "^InputPathReference$", "type": "string", - "pattern": "^UserCreate$", "readOnly": true } } } ], - "title": "UserCreate", + "title": "InputPathReference", + "description": "An input file or folder reference", "discriminator": { "propertyName": "type" } }, - "DAGGenericInput": { + "TaskFileReference": { "allOf": [ { - "$ref": "#/components/schemas/GenericInput" + "$ref": "#/components/schemas/_TaskReferenceBase" }, { "type": "object", "properties": { - "default": { - "title": "Default", - "description": "Default value for generic input.", - "type": "string" - }, - "alias": { - "title": "Alias", - "description": "A list of aliases for this input in different platforms.", - "type": "array", - "items": { - "anyOf": [ - { - "$ref": "#/components/schemas/DAGGenericInputAlias" - }, - { - "$ref": "#/components/schemas/DAGStringInputAlias" - }, - { - "$ref": "#/components/schemas/DAGIntegerInputAlias" - }, - { - "$ref": "#/components/schemas/DAGNumberInputAlias" - }, - { - "$ref": "#/components/schemas/DAGBooleanInputAlias" - }, - { - "$ref": "#/components/schemas/DAGFolderInputAlias" - }, - { - "$ref": "#/components/schemas/DAGFileInputAlias" - }, - { - "$ref": "#/components/schemas/DAGPathInputAlias" - }, - { - "$ref": "#/components/schemas/DAGArrayInputAlias" - }, - { - "$ref": "#/components/schemas/DAGJSONObjectInputAlias" - }, - { - "$ref": "#/components/schemas/DAGLinkedInputAlias" - } - ] - } - }, - "required": { - "title": "Required", - "description": "A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided.", - "default": false, - "type": "boolean" - }, - "spec": { - "title": "Spec", - "description": "An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec.", - "type": "object" - }, "type": { "title": "Type", - "default": "DAGGenericInput", - "pattern": "^DAGGenericInput$", + "default": "TaskFileReference", + "pattern": "^TaskFileReference$", "type": "string", "readOnly": true } } } ], - "title": "DAGGenericInput", - "description": "Base class for DAG inputs.\n\nThis class adds a handler to input to handle the process of loading the input\nfrom different graphical interfaces.", + "title": "TaskFileReference", + "description": "A reference to a file that is generated in a task.", "discriminator": { "propertyName": "type" } }, - "DAGStringInput": { + "TaskFolderReference": { "allOf": [ { - "$ref": "#/components/schemas/DAGGenericInput" + "$ref": "#/components/schemas/_TaskReferenceBase" }, { "type": "object", "properties": { "type": { "title": "Type", - "default": "DAGStringInput", - "pattern": "^DAGStringInput$", + "default": "TaskFolderReference", + "pattern": "^TaskFolderReference$", "type": "string", "readOnly": true } } } ], - "title": "DAGStringInput", - "description": "A String input.\n\nYou can add additional validation by defining a JSONSchema specification.\n\nSee http://json-schema.org/understanding-json-schema/reference/string.html#string for\nmore information.\n\n.. code-block:: python\n\n \"schema\": {\n \"type\": \"string\",\n \"maxLength\": 50,\n \"pattern\": \"(?i)(^.*\\.epw$)\"\n }", + "title": "TaskFolderReference", + "description": "A reference to a folder that is generated in a task.", "discriminator": { "propertyName": "type" } }, - "DAGIntegerInput": { + "TaskPathReference": { "allOf": [ { - "$ref": "#/components/schemas/GenericInput" + "$ref": "#/components/schemas/_TaskReferenceBase" }, { "type": "object", "properties": { - "default": { - "title": "Default", - "description": "Default value to use for an input if a value was not supplied.", - "type": "integer", - "format": "int32" - }, - "alias": { - "title": "Alias", - "description": "A list of aliases for this input in different platforms.", - "type": "array", - "items": { - "anyOf": [ - { - "$ref": "#/components/schemas/DAGGenericInputAlias" - }, - { - "$ref": "#/components/schemas/DAGStringInputAlias" - }, - { - "$ref": "#/components/schemas/DAGIntegerInputAlias" - }, - { - "$ref": "#/components/schemas/DAGNumberInputAlias" - }, - { - "$ref": "#/components/schemas/DAGBooleanInputAlias" - }, - { - "$ref": "#/components/schemas/DAGFolderInputAlias" - }, - { - "$ref": "#/components/schemas/DAGFileInputAlias" - }, - { - "$ref": "#/components/schemas/DAGPathInputAlias" - }, - { - "$ref": "#/components/schemas/DAGArrayInputAlias" - }, - { - "$ref": "#/components/schemas/DAGJSONObjectInputAlias" - }, - { - "$ref": "#/components/schemas/DAGLinkedInputAlias" - } - ] - } - }, - "required": { - "title": "Required", - "description": "A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided.", - "default": false, - "type": "boolean" - }, - "spec": { - "title": "Spec", - "description": "An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec.", - "type": "object" - }, "type": { "title": "Type", - "default": "DAGIntegerInput", - "pattern": "^DAGIntegerInput$", + "default": "TaskPathReference", + "pattern": "^TaskPathReference$", "type": "string", "readOnly": true } } } ], - "title": "DAGIntegerInput", - "description": "An integer input.\n\nYou can add additional validation by defining a JSONSchema specification.\n\nSee http://json-schema.org/understanding-json-schema/reference/numeric.html#numeric\nfor more information.", + "title": "TaskPathReference", + "description": "A reference to a file or folder that is generated in a task.", "discriminator": { "propertyName": "type" } }, - "DAGFolderInput": { + "ValueFileReference": { "allOf": [ - { - "$ref": "#/components/schemas/GenericInput" - }, - { - "type": "object", - "properties": { - "default": { - "title": "Default", - "description": "The default source for file if the value is not provided.", - "anyOf": [ - { - "$ref": "#/components/schemas/HTTP" - }, - { - "$ref": "#/components/schemas/S3" - }, - { - "$ref": "#/components/schemas/ProjectFolder" - } - ] - }, - "alias": { - "title": "Alias", - "description": "A list of aliases for this input in different platforms.", - "type": "array", - "items": { - "anyOf": [ - { - "$ref": "#/components/schemas/DAGGenericInputAlias" - }, - { - "$ref": "#/components/schemas/DAGStringInputAlias" - }, - { - "$ref": "#/components/schemas/DAGIntegerInputAlias" - }, - { - "$ref": "#/components/schemas/DAGNumberInputAlias" - }, - { - "$ref": "#/components/schemas/DAGBooleanInputAlias" - }, - { - "$ref": "#/components/schemas/DAGFolderInputAlias" - }, - { - "$ref": "#/components/schemas/DAGFileInputAlias" - }, - { - "$ref": "#/components/schemas/DAGPathInputAlias" - }, - { - "$ref": "#/components/schemas/DAGArrayInputAlias" - }, - { - "$ref": "#/components/schemas/DAGJSONObjectInputAlias" - }, - { - "$ref": "#/components/schemas/DAGLinkedInputAlias" - } - ] - } - }, - "required": { - "title": "Required", - "description": "A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided.", - "default": false, - "type": "boolean" - }, - "spec": { - "title": "Spec", - "description": "An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec.", - "type": "object" + { + "$ref": "#/components/schemas/_BaseReference" + }, + { + "type": "object", + "required": [ + "path" + ], + "properties": { + "path": { + "title": "Path", + "description": "A fixed value for this reference.", + "type": "string" }, "type": { "title": "Type", - "default": "DAGFolderInput", - "pattern": "^DAGFolderInput$", + "default": "ValueFileReference", + "pattern": "^ValueFileReference$", "type": "string", "readOnly": true } } } ], - "title": "DAGFolderInput", - "description": "A folder input.\n\nFolder is a special string input. Unlike other string inputs, a folder will be copied\nfrom its location to execution folder when a workflow is executed.\n\nYou can add additional validation by defining a JSONSchema specification.\n\nSee http://json-schema.org/understanding-json-schema/reference/string.html#string for\nmore information.\n\n.. code-block:: python\n\n \"schema\": {\n \"type\": \"string\",\n \"maxLength\": 50,\n }", + "title": "ValueFileReference", + "description": "A reference to a fixed file.", "discriminator": { "propertyName": "type" } }, - "DAGFileInput": { + "TaskPathArgument": { "allOf": [ { - "$ref": "#/components/schemas/GenericInput" + "$ref": "#/components/schemas/_OpenAPIGenBaseModel" }, { "type": "object", "properties": { - "default": { - "title": "Default", - "description": "The default source for file if the value is not provided.", + "name": { + "title": "Name", + "description": "Argument name. The name must match one of the input names from Task's template which can be a function or DAG.", + "type": "string" + }, + "from": { + "title": "From", + "description": "A reference to a DAG input, a DAG output or another task output. You can also use the ValueReference type to hard-code an input value.", "anyOf": [ { - "$ref": "#/components/schemas/HTTP" + "$ref": "#/components/schemas/InputFileReference" }, { - "$ref": "#/components/schemas/S3" + "$ref": "#/components/schemas/InputFolderReference" }, { - "$ref": "#/components/schemas/ProjectFolder" + "$ref": "#/components/schemas/InputPathReference" + }, + { + "$ref": "#/components/schemas/TaskFileReference" + }, + { + "$ref": "#/components/schemas/TaskFolderReference" + }, + { + "$ref": "#/components/schemas/TaskPathReference" + }, + { + "$ref": "#/components/schemas/ValueFileReference" + }, + { + "$ref": "#/components/schemas/ValueFolderReference" } ] }, - "alias": { - "title": "Alias", - "description": "A list of aliases for this input in different platforms.", - "type": "array", - "items": { - "anyOf": [ - { - "$ref": "#/components/schemas/DAGGenericInputAlias" - }, - { - "$ref": "#/components/schemas/DAGStringInputAlias" - }, - { - "$ref": "#/components/schemas/DAGIntegerInputAlias" - }, - { - "$ref": "#/components/schemas/DAGNumberInputAlias" - }, - { - "$ref": "#/components/schemas/DAGBooleanInputAlias" - }, - { - "$ref": "#/components/schemas/DAGFolderInputAlias" - }, - { - "$ref": "#/components/schemas/DAGFileInputAlias" - }, - { - "$ref": "#/components/schemas/DAGPathInputAlias" - }, - { - "$ref": "#/components/schemas/DAGArrayInputAlias" - }, - { - "$ref": "#/components/schemas/DAGJSONObjectInputAlias" - }, - { - "$ref": "#/components/schemas/DAGLinkedInputAlias" - } - ] - } - }, - "required": { - "title": "Required", - "description": "A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided.", - "default": false, - "type": "boolean" - }, - "spec": { - "title": "Spec", - "description": "An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec.", - "type": "object" - }, - "extensions": { - "title": "Extensions", - "description": "Optional list of extensions for file. The check for extension is case-insensitive.", - "type": "array", - "items": { - "type": "string" - } - }, "type": { "title": "Type", - "default": "DAGFileInput", - "pattern": "^DAGFileInput$", + "default": "TaskPathArgument", + "pattern": "^TaskPathArgument$", "type": "string", "readOnly": true + }, + "annotations": { + "title": "Annotations", + "description": "An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "sub_path": { + "title": "Sub Path", + "description": "A sub_path inside the path that is provided in the ``from`` field. Use sub_path to only access part of the Path that is needed instead of copying all the files and folders inside the path.", + "type": "string" } - } + }, + "required": [ + "name", + "from" + ] } ], - "title": "DAGFileInput", - "description": "A file input.\n\nFile is a special string input. Unlike other string inputs, a file will be copied\nfrom its location to execution folder when a workflow is executed.\n\nYou can add additional validation by defining a JSONSchema specification.\n\nSee http://json-schema.org/understanding-json-schema/reference/string.html#string for\nmore information.\n\n.. code-block:: python\n\n # a file with maximum 50 characters with an ``epw`` extension.\n\n \"schema\": {\n \"type\": \"string\",\n \"maxLength\": 50,\n \"pattern\": \"(?i)(^.*\\.epw$)\"\n }", + "title": "TaskPathArgument", + "description": "BaseModel with functionality to return the object as a yaml string.", "discriminator": { "propertyName": "type" } }, - "DAGPathInput": { + "DAGTaskLoop": { "allOf": [ { - "$ref": "#/components/schemas/GenericInput" + "$ref": "#/components/schemas/_OpenAPIGenBaseModel" }, { "type": "object", "properties": { - "default": { - "title": "Default", - "description": "The default source for file if the value is not provided.", + "type": { + "title": "Type", + "default": "DAGTaskLoop", + "pattern": "^DAGTaskLoop$", + "type": "string", + "readOnly": true + }, + "annotations": { + "title": "Annotations", + "description": "An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "from": { + "title": "From", + "description": "The task or DAG parameter to loop over (must be iterable).", "anyOf": [ { - "$ref": "#/components/schemas/HTTP" + "$ref": "#/components/schemas/InputReference" }, { - "$ref": "#/components/schemas/S3" + "$ref": "#/components/schemas/TaskReference" }, { - "$ref": "#/components/schemas/ProjectFolder" + "$ref": "#/components/schemas/ValueListReference" } ] - }, - "alias": { - "title": "Alias", - "description": "A list of aliases for this input in different platforms.", - "type": "array", - "items": { - "anyOf": [ - { - "$ref": "#/components/schemas/DAGGenericInputAlias" - }, - { - "$ref": "#/components/schemas/DAGStringInputAlias" - }, - { - "$ref": "#/components/schemas/DAGIntegerInputAlias" - }, - { - "$ref": "#/components/schemas/DAGNumberInputAlias" - }, - { - "$ref": "#/components/schemas/DAGBooleanInputAlias" - }, - { - "$ref": "#/components/schemas/DAGFolderInputAlias" - }, - { - "$ref": "#/components/schemas/DAGFileInputAlias" - }, - { - "$ref": "#/components/schemas/DAGPathInputAlias" - }, - { - "$ref": "#/components/schemas/DAGArrayInputAlias" - }, - { - "$ref": "#/components/schemas/DAGJSONObjectInputAlias" - }, - { - "$ref": "#/components/schemas/DAGLinkedInputAlias" - } - ] - } - }, - "required": { - "title": "Required", - "description": "A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided.", - "default": false, - "type": "boolean" - }, - "spec": { - "title": "Spec", - "description": "An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec.", - "type": "object" - }, - "extensions": { - "title": "Extensions", - "description": "Optional list of extensions for path. The check for extension is case-insensitive. The extension will only be validated for file inputs.", - "type": "array", - "items": { - "type": "string" - } - }, + } + } + } + ], + "title": "DAGTaskLoop", + "description": "Loop configuration for the task.\n\nThis will run the template provided multiple times and in parallel relative to an\ninput or task parameter which should be a list.", + "discriminator": { + "propertyName": "type" + } + }, + "TaskReturn": { + "allOf": [ + { + "$ref": "#/components/schemas/GenericOutput" + }, + { + "type": "object", + "properties": { "type": { "title": "Type", - "default": "DAGPathInput", - "pattern": "^DAGPathInput$", + "default": "TaskReturn", + "pattern": "^TaskReturn$", "type": "string", "readOnly": true } } } ], - "title": "DAGPathInput", - "description": "A file or a folder input.\n\nUse this input only in cases that the input can be either a file or folder. For file\nor folder-only inputs see File and Folder.\n\nPath is a special string input. Unlike other string inputs, a path will be copied\nfrom its location to execution folder when a workflow is executed.\n\nYou can add additional validation by defining a JSONSchema specification.\n\nSee http://json-schema.org/understanding-json-schema/reference/string.html#string for\nmore information.\n\n.. code-block:: python\n\n # a file with maximum 50 characters with an ``epw`` extension.\n\n \"schema\": {\n \"type\": \"string\",\n \"maxLength\": 50,\n \"pattern\": \"(?i)(^.*\\.epw$)\"\n }", + "title": "TaskReturn", + "description": "A Task return output that exposes the values from a function or a DAG.", "discriminator": { "propertyName": "type" } }, - "DAGArrayInput": { + "TaskPathReturn": { "allOf": [ { - "$ref": "#/components/schemas/GenericInput" + "$ref": "#/components/schemas/PathOutput" }, { "type": "object", "properties": { - "default": { - "title": "Default", - "description": "Default value to use for an input if a value was not supplied.", - "type": "array", - "items": {} - }, - "alias": { - "title": "Alias", - "description": "A list of aliases for this input in different platforms.", - "type": "array", - "items": { - "anyOf": [ - { - "$ref": "#/components/schemas/DAGGenericInputAlias" - }, - { - "$ref": "#/components/schemas/DAGStringInputAlias" - }, - { - "$ref": "#/components/schemas/DAGIntegerInputAlias" - }, - { - "$ref": "#/components/schemas/DAGNumberInputAlias" - }, - { - "$ref": "#/components/schemas/DAGBooleanInputAlias" - }, - { - "$ref": "#/components/schemas/DAGFolderInputAlias" - }, - { - "$ref": "#/components/schemas/DAGFileInputAlias" - }, - { - "$ref": "#/components/schemas/DAGPathInputAlias" - }, - { - "$ref": "#/components/schemas/DAGArrayInputAlias" - }, - { - "$ref": "#/components/schemas/DAGJSONObjectInputAlias" - }, - { - "$ref": "#/components/schemas/DAGLinkedInputAlias" - } - ] - } - }, - "required": { - "title": "Required", - "description": "A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided.", - "default": false, - "type": "boolean" - }, - "spec": { - "title": "Spec", - "description": "An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec.", - "type": "object" - }, - "items_type": { - "description": "Type of items in an array. All the items in an array must be from the same type.", - "default": "String", - "allOf": [ - { - "$ref": "#/components/schemas/ItemType" - } - ] - }, "type": { "title": "Type", - "default": "DAGArrayInput", - "pattern": "^DAGArrayInput$", + "default": "TaskPathReturn", + "pattern": "^TaskPathReturn$", "type": "string", "readOnly": true } } } ], - "title": "DAGArrayInput", - "description": "A JSON array input.\n\nYou can add additional validation by defining a JSONSchema specification.\n\nSee http://json-schema.org/understanding-json-schema/reference/array.html for\nmore information.", + "title": "TaskPathReturn", + "description": "A Task output that returns a file or a folder output from a function or a DAG.", "discriminator": { "propertyName": "type" } }, - "DAGJSONObjectInput": { + "DAGTask": { "allOf": [ { - "$ref": "#/components/schemas/GenericInput" + "$ref": "#/components/schemas/_OpenAPIGenBaseModel" }, { "type": "object", "properties": { - "default": { - "title": "Default", - "description": "Default value to use for an input if a value was not supplied.", - "type": "object" + "name": { + "title": "Name", + "description": "Name for this task. It must be unique in a DAG.", + "type": "string" }, - "alias": { - "title": "Alias", - "description": "A list of aliases for this input in different platforms.", + "template": { + "title": "Template", + "description": "Template name. A template is a Function or a DAG. This template must be available in the dependencies.", + "type": "string" + }, + "type": { + "title": "Type", + "default": "DAGTask", + "pattern": "^DAGTask$", + "type": "string", + "readOnly": true + }, + "annotations": { + "title": "Annotations", + "description": "An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "needs": { + "title": "Needs", + "description": "List of DAG tasks that this task depends on and needs to be executed before this task.", + "type": "array", + "items": { + "type": "string" + } + }, + "arguments": { + "title": "Arguments", + "description": "The input arguments for this task.", "type": "array", "items": { "anyOf": [ { - "$ref": "#/components/schemas/DAGGenericInputAlias" - }, - { - "$ref": "#/components/schemas/DAGStringInputAlias" - }, - { - "$ref": "#/components/schemas/DAGIntegerInputAlias" - }, - { - "$ref": "#/components/schemas/DAGNumberInputAlias" - }, - { - "$ref": "#/components/schemas/DAGBooleanInputAlias" - }, - { - "$ref": "#/components/schemas/DAGFolderInputAlias" - }, - { - "$ref": "#/components/schemas/DAGFileInputAlias" - }, - { - "$ref": "#/components/schemas/DAGPathInputAlias" - }, - { - "$ref": "#/components/schemas/DAGArrayInputAlias" - }, - { - "$ref": "#/components/schemas/DAGJSONObjectInputAlias" + "$ref": "#/components/schemas/TaskArgument" }, { - "$ref": "#/components/schemas/DAGLinkedInputAlias" + "$ref": "#/components/schemas/TaskPathArgument" } ] } }, - "required": { - "title": "Required", - "description": "A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided.", - "default": false, - "type": "boolean" + "loop": { + "title": "Loop", + "description": "Loop configuration for this task.", + "allOf": [ + { + "$ref": "#/components/schemas/DAGTaskLoop" + } + ] }, - "spec": { - "title": "Spec", - "description": "An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec.", - "type": "object" + "sub_folder": { + "title": "Sub Folder", + "description": "A path relative to the current folder context where artifacts should be saved. This is useful when performing a loop or invoking another workflow and wanting to save results in a specific sub_folder.", + "type": "string" }, - "type": { - "title": "Type", - "default": "DAGJSONObjectInput", - "pattern": "^DAGJSONObjectInput$", - "type": "string", - "readOnly": true + "returns": { + "title": "Returns", + "description": "List of task returns.", + "type": "array", + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/TaskReturn" + }, + { + "$ref": "#/components/schemas/TaskPathReturn" + } + ] + } } - } + }, + "required": [ + "name", + "template" + ] } ], - "title": "DAGJSONObjectInput", - "description": "A JSON object input.\n\nJSON objects are similar to Python dictionaries.\n\nYou can add additional validation by defining a JSONSchema specification.\n\nSee http://json-schema.org/understanding-json-schema/reference/object.html for\nmore information.", + "title": "DAGTask", + "description": "A single task in a DAG flow.", "discriminator": { "propertyName": "type" } }, - "DAGGenericOutput": { + "DAG": { "allOf": [ { - "$ref": "#/components/schemas/FromOutput" + "$ref": "#/components/schemas/_OpenAPIGenBaseModel" }, { "type": "object", + "required": [ + "name", + "tasks" + ], "properties": { - "alias": { - "title": "Alias", - "description": "A list of additional processes for loading this output on different platforms.", + "name": { + "title": "Name", + "description": "A unique name for this dag.", + "type": "string" + }, + "tasks": { + "title": "Tasks", + "description": "Tasks are a list of DAG steps", + "type": "array", + "items": { + "$ref": "#/components/schemas/DAGTask" + } + }, + "annotations": { + "title": "Annotations", + "description": "An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "inputs": { + "title": "Inputs", + "description": "Inputs for the DAG.", "type": "array", "items": { "anyOf": [ { - "$ref": "#/components/schemas/DAGGenericOutputAlias" - }, - { - "$ref": "#/components/schemas/DAGStringOutputAlias" + "$ref": "#/components/schemas/DAGGenericInput" }, { - "$ref": "#/components/schemas/DAGIntegerOutputAlias" + "$ref": "#/components/schemas/DAGStringInput" }, { - "$ref": "#/components/schemas/DAGNumberOutputAlias" + "$ref": "#/components/schemas/DAGIntegerInput" }, { - "$ref": "#/components/schemas/DAGBooleanOutputAlias" + "$ref": "#/components/schemas/DAGNumberInput" }, { - "$ref": "#/components/schemas/DAGFolderOutputAlias" + "$ref": "#/components/schemas/DAGBooleanInput" }, { - "$ref": "#/components/schemas/DAGFileOutputAlias" + "$ref": "#/components/schemas/DAGFolderInput" }, { - "$ref": "#/components/schemas/DAGPathOutputAlias" + "$ref": "#/components/schemas/DAGFileInput" }, { - "$ref": "#/components/schemas/DAGArrayOutputAlias" + "$ref": "#/components/schemas/DAGPathInput" }, { - "$ref": "#/components/schemas/DAGJSONObjectOutputAlias" + "$ref": "#/components/schemas/DAGArrayInput" }, { - "$ref": "#/components/schemas/DAGLinkedOutputAlias" + "$ref": "#/components/schemas/DAGJSONObjectInput" } ] } }, - "type": { - "title": "Type", - "default": "DAGGenericOutput", - "pattern": "^DAGGenericOutput$", - "type": "string", - "readOnly": true - } - } - } - ], - "title": "DAGGenericOutput", - "description": "DAG generic output.\n\nIn most cases, you should not be using the generic output unless you need a dynamic\noutput that changes its type in different platforms because of returning different\nobjects in handler.", - "discriminator": { - "propertyName": "type" - } - }, - "DAGStringOutput": { - "allOf": [ - { - "$ref": "#/components/schemas/GenericOutput" - }, - { - "type": "object", - "required": [ - "from" - ], - "properties": { - "from": { - "title": "From", - "description": "Reference to a file or a task output. Task output must be file.", - "anyOf": [ - { - "$ref": "#/components/schemas/TaskReference" - }, - { - "$ref": "#/components/schemas/FileReference" - } - ] - }, - "alias": { - "title": "Alias", - "description": "A list of additional processes for loading this output on different platforms.", + "outputs": { + "title": "Outputs", + "description": "Outputs of the DAG that can be used by other DAGs.", "type": "array", "items": { "anyOf": [ { - "$ref": "#/components/schemas/DAGGenericOutputAlias" - }, - { - "$ref": "#/components/schemas/DAGStringOutputAlias" + "$ref": "#/components/schemas/DAGGenericOutput" }, { - "$ref": "#/components/schemas/DAGIntegerOutputAlias" + "$ref": "#/components/schemas/DAGStringOutput" }, { - "$ref": "#/components/schemas/DAGNumberOutputAlias" + "$ref": "#/components/schemas/DAGIntegerOutput" }, { - "$ref": "#/components/schemas/DAGBooleanOutputAlias" + "$ref": "#/components/schemas/DAGNumberOutput" }, { - "$ref": "#/components/schemas/DAGFolderOutputAlias" + "$ref": "#/components/schemas/DAGBooleanOutput" }, { - "$ref": "#/components/schemas/DAGFileOutputAlias" + "$ref": "#/components/schemas/DAGFolderOutput" }, { - "$ref": "#/components/schemas/DAGPathOutputAlias" + "$ref": "#/components/schemas/DAGFileOutput" }, { - "$ref": "#/components/schemas/DAGArrayOutputAlias" + "$ref": "#/components/schemas/DAGPathOutput" }, { - "$ref": "#/components/schemas/DAGJSONObjectOutputAlias" + "$ref": "#/components/schemas/DAGArrayOutput" }, { - "$ref": "#/components/schemas/DAGLinkedOutputAlias" + "$ref": "#/components/schemas/DAGJSONObjectOutput" } ] } }, - "required": { - "title": "Required", - "description": "A boolean to indicate if an artifact output is required. A False value makes the artifact optional.", + "fail_fast": { + "title": "Fail Fast", + "description": "Stop scheduling new steps, as soon as it detects that one of the DAG nodes is failed. Default is True.", "default": true, "type": "boolean" }, "type": { "title": "Type", - "default": "DAGStringOutput", - "pattern": "^DAGStringOutput$", + "default": "DAG", + "pattern": "^DAG$", "type": "string", "readOnly": true } } } ], - "title": "DAGStringOutput", - "description": "DAG string output.\n\nThis output loads the content from a file as a string.", + "title": "DAG", + "description": "A Directed Acyclic Graph containing a list of tasks.", "discriminator": { "propertyName": "type" } }, - "DAGIntegerOutput": { + "TeamRoleEnum": { + "title": "TeamRoleEnum", + "description": "An enumeration.", + "enum": [ + "owner", + "member" + ], + "type": "string" + }, + "TeamMember": { "allOf": [ { - "$ref": "#/components/schemas/GenericOutput" + "$ref": "#/components/schemas/_OpenAPIGenBaseModel" }, { "type": "object", - "required": [ - "from" - ], "properties": { - "from": { - "title": "From", - "description": "Reference to a file or a task output. Task output must be file.", - "anyOf": [ + "user": { + "title": "User", + "description": "The team member", + "allOf": [ { - "$ref": "#/components/schemas/TaskReference" - }, + "$ref": "#/components/schemas/UserPublic" + } + ] + }, + "role": { + "description": "The role the user has within the team", + "example": "member", + "allOf": [ { - "$ref": "#/components/schemas/FileReference" + "$ref": "#/components/schemas/TeamRoleEnum" } ] }, - "alias": { - "title": "Alias", - "description": "A list of additional processes for loading this output on different platforms.", + "type": { + "title": "Type", + "default": "TeamMember", + "type": "string", + "pattern": "^TeamMember$", + "readOnly": true + } + }, + "required": [ + "user", + "role" + ] + } + ], + "title": "TeamMember", + "discriminator": { + "propertyName": "type" + } + }, + "RecipeInterfaceList": { + "allOf": [ + { + "$ref": "#/components/schemas/_OpenAPIGenBaseModel" + }, + { + "type": "object", + "required": [ + "page", + "per_page", + "page_count", + "total_count", + "resources" + ], + "properties": { + "page": { + "title": "Page", + "description": "The current page the pagination request is on", + "type": "integer", + "format": "int32" + }, + "per_page": { + "title": "Per Page", + "description": "The number of pages per pagination request", + "type": "integer", + "format": "int32" + }, + "page_count": { + "title": "Page Count", + "description": "The total number of pages", + "type": "integer", + "format": "int32" + }, + "total_count": { + "title": "Total Count", + "description": "The total number of resources matching the list request", + "type": "integer", + "format": "int32" + }, + "resources": { + "title": "Resources", "type": "array", "items": { - "anyOf": [ - { - "$ref": "#/components/schemas/DAGGenericOutputAlias" - }, - { - "$ref": "#/components/schemas/DAGStringOutputAlias" - }, - { - "$ref": "#/components/schemas/DAGIntegerOutputAlias" - }, - { - "$ref": "#/components/schemas/DAGNumberOutputAlias" - }, - { - "$ref": "#/components/schemas/DAGBooleanOutputAlias" - }, - { - "$ref": "#/components/schemas/DAGFolderOutputAlias" - }, - { - "$ref": "#/components/schemas/DAGFileOutputAlias" - }, - { - "$ref": "#/components/schemas/DAGPathOutputAlias" - }, - { - "$ref": "#/components/schemas/DAGArrayOutputAlias" - }, - { - "$ref": "#/components/schemas/DAGJSONObjectOutputAlias" - }, - { - "$ref": "#/components/schemas/DAGLinkedOutputAlias" - } - ] + "$ref": "#/components/schemas/RecipeInterface" } }, - "required": { - "title": "Required", - "description": "A boolean to indicate if an artifact output is required. A False value makes the artifact optional.", - "default": true, + "next_page": { + "title": "Next Page", + "description": "The next page, if this on is not the last", + "type": "integer", + "format": "int32" + }, + "type": { + "title": "Type", + "default": "RecipeInterfaceList", + "type": "string", + "pattern": "^RecipeInterfaceList$", + "readOnly": true + } + } + } + ], + "title": "RecipeInterfaceList", + "description": "A list response from a pagination request", + "discriminator": { + "propertyName": "type" + } + }, + "Metadata": { + "allOf": [ + { + "$ref": "#/components/schemas/CryptlexBase" + }, + { + "type": "object", + "required": [ + "key", + "value" + ], + "properties": { + "key": { + "title": "Key", + "type": "string" + }, + "value": { + "title": "Value", + "type": "string" + }, + "id": { + "title": "Id", + "type": "string" + }, + "visible": { + "title": "Visible", + "default": false, "type": "boolean" }, "type": { "title": "Type", - "default": "DAGIntegerOutput", - "pattern": "^DAGIntegerOutput$", + "default": "Metadata", "type": "string", + "pattern": "^Metadata$", "readOnly": true } } } ], - "title": "DAGIntegerOutput", - "description": "DAG integer output.\n\nThis output loads the content from a file as an integer.", + "title": "Metadata", "discriminator": { "propertyName": "type" } }, - "DAGNumberOutput": { + "PaymentIntent": { "allOf": [ { - "$ref": "#/components/schemas/GenericOutput" + "$ref": "#/components/schemas/_SecureResourcePublic" + }, + { + "type": "object", + "properties": { + "type": { + "title": "Type", + "default": "PaymentIntent", + "type": "string", + "pattern": "^PaymentIntent$", + "readOnly": true + } + } + } + ], + "title": "PaymentIntent", + "discriminator": { + "propertyName": "type" + } + }, + "ProjectRecipeFilterList": { + "allOf": [ + { + "$ref": "#/components/schemas/_OpenAPIGenBaseModel" }, { "type": "object", "required": [ - "from" + "page", + "per_page", + "page_count", + "total_count", + "resources" ], "properties": { - "from": { - "title": "From", - "description": "Reference to a file or a task output. Task output must be file.", - "anyOf": [ - { - "$ref": "#/components/schemas/TaskReference" - }, - { - "$ref": "#/components/schemas/FileReference" - } - ] + "page": { + "title": "Page", + "description": "The current page the pagination request is on", + "type": "integer", + "format": "int32" }, - "alias": { - "title": "Alias", - "description": "A list of additional processes for loading this output on different platforms.", + "per_page": { + "title": "Per Page", + "description": "The number of pages per pagination request", + "type": "integer", + "format": "int32" + }, + "page_count": { + "title": "Page Count", + "description": "The total number of pages", + "type": "integer", + "format": "int32" + }, + "total_count": { + "title": "Total Count", + "description": "The total number of resources matching the list request", + "type": "integer", + "format": "int32" + }, + "resources": { + "title": "Resources", "type": "array", "items": { - "anyOf": [ - { - "$ref": "#/components/schemas/DAGGenericOutputAlias" - }, - { - "$ref": "#/components/schemas/DAGStringOutputAlias" - }, - { - "$ref": "#/components/schemas/DAGIntegerOutputAlias" - }, - { - "$ref": "#/components/schemas/DAGNumberOutputAlias" - }, - { - "$ref": "#/components/schemas/DAGBooleanOutputAlias" - }, - { - "$ref": "#/components/schemas/DAGFolderOutputAlias" - }, - { - "$ref": "#/components/schemas/DAGFileOutputAlias" - }, - { - "$ref": "#/components/schemas/DAGPathOutputAlias" - }, - { - "$ref": "#/components/schemas/DAGArrayOutputAlias" - }, - { - "$ref": "#/components/schemas/DAGJSONObjectOutputAlias" - }, - { - "$ref": "#/components/schemas/DAGLinkedOutputAlias" - } - ] + "$ref": "#/components/schemas/ProjectRecipeFilter" } }, - "required": { - "title": "Required", - "description": "A boolean to indicate if an artifact output is required. A False value makes the artifact optional.", - "default": true, - "type": "boolean" + "next_page": { + "title": "Next Page", + "description": "The next page, if this on is not the last", + "type": "integer", + "format": "int32" }, "type": { "title": "Type", - "default": "DAGNumberOutput", - "pattern": "^DAGNumberOutput$", + "default": "ProjectRecipeFilterList", "type": "string", + "pattern": "^ProjectRecipeFilterList$", "readOnly": true } } } ], - "title": "DAGNumberOutput", - "description": "DAG number output.\n\nThis output loads the content from a file as a floating number.", + "title": "ProjectRecipeFilterList", + "description": "A list response from a pagination request", "discriminator": { "propertyName": "type" } }, - "DAGBooleanOutput": { + "RecipePackageList": { "allOf": [ { - "$ref": "#/components/schemas/GenericOutput" + "$ref": "#/components/schemas/_OpenAPIGenBaseModel" }, { "type": "object", "required": [ - "from" + "page", + "per_page", + "page_count", + "total_count", + "resources" ], "properties": { - "from": { - "title": "From", - "description": "Reference to a file or a task output. Task output must be file.", - "anyOf": [ - { - "$ref": "#/components/schemas/TaskReference" - }, - { - "$ref": "#/components/schemas/FileReference" - } - ] + "page": { + "title": "Page", + "description": "The current page the pagination request is on", + "type": "integer", + "format": "int32" }, - "alias": { - "title": "Alias", - "description": "A list of additional processes for loading this output on different platforms.", + "per_page": { + "title": "Per Page", + "description": "The number of pages per pagination request", + "type": "integer", + "format": "int32" + }, + "page_count": { + "title": "Page Count", + "description": "The total number of pages", + "type": "integer", + "format": "int32" + }, + "total_count": { + "title": "Total Count", + "description": "The total number of resources matching the list request", + "type": "integer", + "format": "int32" + }, + "resources": { + "title": "Resources", "type": "array", "items": { - "anyOf": [ - { - "$ref": "#/components/schemas/DAGGenericOutputAlias" - }, - { - "$ref": "#/components/schemas/DAGStringOutputAlias" - }, - { - "$ref": "#/components/schemas/DAGIntegerOutputAlias" - }, - { - "$ref": "#/components/schemas/DAGNumberOutputAlias" - }, - { - "$ref": "#/components/schemas/DAGBooleanOutputAlias" - }, - { - "$ref": "#/components/schemas/DAGFolderOutputAlias" - }, - { - "$ref": "#/components/schemas/DAGFileOutputAlias" - }, - { - "$ref": "#/components/schemas/DAGPathOutputAlias" - }, - { - "$ref": "#/components/schemas/DAGArrayOutputAlias" - }, - { - "$ref": "#/components/schemas/DAGJSONObjectOutputAlias" - }, - { - "$ref": "#/components/schemas/DAGLinkedOutputAlias" - } - ] + "$ref": "#/components/schemas/RecipePackage" } }, - "required": { - "title": "Required", - "description": "A boolean to indicate if an artifact output is required. A False value makes the artifact optional.", - "default": true, - "type": "boolean" + "next_page": { + "title": "Next Page", + "description": "The next page, if this on is not the last", + "type": "integer", + "format": "int32" }, "type": { "title": "Type", - "default": "DAGBooleanOutput", - "pattern": "^DAGBooleanOutput$", + "default": "RecipePackageList", "type": "string", + "pattern": "^RecipePackageList$", "readOnly": true } } } ], - "title": "DAGBooleanOutput", - "description": "DAG boolean output.\n\nThis output loads the content from a file as a boolean.", + "title": "RecipePackageList", + "description": "A list response from a pagination request", "discriminator": { "propertyName": "type" } }, - "DAGFolderOutput": { + "OrganizationUpdate": { "allOf": [ { - "$ref": "#/components/schemas/GenericOutput" + "$ref": "#/components/schemas/_OpenAPIGenBaseModel" }, { "type": "object", - "required": [ - "from" - ], "properties": { - "from": { - "title": "From", - "description": "Reference to a folder or a task output. Task output must be folder.", - "anyOf": [ - { - "$ref": "#/components/schemas/TaskReference" - }, - { - "$ref": "#/components/schemas/FolderReference" - } - ] + "account_name": { + "title": "Account Name", + "description": "The unique name of the org in small case without spaces", + "example": "ladybug-tools", + "type": "string" }, - "alias": { - "title": "Alias", - "description": "A list of additional processes for loading this output on different platforms.", - "type": "array", - "items": { - "anyOf": [ - { - "$ref": "#/components/schemas/DAGGenericOutputAlias" - }, - { - "$ref": "#/components/schemas/DAGStringOutputAlias" - }, - { - "$ref": "#/components/schemas/DAGIntegerOutputAlias" - }, - { - "$ref": "#/components/schemas/DAGNumberOutputAlias" - }, - { - "$ref": "#/components/schemas/DAGBooleanOutputAlias" - }, - { - "$ref": "#/components/schemas/DAGFolderOutputAlias" - }, - { - "$ref": "#/components/schemas/DAGFileOutputAlias" - }, - { - "$ref": "#/components/schemas/DAGPathOutputAlias" - }, - { - "$ref": "#/components/schemas/DAGArrayOutputAlias" - }, - { - "$ref": "#/components/schemas/DAGJSONObjectOutputAlias" - }, - { - "$ref": "#/components/schemas/DAGLinkedOutputAlias" - } - ] - } + "name": { + "title": "Name", + "description": "The display name for this org", + "example": "Ladybug Tools", + "type": "string" }, - "required": { - "title": "Required", - "description": "A boolean to indicate if an artifact output is required. A False value makes the artifact optional.", - "default": true, - "type": "boolean" + "picture_url": { + "title": "Picture Url", + "description": "URL to the picture associated with this org", + "example": "https://avatars1.githubusercontent.com/u/38131342", + "type": "string" + }, + "contact_email": { + "title": "Contact Email", + "description": "The contact email for the Organization", + "example": "info@ladybug.tools", + "type": "string" + }, + "description": { + "title": "Description", + "description": "A description of the org", + "example": "Making environmental design knowledge and tools freely accessible to every person, project and design process", + "type": "string" }, "type": { "title": "Type", - "default": "DAGFolderOutput", - "pattern": "^DAGFolderOutput$", + "default": "OrganizationUpdate", "type": "string", + "pattern": "^OrganizationUpdate$", "readOnly": true } } } ], - "title": "DAGFolderOutput", - "description": "DAG folder output.", + "title": "OrganizationUpdate", "discriminator": { "propertyName": "type" } }, - "DAGFileOutput": { + "JobArgument": { "allOf": [ { - "$ref": "#/components/schemas/GenericOutput" + "$ref": "#/components/schemas/_OpenAPIGenBaseModel" }, { "type": "object", - "required": [ - "from" - ], "properties": { - "from": { - "title": "From", - "description": "Reference to a file or a task output. Task output must be file.", - "anyOf": [ - { - "$ref": "#/components/schemas/TaskReference" - }, - { - "$ref": "#/components/schemas/FileReference" - } - ] - }, - "alias": { - "title": "Alias", - "description": "A list of additional processes for loading this output on different platforms.", - "type": "array", - "items": { - "anyOf": [ - { - "$ref": "#/components/schemas/DAGGenericOutputAlias" - }, - { - "$ref": "#/components/schemas/DAGStringOutputAlias" - }, - { - "$ref": "#/components/schemas/DAGIntegerOutputAlias" - }, - { - "$ref": "#/components/schemas/DAGNumberOutputAlias" - }, - { - "$ref": "#/components/schemas/DAGBooleanOutputAlias" - }, - { - "$ref": "#/components/schemas/DAGFolderOutputAlias" - }, - { - "$ref": "#/components/schemas/DAGFileOutputAlias" - }, - { - "$ref": "#/components/schemas/DAGPathOutputAlias" - }, - { - "$ref": "#/components/schemas/DAGArrayOutputAlias" - }, - { - "$ref": "#/components/schemas/DAGJSONObjectOutputAlias" - }, - { - "$ref": "#/components/schemas/DAGLinkedOutputAlias" - } - ] - } + "name": { + "title": "Name", + "description": "Argument name. The name must match one of the input names from Job's DAG template.", + "type": "string" }, - "required": { - "title": "Required", - "description": "A boolean to indicate if an artifact output is required. A False value makes the artifact optional.", - "default": true, - "type": "boolean" + "value": { + "title": "Value", + "description": "The value of the job argument." }, "type": { "title": "Type", - "default": "DAGFileOutput", - "pattern": "^DAGFileOutput$", + "default": "JobArgument", + "pattern": "^JobArgument$", "type": "string", "readOnly": true + }, + "annotations": { + "title": "Annotations", + "description": "An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.", + "type": "object", + "additionalProperties": { + "type": "string" + } } - } + }, + "required": [ + "name", + "value" + ] } ], - "title": "DAGFileOutput", - "description": "DAG file output.", + "title": "JobArgument", + "description": "Job argument is an argument input for arguments which are not files or folders.", "discriminator": { "propertyName": "type" } }, - "DAGPathOutput": { + "JobPathArgument": { "allOf": [ { - "$ref": "#/components/schemas/GenericOutput" + "$ref": "#/components/schemas/_OpenAPIGenBaseModel" }, { "type": "object", - "required": [ - "from" - ], "properties": { - "from": { - "title": "From", - "description": "Reference to a file, folder or a task output. Task output must either be a file or a folder.", - "anyOf": [ - { - "$ref": "#/components/schemas/TaskReference" - }, - { - "$ref": "#/components/schemas/FileReference" - }, - { - "$ref": "#/components/schemas/FolderReference" - } - ] - }, - "alias": { - "title": "Alias", - "description": "A list of additional processes for loading this output on different platforms.", - "type": "array", - "items": { - "anyOf": [ - { - "$ref": "#/components/schemas/DAGGenericOutputAlias" - }, - { - "$ref": "#/components/schemas/DAGStringOutputAlias" - }, - { - "$ref": "#/components/schemas/DAGIntegerOutputAlias" - }, - { - "$ref": "#/components/schemas/DAGNumberOutputAlias" - }, - { - "$ref": "#/components/schemas/DAGBooleanOutputAlias" - }, - { - "$ref": "#/components/schemas/DAGFolderOutputAlias" - }, - { - "$ref": "#/components/schemas/DAGFileOutputAlias" - }, - { - "$ref": "#/components/schemas/DAGPathOutputAlias" - }, - { - "$ref": "#/components/schemas/DAGArrayOutputAlias" - }, - { - "$ref": "#/components/schemas/DAGJSONObjectOutputAlias" - }, - { - "$ref": "#/components/schemas/DAGLinkedOutputAlias" - } - ] - } + "name": { + "title": "Name", + "description": "Argument name. The name must match one of the input names from Job's template which can be a function or DAG.", + "type": "string" }, - "required": { - "title": "Required", - "description": "A boolean to indicate if an artifact output is required. A False value makes the artifact optional.", - "default": true, - "type": "boolean" + "source": { + "title": "Source", + "description": "The path to source the file from.", + "anyOf": [ + { + "$ref": "#/components/schemas/HTTP" + }, + { + "$ref": "#/components/schemas/S3" + }, + { + "$ref": "#/components/schemas/ProjectFolder" + } + ] }, "type": { "title": "Type", - "default": "DAGPathOutput", - "pattern": "^DAGPathOutput$", + "default": "JobPathArgument", + "pattern": "^JobPathArgument$", "type": "string", "readOnly": true + }, + "annotations": { + "title": "Annotations", + "description": "An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.", + "type": "object", + "additionalProperties": { + "type": "string" + } } - } + }, + "required": [ + "name", + "source" + ] } ], - "title": "DAGPathOutput", - "description": "DAG path output.", + "title": "JobPathArgument", + "description": "BaseModel with functionality to return the object as a yaml string.", "discriminator": { "propertyName": "type" } }, - "RecipeInterface": { + "Job": { "allOf": [ { "$ref": "#/components/schemas/_OpenAPIGenBaseModel" @@ -14051,19 +18909,15 @@ { "type": "object", "properties": { - "metadata": { - "title": "Metadata", - "description": "Recipe metadata information.", - "allOf": [ - { - "$ref": "#/components/schemas/MetaData" - } - ] + "source": { + "title": "Source", + "description": "The source url for downloading the recipe.", + "type": "string" }, "type": { "title": "Type", - "default": "RecipeInterface", - "pattern": "^RecipeInterface$", + "default": "Job", + "pattern": "^Job$", "type": "string", "readOnly": true }, @@ -14082,131 +18936,132 @@ "pattern": "^v1beta1$", "type": "string" }, - "source": { - "title": "Source", - "description": "A URL to the source this recipe from a registry.", - "type": "string" - }, - "inputs": { - "title": "Inputs", - "description": "A list of recipe inputs.", + "arguments": { + "title": "Arguments", + "description": "Input arguments for this job.", "type": "array", "items": { - "anyOf": [ - { - "$ref": "#/components/schemas/DAGGenericInput" - }, - { - "$ref": "#/components/schemas/DAGStringInput" - }, - { - "$ref": "#/components/schemas/DAGIntegerInput" - }, - { - "$ref": "#/components/schemas/DAGNumberInput" - }, - { - "$ref": "#/components/schemas/DAGBooleanInput" - }, - { - "$ref": "#/components/schemas/DAGFolderInput" - }, - { - "$ref": "#/components/schemas/DAGFileInput" - }, - { - "$ref": "#/components/schemas/DAGPathInput" - }, - { - "$ref": "#/components/schemas/DAGArrayInput" - }, - { - "$ref": "#/components/schemas/DAGJSONObjectInput" - } - ] + "type": "array", + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/JobArgument" + }, + { + "$ref": "#/components/schemas/JobPathArgument" + } + ] + } } }, - "outputs": { - "title": "Outputs", - "description": "A list of recipe outputs.", - "type": "array", - "items": { - "anyOf": [ - { - "$ref": "#/components/schemas/DAGGenericOutput" - }, - { - "$ref": "#/components/schemas/DAGStringOutput" - }, - { - "$ref": "#/components/schemas/DAGIntegerOutput" - }, - { - "$ref": "#/components/schemas/DAGNumberOutput" - }, - { - "$ref": "#/components/schemas/DAGBooleanOutput" - }, - { - "$ref": "#/components/schemas/DAGFolderOutput" - }, - { - "$ref": "#/components/schemas/DAGFileOutput" - }, - { - "$ref": "#/components/schemas/DAGPathOutput" - }, - { - "$ref": "#/components/schemas/DAGArrayOutput" - }, - { - "$ref": "#/components/schemas/DAGJSONObjectOutput" - } - ] + "name": { + "title": "Name", + "description": "An optional name for this job. This name will be used a the display name for the run.", + "type": "string" + }, + "description": { + "title": "Description", + "description": "Run description.", + "type": "string" + }, + "labels": { + "title": "Labels", + "description": "Optional user data as a dictionary. User data is for user reference only and will not be used in the execution of the job.", + "type": "object", + "additionalProperties": { + "type": "string" } } }, "required": [ - "metadata" + "source" ] } ], - "title": "RecipeInterface", - "description": "An interface object for creating a Recipe.\n\nRecipe information only includes metadata, source, inputs and outputs of a Recipe.\nThis object is useful for creating user interface for Recipes.", + "title": "Job", + "description": "Queenbee Job.\n\nA Job is an object to submit a list of arguments to execute a Queenbee recipe.", "discriminator": { "propertyName": "type" } }, - "RecipePackage": { + "CloudJob": { "allOf": [ { - "$ref": "#/components/schemas/RepositoryPackage" + "$ref": "#/components/schemas/_OpenAPIGenBaseModel" }, { "type": "object", - "required": [ - "manifest" - ], "properties": { - "manifest": { - "$ref": "#/components/schemas/RecipeInterface" + "id": { + "title": "Id", + "description": "The unique ID for this run", + "type": "string" + }, + "spec": { + "title": "Spec", + "description": "The job specification", + "allOf": [ + { + "$ref": "#/components/schemas/Job" + } + ] + }, + "author": { + "title": "Author", + "description": "author", + "allOf": [ + { + "$ref": "#/components/schemas/AccountPublic" + } + ] + }, + "owner": { + "title": "Owner", + "description": "owner", + "allOf": [ + { + "$ref": "#/components/schemas/AccountPublic" + } + ] + }, + "recipe": { + "title": "Recipe", + "description": "The recipe used to generate this ", + "allOf": [ + { + "$ref": "#/components/schemas/RecipeInterface" + } + ] + }, + "status": { + "title": "Status", + "description": "The status of the job", + "allOf": [ + { + "$ref": "#/components/schemas/JobStatus" + } + ] }, "type": { "title": "Type", - "default": "RecipePackage", + "default": "CloudJob", "type": "string", - "pattern": "^RecipePackage$", + "pattern": "^CloudJob$", "readOnly": true } - } + }, + "required": [ + "id", + "spec" + ] } ], - "title": "RecipePackage", + "title": "CloudJob", "discriminator": { "propertyName": "type" } }, - "RecipePackageList": { + "CloudJobList": { "allOf": [ { "$ref": "#/components/schemas/_OpenAPIGenBaseModel" @@ -14249,7 +19104,7 @@ "title": "Resources", "type": "array", "items": { - "$ref": "#/components/schemas/RecipePackage" + "$ref": "#/components/schemas/CloudJob" } }, "next_page": { @@ -14260,113 +19115,125 @@ }, "type": { "title": "Type", - "default": "RecipePackageList", + "default": "CloudJobList", "type": "string", - "pattern": "^RecipePackageList$", + "pattern": "^CloudJobList$", "readOnly": true } } } ], - "title": "RecipePackageList", + "title": "CloudJobList", "description": "A list response from a pagination request", "discriminator": { "propertyName": "type" } }, - "RepositoryUserPermissions": { + "RepositoryPolicySubject": { "allOf": [ { - "$ref": "#/components/schemas/UserPermission" + "$ref": "#/components/schemas/PolicySubject" }, { "type": "object", "properties": { "type": { "title": "Type", - "default": "RepositoryUserPermissions", + "default": "RepositoryPolicySubject", "type": "string", - "pattern": "^RepositoryUserPermissions$", + "pattern": "^RepositoryPolicySubject$", "readOnly": true } } } ], - "title": "RepositoryUserPermissions", + "title": "RepositoryPolicySubject", "discriminator": { "propertyName": "type" } }, - "Repository": { + "OrganizationRoleEnum": { + "title": "OrganizationRoleEnum", + "description": "An enumeration.", + "enum": [ + "owner", + "member" + ], + "type": "string" + }, + "Organization": { "allOf": [ { - "$ref": "#/components/schemas/RepositoryCreate" + "$ref": "#/components/schemas/OrganizationUpdate" }, { "type": "object", "required": [ "id", - "latest_tag", "owner" ], "properties": { "id": { "title": "Id", - "description": "The recipe unique ID", - "example": "5d5e7103-2c1e-413f-9332-f8ec4a9aace7", - "type": "string" - }, - "latest_tag": { - "title": "Latest Tag", - "description": "The latest package version to be indexed", - "example": "0.2.1", + "description": "The org ID", + "example": "1eb8e60d-771d-4a30-8078-fe553eb2f0bc", "type": "string" }, "owner": { "title": "Owner", - "description": "The owner of the repository", + "description": "The account the organization represents", + "example": { + "id": "e4d0d922-2031-4b39-94d2-aa6d584d6bb2", + "type": "org", + "name": "ladybug-tools" + }, "allOf": [ { "$ref": "#/components/schemas/AccountPublic" } ] }, - "permissions": { - "title": "Permissions", - "description": "The permissions the user making the API call has on the resource", - "default": { - "admin": false, - "write": false, - "read": false - }, + "role": { + "description": "The role the user has within the organization", + "example": "member", "allOf": [ { - "$ref": "#/components/schemas/RepositoryUserPermissions" + "$ref": "#/components/schemas/OrganizationRoleEnum" } ] }, - "slug": { - "title": "Slug", - "description": "The repository slug", - "example": "ladybug-tools/daylight-factor", - "type": "string" + "member_count": { + "title": "Member Count", + "description": "The number of members that are part of this org", + "default": 0, + "example": 10, + "type": "integer", + "format": "int32" + }, + "team_count": { + "title": "Team Count", + "description": "The number of teams that are part of this org", + "default": 0, + "example": 3, + "type": "integer", + "format": "int32" }, "type": { "title": "Type", - "default": "Repository", + "default": "Organization", "type": "string", - "pattern": "^Repository$", + "pattern": "^Organization$", "readOnly": true } } } ], - "title": "Repository", + "title": "Organization", "discriminator": { "propertyName": "type" } }, - "RepositoryList": { + "OrganizationList": { "allOf": [ { "$ref": "#/components/schemas/_OpenAPIGenBaseModel" @@ -14409,7 +19276,7 @@ "title": "Resources", "type": "array", "items": { - "$ref": "#/components/schemas/Repository" + "$ref": "#/components/schemas/Organization" } }, "next_page": { @@ -14420,45 +19287,62 @@ }, "type": { "title": "Type", - "default": "RepositoryList", + "default": "OrganizationList", "type": "string", - "pattern": "^RepositoryList$", + "pattern": "^OrganizationList$", "readOnly": true } } } ], - "title": "RepositoryList", + "title": "OrganizationList", "description": "A list response from a pagination request", "discriminator": { "propertyName": "type" } }, - "ValueFolderReference": { + "Accessor": { "allOf": [ { - "$ref": "#/components/schemas/ValueFileReference" + "$ref": "#/components/schemas/_OpenAPIGenBaseModel" }, { "type": "object", "properties": { + "subject": { + "title": "Subject", + "anyOf": [ + { + "$ref": "#/components/schemas/AccountPublic" + }, + { + "$ref": "#/components/schemas/Team" + } + ] + }, + "permission": { + "$ref": "#/components/schemas/Permission" + }, "type": { "title": "Type", - "default": "ValueFolderReference", - "pattern": "^ValueFolderReference$", + "default": "Accessor", "type": "string", + "pattern": "^Accessor$", "readOnly": true } - } + }, + "required": [ + "subject", + "permission" + ] } ], - "title": "ValueFolderReference", - "description": "A reference to a fixed folder.", + "title": "Accessor", "discriminator": { "propertyName": "type" } }, - "RepositoryUpdate": { + "UserPermission": { "allOf": [ { "$ref": "#/components/schemas/_OpenAPIGenBaseModel" @@ -14466,51 +19350,43 @@ { "type": "object", "properties": { - "public": { - "title": "Public", - "description": "Whether or not a repository is publicly viewable", + "admin": { + "title": "Admin", + "description": "The user has admin permission to this resource", + "default": false, + "example": false, "type": "boolean" }, - "keywords": { - "title": "Keywords", - "description": "A list of keywords to index the repository by", - "example": [ - "daylight", - "radiance" - ], - "type": "array", - "items": { - "type": "string" - } - }, - "description": { - "title": "Description", - "description": "A description of the repository", - "example": "Run daylight simulations the easy way!", - "type": "string" + "write": { + "title": "Write", + "description": "The user has write permission on this resource", + "default": false, + "example": false, + "type": "boolean" }, - "icon": { - "title": "Icon", - "description": "An icon to represent this repository", - "example": "https://avatars1.githubusercontent.com/u/38131342", - "type": "string" + "read": { + "title": "Read", + "description": "The user has read permission on this resource", + "default": false, + "example": true, + "type": "boolean" }, "type": { "title": "Type", - "default": "RepositoryUpdate", + "default": "UserPermission", "type": "string", - "pattern": "^RepositoryUpdate$", + "pattern": "^UserPermission$", "readOnly": true } } } ], - "title": "RepositoryUpdate", + "title": "UserPermission", "discriminator": { "propertyName": "type" } }, - "UserPublic": { + "LicensePoolPublic": { "allOf": [ { "$ref": "#/components/schemas/_OpenAPIGenBaseModel" @@ -14518,230 +19394,154 @@ { "type": "object", "properties": { - "username": { - "title": "Username", - "description": "The lowercase account name for this user", - "example": "ladybugbot", + "id": { + "title": "Id", + "description": "The ID of the pool", + "type": "string", + "format": "uuid" + }, + "license_id": { + "title": "License Id", + "description": "The ID of the license to which the pool provides access", "type": "string" }, - "name": { - "title": "Name", - "description": "The display name for this user", - "example": "Ladybug Bot", + "owner": { + "title": "Owner", + "description": "The account that owns the license", + "allOf": [ + { + "$ref": "#/components/schemas/AccountPublic" + } + ] + }, + "permissions": { + "$ref": "#/components/schemas/UserPermission" + }, + "product": { + "title": "Product", + "description": "The pollination product to which this pool provides access", "type": "string" }, + "accessors": { + "title": "Accessors", + "description": "The entities that can access the license though the pool", + "default": [], + "type": "array", + "items": { + "$ref": "#/components/schemas/Accessor" + } + }, "description": { "title": "Description", - "description": "A short description of the user", - "example": "Beep Boop!", - "type": "string" - }, - "picture": { - "title": "Picture", - "description": "URL to the picture associated with this user", - "example": "https://avatars1.githubusercontent.com/u/38131342", + "description": "The description of the pool", "type": "string" }, "type": { "title": "Type", - "default": "UserPublic", + "default": "LicensePoolPublic", "type": "string", - "pattern": "^UserPublic$", + "pattern": "^LicensePoolPublic$", "readOnly": true } }, "required": [ - "username" + "id", + "license_id", + "owner", + "permissions", + "product" ] } ], - "title": "UserPublic", + "title": "LicensePoolPublic", "discriminator": { "propertyName": "type" } }, - "RoleEnum": { - "title": "RoleEnum", - "enum": [ - "owner", - "member" - ], - "type": "string", - "description": "An enumeration." - }, - "SortEnum": { - "title": "SortEnum", - "enum": [ - "ascending", - "descending" - ], - "type": "string", - "description": "An enumeration." - }, - "OrganizationRoleEnum": { - "title": "OrganizationRoleEnum", - "description": "An enumeration.", - "enum": [ - "owner", - "member" - ], - "type": "string" - }, - "OrganizationMember": { + "LicensePoolList": { "allOf": [ { "$ref": "#/components/schemas/_OpenAPIGenBaseModel" }, { - "type": "object", - "properties": { - "user": { - "title": "User", - "description": "The organization member", - "allOf": [ - { - "$ref": "#/components/schemas/UserPublic" - } - ] - }, - "role": { - "description": "The role the user has within the organization", - "example": "member", - "allOf": [ - { - "$ref": "#/components/schemas/OrganizationRoleEnum" - } - ] + "type": "object", + "properties": { + "resources": { + "title": "Resources", + "type": "array", + "items": { + "$ref": "#/components/schemas/LicensePoolPublic" + } }, "type": { "title": "Type", - "default": "OrganizationMember", + "default": "LicensePoolList", "type": "string", - "pattern": "^OrganizationMember$", + "pattern": "^LicensePoolList$", "readOnly": true } }, "required": [ - "user", - "role" + "resources" ] } ], - "title": "OrganizationMember", + "title": "LicensePoolList", "discriminator": { "propertyName": "type" } }, - "APIToken": { + "LicensePoolPolicySubject": { "allOf": [ { - "$ref": "#/components/schemas/_OpenAPIGenBaseModel" + "$ref": "#/components/schemas/PolicySubject" }, { "type": "object", "properties": { - "token_id": { - "title": "Token Id", - "description": "The unique ID of this API token", - "type": "string" - }, - "name": { - "title": "Name", - "description": "The user friendly name of the API token", - "type": "string" - }, - "claims": { - "title": "Claims", - "description": "Key value pairs of auth claims the API token is entitled to", - "default": {}, - "type": "object", - "additionalProperties": { - "type": "string" - } - }, "type": { "title": "Type", - "default": "APIToken", + "default": "LicensePoolPolicySubject", "type": "string", - "pattern": "^APIToken$", + "pattern": "^LicensePoolPolicySubject$", "readOnly": true } - }, - "required": [ - "token_id", - "name" - ] + } } ], - "title": "APIToken", + "title": "LicensePoolPolicySubject", "discriminator": { "propertyName": "type" } }, - "APITokenList": { + "LicensePoolPolicySubjectList": { "allOf": [ { "$ref": "#/components/schemas/_OpenAPIGenBaseModel" }, { "type": "object", - "required": [ - "page", - "per_page", - "page_count", - "total_count", - "resources" - ], "properties": { - "page": { - "title": "Page", - "description": "The current page the pagination request is on", - "type": "integer", - "format": "int32" - }, - "per_page": { - "title": "Per Page", - "description": "The number of pages per pagination request", - "type": "integer", - "format": "int32" - }, - "page_count": { - "title": "Page Count", - "description": "The total number of pages", - "type": "integer", - "format": "int32" - }, - "total_count": { - "title": "Total Count", - "description": "The total number of resources matching the list request", - "type": "integer", - "format": "int32" - }, "resources": { "title": "Resources", + "description": "The list of subjects which currently have access to the pool", + "default": [], "type": "array", "items": { - "$ref": "#/components/schemas/APIToken" + "$ref": "#/components/schemas/LicensePoolPolicySubject" } }, - "next_page": { - "title": "Next Page", - "description": "The next page, if this on is not the last", - "type": "integer", - "format": "int32" - }, "type": { "title": "Type", - "default": "APITokenList", + "default": "LicensePoolPolicySubjectList", "type": "string", - "pattern": "^APITokenList$", + "pattern": "^LicensePoolPolicySubjectList$", "readOnly": true } } } ], - "title": "APITokenList", - "description": "A list response from a pagination request", + "title": "LicensePoolPolicySubjectList", "discriminator": { "propertyName": "type" } @@ -14808,16 +19608,7 @@ "propertyName": "type" } }, - "DependencyKind": { - "title": "DependencyKind", - "description": "Dependency kind.", - "enum": [ - "recipe", - "plugin" - ], - "type": "string" - }, - "Dependency": { + "Recipe": { "allOf": [ { "$ref": "#/components/schemas/_OpenAPIGenBaseModel" @@ -14825,39 +19616,102 @@ { "type": "object", "properties": { - "kind": { - "description": "The kind of dependency. It can be a recipe or an plugin.", + "flow": { + "title": "Flow", + "description": "A list of tasks to create a DAG recipe.", + "type": "array", + "items": { + "$ref": "#/components/schemas/DAG" + } + }, + "type": { + "title": "Type", + "default": "Recipe", + "pattern": "^Recipe$", + "type": "string", + "readOnly": true + }, + "annotations": { + "title": "Annotations", + "description": "An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "api_version": { + "title": "Api Version", + "default": "v1beta1", + "readOnly": true, + "pattern": "^v1beta1$", + "type": "string" + }, + "metadata": { + "title": "Metadata", + "description": "Recipe metadata information.", "allOf": [ { - "$ref": "#/components/schemas/DependencyKind" + "$ref": "#/components/schemas/MetaData" } ] }, + "dependencies": { + "title": "Dependencies", + "description": "A list of plugins and other recipes this recipe depends on.", + "type": "array", + "items": { + "$ref": "#/components/schemas/Dependency" + } + } + }, + "required": [ + "flow" + ] + } + ], + "title": "Recipe", + "description": "A Queenbee Recipe", + "discriminator": { + "propertyName": "type" + } + }, + "PackageVersion": { + "allOf": [ + { + "$ref": "#/components/schemas/_OpenAPIGenBaseModel" + }, + { + "type": "object", + "required": [ + "name", + "tag", + "url", + "created", + "digest" + ], + "properties": { "name": { "title": "Name", - "description": "Workflow name. This name should be unique among all the resources in your resource. Use an alias if this is not the case.", + "description": "Package name. Make it descriptive and helpful ;)", "type": "string" }, "tag": { "title": "Tag", - "description": "Tag of the resource.", + "description": "The tag of the package", "type": "string" }, - "source": { - "title": "Source", - "description": "URL to a repository where this resource can be found.", - "examples": [ - "https://registry.pollination.cloud/ladybugbot", - "https://some-random-user.github.io/registry" - ], + "url": { + "title": "Url", "type": "string" }, - "type": { - "title": "Type", - "default": "Dependency", - "pattern": "^Dependency$", + "created": { + "title": "Created", "type": "string", - "readOnly": true + "format": "date-time" + }, + "digest": { + "title": "Digest", + "type": "string" }, "annotations": { "title": "Annotations", @@ -14867,403 +19721,508 @@ "type": "string" } }, - "hash": { - "title": "Hash", - "description": "The digest hash of the dependency when retrieved from its source. This is locked when the resource dependencies are downloaded.", + "app_version": { + "title": "App Version", + "description": "The version of the application code underlying the manifest", + "type": "string" + }, + "keywords": { + "title": "Keywords", + "description": "A list of keywords to search the package by", + "type": "array", + "items": { + "type": "string" + } + }, + "maintainers": { + "title": "Maintainers", + "description": "A list of maintainers for the package", + "type": "array", + "items": { + "$ref": "#/components/schemas/Maintainer" + } + }, + "home": { + "title": "Home", + "description": "The URL of this package's home page", + "type": "string" + }, + "sources": { + "title": "Sources", + "description": "A list of URLs to source code for this project", + "type": "array", + "items": { + "type": "string" + } + }, + "icon": { + "title": "Icon", + "description": "A URL to an SVG or PNG image to be used as an icon", + "type": "string" + }, + "deprecated": { + "title": "Deprecated", + "description": "Whether this package is deprecated", + "type": "boolean" + }, + "description": { + "title": "Description", + "description": "A description of what this package does", + "type": "string" + }, + "license": { + "title": "License", + "description": "The license information.", + "allOf": [ + { + "$ref": "#/components/schemas/License" + } + ] + }, + "slug": { + "title": "Slug", + "description": "A slug of the repository name and the package name.", "type": "string" }, - "alias": { - "title": "Alias", - "description": "An optional alias to refer to this dependency. Useful if the name is already used somewhere else.", + "kind": { + "title": "Kind", + "description": "The type of Queenbee package (ie: recipe or plugin)", + "default": "", "type": "string" - } - }, - "required": [ - "kind", - "name", - "tag", - "source" - ] - } - ], - "title": "Dependency", - "description": "Configuration to fetch a Recipe or Plugin that another Recipe depends on.", - "discriminator": { - "propertyName": "type" - } - }, - "ItemReference": { - "allOf": [ - { - "$ref": "#/components/schemas/_BaseReference" - }, - { - "type": "object", - "properties": { - "variable": { - "title": "Variable", - "description": "The name of the looped item variable (use dot notation for nested json values)", + }, + "readme": { + "title": "Readme", + "description": "The README file string for this package", "type": "string" }, + "manifest": { + "title": "Manifest", + "description": "The package Recipe or Plugin manifest", + "anyOf": [ + { + "$ref": "#/components/schemas/Recipe" + }, + { + "$ref": "#/components/schemas/Plugin" + } + ] + }, "type": { "title": "Type", - "default": "ItemReference", - "pattern": "^ItemReference$", + "default": "PackageVersion", + "pattern": "^PackageVersion$", "type": "string", "readOnly": true } } } ], - "title": "ItemReference", - "description": "An Item Reference.", + "title": "PackageVersion", + "description": "Package Version\n\nA MetaData object to distinguish a specific package version within a repository\nindex.", "discriminator": { "propertyName": "type" } }, - "ValueReference": { + "RepositoryIndex": { "allOf": [ { - "$ref": "#/components/schemas/_BaseReference" + "$ref": "#/components/schemas/_OpenAPIGenBaseModel" }, { "type": "object", - "required": [ - "value" - ], "properties": { - "value": { - "title": "Value", - "description": "A fixed value for this reference." - }, "type": { "title": "Type", - "default": "ValueReference", - "pattern": "^ValueReference$", + "default": "RepositoryIndex", + "pattern": "^RepositoryIndex$", "type": "string", "readOnly": true + }, + "annotations": { + "title": "Annotations", + "description": "An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "api_version": { + "title": "Api Version", + "default": "v1beta1", + "readOnly": true, + "pattern": "^v1beta1$", + "type": "string" + }, + "generated": { + "title": "Generated", + "description": "The timestamp at which the index was generated", + "type": "string", + "format": "date-time" + }, + "metadata": { + "title": "Metadata", + "description": "Extra information about the repository", + "default": { + "type": "RepositoryMetadata", + "annotations": {}, + "name": null, + "description": "A Queenbee package repository", + "source": null, + "plugin_count": 0, + "recipe_count": 0 + }, + "allOf": [ + { + "$ref": "#/components/schemas/RepositoryMetadata" + } + ] + }, + "plugin": { + "title": "Plugin", + "description": "A dict of plugins accessible by name. Each name key points to a list of plugin versions", + "default": {}, + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PackageVersion" + } + } + }, + "recipe": { + "title": "Recipe", + "description": "A dict of recipes accessible by name. Each name key points to a list of recipesversions", + "default": {}, + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PackageVersion" + } + } } } } ], - "title": "ValueReference", - "description": "A reference to a fixed value.", + "title": "RepositoryIndex", + "description": "A searchable index for a Queenbee Plugin and Recipe repository", "discriminator": { "propertyName": "type" } }, - "TaskArgument": { + "RunResultList": { "allOf": [ { "$ref": "#/components/schemas/_OpenAPIGenBaseModel" }, { "type": "object", + "required": [ + "page", + "per_page", + "page_count", + "total_count", + "resources" + ], "properties": { - "name": { - "title": "Name", - "description": "Argument name. The name must match one of the input names from Task's template which can be a function or DAG.", - "type": "string" + "page": { + "title": "Page", + "description": "The current page the pagination request is on", + "type": "integer", + "format": "int32" }, - "from": { - "title": "From", - "description": "A reference to a DAG input, a DAG output or another task output. You can also use the ValueReference type to hard-code an input value.", - "anyOf": [ - { - "$ref": "#/components/schemas/InputReference" - }, - { - "$ref": "#/components/schemas/TaskReference" - }, - { - "$ref": "#/components/schemas/ItemReference" - }, - { - "$ref": "#/components/schemas/ValueReference" + "per_page": { + "title": "Per Page", + "description": "The number of pages per pagination request", + "type": "integer", + "format": "int32" + }, + "page_count": { + "title": "Page Count", + "description": "The total number of pages", + "type": "integer", + "format": "int32" + }, + "total_count": { + "title": "Total Count", + "description": "The total number of resources matching the list request", + "type": "integer", + "format": "int32" + }, + "resources": { + "title": "Resources", + "type": "array", + "items": { + "type": "array", + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/StepStringInput" + }, + { + "$ref": "#/components/schemas/StepIntegerInput" + }, + { + "$ref": "#/components/schemas/StepNumberInput" + }, + { + "$ref": "#/components/schemas/StepBooleanInput" + }, + { + "$ref": "#/components/schemas/StepFolderInput" + }, + { + "$ref": "#/components/schemas/StepFileInput" + }, + { + "$ref": "#/components/schemas/StepPathInput" + }, + { + "$ref": "#/components/schemas/StepArrayInput" + }, + { + "$ref": "#/components/schemas/StepJSONObjectInput" + }, + { + "$ref": "#/components/schemas/StepStringOutput" + }, + { + "$ref": "#/components/schemas/StepIntegerOutput" + }, + { + "$ref": "#/components/schemas/StepNumberOutput" + }, + { + "$ref": "#/components/schemas/StepBooleanOutput" + }, + { + "$ref": "#/components/schemas/StepFolderOutput" + }, + { + "$ref": "#/components/schemas/StepFileOutput" + }, + { + "$ref": "#/components/schemas/StepPathOutput" + }, + { + "$ref": "#/components/schemas/StepArrayOutput" + }, + { + "$ref": "#/components/schemas/StepJSONObjectOutput" + } + ] } - ] + } }, - "type": { - "title": "Type", - "default": "TaskArgument", - "pattern": "^TaskArgument$", - "type": "string", - "readOnly": true + "next_page": { + "title": "Next Page", + "description": "The next page, if this on is not the last", + "type": "integer", + "format": "int32" }, - "annotations": { - "title": "Annotations", - "description": "An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.", - "type": "object", - "additionalProperties": { - "type": "string" - } - } - }, - "required": [ - "name", - "from" - ] - } - ], - "title": "TaskArgument", - "description": "Task argument for receiving inputs that are not files or folders.", - "discriminator": { - "propertyName": "type" - } - }, - "InputFileReference": { - "allOf": [ - { - "$ref": "#/components/schemas/_InputReferenceBase" - }, - { - "type": "object", - "properties": { - "type": { - "title": "Type", - "default": "InputFileReference", - "pattern": "^InputFileReference$", - "type": "string", - "readOnly": true - } - } - } - ], - "title": "InputFileReference", - "description": "An input file reference", - "discriminator": { - "propertyName": "type" - } - }, - "InputFolderReference": { - "allOf": [ - { - "$ref": "#/components/schemas/_InputReferenceBase" - }, - { - "type": "object", - "properties": { "type": { "title": "Type", - "default": "InputFolderReference", - "pattern": "^InputFolderReference$", + "default": "RunResultList", "type": "string", + "pattern": "^RunResultList$", "readOnly": true } } } ], - "title": "InputFolderReference", - "description": "An input folder reference", + "title": "RunResultList", + "description": "A list response from a pagination request", "discriminator": { "propertyName": "type" } }, - "InputPathReference": { + "TeamMemberList": { "allOf": [ { - "$ref": "#/components/schemas/_InputReferenceBase" + "$ref": "#/components/schemas/_OpenAPIGenBaseModel" }, { "type": "object", + "required": [ + "page", + "per_page", + "page_count", + "total_count", + "resources" + ], "properties": { + "page": { + "title": "Page", + "description": "The current page the pagination request is on", + "type": "integer", + "format": "int32" + }, + "per_page": { + "title": "Per Page", + "description": "The number of pages per pagination request", + "type": "integer", + "format": "int32" + }, + "page_count": { + "title": "Page Count", + "description": "The total number of pages", + "type": "integer", + "format": "int32" + }, + "total_count": { + "title": "Total Count", + "description": "The total number of resources matching the list request", + "type": "integer", + "format": "int32" + }, + "resources": { + "title": "Resources", + "type": "array", + "items": { + "$ref": "#/components/schemas/TeamMember" + } + }, + "next_page": { + "title": "Next Page", + "description": "The next page, if this on is not the last", + "type": "integer", + "format": "int32" + }, "type": { "title": "Type", - "default": "InputPathReference", - "pattern": "^InputPathReference$", + "default": "TeamMemberList", "type": "string", + "pattern": "^TeamMemberList$", "readOnly": true } } } ], - "title": "InputPathReference", - "description": "An input file or folder reference", + "title": "TeamMemberList", + "description": "A list response from a pagination request", "discriminator": { "propertyName": "type" } }, - "TaskPathReference": { + "DeleteSubscriptionItem": { "allOf": [ { - "$ref": "#/components/schemas/_TaskReferenceBase" + "$ref": "#/components/schemas/SubscriptionItem" }, { "type": "object", "properties": { + "deleted": { + "title": "Deleted", + "default": true, + "type": "boolean" + }, "type": { "title": "Type", - "default": "TaskPathReference", - "pattern": "^TaskPathReference$", + "default": "DeleteSubscriptionItem", "type": "string", + "pattern": "^DeleteSubscriptionItem$", "readOnly": true } } } ], - "title": "TaskPathReference", - "description": "A reference to a file or folder that is generated in a task.", + "title": "DeleteSubscriptionItem", "discriminator": { "propertyName": "type" } }, - "ValueFileReference": { + "Activation": { "allOf": [ { - "$ref": "#/components/schemas/_BaseReference" + "$ref": "#/components/schemas/CryptlexBase" }, { "type": "object", "required": [ - "path" + "id", + "created_at", + "updated_at", + "offline", + "last_synced_at", + "location" ], "properties": { - "path": { - "title": "Path", - "description": "A fixed value for this reference.", + "id": { + "title": "Id", "type": "string" }, - "type": { - "title": "Type", - "default": "ValueFileReference", - "pattern": "^ValueFileReference$", + "created_at": { + "title": "Created At", "type": "string", - "readOnly": true - } - } - } - ], - "title": "ValueFileReference", - "description": "A reference to a fixed file.", - "discriminator": { - "propertyName": "type" - } - }, - "TaskPathArgument": { - "allOf": [ - { - "$ref": "#/components/schemas/_OpenAPIGenBaseModel" - }, - { - "type": "object", - "properties": { - "name": { - "title": "Name", - "description": "Argument name. The name must match one of the input names from Task's template which can be a function or DAG.", - "type": "string" + "format": "date-time" }, - "from": { - "title": "From", - "description": "A reference to a DAG input, a DAG output or another task output. You can also use the ValueReference type to hard-code an input value.", - "anyOf": [ - { - "$ref": "#/components/schemas/InputFileReference" - }, - { - "$ref": "#/components/schemas/InputFolderReference" - }, - { - "$ref": "#/components/schemas/InputPathReference" - }, - { - "$ref": "#/components/schemas/TaskFileReference" - }, - { - "$ref": "#/components/schemas/TaskFolderReference" - }, - { - "$ref": "#/components/schemas/TaskPathReference" - }, - { - "$ref": "#/components/schemas/ValueFileReference" - }, - { - "$ref": "#/components/schemas/ValueFolderReference" - } - ] + "updated_at": { + "title": "Updated At", + "type": "string", + "format": "date-time" }, - "type": { - "title": "Type", - "default": "TaskPathArgument", - "pattern": "^TaskPathArgument$", + "offline": { + "title": "Offline", + "type": "boolean" + }, + "last_synced_at": { + "title": "Last Synced At", "type": "string", - "readOnly": true + "format": "date-time" }, - "annotations": { - "title": "Annotations", - "description": "An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.", - "type": "object", - "additionalProperties": { - "type": "string" - } + "location": { + "$ref": "#/components/schemas/Location" }, - "sub_path": { - "title": "Sub Path", - "description": "A sub_path inside the path that is provided in the ``from`` field. Use sub_path to only access part of the Path that is needed instead of copying all the files and folders inside the path.", + "os": { + "title": "Os", "type": "string" - } - }, - "required": [ - "name", - "from" - ] - } - ], - "title": "TaskPathArgument", - "description": "BaseModel with functionality to return the object as a yaml string.", - "discriminator": { - "propertyName": "type" - } - }, - "TaskReturn": { - "allOf": [ - { - "$ref": "#/components/schemas/GenericOutput" - }, - { - "type": "object", - "properties": { - "type": { - "title": "Type", - "default": "TaskReturn", - "pattern": "^TaskReturn$", + }, + "os_version": { + "title": "Os Version", + "type": "string" + }, + "hostname": { + "title": "Hostname", + "type": "string" + }, + "app_version": { + "title": "App Version", + "type": "string" + }, + "lease_expires_at": { + "title": "Lease Expires At", "type": "string", - "readOnly": true - } - } - } - ], - "title": "TaskReturn", - "description": "A Task return output that exposes the values from a function or a DAG.", - "discriminator": { - "propertyName": "type" - } - }, - "TaskPathReturn": { - "allOf": [ - { - "$ref": "#/components/schemas/PathOutput" - }, - { - "type": "object", - "properties": { + "format": "date-time" + }, + "metadata": { + "title": "Metadata", + "default": [], + "type": "array", + "items": { + "$ref": "#/components/schemas/Metadata" + } + }, + "license_id": { + "title": "License Id", + "type": "string" + }, "type": { "title": "Type", - "default": "TaskPathReturn", - "pattern": "^TaskPathReturn$", + "default": "Activation", "type": "string", + "pattern": "^Activation$", "readOnly": true } } } ], - "title": "TaskPathReturn", - "description": "A Task output that returns a file or a folder output from a function or a DAG.", + "title": "Activation", "discriminator": { "propertyName": "type" } }, - "DAGTask": { + "Body_post_recipe__owner__recipes_post": { "allOf": [ { "$ref": "#/components/schemas/_OpenAPIGenBaseModel" @@ -15271,97 +20230,30 @@ { "type": "object", "properties": { - "name": { - "title": "Name", - "description": "Name for this task. It must be unique in a DAG.", - "type": "string" - }, - "template": { - "title": "Template", - "description": "Template name. A template is a Function or a DAG. This template must be available in the dependencies.", - "type": "string" + "package": { + "title": "Recipe Package", + "type": "string", + "format": "binary" }, "type": { "title": "Type", - "default": "DAGTask", - "pattern": "^DAGTask$", + "default": "Body_post_recipe__owner__recipes_post", "type": "string", + "pattern": "^Body_post_recipe__owner__recipes_post$", "readOnly": true - }, - "annotations": { - "title": "Annotations", - "description": "An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.", - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "needs": { - "title": "Needs", - "description": "List of DAG tasks that this task depends on and needs to be executed before this task.", - "type": "array", - "items": { - "type": "string" - } - }, - "arguments": { - "title": "Arguments", - "description": "The input arguments for this task.", - "type": "array", - "items": { - "anyOf": [ - { - "$ref": "#/components/schemas/TaskArgument" - }, - { - "$ref": "#/components/schemas/TaskPathArgument" - } - ] - } - }, - "loop": { - "title": "Loop", - "description": "Loop configuration for this task.", - "allOf": [ - { - "$ref": "#/components/schemas/DAGTaskLoop" - } - ] - }, - "sub_folder": { - "title": "Sub Folder", - "description": "A path relative to the current folder context where artifacts should be saved. This is useful when performing a loop or invoking another workflow and wanting to save results in a specific sub_folder.", - "type": "string" - }, - "returns": { - "title": "Returns", - "description": "List of task returns.", - "type": "array", - "items": { - "anyOf": [ - { - "$ref": "#/components/schemas/TaskReturn" - }, - { - "$ref": "#/components/schemas/TaskPathReturn" - } - ] - } } }, "required": [ - "name", - "template" + "package" ] } ], - "title": "DAGTask", - "description": "A single task in a DAG flow.", + "title": "Body_post_recipe__owner__recipes_post", "discriminator": { "propertyName": "type" } }, - "DAG": { + "QuotaList": { "allOf": [ { "$ref": "#/components/schemas/_OpenAPIGenBaseModel" @@ -15369,132 +20261,67 @@ { "type": "object", "required": [ - "name", - "tasks" + "page", + "per_page", + "page_count", + "total_count", + "resources" ], "properties": { - "name": { - "title": "Name", - "description": "A unique name for this dag.", - "type": "string" + "page": { + "title": "Page", + "description": "The current page the pagination request is on", + "type": "integer", + "format": "int32" }, - "tasks": { - "title": "Tasks", - "description": "Tasks are a list of DAG steps", - "type": "array", - "items": { - "$ref": "#/components/schemas/DAGTask" - } + "per_page": { + "title": "Per Page", + "description": "The number of pages per pagination request", + "type": "integer", + "format": "int32" }, - "annotations": { - "title": "Annotations", - "description": "An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.", - "type": "object", - "additionalProperties": { - "type": "string" - } + "page_count": { + "title": "Page Count", + "description": "The total number of pages", + "type": "integer", + "format": "int32" }, - "inputs": { - "title": "Inputs", - "description": "Inputs for the DAG.", - "type": "array", - "items": { - "anyOf": [ - { - "$ref": "#/components/schemas/DAGGenericInput" - }, - { - "$ref": "#/components/schemas/DAGStringInput" - }, - { - "$ref": "#/components/schemas/DAGIntegerInput" - }, - { - "$ref": "#/components/schemas/DAGNumberInput" - }, - { - "$ref": "#/components/schemas/DAGBooleanInput" - }, - { - "$ref": "#/components/schemas/DAGFolderInput" - }, - { - "$ref": "#/components/schemas/DAGFileInput" - }, - { - "$ref": "#/components/schemas/DAGPathInput" - }, - { - "$ref": "#/components/schemas/DAGArrayInput" - }, - { - "$ref": "#/components/schemas/DAGJSONObjectInput" - } - ] - } + "total_count": { + "title": "Total Count", + "description": "The total number of resources matching the list request", + "type": "integer", + "format": "int32" }, - "outputs": { - "title": "Outputs", - "description": "Outputs of the DAG that can be used by other DAGs.", + "resources": { + "title": "Resources", "type": "array", "items": { - "anyOf": [ - { - "$ref": "#/components/schemas/DAGGenericOutput" - }, - { - "$ref": "#/components/schemas/DAGStringOutput" - }, - { - "$ref": "#/components/schemas/DAGIntegerOutput" - }, - { - "$ref": "#/components/schemas/DAGNumberOutput" - }, - { - "$ref": "#/components/schemas/DAGBooleanOutput" - }, - { - "$ref": "#/components/schemas/DAGFolderOutput" - }, - { - "$ref": "#/components/schemas/DAGFileOutput" - }, - { - "$ref": "#/components/schemas/DAGPathOutput" - }, - { - "$ref": "#/components/schemas/DAGArrayOutput" - }, - { - "$ref": "#/components/schemas/DAGJSONObjectOutput" - } - ] + "$ref": "#/components/schemas/Quota" } }, - "fail_fast": { - "title": "Fail Fast", - "description": "Stop scheduling new steps, as soon as it detects that one of the DAG nodes is failed. Default is True.", - "default": true, - "type": "boolean" + "next_page": { + "title": "Next Page", + "description": "The next page, if this on is not the last", + "type": "integer", + "format": "int32" }, "type": { "title": "Type", - "default": "DAG", - "pattern": "^DAG$", + "default": "QuotaList", "type": "string", + "pattern": "^QuotaList$", "readOnly": true } } } ], - "title": "DAG", - "description": "A Directed Acyclic Graph containing a list of tasks.", + "title": "QuotaList", + "description": "A list response from a pagination request", "discriminator": { "propertyName": "type" } }, - "Recipe": { + "Subscribe": { "allOf": [ { "$ref": "#/components/schemas/_OpenAPIGenBaseModel" @@ -15502,214 +20329,66 @@ { "type": "object", "properties": { - "flow": { - "title": "Flow", - "description": "A list of tasks to create a DAG recipe.", - "type": "array", - "items": { - "$ref": "#/components/schemas/DAG" - } - }, - "type": { - "title": "Type", - "default": "Recipe", - "pattern": "^Recipe$", - "type": "string", - "readOnly": true - }, - "annotations": { - "title": "Annotations", - "description": "An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.", - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "api_version": { - "title": "Api Version", - "default": "v1beta1", - "readOnly": true, - "pattern": "^v1beta1$", - "type": "string" - }, - "metadata": { - "title": "Metadata", - "description": "Recipe metadata information.", + "plan": { + "title": "Plan", + "description": "The initial plan with which to create the subscription", "allOf": [ { - "$ref": "#/components/schemas/MetaData" + "$ref": "#/components/schemas/Price" } ] }, - "dependencies": { - "title": "Dependencies", - "description": "A list of plugins and other recipes this recipe depends on.", - "type": "array", - "items": { - "$ref": "#/components/schemas/Dependency" - } + "type": { + "title": "Type", + "default": "Subscribe", + "type": "string", + "pattern": "^Subscribe$", + "readOnly": true } }, "required": [ - "flow" + "plan" ] } ], - "title": "Recipe", - "description": "A Queenbee Recipe", + "title": "Subscribe", "discriminator": { "propertyName": "type" } }, - "PackageVersion": { + "UserCreate": { "allOf": [ { - "$ref": "#/components/schemas/_OpenAPIGenBaseModel" + "$ref": "#/components/schemas/UserUpdate" }, { "type": "object", "required": [ - "name", - "tag", - "url", - "created", - "digest" + "username" ], "properties": { - "name": { - "title": "Name", - "description": "Package name. Make it descriptive and helpful ;)", - "type": "string" - }, - "tag": { - "title": "Tag", - "description": "The tag of the package", - "type": "string" - }, - "url": { - "title": "Url", - "type": "string" - }, - "created": { - "title": "Created", - "type": "string", - "format": "date-time" - }, - "digest": { - "title": "Digest", - "type": "string" - }, - "annotations": { - "title": "Annotations", - "description": "An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.", - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "app_version": { - "title": "App Version", - "description": "The version of the application code underlying the manifest", - "type": "string" - }, - "keywords": { - "title": "Keywords", - "description": "A list of keywords to search the package by", - "type": "array", - "items": { - "type": "string" - } - }, - "maintainers": { - "title": "Maintainers", - "description": "A list of maintainers for the package", - "type": "array", - "items": { - "$ref": "#/components/schemas/Maintainer" - } - }, - "home": { - "title": "Home", - "description": "The URL of this package's home page", - "type": "string" - }, - "sources": { - "title": "Sources", - "description": "A list of URLs to source code for this project", - "type": "array", - "items": { - "type": "string" - } - }, - "icon": { - "title": "Icon", - "description": "A URL to an SVG or PNG image to be used as an icon", - "type": "string" - }, - "deprecated": { - "title": "Deprecated", - "description": "Whether this package is deprecated", - "type": "boolean" - }, - "description": { - "title": "Description", - "description": "A description of what this package does", - "type": "string" - }, - "license": { - "title": "License", - "description": "The license information.", - "allOf": [ - { - "$ref": "#/components/schemas/License" - } - ] - }, - "slug": { - "title": "Slug", - "description": "A slug of the repository name and the package name.", - "type": "string" - }, - "kind": { - "title": "Kind", - "description": "The type of Queenbee package (ie: recipe or plugin)", - "default": "", - "type": "string" - }, - "readme": { - "title": "Readme", - "description": "The README file string for this package", + "username": { + "title": "Username", + "description": "The unique name of the user in small case without spaces", + "example": "ladybugbot", "type": "string" }, - "manifest": { - "title": "Manifest", - "description": "The package Recipe or Plugin manifest", - "anyOf": [ - { - "$ref": "#/components/schemas/Recipe" - }, - { - "$ref": "#/components/schemas/Plugin" - } - ] - }, "type": { "title": "Type", - "default": "PackageVersion", - "pattern": "^PackageVersion$", + "default": "UserCreate", "type": "string", + "pattern": "^UserCreate$", "readOnly": true } } } ], - "title": "PackageVersion", - "description": "Package Version\n\nA MetaData object to distinguish a specific package version within a repository\nindex.", + "title": "UserCreate", "discriminator": { "propertyName": "type" } }, - "RepositoryIndex": { + "CreatedContent": { "allOf": [ { "$ref": "#/components/schemas/_OpenAPIGenBaseModel" @@ -15717,100 +20396,103 @@ { "type": "object", "properties": { - "type": { - "title": "Type", - "default": "RepositoryIndex", - "pattern": "^RepositoryIndex$", + "id": { + "title": "Id", + "description": "Id for the newly created resource.", + "example": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "type": "string", - "readOnly": true - }, - "annotations": { - "title": "Annotations", - "description": "An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.", - "type": "object", - "additionalProperties": { - "type": "string" - } + "format": "uuid" }, - "api_version": { - "title": "Api Version", - "default": "v1beta1", - "readOnly": true, - "pattern": "^v1beta1$", + "message": { + "title": "Message", + "description": " A human readable message", + "example": "Use Location in headers to access the new object.", "type": "string" }, - "generated": { - "title": "Generated", - "description": "The timestamp at which the index was generated", + "type": { + "title": "Type", + "default": "CreatedContent", "type": "string", - "format": "date-time" - }, - "metadata": { - "title": "Metadata", - "description": "Extra information about the repository", - "default": { - "type": "RepositoryMetadata", - "annotations": {}, - "name": null, - "description": "A Queenbee package repository", - "source": null, - "plugin_count": 0, - "recipe_count": 0 - }, + "pattern": "^CreatedContent$", + "readOnly": true + } + }, + "required": [ + "id" + ] + } + ], + "title": "CreatedContent", + "description": "Content for created response.", + "discriminator": { + "propertyName": "type" + } + }, + "SubscriptionUpdate": { + "allOf": [ + { + "$ref": "#/components/schemas/_OpenAPIGenBaseModel" + }, + { + "type": "object", + "properties": { + "to_subscribe": { + "title": "To Subscribe", + "description": "The Pollination plan to subscribe to", "allOf": [ { - "$ref": "#/components/schemas/RepositoryMetadata" + "$ref": "#/components/schemas/Price" } ] }, - "plugin": { - "title": "Plugin", - "description": "A dict of plugins accessible by name. Each name key points to a list of plugin versions", - "default": {}, - "type": "object", - "additionalProperties": { - "type": "array", - "items": { - "$ref": "#/components/schemas/PackageVersion" - } + "to_add": { + "title": "To Add", + "description": "The items to add", + "default": [], + "type": "array", + "items": { + "$ref": "#/components/schemas/NewSubscriptionItem" } }, - "recipe": { - "title": "Recipe", - "description": "A dict of recipes accessible by name. Each name key points to a list of recipesversions", - "default": {}, - "type": "object", - "additionalProperties": { - "type": "array", - "items": { - "$ref": "#/components/schemas/PackageVersion" - } + "to_update": { + "title": "To Update", + "description": "The items to update", + "default": [], + "type": "array", + "items": { + "$ref": "#/components/schemas/SubscriptionItem" + } + }, + "to_delete": { + "title": "To Delete", + "description": "The items to delete", + "default": [], + "type": "array", + "items": { + "$ref": "#/components/schemas/SubscriptionItem" } + }, + "promotion_code": { + "title": "Promotion Code", + "description": "A promotion code to apply a discount to the subscription", + "type": "string" + }, + "type": { + "title": "Type", + "default": "SubscriptionUpdate", + "type": "string", + "pattern": "^SubscriptionUpdate$", + "readOnly": true } } } ], - "title": "RepositoryIndex", - "description": "A searchable index for a Queenbee Plugin and Recipe repository", + "title": "SubscriptionUpdate", "discriminator": { "propertyName": "type" } }, - "JobStatusEnum": { - "title": "JobStatusEnum", - "description": "Enumaration of allowable status strings", - "enum": [ - "Created", - "Pre-Processing", - "Running", - "Failed", - "Cancelled", - "Completed", - "Unknown" - ], - "type": "string" - }, - "JobStatus": { + "Body_post_plugin__owner__plugins_post": { "allOf": [ { "$ref": "#/components/schemas/_OpenAPIGenBaseModel" @@ -15818,113 +20500,68 @@ { "type": "object", "properties": { - "id": { - "title": "Id", - "description": "The ID of the individual job.", - "type": "string" - }, - "started_at": { - "title": "Started At", - "description": "The time at which the job was started", + "package": { + "title": "Plugin Package", "type": "string", - "format": "date-time" + "format": "binary" }, "type": { "title": "Type", - "default": "JobStatus", - "pattern": "^JobStatus$", + "default": "Body_post_plugin__owner__plugins_post", "type": "string", + "pattern": "^Body_post_plugin__owner__plugins_post$", "readOnly": true + } + }, + "required": [ + "package" + ] + } + ], + "title": "Body_post_plugin__owner__plugins_post", + "discriminator": { + "propertyName": "type" + } + }, + "S3UploadRequest": { + "allOf": [ + { + "$ref": "#/components/schemas/_OpenAPIGenBaseModel" + }, + { + "type": "object", + "properties": { + "url": { + "title": "Url", + "type": "string" }, - "annotations": { - "title": "Annotations", - "description": "An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.", + "fields": { + "title": "Fields", "type": "object", "additionalProperties": { "type": "string" } }, - "api_version": { - "title": "Api Version", - "default": "v1beta1", - "readOnly": true, - "pattern": "^v1beta1$", - "type": "string" - }, - "status": { - "description": "The status of this job.", - "default": "Unknown", - "allOf": [ - { - "$ref": "#/components/schemas/JobStatusEnum" - } - ] - }, - "message": { - "title": "Message", - "description": "Any message produced by the job. Usually error/debugging hints.", - "type": "string" - }, - "finished_at": { - "title": "Finished At", - "description": "The time at which the task was completed", + "type": { + "title": "Type", + "default": "S3UploadRequest", "type": "string", - "format": "date-time" - }, - "source": { - "title": "Source", - "description": "Source url for the status object. It can be a recipe or a function.", - "type": "string" - }, - "runs_pending": { - "title": "Runs Pending", - "description": "The count of runs that are pending", - "default": 0, - "type": "integer", - "format": "int32" - }, - "runs_running": { - "title": "Runs Running", - "description": "The count of runs that are running", - "default": 0, - "type": "integer", - "format": "int32" - }, - "runs_completed": { - "title": "Runs Completed", - "description": "The count of runs that have completed", - "default": 0, - "type": "integer", - "format": "int32" - }, - "runs_failed": { - "title": "Runs Failed", - "description": "The count of runs that have failed", - "default": 0, - "type": "integer", - "format": "int32" - }, - "runs_cancelled": { - "title": "Runs Cancelled", - "description": "The count of runs that have been cancelled", - "default": 0, - "type": "integer", - "format": "int32" + "pattern": "^S3UploadRequest$", + "readOnly": true } }, "required": [ - "id", - "started_at" + "url", + "fields" ] } ], - "title": "JobStatus", - "description": "Parametric Job Status.", + "title": "S3UploadRequest", "discriminator": { "propertyName": "type" } }, - "CloudJob": { + "Run": { "allOf": [ { "$ref": "#/components/schemas/_OpenAPIGenBaseModel" @@ -15937,15 +20574,6 @@ "description": "The unique ID for this run", "type": "string" }, - "spec": { - "title": "Spec", - "description": "The job specification", - "allOf": [ - { - "$ref": "#/components/schemas/Job" - } - ] - }, "author": { "title": "Author", "description": "author", @@ -15973,35 +20601,60 @@ } ] }, + "generation": { + "title": "Generation", + "description": "The generation of this run", + "type": "number", + "format": "double" + }, "status": { "title": "Status", - "description": "The status of the job", + "description": "The status of the run", "allOf": [ { - "$ref": "#/components/schemas/JobStatus" + "$ref": "#/components/schemas/RunStatus" + } + ] + }, + "meta": { + "title": "Meta", + "description": "Extra metadata about the run", + "default": { + "resources_duration": { + "cpu": 0, + "memory": 0 + }, + "progress": { + "completed": 0, + "running": 0, + "total": 0 + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/RunMeta" } ] }, "type": { "title": "Type", - "default": "CloudJob", + "default": "Run", "type": "string", - "pattern": "^CloudJob$", + "pattern": "^Run$", "readOnly": true } }, "required": [ - "id", - "spec" + "id" ] } ], - "title": "CloudJob", + "title": "Run", "discriminator": { "propertyName": "type" } }, - "CloudJobList": { + "TemplateFunction": { "allOf": [ { "$ref": "#/components/schemas/_OpenAPIGenBaseModel" @@ -16009,140 +20662,253 @@ { "type": "object", "required": [ - "page", - "per_page", - "page_count", - "total_count", - "resources" + "name", + "command", + "config" ], "properties": { - "page": { - "title": "Page", - "description": "The current page the pagination request is on", - "type": "integer", - "format": "int32" + "name": { + "title": "Name", + "description": "Function name. Must be unique within a plugin.", + "type": "string" }, - "per_page": { - "title": "Per Page", - "description": "The number of pages per pagination request", - "type": "integer", - "format": "int32" + "command": { + "title": "Command", + "description": "Full shell command for this function. Each function accepts only one command. The command will be executed as a shell command in plugin. For running several commands after each other use && between the commands or pipe data from one to another using |", + "type": "string" }, - "page_count": { - "title": "Page Count", - "description": "The total number of pages", - "type": "integer", - "format": "int32" + "config": { + "title": "Config", + "description": "The plugin config to use for this function", + "allOf": [ + { + "$ref": "#/components/schemas/PluginConfig" + } + ] }, - "total_count": { - "title": "Total Count", - "description": "The total number of resources matching the list request", - "type": "integer", - "format": "int32" + "annotations": { + "title": "Annotations", + "description": "An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.", + "type": "object", + "additionalProperties": { + "type": "string" + } }, - "resources": { - "title": "Resources", + "inputs": { + "title": "Inputs", + "description": "Input arguments for this function.", "type": "array", "items": { - "$ref": "#/components/schemas/CloudJob" + "anyOf": [ + { + "$ref": "#/components/schemas/FunctionStringInput" + }, + { + "$ref": "#/components/schemas/FunctionIntegerInput" + }, + { + "$ref": "#/components/schemas/FunctionNumberInput" + }, + { + "$ref": "#/components/schemas/FunctionBooleanInput" + }, + { + "$ref": "#/components/schemas/FunctionFolderInput" + }, + { + "$ref": "#/components/schemas/FunctionFileInput" + }, + { + "$ref": "#/components/schemas/FunctionPathInput" + }, + { + "$ref": "#/components/schemas/FunctionArrayInput" + }, + { + "$ref": "#/components/schemas/FunctionJSONObjectInput" + } + ] } }, - "next_page": { - "title": "Next Page", - "description": "The next page, if this on is not the last", - "type": "integer", - "format": "int32" + "outputs": { + "title": "Outputs", + "description": "List of output arguments.", + "type": "array", + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/FunctionStringOutput" + }, + { + "$ref": "#/components/schemas/FunctionIntegerOutput" + }, + { + "$ref": "#/components/schemas/FunctionNumberOutput" + }, + { + "$ref": "#/components/schemas/FunctionBooleanOutput" + }, + { + "$ref": "#/components/schemas/FunctionFolderOutput" + }, + { + "$ref": "#/components/schemas/FunctionFileOutput" + }, + { + "$ref": "#/components/schemas/FunctionPathOutput" + }, + { + "$ref": "#/components/schemas/FunctionArrayOutput" + }, + { + "$ref": "#/components/schemas/FunctionJSONObjectOutput" + } + ] + } + }, + "description": { + "title": "Description", + "description": "Function description. A short human readable description for this function.", + "type": "string" }, "type": { "title": "Type", - "default": "CloudJobList", + "default": "TemplateFunction", + "pattern": "^TemplateFunction$", "type": "string", - "pattern": "^CloudJobList$", "readOnly": true } } } ], - "title": "CloudJobList", - "description": "A list response from a pagination request", + "title": "TemplateFunction", + "description": "Function template.", "discriminator": { "propertyName": "type" } }, - "FileMeta": { + "BakedRecipe": { "allOf": [ { "$ref": "#/components/schemas/_OpenAPIGenBaseModel" }, { "type": "object", + "required": [ + "flow", + "digest", + "templates" + ], "properties": { - "key": { - "title": "Key", - "type": "string" + "flow": { + "title": "Flow", + "description": "A list of tasks to create a DAG recipe.", + "type": "array", + "items": { + "$ref": "#/components/schemas/DAG" + } }, - "file_type": { - "title": "File Type", + "digest": { + "title": "Digest", "type": "string" }, - "file_name": { - "title": "File Name", + "templates": { + "title": "Templates", + "description": "A list of templates. Templates can be Function or a DAG.", + "type": "array", + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/TemplateFunction" + }, + { + "$ref": "#/components/schemas/DAG" + } + ] + } + }, + "annotations": { + "title": "Annotations", + "description": "An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "api_version": { + "title": "Api Version", + "default": "v1beta1", + "readOnly": true, + "pattern": "^v1beta1$", "type": "string" }, - "last_modified": { - "title": "Last Modified", - "type": "string", - "format": "date-time" + "metadata": { + "title": "Metadata", + "description": "Recipe metadata information.", + "allOf": [ + { + "$ref": "#/components/schemas/MetaData" + } + ] }, - "size": { - "title": "Size", - "type": "integer", - "format": "int32" + "dependencies": { + "title": "Dependencies", + "description": "A list of plugins and other recipes this recipe depends on.", + "type": "array", + "items": { + "$ref": "#/components/schemas/Dependency" + } }, "type": { "title": "Type", - "default": "FileMeta", + "default": "BakedRecipe", + "pattern": "^BakedRecipe$", "type": "string", - "pattern": "^FileMeta$", "readOnly": true } - }, - "required": [ - "key", - "file_type", - "file_name" - ] + } } ], - "title": "FileMeta", + "title": "BakedRecipe", + "description": "Baked Recipe.\n\nA Baked Recipe contains all the templates referred to in the DAG within a templates\nlist.", "discriminator": { "propertyName": "type" } }, - "ProjectPolicySubject": { + "ProductFamily": { "allOf": [ { - "$ref": "#/components/schemas/PolicySubject" + "$ref": "#/components/schemas/Product" }, { "type": "object", + "required": [ + "prices" + ], "properties": { + "prices": { + "title": "Prices", + "type": "array", + "items": { + "$ref": "#/components/schemas/Price" + } + }, "type": { "title": "Type", - "default": "ProjectPolicySubject", + "default": "ProductFamily", "type": "string", - "pattern": "^ProjectPolicySubject$", + "pattern": "^ProductFamily$", "readOnly": true } } } ], - "title": "ProjectPolicySubject", + "title": "ProductFamily", "discriminator": { "propertyName": "type" } }, - "S3UploadRequest": { + "Inventory": { "allOf": [ { "$ref": "#/components/schemas/_OpenAPIGenBaseModel" @@ -16150,173 +20916,153 @@ { "type": "object", "properties": { - "url": { - "title": "Url", - "type": "string" - }, - "fields": { - "title": "Fields", - "type": "object", - "additionalProperties": { - "type": "string" + "families": { + "title": "Families", + "type": "array", + "items": { + "$ref": "#/components/schemas/ProductFamily" } }, "type": { "title": "Type", - "default": "S3UploadRequest", + "default": "Inventory", "type": "string", - "pattern": "^S3UploadRequest$", + "pattern": "^Inventory$", "readOnly": true } }, "required": [ - "url", - "fields" + "families" ] } ], - "title": "S3UploadRequest", + "title": "Inventory", "discriminator": { "propertyName": "type" } }, - "ProjectList": { + "ProjectCreate": { "allOf": [ { "$ref": "#/components/schemas/_OpenAPIGenBaseModel" }, { "type": "object", - "required": [ - "page", - "per_page", - "page_count", - "total_count", - "resources" - ], "properties": { - "page": { - "title": "Page", - "description": "The current page the pagination request is on", - "type": "integer", - "format": "int32" - }, - "per_page": { - "title": "Per Page", - "description": "The number of pages per pagination request", - "type": "integer", - "format": "int32" - }, - "page_count": { - "title": "Page Count", - "description": "The total number of pages", - "type": "integer", - "format": "int32" - }, - "total_count": { - "title": "Total Count", - "description": "The total number of resources matching the list request", - "type": "integer", - "format": "int32" + "name": { + "title": "Name", + "description": "The name of the project. Must be unique to a given owner", + "example": "Project Falcon", + "type": "string" }, - "resources": { - "title": "Resources", - "type": "array", - "items": { - "$ref": "#/components/schemas/Project" - } + "description": { + "title": "Description", + "description": "A description of the project", + "default": "", + "example": "I always wanted to have a project called project Falcon", + "type": "string" }, - "next_page": { - "title": "Next Page", - "description": "The next page, if this on is not the last", - "type": "integer", - "format": "int32" + "public": { + "title": "Public", + "description": "Whether or not a project is publicly viewable", + "default": true, + "type": "boolean" }, "type": { "title": "Type", - "default": "ProjectList", + "default": "ProjectCreate", "type": "string", - "pattern": "^ProjectList$", + "pattern": "^ProjectCreate$", "readOnly": true } - } + }, + "required": [ + "name" + ] } ], - "title": "ProjectList", - "description": "A list response from a pagination request", + "title": "ProjectCreate", "discriminator": { "propertyName": "type" } }, - "PublicAccountList": { + "Usage": { "allOf": [ { "$ref": "#/components/schemas/_OpenAPIGenBaseModel" }, { "type": "object", - "required": [ - "page", - "per_page", - "page_count", - "total_count", - "resources" - ], "properties": { - "page": { - "title": "Page", - "description": "The current page the pagination request is on", - "type": "integer", - "format": "int32" + "start": { + "title": "Start", + "description": "The start date for this usage aggregation", + "type": "string", + "format": "date-time" }, - "per_page": { - "title": "Per Page", - "description": "The number of pages per pagination request", - "type": "integer", - "format": "int32" + "end": { + "title": "End", + "description": "The end date for this usage aggregation", + "type": "string", + "format": "date-time" }, - "page_count": { - "title": "Page Count", - "description": "The total number of pages", + "cpu": { + "title": "Cpu", + "description": "cpu usage", + "default": 0, + "type": "number", + "format": "double" + }, + "memory": { + "title": "Memory", + "description": "memory usage", + "default": 0, + "type": "number", + "format": "double" + }, + "succeeded": { + "title": "Succeeded", + "description": "succeeded usage", + "default": 0, "type": "integer", "format": "int32" }, - "total_count": { - "title": "Total Count", - "description": "The total number of resources matching the list request", + "failed": { + "title": "Failed", + "description": "failed usage", + "default": 0, "type": "integer", "format": "int32" }, - "resources": { - "title": "Resources", + "daily_usage": { + "title": "Daily Usage", + "description": "daily breakdown of usage", + "default": [], "type": "array", "items": { - "$ref": "#/components/schemas/AccountPublic" + "$ref": "#/components/schemas/DailyUsage" } }, - "next_page": { - "title": "Next Page", - "description": "The next page, if this on is not the last", - "type": "integer", - "format": "int32" - }, "type": { "title": "Type", - "default": "PublicAccountList", + "default": "Usage", "type": "string", - "pattern": "^PublicAccountList$", + "pattern": "^Usage$", "readOnly": true } - } + }, + "required": [ + "start", + "end" + ] } ], - "title": "PublicAccountList", - "description": "A list response from a pagination request", + "title": "Usage", "discriminator": { "propertyName": "type" } }, - "UserPrivate": { + "LicensePoolUpdate": { "allOf": [ { "$ref": "#/components/schemas/_OpenAPIGenBaseModel" @@ -16324,273 +21070,117 @@ { "type": "object", "properties": { - "id": { - "title": "Id", - "description": "The unique ID for that user", - "example": "96c12d05-f1a2-4491-b0cc-c2ed473301b5", - "type": "string" - }, - "email": { - "title": "Email", - "description": "The email associated with that user", - "example": "ladybugbot@ladybug.tools", - "type": "string" - }, - "username": { - "title": "Username", - "description": "The lowercase account name for this user", - "example": "ladybugbot", - "type": "string" - }, - "name": { - "title": "Name", - "description": "The display name for this user", - "example": "Ladybug Bot", - "type": "string" - }, "description": { "title": "Description", - "description": "A short description of the user", - "example": "Beep Boop!", - "type": "string" - }, - "picture": { - "title": "Picture", - "description": "URL to the picture associated with this user", - "example": "https://avatars1.githubusercontent.com/u/38131342", + "description": "The description of the license pool", "type": "string" }, "type": { "title": "Type", - "default": "UserPrivate", + "default": "LicensePoolUpdate", "type": "string", - "pattern": "^UserPrivate$", + "pattern": "^LicensePoolUpdate$", "readOnly": true } - }, - "required": [ - "id", - "email", - "username" - ] + } } ], - "title": "UserPrivate", + "title": "LicensePoolUpdate", "discriminator": { "propertyName": "type" } }, - "Organization": { + "Invoice": { "allOf": [ { - "$ref": "#/components/schemas/OrganizationUpdate" + "$ref": "#/components/schemas/InvoicePreview" }, { "type": "object", - "required": [ - "id", - "owner" - ], "properties": { - "id": { - "title": "Id", - "description": "The org ID", - "example": "1eb8e60d-771d-4a30-8078-fe553eb2f0bc", - "type": "string" - }, - "owner": { - "title": "Owner", - "description": "The account the organization represents", - "example": { - "id": "e4d0d922-2031-4b39-94d2-aa6d584d6bb2", - "type": "org", - "name": "ladybug-tools" - }, - "allOf": [ - { - "$ref": "#/components/schemas/AccountPublic" - } - ] - }, - "role": { - "description": "The role the user has within the organization", - "example": "member", - "allOf": [ - { - "$ref": "#/components/schemas/OrganizationRoleEnum" - } - ] - }, - "member_count": { - "title": "Member Count", - "description": "The number of members that are part of this org", - "default": 0, - "example": 10, - "type": "integer", - "format": "int32" - }, - "team_count": { - "title": "Team Count", - "description": "The number of teams that are part of this org", - "default": 0, - "example": 3, - "type": "integer", - "format": "int32" - }, "type": { "title": "Type", - "default": "Organization", + "default": "Invoice", "type": "string", - "pattern": "^Organization$", + "pattern": "^Invoice$", "readOnly": true } } } ], - "title": "Organization", + "title": "Invoice", "discriminator": { "propertyName": "type" } }, - "OrganizationList": { + "InvoiceList": { "allOf": [ { "$ref": "#/components/schemas/_OpenAPIGenBaseModel" }, { "type": "object", - "required": [ - "page", - "per_page", - "page_count", - "total_count", - "resources" - ], "properties": { - "page": { - "title": "Page", - "description": "The current page the pagination request is on", - "type": "integer", - "format": "int32" - }, - "per_page": { - "title": "Per Page", - "description": "The number of pages per pagination request", - "type": "integer", - "format": "int32" - }, - "page_count": { - "title": "Page Count", - "description": "The total number of pages", - "type": "integer", - "format": "int32" - }, - "total_count": { - "title": "Total Count", - "description": "The total number of resources matching the list request", - "type": "integer", - "format": "int32" - }, "resources": { "title": "Resources", "type": "array", "items": { - "$ref": "#/components/schemas/Organization" + "$ref": "#/components/schemas/Invoice" } }, - "next_page": { - "title": "Next Page", - "description": "The next page, if this on is not the last", - "type": "integer", - "format": "int32" + "has_more": { + "title": "Has More", + "type": "boolean" }, "type": { "title": "Type", - "default": "OrganizationList", + "default": "InvoiceList", "type": "string", - "pattern": "^OrganizationList$", + "pattern": "^InvoiceList$", "readOnly": true } - } + }, + "required": [ + "resources", + "has_more" + ] } ], - "title": "OrganizationList", - "description": "A list response from a pagination request", + "title": "InvoiceList", "discriminator": { "propertyName": "type" } }, - "APITokenPrivate": { + "PluginPackage": { "allOf": [ { - "$ref": "#/components/schemas/APITokenCreate" + "$ref": "#/components/schemas/RepositoryPackage" }, { "type": "object", "required": [ - "token" - ], - "properties": { - "token": { - "title": "Token", - "description": "The decoded API token", - "type": "string" + "manifest" + ], + "properties": { + "manifest": { + "$ref": "#/components/schemas/Plugin" }, "type": { "title": "Type", - "default": "APITokenPrivate", + "default": "PluginPackage", "type": "string", - "pattern": "^APITokenPrivate$", + "pattern": "^PluginPackage$", "readOnly": true } } } ], - "title": "APITokenPrivate", + "title": "PluginPackage", "discriminator": { "propertyName": "type" } }, - "RunStatusEnum": { - "title": "RunStatusEnum", - "description": "Enumaration of allowable status strings", - "enum": [ - "Created", - "Scheduled", - "Running", - "Post-Processing", - "Failed", - "Cancelled", - "Succeeded", - "Unknown" - ], - "type": "string" - }, - "StepStatusEnum": { - "title": "StepStatusEnum", - "description": "Enumaration of allowable status strings", - "enum": [ - "Scheduled", - "Running", - "Failed", - "Succeeded", - "Skipped", - "Unknown" - ], - "type": "string" - }, - "StatusType": { - "title": "StatusType", - "description": "Type enum for status type.", - "enum": [ - "Function", - "DAG", - "Loop", - "Unknown" - ], - "type": "string" - }, - "StepStatus": { + "PluginPackageList": { "allOf": [ { "$ref": "#/components/schemas/_OpenAPIGenBaseModel" @@ -16598,194 +21188,90 @@ { "type": "object", "required": [ - "inputs", - "outputs", - "started_at", - "id", - "name", - "status_type", - "template_ref", - "children_ids", - "outbound_steps" + "page", + "per_page", + "page_count", + "total_count", + "resources" ], "properties": { - "inputs": { - "title": "Inputs", - "description": "The inputs used by this step.", - "type": "array", - "items": { - "anyOf": [ - { - "$ref": "#/components/schemas/StepStringInput" - }, - { - "$ref": "#/components/schemas/StepIntegerInput" - }, - { - "$ref": "#/components/schemas/StepNumberInput" - }, - { - "$ref": "#/components/schemas/StepBooleanInput" - }, - { - "$ref": "#/components/schemas/StepFolderInput" - }, - { - "$ref": "#/components/schemas/StepFileInput" - }, - { - "$ref": "#/components/schemas/StepPathInput" - }, - { - "$ref": "#/components/schemas/StepArrayInput" - }, - { - "$ref": "#/components/schemas/StepJSONObjectInput" - } - ] - } - }, - "outputs": { - "title": "Outputs", - "description": "The outputs produced by this step.", - "type": "array", - "items": { - "anyOf": [ - { - "$ref": "#/components/schemas/StepStringOutput" - }, - { - "$ref": "#/components/schemas/StepIntegerOutput" - }, - { - "$ref": "#/components/schemas/StepNumberOutput" - }, - { - "$ref": "#/components/schemas/StepBooleanOutput" - }, - { - "$ref": "#/components/schemas/StepFolderOutput" - }, - { - "$ref": "#/components/schemas/StepFileOutput" - }, - { - "$ref": "#/components/schemas/StepPathOutput" - }, - { - "$ref": "#/components/schemas/StepArrayOutput" - }, - { - "$ref": "#/components/schemas/StepJSONObjectOutput" - } - ] - } - }, - "started_at": { - "title": "Started At", - "description": "The time at which the task was started", - "type": "string", - "format": "date-time" - }, - "id": { - "title": "Id", - "description": "The step unique ID", - "type": "string" - }, - "name": { - "title": "Name", - "description": "A human readable name for the step. Usually defined by the DAG task name but can be extended if the step is part of a loop for example. This name is unique within the boundary of the DAG/Job that generated it.", - "type": "string" + "page": { + "title": "Page", + "description": "The current page the pagination request is on", + "type": "integer", + "format": "int32" }, - "status_type": { - "description": "The type of step this status is for. Can be \"Function\", \"DAG\" or \"Loop\"", - "allOf": [ - { - "$ref": "#/components/schemas/StatusType" - } - ] + "per_page": { + "title": "Per Page", + "description": "The number of pages per pagination request", + "type": "integer", + "format": "int32" }, - "template_ref": { - "title": "Template Ref", - "description": "The name of the template that spawned this step", - "type": "string" + "page_count": { + "title": "Page Count", + "description": "The total number of pages", + "type": "integer", + "format": "int32" }, - "children_ids": { - "title": "Children Ids", - "description": "A list of child step IDs", - "type": "array", - "items": { - "type": "string" - } + "total_count": { + "title": "Total Count", + "description": "The total number of resources matching the list request", + "type": "integer", + "format": "int32" }, - "outbound_steps": { - "title": "Outbound Steps", - "description": "A list of the last step to ran in the context of this step. In the case of a DAG or a job this will be the last step that has been executed. It will remain empty for functions.", + "resources": { + "title": "Resources", "type": "array", "items": { - "type": "string" - } - }, - "annotations": { - "title": "Annotations", - "description": "An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.", - "type": "object", - "additionalProperties": { - "type": "string" + "$ref": "#/components/schemas/PluginPackage" } }, - "message": { - "title": "Message", - "description": "Any message produced by the task. Usually error/debugging hints.", - "type": "string" + "next_page": { + "title": "Next Page", + "description": "The next page, if this on is not the last", + "type": "integer", + "format": "int32" }, - "finished_at": { - "title": "Finished At", - "description": "The time at which the task was completed", + "type": { + "title": "Type", + "default": "PluginPackageList", "type": "string", - "format": "date-time" - }, - "source": { - "title": "Source", - "description": "Source url for the status object. It can be a recipe or a function.", - "type": "string" - }, - "status": { - "description": "The status of this step.", - "default": "Unknown", - "allOf": [ - { - "$ref": "#/components/schemas/StepStatusEnum" - } - ] - }, - "command": { - "title": "Command", - "description": "The command used to run this step. Only applies to Function steps.", - "type": "string" - }, - "boundary_id": { - "title": "Boundary Id", - "description": "This indicates the step ID of the associated template root step in which this step belongs to. A DAG step will have the id of the parent DAG for example.", - "type": "string" - }, + "pattern": "^PluginPackageList$", + "readOnly": true + } + } + } + ], + "title": "PluginPackageList", + "description": "A list response from a pagination request", + "discriminator": { + "propertyName": "type" + } + }, + "APITokenCreate": { + "allOf": [ + { + "$ref": "#/components/schemas/APIToken" + }, + { + "type": "object", + "properties": { "type": { "title": "Type", - "default": "StepStatus", - "pattern": "^StepStatus$", + "default": "APITokenCreate", "type": "string", + "pattern": "^APITokenCreate$", "readOnly": true } } } ], - "title": "StepStatus", - "description": "The Status of a Job Step", + "title": "APITokenCreate", "discriminator": { "propertyName": "type" } }, - "RunStatus": { + "PublicAccountList": { "allOf": [ { "$ref": "#/components/schemas/_OpenAPIGenBaseModel" @@ -16793,267 +21279,216 @@ { "type": "object", "required": [ - "inputs", - "outputs", - "started_at", - "id", - "job_id" + "page", + "per_page", + "page_count", + "total_count", + "resources" ], "properties": { - "inputs": { - "title": "Inputs", - "description": "The inputs used for this run.", - "type": "array", - "items": { - "anyOf": [ - { - "$ref": "#/components/schemas/StepStringInput" - }, - { - "$ref": "#/components/schemas/StepIntegerInput" - }, - { - "$ref": "#/components/schemas/StepNumberInput" - }, - { - "$ref": "#/components/schemas/StepBooleanInput" - }, - { - "$ref": "#/components/schemas/StepFolderInput" - }, - { - "$ref": "#/components/schemas/StepFileInput" - }, - { - "$ref": "#/components/schemas/StepPathInput" - }, - { - "$ref": "#/components/schemas/StepArrayInput" - }, - { - "$ref": "#/components/schemas/StepJSONObjectInput" - } - ] - } + "page": { + "title": "Page", + "description": "The current page the pagination request is on", + "type": "integer", + "format": "int32" }, - "outputs": { - "title": "Outputs", - "description": "The outputs produced by this run.", + "per_page": { + "title": "Per Page", + "description": "The number of pages per pagination request", + "type": "integer", + "format": "int32" + }, + "page_count": { + "title": "Page Count", + "description": "The total number of pages", + "type": "integer", + "format": "int32" + }, + "total_count": { + "title": "Total Count", + "description": "The total number of resources matching the list request", + "type": "integer", + "format": "int32" + }, + "resources": { + "title": "Resources", "type": "array", "items": { - "anyOf": [ - { - "$ref": "#/components/schemas/StepStringOutput" - }, - { - "$ref": "#/components/schemas/StepIntegerOutput" - }, - { - "$ref": "#/components/schemas/StepNumberOutput" - }, - { - "$ref": "#/components/schemas/StepBooleanOutput" - }, - { - "$ref": "#/components/schemas/StepFolderOutput" - }, - { - "$ref": "#/components/schemas/StepFileOutput" - }, - { - "$ref": "#/components/schemas/StepPathOutput" - }, - { - "$ref": "#/components/schemas/StepArrayOutput" - }, - { - "$ref": "#/components/schemas/StepJSONObjectOutput" - } - ] + "$ref": "#/components/schemas/AccountPublic" } }, - "started_at": { - "title": "Started At", - "description": "The time at which the task was started", - "type": "string", - "format": "date-time" + "next_page": { + "title": "Next Page", + "description": "The next page, if this on is not the last", + "type": "integer", + "format": "int32" }, + "type": { + "title": "Type", + "default": "PublicAccountList", + "type": "string", + "pattern": "^PublicAccountList$", + "readOnly": true + } + } + } + ], + "title": "PublicAccountList", + "description": "A list response from a pagination request", + "discriminator": { + "propertyName": "type" + } + }, + "UserPrivate": { + "allOf": [ + { + "$ref": "#/components/schemas/_OpenAPIGenBaseModel" + }, + { + "type": "object", + "properties": { "id": { "title": "Id", - "description": "The ID of the individual run.", + "description": "The unique ID for that user", + "example": "96c12d05-f1a2-4491-b0cc-c2ed473301b5", "type": "string" }, - "job_id": { - "title": "Job Id", - "description": "The ID of the job that generated this run.", + "email": { + "title": "Email", + "description": "The email associated with that user", + "example": "ladybugbot@ladybug.tools", "type": "string" }, - "annotations": { - "title": "Annotations", - "description": "An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.", - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "message": { - "title": "Message", - "description": "Any message produced by the task. Usually error/debugging hints.", + "username": { + "title": "Username", + "description": "The lowercase account name for this user", + "example": "ladybugbot", "type": "string" }, - "finished_at": { - "title": "Finished At", - "description": "The time at which the task was completed", - "type": "string", - "format": "date-time" - }, - "source": { - "title": "Source", - "description": "Source url for the status object. It can be a recipe or a function.", + "name": { + "title": "Name", + "description": "The display name for this user", + "example": "Ladybug Bot", "type": "string" }, - "api_version": { - "title": "Api Version", - "default": "v1beta1", - "readOnly": true, - "pattern": "^v1beta1$", + "description": { + "title": "Description", + "description": "A short description of the user", + "example": "Beep Boop!", "type": "string" }, - "entrypoint": { - "title": "Entrypoint", - "description": "The ID of the first step in the run.", + "picture": { + "title": "Picture", + "description": "URL to the picture associated with this user", + "example": "https://avatars1.githubusercontent.com/u/38131342", "type": "string" }, - "status": { - "description": "The status of this run.", - "default": "Unknown", - "allOf": [ - { - "$ref": "#/components/schemas/RunStatusEnum" - } - ] - }, - "steps": { - "title": "Steps", - "default": {}, - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/StepStatus" - } - }, "type": { "title": "Type", - "default": "RunStatus", - "pattern": "^RunStatus$", + "default": "UserPrivate", + "type": "string", + "pattern": "^UserPrivate$", + "readOnly": true + } + }, + "required": [ + "id", + "email", + "username" + ] + } + ], + "title": "UserPrivate", + "discriminator": { + "propertyName": "type" + } + }, + "ProjectPolicySubject": { + "allOf": [ + { + "$ref": "#/components/schemas/PolicySubject" + }, + { + "type": "object", + "properties": { + "type": { + "title": "Type", + "default": "ProjectPolicySubject", "type": "string", + "pattern": "^ProjectPolicySubject$", "readOnly": true } } } ], - "title": "RunStatus", - "description": "Job Status.", + "title": "ProjectPolicySubject", "discriminator": { "propertyName": "type" } }, - "Run": { + "Project": { "allOf": [ { - "$ref": "#/components/schemas/_OpenAPIGenBaseModel" + "$ref": "#/components/schemas/ProjectCreate" }, { "type": "object", + "required": [ + "id", + "owner", + "permissions", + "slug" + ], "properties": { "id": { "title": "Id", - "description": "The unique ID for this run", + "description": "The project ID", + "example": "50bb7fe0-8f19-499e-972e-1ebec8af2c71", "type": "string" }, - "author": { - "title": "Author", - "description": "author", - "allOf": [ - { - "$ref": "#/components/schemas/AccountPublic" - } - ] - }, "owner": { "title": "Owner", - "description": "owner", + "description": "The project owner", "allOf": [ { "$ref": "#/components/schemas/AccountPublic" } ] }, - "recipe": { - "title": "Recipe", - "description": "The recipe used to generate this ", - "allOf": [ - { - "$ref": "#/components/schemas/RecipeInterface" - } - ] + "permissions": { + "$ref": "#/components/schemas/UserPermission" }, - "generation": { - "title": "Generation", - "description": "The generation of this run", - "type": "number", - "format": "double" + "slug": { + "title": "Slug", + "description": "The project name in slug format", + "example": "project-falcon", + "type": "string" }, - "status": { - "title": "Status", - "description": "The status of the run", + "usage": { + "title": "Usage", + "description": "The resource consumption of this project", "allOf": [ { - "$ref": "#/components/schemas/RunStatus" + "$ref": "#/components/schemas/Usage" } ] }, "type": { "title": "Type", - "default": "Run", - "type": "string", - "pattern": "^Run$", - "readOnly": true - } - }, - "required": [ - "id" - ] - } - ], - "title": "Run", - "discriminator": { - "propertyName": "type" - } - }, - "TeamUpdate": { - "allOf": [ - { - "$ref": "#/components/schemas/TeamCreate" - }, - { - "type": "object", - "properties": { - "type": { - "title": "Type", - "default": "TeamUpdate", + "default": "Project", "type": "string", - "pattern": "^TeamUpdate$", + "pattern": "^Project$", "readOnly": true } } } ], - "title": "TeamUpdate", + "title": "Project", "discriminator": { "propertyName": "type" } }, - "NewPluginPackage": { + "NewRecipePackage": { "allOf": [ { "$ref": "#/components/schemas/_OpenAPIGenBaseModel" @@ -17063,10 +21498,10 @@ "properties": { "manifest": { "title": "Manifest", - "description": "The Plugin manifest to be created", + "description": "The Recipe manifest to be created", "allOf": [ { - "$ref": "#/components/schemas/Plugin" + "$ref": "#/components/schemas/Recipe" } ] }, @@ -17078,9 +21513,9 @@ }, "type": { "title": "Type", - "default": "NewPluginPackage", + "default": "NewRecipePackage", "type": "string", - "pattern": "^NewPluginPackage$", + "pattern": "^NewRecipePackage$", "readOnly": true } }, @@ -17089,66 +21524,137 @@ ] } ], - "title": "NewPluginPackage", + "title": "NewRecipePackage", "discriminator": { "propertyName": "type" } }, - "TeamRoleEnum": { - "title": "TeamRoleEnum", + "LicenseType": { + "title": "LicenseType", "description": "An enumeration.", "enum": [ - "owner", - "member" + "node-locked", + "hosted-floating", + "on-premise-floating" ], "type": "string" }, - "TeamMember": { + "LicensePublic": { "allOf": [ { - "$ref": "#/components/schemas/_OpenAPIGenBaseModel" + "$ref": "#/components/schemas/License" }, { "type": "object", + "required": [ + "id", + "created_at", + "updated_at", + "key", + "revoked", + "suspended", + "total_activations", + "total_deactivations", + "validity", + "allowed_activations", + "type", + "server_sync_grace_period", + "server_sync_interval", + "lease_duration", + "product_id", + "metadata" + ], "properties": { - "user": { - "title": "User", - "description": "The team member", - "allOf": [ - { - "$ref": "#/components/schemas/UserPublic" - } - ] + "id": { + "title": "Id", + "type": "string" }, - "role": { - "description": "The role the user has within the team", - "example": "member", - "allOf": [ - { - "$ref": "#/components/schemas/TeamRoleEnum" - } - ] + "created_at": { + "title": "Created At", + "type": "string", + "format": "date-time" }, - "type": { - "title": "Type", - "default": "TeamMember", + "updated_at": { + "title": "Updated At", "type": "string", - "pattern": "^TeamMember$", + "format": "date-time" + }, + "key": { + "title": "Key", + "description": "The key used to activate this license. Treat this like a password.", + "type": "string" + }, + "revoked": { + "title": "Revoked", + "type": "boolean" + }, + "suspended": { + "title": "Suspended", + "type": "boolean" + }, + "total_activations": { + "title": "Total Activations", + "type": "integer", + "format": "int32" + }, + "total_deactivations": { + "title": "Total Deactivations", + "type": "integer", + "format": "int32" + }, + "validity": { + "title": "Validity", + "type": "integer", + "format": "int32" + }, + "allowed_activations": { + "title": "Allowed Activations", + "type": "integer", + "format": "int32" + }, + "server_sync_grace_period": { + "title": "Server Sync Grace Period", + "type": "integer", + "format": "int32" + }, + "server_sync_interval": { + "title": "Server Sync Interval", + "type": "integer", + "format": "int32" + }, + "lease_duration": { + "title": "Lease Duration", + "type": "integer", + "format": "int32" + }, + "product_id": { + "title": "Product Id", + "type": "string" + }, + "metadata": { + "title": "Metadata", + "type": "array", + "items": { + "$ref": "#/components/schemas/Metadata" + } + }, + "type": { + "$ref": "#/components/schemas/LicenseType", "readOnly": true + }, + "notes": { + "title": "Notes", + "type": "string" } - }, - "required": [ - "user", - "role" - ] + } } ], - "title": "TeamMember", + "title": "LicensePublic", "discriminator": { "propertyName": "type" } }, - "StepList": { + "PaymentMethodList": { "allOf": [ { "$ref": "#/components/schemas/_OpenAPIGenBaseModel" @@ -17191,7 +21697,7 @@ "title": "Resources", "type": "array", "items": { - "$ref": "#/components/schemas/StepStatus" + "$ref": "#/components/schemas/CardPublic" } }, "next_page": { @@ -17202,20 +21708,70 @@ }, "type": { "title": "Type", - "default": "StepList", + "default": "PaymentMethodList", "type": "string", - "pattern": "^StepList$", + "pattern": "^PaymentMethodList$", "readOnly": true } } } ], - "title": "StepList", + "title": "PaymentMethodList", "description": "A list response from a pagination request", "discriminator": { "propertyName": "type" } }, + "FileMeta": { + "allOf": [ + { + "$ref": "#/components/schemas/_OpenAPIGenBaseModel" + }, + { + "type": "object", + "properties": { + "key": { + "title": "Key", + "type": "string" + }, + "file_type": { + "title": "File Type", + "type": "string" + }, + "file_name": { + "title": "File Name", + "type": "string" + }, + "last_modified": { + "title": "Last Modified", + "type": "string", + "format": "date-time" + }, + "size": { + "title": "Size", + "type": "integer", + "format": "int32" + }, + "type": { + "title": "Type", + "default": "FileMeta", + "type": "string", + "pattern": "^FileMeta$", + "readOnly": true + } + }, + "required": [ + "key", + "file_type", + "file_name" + ] + } + ], + "title": "FileMeta", + "discriminator": { + "propertyName": "type" + } + }, "OrganizationCreate": { "allOf": [ { @@ -17239,7 +21795,7 @@ "propertyName": "type" } }, - "CreatedContent": { + "ProjectUpdate": { "allOf": [ { "$ref": "#/components/schemas/_OpenAPIGenBaseModel" @@ -17247,79 +21803,63 @@ { "type": "object", "properties": { - "id": { - "title": "Id", - "description": "Id for the newly created resource.", - "example": "3fa85f64-5717-4562-b3fc-2c963f66afa6", - "type": "string", - "format": "uuid" + "name": { + "title": "Name", + "description": "The name of the project. Must be unique to a given owner", + "example": "Project Falcon", + "type": "string" }, - "message": { - "title": "Message", - "description": " A human readable message", - "example": "Use Location in headers to access the new object.", + "description": { + "title": "Description", + "description": "A description of the project", + "example": "I always wanted to have a project called project Falcon", "type": "string" }, + "public": { + "title": "Public", + "description": "Whether or not a project is publicly viewable", + "type": "boolean" + }, "type": { "title": "Type", - "default": "CreatedContent", + "default": "ProjectUpdate", "type": "string", - "pattern": "^CreatedContent$", + "pattern": "^ProjectUpdate$", "readOnly": true } - }, - "required": [ - "id" - ] + } } ], - "title": "CreatedContent", - "description": "Content for created response.", + "title": "ProjectUpdate", "discriminator": { "propertyName": "type" } }, - "ProjectAccessPolicy": { + "Status": { "allOf": [ { "$ref": "#/components/schemas/_OpenAPIGenBaseModel" }, { "type": "object", - "required": [ - "subject", - "permission" - ], "properties": { - "subject": { - "title": "Subject", - "description": "The subject of the access policy", - "allOf": [ - { - "$ref": "#/components/schemas/PolicySubject" - } - ] - }, - "permission": { - "description": "The permission given to the subject of the access policy", - "example": "write", - "allOf": [ - { - "$ref": "#/components/schemas/Permission" - } - ] + "frozen": { + "title": "Frozen", + "description": "Whether account actions are currently blocked by a payment failure", + "default": false, + "type": "boolean" }, "type": { "title": "Type", - "default": "ProjectAccessPolicy", + "default": "Status", "type": "string", - "pattern": "^ProjectAccessPolicy$", + "pattern": "^Status$", "readOnly": true } } } ], - "title": "ProjectAccessPolicy", + "title": "Status", "discriminator": { "propertyName": "type" } @@ -17392,53 +21932,7 @@ "propertyName": "type" } }, - "UserUpdate": { - "allOf": [ - { - "$ref": "#/components/schemas/_OpenAPIGenBaseModel" - }, - { - "type": "object", - "properties": { - "name": { - "title": "Name", - "description": "The display name for this user", - "example": "Ladybug Tools", - "type": "string" - }, - "picture_url": { - "title": "Picture Url", - "description": "URL to the picture associated with this user", - "example": "https://avatars1.githubusercontent.com/u/38131342", - "type": "string" - }, - "description": { - "title": "Description", - "description": "A description of the user", - "default": "", - "example": "Making environmental design knowledge and tools freely accessible to every person, project and design process", - "type": "string" - }, - "type": { - "title": "Type", - "default": "UserUpdate", - "type": "string", - "pattern": "^UserUpdate$", - "readOnly": true - } - }, - "required": [ - "name", - "picture_url" - ] - } - ], - "title": "UserUpdate", - "discriminator": { - "propertyName": "type" - } - }, - "NewRecipePackage": { + "OrganizationMember": { "allOf": [ { "$ref": "#/components/schemas/_OpenAPIGenBaseModel" @@ -17446,40 +21940,44 @@ { "type": "object", "properties": { - "manifest": { - "title": "Manifest", - "description": "The Recipe manifest to be created", + "user": { + "title": "User", + "description": "The organization member", "allOf": [ { - "$ref": "#/components/schemas/Recipe" + "$ref": "#/components/schemas/UserPublic" } ] }, - "readme": { - "title": "Readme", - "description": "The README file to attach to this package", - "default": "", - "type": "string" + "role": { + "description": "The role the user has within the organization", + "example": "member", + "allOf": [ + { + "$ref": "#/components/schemas/OrganizationRoleEnum" + } + ] }, "type": { "title": "Type", - "default": "NewRecipePackage", + "default": "OrganizationMember", "type": "string", - "pattern": "^NewRecipePackage$", + "pattern": "^OrganizationMember$", "readOnly": true } }, "required": [ - "manifest" + "user", + "role" ] } ], - "title": "NewRecipePackage", + "title": "OrganizationMember", "discriminator": { "propertyName": "type" } }, - "OrganizationMemberList": { + "StepList": { "allOf": [ { "$ref": "#/components/schemas/_OpenAPIGenBaseModel" @@ -17522,7 +22020,7 @@ "title": "Resources", "type": "array", "items": { - "$ref": "#/components/schemas/OrganizationMember" + "$ref": "#/components/schemas/StepStatus" } }, "next_page": { @@ -17533,21 +22031,21 @@ }, "type": { "title": "Type", - "default": "OrganizationMemberList", + "default": "StepList", "type": "string", - "pattern": "^OrganizationMemberList$", + "pattern": "^StepList$", "readOnly": true } } } ], - "title": "OrganizationMemberList", + "title": "StepList", "description": "A list response from a pagination request", "discriminator": { "propertyName": "type" } }, - "RepositoryAccessPolicyList": { + "RunList": { "allOf": [ { "$ref": "#/components/schemas/_OpenAPIGenBaseModel" @@ -17590,7 +22088,7 @@ "title": "Resources", "type": "array", "items": { - "$ref": "#/components/schemas/RepositoryAccessPolicy" + "$ref": "#/components/schemas/Run" } }, "next_page": { @@ -17601,20 +22099,88 @@ }, "type": { "title": "Type", - "default": "RepositoryAccessPolicyList", + "default": "RunList", "type": "string", - "pattern": "^RepositoryAccessPolicyList$", + "pattern": "^RunList$", "readOnly": true } } } ], - "title": "RepositoryAccessPolicyList", + "title": "RunList", "description": "A list response from a pagination request", "discriminator": { "propertyName": "type" } }, + "RepositoryAccessPolicy": { + "allOf": [ + { + "$ref": "#/components/schemas/_OpenAPIGenBaseModel" + }, + { + "type": "object", + "required": [ + "subject", + "permission" + ], + "properties": { + "subject": { + "title": "Subject", + "description": "The subject of the access policy", + "allOf": [ + { + "$ref": "#/components/schemas/PolicySubject" + } + ] + }, + "permission": { + "description": "The permission given to the subject of the access policy", + "example": "write", + "allOf": [ + { + "$ref": "#/components/schemas/Permission" + } + ] + }, + "type": { + "title": "Type", + "default": "RepositoryAccessPolicy", + "type": "string", + "pattern": "^RepositoryAccessPolicy$", + "readOnly": true + } + } + } + ], + "title": "RepositoryAccessPolicy", + "discriminator": { + "propertyName": "type" + } + }, + "PaymentSetup": { + "allOf": [ + { + "$ref": "#/components/schemas/_SecureResourcePublic" + }, + { + "type": "object", + "properties": { + "type": { + "title": "Type", + "default": "PaymentSetup", + "type": "string", + "pattern": "^PaymentSetup$", + "readOnly": true + } + } + } + ], + "title": "PaymentSetup", + "discriminator": { + "propertyName": "type" + } + }, "UpdateAccepted": { "allOf": [ { @@ -17644,7 +22210,7 @@ "propertyName": "type" } }, - "RecipeInterfaceList": { + "OrganizationMemberList": { "allOf": [ { "$ref": "#/components/schemas/_OpenAPIGenBaseModel" @@ -17687,7 +22253,7 @@ "title": "Resources", "type": "array", "items": { - "$ref": "#/components/schemas/RecipeInterface" + "$ref": "#/components/schemas/OrganizationMember" } }, "next_page": { @@ -17698,51 +22264,21 @@ }, "type": { "title": "Type", - "default": "RecipeInterfaceList", + "default": "OrganizationMemberList", "type": "string", - "pattern": "^RecipeInterfaceList$", + "pattern": "^OrganizationMemberList$", "readOnly": true } } } ], - "title": "RecipeInterfaceList", + "title": "OrganizationMemberList", "description": "A list response from a pagination request", "discriminator": { "propertyName": "type" } }, - "KeyRequest": { - "allOf": [ - { - "$ref": "#/components/schemas/_OpenAPIGenBaseModel" - }, - { - "type": "object", - "properties": { - "key": { - "title": "Key", - "type": "string" - }, - "type": { - "title": "Type", - "default": "KeyRequest", - "type": "string", - "pattern": "^KeyRequest$", - "readOnly": true - } - }, - "required": [ - "key" - ] - } - ], - "title": "KeyRequest", - "discriminator": { - "propertyName": "type" - } - }, - "ProjectUpdate": { + "TeamCreate": { "allOf": [ { "$ref": "#/components/schemas/_OpenAPIGenBaseModel" @@ -17752,37 +22288,33 @@ "properties": { "name": { "title": "Name", - "description": "The name of the project. Must be unique to a given owner", - "example": "Project Falcon", + "example": "Honeybee Contributors", "type": "string" }, "description": { "title": "Description", - "description": "A description of the project", - "example": "I always wanted to have a project called project Falcon", + "example": "The Honeybee team works on all things energy modelling", "type": "string" }, - "public": { - "title": "Public", - "description": "Whether or not a project is publicly viewable", - "type": "boolean" - }, "type": { "title": "Type", - "default": "ProjectUpdate", + "default": "TeamCreate", "type": "string", - "pattern": "^ProjectUpdate$", + "pattern": "^TeamCreate$", "readOnly": true } - } + }, + "required": [ + "name" + ] } ], - "title": "ProjectUpdate", + "title": "TeamCreate", "discriminator": { "propertyName": "type" } }, - "RunList": { + "ProjectList": { "allOf": [ { "$ref": "#/components/schemas/_OpenAPIGenBaseModel" @@ -17825,7 +22357,7 @@ "title": "Resources", "type": "array", "items": { - "$ref": "#/components/schemas/Run" + "$ref": "#/components/schemas/Project" } }, "next_page": { @@ -17836,135 +22368,166 @@ }, "type": { "title": "Type", - "default": "RunList", + "default": "ProjectList", "type": "string", - "pattern": "^RunList$", + "pattern": "^ProjectList$", "readOnly": true } } } ], - "title": "RunList", + "title": "ProjectList", "description": "A list response from a pagination request", "discriminator": { "propertyName": "type" } }, - "RepositoryPolicySubject": { + "ActivationList": { "allOf": [ { - "$ref": "#/components/schemas/PolicySubject" + "$ref": "#/components/schemas/_OpenAPIGenBaseModel" }, { "type": "object", "properties": { + "resources": { + "title": "Resources", + "type": "array", + "items": { + "$ref": "#/components/schemas/Activation" + } + }, "type": { "title": "Type", - "default": "RepositoryPolicySubject", + "default": "ActivationList", "type": "string", - "pattern": "^RepositoryPolicySubject$", + "pattern": "^ActivationList$", "readOnly": true } - } + }, + "required": [ + "resources" + ] } ], - "title": "RepositoryPolicySubject", + "title": "ActivationList", "discriminator": { "propertyName": "type" } }, - "APITokenCreate": { + "SubscriptionItemList": { "allOf": [ { - "$ref": "#/components/schemas/APIToken" + "$ref": "#/components/schemas/_OpenAPIGenBaseModel" }, { "type": "object", + "required": [ + "has_more", + "data" + ], "properties": { + "has_more": { + "title": "Has More", + "type": "boolean" + }, + "data": { + "title": "Data", + "type": "array", + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/SubscriptionItem" + }, + { + "$ref": "#/components/schemas/DeleteSubscriptionItem" + } + ] + } + }, "type": { "title": "Type", - "default": "APITokenCreate", + "default": "SubscriptionItemList", "type": "string", - "pattern": "^APITokenCreate$", + "pattern": "^SubscriptionItemList$", "readOnly": true } } } ], - "title": "APITokenCreate", + "title": "SubscriptionItemList", "discriminator": { "propertyName": "type" } }, - "UserPublicList": { + "Subscription": { "allOf": [ { - "$ref": "#/components/schemas/_OpenAPIGenBaseModel" + "$ref": "#/components/schemas/ExternalResource" }, { "type": "object", "required": [ - "page", - "per_page", - "page_count", - "total_count", - "resources" + "cancel_at_period_end", + "current_period_start", + "current_period_end", + "customer", + "items", + "latest_invoice" ], "properties": { - "page": { - "title": "Page", - "description": "The current page the pagination request is on", - "type": "integer", - "format": "int32" + "cancel_at_period_end": { + "title": "Cancel At Period End", + "type": "boolean" }, - "per_page": { - "title": "Per Page", - "description": "The number of pages per pagination request", - "type": "integer", - "format": "int32" + "current_period_start": { + "title": "Current Period Start", + "type": "string", + "format": "date-time" }, - "page_count": { - "title": "Page Count", - "description": "The total number of pages", - "type": "integer", - "format": "int32" + "current_period_end": { + "title": "Current Period End", + "type": "string", + "format": "date-time" }, - "total_count": { - "title": "Total Count", - "description": "The total number of resources matching the list request", - "type": "integer", - "format": "int32" + "customer": { + "title": "Customer", + "type": "string" }, - "resources": { - "title": "Resources", - "type": "array", - "items": { - "$ref": "#/components/schemas/UserPublic" - } + "items": { + "$ref": "#/components/schemas/SubscriptionItemList" }, - "next_page": { - "title": "Next Page", - "description": "The next page, if this on is not the last", - "type": "integer", - "format": "int32" + "latest_invoice": { + "title": "Latest Invoice", + "type": "string" + }, + "default_payment_method": { + "title": "Default Payment Method", + "type": "string" + }, + "schedule": { + "title": "Schedule", + "type": "string" + }, + "discount": { + "$ref": "#/components/schemas/Discount" }, "type": { "title": "Type", - "default": "UserPublicList", + "default": "Subscription", "type": "string", - "pattern": "^UserPublicList$", + "pattern": "^Subscription$", "readOnly": true } } } ], - "title": "UserPublicList", - "description": "A list response from a pagination request", + "title": "Subscription", "discriminator": { "propertyName": "type" } }, - "TeamList": { + "RepositoryAccessPolicyList": { "allOf": [ { "$ref": "#/components/schemas/_OpenAPIGenBaseModel" @@ -18007,7 +22570,7 @@ "title": "Resources", "type": "array", "items": { - "$ref": "#/components/schemas/Team" + "$ref": "#/components/schemas/RepositoryAccessPolicy" } }, "next_page": { @@ -18018,157 +22581,134 @@ }, "type": { "title": "Type", - "default": "TeamList", + "default": "RepositoryAccessPolicyList", "type": "string", - "pattern": "^TeamList$", + "pattern": "^RepositoryAccessPolicyList$", "readOnly": true } } } ], - "title": "TeamList", + "title": "RepositoryAccessPolicyList", "description": "A list response from a pagination request", "discriminator": { "propertyName": "type" } }, - "TeamMemberList": { + "PathOutput": { "allOf": [ { - "$ref": "#/components/schemas/_OpenAPIGenBaseModel" + "$ref": "#/components/schemas/GenericOutput" }, { "type": "object", "required": [ - "page", - "per_page", - "page_count", - "total_count", - "resources" + "path" ], "properties": { - "page": { - "title": "Page", - "description": "The current page the pagination request is on", - "type": "integer", - "format": "int32" - }, - "per_page": { - "title": "Per Page", - "description": "The number of pages per pagination request", - "type": "integer", - "format": "int32" - }, - "page_count": { - "title": "Page Count", - "description": "The total number of pages", - "type": "integer", - "format": "int32" - }, - "total_count": { - "title": "Total Count", - "description": "The total number of resources matching the list request", - "type": "integer", - "format": "int32" - }, - "resources": { - "title": "Resources", - "type": "array", - "items": { - "$ref": "#/components/schemas/TeamMember" - } + "path": { + "title": "Path", + "description": "Path to the output artifact relative to where the function command is executed.", + "type": "string" }, - "next_page": { - "title": "Next Page", - "description": "The next page, if this on is not the last", - "type": "integer", - "format": "int32" + "required": { + "title": "Required", + "description": "A boolean to indicate if an artifact output is required. A False value makes the artifact optional.", + "default": true, + "type": "boolean" }, "type": { "title": "Type", - "default": "TeamMemberList", + "default": "PathOutput", + "pattern": "^PathOutput$", "type": "string", - "pattern": "^TeamMemberList$", "readOnly": true } } } ], - "title": "TeamMemberList", - "description": "A list response from a pagination request", + "title": "PathOutput", + "description": "Base class for output classes that source tha output from a path.\n\nAn example of using PathOutput is TaskFile and TaskFolder outputs.", "discriminator": { "propertyName": "type" } }, - "ProjectRecipeFilterList": { + "GenericOutput": { "allOf": [ { "$ref": "#/components/schemas/_OpenAPIGenBaseModel" }, { "type": "object", - "required": [ - "page", - "per_page", - "page_count", - "total_count", - "resources" - ], "properties": { - "page": { - "title": "Page", - "description": "The current page the pagination request is on", - "type": "integer", - "format": "int32" - }, - "per_page": { - "title": "Per Page", - "description": "The number of pages per pagination request", - "type": "integer", - "format": "int32" - }, - "page_count": { - "title": "Page Count", - "description": "The total number of pages", - "type": "integer", - "format": "int32" + "name": { + "title": "Name", + "description": "Output name.", + "type": "string" }, - "total_count": { - "title": "Total Count", - "description": "The total number of resources matching the list request", - "type": "integer", - "format": "int32" + "type": { + "title": "Type", + "default": "GenericOutput", + "pattern": "^GenericOutput$", + "type": "string", + "readOnly": true }, - "resources": { - "title": "Resources", - "type": "array", - "items": { - "$ref": "#/components/schemas/ProjectRecipeFilter" + "annotations": { + "title": "Annotations", + "description": "An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.", + "type": "object", + "additionalProperties": { + "type": "string" } }, - "next_page": { - "title": "Next Page", - "description": "The next page, if this on is not the last", - "type": "integer", - "format": "int32" + "description": { + "title": "Description", + "description": "Optional description for output.", + "type": "string" + } + }, + "required": [ + "name" + ] + } + ], + "title": "GenericOutput", + "description": "Base class for all output types.\n\nThe baseclass uses a name to source the output.", + "discriminator": { + "propertyName": "type" + } + }, + "_DAGArtifactOutputAlias": { + "allOf": [ + { + "$ref": "#/components/schemas/DAGGenericOutputAlias" + }, + { + "type": "object", + "properties": { + "required": { + "title": "Required", + "description": "A boolean to indicate if an artifact output is required. A False value makes the artifact optional.", + "default": true, + "type": "boolean" }, "type": { "title": "Type", - "default": "ProjectRecipeFilterList", + "default": "DAGGenericOutputAlias", + "pattern": "^DAGGenericOutputAlias$", "type": "string", - "pattern": "^ProjectRecipeFilterList$", "readOnly": true } } } ], - "title": "ProjectRecipeFilterList", - "description": "A list response from a pagination request", + "title": "_DAGArtifactOutputAlias", + "description": "Base class for DAG artifact output aliases.\n\nThis class add a required input. By default all artifact outputs are required.", "discriminator": { "propertyName": "type" } }, - "OrganizationUpdate": { + "AccessPolicy": { "allOf": [ { "$ref": "#/components/schemas/_OpenAPIGenBaseModel" @@ -18176,52 +22716,44 @@ { "type": "object", "properties": { - "account_name": { - "title": "Account Name", - "description": "The unique name of the org in small case without spaces", - "example": "ladybug-tools", - "type": "string" - }, - "name": { - "title": "Name", - "description": "The display name for this org", - "example": "Ladybug Tools", - "type": "string" - }, - "picture_url": { - "title": "Picture Url", - "description": "URL to the picture associated with this org", - "example": "https://avatars1.githubusercontent.com/u/38131342", - "type": "string" - }, - "contact_email": { - "title": "Contact Email", - "description": "The contact email for the Organization", - "example": "info@ladybug.tools", - "type": "string" + "subject": { + "title": "Subject", + "description": "The subject of the access policy", + "allOf": [ + { + "$ref": "#/components/schemas/PolicySubject" + } + ] }, - "description": { - "title": "Description", - "description": "A description of the org", - "example": "Making environmental design knowledge and tools freely accessible to every person, project and design process", - "type": "string" + "permission": { + "description": "The permission given to the subject of the access policy", + "example": "write", + "allOf": [ + { + "$ref": "#/components/schemas/Permission" + } + ] }, "type": { "title": "Type", - "default": "OrganizationUpdate", + "default": "AccessPolicy", "type": "string", - "pattern": "^OrganizationUpdate$", + "pattern": "^AccessPolicy$", "readOnly": true } - } + }, + "required": [ + "subject", + "permission" + ] } ], - "title": "OrganizationUpdate", + "title": "AccessPolicy", "discriminator": { "propertyName": "type" } }, - "GenericInput": { + "_BaseReference": { "allOf": [ { "$ref": "#/components/schemas/_OpenAPIGenBaseModel" @@ -18229,15 +22761,10 @@ { "type": "object", "properties": { - "name": { - "title": "Name", - "description": "Input name.", - "type": "string" - }, "type": { "title": "Type", - "default": "GenericInput", - "pattern": "^GenericInput$", + "default": "_BaseReference", + "pattern": "^_BaseReference$", "type": "string", "readOnly": true }, @@ -18248,28 +22775,20 @@ "additionalProperties": { "type": "string" } - }, - "description": { - "title": "Description", - "description": "Optional description for input.", - "type": "string" } - }, - "required": [ - "name" - ] + } } ], - "title": "GenericInput", - "description": "Base class for all input types.", + "title": "_BaseReference", + "description": "A Base reference model.", "discriminator": { "propertyName": "type" } }, - "_DAGArtifactOutputAlias": { + "_DAGArtifactOutput": { "allOf": [ { - "$ref": "#/components/schemas/DAGGenericOutputAlias" + "$ref": "#/components/schemas/DAGGenericOutput" }, { "type": "object", @@ -18282,21 +22801,52 @@ }, "type": { "title": "Type", - "default": "DAGGenericOutputAlias", - "pattern": "^DAGGenericOutputAlias$", + "default": "DAGGenericOutput", + "pattern": "^DAGGenericOutput$", "type": "string", "readOnly": true } } } ], - "title": "_DAGArtifactOutputAlias", - "description": "Base class for DAG artifact output aliases.\n\nThis class add a required input. By default all artifact outputs are required.", + "title": "_DAGArtifactOutput", + "description": "Base class for DAG artifact outputs.\n\nThis class add a required input. By default all artifact outputs are required.", "discriminator": { "propertyName": "type" } }, - "GenericOutput": { + "FromOutput": { + "allOf": [ + { + "$ref": "#/components/schemas/GenericOutput" + }, + { + "type": "object", + "required": [ + "from" + ], + "properties": { + "from": { + "title": "From", + "description": "Reference to a file or a task output. Task output must be file." + }, + "type": { + "title": "Type", + "default": "FromOutput", + "pattern": "^FromOutput$", + "type": "string", + "readOnly": true + } + } + } + ], + "title": "FromOutput", + "description": "Base class for output classes that source ``from`` an object.\n\nSee DAG output classes for more examples.", + "discriminator": { + "propertyName": "type" + } + }, + "GenericInput": { "allOf": [ { "$ref": "#/components/schemas/_OpenAPIGenBaseModel" @@ -18306,13 +22856,13 @@ "properties": { "name": { "title": "Name", - "description": "Output name.", + "description": "Input name.", "type": "string" }, "type": { "title": "Type", - "default": "GenericOutput", - "pattern": "^GenericOutput$", + "default": "GenericInput", + "pattern": "^GenericInput$", "type": "string", "readOnly": true }, @@ -18326,7 +22876,7 @@ }, "description": { "title": "Description", - "description": "Optional description for output.", + "description": "Optional description for input.", "type": "string" } }, @@ -18335,51 +22885,129 @@ ] } ], - "title": "GenericOutput", - "description": "Base class for all output types.\n\nThe baseclass uses a name to source the output.", + "title": "GenericInput", + "description": "Base class for all input types.", "discriminator": { "propertyName": "type" } }, - "PathOutput": { + "ListResponseMeta": { "allOf": [ { - "$ref": "#/components/schemas/GenericOutput" + "$ref": "#/components/schemas/_OpenAPIGenBaseModel" + }, + { + "type": "object", + "properties": { + "page": { + "title": "Page", + "description": "The current page the pagination request is on", + "type": "integer", + "format": "int32" + }, + "per_page": { + "title": "Per Page", + "description": "The number of pages per pagination request", + "type": "integer", + "format": "int32" + }, + "page_count": { + "title": "Page Count", + "description": "The total number of pages", + "type": "integer", + "format": "int32" + }, + "total_count": { + "title": "Total Count", + "description": "The total number of resources matching the list request", + "type": "integer", + "format": "int32" + }, + "next_page": { + "title": "Next Page", + "description": "The next page, if this on is not the last", + "type": "integer", + "format": "int32" + }, + "resources": { + "title": "Resources", + "description": "The list of resources returned from the list query", + "default": [], + "type": "array", + "items": {} + }, + "type": { + "title": "Type", + "default": "ListResponseMeta", + "type": "string", + "pattern": "^ListResponseMeta$", + "readOnly": true + } + }, + "required": [ + "page", + "per_page", + "page_count", + "total_count" + ] + } + ], + "title": "ListResponseMeta", + "description": "A list response from a pagination request", + "discriminator": { + "propertyName": "type" + } + }, + "BaseStatus": { + "allOf": [ + { + "$ref": "#/components/schemas/IOBase" }, { "type": "object", "required": [ - "path" + "started_at" ], "properties": { - "path": { - "title": "Path", - "description": "Path to the output artifact relative to where the function command is executed.", + "started_at": { + "title": "Started At", + "description": "The time at which the task was started", + "type": "string", + "format": "date-time" + }, + "message": { + "title": "Message", + "description": "Any message produced by the task. Usually error/debugging hints.", "type": "string" }, - "required": { - "title": "Required", - "description": "A boolean to indicate if an artifact output is required. A False value makes the artifact optional.", - "default": true, - "type": "boolean" + "finished_at": { + "title": "Finished At", + "description": "The time at which the task was completed", + "type": "string", + "format": "date-time" + }, + "source": { + "title": "Source", + "description": "Source url for the status object. It can be a recipe or a function.", + "type": "string" }, "type": { "title": "Type", - "default": "PathOutput", - "pattern": "^PathOutput$", + "default": "BaseStatus", + "pattern": "^BaseStatus$", "type": "string", "readOnly": true } } } ], - "title": "PathOutput", - "description": "Base class for output classes that source tha output from a path.\n\nAn example of using PathOutput is TaskFile and TaskFolder outputs.", + "title": "BaseStatus", + "description": "Base Status model", "discriminator": { "propertyName": "type" } }, - "_ArtifactSource": { + "IOBase": { "allOf": [ { "$ref": "#/components/schemas/_OpenAPIGenBaseModel" @@ -18389,8 +23017,8 @@ "properties": { "type": { "title": "Type", - "default": "_ArtifactSource", - "pattern": "^_ArtifactSource$", + "default": "IOBase", + "pattern": "^IOBase$", "type": "string", "readOnly": true }, @@ -18401,17 +23029,29 @@ "additionalProperties": { "type": "string" } + }, + "inputs": { + "title": "Inputs", + "description": "Place-holder. Overwrite this!", + "type": "array", + "items": {} + }, + "outputs": { + "title": "Outputs", + "description": "Place-holder. Overwrite this!", + "type": "array", + "items": {} } } } ], - "title": "_ArtifactSource", - "description": "ArtifactSource.\n\nAn Artifact Source System.", + "title": "IOBase", + "description": "A reusable model for classes with Input and Output (IO) objects.\n\nIOBase is the baseclass for Function, DAG and Workflow.", "discriminator": { "propertyName": "type" } }, - "ListResponseMeta": { + "ExternalResource": { "allOf": [ { "$ref": "#/components/schemas/_OpenAPIGenBaseModel" @@ -18419,127 +23059,133 @@ { "type": "object", "properties": { - "page": { - "title": "Page", - "description": "The current page the pagination request is on", - "type": "integer", - "format": "int32" - }, - "per_page": { - "title": "Per Page", - "description": "The number of pages per pagination request", - "type": "integer", - "format": "int32" - }, - "page_count": { - "title": "Page Count", - "description": "The total number of pages", - "type": "integer", - "format": "int32" - }, - "total_count": { - "title": "Total Count", - "description": "The total number of resources matching the list request", - "type": "integer", - "format": "int32" - }, - "next_page": { - "title": "Next Page", - "description": "The next page, if this on is not the last", - "type": "integer", - "format": "int32" + "id": { + "title": "Id", + "type": "string" }, - "resources": { - "title": "Resources", - "description": "The list of resources returned from the list query", - "default": [], - "type": "array", - "items": {} + "metadata": { + "title": "Metadata", + "default": {}, + "type": "object" }, "type": { "title": "Type", - "default": "ListResponseMeta", + "default": "ExternalResource", "type": "string", - "pattern": "^ListResponseMeta$", + "pattern": "^ExternalResource$", "readOnly": true } }, "required": [ - "page", - "per_page", - "page_count", - "total_count" + "id" ] } ], - "title": "ListResponseMeta", - "description": "A list response from a pagination request", + "title": "ExternalResource", "discriminator": { "propertyName": "type" } }, - "_DAGArtifactOutput": { + "RepositoryPackage": { "allOf": [ { - "$ref": "#/components/schemas/DAGGenericOutput" + "$ref": "#/components/schemas/_OpenAPIGenBaseModel" }, { "type": "object", "properties": { - "required": { - "title": "Required", - "description": "A boolean to indicate if an artifact output is required. A False value makes the artifact optional.", - "default": true, - "type": "boolean" + "digest": { + "title": "Digest", + "description": "The new package digest", + "type": "string" + }, + "tag": { + "title": "Tag", + "description": "The new package tag", + "type": "string" + }, + "keywords": { + "title": "Keywords", + "description": "keywords", + "type": "array", + "items": { + "type": "string" + } + }, + "description": { + "title": "Description", + "description": "description", + "type": "string" + }, + "icon": { + "title": "Icon", + "description": "icon", + "type": "string" + }, + "created_at": { + "title": "Created At", + "description": "Creation Timestamp", + "type": "string", + "format": "date-time" + }, + "readme": { + "title": "Readme", + "description": "The Repository Readme", + "example": "# Daylight Factor \n This recipe runs a daylight factor simulation.", + "type": "string" }, "type": { "title": "Type", - "default": "DAGGenericOutput", - "pattern": "^DAGGenericOutput$", + "default": "RepositoryPackage", "type": "string", + "pattern": "^RepositoryPackage$", "readOnly": true } - } + }, + "required": [ + "digest", + "tag" + ] } ], - "title": "_DAGArtifactOutput", - "description": "Base class for DAG artifact outputs.\n\nThis class add a required input. By default all artifact outputs are required.", + "title": "RepositoryPackage", "discriminator": { "propertyName": "type" } }, - "FromOutput": { + "_InputReferenceBase": { "allOf": [ { - "$ref": "#/components/schemas/GenericOutput" + "$ref": "#/components/schemas/_BaseReference" }, { "type": "object", "required": [ - "from" + "variable" ], "properties": { - "from": { - "title": "From", - "description": "Reference to a file or a task output. Task output must be file." + "variable": { + "title": "Variable", + "description": "The name of the DAG input variable", + "type": "string" }, "type": { "title": "Type", - "default": "FromOutput", - "pattern": "^FromOutput$", + "default": "_InputReferenceBase", + "pattern": "^_InputReferenceBase$", "type": "string", "readOnly": true } } } ], - "title": "FromOutput", - "description": "Base class for output classes that source ``from`` an object.\n\nSee DAG output classes for more examples.", + "title": "_InputReferenceBase", + "description": "An input reference.", "discriminator": { "propertyName": "type" } }, - "AccessPolicy": { + "CryptlexBase": { "allOf": [ { "$ref": "#/components/schemas/_OpenAPIGenBaseModel" @@ -18547,82 +23193,92 @@ { "type": "object", "properties": { - "subject": { - "title": "Subject", - "description": "The subject of the access policy", - "allOf": [ - { - "$ref": "#/components/schemas/PolicySubject" - } - ] - }, - "permission": { - "description": "The permission given to the subject of the access policy", - "example": "write", - "allOf": [ - { - "$ref": "#/components/schemas/Permission" - } - ] - }, "type": { "title": "Type", - "default": "AccessPolicy", + "default": "CryptlexBase", "type": "string", - "pattern": "^AccessPolicy$", + "pattern": "^CryptlexBase$", "readOnly": true } - }, - "required": [ - "subject", - "permission" - ] + } } ], - "title": "AccessPolicy", + "title": "CryptlexBase", "discriminator": { "propertyName": "type" } }, - "_TaskReferenceBase": { + "_ArtifactSource": { "allOf": [ { - "$ref": "#/components/schemas/_BaseReference" + "$ref": "#/components/schemas/_OpenAPIGenBaseModel" }, { "type": "object", - "required": [ - "name", - "variable" - ], "properties": { - "name": { - "title": "Name", - "description": "The name of the task to pull output data from.", - "type": "string" + "type": { + "title": "Type", + "default": "_ArtifactSource", + "pattern": "^_ArtifactSource$", + "type": "string", + "readOnly": true }, - "variable": { - "title": "Variable", - "description": "The name of the variable.", - "type": "string" + "annotations": { + "title": "Annotations", + "description": "An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.", + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + } + ], + "title": "_ArtifactSource", + "description": "ArtifactSource.\n\nAn Artifact Source System.", + "discriminator": { + "propertyName": "type" + } + }, + "BaseList": { + "allOf": [ + { + "$ref": "#/components/schemas/_OpenAPIGenBaseModel" + }, + { + "type": "object", + "properties": { + "has_more": { + "title": "Has More", + "type": "boolean" + }, + "data": { + "title": "Data", + "type": "array", + "items": { + "type": "object" + } }, "type": { "title": "Type", - "default": "_TaskReferenceBase", - "pattern": "^_TaskReferenceBase$", + "default": "BaseList", "type": "string", + "pattern": "^BaseList$", "readOnly": true } - } + }, + "required": [ + "has_more", + "data" + ] } ], - "title": "_TaskReferenceBase", - "description": "A Task Reference", + "title": "BaseList", "discriminator": { "propertyName": "type" } }, - "_BaseReference": { + "_SecureResourcePublic": { "allOf": [ { "$ref": "#/components/schemas/_OpenAPIGenBaseModel" @@ -18630,31 +23286,30 @@ { "type": "object", "properties": { + "client_secret": { + "title": "Client Secret", + "description": "Secret string to be used to retrieve the resource from the client", + "type": "string" + }, "type": { "title": "Type", - "default": "_BaseReference", - "pattern": "^_BaseReference$", + "default": "_SecureResourcePublic", "type": "string", + "pattern": "^_SecureResourcePublic$", "readOnly": true - }, - "annotations": { - "title": "Annotations", - "description": "An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.", - "type": "object", - "additionalProperties": { - "type": "string" - } } - } + }, + "required": [ + "client_secret" + ] } ], - "title": "_BaseReference", - "description": "A Base reference model.", + "title": "_SecureResourcePublic", "discriminator": { "propertyName": "type" } }, - "_InputReferenceBase": { + "_TaskReferenceBase": { "allOf": [ { "$ref": "#/components/schemas/_BaseReference" @@ -18662,70 +23317,71 @@ { "type": "object", "required": [ + "name", "variable" ], "properties": { + "name": { + "title": "Name", + "description": "The name of the task to pull output data from.", + "type": "string" + }, "variable": { "title": "Variable", - "description": "The name of the DAG input variable", + "description": "The name of the variable.", "type": "string" }, "type": { "title": "Type", - "default": "_InputReferenceBase", - "pattern": "^_InputReferenceBase$", + "default": "_TaskReferenceBase", + "pattern": "^_TaskReferenceBase$", "type": "string", "readOnly": true } } } ], - "title": "_InputReferenceBase", - "description": "An input reference.", + "title": "_TaskReferenceBase", + "description": "A Task Reference", "discriminator": { "propertyName": "type" } }, - "IOBase": { + "Product": { "allOf": [ { - "$ref": "#/components/schemas/_OpenAPIGenBaseModel" + "$ref": "#/components/schemas/ExternalResource" }, { "type": "object", + "required": [ + "active", + "name" + ], "properties": { + "active": { + "title": "Active", + "type": "boolean" + }, + "name": { + "title": "Name", + "type": "string" + }, + "description": { + "title": "Description", + "type": "string" + }, "type": { "title": "Type", - "default": "IOBase", - "pattern": "^IOBase$", + "default": "Product", "type": "string", + "pattern": "^Product$", "readOnly": true - }, - "annotations": { - "title": "Annotations", - "description": "An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.", - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "inputs": { - "title": "Inputs", - "description": "Place-holder. Overwrite this!", - "type": "array", - "items": {} - }, - "outputs": { - "title": "Outputs", - "description": "Place-holder. Overwrite this!", - "type": "array", - "items": {} } } } ], - "title": "IOBase", - "description": "A reusable model for classes with Input and Output (IO) objects.\n\nIOBase is the baseclass for Function, DAG and Workflow.", + "title": "Product", "discriminator": { "propertyName": "type" } @@ -18798,143 +23454,117 @@ "propertyName": "type" } }, - "RepositoryPackage": { - "allOf": [ - { - "$ref": "#/components/schemas/_OpenAPIGenBaseModel" - }, - { - "type": "object", - "properties": { - "digest": { - "title": "Digest", - "description": "The new package digest", - "type": "string" - }, - "tag": { - "title": "Tag", - "description": "The new package tag", - "type": "string" - }, - "keywords": { - "title": "Keywords", - "description": "keywords", - "type": "array", - "items": { - "type": "string" - } - }, - "description": { - "title": "Description", - "description": "description", - "type": "string" - }, - "icon": { - "title": "Icon", - "description": "icon", - "type": "string" - }, - "created_at": { - "title": "Created At", - "description": "Creation Timestamp", - "type": "string", - "format": "date-time" - }, - "readme": { - "title": "Readme", - "description": "The Repository Readme", - "example": "# Daylight Factor \n This recipe runs a daylight factor simulation.", - "type": "string" - }, - "type": { - "title": "Type", - "default": "RepositoryPackage", - "type": "string", - "pattern": "^RepositoryPackage$", - "readOnly": true - } - }, - "required": [ - "digest", - "tag" - ] + "_OpenAPIGenBaseModel": { + "title": "_OpenAPIGenBaseModel", + "type": "object", + "properties": { + "type": { + "title": "Type", + "description": "A base class to use when there is no baseclass available to fall on.", + "default": "InvalidType", + "type": "string", + "readOnly": true } - ], - "title": "RepositoryPackage", + }, "discriminator": { "propertyName": "type" } }, - "BaseStatus": { - "allOf": [ - { - "$ref": "#/components/schemas/IOBase" - }, - { - "type": "object", - "required": [ - "started_at" - ], - "properties": { - "started_at": { - "title": "Started At", - "description": "The time at which the task was started", - "type": "string", - "format": "date-time" - }, - "message": { - "title": "Message", - "description": "Any message produced by the task. Usually error/debugging hints.", - "type": "string" - }, - "finished_at": { - "title": "Finished At", - "description": "The time at which the task was completed", - "type": "string", - "format": "date-time" - }, - "source": { - "title": "Source", - "description": "Source url for the status object. It can be a recipe or a function.", - "type": "string" - }, - "type": { - "title": "Type", - "default": "BaseStatus", - "pattern": "^BaseStatus$", - "type": "string", - "readOnly": true - } + "HTTPValidationError": { + "title": "HTTPValidationError", + "type": "object", + "properties": { + "detail": { + "title": "Detail", + "type": "array", + "items": { + "$ref": "#/components/schemas/ValidationError" } } - ], - "title": "BaseStatus", - "description": "Base Status model", - "discriminator": { - "propertyName": "type" } }, - "_OpenAPIGenBaseModel": { - "title": "_OpenAPIGenBaseModel", + "PackageSortKey": { + "title": "PackageSortKey", + "enum": [ + "created_at", + "updated_at", + "tag" + ], + "type": "string", + "description": "An enumeration." + }, + "ProjectSortKey": { + "title": "ProjectSortKey", + "enum": [ + "created_at", + "updated_at", + "name" + ], + "type": "string", + "description": "An enumeration." + }, + "RepositorySortKey": { + "title": "RepositorySortKey", + "enum": [ + "created_at", + "updated_at", + "name", + "latest_tag" + ], + "type": "string", + "description": "An enumeration." + }, + "RoleEnum": { + "title": "RoleEnum", + "enum": [ + "owner", + "member" + ], + "type": "string", + "description": "An enumeration." + }, + "SortEnum": { + "title": "SortEnum", + "enum": [ + "ascending", + "descending" + ], + "type": "string", + "description": "An enumeration." + }, + "ValidationError": { + "title": "ValidationError", + "required": [ + "loc", + "msg", + "type" + ], "type": "object", "properties": { + "loc": { + "title": "Location", + "type": "array", + "items": { + "type": "string" + } + }, + "msg": { + "title": "Message", + "type": "string" + }, "type": { - "title": "Type", - "description": "A base class to use when there is no baseclass available to fall on.", - "default": "InvalidType", + "title": "Error Type", "type": "string", "readOnly": true } - }, - "discriminator": { - "propertyName": "type" } } }, "securitySchemes": { "JWTAuth": { "type": "http", - "scheme": "bearer" + "scheme": "bearer", + "bearerFormat": "JWT" }, "APIKeyAuth": { "type": "apiKey", @@ -18943,4 +23573,4 @@ } } } -} \ No newline at end of file +} diff --git a/.openapi-docs/openapi_mapper.json b/.openapi-docs/openapi_mapper.json index 11d024755..2f817a0ed 100644 --- a/.openapi-docs/openapi_mapper.json +++ b/.openapi-docs/openapi_mapper.json @@ -6,13 +6,21 @@ "APITokenPrivate": "app.server.rest.api_tokens.dto", "AccessPolicy": "app.server.rest.access_policies.dto", "AccessPolicyList": "app.server.rest.access_policies.dto", + "Accessor": "app.server.rest.access_policies.dto", "AccountPublic": "app.server.rest.accounts.dto", + "Activation": "app.domains.licenses.entities", + "ActivationList": "app.server.rest.licenses.dto", + "BakedRecipe": "queenbee.recipe.recipe", + "BaseList": "app.domains.payments.entities", "BaseStatus": "queenbee.job.status", "Body_post_plugin__owner__plugins_post": "pydantic.main", "Body_post_recipe__owner__recipes_post": "pydantic.main", + "CardPublic": "app.server.rest.payments.dto", "CloudJob": "app.server.rest.jobs.dto", "CloudJobList": "app.server.rest.jobs.dto", + "Coupon": "app.domains.payments.entities", "CreatedContent": "honeycomb_wax.schema.responses", + "CryptlexBase": "app.domains.licenses.entities", "DAG": "queenbee.recipe.dag", "DAGArrayInput": "queenbee.io.inputs.dag", "DAGArrayInputAlias": "queenbee.io.inputs.alias", @@ -59,8 +67,12 @@ "DAGTask": "queenbee.recipe.task", "DAGTaskLoop": "queenbee.recipe.task", "DailyUsage": "app.domains.jobs.entities", + "DeleteSubscriptionItem": "app.domains.payments.entities", "Dependency": "queenbee.recipe.dependency", + "Discount": "app.domains.payments.entities", + "DiscountAmount": "app.domains.payments.entities", "DockerConfig": "queenbee.plugin.plugin", + "ExternalResource": "app.domains.payments.entities", "FileMeta": "app.server.rest.artifacts.dto", "FileReference": "queenbee.io.reference", "FolderReference": "queenbee.io.reference", @@ -93,6 +105,11 @@ "InputFolderReference": "queenbee.io.reference", "InputPathReference": "queenbee.io.reference", "InputReference": "queenbee.io.reference", + "Inventory": "app.domains.payments.entities", + "Invoice": "app.domains.payments.entities", + "InvoiceList": "app.server.rest.payments.dto", + "InvoicePreview": "app.server.rest.payments.dto", + "InvoiceStatusTransitions": "app.domains.payments.entities", "ItemReference": "queenbee.io.reference", "Job": "queenbee.job.job", "JobArgument": "queenbee.io.inputs.job", @@ -100,12 +117,25 @@ "JobStatus": "queenbee.job.job", "KeyRequest": "app.server.rest.artifacts.dto", "License": "queenbee.base.metadata", + "LicensePoolAccessPolicy": "app.server.rest.licenses.dto", + "LicensePoolAccessPolicyList": "app.server.rest.licenses.dto", + "LicensePoolList": "app.server.rest.licenses.dto", + "LicensePoolPolicySubject": "app.server.rest.licenses.dto", + "LicensePoolPolicySubjectList": "app.server.rest.licenses.dto", + "LicensePoolPublic": "app.server.rest.licenses.dto", + "LicensePoolUpdate": "app.server.rest.licenses.dto", + "LicensePublic": "app.server.rest.licenses.dto", + "LineItem": "app.domains.payments.entities", + "LineItemList": "app.domains.payments.entities", "ListResponseMeta": "honeycomb_wax.schema.responses", "LocalConfig": "queenbee.plugin.plugin", + "Location": "app.domains.licenses.entities", "Maintainer": "queenbee.base.metadata", "MetaData": "queenbee.base.metadata", + "Metadata": "app.domains.licenses.entities", "NewPluginPackage": "app.server.rest.repositories.endpoints_plugin", "NewRecipePackage": "app.server.rest.repositories.endpoints_recipe", + "NewSubscriptionItem": "app.domains.payments.entities", "Organization": "app.server.rest.organizations.dto", "OrganizationCreate": "app.server.rest.organizations.dto", "OrganizationList": "app.server.rest.organizations.dto", @@ -115,11 +145,22 @@ "PackageSortKey": "app.server.rest.repositories.query", "PackageVersion": "queenbee.repository.package", "PathOutput": "queenbee.io.common", + "PaymentCreate": "app.server.rest.payments.dto", + "PaymentIntent": "app.server.rest.payments.dto", + "PaymentMethodList": "app.server.rest.payments.dto", + "PaymentSetup": "app.server.rest.payments.dto", + "Period": "app.domains.payments.entities", "Plugin": "queenbee.plugin.plugin", "PluginConfig": "queenbee.plugin.plugin", "PluginPackage": "app.server.rest.repositories.endpoints_plugin", "PluginPackageList": "app.server.rest.repositories.endpoints_plugin", "PolicySubject": "app.server.rest.access_policies.dto", + "PollinationSubscription": "app.server.rest.subscriptions.dto", + "Price": "app.domains.payments.entities", + "PriceRecurrence": "app.domains.payments.entities", + "PriceTier": "app.domains.payments.entities", + "Product": "app.domains.payments.entities", + "ProductFamily": "app.domains.payments.entities", "Project": "app.server.rest.projects.dto", "ProjectAccessPolicy": "app.server.rest.projects.dto", "ProjectAccessPolicyList": "app.server.rest.projects.dto", @@ -132,6 +173,10 @@ "ProjectSortKey": "app.server.rest.projects.query", "ProjectUpdate": "app.server.rest.projects.dto", "PublicAccountList": "app.server.rest.accounts.dto", + "Quota": "app.server.rest.quotas.dto", + "QuotaExtension": "app.domains.subscriptions.entities", + "QuotaList": "app.server.rest.quotas.dto", + "QuotaPlan": "app.domains.subscriptions.entities", "Recipe": "queenbee.recipe.recipe", "RecipeInterface": "queenbee.recipe.recipe", "RecipeInterfaceList": "app.domains.registries.repositories", @@ -149,12 +194,18 @@ "RepositorySortKey": "app.server.rest.repositories.query", "RepositoryUpdate": "app.server.rest.repositories.dto", "RepositoryUserPermissions": "app.server.rest.repositories.dto", + "ResourcesDuration": "app.domains.jobs.entities", + "RoleEnum": "app.server.rest.accounts.query", "Run": "app.server.rest.jobs.dto", "RunList": "app.server.rest.jobs.dto", + "RunMeta": "app.domains.jobs.entities", + "RunProgress": "app.domains.jobs.entities", "RunResultList": "app.server.rest.jobs.dto", "RunStatus": "queenbee.job.run", "S3": "queenbee.io.artifact_source", "S3UploadRequest": "app.server.rest.artifacts.dto", + "SortEnum": "app.helpers.query", + "Status": "app.server.rest.payments.dto", "StepArrayInput": "queenbee.io.inputs.step", "StepArrayOutput": "queenbee.io.outputs.step", "StepBooleanInput": "queenbee.io.inputs.step", @@ -175,6 +226,13 @@ "StepStatus": "queenbee.job.run", "StepStringInput": "queenbee.io.inputs.step", "StepStringOutput": "queenbee.io.outputs.step", + "Subscribe": "app.server.rest.payments.dto", + "Subscription": "app.domains.payments.entities", + "SubscriptionCreate": "app.server.rest.payments.dto", + "SubscriptionItem": "app.domains.payments.entities", + "SubscriptionItemList": "app.domains.payments.entities", + "SubscriptionPlan": "app.domains.subscriptions.entities", + "SubscriptionUpdate": "app.server.rest.payments.dto", "TaskArgument": "queenbee.io.inputs.task", "TaskFileReference": "queenbee.io.reference", "TaskFolderReference": "queenbee.io.reference", @@ -189,7 +247,9 @@ "TeamMember": "app.server.rest.teams.dto", "TeamMemberList": "app.server.rest.teams.dto", "TeamUpdate": "app.server.rest.teams.dto", + "TemplateFunction": "queenbee.recipe.recipe", "UpdateAccepted": "honeycomb_wax.schema.responses", + "UpdateInvoicePreview": "app.server.rest.payments.dto", "Usage": "app.domains.jobs.entities", "UserCreate": "app.server.rest.user.dto", "UserPermission": "app.server.rest.access_policies.dto", @@ -206,7 +266,14 @@ "_DAGArtifactOutput": "queenbee.io.outputs.dag", "_DAGArtifactOutputAlias": "queenbee.io.outputs.alias", "_InputReferenceBase": "queenbee.io.reference", + "_SecureResourcePublic": "app.server.rest.payments.dto", "_TaskReferenceBase": "queenbee.io.reference", + "app__domains__accounts__entities__AccountType": "app.domains.accounts.entities", + "app__domains__licenses__entities__LicenseType": "app.domains.licenses.entities", + "app__domains__payments__entities__CouponDuration": "app.domains.payments.entities", + "app__domains__payments__entities__InvoiceStatus": "app.domains.payments.entities", + "app__domains__payments__entities__PriceType": "app.domains.payments.entities", + "app__domains__quotas__entities__QuotaType": "app.domains.quotas.entities", "app__server__rest__access_policies__dto__Permission": "app.server.rest.access_policies.dto", "app__server__rest__access_policies__dto__SubjectType": "app.server.rest.access_policies.dto", "app__server__rest__organizations__dto__OrganizationRoleEnum": "app.server.rest.organizations.dto", @@ -219,15 +286,21 @@ "queenbee__recipe__dependency__DependencyKind": "queenbee.recipe.dependency" }, "enums": { + "AccountType": "app.domains.accounts.entities", + "CouponDuration": "app.domains.payments.entities", "DependencyKind": "queenbee.recipe.dependency", + "InvoiceStatus": "app.domains.payments.entities", "ItemType": "queenbee.io.common", "JobStatusEnum": "queenbee.job.job", + "LicenseType": "app.domains.licenses.entities", "OrganizationRoleEnum": "app.server.rest.organizations.dto", "Permission": "app.server.rest.access_policies.dto", + "PriceType": "app.domains.payments.entities", + "QuotaType": "app.domains.quotas.entities", "RunStatusEnum": "queenbee.job.run", "StatusType": "queenbee.job.run", "StepStatusEnum": "queenbee.job.run", "SubjectType": "app.server.rest.access_policies.dto", "TeamRoleEnum": "app.server.rest.teams.dto" } -} \ No newline at end of file +} diff --git a/.openapi-generator/.openapi-config.json b/.openapi-generator/.openapi-config.json index ce02d3d50..de7027031 100644 --- a/.openapi-generator/.openapi-config.json +++ b/.openapi-generator/.openapi-config.json @@ -2,7 +2,7 @@ "packageName": "PollinationSDK", "projectName": "PollinationSDK", "packageUrl": "https://github.com/pollination/csharp-sdk", - "packageVersion": "0.14.0", + "packageVersion": "0.23.0", "sourceFolder": "src", "optionalAssemblyInfo": false, "optionalProjectFile": false diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index d924eaee2..4292013b2 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -12,12 +12,23 @@ docs/AccessPolicy.md docs/AccessPolicyAllOf.md docs/AccessPolicyList.md docs/AccessPolicyListAllOf.md +docs/Accessor.md +docs/AccessorAllOf.md docs/AccountPublic.md docs/AccountPublicAllOf.md +docs/AccountType.md docs/AccountsApi.md +docs/Activation.md +docs/ActivationAllOf.md +docs/ActivationList.md +docs/ActivationListAllOf.md docs/ArtifactSource.md docs/ArtifactSourceAllOf.md docs/ArtifactsApi.md +docs/BakedRecipe.md +docs/BakedRecipeAllOf.md +docs/BaseList.md +docs/BaseListAllOf.md docs/BaseReference.md docs/BaseReferenceAllOf.md docs/BaseStatus.md @@ -26,12 +37,19 @@ docs/BodyPostPluginOwnerPluginsPost.md docs/BodyPostPluginOwnerPluginsPostAllOf.md docs/BodyPostRecipeOwnerRecipesPost.md docs/BodyPostRecipeOwnerRecipesPostAllOf.md +docs/CardPublic.md +docs/CardPublicAllOf.md docs/CloudJob.md docs/CloudJobAllOf.md docs/CloudJobList.md docs/CloudJobListAllOf.md +docs/Coupon.md +docs/CouponAllOf.md +docs/CouponDuration.md docs/CreatedContent.md docs/CreatedContentAllOf.md +docs/CryptlexBase.md +docs/CryptlexBaseAllOf.md docs/DAG.md docs/DAGAllOf.md docs/DAGArrayInput.md @@ -128,11 +146,19 @@ docs/DAGTaskLoop.md docs/DAGTaskLoopAllOf.md docs/DailyUsage.md docs/DailyUsageAllOf.md +docs/DeleteSubscriptionItem.md +docs/DeleteSubscriptionItemAllOf.md docs/Dependency.md docs/DependencyAllOf.md docs/DependencyKind.md +docs/Discount.md +docs/DiscountAllOf.md +docs/DiscountAmount.md +docs/DiscountAmountAllOf.md docs/DockerConfig.md docs/DockerConfigAllOf.md +docs/ExternalResource.md +docs/ExternalResourceAllOf.md docs/FileMeta.md docs/FileMetaAllOf.md docs/FileReference.md @@ -185,6 +211,7 @@ docs/GenericOutput.md docs/GenericOutputAllOf.md docs/HTTP.md docs/HTTPAllOf.md +docs/HTTPValidationError.md docs/IOAliasHandler.md docs/IOAliasHandlerAllOf.md docs/IOBase.md @@ -199,6 +226,17 @@ docs/InputReference.md docs/InputReferenceAllOf.md docs/InputReferenceBase.md docs/InputReferenceBaseAllOf.md +docs/Inventory.md +docs/InventoryAllOf.md +docs/Invoice.md +docs/InvoiceAllOf.md +docs/InvoiceList.md +docs/InvoiceListAllOf.md +docs/InvoicePreview.md +docs/InvoicePreviewAllOf.md +docs/InvoiceStatus.md +docs/InvoiceStatusTransitions.md +docs/InvoiceStatusTransitionsAllOf.md docs/ItemReference.md docs/ItemReferenceAllOf.md docs/ItemType.md @@ -216,18 +254,46 @@ docs/KeyRequest.md docs/KeyRequestAllOf.md docs/License.md docs/LicenseAllOf.md +docs/LicensePoolAccessPolicy.md +docs/LicensePoolAccessPolicyAllOf.md +docs/LicensePoolAccessPolicyList.md +docs/LicensePoolAccessPolicyListAllOf.md +docs/LicensePoolList.md +docs/LicensePoolListAllOf.md +docs/LicensePoolPolicySubject.md +docs/LicensePoolPolicySubjectAllOf.md +docs/LicensePoolPolicySubjectList.md +docs/LicensePoolPolicySubjectListAllOf.md +docs/LicensePoolPublic.md +docs/LicensePoolPublicAllOf.md +docs/LicensePoolUpdate.md +docs/LicensePoolUpdateAllOf.md +docs/LicensePublic.md +docs/LicensePublicAllOf.md +docs/LicenseType.md +docs/LicensesApi.md +docs/LineItem.md +docs/LineItemAllOf.md +docs/LineItemList.md +docs/LineItemListAllOf.md docs/ListResponseMeta.md docs/ListResponseMetaAllOf.md docs/LocalConfig.md docs/LocalConfigAllOf.md +docs/Location.md +docs/LocationAllOf.md docs/Maintainer.md docs/MaintainerAllOf.md docs/MetaData.md docs/MetaDataAllOf.md +docs/Metadata.md +docs/MetadataAllOf.md docs/NewPluginPackage.md docs/NewPluginPackageAllOf.md docs/NewRecipePackage.md docs/NewRecipePackageAllOf.md +docs/NewSubscriptionItem.md +docs/NewSubscriptionItemAllOf.md docs/OpenAPIGenBaseModel.md docs/Organization.md docs/OrganizationAllOf.md @@ -243,10 +309,22 @@ docs/OrganizationRoleEnum.md docs/OrganizationUpdate.md docs/OrganizationUpdateAllOf.md docs/OrgsApi.md +docs/PackageSortKey.md docs/PackageVersion.md docs/PackageVersionAllOf.md docs/PathOutput.md docs/PathOutputAllOf.md +docs/PaymentCreate.md +docs/PaymentCreateAllOf.md +docs/PaymentIntent.md +docs/PaymentIntentAllOf.md +docs/PaymentMethodList.md +docs/PaymentMethodListAllOf.md +docs/PaymentSetup.md +docs/PaymentSetupAllOf.md +docs/PaymentsApi.md +docs/Period.md +docs/PeriodAllOf.md docs/Permission.md docs/Plugin.md docs/PluginAllOf.md @@ -259,6 +337,19 @@ docs/PluginPackageListAllOf.md docs/PluginsApi.md docs/PolicySubject.md docs/PolicySubjectAllOf.md +docs/PollinationSubscription.md +docs/PollinationSubscriptionAllOf.md +docs/Price.md +docs/PriceAllOf.md +docs/PriceRecurrence.md +docs/PriceRecurrenceAllOf.md +docs/PriceTier.md +docs/PriceTierAllOf.md +docs/PriceType.md +docs/Product.md +docs/ProductAllOf.md +docs/ProductFamily.md +docs/ProductFamilyAllOf.md docs/Project.md docs/ProjectAccessPolicy.md docs/ProjectAccessPolicyAllOf.md @@ -277,11 +368,21 @@ docs/ProjectRecipeFilter.md docs/ProjectRecipeFilterAllOf.md docs/ProjectRecipeFilterList.md docs/ProjectRecipeFilterListAllOf.md +docs/ProjectSortKey.md docs/ProjectUpdate.md docs/ProjectUpdateAllOf.md docs/ProjectsApi.md docs/PublicAccountList.md docs/PublicAccountListAllOf.md +docs/Quota.md +docs/QuotaAllOf.md +docs/QuotaExtension.md +docs/QuotaExtensionAllOf.md +docs/QuotaList.md +docs/QuotaListAllOf.md +docs/QuotaPlan.md +docs/QuotaPlanAllOf.md +docs/QuotaType.md docs/Recipe.md docs/RecipeAllOf.md docs/RecipeInterface.md @@ -312,15 +413,22 @@ docs/RepositoryPackage.md docs/RepositoryPackageAllOf.md docs/RepositoryPolicySubject.md docs/RepositoryPolicySubjectAllOf.md +docs/RepositorySortKey.md docs/RepositoryUpdate.md docs/RepositoryUpdateAllOf.md docs/RepositoryUserPermissions.md docs/RepositoryUserPermissionsAllOf.md +docs/ResourcesDuration.md +docs/ResourcesDurationAllOf.md docs/RoleEnum.md docs/Run.md docs/RunAllOf.md docs/RunList.md docs/RunListAllOf.md +docs/RunMeta.md +docs/RunMetaAllOf.md +docs/RunProgress.md +docs/RunProgressAllOf.md docs/RunResultList.md docs/RunResultListAllOf.md docs/RunStatus.md @@ -331,7 +439,11 @@ docs/S3.md docs/S3AllOf.md docs/S3UploadRequest.md docs/S3UploadRequestAllOf.md +docs/SecureResourcePublic.md +docs/SecureResourcePublicAllOf.md docs/SortEnum.md +docs/Status.md +docs/StatusAllOf.md docs/StatusType.md docs/StepArrayInput.md docs/StepArrayInputAllOf.md @@ -375,6 +487,21 @@ docs/StepStringInputAllOf.md docs/StepStringOutput.md docs/StepStringOutputAllOf.md docs/SubjectType.md +docs/Subscribe.md +docs/SubscribeAllOf.md +docs/Subscription.md +docs/SubscriptionAllOf.md +docs/SubscriptionCreate.md +docs/SubscriptionCreateAllOf.md +docs/SubscriptionItem.md +docs/SubscriptionItemAllOf.md +docs/SubscriptionItemList.md +docs/SubscriptionItemListAllOf.md +docs/SubscriptionPlan.md +docs/SubscriptionPlanAllOf.md +docs/SubscriptionUpdate.md +docs/SubscriptionUpdateAllOf.md +docs/SubscriptionsApi.md docs/TaskArgument.md docs/TaskArgumentAllOf.md docs/TaskFileReference.md @@ -407,8 +534,12 @@ docs/TeamRoleEnum.md docs/TeamUpdate.md docs/TeamUpdateAllOf.md docs/TeamsApi.md +docs/TemplateFunction.md +docs/TemplateFunctionAllOf.md docs/UpdateAccepted.md docs/UpdateAcceptedAllOf.md +docs/UpdateInvoicePreview.md +docs/UpdateInvoicePreviewAllOf.md docs/Usage.md docs/UsageAllOf.md docs/UserApi.md @@ -425,6 +556,7 @@ docs/UserPublicListAllOf.md docs/UserUpdate.md docs/UserUpdateAllOf.md docs/UsersApi.md +docs/ValidationError.md docs/ValueFileReference.md docs/ValueFileReferenceAllOf.md docs/ValueFolderReference.md @@ -437,12 +569,15 @@ src/PollinationSDK.Test/Api/APITokensApiTests.cs src/PollinationSDK.Test/Api/AccountsApiTests.cs src/PollinationSDK.Test/Api/ArtifactsApiTests.cs src/PollinationSDK.Test/Api/JobsApiTests.cs +src/PollinationSDK.Test/Api/LicensesApiTests.cs src/PollinationSDK.Test/Api/OrgsApiTests.cs +src/PollinationSDK.Test/Api/PaymentsApiTests.cs src/PollinationSDK.Test/Api/PluginsApiTests.cs src/PollinationSDK.Test/Api/ProjectsApiTests.cs src/PollinationSDK.Test/Api/RecipesApiTests.cs src/PollinationSDK.Test/Api/RegistriesApiTests.cs src/PollinationSDK.Test/Api/RunsApiTests.cs +src/PollinationSDK.Test/Api/SubscriptionsApiTests.cs src/PollinationSDK.Test/Api/TeamsApiTests.cs src/PollinationSDK.Test/Api/UserApiTests.cs src/PollinationSDK.Test/Api/UsersApiTests.cs @@ -458,10 +593,21 @@ src/PollinationSDK.Test/Model/AccessPolicyAllOfTests.cs src/PollinationSDK.Test/Model/AccessPolicyListAllOfTests.cs src/PollinationSDK.Test/Model/AccessPolicyListTests.cs src/PollinationSDK.Test/Model/AccessPolicyTests.cs +src/PollinationSDK.Test/Model/AccessorAllOfTests.cs +src/PollinationSDK.Test/Model/AccessorTests.cs src/PollinationSDK.Test/Model/AccountPublicAllOfTests.cs src/PollinationSDK.Test/Model/AccountPublicTests.cs +src/PollinationSDK.Test/Model/AccountTypeTests.cs +src/PollinationSDK.Test/Model/ActivationAllOfTests.cs +src/PollinationSDK.Test/Model/ActivationListAllOfTests.cs +src/PollinationSDK.Test/Model/ActivationListTests.cs +src/PollinationSDK.Test/Model/ActivationTests.cs src/PollinationSDK.Test/Model/ArtifactSourceAllOfTests.cs src/PollinationSDK.Test/Model/ArtifactSourceTests.cs +src/PollinationSDK.Test/Model/BakedRecipeAllOfTests.cs +src/PollinationSDK.Test/Model/BakedRecipeTests.cs +src/PollinationSDK.Test/Model/BaseListAllOfTests.cs +src/PollinationSDK.Test/Model/BaseListTests.cs src/PollinationSDK.Test/Model/BaseReferenceAllOfTests.cs src/PollinationSDK.Test/Model/BaseReferenceTests.cs src/PollinationSDK.Test/Model/BaseStatusAllOfTests.cs @@ -470,12 +616,19 @@ src/PollinationSDK.Test/Model/BodyPostPluginOwnerPluginsPostAllOfTests.cs src/PollinationSDK.Test/Model/BodyPostPluginOwnerPluginsPostTests.cs src/PollinationSDK.Test/Model/BodyPostRecipeOwnerRecipesPostAllOfTests.cs src/PollinationSDK.Test/Model/BodyPostRecipeOwnerRecipesPostTests.cs +src/PollinationSDK.Test/Model/CardPublicAllOfTests.cs +src/PollinationSDK.Test/Model/CardPublicTests.cs src/PollinationSDK.Test/Model/CloudJobAllOfTests.cs src/PollinationSDK.Test/Model/CloudJobListAllOfTests.cs src/PollinationSDK.Test/Model/CloudJobListTests.cs src/PollinationSDK.Test/Model/CloudJobTests.cs +src/PollinationSDK.Test/Model/CouponAllOfTests.cs +src/PollinationSDK.Test/Model/CouponDurationTests.cs +src/PollinationSDK.Test/Model/CouponTests.cs src/PollinationSDK.Test/Model/CreatedContentAllOfTests.cs src/PollinationSDK.Test/Model/CreatedContentTests.cs +src/PollinationSDK.Test/Model/CryptlexBaseAllOfTests.cs +src/PollinationSDK.Test/Model/CryptlexBaseTests.cs src/PollinationSDK.Test/Model/DAGAllOfTests.cs src/PollinationSDK.Test/Model/DAGArrayInputAliasAllOfTests.cs src/PollinationSDK.Test/Model/DAGArrayInputAliasTests.cs @@ -572,11 +725,19 @@ src/PollinationSDK.Test/Model/DAGTaskTests.cs src/PollinationSDK.Test/Model/DAGTests.cs src/PollinationSDK.Test/Model/DailyUsageAllOfTests.cs src/PollinationSDK.Test/Model/DailyUsageTests.cs +src/PollinationSDK.Test/Model/DeleteSubscriptionItemAllOfTests.cs +src/PollinationSDK.Test/Model/DeleteSubscriptionItemTests.cs src/PollinationSDK.Test/Model/DependencyAllOfTests.cs src/PollinationSDK.Test/Model/DependencyKindTests.cs src/PollinationSDK.Test/Model/DependencyTests.cs +src/PollinationSDK.Test/Model/DiscountAllOfTests.cs +src/PollinationSDK.Test/Model/DiscountAmountAllOfTests.cs +src/PollinationSDK.Test/Model/DiscountAmountTests.cs +src/PollinationSDK.Test/Model/DiscountTests.cs src/PollinationSDK.Test/Model/DockerConfigAllOfTests.cs src/PollinationSDK.Test/Model/DockerConfigTests.cs +src/PollinationSDK.Test/Model/ExternalResourceAllOfTests.cs +src/PollinationSDK.Test/Model/ExternalResourceTests.cs src/PollinationSDK.Test/Model/FileMetaAllOfTests.cs src/PollinationSDK.Test/Model/FileMetaTests.cs src/PollinationSDK.Test/Model/FileReferenceAllOfTests.cs @@ -629,6 +790,7 @@ src/PollinationSDK.Test/Model/GenericOutputAllOfTests.cs src/PollinationSDK.Test/Model/GenericOutputTests.cs src/PollinationSDK.Test/Model/HTTPAllOfTests.cs src/PollinationSDK.Test/Model/HTTPTests.cs +src/PollinationSDK.Test/Model/HTTPValidationErrorTests.cs src/PollinationSDK.Test/Model/IOAliasHandlerAllOfTests.cs src/PollinationSDK.Test/Model/IOAliasHandlerTests.cs src/PollinationSDK.Test/Model/IOBaseAllOfTests.cs @@ -643,6 +805,17 @@ src/PollinationSDK.Test/Model/InputReferenceAllOfTests.cs src/PollinationSDK.Test/Model/InputReferenceBaseAllOfTests.cs src/PollinationSDK.Test/Model/InputReferenceBaseTests.cs src/PollinationSDK.Test/Model/InputReferenceTests.cs +src/PollinationSDK.Test/Model/InventoryAllOfTests.cs +src/PollinationSDK.Test/Model/InventoryTests.cs +src/PollinationSDK.Test/Model/InvoiceAllOfTests.cs +src/PollinationSDK.Test/Model/InvoiceListAllOfTests.cs +src/PollinationSDK.Test/Model/InvoiceListTests.cs +src/PollinationSDK.Test/Model/InvoicePreviewAllOfTests.cs +src/PollinationSDK.Test/Model/InvoicePreviewTests.cs +src/PollinationSDK.Test/Model/InvoiceStatusTests.cs +src/PollinationSDK.Test/Model/InvoiceStatusTransitionsAllOfTests.cs +src/PollinationSDK.Test/Model/InvoiceStatusTransitionsTests.cs +src/PollinationSDK.Test/Model/InvoiceTests.cs src/PollinationSDK.Test/Model/ItemReferenceAllOfTests.cs src/PollinationSDK.Test/Model/ItemReferenceTests.cs src/PollinationSDK.Test/Model/ItemTypeTests.cs @@ -658,19 +831,46 @@ src/PollinationSDK.Test/Model/JobTests.cs src/PollinationSDK.Test/Model/KeyRequestAllOfTests.cs src/PollinationSDK.Test/Model/KeyRequestTests.cs src/PollinationSDK.Test/Model/LicenseAllOfTests.cs +src/PollinationSDK.Test/Model/LicensePoolAccessPolicyAllOfTests.cs +src/PollinationSDK.Test/Model/LicensePoolAccessPolicyListAllOfTests.cs +src/PollinationSDK.Test/Model/LicensePoolAccessPolicyListTests.cs +src/PollinationSDK.Test/Model/LicensePoolAccessPolicyTests.cs +src/PollinationSDK.Test/Model/LicensePoolListAllOfTests.cs +src/PollinationSDK.Test/Model/LicensePoolListTests.cs +src/PollinationSDK.Test/Model/LicensePoolPolicySubjectAllOfTests.cs +src/PollinationSDK.Test/Model/LicensePoolPolicySubjectListAllOfTests.cs +src/PollinationSDK.Test/Model/LicensePoolPolicySubjectListTests.cs +src/PollinationSDK.Test/Model/LicensePoolPolicySubjectTests.cs +src/PollinationSDK.Test/Model/LicensePoolPublicAllOfTests.cs +src/PollinationSDK.Test/Model/LicensePoolPublicTests.cs +src/PollinationSDK.Test/Model/LicensePoolUpdateAllOfTests.cs +src/PollinationSDK.Test/Model/LicensePoolUpdateTests.cs +src/PollinationSDK.Test/Model/LicensePublicAllOfTests.cs +src/PollinationSDK.Test/Model/LicensePublicTests.cs src/PollinationSDK.Test/Model/LicenseTests.cs +src/PollinationSDK.Test/Model/LicenseTypeTests.cs +src/PollinationSDK.Test/Model/LineItemAllOfTests.cs +src/PollinationSDK.Test/Model/LineItemListAllOfTests.cs +src/PollinationSDK.Test/Model/LineItemListTests.cs +src/PollinationSDK.Test/Model/LineItemTests.cs src/PollinationSDK.Test/Model/ListResponseMetaAllOfTests.cs src/PollinationSDK.Test/Model/ListResponseMetaTests.cs src/PollinationSDK.Test/Model/LocalConfigAllOfTests.cs src/PollinationSDK.Test/Model/LocalConfigTests.cs +src/PollinationSDK.Test/Model/LocationAllOfTests.cs +src/PollinationSDK.Test/Model/LocationTests.cs src/PollinationSDK.Test/Model/MaintainerAllOfTests.cs src/PollinationSDK.Test/Model/MaintainerTests.cs src/PollinationSDK.Test/Model/MetaDataAllOfTests.cs src/PollinationSDK.Test/Model/MetaDataTests.cs +src/PollinationSDK.Test/Model/MetadataAllOfTests.cs +src/PollinationSDK.Test/Model/MetadataTests.cs src/PollinationSDK.Test/Model/NewPluginPackageAllOfTests.cs src/PollinationSDK.Test/Model/NewPluginPackageTests.cs src/PollinationSDK.Test/Model/NewRecipePackageAllOfTests.cs src/PollinationSDK.Test/Model/NewRecipePackageTests.cs +src/PollinationSDK.Test/Model/NewSubscriptionItemAllOfTests.cs +src/PollinationSDK.Test/Model/NewSubscriptionItemTests.cs src/PollinationSDK.Test/Model/OpenAPIGenBaseModelTests.cs src/PollinationSDK.Test/Model/OrganizationAllOfTests.cs src/PollinationSDK.Test/Model/OrganizationCreateAllOfTests.cs @@ -685,10 +885,21 @@ src/PollinationSDK.Test/Model/OrganizationRoleEnumTests.cs src/PollinationSDK.Test/Model/OrganizationTests.cs src/PollinationSDK.Test/Model/OrganizationUpdateAllOfTests.cs src/PollinationSDK.Test/Model/OrganizationUpdateTests.cs +src/PollinationSDK.Test/Model/PackageSortKeyTests.cs src/PollinationSDK.Test/Model/PackageVersionAllOfTests.cs src/PollinationSDK.Test/Model/PackageVersionTests.cs src/PollinationSDK.Test/Model/PathOutputAllOfTests.cs src/PollinationSDK.Test/Model/PathOutputTests.cs +src/PollinationSDK.Test/Model/PaymentCreateAllOfTests.cs +src/PollinationSDK.Test/Model/PaymentCreateTests.cs +src/PollinationSDK.Test/Model/PaymentIntentAllOfTests.cs +src/PollinationSDK.Test/Model/PaymentIntentTests.cs +src/PollinationSDK.Test/Model/PaymentMethodListAllOfTests.cs +src/PollinationSDK.Test/Model/PaymentMethodListTests.cs +src/PollinationSDK.Test/Model/PaymentSetupAllOfTests.cs +src/PollinationSDK.Test/Model/PaymentSetupTests.cs +src/PollinationSDK.Test/Model/PeriodAllOfTests.cs +src/PollinationSDK.Test/Model/PeriodTests.cs src/PollinationSDK.Test/Model/PermissionTests.cs src/PollinationSDK.Test/Model/PluginAllOfTests.cs src/PollinationSDK.Test/Model/PluginConfigAllOfTests.cs @@ -700,6 +911,19 @@ src/PollinationSDK.Test/Model/PluginPackageTests.cs src/PollinationSDK.Test/Model/PluginTests.cs src/PollinationSDK.Test/Model/PolicySubjectAllOfTests.cs src/PollinationSDK.Test/Model/PolicySubjectTests.cs +src/PollinationSDK.Test/Model/PollinationSubscriptionAllOfTests.cs +src/PollinationSDK.Test/Model/PollinationSubscriptionTests.cs +src/PollinationSDK.Test/Model/PriceAllOfTests.cs +src/PollinationSDK.Test/Model/PriceRecurrenceAllOfTests.cs +src/PollinationSDK.Test/Model/PriceRecurrenceTests.cs +src/PollinationSDK.Test/Model/PriceTests.cs +src/PollinationSDK.Test/Model/PriceTierAllOfTests.cs +src/PollinationSDK.Test/Model/PriceTierTests.cs +src/PollinationSDK.Test/Model/PriceTypeTests.cs +src/PollinationSDK.Test/Model/ProductAllOfTests.cs +src/PollinationSDK.Test/Model/ProductFamilyAllOfTests.cs +src/PollinationSDK.Test/Model/ProductFamilyTests.cs +src/PollinationSDK.Test/Model/ProductTests.cs src/PollinationSDK.Test/Model/ProjectAccessPolicyAllOfTests.cs src/PollinationSDK.Test/Model/ProjectAccessPolicyListAllOfTests.cs src/PollinationSDK.Test/Model/ProjectAccessPolicyListTests.cs @@ -717,11 +941,21 @@ src/PollinationSDK.Test/Model/ProjectRecipeFilterAllOfTests.cs src/PollinationSDK.Test/Model/ProjectRecipeFilterListAllOfTests.cs src/PollinationSDK.Test/Model/ProjectRecipeFilterListTests.cs src/PollinationSDK.Test/Model/ProjectRecipeFilterTests.cs +src/PollinationSDK.Test/Model/ProjectSortKeyTests.cs src/PollinationSDK.Test/Model/ProjectTests.cs src/PollinationSDK.Test/Model/ProjectUpdateAllOfTests.cs src/PollinationSDK.Test/Model/ProjectUpdateTests.cs src/PollinationSDK.Test/Model/PublicAccountListAllOfTests.cs src/PollinationSDK.Test/Model/PublicAccountListTests.cs +src/PollinationSDK.Test/Model/QuotaAllOfTests.cs +src/PollinationSDK.Test/Model/QuotaExtensionAllOfTests.cs +src/PollinationSDK.Test/Model/QuotaExtensionTests.cs +src/PollinationSDK.Test/Model/QuotaListAllOfTests.cs +src/PollinationSDK.Test/Model/QuotaListTests.cs +src/PollinationSDK.Test/Model/QuotaPlanAllOfTests.cs +src/PollinationSDK.Test/Model/QuotaPlanTests.cs +src/PollinationSDK.Test/Model/QuotaTests.cs +src/PollinationSDK.Test/Model/QuotaTypeTests.cs src/PollinationSDK.Test/Model/RecipeAllOfTests.cs src/PollinationSDK.Test/Model/RecipeInterfaceAllOfTests.cs src/PollinationSDK.Test/Model/RecipeInterfaceListAllOfTests.cs @@ -749,15 +983,22 @@ src/PollinationSDK.Test/Model/RepositoryPackageAllOfTests.cs src/PollinationSDK.Test/Model/RepositoryPackageTests.cs src/PollinationSDK.Test/Model/RepositoryPolicySubjectAllOfTests.cs src/PollinationSDK.Test/Model/RepositoryPolicySubjectTests.cs +src/PollinationSDK.Test/Model/RepositorySortKeyTests.cs src/PollinationSDK.Test/Model/RepositoryTests.cs src/PollinationSDK.Test/Model/RepositoryUpdateAllOfTests.cs src/PollinationSDK.Test/Model/RepositoryUpdateTests.cs src/PollinationSDK.Test/Model/RepositoryUserPermissionsAllOfTests.cs src/PollinationSDK.Test/Model/RepositoryUserPermissionsTests.cs +src/PollinationSDK.Test/Model/ResourcesDurationAllOfTests.cs +src/PollinationSDK.Test/Model/ResourcesDurationTests.cs src/PollinationSDK.Test/Model/RoleEnumTests.cs src/PollinationSDK.Test/Model/RunAllOfTests.cs src/PollinationSDK.Test/Model/RunListAllOfTests.cs src/PollinationSDK.Test/Model/RunListTests.cs +src/PollinationSDK.Test/Model/RunMetaAllOfTests.cs +src/PollinationSDK.Test/Model/RunMetaTests.cs +src/PollinationSDK.Test/Model/RunProgressAllOfTests.cs +src/PollinationSDK.Test/Model/RunProgressTests.cs src/PollinationSDK.Test/Model/RunResultListAllOfTests.cs src/PollinationSDK.Test/Model/RunResultListTests.cs src/PollinationSDK.Test/Model/RunStatusAllOfTests.cs @@ -768,7 +1009,11 @@ src/PollinationSDK.Test/Model/S3AllOfTests.cs src/PollinationSDK.Test/Model/S3Tests.cs src/PollinationSDK.Test/Model/S3UploadRequestAllOfTests.cs src/PollinationSDK.Test/Model/S3UploadRequestTests.cs +src/PollinationSDK.Test/Model/SecureResourcePublicAllOfTests.cs +src/PollinationSDK.Test/Model/SecureResourcePublicTests.cs src/PollinationSDK.Test/Model/SortEnumTests.cs +src/PollinationSDK.Test/Model/StatusAllOfTests.cs +src/PollinationSDK.Test/Model/StatusTests.cs src/PollinationSDK.Test/Model/StatusTypeTests.cs src/PollinationSDK.Test/Model/StepArrayInputAllOfTests.cs src/PollinationSDK.Test/Model/StepArrayInputTests.cs @@ -812,6 +1057,20 @@ src/PollinationSDK.Test/Model/StepStringInputTests.cs src/PollinationSDK.Test/Model/StepStringOutputAllOfTests.cs src/PollinationSDK.Test/Model/StepStringOutputTests.cs src/PollinationSDK.Test/Model/SubjectTypeTests.cs +src/PollinationSDK.Test/Model/SubscribeAllOfTests.cs +src/PollinationSDK.Test/Model/SubscribeTests.cs +src/PollinationSDK.Test/Model/SubscriptionAllOfTests.cs +src/PollinationSDK.Test/Model/SubscriptionCreateAllOfTests.cs +src/PollinationSDK.Test/Model/SubscriptionCreateTests.cs +src/PollinationSDK.Test/Model/SubscriptionItemAllOfTests.cs +src/PollinationSDK.Test/Model/SubscriptionItemListAllOfTests.cs +src/PollinationSDK.Test/Model/SubscriptionItemListTests.cs +src/PollinationSDK.Test/Model/SubscriptionItemTests.cs +src/PollinationSDK.Test/Model/SubscriptionPlanAllOfTests.cs +src/PollinationSDK.Test/Model/SubscriptionPlanTests.cs +src/PollinationSDK.Test/Model/SubscriptionTests.cs +src/PollinationSDK.Test/Model/SubscriptionUpdateAllOfTests.cs +src/PollinationSDK.Test/Model/SubscriptionUpdateTests.cs src/PollinationSDK.Test/Model/TaskArgumentAllOfTests.cs src/PollinationSDK.Test/Model/TaskArgumentTests.cs src/PollinationSDK.Test/Model/TaskFileReferenceAllOfTests.cs @@ -843,8 +1102,12 @@ src/PollinationSDK.Test/Model/TeamRoleEnumTests.cs src/PollinationSDK.Test/Model/TeamTests.cs src/PollinationSDK.Test/Model/TeamUpdateAllOfTests.cs src/PollinationSDK.Test/Model/TeamUpdateTests.cs +src/PollinationSDK.Test/Model/TemplateFunctionAllOfTests.cs +src/PollinationSDK.Test/Model/TemplateFunctionTests.cs src/PollinationSDK.Test/Model/UpdateAcceptedAllOfTests.cs src/PollinationSDK.Test/Model/UpdateAcceptedTests.cs +src/PollinationSDK.Test/Model/UpdateInvoicePreviewAllOfTests.cs +src/PollinationSDK.Test/Model/UpdateInvoicePreviewTests.cs src/PollinationSDK.Test/Model/UsageAllOfTests.cs src/PollinationSDK.Test/Model/UsageTests.cs src/PollinationSDK.Test/Model/UserCreateAllOfTests.cs @@ -859,6 +1122,7 @@ src/PollinationSDK.Test/Model/UserPublicListTests.cs src/PollinationSDK.Test/Model/UserPublicTests.cs src/PollinationSDK.Test/Model/UserUpdateAllOfTests.cs src/PollinationSDK.Test/Model/UserUpdateTests.cs +src/PollinationSDK.Test/Model/ValidationErrorTests.cs src/PollinationSDK.Test/Model/ValueFileReferenceAllOfTests.cs src/PollinationSDK.Test/Model/ValueFileReferenceTests.cs src/PollinationSDK.Test/Model/ValueFolderReferenceAllOfTests.cs @@ -872,12 +1136,15 @@ src/PollinationSDK/Api/APITokensApi.cs src/PollinationSDK/Api/AccountsApi.cs src/PollinationSDK/Api/ArtifactsApi.cs src/PollinationSDK/Api/JobsApi.cs +src/PollinationSDK/Api/LicensesApi.cs src/PollinationSDK/Api/OrgsApi.cs +src/PollinationSDK/Api/PaymentsApi.cs src/PollinationSDK/Api/PluginsApi.cs src/PollinationSDK/Api/ProjectsApi.cs src/PollinationSDK/Api/RecipesApi.cs src/PollinationSDK/Api/RegistriesApi.cs src/PollinationSDK/Api/RunsApi.cs +src/PollinationSDK/Api/SubscriptionsApi.cs src/PollinationSDK/Api/TeamsApi.cs src/PollinationSDK/Api/UserApi.cs src/PollinationSDK/Api/UsersApi.cs @@ -902,10 +1169,21 @@ src/PollinationSDK/Model/AccessPolicy.cs src/PollinationSDK/Model/AccessPolicyAllOf.cs src/PollinationSDK/Model/AccessPolicyList.cs src/PollinationSDK/Model/AccessPolicyListAllOf.cs +src/PollinationSDK/Model/Accessor.cs +src/PollinationSDK/Model/AccessorAllOf.cs src/PollinationSDK/Model/AccountPublic.cs src/PollinationSDK/Model/AccountPublicAllOf.cs +src/PollinationSDK/Model/AccountType.cs +src/PollinationSDK/Model/Activation.cs +src/PollinationSDK/Model/ActivationAllOf.cs +src/PollinationSDK/Model/ActivationList.cs +src/PollinationSDK/Model/ActivationListAllOf.cs src/PollinationSDK/Model/ArtifactSource.cs src/PollinationSDK/Model/ArtifactSourceAllOf.cs +src/PollinationSDK/Model/BakedRecipe.cs +src/PollinationSDK/Model/BakedRecipeAllOf.cs +src/PollinationSDK/Model/BaseList.cs +src/PollinationSDK/Model/BaseListAllOf.cs src/PollinationSDK/Model/BaseReference.cs src/PollinationSDK/Model/BaseReferenceAllOf.cs src/PollinationSDK/Model/BaseStatus.cs @@ -914,12 +1192,19 @@ src/PollinationSDK/Model/BodyPostPluginOwnerPluginsPost.cs src/PollinationSDK/Model/BodyPostPluginOwnerPluginsPostAllOf.cs src/PollinationSDK/Model/BodyPostRecipeOwnerRecipesPost.cs src/PollinationSDK/Model/BodyPostRecipeOwnerRecipesPostAllOf.cs +src/PollinationSDK/Model/CardPublic.cs +src/PollinationSDK/Model/CardPublicAllOf.cs src/PollinationSDK/Model/CloudJob.cs src/PollinationSDK/Model/CloudJobAllOf.cs src/PollinationSDK/Model/CloudJobList.cs src/PollinationSDK/Model/CloudJobListAllOf.cs +src/PollinationSDK/Model/Coupon.cs +src/PollinationSDK/Model/CouponAllOf.cs +src/PollinationSDK/Model/CouponDuration.cs src/PollinationSDK/Model/CreatedContent.cs src/PollinationSDK/Model/CreatedContentAllOf.cs +src/PollinationSDK/Model/CryptlexBase.cs +src/PollinationSDK/Model/CryptlexBaseAllOf.cs src/PollinationSDK/Model/DAG.cs src/PollinationSDK/Model/DAGAllOf.cs src/PollinationSDK/Model/DAGArrayInput.cs @@ -1016,11 +1301,19 @@ src/PollinationSDK/Model/DAGTaskLoop.cs src/PollinationSDK/Model/DAGTaskLoopAllOf.cs src/PollinationSDK/Model/DailyUsage.cs src/PollinationSDK/Model/DailyUsageAllOf.cs +src/PollinationSDK/Model/DeleteSubscriptionItem.cs +src/PollinationSDK/Model/DeleteSubscriptionItemAllOf.cs src/PollinationSDK/Model/Dependency.cs src/PollinationSDK/Model/DependencyAllOf.cs src/PollinationSDK/Model/DependencyKind.cs +src/PollinationSDK/Model/Discount.cs +src/PollinationSDK/Model/DiscountAllOf.cs +src/PollinationSDK/Model/DiscountAmount.cs +src/PollinationSDK/Model/DiscountAmountAllOf.cs src/PollinationSDK/Model/DockerConfig.cs src/PollinationSDK/Model/DockerConfigAllOf.cs +src/PollinationSDK/Model/ExternalResource.cs +src/PollinationSDK/Model/ExternalResourceAllOf.cs src/PollinationSDK/Model/FileMeta.cs src/PollinationSDK/Model/FileMetaAllOf.cs src/PollinationSDK/Model/FileReference.cs @@ -1073,6 +1366,7 @@ src/PollinationSDK/Model/GenericOutput.cs src/PollinationSDK/Model/GenericOutputAllOf.cs src/PollinationSDK/Model/HTTP.cs src/PollinationSDK/Model/HTTPAllOf.cs +src/PollinationSDK/Model/HTTPValidationError.cs src/PollinationSDK/Model/IOAliasHandler.cs src/PollinationSDK/Model/IOAliasHandlerAllOf.cs src/PollinationSDK/Model/IOBase.cs @@ -1087,6 +1381,17 @@ src/PollinationSDK/Model/InputReference.cs src/PollinationSDK/Model/InputReferenceAllOf.cs src/PollinationSDK/Model/InputReferenceBase.cs src/PollinationSDK/Model/InputReferenceBaseAllOf.cs +src/PollinationSDK/Model/Inventory.cs +src/PollinationSDK/Model/InventoryAllOf.cs +src/PollinationSDK/Model/Invoice.cs +src/PollinationSDK/Model/InvoiceAllOf.cs +src/PollinationSDK/Model/InvoiceList.cs +src/PollinationSDK/Model/InvoiceListAllOf.cs +src/PollinationSDK/Model/InvoicePreview.cs +src/PollinationSDK/Model/InvoicePreviewAllOf.cs +src/PollinationSDK/Model/InvoiceStatus.cs +src/PollinationSDK/Model/InvoiceStatusTransitions.cs +src/PollinationSDK/Model/InvoiceStatusTransitionsAllOf.cs src/PollinationSDK/Model/ItemReference.cs src/PollinationSDK/Model/ItemReferenceAllOf.cs src/PollinationSDK/Model/ItemType.cs @@ -1103,18 +1408,45 @@ src/PollinationSDK/Model/KeyRequest.cs src/PollinationSDK/Model/KeyRequestAllOf.cs src/PollinationSDK/Model/License.cs src/PollinationSDK/Model/LicenseAllOf.cs +src/PollinationSDK/Model/LicensePoolAccessPolicy.cs +src/PollinationSDK/Model/LicensePoolAccessPolicyAllOf.cs +src/PollinationSDK/Model/LicensePoolAccessPolicyList.cs +src/PollinationSDK/Model/LicensePoolAccessPolicyListAllOf.cs +src/PollinationSDK/Model/LicensePoolList.cs +src/PollinationSDK/Model/LicensePoolListAllOf.cs +src/PollinationSDK/Model/LicensePoolPolicySubject.cs +src/PollinationSDK/Model/LicensePoolPolicySubjectAllOf.cs +src/PollinationSDK/Model/LicensePoolPolicySubjectList.cs +src/PollinationSDK/Model/LicensePoolPolicySubjectListAllOf.cs +src/PollinationSDK/Model/LicensePoolPublic.cs +src/PollinationSDK/Model/LicensePoolPublicAllOf.cs +src/PollinationSDK/Model/LicensePoolUpdate.cs +src/PollinationSDK/Model/LicensePoolUpdateAllOf.cs +src/PollinationSDK/Model/LicensePublic.cs +src/PollinationSDK/Model/LicensePublicAllOf.cs +src/PollinationSDK/Model/LicenseType.cs +src/PollinationSDK/Model/LineItem.cs +src/PollinationSDK/Model/LineItemAllOf.cs +src/PollinationSDK/Model/LineItemList.cs +src/PollinationSDK/Model/LineItemListAllOf.cs src/PollinationSDK/Model/ListResponseMeta.cs src/PollinationSDK/Model/ListResponseMetaAllOf.cs src/PollinationSDK/Model/LocalConfig.cs src/PollinationSDK/Model/LocalConfigAllOf.cs +src/PollinationSDK/Model/Location.cs +src/PollinationSDK/Model/LocationAllOf.cs src/PollinationSDK/Model/Maintainer.cs src/PollinationSDK/Model/MaintainerAllOf.cs src/PollinationSDK/Model/MetaData.cs src/PollinationSDK/Model/MetaDataAllOf.cs +src/PollinationSDK/Model/Metadata.cs +src/PollinationSDK/Model/MetadataAllOf.cs src/PollinationSDK/Model/NewPluginPackage.cs src/PollinationSDK/Model/NewPluginPackageAllOf.cs src/PollinationSDK/Model/NewRecipePackage.cs src/PollinationSDK/Model/NewRecipePackageAllOf.cs +src/PollinationSDK/Model/NewSubscriptionItem.cs +src/PollinationSDK/Model/NewSubscriptionItemAllOf.cs src/PollinationSDK/Model/OpenAPIGenBaseModel.cs src/PollinationSDK/Model/Organization.cs src/PollinationSDK/Model/OrganizationAllOf.cs @@ -1129,10 +1461,21 @@ src/PollinationSDK/Model/OrganizationMemberListAllOf.cs src/PollinationSDK/Model/OrganizationRoleEnum.cs src/PollinationSDK/Model/OrganizationUpdate.cs src/PollinationSDK/Model/OrganizationUpdateAllOf.cs +src/PollinationSDK/Model/PackageSortKey.cs src/PollinationSDK/Model/PackageVersion.cs src/PollinationSDK/Model/PackageVersionAllOf.cs src/PollinationSDK/Model/PathOutput.cs src/PollinationSDK/Model/PathOutputAllOf.cs +src/PollinationSDK/Model/PaymentCreate.cs +src/PollinationSDK/Model/PaymentCreateAllOf.cs +src/PollinationSDK/Model/PaymentIntent.cs +src/PollinationSDK/Model/PaymentIntentAllOf.cs +src/PollinationSDK/Model/PaymentMethodList.cs +src/PollinationSDK/Model/PaymentMethodListAllOf.cs +src/PollinationSDK/Model/PaymentSetup.cs +src/PollinationSDK/Model/PaymentSetupAllOf.cs +src/PollinationSDK/Model/Period.cs +src/PollinationSDK/Model/PeriodAllOf.cs src/PollinationSDK/Model/Permission.cs src/PollinationSDK/Model/Plugin.cs src/PollinationSDK/Model/PluginAllOf.cs @@ -1144,6 +1487,19 @@ src/PollinationSDK/Model/PluginPackageList.cs src/PollinationSDK/Model/PluginPackageListAllOf.cs src/PollinationSDK/Model/PolicySubject.cs src/PollinationSDK/Model/PolicySubjectAllOf.cs +src/PollinationSDK/Model/PollinationSubscription.cs +src/PollinationSDK/Model/PollinationSubscriptionAllOf.cs +src/PollinationSDK/Model/Price.cs +src/PollinationSDK/Model/PriceAllOf.cs +src/PollinationSDK/Model/PriceRecurrence.cs +src/PollinationSDK/Model/PriceRecurrenceAllOf.cs +src/PollinationSDK/Model/PriceTier.cs +src/PollinationSDK/Model/PriceTierAllOf.cs +src/PollinationSDK/Model/PriceType.cs +src/PollinationSDK/Model/Product.cs +src/PollinationSDK/Model/ProductAllOf.cs +src/PollinationSDK/Model/ProductFamily.cs +src/PollinationSDK/Model/ProductFamilyAllOf.cs src/PollinationSDK/Model/Project.cs src/PollinationSDK/Model/ProjectAccessPolicy.cs src/PollinationSDK/Model/ProjectAccessPolicyAllOf.cs @@ -1162,10 +1518,20 @@ src/PollinationSDK/Model/ProjectRecipeFilter.cs src/PollinationSDK/Model/ProjectRecipeFilterAllOf.cs src/PollinationSDK/Model/ProjectRecipeFilterList.cs src/PollinationSDK/Model/ProjectRecipeFilterListAllOf.cs +src/PollinationSDK/Model/ProjectSortKey.cs src/PollinationSDK/Model/ProjectUpdate.cs src/PollinationSDK/Model/ProjectUpdateAllOf.cs src/PollinationSDK/Model/PublicAccountList.cs src/PollinationSDK/Model/PublicAccountListAllOf.cs +src/PollinationSDK/Model/Quota.cs +src/PollinationSDK/Model/QuotaAllOf.cs +src/PollinationSDK/Model/QuotaExtension.cs +src/PollinationSDK/Model/QuotaExtensionAllOf.cs +src/PollinationSDK/Model/QuotaList.cs +src/PollinationSDK/Model/QuotaListAllOf.cs +src/PollinationSDK/Model/QuotaPlan.cs +src/PollinationSDK/Model/QuotaPlanAllOf.cs +src/PollinationSDK/Model/QuotaType.cs src/PollinationSDK/Model/Recipe.cs src/PollinationSDK/Model/RecipeAllOf.cs src/PollinationSDK/Model/RecipeInterface.cs @@ -1194,15 +1560,22 @@ src/PollinationSDK/Model/RepositoryPackage.cs src/PollinationSDK/Model/RepositoryPackageAllOf.cs src/PollinationSDK/Model/RepositoryPolicySubject.cs src/PollinationSDK/Model/RepositoryPolicySubjectAllOf.cs +src/PollinationSDK/Model/RepositorySortKey.cs src/PollinationSDK/Model/RepositoryUpdate.cs src/PollinationSDK/Model/RepositoryUpdateAllOf.cs src/PollinationSDK/Model/RepositoryUserPermissions.cs src/PollinationSDK/Model/RepositoryUserPermissionsAllOf.cs +src/PollinationSDK/Model/ResourcesDuration.cs +src/PollinationSDK/Model/ResourcesDurationAllOf.cs src/PollinationSDK/Model/RoleEnum.cs src/PollinationSDK/Model/Run.cs src/PollinationSDK/Model/RunAllOf.cs src/PollinationSDK/Model/RunList.cs src/PollinationSDK/Model/RunListAllOf.cs +src/PollinationSDK/Model/RunMeta.cs +src/PollinationSDK/Model/RunMetaAllOf.cs +src/PollinationSDK/Model/RunProgress.cs +src/PollinationSDK/Model/RunProgressAllOf.cs src/PollinationSDK/Model/RunResultList.cs src/PollinationSDK/Model/RunResultListAllOf.cs src/PollinationSDK/Model/RunStatus.cs @@ -1212,7 +1585,11 @@ src/PollinationSDK/Model/S3.cs src/PollinationSDK/Model/S3AllOf.cs src/PollinationSDK/Model/S3UploadRequest.cs src/PollinationSDK/Model/S3UploadRequestAllOf.cs +src/PollinationSDK/Model/SecureResourcePublic.cs +src/PollinationSDK/Model/SecureResourcePublicAllOf.cs src/PollinationSDK/Model/SortEnum.cs +src/PollinationSDK/Model/Status.cs +src/PollinationSDK/Model/StatusAllOf.cs src/PollinationSDK/Model/StatusType.cs src/PollinationSDK/Model/StepArrayInput.cs src/PollinationSDK/Model/StepArrayInputAllOf.cs @@ -1256,6 +1633,20 @@ src/PollinationSDK/Model/StepStringInputAllOf.cs src/PollinationSDK/Model/StepStringOutput.cs src/PollinationSDK/Model/StepStringOutputAllOf.cs src/PollinationSDK/Model/SubjectType.cs +src/PollinationSDK/Model/Subscribe.cs +src/PollinationSDK/Model/SubscribeAllOf.cs +src/PollinationSDK/Model/Subscription.cs +src/PollinationSDK/Model/SubscriptionAllOf.cs +src/PollinationSDK/Model/SubscriptionCreate.cs +src/PollinationSDK/Model/SubscriptionCreateAllOf.cs +src/PollinationSDK/Model/SubscriptionItem.cs +src/PollinationSDK/Model/SubscriptionItemAllOf.cs +src/PollinationSDK/Model/SubscriptionItemList.cs +src/PollinationSDK/Model/SubscriptionItemListAllOf.cs +src/PollinationSDK/Model/SubscriptionPlan.cs +src/PollinationSDK/Model/SubscriptionPlanAllOf.cs +src/PollinationSDK/Model/SubscriptionUpdate.cs +src/PollinationSDK/Model/SubscriptionUpdateAllOf.cs src/PollinationSDK/Model/TaskArgument.cs src/PollinationSDK/Model/TaskArgumentAllOf.cs src/PollinationSDK/Model/TaskFileReference.cs @@ -1287,8 +1678,12 @@ src/PollinationSDK/Model/TeamMemberListAllOf.cs src/PollinationSDK/Model/TeamRoleEnum.cs src/PollinationSDK/Model/TeamUpdate.cs src/PollinationSDK/Model/TeamUpdateAllOf.cs +src/PollinationSDK/Model/TemplateFunction.cs +src/PollinationSDK/Model/TemplateFunctionAllOf.cs src/PollinationSDK/Model/UpdateAccepted.cs src/PollinationSDK/Model/UpdateAcceptedAllOf.cs +src/PollinationSDK/Model/UpdateInvoicePreview.cs +src/PollinationSDK/Model/UpdateInvoicePreviewAllOf.cs src/PollinationSDK/Model/Usage.cs src/PollinationSDK/Model/UsageAllOf.cs src/PollinationSDK/Model/UserCreate.cs @@ -1303,6 +1698,7 @@ src/PollinationSDK/Model/UserPublicList.cs src/PollinationSDK/Model/UserPublicListAllOf.cs src/PollinationSDK/Model/UserUpdate.cs src/PollinationSDK/Model/UserUpdateAllOf.cs +src/PollinationSDK/Model/ValidationError.cs src/PollinationSDK/Model/ValueFileReference.cs src/PollinationSDK/Model/ValueFileReferenceAllOf.cs src/PollinationSDK/Model/ValueFolderReference.cs diff --git a/.openapi-generator/post_gen_script.py b/.openapi-generator/post_gen_script.py index 65b6a077e..8d023fb33 100644 --- a/.openapi-generator/post_gen_script.py +++ b/.openapi-generator/post_gen_script.py @@ -267,6 +267,17 @@ def get_allof_types_from_json(source_json_url): if props == []: continue get_allof_types(props, unitItem) + + for sn, sp in data['paths'].items(): + props = [] + for pn, pp in sp.items(): + for rn, rp in pp['responses'].items(): + schema = rp.get('content',{}).get('application/json',{}).get('schema', {}) + if 'anyOf' in schema: + props = schema + if props == []: + continue + get_allof_types(props, unitItem) return unitItem diff --git a/README.md b/README.md index 3d9347cc2..848d32422 100644 --- a/README.md +++ b/README.md @@ -6,8 +6,8 @@ Pollination Server OpenAPI Definition This C# SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: -- API version: 0.14.0 -- SDK version: 0.14.0 +- API version: 0.23.0 +- SDK version: 0.23.0 - Build package: org.openapitools.codegen.languages.CSharpClientCodegen For more information, please visit [https://pollination.cloud](https://pollination.cloud) @@ -119,18 +119,29 @@ Class | Method | HTTP request | Description *APITokensApi* | [**DeleteToken**](docs/APITokensApi.md#deletetoken) | **DELETE** /tokens/{token_id} | Delete an API Token *APITokensApi* | [**ListTokens**](docs/APITokensApi.md#listtokens) | **GET** /tokens | List user API tokens *APITokensApi* | [**RegenerateToken**](docs/APITokensApi.md#regeneratetoken) | **PUT** /tokens/{token_id} | Regenerate an API token +*AccountsApi* | [**CheckAccountName**](docs/AccountsApi.md#checkaccountname) | **GET** /accounts/check/{name} | Check if an account with this name exists *AccountsApi* | [**GetAccount**](docs/AccountsApi.md#getaccount) | **GET** /accounts/{name} | Get an account by name *AccountsApi* | [**ListAccounts**](docs/AccountsApi.md#listaccounts) | **GET** /accounts | List Accounts on the Pollination platform +*AccountsApi* | [**ListQuotas**](docs/AccountsApi.md#listquotas) | **GET** /accounts/{name}/quotas | List Quotas *ArtifactsApi* | [**CreateArtifact**](docs/ArtifactsApi.md#createartifact) | **POST** /projects/{owner}/{name}/artifacts | Get an Artifact upload link. *ArtifactsApi* | [**DeleteArtifact**](docs/ArtifactsApi.md#deleteartifact) | **DELETE** /projects/{owner}/{name}/artifacts | Delete one or many artifacts by key/prefix *ArtifactsApi* | [**DownloadArtifact**](docs/ArtifactsApi.md#downloadartifact) | **GET** /projects/{owner}/{name}/artifacts/download | Download an artifact from the project folder *ArtifactsApi* | [**ListArtifacts**](docs/ArtifactsApi.md#listartifacts) | **GET** /projects/{owner}/{name}/artifacts | List artifacts in a project folder *JobsApi* | [**CancelJob**](docs/JobsApi.md#canceljob) | **PUT** /projects/{owner}/{name}/jobs/{job_id}/cancel | Cancel a Job *JobsApi* | [**CreateJob**](docs/JobsApi.md#createjob) | **POST** /projects/{owner}/{name}/jobs | Schedule a job +*JobsApi* | [**DeleteJob**](docs/JobsApi.md#deletejob) | **DELETE** /projects/{owner}/{name}/jobs/{job_id} | Delete a Job *JobsApi* | [**DownloadJobArtifact**](docs/JobsApi.md#downloadjobartifact) | **GET** /projects/{owner}/{name}/jobs/{job_id}/artifacts/download | Download an artifact from the job folder *JobsApi* | [**GetJob**](docs/JobsApi.md#getjob) | **GET** /projects/{owner}/{name}/jobs/{job_id} | Get a Job *JobsApi* | [**ListJobs**](docs/JobsApi.md#listjobs) | **GET** /projects/{owner}/{name}/jobs | List Jobs *JobsApi* | [**SearchJobFolder**](docs/JobsApi.md#searchjobfolder) | **GET** /projects/{owner}/{name}/jobs/{job_id}/artifacts | List files/folders in a job folder +*LicensesApi* | [**DeleteActivation**](docs/LicensesApi.md#deleteactivation) | **DELETE** /licenses/pools/{pool_id}/activations/{activation_id} | Delete Activation +*LicensesApi* | [**GetAvailablePools**](docs/LicensesApi.md#getavailablepools) | **GET** /licenses/pools | Get Available Pools +*LicensesApi* | [**GetLicenseActivations**](docs/LicensesApi.md#getlicenseactivations) | **GET** /licenses/pools/{pool_id}/activations | Get Activations +*LicensesApi* | [**GetPoolLicense**](docs/LicensesApi.md#getpoollicense) | **GET** /licenses/pools/{pool_id}/license | Get Pool License +*LicensesApi* | [**GrantAccessToPool**](docs/LicensesApi.md#grantaccesstopool) | **PATCH** /licenses/pools/{pool_id}/permissions | Grant Pool Access +*LicensesApi* | [**RegenerateLicensePool**](docs/LicensesApi.md#regeneratelicensepool) | **POST** /licenses/pools/{pool_id}/regenerate | Regenerate +*LicensesApi* | [**RevokeAccessToPool**](docs/LicensesApi.md#revokeaccesstopool) | **DELETE** /licenses/pools/{pool_id}/permissions | Delete Pool Access +*LicensesApi* | [**UpdateLicensePool**](docs/LicensesApi.md#updatelicensepool) | **PUT** /licenses/pools/{pool_id} | Update Pool *OrgsApi* | [**CreateOrg**](docs/OrgsApi.md#createorg) | **POST** /orgs | Create an Org *OrgsApi* | [**DeleteOrg**](docs/OrgsApi.md#deleteorg) | **DELETE** /orgs/{name} | Delete an Org *OrgsApi* | [**DeleteOrgMember**](docs/OrgsApi.md#deleteorgmember) | **DELETE** /orgs/{name}/members/{username} | Remove an Org member @@ -139,6 +150,22 @@ Class | Method | HTTP request | Description *OrgsApi* | [**ListOrgs**](docs/OrgsApi.md#listorgs) | **GET** /orgs | List Orgs *OrgsApi* | [**UpdateOrg**](docs/OrgsApi.md#updateorg) | **PUT** /orgs/{name} | Update an Org *OrgsApi* | [**UpsertOrgMember**](docs/OrgsApi.md#upsertorgmember) | **PATCH** /orgs/{name}/members/{username}/{role} | Add or update the role of an Org Member +*PaymentsApi* | [**CancelSubscription**](docs/PaymentsApi.md#cancelsubscription) | **DELETE** /payments/{account_name}/subscription | Cancel Subscription +*PaymentsApi* | [**CreatePaymentMethod**](docs/PaymentsApi.md#createpaymentmethod) | **POST** /payments/{account_name}/methods | Add Payment Method +*PaymentsApi* | [**CreateSubscription**](docs/PaymentsApi.md#createsubscription) | **POST** /payments/{account_name}/subscription | Create Subscription +*PaymentsApi* | [**GetDefaultPaymentMethod**](docs/PaymentsApi.md#getdefaultpaymentmethod) | **GET** /payments/{account_name}/methods/default | Get Default Payment Method +*PaymentsApi* | [**GetFailedPayment**](docs/PaymentsApi.md#getfailedpayment) | **GET** /payments/{account_name}/failed | Get Failed Payment +*PaymentsApi* | [**GetInventory**](docs/PaymentsApi.md#getinventory) | **GET** /payments/{account_name}/inventory | Get Inventory +*PaymentsApi* | [**GetInvoiceList**](docs/PaymentsApi.md#getinvoicelist) | **GET** /payments/{account_name}/invoices | Get Invoice List +*PaymentsApi* | [**GetNextInvoice**](docs/PaymentsApi.md#getnextinvoice) | **GET** /payments/{account_name}/invoices/next | Get Next Invoice +*PaymentsApi* | [**GetStatus**](docs/PaymentsApi.md#getstatus) | **GET** /payments/{account_name}/status | Get Status +*PaymentsApi* | [**GetSubscription**](docs/PaymentsApi.md#getsubscription) | **GET** /payments/{account_name}/subscription | Get Subscription +*PaymentsApi* | [**GetUnfilteredInventory**](docs/PaymentsApi.md#getunfilteredinventory) | **GET** /payments/inventory | Get Unfiltered Inventory +*PaymentsApi* | [**GetUpcomingSubscription**](docs/PaymentsApi.md#getupcomingsubscription) | **GET** /payments/{account_name}/subscription/upcoming | Get Upcoming Subscription +*PaymentsApi* | [**ListPaymentMethods**](docs/PaymentsApi.md#listpaymentmethods) | **GET** /payments/{account_name}/methods | Get Payment Methods +*PaymentsApi* | [**PreviewUpdateSubscription**](docs/PaymentsApi.md#previewupdatesubscription) | **PUT** /payments/{account_name}/subscription/preview | Preview Update Subscription +*PaymentsApi* | [**Subscribe**](docs/PaymentsApi.md#subscribe) | **POST** /payments/{account_name}/subscribe | Subscribe +*PaymentsApi* | [**UpdateSubscription**](docs/PaymentsApi.md#updatesubscription) | **PUT** /payments/{account_name}/subscription | Update Subscription *PluginsApi* | [**CreatePlugin**](docs/PluginsApi.md#createplugin) | **POST** /plugins/{owner} | Create a Plugin *PluginsApi* | [**CreatePluginPackage**](docs/PluginsApi.md#createpluginpackage) | **POST** /plugins/{owner}/{name}/tags | Create a new Plugin package *PluginsApi* | [**DeletePlugin**](docs/PluginsApi.md#deleteplugin) | **DELETE** /plugins/{owner}/{name} | Delete a Plugin @@ -187,6 +214,8 @@ Class | Method | HTTP request | Description *RunsApi* | [**ListRunArtifacts**](docs/RunsApi.md#listrunartifacts) | **GET** /projects/{owner}/{name}/runs/{run_id}/artifacts | List artifacts in a run folder *RunsApi* | [**ListRuns**](docs/RunsApi.md#listruns) | **GET** /projects/{owner}/{name}/runs | List runs *RunsApi* | [**QueryResults**](docs/RunsApi.md#queryresults) | **GET** /projects/{owner}/{name}/results | Query run results +*SubscriptionsApi* | [**GetPollinationSubscription**](docs/SubscriptionsApi.md#getpollinationsubscription) | **GET** /subscriptions/{account_name} | Get Subscription +*SubscriptionsApi* | [**GetUpcomingPollinationSubscription**](docs/SubscriptionsApi.md#getupcomingpollinationsubscription) | **GET** /subscriptions/{account_name}/upcoming | Get Upcoming Subscription *TeamsApi* | [**CreateTeam**](docs/TeamsApi.md#createteam) | **POST** /orgs/{org_name}/teams | Create a Team *TeamsApi* | [**DeleteOrgTeamMember**](docs/TeamsApi.md#deleteorgteammember) | **DELETE** /orgs/{org_name}/teams/{team_slug}/members/{username} | Remove a team member *TeamsApi* | [**DeleteTeam**](docs/TeamsApi.md#deleteteam) | **DELETE** /orgs/{org_name}/teams/{team_slug} | Delete a Team @@ -218,10 +247,21 @@ Class | Method | HTTP request | Description - [Model.AccessPolicyAllOf](docs/AccessPolicyAllOf.md) - [Model.AccessPolicyList](docs/AccessPolicyList.md) - [Model.AccessPolicyListAllOf](docs/AccessPolicyListAllOf.md) + - [Model.Accessor](docs/Accessor.md) + - [Model.AccessorAllOf](docs/AccessorAllOf.md) - [Model.AccountPublic](docs/AccountPublic.md) - [Model.AccountPublicAllOf](docs/AccountPublicAllOf.md) + - [Model.AccountType](docs/AccountType.md) + - [Model.Activation](docs/Activation.md) + - [Model.ActivationAllOf](docs/ActivationAllOf.md) + - [Model.ActivationList](docs/ActivationList.md) + - [Model.ActivationListAllOf](docs/ActivationListAllOf.md) - [Model.ArtifactSource](docs/ArtifactSource.md) - [Model.ArtifactSourceAllOf](docs/ArtifactSourceAllOf.md) + - [Model.BakedRecipe](docs/BakedRecipe.md) + - [Model.BakedRecipeAllOf](docs/BakedRecipeAllOf.md) + - [Model.BaseList](docs/BaseList.md) + - [Model.BaseListAllOf](docs/BaseListAllOf.md) - [Model.BaseReference](docs/BaseReference.md) - [Model.BaseReferenceAllOf](docs/BaseReferenceAllOf.md) - [Model.BaseStatus](docs/BaseStatus.md) @@ -230,12 +270,19 @@ Class | Method | HTTP request | Description - [Model.BodyPostPluginOwnerPluginsPostAllOf](docs/BodyPostPluginOwnerPluginsPostAllOf.md) - [Model.BodyPostRecipeOwnerRecipesPost](docs/BodyPostRecipeOwnerRecipesPost.md) - [Model.BodyPostRecipeOwnerRecipesPostAllOf](docs/BodyPostRecipeOwnerRecipesPostAllOf.md) + - [Model.CardPublic](docs/CardPublic.md) + - [Model.CardPublicAllOf](docs/CardPublicAllOf.md) - [Model.CloudJob](docs/CloudJob.md) - [Model.CloudJobAllOf](docs/CloudJobAllOf.md) - [Model.CloudJobList](docs/CloudJobList.md) - [Model.CloudJobListAllOf](docs/CloudJobListAllOf.md) + - [Model.Coupon](docs/Coupon.md) + - [Model.CouponAllOf](docs/CouponAllOf.md) + - [Model.CouponDuration](docs/CouponDuration.md) - [Model.CreatedContent](docs/CreatedContent.md) - [Model.CreatedContentAllOf](docs/CreatedContentAllOf.md) + - [Model.CryptlexBase](docs/CryptlexBase.md) + - [Model.CryptlexBaseAllOf](docs/CryptlexBaseAllOf.md) - [Model.DAG](docs/DAG.md) - [Model.DAGAllOf](docs/DAGAllOf.md) - [Model.DAGArrayInput](docs/DAGArrayInput.md) @@ -332,11 +379,19 @@ Class | Method | HTTP request | Description - [Model.DAGTaskLoopAllOf](docs/DAGTaskLoopAllOf.md) - [Model.DailyUsage](docs/DailyUsage.md) - [Model.DailyUsageAllOf](docs/DailyUsageAllOf.md) + - [Model.DeleteSubscriptionItem](docs/DeleteSubscriptionItem.md) + - [Model.DeleteSubscriptionItemAllOf](docs/DeleteSubscriptionItemAllOf.md) - [Model.Dependency](docs/Dependency.md) - [Model.DependencyAllOf](docs/DependencyAllOf.md) - [Model.DependencyKind](docs/DependencyKind.md) + - [Model.Discount](docs/Discount.md) + - [Model.DiscountAllOf](docs/DiscountAllOf.md) + - [Model.DiscountAmount](docs/DiscountAmount.md) + - [Model.DiscountAmountAllOf](docs/DiscountAmountAllOf.md) - [Model.DockerConfig](docs/DockerConfig.md) - [Model.DockerConfigAllOf](docs/DockerConfigAllOf.md) + - [Model.ExternalResource](docs/ExternalResource.md) + - [Model.ExternalResourceAllOf](docs/ExternalResourceAllOf.md) - [Model.FileMeta](docs/FileMeta.md) - [Model.FileMetaAllOf](docs/FileMetaAllOf.md) - [Model.FileReference](docs/FileReference.md) @@ -389,6 +444,7 @@ Class | Method | HTTP request | Description - [Model.GenericOutputAllOf](docs/GenericOutputAllOf.md) - [Model.HTTP](docs/HTTP.md) - [Model.HTTPAllOf](docs/HTTPAllOf.md) + - [Model.HTTPValidationError](docs/HTTPValidationError.md) - [Model.IOAliasHandler](docs/IOAliasHandler.md) - [Model.IOAliasHandlerAllOf](docs/IOAliasHandlerAllOf.md) - [Model.IOBase](docs/IOBase.md) @@ -403,6 +459,17 @@ Class | Method | HTTP request | Description - [Model.InputReferenceAllOf](docs/InputReferenceAllOf.md) - [Model.InputReferenceBase](docs/InputReferenceBase.md) - [Model.InputReferenceBaseAllOf](docs/InputReferenceBaseAllOf.md) + - [Model.Inventory](docs/Inventory.md) + - [Model.InventoryAllOf](docs/InventoryAllOf.md) + - [Model.Invoice](docs/Invoice.md) + - [Model.InvoiceAllOf](docs/InvoiceAllOf.md) + - [Model.InvoiceList](docs/InvoiceList.md) + - [Model.InvoiceListAllOf](docs/InvoiceListAllOf.md) + - [Model.InvoicePreview](docs/InvoicePreview.md) + - [Model.InvoicePreviewAllOf](docs/InvoicePreviewAllOf.md) + - [Model.InvoiceStatus](docs/InvoiceStatus.md) + - [Model.InvoiceStatusTransitions](docs/InvoiceStatusTransitions.md) + - [Model.InvoiceStatusTransitionsAllOf](docs/InvoiceStatusTransitionsAllOf.md) - [Model.ItemReference](docs/ItemReference.md) - [Model.ItemReferenceAllOf](docs/ItemReferenceAllOf.md) - [Model.ItemType](docs/ItemType.md) @@ -419,18 +486,45 @@ Class | Method | HTTP request | Description - [Model.KeyRequestAllOf](docs/KeyRequestAllOf.md) - [Model.License](docs/License.md) - [Model.LicenseAllOf](docs/LicenseAllOf.md) + - [Model.LicensePoolAccessPolicy](docs/LicensePoolAccessPolicy.md) + - [Model.LicensePoolAccessPolicyAllOf](docs/LicensePoolAccessPolicyAllOf.md) + - [Model.LicensePoolAccessPolicyList](docs/LicensePoolAccessPolicyList.md) + - [Model.LicensePoolAccessPolicyListAllOf](docs/LicensePoolAccessPolicyListAllOf.md) + - [Model.LicensePoolList](docs/LicensePoolList.md) + - [Model.LicensePoolListAllOf](docs/LicensePoolListAllOf.md) + - [Model.LicensePoolPolicySubject](docs/LicensePoolPolicySubject.md) + - [Model.LicensePoolPolicySubjectAllOf](docs/LicensePoolPolicySubjectAllOf.md) + - [Model.LicensePoolPolicySubjectList](docs/LicensePoolPolicySubjectList.md) + - [Model.LicensePoolPolicySubjectListAllOf](docs/LicensePoolPolicySubjectListAllOf.md) + - [Model.LicensePoolPublic](docs/LicensePoolPublic.md) + - [Model.LicensePoolPublicAllOf](docs/LicensePoolPublicAllOf.md) + - [Model.LicensePoolUpdate](docs/LicensePoolUpdate.md) + - [Model.LicensePoolUpdateAllOf](docs/LicensePoolUpdateAllOf.md) + - [Model.LicensePublic](docs/LicensePublic.md) + - [Model.LicensePublicAllOf](docs/LicensePublicAllOf.md) + - [Model.LicenseType](docs/LicenseType.md) + - [Model.LineItem](docs/LineItem.md) + - [Model.LineItemAllOf](docs/LineItemAllOf.md) + - [Model.LineItemList](docs/LineItemList.md) + - [Model.LineItemListAllOf](docs/LineItemListAllOf.md) - [Model.ListResponseMeta](docs/ListResponseMeta.md) - [Model.ListResponseMetaAllOf](docs/ListResponseMetaAllOf.md) - [Model.LocalConfig](docs/LocalConfig.md) - [Model.LocalConfigAllOf](docs/LocalConfigAllOf.md) + - [Model.Location](docs/Location.md) + - [Model.LocationAllOf](docs/LocationAllOf.md) - [Model.Maintainer](docs/Maintainer.md) - [Model.MaintainerAllOf](docs/MaintainerAllOf.md) - [Model.MetaData](docs/MetaData.md) - [Model.MetaDataAllOf](docs/MetaDataAllOf.md) + - [Model.Metadata](docs/Metadata.md) + - [Model.MetadataAllOf](docs/MetadataAllOf.md) - [Model.NewPluginPackage](docs/NewPluginPackage.md) - [Model.NewPluginPackageAllOf](docs/NewPluginPackageAllOf.md) - [Model.NewRecipePackage](docs/NewRecipePackage.md) - [Model.NewRecipePackageAllOf](docs/NewRecipePackageAllOf.md) + - [Model.NewSubscriptionItem](docs/NewSubscriptionItem.md) + - [Model.NewSubscriptionItemAllOf](docs/NewSubscriptionItemAllOf.md) - [Model.OpenAPIGenBaseModel](docs/OpenAPIGenBaseModel.md) - [Model.Organization](docs/Organization.md) - [Model.OrganizationAllOf](docs/OrganizationAllOf.md) @@ -445,10 +539,21 @@ Class | Method | HTTP request | Description - [Model.OrganizationRoleEnum](docs/OrganizationRoleEnum.md) - [Model.OrganizationUpdate](docs/OrganizationUpdate.md) - [Model.OrganizationUpdateAllOf](docs/OrganizationUpdateAllOf.md) + - [Model.PackageSortKey](docs/PackageSortKey.md) - [Model.PackageVersion](docs/PackageVersion.md) - [Model.PackageVersionAllOf](docs/PackageVersionAllOf.md) - [Model.PathOutput](docs/PathOutput.md) - [Model.PathOutputAllOf](docs/PathOutputAllOf.md) + - [Model.PaymentCreate](docs/PaymentCreate.md) + - [Model.PaymentCreateAllOf](docs/PaymentCreateAllOf.md) + - [Model.PaymentIntent](docs/PaymentIntent.md) + - [Model.PaymentIntentAllOf](docs/PaymentIntentAllOf.md) + - [Model.PaymentMethodList](docs/PaymentMethodList.md) + - [Model.PaymentMethodListAllOf](docs/PaymentMethodListAllOf.md) + - [Model.PaymentSetup](docs/PaymentSetup.md) + - [Model.PaymentSetupAllOf](docs/PaymentSetupAllOf.md) + - [Model.Period](docs/Period.md) + - [Model.PeriodAllOf](docs/PeriodAllOf.md) - [Model.Permission](docs/Permission.md) - [Model.Plugin](docs/Plugin.md) - [Model.PluginAllOf](docs/PluginAllOf.md) @@ -460,6 +565,19 @@ Class | Method | HTTP request | Description - [Model.PluginPackageListAllOf](docs/PluginPackageListAllOf.md) - [Model.PolicySubject](docs/PolicySubject.md) - [Model.PolicySubjectAllOf](docs/PolicySubjectAllOf.md) + - [Model.PollinationSubscription](docs/PollinationSubscription.md) + - [Model.PollinationSubscriptionAllOf](docs/PollinationSubscriptionAllOf.md) + - [Model.Price](docs/Price.md) + - [Model.PriceAllOf](docs/PriceAllOf.md) + - [Model.PriceRecurrence](docs/PriceRecurrence.md) + - [Model.PriceRecurrenceAllOf](docs/PriceRecurrenceAllOf.md) + - [Model.PriceTier](docs/PriceTier.md) + - [Model.PriceTierAllOf](docs/PriceTierAllOf.md) + - [Model.PriceType](docs/PriceType.md) + - [Model.Product](docs/Product.md) + - [Model.ProductAllOf](docs/ProductAllOf.md) + - [Model.ProductFamily](docs/ProductFamily.md) + - [Model.ProductFamilyAllOf](docs/ProductFamilyAllOf.md) - [Model.Project](docs/Project.md) - [Model.ProjectAccessPolicy](docs/ProjectAccessPolicy.md) - [Model.ProjectAccessPolicyAllOf](docs/ProjectAccessPolicyAllOf.md) @@ -478,10 +596,20 @@ Class | Method | HTTP request | Description - [Model.ProjectRecipeFilterAllOf](docs/ProjectRecipeFilterAllOf.md) - [Model.ProjectRecipeFilterList](docs/ProjectRecipeFilterList.md) - [Model.ProjectRecipeFilterListAllOf](docs/ProjectRecipeFilterListAllOf.md) + - [Model.ProjectSortKey](docs/ProjectSortKey.md) - [Model.ProjectUpdate](docs/ProjectUpdate.md) - [Model.ProjectUpdateAllOf](docs/ProjectUpdateAllOf.md) - [Model.PublicAccountList](docs/PublicAccountList.md) - [Model.PublicAccountListAllOf](docs/PublicAccountListAllOf.md) + - [Model.Quota](docs/Quota.md) + - [Model.QuotaAllOf](docs/QuotaAllOf.md) + - [Model.QuotaExtension](docs/QuotaExtension.md) + - [Model.QuotaExtensionAllOf](docs/QuotaExtensionAllOf.md) + - [Model.QuotaList](docs/QuotaList.md) + - [Model.QuotaListAllOf](docs/QuotaListAllOf.md) + - [Model.QuotaPlan](docs/QuotaPlan.md) + - [Model.QuotaPlanAllOf](docs/QuotaPlanAllOf.md) + - [Model.QuotaType](docs/QuotaType.md) - [Model.Recipe](docs/Recipe.md) - [Model.RecipeAllOf](docs/RecipeAllOf.md) - [Model.RecipeInterface](docs/RecipeInterface.md) @@ -510,15 +638,22 @@ Class | Method | HTTP request | Description - [Model.RepositoryPackageAllOf](docs/RepositoryPackageAllOf.md) - [Model.RepositoryPolicySubject](docs/RepositoryPolicySubject.md) - [Model.RepositoryPolicySubjectAllOf](docs/RepositoryPolicySubjectAllOf.md) + - [Model.RepositorySortKey](docs/RepositorySortKey.md) - [Model.RepositoryUpdate](docs/RepositoryUpdate.md) - [Model.RepositoryUpdateAllOf](docs/RepositoryUpdateAllOf.md) - [Model.RepositoryUserPermissions](docs/RepositoryUserPermissions.md) - [Model.RepositoryUserPermissionsAllOf](docs/RepositoryUserPermissionsAllOf.md) + - [Model.ResourcesDuration](docs/ResourcesDuration.md) + - [Model.ResourcesDurationAllOf](docs/ResourcesDurationAllOf.md) - [Model.RoleEnum](docs/RoleEnum.md) - [Model.Run](docs/Run.md) - [Model.RunAllOf](docs/RunAllOf.md) - [Model.RunList](docs/RunList.md) - [Model.RunListAllOf](docs/RunListAllOf.md) + - [Model.RunMeta](docs/RunMeta.md) + - [Model.RunMetaAllOf](docs/RunMetaAllOf.md) + - [Model.RunProgress](docs/RunProgress.md) + - [Model.RunProgressAllOf](docs/RunProgressAllOf.md) - [Model.RunResultList](docs/RunResultList.md) - [Model.RunResultListAllOf](docs/RunResultListAllOf.md) - [Model.RunStatus](docs/RunStatus.md) @@ -528,7 +663,11 @@ Class | Method | HTTP request | Description - [Model.S3AllOf](docs/S3AllOf.md) - [Model.S3UploadRequest](docs/S3UploadRequest.md) - [Model.S3UploadRequestAllOf](docs/S3UploadRequestAllOf.md) + - [Model.SecureResourcePublic](docs/SecureResourcePublic.md) + - [Model.SecureResourcePublicAllOf](docs/SecureResourcePublicAllOf.md) - [Model.SortEnum](docs/SortEnum.md) + - [Model.Status](docs/Status.md) + - [Model.StatusAllOf](docs/StatusAllOf.md) - [Model.StatusType](docs/StatusType.md) - [Model.StepArrayInput](docs/StepArrayInput.md) - [Model.StepArrayInputAllOf](docs/StepArrayInputAllOf.md) @@ -572,6 +711,20 @@ Class | Method | HTTP request | Description - [Model.StepStringOutput](docs/StepStringOutput.md) - [Model.StepStringOutputAllOf](docs/StepStringOutputAllOf.md) - [Model.SubjectType](docs/SubjectType.md) + - [Model.Subscribe](docs/Subscribe.md) + - [Model.SubscribeAllOf](docs/SubscribeAllOf.md) + - [Model.Subscription](docs/Subscription.md) + - [Model.SubscriptionAllOf](docs/SubscriptionAllOf.md) + - [Model.SubscriptionCreate](docs/SubscriptionCreate.md) + - [Model.SubscriptionCreateAllOf](docs/SubscriptionCreateAllOf.md) + - [Model.SubscriptionItem](docs/SubscriptionItem.md) + - [Model.SubscriptionItemAllOf](docs/SubscriptionItemAllOf.md) + - [Model.SubscriptionItemList](docs/SubscriptionItemList.md) + - [Model.SubscriptionItemListAllOf](docs/SubscriptionItemListAllOf.md) + - [Model.SubscriptionPlan](docs/SubscriptionPlan.md) + - [Model.SubscriptionPlanAllOf](docs/SubscriptionPlanAllOf.md) + - [Model.SubscriptionUpdate](docs/SubscriptionUpdate.md) + - [Model.SubscriptionUpdateAllOf](docs/SubscriptionUpdateAllOf.md) - [Model.TaskArgument](docs/TaskArgument.md) - [Model.TaskArgumentAllOf](docs/TaskArgumentAllOf.md) - [Model.TaskFileReference](docs/TaskFileReference.md) @@ -603,8 +756,12 @@ Class | Method | HTTP request | Description - [Model.TeamRoleEnum](docs/TeamRoleEnum.md) - [Model.TeamUpdate](docs/TeamUpdate.md) - [Model.TeamUpdateAllOf](docs/TeamUpdateAllOf.md) + - [Model.TemplateFunction](docs/TemplateFunction.md) + - [Model.TemplateFunctionAllOf](docs/TemplateFunctionAllOf.md) - [Model.UpdateAccepted](docs/UpdateAccepted.md) - [Model.UpdateAcceptedAllOf](docs/UpdateAcceptedAllOf.md) + - [Model.UpdateInvoicePreview](docs/UpdateInvoicePreview.md) + - [Model.UpdateInvoicePreviewAllOf](docs/UpdateInvoicePreviewAllOf.md) - [Model.Usage](docs/Usage.md) - [Model.UsageAllOf](docs/UsageAllOf.md) - [Model.UserCreate](docs/UserCreate.md) @@ -619,6 +776,7 @@ Class | Method | HTTP request | Description - [Model.UserPublicListAllOf](docs/UserPublicListAllOf.md) - [Model.UserUpdate](docs/UserUpdate.md) - [Model.UserUpdateAllOf](docs/UserUpdateAllOf.md) + - [Model.ValidationError](docs/ValidationError.md) - [Model.ValueFileReference](docs/ValueFileReference.md) - [Model.ValueFileReferenceAllOf](docs/ValueFileReferenceAllOf.md) - [Model.ValueFolderReference](docs/ValueFolderReference.md) diff --git a/docs/Accessor.md b/docs/Accessor.md new file mode 100644 index 000000000..613d71ace --- /dev/null +++ b/docs/Accessor.md @@ -0,0 +1,15 @@ + +# PollinationSDK.Model.Accessor + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Subject** | [**AnyOfAccountPublicTeam**](AnyOfAccountPublicTeam.md) | | +**Permission** | **Permission** | | +**Type** | **string** | | [optional] [readonly] [default to "Accessor"] + +[[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/docs/AccountType.md b/docs/AccountType.md new file mode 100644 index 000000000..f7c14a189 --- /dev/null +++ b/docs/AccountType.md @@ -0,0 +1,12 @@ + +# PollinationSDK.Model.AccountType + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[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/docs/AccountsApi.md b/docs/AccountsApi.md index 1c5c0435c..9c30f1a49 100644 --- a/docs/AccountsApi.md +++ b/docs/AccountsApi.md @@ -4,11 +4,89 @@ All URIs are relative to *http://localhost* Method | HTTP request | Description ------------- | ------------- | ------------- +[**CheckAccountName**](AccountsApi.md#checkaccountname) | **GET** /accounts/check/{name} | Check if an account with this name exists [**GetAccount**](AccountsApi.md#getaccount) | **GET** /accounts/{name} | Get an account by name [**ListAccounts**](AccountsApi.md#listaccounts) | **GET** /accounts | List Accounts on the Pollination platform +[**ListQuotas**](AccountsApi.md#listquotas) | **GET** /accounts/{name}/quotas | List Quotas +## CheckAccountName + +> AnyType CheckAccountName (string name) + +Check if an account with this name exists + +Check if an account name is taken + +### Example + +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using PollinationSDK.Api; +using PollinationSDK.Client; +using PollinationSDK.Model; + +namespace Example +{ + public class CheckAccountNameExample + { + public static void Main() + { + Configuration.Default.BasePath = "http://localhost"; + var apiInstance = new AccountsApi(Configuration.Default); + var name = name_example; // string | + + try + { + // Check if an account with this name exists + AnyType result = apiInstance.CheckAccountName(name); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling AccountsApi.CheckAccountName: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **name** | **string**| | + +### Return type + +[**AnyType**](AnyType.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Successful Response | - | +| **422** | Validation Error | - | + +[[Back to top]](#) +[[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + ## GetAccount > AccountPublic GetAccount (string name) @@ -175,3 +253,97 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +## ListQuotas + +> QuotaList ListQuotas (string name, List type = null, bool? exhausted = null, bool? enforced = null, int? page = null, int? perPage = null) + +List Quotas + +### Example + +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using PollinationSDK.Api; +using PollinationSDK.Client; +using PollinationSDK.Model; + +namespace Example +{ + public class ListQuotasExample + { + public static void Main() + { + Configuration.Default.BasePath = "http://localhost"; + // Configure API key authorization: APIKeyAuth + Configuration.Default.AddApiKey("x-pollination-token", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("x-pollination-token", "Bearer"); + // Configure HTTP bearer authorization: JWTAuth + Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; + + var apiInstance = new AccountsApi(Configuration.Default); + var name = name_example; // string | + var type = new List(); // List | The types of quotas to get (optional) + var exhausted = true; // bool? | Whether to return only quotas which are exhausted (optional) + var enforced = true; // bool? | Whether to return only quotas which are enforced (optional) + var page = 56; // int? | Page number starting from 1 (optional) (default to 1) + var perPage = 56; // int? | Number of items per page (optional) (default to 25) + + try + { + // List Quotas + QuotaList result = apiInstance.ListQuotas(name, type, exhausted, enforced, page, perPage); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling AccountsApi.ListQuotas: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **name** | **string**| | + **type** | [**List<QuotaType>**](QuotaType.md)| The types of quotas to get | [optional] + **exhausted** | **bool?**| Whether to return only quotas which are exhausted | [optional] + **enforced** | **bool?**| Whether to return only quotas which are enforced | [optional] + **page** | **int?**| Page number starting from 1 | [optional] [default to 1] + **perPage** | **int?**| Number of items per page | [optional] [default to 25] + +### Return type + +[**QuotaList**](QuotaList.md) + +### Authorization + +[APIKeyAuth](../README.md#APIKeyAuth), [JWTAuth](../README.md#JWTAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Retrieved | - | +| **403** | Access forbidden | - | +| **500** | Server error | - | +| **400** | Invalid request | - | +| **422** | Validation Error | - | + +[[Back to top]](#) +[[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/docs/Activation.md b/docs/Activation.md new file mode 100644 index 000000000..ac2f475f9 --- /dev/null +++ b/docs/Activation.md @@ -0,0 +1,26 @@ + +# PollinationSDK.Model.Activation + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **string** | | +**CreatedAt** | **DateTime** | | +**UpdatedAt** | **DateTime** | | +**Offline** | **bool** | | +**LastSyncedAt** | **DateTime** | | +**Location** | [**Location**](Location.md) | | +**Os** | **string** | | [optional] +**OsVersion** | **string** | | [optional] +**Hostname** | **string** | | [optional] +**AppVersion** | **string** | | [optional] +**LeaseExpiresAt** | **DateTime** | | [optional] +**Metadata** | [**List<Metadata>**](Metadata.md) | | [optional] +**LicenseId** | **string** | | [optional] +**Type** | **string** | | [optional] [readonly] [default to "Activation"] + +[[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/docs/ActivationList.md b/docs/ActivationList.md new file mode 100644 index 000000000..61293da28 --- /dev/null +++ b/docs/ActivationList.md @@ -0,0 +1,14 @@ + +# PollinationSDK.Model.ActivationList + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Resources** | [**List<Activation>**](Activation.md) | | +**Type** | **string** | | [optional] [readonly] [default to "ActivationList"] + +[[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/docs/BakedRecipe.md b/docs/BakedRecipe.md new file mode 100644 index 000000000..28b83029a --- /dev/null +++ b/docs/BakedRecipe.md @@ -0,0 +1,20 @@ + +# PollinationSDK.Model.BakedRecipe + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Flow** | [**List<DAG>**](DAG.md) | A list of tasks to create a DAG recipe. | +**Digest** | **string** | | +**Templates** | [**List<AnyOfTemplateFunctionDAG>**](AnyOfTemplateFunctionDAG.md) | A list of templates. Templates can be Function or a DAG. | +**Annotations** | **Dictionary<string, string>** | An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries. | [optional] +**ApiVersion** | **string** | | [optional] [readonly] [default to "v1beta1"] +**Metadata** | [**MetaData**](MetaData.md) | Recipe metadata information. | [optional] +**Dependencies** | [**List<Dependency>**](Dependency.md) | A list of plugins and other recipes this recipe depends on. | [optional] +**Type** | **string** | | [optional] [readonly] [default to "BakedRecipe"] + +[[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/docs/BaseList.md b/docs/BaseList.md new file mode 100644 index 000000000..817518b14 --- /dev/null +++ b/docs/BaseList.md @@ -0,0 +1,15 @@ + +# PollinationSDK.Model.BaseList + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**HasMore** | **bool** | | +**Data** | **List<Object>** | | +**Type** | **string** | | [optional] [readonly] [default to "BaseList"] + +[[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/docs/CardPublic.md b/docs/CardPublic.md new file mode 100644 index 000000000..e69cd63ba --- /dev/null +++ b/docs/CardPublic.md @@ -0,0 +1,16 @@ + +# PollinationSDK.Model.CardPublic + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Last4** | **string** | The last four digits of the card | +**ExpMonth** | **int** | The month the card expires | +**ExpYear** | **int** | The year the card expires | +**Type** | **string** | | [optional] [readonly] [default to "CardPublic"] + +[[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/docs/Coupon.md b/docs/Coupon.md new file mode 100644 index 000000000..c5fabd267 --- /dev/null +++ b/docs/Coupon.md @@ -0,0 +1,21 @@ + +# PollinationSDK.Model.Coupon + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **string** | | +**Metadata** | **Object** | | [optional] +**Name** | **string** | | +**Valid** | **bool** | | +**Duration** | **CouponDuration** | | +**AmountOff** | **double** | | [optional] +**PercentOff** | **double** | | [optional] +**DurationInMonths** | **int** | | [optional] +**Type** | **string** | | [optional] [readonly] [default to "Coupon"] + +[[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/docs/CouponDuration.md b/docs/CouponDuration.md new file mode 100644 index 000000000..1973d8722 --- /dev/null +++ b/docs/CouponDuration.md @@ -0,0 +1,12 @@ + +# PollinationSDK.Model.CouponDuration + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[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/docs/CryptlexBase.md b/docs/CryptlexBase.md new file mode 100644 index 000000000..00af7b5c5 --- /dev/null +++ b/docs/CryptlexBase.md @@ -0,0 +1,13 @@ + +# PollinationSDK.Model.CryptlexBase + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Type** | **string** | | [optional] [readonly] [default to "CryptlexBase"] + +[[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/docs/DeleteSubscriptionItem.md b/docs/DeleteSubscriptionItem.md new file mode 100644 index 000000000..fe3769abf --- /dev/null +++ b/docs/DeleteSubscriptionItem.md @@ -0,0 +1,14 @@ + +# PollinationSDK.Model.DeleteSubscriptionItem + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Deleted** | **bool** | | [optional] [default to true] +**Type** | **string** | | [optional] [readonly] [default to "DeleteSubscriptionItem"] + +[[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/docs/Discount.md b/docs/Discount.md new file mode 100644 index 000000000..4fe803e36 --- /dev/null +++ b/docs/Discount.md @@ -0,0 +1,19 @@ + +# PollinationSDK.Model.Discount + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **string** | | +**Metadata** | **Object** | | [optional] +**Start** | **DateTime** | | +**Coupon** | [**Coupon**](Coupon.md) | | +**End** | **DateTime** | | [optional] +**PromotionCode** | **string** | | [optional] +**Type** | **string** | | [optional] [readonly] [default to "Discount"] + +[[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/docs/DiscountAmount.md b/docs/DiscountAmount.md new file mode 100644 index 000000000..a8fdd7653 --- /dev/null +++ b/docs/DiscountAmount.md @@ -0,0 +1,15 @@ + +# PollinationSDK.Model.DiscountAmount + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Discount** | **string** | | +**Amount** | **int** | | +**Type** | **string** | | [optional] [readonly] [default to "DiscountAmount"] + +[[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/docs/ExternalResource.md b/docs/ExternalResource.md new file mode 100644 index 000000000..e0d838593 --- /dev/null +++ b/docs/ExternalResource.md @@ -0,0 +1,15 @@ + +# PollinationSDK.Model.ExternalResource + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **string** | | +**Metadata** | **Object** | | [optional] +**Type** | **string** | | [optional] [readonly] [default to "ExternalResource"] + +[[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/docs/HTTPValidationError.md b/docs/HTTPValidationError.md new file mode 100644 index 000000000..709714b50 --- /dev/null +++ b/docs/HTTPValidationError.md @@ -0,0 +1,13 @@ + +# PollinationSDK.Model.HTTPValidationError + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Detail** | [**List<ValidationError>**](ValidationError.md) | | [optional] + +[[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/docs/Inventory.md b/docs/Inventory.md new file mode 100644 index 000000000..b5fcfd754 --- /dev/null +++ b/docs/Inventory.md @@ -0,0 +1,14 @@ + +# PollinationSDK.Model.Inventory + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Families** | [**List<ProductFamily>**](ProductFamily.md) | | +**Type** | **string** | | [optional] [readonly] [default to "Inventory"] + +[[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/docs/Invoice.md b/docs/Invoice.md new file mode 100644 index 000000000..b8dc54825 --- /dev/null +++ b/docs/Invoice.md @@ -0,0 +1,30 @@ + +# PollinationSDK.Model.Invoice + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**CollectionMethod** | **string** | | +**Currency** | **string** | | +**Customer** | **string** | | +**Lines** | [**LineItemList**](LineItemList.md) | | +**PeriodStart** | **DateTime** | | +**PeriodEnd** | **DateTime** | | +**Status** | [**InvoiceStatus**](InvoiceStatus.md) | | +**StatusTransitions** | [**InvoiceStatusTransitions**](InvoiceStatusTransitions.md) | | +**Subtotal** | **int** | | +**Total** | **int** | | +**AutoAdvance** | **bool** | | [optional] +**Description** | **string** | | [optional] +**HostedInvoiceUrl** | **string** | | [optional] +**Subscription** | **string** | | [optional] +**Discount** | [**Discount**](Discount.md) | | [optional] +**TotalDiscountAmounts** | [**List<DiscountAmount>**](DiscountAmount.md) | | [optional] +**PaymentMethod** | [**CardPublic**](CardPublic.md) | The payment method that will be billed when this invoice is due. | [optional] +**Type** | **string** | | [optional] [readonly] [default to "Invoice"] + +[[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/docs/InvoiceList.md b/docs/InvoiceList.md new file mode 100644 index 000000000..e45a742af --- /dev/null +++ b/docs/InvoiceList.md @@ -0,0 +1,15 @@ + +# PollinationSDK.Model.InvoiceList + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Resources** | [**List<Invoice>**](Invoice.md) | | +**HasMore** | **bool** | | +**Type** | **string** | | [optional] [readonly] [default to "InvoiceList"] + +[[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/docs/InvoicePreview.md b/docs/InvoicePreview.md new file mode 100644 index 000000000..0e67f68f7 --- /dev/null +++ b/docs/InvoicePreview.md @@ -0,0 +1,30 @@ + +# PollinationSDK.Model.InvoicePreview + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**CollectionMethod** | **string** | | +**Currency** | **string** | | +**Customer** | **string** | | +**Lines** | [**LineItemList**](LineItemList.md) | | +**PeriodStart** | **DateTime** | | +**PeriodEnd** | **DateTime** | | +**Status** | **InvoiceStatus** | | +**StatusTransitions** | [**InvoiceStatusTransitions**](InvoiceStatusTransitions.md) | | +**Subtotal** | **int** | | +**Total** | **int** | | +**AutoAdvance** | **bool** | | [optional] +**Description** | **string** | | [optional] +**HostedInvoiceUrl** | **string** | | [optional] +**Subscription** | **string** | | [optional] +**Discount** | [**Discount**](Discount.md) | | [optional] +**TotalDiscountAmounts** | [**List<DiscountAmount>**](DiscountAmount.md) | | [optional] +**PaymentMethod** | [**CardPublic**](CardPublic.md) | The payment method that will be billed when this invoice is due. | [optional] +**Type** | **string** | | [optional] [readonly] [default to "InvoicePreview"] + +[[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/docs/InvoiceStatus.md b/docs/InvoiceStatus.md new file mode 100644 index 000000000..be5575c9b --- /dev/null +++ b/docs/InvoiceStatus.md @@ -0,0 +1,12 @@ + +# PollinationSDK.Model.InvoiceStatus + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[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/docs/InvoiceStatusTransitions.md b/docs/InvoiceStatusTransitions.md new file mode 100644 index 000000000..1228d4bdc --- /dev/null +++ b/docs/InvoiceStatusTransitions.md @@ -0,0 +1,17 @@ + +# PollinationSDK.Model.InvoiceStatusTransitions + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**FinalizedAt** | **DateTime** | | [optional] +**MarkedUncollectibleAt** | **DateTime** | | [optional] +**PaidAt** | **DateTime** | | [optional] +**VoidedAt** | **DateTime** | | [optional] +**Type** | **string** | | [optional] [readonly] [default to "InvoiceStatusTransitions"] + +[[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/docs/JobsApi.md b/docs/JobsApi.md index 3b78b93b3..a6df8a6f9 100644 --- a/docs/JobsApi.md +++ b/docs/JobsApi.md @@ -6,6 +6,7 @@ Method | HTTP request | Description ------------- | ------------- | ------------- [**CancelJob**](JobsApi.md#canceljob) | **PUT** /projects/{owner}/{name}/jobs/{job_id}/cancel | Cancel a Job [**CreateJob**](JobsApi.md#createjob) | **POST** /projects/{owner}/{name}/jobs | Schedule a job +[**DeleteJob**](JobsApi.md#deletejob) | **DELETE** /projects/{owner}/{name}/jobs/{job_id} | Delete a Job [**DownloadJobArtifact**](JobsApi.md#downloadjobartifact) | **GET** /projects/{owner}/{name}/jobs/{job_id}/artifacts/download | Download an artifact from the job folder [**GetJob**](JobsApi.md#getjob) | **GET** /projects/{owner}/{name}/jobs/{job_id} | Get a Job [**ListJobs**](JobsApi.md#listjobs) | **GET** /projects/{owner}/{name}/jobs | List Jobs @@ -191,6 +192,93 @@ Name | Type | Description | Notes [[Back to README]](../README.md) +## DeleteJob + +> AnyType DeleteJob (string owner, string name, string jobId) + +Delete a Job + +Delete a job. + +### Example + +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using PollinationSDK.Api; +using PollinationSDK.Client; +using PollinationSDK.Model; + +namespace Example +{ + public class DeleteJobExample + { + public static void Main() + { + Configuration.Default.BasePath = "http://localhost"; + // Configure API key authorization: APIKeyAuth + Configuration.Default.AddApiKey("x-pollination-token", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("x-pollination-token", "Bearer"); + // Configure HTTP bearer authorization: JWTAuth + Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; + + var apiInstance = new JobsApi(Configuration.Default); + var owner = owner_example; // string | + var name = name_example; // string | + var jobId = jobId_example; // string | + + try + { + // Delete a Job + AnyType result = apiInstance.DeleteJob(owner, name, jobId); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling JobsApi.DeleteJob: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **string**| | + **name** | **string**| | + **jobId** | **string**| | + +### Return type + +[**AnyType**](AnyType.md) + +### Authorization + +[APIKeyAuth](../README.md#APIKeyAuth), [JWTAuth](../README.md#JWTAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **202** | Accepted | - | +| **422** | Validation Error | - | + +[[Back to top]](#) +[[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + ## DownloadJobArtifact > AnyType DownloadJobArtifact (string owner, string name, string jobId, string path = null) diff --git a/docs/LicensePoolAccessPolicy.md b/docs/LicensePoolAccessPolicy.md new file mode 100644 index 000000000..4de3a699c --- /dev/null +++ b/docs/LicensePoolAccessPolicy.md @@ -0,0 +1,15 @@ + +# PollinationSDK.Model.LicensePoolAccessPolicy + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Subject** | [**PolicySubject**](PolicySubject.md) | The subject of the access policy | +**Permission** | **Permission** | Accessors may only have read access | [optional] +**Type** | **string** | | [optional] [readonly] [default to "LicensePoolAccessPolicy"] + +[[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/docs/LicensePoolAccessPolicyList.md b/docs/LicensePoolAccessPolicyList.md new file mode 100644 index 000000000..e45bd13d8 --- /dev/null +++ b/docs/LicensePoolAccessPolicyList.md @@ -0,0 +1,14 @@ + +# PollinationSDK.Model.LicensePoolAccessPolicyList + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Resources** | [**List<LicensePoolAccessPolicy>**](LicensePoolAccessPolicy.md) | The list of policies granting access to the pool | [optional] +**Type** | **string** | | [optional] [readonly] [default to "LicensePoolAccessPolicyList"] + +[[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/docs/LicensePoolList.md b/docs/LicensePoolList.md new file mode 100644 index 000000000..0dc9f67d2 --- /dev/null +++ b/docs/LicensePoolList.md @@ -0,0 +1,14 @@ + +# PollinationSDK.Model.LicensePoolList + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Resources** | [**List<LicensePoolPublic>**](LicensePoolPublic.md) | | +**Type** | **string** | | [optional] [readonly] [default to "LicensePoolList"] + +[[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/docs/LicensePoolPolicySubject.md b/docs/LicensePoolPolicySubject.md new file mode 100644 index 000000000..39487906e --- /dev/null +++ b/docs/LicensePoolPolicySubject.md @@ -0,0 +1,15 @@ + +# PollinationSDK.Model.LicensePoolPolicySubject + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**SubjectType** | [**SubjectType**](SubjectType.md) | | +**Name** | **string** | The name of the policy subject | +**Type** | **string** | | [optional] [readonly] [default to "LicensePoolPolicySubject"] + +[[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/docs/LicensePoolPolicySubjectList.md b/docs/LicensePoolPolicySubjectList.md new file mode 100644 index 000000000..be07fb4ed --- /dev/null +++ b/docs/LicensePoolPolicySubjectList.md @@ -0,0 +1,14 @@ + +# PollinationSDK.Model.LicensePoolPolicySubjectList + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Resources** | [**List<LicensePoolPolicySubject>**](LicensePoolPolicySubject.md) | The list of subjects which currently have access to the pool | [optional] +**Type** | **string** | | [optional] [readonly] [default to "LicensePoolPolicySubjectList"] + +[[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/docs/LicensePoolPublic.md b/docs/LicensePoolPublic.md new file mode 100644 index 000000000..b978e4dcb --- /dev/null +++ b/docs/LicensePoolPublic.md @@ -0,0 +1,20 @@ + +# PollinationSDK.Model.LicensePoolPublic + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **Guid** | The ID of the pool | +**LicenseId** | **string** | The ID of the license to which the pool provides access | +**Owner** | [**AccountPublic**](AccountPublic.md) | The account that owns the license | +**Permissions** | [**UserPermission**](UserPermission.md) | | +**Product** | **string** | The pollination product to which this pool provides access | +**Accessors** | [**List<Accessor>**](Accessor.md) | The entities that can access the license though the pool | [optional] +**Description** | **string** | The description of the pool | [optional] +**Type** | **string** | | [optional] [readonly] [default to "LicensePoolPublic"] + +[[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/docs/LicensePoolUpdate.md b/docs/LicensePoolUpdate.md new file mode 100644 index 000000000..ca9a2bfae --- /dev/null +++ b/docs/LicensePoolUpdate.md @@ -0,0 +1,14 @@ + +# PollinationSDK.Model.LicensePoolUpdate + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Description** | **string** | The description of the license pool | [optional] +**Type** | **string** | | [optional] [readonly] [default to "LicensePoolUpdate"] + +[[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/docs/LicensePublic.md b/docs/LicensePublic.md new file mode 100644 index 000000000..185aa2e40 --- /dev/null +++ b/docs/LicensePublic.md @@ -0,0 +1,32 @@ + +# PollinationSDK.Model.LicensePublic + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | The license name used for the package. | +**Annotations** | **Dictionary<string, string>** | An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries. | [optional] +**Url** | **string** | A URL to the license used for the package. | [optional] +**Id** | **string** | | +**CreatedAt** | **DateTime** | | +**UpdatedAt** | **DateTime** | | +**Key** | **string** | The key used to activate this license. Treat this like a password. | +**Revoked** | **bool** | | +**Suspended** | **bool** | | +**TotalActivations** | **int** | | +**TotalDeactivations** | **int** | | +**Validity** | **int** | | +**AllowedActivations** | **int** | | +**ServerSyncGracePeriod** | **int** | | +**ServerSyncInterval** | **int** | | +**LeaseDuration** | **int** | | +**ProductId** | **string** | | +**Metadata** | [**List<Metadata>**](Metadata.md) | | +**Type** | **LicenseType** | | +**Notes** | **string** | | [optional] + +[[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/docs/LicenseType.md b/docs/LicenseType.md new file mode 100644 index 000000000..7e4f07d28 --- /dev/null +++ b/docs/LicenseType.md @@ -0,0 +1,12 @@ + +# PollinationSDK.Model.LicenseType + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[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/docs/LicensesApi.md b/docs/LicensesApi.md new file mode 100644 index 000000000..f2eebee87 --- /dev/null +++ b/docs/LicensesApi.md @@ -0,0 +1,687 @@ +# PollinationSDK.Api.LicensesApi + +All URIs are relative to *http://localhost* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**DeleteActivation**](LicensesApi.md#deleteactivation) | **DELETE** /licenses/pools/{pool_id}/activations/{activation_id} | Delete Activation +[**GetAvailablePools**](LicensesApi.md#getavailablepools) | **GET** /licenses/pools | Get Available Pools +[**GetLicenseActivations**](LicensesApi.md#getlicenseactivations) | **GET** /licenses/pools/{pool_id}/activations | Get Activations +[**GetPoolLicense**](LicensesApi.md#getpoollicense) | **GET** /licenses/pools/{pool_id}/license | Get Pool License +[**GrantAccessToPool**](LicensesApi.md#grantaccesstopool) | **PATCH** /licenses/pools/{pool_id}/permissions | Grant Pool Access +[**RegenerateLicensePool**](LicensesApi.md#regeneratelicensepool) | **POST** /licenses/pools/{pool_id}/regenerate | Regenerate +[**RevokeAccessToPool**](LicensesApi.md#revokeaccesstopool) | **DELETE** /licenses/pools/{pool_id}/permissions | Delete Pool Access +[**UpdateLicensePool**](LicensesApi.md#updatelicensepool) | **PUT** /licenses/pools/{pool_id} | Update Pool + + + +## DeleteActivation + +> void DeleteActivation (string poolId, string activationId) + +Delete Activation + +Delete the activation + +### Example + +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using PollinationSDK.Api; +using PollinationSDK.Client; +using PollinationSDK.Model; + +namespace Example +{ + public class DeleteActivationExample + { + public static void Main() + { + Configuration.Default.BasePath = "http://localhost"; + // Configure API key authorization: APIKeyAuth + Configuration.Default.AddApiKey("x-pollination-token", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("x-pollination-token", "Bearer"); + // Configure HTTP bearer authorization: JWTAuth + Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; + + var apiInstance = new LicensesApi(Configuration.Default); + var poolId = poolId_example; // string | + var activationId = activationId_example; // string | + + try + { + // Delete Activation + apiInstance.DeleteActivation(poolId, activationId); + } + catch (ApiException e) + { + Debug.Print("Exception when calling LicensesApi.DeleteActivation: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **poolId** | **string**| | + **activationId** | **string**| | + +### Return type + +void (empty response body) + +### Authorization + +[APIKeyAuth](../README.md#APIKeyAuth), [JWTAuth](../README.md#JWTAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | Successful Response | - | +| **422** | Validation Error | - | + +[[Back to top]](#) +[[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## GetAvailablePools + +> LicensePoolList GetAvailablePools (List owner = null) + +Get Available Pools + +Get license pools available to authenticated user + +### Example + +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using PollinationSDK.Api; +using PollinationSDK.Client; +using PollinationSDK.Model; + +namespace Example +{ + public class GetAvailablePoolsExample + { + public static void Main() + { + Configuration.Default.BasePath = "http://localhost"; + // Configure API key authorization: APIKeyAuth + Configuration.Default.AddApiKey("x-pollination-token", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("x-pollination-token", "Bearer"); + // Configure HTTP bearer authorization: JWTAuth + Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; + + var apiInstance = new LicensesApi(Configuration.Default); + var owner = new List(); // List | Owner of the project (optional) + + try + { + // Get Available Pools + LicensePoolList result = apiInstance.GetAvailablePools(owner); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling LicensesApi.GetAvailablePools: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | [**List<string>**](string.md)| Owner of the project | [optional] + +### Return type + +[**LicensePoolList**](LicensePoolList.md) + +### Authorization + +[APIKeyAuth](../README.md#APIKeyAuth), [JWTAuth](../README.md#JWTAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Successful Response | - | +| **422** | Validation Error | - | + +[[Back to top]](#) +[[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## GetLicenseActivations + +> ActivationList GetLicenseActivations (string poolId) + +Get Activations + +Get the activations for the license + +### Example + +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using PollinationSDK.Api; +using PollinationSDK.Client; +using PollinationSDK.Model; + +namespace Example +{ + public class GetLicenseActivationsExample + { + public static void Main() + { + Configuration.Default.BasePath = "http://localhost"; + // Configure API key authorization: APIKeyAuth + Configuration.Default.AddApiKey("x-pollination-token", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("x-pollination-token", "Bearer"); + // Configure HTTP bearer authorization: JWTAuth + Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; + + var apiInstance = new LicensesApi(Configuration.Default); + var poolId = poolId_example; // string | + + try + { + // Get Activations + ActivationList result = apiInstance.GetLicenseActivations(poolId); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling LicensesApi.GetLicenseActivations: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **poolId** | **string**| | + +### Return type + +[**ActivationList**](ActivationList.md) + +### Authorization + +[APIKeyAuth](../README.md#APIKeyAuth), [JWTAuth](../README.md#JWTAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Successful Response | - | +| **422** | Validation Error | - | + +[[Back to top]](#) +[[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## GetPoolLicense + +> LicensePublic GetPoolLicense (Guid poolId) + +Get Pool License + +Get the license associated with a pool + +### Example + +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using PollinationSDK.Api; +using PollinationSDK.Client; +using PollinationSDK.Model; + +namespace Example +{ + public class GetPoolLicenseExample + { + public static void Main() + { + Configuration.Default.BasePath = "http://localhost"; + // Configure API key authorization: APIKeyAuth + Configuration.Default.AddApiKey("x-pollination-token", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("x-pollination-token", "Bearer"); + // Configure HTTP bearer authorization: JWTAuth + Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; + + var apiInstance = new LicensesApi(Configuration.Default); + var poolId = new Guid(); // Guid | + + try + { + // Get Pool License + LicensePublic result = apiInstance.GetPoolLicense(poolId); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling LicensesApi.GetPoolLicense: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **poolId** | [**Guid**](Guid.md)| | + +### Return type + +[**LicensePublic**](LicensePublic.md) + +### Authorization + +[APIKeyAuth](../README.md#APIKeyAuth), [JWTAuth](../README.md#JWTAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Successful Response | - | +| **422** | Validation Error | - | + +[[Back to top]](#) +[[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## GrantAccessToPool + +> LicensePoolPublic GrantAccessToPool (Guid poolId, LicensePoolAccessPolicyList licensePoolAccessPolicyList) + +Grant Pool Access + +Grant access to the license pool + +### Example + +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using PollinationSDK.Api; +using PollinationSDK.Client; +using PollinationSDK.Model; + +namespace Example +{ + public class GrantAccessToPoolExample + { + public static void Main() + { + Configuration.Default.BasePath = "http://localhost"; + // Configure API key authorization: APIKeyAuth + Configuration.Default.AddApiKey("x-pollination-token", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("x-pollination-token", "Bearer"); + // Configure HTTP bearer authorization: JWTAuth + Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; + + var apiInstance = new LicensesApi(Configuration.Default); + var poolId = new Guid(); // Guid | + var licensePoolAccessPolicyList = new LicensePoolAccessPolicyList(); // LicensePoolAccessPolicyList | + + try + { + // Grant Pool Access + LicensePoolPublic result = apiInstance.GrantAccessToPool(poolId, licensePoolAccessPolicyList); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling LicensesApi.GrantAccessToPool: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **poolId** | [**Guid**](Guid.md)| | + **licensePoolAccessPolicyList** | [**LicensePoolAccessPolicyList**](LicensePoolAccessPolicyList.md)| | + +### Return type + +[**LicensePoolPublic**](LicensePoolPublic.md) + +### Authorization + +[APIKeyAuth](../README.md#APIKeyAuth), [JWTAuth](../README.md#JWTAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Successful Response | - | +| **422** | Validation Error | - | + +[[Back to top]](#) +[[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## RegenerateLicensePool + +> AnyType RegenerateLicensePool (Guid poolId) + +Regenerate + +Regenerate the license associated with the pool + +### Example + +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using PollinationSDK.Api; +using PollinationSDK.Client; +using PollinationSDK.Model; + +namespace Example +{ + public class RegenerateLicensePoolExample + { + public static void Main() + { + Configuration.Default.BasePath = "http://localhost"; + // Configure API key authorization: APIKeyAuth + Configuration.Default.AddApiKey("x-pollination-token", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("x-pollination-token", "Bearer"); + // Configure HTTP bearer authorization: JWTAuth + Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; + + var apiInstance = new LicensesApi(Configuration.Default); + var poolId = new Guid(); // Guid | + + try + { + // Regenerate + AnyType result = apiInstance.RegenerateLicensePool(poolId); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling LicensesApi.RegenerateLicensePool: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **poolId** | [**Guid**](Guid.md)| | + +### Return type + +[**AnyType**](AnyType.md) + +### Authorization + +[APIKeyAuth](../README.md#APIKeyAuth), [JWTAuth](../README.md#JWTAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Successful Response | - | +| **422** | Validation Error | - | + +[[Back to top]](#) +[[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## RevokeAccessToPool + +> LicensePoolPublic RevokeAccessToPool (Guid poolId, LicensePoolPolicySubjectList licensePoolPolicySubjectList) + +Delete Pool Access + +Revoke access to the license pool + +### Example + +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using PollinationSDK.Api; +using PollinationSDK.Client; +using PollinationSDK.Model; + +namespace Example +{ + public class RevokeAccessToPoolExample + { + public static void Main() + { + Configuration.Default.BasePath = "http://localhost"; + // Configure API key authorization: APIKeyAuth + Configuration.Default.AddApiKey("x-pollination-token", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("x-pollination-token", "Bearer"); + // Configure HTTP bearer authorization: JWTAuth + Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; + + var apiInstance = new LicensesApi(Configuration.Default); + var poolId = new Guid(); // Guid | + var licensePoolPolicySubjectList = new LicensePoolPolicySubjectList(); // LicensePoolPolicySubjectList | + + try + { + // Delete Pool Access + LicensePoolPublic result = apiInstance.RevokeAccessToPool(poolId, licensePoolPolicySubjectList); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling LicensesApi.RevokeAccessToPool: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **poolId** | [**Guid**](Guid.md)| | + **licensePoolPolicySubjectList** | [**LicensePoolPolicySubjectList**](LicensePoolPolicySubjectList.md)| | + +### Return type + +[**LicensePoolPublic**](LicensePoolPublic.md) + +### Authorization + +[APIKeyAuth](../README.md#APIKeyAuth), [JWTAuth](../README.md#JWTAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Successful Response | - | +| **422** | Validation Error | - | + +[[Back to top]](#) +[[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateLicensePool + +> AnyType UpdateLicensePool (Guid poolId, LicensePoolUpdate licensePoolUpdate) + +Update Pool + +Update the license pool + +### Example + +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using PollinationSDK.Api; +using PollinationSDK.Client; +using PollinationSDK.Model; + +namespace Example +{ + public class UpdateLicensePoolExample + { + public static void Main() + { + Configuration.Default.BasePath = "http://localhost"; + // Configure API key authorization: APIKeyAuth + Configuration.Default.AddApiKey("x-pollination-token", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("x-pollination-token", "Bearer"); + // Configure HTTP bearer authorization: JWTAuth + Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; + + var apiInstance = new LicensesApi(Configuration.Default); + var poolId = new Guid(); // Guid | + var licensePoolUpdate = new LicensePoolUpdate(); // LicensePoolUpdate | + + try + { + // Update Pool + AnyType result = apiInstance.UpdateLicensePool(poolId, licensePoolUpdate); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling LicensesApi.UpdateLicensePool: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **poolId** | [**Guid**](Guid.md)| | + **licensePoolUpdate** | [**LicensePoolUpdate**](LicensePoolUpdate.md)| | + +### Return type + +[**AnyType**](AnyType.md) + +### Authorization + +[APIKeyAuth](../README.md#APIKeyAuth), [JWTAuth](../README.md#JWTAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Successful Response | - | +| **422** | Validation Error | - | + +[[Back to top]](#) +[[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/docs/LineItem.md b/docs/LineItem.md new file mode 100644 index 000000000..71d3bc75d --- /dev/null +++ b/docs/LineItem.md @@ -0,0 +1,22 @@ + +# PollinationSDK.Model.LineItem + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **string** | | +**Metadata** | **Object** | | [optional] +**Amount** | **int** | | +**Currency** | **string** | | +**Description** | **string** | | +**Period** | [**Period**](Period.md) | | +**Price** | [**Price**](Price.md) | | +**Proration** | **bool** | | +**Quantity** | **int** | | +**Type** | **string** | | [readonly] + +[[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/docs/LineItemList.md b/docs/LineItemList.md new file mode 100644 index 000000000..54e868163 --- /dev/null +++ b/docs/LineItemList.md @@ -0,0 +1,15 @@ + +# PollinationSDK.Model.LineItemList + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**HasMore** | **bool** | | +**Data** | [**List<LineItem>**](LineItem.md) | | +**Type** | **string** | | [optional] [readonly] [default to "LineItemList"] + +[[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/docs/Location.md b/docs/Location.md new file mode 100644 index 000000000..df655998b --- /dev/null +++ b/docs/Location.md @@ -0,0 +1,19 @@ + +# PollinationSDK.Model.Location + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**IpAddress** | **string** | | [optional] +**CountryCode** | **string** | | [optional] +**CountryName** | **string** | | [optional] +**City** | **string** | | [optional] +**Latitude** | **double** | | [optional] +**Longitude** | **double** | | [optional] +**Type** | **string** | | [optional] [readonly] [default to "Location"] + +[[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/docs/Metadata.md b/docs/Metadata.md new file mode 100644 index 000000000..65ee19714 --- /dev/null +++ b/docs/Metadata.md @@ -0,0 +1,17 @@ + +# PollinationSDK.Model.Metadata + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Key** | **string** | | +**Value** | **string** | | +**Id** | **string** | | [optional] +**Visible** | **bool** | | [optional] [default to false] +**Type** | **string** | | [optional] [readonly] [default to "Metadata"] + +[[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/docs/NewSubscriptionItem.md b/docs/NewSubscriptionItem.md new file mode 100644 index 000000000..1027a8805 --- /dev/null +++ b/docs/NewSubscriptionItem.md @@ -0,0 +1,15 @@ + +# PollinationSDK.Model.NewSubscriptionItem + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Price** | [**Price**](Price.md) | | +**Quantity** | **int** | | +**Type** | **string** | | [optional] [readonly] [default to "NewSubscriptionItem"] + +[[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/docs/PackageSortKey.md b/docs/PackageSortKey.md new file mode 100644 index 000000000..9c82480c5 --- /dev/null +++ b/docs/PackageSortKey.md @@ -0,0 +1,12 @@ + +# PollinationSDK.Model.PackageSortKey + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[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/docs/PaymentCreate.md b/docs/PaymentCreate.md new file mode 100644 index 000000000..10054a653 --- /dev/null +++ b/docs/PaymentCreate.md @@ -0,0 +1,14 @@ + +# PollinationSDK.Model.PaymentCreate + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Description** | **string** | The description of this payment method | [optional] +**Type** | **string** | | [optional] [readonly] [default to "PaymentCreate"] + +[[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/docs/PaymentIntent.md b/docs/PaymentIntent.md new file mode 100644 index 000000000..76cfd5ea4 --- /dev/null +++ b/docs/PaymentIntent.md @@ -0,0 +1,13 @@ + +# PollinationSDK.Model.PaymentIntent + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Type** | **string** | | [optional] [readonly] [default to "PaymentIntent"] + +[[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/docs/PaymentMethodList.md b/docs/PaymentMethodList.md new file mode 100644 index 000000000..876851893 --- /dev/null +++ b/docs/PaymentMethodList.md @@ -0,0 +1,19 @@ + +# PollinationSDK.Model.PaymentMethodList + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Page** | **int** | The current page the pagination request is on | +**PerPage** | **int** | The number of pages per pagination request | +**PageCount** | **int** | The total number of pages | +**TotalCount** | **int** | The total number of resources matching the list request | +**Resources** | [**List<CardPublic>**](CardPublic.md) | | +**NextPage** | **int** | The next page, if this on is not the last | [optional] +**Type** | **string** | | [optional] [readonly] [default to "PaymentMethodList"] + +[[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/docs/PaymentSetup.md b/docs/PaymentSetup.md new file mode 100644 index 000000000..293a72d36 --- /dev/null +++ b/docs/PaymentSetup.md @@ -0,0 +1,13 @@ + +# PollinationSDK.Model.PaymentSetup + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Type** | **string** | | [optional] [readonly] [default to "PaymentSetup"] + +[[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/docs/PaymentsApi.md b/docs/PaymentsApi.md new file mode 100644 index 000000000..df91be2df --- /dev/null +++ b/docs/PaymentsApi.md @@ -0,0 +1,1326 @@ +# PollinationSDK.Api.PaymentsApi + +All URIs are relative to *http://localhost* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**CancelSubscription**](PaymentsApi.md#cancelsubscription) | **DELETE** /payments/{account_name}/subscription | Cancel Subscription +[**CreatePaymentMethod**](PaymentsApi.md#createpaymentmethod) | **POST** /payments/{account_name}/methods | Add Payment Method +[**CreateSubscription**](PaymentsApi.md#createsubscription) | **POST** /payments/{account_name}/subscription | Create Subscription +[**GetDefaultPaymentMethod**](PaymentsApi.md#getdefaultpaymentmethod) | **GET** /payments/{account_name}/methods/default | Get Default Payment Method +[**GetFailedPayment**](PaymentsApi.md#getfailedpayment) | **GET** /payments/{account_name}/failed | Get Failed Payment +[**GetInventory**](PaymentsApi.md#getinventory) | **GET** /payments/{account_name}/inventory | Get Inventory +[**GetInvoiceList**](PaymentsApi.md#getinvoicelist) | **GET** /payments/{account_name}/invoices | Get Invoice List +[**GetNextInvoice**](PaymentsApi.md#getnextinvoice) | **GET** /payments/{account_name}/invoices/next | Get Next Invoice +[**GetStatus**](PaymentsApi.md#getstatus) | **GET** /payments/{account_name}/status | Get Status +[**GetSubscription**](PaymentsApi.md#getsubscription) | **GET** /payments/{account_name}/subscription | Get Subscription +[**GetUnfilteredInventory**](PaymentsApi.md#getunfilteredinventory) | **GET** /payments/inventory | Get Unfiltered Inventory +[**GetUpcomingSubscription**](PaymentsApi.md#getupcomingsubscription) | **GET** /payments/{account_name}/subscription/upcoming | Get Upcoming Subscription +[**ListPaymentMethods**](PaymentsApi.md#listpaymentmethods) | **GET** /payments/{account_name}/methods | Get Payment Methods +[**PreviewUpdateSubscription**](PaymentsApi.md#previewupdatesubscription) | **PUT** /payments/{account_name}/subscription/preview | Preview Update Subscription +[**Subscribe**](PaymentsApi.md#subscribe) | **POST** /payments/{account_name}/subscribe | Subscribe +[**UpdateSubscription**](PaymentsApi.md#updatesubscription) | **PUT** /payments/{account_name}/subscription | Update Subscription + + + +## CancelSubscription + +> AnyType CancelSubscription (string accountName) + +Cancel Subscription + +### Example + +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using PollinationSDK.Api; +using PollinationSDK.Client; +using PollinationSDK.Model; + +namespace Example +{ + public class CancelSubscriptionExample + { + public static void Main() + { + Configuration.Default.BasePath = "http://localhost"; + // Configure API key authorization: APIKeyAuth + Configuration.Default.AddApiKey("x-pollination-token", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("x-pollination-token", "Bearer"); + // Configure HTTP bearer authorization: JWTAuth + Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; + + var apiInstance = new PaymentsApi(Configuration.Default); + var accountName = accountName_example; // string | + + try + { + // Cancel Subscription + AnyType result = apiInstance.CancelSubscription(accountName); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling PaymentsApi.CancelSubscription: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **accountName** | **string**| | + +### Return type + +[**AnyType**](AnyType.md) + +### Authorization + +[APIKeyAuth](../README.md#APIKeyAuth), [JWTAuth](../README.md#JWTAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Successful Response | - | +| **422** | Validation Error | - | + +[[Back to top]](#) +[[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## CreatePaymentMethod + +> PaymentSetup CreatePaymentMethod (string accountName, PaymentCreate paymentCreate) + +Add Payment Method + +### Example + +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using PollinationSDK.Api; +using PollinationSDK.Client; +using PollinationSDK.Model; + +namespace Example +{ + public class CreatePaymentMethodExample + { + public static void Main() + { + Configuration.Default.BasePath = "http://localhost"; + // Configure API key authorization: APIKeyAuth + Configuration.Default.AddApiKey("x-pollination-token", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("x-pollination-token", "Bearer"); + // Configure HTTP bearer authorization: JWTAuth + Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; + + var apiInstance = new PaymentsApi(Configuration.Default); + var accountName = accountName_example; // string | + var paymentCreate = new PaymentCreate(); // PaymentCreate | + + try + { + // Add Payment Method + PaymentSetup result = apiInstance.CreatePaymentMethod(accountName, paymentCreate); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling PaymentsApi.CreatePaymentMethod: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **accountName** | **string**| | + **paymentCreate** | [**PaymentCreate**](PaymentCreate.md)| | + +### Return type + +[**PaymentSetup**](PaymentSetup.md) + +### Authorization + +[APIKeyAuth](../README.md#APIKeyAuth), [JWTAuth](../README.md#JWTAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Successful Response | - | +| **422** | Validation Error | - | + +[[Back to top]](#) +[[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## CreateSubscription + +> CreatedContent CreateSubscription (string accountName, SubscriptionCreate subscriptionCreate) + +Create Subscription + +### Example + +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using PollinationSDK.Api; +using PollinationSDK.Client; +using PollinationSDK.Model; + +namespace Example +{ + public class CreateSubscriptionExample + { + public static void Main() + { + Configuration.Default.BasePath = "http://localhost"; + // Configure API key authorization: APIKeyAuth + Configuration.Default.AddApiKey("x-pollination-token", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("x-pollination-token", "Bearer"); + // Configure HTTP bearer authorization: JWTAuth + Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; + + var apiInstance = new PaymentsApi(Configuration.Default); + var accountName = accountName_example; // string | + var subscriptionCreate = new SubscriptionCreate(); // SubscriptionCreate | + + try + { + // Create Subscription + CreatedContent result = apiInstance.CreateSubscription(accountName, subscriptionCreate); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling PaymentsApi.CreateSubscription: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **accountName** | **string**| | + **subscriptionCreate** | [**SubscriptionCreate**](SubscriptionCreate.md)| | + +### Return type + +[**CreatedContent**](CreatedContent.md) + +### Authorization + +[APIKeyAuth](../README.md#APIKeyAuth), [JWTAuth](../README.md#JWTAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Successful Response | - | +| **422** | Validation Error | - | + +[[Back to top]](#) +[[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## GetDefaultPaymentMethod + +> CardPublic GetDefaultPaymentMethod (string accountName) + +Get Default Payment Method + +### Example + +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using PollinationSDK.Api; +using PollinationSDK.Client; +using PollinationSDK.Model; + +namespace Example +{ + public class GetDefaultPaymentMethodExample + { + public static void Main() + { + Configuration.Default.BasePath = "http://localhost"; + // Configure API key authorization: APIKeyAuth + Configuration.Default.AddApiKey("x-pollination-token", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("x-pollination-token", "Bearer"); + // Configure HTTP bearer authorization: JWTAuth + Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; + + var apiInstance = new PaymentsApi(Configuration.Default); + var accountName = accountName_example; // string | + + try + { + // Get Default Payment Method + CardPublic result = apiInstance.GetDefaultPaymentMethod(accountName); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling PaymentsApi.GetDefaultPaymentMethod: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **accountName** | **string**| | + +### Return type + +[**CardPublic**](CardPublic.md) + +### Authorization + +[APIKeyAuth](../README.md#APIKeyAuth), [JWTAuth](../README.md#JWTAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Successful Response | - | +| **422** | Validation Error | - | + +[[Back to top]](#) +[[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## GetFailedPayment + +> PaymentIntent GetFailedPayment (string accountName) + +Get Failed Payment + +### Example + +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using PollinationSDK.Api; +using PollinationSDK.Client; +using PollinationSDK.Model; + +namespace Example +{ + public class GetFailedPaymentExample + { + public static void Main() + { + Configuration.Default.BasePath = "http://localhost"; + // Configure API key authorization: APIKeyAuth + Configuration.Default.AddApiKey("x-pollination-token", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("x-pollination-token", "Bearer"); + // Configure HTTP bearer authorization: JWTAuth + Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; + + var apiInstance = new PaymentsApi(Configuration.Default); + var accountName = accountName_example; // string | + + try + { + // Get Failed Payment + PaymentIntent result = apiInstance.GetFailedPayment(accountName); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling PaymentsApi.GetFailedPayment: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **accountName** | **string**| | + +### Return type + +[**PaymentIntent**](PaymentIntent.md) + +### Authorization + +[APIKeyAuth](../README.md#APIKeyAuth), [JWTAuth](../README.md#JWTAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Successful Response | - | +| **422** | Validation Error | - | + +[[Back to top]](#) +[[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## GetInventory + +> Inventory GetInventory (string accountName) + +Get Inventory + +### Example + +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using PollinationSDK.Api; +using PollinationSDK.Client; +using PollinationSDK.Model; + +namespace Example +{ + public class GetInventoryExample + { + public static void Main() + { + Configuration.Default.BasePath = "http://localhost"; + // Configure API key authorization: APIKeyAuth + Configuration.Default.AddApiKey("x-pollination-token", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("x-pollination-token", "Bearer"); + // Configure HTTP bearer authorization: JWTAuth + Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; + + var apiInstance = new PaymentsApi(Configuration.Default); + var accountName = accountName_example; // string | + + try + { + // Get Inventory + Inventory result = apiInstance.GetInventory(accountName); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling PaymentsApi.GetInventory: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **accountName** | **string**| | + +### Return type + +[**Inventory**](Inventory.md) + +### Authorization + +[APIKeyAuth](../README.md#APIKeyAuth), [JWTAuth](../README.md#JWTAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Successful Response | - | +| **422** | Validation Error | - | + +[[Back to top]](#) +[[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## GetInvoiceList + +> InvoiceList GetInvoiceList (string accountName, string startingAfter = null, string endingBefore = null, int? limit = null, int? perPage = null) + +Get Invoice List + +### Example + +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using PollinationSDK.Api; +using PollinationSDK.Client; +using PollinationSDK.Model; + +namespace Example +{ + public class GetInvoiceListExample + { + public static void Main() + { + Configuration.Default.BasePath = "http://localhost"; + // Configure API key authorization: APIKeyAuth + Configuration.Default.AddApiKey("x-pollination-token", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("x-pollination-token", "Bearer"); + // Configure HTTP bearer authorization: JWTAuth + Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; + + var apiInstance = new PaymentsApi(Configuration.Default); + var accountName = accountName_example; // string | + var startingAfter = startingAfter_example; // string | (optional) + var endingBefore = endingBefore_example; // string | (optional) + var limit = 56; // int? | (optional) + var perPage = 56; // int? | Number of items per page (optional) (default to 25) + + try + { + // Get Invoice List + InvoiceList result = apiInstance.GetInvoiceList(accountName, startingAfter, endingBefore, limit, perPage); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling PaymentsApi.GetInvoiceList: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **accountName** | **string**| | + **startingAfter** | **string**| | [optional] + **endingBefore** | **string**| | [optional] + **limit** | **int?**| | [optional] + **perPage** | **int?**| Number of items per page | [optional] [default to 25] + +### Return type + +[**InvoiceList**](InvoiceList.md) + +### Authorization + +[APIKeyAuth](../README.md#APIKeyAuth), [JWTAuth](../README.md#JWTAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Successful Response | - | +| **422** | Validation Error | - | + +[[Back to top]](#) +[[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## GetNextInvoice + +> InvoicePreview GetNextInvoice (string accountName) + +Get Next Invoice + +### Example + +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using PollinationSDK.Api; +using PollinationSDK.Client; +using PollinationSDK.Model; + +namespace Example +{ + public class GetNextInvoiceExample + { + public static void Main() + { + Configuration.Default.BasePath = "http://localhost"; + // Configure API key authorization: APIKeyAuth + Configuration.Default.AddApiKey("x-pollination-token", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("x-pollination-token", "Bearer"); + // Configure HTTP bearer authorization: JWTAuth + Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; + + var apiInstance = new PaymentsApi(Configuration.Default); + var accountName = accountName_example; // string | + + try + { + // Get Next Invoice + InvoicePreview result = apiInstance.GetNextInvoice(accountName); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling PaymentsApi.GetNextInvoice: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **accountName** | **string**| | + +### Return type + +[**InvoicePreview**](InvoicePreview.md) + +### Authorization + +[APIKeyAuth](../README.md#APIKeyAuth), [JWTAuth](../README.md#JWTAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Successful Response | - | +| **422** | Validation Error | - | + +[[Back to top]](#) +[[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## GetStatus + +> Status GetStatus (string accountName) + +Get Status + +### Example + +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using PollinationSDK.Api; +using PollinationSDK.Client; +using PollinationSDK.Model; + +namespace Example +{ + public class GetStatusExample + { + public static void Main() + { + Configuration.Default.BasePath = "http://localhost"; + // Configure API key authorization: APIKeyAuth + Configuration.Default.AddApiKey("x-pollination-token", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("x-pollination-token", "Bearer"); + // Configure HTTP bearer authorization: JWTAuth + Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; + + var apiInstance = new PaymentsApi(Configuration.Default); + var accountName = accountName_example; // string | + + try + { + // Get Status + Status result = apiInstance.GetStatus(accountName); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling PaymentsApi.GetStatus: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **accountName** | **string**| | + +### Return type + +[**Status**](Status.md) + +### Authorization + +[APIKeyAuth](../README.md#APIKeyAuth), [JWTAuth](../README.md#JWTAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Successful Response | - | +| **422** | Validation Error | - | + +[[Back to top]](#) +[[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## GetSubscription + +> Subscription GetSubscription (string accountName) + +Get Subscription + +### Example + +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using PollinationSDK.Api; +using PollinationSDK.Client; +using PollinationSDK.Model; + +namespace Example +{ + public class GetSubscriptionExample + { + public static void Main() + { + Configuration.Default.BasePath = "http://localhost"; + // Configure API key authorization: APIKeyAuth + Configuration.Default.AddApiKey("x-pollination-token", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("x-pollination-token", "Bearer"); + // Configure HTTP bearer authorization: JWTAuth + Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; + + var apiInstance = new PaymentsApi(Configuration.Default); + var accountName = accountName_example; // string | + + try + { + // Get Subscription + Subscription result = apiInstance.GetSubscription(accountName); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling PaymentsApi.GetSubscription: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **accountName** | **string**| | + +### Return type + +[**Subscription**](Subscription.md) + +### Authorization + +[APIKeyAuth](../README.md#APIKeyAuth), [JWTAuth](../README.md#JWTAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Successful Response | - | +| **422** | Validation Error | - | + +[[Back to top]](#) +[[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## GetUnfilteredInventory + +> Inventory GetUnfilteredInventory () + +Get Unfiltered Inventory + +### Example + +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using PollinationSDK.Api; +using PollinationSDK.Client; +using PollinationSDK.Model; + +namespace Example +{ + public class GetUnfilteredInventoryExample + { + public static void Main() + { + Configuration.Default.BasePath = "http://localhost"; + var apiInstance = new PaymentsApi(Configuration.Default); + + try + { + // Get Unfiltered Inventory + Inventory result = apiInstance.GetUnfilteredInventory(); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling PaymentsApi.GetUnfilteredInventory: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**Inventory**](Inventory.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Successful Response | - | + +[[Back to top]](#) +[[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## GetUpcomingSubscription + +> Subscription GetUpcomingSubscription (string accountName) + +Get Upcoming Subscription + +### Example + +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using PollinationSDK.Api; +using PollinationSDK.Client; +using PollinationSDK.Model; + +namespace Example +{ + public class GetUpcomingSubscriptionExample + { + public static void Main() + { + Configuration.Default.BasePath = "http://localhost"; + // Configure API key authorization: APIKeyAuth + Configuration.Default.AddApiKey("x-pollination-token", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("x-pollination-token", "Bearer"); + // Configure HTTP bearer authorization: JWTAuth + Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; + + var apiInstance = new PaymentsApi(Configuration.Default); + var accountName = accountName_example; // string | + + try + { + // Get Upcoming Subscription + Subscription result = apiInstance.GetUpcomingSubscription(accountName); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling PaymentsApi.GetUpcomingSubscription: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **accountName** | **string**| | + +### Return type + +[**Subscription**](Subscription.md) + +### Authorization + +[APIKeyAuth](../README.md#APIKeyAuth), [JWTAuth](../README.md#JWTAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Successful Response | - | +| **422** | Validation Error | - | + +[[Back to top]](#) +[[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListPaymentMethods + +> PaymentMethodList ListPaymentMethods (string accountName) + +Get Payment Methods + +### Example + +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using PollinationSDK.Api; +using PollinationSDK.Client; +using PollinationSDK.Model; + +namespace Example +{ + public class ListPaymentMethodsExample + { + public static void Main() + { + Configuration.Default.BasePath = "http://localhost"; + // Configure API key authorization: APIKeyAuth + Configuration.Default.AddApiKey("x-pollination-token", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("x-pollination-token", "Bearer"); + // Configure HTTP bearer authorization: JWTAuth + Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; + + var apiInstance = new PaymentsApi(Configuration.Default); + var accountName = accountName_example; // string | + + try + { + // Get Payment Methods + PaymentMethodList result = apiInstance.ListPaymentMethods(accountName); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling PaymentsApi.ListPaymentMethods: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **accountName** | **string**| | + +### Return type + +[**PaymentMethodList**](PaymentMethodList.md) + +### Authorization + +[APIKeyAuth](../README.md#APIKeyAuth), [JWTAuth](../README.md#JWTAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Successful Response | - | +| **422** | Validation Error | - | + +[[Back to top]](#) +[[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## PreviewUpdateSubscription + +> UpdateInvoicePreview PreviewUpdateSubscription (string accountName, SubscriptionUpdate subscriptionUpdate) + +Preview Update Subscription + +### Example + +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using PollinationSDK.Api; +using PollinationSDK.Client; +using PollinationSDK.Model; + +namespace Example +{ + public class PreviewUpdateSubscriptionExample + { + public static void Main() + { + Configuration.Default.BasePath = "http://localhost"; + // Configure API key authorization: APIKeyAuth + Configuration.Default.AddApiKey("x-pollination-token", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("x-pollination-token", "Bearer"); + // Configure HTTP bearer authorization: JWTAuth + Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; + + var apiInstance = new PaymentsApi(Configuration.Default); + var accountName = accountName_example; // string | + var subscriptionUpdate = new SubscriptionUpdate(); // SubscriptionUpdate | + + try + { + // Preview Update Subscription + UpdateInvoicePreview result = apiInstance.PreviewUpdateSubscription(accountName, subscriptionUpdate); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling PaymentsApi.PreviewUpdateSubscription: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **accountName** | **string**| | + **subscriptionUpdate** | [**SubscriptionUpdate**](SubscriptionUpdate.md)| | + +### Return type + +[**UpdateInvoicePreview**](UpdateInvoicePreview.md) + +### Authorization + +[APIKeyAuth](../README.md#APIKeyAuth), [JWTAuth](../README.md#JWTAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Successful Response | - | +| **422** | Validation Error | - | + +[[Back to top]](#) +[[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## Subscribe + +> CreatedContent Subscribe (string accountName, Subscribe subscribe) + +Subscribe + +### Example + +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using PollinationSDK.Api; +using PollinationSDK.Client; +using PollinationSDK.Model; + +namespace Example +{ + public class SubscribeExample + { + public static void Main() + { + Configuration.Default.BasePath = "http://localhost"; + // Configure API key authorization: APIKeyAuth + Configuration.Default.AddApiKey("x-pollination-token", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("x-pollination-token", "Bearer"); + // Configure HTTP bearer authorization: JWTAuth + Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; + + var apiInstance = new PaymentsApi(Configuration.Default); + var accountName = accountName_example; // string | + var subscribe = new Subscribe(); // Subscribe | + + try + { + // Subscribe + CreatedContent result = apiInstance.Subscribe(accountName, subscribe); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling PaymentsApi.Subscribe: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **accountName** | **string**| | + **subscribe** | [**Subscribe**](Subscribe.md)| | + +### Return type + +[**CreatedContent**](CreatedContent.md) + +### Authorization + +[APIKeyAuth](../README.md#APIKeyAuth), [JWTAuth](../README.md#JWTAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Successful Response | - | +| **422** | Validation Error | - | + +[[Back to top]](#) +[[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateSubscription + +> Subscription UpdateSubscription (string accountName, SubscriptionUpdate subscriptionUpdate) + +Update Subscription + +### Example + +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using PollinationSDK.Api; +using PollinationSDK.Client; +using PollinationSDK.Model; + +namespace Example +{ + public class UpdateSubscriptionExample + { + public static void Main() + { + Configuration.Default.BasePath = "http://localhost"; + // Configure API key authorization: APIKeyAuth + Configuration.Default.AddApiKey("x-pollination-token", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("x-pollination-token", "Bearer"); + // Configure HTTP bearer authorization: JWTAuth + Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; + + var apiInstance = new PaymentsApi(Configuration.Default); + var accountName = accountName_example; // string | + var subscriptionUpdate = new SubscriptionUpdate(); // SubscriptionUpdate | + + try + { + // Update Subscription + Subscription result = apiInstance.UpdateSubscription(accountName, subscriptionUpdate); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling PaymentsApi.UpdateSubscription: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **accountName** | **string**| | + **subscriptionUpdate** | [**SubscriptionUpdate**](SubscriptionUpdate.md)| | + +### Return type + +[**Subscription**](Subscription.md) + +### Authorization + +[APIKeyAuth](../README.md#APIKeyAuth), [JWTAuth](../README.md#JWTAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Successful Response | - | +| **422** | Validation Error | - | + +[[Back to top]](#) +[[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/docs/Period.md b/docs/Period.md new file mode 100644 index 000000000..1dba6c63d --- /dev/null +++ b/docs/Period.md @@ -0,0 +1,15 @@ + +# PollinationSDK.Model.Period + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Start** | **DateTime** | | +**End** | **DateTime** | | +**Type** | **string** | | [optional] [readonly] [default to "Period"] + +[[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/docs/PluginsApi.md b/docs/PluginsApi.md index 5079e7f83..f30e50a96 100644 --- a/docs/PluginsApi.md +++ b/docs/PluginsApi.md @@ -652,7 +652,7 @@ Name | Type | Description | Notes ## ListPluginTags -> PluginPackageList ListPluginTags (string owner, string name, PackageSortKey sortBy = null, SortEnum? sortOrder = null, int? page = null, int? perPage = null) +> PluginPackageList ListPluginTags (string owner, string name, PackageSortKey? sortBy = null, SortEnum? sortOrder = null, int? page = null, int? perPage = null) Get a plugin tags @@ -684,7 +684,7 @@ namespace Example var apiInstance = new PluginsApi(Configuration.Default); var owner = owner_example; // string | var name = name_example; // string | - var sortBy = new PackageSortKey(); // PackageSortKey | Key to sort the list by (optional) + var sortBy = ; // PackageSortKey? | Key to sort the list by (optional) var sortOrder = ; // SortEnum? | The order to sort the list (optional) var page = 56; // int? | Page number starting from 1 (optional) (default to 1) var perPage = 56; // int? | Number of items per page (optional) (default to 25) @@ -713,7 +713,7 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **owner** | **string**| | **name** | **string**| | - **sortBy** | [**PackageSortKey**](PackageSortKey.md)| Key to sort the list by | [optional] + **sortBy** | **PackageSortKey?**| Key to sort the list by | [optional] **sortOrder** | **SortEnum?**| The order to sort the list | [optional] **page** | **int?**| Page number starting from 1 | [optional] [default to 1] **perPage** | **int?**| Number of items per page | [optional] [default to 25] @@ -749,7 +749,7 @@ Name | Type | Description | Notes ## ListPlugins -> RepositoryList ListPlugins (List search = null, List name = null, List owner = null, bool? _public = null, List keyword = null, List permission = null, RepositorySortKey sortBy = null, SortEnum? sortOrder = null, int? page = null, int? perPage = null) +> RepositoryList ListPlugins (List search = null, List name = null, List owner = null, bool? _public = null, List keyword = null, List permission = null, RepositorySortKey? sortBy = null, SortEnum? sortOrder = null, int? page = null, int? perPage = null) List plugins @@ -783,7 +783,7 @@ namespace Example var _public = true; // bool? | Boolean check for public/private projects (optional) var keyword = new List(); // List | A keyword to index the repository by (optional) var permission = new List(); // List | Filter by permission on given resource (optional) - var sortBy = new RepositorySortKey(); // RepositorySortKey | Key to sort the list by (optional) + var sortBy = ; // RepositorySortKey? | Key to sort the list by (optional) var sortOrder = ; // SortEnum? | The order to sort the list (optional) var page = 56; // int? | Page number starting from 1 (optional) (default to 1) var perPage = 56; // int? | Number of items per page (optional) (default to 25) @@ -816,7 +816,7 @@ Name | Type | Description | Notes **_public** | **bool?**| Boolean check for public/private projects | [optional] **keyword** | [**List<string>**](string.md)| A keyword to index the repository by | [optional] **permission** | [**List<string>**](string.md)| Filter by permission on given resource | [optional] - **sortBy** | [**RepositorySortKey**](RepositorySortKey.md)| Key to sort the list by | [optional] + **sortBy** | **RepositorySortKey?**| Key to sort the list by | [optional] **sortOrder** | **SortEnum?**| The order to sort the list | [optional] **page** | **int?**| Page number starting from 1 | [optional] [default to 1] **perPage** | **int?**| Number of items per page | [optional] [default to 25] diff --git a/docs/PollinationSubscription.md b/docs/PollinationSubscription.md new file mode 100644 index 000000000..5d6e8088d --- /dev/null +++ b/docs/PollinationSubscription.md @@ -0,0 +1,26 @@ + +# PollinationSDK.Model.PollinationSubscription + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**CancelAtPeriodEnd** | **bool** | | +**CurrentPeriodStart** | **DateTime** | | +**CurrentPeriodEnd** | **DateTime** | | +**Customer** | **string** | | +**Items** | [**SubscriptionItemList**](SubscriptionItemList.md) | | +**LatestInvoice** | **string** | | +**DefaultPaymentMethod** | **string** | | [optional] +**Schedule** | **string** | | [optional] +**Discount** | [**Discount**](Discount.md) | | [optional] +**AccountId** | **Guid** | The ID of the account this subscription applies to | +**SubscriptionPlan** | [**SubscriptionPlan**](SubscriptionPlan.md) | A subscription plan | +**ExternalId** | **string** | The ID of this subscription | [optional] +**QuotaExtensions** | [**List<QuotaExtension>**](QuotaExtension.md) | A list of quota extension plans for a given subscription | [optional] +**Type** | **string** | | [optional] [readonly] [default to "PollinationSubscription"] + +[[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/docs/Price.md b/docs/Price.md new file mode 100644 index 000000000..fbdc5039d --- /dev/null +++ b/docs/Price.md @@ -0,0 +1,22 @@ + +# PollinationSDK.Model.Price + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **string** | | +**Metadata** | **Object** | | [optional] +**Product** | **string** | | +**Active** | **bool** | | +**Currency** | **string** | | +**Type** | **PriceType** | | +**UnitAmount** | **int** | | [optional] +**Recurring** | [**PriceRecurrence**](PriceRecurrence.md) | | [optional] +**Nickname** | **string** | | [optional] +**Tiers** | [**List<PriceTier>**](PriceTier.md) | | [optional] + +[[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/docs/PriceRecurrence.md b/docs/PriceRecurrence.md new file mode 100644 index 000000000..f198688b8 --- /dev/null +++ b/docs/PriceRecurrence.md @@ -0,0 +1,16 @@ + +# PollinationSDK.Model.PriceRecurrence + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Interval** | **string** | | +**IntervalCount** | **int** | | +**UsageType** | **string** | | +**Type** | **string** | | [optional] [readonly] [default to "PriceRecurrence"] + +[[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/docs/PriceTier.md b/docs/PriceTier.md new file mode 100644 index 000000000..535136627 --- /dev/null +++ b/docs/PriceTier.md @@ -0,0 +1,18 @@ + +# PollinationSDK.Model.PriceTier + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**UnitAmount** | **int** | | +**UnitAmountDecimal** | **string** | | +**FlatAmount** | **int** | | [optional] +**FlatAmountDecimal** | **string** | | [optional] +**UpTo** | **int** | | [optional] +**Type** | **string** | | [optional] [readonly] [default to "PriceTier"] + +[[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/docs/PriceType.md b/docs/PriceType.md new file mode 100644 index 000000000..aa3eef175 --- /dev/null +++ b/docs/PriceType.md @@ -0,0 +1,12 @@ + +# PollinationSDK.Model.PriceType + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[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/docs/Product.md b/docs/Product.md new file mode 100644 index 000000000..2b0fe02c8 --- /dev/null +++ b/docs/Product.md @@ -0,0 +1,18 @@ + +# PollinationSDK.Model.Product + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **string** | | +**Metadata** | **Object** | | [optional] +**Active** | **bool** | | +**Name** | **string** | | +**Description** | **string** | | [optional] +**Type** | **string** | | [optional] [readonly] [default to "Product"] + +[[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/docs/ProductFamily.md b/docs/ProductFamily.md new file mode 100644 index 000000000..ab0a57479 --- /dev/null +++ b/docs/ProductFamily.md @@ -0,0 +1,17 @@ + +# PollinationSDK.Model.ProductFamily + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Active** | **bool** | | +**Name** | **string** | | +**Description** | **string** | | [optional] +**Prices** | [**List<Price>**](Price.md) | | +**Type** | **string** | | [optional] [readonly] [default to "ProductFamily"] + +[[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/docs/ProjectSortKey.md b/docs/ProjectSortKey.md new file mode 100644 index 000000000..0beff8e38 --- /dev/null +++ b/docs/ProjectSortKey.md @@ -0,0 +1,12 @@ + +# PollinationSDK.Model.ProjectSortKey + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[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/docs/ProjectsApi.md b/docs/ProjectsApi.md index bac6d4790..d8109985d 100644 --- a/docs/ProjectsApi.md +++ b/docs/ProjectsApi.md @@ -819,7 +819,7 @@ Name | Type | Description | Notes ## ListProjects -> ProjectList ListProjects (string search = null, List ids = null, List names = null, List owner = null, bool? _public = null, List permissions = null, ProjectSortKey sortBy = null, SortEnum? sortOrder = null, int? page = null, int? perPage = null) +> ProjectList ListProjects (string search = null, List ids = null, List names = null, List owner = null, bool? _public = null, List permissions = null, ProjectSortKey? sortBy = null, SortEnum? sortOrder = null, int? page = null, int? perPage = null) List Projects @@ -853,7 +853,7 @@ namespace Example var owner = new List(); // List | Owner of the project (optional) var _public = true; // bool? | Boolean check for public/private projects (optional) var permissions = new List(); // List | Filter by permission on given resource (optional) - var sortBy = new ProjectSortKey(); // ProjectSortKey | Key to sort the list by (optional) + var sortBy = ; // ProjectSortKey? | Key to sort the list by (optional) var sortOrder = ; // SortEnum? | The order to sort the list (optional) var page = 56; // int? | Page number starting from 1 (optional) (default to 1) var perPage = 56; // int? | Number of items per page (optional) (default to 25) @@ -886,7 +886,7 @@ Name | Type | Description | Notes **owner** | [**List<string>**](string.md)| Owner of the project | [optional] **_public** | **bool?**| Boolean check for public/private projects | [optional] **permissions** | [**List<string>**](string.md)| Filter by permission on given resource | [optional] - **sortBy** | [**ProjectSortKey**](ProjectSortKey.md)| Key to sort the list by | [optional] + **sortBy** | **ProjectSortKey?**| Key to sort the list by | [optional] **sortOrder** | **SortEnum?**| The order to sort the list | [optional] **page** | **int?**| Page number starting from 1 | [optional] [default to 1] **perPage** | **int?**| Number of items per page | [optional] [default to 25] diff --git a/docs/Quota.md b/docs/Quota.md new file mode 100644 index 000000000..8902597a6 --- /dev/null +++ b/docs/Quota.md @@ -0,0 +1,24 @@ + +# PollinationSDK.Model.Quota + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Type** | **QuotaType** | The type of resource | [readonly] +**Owner** | [**AccountPublic**](AccountPublic.md) | The quota owner | +**Id** | **Guid** | The unique ID for this Quota | [optional] +**PeriodStart** | **DateTime** | The start of the quota usage tracking period | [optional] +**Limit** | **double** | The maximum amount of a resource the account can consume | [optional] +**Usage** | **double** | The current amount of a resource allocated to the account linked to the subscription | [optional] +**Resets** | **bool** | Whether consumption is reset to 0 every billing period | [optional] [default to false] +**Enforced** | **bool** | Whether the limit triggers a blocking response from the server | [optional] [default to false] +**Exceeded** | **bool** | Whether the resource usage is greater than or equal to the limit | [optional] [default to false] +**DisplayName** | **string** | The human-readable name | [optional] +**Description** | **string** | The description | [optional] +**Unit** | **string** | The unit in which the usage and limit are measured | [optional] + +[[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/docs/QuotaExtension.md b/docs/QuotaExtension.md new file mode 100644 index 000000000..b751c6a36 --- /dev/null +++ b/docs/QuotaExtension.md @@ -0,0 +1,17 @@ + +# PollinationSDK.Model.QuotaExtension + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **string** | The ID of the quota extension | +**Name** | **string** | Name of the quota extension plan | +**Type** | **QuotaType** | The type of quota this applies to | [readonly] +**UnitAmount** | **double** | The amount by which this object extends a given quota | +**Quantity** | **int** | The number of times to count this extension | + +[[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/docs/QuotaList.md b/docs/QuotaList.md new file mode 100644 index 000000000..7fcc639df --- /dev/null +++ b/docs/QuotaList.md @@ -0,0 +1,19 @@ + +# PollinationSDK.Model.QuotaList + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Page** | **int** | The current page the pagination request is on | +**PerPage** | **int** | The number of pages per pagination request | +**PageCount** | **int** | The total number of pages | +**TotalCount** | **int** | The total number of resources matching the list request | +**Resources** | [**List<Quota>**](Quota.md) | | +**NextPage** | **int** | The next page, if this on is not the last | [optional] +**Type** | **string** | | [optional] [readonly] [default to "QuotaList"] + +[[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/docs/QuotaPlan.md b/docs/QuotaPlan.md new file mode 100644 index 000000000..e65941bbc --- /dev/null +++ b/docs/QuotaPlan.md @@ -0,0 +1,17 @@ + +# PollinationSDK.Model.QuotaPlan + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | The name of the quota | +**Resets** | **bool** | Whether consumption is reset to 0 every month | [optional] [default to false] +**Limit** | **double** | The maximum amount of a resource that a subscription allows | [optional] +**Enforced** | **bool** | Whether the limit is triggers a blocking response from the server | [optional] [default to false] +**Type** | **string** | | [optional] [readonly] [default to "QuotaPlan"] + +[[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/docs/QuotaType.md b/docs/QuotaType.md new file mode 100644 index 000000000..9da2de00e --- /dev/null +++ b/docs/QuotaType.md @@ -0,0 +1,12 @@ + +# PollinationSDK.Model.QuotaType + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[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/docs/RecipesApi.md b/docs/RecipesApi.md index 74dfd5949..d8dc9a7f8 100644 --- a/docs/RecipesApi.md +++ b/docs/RecipesApi.md @@ -652,7 +652,7 @@ Name | Type | Description | Notes ## ListRecipeTags -> RecipePackageList ListRecipeTags (string owner, string name, PackageSortKey sortBy = null, SortEnum? sortOrder = null, int? page = null, int? perPage = null) +> RecipePackageList ListRecipeTags (string owner, string name, PackageSortKey? sortBy = null, SortEnum? sortOrder = null, int? page = null, int? perPage = null) Get a recipe tags @@ -684,7 +684,7 @@ namespace Example var apiInstance = new RecipesApi(Configuration.Default); var owner = owner_example; // string | var name = name_example; // string | - var sortBy = new PackageSortKey(); // PackageSortKey | Key to sort the list by (optional) + var sortBy = ; // PackageSortKey? | Key to sort the list by (optional) var sortOrder = ; // SortEnum? | The order to sort the list (optional) var page = 56; // int? | Page number starting from 1 (optional) (default to 1) var perPage = 56; // int? | Number of items per page (optional) (default to 25) @@ -713,7 +713,7 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **owner** | **string**| | **name** | **string**| | - **sortBy** | [**PackageSortKey**](PackageSortKey.md)| Key to sort the list by | [optional] + **sortBy** | **PackageSortKey?**| Key to sort the list by | [optional] **sortOrder** | **SortEnum?**| The order to sort the list | [optional] **page** | **int?**| Page number starting from 1 | [optional] [default to 1] **perPage** | **int?**| Number of items per page | [optional] [default to 25] @@ -749,7 +749,7 @@ Name | Type | Description | Notes ## ListRecipes -> RepositoryList ListRecipes (List search = null, List name = null, List owner = null, bool? _public = null, List keyword = null, List permission = null, RepositorySortKey sortBy = null, SortEnum? sortOrder = null, int? page = null, int? perPage = null) +> RepositoryList ListRecipes (List search = null, List name = null, List owner = null, bool? _public = null, List keyword = null, List permission = null, RepositorySortKey? sortBy = null, SortEnum? sortOrder = null, int? page = null, int? perPage = null) List recipes @@ -783,7 +783,7 @@ namespace Example var _public = true; // bool? | Boolean check for public/private projects (optional) var keyword = new List(); // List | A keyword to index the repository by (optional) var permission = new List(); // List | Filter by permission on given resource (optional) - var sortBy = new RepositorySortKey(); // RepositorySortKey | Key to sort the list by (optional) + var sortBy = ; // RepositorySortKey? | Key to sort the list by (optional) var sortOrder = ; // SortEnum? | The order to sort the list (optional) var page = 56; // int? | Page number starting from 1 (optional) (default to 1) var perPage = 56; // int? | Number of items per page (optional) (default to 25) @@ -816,7 +816,7 @@ Name | Type | Description | Notes **_public** | **bool?**| Boolean check for public/private projects | [optional] **keyword** | [**List<string>**](string.md)| A keyword to index the repository by | [optional] **permission** | [**List<string>**](string.md)| Filter by permission on given resource | [optional] - **sortBy** | [**RepositorySortKey**](RepositorySortKey.md)| Key to sort the list by | [optional] + **sortBy** | **RepositorySortKey?**| Key to sort the list by | [optional] **sortOrder** | **SortEnum?**| The order to sort the list | [optional] **page** | **int?**| Page number starting from 1 | [optional] [default to 1] **perPage** | **int?**| Number of items per page | [optional] [default to 25] diff --git a/docs/RegistriesApi.md b/docs/RegistriesApi.md index 9c0f3c08a..26fc78bb0 100644 --- a/docs/RegistriesApi.md +++ b/docs/RegistriesApi.md @@ -101,7 +101,7 @@ Name | Type | Description | Notes ## GetPackageJson -> AnyOfRecipePlugin GetPackageJson (string owner, string type, string name, string digest) +> AnyOfRecipePluginBakedRecipe GetPackageJson (string owner, string type, string name, string digest, bool? baked = null) Get Package in JSON format @@ -133,11 +133,12 @@ namespace Example var type = type_example; // string | var name = name_example; // string | var digest = digest_example; // string | + var baked = true; // bool? | (optional) (default to false) try { // Get Package in JSON format - AnyOfRecipePlugin result = apiInstance.GetPackageJson(owner, type, name, digest); + AnyOfRecipePluginBakedRecipe result = apiInstance.GetPackageJson(owner, type, name, digest, baked); Debug.WriteLine(result); } catch (ApiException e) @@ -160,10 +161,11 @@ Name | Type | Description | Notes **type** | **string**| | **name** | **string**| | **digest** | **string**| | + **baked** | **bool?**| | [optional] [default to false] ### Return type -[**AnyOfRecipePlugin**](AnyOfRecipePlugin.md) +[**AnyOfRecipePluginBakedRecipe**](AnyOfRecipePluginBakedRecipe.md) ### Authorization diff --git a/docs/RepositorySortKey.md b/docs/RepositorySortKey.md new file mode 100644 index 000000000..67614a369 --- /dev/null +++ b/docs/RepositorySortKey.md @@ -0,0 +1,12 @@ + +# PollinationSDK.Model.RepositorySortKey + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[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/docs/ResourcesDuration.md b/docs/ResourcesDuration.md new file mode 100644 index 000000000..86c9c8526 --- /dev/null +++ b/docs/ResourcesDuration.md @@ -0,0 +1,15 @@ + +# PollinationSDK.Model.ResourcesDuration + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Cpu** | **int** | | [optional] [default to 0] +**Memory** | **int** | | [optional] [default to 0] +**Type** | **string** | | [optional] [readonly] [default to "ResourcesDuration"] + +[[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/docs/Run.md b/docs/Run.md index 457ef32f5..88808da92 100644 --- a/docs/Run.md +++ b/docs/Run.md @@ -11,6 +11,7 @@ Name | Type | Description | Notes **Recipe** | [**RecipeInterface**](RecipeInterface.md) | The recipe used to generate this | [optional] **Generation** | **double** | The generation of this run | [optional] **Status** | [**RunStatus**](RunStatus.md) | The status of the run | [optional] +**Meta** | [**RunMeta**](RunMeta.md) | Extra metadata about the run | [optional] **Type** | **string** | | [optional] [readonly] [default to "Run"] [[Back to Model list]](../README.md#documentation-for-models) diff --git a/docs/RunMeta.md b/docs/RunMeta.md new file mode 100644 index 000000000..d8ed1d175 --- /dev/null +++ b/docs/RunMeta.md @@ -0,0 +1,15 @@ + +# PollinationSDK.Model.RunMeta + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ResourcesDuration** | [**ResourcesDuration**](ResourcesDuration.md) | resource usage | [optional] +**Progress** | [**RunProgress**](RunProgress.md) | progress of the run | [optional] +**Type** | **string** | | [optional] [readonly] [default to "RunMeta"] + +[[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/docs/RunProgress.md b/docs/RunProgress.md new file mode 100644 index 000000000..6d81cca4e --- /dev/null +++ b/docs/RunProgress.md @@ -0,0 +1,16 @@ + +# PollinationSDK.Model.RunProgress + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Completed** | **int** | | [optional] [default to 0] +**Running** | **int** | | [optional] [default to 0] +**Total** | **int** | | [optional] [default to 0] +**Type** | **string** | | [optional] [readonly] [default to "RunProgress"] + +[[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/docs/SecureResourcePublic.md b/docs/SecureResourcePublic.md new file mode 100644 index 000000000..6a71df3a3 --- /dev/null +++ b/docs/SecureResourcePublic.md @@ -0,0 +1,14 @@ + +# PollinationSDK.Model.SecureResourcePublic + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ClientSecret** | **string** | Secret string to be used to retrieve the resource from the client | +**Type** | **string** | | [optional] [readonly] [default to "_SecureResourcePublic"] + +[[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/docs/Status.md b/docs/Status.md new file mode 100644 index 000000000..cfb0bc8bc --- /dev/null +++ b/docs/Status.md @@ -0,0 +1,14 @@ + +# PollinationSDK.Model.Status + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Frozen** | **bool** | Whether account actions are currently blocked by a payment failure | [optional] [default to false] +**Type** | **string** | | [optional] [readonly] [default to "Status"] + +[[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/docs/Subscribe.md b/docs/Subscribe.md new file mode 100644 index 000000000..759317810 --- /dev/null +++ b/docs/Subscribe.md @@ -0,0 +1,14 @@ + +# PollinationSDK.Model.Subscribe + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Plan** | [**Price**](Price.md) | The initial plan with which to create the subscription | +**Type** | **string** | | [optional] [readonly] [default to "Subscribe"] + +[[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/docs/Subscription.md b/docs/Subscription.md new file mode 100644 index 000000000..7026dd2d7 --- /dev/null +++ b/docs/Subscription.md @@ -0,0 +1,24 @@ + +# PollinationSDK.Model.Subscription + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **string** | | +**Metadata** | **Object** | | [optional] +**CancelAtPeriodEnd** | **bool** | | +**CurrentPeriodStart** | **DateTime** | | +**CurrentPeriodEnd** | **DateTime** | | +**Customer** | **string** | | +**Items** | [**SubscriptionItemList**](SubscriptionItemList.md) | | +**LatestInvoice** | **string** | | +**DefaultPaymentMethod** | **string** | | [optional] +**Schedule** | **string** | | [optional] +**Discount** | [**Discount**](Discount.md) | | [optional] +**Type** | **string** | | [optional] [readonly] [default to "Subscription"] + +[[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/docs/SubscriptionCreate.md b/docs/SubscriptionCreate.md new file mode 100644 index 000000000..a176ee72f --- /dev/null +++ b/docs/SubscriptionCreate.md @@ -0,0 +1,14 @@ + +# PollinationSDK.Model.SubscriptionCreate + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Items** | [**List<NewSubscriptionItem>**](NewSubscriptionItem.md) | The list of recurring price items and the quantity of each to attach to the new subscription | [optional] +**Type** | **string** | | [optional] [readonly] [default to "SubscriptionCreate"] + +[[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/docs/SubscriptionItem.md b/docs/SubscriptionItem.md new file mode 100644 index 000000000..f6e84de4f --- /dev/null +++ b/docs/SubscriptionItem.md @@ -0,0 +1,15 @@ + +# PollinationSDK.Model.SubscriptionItem + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **string** | | +**Metadata** | **Object** | | [optional] +**Type** | **string** | | [optional] [readonly] [default to "SubscriptionItem"] + +[[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/docs/SubscriptionItemList.md b/docs/SubscriptionItemList.md new file mode 100644 index 000000000..8b597ea8c --- /dev/null +++ b/docs/SubscriptionItemList.md @@ -0,0 +1,15 @@ + +# PollinationSDK.Model.SubscriptionItemList + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**HasMore** | **bool** | | +**Data** | [**List<AnyOfSubscriptionItemDeleteSubscriptionItem>**](AnyOfSubscriptionItemDeleteSubscriptionItem.md) | | +**Type** | **string** | | [optional] [readonly] [default to "SubscriptionItemList"] + +[[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/docs/SubscriptionPlan.md b/docs/SubscriptionPlan.md new file mode 100644 index 000000000..ef5676ad8 --- /dev/null +++ b/docs/SubscriptionPlan.md @@ -0,0 +1,17 @@ + +# PollinationSDK.Model.SubscriptionPlan + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Slug** | **string** | A slug of the config plan used to create this subscription | +**Name** | **string** | A name of the config plan used to create this subscription | +**AccountTypes** | [**List<AccountType>**](AccountType.md) | The types of account to which the plan can be applied | +**Quotas** | [**List<QuotaPlan>**](QuotaPlan.md) | A list of quota plans for a given subscription | [optional] +**Type** | **string** | | [optional] [readonly] [default to "SubscriptionPlan"] + +[[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/docs/SubscriptionUpdate.md b/docs/SubscriptionUpdate.md new file mode 100644 index 000000000..75c1ce98b --- /dev/null +++ b/docs/SubscriptionUpdate.md @@ -0,0 +1,18 @@ + +# PollinationSDK.Model.SubscriptionUpdate + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ToSubscribe** | [**Price**](Price.md) | The Pollination plan to subscribe to | [optional] +**ToAdd** | [**List<NewSubscriptionItem>**](NewSubscriptionItem.md) | The items to add | [optional] +**ToUpdate** | [**List<SubscriptionItem>**](SubscriptionItem.md) | The items to update | [optional] +**ToDelete** | [**List<SubscriptionItem>**](SubscriptionItem.md) | The items to delete | [optional] +**PromotionCode** | **string** | A promotion code to apply a discount to the subscription | [optional] +**Type** | **string** | | [optional] [readonly] [default to "SubscriptionUpdate"] + +[[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/docs/SubscriptionsApi.md b/docs/SubscriptionsApi.md new file mode 100644 index 000000000..49a3e5483 --- /dev/null +++ b/docs/SubscriptionsApi.md @@ -0,0 +1,172 @@ +# PollinationSDK.Api.SubscriptionsApi + +All URIs are relative to *http://localhost* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**GetPollinationSubscription**](SubscriptionsApi.md#getpollinationsubscription) | **GET** /subscriptions/{account_name} | Get Subscription +[**GetUpcomingPollinationSubscription**](SubscriptionsApi.md#getupcomingpollinationsubscription) | **GET** /subscriptions/{account_name}/upcoming | Get Upcoming Subscription + + + +## GetPollinationSubscription + +> PollinationSubscription GetPollinationSubscription (string accountName) + +Get Subscription + +### Example + +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using PollinationSDK.Api; +using PollinationSDK.Client; +using PollinationSDK.Model; + +namespace Example +{ + public class GetPollinationSubscriptionExample + { + public static void Main() + { + Configuration.Default.BasePath = "http://localhost"; + // Configure API key authorization: APIKeyAuth + Configuration.Default.AddApiKey("x-pollination-token", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("x-pollination-token", "Bearer"); + // Configure HTTP bearer authorization: JWTAuth + Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; + + var apiInstance = new SubscriptionsApi(Configuration.Default); + var accountName = accountName_example; // string | + + try + { + // Get Subscription + PollinationSubscription result = apiInstance.GetPollinationSubscription(accountName); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling SubscriptionsApi.GetPollinationSubscription: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **accountName** | **string**| | + +### Return type + +[**PollinationSubscription**](PollinationSubscription.md) + +### Authorization + +[APIKeyAuth](../README.md#APIKeyAuth), [JWTAuth](../README.md#JWTAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Successful Response | - | +| **422** | Validation Error | - | + +[[Back to top]](#) +[[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## GetUpcomingPollinationSubscription + +> PollinationSubscription GetUpcomingPollinationSubscription (string accountName) + +Get Upcoming Subscription + +### Example + +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using PollinationSDK.Api; +using PollinationSDK.Client; +using PollinationSDK.Model; + +namespace Example +{ + public class GetUpcomingPollinationSubscriptionExample + { + public static void Main() + { + Configuration.Default.BasePath = "http://localhost"; + // Configure API key authorization: APIKeyAuth + Configuration.Default.AddApiKey("x-pollination-token", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("x-pollination-token", "Bearer"); + // Configure HTTP bearer authorization: JWTAuth + Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; + + var apiInstance = new SubscriptionsApi(Configuration.Default); + var accountName = accountName_example; // string | + + try + { + // Get Upcoming Subscription + PollinationSubscription result = apiInstance.GetUpcomingPollinationSubscription(accountName); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling SubscriptionsApi.GetUpcomingPollinationSubscription: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **accountName** | **string**| | + +### Return type + +[**PollinationSubscription**](PollinationSubscription.md) + +### Authorization + +[APIKeyAuth](../README.md#APIKeyAuth), [JWTAuth](../README.md#JWTAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Successful Response | - | +| **422** | Validation Error | - | + +[[Back to top]](#) +[[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/docs/TemplateFunction.md b/docs/TemplateFunction.md new file mode 100644 index 000000000..96e0af0c3 --- /dev/null +++ b/docs/TemplateFunction.md @@ -0,0 +1,20 @@ + +# PollinationSDK.Model.TemplateFunction + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | Function name. Must be unique within a plugin. | +**Command** | **string** | Full shell command for this function. Each function accepts only one command. The command will be executed as a shell command in plugin. For running several commands after each other use && between the commands or pipe data from one to another using | | +**Config** | [**PluginConfig**](PluginConfig.md) | The plugin config to use for this function | +**Annotations** | **Dictionary<string, string>** | An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries. | [optional] +**Inputs** | [**List<AnyOfFunctionStringInputFunctionIntegerInputFunctionNumberInputFunctionBooleanInputFunctionFolderInputFunctionFileInputFunctionPathInputFunctionArrayInputFunctionJSONObjectInput>**](AnyOfFunctionStringInputFunctionIntegerInputFunctionNumberInputFunctionBooleanInputFunctionFolderInputFunctionFileInputFunctionPathInputFunctionArrayInputFunctionJSONObjectInput.md) | Input arguments for this function. | [optional] +**Outputs** | [**List<AnyOfFunctionStringOutputFunctionIntegerOutputFunctionNumberOutputFunctionBooleanOutputFunctionFolderOutputFunctionFileOutputFunctionPathOutputFunctionArrayOutputFunctionJSONObjectOutput>**](AnyOfFunctionStringOutputFunctionIntegerOutputFunctionNumberOutputFunctionBooleanOutputFunctionFolderOutputFunctionFileOutputFunctionPathOutputFunctionArrayOutputFunctionJSONObjectOutput.md) | List of output arguments. | [optional] +**Description** | **string** | Function description. A short human readable description for this function. | [optional] +**Type** | **string** | | [optional] [readonly] [default to "TemplateFunction"] + +[[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/docs/UpdateInvoicePreview.md b/docs/UpdateInvoicePreview.md new file mode 100644 index 000000000..36efced97 --- /dev/null +++ b/docs/UpdateInvoicePreview.md @@ -0,0 +1,17 @@ + +# PollinationSDK.Model.UpdateInvoicePreview + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Immediate** | [**InvoicePreview**](InvoicePreview.md) | The invoice that will be finalized right after changes are applied | +**Upcoming** | [**InvoicePreview**](InvoicePreview.md) | The invoice that will be finalized at the end of the current billing cycle | +**PaymentMethod** | [**CardPublic**](CardPublic.md) | The payment method that will be billed when this invoice is due. | [optional] +**ExceededQuotas** | [**List<Quota>**](Quota.md) | A list of quotas that would be exceeded by the update | [optional] +**Type** | **string** | | [optional] [readonly] [default to "UpdateInvoicePreview"] + +[[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/docs/ValidationError.md b/docs/ValidationError.md new file mode 100644 index 000000000..956d5b537 --- /dev/null +++ b/docs/ValidationError.md @@ -0,0 +1,15 @@ + +# PollinationSDK.Model.ValidationError + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Loc** | **List<string>** | | +**Msg** | **string** | | +**Type** | **string** | | [readonly] + +[[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/src/PollinationSDK/Api/AccountsApi.cs b/src/PollinationSDK/Api/AccountsApi.cs index 42c809571..2cc547d1f 100644 --- a/src/PollinationSDK/Api/AccountsApi.cs +++ b/src/PollinationSDK/Api/AccountsApi.cs @@ -25,6 +25,27 @@ public interface IAccountsApi : IApiAccessor { #region Synchronous Operations /// + /// Check if an account with this name exists + /// + /// + /// Check if an account name is taken + /// + /// Thrown when fails to make API call + /// + /// object + object CheckAccountName (string name); + + /// + /// Check if an account with this name exists + /// + /// + /// Check if an account name is taken + /// + /// Thrown when fails to make API call + /// + /// ApiResponse of object + ApiResponse CheckAccountNameWithHttpInfo (string name); + /// /// Get an account by name /// /// @@ -74,9 +95,63 @@ public interface IAccountsApi : IApiAccessor /// Number of items per page (optional, default to 25) /// ApiResponse of PublicAccountList ApiResponse ListAccountsWithHttpInfo (string search = default, string type = default, RoleEnum? role = default, int? page = default, int? perPage = default); + /// + /// List Quotas + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// The types of quotas to get (optional) + /// Whether to return only quotas which are exhausted (optional) + /// Whether to return only quotas which are enforced (optional) + /// Page number starting from 1 (optional, default to 1) + /// Number of items per page (optional, default to 25) + /// QuotaList + QuotaList ListQuotas (string name, List type = default, bool? exhausted = default, bool? enforced = default, int? page = default, int? perPage = default); + + /// + /// List Quotas + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// The types of quotas to get (optional) + /// Whether to return only quotas which are exhausted (optional) + /// Whether to return only quotas which are enforced (optional) + /// Page number starting from 1 (optional, default to 1) + /// Number of items per page (optional, default to 25) + /// ApiResponse of QuotaList + ApiResponse ListQuotasWithHttpInfo (string name, List type = default, bool? exhausted = default, bool? enforced = default, int? page = default, int? perPage = default); #endregion Synchronous Operations #region Asynchronous Operations /// + /// Check if an account with this name exists + /// + /// + /// Check if an account name is taken + /// + /// Thrown when fails to make API call + /// + /// Cancellation Token to cancel request (optional) + /// Task of object + System.Threading.Tasks.Task CheckAccountNameAsync (string name, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// Check if an account with this name exists + /// + /// + /// Check if an account name is taken + /// + /// Thrown when fails to make API call + /// + /// Cancellation Token to cancel request (optional) + /// Task of ApiResponse (object) + System.Threading.Tasks.Task> CheckAccountNameWithHttpInfoAsync (string name, CancellationToken cancellationToken = default(CancellationToken)); + /// /// Get an account by name /// /// @@ -130,6 +205,39 @@ public interface IAccountsApi : IApiAccessor /// Cancellation Token to cancel request (optional) /// Task of ApiResponse (PublicAccountList) System.Threading.Tasks.Task> ListAccountsWithHttpInfoAsync (string search = default, string type = default, RoleEnum? role = default, int? page = default, int? perPage = default, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// List Quotas + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// The types of quotas to get (optional) + /// Whether to return only quotas which are exhausted (optional) + /// Whether to return only quotas which are enforced (optional) + /// Page number starting from 1 (optional, default to 1) + /// Number of items per page (optional, default to 25) + /// Cancellation Token to cancel request (optional) + /// Task of QuotaList + System.Threading.Tasks.Task ListQuotasAsync (string name, List type = default, bool? exhausted = default, bool? enforced = default, int? page = default, int? perPage = default, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// List Quotas + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// The types of quotas to get (optional) + /// Whether to return only quotas which are exhausted (optional) + /// Whether to return only quotas which are enforced (optional) + /// Page number starting from 1 (optional, default to 1) + /// Number of items per page (optional, default to 25) + /// Cancellation Token to cancel request (optional) + /// Task of ApiResponse (QuotaList) + System.Threading.Tasks.Task> ListQuotasWithHttpInfoAsync (string name, List type = default, bool? exhausted = default, bool? enforced = default, int? page = default, int? perPage = default, CancellationToken cancellationToken = default(CancellationToken)); #endregion Asynchronous Operations } @@ -209,6 +317,141 @@ public PollinationSDK.Client.ExceptionFactory ExceptionFactory set { _exceptionFactory = value; } } + /// + /// Check if an account with this name exists Check if an account name is taken + /// + /// Thrown when fails to make API call + /// + /// object + public object CheckAccountName (string name) + { + ApiResponse localVarResponse = CheckAccountNameWithHttpInfo(name); + return localVarResponse.Data; + } + + /// + /// Check if an account with this name exists Check if an account name is taken + /// + /// Thrown when fails to make API call + /// + /// ApiResponse of object + public ApiResponse CheckAccountNameWithHttpInfo (string name) + { + // verify the required parameter 'name' is set + if (name == null) + throw new ApiException(400, "Missing required parameter 'name' when calling AccountsApi->CheckAccountName"); + + var localVarPath = "/accounts/check/{name}"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (name != null) localVarPathParams.Add("name", this.Configuration.ApiClient.ParameterToString(name)); // path parameter + + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, + Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("CheckAccountName", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (object) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(object))); + } + + /// + /// Check if an account with this name exists Check if an account name is taken + /// + /// Thrown when fails to make API call + /// + /// Cancellation Token to cancel request (optional) + /// Task of object + public async System.Threading.Tasks.Task CheckAccountNameAsync (string name, CancellationToken cancellationToken = default(CancellationToken)) + { + ApiResponse localVarResponse = await CheckAccountNameWithHttpInfoAsync(name, cancellationToken); + return localVarResponse.Data; + + } + + /// + /// Check if an account with this name exists Check if an account name is taken + /// + /// Thrown when fails to make API call + /// + /// Cancellation Token to cancel request (optional) + /// Task of ApiResponse (object) + public async System.Threading.Tasks.Task> CheckAccountNameWithHttpInfoAsync (string name, CancellationToken cancellationToken = default(CancellationToken)) + { + // verify the required parameter 'name' is set + if (name == null) + throw new ApiException(400, "Missing required parameter 'name' when calling AccountsApi->CheckAccountName"); + + var localVarPath = "/accounts/check/{name}"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (name != null) localVarPathParams.Add("name", this.Configuration.ApiClient.ParameterToString(name)); // path parameter + + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, + Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType, cancellationToken); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("CheckAccountName", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (object) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(object))); + } + /// /// Get an account by name Retrieve an account by name /// @@ -519,5 +762,192 @@ public ApiResponse ListAccountsWithHttpInfo (string search = (PublicAccountList) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(PublicAccountList))); } + /// + /// List Quotas + /// + /// Thrown when fails to make API call + /// + /// The types of quotas to get (optional) + /// Whether to return only quotas which are exhausted (optional) + /// Whether to return only quotas which are enforced (optional) + /// Page number starting from 1 (optional, default to 1) + /// Number of items per page (optional, default to 25) + /// QuotaList + public QuotaList ListQuotas (string name, List type = default, bool? exhausted = default, bool? enforced = default, int? page = default, int? perPage = default) + { + ApiResponse localVarResponse = ListQuotasWithHttpInfo(name, type, exhausted, enforced, page, perPage); + return localVarResponse.Data; + } + + /// + /// List Quotas + /// + /// Thrown when fails to make API call + /// + /// The types of quotas to get (optional) + /// Whether to return only quotas which are exhausted (optional) + /// Whether to return only quotas which are enforced (optional) + /// Page number starting from 1 (optional, default to 1) + /// Number of items per page (optional, default to 25) + /// ApiResponse of QuotaList + public ApiResponse ListQuotasWithHttpInfo (string name, List type = default, bool? exhausted = default, bool? enforced = default, int? page = default, int? perPage = default) + { + // verify the required parameter 'name' is set + if (name == null) + throw new ApiException(400, "Missing required parameter 'name' when calling AccountsApi->ListQuotas"); + + var localVarPath = "/accounts/{name}/quotas"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (name != null) localVarPathParams.Add("name", this.Configuration.ApiClient.ParameterToString(name)); // path parameter + if (type != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("multi", "type", type)); // query parameter + if (exhausted != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "exhausted", exhausted)); // query parameter + if (enforced != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "enforced", enforced)); // query parameter + if (page != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "page", page)); // query parameter + if (perPage != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "per-page", perPage)); // query parameter + + // authentication (APIKeyAuth) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-pollination-token"))) + { + localVarHeaderParams["x-pollination-token"] = this.Configuration.GetApiKeyWithPrefix("x-pollination-token"); + } + // authentication (JWTAuth) required + // http beerer authentication required + if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) + { + localVarHeaderParams["Authorization"] = "Bearer " + this.Configuration.AccessToken; + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, + Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("ListQuotas", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (QuotaList) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(QuotaList))); + } + + /// + /// List Quotas + /// + /// Thrown when fails to make API call + /// + /// The types of quotas to get (optional) + /// Whether to return only quotas which are exhausted (optional) + /// Whether to return only quotas which are enforced (optional) + /// Page number starting from 1 (optional, default to 1) + /// Number of items per page (optional, default to 25) + /// Cancellation Token to cancel request (optional) + /// Task of QuotaList + public async System.Threading.Tasks.Task ListQuotasAsync (string name, List type = default, bool? exhausted = default, bool? enforced = default, int? page = default, int? perPage = default, CancellationToken cancellationToken = default(CancellationToken)) + { + ApiResponse localVarResponse = await ListQuotasWithHttpInfoAsync(name, type, exhausted, enforced, page, perPage, cancellationToken); + return localVarResponse.Data; + + } + + /// + /// List Quotas + /// + /// Thrown when fails to make API call + /// + /// The types of quotas to get (optional) + /// Whether to return only quotas which are exhausted (optional) + /// Whether to return only quotas which are enforced (optional) + /// Page number starting from 1 (optional, default to 1) + /// Number of items per page (optional, default to 25) + /// Cancellation Token to cancel request (optional) + /// Task of ApiResponse (QuotaList) + public async System.Threading.Tasks.Task> ListQuotasWithHttpInfoAsync (string name, List type = default, bool? exhausted = default, bool? enforced = default, int? page = default, int? perPage = default, CancellationToken cancellationToken = default(CancellationToken)) + { + // verify the required parameter 'name' is set + if (name == null) + throw new ApiException(400, "Missing required parameter 'name' when calling AccountsApi->ListQuotas"); + + var localVarPath = "/accounts/{name}/quotas"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (name != null) localVarPathParams.Add("name", this.Configuration.ApiClient.ParameterToString(name)); // path parameter + if (type != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("multi", "type", type)); // query parameter + if (exhausted != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "exhausted", exhausted)); // query parameter + if (enforced != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "enforced", enforced)); // query parameter + if (page != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "page", page)); // query parameter + if (perPage != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "per-page", perPage)); // query parameter + + // authentication (APIKeyAuth) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-pollination-token"))) + { + localVarHeaderParams["x-pollination-token"] = this.Configuration.GetApiKeyWithPrefix("x-pollination-token"); + } + // authentication (JWTAuth) required + // http bearer authentication required + if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) + { + localVarHeaderParams["Authorization"] = "Bearer " + this.Configuration.AccessToken; + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, + Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType, cancellationToken); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("ListQuotas", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (QuotaList) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(QuotaList))); + } + } } diff --git a/src/PollinationSDK/Api/JobsApi.cs b/src/PollinationSDK/Api/JobsApi.cs index a562d2c98..816c6a286 100644 --- a/src/PollinationSDK/Api/JobsApi.cs +++ b/src/PollinationSDK/Api/JobsApi.cs @@ -79,6 +79,31 @@ public interface IJobsApi : IApiAccessor /// ApiResponse of CreatedContent ApiResponse CreateJobWithHttpInfo (string owner, string name, Job job, string authorization = default, string xPollinationToken = default); /// + /// Delete a Job + /// + /// + /// Delete a job. + /// + /// Thrown when fails to make API call + /// + /// + /// + /// object + object DeleteJob (string owner, string name, string jobId); + + /// + /// Delete a Job + /// + /// + /// Delete a job. + /// + /// Thrown when fails to make API call + /// + /// + /// + /// ApiResponse of object + ApiResponse DeleteJobWithHttpInfo (string owner, string name, string jobId); + /// /// Download an artifact from the job folder /// /// @@ -253,6 +278,33 @@ public interface IJobsApi : IApiAccessor /// Task of ApiResponse (CreatedContent) System.Threading.Tasks.Task> CreateJobWithHttpInfoAsync (string owner, string name, Job job, string authorization = default, string xPollinationToken = default, CancellationToken cancellationToken = default(CancellationToken)); /// + /// Delete a Job + /// + /// + /// Delete a job. + /// + /// Thrown when fails to make API call + /// + /// + /// + /// Cancellation Token to cancel request (optional) + /// Task of object + System.Threading.Tasks.Task DeleteJobAsync (string owner, string name, string jobId, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// Delete a Job + /// + /// + /// Delete a job. + /// + /// Thrown when fails to make API call + /// + /// + /// + /// Cancellation Token to cancel request (optional) + /// Task of ApiResponse (object) + System.Threading.Tasks.Task> DeleteJobWithHttpInfoAsync (string owner, string name, string jobId, CancellationToken cancellationToken = default(CancellationToken)); + /// /// Download an artifact from the job folder /// /// @@ -843,6 +895,187 @@ public ApiResponse CreateJobWithHttpInfo (string owner, string n (CreatedContent) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(CreatedContent))); } + /// + /// Delete a Job Delete a job. + /// + /// Thrown when fails to make API call + /// + /// + /// + /// object + public object DeleteJob (string owner, string name, string jobId) + { + ApiResponse localVarResponse = DeleteJobWithHttpInfo(owner, name, jobId); + return localVarResponse.Data; + } + + /// + /// Delete a Job Delete a job. + /// + /// Thrown when fails to make API call + /// + /// + /// + /// ApiResponse of object + public ApiResponse DeleteJobWithHttpInfo (string owner, string name, string jobId) + { + // verify the required parameter 'owner' is set + if (owner == null) + throw new ApiException(400, "Missing required parameter 'owner' when calling JobsApi->DeleteJob"); + // verify the required parameter 'name' is set + if (name == null) + throw new ApiException(400, "Missing required parameter 'name' when calling JobsApi->DeleteJob"); + // verify the required parameter 'jobId' is set + if (jobId == null) + throw new ApiException(400, "Missing required parameter 'jobId' when calling JobsApi->DeleteJob"); + + var localVarPath = "/projects/{owner}/{name}/jobs/{job_id}"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (owner != null) localVarPathParams.Add("owner", this.Configuration.ApiClient.ParameterToString(owner)); // path parameter + if (name != null) localVarPathParams.Add("name", this.Configuration.ApiClient.ParameterToString(name)); // path parameter + if (jobId != null) localVarPathParams.Add("job_id", this.Configuration.ApiClient.ParameterToString(jobId)); // path parameter + + // authentication (APIKeyAuth) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-pollination-token"))) + { + localVarHeaderParams["x-pollination-token"] = this.Configuration.GetApiKeyWithPrefix("x-pollination-token"); + } + // authentication (JWTAuth) required + // http beerer authentication required + if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) + { + localVarHeaderParams["Authorization"] = "Bearer " + this.Configuration.AccessToken; + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, + Method.DELETE, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("DeleteJob", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (object) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(object))); + } + + /// + /// Delete a Job Delete a job. + /// + /// Thrown when fails to make API call + /// + /// + /// + /// Cancellation Token to cancel request (optional) + /// Task of object + public async System.Threading.Tasks.Task DeleteJobAsync (string owner, string name, string jobId, CancellationToken cancellationToken = default(CancellationToken)) + { + ApiResponse localVarResponse = await DeleteJobWithHttpInfoAsync(owner, name, jobId, cancellationToken); + return localVarResponse.Data; + + } + + /// + /// Delete a Job Delete a job. + /// + /// Thrown when fails to make API call + /// + /// + /// + /// Cancellation Token to cancel request (optional) + /// Task of ApiResponse (object) + public async System.Threading.Tasks.Task> DeleteJobWithHttpInfoAsync (string owner, string name, string jobId, CancellationToken cancellationToken = default(CancellationToken)) + { + // verify the required parameter 'owner' is set + if (owner == null) + throw new ApiException(400, "Missing required parameter 'owner' when calling JobsApi->DeleteJob"); + // verify the required parameter 'name' is set + if (name == null) + throw new ApiException(400, "Missing required parameter 'name' when calling JobsApi->DeleteJob"); + // verify the required parameter 'jobId' is set + if (jobId == null) + throw new ApiException(400, "Missing required parameter 'jobId' when calling JobsApi->DeleteJob"); + + var localVarPath = "/projects/{owner}/{name}/jobs/{job_id}"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (owner != null) localVarPathParams.Add("owner", this.Configuration.ApiClient.ParameterToString(owner)); // path parameter + if (name != null) localVarPathParams.Add("name", this.Configuration.ApiClient.ParameterToString(name)); // path parameter + if (jobId != null) localVarPathParams.Add("job_id", this.Configuration.ApiClient.ParameterToString(jobId)); // path parameter + + // authentication (APIKeyAuth) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-pollination-token"))) + { + localVarHeaderParams["x-pollination-token"] = this.Configuration.GetApiKeyWithPrefix("x-pollination-token"); + } + // authentication (JWTAuth) required + // http bearer authentication required + if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) + { + localVarHeaderParams["Authorization"] = "Bearer " + this.Configuration.AccessToken; + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, + Method.DELETE, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType, cancellationToken); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("DeleteJob", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (object) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(object))); + } + /// /// Download an artifact from the job folder Get a download link for an artifact in a job folder /// diff --git a/src/PollinationSDK/Api/LicensesApi.cs b/src/PollinationSDK/Api/LicensesApi.cs new file mode 100644 index 000000000..b0cee7d5f --- /dev/null +++ b/src/PollinationSDK/Api/LicensesApi.cs @@ -0,0 +1,1821 @@ +/* + * pollination-server + * + * Pollination Server OpenAPI Definition + * + * Contact: info@pollination.cloud + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.Threading; +using RestSharp; +using PollinationSDK.Client; +using PollinationSDK.Model; + +namespace PollinationSDK.Api +{ + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public interface ILicensesApi : IApiAccessor + { + #region Synchronous Operations + /// + /// Delete Activation + /// + /// + /// Delete the activation + /// + /// Thrown when fails to make API call + /// + /// + /// + void DeleteActivation (string poolId, string activationId); + + /// + /// Delete Activation + /// + /// + /// Delete the activation + /// + /// Thrown when fails to make API call + /// + /// + /// ApiResponse of Object(void) + ApiResponse DeleteActivationWithHttpInfo (string poolId, string activationId); + /// + /// Get Available Pools + /// + /// + /// Get license pools available to authenticated user + /// + /// Thrown when fails to make API call + /// Owner of the project (optional) + /// LicensePoolList + LicensePoolList GetAvailablePools (List owner = default); + + /// + /// Get Available Pools + /// + /// + /// Get license pools available to authenticated user + /// + /// Thrown when fails to make API call + /// Owner of the project (optional) + /// ApiResponse of LicensePoolList + ApiResponse GetAvailablePoolsWithHttpInfo (List owner = default); + /// + /// Get Activations + /// + /// + /// Get the activations for the license + /// + /// Thrown when fails to make API call + /// + /// ActivationList + ActivationList GetLicenseActivations (string poolId); + + /// + /// Get Activations + /// + /// + /// Get the activations for the license + /// + /// Thrown when fails to make API call + /// + /// ApiResponse of ActivationList + ApiResponse GetLicenseActivationsWithHttpInfo (string poolId); + /// + /// Get Pool License + /// + /// + /// Get the license associated with a pool + /// + /// Thrown when fails to make API call + /// + /// LicensePublic + LicensePublic GetPoolLicense (Guid poolId); + + /// + /// Get Pool License + /// + /// + /// Get the license associated with a pool + /// + /// Thrown when fails to make API call + /// + /// ApiResponse of LicensePublic + ApiResponse GetPoolLicenseWithHttpInfo (Guid poolId); + /// + /// Grant Pool Access + /// + /// + /// Grant access to the license pool + /// + /// Thrown when fails to make API call + /// + /// + /// LicensePoolPublic + LicensePoolPublic GrantAccessToPool (Guid poolId, LicensePoolAccessPolicyList licensePoolAccessPolicyList); + + /// + /// Grant Pool Access + /// + /// + /// Grant access to the license pool + /// + /// Thrown when fails to make API call + /// + /// + /// ApiResponse of LicensePoolPublic + ApiResponse GrantAccessToPoolWithHttpInfo (Guid poolId, LicensePoolAccessPolicyList licensePoolAccessPolicyList); + /// + /// Regenerate + /// + /// + /// Regenerate the license associated with the pool + /// + /// Thrown when fails to make API call + /// + /// object + object RegenerateLicensePool (Guid poolId); + + /// + /// Regenerate + /// + /// + /// Regenerate the license associated with the pool + /// + /// Thrown when fails to make API call + /// + /// ApiResponse of object + ApiResponse RegenerateLicensePoolWithHttpInfo (Guid poolId); + /// + /// Delete Pool Access + /// + /// + /// Revoke access to the license pool + /// + /// Thrown when fails to make API call + /// + /// + /// LicensePoolPublic + LicensePoolPublic RevokeAccessToPool (Guid poolId, LicensePoolPolicySubjectList licensePoolPolicySubjectList); + + /// + /// Delete Pool Access + /// + /// + /// Revoke access to the license pool + /// + /// Thrown when fails to make API call + /// + /// + /// ApiResponse of LicensePoolPublic + ApiResponse RevokeAccessToPoolWithHttpInfo (Guid poolId, LicensePoolPolicySubjectList licensePoolPolicySubjectList); + /// + /// Update Pool + /// + /// + /// Update the license pool + /// + /// Thrown when fails to make API call + /// + /// + /// object + object UpdateLicensePool (Guid poolId, LicensePoolUpdate licensePoolUpdate); + + /// + /// Update Pool + /// + /// + /// Update the license pool + /// + /// Thrown when fails to make API call + /// + /// + /// ApiResponse of object + ApiResponse UpdateLicensePoolWithHttpInfo (Guid poolId, LicensePoolUpdate licensePoolUpdate); + #endregion Synchronous Operations + #region Asynchronous Operations + /// + /// Delete Activation + /// + /// + /// Delete the activation + /// + /// Thrown when fails to make API call + /// + /// + /// Cancellation Token to cancel request (optional) + /// Task of void + System.Threading.Tasks.Task DeleteActivationAsync (string poolId, string activationId, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// Delete Activation + /// + /// + /// Delete the activation + /// + /// Thrown when fails to make API call + /// + /// + /// Cancellation Token to cancel request (optional) + /// Task of ApiResponse + System.Threading.Tasks.Task> DeleteActivationWithHttpInfoAsync (string poolId, string activationId, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Get Available Pools + /// + /// + /// Get license pools available to authenticated user + /// + /// Thrown when fails to make API call + /// Owner of the project (optional) + /// Cancellation Token to cancel request (optional) + /// Task of LicensePoolList + System.Threading.Tasks.Task GetAvailablePoolsAsync (List owner = default, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// Get Available Pools + /// + /// + /// Get license pools available to authenticated user + /// + /// Thrown when fails to make API call + /// Owner of the project (optional) + /// Cancellation Token to cancel request (optional) + /// Task of ApiResponse (LicensePoolList) + System.Threading.Tasks.Task> GetAvailablePoolsWithHttpInfoAsync (List owner = default, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Get Activations + /// + /// + /// Get the activations for the license + /// + /// Thrown when fails to make API call + /// + /// Cancellation Token to cancel request (optional) + /// Task of ActivationList + System.Threading.Tasks.Task GetLicenseActivationsAsync (string poolId, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// Get Activations + /// + /// + /// Get the activations for the license + /// + /// Thrown when fails to make API call + /// + /// Cancellation Token to cancel request (optional) + /// Task of ApiResponse (ActivationList) + System.Threading.Tasks.Task> GetLicenseActivationsWithHttpInfoAsync (string poolId, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Get Pool License + /// + /// + /// Get the license associated with a pool + /// + /// Thrown when fails to make API call + /// + /// Cancellation Token to cancel request (optional) + /// Task of LicensePublic + System.Threading.Tasks.Task GetPoolLicenseAsync (Guid poolId, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// Get Pool License + /// + /// + /// Get the license associated with a pool + /// + /// Thrown when fails to make API call + /// + /// Cancellation Token to cancel request (optional) + /// Task of ApiResponse (LicensePublic) + System.Threading.Tasks.Task> GetPoolLicenseWithHttpInfoAsync (Guid poolId, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Grant Pool Access + /// + /// + /// Grant access to the license pool + /// + /// Thrown when fails to make API call + /// + /// + /// Cancellation Token to cancel request (optional) + /// Task of LicensePoolPublic + System.Threading.Tasks.Task GrantAccessToPoolAsync (Guid poolId, LicensePoolAccessPolicyList licensePoolAccessPolicyList, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// Grant Pool Access + /// + /// + /// Grant access to the license pool + /// + /// Thrown when fails to make API call + /// + /// + /// Cancellation Token to cancel request (optional) + /// Task of ApiResponse (LicensePoolPublic) + System.Threading.Tasks.Task> GrantAccessToPoolWithHttpInfoAsync (Guid poolId, LicensePoolAccessPolicyList licensePoolAccessPolicyList, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Regenerate + /// + /// + /// Regenerate the license associated with the pool + /// + /// Thrown when fails to make API call + /// + /// Cancellation Token to cancel request (optional) + /// Task of object + System.Threading.Tasks.Task RegenerateLicensePoolAsync (Guid poolId, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// Regenerate + /// + /// + /// Regenerate the license associated with the pool + /// + /// Thrown when fails to make API call + /// + /// Cancellation Token to cancel request (optional) + /// Task of ApiResponse (object) + System.Threading.Tasks.Task> RegenerateLicensePoolWithHttpInfoAsync (Guid poolId, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Delete Pool Access + /// + /// + /// Revoke access to the license pool + /// + /// Thrown when fails to make API call + /// + /// + /// Cancellation Token to cancel request (optional) + /// Task of LicensePoolPublic + System.Threading.Tasks.Task RevokeAccessToPoolAsync (Guid poolId, LicensePoolPolicySubjectList licensePoolPolicySubjectList, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// Delete Pool Access + /// + /// + /// Revoke access to the license pool + /// + /// Thrown when fails to make API call + /// + /// + /// Cancellation Token to cancel request (optional) + /// Task of ApiResponse (LicensePoolPublic) + System.Threading.Tasks.Task> RevokeAccessToPoolWithHttpInfoAsync (Guid poolId, LicensePoolPolicySubjectList licensePoolPolicySubjectList, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Update Pool + /// + /// + /// Update the license pool + /// + /// Thrown when fails to make API call + /// + /// + /// Cancellation Token to cancel request (optional) + /// Task of object + System.Threading.Tasks.Task UpdateLicensePoolAsync (Guid poolId, LicensePoolUpdate licensePoolUpdate, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// Update Pool + /// + /// + /// Update the license pool + /// + /// Thrown when fails to make API call + /// + /// + /// Cancellation Token to cancel request (optional) + /// Task of ApiResponse (object) + System.Threading.Tasks.Task> UpdateLicensePoolWithHttpInfoAsync (Guid poolId, LicensePoolUpdate licensePoolUpdate, CancellationToken cancellationToken = default(CancellationToken)); + #endregion Asynchronous Operations + } + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public partial class LicensesApi : ILicensesApi + { + private PollinationSDK.Client.ExceptionFactory _exceptionFactory = (name, response) => null; + + /// + /// Initializes a new instance of the class. + /// + /// + public LicensesApi(String basePath) + { + this.Configuration = new PollinationSDK.Client.Configuration { BasePath = basePath }; + + ExceptionFactory = PollinationSDK.Client.Configuration.DefaultExceptionFactory; + } + + /// + /// Initializes a new instance of the class + /// + /// + public LicensesApi() + { + this.Configuration = PollinationSDK.Client.Configuration.Default; + + ExceptionFactory = PollinationSDK.Client.Configuration.DefaultExceptionFactory; + } + + /// + /// Initializes a new instance of the class + /// using Configuration object + /// + /// An instance of Configuration + /// + public LicensesApi(PollinationSDK.Client.Configuration configuration = null) + { + if (configuration == null) // use the default one in Configuration + this.Configuration = PollinationSDK.Client.Configuration.Default; + else + this.Configuration = configuration; + + ExceptionFactory = PollinationSDK.Client.Configuration.DefaultExceptionFactory; + } + + /// + /// Gets the base path of the API client. + /// + /// The base path + public String GetBasePath() + { + return this.Configuration.ApiClient.RestClient.BaseUrl.ToString(); + } + + /// + /// Gets or sets the configuration object + /// + /// An instance of the Configuration + public PollinationSDK.Client.Configuration Configuration {get; set;} + + /// + /// Provides a factory method hook for the creation of exceptions. + /// + public PollinationSDK.Client.ExceptionFactory ExceptionFactory + { + get + { + if (_exceptionFactory != null && _exceptionFactory.GetInvocationList().Length > 1) + { + throw new InvalidOperationException("Multicast delegate for ExceptionFactory is unsupported."); + } + return _exceptionFactory; + } + set { _exceptionFactory = value; } + } + + /// + /// Delete Activation Delete the activation + /// + /// Thrown when fails to make API call + /// + /// + /// + public void DeleteActivation (string poolId, string activationId) + { + DeleteActivationWithHttpInfo(poolId, activationId); + } + + /// + /// Delete Activation Delete the activation + /// + /// Thrown when fails to make API call + /// + /// + /// ApiResponse of Object(void) + public ApiResponse DeleteActivationWithHttpInfo (string poolId, string activationId) + { + // verify the required parameter 'poolId' is set + if (poolId == null) + throw new ApiException(400, "Missing required parameter 'poolId' when calling LicensesApi->DeleteActivation"); + // verify the required parameter 'activationId' is set + if (activationId == null) + throw new ApiException(400, "Missing required parameter 'activationId' when calling LicensesApi->DeleteActivation"); + + var localVarPath = "/licenses/pools/{pool_id}/activations/{activation_id}"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (poolId != null) localVarPathParams.Add("pool_id", this.Configuration.ApiClient.ParameterToString(poolId)); // path parameter + if (activationId != null) localVarPathParams.Add("activation_id", this.Configuration.ApiClient.ParameterToString(activationId)); // path parameter + + // authentication (APIKeyAuth) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-pollination-token"))) + { + localVarHeaderParams["x-pollination-token"] = this.Configuration.GetApiKeyWithPrefix("x-pollination-token"); + } + // authentication (JWTAuth) required + // http beerer authentication required + if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) + { + localVarHeaderParams["Authorization"] = "Bearer " + this.Configuration.AccessToken; + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, + Method.DELETE, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("DeleteActivation", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + null); + } + + /// + /// Delete Activation Delete the activation + /// + /// Thrown when fails to make API call + /// + /// + /// Cancellation Token to cancel request (optional) + /// Task of void + public async System.Threading.Tasks.Task DeleteActivationAsync (string poolId, string activationId, CancellationToken cancellationToken = default(CancellationToken)) + { + await DeleteActivationWithHttpInfoAsync(poolId, activationId, cancellationToken); + + } + + /// + /// Delete Activation Delete the activation + /// + /// Thrown when fails to make API call + /// + /// + /// Cancellation Token to cancel request (optional) + /// Task of ApiResponse + public async System.Threading.Tasks.Task> DeleteActivationWithHttpInfoAsync (string poolId, string activationId, CancellationToken cancellationToken = default(CancellationToken)) + { + // verify the required parameter 'poolId' is set + if (poolId == null) + throw new ApiException(400, "Missing required parameter 'poolId' when calling LicensesApi->DeleteActivation"); + // verify the required parameter 'activationId' is set + if (activationId == null) + throw new ApiException(400, "Missing required parameter 'activationId' when calling LicensesApi->DeleteActivation"); + + var localVarPath = "/licenses/pools/{pool_id}/activations/{activation_id}"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (poolId != null) localVarPathParams.Add("pool_id", this.Configuration.ApiClient.ParameterToString(poolId)); // path parameter + if (activationId != null) localVarPathParams.Add("activation_id", this.Configuration.ApiClient.ParameterToString(activationId)); // path parameter + + // authentication (APIKeyAuth) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-pollination-token"))) + { + localVarHeaderParams["x-pollination-token"] = this.Configuration.GetApiKeyWithPrefix("x-pollination-token"); + } + // authentication (JWTAuth) required + // http bearer authentication required + if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) + { + localVarHeaderParams["Authorization"] = "Bearer " + this.Configuration.AccessToken; + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, + Method.DELETE, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType, cancellationToken); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("DeleteActivation", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + null); + } + + /// + /// Get Available Pools Get license pools available to authenticated user + /// + /// Thrown when fails to make API call + /// Owner of the project (optional) + /// LicensePoolList + public LicensePoolList GetAvailablePools (List owner = default) + { + ApiResponse localVarResponse = GetAvailablePoolsWithHttpInfo(owner); + return localVarResponse.Data; + } + + /// + /// Get Available Pools Get license pools available to authenticated user + /// + /// Thrown when fails to make API call + /// Owner of the project (optional) + /// ApiResponse of LicensePoolList + public ApiResponse GetAvailablePoolsWithHttpInfo (List owner = default) + { + + var localVarPath = "/licenses/pools"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (owner != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("multi", "owner", owner)); // query parameter + + // authentication (APIKeyAuth) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-pollination-token"))) + { + localVarHeaderParams["x-pollination-token"] = this.Configuration.GetApiKeyWithPrefix("x-pollination-token"); + } + // authentication (JWTAuth) required + // http beerer authentication required + if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) + { + localVarHeaderParams["Authorization"] = "Bearer " + this.Configuration.AccessToken; + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, + Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("GetAvailablePools", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (LicensePoolList) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(LicensePoolList))); + } + + /// + /// Get Available Pools Get license pools available to authenticated user + /// + /// Thrown when fails to make API call + /// Owner of the project (optional) + /// Cancellation Token to cancel request (optional) + /// Task of LicensePoolList + public async System.Threading.Tasks.Task GetAvailablePoolsAsync (List owner = default, CancellationToken cancellationToken = default(CancellationToken)) + { + ApiResponse localVarResponse = await GetAvailablePoolsWithHttpInfoAsync(owner, cancellationToken); + return localVarResponse.Data; + + } + + /// + /// Get Available Pools Get license pools available to authenticated user + /// + /// Thrown when fails to make API call + /// Owner of the project (optional) + /// Cancellation Token to cancel request (optional) + /// Task of ApiResponse (LicensePoolList) + public async System.Threading.Tasks.Task> GetAvailablePoolsWithHttpInfoAsync (List owner = default, CancellationToken cancellationToken = default(CancellationToken)) + { + + var localVarPath = "/licenses/pools"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (owner != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("multi", "owner", owner)); // query parameter + + // authentication (APIKeyAuth) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-pollination-token"))) + { + localVarHeaderParams["x-pollination-token"] = this.Configuration.GetApiKeyWithPrefix("x-pollination-token"); + } + // authentication (JWTAuth) required + // http bearer authentication required + if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) + { + localVarHeaderParams["Authorization"] = "Bearer " + this.Configuration.AccessToken; + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, + Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType, cancellationToken); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("GetAvailablePools", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (LicensePoolList) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(LicensePoolList))); + } + + /// + /// Get Activations Get the activations for the license + /// + /// Thrown when fails to make API call + /// + /// ActivationList + public ActivationList GetLicenseActivations (string poolId) + { + ApiResponse localVarResponse = GetLicenseActivationsWithHttpInfo(poolId); + return localVarResponse.Data; + } + + /// + /// Get Activations Get the activations for the license + /// + /// Thrown when fails to make API call + /// + /// ApiResponse of ActivationList + public ApiResponse GetLicenseActivationsWithHttpInfo (string poolId) + { + // verify the required parameter 'poolId' is set + if (poolId == null) + throw new ApiException(400, "Missing required parameter 'poolId' when calling LicensesApi->GetLicenseActivations"); + + var localVarPath = "/licenses/pools/{pool_id}/activations"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (poolId != null) localVarPathParams.Add("pool_id", this.Configuration.ApiClient.ParameterToString(poolId)); // path parameter + + // authentication (APIKeyAuth) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-pollination-token"))) + { + localVarHeaderParams["x-pollination-token"] = this.Configuration.GetApiKeyWithPrefix("x-pollination-token"); + } + // authentication (JWTAuth) required + // http beerer authentication required + if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) + { + localVarHeaderParams["Authorization"] = "Bearer " + this.Configuration.AccessToken; + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, + Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("GetLicenseActivations", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (ActivationList) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(ActivationList))); + } + + /// + /// Get Activations Get the activations for the license + /// + /// Thrown when fails to make API call + /// + /// Cancellation Token to cancel request (optional) + /// Task of ActivationList + public async System.Threading.Tasks.Task GetLicenseActivationsAsync (string poolId, CancellationToken cancellationToken = default(CancellationToken)) + { + ApiResponse localVarResponse = await GetLicenseActivationsWithHttpInfoAsync(poolId, cancellationToken); + return localVarResponse.Data; + + } + + /// + /// Get Activations Get the activations for the license + /// + /// Thrown when fails to make API call + /// + /// Cancellation Token to cancel request (optional) + /// Task of ApiResponse (ActivationList) + public async System.Threading.Tasks.Task> GetLicenseActivationsWithHttpInfoAsync (string poolId, CancellationToken cancellationToken = default(CancellationToken)) + { + // verify the required parameter 'poolId' is set + if (poolId == null) + throw new ApiException(400, "Missing required parameter 'poolId' when calling LicensesApi->GetLicenseActivations"); + + var localVarPath = "/licenses/pools/{pool_id}/activations"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (poolId != null) localVarPathParams.Add("pool_id", this.Configuration.ApiClient.ParameterToString(poolId)); // path parameter + + // authentication (APIKeyAuth) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-pollination-token"))) + { + localVarHeaderParams["x-pollination-token"] = this.Configuration.GetApiKeyWithPrefix("x-pollination-token"); + } + // authentication (JWTAuth) required + // http bearer authentication required + if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) + { + localVarHeaderParams["Authorization"] = "Bearer " + this.Configuration.AccessToken; + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, + Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType, cancellationToken); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("GetLicenseActivations", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (ActivationList) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(ActivationList))); + } + + /// + /// Get Pool License Get the license associated with a pool + /// + /// Thrown when fails to make API call + /// + /// LicensePublic + public LicensePublic GetPoolLicense (Guid poolId) + { + ApiResponse localVarResponse = GetPoolLicenseWithHttpInfo(poolId); + return localVarResponse.Data; + } + + /// + /// Get Pool License Get the license associated with a pool + /// + /// Thrown when fails to make API call + /// + /// ApiResponse of LicensePublic + public ApiResponse GetPoolLicenseWithHttpInfo (Guid poolId) + { + // verify the required parameter 'poolId' is set + if (poolId == null) + throw new ApiException(400, "Missing required parameter 'poolId' when calling LicensesApi->GetPoolLicense"); + + var localVarPath = "/licenses/pools/{pool_id}/license"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (poolId != null) localVarPathParams.Add("pool_id", this.Configuration.ApiClient.ParameterToString(poolId)); // path parameter + + // authentication (APIKeyAuth) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-pollination-token"))) + { + localVarHeaderParams["x-pollination-token"] = this.Configuration.GetApiKeyWithPrefix("x-pollination-token"); + } + // authentication (JWTAuth) required + // http beerer authentication required + if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) + { + localVarHeaderParams["Authorization"] = "Bearer " + this.Configuration.AccessToken; + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, + Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("GetPoolLicense", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (LicensePublic) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(LicensePublic))); + } + + /// + /// Get Pool License Get the license associated with a pool + /// + /// Thrown when fails to make API call + /// + /// Cancellation Token to cancel request (optional) + /// Task of LicensePublic + public async System.Threading.Tasks.Task GetPoolLicenseAsync (Guid poolId, CancellationToken cancellationToken = default(CancellationToken)) + { + ApiResponse localVarResponse = await GetPoolLicenseWithHttpInfoAsync(poolId, cancellationToken); + return localVarResponse.Data; + + } + + /// + /// Get Pool License Get the license associated with a pool + /// + /// Thrown when fails to make API call + /// + /// Cancellation Token to cancel request (optional) + /// Task of ApiResponse (LicensePublic) + public async System.Threading.Tasks.Task> GetPoolLicenseWithHttpInfoAsync (Guid poolId, CancellationToken cancellationToken = default(CancellationToken)) + { + // verify the required parameter 'poolId' is set + if (poolId == null) + throw new ApiException(400, "Missing required parameter 'poolId' when calling LicensesApi->GetPoolLicense"); + + var localVarPath = "/licenses/pools/{pool_id}/license"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (poolId != null) localVarPathParams.Add("pool_id", this.Configuration.ApiClient.ParameterToString(poolId)); // path parameter + + // authentication (APIKeyAuth) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-pollination-token"))) + { + localVarHeaderParams["x-pollination-token"] = this.Configuration.GetApiKeyWithPrefix("x-pollination-token"); + } + // authentication (JWTAuth) required + // http bearer authentication required + if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) + { + localVarHeaderParams["Authorization"] = "Bearer " + this.Configuration.AccessToken; + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, + Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType, cancellationToken); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("GetPoolLicense", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (LicensePublic) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(LicensePublic))); + } + + /// + /// Grant Pool Access Grant access to the license pool + /// + /// Thrown when fails to make API call + /// + /// + /// LicensePoolPublic + public LicensePoolPublic GrantAccessToPool (Guid poolId, LicensePoolAccessPolicyList licensePoolAccessPolicyList) + { + ApiResponse localVarResponse = GrantAccessToPoolWithHttpInfo(poolId, licensePoolAccessPolicyList); + return localVarResponse.Data; + } + + /// + /// Grant Pool Access Grant access to the license pool + /// + /// Thrown when fails to make API call + /// + /// + /// ApiResponse of LicensePoolPublic + public ApiResponse GrantAccessToPoolWithHttpInfo (Guid poolId, LicensePoolAccessPolicyList licensePoolAccessPolicyList) + { + // verify the required parameter 'poolId' is set + if (poolId == null) + throw new ApiException(400, "Missing required parameter 'poolId' when calling LicensesApi->GrantAccessToPool"); + // verify the required parameter 'licensePoolAccessPolicyList' is set + if (licensePoolAccessPolicyList == null) + throw new ApiException(400, "Missing required parameter 'licensePoolAccessPolicyList' when calling LicensesApi->GrantAccessToPool"); + + var localVarPath = "/licenses/pools/{pool_id}/permissions"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (poolId != null) localVarPathParams.Add("pool_id", this.Configuration.ApiClient.ParameterToString(poolId)); // path parameter + if (licensePoolAccessPolicyList != null && licensePoolAccessPolicyList.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(licensePoolAccessPolicyList); // http body (model) parameter + } + else + { + localVarPostBody = licensePoolAccessPolicyList; // byte array + } + + // authentication (APIKeyAuth) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-pollination-token"))) + { + localVarHeaderParams["x-pollination-token"] = this.Configuration.GetApiKeyWithPrefix("x-pollination-token"); + } + // authentication (JWTAuth) required + // http beerer authentication required + if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) + { + localVarHeaderParams["Authorization"] = "Bearer " + this.Configuration.AccessToken; + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, + Method.PATCH, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("GrantAccessToPool", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (LicensePoolPublic) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(LicensePoolPublic))); + } + + /// + /// Grant Pool Access Grant access to the license pool + /// + /// Thrown when fails to make API call + /// + /// + /// Cancellation Token to cancel request (optional) + /// Task of LicensePoolPublic + public async System.Threading.Tasks.Task GrantAccessToPoolAsync (Guid poolId, LicensePoolAccessPolicyList licensePoolAccessPolicyList, CancellationToken cancellationToken = default(CancellationToken)) + { + ApiResponse localVarResponse = await GrantAccessToPoolWithHttpInfoAsync(poolId, licensePoolAccessPolicyList, cancellationToken); + return localVarResponse.Data; + + } + + /// + /// Grant Pool Access Grant access to the license pool + /// + /// Thrown when fails to make API call + /// + /// + /// Cancellation Token to cancel request (optional) + /// Task of ApiResponse (LicensePoolPublic) + public async System.Threading.Tasks.Task> GrantAccessToPoolWithHttpInfoAsync (Guid poolId, LicensePoolAccessPolicyList licensePoolAccessPolicyList, CancellationToken cancellationToken = default(CancellationToken)) + { + // verify the required parameter 'poolId' is set + if (poolId == null) + throw new ApiException(400, "Missing required parameter 'poolId' when calling LicensesApi->GrantAccessToPool"); + // verify the required parameter 'licensePoolAccessPolicyList' is set + if (licensePoolAccessPolicyList == null) + throw new ApiException(400, "Missing required parameter 'licensePoolAccessPolicyList' when calling LicensesApi->GrantAccessToPool"); + + var localVarPath = "/licenses/pools/{pool_id}/permissions"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (poolId != null) localVarPathParams.Add("pool_id", this.Configuration.ApiClient.ParameterToString(poolId)); // path parameter + if (licensePoolAccessPolicyList != null && licensePoolAccessPolicyList.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(licensePoolAccessPolicyList); // http body (model) parameter + } + else + { + localVarPostBody = licensePoolAccessPolicyList; // byte array + } + + // authentication (APIKeyAuth) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-pollination-token"))) + { + localVarHeaderParams["x-pollination-token"] = this.Configuration.GetApiKeyWithPrefix("x-pollination-token"); + } + // authentication (JWTAuth) required + // http bearer authentication required + if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) + { + localVarHeaderParams["Authorization"] = "Bearer " + this.Configuration.AccessToken; + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, + Method.PATCH, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType, cancellationToken); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("GrantAccessToPool", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (LicensePoolPublic) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(LicensePoolPublic))); + } + + /// + /// Regenerate Regenerate the license associated with the pool + /// + /// Thrown when fails to make API call + /// + /// object + public object RegenerateLicensePool (Guid poolId) + { + ApiResponse localVarResponse = RegenerateLicensePoolWithHttpInfo(poolId); + return localVarResponse.Data; + } + + /// + /// Regenerate Regenerate the license associated with the pool + /// + /// Thrown when fails to make API call + /// + /// ApiResponse of object + public ApiResponse RegenerateLicensePoolWithHttpInfo (Guid poolId) + { + // verify the required parameter 'poolId' is set + if (poolId == null) + throw new ApiException(400, "Missing required parameter 'poolId' when calling LicensesApi->RegenerateLicensePool"); + + var localVarPath = "/licenses/pools/{pool_id}/regenerate"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (poolId != null) localVarPathParams.Add("pool_id", this.Configuration.ApiClient.ParameterToString(poolId)); // path parameter + + // authentication (APIKeyAuth) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-pollination-token"))) + { + localVarHeaderParams["x-pollination-token"] = this.Configuration.GetApiKeyWithPrefix("x-pollination-token"); + } + // authentication (JWTAuth) required + // http beerer authentication required + if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) + { + localVarHeaderParams["Authorization"] = "Bearer " + this.Configuration.AccessToken; + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, + Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("RegenerateLicensePool", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (object) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(object))); + } + + /// + /// Regenerate Regenerate the license associated with the pool + /// + /// Thrown when fails to make API call + /// + /// Cancellation Token to cancel request (optional) + /// Task of object + public async System.Threading.Tasks.Task RegenerateLicensePoolAsync (Guid poolId, CancellationToken cancellationToken = default(CancellationToken)) + { + ApiResponse localVarResponse = await RegenerateLicensePoolWithHttpInfoAsync(poolId, cancellationToken); + return localVarResponse.Data; + + } + + /// + /// Regenerate Regenerate the license associated with the pool + /// + /// Thrown when fails to make API call + /// + /// Cancellation Token to cancel request (optional) + /// Task of ApiResponse (object) + public async System.Threading.Tasks.Task> RegenerateLicensePoolWithHttpInfoAsync (Guid poolId, CancellationToken cancellationToken = default(CancellationToken)) + { + // verify the required parameter 'poolId' is set + if (poolId == null) + throw new ApiException(400, "Missing required parameter 'poolId' when calling LicensesApi->RegenerateLicensePool"); + + var localVarPath = "/licenses/pools/{pool_id}/regenerate"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (poolId != null) localVarPathParams.Add("pool_id", this.Configuration.ApiClient.ParameterToString(poolId)); // path parameter + + // authentication (APIKeyAuth) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-pollination-token"))) + { + localVarHeaderParams["x-pollination-token"] = this.Configuration.GetApiKeyWithPrefix("x-pollination-token"); + } + // authentication (JWTAuth) required + // http bearer authentication required + if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) + { + localVarHeaderParams["Authorization"] = "Bearer " + this.Configuration.AccessToken; + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, + Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType, cancellationToken); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("RegenerateLicensePool", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (object) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(object))); + } + + /// + /// Delete Pool Access Revoke access to the license pool + /// + /// Thrown when fails to make API call + /// + /// + /// LicensePoolPublic + public LicensePoolPublic RevokeAccessToPool (Guid poolId, LicensePoolPolicySubjectList licensePoolPolicySubjectList) + { + ApiResponse localVarResponse = RevokeAccessToPoolWithHttpInfo(poolId, licensePoolPolicySubjectList); + return localVarResponse.Data; + } + + /// + /// Delete Pool Access Revoke access to the license pool + /// + /// Thrown when fails to make API call + /// + /// + /// ApiResponse of LicensePoolPublic + public ApiResponse RevokeAccessToPoolWithHttpInfo (Guid poolId, LicensePoolPolicySubjectList licensePoolPolicySubjectList) + { + // verify the required parameter 'poolId' is set + if (poolId == null) + throw new ApiException(400, "Missing required parameter 'poolId' when calling LicensesApi->RevokeAccessToPool"); + // verify the required parameter 'licensePoolPolicySubjectList' is set + if (licensePoolPolicySubjectList == null) + throw new ApiException(400, "Missing required parameter 'licensePoolPolicySubjectList' when calling LicensesApi->RevokeAccessToPool"); + + var localVarPath = "/licenses/pools/{pool_id}/permissions"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (poolId != null) localVarPathParams.Add("pool_id", this.Configuration.ApiClient.ParameterToString(poolId)); // path parameter + if (licensePoolPolicySubjectList != null && licensePoolPolicySubjectList.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(licensePoolPolicySubjectList); // http body (model) parameter + } + else + { + localVarPostBody = licensePoolPolicySubjectList; // byte array + } + + // authentication (APIKeyAuth) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-pollination-token"))) + { + localVarHeaderParams["x-pollination-token"] = this.Configuration.GetApiKeyWithPrefix("x-pollination-token"); + } + // authentication (JWTAuth) required + // http beerer authentication required + if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) + { + localVarHeaderParams["Authorization"] = "Bearer " + this.Configuration.AccessToken; + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, + Method.DELETE, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("RevokeAccessToPool", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (LicensePoolPublic) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(LicensePoolPublic))); + } + + /// + /// Delete Pool Access Revoke access to the license pool + /// + /// Thrown when fails to make API call + /// + /// + /// Cancellation Token to cancel request (optional) + /// Task of LicensePoolPublic + public async System.Threading.Tasks.Task RevokeAccessToPoolAsync (Guid poolId, LicensePoolPolicySubjectList licensePoolPolicySubjectList, CancellationToken cancellationToken = default(CancellationToken)) + { + ApiResponse localVarResponse = await RevokeAccessToPoolWithHttpInfoAsync(poolId, licensePoolPolicySubjectList, cancellationToken); + return localVarResponse.Data; + + } + + /// + /// Delete Pool Access Revoke access to the license pool + /// + /// Thrown when fails to make API call + /// + /// + /// Cancellation Token to cancel request (optional) + /// Task of ApiResponse (LicensePoolPublic) + public async System.Threading.Tasks.Task> RevokeAccessToPoolWithHttpInfoAsync (Guid poolId, LicensePoolPolicySubjectList licensePoolPolicySubjectList, CancellationToken cancellationToken = default(CancellationToken)) + { + // verify the required parameter 'poolId' is set + if (poolId == null) + throw new ApiException(400, "Missing required parameter 'poolId' when calling LicensesApi->RevokeAccessToPool"); + // verify the required parameter 'licensePoolPolicySubjectList' is set + if (licensePoolPolicySubjectList == null) + throw new ApiException(400, "Missing required parameter 'licensePoolPolicySubjectList' when calling LicensesApi->RevokeAccessToPool"); + + var localVarPath = "/licenses/pools/{pool_id}/permissions"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (poolId != null) localVarPathParams.Add("pool_id", this.Configuration.ApiClient.ParameterToString(poolId)); // path parameter + if (licensePoolPolicySubjectList != null && licensePoolPolicySubjectList.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(licensePoolPolicySubjectList); // http body (model) parameter + } + else + { + localVarPostBody = licensePoolPolicySubjectList; // byte array + } + + // authentication (APIKeyAuth) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-pollination-token"))) + { + localVarHeaderParams["x-pollination-token"] = this.Configuration.GetApiKeyWithPrefix("x-pollination-token"); + } + // authentication (JWTAuth) required + // http bearer authentication required + if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) + { + localVarHeaderParams["Authorization"] = "Bearer " + this.Configuration.AccessToken; + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, + Method.DELETE, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType, cancellationToken); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("RevokeAccessToPool", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (LicensePoolPublic) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(LicensePoolPublic))); + } + + /// + /// Update Pool Update the license pool + /// + /// Thrown when fails to make API call + /// + /// + /// object + public object UpdateLicensePool (Guid poolId, LicensePoolUpdate licensePoolUpdate) + { + ApiResponse localVarResponse = UpdateLicensePoolWithHttpInfo(poolId, licensePoolUpdate); + return localVarResponse.Data; + } + + /// + /// Update Pool Update the license pool + /// + /// Thrown when fails to make API call + /// + /// + /// ApiResponse of object + public ApiResponse UpdateLicensePoolWithHttpInfo (Guid poolId, LicensePoolUpdate licensePoolUpdate) + { + // verify the required parameter 'poolId' is set + if (poolId == null) + throw new ApiException(400, "Missing required parameter 'poolId' when calling LicensesApi->UpdateLicensePool"); + // verify the required parameter 'licensePoolUpdate' is set + if (licensePoolUpdate == null) + throw new ApiException(400, "Missing required parameter 'licensePoolUpdate' when calling LicensesApi->UpdateLicensePool"); + + var localVarPath = "/licenses/pools/{pool_id}"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (poolId != null) localVarPathParams.Add("pool_id", this.Configuration.ApiClient.ParameterToString(poolId)); // path parameter + if (licensePoolUpdate != null && licensePoolUpdate.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(licensePoolUpdate); // http body (model) parameter + } + else + { + localVarPostBody = licensePoolUpdate; // byte array + } + + // authentication (APIKeyAuth) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-pollination-token"))) + { + localVarHeaderParams["x-pollination-token"] = this.Configuration.GetApiKeyWithPrefix("x-pollination-token"); + } + // authentication (JWTAuth) required + // http beerer authentication required + if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) + { + localVarHeaderParams["Authorization"] = "Bearer " + this.Configuration.AccessToken; + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, + Method.PUT, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("UpdateLicensePool", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (object) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(object))); + } + + /// + /// Update Pool Update the license pool + /// + /// Thrown when fails to make API call + /// + /// + /// Cancellation Token to cancel request (optional) + /// Task of object + public async System.Threading.Tasks.Task UpdateLicensePoolAsync (Guid poolId, LicensePoolUpdate licensePoolUpdate, CancellationToken cancellationToken = default(CancellationToken)) + { + ApiResponse localVarResponse = await UpdateLicensePoolWithHttpInfoAsync(poolId, licensePoolUpdate, cancellationToken); + return localVarResponse.Data; + + } + + /// + /// Update Pool Update the license pool + /// + /// Thrown when fails to make API call + /// + /// + /// Cancellation Token to cancel request (optional) + /// Task of ApiResponse (object) + public async System.Threading.Tasks.Task> UpdateLicensePoolWithHttpInfoAsync (Guid poolId, LicensePoolUpdate licensePoolUpdate, CancellationToken cancellationToken = default(CancellationToken)) + { + // verify the required parameter 'poolId' is set + if (poolId == null) + throw new ApiException(400, "Missing required parameter 'poolId' when calling LicensesApi->UpdateLicensePool"); + // verify the required parameter 'licensePoolUpdate' is set + if (licensePoolUpdate == null) + throw new ApiException(400, "Missing required parameter 'licensePoolUpdate' when calling LicensesApi->UpdateLicensePool"); + + var localVarPath = "/licenses/pools/{pool_id}"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (poolId != null) localVarPathParams.Add("pool_id", this.Configuration.ApiClient.ParameterToString(poolId)); // path parameter + if (licensePoolUpdate != null && licensePoolUpdate.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(licensePoolUpdate); // http body (model) parameter + } + else + { + localVarPostBody = licensePoolUpdate; // byte array + } + + // authentication (APIKeyAuth) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-pollination-token"))) + { + localVarHeaderParams["x-pollination-token"] = this.Configuration.GetApiKeyWithPrefix("x-pollination-token"); + } + // authentication (JWTAuth) required + // http bearer authentication required + if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) + { + localVarHeaderParams["Authorization"] = "Bearer " + this.Configuration.AccessToken; + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, + Method.PUT, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType, cancellationToken); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("UpdateLicensePool", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (object) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(object))); + } + + } +} diff --git a/src/PollinationSDK/Api/PaymentsApi.cs b/src/PollinationSDK/Api/PaymentsApi.cs new file mode 100644 index 000000000..3eb670f90 --- /dev/null +++ b/src/PollinationSDK/Api/PaymentsApi.cs @@ -0,0 +1,3487 @@ +/* + * pollination-server + * + * Pollination Server OpenAPI Definition + * + * Contact: info@pollination.cloud + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.Threading; +using RestSharp; +using PollinationSDK.Client; +using PollinationSDK.Model; + +namespace PollinationSDK.Api +{ + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public interface IPaymentsApi : IApiAccessor + { + #region Synchronous Operations + /// + /// Cancel Subscription + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// object + object CancelSubscription (string accountName); + + /// + /// Cancel Subscription + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// ApiResponse of object + ApiResponse CancelSubscriptionWithHttpInfo (string accountName); + /// + /// Add Payment Method + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + /// PaymentSetup + PaymentSetup CreatePaymentMethod (string accountName, PaymentCreate paymentCreate); + + /// + /// Add Payment Method + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + /// ApiResponse of PaymentSetup + ApiResponse CreatePaymentMethodWithHttpInfo (string accountName, PaymentCreate paymentCreate); + /// + /// Create Subscription + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + /// CreatedContent + CreatedContent CreateSubscription (string accountName, SubscriptionCreate subscriptionCreate); + + /// + /// Create Subscription + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + /// ApiResponse of CreatedContent + ApiResponse CreateSubscriptionWithHttpInfo (string accountName, SubscriptionCreate subscriptionCreate); + /// + /// Get Default Payment Method + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// CardPublic + CardPublic GetDefaultPaymentMethod (string accountName); + + /// + /// Get Default Payment Method + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// ApiResponse of CardPublic + ApiResponse GetDefaultPaymentMethodWithHttpInfo (string accountName); + /// + /// Get Failed Payment + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// PaymentIntent + PaymentIntent GetFailedPayment (string accountName); + + /// + /// Get Failed Payment + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// ApiResponse of PaymentIntent + ApiResponse GetFailedPaymentWithHttpInfo (string accountName); + /// + /// Get Inventory + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// Inventory + Inventory GetInventory (string accountName); + + /// + /// Get Inventory + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// ApiResponse of Inventory + ApiResponse GetInventoryWithHttpInfo (string accountName); + /// + /// Get Invoice List + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// (optional) + /// (optional) + /// (optional) + /// Number of items per page (optional, default to 25) + /// InvoiceList + InvoiceList GetInvoiceList (string accountName, string startingAfter = default, string endingBefore = default, int? limit = default, int? perPage = default); + + /// + /// Get Invoice List + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// (optional) + /// (optional) + /// (optional) + /// Number of items per page (optional, default to 25) + /// ApiResponse of InvoiceList + ApiResponse GetInvoiceListWithHttpInfo (string accountName, string startingAfter = default, string endingBefore = default, int? limit = default, int? perPage = default); + /// + /// Get Next Invoice + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// InvoicePreview + InvoicePreview GetNextInvoice (string accountName); + + /// + /// Get Next Invoice + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// ApiResponse of InvoicePreview + ApiResponse GetNextInvoiceWithHttpInfo (string accountName); + /// + /// Get Status + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// Status + Status GetStatus (string accountName); + + /// + /// Get Status + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// ApiResponse of Status + ApiResponse GetStatusWithHttpInfo (string accountName); + /// + /// Get Subscription + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// Subscription + Subscription GetSubscription (string accountName); + + /// + /// Get Subscription + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// ApiResponse of Subscription + ApiResponse GetSubscriptionWithHttpInfo (string accountName); + /// + /// Get Unfiltered Inventory + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Inventory + Inventory GetUnfilteredInventory (); + + /// + /// Get Unfiltered Inventory + /// + /// + /// + /// + /// Thrown when fails to make API call + /// ApiResponse of Inventory + ApiResponse GetUnfilteredInventoryWithHttpInfo (); + /// + /// Get Upcoming Subscription + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// Subscription + Subscription GetUpcomingSubscription (string accountName); + + /// + /// Get Upcoming Subscription + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// ApiResponse of Subscription + ApiResponse GetUpcomingSubscriptionWithHttpInfo (string accountName); + /// + /// Get Payment Methods + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// PaymentMethodList + PaymentMethodList ListPaymentMethods (string accountName); + + /// + /// Get Payment Methods + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// ApiResponse of PaymentMethodList + ApiResponse ListPaymentMethodsWithHttpInfo (string accountName); + /// + /// Preview Update Subscription + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + /// UpdateInvoicePreview + UpdateInvoicePreview PreviewUpdateSubscription (string accountName, SubscriptionUpdate subscriptionUpdate); + + /// + /// Preview Update Subscription + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + /// ApiResponse of UpdateInvoicePreview + ApiResponse PreviewUpdateSubscriptionWithHttpInfo (string accountName, SubscriptionUpdate subscriptionUpdate); + /// + /// Subscribe + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + /// CreatedContent + CreatedContent Subscribe (string accountName, Subscribe subscribe); + + /// + /// Subscribe + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + /// ApiResponse of CreatedContent + ApiResponse SubscribeWithHttpInfo (string accountName, Subscribe subscribe); + /// + /// Update Subscription + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + /// Subscription + Subscription UpdateSubscription (string accountName, SubscriptionUpdate subscriptionUpdate); + + /// + /// Update Subscription + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + /// ApiResponse of Subscription + ApiResponse UpdateSubscriptionWithHttpInfo (string accountName, SubscriptionUpdate subscriptionUpdate); + #endregion Synchronous Operations + #region Asynchronous Operations + /// + /// Cancel Subscription + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// Cancellation Token to cancel request (optional) + /// Task of object + System.Threading.Tasks.Task CancelSubscriptionAsync (string accountName, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// Cancel Subscription + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// Cancellation Token to cancel request (optional) + /// Task of ApiResponse (object) + System.Threading.Tasks.Task> CancelSubscriptionWithHttpInfoAsync (string accountName, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Add Payment Method + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + /// Cancellation Token to cancel request (optional) + /// Task of PaymentSetup + System.Threading.Tasks.Task CreatePaymentMethodAsync (string accountName, PaymentCreate paymentCreate, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// Add Payment Method + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + /// Cancellation Token to cancel request (optional) + /// Task of ApiResponse (PaymentSetup) + System.Threading.Tasks.Task> CreatePaymentMethodWithHttpInfoAsync (string accountName, PaymentCreate paymentCreate, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Create Subscription + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + /// Cancellation Token to cancel request (optional) + /// Task of CreatedContent + System.Threading.Tasks.Task CreateSubscriptionAsync (string accountName, SubscriptionCreate subscriptionCreate, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// Create Subscription + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + /// Cancellation Token to cancel request (optional) + /// Task of ApiResponse (CreatedContent) + System.Threading.Tasks.Task> CreateSubscriptionWithHttpInfoAsync (string accountName, SubscriptionCreate subscriptionCreate, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Get Default Payment Method + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// Cancellation Token to cancel request (optional) + /// Task of CardPublic + System.Threading.Tasks.Task GetDefaultPaymentMethodAsync (string accountName, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// Get Default Payment Method + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// Cancellation Token to cancel request (optional) + /// Task of ApiResponse (CardPublic) + System.Threading.Tasks.Task> GetDefaultPaymentMethodWithHttpInfoAsync (string accountName, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Get Failed Payment + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// Cancellation Token to cancel request (optional) + /// Task of PaymentIntent + System.Threading.Tasks.Task GetFailedPaymentAsync (string accountName, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// Get Failed Payment + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// Cancellation Token to cancel request (optional) + /// Task of ApiResponse (PaymentIntent) + System.Threading.Tasks.Task> GetFailedPaymentWithHttpInfoAsync (string accountName, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Get Inventory + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// Cancellation Token to cancel request (optional) + /// Task of Inventory + System.Threading.Tasks.Task GetInventoryAsync (string accountName, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// Get Inventory + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// Cancellation Token to cancel request (optional) + /// Task of ApiResponse (Inventory) + System.Threading.Tasks.Task> GetInventoryWithHttpInfoAsync (string accountName, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Get Invoice List + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// (optional) + /// (optional) + /// (optional) + /// Number of items per page (optional, default to 25) + /// Cancellation Token to cancel request (optional) + /// Task of InvoiceList + System.Threading.Tasks.Task GetInvoiceListAsync (string accountName, string startingAfter = default, string endingBefore = default, int? limit = default, int? perPage = default, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// Get Invoice List + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// (optional) + /// (optional) + /// (optional) + /// Number of items per page (optional, default to 25) + /// Cancellation Token to cancel request (optional) + /// Task of ApiResponse (InvoiceList) + System.Threading.Tasks.Task> GetInvoiceListWithHttpInfoAsync (string accountName, string startingAfter = default, string endingBefore = default, int? limit = default, int? perPage = default, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Get Next Invoice + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// Cancellation Token to cancel request (optional) + /// Task of InvoicePreview + System.Threading.Tasks.Task GetNextInvoiceAsync (string accountName, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// Get Next Invoice + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// Cancellation Token to cancel request (optional) + /// Task of ApiResponse (InvoicePreview) + System.Threading.Tasks.Task> GetNextInvoiceWithHttpInfoAsync (string accountName, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Get Status + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// Cancellation Token to cancel request (optional) + /// Task of Status + System.Threading.Tasks.Task GetStatusAsync (string accountName, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// Get Status + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// Cancellation Token to cancel request (optional) + /// Task of ApiResponse (Status) + System.Threading.Tasks.Task> GetStatusWithHttpInfoAsync (string accountName, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Get Subscription + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// Cancellation Token to cancel request (optional) + /// Task of Subscription + System.Threading.Tasks.Task GetSubscriptionAsync (string accountName, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// Get Subscription + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// Cancellation Token to cancel request (optional) + /// Task of ApiResponse (Subscription) + System.Threading.Tasks.Task> GetSubscriptionWithHttpInfoAsync (string accountName, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Get Unfiltered Inventory + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Cancellation Token to cancel request (optional) + /// Task of Inventory + System.Threading.Tasks.Task GetUnfilteredInventoryAsync (CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// Get Unfiltered Inventory + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Cancellation Token to cancel request (optional) + /// Task of ApiResponse (Inventory) + System.Threading.Tasks.Task> GetUnfilteredInventoryWithHttpInfoAsync (CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Get Upcoming Subscription + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// Cancellation Token to cancel request (optional) + /// Task of Subscription + System.Threading.Tasks.Task GetUpcomingSubscriptionAsync (string accountName, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// Get Upcoming Subscription + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// Cancellation Token to cancel request (optional) + /// Task of ApiResponse (Subscription) + System.Threading.Tasks.Task> GetUpcomingSubscriptionWithHttpInfoAsync (string accountName, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Get Payment Methods + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// Cancellation Token to cancel request (optional) + /// Task of PaymentMethodList + System.Threading.Tasks.Task ListPaymentMethodsAsync (string accountName, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// Get Payment Methods + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// Cancellation Token to cancel request (optional) + /// Task of ApiResponse (PaymentMethodList) + System.Threading.Tasks.Task> ListPaymentMethodsWithHttpInfoAsync (string accountName, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Preview Update Subscription + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + /// Cancellation Token to cancel request (optional) + /// Task of UpdateInvoicePreview + System.Threading.Tasks.Task PreviewUpdateSubscriptionAsync (string accountName, SubscriptionUpdate subscriptionUpdate, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// Preview Update Subscription + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + /// Cancellation Token to cancel request (optional) + /// Task of ApiResponse (UpdateInvoicePreview) + System.Threading.Tasks.Task> PreviewUpdateSubscriptionWithHttpInfoAsync (string accountName, SubscriptionUpdate subscriptionUpdate, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Subscribe + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + /// Cancellation Token to cancel request (optional) + /// Task of CreatedContent + System.Threading.Tasks.Task SubscribeAsync (string accountName, Subscribe subscribe, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// Subscribe + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + /// Cancellation Token to cancel request (optional) + /// Task of ApiResponse (CreatedContent) + System.Threading.Tasks.Task> SubscribeWithHttpInfoAsync (string accountName, Subscribe subscribe, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Update Subscription + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + /// Cancellation Token to cancel request (optional) + /// Task of Subscription + System.Threading.Tasks.Task UpdateSubscriptionAsync (string accountName, SubscriptionUpdate subscriptionUpdate, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// Update Subscription + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + /// Cancellation Token to cancel request (optional) + /// Task of ApiResponse (Subscription) + System.Threading.Tasks.Task> UpdateSubscriptionWithHttpInfoAsync (string accountName, SubscriptionUpdate subscriptionUpdate, CancellationToken cancellationToken = default(CancellationToken)); + #endregion Asynchronous Operations + } + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public partial class PaymentsApi : IPaymentsApi + { + private PollinationSDK.Client.ExceptionFactory _exceptionFactory = (name, response) => null; + + /// + /// Initializes a new instance of the class. + /// + /// + public PaymentsApi(String basePath) + { + this.Configuration = new PollinationSDK.Client.Configuration { BasePath = basePath }; + + ExceptionFactory = PollinationSDK.Client.Configuration.DefaultExceptionFactory; + } + + /// + /// Initializes a new instance of the class + /// + /// + public PaymentsApi() + { + this.Configuration = PollinationSDK.Client.Configuration.Default; + + ExceptionFactory = PollinationSDK.Client.Configuration.DefaultExceptionFactory; + } + + /// + /// Initializes a new instance of the class + /// using Configuration object + /// + /// An instance of Configuration + /// + public PaymentsApi(PollinationSDK.Client.Configuration configuration = null) + { + if (configuration == null) // use the default one in Configuration + this.Configuration = PollinationSDK.Client.Configuration.Default; + else + this.Configuration = configuration; + + ExceptionFactory = PollinationSDK.Client.Configuration.DefaultExceptionFactory; + } + + /// + /// Gets the base path of the API client. + /// + /// The base path + public String GetBasePath() + { + return this.Configuration.ApiClient.RestClient.BaseUrl.ToString(); + } + + /// + /// Gets or sets the configuration object + /// + /// An instance of the Configuration + public PollinationSDK.Client.Configuration Configuration {get; set;} + + /// + /// Provides a factory method hook for the creation of exceptions. + /// + public PollinationSDK.Client.ExceptionFactory ExceptionFactory + { + get + { + if (_exceptionFactory != null && _exceptionFactory.GetInvocationList().Length > 1) + { + throw new InvalidOperationException("Multicast delegate for ExceptionFactory is unsupported."); + } + return _exceptionFactory; + } + set { _exceptionFactory = value; } + } + + /// + /// Cancel Subscription + /// + /// Thrown when fails to make API call + /// + /// object + public object CancelSubscription (string accountName) + { + ApiResponse localVarResponse = CancelSubscriptionWithHttpInfo(accountName); + return localVarResponse.Data; + } + + /// + /// Cancel Subscription + /// + /// Thrown when fails to make API call + /// + /// ApiResponse of object + public ApiResponse CancelSubscriptionWithHttpInfo (string accountName) + { + // verify the required parameter 'accountName' is set + if (accountName == null) + throw new ApiException(400, "Missing required parameter 'accountName' when calling PaymentsApi->CancelSubscription"); + + var localVarPath = "/payments/{account_name}/subscription"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (accountName != null) localVarPathParams.Add("account_name", this.Configuration.ApiClient.ParameterToString(accountName)); // path parameter + + // authentication (APIKeyAuth) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-pollination-token"))) + { + localVarHeaderParams["x-pollination-token"] = this.Configuration.GetApiKeyWithPrefix("x-pollination-token"); + } + // authentication (JWTAuth) required + // http beerer authentication required + if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) + { + localVarHeaderParams["Authorization"] = "Bearer " + this.Configuration.AccessToken; + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, + Method.DELETE, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("CancelSubscription", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (object) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(object))); + } + + /// + /// Cancel Subscription + /// + /// Thrown when fails to make API call + /// + /// Cancellation Token to cancel request (optional) + /// Task of object + public async System.Threading.Tasks.Task CancelSubscriptionAsync (string accountName, CancellationToken cancellationToken = default(CancellationToken)) + { + ApiResponse localVarResponse = await CancelSubscriptionWithHttpInfoAsync(accountName, cancellationToken); + return localVarResponse.Data; + + } + + /// + /// Cancel Subscription + /// + /// Thrown when fails to make API call + /// + /// Cancellation Token to cancel request (optional) + /// Task of ApiResponse (object) + public async System.Threading.Tasks.Task> CancelSubscriptionWithHttpInfoAsync (string accountName, CancellationToken cancellationToken = default(CancellationToken)) + { + // verify the required parameter 'accountName' is set + if (accountName == null) + throw new ApiException(400, "Missing required parameter 'accountName' when calling PaymentsApi->CancelSubscription"); + + var localVarPath = "/payments/{account_name}/subscription"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (accountName != null) localVarPathParams.Add("account_name", this.Configuration.ApiClient.ParameterToString(accountName)); // path parameter + + // authentication (APIKeyAuth) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-pollination-token"))) + { + localVarHeaderParams["x-pollination-token"] = this.Configuration.GetApiKeyWithPrefix("x-pollination-token"); + } + // authentication (JWTAuth) required + // http bearer authentication required + if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) + { + localVarHeaderParams["Authorization"] = "Bearer " + this.Configuration.AccessToken; + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, + Method.DELETE, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType, cancellationToken); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("CancelSubscription", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (object) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(object))); + } + + /// + /// Add Payment Method + /// + /// Thrown when fails to make API call + /// + /// + /// PaymentSetup + public PaymentSetup CreatePaymentMethod (string accountName, PaymentCreate paymentCreate) + { + ApiResponse localVarResponse = CreatePaymentMethodWithHttpInfo(accountName, paymentCreate); + return localVarResponse.Data; + } + + /// + /// Add Payment Method + /// + /// Thrown when fails to make API call + /// + /// + /// ApiResponse of PaymentSetup + public ApiResponse CreatePaymentMethodWithHttpInfo (string accountName, PaymentCreate paymentCreate) + { + // verify the required parameter 'accountName' is set + if (accountName == null) + throw new ApiException(400, "Missing required parameter 'accountName' when calling PaymentsApi->CreatePaymentMethod"); + // verify the required parameter 'paymentCreate' is set + if (paymentCreate == null) + throw new ApiException(400, "Missing required parameter 'paymentCreate' when calling PaymentsApi->CreatePaymentMethod"); + + var localVarPath = "/payments/{account_name}/methods"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (accountName != null) localVarPathParams.Add("account_name", this.Configuration.ApiClient.ParameterToString(accountName)); // path parameter + if (paymentCreate != null && paymentCreate.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(paymentCreate); // http body (model) parameter + } + else + { + localVarPostBody = paymentCreate; // byte array + } + + // authentication (APIKeyAuth) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-pollination-token"))) + { + localVarHeaderParams["x-pollination-token"] = this.Configuration.GetApiKeyWithPrefix("x-pollination-token"); + } + // authentication (JWTAuth) required + // http beerer authentication required + if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) + { + localVarHeaderParams["Authorization"] = "Bearer " + this.Configuration.AccessToken; + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, + Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("CreatePaymentMethod", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (PaymentSetup) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(PaymentSetup))); + } + + /// + /// Add Payment Method + /// + /// Thrown when fails to make API call + /// + /// + /// Cancellation Token to cancel request (optional) + /// Task of PaymentSetup + public async System.Threading.Tasks.Task CreatePaymentMethodAsync (string accountName, PaymentCreate paymentCreate, CancellationToken cancellationToken = default(CancellationToken)) + { + ApiResponse localVarResponse = await CreatePaymentMethodWithHttpInfoAsync(accountName, paymentCreate, cancellationToken); + return localVarResponse.Data; + + } + + /// + /// Add Payment Method + /// + /// Thrown when fails to make API call + /// + /// + /// Cancellation Token to cancel request (optional) + /// Task of ApiResponse (PaymentSetup) + public async System.Threading.Tasks.Task> CreatePaymentMethodWithHttpInfoAsync (string accountName, PaymentCreate paymentCreate, CancellationToken cancellationToken = default(CancellationToken)) + { + // verify the required parameter 'accountName' is set + if (accountName == null) + throw new ApiException(400, "Missing required parameter 'accountName' when calling PaymentsApi->CreatePaymentMethod"); + // verify the required parameter 'paymentCreate' is set + if (paymentCreate == null) + throw new ApiException(400, "Missing required parameter 'paymentCreate' when calling PaymentsApi->CreatePaymentMethod"); + + var localVarPath = "/payments/{account_name}/methods"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (accountName != null) localVarPathParams.Add("account_name", this.Configuration.ApiClient.ParameterToString(accountName)); // path parameter + if (paymentCreate != null && paymentCreate.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(paymentCreate); // http body (model) parameter + } + else + { + localVarPostBody = paymentCreate; // byte array + } + + // authentication (APIKeyAuth) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-pollination-token"))) + { + localVarHeaderParams["x-pollination-token"] = this.Configuration.GetApiKeyWithPrefix("x-pollination-token"); + } + // authentication (JWTAuth) required + // http bearer authentication required + if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) + { + localVarHeaderParams["Authorization"] = "Bearer " + this.Configuration.AccessToken; + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, + Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType, cancellationToken); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("CreatePaymentMethod", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (PaymentSetup) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(PaymentSetup))); + } + + /// + /// Create Subscription + /// + /// Thrown when fails to make API call + /// + /// + /// CreatedContent + public CreatedContent CreateSubscription (string accountName, SubscriptionCreate subscriptionCreate) + { + ApiResponse localVarResponse = CreateSubscriptionWithHttpInfo(accountName, subscriptionCreate); + return localVarResponse.Data; + } + + /// + /// Create Subscription + /// + /// Thrown when fails to make API call + /// + /// + /// ApiResponse of CreatedContent + public ApiResponse CreateSubscriptionWithHttpInfo (string accountName, SubscriptionCreate subscriptionCreate) + { + // verify the required parameter 'accountName' is set + if (accountName == null) + throw new ApiException(400, "Missing required parameter 'accountName' when calling PaymentsApi->CreateSubscription"); + // verify the required parameter 'subscriptionCreate' is set + if (subscriptionCreate == null) + throw new ApiException(400, "Missing required parameter 'subscriptionCreate' when calling PaymentsApi->CreateSubscription"); + + var localVarPath = "/payments/{account_name}/subscription"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (accountName != null) localVarPathParams.Add("account_name", this.Configuration.ApiClient.ParameterToString(accountName)); // path parameter + if (subscriptionCreate != null && subscriptionCreate.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(subscriptionCreate); // http body (model) parameter + } + else + { + localVarPostBody = subscriptionCreate; // byte array + } + + // authentication (APIKeyAuth) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-pollination-token"))) + { + localVarHeaderParams["x-pollination-token"] = this.Configuration.GetApiKeyWithPrefix("x-pollination-token"); + } + // authentication (JWTAuth) required + // http beerer authentication required + if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) + { + localVarHeaderParams["Authorization"] = "Bearer " + this.Configuration.AccessToken; + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, + Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("CreateSubscription", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (CreatedContent) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(CreatedContent))); + } + + /// + /// Create Subscription + /// + /// Thrown when fails to make API call + /// + /// + /// Cancellation Token to cancel request (optional) + /// Task of CreatedContent + public async System.Threading.Tasks.Task CreateSubscriptionAsync (string accountName, SubscriptionCreate subscriptionCreate, CancellationToken cancellationToken = default(CancellationToken)) + { + ApiResponse localVarResponse = await CreateSubscriptionWithHttpInfoAsync(accountName, subscriptionCreate, cancellationToken); + return localVarResponse.Data; + + } + + /// + /// Create Subscription + /// + /// Thrown when fails to make API call + /// + /// + /// Cancellation Token to cancel request (optional) + /// Task of ApiResponse (CreatedContent) + public async System.Threading.Tasks.Task> CreateSubscriptionWithHttpInfoAsync (string accountName, SubscriptionCreate subscriptionCreate, CancellationToken cancellationToken = default(CancellationToken)) + { + // verify the required parameter 'accountName' is set + if (accountName == null) + throw new ApiException(400, "Missing required parameter 'accountName' when calling PaymentsApi->CreateSubscription"); + // verify the required parameter 'subscriptionCreate' is set + if (subscriptionCreate == null) + throw new ApiException(400, "Missing required parameter 'subscriptionCreate' when calling PaymentsApi->CreateSubscription"); + + var localVarPath = "/payments/{account_name}/subscription"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (accountName != null) localVarPathParams.Add("account_name", this.Configuration.ApiClient.ParameterToString(accountName)); // path parameter + if (subscriptionCreate != null && subscriptionCreate.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(subscriptionCreate); // http body (model) parameter + } + else + { + localVarPostBody = subscriptionCreate; // byte array + } + + // authentication (APIKeyAuth) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-pollination-token"))) + { + localVarHeaderParams["x-pollination-token"] = this.Configuration.GetApiKeyWithPrefix("x-pollination-token"); + } + // authentication (JWTAuth) required + // http bearer authentication required + if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) + { + localVarHeaderParams["Authorization"] = "Bearer " + this.Configuration.AccessToken; + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, + Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType, cancellationToken); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("CreateSubscription", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (CreatedContent) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(CreatedContent))); + } + + /// + /// Get Default Payment Method + /// + /// Thrown when fails to make API call + /// + /// CardPublic + public CardPublic GetDefaultPaymentMethod (string accountName) + { + ApiResponse localVarResponse = GetDefaultPaymentMethodWithHttpInfo(accountName); + return localVarResponse.Data; + } + + /// + /// Get Default Payment Method + /// + /// Thrown when fails to make API call + /// + /// ApiResponse of CardPublic + public ApiResponse GetDefaultPaymentMethodWithHttpInfo (string accountName) + { + // verify the required parameter 'accountName' is set + if (accountName == null) + throw new ApiException(400, "Missing required parameter 'accountName' when calling PaymentsApi->GetDefaultPaymentMethod"); + + var localVarPath = "/payments/{account_name}/methods/default"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (accountName != null) localVarPathParams.Add("account_name", this.Configuration.ApiClient.ParameterToString(accountName)); // path parameter + + // authentication (APIKeyAuth) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-pollination-token"))) + { + localVarHeaderParams["x-pollination-token"] = this.Configuration.GetApiKeyWithPrefix("x-pollination-token"); + } + // authentication (JWTAuth) required + // http beerer authentication required + if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) + { + localVarHeaderParams["Authorization"] = "Bearer " + this.Configuration.AccessToken; + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, + Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("GetDefaultPaymentMethod", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (CardPublic) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(CardPublic))); + } + + /// + /// Get Default Payment Method + /// + /// Thrown when fails to make API call + /// + /// Cancellation Token to cancel request (optional) + /// Task of CardPublic + public async System.Threading.Tasks.Task GetDefaultPaymentMethodAsync (string accountName, CancellationToken cancellationToken = default(CancellationToken)) + { + ApiResponse localVarResponse = await GetDefaultPaymentMethodWithHttpInfoAsync(accountName, cancellationToken); + return localVarResponse.Data; + + } + + /// + /// Get Default Payment Method + /// + /// Thrown when fails to make API call + /// + /// Cancellation Token to cancel request (optional) + /// Task of ApiResponse (CardPublic) + public async System.Threading.Tasks.Task> GetDefaultPaymentMethodWithHttpInfoAsync (string accountName, CancellationToken cancellationToken = default(CancellationToken)) + { + // verify the required parameter 'accountName' is set + if (accountName == null) + throw new ApiException(400, "Missing required parameter 'accountName' when calling PaymentsApi->GetDefaultPaymentMethod"); + + var localVarPath = "/payments/{account_name}/methods/default"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (accountName != null) localVarPathParams.Add("account_name", this.Configuration.ApiClient.ParameterToString(accountName)); // path parameter + + // authentication (APIKeyAuth) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-pollination-token"))) + { + localVarHeaderParams["x-pollination-token"] = this.Configuration.GetApiKeyWithPrefix("x-pollination-token"); + } + // authentication (JWTAuth) required + // http bearer authentication required + if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) + { + localVarHeaderParams["Authorization"] = "Bearer " + this.Configuration.AccessToken; + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, + Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType, cancellationToken); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("GetDefaultPaymentMethod", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (CardPublic) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(CardPublic))); + } + + /// + /// Get Failed Payment + /// + /// Thrown when fails to make API call + /// + /// PaymentIntent + public PaymentIntent GetFailedPayment (string accountName) + { + ApiResponse localVarResponse = GetFailedPaymentWithHttpInfo(accountName); + return localVarResponse.Data; + } + + /// + /// Get Failed Payment + /// + /// Thrown when fails to make API call + /// + /// ApiResponse of PaymentIntent + public ApiResponse GetFailedPaymentWithHttpInfo (string accountName) + { + // verify the required parameter 'accountName' is set + if (accountName == null) + throw new ApiException(400, "Missing required parameter 'accountName' when calling PaymentsApi->GetFailedPayment"); + + var localVarPath = "/payments/{account_name}/failed"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (accountName != null) localVarPathParams.Add("account_name", this.Configuration.ApiClient.ParameterToString(accountName)); // path parameter + + // authentication (APIKeyAuth) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-pollination-token"))) + { + localVarHeaderParams["x-pollination-token"] = this.Configuration.GetApiKeyWithPrefix("x-pollination-token"); + } + // authentication (JWTAuth) required + // http beerer authentication required + if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) + { + localVarHeaderParams["Authorization"] = "Bearer " + this.Configuration.AccessToken; + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, + Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("GetFailedPayment", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (PaymentIntent) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(PaymentIntent))); + } + + /// + /// Get Failed Payment + /// + /// Thrown when fails to make API call + /// + /// Cancellation Token to cancel request (optional) + /// Task of PaymentIntent + public async System.Threading.Tasks.Task GetFailedPaymentAsync (string accountName, CancellationToken cancellationToken = default(CancellationToken)) + { + ApiResponse localVarResponse = await GetFailedPaymentWithHttpInfoAsync(accountName, cancellationToken); + return localVarResponse.Data; + + } + + /// + /// Get Failed Payment + /// + /// Thrown when fails to make API call + /// + /// Cancellation Token to cancel request (optional) + /// Task of ApiResponse (PaymentIntent) + public async System.Threading.Tasks.Task> GetFailedPaymentWithHttpInfoAsync (string accountName, CancellationToken cancellationToken = default(CancellationToken)) + { + // verify the required parameter 'accountName' is set + if (accountName == null) + throw new ApiException(400, "Missing required parameter 'accountName' when calling PaymentsApi->GetFailedPayment"); + + var localVarPath = "/payments/{account_name}/failed"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (accountName != null) localVarPathParams.Add("account_name", this.Configuration.ApiClient.ParameterToString(accountName)); // path parameter + + // authentication (APIKeyAuth) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-pollination-token"))) + { + localVarHeaderParams["x-pollination-token"] = this.Configuration.GetApiKeyWithPrefix("x-pollination-token"); + } + // authentication (JWTAuth) required + // http bearer authentication required + if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) + { + localVarHeaderParams["Authorization"] = "Bearer " + this.Configuration.AccessToken; + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, + Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType, cancellationToken); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("GetFailedPayment", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (PaymentIntent) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(PaymentIntent))); + } + + /// + /// Get Inventory + /// + /// Thrown when fails to make API call + /// + /// Inventory + public Inventory GetInventory (string accountName) + { + ApiResponse localVarResponse = GetInventoryWithHttpInfo(accountName); + return localVarResponse.Data; + } + + /// + /// Get Inventory + /// + /// Thrown when fails to make API call + /// + /// ApiResponse of Inventory + public ApiResponse GetInventoryWithHttpInfo (string accountName) + { + // verify the required parameter 'accountName' is set + if (accountName == null) + throw new ApiException(400, "Missing required parameter 'accountName' when calling PaymentsApi->GetInventory"); + + var localVarPath = "/payments/{account_name}/inventory"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (accountName != null) localVarPathParams.Add("account_name", this.Configuration.ApiClient.ParameterToString(accountName)); // path parameter + + // authentication (APIKeyAuth) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-pollination-token"))) + { + localVarHeaderParams["x-pollination-token"] = this.Configuration.GetApiKeyWithPrefix("x-pollination-token"); + } + // authentication (JWTAuth) required + // http beerer authentication required + if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) + { + localVarHeaderParams["Authorization"] = "Bearer " + this.Configuration.AccessToken; + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, + Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("GetInventory", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (Inventory) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Inventory))); + } + + /// + /// Get Inventory + /// + /// Thrown when fails to make API call + /// + /// Cancellation Token to cancel request (optional) + /// Task of Inventory + public async System.Threading.Tasks.Task GetInventoryAsync (string accountName, CancellationToken cancellationToken = default(CancellationToken)) + { + ApiResponse localVarResponse = await GetInventoryWithHttpInfoAsync(accountName, cancellationToken); + return localVarResponse.Data; + + } + + /// + /// Get Inventory + /// + /// Thrown when fails to make API call + /// + /// Cancellation Token to cancel request (optional) + /// Task of ApiResponse (Inventory) + public async System.Threading.Tasks.Task> GetInventoryWithHttpInfoAsync (string accountName, CancellationToken cancellationToken = default(CancellationToken)) + { + // verify the required parameter 'accountName' is set + if (accountName == null) + throw new ApiException(400, "Missing required parameter 'accountName' when calling PaymentsApi->GetInventory"); + + var localVarPath = "/payments/{account_name}/inventory"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (accountName != null) localVarPathParams.Add("account_name", this.Configuration.ApiClient.ParameterToString(accountName)); // path parameter + + // authentication (APIKeyAuth) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-pollination-token"))) + { + localVarHeaderParams["x-pollination-token"] = this.Configuration.GetApiKeyWithPrefix("x-pollination-token"); + } + // authentication (JWTAuth) required + // http bearer authentication required + if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) + { + localVarHeaderParams["Authorization"] = "Bearer " + this.Configuration.AccessToken; + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, + Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType, cancellationToken); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("GetInventory", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (Inventory) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Inventory))); + } + + /// + /// Get Invoice List + /// + /// Thrown when fails to make API call + /// + /// (optional) + /// (optional) + /// (optional) + /// Number of items per page (optional, default to 25) + /// InvoiceList + public InvoiceList GetInvoiceList (string accountName, string startingAfter = default, string endingBefore = default, int? limit = default, int? perPage = default) + { + ApiResponse localVarResponse = GetInvoiceListWithHttpInfo(accountName, startingAfter, endingBefore, limit, perPage); + return localVarResponse.Data; + } + + /// + /// Get Invoice List + /// + /// Thrown when fails to make API call + /// + /// (optional) + /// (optional) + /// (optional) + /// Number of items per page (optional, default to 25) + /// ApiResponse of InvoiceList + public ApiResponse GetInvoiceListWithHttpInfo (string accountName, string startingAfter = default, string endingBefore = default, int? limit = default, int? perPage = default) + { + // verify the required parameter 'accountName' is set + if (accountName == null) + throw new ApiException(400, "Missing required parameter 'accountName' when calling PaymentsApi->GetInvoiceList"); + + var localVarPath = "/payments/{account_name}/invoices"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (accountName != null) localVarPathParams.Add("account_name", this.Configuration.ApiClient.ParameterToString(accountName)); // path parameter + if (startingAfter != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "starting_after", startingAfter)); // query parameter + if (endingBefore != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "ending_before", endingBefore)); // query parameter + if (limit != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "limit", limit)); // query parameter + if (perPage != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "per-page", perPage)); // query parameter + + // authentication (APIKeyAuth) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-pollination-token"))) + { + localVarHeaderParams["x-pollination-token"] = this.Configuration.GetApiKeyWithPrefix("x-pollination-token"); + } + // authentication (JWTAuth) required + // http beerer authentication required + if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) + { + localVarHeaderParams["Authorization"] = "Bearer " + this.Configuration.AccessToken; + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, + Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("GetInvoiceList", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (InvoiceList) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(InvoiceList))); + } + + /// + /// Get Invoice List + /// + /// Thrown when fails to make API call + /// + /// (optional) + /// (optional) + /// (optional) + /// Number of items per page (optional, default to 25) + /// Cancellation Token to cancel request (optional) + /// Task of InvoiceList + public async System.Threading.Tasks.Task GetInvoiceListAsync (string accountName, string startingAfter = default, string endingBefore = default, int? limit = default, int? perPage = default, CancellationToken cancellationToken = default(CancellationToken)) + { + ApiResponse localVarResponse = await GetInvoiceListWithHttpInfoAsync(accountName, startingAfter, endingBefore, limit, perPage, cancellationToken); + return localVarResponse.Data; + + } + + /// + /// Get Invoice List + /// + /// Thrown when fails to make API call + /// + /// (optional) + /// (optional) + /// (optional) + /// Number of items per page (optional, default to 25) + /// Cancellation Token to cancel request (optional) + /// Task of ApiResponse (InvoiceList) + public async System.Threading.Tasks.Task> GetInvoiceListWithHttpInfoAsync (string accountName, string startingAfter = default, string endingBefore = default, int? limit = default, int? perPage = default, CancellationToken cancellationToken = default(CancellationToken)) + { + // verify the required parameter 'accountName' is set + if (accountName == null) + throw new ApiException(400, "Missing required parameter 'accountName' when calling PaymentsApi->GetInvoiceList"); + + var localVarPath = "/payments/{account_name}/invoices"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (accountName != null) localVarPathParams.Add("account_name", this.Configuration.ApiClient.ParameterToString(accountName)); // path parameter + if (startingAfter != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "starting_after", startingAfter)); // query parameter + if (endingBefore != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "ending_before", endingBefore)); // query parameter + if (limit != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "limit", limit)); // query parameter + if (perPage != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "per-page", perPage)); // query parameter + + // authentication (APIKeyAuth) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-pollination-token"))) + { + localVarHeaderParams["x-pollination-token"] = this.Configuration.GetApiKeyWithPrefix("x-pollination-token"); + } + // authentication (JWTAuth) required + // http bearer authentication required + if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) + { + localVarHeaderParams["Authorization"] = "Bearer " + this.Configuration.AccessToken; + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, + Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType, cancellationToken); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("GetInvoiceList", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (InvoiceList) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(InvoiceList))); + } + + /// + /// Get Next Invoice + /// + /// Thrown when fails to make API call + /// + /// InvoicePreview + public InvoicePreview GetNextInvoice (string accountName) + { + ApiResponse localVarResponse = GetNextInvoiceWithHttpInfo(accountName); + return localVarResponse.Data; + } + + /// + /// Get Next Invoice + /// + /// Thrown when fails to make API call + /// + /// ApiResponse of InvoicePreview + public ApiResponse GetNextInvoiceWithHttpInfo (string accountName) + { + // verify the required parameter 'accountName' is set + if (accountName == null) + throw new ApiException(400, "Missing required parameter 'accountName' when calling PaymentsApi->GetNextInvoice"); + + var localVarPath = "/payments/{account_name}/invoices/next"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (accountName != null) localVarPathParams.Add("account_name", this.Configuration.ApiClient.ParameterToString(accountName)); // path parameter + + // authentication (APIKeyAuth) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-pollination-token"))) + { + localVarHeaderParams["x-pollination-token"] = this.Configuration.GetApiKeyWithPrefix("x-pollination-token"); + } + // authentication (JWTAuth) required + // http beerer authentication required + if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) + { + localVarHeaderParams["Authorization"] = "Bearer " + this.Configuration.AccessToken; + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, + Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("GetNextInvoice", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (InvoicePreview) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(InvoicePreview))); + } + + /// + /// Get Next Invoice + /// + /// Thrown when fails to make API call + /// + /// Cancellation Token to cancel request (optional) + /// Task of InvoicePreview + public async System.Threading.Tasks.Task GetNextInvoiceAsync (string accountName, CancellationToken cancellationToken = default(CancellationToken)) + { + ApiResponse localVarResponse = await GetNextInvoiceWithHttpInfoAsync(accountName, cancellationToken); + return localVarResponse.Data; + + } + + /// + /// Get Next Invoice + /// + /// Thrown when fails to make API call + /// + /// Cancellation Token to cancel request (optional) + /// Task of ApiResponse (InvoicePreview) + public async System.Threading.Tasks.Task> GetNextInvoiceWithHttpInfoAsync (string accountName, CancellationToken cancellationToken = default(CancellationToken)) + { + // verify the required parameter 'accountName' is set + if (accountName == null) + throw new ApiException(400, "Missing required parameter 'accountName' when calling PaymentsApi->GetNextInvoice"); + + var localVarPath = "/payments/{account_name}/invoices/next"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (accountName != null) localVarPathParams.Add("account_name", this.Configuration.ApiClient.ParameterToString(accountName)); // path parameter + + // authentication (APIKeyAuth) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-pollination-token"))) + { + localVarHeaderParams["x-pollination-token"] = this.Configuration.GetApiKeyWithPrefix("x-pollination-token"); + } + // authentication (JWTAuth) required + // http bearer authentication required + if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) + { + localVarHeaderParams["Authorization"] = "Bearer " + this.Configuration.AccessToken; + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, + Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType, cancellationToken); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("GetNextInvoice", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (InvoicePreview) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(InvoicePreview))); + } + + /// + /// Get Status + /// + /// Thrown when fails to make API call + /// + /// Status + public Status GetStatus (string accountName) + { + ApiResponse localVarResponse = GetStatusWithHttpInfo(accountName); + return localVarResponse.Data; + } + + /// + /// Get Status + /// + /// Thrown when fails to make API call + /// + /// ApiResponse of Status + public ApiResponse GetStatusWithHttpInfo (string accountName) + { + // verify the required parameter 'accountName' is set + if (accountName == null) + throw new ApiException(400, "Missing required parameter 'accountName' when calling PaymentsApi->GetStatus"); + + var localVarPath = "/payments/{account_name}/status"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (accountName != null) localVarPathParams.Add("account_name", this.Configuration.ApiClient.ParameterToString(accountName)); // path parameter + + // authentication (APIKeyAuth) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-pollination-token"))) + { + localVarHeaderParams["x-pollination-token"] = this.Configuration.GetApiKeyWithPrefix("x-pollination-token"); + } + // authentication (JWTAuth) required + // http beerer authentication required + if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) + { + localVarHeaderParams["Authorization"] = "Bearer " + this.Configuration.AccessToken; + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, + Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("GetStatus", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (Status) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Status))); + } + + /// + /// Get Status + /// + /// Thrown when fails to make API call + /// + /// Cancellation Token to cancel request (optional) + /// Task of Status + public async System.Threading.Tasks.Task GetStatusAsync (string accountName, CancellationToken cancellationToken = default(CancellationToken)) + { + ApiResponse localVarResponse = await GetStatusWithHttpInfoAsync(accountName, cancellationToken); + return localVarResponse.Data; + + } + + /// + /// Get Status + /// + /// Thrown when fails to make API call + /// + /// Cancellation Token to cancel request (optional) + /// Task of ApiResponse (Status) + public async System.Threading.Tasks.Task> GetStatusWithHttpInfoAsync (string accountName, CancellationToken cancellationToken = default(CancellationToken)) + { + // verify the required parameter 'accountName' is set + if (accountName == null) + throw new ApiException(400, "Missing required parameter 'accountName' when calling PaymentsApi->GetStatus"); + + var localVarPath = "/payments/{account_name}/status"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (accountName != null) localVarPathParams.Add("account_name", this.Configuration.ApiClient.ParameterToString(accountName)); // path parameter + + // authentication (APIKeyAuth) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-pollination-token"))) + { + localVarHeaderParams["x-pollination-token"] = this.Configuration.GetApiKeyWithPrefix("x-pollination-token"); + } + // authentication (JWTAuth) required + // http bearer authentication required + if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) + { + localVarHeaderParams["Authorization"] = "Bearer " + this.Configuration.AccessToken; + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, + Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType, cancellationToken); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("GetStatus", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (Status) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Status))); + } + + /// + /// Get Subscription + /// + /// Thrown when fails to make API call + /// + /// Subscription + public Subscription GetSubscription (string accountName) + { + ApiResponse localVarResponse = GetSubscriptionWithHttpInfo(accountName); + return localVarResponse.Data; + } + + /// + /// Get Subscription + /// + /// Thrown when fails to make API call + /// + /// ApiResponse of Subscription + public ApiResponse GetSubscriptionWithHttpInfo (string accountName) + { + // verify the required parameter 'accountName' is set + if (accountName == null) + throw new ApiException(400, "Missing required parameter 'accountName' when calling PaymentsApi->GetSubscription"); + + var localVarPath = "/payments/{account_name}/subscription"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (accountName != null) localVarPathParams.Add("account_name", this.Configuration.ApiClient.ParameterToString(accountName)); // path parameter + + // authentication (APIKeyAuth) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-pollination-token"))) + { + localVarHeaderParams["x-pollination-token"] = this.Configuration.GetApiKeyWithPrefix("x-pollination-token"); + } + // authentication (JWTAuth) required + // http beerer authentication required + if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) + { + localVarHeaderParams["Authorization"] = "Bearer " + this.Configuration.AccessToken; + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, + Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("GetSubscription", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (Subscription) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Subscription))); + } + + /// + /// Get Subscription + /// + /// Thrown when fails to make API call + /// + /// Cancellation Token to cancel request (optional) + /// Task of Subscription + public async System.Threading.Tasks.Task GetSubscriptionAsync (string accountName, CancellationToken cancellationToken = default(CancellationToken)) + { + ApiResponse localVarResponse = await GetSubscriptionWithHttpInfoAsync(accountName, cancellationToken); + return localVarResponse.Data; + + } + + /// + /// Get Subscription + /// + /// Thrown when fails to make API call + /// + /// Cancellation Token to cancel request (optional) + /// Task of ApiResponse (Subscription) + public async System.Threading.Tasks.Task> GetSubscriptionWithHttpInfoAsync (string accountName, CancellationToken cancellationToken = default(CancellationToken)) + { + // verify the required parameter 'accountName' is set + if (accountName == null) + throw new ApiException(400, "Missing required parameter 'accountName' when calling PaymentsApi->GetSubscription"); + + var localVarPath = "/payments/{account_name}/subscription"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (accountName != null) localVarPathParams.Add("account_name", this.Configuration.ApiClient.ParameterToString(accountName)); // path parameter + + // authentication (APIKeyAuth) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-pollination-token"))) + { + localVarHeaderParams["x-pollination-token"] = this.Configuration.GetApiKeyWithPrefix("x-pollination-token"); + } + // authentication (JWTAuth) required + // http bearer authentication required + if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) + { + localVarHeaderParams["Authorization"] = "Bearer " + this.Configuration.AccessToken; + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, + Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType, cancellationToken); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("GetSubscription", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (Subscription) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Subscription))); + } + + /// + /// Get Unfiltered Inventory + /// + /// Thrown when fails to make API call + /// Inventory + public Inventory GetUnfilteredInventory () + { + ApiResponse localVarResponse = GetUnfilteredInventoryWithHttpInfo(); + return localVarResponse.Data; + } + + /// + /// Get Unfiltered Inventory + /// + /// Thrown when fails to make API call + /// ApiResponse of Inventory + public ApiResponse GetUnfilteredInventoryWithHttpInfo () + { + + var localVarPath = "/payments/inventory"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, + Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("GetUnfilteredInventory", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (Inventory) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Inventory))); + } + + /// + /// Get Unfiltered Inventory + /// + /// Thrown when fails to make API call + /// Cancellation Token to cancel request (optional) + /// Task of Inventory + public async System.Threading.Tasks.Task GetUnfilteredInventoryAsync (CancellationToken cancellationToken = default(CancellationToken)) + { + ApiResponse localVarResponse = await GetUnfilteredInventoryWithHttpInfoAsync(cancellationToken); + return localVarResponse.Data; + + } + + /// + /// Get Unfiltered Inventory + /// + /// Thrown when fails to make API call + /// Cancellation Token to cancel request (optional) + /// Task of ApiResponse (Inventory) + public async System.Threading.Tasks.Task> GetUnfilteredInventoryWithHttpInfoAsync (CancellationToken cancellationToken = default(CancellationToken)) + { + + var localVarPath = "/payments/inventory"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, + Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType, cancellationToken); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("GetUnfilteredInventory", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (Inventory) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Inventory))); + } + + /// + /// Get Upcoming Subscription + /// + /// Thrown when fails to make API call + /// + /// Subscription + public Subscription GetUpcomingSubscription (string accountName) + { + ApiResponse localVarResponse = GetUpcomingSubscriptionWithHttpInfo(accountName); + return localVarResponse.Data; + } + + /// + /// Get Upcoming Subscription + /// + /// Thrown when fails to make API call + /// + /// ApiResponse of Subscription + public ApiResponse GetUpcomingSubscriptionWithHttpInfo (string accountName) + { + // verify the required parameter 'accountName' is set + if (accountName == null) + throw new ApiException(400, "Missing required parameter 'accountName' when calling PaymentsApi->GetUpcomingSubscription"); + + var localVarPath = "/payments/{account_name}/subscription/upcoming"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (accountName != null) localVarPathParams.Add("account_name", this.Configuration.ApiClient.ParameterToString(accountName)); // path parameter + + // authentication (APIKeyAuth) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-pollination-token"))) + { + localVarHeaderParams["x-pollination-token"] = this.Configuration.GetApiKeyWithPrefix("x-pollination-token"); + } + // authentication (JWTAuth) required + // http beerer authentication required + if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) + { + localVarHeaderParams["Authorization"] = "Bearer " + this.Configuration.AccessToken; + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, + Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("GetUpcomingSubscription", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (Subscription) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Subscription))); + } + + /// + /// Get Upcoming Subscription + /// + /// Thrown when fails to make API call + /// + /// Cancellation Token to cancel request (optional) + /// Task of Subscription + public async System.Threading.Tasks.Task GetUpcomingSubscriptionAsync (string accountName, CancellationToken cancellationToken = default(CancellationToken)) + { + ApiResponse localVarResponse = await GetUpcomingSubscriptionWithHttpInfoAsync(accountName, cancellationToken); + return localVarResponse.Data; + + } + + /// + /// Get Upcoming Subscription + /// + /// Thrown when fails to make API call + /// + /// Cancellation Token to cancel request (optional) + /// Task of ApiResponse (Subscription) + public async System.Threading.Tasks.Task> GetUpcomingSubscriptionWithHttpInfoAsync (string accountName, CancellationToken cancellationToken = default(CancellationToken)) + { + // verify the required parameter 'accountName' is set + if (accountName == null) + throw new ApiException(400, "Missing required parameter 'accountName' when calling PaymentsApi->GetUpcomingSubscription"); + + var localVarPath = "/payments/{account_name}/subscription/upcoming"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (accountName != null) localVarPathParams.Add("account_name", this.Configuration.ApiClient.ParameterToString(accountName)); // path parameter + + // authentication (APIKeyAuth) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-pollination-token"))) + { + localVarHeaderParams["x-pollination-token"] = this.Configuration.GetApiKeyWithPrefix("x-pollination-token"); + } + // authentication (JWTAuth) required + // http bearer authentication required + if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) + { + localVarHeaderParams["Authorization"] = "Bearer " + this.Configuration.AccessToken; + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, + Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType, cancellationToken); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("GetUpcomingSubscription", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (Subscription) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Subscription))); + } + + /// + /// Get Payment Methods + /// + /// Thrown when fails to make API call + /// + /// PaymentMethodList + public PaymentMethodList ListPaymentMethods (string accountName) + { + ApiResponse localVarResponse = ListPaymentMethodsWithHttpInfo(accountName); + return localVarResponse.Data; + } + + /// + /// Get Payment Methods + /// + /// Thrown when fails to make API call + /// + /// ApiResponse of PaymentMethodList + public ApiResponse ListPaymentMethodsWithHttpInfo (string accountName) + { + // verify the required parameter 'accountName' is set + if (accountName == null) + throw new ApiException(400, "Missing required parameter 'accountName' when calling PaymentsApi->ListPaymentMethods"); + + var localVarPath = "/payments/{account_name}/methods"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (accountName != null) localVarPathParams.Add("account_name", this.Configuration.ApiClient.ParameterToString(accountName)); // path parameter + + // authentication (APIKeyAuth) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-pollination-token"))) + { + localVarHeaderParams["x-pollination-token"] = this.Configuration.GetApiKeyWithPrefix("x-pollination-token"); + } + // authentication (JWTAuth) required + // http beerer authentication required + if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) + { + localVarHeaderParams["Authorization"] = "Bearer " + this.Configuration.AccessToken; + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, + Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("ListPaymentMethods", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (PaymentMethodList) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(PaymentMethodList))); + } + + /// + /// Get Payment Methods + /// + /// Thrown when fails to make API call + /// + /// Cancellation Token to cancel request (optional) + /// Task of PaymentMethodList + public async System.Threading.Tasks.Task ListPaymentMethodsAsync (string accountName, CancellationToken cancellationToken = default(CancellationToken)) + { + ApiResponse localVarResponse = await ListPaymentMethodsWithHttpInfoAsync(accountName, cancellationToken); + return localVarResponse.Data; + + } + + /// + /// Get Payment Methods + /// + /// Thrown when fails to make API call + /// + /// Cancellation Token to cancel request (optional) + /// Task of ApiResponse (PaymentMethodList) + public async System.Threading.Tasks.Task> ListPaymentMethodsWithHttpInfoAsync (string accountName, CancellationToken cancellationToken = default(CancellationToken)) + { + // verify the required parameter 'accountName' is set + if (accountName == null) + throw new ApiException(400, "Missing required parameter 'accountName' when calling PaymentsApi->ListPaymentMethods"); + + var localVarPath = "/payments/{account_name}/methods"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (accountName != null) localVarPathParams.Add("account_name", this.Configuration.ApiClient.ParameterToString(accountName)); // path parameter + + // authentication (APIKeyAuth) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-pollination-token"))) + { + localVarHeaderParams["x-pollination-token"] = this.Configuration.GetApiKeyWithPrefix("x-pollination-token"); + } + // authentication (JWTAuth) required + // http bearer authentication required + if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) + { + localVarHeaderParams["Authorization"] = "Bearer " + this.Configuration.AccessToken; + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, + Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType, cancellationToken); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("ListPaymentMethods", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (PaymentMethodList) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(PaymentMethodList))); + } + + /// + /// Preview Update Subscription + /// + /// Thrown when fails to make API call + /// + /// + /// UpdateInvoicePreview + public UpdateInvoicePreview PreviewUpdateSubscription (string accountName, SubscriptionUpdate subscriptionUpdate) + { + ApiResponse localVarResponse = PreviewUpdateSubscriptionWithHttpInfo(accountName, subscriptionUpdate); + return localVarResponse.Data; + } + + /// + /// Preview Update Subscription + /// + /// Thrown when fails to make API call + /// + /// + /// ApiResponse of UpdateInvoicePreview + public ApiResponse PreviewUpdateSubscriptionWithHttpInfo (string accountName, SubscriptionUpdate subscriptionUpdate) + { + // verify the required parameter 'accountName' is set + if (accountName == null) + throw new ApiException(400, "Missing required parameter 'accountName' when calling PaymentsApi->PreviewUpdateSubscription"); + // verify the required parameter 'subscriptionUpdate' is set + if (subscriptionUpdate == null) + throw new ApiException(400, "Missing required parameter 'subscriptionUpdate' when calling PaymentsApi->PreviewUpdateSubscription"); + + var localVarPath = "/payments/{account_name}/subscription/preview"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (accountName != null) localVarPathParams.Add("account_name", this.Configuration.ApiClient.ParameterToString(accountName)); // path parameter + if (subscriptionUpdate != null && subscriptionUpdate.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(subscriptionUpdate); // http body (model) parameter + } + else + { + localVarPostBody = subscriptionUpdate; // byte array + } + + // authentication (APIKeyAuth) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-pollination-token"))) + { + localVarHeaderParams["x-pollination-token"] = this.Configuration.GetApiKeyWithPrefix("x-pollination-token"); + } + // authentication (JWTAuth) required + // http beerer authentication required + if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) + { + localVarHeaderParams["Authorization"] = "Bearer " + this.Configuration.AccessToken; + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, + Method.PUT, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("PreviewUpdateSubscription", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (UpdateInvoicePreview) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(UpdateInvoicePreview))); + } + + /// + /// Preview Update Subscription + /// + /// Thrown when fails to make API call + /// + /// + /// Cancellation Token to cancel request (optional) + /// Task of UpdateInvoicePreview + public async System.Threading.Tasks.Task PreviewUpdateSubscriptionAsync (string accountName, SubscriptionUpdate subscriptionUpdate, CancellationToken cancellationToken = default(CancellationToken)) + { + ApiResponse localVarResponse = await PreviewUpdateSubscriptionWithHttpInfoAsync(accountName, subscriptionUpdate, cancellationToken); + return localVarResponse.Data; + + } + + /// + /// Preview Update Subscription + /// + /// Thrown when fails to make API call + /// + /// + /// Cancellation Token to cancel request (optional) + /// Task of ApiResponse (UpdateInvoicePreview) + public async System.Threading.Tasks.Task> PreviewUpdateSubscriptionWithHttpInfoAsync (string accountName, SubscriptionUpdate subscriptionUpdate, CancellationToken cancellationToken = default(CancellationToken)) + { + // verify the required parameter 'accountName' is set + if (accountName == null) + throw new ApiException(400, "Missing required parameter 'accountName' when calling PaymentsApi->PreviewUpdateSubscription"); + // verify the required parameter 'subscriptionUpdate' is set + if (subscriptionUpdate == null) + throw new ApiException(400, "Missing required parameter 'subscriptionUpdate' when calling PaymentsApi->PreviewUpdateSubscription"); + + var localVarPath = "/payments/{account_name}/subscription/preview"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (accountName != null) localVarPathParams.Add("account_name", this.Configuration.ApiClient.ParameterToString(accountName)); // path parameter + if (subscriptionUpdate != null && subscriptionUpdate.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(subscriptionUpdate); // http body (model) parameter + } + else + { + localVarPostBody = subscriptionUpdate; // byte array + } + + // authentication (APIKeyAuth) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-pollination-token"))) + { + localVarHeaderParams["x-pollination-token"] = this.Configuration.GetApiKeyWithPrefix("x-pollination-token"); + } + // authentication (JWTAuth) required + // http bearer authentication required + if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) + { + localVarHeaderParams["Authorization"] = "Bearer " + this.Configuration.AccessToken; + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, + Method.PUT, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType, cancellationToken); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("PreviewUpdateSubscription", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (UpdateInvoicePreview) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(UpdateInvoicePreview))); + } + + /// + /// Subscribe + /// + /// Thrown when fails to make API call + /// + /// + /// CreatedContent + public CreatedContent Subscribe (string accountName, Subscribe subscribe) + { + ApiResponse localVarResponse = SubscribeWithHttpInfo(accountName, subscribe); + return localVarResponse.Data; + } + + /// + /// Subscribe + /// + /// Thrown when fails to make API call + /// + /// + /// ApiResponse of CreatedContent + public ApiResponse SubscribeWithHttpInfo (string accountName, Subscribe subscribe) + { + // verify the required parameter 'accountName' is set + if (accountName == null) + throw new ApiException(400, "Missing required parameter 'accountName' when calling PaymentsApi->Subscribe"); + // verify the required parameter 'subscribe' is set + if (subscribe == null) + throw new ApiException(400, "Missing required parameter 'subscribe' when calling PaymentsApi->Subscribe"); + + var localVarPath = "/payments/{account_name}/subscribe"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (accountName != null) localVarPathParams.Add("account_name", this.Configuration.ApiClient.ParameterToString(accountName)); // path parameter + if (subscribe != null && subscribe.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(subscribe); // http body (model) parameter + } + else + { + localVarPostBody = subscribe; // byte array + } + + // authentication (APIKeyAuth) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-pollination-token"))) + { + localVarHeaderParams["x-pollination-token"] = this.Configuration.GetApiKeyWithPrefix("x-pollination-token"); + } + // authentication (JWTAuth) required + // http beerer authentication required + if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) + { + localVarHeaderParams["Authorization"] = "Bearer " + this.Configuration.AccessToken; + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, + Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("Subscribe", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (CreatedContent) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(CreatedContent))); + } + + /// + /// Subscribe + /// + /// Thrown when fails to make API call + /// + /// + /// Cancellation Token to cancel request (optional) + /// Task of CreatedContent + public async System.Threading.Tasks.Task SubscribeAsync (string accountName, Subscribe subscribe, CancellationToken cancellationToken = default(CancellationToken)) + { + ApiResponse localVarResponse = await SubscribeWithHttpInfoAsync(accountName, subscribe, cancellationToken); + return localVarResponse.Data; + + } + + /// + /// Subscribe + /// + /// Thrown when fails to make API call + /// + /// + /// Cancellation Token to cancel request (optional) + /// Task of ApiResponse (CreatedContent) + public async System.Threading.Tasks.Task> SubscribeWithHttpInfoAsync (string accountName, Subscribe subscribe, CancellationToken cancellationToken = default(CancellationToken)) + { + // verify the required parameter 'accountName' is set + if (accountName == null) + throw new ApiException(400, "Missing required parameter 'accountName' when calling PaymentsApi->Subscribe"); + // verify the required parameter 'subscribe' is set + if (subscribe == null) + throw new ApiException(400, "Missing required parameter 'subscribe' when calling PaymentsApi->Subscribe"); + + var localVarPath = "/payments/{account_name}/subscribe"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (accountName != null) localVarPathParams.Add("account_name", this.Configuration.ApiClient.ParameterToString(accountName)); // path parameter + if (subscribe != null && subscribe.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(subscribe); // http body (model) parameter + } + else + { + localVarPostBody = subscribe; // byte array + } + + // authentication (APIKeyAuth) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-pollination-token"))) + { + localVarHeaderParams["x-pollination-token"] = this.Configuration.GetApiKeyWithPrefix("x-pollination-token"); + } + // authentication (JWTAuth) required + // http bearer authentication required + if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) + { + localVarHeaderParams["Authorization"] = "Bearer " + this.Configuration.AccessToken; + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, + Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType, cancellationToken); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("Subscribe", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (CreatedContent) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(CreatedContent))); + } + + /// + /// Update Subscription + /// + /// Thrown when fails to make API call + /// + /// + /// Subscription + public Subscription UpdateSubscription (string accountName, SubscriptionUpdate subscriptionUpdate) + { + ApiResponse localVarResponse = UpdateSubscriptionWithHttpInfo(accountName, subscriptionUpdate); + return localVarResponse.Data; + } + + /// + /// Update Subscription + /// + /// Thrown when fails to make API call + /// + /// + /// ApiResponse of Subscription + public ApiResponse UpdateSubscriptionWithHttpInfo (string accountName, SubscriptionUpdate subscriptionUpdate) + { + // verify the required parameter 'accountName' is set + if (accountName == null) + throw new ApiException(400, "Missing required parameter 'accountName' when calling PaymentsApi->UpdateSubscription"); + // verify the required parameter 'subscriptionUpdate' is set + if (subscriptionUpdate == null) + throw new ApiException(400, "Missing required parameter 'subscriptionUpdate' when calling PaymentsApi->UpdateSubscription"); + + var localVarPath = "/payments/{account_name}/subscription"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (accountName != null) localVarPathParams.Add("account_name", this.Configuration.ApiClient.ParameterToString(accountName)); // path parameter + if (subscriptionUpdate != null && subscriptionUpdate.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(subscriptionUpdate); // http body (model) parameter + } + else + { + localVarPostBody = subscriptionUpdate; // byte array + } + + // authentication (APIKeyAuth) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-pollination-token"))) + { + localVarHeaderParams["x-pollination-token"] = this.Configuration.GetApiKeyWithPrefix("x-pollination-token"); + } + // authentication (JWTAuth) required + // http beerer authentication required + if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) + { + localVarHeaderParams["Authorization"] = "Bearer " + this.Configuration.AccessToken; + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, + Method.PUT, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("UpdateSubscription", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (Subscription) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Subscription))); + } + + /// + /// Update Subscription + /// + /// Thrown when fails to make API call + /// + /// + /// Cancellation Token to cancel request (optional) + /// Task of Subscription + public async System.Threading.Tasks.Task UpdateSubscriptionAsync (string accountName, SubscriptionUpdate subscriptionUpdate, CancellationToken cancellationToken = default(CancellationToken)) + { + ApiResponse localVarResponse = await UpdateSubscriptionWithHttpInfoAsync(accountName, subscriptionUpdate, cancellationToken); + return localVarResponse.Data; + + } + + /// + /// Update Subscription + /// + /// Thrown when fails to make API call + /// + /// + /// Cancellation Token to cancel request (optional) + /// Task of ApiResponse (Subscription) + public async System.Threading.Tasks.Task> UpdateSubscriptionWithHttpInfoAsync (string accountName, SubscriptionUpdate subscriptionUpdate, CancellationToken cancellationToken = default(CancellationToken)) + { + // verify the required parameter 'accountName' is set + if (accountName == null) + throw new ApiException(400, "Missing required parameter 'accountName' when calling PaymentsApi->UpdateSubscription"); + // verify the required parameter 'subscriptionUpdate' is set + if (subscriptionUpdate == null) + throw new ApiException(400, "Missing required parameter 'subscriptionUpdate' when calling PaymentsApi->UpdateSubscription"); + + var localVarPath = "/payments/{account_name}/subscription"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (accountName != null) localVarPathParams.Add("account_name", this.Configuration.ApiClient.ParameterToString(accountName)); // path parameter + if (subscriptionUpdate != null && subscriptionUpdate.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(subscriptionUpdate); // http body (model) parameter + } + else + { + localVarPostBody = subscriptionUpdate; // byte array + } + + // authentication (APIKeyAuth) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-pollination-token"))) + { + localVarHeaderParams["x-pollination-token"] = this.Configuration.GetApiKeyWithPrefix("x-pollination-token"); + } + // authentication (JWTAuth) required + // http bearer authentication required + if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) + { + localVarHeaderParams["Authorization"] = "Bearer " + this.Configuration.AccessToken; + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, + Method.PUT, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType, cancellationToken); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("UpdateSubscription", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (Subscription) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Subscription))); + } + + } +} diff --git a/src/PollinationSDK/Api/PluginsApi.cs b/src/PollinationSDK/Api/PluginsApi.cs index 070ce4a23..b20d1d89e 100644 --- a/src/PollinationSDK/Api/PluginsApi.cs +++ b/src/PollinationSDK/Api/PluginsApi.cs @@ -213,7 +213,7 @@ public interface IPluginsApi : IApiAccessor /// Page number starting from 1 (optional, default to 1) /// Number of items per page (optional, default to 25) /// PluginPackageList - PluginPackageList ListPluginTags (string owner, string name, PackageSortKey sortBy = default, SortEnum? sortOrder = default, int? page = default, int? perPage = default); + PluginPackageList ListPluginTags (string owner, string name, PackageSortKey? sortBy = default, SortEnum? sortOrder = default, int? page = default, int? perPage = default); /// /// Get a plugin tags @@ -229,7 +229,7 @@ public interface IPluginsApi : IApiAccessor /// Page number starting from 1 (optional, default to 1) /// Number of items per page (optional, default to 25) /// ApiResponse of PluginPackageList - ApiResponse ListPluginTagsWithHttpInfo (string owner, string name, PackageSortKey sortBy = default, SortEnum? sortOrder = default, int? page = default, int? perPage = default); + ApiResponse ListPluginTagsWithHttpInfo (string owner, string name, PackageSortKey? sortBy = default, SortEnum? sortOrder = default, int? page = default, int? perPage = default); /// /// List plugins /// @@ -248,7 +248,7 @@ public interface IPluginsApi : IApiAccessor /// Page number starting from 1 (optional, default to 1) /// Number of items per page (optional, default to 25) /// RepositoryList - RepositoryList ListPlugins (List search = default, List name = default, List owner = default, bool? _public = default, List keyword = default, List permission = default, RepositorySortKey sortBy = default, SortEnum? sortOrder = default, int? page = default, int? perPage = default); + RepositoryList ListPlugins (List search = default, List name = default, List owner = default, bool? _public = default, List keyword = default, List permission = default, RepositorySortKey? sortBy = default, SortEnum? sortOrder = default, int? page = default, int? perPage = default); /// /// List plugins @@ -268,7 +268,7 @@ public interface IPluginsApi : IApiAccessor /// Page number starting from 1 (optional, default to 1) /// Number of items per page (optional, default to 25) /// ApiResponse of RepositoryList - ApiResponse ListPluginsWithHttpInfo (List search = default, List name = default, List owner = default, bool? _public = default, List keyword = default, List permission = default, RepositorySortKey sortBy = default, SortEnum? sortOrder = default, int? page = default, int? perPage = default); + ApiResponse ListPluginsWithHttpInfo (List search = default, List name = default, List owner = default, bool? _public = default, List keyword = default, List permission = default, RepositorySortKey? sortBy = default, SortEnum? sortOrder = default, int? page = default, int? perPage = default); /// /// Update a Plugin /// @@ -525,7 +525,7 @@ public interface IPluginsApi : IApiAccessor /// Number of items per page (optional, default to 25) /// Cancellation Token to cancel request (optional) /// Task of PluginPackageList - System.Threading.Tasks.Task ListPluginTagsAsync (string owner, string name, PackageSortKey sortBy = default, SortEnum? sortOrder = default, int? page = default, int? perPage = default, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task ListPluginTagsAsync (string owner, string name, PackageSortKey? sortBy = default, SortEnum? sortOrder = default, int? page = default, int? perPage = default, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get a plugin tags @@ -542,7 +542,7 @@ public interface IPluginsApi : IApiAccessor /// Number of items per page (optional, default to 25) /// Cancellation Token to cancel request (optional) /// Task of ApiResponse (PluginPackageList) - System.Threading.Tasks.Task> ListPluginTagsWithHttpInfoAsync (string owner, string name, PackageSortKey sortBy = default, SortEnum? sortOrder = default, int? page = default, int? perPage = default, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> ListPluginTagsWithHttpInfoAsync (string owner, string name, PackageSortKey? sortBy = default, SortEnum? sortOrder = default, int? page = default, int? perPage = default, CancellationToken cancellationToken = default(CancellationToken)); /// /// List plugins /// @@ -562,7 +562,7 @@ public interface IPluginsApi : IApiAccessor /// Number of items per page (optional, default to 25) /// Cancellation Token to cancel request (optional) /// Task of RepositoryList - System.Threading.Tasks.Task ListPluginsAsync (List search = default, List name = default, List owner = default, bool? _public = default, List keyword = default, List permission = default, RepositorySortKey sortBy = default, SortEnum? sortOrder = default, int? page = default, int? perPage = default, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task ListPluginsAsync (List search = default, List name = default, List owner = default, bool? _public = default, List keyword = default, List permission = default, RepositorySortKey? sortBy = default, SortEnum? sortOrder = default, int? page = default, int? perPage = default, CancellationToken cancellationToken = default(CancellationToken)); /// /// List plugins @@ -583,7 +583,7 @@ public interface IPluginsApi : IApiAccessor /// Number of items per page (optional, default to 25) /// Cancellation Token to cancel request (optional) /// Task of ApiResponse (RepositoryList) - System.Threading.Tasks.Task> ListPluginsWithHttpInfoAsync (List search = default, List name = default, List owner = default, bool? _public = default, List keyword = default, List permission = default, RepositorySortKey sortBy = default, SortEnum? sortOrder = default, int? page = default, int? perPage = default, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> ListPluginsWithHttpInfoAsync (List search = default, List name = default, List owner = default, bool? _public = default, List keyword = default, List permission = default, RepositorySortKey? sortBy = default, SortEnum? sortOrder = default, int? page = default, int? perPage = default, CancellationToken cancellationToken = default(CancellationToken)); /// /// Update a Plugin /// @@ -2015,7 +2015,7 @@ public ApiResponse GetPluginByTagWithHttpInfo (string owner, stri /// Page number starting from 1 (optional, default to 1) /// Number of items per page (optional, default to 25) /// PluginPackageList - public PluginPackageList ListPluginTags (string owner, string name, PackageSortKey sortBy = default, SortEnum? sortOrder = default, int? page = default, int? perPage = default) + public PluginPackageList ListPluginTags (string owner, string name, PackageSortKey? sortBy = default, SortEnum? sortOrder = default, int? page = default, int? perPage = default) { ApiResponse localVarResponse = ListPluginTagsWithHttpInfo(owner, name, sortBy, sortOrder, page, perPage); return localVarResponse.Data; @@ -2032,7 +2032,7 @@ public PluginPackageList ListPluginTags (string owner, string name, PackageSortK /// Page number starting from 1 (optional, default to 1) /// Number of items per page (optional, default to 25) /// ApiResponse of PluginPackageList - public ApiResponse ListPluginTagsWithHttpInfo (string owner, string name, PackageSortKey sortBy = default, SortEnum? sortOrder = default, int? page = default, int? perPage = default) + public ApiResponse ListPluginTagsWithHttpInfo (string owner, string name, PackageSortKey? sortBy = default, SortEnum? sortOrder = default, int? page = default, int? perPage = default) { // verify the required parameter 'owner' is set if (owner == null) @@ -2111,7 +2111,7 @@ public ApiResponse ListPluginTagsWithHttpInfo (string owner, /// Number of items per page (optional, default to 25) /// Cancellation Token to cancel request (optional) /// Task of PluginPackageList - public async System.Threading.Tasks.Task ListPluginTagsAsync (string owner, string name, PackageSortKey sortBy = default, SortEnum? sortOrder = default, int? page = default, int? perPage = default, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task ListPluginTagsAsync (string owner, string name, PackageSortKey? sortBy = default, SortEnum? sortOrder = default, int? page = default, int? perPage = default, CancellationToken cancellationToken = default(CancellationToken)) { ApiResponse localVarResponse = await ListPluginTagsWithHttpInfoAsync(owner, name, sortBy, sortOrder, page, perPage, cancellationToken); return localVarResponse.Data; @@ -2130,7 +2130,7 @@ public ApiResponse ListPluginTagsWithHttpInfo (string owner, /// Number of items per page (optional, default to 25) /// Cancellation Token to cancel request (optional) /// Task of ApiResponse (PluginPackageList) - public async System.Threading.Tasks.Task> ListPluginTagsWithHttpInfoAsync (string owner, string name, PackageSortKey sortBy = default, SortEnum? sortOrder = default, int? page = default, int? perPage = default, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> ListPluginTagsWithHttpInfoAsync (string owner, string name, PackageSortKey? sortBy = default, SortEnum? sortOrder = default, int? page = default, int? perPage = default, CancellationToken cancellationToken = default(CancellationToken)) { // verify the required parameter 'owner' is set if (owner == null) @@ -2212,7 +2212,7 @@ public ApiResponse ListPluginTagsWithHttpInfo (string owner, /// Page number starting from 1 (optional, default to 1) /// Number of items per page (optional, default to 25) /// RepositoryList - public RepositoryList ListPlugins (List search = default, List name = default, List owner = default, bool? _public = default, List keyword = default, List permission = default, RepositorySortKey sortBy = default, SortEnum? sortOrder = default, int? page = default, int? perPage = default) + public RepositoryList ListPlugins (List search = default, List name = default, List owner = default, bool? _public = default, List keyword = default, List permission = default, RepositorySortKey? sortBy = default, SortEnum? sortOrder = default, int? page = default, int? perPage = default) { ApiResponse localVarResponse = ListPluginsWithHttpInfo(search, name, owner, _public, keyword, permission, sortBy, sortOrder, page, perPage); return localVarResponse.Data; @@ -2233,7 +2233,7 @@ public RepositoryList ListPlugins (List search = default, List n /// Page number starting from 1 (optional, default to 1) /// Number of items per page (optional, default to 25) /// ApiResponse of RepositoryList - public ApiResponse ListPluginsWithHttpInfo (List search = default, List name = default, List owner = default, bool? _public = default, List keyword = default, List permission = default, RepositorySortKey sortBy = default, SortEnum? sortOrder = default, int? page = default, int? perPage = default) + public ApiResponse ListPluginsWithHttpInfo (List search = default, List name = default, List owner = default, bool? _public = default, List keyword = default, List permission = default, RepositorySortKey? sortBy = default, SortEnum? sortOrder = default, int? page = default, int? perPage = default) { var localVarPath = "/plugins"; @@ -2314,7 +2314,7 @@ public ApiResponse ListPluginsWithHttpInfo (List search /// Number of items per page (optional, default to 25) /// Cancellation Token to cancel request (optional) /// Task of RepositoryList - public async System.Threading.Tasks.Task ListPluginsAsync (List search = default, List name = default, List owner = default, bool? _public = default, List keyword = default, List permission = default, RepositorySortKey sortBy = default, SortEnum? sortOrder = default, int? page = default, int? perPage = default, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task ListPluginsAsync (List search = default, List name = default, List owner = default, bool? _public = default, List keyword = default, List permission = default, RepositorySortKey? sortBy = default, SortEnum? sortOrder = default, int? page = default, int? perPage = default, CancellationToken cancellationToken = default(CancellationToken)) { ApiResponse localVarResponse = await ListPluginsWithHttpInfoAsync(search, name, owner, _public, keyword, permission, sortBy, sortOrder, page, perPage, cancellationToken); return localVarResponse.Data; @@ -2337,7 +2337,7 @@ public ApiResponse ListPluginsWithHttpInfo (List search /// Number of items per page (optional, default to 25) /// Cancellation Token to cancel request (optional) /// Task of ApiResponse (RepositoryList) - public async System.Threading.Tasks.Task> ListPluginsWithHttpInfoAsync (List search = default, List name = default, List owner = default, bool? _public = default, List keyword = default, List permission = default, RepositorySortKey sortBy = default, SortEnum? sortOrder = default, int? page = default, int? perPage = default, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> ListPluginsWithHttpInfoAsync (List search = default, List name = default, List owner = default, bool? _public = default, List keyword = default, List permission = default, RepositorySortKey? sortBy = default, SortEnum? sortOrder = default, int? page = default, int? perPage = default, CancellationToken cancellationToken = default(CancellationToken)) { var localVarPath = "/plugins"; diff --git a/src/PollinationSDK/Api/ProjectsApi.cs b/src/PollinationSDK/Api/ProjectsApi.cs index ebd1bbc4d..083d2e945 100644 --- a/src/PollinationSDK/Api/ProjectsApi.cs +++ b/src/PollinationSDK/Api/ProjectsApi.cs @@ -273,7 +273,7 @@ public interface IProjectsApi : IApiAccessor /// Page number starting from 1 (optional, default to 1) /// Number of items per page (optional, default to 25) /// ProjectList - ProjectList ListProjects (string search = default, List ids = default, List names = default, List owner = default, bool? _public = default, List permissions = default, ProjectSortKey sortBy = default, SortEnum? sortOrder = default, int? page = default, int? perPage = default); + ProjectList ListProjects (string search = default, List ids = default, List names = default, List owner = default, bool? _public = default, List permissions = default, ProjectSortKey? sortBy = default, SortEnum? sortOrder = default, int? page = default, int? perPage = default); /// /// List Projects @@ -293,7 +293,7 @@ public interface IProjectsApi : IApiAccessor /// Page number starting from 1 (optional, default to 1) /// Number of items per page (optional, default to 25) /// ApiResponse of ProjectList - ApiResponse ListProjectsWithHttpInfo (string search = default, List ids = default, List names = default, List owner = default, bool? _public = default, List permissions = default, ProjectSortKey sortBy = default, SortEnum? sortOrder = default, int? page = default, int? perPage = default); + ApiResponse ListProjectsWithHttpInfo (string search = default, List ids = default, List names = default, List owner = default, bool? _public = default, List permissions = default, ProjectSortKey? sortBy = default, SortEnum? sortOrder = default, int? page = default, int? perPage = default); /// /// Update a Project /// @@ -614,7 +614,7 @@ public interface IProjectsApi : IApiAccessor /// Number of items per page (optional, default to 25) /// Cancellation Token to cancel request (optional) /// Task of ProjectList - System.Threading.Tasks.Task ListProjectsAsync (string search = default, List ids = default, List names = default, List owner = default, bool? _public = default, List permissions = default, ProjectSortKey sortBy = default, SortEnum? sortOrder = default, int? page = default, int? perPage = default, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task ListProjectsAsync (string search = default, List ids = default, List names = default, List owner = default, bool? _public = default, List permissions = default, ProjectSortKey? sortBy = default, SortEnum? sortOrder = default, int? page = default, int? perPage = default, CancellationToken cancellationToken = default(CancellationToken)); /// /// List Projects @@ -635,7 +635,7 @@ public interface IProjectsApi : IApiAccessor /// Number of items per page (optional, default to 25) /// Cancellation Token to cancel request (optional) /// Task of ApiResponse (ProjectList) - System.Threading.Tasks.Task> ListProjectsWithHttpInfoAsync (string search = default, List ids = default, List names = default, List owner = default, bool? _public = default, List permissions = default, ProjectSortKey sortBy = default, SortEnum? sortOrder = default, int? page = default, int? perPage = default, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> ListProjectsWithHttpInfoAsync (string search = default, List ids = default, List names = default, List owner = default, bool? _public = default, List permissions = default, ProjectSortKey? sortBy = default, SortEnum? sortOrder = default, int? page = default, int? perPage = default, CancellationToken cancellationToken = default(CancellationToken)); /// /// Update a Project /// @@ -2453,7 +2453,7 @@ public ApiResponse GetProjectRecipesWithHttpInfo (string ow /// Page number starting from 1 (optional, default to 1) /// Number of items per page (optional, default to 25) /// ProjectList - public ProjectList ListProjects (string search = default, List ids = default, List names = default, List owner = default, bool? _public = default, List permissions = default, ProjectSortKey sortBy = default, SortEnum? sortOrder = default, int? page = default, int? perPage = default) + public ProjectList ListProjects (string search = default, List ids = default, List names = default, List owner = default, bool? _public = default, List permissions = default, ProjectSortKey? sortBy = default, SortEnum? sortOrder = default, int? page = default, int? perPage = default) { ApiResponse localVarResponse = ListProjectsWithHttpInfo(search, ids, names, owner, _public, permissions, sortBy, sortOrder, page, perPage); return localVarResponse.Data; @@ -2474,7 +2474,7 @@ public ProjectList ListProjects (string search = default, List ids = def /// Page number starting from 1 (optional, default to 1) /// Number of items per page (optional, default to 25) /// ApiResponse of ProjectList - public ApiResponse ListProjectsWithHttpInfo (string search = default, List ids = default, List names = default, List owner = default, bool? _public = default, List permissions = default, ProjectSortKey sortBy = default, SortEnum? sortOrder = default, int? page = default, int? perPage = default) + public ApiResponse ListProjectsWithHttpInfo (string search = default, List ids = default, List names = default, List owner = default, bool? _public = default, List permissions = default, ProjectSortKey? sortBy = default, SortEnum? sortOrder = default, int? page = default, int? perPage = default) { var localVarPath = "/projects"; @@ -2555,7 +2555,7 @@ public ApiResponse ListProjectsWithHttpInfo (string search = defaul /// Number of items per page (optional, default to 25) /// Cancellation Token to cancel request (optional) /// Task of ProjectList - public async System.Threading.Tasks.Task ListProjectsAsync (string search = default, List ids = default, List names = default, List owner = default, bool? _public = default, List permissions = default, ProjectSortKey sortBy = default, SortEnum? sortOrder = default, int? page = default, int? perPage = default, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task ListProjectsAsync (string search = default, List ids = default, List names = default, List owner = default, bool? _public = default, List permissions = default, ProjectSortKey? sortBy = default, SortEnum? sortOrder = default, int? page = default, int? perPage = default, CancellationToken cancellationToken = default(CancellationToken)) { ApiResponse localVarResponse = await ListProjectsWithHttpInfoAsync(search, ids, names, owner, _public, permissions, sortBy, sortOrder, page, perPage, cancellationToken); return localVarResponse.Data; @@ -2578,7 +2578,7 @@ public ApiResponse ListProjectsWithHttpInfo (string search = defaul /// Number of items per page (optional, default to 25) /// Cancellation Token to cancel request (optional) /// Task of ApiResponse (ProjectList) - public async System.Threading.Tasks.Task> ListProjectsWithHttpInfoAsync (string search = default, List ids = default, List names = default, List owner = default, bool? _public = default, List permissions = default, ProjectSortKey sortBy = default, SortEnum? sortOrder = default, int? page = default, int? perPage = default, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> ListProjectsWithHttpInfoAsync (string search = default, List ids = default, List names = default, List owner = default, bool? _public = default, List permissions = default, ProjectSortKey? sortBy = default, SortEnum? sortOrder = default, int? page = default, int? perPage = default, CancellationToken cancellationToken = default(CancellationToken)) { var localVarPath = "/projects"; diff --git a/src/PollinationSDK/Api/RecipesApi.cs b/src/PollinationSDK/Api/RecipesApi.cs index a7e605653..1db96f52c 100644 --- a/src/PollinationSDK/Api/RecipesApi.cs +++ b/src/PollinationSDK/Api/RecipesApi.cs @@ -213,7 +213,7 @@ public interface IRecipesApi : IApiAccessor /// Page number starting from 1 (optional, default to 1) /// Number of items per page (optional, default to 25) /// RecipePackageList - RecipePackageList ListRecipeTags (string owner, string name, PackageSortKey sortBy = default, SortEnum? sortOrder = default, int? page = default, int? perPage = default); + RecipePackageList ListRecipeTags (string owner, string name, PackageSortKey? sortBy = default, SortEnum? sortOrder = default, int? page = default, int? perPage = default); /// /// Get a recipe tags @@ -229,7 +229,7 @@ public interface IRecipesApi : IApiAccessor /// Page number starting from 1 (optional, default to 1) /// Number of items per page (optional, default to 25) /// ApiResponse of RecipePackageList - ApiResponse ListRecipeTagsWithHttpInfo (string owner, string name, PackageSortKey sortBy = default, SortEnum? sortOrder = default, int? page = default, int? perPage = default); + ApiResponse ListRecipeTagsWithHttpInfo (string owner, string name, PackageSortKey? sortBy = default, SortEnum? sortOrder = default, int? page = default, int? perPage = default); /// /// List recipes /// @@ -248,7 +248,7 @@ public interface IRecipesApi : IApiAccessor /// Page number starting from 1 (optional, default to 1) /// Number of items per page (optional, default to 25) /// RepositoryList - RepositoryList ListRecipes (List search = default, List name = default, List owner = default, bool? _public = default, List keyword = default, List permission = default, RepositorySortKey sortBy = default, SortEnum? sortOrder = default, int? page = default, int? perPage = default); + RepositoryList ListRecipes (List search = default, List name = default, List owner = default, bool? _public = default, List keyword = default, List permission = default, RepositorySortKey? sortBy = default, SortEnum? sortOrder = default, int? page = default, int? perPage = default); /// /// List recipes @@ -268,7 +268,7 @@ public interface IRecipesApi : IApiAccessor /// Page number starting from 1 (optional, default to 1) /// Number of items per page (optional, default to 25) /// ApiResponse of RepositoryList - ApiResponse ListRecipesWithHttpInfo (List search = default, List name = default, List owner = default, bool? _public = default, List keyword = default, List permission = default, RepositorySortKey sortBy = default, SortEnum? sortOrder = default, int? page = default, int? perPage = default); + ApiResponse ListRecipesWithHttpInfo (List search = default, List name = default, List owner = default, bool? _public = default, List keyword = default, List permission = default, RepositorySortKey? sortBy = default, SortEnum? sortOrder = default, int? page = default, int? perPage = default); /// /// Update a Recipe /// @@ -525,7 +525,7 @@ public interface IRecipesApi : IApiAccessor /// Number of items per page (optional, default to 25) /// Cancellation Token to cancel request (optional) /// Task of RecipePackageList - System.Threading.Tasks.Task ListRecipeTagsAsync (string owner, string name, PackageSortKey sortBy = default, SortEnum? sortOrder = default, int? page = default, int? perPage = default, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task ListRecipeTagsAsync (string owner, string name, PackageSortKey? sortBy = default, SortEnum? sortOrder = default, int? page = default, int? perPage = default, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get a recipe tags @@ -542,7 +542,7 @@ public interface IRecipesApi : IApiAccessor /// Number of items per page (optional, default to 25) /// Cancellation Token to cancel request (optional) /// Task of ApiResponse (RecipePackageList) - System.Threading.Tasks.Task> ListRecipeTagsWithHttpInfoAsync (string owner, string name, PackageSortKey sortBy = default, SortEnum? sortOrder = default, int? page = default, int? perPage = default, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> ListRecipeTagsWithHttpInfoAsync (string owner, string name, PackageSortKey? sortBy = default, SortEnum? sortOrder = default, int? page = default, int? perPage = default, CancellationToken cancellationToken = default(CancellationToken)); /// /// List recipes /// @@ -562,7 +562,7 @@ public interface IRecipesApi : IApiAccessor /// Number of items per page (optional, default to 25) /// Cancellation Token to cancel request (optional) /// Task of RepositoryList - System.Threading.Tasks.Task ListRecipesAsync (List search = default, List name = default, List owner = default, bool? _public = default, List keyword = default, List permission = default, RepositorySortKey sortBy = default, SortEnum? sortOrder = default, int? page = default, int? perPage = default, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task ListRecipesAsync (List search = default, List name = default, List owner = default, bool? _public = default, List keyword = default, List permission = default, RepositorySortKey? sortBy = default, SortEnum? sortOrder = default, int? page = default, int? perPage = default, CancellationToken cancellationToken = default(CancellationToken)); /// /// List recipes @@ -583,7 +583,7 @@ public interface IRecipesApi : IApiAccessor /// Number of items per page (optional, default to 25) /// Cancellation Token to cancel request (optional) /// Task of ApiResponse (RepositoryList) - System.Threading.Tasks.Task> ListRecipesWithHttpInfoAsync (List search = default, List name = default, List owner = default, bool? _public = default, List keyword = default, List permission = default, RepositorySortKey sortBy = default, SortEnum? sortOrder = default, int? page = default, int? perPage = default, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> ListRecipesWithHttpInfoAsync (List search = default, List name = default, List owner = default, bool? _public = default, List keyword = default, List permission = default, RepositorySortKey? sortBy = default, SortEnum? sortOrder = default, int? page = default, int? perPage = default, CancellationToken cancellationToken = default(CancellationToken)); /// /// Update a Recipe /// @@ -2015,7 +2015,7 @@ public ApiResponse GetRecipeByTagWithHttpInfo (string owner, stri /// Page number starting from 1 (optional, default to 1) /// Number of items per page (optional, default to 25) /// RecipePackageList - public RecipePackageList ListRecipeTags (string owner, string name, PackageSortKey sortBy = default, SortEnum? sortOrder = default, int? page = default, int? perPage = default) + public RecipePackageList ListRecipeTags (string owner, string name, PackageSortKey? sortBy = default, SortEnum? sortOrder = default, int? page = default, int? perPage = default) { ApiResponse localVarResponse = ListRecipeTagsWithHttpInfo(owner, name, sortBy, sortOrder, page, perPage); return localVarResponse.Data; @@ -2032,7 +2032,7 @@ public RecipePackageList ListRecipeTags (string owner, string name, PackageSortK /// Page number starting from 1 (optional, default to 1) /// Number of items per page (optional, default to 25) /// ApiResponse of RecipePackageList - public ApiResponse ListRecipeTagsWithHttpInfo (string owner, string name, PackageSortKey sortBy = default, SortEnum? sortOrder = default, int? page = default, int? perPage = default) + public ApiResponse ListRecipeTagsWithHttpInfo (string owner, string name, PackageSortKey? sortBy = default, SortEnum? sortOrder = default, int? page = default, int? perPage = default) { // verify the required parameter 'owner' is set if (owner == null) @@ -2111,7 +2111,7 @@ public ApiResponse ListRecipeTagsWithHttpInfo (string owner, /// Number of items per page (optional, default to 25) /// Cancellation Token to cancel request (optional) /// Task of RecipePackageList - public async System.Threading.Tasks.Task ListRecipeTagsAsync (string owner, string name, PackageSortKey sortBy = default, SortEnum? sortOrder = default, int? page = default, int? perPage = default, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task ListRecipeTagsAsync (string owner, string name, PackageSortKey? sortBy = default, SortEnum? sortOrder = default, int? page = default, int? perPage = default, CancellationToken cancellationToken = default(CancellationToken)) { ApiResponse localVarResponse = await ListRecipeTagsWithHttpInfoAsync(owner, name, sortBy, sortOrder, page, perPage, cancellationToken); return localVarResponse.Data; @@ -2130,7 +2130,7 @@ public ApiResponse ListRecipeTagsWithHttpInfo (string owner, /// Number of items per page (optional, default to 25) /// Cancellation Token to cancel request (optional) /// Task of ApiResponse (RecipePackageList) - public async System.Threading.Tasks.Task> ListRecipeTagsWithHttpInfoAsync (string owner, string name, PackageSortKey sortBy = default, SortEnum? sortOrder = default, int? page = default, int? perPage = default, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> ListRecipeTagsWithHttpInfoAsync (string owner, string name, PackageSortKey? sortBy = default, SortEnum? sortOrder = default, int? page = default, int? perPage = default, CancellationToken cancellationToken = default(CancellationToken)) { // verify the required parameter 'owner' is set if (owner == null) @@ -2212,7 +2212,7 @@ public ApiResponse ListRecipeTagsWithHttpInfo (string owner, /// Page number starting from 1 (optional, default to 1) /// Number of items per page (optional, default to 25) /// RepositoryList - public RepositoryList ListRecipes (List search = default, List name = default, List owner = default, bool? _public = default, List keyword = default, List permission = default, RepositorySortKey sortBy = default, SortEnum? sortOrder = default, int? page = default, int? perPage = default) + public RepositoryList ListRecipes (List search = default, List name = default, List owner = default, bool? _public = default, List keyword = default, List permission = default, RepositorySortKey? sortBy = default, SortEnum? sortOrder = default, int? page = default, int? perPage = default) { ApiResponse localVarResponse = ListRecipesWithHttpInfo(search, name, owner, _public, keyword, permission, sortBy, sortOrder, page, perPage); return localVarResponse.Data; @@ -2233,7 +2233,7 @@ public RepositoryList ListRecipes (List search = default, List n /// Page number starting from 1 (optional, default to 1) /// Number of items per page (optional, default to 25) /// ApiResponse of RepositoryList - public ApiResponse ListRecipesWithHttpInfo (List search = default, List name = default, List owner = default, bool? _public = default, List keyword = default, List permission = default, RepositorySortKey sortBy = default, SortEnum? sortOrder = default, int? page = default, int? perPage = default) + public ApiResponse ListRecipesWithHttpInfo (List search = default, List name = default, List owner = default, bool? _public = default, List keyword = default, List permission = default, RepositorySortKey? sortBy = default, SortEnum? sortOrder = default, int? page = default, int? perPage = default) { var localVarPath = "/recipes"; @@ -2314,7 +2314,7 @@ public ApiResponse ListRecipesWithHttpInfo (List search /// Number of items per page (optional, default to 25) /// Cancellation Token to cancel request (optional) /// Task of RepositoryList - public async System.Threading.Tasks.Task ListRecipesAsync (List search = default, List name = default, List owner = default, bool? _public = default, List keyword = default, List permission = default, RepositorySortKey sortBy = default, SortEnum? sortOrder = default, int? page = default, int? perPage = default, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task ListRecipesAsync (List search = default, List name = default, List owner = default, bool? _public = default, List keyword = default, List permission = default, RepositorySortKey? sortBy = default, SortEnum? sortOrder = default, int? page = default, int? perPage = default, CancellationToken cancellationToken = default(CancellationToken)) { ApiResponse localVarResponse = await ListRecipesWithHttpInfoAsync(search, name, owner, _public, keyword, permission, sortBy, sortOrder, page, perPage, cancellationToken); return localVarResponse.Data; @@ -2337,7 +2337,7 @@ public ApiResponse ListRecipesWithHttpInfo (List search /// Number of items per page (optional, default to 25) /// Cancellation Token to cancel request (optional) /// Task of ApiResponse (RepositoryList) - public async System.Threading.Tasks.Task> ListRecipesWithHttpInfoAsync (List search = default, List name = default, List owner = default, bool? _public = default, List keyword = default, List permission = default, RepositorySortKey sortBy = default, SortEnum? sortOrder = default, int? page = default, int? perPage = default, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> ListRecipesWithHttpInfoAsync (List search = default, List name = default, List owner = default, bool? _public = default, List keyword = default, List permission = default, RepositorySortKey? sortBy = default, SortEnum? sortOrder = default, int? page = default, int? perPage = default, CancellationToken cancellationToken = default(CancellationToken)) { var localVarPath = "/recipes"; diff --git a/src/PollinationSDK/Api/RegistriesApi.cs b/src/PollinationSDK/Api/RegistriesApi.cs index e323137c2..f319bd72c 100644 --- a/src/PollinationSDK/Api/RegistriesApi.cs +++ b/src/PollinationSDK/Api/RegistriesApi.cs @@ -62,8 +62,9 @@ public interface IRegistriesApi : IApiAccessor /// /// /// - /// AnyOfRecipePlugin - AnyOf GetPackageJson (string owner, string type, string name, string digest); + /// (optional, default to false) + /// AnyOfRecipePluginBakedRecipe + AnyOf GetPackageJson (string owner, string type, string name, string digest, bool? baked = default); /// /// Get Package in JSON format @@ -76,8 +77,9 @@ public interface IRegistriesApi : IApiAccessor /// /// /// - /// ApiResponse of AnyOfRecipePlugin - ApiResponse> GetPackageJsonWithHttpInfo (string owner, string type, string name, string digest); + /// (optional, default to false) + /// ApiResponse of AnyOfRecipePluginBakedRecipe + ApiResponse> GetPackageJsonWithHttpInfo (string owner, string type, string name, string digest, bool? baked = default); /// /// Get Registry Index /// @@ -191,9 +193,10 @@ public interface IRegistriesApi : IApiAccessor /// /// /// + /// (optional, default to false) /// Cancellation Token to cancel request (optional) - /// Task of AnyOfRecipePlugin - System.Threading.Tasks.Task> GetPackageJsonAsync (string owner, string type, string name, string digest, CancellationToken cancellationToken = default(CancellationToken)); + /// Task of AnyOfRecipePluginBakedRecipe + System.Threading.Tasks.Task> GetPackageJsonAsync (string owner, string type, string name, string digest, bool? baked = default, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get Package in JSON format @@ -206,9 +209,10 @@ public interface IRegistriesApi : IApiAccessor /// /// /// + /// (optional, default to false) /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (AnyOf) - System.Threading.Tasks.Task>> GetPackageJsonWithHttpInfoAsync (string owner, string type, string name, string digest, CancellationToken cancellationToken = default(CancellationToken)); + /// Task of ApiResponse (AnyOf) + System.Threading.Tasks.Task>> GetPackageJsonWithHttpInfoAsync (string owner, string type, string name, string digest, bool? baked = default, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get Registry Index /// @@ -568,10 +572,11 @@ public ApiResponse GetPackageWithHttpInfo (string owner, string type, st /// /// /// - /// AnyOfRecipePlugin - public AnyOf GetPackageJson (string owner, string type, string name, string digest) + /// (optional, default to false) + /// AnyOfRecipePluginBakedRecipe + public AnyOf GetPackageJson (string owner, string type, string name, string digest, bool? baked = default) { - ApiResponse> localVarResponse = GetPackageJsonWithHttpInfo(owner, type, name, digest); + ApiResponse> localVarResponse = GetPackageJsonWithHttpInfo(owner, type, name, digest, baked); return localVarResponse.Data; } @@ -583,8 +588,9 @@ public AnyOf GetPackageJson (string owner, string type, string na /// /// /// - /// ApiResponse of AnyOfRecipePlugin - public ApiResponse> GetPackageJsonWithHttpInfo (string owner, string type, string name, string digest) + /// (optional, default to false) + /// ApiResponse of AnyOfRecipePluginBakedRecipe + public ApiResponse> GetPackageJsonWithHttpInfo (string owner, string type, string name, string digest, bool? baked = default) { // verify the required parameter 'owner' is set if (owner == null) @@ -624,6 +630,7 @@ public ApiResponse> GetPackageJsonWithHttpInfo (string owne if (type != null) localVarPathParams.Add("type", this.Configuration.ApiClient.ParameterToString(type)); // path parameter if (name != null) localVarPathParams.Add("name", this.Configuration.ApiClient.ParameterToString(name)); // path parameter if (digest != null) localVarPathParams.Add("digest", this.Configuration.ApiClient.ParameterToString(digest)); // path parameter + if (baked != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "baked", baked)); // query parameter // authentication (APIKeyAuth) required if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-pollination-token"))) @@ -650,9 +657,9 @@ public ApiResponse> GetPackageJsonWithHttpInfo (string owne if (exception != null) throw exception; } - return new ApiResponse>(localVarStatusCode, + return new ApiResponse>(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (AnyOf) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(AnyOf))); + (AnyOf) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(AnyOf))); } /// @@ -663,11 +670,12 @@ public ApiResponse> GetPackageJsonWithHttpInfo (string owne /// /// /// + /// (optional, default to false) /// Cancellation Token to cancel request (optional) - /// Task of AnyOfRecipePlugin - public async System.Threading.Tasks.Task> GetPackageJsonAsync (string owner, string type, string name, string digest, CancellationToken cancellationToken = default(CancellationToken)) + /// Task of AnyOfRecipePluginBakedRecipe + public async System.Threading.Tasks.Task> GetPackageJsonAsync (string owner, string type, string name, string digest, bool? baked = default, CancellationToken cancellationToken = default(CancellationToken)) { - ApiResponse> localVarResponse = await GetPackageJsonWithHttpInfoAsync(owner, type, name, digest, cancellationToken); + ApiResponse> localVarResponse = await GetPackageJsonWithHttpInfoAsync(owner, type, name, digest, baked, cancellationToken); return localVarResponse.Data; } @@ -680,9 +688,10 @@ public ApiResponse> GetPackageJsonWithHttpInfo (string owne /// /// /// + /// (optional, default to false) /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (AnyOf) - public async System.Threading.Tasks.Task>> GetPackageJsonWithHttpInfoAsync (string owner, string type, string name, string digest, CancellationToken cancellationToken = default(CancellationToken)) + /// Task of ApiResponse (AnyOf) + public async System.Threading.Tasks.Task>> GetPackageJsonWithHttpInfoAsync (string owner, string type, string name, string digest, bool? baked = default, CancellationToken cancellationToken = default(CancellationToken)) { // verify the required parameter 'owner' is set if (owner == null) @@ -722,6 +731,7 @@ public ApiResponse> GetPackageJsonWithHttpInfo (string owne if (type != null) localVarPathParams.Add("type", this.Configuration.ApiClient.ParameterToString(type)); // path parameter if (name != null) localVarPathParams.Add("name", this.Configuration.ApiClient.ParameterToString(name)); // path parameter if (digest != null) localVarPathParams.Add("digest", this.Configuration.ApiClient.ParameterToString(digest)); // path parameter + if (baked != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "baked", baked)); // query parameter // authentication (APIKeyAuth) required if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-pollination-token"))) @@ -748,9 +758,9 @@ public ApiResponse> GetPackageJsonWithHttpInfo (string owne if (exception != null) throw exception; } - return new ApiResponse>(localVarStatusCode, + return new ApiResponse>(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (AnyOf) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(AnyOf))); + (AnyOf) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(AnyOf))); } /// diff --git a/src/PollinationSDK/Api/SubscriptionsApi.cs b/src/PollinationSDK/Api/SubscriptionsApi.cs new file mode 100644 index 000000000..caecdb913 --- /dev/null +++ b/src/PollinationSDK/Api/SubscriptionsApi.cs @@ -0,0 +1,511 @@ +/* + * pollination-server + * + * Pollination Server OpenAPI Definition + * + * Contact: info@pollination.cloud + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.Threading; +using RestSharp; +using PollinationSDK.Client; +using PollinationSDK.Model; + +namespace PollinationSDK.Api +{ + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public interface ISubscriptionsApi : IApiAccessor + { + #region Synchronous Operations + /// + /// Get Subscription + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// PollinationSubscription + PollinationSubscription GetPollinationSubscription (string accountName); + + /// + /// Get Subscription + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// ApiResponse of PollinationSubscription + ApiResponse GetPollinationSubscriptionWithHttpInfo (string accountName); + /// + /// Get Upcoming Subscription + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// PollinationSubscription + PollinationSubscription GetUpcomingPollinationSubscription (string accountName); + + /// + /// Get Upcoming Subscription + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// ApiResponse of PollinationSubscription + ApiResponse GetUpcomingPollinationSubscriptionWithHttpInfo (string accountName); + #endregion Synchronous Operations + #region Asynchronous Operations + /// + /// Get Subscription + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// Cancellation Token to cancel request (optional) + /// Task of PollinationSubscription + System.Threading.Tasks.Task GetPollinationSubscriptionAsync (string accountName, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// Get Subscription + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// Cancellation Token to cancel request (optional) + /// Task of ApiResponse (PollinationSubscription) + System.Threading.Tasks.Task> GetPollinationSubscriptionWithHttpInfoAsync (string accountName, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Get Upcoming Subscription + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// Cancellation Token to cancel request (optional) + /// Task of PollinationSubscription + System.Threading.Tasks.Task GetUpcomingPollinationSubscriptionAsync (string accountName, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// Get Upcoming Subscription + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// Cancellation Token to cancel request (optional) + /// Task of ApiResponse (PollinationSubscription) + System.Threading.Tasks.Task> GetUpcomingPollinationSubscriptionWithHttpInfoAsync (string accountName, CancellationToken cancellationToken = default(CancellationToken)); + #endregion Asynchronous Operations + } + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public partial class SubscriptionsApi : ISubscriptionsApi + { + private PollinationSDK.Client.ExceptionFactory _exceptionFactory = (name, response) => null; + + /// + /// Initializes a new instance of the class. + /// + /// + public SubscriptionsApi(String basePath) + { + this.Configuration = new PollinationSDK.Client.Configuration { BasePath = basePath }; + + ExceptionFactory = PollinationSDK.Client.Configuration.DefaultExceptionFactory; + } + + /// + /// Initializes a new instance of the class + /// + /// + public SubscriptionsApi() + { + this.Configuration = PollinationSDK.Client.Configuration.Default; + + ExceptionFactory = PollinationSDK.Client.Configuration.DefaultExceptionFactory; + } + + /// + /// Initializes a new instance of the class + /// using Configuration object + /// + /// An instance of Configuration + /// + public SubscriptionsApi(PollinationSDK.Client.Configuration configuration = null) + { + if (configuration == null) // use the default one in Configuration + this.Configuration = PollinationSDK.Client.Configuration.Default; + else + this.Configuration = configuration; + + ExceptionFactory = PollinationSDK.Client.Configuration.DefaultExceptionFactory; + } + + /// + /// Gets the base path of the API client. + /// + /// The base path + public String GetBasePath() + { + return this.Configuration.ApiClient.RestClient.BaseUrl.ToString(); + } + + /// + /// Gets or sets the configuration object + /// + /// An instance of the Configuration + public PollinationSDK.Client.Configuration Configuration {get; set;} + + /// + /// Provides a factory method hook for the creation of exceptions. + /// + public PollinationSDK.Client.ExceptionFactory ExceptionFactory + { + get + { + if (_exceptionFactory != null && _exceptionFactory.GetInvocationList().Length > 1) + { + throw new InvalidOperationException("Multicast delegate for ExceptionFactory is unsupported."); + } + return _exceptionFactory; + } + set { _exceptionFactory = value; } + } + + /// + /// Get Subscription + /// + /// Thrown when fails to make API call + /// + /// PollinationSubscription + public PollinationSubscription GetPollinationSubscription (string accountName) + { + ApiResponse localVarResponse = GetPollinationSubscriptionWithHttpInfo(accountName); + return localVarResponse.Data; + } + + /// + /// Get Subscription + /// + /// Thrown when fails to make API call + /// + /// ApiResponse of PollinationSubscription + public ApiResponse GetPollinationSubscriptionWithHttpInfo (string accountName) + { + // verify the required parameter 'accountName' is set + if (accountName == null) + throw new ApiException(400, "Missing required parameter 'accountName' when calling SubscriptionsApi->GetPollinationSubscription"); + + var localVarPath = "/subscriptions/{account_name}"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (accountName != null) localVarPathParams.Add("account_name", this.Configuration.ApiClient.ParameterToString(accountName)); // path parameter + + // authentication (APIKeyAuth) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-pollination-token"))) + { + localVarHeaderParams["x-pollination-token"] = this.Configuration.GetApiKeyWithPrefix("x-pollination-token"); + } + // authentication (JWTAuth) required + // http beerer authentication required + if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) + { + localVarHeaderParams["Authorization"] = "Bearer " + this.Configuration.AccessToken; + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, + Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("GetPollinationSubscription", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (PollinationSubscription) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(PollinationSubscription))); + } + + /// + /// Get Subscription + /// + /// Thrown when fails to make API call + /// + /// Cancellation Token to cancel request (optional) + /// Task of PollinationSubscription + public async System.Threading.Tasks.Task GetPollinationSubscriptionAsync (string accountName, CancellationToken cancellationToken = default(CancellationToken)) + { + ApiResponse localVarResponse = await GetPollinationSubscriptionWithHttpInfoAsync(accountName, cancellationToken); + return localVarResponse.Data; + + } + + /// + /// Get Subscription + /// + /// Thrown when fails to make API call + /// + /// Cancellation Token to cancel request (optional) + /// Task of ApiResponse (PollinationSubscription) + public async System.Threading.Tasks.Task> GetPollinationSubscriptionWithHttpInfoAsync (string accountName, CancellationToken cancellationToken = default(CancellationToken)) + { + // verify the required parameter 'accountName' is set + if (accountName == null) + throw new ApiException(400, "Missing required parameter 'accountName' when calling SubscriptionsApi->GetPollinationSubscription"); + + var localVarPath = "/subscriptions/{account_name}"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (accountName != null) localVarPathParams.Add("account_name", this.Configuration.ApiClient.ParameterToString(accountName)); // path parameter + + // authentication (APIKeyAuth) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-pollination-token"))) + { + localVarHeaderParams["x-pollination-token"] = this.Configuration.GetApiKeyWithPrefix("x-pollination-token"); + } + // authentication (JWTAuth) required + // http bearer authentication required + if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) + { + localVarHeaderParams["Authorization"] = "Bearer " + this.Configuration.AccessToken; + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, + Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType, cancellationToken); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("GetPollinationSubscription", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (PollinationSubscription) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(PollinationSubscription))); + } + + /// + /// Get Upcoming Subscription + /// + /// Thrown when fails to make API call + /// + /// PollinationSubscription + public PollinationSubscription GetUpcomingPollinationSubscription (string accountName) + { + ApiResponse localVarResponse = GetUpcomingPollinationSubscriptionWithHttpInfo(accountName); + return localVarResponse.Data; + } + + /// + /// Get Upcoming Subscription + /// + /// Thrown when fails to make API call + /// + /// ApiResponse of PollinationSubscription + public ApiResponse GetUpcomingPollinationSubscriptionWithHttpInfo (string accountName) + { + // verify the required parameter 'accountName' is set + if (accountName == null) + throw new ApiException(400, "Missing required parameter 'accountName' when calling SubscriptionsApi->GetUpcomingPollinationSubscription"); + + var localVarPath = "/subscriptions/{account_name}/upcoming"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (accountName != null) localVarPathParams.Add("account_name", this.Configuration.ApiClient.ParameterToString(accountName)); // path parameter + + // authentication (APIKeyAuth) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-pollination-token"))) + { + localVarHeaderParams["x-pollination-token"] = this.Configuration.GetApiKeyWithPrefix("x-pollination-token"); + } + // authentication (JWTAuth) required + // http beerer authentication required + if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) + { + localVarHeaderParams["Authorization"] = "Bearer " + this.Configuration.AccessToken; + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, + Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("GetUpcomingPollinationSubscription", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (PollinationSubscription) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(PollinationSubscription))); + } + + /// + /// Get Upcoming Subscription + /// + /// Thrown when fails to make API call + /// + /// Cancellation Token to cancel request (optional) + /// Task of PollinationSubscription + public async System.Threading.Tasks.Task GetUpcomingPollinationSubscriptionAsync (string accountName, CancellationToken cancellationToken = default(CancellationToken)) + { + ApiResponse localVarResponse = await GetUpcomingPollinationSubscriptionWithHttpInfoAsync(accountName, cancellationToken); + return localVarResponse.Data; + + } + + /// + /// Get Upcoming Subscription + /// + /// Thrown when fails to make API call + /// + /// Cancellation Token to cancel request (optional) + /// Task of ApiResponse (PollinationSubscription) + public async System.Threading.Tasks.Task> GetUpcomingPollinationSubscriptionWithHttpInfoAsync (string accountName, CancellationToken cancellationToken = default(CancellationToken)) + { + // verify the required parameter 'accountName' is set + if (accountName == null) + throw new ApiException(400, "Missing required parameter 'accountName' when calling SubscriptionsApi->GetUpcomingPollinationSubscription"); + + var localVarPath = "/subscriptions/{account_name}/upcoming"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (accountName != null) localVarPathParams.Add("account_name", this.Configuration.ApiClient.ParameterToString(accountName)); // path parameter + + // authentication (APIKeyAuth) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-pollination-token"))) + { + localVarHeaderParams["x-pollination-token"] = this.Configuration.GetApiKeyWithPrefix("x-pollination-token"); + } + // authentication (JWTAuth) required + // http bearer authentication required + if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) + { + localVarHeaderParams["Authorization"] = "Bearer " + this.Configuration.AccessToken; + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, + Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType, cancellationToken); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("GetUpcomingPollinationSubscription", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (PollinationSubscription) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(PollinationSubscription))); + } + + } +} diff --git a/src/PollinationSDK/Client/Configuration.cs b/src/PollinationSDK/Client/Configuration.cs index 310bf03d2..49184864a 100644 --- a/src/PollinationSDK/Client/Configuration.cs +++ b/src/PollinationSDK/Client/Configuration.cs @@ -1,4 +1,4 @@ -/* +/* * pollination-server * * Pollination Server OpenAPI Definition @@ -99,7 +99,7 @@ public class Configuration : IReadableConfiguration /// Version of the package. /// /// Version of the package. - public const string Version = "0.14.0"; + public const string Version = "0.23.0"; /// /// Identifier for ISO 8601 DateTime Format @@ -190,7 +190,7 @@ static Configuration() /// public Configuration() { - UserAgent = "OpenAPI-Generator/0.14.0/csharp"; + UserAgent = "OpenAPI-Generator/0.23.0/csharp"; BasePath = "http://localhost"; DefaultHeader = new ConcurrentDictionary(); ApiKey = new ConcurrentDictionary(); @@ -263,7 +263,7 @@ public Configuration( string tempFolderPath = null, string dateTimeFormat = null, int timeout = 100000, - string userAgent = "OpenAPI-Generator/0.14.0/csharp" + string userAgent = "OpenAPI-Generator/0.23.0/csharp" // ReSharper restore UnusedParameter.Local ) { @@ -303,15 +303,12 @@ public virtual ApiClient ApiClient /// /// Gets or sets the base path for API access. /// - public virtual string BasePath - { + public virtual string BasePath { get { return _basePath; } - set - { + set { _basePath = value; // pass-through to ApiClient if it's set. - if (_apiClient != null) - { + if(_apiClient != null) { _apiClient.RestClient.BaseUrl = new Uri(_basePath); } } @@ -327,7 +324,7 @@ public virtual string BasePath /// public virtual int Timeout { - + get { return ApiClient.RestClient.Timeout; } set { ApiClient.RestClient.Timeout = value; } } @@ -358,9 +355,9 @@ public virtual int Timeout public string GetApiKeyWithPrefix(string apiKeyIdentifier) { var apiKeyValue = ""; - ApiKey.TryGetValue(apiKeyIdentifier, out apiKeyValue); + ApiKey.TryGetValue (apiKeyIdentifier, out apiKeyValue); var apiKeyPrefix = ""; - if (ApiKeyPrefix.TryGetValue(apiKeyIdentifier, out apiKeyPrefix)) + if (ApiKeyPrefix.TryGetValue (apiKeyIdentifier, out apiKeyPrefix)) return apiKeyPrefix + " " + apiKeyValue; else return apiKeyValue; @@ -508,9 +505,9 @@ public static String ToDebugReport() { String report = "C# SDK (PollinationSDK) Debug Report:\n"; report += " OS: " + System.Environment.OSVersion + "\n"; - report += " .NET Framework Version: " + System.Environment.Version + "\n"; - report += " Version of the API: 0.14.0\n"; - report += " SDK Package Version: 0.14.0\n"; + report += " .NET Framework Version: " + System.Environment.Version + "\n"; + report += " Version of the API: 0.23.0\n"; + report += " SDK Package Version: 0.23.0\n"; return report; } diff --git a/src/PollinationSDK/Interface/Domains/Jobs/Entities.cs b/src/PollinationSDK/Interface/Domains/Jobs/Entities.cs index 5f14b178b..8d5b4ce7b 100644 --- a/src/PollinationSDK/Interface/Domains/Jobs/Entities.cs +++ b/src/PollinationSDK/Interface/Domains/Jobs/Entities.cs @@ -9,5 +9,8 @@ public partial interface IEntities {} namespace PollinationSDK { public partial class DailyUsage: PollinationSDK.Interface.Domains.Jobs.IEntities {} + public partial class ResourcesDuration: PollinationSDK.Interface.Domains.Jobs.IEntities {} + public partial class RunMeta: PollinationSDK.Interface.Domains.Jobs.IEntities {} + public partial class RunProgress: PollinationSDK.Interface.Domains.Jobs.IEntities {} public partial class Usage: PollinationSDK.Interface.Domains.Jobs.IEntities {} } diff --git a/src/PollinationSDK/Interface/Domains/Licenses/Entities.cs b/src/PollinationSDK/Interface/Domains/Licenses/Entities.cs new file mode 100644 index 000000000..4f824c57a --- /dev/null +++ b/src/PollinationSDK/Interface/Domains/Licenses/Entities.cs @@ -0,0 +1,15 @@ +//This is auto generated by create_interface.py +//Do not edit this manually!. +namespace PollinationSDK.Interface.Domains.Licenses +{ + public partial interface IEntities {} +} + +//Classes implemented this interface: +namespace PollinationSDK +{ + public partial class Activation: PollinationSDK.Interface.Domains.Licenses.IEntities {} + public partial class CryptlexBase: PollinationSDK.Interface.Domains.Licenses.IEntities {} + public partial class Location: PollinationSDK.Interface.Domains.Licenses.IEntities {} + public partial class Metadata: PollinationSDK.Interface.Domains.Licenses.IEntities {} +} diff --git a/src/PollinationSDK/Interface/Domains/Payments/Entities.cs b/src/PollinationSDK/Interface/Domains/Payments/Entities.cs new file mode 100644 index 000000000..3b6c0ce68 --- /dev/null +++ b/src/PollinationSDK/Interface/Domains/Payments/Entities.cs @@ -0,0 +1,32 @@ +//This is auto generated by create_interface.py +//Do not edit this manually!. +namespace PollinationSDK.Interface.Domains.Payments +{ + public partial interface IEntities {} +} + +//Classes implemented this interface: +namespace PollinationSDK +{ + public partial class BaseList: PollinationSDK.Interface.Domains.Payments.IEntities {} + public partial class Coupon: PollinationSDK.Interface.Domains.Payments.IEntities {} + public partial class DeleteSubscriptionItem: PollinationSDK.Interface.Domains.Payments.IEntities {} + public partial class Discount: PollinationSDK.Interface.Domains.Payments.IEntities {} + public partial class DiscountAmount: PollinationSDK.Interface.Domains.Payments.IEntities {} + public partial class ExternalResource: PollinationSDK.Interface.Domains.Payments.IEntities {} + public partial class Inventory: PollinationSDK.Interface.Domains.Payments.IEntities {} + public partial class Invoice: PollinationSDK.Interface.Domains.Payments.IEntities {} + public partial class InvoiceStatusTransitions: PollinationSDK.Interface.Domains.Payments.IEntities {} + public partial class LineItem: PollinationSDK.Interface.Domains.Payments.IEntities {} + public partial class LineItemList: PollinationSDK.Interface.Domains.Payments.IEntities {} + public partial class NewSubscriptionItem: PollinationSDK.Interface.Domains.Payments.IEntities {} + public partial class Period: PollinationSDK.Interface.Domains.Payments.IEntities {} + public partial class Price: PollinationSDK.Interface.Domains.Payments.IEntities {} + public partial class PriceRecurrence: PollinationSDK.Interface.Domains.Payments.IEntities {} + public partial class PriceTier: PollinationSDK.Interface.Domains.Payments.IEntities {} + public partial class Product: PollinationSDK.Interface.Domains.Payments.IEntities {} + public partial class ProductFamily: PollinationSDK.Interface.Domains.Payments.IEntities {} + public partial class Subscription: PollinationSDK.Interface.Domains.Payments.IEntities {} + public partial class SubscriptionItem: PollinationSDK.Interface.Domains.Payments.IEntities {} + public partial class SubscriptionItemList: PollinationSDK.Interface.Domains.Payments.IEntities {} +} diff --git a/src/PollinationSDK/Interface/Domains/Subscriptions/Entities.cs b/src/PollinationSDK/Interface/Domains/Subscriptions/Entities.cs new file mode 100644 index 000000000..e6bebf1e1 --- /dev/null +++ b/src/PollinationSDK/Interface/Domains/Subscriptions/Entities.cs @@ -0,0 +1,14 @@ +//This is auto generated by create_interface.py +//Do not edit this manually!. +namespace PollinationSDK.Interface.Domains.Subscriptions +{ + public partial interface IEntities {} +} + +//Classes implemented this interface: +namespace PollinationSDK +{ + public partial class QuotaExtension: PollinationSDK.Interface.Domains.Subscriptions.IEntities {} + public partial class QuotaPlan: PollinationSDK.Interface.Domains.Subscriptions.IEntities {} + public partial class SubscriptionPlan: PollinationSDK.Interface.Domains.Subscriptions.IEntities {} +} diff --git a/src/PollinationSDK/Interface/Helpers/Query.cs b/src/PollinationSDK/Interface/Helpers/Query.cs new file mode 100644 index 000000000..5c43d7e07 --- /dev/null +++ b/src/PollinationSDK/Interface/Helpers/Query.cs @@ -0,0 +1,12 @@ +//This is auto generated by create_interface.py +//Do not edit this manually!. +namespace PollinationSDK.Interface.Helpers +{ + public partial interface IQuery {} +} + +//Classes implemented this interface: +namespace PollinationSDK +{ + public partial class SortEnum: PollinationSDK.Interface.Helpers.IQuery {} +} diff --git a/src/PollinationSDK/Interface/Recipe/Recipe.cs b/src/PollinationSDK/Interface/Recipe/Recipe.cs index 82f793d62..8404df3ab 100644 --- a/src/PollinationSDK/Interface/Recipe/Recipe.cs +++ b/src/PollinationSDK/Interface/Recipe/Recipe.cs @@ -8,6 +8,8 @@ public partial interface IRecipe {} //Classes implemented this interface: namespace PollinationSDK { + public partial class BakedRecipe: PollinationSDK.Interface.Recipe.IRecipe {} public partial class Recipe: PollinationSDK.Interface.Recipe.IRecipe {} public partial class RecipeInterface: PollinationSDK.Interface.Recipe.IRecipe {} + public partial class TemplateFunction: PollinationSDK.Interface.Recipe.IRecipe {} } diff --git a/src/PollinationSDK/Interface/Server/Rest/AccessPolicies/Dto.cs b/src/PollinationSDK/Interface/Server/Rest/AccessPolicies/Dto.cs index f5b743827..02863e273 100644 --- a/src/PollinationSDK/Interface/Server/Rest/AccessPolicies/Dto.cs +++ b/src/PollinationSDK/Interface/Server/Rest/AccessPolicies/Dto.cs @@ -10,6 +10,7 @@ namespace PollinationSDK { public partial class AccessPolicy: PollinationSDK.Interface.Server.Rest.AccessPolicies.IDto {} public partial class AccessPolicyList: PollinationSDK.Interface.Server.Rest.AccessPolicies.IDto {} + public partial class Accessor: PollinationSDK.Interface.Server.Rest.AccessPolicies.IDto {} public partial class PolicySubject: PollinationSDK.Interface.Server.Rest.AccessPolicies.IDto {} public partial class UserPermission: PollinationSDK.Interface.Server.Rest.AccessPolicies.IDto {} } diff --git a/src/PollinationSDK/Interface/Server/Rest/Accounts/Query.cs b/src/PollinationSDK/Interface/Server/Rest/Accounts/Query.cs new file mode 100644 index 000000000..3512ae12c --- /dev/null +++ b/src/PollinationSDK/Interface/Server/Rest/Accounts/Query.cs @@ -0,0 +1,12 @@ +//This is auto generated by create_interface.py +//Do not edit this manually!. +namespace PollinationSDK.Interface.Server.Rest.Accounts +{ + public partial interface IQuery {} +} + +//Classes implemented this interface: +namespace PollinationSDK +{ + public partial class RoleEnum: PollinationSDK.Interface.Server.Rest.Accounts.IQuery {} +} diff --git a/src/PollinationSDK/Interface/Server/Rest/Licenses/Dto.cs b/src/PollinationSDK/Interface/Server/Rest/Licenses/Dto.cs new file mode 100644 index 000000000..ff144e289 --- /dev/null +++ b/src/PollinationSDK/Interface/Server/Rest/Licenses/Dto.cs @@ -0,0 +1,20 @@ +//This is auto generated by create_interface.py +//Do not edit this manually!. +namespace PollinationSDK.Interface.Server.Rest.Licenses +{ + public partial interface IDto {} +} + +//Classes implemented this interface: +namespace PollinationSDK +{ + public partial class ActivationList: PollinationSDK.Interface.Server.Rest.Licenses.IDto {} + public partial class LicensePoolAccessPolicy: PollinationSDK.Interface.Server.Rest.Licenses.IDto {} + public partial class LicensePoolAccessPolicyList: PollinationSDK.Interface.Server.Rest.Licenses.IDto {} + public partial class LicensePoolList: PollinationSDK.Interface.Server.Rest.Licenses.IDto {} + public partial class LicensePoolPolicySubject: PollinationSDK.Interface.Server.Rest.Licenses.IDto {} + public partial class LicensePoolPolicySubjectList: PollinationSDK.Interface.Server.Rest.Licenses.IDto {} + public partial class LicensePoolPublic: PollinationSDK.Interface.Server.Rest.Licenses.IDto {} + public partial class LicensePoolUpdate: PollinationSDK.Interface.Server.Rest.Licenses.IDto {} + public partial class LicensePublic: PollinationSDK.Interface.Server.Rest.Licenses.IDto {} +} diff --git a/src/PollinationSDK/Interface/Server/Rest/Payments/Dto.cs b/src/PollinationSDK/Interface/Server/Rest/Payments/Dto.cs new file mode 100644 index 000000000..f9a0be95f --- /dev/null +++ b/src/PollinationSDK/Interface/Server/Rest/Payments/Dto.cs @@ -0,0 +1,23 @@ +//This is auto generated by create_interface.py +//Do not edit this manually!. +namespace PollinationSDK.Interface.Server.Rest.Payments +{ + public partial interface IDto {} +} + +//Classes implemented this interface: +namespace PollinationSDK +{ + public partial class CardPublic: PollinationSDK.Interface.Server.Rest.Payments.IDto {} + public partial class InvoiceList: PollinationSDK.Interface.Server.Rest.Payments.IDto {} + public partial class InvoicePreview: PollinationSDK.Interface.Server.Rest.Payments.IDto {} + public partial class PaymentCreate: PollinationSDK.Interface.Server.Rest.Payments.IDto {} + public partial class PaymentIntent: PollinationSDK.Interface.Server.Rest.Payments.IDto {} + public partial class PaymentMethodList: PollinationSDK.Interface.Server.Rest.Payments.IDto {} + public partial class PaymentSetup: PollinationSDK.Interface.Server.Rest.Payments.IDto {} + public partial class Status: PollinationSDK.Interface.Server.Rest.Payments.IDto {} + public partial class Subscribe: PollinationSDK.Interface.Server.Rest.Payments.IDto {} + public partial class SubscriptionCreate: PollinationSDK.Interface.Server.Rest.Payments.IDto {} + public partial class SubscriptionUpdate: PollinationSDK.Interface.Server.Rest.Payments.IDto {} + public partial class UpdateInvoicePreview: PollinationSDK.Interface.Server.Rest.Payments.IDto {} +} diff --git a/src/PollinationSDK/Interface/Server/Rest/Quotas/Dto.cs b/src/PollinationSDK/Interface/Server/Rest/Quotas/Dto.cs new file mode 100644 index 000000000..8aefd42d8 --- /dev/null +++ b/src/PollinationSDK/Interface/Server/Rest/Quotas/Dto.cs @@ -0,0 +1,13 @@ +//This is auto generated by create_interface.py +//Do not edit this manually!. +namespace PollinationSDK.Interface.Server.Rest.Quotas +{ + public partial interface IDto {} +} + +//Classes implemented this interface: +namespace PollinationSDK +{ + public partial class Quota: PollinationSDK.Interface.Server.Rest.Quotas.IDto {} + public partial class QuotaList: PollinationSDK.Interface.Server.Rest.Quotas.IDto {} +} diff --git a/src/PollinationSDK/Interface/Server/Rest/Subscriptions/Dto.cs b/src/PollinationSDK/Interface/Server/Rest/Subscriptions/Dto.cs new file mode 100644 index 000000000..ac1df5c40 --- /dev/null +++ b/src/PollinationSDK/Interface/Server/Rest/Subscriptions/Dto.cs @@ -0,0 +1,12 @@ +//This is auto generated by create_interface.py +//Do not edit this manually!. +namespace PollinationSDK.Interface.Server.Rest.Subscriptions +{ + public partial interface IDto {} +} + +//Classes implemented this interface: +namespace PollinationSDK +{ + public partial class PollinationSubscription: PollinationSDK.Interface.Server.Rest.Subscriptions.IDto {} +} diff --git a/src/PollinationSDK/Model/Accessor.cs b/src/PollinationSDK/Model/Accessor.cs new file mode 100644 index 000000000..e9c7a0739 --- /dev/null +++ b/src/PollinationSDK/Model/Accessor.cs @@ -0,0 +1,221 @@ +/* + * pollination-server + * + * Pollination Server OpenAPI Definition + * + * Contact: info@pollination.cloud + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; + + +namespace PollinationSDK +{ + /// + /// Accessor + /// + [DataContract(Name = "Accessor")] + public partial class Accessor : OpenAPIGenBaseModel, IEquatable, IValidatableObject + { + /// + /// Gets or Sets Permission + /// + [DataMember(Name="permission", EmitDefaultValue=false)] + public Permission Permission { get; set; } + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected Accessor() + { + // Set non-required readonly properties with defaultValue + this.Type = "Accessor"; + } + + /// + /// Initializes a new instance of the class. + /// + /// subject (required). + /// permission (required). + public Accessor + ( + AnyOf subject, Permission permission// Required parameters + // Optional parameters + ) : base()// BaseClass + { + // to ensure "subject" is required (not null) + this.Subject = subject ?? throw new ArgumentNullException("subject is a required property for Accessor and cannot be null"); + this.Permission = permission; + + // Set non-required readonly properties with defaultValue + this.Type = "Accessor"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "Accessor"; + + /// + /// Gets or Sets Subject + /// + [DataMember(Name = "subject", IsRequired = true, EmitDefaultValue = false)] + public AnyOf Subject { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + return "Accessor"; + } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString(bool detailed) + { + if (!detailed) + return this.ToString(); + + var sb = new StringBuilder(); + sb.Append("Accessor:\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Subject: ").Append(Subject).Append("\n"); + sb.Append(" Permission: ").Append(Permission).Append("\n"); + return sb.ToString(); + } + + /// + /// Returns the object from JSON string + /// + /// Accessor object + public static Accessor FromJson(string json) + { + var obj = JsonConvert.DeserializeObject(json, JsonSetting.AnyOfConvertSetting); + if (obj == null) + return null; + return obj.Type.ToLower() == obj.GetType().Name.ToLower() ? obj : null; + } + + /// + /// Creates a new instance with the same properties. + /// + /// Accessor object + public virtual Accessor DuplicateAccessor() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateAccessor(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel DuplicateOpenAPIGenBaseModel() + { + return DuplicateAccessor(); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + input = input is AnyOf anyOf ? anyOf.Obj : input; + return this.Equals(input as Accessor); + } + + /// + /// Returns true if Accessor instances are equal + /// + /// Instance of Accessor to be compared + /// Boolean + public bool Equals(Accessor input) + { + if (input == null) + return false; + return base.Equals(input) && + ( + this.Subject == input.Subject || + (this.Subject != null && + this.Subject.Equals(input.Subject)) + ) && base.Equals(input) && + ( + this.Permission == input.Permission || + (this.Permission != null && + this.Permission.Equals(input.Permission)) + ) && base.Equals(input) && + ( + this.Type == input.Type || + (this.Type != null && + this.Type.Equals(input.Type)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = base.GetHashCode(); + if (this.Subject != null) + hashCode = hashCode * 59 + this.Subject.GetHashCode(); + if (this.Permission != null) + hashCode = hashCode * 59 + this.Permission.GetHashCode(); + if (this.Type != null) + hashCode = hashCode * 59 + this.Type.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + foreach(var x in base.BaseValidate(validationContext)) yield return x; + + + // Type (string) pattern + Regex regexType = new Regex(@"^Accessor$", RegexOptions.CultureInvariant); + if (false == regexType.Match(this.Type).Success) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Type, must match a pattern of " + regexType, new [] { "Type" }); + } + + yield break; + } + } +} diff --git a/src/PollinationSDK/Model/AccountType.cs b/src/PollinationSDK/Model/AccountType.cs new file mode 100644 index 000000000..281e66462 --- /dev/null +++ b/src/PollinationSDK/Model/AccountType.cs @@ -0,0 +1,49 @@ +/* + * pollination-server + * + * Pollination Server OpenAPI Definition + * + * Contact: info@pollination.cloud + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; + + +namespace PollinationSDK +{ + /// + /// The type of account. + /// + /// The type of account. + + [JsonConverter(typeof(StringEnumConverter))] + + public enum AccountType + { + /// + /// Enum Org for value: org + /// + [EnumMember(Value = "org")] + Org = 1, + + /// + /// Enum User for value: user + /// + [EnumMember(Value = "user")] + User = 2 + + } + +} diff --git a/src/PollinationSDK/Model/Activation.cs b/src/PollinationSDK/Model/Activation.cs new file mode 100644 index 000000000..98cb2987e --- /dev/null +++ b/src/PollinationSDK/Model/Activation.cs @@ -0,0 +1,388 @@ +/* + * pollination-server + * + * Pollination Server OpenAPI Definition + * + * Contact: info@pollination.cloud + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; + + +namespace PollinationSDK +{ + /// + /// Activation + /// + [DataContract(Name = "Activation")] + public partial class Activation : CryptlexBase, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected Activation() + { + // Set non-required readonly properties with defaultValue + this.Type = "Activation"; + } + + /// + /// Initializes a new instance of the class. + /// + /// id (required). + /// createdAt (required). + /// updatedAt (required). + /// offline (required). + /// lastSyncedAt (required). + /// location (required). + /// os. + /// osVersion. + /// hostname. + /// appVersion. + /// leaseExpiresAt. + /// metadata. + /// licenseId. + public Activation + ( + string id, DateTime createdAt, DateTime updatedAt, bool offline, DateTime lastSyncedAt, Location location, // Required parameters + string os= default, string osVersion= default, string hostname= default, string appVersion= default, DateTime leaseExpiresAt= default, List metadata= default, string licenseId= default // Optional parameters + ) : base()// BaseClass + { + // to ensure "id" is required (not null) + this.Id = id ?? throw new ArgumentNullException("id is a required property for Activation and cannot be null"); + this.CreatedAt = createdAt; + this.UpdatedAt = updatedAt; + this.Offline = offline; + this.LastSyncedAt = lastSyncedAt; + // to ensure "location" is required (not null) + this.Location = location ?? throw new ArgumentNullException("location is a required property for Activation and cannot be null"); + this.Os = os; + this.OsVersion = osVersion; + this.Hostname = hostname; + this.AppVersion = appVersion; + this.LeaseExpiresAt = leaseExpiresAt; + this.Metadata = metadata; + this.LicenseId = licenseId; + + // Set non-required readonly properties with defaultValue + this.Type = "Activation"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "Activation"; + + /// + /// Gets or Sets Id + /// + [DataMember(Name = "id", IsRequired = true, EmitDefaultValue = false)] + public string Id { get; set; } + /// + /// Gets or Sets CreatedAt + /// + [DataMember(Name = "created_at", IsRequired = true, EmitDefaultValue = false)] + public DateTime CreatedAt { get; set; } + /// + /// Gets or Sets UpdatedAt + /// + [DataMember(Name = "updated_at", IsRequired = true, EmitDefaultValue = false)] + public DateTime UpdatedAt { get; set; } + /// + /// Gets or Sets Offline + /// + [DataMember(Name = "offline", IsRequired = true, EmitDefaultValue = false)] + public bool Offline { get; set; } + /// + /// Gets or Sets LastSyncedAt + /// + [DataMember(Name = "last_synced_at", IsRequired = true, EmitDefaultValue = false)] + public DateTime LastSyncedAt { get; set; } + /// + /// Gets or Sets Location + /// + [DataMember(Name = "location", IsRequired = true, EmitDefaultValue = false)] + public Location Location { get; set; } + /// + /// Gets or Sets Os + /// + [DataMember(Name = "os", EmitDefaultValue = false)] + public string Os { get; set; } + /// + /// Gets or Sets OsVersion + /// + [DataMember(Name = "os_version", EmitDefaultValue = false)] + public string OsVersion { get; set; } + /// + /// Gets or Sets Hostname + /// + [DataMember(Name = "hostname", EmitDefaultValue = false)] + public string Hostname { get; set; } + /// + /// Gets or Sets AppVersion + /// + [DataMember(Name = "app_version", EmitDefaultValue = false)] + public string AppVersion { get; set; } + /// + /// Gets or Sets LeaseExpiresAt + /// + [DataMember(Name = "lease_expires_at", EmitDefaultValue = false)] + public DateTime LeaseExpiresAt { get; set; } + /// + /// Gets or Sets Metadata + /// + [DataMember(Name = "metadata", EmitDefaultValue = false)] + public List Metadata { get; set; } + /// + /// Gets or Sets LicenseId + /// + [DataMember(Name = "license_id", EmitDefaultValue = false)] + public string LicenseId { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + return "Activation"; + } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString(bool detailed) + { + if (!detailed) + return this.ToString(); + + var sb = new StringBuilder(); + sb.Append("Activation:\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Id: ").Append(Id).Append("\n"); + sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n"); + sb.Append(" UpdatedAt: ").Append(UpdatedAt).Append("\n"); + sb.Append(" Offline: ").Append(Offline).Append("\n"); + sb.Append(" LastSyncedAt: ").Append(LastSyncedAt).Append("\n"); + sb.Append(" Location: ").Append(Location).Append("\n"); + sb.Append(" Os: ").Append(Os).Append("\n"); + sb.Append(" OsVersion: ").Append(OsVersion).Append("\n"); + sb.Append(" Hostname: ").Append(Hostname).Append("\n"); + sb.Append(" AppVersion: ").Append(AppVersion).Append("\n"); + sb.Append(" LeaseExpiresAt: ").Append(LeaseExpiresAt).Append("\n"); + sb.Append(" Metadata: ").Append(Metadata).Append("\n"); + sb.Append(" LicenseId: ").Append(LicenseId).Append("\n"); + return sb.ToString(); + } + + /// + /// Returns the object from JSON string + /// + /// Activation object + public static Activation FromJson(string json) + { + var obj = JsonConvert.DeserializeObject(json, JsonSetting.AnyOfConvertSetting); + if (obj == null) + return null; + return obj.Type.ToLower() == obj.GetType().Name.ToLower() ? obj : null; + } + + /// + /// Creates a new instance with the same properties. + /// + /// Activation object + public virtual Activation DuplicateActivation() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateActivation(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override CryptlexBase DuplicateCryptlexBase() + { + return DuplicateActivation(); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + input = input is AnyOf anyOf ? anyOf.Obj : input; + return this.Equals(input as Activation); + } + + /// + /// Returns true if Activation instances are equal + /// + /// Instance of Activation to be compared + /// Boolean + public bool Equals(Activation input) + { + if (input == null) + return false; + return base.Equals(input) && + ( + this.Id == input.Id || + (this.Id != null && + this.Id.Equals(input.Id)) + ) && base.Equals(input) && + ( + this.CreatedAt == input.CreatedAt || + (this.CreatedAt != null && + this.CreatedAt.Equals(input.CreatedAt)) + ) && base.Equals(input) && + ( + this.UpdatedAt == input.UpdatedAt || + (this.UpdatedAt != null && + this.UpdatedAt.Equals(input.UpdatedAt)) + ) && base.Equals(input) && + ( + this.Offline == input.Offline || + (this.Offline != null && + this.Offline.Equals(input.Offline)) + ) && base.Equals(input) && + ( + this.LastSyncedAt == input.LastSyncedAt || + (this.LastSyncedAt != null && + this.LastSyncedAt.Equals(input.LastSyncedAt)) + ) && base.Equals(input) && + ( + this.Location == input.Location || + (this.Location != null && + this.Location.Equals(input.Location)) + ) && base.Equals(input) && + ( + this.Os == input.Os || + (this.Os != null && + this.Os.Equals(input.Os)) + ) && base.Equals(input) && + ( + this.OsVersion == input.OsVersion || + (this.OsVersion != null && + this.OsVersion.Equals(input.OsVersion)) + ) && base.Equals(input) && + ( + this.Hostname == input.Hostname || + (this.Hostname != null && + this.Hostname.Equals(input.Hostname)) + ) && base.Equals(input) && + ( + this.AppVersion == input.AppVersion || + (this.AppVersion != null && + this.AppVersion.Equals(input.AppVersion)) + ) && base.Equals(input) && + ( + this.LeaseExpiresAt == input.LeaseExpiresAt || + (this.LeaseExpiresAt != null && + this.LeaseExpiresAt.Equals(input.LeaseExpiresAt)) + ) && base.Equals(input) && + ( + this.Metadata == input.Metadata || + this.Metadata != null && + input.Metadata != null && + this.Metadata.SequenceEqual(input.Metadata) + ) && base.Equals(input) && + ( + this.LicenseId == input.LicenseId || + (this.LicenseId != null && + this.LicenseId.Equals(input.LicenseId)) + ) && base.Equals(input) && + ( + this.Type == input.Type || + (this.Type != null && + this.Type.Equals(input.Type)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = base.GetHashCode(); + if (this.Id != null) + hashCode = hashCode * 59 + this.Id.GetHashCode(); + if (this.CreatedAt != null) + hashCode = hashCode * 59 + this.CreatedAt.GetHashCode(); + if (this.UpdatedAt != null) + hashCode = hashCode * 59 + this.UpdatedAt.GetHashCode(); + if (this.Offline != null) + hashCode = hashCode * 59 + this.Offline.GetHashCode(); + if (this.LastSyncedAt != null) + hashCode = hashCode * 59 + this.LastSyncedAt.GetHashCode(); + if (this.Location != null) + hashCode = hashCode * 59 + this.Location.GetHashCode(); + if (this.Os != null) + hashCode = hashCode * 59 + this.Os.GetHashCode(); + if (this.OsVersion != null) + hashCode = hashCode * 59 + this.OsVersion.GetHashCode(); + if (this.Hostname != null) + hashCode = hashCode * 59 + this.Hostname.GetHashCode(); + if (this.AppVersion != null) + hashCode = hashCode * 59 + this.AppVersion.GetHashCode(); + if (this.LeaseExpiresAt != null) + hashCode = hashCode * 59 + this.LeaseExpiresAt.GetHashCode(); + if (this.Metadata != null) + hashCode = hashCode * 59 + this.Metadata.GetHashCode(); + if (this.LicenseId != null) + hashCode = hashCode * 59 + this.LicenseId.GetHashCode(); + if (this.Type != null) + hashCode = hashCode * 59 + this.Type.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + foreach(var x in base.BaseValidate(validationContext)) yield return x; + + + // Type (string) pattern + Regex regexType = new Regex(@"^Activation$", RegexOptions.CultureInvariant); + if (false == regexType.Match(this.Type).Success) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Type, must match a pattern of " + regexType, new [] { "Type" }); + } + + yield break; + } + } +} diff --git a/src/PollinationSDK/Model/ActivationList.cs b/src/PollinationSDK/Model/ActivationList.cs new file mode 100644 index 000000000..fe9f1cfd6 --- /dev/null +++ b/src/PollinationSDK/Model/ActivationList.cs @@ -0,0 +1,207 @@ +/* + * pollination-server + * + * Pollination Server OpenAPI Definition + * + * Contact: info@pollination.cloud + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; + + +namespace PollinationSDK +{ + /// + /// ActivationList + /// + [DataContract(Name = "ActivationList")] + public partial class ActivationList : OpenAPIGenBaseModel, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected ActivationList() + { + // Set non-required readonly properties with defaultValue + this.Type = "ActivationList"; + } + + /// + /// Initializes a new instance of the class. + /// + /// resources (required). + public ActivationList + ( + List resources// Required parameters + // Optional parameters + ) : base()// BaseClass + { + // to ensure "resources" is required (not null) + this.Resources = resources ?? throw new ArgumentNullException("resources is a required property for ActivationList and cannot be null"); + + // Set non-required readonly properties with defaultValue + this.Type = "ActivationList"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "ActivationList"; + + /// + /// Gets or Sets Resources + /// + [DataMember(Name = "resources", IsRequired = true, EmitDefaultValue = false)] + public List Resources { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + return "ActivationList"; + } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString(bool detailed) + { + if (!detailed) + return this.ToString(); + + var sb = new StringBuilder(); + sb.Append("ActivationList:\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Resources: ").Append(Resources).Append("\n"); + return sb.ToString(); + } + + /// + /// Returns the object from JSON string + /// + /// ActivationList object + public static ActivationList FromJson(string json) + { + var obj = JsonConvert.DeserializeObject(json, JsonSetting.AnyOfConvertSetting); + if (obj == null) + return null; + return obj.Type.ToLower() == obj.GetType().Name.ToLower() ? obj : null; + } + + /// + /// Creates a new instance with the same properties. + /// + /// ActivationList object + public virtual ActivationList DuplicateActivationList() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateActivationList(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel DuplicateOpenAPIGenBaseModel() + { + return DuplicateActivationList(); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + input = input is AnyOf anyOf ? anyOf.Obj : input; + return this.Equals(input as ActivationList); + } + + /// + /// Returns true if ActivationList instances are equal + /// + /// Instance of ActivationList to be compared + /// Boolean + public bool Equals(ActivationList input) + { + if (input == null) + return false; + return base.Equals(input) && + ( + this.Resources == input.Resources || + this.Resources != null && + input.Resources != null && + this.Resources.SequenceEqual(input.Resources) + ) && base.Equals(input) && + ( + this.Type == input.Type || + (this.Type != null && + this.Type.Equals(input.Type)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = base.GetHashCode(); + if (this.Resources != null) + hashCode = hashCode * 59 + this.Resources.GetHashCode(); + if (this.Type != null) + hashCode = hashCode * 59 + this.Type.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + foreach(var x in base.BaseValidate(validationContext)) yield return x; + + + // Type (string) pattern + Regex regexType = new Regex(@"^ActivationList$", RegexOptions.CultureInvariant); + if (false == regexType.Match(this.Type).Success) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Type, must match a pattern of " + regexType, new [] { "Type" }); + } + + yield break; + } + } +} diff --git a/src/PollinationSDK/Model/BakedRecipe.cs b/src/PollinationSDK/Model/BakedRecipe.cs new file mode 100644 index 000000000..5683925c6 --- /dev/null +++ b/src/PollinationSDK/Model/BakedRecipe.cs @@ -0,0 +1,317 @@ +/* + * pollination-server + * + * Pollination Server OpenAPI Definition + * + * Contact: info@pollination.cloud + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; + + +namespace PollinationSDK +{ + /// + /// Baked Recipe. A Baked Recipe contains all the templates referred to in the DAG within a templates list. + /// + [DataContract(Name = "BakedRecipe")] + public partial class BakedRecipe : OpenAPIGenBaseModel, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected BakedRecipe() + { + // Set non-required readonly properties with defaultValue + this.ApiVersion = "v1beta1"; + this.Type = "BakedRecipe"; + } + + /// + /// Initializes a new instance of the class. + /// + /// A list of tasks to create a DAG recipe. (required). + /// digest (required). + /// A list of templates. Templates can be Function or a DAG. (required). + /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. + /// Recipe metadata information.. + /// A list of plugins and other recipes this recipe depends on.. + public BakedRecipe + ( + List flow, string digest, List> templates, // Required parameters + Dictionary annotations= default, MetaData metadata= default, List dependencies= default // Optional parameters + ) : base()// BaseClass + { + // to ensure "flow" is required (not null) + this.Flow = flow ?? throw new ArgumentNullException("flow is a required property for BakedRecipe and cannot be null"); + // to ensure "digest" is required (not null) + this.Digest = digest ?? throw new ArgumentNullException("digest is a required property for BakedRecipe and cannot be null"); + // to ensure "templates" is required (not null) + this.Templates = templates ?? throw new ArgumentNullException("templates is a required property for BakedRecipe and cannot be null"); + this.Annotations = annotations; + this.Metadata = metadata; + this.Dependencies = dependencies; + + // Set non-required readonly properties with defaultValue + this.ApiVersion = "v1beta1"; + this.Type = "BakedRecipe"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets ApiVersion + /// + [DataMember(Name = "api_version", EmitDefaultValue = true)] + public string ApiVersion { get; protected internal set; } = "v1beta1"; + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "BakedRecipe"; + + /// + /// A list of tasks to create a DAG recipe. + /// + /// A list of tasks to create a DAG recipe. + [DataMember(Name = "flow", IsRequired = true, EmitDefaultValue = false)] + public List Flow { get; set; } + /// + /// Gets or Sets Digest + /// + [DataMember(Name = "digest", IsRequired = true, EmitDefaultValue = false)] + public string Digest { get; set; } + /// + /// A list of templates. Templates can be Function or a DAG. + /// + /// A list of templates. Templates can be Function or a DAG. + [DataMember(Name = "templates", IsRequired = true, EmitDefaultValue = false)] + public List> Templates { get; set; } + /// + /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries. + /// + /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries. + [DataMember(Name = "annotations", EmitDefaultValue = false)] + public Dictionary Annotations { get; set; } + /// + /// Recipe metadata information. + /// + /// Recipe metadata information. + [DataMember(Name = "metadata", EmitDefaultValue = false)] + public MetaData Metadata { get; set; } + /// + /// A list of plugins and other recipes this recipe depends on. + /// + /// A list of plugins and other recipes this recipe depends on. + [DataMember(Name = "dependencies", EmitDefaultValue = false)] + public List Dependencies { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + return "BakedRecipe"; + } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString(bool detailed) + { + if (!detailed) + return this.ToString(); + + var sb = new StringBuilder(); + sb.Append("BakedRecipe:\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Flow: ").Append(Flow).Append("\n"); + sb.Append(" Digest: ").Append(Digest).Append("\n"); + sb.Append(" Templates: ").Append(Templates).Append("\n"); + sb.Append(" Annotations: ").Append(Annotations).Append("\n"); + sb.Append(" ApiVersion: ").Append(ApiVersion).Append("\n"); + sb.Append(" Metadata: ").Append(Metadata).Append("\n"); + sb.Append(" Dependencies: ").Append(Dependencies).Append("\n"); + return sb.ToString(); + } + + /// + /// Returns the object from JSON string + /// + /// BakedRecipe object + public static BakedRecipe FromJson(string json) + { + var obj = JsonConvert.DeserializeObject(json, JsonSetting.AnyOfConvertSetting); + if (obj == null) + return null; + return obj.Type.ToLower() == obj.GetType().Name.ToLower() ? obj : null; + } + + /// + /// Creates a new instance with the same properties. + /// + /// BakedRecipe object + public virtual BakedRecipe DuplicateBakedRecipe() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateBakedRecipe(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel DuplicateOpenAPIGenBaseModel() + { + return DuplicateBakedRecipe(); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + input = input is AnyOf anyOf ? anyOf.Obj : input; + return this.Equals(input as BakedRecipe); + } + + /// + /// Returns true if BakedRecipe instances are equal + /// + /// Instance of BakedRecipe to be compared + /// Boolean + public bool Equals(BakedRecipe input) + { + if (input == null) + return false; + return base.Equals(input) && + ( + this.Flow == input.Flow || + this.Flow != null && + input.Flow != null && + this.Flow.SequenceEqual(input.Flow) + ) && base.Equals(input) && + ( + this.Digest == input.Digest || + (this.Digest != null && + this.Digest.Equals(input.Digest)) + ) && base.Equals(input) && + ( + this.Templates == input.Templates || + this.Templates != null && + input.Templates != null && + this.Templates.SequenceEqual(input.Templates) + ) && base.Equals(input) && + ( + this.Annotations == input.Annotations || + this.Annotations != null && + input.Annotations != null && + this.Annotations.SequenceEqual(input.Annotations) + ) && base.Equals(input) && + ( + this.ApiVersion == input.ApiVersion || + (this.ApiVersion != null && + this.ApiVersion.Equals(input.ApiVersion)) + ) && base.Equals(input) && + ( + this.Metadata == input.Metadata || + (this.Metadata != null && + this.Metadata.Equals(input.Metadata)) + ) && base.Equals(input) && + ( + this.Dependencies == input.Dependencies || + this.Dependencies != null && + input.Dependencies != null && + this.Dependencies.SequenceEqual(input.Dependencies) + ) && base.Equals(input) && + ( + this.Type == input.Type || + (this.Type != null && + this.Type.Equals(input.Type)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = base.GetHashCode(); + if (this.Flow != null) + hashCode = hashCode * 59 + this.Flow.GetHashCode(); + if (this.Digest != null) + hashCode = hashCode * 59 + this.Digest.GetHashCode(); + if (this.Templates != null) + hashCode = hashCode * 59 + this.Templates.GetHashCode(); + if (this.Annotations != null) + hashCode = hashCode * 59 + this.Annotations.GetHashCode(); + if (this.ApiVersion != null) + hashCode = hashCode * 59 + this.ApiVersion.GetHashCode(); + if (this.Metadata != null) + hashCode = hashCode * 59 + this.Metadata.GetHashCode(); + if (this.Dependencies != null) + hashCode = hashCode * 59 + this.Dependencies.GetHashCode(); + if (this.Type != null) + hashCode = hashCode * 59 + this.Type.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + foreach(var x in base.BaseValidate(validationContext)) yield return x; + + + // ApiVersion (string) pattern + Regex regexApiVersion = new Regex(@"^v1beta1$", RegexOptions.CultureInvariant); + if (false == regexApiVersion.Match(this.ApiVersion).Success) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for ApiVersion, must match a pattern of " + regexApiVersion, new [] { "ApiVersion" }); + } + + + + // Type (string) pattern + Regex regexType = new Regex(@"^BakedRecipe$", RegexOptions.CultureInvariant); + if (false == regexType.Match(this.Type).Success) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Type, must match a pattern of " + regexType, new [] { "Type" }); + } + + yield break; + } + } +} diff --git a/src/PollinationSDK/Model/BaseList.cs b/src/PollinationSDK/Model/BaseList.cs new file mode 100644 index 000000000..85aa7c859 --- /dev/null +++ b/src/PollinationSDK/Model/BaseList.cs @@ -0,0 +1,222 @@ +/* + * pollination-server + * + * Pollination Server OpenAPI Definition + * + * Contact: info@pollination.cloud + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; + + +namespace PollinationSDK +{ + /// + /// BaseList + /// + [DataContract(Name = "BaseList")] + public partial class BaseList : OpenAPIGenBaseModel, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected BaseList() + { + // Set non-required readonly properties with defaultValue + this.Type = "BaseList"; + } + + /// + /// Initializes a new instance of the class. + /// + /// hasMore (required). + /// data (required). + public BaseList + ( + bool hasMore, List data// Required parameters + // Optional parameters + ) : base()// BaseClass + { + this.HasMore = hasMore; + // to ensure "data" is required (not null) + this.Data = data ?? throw new ArgumentNullException("data is a required property for BaseList and cannot be null"); + + // Set non-required readonly properties with defaultValue + this.Type = "BaseList"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "BaseList"; + + /// + /// Gets or Sets HasMore + /// + [DataMember(Name = "has_more", IsRequired = true, EmitDefaultValue = false)] + public bool HasMore { get; set; } + /// + /// Gets or Sets Data + /// + [DataMember(Name = "data", IsRequired = true, EmitDefaultValue = false)] + public List Data { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + return "BaseList"; + } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString(bool detailed) + { + if (!detailed) + return this.ToString(); + + var sb = new StringBuilder(); + sb.Append("BaseList:\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" HasMore: ").Append(HasMore).Append("\n"); + sb.Append(" Data: ").Append(Data).Append("\n"); + return sb.ToString(); + } + + /// + /// Returns the object from JSON string + /// + /// BaseList object + public static BaseList FromJson(string json) + { + var obj = JsonConvert.DeserializeObject(json, JsonSetting.AnyOfConvertSetting); + if (obj == null) + return null; + return obj.Type.ToLower() == obj.GetType().Name.ToLower() ? obj : null; + } + + /// + /// Creates a new instance with the same properties. + /// + /// BaseList object + public virtual BaseList DuplicateBaseList() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateBaseList(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel DuplicateOpenAPIGenBaseModel() + { + return DuplicateBaseList(); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + input = input is AnyOf anyOf ? anyOf.Obj : input; + return this.Equals(input as BaseList); + } + + /// + /// Returns true if BaseList instances are equal + /// + /// Instance of BaseList to be compared + /// Boolean + public bool Equals(BaseList input) + { + if (input == null) + return false; + return base.Equals(input) && + ( + this.HasMore == input.HasMore || + (this.HasMore != null && + this.HasMore.Equals(input.HasMore)) + ) && base.Equals(input) && + ( + this.Data == input.Data || + this.Data != null && + input.Data != null && + this.Data.SequenceEqual(input.Data) + ) && base.Equals(input) && + ( + this.Type == input.Type || + (this.Type != null && + this.Type.Equals(input.Type)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = base.GetHashCode(); + if (this.HasMore != null) + hashCode = hashCode * 59 + this.HasMore.GetHashCode(); + if (this.Data != null) + hashCode = hashCode * 59 + this.Data.GetHashCode(); + if (this.Type != null) + hashCode = hashCode * 59 + this.Type.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + foreach(var x in base.BaseValidate(validationContext)) yield return x; + + + // Type (string) pattern + Regex regexType = new Regex(@"^BaseList$", RegexOptions.CultureInvariant); + if (false == regexType.Match(this.Type).Success) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Type, must match a pattern of " + regexType, new [] { "Type" }); + } + + yield break; + } + } +} diff --git a/src/PollinationSDK/Model/CardPublic.cs b/src/PollinationSDK/Model/CardPublic.cs new file mode 100644 index 000000000..3c225bacd --- /dev/null +++ b/src/PollinationSDK/Model/CardPublic.cs @@ -0,0 +1,239 @@ +/* + * pollination-server + * + * Pollination Server OpenAPI Definition + * + * Contact: info@pollination.cloud + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; + + +namespace PollinationSDK +{ + /// + /// CardPublic + /// + [DataContract(Name = "CardPublic")] + public partial class CardPublic : OpenAPIGenBaseModel, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected CardPublic() + { + // Set non-required readonly properties with defaultValue + this.Type = "CardPublic"; + } + + /// + /// Initializes a new instance of the class. + /// + /// The last four digits of the card (required). + /// The month the card expires (required). + /// The year the card expires (required). + public CardPublic + ( + string last4, int expMonth, int expYear// Required parameters + // Optional parameters + ) : base()// BaseClass + { + // to ensure "last4" is required (not null) + this.Last4 = last4 ?? throw new ArgumentNullException("last4 is a required property for CardPublic and cannot be null"); + this.ExpMonth = expMonth; + this.ExpYear = expYear; + + // Set non-required readonly properties with defaultValue + this.Type = "CardPublic"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "CardPublic"; + + /// + /// The last four digits of the card + /// + /// The last four digits of the card + [DataMember(Name = "last4", IsRequired = true, EmitDefaultValue = false)] + public string Last4 { get; set; } + /// + /// The month the card expires + /// + /// The month the card expires + [DataMember(Name = "exp_month", IsRequired = true, EmitDefaultValue = false)] + public int ExpMonth { get; set; } + /// + /// The year the card expires + /// + /// The year the card expires + [DataMember(Name = "exp_year", IsRequired = true, EmitDefaultValue = false)] + public int ExpYear { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + return "CardPublic"; + } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString(bool detailed) + { + if (!detailed) + return this.ToString(); + + var sb = new StringBuilder(); + sb.Append("CardPublic:\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Last4: ").Append(Last4).Append("\n"); + sb.Append(" ExpMonth: ").Append(ExpMonth).Append("\n"); + sb.Append(" ExpYear: ").Append(ExpYear).Append("\n"); + return sb.ToString(); + } + + /// + /// Returns the object from JSON string + /// + /// CardPublic object + public static CardPublic FromJson(string json) + { + var obj = JsonConvert.DeserializeObject(json, JsonSetting.AnyOfConvertSetting); + if (obj == null) + return null; + return obj.Type.ToLower() == obj.GetType().Name.ToLower() ? obj : null; + } + + /// + /// Creates a new instance with the same properties. + /// + /// CardPublic object + public virtual CardPublic DuplicateCardPublic() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateCardPublic(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel DuplicateOpenAPIGenBaseModel() + { + return DuplicateCardPublic(); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + input = input is AnyOf anyOf ? anyOf.Obj : input; + return this.Equals(input as CardPublic); + } + + /// + /// Returns true if CardPublic instances are equal + /// + /// Instance of CardPublic to be compared + /// Boolean + public bool Equals(CardPublic input) + { + if (input == null) + return false; + return base.Equals(input) && + ( + this.Last4 == input.Last4 || + (this.Last4 != null && + this.Last4.Equals(input.Last4)) + ) && base.Equals(input) && + ( + this.ExpMonth == input.ExpMonth || + (this.ExpMonth != null && + this.ExpMonth.Equals(input.ExpMonth)) + ) && base.Equals(input) && + ( + this.ExpYear == input.ExpYear || + (this.ExpYear != null && + this.ExpYear.Equals(input.ExpYear)) + ) && base.Equals(input) && + ( + this.Type == input.Type || + (this.Type != null && + this.Type.Equals(input.Type)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = base.GetHashCode(); + if (this.Last4 != null) + hashCode = hashCode * 59 + this.Last4.GetHashCode(); + if (this.ExpMonth != null) + hashCode = hashCode * 59 + this.ExpMonth.GetHashCode(); + if (this.ExpYear != null) + hashCode = hashCode * 59 + this.ExpYear.GetHashCode(); + if (this.Type != null) + hashCode = hashCode * 59 + this.Type.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + foreach(var x in base.BaseValidate(validationContext)) yield return x; + + + // Type (string) pattern + Regex regexType = new Regex(@"^CardPublic$", RegexOptions.CultureInvariant); + if (false == regexType.Match(this.Type).Success) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Type, must match a pattern of " + regexType, new [] { "Type" }); + } + + yield break; + } + } +} diff --git a/src/PollinationSDK/Model/Coupon.cs b/src/PollinationSDK/Model/Coupon.cs new file mode 100644 index 000000000..36b3cb2b4 --- /dev/null +++ b/src/PollinationSDK/Model/Coupon.cs @@ -0,0 +1,285 @@ +/* + * pollination-server + * + * Pollination Server OpenAPI Definition + * + * Contact: info@pollination.cloud + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; + + +namespace PollinationSDK +{ + /// + /// Coupon + /// + [DataContract(Name = "Coupon")] + public partial class Coupon : ExternalResource, IEquatable, IValidatableObject + { + /// + /// Gets or Sets Duration + /// + [DataMember(Name="duration", EmitDefaultValue=false)] + public CouponDuration Duration { get; set; } + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected Coupon() + { + // Set non-required readonly properties with defaultValue + this.Type = "Coupon"; + } + + /// + /// Initializes a new instance of the class. + /// + /// name (required). + /// valid (required). + /// duration (required). + /// amountOff. + /// percentOff. + /// durationInMonths. + /// id (required). + /// metadata. + public Coupon + ( + string id, string name, bool valid, CouponDuration duration, // Required parameters + Object metadata= default, double amountOff= default, double percentOff= default, int durationInMonths= default // Optional parameters + ) : base(id: id, metadata: metadata)// BaseClass + { + // to ensure "name" is required (not null) + this.Name = name ?? throw new ArgumentNullException("name is a required property for Coupon and cannot be null"); + this.Valid = valid; + this.Duration = duration; + this.AmountOff = amountOff; + this.PercentOff = percentOff; + this.DurationInMonths = durationInMonths; + + // Set non-required readonly properties with defaultValue + this.Type = "Coupon"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "Coupon"; + + /// + /// Gets or Sets Name + /// + [DataMember(Name = "name", IsRequired = true, EmitDefaultValue = false)] + public string Name { get; set; } + /// + /// Gets or Sets Valid + /// + [DataMember(Name = "valid", IsRequired = true, EmitDefaultValue = false)] + public bool Valid { get; set; } + /// + /// Gets or Sets AmountOff + /// + [DataMember(Name = "amount_off", EmitDefaultValue = false)] + public double AmountOff { get; set; } + /// + /// Gets or Sets PercentOff + /// + [DataMember(Name = "percent_off", EmitDefaultValue = false)] + public double PercentOff { get; set; } + /// + /// Gets or Sets DurationInMonths + /// + [DataMember(Name = "duration_in_months", EmitDefaultValue = false)] + public int DurationInMonths { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + return "Coupon"; + } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString(bool detailed) + { + if (!detailed) + return this.ToString(); + + var sb = new StringBuilder(); + sb.Append("Coupon:\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Id: ").Append(Id).Append("\n"); + sb.Append(" Metadata: ").Append(Metadata).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Valid: ").Append(Valid).Append("\n"); + sb.Append(" Duration: ").Append(Duration).Append("\n"); + sb.Append(" AmountOff: ").Append(AmountOff).Append("\n"); + sb.Append(" PercentOff: ").Append(PercentOff).Append("\n"); + sb.Append(" DurationInMonths: ").Append(DurationInMonths).Append("\n"); + return sb.ToString(); + } + + /// + /// Returns the object from JSON string + /// + /// Coupon object + public static Coupon FromJson(string json) + { + var obj = JsonConvert.DeserializeObject(json, JsonSetting.AnyOfConvertSetting); + if (obj == null) + return null; + return obj.Type.ToLower() == obj.GetType().Name.ToLower() ? obj : null; + } + + /// + /// Creates a new instance with the same properties. + /// + /// Coupon object + public virtual Coupon DuplicateCoupon() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateCoupon(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override ExternalResource DuplicateExternalResource() + { + return DuplicateCoupon(); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + input = input is AnyOf anyOf ? anyOf.Obj : input; + return this.Equals(input as Coupon); + } + + /// + /// Returns true if Coupon instances are equal + /// + /// Instance of Coupon to be compared + /// Boolean + public bool Equals(Coupon input) + { + if (input == null) + return false; + return base.Equals(input) && + ( + this.Name == input.Name || + (this.Name != null && + this.Name.Equals(input.Name)) + ) && base.Equals(input) && + ( + this.Valid == input.Valid || + (this.Valid != null && + this.Valid.Equals(input.Valid)) + ) && base.Equals(input) && + ( + this.Duration == input.Duration || + (this.Duration != null && + this.Duration.Equals(input.Duration)) + ) && base.Equals(input) && + ( + this.AmountOff == input.AmountOff || + (this.AmountOff != null && + this.AmountOff.Equals(input.AmountOff)) + ) && base.Equals(input) && + ( + this.PercentOff == input.PercentOff || + (this.PercentOff != null && + this.PercentOff.Equals(input.PercentOff)) + ) && base.Equals(input) && + ( + this.DurationInMonths == input.DurationInMonths || + (this.DurationInMonths != null && + this.DurationInMonths.Equals(input.DurationInMonths)) + ) && base.Equals(input) && + ( + this.Type == input.Type || + (this.Type != null && + this.Type.Equals(input.Type)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = base.GetHashCode(); + if (this.Name != null) + hashCode = hashCode * 59 + this.Name.GetHashCode(); + if (this.Valid != null) + hashCode = hashCode * 59 + this.Valid.GetHashCode(); + if (this.Duration != null) + hashCode = hashCode * 59 + this.Duration.GetHashCode(); + if (this.AmountOff != null) + hashCode = hashCode * 59 + this.AmountOff.GetHashCode(); + if (this.PercentOff != null) + hashCode = hashCode * 59 + this.PercentOff.GetHashCode(); + if (this.DurationInMonths != null) + hashCode = hashCode * 59 + this.DurationInMonths.GetHashCode(); + if (this.Type != null) + hashCode = hashCode * 59 + this.Type.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + foreach(var x in base.BaseValidate(validationContext)) yield return x; + + + // Type (string) pattern + Regex regexType = new Regex(@"^Coupon$", RegexOptions.CultureInvariant); + if (false == regexType.Match(this.Type).Success) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Type, must match a pattern of " + regexType, new [] { "Type" }); + } + + yield break; + } + } +} diff --git a/src/PollinationSDK/Model/CouponDuration.cs b/src/PollinationSDK/Model/CouponDuration.cs new file mode 100644 index 000000000..a35176bf3 --- /dev/null +++ b/src/PollinationSDK/Model/CouponDuration.cs @@ -0,0 +1,55 @@ +/* + * pollination-server + * + * Pollination Server OpenAPI Definition + * + * Contact: info@pollination.cloud + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; + + +namespace PollinationSDK +{ + /// + /// An enumeration. + /// + /// An enumeration. + + [JsonConverter(typeof(StringEnumConverter))] + + public enum CouponDuration + { + /// + /// Enum Forever for value: forever + /// + [EnumMember(Value = "forever")] + Forever = 1, + + /// + /// Enum Once for value: once + /// + [EnumMember(Value = "once")] + Once = 2, + + /// + /// Enum Repeating for value: repeating + /// + [EnumMember(Value = "repeating")] + Repeating = 3 + + } + +} diff --git a/src/PollinationSDK/Model/CryptlexBase.cs b/src/PollinationSDK/Model/CryptlexBase.cs new file mode 100644 index 000000000..c3ad5f974 --- /dev/null +++ b/src/PollinationSDK/Model/CryptlexBase.cs @@ -0,0 +1,191 @@ +/* + * pollination-server + * + * Pollination Server OpenAPI Definition + * + * Contact: info@pollination.cloud + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; + + +namespace PollinationSDK +{ + /// + /// CryptlexBase + /// + [DataContract(Name = "CryptlexBase")] + public partial class CryptlexBase : OpenAPIGenBaseModel, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + public CryptlexBase + ( + // Required parameters + // Optional parameters + ) : base()// BaseClass + { + + // Set non-required readonly properties with defaultValue + this.Type = "CryptlexBase"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "CryptlexBase"; + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + return "CryptlexBase"; + } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString(bool detailed) + { + if (!detailed) + return this.ToString(); + + var sb = new StringBuilder(); + sb.Append("CryptlexBase:\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + return sb.ToString(); + } + + /// + /// Returns the object from JSON string + /// + /// CryptlexBase object + public static CryptlexBase FromJson(string json) + { + var obj = JsonConvert.DeserializeObject(json, JsonSetting.AnyOfConvertSetting); + if (obj == null) + return null; + return obj.Type.ToLower() == obj.GetType().Name.ToLower() ? obj : null; + } + + /// + /// Creates a new instance with the same properties. + /// + /// CryptlexBase object + public virtual CryptlexBase DuplicateCryptlexBase() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateCryptlexBase(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel DuplicateOpenAPIGenBaseModel() + { + return DuplicateCryptlexBase(); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + input = input is AnyOf anyOf ? anyOf.Obj : input; + return this.Equals(input as CryptlexBase); + } + + /// + /// Returns true if CryptlexBase instances are equal + /// + /// Instance of CryptlexBase to be compared + /// Boolean + public bool Equals(CryptlexBase input) + { + if (input == null) + return false; + return base.Equals(input) && + ( + this.Type == input.Type || + (this.Type != null && + this.Type.Equals(input.Type)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = base.GetHashCode(); + if (this.Type != null) + hashCode = hashCode * 59 + this.Type.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + return this.BaseValidate(validationContext); + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + protected IEnumerable BaseValidate(ValidationContext validationContext) + { + foreach(var x in base.BaseValidate(validationContext)) yield return x; + + + // Type (string) pattern + Regex regexType = new Regex(@"^CryptlexBase$", RegexOptions.CultureInvariant); + if (false == regexType.Match(this.Type).Success) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Type, must match a pattern of " + regexType, new [] { "Type" }); + } + + yield break; + } + } +} diff --git a/src/PollinationSDK/Model/DeleteSubscriptionItem.cs b/src/PollinationSDK/Model/DeleteSubscriptionItem.cs new file mode 100644 index 000000000..703c40a87 --- /dev/null +++ b/src/PollinationSDK/Model/DeleteSubscriptionItem.cs @@ -0,0 +1,209 @@ +/* + * pollination-server + * + * Pollination Server OpenAPI Definition + * + * Contact: info@pollination.cloud + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; + + +namespace PollinationSDK +{ + /// + /// DeleteSubscriptionItem + /// + [DataContract(Name = "DeleteSubscriptionItem")] + public partial class DeleteSubscriptionItem : SubscriptionItem, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected DeleteSubscriptionItem() + { + // Set non-required readonly properties with defaultValue + this.Type = "DeleteSubscriptionItem"; + } + + /// + /// Initializes a new instance of the class. + /// + /// deleted (default to true). + /// id (required). + /// metadata. + public DeleteSubscriptionItem + ( + string id, // Required parameters + Object metadata= default, bool deleted = true // Optional parameters + ) : base(id: id, metadata: metadata)// BaseClass + { + this.Deleted = deleted; + + // Set non-required readonly properties with defaultValue + this.Type = "DeleteSubscriptionItem"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "DeleteSubscriptionItem"; + + /// + /// Gets or Sets Deleted + /// + [DataMember(Name = "deleted", EmitDefaultValue = true)] + public bool Deleted { get; set; } = true; + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + return "DeleteSubscriptionItem"; + } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString(bool detailed) + { + if (!detailed) + return this.ToString(); + + var sb = new StringBuilder(); + sb.Append("DeleteSubscriptionItem:\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Id: ").Append(Id).Append("\n"); + sb.Append(" Metadata: ").Append(Metadata).Append("\n"); + sb.Append(" Deleted: ").Append(Deleted).Append("\n"); + return sb.ToString(); + } + + /// + /// Returns the object from JSON string + /// + /// DeleteSubscriptionItem object + public static DeleteSubscriptionItem FromJson(string json) + { + var obj = JsonConvert.DeserializeObject(json, JsonSetting.AnyOfConvertSetting); + if (obj == null) + return null; + return obj.Type.ToLower() == obj.GetType().Name.ToLower() ? obj : null; + } + + /// + /// Creates a new instance with the same properties. + /// + /// DeleteSubscriptionItem object + public virtual DeleteSubscriptionItem DuplicateDeleteSubscriptionItem() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateDeleteSubscriptionItem(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override SubscriptionItem DuplicateSubscriptionItem() + { + return DuplicateDeleteSubscriptionItem(); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + input = input is AnyOf anyOf ? anyOf.Obj : input; + return this.Equals(input as DeleteSubscriptionItem); + } + + /// + /// Returns true if DeleteSubscriptionItem instances are equal + /// + /// Instance of DeleteSubscriptionItem to be compared + /// Boolean + public bool Equals(DeleteSubscriptionItem input) + { + if (input == null) + return false; + return base.Equals(input) && + ( + this.Deleted == input.Deleted || + (this.Deleted != null && + this.Deleted.Equals(input.Deleted)) + ) && base.Equals(input) && + ( + this.Type == input.Type || + (this.Type != null && + this.Type.Equals(input.Type)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = base.GetHashCode(); + if (this.Deleted != null) + hashCode = hashCode * 59 + this.Deleted.GetHashCode(); + if (this.Type != null) + hashCode = hashCode * 59 + this.Type.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + foreach(var x in base.BaseValidate(validationContext)) yield return x; + + + // Type (string) pattern + Regex regexType = new Regex(@"^DeleteSubscriptionItem$", RegexOptions.CultureInvariant); + if (false == regexType.Match(this.Type).Success) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Type, must match a pattern of " + regexType, new [] { "Type" }); + } + + yield break; + } + } +} diff --git a/src/PollinationSDK/Model/Discount.cs b/src/PollinationSDK/Model/Discount.cs new file mode 100644 index 000000000..328ff138b --- /dev/null +++ b/src/PollinationSDK/Model/Discount.cs @@ -0,0 +1,255 @@ +/* + * pollination-server + * + * Pollination Server OpenAPI Definition + * + * Contact: info@pollination.cloud + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; + + +namespace PollinationSDK +{ + /// + /// Discount + /// + [DataContract(Name = "Discount")] + public partial class Discount : ExternalResource, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected Discount() + { + // Set non-required readonly properties with defaultValue + this.Type = "Discount"; + } + + /// + /// Initializes a new instance of the class. + /// + /// start (required). + /// coupon (required). + /// end. + /// promotionCode. + /// id (required). + /// metadata. + public Discount + ( + string id, DateTime start, Coupon coupon, // Required parameters + Object metadata= default, DateTime end= default, string promotionCode= default // Optional parameters + ) : base(id: id, metadata: metadata)// BaseClass + { + this.Start = start; + // to ensure "coupon" is required (not null) + this.Coupon = coupon ?? throw new ArgumentNullException("coupon is a required property for Discount and cannot be null"); + this.End = end; + this.PromotionCode = promotionCode; + + // Set non-required readonly properties with defaultValue + this.Type = "Discount"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "Discount"; + + /// + /// Gets or Sets Start + /// + [DataMember(Name = "start", IsRequired = true, EmitDefaultValue = false)] + public DateTime Start { get; set; } + /// + /// Gets or Sets Coupon + /// + [DataMember(Name = "coupon", IsRequired = true, EmitDefaultValue = false)] + public Coupon Coupon { get; set; } + /// + /// Gets or Sets End + /// + [DataMember(Name = "end", EmitDefaultValue = false)] + public DateTime End { get; set; } + /// + /// Gets or Sets PromotionCode + /// + [DataMember(Name = "promotion_code", EmitDefaultValue = false)] + public string PromotionCode { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + return "Discount"; + } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString(bool detailed) + { + if (!detailed) + return this.ToString(); + + var sb = new StringBuilder(); + sb.Append("Discount:\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Id: ").Append(Id).Append("\n"); + sb.Append(" Metadata: ").Append(Metadata).Append("\n"); + sb.Append(" Start: ").Append(Start).Append("\n"); + sb.Append(" Coupon: ").Append(Coupon).Append("\n"); + sb.Append(" End: ").Append(End).Append("\n"); + sb.Append(" PromotionCode: ").Append(PromotionCode).Append("\n"); + return sb.ToString(); + } + + /// + /// Returns the object from JSON string + /// + /// Discount object + public static Discount FromJson(string json) + { + var obj = JsonConvert.DeserializeObject(json, JsonSetting.AnyOfConvertSetting); + if (obj == null) + return null; + return obj.Type.ToLower() == obj.GetType().Name.ToLower() ? obj : null; + } + + /// + /// Creates a new instance with the same properties. + /// + /// Discount object + public virtual Discount DuplicateDiscount() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateDiscount(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override ExternalResource DuplicateExternalResource() + { + return DuplicateDiscount(); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + input = input is AnyOf anyOf ? anyOf.Obj : input; + return this.Equals(input as Discount); + } + + /// + /// Returns true if Discount instances are equal + /// + /// Instance of Discount to be compared + /// Boolean + public bool Equals(Discount input) + { + if (input == null) + return false; + return base.Equals(input) && + ( + this.Start == input.Start || + (this.Start != null && + this.Start.Equals(input.Start)) + ) && base.Equals(input) && + ( + this.Coupon == input.Coupon || + (this.Coupon != null && + this.Coupon.Equals(input.Coupon)) + ) && base.Equals(input) && + ( + this.End == input.End || + (this.End != null && + this.End.Equals(input.End)) + ) && base.Equals(input) && + ( + this.PromotionCode == input.PromotionCode || + (this.PromotionCode != null && + this.PromotionCode.Equals(input.PromotionCode)) + ) && base.Equals(input) && + ( + this.Type == input.Type || + (this.Type != null && + this.Type.Equals(input.Type)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = base.GetHashCode(); + if (this.Start != null) + hashCode = hashCode * 59 + this.Start.GetHashCode(); + if (this.Coupon != null) + hashCode = hashCode * 59 + this.Coupon.GetHashCode(); + if (this.End != null) + hashCode = hashCode * 59 + this.End.GetHashCode(); + if (this.PromotionCode != null) + hashCode = hashCode * 59 + this.PromotionCode.GetHashCode(); + if (this.Type != null) + hashCode = hashCode * 59 + this.Type.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + foreach(var x in base.BaseValidate(validationContext)) yield return x; + + + // Type (string) pattern + Regex regexType = new Regex(@"^Discount$", RegexOptions.CultureInvariant); + if (false == regexType.Match(this.Type).Success) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Type, must match a pattern of " + regexType, new [] { "Type" }); + } + + yield break; + } + } +} diff --git a/src/PollinationSDK/Model/DiscountAmount.cs b/src/PollinationSDK/Model/DiscountAmount.cs new file mode 100644 index 000000000..6578191eb --- /dev/null +++ b/src/PollinationSDK/Model/DiscountAmount.cs @@ -0,0 +1,221 @@ +/* + * pollination-server + * + * Pollination Server OpenAPI Definition + * + * Contact: info@pollination.cloud + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; + + +namespace PollinationSDK +{ + /// + /// DiscountAmount + /// + [DataContract(Name = "DiscountAmount")] + public partial class DiscountAmount : OpenAPIGenBaseModel, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected DiscountAmount() + { + // Set non-required readonly properties with defaultValue + this.Type = "DiscountAmount"; + } + + /// + /// Initializes a new instance of the class. + /// + /// discount (required). + /// amount (required). + public DiscountAmount + ( + string discount, int amount// Required parameters + // Optional parameters + ) : base()// BaseClass + { + // to ensure "discount" is required (not null) + this.Discount = discount ?? throw new ArgumentNullException("discount is a required property for DiscountAmount and cannot be null"); + this.Amount = amount; + + // Set non-required readonly properties with defaultValue + this.Type = "DiscountAmount"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "DiscountAmount"; + + /// + /// Gets or Sets Discount + /// + [DataMember(Name = "discount", IsRequired = true, EmitDefaultValue = false)] + public string Discount { get; set; } + /// + /// Gets or Sets Amount + /// + [DataMember(Name = "amount", IsRequired = true, EmitDefaultValue = false)] + public int Amount { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + return "DiscountAmount"; + } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString(bool detailed) + { + if (!detailed) + return this.ToString(); + + var sb = new StringBuilder(); + sb.Append("DiscountAmount:\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Discount: ").Append(Discount).Append("\n"); + sb.Append(" Amount: ").Append(Amount).Append("\n"); + return sb.ToString(); + } + + /// + /// Returns the object from JSON string + /// + /// DiscountAmount object + public static DiscountAmount FromJson(string json) + { + var obj = JsonConvert.DeserializeObject(json, JsonSetting.AnyOfConvertSetting); + if (obj == null) + return null; + return obj.Type.ToLower() == obj.GetType().Name.ToLower() ? obj : null; + } + + /// + /// Creates a new instance with the same properties. + /// + /// DiscountAmount object + public virtual DiscountAmount DuplicateDiscountAmount() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateDiscountAmount(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel DuplicateOpenAPIGenBaseModel() + { + return DuplicateDiscountAmount(); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + input = input is AnyOf anyOf ? anyOf.Obj : input; + return this.Equals(input as DiscountAmount); + } + + /// + /// Returns true if DiscountAmount instances are equal + /// + /// Instance of DiscountAmount to be compared + /// Boolean + public bool Equals(DiscountAmount input) + { + if (input == null) + return false; + return base.Equals(input) && + ( + this.Discount == input.Discount || + (this.Discount != null && + this.Discount.Equals(input.Discount)) + ) && base.Equals(input) && + ( + this.Amount == input.Amount || + (this.Amount != null && + this.Amount.Equals(input.Amount)) + ) && base.Equals(input) && + ( + this.Type == input.Type || + (this.Type != null && + this.Type.Equals(input.Type)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = base.GetHashCode(); + if (this.Discount != null) + hashCode = hashCode * 59 + this.Discount.GetHashCode(); + if (this.Amount != null) + hashCode = hashCode * 59 + this.Amount.GetHashCode(); + if (this.Type != null) + hashCode = hashCode * 59 + this.Type.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + foreach(var x in base.BaseValidate(validationContext)) yield return x; + + + // Type (string) pattern + Regex regexType = new Regex(@"^DiscountAmount$", RegexOptions.CultureInvariant); + if (false == regexType.Match(this.Type).Success) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Type, must match a pattern of " + regexType, new [] { "Type" }); + } + + yield break; + } + } +} diff --git a/src/PollinationSDK/Model/ExternalResource.cs b/src/PollinationSDK/Model/ExternalResource.cs new file mode 100644 index 000000000..1d2dce8a3 --- /dev/null +++ b/src/PollinationSDK/Model/ExternalResource.cs @@ -0,0 +1,231 @@ +/* + * pollination-server + * + * Pollination Server OpenAPI Definition + * + * Contact: info@pollination.cloud + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; + + +namespace PollinationSDK +{ + /// + /// ExternalResource + /// + [DataContract(Name = "ExternalResource")] + public partial class ExternalResource : OpenAPIGenBaseModel, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected ExternalResource() + { + // Set non-required readonly properties with defaultValue + this.Type = "ExternalResource"; + } + + /// + /// Initializes a new instance of the class. + /// + /// id (required). + /// metadata. + public ExternalResource + ( + string id, // Required parameters + Object metadata= default // Optional parameters + ) : base()// BaseClass + { + // to ensure "id" is required (not null) + this.Id = id ?? throw new ArgumentNullException("id is a required property for ExternalResource and cannot be null"); + this.Metadata = metadata; + + // Set non-required readonly properties with defaultValue + this.Type = "ExternalResource"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "ExternalResource"; + + /// + /// Gets or Sets Id + /// + [DataMember(Name = "id", IsRequired = true, EmitDefaultValue = false)] + public string Id { get; set; } + /// + /// Gets or Sets Metadata + /// + [DataMember(Name = "metadata", EmitDefaultValue = false)] + public Object Metadata { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + return "ExternalResource"; + } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString(bool detailed) + { + if (!detailed) + return this.ToString(); + + var sb = new StringBuilder(); + sb.Append("ExternalResource:\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Id: ").Append(Id).Append("\n"); + sb.Append(" Metadata: ").Append(Metadata).Append("\n"); + return sb.ToString(); + } + + /// + /// Returns the object from JSON string + /// + /// ExternalResource object + public static ExternalResource FromJson(string json) + { + var obj = JsonConvert.DeserializeObject(json, JsonSetting.AnyOfConvertSetting); + if (obj == null) + return null; + return obj.Type.ToLower() == obj.GetType().Name.ToLower() ? obj : null; + } + + /// + /// Creates a new instance with the same properties. + /// + /// ExternalResource object + public virtual ExternalResource DuplicateExternalResource() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateExternalResource(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel DuplicateOpenAPIGenBaseModel() + { + return DuplicateExternalResource(); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + input = input is AnyOf anyOf ? anyOf.Obj : input; + return this.Equals(input as ExternalResource); + } + + /// + /// Returns true if ExternalResource instances are equal + /// + /// Instance of ExternalResource to be compared + /// Boolean + public bool Equals(ExternalResource input) + { + if (input == null) + return false; + return base.Equals(input) && + ( + this.Id == input.Id || + (this.Id != null && + this.Id.Equals(input.Id)) + ) && base.Equals(input) && + ( + this.Metadata == input.Metadata || + (this.Metadata != null && + this.Metadata.Equals(input.Metadata)) + ) && base.Equals(input) && + ( + this.Type == input.Type || + (this.Type != null && + this.Type.Equals(input.Type)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = base.GetHashCode(); + if (this.Id != null) + hashCode = hashCode * 59 + this.Id.GetHashCode(); + if (this.Metadata != null) + hashCode = hashCode * 59 + this.Metadata.GetHashCode(); + if (this.Type != null) + hashCode = hashCode * 59 + this.Type.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + return this.BaseValidate(validationContext); + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + protected IEnumerable BaseValidate(ValidationContext validationContext) + { + foreach(var x in base.BaseValidate(validationContext)) yield return x; + + + // Type (string) pattern + Regex regexType = new Regex(@"^ExternalResource$", RegexOptions.CultureInvariant); + if (false == regexType.Match(this.Type).Success) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Type, must match a pattern of " + regexType, new [] { "Type" }); + } + + yield break; + } + } +} diff --git a/src/PollinationSDK/Model/HTTPValidationError.cs b/src/PollinationSDK/Model/HTTPValidationError.cs new file mode 100644 index 000000000..d5bb3543e --- /dev/null +++ b/src/PollinationSDK/Model/HTTPValidationError.cs @@ -0,0 +1,163 @@ +/* + * pollination-server + * + * Pollination Server OpenAPI Definition + * + * Contact: info@pollination.cloud + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; + + +namespace PollinationSDK +{ + /// + /// HTTPValidationError + /// + [DataContract(Name = "HTTPValidationError")] + public partial class HTTPValidationError : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// detail. + public HTTPValidationError + ( + // Required parameters + List detail= default// Optional parameters + )// BaseClass + { + this.Detail = detail; + + // Set non-required readonly properties with defaultValue + } + + + /// + /// Gets or Sets Detail + /// + [DataMember(Name = "detail", EmitDefaultValue = false)] + public List Detail { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + return "HTTPValidationError"; + } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString(bool detailed) + { + if (!detailed) + return this.ToString(); + + var sb = new StringBuilder(); + sb.Append("HTTPValidationError:\n"); + sb.Append(" Detail: ").Append(Detail).Append("\n"); + return sb.ToString(); + } + + /// + /// Returns the object from JSON string + /// + /// HTTPValidationError object + public static HTTPValidationError FromJson(string json) + { + var obj = JsonConvert.DeserializeObject(json, JsonSetting.AnyOfConvertSetting); + if (obj == null) + return null; + return obj.Type.ToLower() == obj.GetType().Name.ToLower() ? obj : null; + } + + /// + /// Creates a new instance with the same properties. + /// + /// HTTPValidationError object + public virtual HTTPValidationError DuplicateHTTPValidationError() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateHTTPValidationError(); + } + + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + input = input is AnyOf anyOf ? anyOf.Obj : input; + return this.Equals(input as HTTPValidationError); + } + + /// + /// Returns true if HTTPValidationError instances are equal + /// + /// Instance of HTTPValidationError to be compared + /// Boolean + public bool Equals(HTTPValidationError input) + { + if (input == null) + return false; + return + ( + this.Detail == input.Detail || + this.Detail != null && + input.Detail != null && + this.Detail.SequenceEqual(input.Detail) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Detail != null) + hashCode = hashCode * 59 + this.Detail.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } +} diff --git a/src/PollinationSDK/Model/Inventory.cs b/src/PollinationSDK/Model/Inventory.cs new file mode 100644 index 000000000..c6530e109 --- /dev/null +++ b/src/PollinationSDK/Model/Inventory.cs @@ -0,0 +1,207 @@ +/* + * pollination-server + * + * Pollination Server OpenAPI Definition + * + * Contact: info@pollination.cloud + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; + + +namespace PollinationSDK +{ + /// + /// Inventory + /// + [DataContract(Name = "Inventory")] + public partial class Inventory : OpenAPIGenBaseModel, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected Inventory() + { + // Set non-required readonly properties with defaultValue + this.Type = "Inventory"; + } + + /// + /// Initializes a new instance of the class. + /// + /// families (required). + public Inventory + ( + List families// Required parameters + // Optional parameters + ) : base()// BaseClass + { + // to ensure "families" is required (not null) + this.Families = families ?? throw new ArgumentNullException("families is a required property for Inventory and cannot be null"); + + // Set non-required readonly properties with defaultValue + this.Type = "Inventory"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "Inventory"; + + /// + /// Gets or Sets Families + /// + [DataMember(Name = "families", IsRequired = true, EmitDefaultValue = false)] + public List Families { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + return "Inventory"; + } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString(bool detailed) + { + if (!detailed) + return this.ToString(); + + var sb = new StringBuilder(); + sb.Append("Inventory:\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Families: ").Append(Families).Append("\n"); + return sb.ToString(); + } + + /// + /// Returns the object from JSON string + /// + /// Inventory object + public static Inventory FromJson(string json) + { + var obj = JsonConvert.DeserializeObject(json, JsonSetting.AnyOfConvertSetting); + if (obj == null) + return null; + return obj.Type.ToLower() == obj.GetType().Name.ToLower() ? obj : null; + } + + /// + /// Creates a new instance with the same properties. + /// + /// Inventory object + public virtual Inventory DuplicateInventory() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateInventory(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel DuplicateOpenAPIGenBaseModel() + { + return DuplicateInventory(); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + input = input is AnyOf anyOf ? anyOf.Obj : input; + return this.Equals(input as Inventory); + } + + /// + /// Returns true if Inventory instances are equal + /// + /// Instance of Inventory to be compared + /// Boolean + public bool Equals(Inventory input) + { + if (input == null) + return false; + return base.Equals(input) && + ( + this.Families == input.Families || + this.Families != null && + input.Families != null && + this.Families.SequenceEqual(input.Families) + ) && base.Equals(input) && + ( + this.Type == input.Type || + (this.Type != null && + this.Type.Equals(input.Type)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = base.GetHashCode(); + if (this.Families != null) + hashCode = hashCode * 59 + this.Families.GetHashCode(); + if (this.Type != null) + hashCode = hashCode * 59 + this.Type.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + foreach(var x in base.BaseValidate(validationContext)) yield return x; + + + // Type (string) pattern + Regex regexType = new Regex(@"^Inventory$", RegexOptions.CultureInvariant); + if (false == regexType.Match(this.Type).Success) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Type, must match a pattern of " + regexType, new [] { "Type" }); + } + + yield break; + } + } +} diff --git a/src/PollinationSDK/Model/Invoice.cs b/src/PollinationSDK/Model/Invoice.cs new file mode 100644 index 000000000..f4f8e206b --- /dev/null +++ b/src/PollinationSDK/Model/Invoice.cs @@ -0,0 +1,224 @@ +/* + * pollination-server + * + * Pollination Server OpenAPI Definition + * + * Contact: info@pollination.cloud + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; + + +namespace PollinationSDK +{ + /// + /// Invoice + /// + [DataContract(Name = "Invoice")] + public partial class Invoice : InvoicePreview, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected Invoice() + { + // Set non-required readonly properties with defaultValue + this.Type = "Invoice"; + } + + /// + /// Initializes a new instance of the class. + /// + /// collectionMethod (required). + /// currency (required). + /// customer (required). + /// lines (required). + /// periodStart (required). + /// periodEnd (required). + /// status (required). + /// statusTransitions (required). + /// subtotal (required). + /// total (required). + /// autoAdvance. + /// description. + /// hostedInvoiceUrl. + /// subscription. + /// discount. + /// totalDiscountAmounts. + /// The payment method that will be billed when this invoice is due.. + public Invoice + ( + string collectionMethod, string currency, string customer, LineItemList lines, DateTime periodStart, DateTime periodEnd, InvoiceStatus status, InvoiceStatusTransitions statusTransitions, int subtotal, int total, // Required parameters + bool autoAdvance= default, string description= default, string hostedInvoiceUrl= default, string subscription= default, Discount discount= default, List totalDiscountAmounts= default, CardPublic paymentMethod= default // Optional parameters + ) : base(collectionMethod: collectionMethod, currency: currency, customer: customer, lines: lines, periodStart: periodStart, periodEnd: periodEnd, status: status, statusTransitions: statusTransitions, subtotal: subtotal, total: total, autoAdvance: autoAdvance, description: description, hostedInvoiceUrl: hostedInvoiceUrl, subscription: subscription, discount: discount, totalDiscountAmounts: totalDiscountAmounts, paymentMethod: paymentMethod)// BaseClass + { + + // Set non-required readonly properties with defaultValue + this.Type = "Invoice"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "Invoice"; + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + return "Invoice"; + } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString(bool detailed) + { + if (!detailed) + return this.ToString(); + + var sb = new StringBuilder(); + sb.Append("Invoice:\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" CollectionMethod: ").Append(CollectionMethod).Append("\n"); + sb.Append(" Currency: ").Append(Currency).Append("\n"); + sb.Append(" Customer: ").Append(Customer).Append("\n"); + sb.Append(" Lines: ").Append(Lines).Append("\n"); + sb.Append(" PeriodStart: ").Append(PeriodStart).Append("\n"); + sb.Append(" PeriodEnd: ").Append(PeriodEnd).Append("\n"); + sb.Append(" Status: ").Append(Status).Append("\n"); + sb.Append(" StatusTransitions: ").Append(StatusTransitions).Append("\n"); + sb.Append(" Subtotal: ").Append(Subtotal).Append("\n"); + sb.Append(" Total: ").Append(Total).Append("\n"); + sb.Append(" AutoAdvance: ").Append(AutoAdvance).Append("\n"); + sb.Append(" Description: ").Append(Description).Append("\n"); + sb.Append(" HostedInvoiceUrl: ").Append(HostedInvoiceUrl).Append("\n"); + sb.Append(" Subscription: ").Append(Subscription).Append("\n"); + sb.Append(" Discount: ").Append(Discount).Append("\n"); + sb.Append(" TotalDiscountAmounts: ").Append(TotalDiscountAmounts).Append("\n"); + sb.Append(" PaymentMethod: ").Append(PaymentMethod).Append("\n"); + return sb.ToString(); + } + + /// + /// Returns the object from JSON string + /// + /// Invoice object + public static Invoice FromJson(string json) + { + var obj = JsonConvert.DeserializeObject(json, JsonSetting.AnyOfConvertSetting); + if (obj == null) + return null; + return obj.Type.ToLower() == obj.GetType().Name.ToLower() ? obj : null; + } + + /// + /// Creates a new instance with the same properties. + /// + /// Invoice object + public virtual Invoice DuplicateInvoice() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateInvoice(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override InvoicePreview DuplicateInvoicePreview() + { + return DuplicateInvoice(); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + input = input is AnyOf anyOf ? anyOf.Obj : input; + return this.Equals(input as Invoice); + } + + /// + /// Returns true if Invoice instances are equal + /// + /// Instance of Invoice to be compared + /// Boolean + public bool Equals(Invoice input) + { + if (input == null) + return false; + return base.Equals(input) && + ( + this.Type == input.Type || + (this.Type != null && + this.Type.Equals(input.Type)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = base.GetHashCode(); + if (this.Type != null) + hashCode = hashCode * 59 + this.Type.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + foreach(var x in base.BaseValidate(validationContext)) yield return x; + + + // Type (string) pattern + Regex regexType = new Regex(@"^Invoice$", RegexOptions.CultureInvariant); + if (false == regexType.Match(this.Type).Success) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Type, must match a pattern of " + regexType, new [] { "Type" }); + } + + yield break; + } + } +} diff --git a/src/PollinationSDK/Model/InvoiceList.cs b/src/PollinationSDK/Model/InvoiceList.cs new file mode 100644 index 000000000..f3af82250 --- /dev/null +++ b/src/PollinationSDK/Model/InvoiceList.cs @@ -0,0 +1,222 @@ +/* + * pollination-server + * + * Pollination Server OpenAPI Definition + * + * Contact: info@pollination.cloud + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; + + +namespace PollinationSDK +{ + /// + /// InvoiceList + /// + [DataContract(Name = "InvoiceList")] + public partial class InvoiceList : OpenAPIGenBaseModel, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected InvoiceList() + { + // Set non-required readonly properties with defaultValue + this.Type = "InvoiceList"; + } + + /// + /// Initializes a new instance of the class. + /// + /// resources (required). + /// hasMore (required). + public InvoiceList + ( + List resources, bool hasMore// Required parameters + // Optional parameters + ) : base()// BaseClass + { + // to ensure "resources" is required (not null) + this.Resources = resources ?? throw new ArgumentNullException("resources is a required property for InvoiceList and cannot be null"); + this.HasMore = hasMore; + + // Set non-required readonly properties with defaultValue + this.Type = "InvoiceList"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "InvoiceList"; + + /// + /// Gets or Sets Resources + /// + [DataMember(Name = "resources", IsRequired = true, EmitDefaultValue = false)] + public List Resources { get; set; } + /// + /// Gets or Sets HasMore + /// + [DataMember(Name = "has_more", IsRequired = true, EmitDefaultValue = false)] + public bool HasMore { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + return "InvoiceList"; + } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString(bool detailed) + { + if (!detailed) + return this.ToString(); + + var sb = new StringBuilder(); + sb.Append("InvoiceList:\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Resources: ").Append(Resources).Append("\n"); + sb.Append(" HasMore: ").Append(HasMore).Append("\n"); + return sb.ToString(); + } + + /// + /// Returns the object from JSON string + /// + /// InvoiceList object + public static InvoiceList FromJson(string json) + { + var obj = JsonConvert.DeserializeObject(json, JsonSetting.AnyOfConvertSetting); + if (obj == null) + return null; + return obj.Type.ToLower() == obj.GetType().Name.ToLower() ? obj : null; + } + + /// + /// Creates a new instance with the same properties. + /// + /// InvoiceList object + public virtual InvoiceList DuplicateInvoiceList() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateInvoiceList(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel DuplicateOpenAPIGenBaseModel() + { + return DuplicateInvoiceList(); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + input = input is AnyOf anyOf ? anyOf.Obj : input; + return this.Equals(input as InvoiceList); + } + + /// + /// Returns true if InvoiceList instances are equal + /// + /// Instance of InvoiceList to be compared + /// Boolean + public bool Equals(InvoiceList input) + { + if (input == null) + return false; + return base.Equals(input) && + ( + this.Resources == input.Resources || + this.Resources != null && + input.Resources != null && + this.Resources.SequenceEqual(input.Resources) + ) && base.Equals(input) && + ( + this.HasMore == input.HasMore || + (this.HasMore != null && + this.HasMore.Equals(input.HasMore)) + ) && base.Equals(input) && + ( + this.Type == input.Type || + (this.Type != null && + this.Type.Equals(input.Type)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = base.GetHashCode(); + if (this.Resources != null) + hashCode = hashCode * 59 + this.Resources.GetHashCode(); + if (this.HasMore != null) + hashCode = hashCode * 59 + this.HasMore.GetHashCode(); + if (this.Type != null) + hashCode = hashCode * 59 + this.Type.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + foreach(var x in base.BaseValidate(validationContext)) yield return x; + + + // Type (string) pattern + Regex regexType = new Regex(@"^InvoiceList$", RegexOptions.CultureInvariant); + if (false == regexType.Match(this.Type).Success) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Type, must match a pattern of " + regexType, new [] { "Type" }); + } + + yield break; + } + } +} diff --git a/src/PollinationSDK/Model/InvoicePreview.cs b/src/PollinationSDK/Model/InvoicePreview.cs new file mode 100644 index 000000000..fe20761b1 --- /dev/null +++ b/src/PollinationSDK/Model/InvoicePreview.cs @@ -0,0 +1,462 @@ +/* + * pollination-server + * + * Pollination Server OpenAPI Definition + * + * Contact: info@pollination.cloud + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; + + +namespace PollinationSDK +{ + /// + /// InvoicePreview + /// + [DataContract(Name = "InvoicePreview")] + public partial class InvoicePreview : OpenAPIGenBaseModel, IEquatable, IValidatableObject + { + /// + /// Gets or Sets Status + /// + [DataMember(Name="status", EmitDefaultValue=false)] + public InvoiceStatus Status { get; set; } + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected InvoicePreview() + { + // Set non-required readonly properties with defaultValue + this.Type = "InvoicePreview"; + } + + /// + /// Initializes a new instance of the class. + /// + /// collectionMethod (required). + /// currency (required). + /// customer (required). + /// lines (required). + /// periodStart (required). + /// periodEnd (required). + /// status (required). + /// statusTransitions (required). + /// subtotal (required). + /// total (required). + /// autoAdvance. + /// description. + /// hostedInvoiceUrl. + /// subscription. + /// discount. + /// totalDiscountAmounts. + /// The payment method that will be billed when this invoice is due.. + public InvoicePreview + ( + string collectionMethod, string currency, string customer, LineItemList lines, DateTime periodStart, DateTime periodEnd, InvoiceStatus status, InvoiceStatusTransitions statusTransitions, int subtotal, int total, // Required parameters + bool autoAdvance= default, string description= default, string hostedInvoiceUrl= default, string subscription= default, Discount discount= default, List totalDiscountAmounts= default, CardPublic paymentMethod= default // Optional parameters + ) : base()// BaseClass + { + // to ensure "collectionMethod" is required (not null) + this.CollectionMethod = collectionMethod ?? throw new ArgumentNullException("collectionMethod is a required property for InvoicePreview and cannot be null"); + // to ensure "currency" is required (not null) + this.Currency = currency ?? throw new ArgumentNullException("currency is a required property for InvoicePreview and cannot be null"); + // to ensure "customer" is required (not null) + this.Customer = customer ?? throw new ArgumentNullException("customer is a required property for InvoicePreview and cannot be null"); + // to ensure "lines" is required (not null) + this.Lines = lines ?? throw new ArgumentNullException("lines is a required property for InvoicePreview and cannot be null"); + this.PeriodStart = periodStart; + this.PeriodEnd = periodEnd; + this.Status = status; + // to ensure "statusTransitions" is required (not null) + this.StatusTransitions = statusTransitions ?? throw new ArgumentNullException("statusTransitions is a required property for InvoicePreview and cannot be null"); + this.Subtotal = subtotal; + this.Total = total; + this.AutoAdvance = autoAdvance; + this.Description = description; + this.HostedInvoiceUrl = hostedInvoiceUrl; + this.Subscription = subscription; + this.Discount = discount; + this.TotalDiscountAmounts = totalDiscountAmounts; + this.PaymentMethod = paymentMethod; + + // Set non-required readonly properties with defaultValue + this.Type = "InvoicePreview"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "InvoicePreview"; + + /// + /// Gets or Sets CollectionMethod + /// + [DataMember(Name = "collection_method", IsRequired = true, EmitDefaultValue = false)] + public string CollectionMethod { get; set; } + /// + /// Gets or Sets Currency + /// + [DataMember(Name = "currency", IsRequired = true, EmitDefaultValue = false)] + public string Currency { get; set; } + /// + /// Gets or Sets Customer + /// + [DataMember(Name = "customer", IsRequired = true, EmitDefaultValue = false)] + public string Customer { get; set; } + /// + /// Gets or Sets Lines + /// + [DataMember(Name = "lines", IsRequired = true, EmitDefaultValue = false)] + public LineItemList Lines { get; set; } + /// + /// Gets or Sets PeriodStart + /// + [DataMember(Name = "period_start", IsRequired = true, EmitDefaultValue = false)] + public DateTime PeriodStart { get; set; } + /// + /// Gets or Sets PeriodEnd + /// + [DataMember(Name = "period_end", IsRequired = true, EmitDefaultValue = false)] + public DateTime PeriodEnd { get; set; } + /// + /// Gets or Sets StatusTransitions + /// + [DataMember(Name = "status_transitions", IsRequired = true, EmitDefaultValue = false)] + public InvoiceStatusTransitions StatusTransitions { get; set; } + /// + /// Gets or Sets Subtotal + /// + [DataMember(Name = "subtotal", IsRequired = true, EmitDefaultValue = false)] + public int Subtotal { get; set; } + /// + /// Gets or Sets Total + /// + [DataMember(Name = "total", IsRequired = true, EmitDefaultValue = false)] + public int Total { get; set; } + /// + /// Gets or Sets AutoAdvance + /// + [DataMember(Name = "auto_advance", EmitDefaultValue = false)] + public bool AutoAdvance { get; set; } + /// + /// Gets or Sets Description + /// + [DataMember(Name = "description", EmitDefaultValue = false)] + public string Description { get; set; } + /// + /// Gets or Sets HostedInvoiceUrl + /// + [DataMember(Name = "hosted_invoice_url", EmitDefaultValue = false)] + public string HostedInvoiceUrl { get; set; } + /// + /// Gets or Sets Subscription + /// + [DataMember(Name = "subscription", EmitDefaultValue = false)] + public string Subscription { get; set; } + /// + /// Gets or Sets Discount + /// + [DataMember(Name = "discount", EmitDefaultValue = false)] + public Discount Discount { get; set; } + /// + /// Gets or Sets TotalDiscountAmounts + /// + [DataMember(Name = "total_discount_amounts", EmitDefaultValue = false)] + public List TotalDiscountAmounts { get; set; } + /// + /// The payment method that will be billed when this invoice is due. + /// + /// The payment method that will be billed when this invoice is due. + [DataMember(Name = "payment_method", EmitDefaultValue = false)] + public CardPublic PaymentMethod { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + return "InvoicePreview"; + } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString(bool detailed) + { + if (!detailed) + return this.ToString(); + + var sb = new StringBuilder(); + sb.Append("InvoicePreview:\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" CollectionMethod: ").Append(CollectionMethod).Append("\n"); + sb.Append(" Currency: ").Append(Currency).Append("\n"); + sb.Append(" Customer: ").Append(Customer).Append("\n"); + sb.Append(" Lines: ").Append(Lines).Append("\n"); + sb.Append(" PeriodStart: ").Append(PeriodStart).Append("\n"); + sb.Append(" PeriodEnd: ").Append(PeriodEnd).Append("\n"); + sb.Append(" Status: ").Append(Status).Append("\n"); + sb.Append(" StatusTransitions: ").Append(StatusTransitions).Append("\n"); + sb.Append(" Subtotal: ").Append(Subtotal).Append("\n"); + sb.Append(" Total: ").Append(Total).Append("\n"); + sb.Append(" AutoAdvance: ").Append(AutoAdvance).Append("\n"); + sb.Append(" Description: ").Append(Description).Append("\n"); + sb.Append(" HostedInvoiceUrl: ").Append(HostedInvoiceUrl).Append("\n"); + sb.Append(" Subscription: ").Append(Subscription).Append("\n"); + sb.Append(" Discount: ").Append(Discount).Append("\n"); + sb.Append(" TotalDiscountAmounts: ").Append(TotalDiscountAmounts).Append("\n"); + sb.Append(" PaymentMethod: ").Append(PaymentMethod).Append("\n"); + return sb.ToString(); + } + + /// + /// Returns the object from JSON string + /// + /// InvoicePreview object + public static InvoicePreview FromJson(string json) + { + var obj = JsonConvert.DeserializeObject(json, JsonSetting.AnyOfConvertSetting); + if (obj == null) + return null; + return obj.Type.ToLower() == obj.GetType().Name.ToLower() ? obj : null; + } + + /// + /// Creates a new instance with the same properties. + /// + /// InvoicePreview object + public virtual InvoicePreview DuplicateInvoicePreview() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateInvoicePreview(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel DuplicateOpenAPIGenBaseModel() + { + return DuplicateInvoicePreview(); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + input = input is AnyOf anyOf ? anyOf.Obj : input; + return this.Equals(input as InvoicePreview); + } + + /// + /// Returns true if InvoicePreview instances are equal + /// + /// Instance of InvoicePreview to be compared + /// Boolean + public bool Equals(InvoicePreview input) + { + if (input == null) + return false; + return base.Equals(input) && + ( + this.CollectionMethod == input.CollectionMethod || + (this.CollectionMethod != null && + this.CollectionMethod.Equals(input.CollectionMethod)) + ) && base.Equals(input) && + ( + this.Currency == input.Currency || + (this.Currency != null && + this.Currency.Equals(input.Currency)) + ) && base.Equals(input) && + ( + this.Customer == input.Customer || + (this.Customer != null && + this.Customer.Equals(input.Customer)) + ) && base.Equals(input) && + ( + this.Lines == input.Lines || + (this.Lines != null && + this.Lines.Equals(input.Lines)) + ) && base.Equals(input) && + ( + this.PeriodStart == input.PeriodStart || + (this.PeriodStart != null && + this.PeriodStart.Equals(input.PeriodStart)) + ) && base.Equals(input) && + ( + this.PeriodEnd == input.PeriodEnd || + (this.PeriodEnd != null && + this.PeriodEnd.Equals(input.PeriodEnd)) + ) && base.Equals(input) && + ( + this.Status == input.Status || + (this.Status != null && + this.Status.Equals(input.Status)) + ) && base.Equals(input) && + ( + this.StatusTransitions == input.StatusTransitions || + (this.StatusTransitions != null && + this.StatusTransitions.Equals(input.StatusTransitions)) + ) && base.Equals(input) && + ( + this.Subtotal == input.Subtotal || + (this.Subtotal != null && + this.Subtotal.Equals(input.Subtotal)) + ) && base.Equals(input) && + ( + this.Total == input.Total || + (this.Total != null && + this.Total.Equals(input.Total)) + ) && base.Equals(input) && + ( + this.AutoAdvance == input.AutoAdvance || + (this.AutoAdvance != null && + this.AutoAdvance.Equals(input.AutoAdvance)) + ) && base.Equals(input) && + ( + this.Description == input.Description || + (this.Description != null && + this.Description.Equals(input.Description)) + ) && base.Equals(input) && + ( + this.HostedInvoiceUrl == input.HostedInvoiceUrl || + (this.HostedInvoiceUrl != null && + this.HostedInvoiceUrl.Equals(input.HostedInvoiceUrl)) + ) && base.Equals(input) && + ( + this.Subscription == input.Subscription || + (this.Subscription != null && + this.Subscription.Equals(input.Subscription)) + ) && base.Equals(input) && + ( + this.Discount == input.Discount || + (this.Discount != null && + this.Discount.Equals(input.Discount)) + ) && base.Equals(input) && + ( + this.TotalDiscountAmounts == input.TotalDiscountAmounts || + this.TotalDiscountAmounts != null && + input.TotalDiscountAmounts != null && + this.TotalDiscountAmounts.SequenceEqual(input.TotalDiscountAmounts) + ) && base.Equals(input) && + ( + this.PaymentMethod == input.PaymentMethod || + (this.PaymentMethod != null && + this.PaymentMethod.Equals(input.PaymentMethod)) + ) && base.Equals(input) && + ( + this.Type == input.Type || + (this.Type != null && + this.Type.Equals(input.Type)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = base.GetHashCode(); + if (this.CollectionMethod != null) + hashCode = hashCode * 59 + this.CollectionMethod.GetHashCode(); + if (this.Currency != null) + hashCode = hashCode * 59 + this.Currency.GetHashCode(); + if (this.Customer != null) + hashCode = hashCode * 59 + this.Customer.GetHashCode(); + if (this.Lines != null) + hashCode = hashCode * 59 + this.Lines.GetHashCode(); + if (this.PeriodStart != null) + hashCode = hashCode * 59 + this.PeriodStart.GetHashCode(); + if (this.PeriodEnd != null) + hashCode = hashCode * 59 + this.PeriodEnd.GetHashCode(); + if (this.Status != null) + hashCode = hashCode * 59 + this.Status.GetHashCode(); + if (this.StatusTransitions != null) + hashCode = hashCode * 59 + this.StatusTransitions.GetHashCode(); + if (this.Subtotal != null) + hashCode = hashCode * 59 + this.Subtotal.GetHashCode(); + if (this.Total != null) + hashCode = hashCode * 59 + this.Total.GetHashCode(); + if (this.AutoAdvance != null) + hashCode = hashCode * 59 + this.AutoAdvance.GetHashCode(); + if (this.Description != null) + hashCode = hashCode * 59 + this.Description.GetHashCode(); + if (this.HostedInvoiceUrl != null) + hashCode = hashCode * 59 + this.HostedInvoiceUrl.GetHashCode(); + if (this.Subscription != null) + hashCode = hashCode * 59 + this.Subscription.GetHashCode(); + if (this.Discount != null) + hashCode = hashCode * 59 + this.Discount.GetHashCode(); + if (this.TotalDiscountAmounts != null) + hashCode = hashCode * 59 + this.TotalDiscountAmounts.GetHashCode(); + if (this.PaymentMethod != null) + hashCode = hashCode * 59 + this.PaymentMethod.GetHashCode(); + if (this.Type != null) + hashCode = hashCode * 59 + this.Type.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + return this.BaseValidate(validationContext); + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + protected IEnumerable BaseValidate(ValidationContext validationContext) + { + foreach(var x in base.BaseValidate(validationContext)) yield return x; + + + // Type (string) pattern + Regex regexType = new Regex(@"^InvoicePreview$", RegexOptions.CultureInvariant); + if (false == regexType.Match(this.Type).Success) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Type, must match a pattern of " + regexType, new [] { "Type" }); + } + + yield break; + } + } +} diff --git a/src/PollinationSDK/Model/InvoiceStatus.cs b/src/PollinationSDK/Model/InvoiceStatus.cs new file mode 100644 index 000000000..31e8bb5b5 --- /dev/null +++ b/src/PollinationSDK/Model/InvoiceStatus.cs @@ -0,0 +1,67 @@ +/* + * pollination-server + * + * Pollination Server OpenAPI Definition + * + * Contact: info@pollination.cloud + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; + + +namespace PollinationSDK +{ + /// + /// An enumeration. + /// + /// An enumeration. + + [JsonConverter(typeof(StringEnumConverter))] + + public enum InvoiceStatus + { + /// + /// Enum Draft for value: draft + /// + [EnumMember(Value = "draft")] + Draft = 1, + + /// + /// Enum Open for value: open + /// + [EnumMember(Value = "open")] + Open = 2, + + /// + /// Enum Paid for value: paid + /// + [EnumMember(Value = "paid")] + Paid = 3, + + /// + /// Enum Uncollectable for value: uncollectable + /// + [EnumMember(Value = "uncollectable")] + Uncollectable = 4, + + /// + /// Enum Void for value: void + /// + [EnumMember(Value = "void")] + Void = 5 + + } + +} diff --git a/src/PollinationSDK/Model/InvoiceStatusTransitions.cs b/src/PollinationSDK/Model/InvoiceStatusTransitions.cs new file mode 100644 index 000000000..38acce8e9 --- /dev/null +++ b/src/PollinationSDK/Model/InvoiceStatusTransitions.cs @@ -0,0 +1,240 @@ +/* + * pollination-server + * + * Pollination Server OpenAPI Definition + * + * Contact: info@pollination.cloud + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; + + +namespace PollinationSDK +{ + /// + /// InvoiceStatusTransitions + /// + [DataContract(Name = "InvoiceStatusTransitions")] + public partial class InvoiceStatusTransitions : OpenAPIGenBaseModel, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// finalizedAt. + /// markedUncollectibleAt. + /// paidAt. + /// voidedAt. + public InvoiceStatusTransitions + ( + // Required parameters + DateTime finalizedAt= default, DateTime markedUncollectibleAt= default, DateTime paidAt= default, DateTime voidedAt= default // Optional parameters + ) : base()// BaseClass + { + this.FinalizedAt = finalizedAt; + this.MarkedUncollectibleAt = markedUncollectibleAt; + this.PaidAt = paidAt; + this.VoidedAt = voidedAt; + + // Set non-required readonly properties with defaultValue + this.Type = "InvoiceStatusTransitions"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "InvoiceStatusTransitions"; + + /// + /// Gets or Sets FinalizedAt + /// + [DataMember(Name = "finalized_at", EmitDefaultValue = false)] + public DateTime FinalizedAt { get; set; } + /// + /// Gets or Sets MarkedUncollectibleAt + /// + [DataMember(Name = "marked_uncollectible_at", EmitDefaultValue = false)] + public DateTime MarkedUncollectibleAt { get; set; } + /// + /// Gets or Sets PaidAt + /// + [DataMember(Name = "paid_at", EmitDefaultValue = false)] + public DateTime PaidAt { get; set; } + /// + /// Gets or Sets VoidedAt + /// + [DataMember(Name = "voided_at", EmitDefaultValue = false)] + public DateTime VoidedAt { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + return "InvoiceStatusTransitions"; + } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString(bool detailed) + { + if (!detailed) + return this.ToString(); + + var sb = new StringBuilder(); + sb.Append("InvoiceStatusTransitions:\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" FinalizedAt: ").Append(FinalizedAt).Append("\n"); + sb.Append(" MarkedUncollectibleAt: ").Append(MarkedUncollectibleAt).Append("\n"); + sb.Append(" PaidAt: ").Append(PaidAt).Append("\n"); + sb.Append(" VoidedAt: ").Append(VoidedAt).Append("\n"); + return sb.ToString(); + } + + /// + /// Returns the object from JSON string + /// + /// InvoiceStatusTransitions object + public static InvoiceStatusTransitions FromJson(string json) + { + var obj = JsonConvert.DeserializeObject(json, JsonSetting.AnyOfConvertSetting); + if (obj == null) + return null; + return obj.Type.ToLower() == obj.GetType().Name.ToLower() ? obj : null; + } + + /// + /// Creates a new instance with the same properties. + /// + /// InvoiceStatusTransitions object + public virtual InvoiceStatusTransitions DuplicateInvoiceStatusTransitions() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateInvoiceStatusTransitions(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel DuplicateOpenAPIGenBaseModel() + { + return DuplicateInvoiceStatusTransitions(); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + input = input is AnyOf anyOf ? anyOf.Obj : input; + return this.Equals(input as InvoiceStatusTransitions); + } + + /// + /// Returns true if InvoiceStatusTransitions instances are equal + /// + /// Instance of InvoiceStatusTransitions to be compared + /// Boolean + public bool Equals(InvoiceStatusTransitions input) + { + if (input == null) + return false; + return base.Equals(input) && + ( + this.FinalizedAt == input.FinalizedAt || + (this.FinalizedAt != null && + this.FinalizedAt.Equals(input.FinalizedAt)) + ) && base.Equals(input) && + ( + this.MarkedUncollectibleAt == input.MarkedUncollectibleAt || + (this.MarkedUncollectibleAt != null && + this.MarkedUncollectibleAt.Equals(input.MarkedUncollectibleAt)) + ) && base.Equals(input) && + ( + this.PaidAt == input.PaidAt || + (this.PaidAt != null && + this.PaidAt.Equals(input.PaidAt)) + ) && base.Equals(input) && + ( + this.VoidedAt == input.VoidedAt || + (this.VoidedAt != null && + this.VoidedAt.Equals(input.VoidedAt)) + ) && base.Equals(input) && + ( + this.Type == input.Type || + (this.Type != null && + this.Type.Equals(input.Type)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = base.GetHashCode(); + if (this.FinalizedAt != null) + hashCode = hashCode * 59 + this.FinalizedAt.GetHashCode(); + if (this.MarkedUncollectibleAt != null) + hashCode = hashCode * 59 + this.MarkedUncollectibleAt.GetHashCode(); + if (this.PaidAt != null) + hashCode = hashCode * 59 + this.PaidAt.GetHashCode(); + if (this.VoidedAt != null) + hashCode = hashCode * 59 + this.VoidedAt.GetHashCode(); + if (this.Type != null) + hashCode = hashCode * 59 + this.Type.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + foreach(var x in base.BaseValidate(validationContext)) yield return x; + + + // Type (string) pattern + Regex regexType = new Regex(@"^InvoiceStatusTransitions$", RegexOptions.CultureInvariant); + if (false == regexType.Match(this.Type).Success) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Type, must match a pattern of " + regexType, new [] { "Type" }); + } + + yield break; + } + } +} diff --git a/src/PollinationSDK/Model/License.cs b/src/PollinationSDK/Model/License.cs index 25f521413..0688c2359 100644 --- a/src/PollinationSDK/Model/License.cs +++ b/src/PollinationSDK/Model/License.cs @@ -223,6 +223,16 @@ public override int GetHashCode() /// Validation context /// Validation Result IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + return this.BaseValidate(validationContext); + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + protected IEnumerable BaseValidate(ValidationContext validationContext) { foreach(var x in base.BaseValidate(validationContext)) yield return x; diff --git a/src/PollinationSDK/Model/LicensePoolAccessPolicy.cs b/src/PollinationSDK/Model/LicensePoolAccessPolicy.cs new file mode 100644 index 000000000..3bb377262 --- /dev/null +++ b/src/PollinationSDK/Model/LicensePoolAccessPolicy.cs @@ -0,0 +1,223 @@ +/* + * pollination-server + * + * Pollination Server OpenAPI Definition + * + * Contact: info@pollination.cloud + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; + + +namespace PollinationSDK +{ + /// + /// LicensePoolAccessPolicy + /// + [DataContract(Name = "LicensePoolAccessPolicy")] + public partial class LicensePoolAccessPolicy : OpenAPIGenBaseModel, IEquatable, IValidatableObject + { + /// + /// Accessors may only have read access + /// + /// Accessors may only have read access + [DataMember(Name="permission", EmitDefaultValue=false)] + public Permission Permission { get; set; } + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected LicensePoolAccessPolicy() + { + // Set non-required readonly properties with defaultValue + this.Type = "LicensePoolAccessPolicy"; + } + + /// + /// Initializes a new instance of the class. + /// + /// The subject of the access policy (required). + /// Accessors may only have read access. + public LicensePoolAccessPolicy + ( + PolicySubject subject, // Required parameters + Permission permission= default // Optional parameters + ) : base()// BaseClass + { + // to ensure "subject" is required (not null) + this.Subject = subject ?? throw new ArgumentNullException("subject is a required property for LicensePoolAccessPolicy and cannot be null"); + this.Permission = permission; + + // Set non-required readonly properties with defaultValue + this.Type = "LicensePoolAccessPolicy"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "LicensePoolAccessPolicy"; + + /// + /// The subject of the access policy + /// + /// The subject of the access policy + [DataMember(Name = "subject", IsRequired = true, EmitDefaultValue = false)] + public PolicySubject Subject { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + return "LicensePoolAccessPolicy"; + } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString(bool detailed) + { + if (!detailed) + return this.ToString(); + + var sb = new StringBuilder(); + sb.Append("LicensePoolAccessPolicy:\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Subject: ").Append(Subject).Append("\n"); + sb.Append(" Permission: ").Append(Permission).Append("\n"); + return sb.ToString(); + } + + /// + /// Returns the object from JSON string + /// + /// LicensePoolAccessPolicy object + public static LicensePoolAccessPolicy FromJson(string json) + { + var obj = JsonConvert.DeserializeObject(json, JsonSetting.AnyOfConvertSetting); + if (obj == null) + return null; + return obj.Type.ToLower() == obj.GetType().Name.ToLower() ? obj : null; + } + + /// + /// Creates a new instance with the same properties. + /// + /// LicensePoolAccessPolicy object + public virtual LicensePoolAccessPolicy DuplicateLicensePoolAccessPolicy() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateLicensePoolAccessPolicy(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel DuplicateOpenAPIGenBaseModel() + { + return DuplicateLicensePoolAccessPolicy(); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + input = input is AnyOf anyOf ? anyOf.Obj : input; + return this.Equals(input as LicensePoolAccessPolicy); + } + + /// + /// Returns true if LicensePoolAccessPolicy instances are equal + /// + /// Instance of LicensePoolAccessPolicy to be compared + /// Boolean + public bool Equals(LicensePoolAccessPolicy input) + { + if (input == null) + return false; + return base.Equals(input) && + ( + this.Subject == input.Subject || + (this.Subject != null && + this.Subject.Equals(input.Subject)) + ) && base.Equals(input) && + ( + this.Permission == input.Permission || + (this.Permission != null && + this.Permission.Equals(input.Permission)) + ) && base.Equals(input) && + ( + this.Type == input.Type || + (this.Type != null && + this.Type.Equals(input.Type)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = base.GetHashCode(); + if (this.Subject != null) + hashCode = hashCode * 59 + this.Subject.GetHashCode(); + if (this.Permission != null) + hashCode = hashCode * 59 + this.Permission.GetHashCode(); + if (this.Type != null) + hashCode = hashCode * 59 + this.Type.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + foreach(var x in base.BaseValidate(validationContext)) yield return x; + + + // Type (string) pattern + Regex regexType = new Regex(@"^LicensePoolAccessPolicy$", RegexOptions.CultureInvariant); + if (false == regexType.Match(this.Type).Success) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Type, must match a pattern of " + regexType, new [] { "Type" }); + } + + yield break; + } + } +} diff --git a/src/PollinationSDK/Model/LicensePoolAccessPolicyList.cs b/src/PollinationSDK/Model/LicensePoolAccessPolicyList.cs new file mode 100644 index 000000000..1f6c71224 --- /dev/null +++ b/src/PollinationSDK/Model/LicensePoolAccessPolicyList.cs @@ -0,0 +1,197 @@ +/* + * pollination-server + * + * Pollination Server OpenAPI Definition + * + * Contact: info@pollination.cloud + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; + + +namespace PollinationSDK +{ + /// + /// LicensePoolAccessPolicyList + /// + [DataContract(Name = "LicensePoolAccessPolicyList")] + public partial class LicensePoolAccessPolicyList : OpenAPIGenBaseModel, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// The list of policies granting access to the pool. + public LicensePoolAccessPolicyList + ( + // Required parameters + List resources= default // Optional parameters + ) : base()// BaseClass + { + this.Resources = resources; + + // Set non-required readonly properties with defaultValue + this.Type = "LicensePoolAccessPolicyList"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "LicensePoolAccessPolicyList"; + + /// + /// The list of policies granting access to the pool + /// + /// The list of policies granting access to the pool + [DataMember(Name = "resources", EmitDefaultValue = false)] + public List Resources { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + return "LicensePoolAccessPolicyList"; + } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString(bool detailed) + { + if (!detailed) + return this.ToString(); + + var sb = new StringBuilder(); + sb.Append("LicensePoolAccessPolicyList:\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Resources: ").Append(Resources).Append("\n"); + return sb.ToString(); + } + + /// + /// Returns the object from JSON string + /// + /// LicensePoolAccessPolicyList object + public static LicensePoolAccessPolicyList FromJson(string json) + { + var obj = JsonConvert.DeserializeObject(json, JsonSetting.AnyOfConvertSetting); + if (obj == null) + return null; + return obj.Type.ToLower() == obj.GetType().Name.ToLower() ? obj : null; + } + + /// + /// Creates a new instance with the same properties. + /// + /// LicensePoolAccessPolicyList object + public virtual LicensePoolAccessPolicyList DuplicateLicensePoolAccessPolicyList() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateLicensePoolAccessPolicyList(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel DuplicateOpenAPIGenBaseModel() + { + return DuplicateLicensePoolAccessPolicyList(); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + input = input is AnyOf anyOf ? anyOf.Obj : input; + return this.Equals(input as LicensePoolAccessPolicyList); + } + + /// + /// Returns true if LicensePoolAccessPolicyList instances are equal + /// + /// Instance of LicensePoolAccessPolicyList to be compared + /// Boolean + public bool Equals(LicensePoolAccessPolicyList input) + { + if (input == null) + return false; + return base.Equals(input) && + ( + this.Resources == input.Resources || + this.Resources != null && + input.Resources != null && + this.Resources.SequenceEqual(input.Resources) + ) && base.Equals(input) && + ( + this.Type == input.Type || + (this.Type != null && + this.Type.Equals(input.Type)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = base.GetHashCode(); + if (this.Resources != null) + hashCode = hashCode * 59 + this.Resources.GetHashCode(); + if (this.Type != null) + hashCode = hashCode * 59 + this.Type.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + foreach(var x in base.BaseValidate(validationContext)) yield return x; + + + // Type (string) pattern + Regex regexType = new Regex(@"^LicensePoolAccessPolicyList$", RegexOptions.CultureInvariant); + if (false == regexType.Match(this.Type).Success) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Type, must match a pattern of " + regexType, new [] { "Type" }); + } + + yield break; + } + } +} diff --git a/src/PollinationSDK/Model/LicensePoolList.cs b/src/PollinationSDK/Model/LicensePoolList.cs new file mode 100644 index 000000000..bc847fcee --- /dev/null +++ b/src/PollinationSDK/Model/LicensePoolList.cs @@ -0,0 +1,207 @@ +/* + * pollination-server + * + * Pollination Server OpenAPI Definition + * + * Contact: info@pollination.cloud + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; + + +namespace PollinationSDK +{ + /// + /// LicensePoolList + /// + [DataContract(Name = "LicensePoolList")] + public partial class LicensePoolList : OpenAPIGenBaseModel, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected LicensePoolList() + { + // Set non-required readonly properties with defaultValue + this.Type = "LicensePoolList"; + } + + /// + /// Initializes a new instance of the class. + /// + /// resources (required). + public LicensePoolList + ( + List resources// Required parameters + // Optional parameters + ) : base()// BaseClass + { + // to ensure "resources" is required (not null) + this.Resources = resources ?? throw new ArgumentNullException("resources is a required property for LicensePoolList and cannot be null"); + + // Set non-required readonly properties with defaultValue + this.Type = "LicensePoolList"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "LicensePoolList"; + + /// + /// Gets or Sets Resources + /// + [DataMember(Name = "resources", IsRequired = true, EmitDefaultValue = false)] + public List Resources { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + return "LicensePoolList"; + } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString(bool detailed) + { + if (!detailed) + return this.ToString(); + + var sb = new StringBuilder(); + sb.Append("LicensePoolList:\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Resources: ").Append(Resources).Append("\n"); + return sb.ToString(); + } + + /// + /// Returns the object from JSON string + /// + /// LicensePoolList object + public static LicensePoolList FromJson(string json) + { + var obj = JsonConvert.DeserializeObject(json, JsonSetting.AnyOfConvertSetting); + if (obj == null) + return null; + return obj.Type.ToLower() == obj.GetType().Name.ToLower() ? obj : null; + } + + /// + /// Creates a new instance with the same properties. + /// + /// LicensePoolList object + public virtual LicensePoolList DuplicateLicensePoolList() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateLicensePoolList(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel DuplicateOpenAPIGenBaseModel() + { + return DuplicateLicensePoolList(); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + input = input is AnyOf anyOf ? anyOf.Obj : input; + return this.Equals(input as LicensePoolList); + } + + /// + /// Returns true if LicensePoolList instances are equal + /// + /// Instance of LicensePoolList to be compared + /// Boolean + public bool Equals(LicensePoolList input) + { + if (input == null) + return false; + return base.Equals(input) && + ( + this.Resources == input.Resources || + this.Resources != null && + input.Resources != null && + this.Resources.SequenceEqual(input.Resources) + ) && base.Equals(input) && + ( + this.Type == input.Type || + (this.Type != null && + this.Type.Equals(input.Type)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = base.GetHashCode(); + if (this.Resources != null) + hashCode = hashCode * 59 + this.Resources.GetHashCode(); + if (this.Type != null) + hashCode = hashCode * 59 + this.Type.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + foreach(var x in base.BaseValidate(validationContext)) yield return x; + + + // Type (string) pattern + Regex regexType = new Regex(@"^LicensePoolList$", RegexOptions.CultureInvariant); + if (false == regexType.Match(this.Type).Success) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Type, must match a pattern of " + regexType, new [] { "Type" }); + } + + yield break; + } + } +} diff --git a/src/PollinationSDK/Model/LicensePoolPolicySubject.cs b/src/PollinationSDK/Model/LicensePoolPolicySubject.cs new file mode 100644 index 000000000..defd15e70 --- /dev/null +++ b/src/PollinationSDK/Model/LicensePoolPolicySubject.cs @@ -0,0 +1,194 @@ +/* + * pollination-server + * + * Pollination Server OpenAPI Definition + * + * Contact: info@pollination.cloud + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; + + +namespace PollinationSDK +{ + /// + /// LicensePoolPolicySubject + /// + [DataContract(Name = "LicensePoolPolicySubject")] + public partial class LicensePoolPolicySubject : PolicySubject, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected LicensePoolPolicySubject() + { + // Set non-required readonly properties with defaultValue + this.Type = "LicensePoolPolicySubject"; + } + + /// + /// Initializes a new instance of the class. + /// + /// subjectType (required). + /// The name of the policy subject (required). + public LicensePoolPolicySubject + ( + SubjectType subjectType, string name// Required parameters + // Optional parameters + ) : base(subjectType: subjectType, name: name)// BaseClass + { + + // Set non-required readonly properties with defaultValue + this.Type = "LicensePoolPolicySubject"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "LicensePoolPolicySubject"; + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + return "LicensePoolPolicySubject"; + } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString(bool detailed) + { + if (!detailed) + return this.ToString(); + + var sb = new StringBuilder(); + sb.Append("LicensePoolPolicySubject:\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" SubjectType: ").Append(SubjectType).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + return sb.ToString(); + } + + /// + /// Returns the object from JSON string + /// + /// LicensePoolPolicySubject object + public static LicensePoolPolicySubject FromJson(string json) + { + var obj = JsonConvert.DeserializeObject(json, JsonSetting.AnyOfConvertSetting); + if (obj == null) + return null; + return obj.Type.ToLower() == obj.GetType().Name.ToLower() ? obj : null; + } + + /// + /// Creates a new instance with the same properties. + /// + /// LicensePoolPolicySubject object + public virtual LicensePoolPolicySubject DuplicateLicensePoolPolicySubject() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateLicensePoolPolicySubject(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override PolicySubject DuplicatePolicySubject() + { + return DuplicateLicensePoolPolicySubject(); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + input = input is AnyOf anyOf ? anyOf.Obj : input; + return this.Equals(input as LicensePoolPolicySubject); + } + + /// + /// Returns true if LicensePoolPolicySubject instances are equal + /// + /// Instance of LicensePoolPolicySubject to be compared + /// Boolean + public bool Equals(LicensePoolPolicySubject input) + { + if (input == null) + return false; + return base.Equals(input) && + ( + this.Type == input.Type || + (this.Type != null && + this.Type.Equals(input.Type)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = base.GetHashCode(); + if (this.Type != null) + hashCode = hashCode * 59 + this.Type.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + foreach(var x in base.BaseValidate(validationContext)) yield return x; + + + // Type (string) pattern + Regex regexType = new Regex(@"^LicensePoolPolicySubject$", RegexOptions.CultureInvariant); + if (false == regexType.Match(this.Type).Success) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Type, must match a pattern of " + regexType, new [] { "Type" }); + } + + yield break; + } + } +} diff --git a/src/PollinationSDK/Model/LicensePoolPolicySubjectList.cs b/src/PollinationSDK/Model/LicensePoolPolicySubjectList.cs new file mode 100644 index 000000000..519b5e38e --- /dev/null +++ b/src/PollinationSDK/Model/LicensePoolPolicySubjectList.cs @@ -0,0 +1,197 @@ +/* + * pollination-server + * + * Pollination Server OpenAPI Definition + * + * Contact: info@pollination.cloud + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; + + +namespace PollinationSDK +{ + /// + /// LicensePoolPolicySubjectList + /// + [DataContract(Name = "LicensePoolPolicySubjectList")] + public partial class LicensePoolPolicySubjectList : OpenAPIGenBaseModel, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// The list of subjects which currently have access to the pool. + public LicensePoolPolicySubjectList + ( + // Required parameters + List resources= default // Optional parameters + ) : base()// BaseClass + { + this.Resources = resources; + + // Set non-required readonly properties with defaultValue + this.Type = "LicensePoolPolicySubjectList"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "LicensePoolPolicySubjectList"; + + /// + /// The list of subjects which currently have access to the pool + /// + /// The list of subjects which currently have access to the pool + [DataMember(Name = "resources", EmitDefaultValue = false)] + public List Resources { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + return "LicensePoolPolicySubjectList"; + } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString(bool detailed) + { + if (!detailed) + return this.ToString(); + + var sb = new StringBuilder(); + sb.Append("LicensePoolPolicySubjectList:\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Resources: ").Append(Resources).Append("\n"); + return sb.ToString(); + } + + /// + /// Returns the object from JSON string + /// + /// LicensePoolPolicySubjectList object + public static LicensePoolPolicySubjectList FromJson(string json) + { + var obj = JsonConvert.DeserializeObject(json, JsonSetting.AnyOfConvertSetting); + if (obj == null) + return null; + return obj.Type.ToLower() == obj.GetType().Name.ToLower() ? obj : null; + } + + /// + /// Creates a new instance with the same properties. + /// + /// LicensePoolPolicySubjectList object + public virtual LicensePoolPolicySubjectList DuplicateLicensePoolPolicySubjectList() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateLicensePoolPolicySubjectList(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel DuplicateOpenAPIGenBaseModel() + { + return DuplicateLicensePoolPolicySubjectList(); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + input = input is AnyOf anyOf ? anyOf.Obj : input; + return this.Equals(input as LicensePoolPolicySubjectList); + } + + /// + /// Returns true if LicensePoolPolicySubjectList instances are equal + /// + /// Instance of LicensePoolPolicySubjectList to be compared + /// Boolean + public bool Equals(LicensePoolPolicySubjectList input) + { + if (input == null) + return false; + return base.Equals(input) && + ( + this.Resources == input.Resources || + this.Resources != null && + input.Resources != null && + this.Resources.SequenceEqual(input.Resources) + ) && base.Equals(input) && + ( + this.Type == input.Type || + (this.Type != null && + this.Type.Equals(input.Type)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = base.GetHashCode(); + if (this.Resources != null) + hashCode = hashCode * 59 + this.Resources.GetHashCode(); + if (this.Type != null) + hashCode = hashCode * 59 + this.Type.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + foreach(var x in base.BaseValidate(validationContext)) yield return x; + + + // Type (string) pattern + Regex regexType = new Regex(@"^LicensePoolPolicySubjectList$", RegexOptions.CultureInvariant); + if (false == regexType.Match(this.Type).Success) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Type, must match a pattern of " + regexType, new [] { "Type" }); + } + + yield break; + } + } +} diff --git a/src/PollinationSDK/Model/LicensePoolPublic.cs b/src/PollinationSDK/Model/LicensePoolPublic.cs new file mode 100644 index 000000000..2afb2b248 --- /dev/null +++ b/src/PollinationSDK/Model/LicensePoolPublic.cs @@ -0,0 +1,306 @@ +/* + * pollination-server + * + * Pollination Server OpenAPI Definition + * + * Contact: info@pollination.cloud + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; + + +namespace PollinationSDK +{ + /// + /// LicensePoolPublic + /// + [DataContract(Name = "LicensePoolPublic")] + public partial class LicensePoolPublic : OpenAPIGenBaseModel, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected LicensePoolPublic() + { + // Set non-required readonly properties with defaultValue + this.Type = "LicensePoolPublic"; + } + + /// + /// Initializes a new instance of the class. + /// + /// The ID of the pool (required). + /// The ID of the license to which the pool provides access (required). + /// The account that owns the license (required). + /// permissions (required). + /// The pollination product to which this pool provides access (required). + /// The entities that can access the license though the pool. + /// The description of the pool. + public LicensePoolPublic + ( + Guid id, string licenseId, AccountPublic owner, UserPermission permissions, string product, // Required parameters + List accessors= default, string description= default // Optional parameters + ) : base()// BaseClass + { + this.Id = id; + // to ensure "licenseId" is required (not null) + this.LicenseId = licenseId ?? throw new ArgumentNullException("licenseId is a required property for LicensePoolPublic and cannot be null"); + // to ensure "owner" is required (not null) + this.Owner = owner ?? throw new ArgumentNullException("owner is a required property for LicensePoolPublic and cannot be null"); + // to ensure "permissions" is required (not null) + this.Permissions = permissions ?? throw new ArgumentNullException("permissions is a required property for LicensePoolPublic and cannot be null"); + // to ensure "product" is required (not null) + this.Product = product ?? throw new ArgumentNullException("product is a required property for LicensePoolPublic and cannot be null"); + this.Accessors = accessors; + this.Description = description; + + // Set non-required readonly properties with defaultValue + this.Type = "LicensePoolPublic"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "LicensePoolPublic"; + + /// + /// The ID of the pool + /// + /// The ID of the pool + [DataMember(Name = "id", IsRequired = true, EmitDefaultValue = false)] + public Guid Id { get; set; } + /// + /// The ID of the license to which the pool provides access + /// + /// The ID of the license to which the pool provides access + [DataMember(Name = "license_id", IsRequired = true, EmitDefaultValue = false)] + public string LicenseId { get; set; } + /// + /// The account that owns the license + /// + /// The account that owns the license + [DataMember(Name = "owner", IsRequired = true, EmitDefaultValue = false)] + public AccountPublic Owner { get; set; } + /// + /// Gets or Sets Permissions + /// + [DataMember(Name = "permissions", IsRequired = true, EmitDefaultValue = false)] + public UserPermission Permissions { get; set; } + /// + /// The pollination product to which this pool provides access + /// + /// The pollination product to which this pool provides access + [DataMember(Name = "product", IsRequired = true, EmitDefaultValue = false)] + public string Product { get; set; } + /// + /// The entities that can access the license though the pool + /// + /// The entities that can access the license though the pool + [DataMember(Name = "accessors", EmitDefaultValue = false)] + public List Accessors { get; set; } + /// + /// The description of the pool + /// + /// The description of the pool + [DataMember(Name = "description", EmitDefaultValue = false)] + public string Description { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + return "LicensePoolPublic"; + } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString(bool detailed) + { + if (!detailed) + return this.ToString(); + + var sb = new StringBuilder(); + sb.Append("LicensePoolPublic:\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Id: ").Append(Id).Append("\n"); + sb.Append(" LicenseId: ").Append(LicenseId).Append("\n"); + sb.Append(" Owner: ").Append(Owner).Append("\n"); + sb.Append(" Permissions: ").Append(Permissions).Append("\n"); + sb.Append(" Product: ").Append(Product).Append("\n"); + sb.Append(" Accessors: ").Append(Accessors).Append("\n"); + sb.Append(" Description: ").Append(Description).Append("\n"); + return sb.ToString(); + } + + /// + /// Returns the object from JSON string + /// + /// LicensePoolPublic object + public static LicensePoolPublic FromJson(string json) + { + var obj = JsonConvert.DeserializeObject(json, JsonSetting.AnyOfConvertSetting); + if (obj == null) + return null; + return obj.Type.ToLower() == obj.GetType().Name.ToLower() ? obj : null; + } + + /// + /// Creates a new instance with the same properties. + /// + /// LicensePoolPublic object + public virtual LicensePoolPublic DuplicateLicensePoolPublic() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateLicensePoolPublic(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel DuplicateOpenAPIGenBaseModel() + { + return DuplicateLicensePoolPublic(); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + input = input is AnyOf anyOf ? anyOf.Obj : input; + return this.Equals(input as LicensePoolPublic); + } + + /// + /// Returns true if LicensePoolPublic instances are equal + /// + /// Instance of LicensePoolPublic to be compared + /// Boolean + public bool Equals(LicensePoolPublic input) + { + if (input == null) + return false; + return base.Equals(input) && + ( + this.Id == input.Id || + (this.Id != null && + this.Id.Equals(input.Id)) + ) && base.Equals(input) && + ( + this.LicenseId == input.LicenseId || + (this.LicenseId != null && + this.LicenseId.Equals(input.LicenseId)) + ) && base.Equals(input) && + ( + this.Owner == input.Owner || + (this.Owner != null && + this.Owner.Equals(input.Owner)) + ) && base.Equals(input) && + ( + this.Permissions == input.Permissions || + (this.Permissions != null && + this.Permissions.Equals(input.Permissions)) + ) && base.Equals(input) && + ( + this.Product == input.Product || + (this.Product != null && + this.Product.Equals(input.Product)) + ) && base.Equals(input) && + ( + this.Accessors == input.Accessors || + this.Accessors != null && + input.Accessors != null && + this.Accessors.SequenceEqual(input.Accessors) + ) && base.Equals(input) && + ( + this.Description == input.Description || + (this.Description != null && + this.Description.Equals(input.Description)) + ) && base.Equals(input) && + ( + this.Type == input.Type || + (this.Type != null && + this.Type.Equals(input.Type)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = base.GetHashCode(); + if (this.Id != null) + hashCode = hashCode * 59 + this.Id.GetHashCode(); + if (this.LicenseId != null) + hashCode = hashCode * 59 + this.LicenseId.GetHashCode(); + if (this.Owner != null) + hashCode = hashCode * 59 + this.Owner.GetHashCode(); + if (this.Permissions != null) + hashCode = hashCode * 59 + this.Permissions.GetHashCode(); + if (this.Product != null) + hashCode = hashCode * 59 + this.Product.GetHashCode(); + if (this.Accessors != null) + hashCode = hashCode * 59 + this.Accessors.GetHashCode(); + if (this.Description != null) + hashCode = hashCode * 59 + this.Description.GetHashCode(); + if (this.Type != null) + hashCode = hashCode * 59 + this.Type.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + foreach(var x in base.BaseValidate(validationContext)) yield return x; + + + // Type (string) pattern + Regex regexType = new Regex(@"^LicensePoolPublic$", RegexOptions.CultureInvariant); + if (false == regexType.Match(this.Type).Success) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Type, must match a pattern of " + regexType, new [] { "Type" }); + } + + yield break; + } + } +} diff --git a/src/PollinationSDK/Model/LicensePoolUpdate.cs b/src/PollinationSDK/Model/LicensePoolUpdate.cs new file mode 100644 index 000000000..b5e4a9f96 --- /dev/null +++ b/src/PollinationSDK/Model/LicensePoolUpdate.cs @@ -0,0 +1,196 @@ +/* + * pollination-server + * + * Pollination Server OpenAPI Definition + * + * Contact: info@pollination.cloud + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; + + +namespace PollinationSDK +{ + /// + /// LicensePoolUpdate + /// + [DataContract(Name = "LicensePoolUpdate")] + public partial class LicensePoolUpdate : OpenAPIGenBaseModel, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// The description of the license pool. + public LicensePoolUpdate + ( + // Required parameters + string description= default // Optional parameters + ) : base()// BaseClass + { + this.Description = description; + + // Set non-required readonly properties with defaultValue + this.Type = "LicensePoolUpdate"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "LicensePoolUpdate"; + + /// + /// The description of the license pool + /// + /// The description of the license pool + [DataMember(Name = "description", EmitDefaultValue = false)] + public string Description { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + return "LicensePoolUpdate"; + } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString(bool detailed) + { + if (!detailed) + return this.ToString(); + + var sb = new StringBuilder(); + sb.Append("LicensePoolUpdate:\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Description: ").Append(Description).Append("\n"); + return sb.ToString(); + } + + /// + /// Returns the object from JSON string + /// + /// LicensePoolUpdate object + public static LicensePoolUpdate FromJson(string json) + { + var obj = JsonConvert.DeserializeObject(json, JsonSetting.AnyOfConvertSetting); + if (obj == null) + return null; + return obj.Type.ToLower() == obj.GetType().Name.ToLower() ? obj : null; + } + + /// + /// Creates a new instance with the same properties. + /// + /// LicensePoolUpdate object + public virtual LicensePoolUpdate DuplicateLicensePoolUpdate() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateLicensePoolUpdate(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel DuplicateOpenAPIGenBaseModel() + { + return DuplicateLicensePoolUpdate(); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + input = input is AnyOf anyOf ? anyOf.Obj : input; + return this.Equals(input as LicensePoolUpdate); + } + + /// + /// Returns true if LicensePoolUpdate instances are equal + /// + /// Instance of LicensePoolUpdate to be compared + /// Boolean + public bool Equals(LicensePoolUpdate input) + { + if (input == null) + return false; + return base.Equals(input) && + ( + this.Description == input.Description || + (this.Description != null && + this.Description.Equals(input.Description)) + ) && base.Equals(input) && + ( + this.Type == input.Type || + (this.Type != null && + this.Type.Equals(input.Type)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = base.GetHashCode(); + if (this.Description != null) + hashCode = hashCode * 59 + this.Description.GetHashCode(); + if (this.Type != null) + hashCode = hashCode * 59 + this.Type.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + foreach(var x in base.BaseValidate(validationContext)) yield return x; + + + // Type (string) pattern + Regex regexType = new Regex(@"^LicensePoolUpdate$", RegexOptions.CultureInvariant); + if (false == regexType.Match(this.Type).Success) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Type, must match a pattern of " + regexType, new [] { "Type" }); + } + + yield break; + } + } +} diff --git a/src/PollinationSDK/Model/LicensePublic.cs b/src/PollinationSDK/Model/LicensePublic.cs new file mode 100644 index 000000000..72893129e --- /dev/null +++ b/src/PollinationSDK/Model/LicensePublic.cs @@ -0,0 +1,432 @@ +/* + * pollination-server + * + * Pollination Server OpenAPI Definition + * + * Contact: info@pollination.cloud + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; + + +namespace PollinationSDK +{ + /// + /// LicensePublic + /// + [DataContract(Name = "LicensePublic")] + public partial class LicensePublic : License, IEquatable, IValidatableObject + { + /// + /// Gets or Sets Type + /// + [DataMember(Name="type", EmitDefaultValue=false)] + public LicenseType Type { get; set; } + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected LicensePublic() + { + // Set non-required readonly properties with defaultValue + } + + /// + /// Initializes a new instance of the class. + /// + /// id (required). + /// createdAt (required). + /// updatedAt (required). + /// The key used to activate this license. Treat this like a password. (required). + /// revoked (required). + /// suspended (required). + /// totalActivations (required). + /// totalDeactivations (required). + /// validity (required). + /// allowedActivations (required). + /// serverSyncGracePeriod (required). + /// serverSyncInterval (required). + /// leaseDuration (required). + /// productId (required). + /// metadata (required). + /// type (required) (default to "LicensePublic"). + /// notes. + /// The license name used for the package. (required). + /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. + /// A URL to the license used for the package.. + public LicensePublic + ( + string name, string id, DateTime createdAt, DateTime updatedAt, string key, bool revoked, bool suspended, int totalActivations, int totalDeactivations, int validity, int allowedActivations, int serverSyncGracePeriod, int serverSyncInterval, int leaseDuration, string productId, List metadata, LicenseType type, // Required parameters + Dictionary annotations= default, string url= default, string notes= default// Optional parameters + ) : base(name: name, annotations: annotations, url: url)// BaseClass + { + // to ensure "id" is required (not null) + this.Id = id ?? throw new ArgumentNullException("id is a required property for LicensePublic and cannot be null"); + this.CreatedAt = createdAt; + this.UpdatedAt = updatedAt; + // to ensure "key" is required (not null) + this.Key = key ?? throw new ArgumentNullException("key is a required property for LicensePublic and cannot be null"); + this.Revoked = revoked; + this.Suspended = suspended; + this.TotalActivations = totalActivations; + this.TotalDeactivations = totalDeactivations; + this.Validity = validity; + this.AllowedActivations = allowedActivations; + this.ServerSyncGracePeriod = serverSyncGracePeriod; + this.ServerSyncInterval = serverSyncInterval; + this.LeaseDuration = leaseDuration; + // to ensure "productId" is required (not null) + this.ProductId = productId ?? throw new ArgumentNullException("productId is a required property for LicensePublic and cannot be null"); + // to ensure "metadata" is required (not null) + this.Metadata = metadata ?? throw new ArgumentNullException("metadata is a required property for LicensePublic and cannot be null"); + this.Type = type; + this.Notes = notes; + + // Set non-required readonly properties with defaultValue + } + + + /// + /// Gets or Sets Id + /// + [DataMember(Name = "id", IsRequired = true, EmitDefaultValue = false)] + public string Id { get; set; } + /// + /// Gets or Sets CreatedAt + /// + [DataMember(Name = "created_at", IsRequired = true, EmitDefaultValue = false)] + public DateTime CreatedAt { get; set; } + /// + /// Gets or Sets UpdatedAt + /// + [DataMember(Name = "updated_at", IsRequired = true, EmitDefaultValue = false)] + public DateTime UpdatedAt { get; set; } + /// + /// The key used to activate this license. Treat this like a password. + /// + /// The key used to activate this license. Treat this like a password. + [DataMember(Name = "key", IsRequired = true, EmitDefaultValue = false)] + public string Key { get; set; } + /// + /// Gets or Sets Revoked + /// + [DataMember(Name = "revoked", IsRequired = true, EmitDefaultValue = false)] + public bool Revoked { get; set; } + /// + /// Gets or Sets Suspended + /// + [DataMember(Name = "suspended", IsRequired = true, EmitDefaultValue = false)] + public bool Suspended { get; set; } + /// + /// Gets or Sets TotalActivations + /// + [DataMember(Name = "total_activations", IsRequired = true, EmitDefaultValue = false)] + public int TotalActivations { get; set; } + /// + /// Gets or Sets TotalDeactivations + /// + [DataMember(Name = "total_deactivations", IsRequired = true, EmitDefaultValue = false)] + public int TotalDeactivations { get; set; } + /// + /// Gets or Sets Validity + /// + [DataMember(Name = "validity", IsRequired = true, EmitDefaultValue = false)] + public int Validity { get; set; } + /// + /// Gets or Sets AllowedActivations + /// + [DataMember(Name = "allowed_activations", IsRequired = true, EmitDefaultValue = false)] + public int AllowedActivations { get; set; } + /// + /// Gets or Sets ServerSyncGracePeriod + /// + [DataMember(Name = "server_sync_grace_period", IsRequired = true, EmitDefaultValue = false)] + public int ServerSyncGracePeriod { get; set; } + /// + /// Gets or Sets ServerSyncInterval + /// + [DataMember(Name = "server_sync_interval", IsRequired = true, EmitDefaultValue = false)] + public int ServerSyncInterval { get; set; } + /// + /// Gets or Sets LeaseDuration + /// + [DataMember(Name = "lease_duration", IsRequired = true, EmitDefaultValue = false)] + public int LeaseDuration { get; set; } + /// + /// Gets or Sets ProductId + /// + [DataMember(Name = "product_id", IsRequired = true, EmitDefaultValue = false)] + public string ProductId { get; set; } + /// + /// Gets or Sets Metadata + /// + [DataMember(Name = "metadata", IsRequired = true, EmitDefaultValue = false)] + public List Metadata { get; set; } + /// + /// Gets or Sets Notes + /// + [DataMember(Name = "notes", EmitDefaultValue = false)] + public string Notes { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + return "LicensePublic"; + } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString(bool detailed) + { + if (!detailed) + return this.ToString(); + + var sb = new StringBuilder(); + sb.Append("LicensePublic:\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Annotations: ").Append(Annotations).Append("\n"); + sb.Append(" Url: ").Append(Url).Append("\n"); + sb.Append(" Id: ").Append(Id).Append("\n"); + sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n"); + sb.Append(" UpdatedAt: ").Append(UpdatedAt).Append("\n"); + sb.Append(" Key: ").Append(Key).Append("\n"); + sb.Append(" Revoked: ").Append(Revoked).Append("\n"); + sb.Append(" Suspended: ").Append(Suspended).Append("\n"); + sb.Append(" TotalActivations: ").Append(TotalActivations).Append("\n"); + sb.Append(" TotalDeactivations: ").Append(TotalDeactivations).Append("\n"); + sb.Append(" Validity: ").Append(Validity).Append("\n"); + sb.Append(" AllowedActivations: ").Append(AllowedActivations).Append("\n"); + sb.Append(" ServerSyncGracePeriod: ").Append(ServerSyncGracePeriod).Append("\n"); + sb.Append(" ServerSyncInterval: ").Append(ServerSyncInterval).Append("\n"); + sb.Append(" LeaseDuration: ").Append(LeaseDuration).Append("\n"); + sb.Append(" ProductId: ").Append(ProductId).Append("\n"); + sb.Append(" Metadata: ").Append(Metadata).Append("\n"); + sb.Append(" Notes: ").Append(Notes).Append("\n"); + return sb.ToString(); + } + + /// + /// Returns the object from JSON string + /// + /// LicensePublic object + public static LicensePublic FromJson(string json) + { + var obj = JsonConvert.DeserializeObject(json, JsonSetting.AnyOfConvertSetting); + if (obj == null) + return null; + return obj.Type.ToLower() == obj.GetType().Name.ToLower() ? obj : null; + } + + /// + /// Creates a new instance with the same properties. + /// + /// LicensePublic object + public virtual LicensePublic DuplicateLicensePublic() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateLicensePublic(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override License DuplicateLicense() + { + return DuplicateLicensePublic(); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + input = input is AnyOf anyOf ? anyOf.Obj : input; + return this.Equals(input as LicensePublic); + } + + /// + /// Returns true if LicensePublic instances are equal + /// + /// Instance of LicensePublic to be compared + /// Boolean + public bool Equals(LicensePublic input) + { + if (input == null) + return false; + return base.Equals(input) && + ( + this.Id == input.Id || + (this.Id != null && + this.Id.Equals(input.Id)) + ) && base.Equals(input) && + ( + this.CreatedAt == input.CreatedAt || + (this.CreatedAt != null && + this.CreatedAt.Equals(input.CreatedAt)) + ) && base.Equals(input) && + ( + this.UpdatedAt == input.UpdatedAt || + (this.UpdatedAt != null && + this.UpdatedAt.Equals(input.UpdatedAt)) + ) && base.Equals(input) && + ( + this.Key == input.Key || + (this.Key != null && + this.Key.Equals(input.Key)) + ) && base.Equals(input) && + ( + this.Revoked == input.Revoked || + (this.Revoked != null && + this.Revoked.Equals(input.Revoked)) + ) && base.Equals(input) && + ( + this.Suspended == input.Suspended || + (this.Suspended != null && + this.Suspended.Equals(input.Suspended)) + ) && base.Equals(input) && + ( + this.TotalActivations == input.TotalActivations || + (this.TotalActivations != null && + this.TotalActivations.Equals(input.TotalActivations)) + ) && base.Equals(input) && + ( + this.TotalDeactivations == input.TotalDeactivations || + (this.TotalDeactivations != null && + this.TotalDeactivations.Equals(input.TotalDeactivations)) + ) && base.Equals(input) && + ( + this.Validity == input.Validity || + (this.Validity != null && + this.Validity.Equals(input.Validity)) + ) && base.Equals(input) && + ( + this.AllowedActivations == input.AllowedActivations || + (this.AllowedActivations != null && + this.AllowedActivations.Equals(input.AllowedActivations)) + ) && base.Equals(input) && + ( + this.ServerSyncGracePeriod == input.ServerSyncGracePeriod || + (this.ServerSyncGracePeriod != null && + this.ServerSyncGracePeriod.Equals(input.ServerSyncGracePeriod)) + ) && base.Equals(input) && + ( + this.ServerSyncInterval == input.ServerSyncInterval || + (this.ServerSyncInterval != null && + this.ServerSyncInterval.Equals(input.ServerSyncInterval)) + ) && base.Equals(input) && + ( + this.LeaseDuration == input.LeaseDuration || + (this.LeaseDuration != null && + this.LeaseDuration.Equals(input.LeaseDuration)) + ) && base.Equals(input) && + ( + this.ProductId == input.ProductId || + (this.ProductId != null && + this.ProductId.Equals(input.ProductId)) + ) && base.Equals(input) && + ( + this.Metadata == input.Metadata || + this.Metadata != null && + input.Metadata != null && + this.Metadata.SequenceEqual(input.Metadata) + ) && base.Equals(input) && + ( + this.Type == input.Type || + (this.Type != null && + this.Type.Equals(input.Type)) + ) && base.Equals(input) && + ( + this.Notes == input.Notes || + (this.Notes != null && + this.Notes.Equals(input.Notes)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = base.GetHashCode(); + if (this.Id != null) + hashCode = hashCode * 59 + this.Id.GetHashCode(); + if (this.CreatedAt != null) + hashCode = hashCode * 59 + this.CreatedAt.GetHashCode(); + if (this.UpdatedAt != null) + hashCode = hashCode * 59 + this.UpdatedAt.GetHashCode(); + if (this.Key != null) + hashCode = hashCode * 59 + this.Key.GetHashCode(); + if (this.Revoked != null) + hashCode = hashCode * 59 + this.Revoked.GetHashCode(); + if (this.Suspended != null) + hashCode = hashCode * 59 + this.Suspended.GetHashCode(); + if (this.TotalActivations != null) + hashCode = hashCode * 59 + this.TotalActivations.GetHashCode(); + if (this.TotalDeactivations != null) + hashCode = hashCode * 59 + this.TotalDeactivations.GetHashCode(); + if (this.Validity != null) + hashCode = hashCode * 59 + this.Validity.GetHashCode(); + if (this.AllowedActivations != null) + hashCode = hashCode * 59 + this.AllowedActivations.GetHashCode(); + if (this.ServerSyncGracePeriod != null) + hashCode = hashCode * 59 + this.ServerSyncGracePeriod.GetHashCode(); + if (this.ServerSyncInterval != null) + hashCode = hashCode * 59 + this.ServerSyncInterval.GetHashCode(); + if (this.LeaseDuration != null) + hashCode = hashCode * 59 + this.LeaseDuration.GetHashCode(); + if (this.ProductId != null) + hashCode = hashCode * 59 + this.ProductId.GetHashCode(); + if (this.Metadata != null) + hashCode = hashCode * 59 + this.Metadata.GetHashCode(); + if (this.Type != null) + hashCode = hashCode * 59 + this.Type.GetHashCode(); + if (this.Notes != null) + hashCode = hashCode * 59 + this.Notes.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + foreach(var x in base.BaseValidate(validationContext)) yield return x; + yield break; + } + } +} diff --git a/src/PollinationSDK/Model/LicenseType.cs b/src/PollinationSDK/Model/LicenseType.cs new file mode 100644 index 000000000..1385198f8 --- /dev/null +++ b/src/PollinationSDK/Model/LicenseType.cs @@ -0,0 +1,55 @@ +/* + * pollination-server + * + * Pollination Server OpenAPI Definition + * + * Contact: info@pollination.cloud + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; + + +namespace PollinationSDK +{ + /// + /// An enumeration. + /// + /// An enumeration. + + [JsonConverter(typeof(StringEnumConverter))] + + public enum LicenseType + { + /// + /// Enum NodeLocked for value: node-locked + /// + [EnumMember(Value = "node-locked")] + NodeLocked = 1, + + /// + /// Enum HostedFloating for value: hosted-floating + /// + [EnumMember(Value = "hosted-floating")] + HostedFloating = 2, + + /// + /// Enum OnPremiseFloating for value: on-premise-floating + /// + [EnumMember(Value = "on-premise-floating")] + OnPremiseFloating = 3 + + } + +} diff --git a/src/PollinationSDK/Model/LineItem.cs b/src/PollinationSDK/Model/LineItem.cs new file mode 100644 index 000000000..77cf22de5 --- /dev/null +++ b/src/PollinationSDK/Model/LineItem.cs @@ -0,0 +1,292 @@ +/* + * pollination-server + * + * Pollination Server OpenAPI Definition + * + * Contact: info@pollination.cloud + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; + + +namespace PollinationSDK +{ + /// + /// LineItem + /// + [DataContract(Name = "LineItem")] + public partial class LineItem : ExternalResource, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected LineItem() + { + // Set non-required readonly properties with defaultValue + } + + /// + /// Initializes a new instance of the class. + /// + /// amount (required). + /// currency (required). + /// description (required). + /// period (required). + /// price (required). + /// proration (required). + /// quantity (required). + /// id (required). + /// metadata. + public LineItem + ( + string id, int amount, string currency, string description, Period period, Price price, bool proration, int quantity, // Required parameters + Object metadata= default // Optional parameters + ) : base(id: id, metadata: metadata)// BaseClass + { + this.Amount = amount; + // to ensure "currency" is required (not null) + this.Currency = currency ?? throw new ArgumentNullException("currency is a required property for LineItem and cannot be null"); + // to ensure "description" is required (not null) + this.Description = description ?? throw new ArgumentNullException("description is a required property for LineItem and cannot be null"); + // to ensure "period" is required (not null) + this.Period = period ?? throw new ArgumentNullException("period is a required property for LineItem and cannot be null"); + // to ensure "price" is required (not null) + this.Price = price ?? throw new ArgumentNullException("price is a required property for LineItem and cannot be null"); + this.Proration = proration; + this.Quantity = quantity; + + // Set non-required readonly properties with defaultValue + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", IsRequired = true, EmitDefaultValue = false)] + public string Type { get; protected internal set; } + + /// + /// Gets or Sets Amount + /// + [DataMember(Name = "amount", IsRequired = true, EmitDefaultValue = false)] + public int Amount { get; set; } + /// + /// Gets or Sets Currency + /// + [DataMember(Name = "currency", IsRequired = true, EmitDefaultValue = false)] + public string Currency { get; set; } + /// + /// Gets or Sets Description + /// + [DataMember(Name = "description", IsRequired = true, EmitDefaultValue = false)] + public string Description { get; set; } + /// + /// Gets or Sets Period + /// + [DataMember(Name = "period", IsRequired = true, EmitDefaultValue = false)] + public Period Period { get; set; } + /// + /// Gets or Sets Price + /// + [DataMember(Name = "price", IsRequired = true, EmitDefaultValue = false)] + public Price Price { get; set; } + /// + /// Gets or Sets Proration + /// + [DataMember(Name = "proration", IsRequired = true, EmitDefaultValue = false)] + public bool Proration { get; set; } + /// + /// Gets or Sets Quantity + /// + [DataMember(Name = "quantity", IsRequired = true, EmitDefaultValue = false)] + public int Quantity { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + return "LineItem"; + } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString(bool detailed) + { + if (!detailed) + return this.ToString(); + + var sb = new StringBuilder(); + sb.Append("LineItem:\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Id: ").Append(Id).Append("\n"); + sb.Append(" Metadata: ").Append(Metadata).Append("\n"); + sb.Append(" Amount: ").Append(Amount).Append("\n"); + sb.Append(" Currency: ").Append(Currency).Append("\n"); + sb.Append(" Description: ").Append(Description).Append("\n"); + sb.Append(" Period: ").Append(Period).Append("\n"); + sb.Append(" Price: ").Append(Price).Append("\n"); + sb.Append(" Proration: ").Append(Proration).Append("\n"); + sb.Append(" Quantity: ").Append(Quantity).Append("\n"); + return sb.ToString(); + } + + /// + /// Returns the object from JSON string + /// + /// LineItem object + public static LineItem FromJson(string json) + { + var obj = JsonConvert.DeserializeObject(json, JsonSetting.AnyOfConvertSetting); + if (obj == null) + return null; + return obj.Type.ToLower() == obj.GetType().Name.ToLower() ? obj : null; + } + + /// + /// Creates a new instance with the same properties. + /// + /// LineItem object + public virtual LineItem DuplicateLineItem() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateLineItem(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override ExternalResource DuplicateExternalResource() + { + return DuplicateLineItem(); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + input = input is AnyOf anyOf ? anyOf.Obj : input; + return this.Equals(input as LineItem); + } + + /// + /// Returns true if LineItem instances are equal + /// + /// Instance of LineItem to be compared + /// Boolean + public bool Equals(LineItem input) + { + if (input == null) + return false; + return base.Equals(input) && + ( + this.Amount == input.Amount || + (this.Amount != null && + this.Amount.Equals(input.Amount)) + ) && base.Equals(input) && + ( + this.Currency == input.Currency || + (this.Currency != null && + this.Currency.Equals(input.Currency)) + ) && base.Equals(input) && + ( + this.Description == input.Description || + (this.Description != null && + this.Description.Equals(input.Description)) + ) && base.Equals(input) && + ( + this.Period == input.Period || + (this.Period != null && + this.Period.Equals(input.Period)) + ) && base.Equals(input) && + ( + this.Price == input.Price || + (this.Price != null && + this.Price.Equals(input.Price)) + ) && base.Equals(input) && + ( + this.Proration == input.Proration || + (this.Proration != null && + this.Proration.Equals(input.Proration)) + ) && base.Equals(input) && + ( + this.Quantity == input.Quantity || + (this.Quantity != null && + this.Quantity.Equals(input.Quantity)) + ) && base.Equals(input) && + ( + this.Type == input.Type || + (this.Type != null && + this.Type.Equals(input.Type)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = base.GetHashCode(); + if (this.Amount != null) + hashCode = hashCode * 59 + this.Amount.GetHashCode(); + if (this.Currency != null) + hashCode = hashCode * 59 + this.Currency.GetHashCode(); + if (this.Description != null) + hashCode = hashCode * 59 + this.Description.GetHashCode(); + if (this.Period != null) + hashCode = hashCode * 59 + this.Period.GetHashCode(); + if (this.Price != null) + hashCode = hashCode * 59 + this.Price.GetHashCode(); + if (this.Proration != null) + hashCode = hashCode * 59 + this.Proration.GetHashCode(); + if (this.Quantity != null) + hashCode = hashCode * 59 + this.Quantity.GetHashCode(); + if (this.Type != null) + hashCode = hashCode * 59 + this.Type.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + foreach(var x in base.BaseValidate(validationContext)) yield return x; + yield break; + } + } +} diff --git a/src/PollinationSDK/Model/LineItemList.cs b/src/PollinationSDK/Model/LineItemList.cs new file mode 100644 index 000000000..7893b1d8a --- /dev/null +++ b/src/PollinationSDK/Model/LineItemList.cs @@ -0,0 +1,222 @@ +/* + * pollination-server + * + * Pollination Server OpenAPI Definition + * + * Contact: info@pollination.cloud + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; + + +namespace PollinationSDK +{ + /// + /// LineItemList + /// + [DataContract(Name = "LineItemList")] + public partial class LineItemList : OpenAPIGenBaseModel, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected LineItemList() + { + // Set non-required readonly properties with defaultValue + this.Type = "LineItemList"; + } + + /// + /// Initializes a new instance of the class. + /// + /// hasMore (required). + /// data (required). + public LineItemList + ( + bool hasMore, List data// Required parameters + // Optional parameters + ) : base()// BaseClass + { + this.HasMore = hasMore; + // to ensure "data" is required (not null) + this.Data = data ?? throw new ArgumentNullException("data is a required property for LineItemList and cannot be null"); + + // Set non-required readonly properties with defaultValue + this.Type = "LineItemList"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "LineItemList"; + + /// + /// Gets or Sets HasMore + /// + [DataMember(Name = "has_more", IsRequired = true, EmitDefaultValue = false)] + public bool HasMore { get; set; } + /// + /// Gets or Sets Data + /// + [DataMember(Name = "data", IsRequired = true, EmitDefaultValue = false)] + public List Data { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + return "LineItemList"; + } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString(bool detailed) + { + if (!detailed) + return this.ToString(); + + var sb = new StringBuilder(); + sb.Append("LineItemList:\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" HasMore: ").Append(HasMore).Append("\n"); + sb.Append(" Data: ").Append(Data).Append("\n"); + return sb.ToString(); + } + + /// + /// Returns the object from JSON string + /// + /// LineItemList object + public static LineItemList FromJson(string json) + { + var obj = JsonConvert.DeserializeObject(json, JsonSetting.AnyOfConvertSetting); + if (obj == null) + return null; + return obj.Type.ToLower() == obj.GetType().Name.ToLower() ? obj : null; + } + + /// + /// Creates a new instance with the same properties. + /// + /// LineItemList object + public virtual LineItemList DuplicateLineItemList() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateLineItemList(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel DuplicateOpenAPIGenBaseModel() + { + return DuplicateLineItemList(); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + input = input is AnyOf anyOf ? anyOf.Obj : input; + return this.Equals(input as LineItemList); + } + + /// + /// Returns true if LineItemList instances are equal + /// + /// Instance of LineItemList to be compared + /// Boolean + public bool Equals(LineItemList input) + { + if (input == null) + return false; + return base.Equals(input) && + ( + this.HasMore == input.HasMore || + (this.HasMore != null && + this.HasMore.Equals(input.HasMore)) + ) && base.Equals(input) && + ( + this.Data == input.Data || + this.Data != null && + input.Data != null && + this.Data.SequenceEqual(input.Data) + ) && base.Equals(input) && + ( + this.Type == input.Type || + (this.Type != null && + this.Type.Equals(input.Type)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = base.GetHashCode(); + if (this.HasMore != null) + hashCode = hashCode * 59 + this.HasMore.GetHashCode(); + if (this.Data != null) + hashCode = hashCode * 59 + this.Data.GetHashCode(); + if (this.Type != null) + hashCode = hashCode * 59 + this.Type.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + foreach(var x in base.BaseValidate(validationContext)) yield return x; + + + // Type (string) pattern + Regex regexType = new Regex(@"^LineItemList$", RegexOptions.CultureInvariant); + if (false == regexType.Match(this.Type).Success) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Type, must match a pattern of " + regexType, new [] { "Type" }); + } + + yield break; + } + } +} diff --git a/src/PollinationSDK/Model/Location.cs b/src/PollinationSDK/Model/Location.cs new file mode 100644 index 000000000..0b6e39dad --- /dev/null +++ b/src/PollinationSDK/Model/Location.cs @@ -0,0 +1,270 @@ +/* + * pollination-server + * + * Pollination Server OpenAPI Definition + * + * Contact: info@pollination.cloud + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; + + +namespace PollinationSDK +{ + /// + /// Location + /// + [DataContract(Name = "Location")] + public partial class Location : CryptlexBase, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// ipAddress. + /// countryCode. + /// countryName. + /// city. + /// latitude. + /// longitude. + public Location + ( + // Required parameters + string ipAddress= default, string countryCode= default, string countryName= default, string city= default, double latitude= default, double longitude= default // Optional parameters + ) : base()// BaseClass + { + this.IpAddress = ipAddress; + this.CountryCode = countryCode; + this.CountryName = countryName; + this.City = city; + this.Latitude = latitude; + this.Longitude = longitude; + + // Set non-required readonly properties with defaultValue + this.Type = "Location"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "Location"; + + /// + /// Gets or Sets IpAddress + /// + [DataMember(Name = "ip_address", EmitDefaultValue = false)] + public string IpAddress { get; set; } + /// + /// Gets or Sets CountryCode + /// + [DataMember(Name = "country_code", EmitDefaultValue = false)] + public string CountryCode { get; set; } + /// + /// Gets or Sets CountryName + /// + [DataMember(Name = "country_name", EmitDefaultValue = false)] + public string CountryName { get; set; } + /// + /// Gets or Sets City + /// + [DataMember(Name = "city", EmitDefaultValue = false)] + public string City { get; set; } + /// + /// Gets or Sets Latitude + /// + [DataMember(Name = "latitude", EmitDefaultValue = false)] + public double Latitude { get; set; } + /// + /// Gets or Sets Longitude + /// + [DataMember(Name = "longitude", EmitDefaultValue = false)] + public double Longitude { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + return "Location"; + } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString(bool detailed) + { + if (!detailed) + return this.ToString(); + + var sb = new StringBuilder(); + sb.Append("Location:\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" IpAddress: ").Append(IpAddress).Append("\n"); + sb.Append(" CountryCode: ").Append(CountryCode).Append("\n"); + sb.Append(" CountryName: ").Append(CountryName).Append("\n"); + sb.Append(" City: ").Append(City).Append("\n"); + sb.Append(" Latitude: ").Append(Latitude).Append("\n"); + sb.Append(" Longitude: ").Append(Longitude).Append("\n"); + return sb.ToString(); + } + + /// + /// Returns the object from JSON string + /// + /// Location object + public static Location FromJson(string json) + { + var obj = JsonConvert.DeserializeObject(json, JsonSetting.AnyOfConvertSetting); + if (obj == null) + return null; + return obj.Type.ToLower() == obj.GetType().Name.ToLower() ? obj : null; + } + + /// + /// Creates a new instance with the same properties. + /// + /// Location object + public virtual Location DuplicateLocation() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateLocation(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override CryptlexBase DuplicateCryptlexBase() + { + return DuplicateLocation(); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + input = input is AnyOf anyOf ? anyOf.Obj : input; + return this.Equals(input as Location); + } + + /// + /// Returns true if Location instances are equal + /// + /// Instance of Location to be compared + /// Boolean + public bool Equals(Location input) + { + if (input == null) + return false; + return base.Equals(input) && + ( + this.IpAddress == input.IpAddress || + (this.IpAddress != null && + this.IpAddress.Equals(input.IpAddress)) + ) && base.Equals(input) && + ( + this.CountryCode == input.CountryCode || + (this.CountryCode != null && + this.CountryCode.Equals(input.CountryCode)) + ) && base.Equals(input) && + ( + this.CountryName == input.CountryName || + (this.CountryName != null && + this.CountryName.Equals(input.CountryName)) + ) && base.Equals(input) && + ( + this.City == input.City || + (this.City != null && + this.City.Equals(input.City)) + ) && base.Equals(input) && + ( + this.Latitude == input.Latitude || + (this.Latitude != null && + this.Latitude.Equals(input.Latitude)) + ) && base.Equals(input) && + ( + this.Longitude == input.Longitude || + (this.Longitude != null && + this.Longitude.Equals(input.Longitude)) + ) && base.Equals(input) && + ( + this.Type == input.Type || + (this.Type != null && + this.Type.Equals(input.Type)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = base.GetHashCode(); + if (this.IpAddress != null) + hashCode = hashCode * 59 + this.IpAddress.GetHashCode(); + if (this.CountryCode != null) + hashCode = hashCode * 59 + this.CountryCode.GetHashCode(); + if (this.CountryName != null) + hashCode = hashCode * 59 + this.CountryName.GetHashCode(); + if (this.City != null) + hashCode = hashCode * 59 + this.City.GetHashCode(); + if (this.Latitude != null) + hashCode = hashCode * 59 + this.Latitude.GetHashCode(); + if (this.Longitude != null) + hashCode = hashCode * 59 + this.Longitude.GetHashCode(); + if (this.Type != null) + hashCode = hashCode * 59 + this.Type.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + foreach(var x in base.BaseValidate(validationContext)) yield return x; + + + // Type (string) pattern + Regex regexType = new Regex(@"^Location$", RegexOptions.CultureInvariant); + if (false == regexType.Match(this.Type).Success) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Type, must match a pattern of " + regexType, new [] { "Type" }); + } + + yield break; + } + } +} diff --git a/src/PollinationSDK/Model/Metadata.cs b/src/PollinationSDK/Model/Metadata.cs new file mode 100644 index 000000000..acc15b4b7 --- /dev/null +++ b/src/PollinationSDK/Model/Metadata.cs @@ -0,0 +1,252 @@ +/* + * pollination-server + * + * Pollination Server OpenAPI Definition + * + * Contact: info@pollination.cloud + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; + + +namespace PollinationSDK +{ + /// + /// Metadata + /// + [DataContract(Name = "Metadata")] + public partial class Metadata : CryptlexBase, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected Metadata() + { + // Set non-required readonly properties with defaultValue + this.Type = "Metadata"; + } + + /// + /// Initializes a new instance of the class. + /// + /// key (required). + /// value (required). + /// id. + /// visible (default to false). + public Metadata + ( + string key, string value, // Required parameters + string id= default, bool visible = false // Optional parameters + ) : base()// BaseClass + { + // to ensure "key" is required (not null) + this.Key = key ?? throw new ArgumentNullException("key is a required property for Metadata and cannot be null"); + // to ensure "value" is required (not null) + this.Value = value ?? throw new ArgumentNullException("value is a required property for Metadata and cannot be null"); + this.Id = id; + this.Visible = visible; + + // Set non-required readonly properties with defaultValue + this.Type = "Metadata"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "Metadata"; + + /// + /// Gets or Sets Key + /// + [DataMember(Name = "key", IsRequired = true, EmitDefaultValue = false)] + public string Key { get; set; } + /// + /// Gets or Sets Value + /// + [DataMember(Name = "value", IsRequired = true, EmitDefaultValue = false)] + public string Value { get; set; } + /// + /// Gets or Sets Id + /// + [DataMember(Name = "id", EmitDefaultValue = false)] + public string Id { get; set; } + /// + /// Gets or Sets Visible + /// + [DataMember(Name = "visible", EmitDefaultValue = true)] + public bool Visible { get; set; } = false; + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + return "Metadata"; + } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString(bool detailed) + { + if (!detailed) + return this.ToString(); + + var sb = new StringBuilder(); + sb.Append("Metadata:\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Key: ").Append(Key).Append("\n"); + sb.Append(" Value: ").Append(Value).Append("\n"); + sb.Append(" Id: ").Append(Id).Append("\n"); + sb.Append(" Visible: ").Append(Visible).Append("\n"); + return sb.ToString(); + } + + /// + /// Returns the object from JSON string + /// + /// Metadata object + public static Metadata FromJson(string json) + { + var obj = JsonConvert.DeserializeObject(json, JsonSetting.AnyOfConvertSetting); + if (obj == null) + return null; + return obj.Type.ToLower() == obj.GetType().Name.ToLower() ? obj : null; + } + + /// + /// Creates a new instance with the same properties. + /// + /// Metadata object + public virtual Metadata DuplicateMetadata() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateMetadata(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override CryptlexBase DuplicateCryptlexBase() + { + return DuplicateMetadata(); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + input = input is AnyOf anyOf ? anyOf.Obj : input; + return this.Equals(input as Metadata); + } + + /// + /// Returns true if Metadata instances are equal + /// + /// Instance of Metadata to be compared + /// Boolean + public bool Equals(Metadata input) + { + if (input == null) + return false; + return base.Equals(input) && + ( + this.Key == input.Key || + (this.Key != null && + this.Key.Equals(input.Key)) + ) && base.Equals(input) && + ( + this.Value == input.Value || + (this.Value != null && + this.Value.Equals(input.Value)) + ) && base.Equals(input) && + ( + this.Id == input.Id || + (this.Id != null && + this.Id.Equals(input.Id)) + ) && base.Equals(input) && + ( + this.Visible == input.Visible || + (this.Visible != null && + this.Visible.Equals(input.Visible)) + ) && base.Equals(input) && + ( + this.Type == input.Type || + (this.Type != null && + this.Type.Equals(input.Type)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = base.GetHashCode(); + if (this.Key != null) + hashCode = hashCode * 59 + this.Key.GetHashCode(); + if (this.Value != null) + hashCode = hashCode * 59 + this.Value.GetHashCode(); + if (this.Id != null) + hashCode = hashCode * 59 + this.Id.GetHashCode(); + if (this.Visible != null) + hashCode = hashCode * 59 + this.Visible.GetHashCode(); + if (this.Type != null) + hashCode = hashCode * 59 + this.Type.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + foreach(var x in base.BaseValidate(validationContext)) yield return x; + + + // Type (string) pattern + Regex regexType = new Regex(@"^Metadata$", RegexOptions.CultureInvariant); + if (false == regexType.Match(this.Type).Success) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Type, must match a pattern of " + regexType, new [] { "Type" }); + } + + yield break; + } + } +} diff --git a/src/PollinationSDK/Model/NewSubscriptionItem.cs b/src/PollinationSDK/Model/NewSubscriptionItem.cs new file mode 100644 index 000000000..c54b11ffb --- /dev/null +++ b/src/PollinationSDK/Model/NewSubscriptionItem.cs @@ -0,0 +1,221 @@ +/* + * pollination-server + * + * Pollination Server OpenAPI Definition + * + * Contact: info@pollination.cloud + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; + + +namespace PollinationSDK +{ + /// + /// NewSubscriptionItem + /// + [DataContract(Name = "NewSubscriptionItem")] + public partial class NewSubscriptionItem : OpenAPIGenBaseModel, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected NewSubscriptionItem() + { + // Set non-required readonly properties with defaultValue + this.Type = "NewSubscriptionItem"; + } + + /// + /// Initializes a new instance of the class. + /// + /// price (required). + /// quantity (required). + public NewSubscriptionItem + ( + Price price, int quantity// Required parameters + // Optional parameters + ) : base()// BaseClass + { + // to ensure "price" is required (not null) + this.Price = price ?? throw new ArgumentNullException("price is a required property for NewSubscriptionItem and cannot be null"); + this.Quantity = quantity; + + // Set non-required readonly properties with defaultValue + this.Type = "NewSubscriptionItem"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "NewSubscriptionItem"; + + /// + /// Gets or Sets Price + /// + [DataMember(Name = "price", IsRequired = true, EmitDefaultValue = false)] + public Price Price { get; set; } + /// + /// Gets or Sets Quantity + /// + [DataMember(Name = "quantity", IsRequired = true, EmitDefaultValue = false)] + public int Quantity { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + return "NewSubscriptionItem"; + } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString(bool detailed) + { + if (!detailed) + return this.ToString(); + + var sb = new StringBuilder(); + sb.Append("NewSubscriptionItem:\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Price: ").Append(Price).Append("\n"); + sb.Append(" Quantity: ").Append(Quantity).Append("\n"); + return sb.ToString(); + } + + /// + /// Returns the object from JSON string + /// + /// NewSubscriptionItem object + public static NewSubscriptionItem FromJson(string json) + { + var obj = JsonConvert.DeserializeObject(json, JsonSetting.AnyOfConvertSetting); + if (obj == null) + return null; + return obj.Type.ToLower() == obj.GetType().Name.ToLower() ? obj : null; + } + + /// + /// Creates a new instance with the same properties. + /// + /// NewSubscriptionItem object + public virtual NewSubscriptionItem DuplicateNewSubscriptionItem() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateNewSubscriptionItem(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel DuplicateOpenAPIGenBaseModel() + { + return DuplicateNewSubscriptionItem(); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + input = input is AnyOf anyOf ? anyOf.Obj : input; + return this.Equals(input as NewSubscriptionItem); + } + + /// + /// Returns true if NewSubscriptionItem instances are equal + /// + /// Instance of NewSubscriptionItem to be compared + /// Boolean + public bool Equals(NewSubscriptionItem input) + { + if (input == null) + return false; + return base.Equals(input) && + ( + this.Price == input.Price || + (this.Price != null && + this.Price.Equals(input.Price)) + ) && base.Equals(input) && + ( + this.Quantity == input.Quantity || + (this.Quantity != null && + this.Quantity.Equals(input.Quantity)) + ) && base.Equals(input) && + ( + this.Type == input.Type || + (this.Type != null && + this.Type.Equals(input.Type)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = base.GetHashCode(); + if (this.Price != null) + hashCode = hashCode * 59 + this.Price.GetHashCode(); + if (this.Quantity != null) + hashCode = hashCode * 59 + this.Quantity.GetHashCode(); + if (this.Type != null) + hashCode = hashCode * 59 + this.Type.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + foreach(var x in base.BaseValidate(validationContext)) yield return x; + + + // Type (string) pattern + Regex regexType = new Regex(@"^NewSubscriptionItem$", RegexOptions.CultureInvariant); + if (false == regexType.Match(this.Type).Success) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Type, must match a pattern of " + regexType, new [] { "Type" }); + } + + yield break; + } + } +} diff --git a/src/PollinationSDK/Model/PackageSortKey.cs b/src/PollinationSDK/Model/PackageSortKey.cs new file mode 100644 index 000000000..40e3ab190 --- /dev/null +++ b/src/PollinationSDK/Model/PackageSortKey.cs @@ -0,0 +1,55 @@ +/* + * pollination-server + * + * Pollination Server OpenAPI Definition + * + * Contact: info@pollination.cloud + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; + + +namespace PollinationSDK +{ + /// + /// An enumeration. + /// + /// An enumeration. + + [JsonConverter(typeof(StringEnumConverter))] + + public enum PackageSortKey + { + /// + /// Enum Createdat for value: created_at + /// + [EnumMember(Value = "created_at")] + Createdat = 1, + + /// + /// Enum Updatedat for value: updated_at + /// + [EnumMember(Value = "updated_at")] + Updatedat = 2, + + /// + /// Enum Tag for value: tag + /// + [EnumMember(Value = "tag")] + Tag = 3 + + } + +} diff --git a/src/PollinationSDK/Model/PaymentCreate.cs b/src/PollinationSDK/Model/PaymentCreate.cs new file mode 100644 index 000000000..60628d4ae --- /dev/null +++ b/src/PollinationSDK/Model/PaymentCreate.cs @@ -0,0 +1,196 @@ +/* + * pollination-server + * + * Pollination Server OpenAPI Definition + * + * Contact: info@pollination.cloud + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; + + +namespace PollinationSDK +{ + /// + /// PaymentCreate + /// + [DataContract(Name = "PaymentCreate")] + public partial class PaymentCreate : OpenAPIGenBaseModel, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// The description of this payment method. + public PaymentCreate + ( + // Required parameters + string description= default // Optional parameters + ) : base()// BaseClass + { + this.Description = description; + + // Set non-required readonly properties with defaultValue + this.Type = "PaymentCreate"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "PaymentCreate"; + + /// + /// The description of this payment method + /// + /// The description of this payment method + [DataMember(Name = "description", EmitDefaultValue = false)] + public string Description { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + return "PaymentCreate"; + } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString(bool detailed) + { + if (!detailed) + return this.ToString(); + + var sb = new StringBuilder(); + sb.Append("PaymentCreate:\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Description: ").Append(Description).Append("\n"); + return sb.ToString(); + } + + /// + /// Returns the object from JSON string + /// + /// PaymentCreate object + public static PaymentCreate FromJson(string json) + { + var obj = JsonConvert.DeserializeObject(json, JsonSetting.AnyOfConvertSetting); + if (obj == null) + return null; + return obj.Type.ToLower() == obj.GetType().Name.ToLower() ? obj : null; + } + + /// + /// Creates a new instance with the same properties. + /// + /// PaymentCreate object + public virtual PaymentCreate DuplicatePaymentCreate() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicatePaymentCreate(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel DuplicateOpenAPIGenBaseModel() + { + return DuplicatePaymentCreate(); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + input = input is AnyOf anyOf ? anyOf.Obj : input; + return this.Equals(input as PaymentCreate); + } + + /// + /// Returns true if PaymentCreate instances are equal + /// + /// Instance of PaymentCreate to be compared + /// Boolean + public bool Equals(PaymentCreate input) + { + if (input == null) + return false; + return base.Equals(input) && + ( + this.Description == input.Description || + (this.Description != null && + this.Description.Equals(input.Description)) + ) && base.Equals(input) && + ( + this.Type == input.Type || + (this.Type != null && + this.Type.Equals(input.Type)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = base.GetHashCode(); + if (this.Description != null) + hashCode = hashCode * 59 + this.Description.GetHashCode(); + if (this.Type != null) + hashCode = hashCode * 59 + this.Type.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + foreach(var x in base.BaseValidate(validationContext)) yield return x; + + + // Type (string) pattern + Regex regexType = new Regex(@"^PaymentCreate$", RegexOptions.CultureInvariant); + if (false == regexType.Match(this.Type).Success) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Type, must match a pattern of " + regexType, new [] { "Type" }); + } + + yield break; + } + } +} diff --git a/src/PollinationSDK/Model/PaymentIntent.cs b/src/PollinationSDK/Model/PaymentIntent.cs new file mode 100644 index 000000000..8d34ddb06 --- /dev/null +++ b/src/PollinationSDK/Model/PaymentIntent.cs @@ -0,0 +1,192 @@ +/* + * pollination-server + * + * Pollination Server OpenAPI Definition + * + * Contact: info@pollination.cloud + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; + + +namespace PollinationSDK +{ + /// + /// PaymentIntent + /// + [DataContract(Name = "PaymentIntent")] + public partial class PaymentIntent : SecureResourcePublic, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected PaymentIntent() + { + // Set non-required readonly properties with defaultValue + this.Type = "PaymentIntent"; + } + + /// + /// Initializes a new instance of the class. + /// + /// Secret string to be used to retrieve the resource from the client (required). + public PaymentIntent + ( + string clientSecret// Required parameters + // Optional parameters + ) : base(clientSecret: clientSecret)// BaseClass + { + + // Set non-required readonly properties with defaultValue + this.Type = "PaymentIntent"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "PaymentIntent"; + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + return "PaymentIntent"; + } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString(bool detailed) + { + if (!detailed) + return this.ToString(); + + var sb = new StringBuilder(); + sb.Append("PaymentIntent:\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" ClientSecret: ").Append(ClientSecret).Append("\n"); + return sb.ToString(); + } + + /// + /// Returns the object from JSON string + /// + /// PaymentIntent object + public static PaymentIntent FromJson(string json) + { + var obj = JsonConvert.DeserializeObject(json, JsonSetting.AnyOfConvertSetting); + if (obj == null) + return null; + return obj.Type.ToLower() == obj.GetType().Name.ToLower() ? obj : null; + } + + /// + /// Creates a new instance with the same properties. + /// + /// PaymentIntent object + public virtual PaymentIntent DuplicatePaymentIntent() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicatePaymentIntent(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override SecureResourcePublic DuplicateSecureResourcePublic() + { + return DuplicatePaymentIntent(); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + input = input is AnyOf anyOf ? anyOf.Obj : input; + return this.Equals(input as PaymentIntent); + } + + /// + /// Returns true if PaymentIntent instances are equal + /// + /// Instance of PaymentIntent to be compared + /// Boolean + public bool Equals(PaymentIntent input) + { + if (input == null) + return false; + return base.Equals(input) && + ( + this.Type == input.Type || + (this.Type != null && + this.Type.Equals(input.Type)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = base.GetHashCode(); + if (this.Type != null) + hashCode = hashCode * 59 + this.Type.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + foreach(var x in base.BaseValidate(validationContext)) yield return x; + + + // Type (string) pattern + Regex regexType = new Regex(@"^PaymentIntent$", RegexOptions.CultureInvariant); + if (false == regexType.Match(this.Type).Success) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Type, must match a pattern of " + regexType, new [] { "Type" }); + } + + yield break; + } + } +} diff --git a/src/PollinationSDK/Model/PaymentMethodList.cs b/src/PollinationSDK/Model/PaymentMethodList.cs new file mode 100644 index 000000000..240950198 --- /dev/null +++ b/src/PollinationSDK/Model/PaymentMethodList.cs @@ -0,0 +1,287 @@ +/* + * pollination-server + * + * Pollination Server OpenAPI Definition + * + * Contact: info@pollination.cloud + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; + + +namespace PollinationSDK +{ + /// + /// A list response from a pagination request + /// + [DataContract(Name = "PaymentMethodList")] + public partial class PaymentMethodList : OpenAPIGenBaseModel, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected PaymentMethodList() + { + // Set non-required readonly properties with defaultValue + this.Type = "PaymentMethodList"; + } + + /// + /// Initializes a new instance of the class. + /// + /// The current page the pagination request is on (required). + /// The number of pages per pagination request (required). + /// The total number of pages (required). + /// The total number of resources matching the list request (required). + /// resources (required). + /// The next page, if this on is not the last. + public PaymentMethodList + ( + int page, int perPage, int pageCount, int totalCount, List resources, // Required parameters + int nextPage= default // Optional parameters + ) : base()// BaseClass + { + this.Page = page; + this.PerPage = perPage; + this.PageCount = pageCount; + this.TotalCount = totalCount; + // to ensure "resources" is required (not null) + this.Resources = resources ?? throw new ArgumentNullException("resources is a required property for PaymentMethodList and cannot be null"); + this.NextPage = nextPage; + + // Set non-required readonly properties with defaultValue + this.Type = "PaymentMethodList"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "PaymentMethodList"; + + /// + /// The current page the pagination request is on + /// + /// The current page the pagination request is on + [DataMember(Name = "page", IsRequired = true, EmitDefaultValue = false)] + public int Page { get; set; } + /// + /// The number of pages per pagination request + /// + /// The number of pages per pagination request + [DataMember(Name = "per_page", IsRequired = true, EmitDefaultValue = false)] + public int PerPage { get; set; } + /// + /// The total number of pages + /// + /// The total number of pages + [DataMember(Name = "page_count", IsRequired = true, EmitDefaultValue = false)] + public int PageCount { get; set; } + /// + /// The total number of resources matching the list request + /// + /// The total number of resources matching the list request + [DataMember(Name = "total_count", IsRequired = true, EmitDefaultValue = false)] + public int TotalCount { get; set; } + /// + /// Gets or Sets Resources + /// + [DataMember(Name = "resources", IsRequired = true, EmitDefaultValue = false)] + public List Resources { get; set; } + /// + /// The next page, if this on is not the last + /// + /// The next page, if this on is not the last + [DataMember(Name = "next_page", EmitDefaultValue = false)] + public int NextPage { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + return "PaymentMethodList"; + } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString(bool detailed) + { + if (!detailed) + return this.ToString(); + + var sb = new StringBuilder(); + sb.Append("PaymentMethodList:\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Page: ").Append(Page).Append("\n"); + sb.Append(" PerPage: ").Append(PerPage).Append("\n"); + sb.Append(" PageCount: ").Append(PageCount).Append("\n"); + sb.Append(" TotalCount: ").Append(TotalCount).Append("\n"); + sb.Append(" Resources: ").Append(Resources).Append("\n"); + sb.Append(" NextPage: ").Append(NextPage).Append("\n"); + return sb.ToString(); + } + + /// + /// Returns the object from JSON string + /// + /// PaymentMethodList object + public static PaymentMethodList FromJson(string json) + { + var obj = JsonConvert.DeserializeObject(json, JsonSetting.AnyOfConvertSetting); + if (obj == null) + return null; + return obj.Type.ToLower() == obj.GetType().Name.ToLower() ? obj : null; + } + + /// + /// Creates a new instance with the same properties. + /// + /// PaymentMethodList object + public virtual PaymentMethodList DuplicatePaymentMethodList() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicatePaymentMethodList(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel DuplicateOpenAPIGenBaseModel() + { + return DuplicatePaymentMethodList(); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + input = input is AnyOf anyOf ? anyOf.Obj : input; + return this.Equals(input as PaymentMethodList); + } + + /// + /// Returns true if PaymentMethodList instances are equal + /// + /// Instance of PaymentMethodList to be compared + /// Boolean + public bool Equals(PaymentMethodList input) + { + if (input == null) + return false; + return base.Equals(input) && + ( + this.Page == input.Page || + (this.Page != null && + this.Page.Equals(input.Page)) + ) && base.Equals(input) && + ( + this.PerPage == input.PerPage || + (this.PerPage != null && + this.PerPage.Equals(input.PerPage)) + ) && base.Equals(input) && + ( + this.PageCount == input.PageCount || + (this.PageCount != null && + this.PageCount.Equals(input.PageCount)) + ) && base.Equals(input) && + ( + this.TotalCount == input.TotalCount || + (this.TotalCount != null && + this.TotalCount.Equals(input.TotalCount)) + ) && base.Equals(input) && + ( + this.Resources == input.Resources || + this.Resources != null && + input.Resources != null && + this.Resources.SequenceEqual(input.Resources) + ) && base.Equals(input) && + ( + this.NextPage == input.NextPage || + (this.NextPage != null && + this.NextPage.Equals(input.NextPage)) + ) && base.Equals(input) && + ( + this.Type == input.Type || + (this.Type != null && + this.Type.Equals(input.Type)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = base.GetHashCode(); + if (this.Page != null) + hashCode = hashCode * 59 + this.Page.GetHashCode(); + if (this.PerPage != null) + hashCode = hashCode * 59 + this.PerPage.GetHashCode(); + if (this.PageCount != null) + hashCode = hashCode * 59 + this.PageCount.GetHashCode(); + if (this.TotalCount != null) + hashCode = hashCode * 59 + this.TotalCount.GetHashCode(); + if (this.Resources != null) + hashCode = hashCode * 59 + this.Resources.GetHashCode(); + if (this.NextPage != null) + hashCode = hashCode * 59 + this.NextPage.GetHashCode(); + if (this.Type != null) + hashCode = hashCode * 59 + this.Type.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + foreach(var x in base.BaseValidate(validationContext)) yield return x; + + + // Type (string) pattern + Regex regexType = new Regex(@"^PaymentMethodList$", RegexOptions.CultureInvariant); + if (false == regexType.Match(this.Type).Success) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Type, must match a pattern of " + regexType, new [] { "Type" }); + } + + yield break; + } + } +} diff --git a/src/PollinationSDK/Model/PaymentSetup.cs b/src/PollinationSDK/Model/PaymentSetup.cs new file mode 100644 index 000000000..0679f6e6b --- /dev/null +++ b/src/PollinationSDK/Model/PaymentSetup.cs @@ -0,0 +1,192 @@ +/* + * pollination-server + * + * Pollination Server OpenAPI Definition + * + * Contact: info@pollination.cloud + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; + + +namespace PollinationSDK +{ + /// + /// PaymentSetup + /// + [DataContract(Name = "PaymentSetup")] + public partial class PaymentSetup : SecureResourcePublic, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected PaymentSetup() + { + // Set non-required readonly properties with defaultValue + this.Type = "PaymentSetup"; + } + + /// + /// Initializes a new instance of the class. + /// + /// Secret string to be used to retrieve the resource from the client (required). + public PaymentSetup + ( + string clientSecret// Required parameters + // Optional parameters + ) : base(clientSecret: clientSecret)// BaseClass + { + + // Set non-required readonly properties with defaultValue + this.Type = "PaymentSetup"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "PaymentSetup"; + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + return "PaymentSetup"; + } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString(bool detailed) + { + if (!detailed) + return this.ToString(); + + var sb = new StringBuilder(); + sb.Append("PaymentSetup:\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" ClientSecret: ").Append(ClientSecret).Append("\n"); + return sb.ToString(); + } + + /// + /// Returns the object from JSON string + /// + /// PaymentSetup object + public static PaymentSetup FromJson(string json) + { + var obj = JsonConvert.DeserializeObject(json, JsonSetting.AnyOfConvertSetting); + if (obj == null) + return null; + return obj.Type.ToLower() == obj.GetType().Name.ToLower() ? obj : null; + } + + /// + /// Creates a new instance with the same properties. + /// + /// PaymentSetup object + public virtual PaymentSetup DuplicatePaymentSetup() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicatePaymentSetup(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override SecureResourcePublic DuplicateSecureResourcePublic() + { + return DuplicatePaymentSetup(); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + input = input is AnyOf anyOf ? anyOf.Obj : input; + return this.Equals(input as PaymentSetup); + } + + /// + /// Returns true if PaymentSetup instances are equal + /// + /// Instance of PaymentSetup to be compared + /// Boolean + public bool Equals(PaymentSetup input) + { + if (input == null) + return false; + return base.Equals(input) && + ( + this.Type == input.Type || + (this.Type != null && + this.Type.Equals(input.Type)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = base.GetHashCode(); + if (this.Type != null) + hashCode = hashCode * 59 + this.Type.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + foreach(var x in base.BaseValidate(validationContext)) yield return x; + + + // Type (string) pattern + Regex regexType = new Regex(@"^PaymentSetup$", RegexOptions.CultureInvariant); + if (false == regexType.Match(this.Type).Success) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Type, must match a pattern of " + regexType, new [] { "Type" }); + } + + yield break; + } + } +} diff --git a/src/PollinationSDK/Model/Period.cs b/src/PollinationSDK/Model/Period.cs new file mode 100644 index 000000000..508c5edd1 --- /dev/null +++ b/src/PollinationSDK/Model/Period.cs @@ -0,0 +1,220 @@ +/* + * pollination-server + * + * Pollination Server OpenAPI Definition + * + * Contact: info@pollination.cloud + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; + + +namespace PollinationSDK +{ + /// + /// Period + /// + [DataContract(Name = "Period")] + public partial class Period : OpenAPIGenBaseModel, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected Period() + { + // Set non-required readonly properties with defaultValue + this.Type = "Period"; + } + + /// + /// Initializes a new instance of the class. + /// + /// start (required). + /// end (required). + public Period + ( + DateTime start, DateTime end// Required parameters + // Optional parameters + ) : base()// BaseClass + { + this.Start = start; + this.End = end; + + // Set non-required readonly properties with defaultValue + this.Type = "Period"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "Period"; + + /// + /// Gets or Sets Start + /// + [DataMember(Name = "start", IsRequired = true, EmitDefaultValue = false)] + public DateTime Start { get; set; } + /// + /// Gets or Sets End + /// + [DataMember(Name = "end", IsRequired = true, EmitDefaultValue = false)] + public DateTime End { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + return "Period"; + } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString(bool detailed) + { + if (!detailed) + return this.ToString(); + + var sb = new StringBuilder(); + sb.Append("Period:\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Start: ").Append(Start).Append("\n"); + sb.Append(" End: ").Append(End).Append("\n"); + return sb.ToString(); + } + + /// + /// Returns the object from JSON string + /// + /// Period object + public static Period FromJson(string json) + { + var obj = JsonConvert.DeserializeObject(json, JsonSetting.AnyOfConvertSetting); + if (obj == null) + return null; + return obj.Type.ToLower() == obj.GetType().Name.ToLower() ? obj : null; + } + + /// + /// Creates a new instance with the same properties. + /// + /// Period object + public virtual Period DuplicatePeriod() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicatePeriod(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel DuplicateOpenAPIGenBaseModel() + { + return DuplicatePeriod(); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + input = input is AnyOf anyOf ? anyOf.Obj : input; + return this.Equals(input as Period); + } + + /// + /// Returns true if Period instances are equal + /// + /// Instance of Period to be compared + /// Boolean + public bool Equals(Period input) + { + if (input == null) + return false; + return base.Equals(input) && + ( + this.Start == input.Start || + (this.Start != null && + this.Start.Equals(input.Start)) + ) && base.Equals(input) && + ( + this.End == input.End || + (this.End != null && + this.End.Equals(input.End)) + ) && base.Equals(input) && + ( + this.Type == input.Type || + (this.Type != null && + this.Type.Equals(input.Type)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = base.GetHashCode(); + if (this.Start != null) + hashCode = hashCode * 59 + this.Start.GetHashCode(); + if (this.End != null) + hashCode = hashCode * 59 + this.End.GetHashCode(); + if (this.Type != null) + hashCode = hashCode * 59 + this.Type.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + foreach(var x in base.BaseValidate(validationContext)) yield return x; + + + // Type (string) pattern + Regex regexType = new Regex(@"^Period$", RegexOptions.CultureInvariant); + if (false == regexType.Match(this.Type).Success) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Type, must match a pattern of " + regexType, new [] { "Type" }); + } + + yield break; + } + } +} diff --git a/src/PollinationSDK/Model/PollinationSubscription.cs b/src/PollinationSDK/Model/PollinationSubscription.cs new file mode 100644 index 000000000..13d5520c1 --- /dev/null +++ b/src/PollinationSDK/Model/PollinationSubscription.cs @@ -0,0 +1,278 @@ +/* + * pollination-server + * + * Pollination Server OpenAPI Definition + * + * Contact: info@pollination.cloud + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; + + +namespace PollinationSDK +{ + /// + /// PollinationSubscription + /// + [DataContract(Name = "PollinationSubscription")] + public partial class PollinationSubscription : Subscription, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected PollinationSubscription() + { + // Set non-required readonly properties with defaultValue + this.Type = "PollinationSubscription"; + } + + /// + /// Initializes a new instance of the class. + /// + /// The ID of the account this subscription applies to (required). + /// A subscription plan (required). + /// The ID of this subscription. + /// A list of quota extension plans for a given subscription. + /// id (required). + /// metadata. + /// cancelAtPeriodEnd (required). + /// currentPeriodStart (required). + /// currentPeriodEnd (required). + /// customer (required). + /// items (required). + /// latestInvoice (required). + /// defaultPaymentMethod. + /// schedule. + /// discount. + public PollinationSubscription + ( + string id, bool cancelAtPeriodEnd, DateTime currentPeriodStart, DateTime currentPeriodEnd, string customer, SubscriptionItemList items, string latestInvoice, Guid accountId, SubscriptionPlan subscriptionPlan, // Required parameters + Object metadata= default, string defaultPaymentMethod= default, string schedule= default, Discount discount= default, string externalId= default, List quotaExtensions= default // Optional parameters + ) : base(id: id, metadata: metadata, cancelAtPeriodEnd: cancelAtPeriodEnd, currentPeriodStart: currentPeriodStart, currentPeriodEnd: currentPeriodEnd, customer: customer, items: items, latestInvoice: latestInvoice, defaultPaymentMethod: defaultPaymentMethod, schedule: schedule, discount: discount)// BaseClass + { + this.AccountId = accountId; + // to ensure "subscriptionPlan" is required (not null) + this.SubscriptionPlan = subscriptionPlan ?? throw new ArgumentNullException("subscriptionPlan is a required property for PollinationSubscription and cannot be null"); + this.ExternalId = externalId; + this.QuotaExtensions = quotaExtensions; + + // Set non-required readonly properties with defaultValue + this.Type = "PollinationSubscription"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "PollinationSubscription"; + + /// + /// The ID of the account this subscription applies to + /// + /// The ID of the account this subscription applies to + [DataMember(Name = "account_id", IsRequired = true, EmitDefaultValue = false)] + public Guid AccountId { get; set; } + /// + /// A subscription plan + /// + /// A subscription plan + [DataMember(Name = "subscription_plan", IsRequired = true, EmitDefaultValue = false)] + public SubscriptionPlan SubscriptionPlan { get; set; } + /// + /// The ID of this subscription + /// + /// The ID of this subscription + [DataMember(Name = "external_id", EmitDefaultValue = false)] + public string ExternalId { get; set; } + /// + /// A list of quota extension plans for a given subscription + /// + /// A list of quota extension plans for a given subscription + [DataMember(Name = "quota_extensions", EmitDefaultValue = false)] + public List QuotaExtensions { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + return "PollinationSubscription"; + } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString(bool detailed) + { + if (!detailed) + return this.ToString(); + + var sb = new StringBuilder(); + sb.Append("PollinationSubscription:\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Id: ").Append(Id).Append("\n"); + sb.Append(" Metadata: ").Append(Metadata).Append("\n"); + sb.Append(" CancelAtPeriodEnd: ").Append(CancelAtPeriodEnd).Append("\n"); + sb.Append(" CurrentPeriodStart: ").Append(CurrentPeriodStart).Append("\n"); + sb.Append(" CurrentPeriodEnd: ").Append(CurrentPeriodEnd).Append("\n"); + sb.Append(" Customer: ").Append(Customer).Append("\n"); + sb.Append(" Items: ").Append(Items).Append("\n"); + sb.Append(" LatestInvoice: ").Append(LatestInvoice).Append("\n"); + sb.Append(" DefaultPaymentMethod: ").Append(DefaultPaymentMethod).Append("\n"); + sb.Append(" Schedule: ").Append(Schedule).Append("\n"); + sb.Append(" Discount: ").Append(Discount).Append("\n"); + sb.Append(" AccountId: ").Append(AccountId).Append("\n"); + sb.Append(" SubscriptionPlan: ").Append(SubscriptionPlan).Append("\n"); + sb.Append(" ExternalId: ").Append(ExternalId).Append("\n"); + sb.Append(" QuotaExtensions: ").Append(QuotaExtensions).Append("\n"); + return sb.ToString(); + } + + /// + /// Returns the object from JSON string + /// + /// PollinationSubscription object + public static PollinationSubscription FromJson(string json) + { + var obj = JsonConvert.DeserializeObject(json, JsonSetting.AnyOfConvertSetting); + if (obj == null) + return null; + return obj.Type.ToLower() == obj.GetType().Name.ToLower() ? obj : null; + } + + /// + /// Creates a new instance with the same properties. + /// + /// PollinationSubscription object + public virtual PollinationSubscription DuplicatePollinationSubscription() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicatePollinationSubscription(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override Subscription DuplicateSubscription() + { + return DuplicatePollinationSubscription(); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + input = input is AnyOf anyOf ? anyOf.Obj : input; + return this.Equals(input as PollinationSubscription); + } + + /// + /// Returns true if PollinationSubscription instances are equal + /// + /// Instance of PollinationSubscription to be compared + /// Boolean + public bool Equals(PollinationSubscription input) + { + if (input == null) + return false; + return base.Equals(input) && + ( + this.AccountId == input.AccountId || + (this.AccountId != null && + this.AccountId.Equals(input.AccountId)) + ) && base.Equals(input) && + ( + this.SubscriptionPlan == input.SubscriptionPlan || + (this.SubscriptionPlan != null && + this.SubscriptionPlan.Equals(input.SubscriptionPlan)) + ) && base.Equals(input) && + ( + this.ExternalId == input.ExternalId || + (this.ExternalId != null && + this.ExternalId.Equals(input.ExternalId)) + ) && base.Equals(input) && + ( + this.QuotaExtensions == input.QuotaExtensions || + this.QuotaExtensions != null && + input.QuotaExtensions != null && + this.QuotaExtensions.SequenceEqual(input.QuotaExtensions) + ) && base.Equals(input) && + ( + this.Type == input.Type || + (this.Type != null && + this.Type.Equals(input.Type)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = base.GetHashCode(); + if (this.AccountId != null) + hashCode = hashCode * 59 + this.AccountId.GetHashCode(); + if (this.SubscriptionPlan != null) + hashCode = hashCode * 59 + this.SubscriptionPlan.GetHashCode(); + if (this.ExternalId != null) + hashCode = hashCode * 59 + this.ExternalId.GetHashCode(); + if (this.QuotaExtensions != null) + hashCode = hashCode * 59 + this.QuotaExtensions.GetHashCode(); + if (this.Type != null) + hashCode = hashCode * 59 + this.Type.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + foreach(var x in base.BaseValidate(validationContext)) yield return x; + + + // Type (string) pattern + Regex regexType = new Regex(@"^PollinationSubscription$", RegexOptions.CultureInvariant); + if (false == regexType.Match(this.Type).Success) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Type, must match a pattern of " + regexType, new [] { "Type" }); + } + + yield break; + } + } +} diff --git a/src/PollinationSDK/Model/Price.cs b/src/PollinationSDK/Model/Price.cs new file mode 100644 index 000000000..4f9f4559a --- /dev/null +++ b/src/PollinationSDK/Model/Price.cs @@ -0,0 +1,292 @@ +/* + * pollination-server + * + * Pollination Server OpenAPI Definition + * + * Contact: info@pollination.cloud + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; + + +namespace PollinationSDK +{ + /// + /// Price + /// + [DataContract(Name = "Price")] + public partial class Price : ExternalResource, IEquatable, IValidatableObject + { + /// + /// Gets or Sets Type + /// + [DataMember(Name="type", EmitDefaultValue=false)] + public PriceType Type { get; set; } + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected Price() + { + // Set non-required readonly properties with defaultValue + } + + /// + /// Initializes a new instance of the class. + /// + /// product (required). + /// active (required). + /// currency (required). + /// type (required) (default to "Price"). + /// unitAmount. + /// recurring. + /// nickname. + /// tiers. + /// id (required). + /// metadata. + public Price + ( + string id, string product, bool active, string currency, PriceType type, // Required parameters + Object metadata= default, int unitAmount= default, PriceRecurrence recurring= default, string nickname= default, List tiers= default// Optional parameters + ) : base(id: id, metadata: metadata)// BaseClass + { + // to ensure "product" is required (not null) + this.Product = product ?? throw new ArgumentNullException("product is a required property for Price and cannot be null"); + this.Active = active; + // to ensure "currency" is required (not null) + this.Currency = currency ?? throw new ArgumentNullException("currency is a required property for Price and cannot be null"); + this.Type = type; + this.UnitAmount = unitAmount; + this.Recurring = recurring; + this.Nickname = nickname; + this.Tiers = tiers; + + // Set non-required readonly properties with defaultValue + } + + + /// + /// Gets or Sets Product + /// + [DataMember(Name = "product", IsRequired = true, EmitDefaultValue = false)] + public string Product { get; set; } + /// + /// Gets or Sets Active + /// + [DataMember(Name = "active", IsRequired = true, EmitDefaultValue = false)] + public bool Active { get; set; } + /// + /// Gets or Sets Currency + /// + [DataMember(Name = "currency", IsRequired = true, EmitDefaultValue = false)] + public string Currency { get; set; } + /// + /// Gets or Sets UnitAmount + /// + [DataMember(Name = "unit_amount", EmitDefaultValue = false)] + public int UnitAmount { get; set; } + /// + /// Gets or Sets Recurring + /// + [DataMember(Name = "recurring", EmitDefaultValue = false)] + public PriceRecurrence Recurring { get; set; } + /// + /// Gets or Sets Nickname + /// + [DataMember(Name = "nickname", EmitDefaultValue = false)] + public string Nickname { get; set; } + /// + /// Gets or Sets Tiers + /// + [DataMember(Name = "tiers", EmitDefaultValue = false)] + public List Tiers { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + return "Price"; + } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString(bool detailed) + { + if (!detailed) + return this.ToString(); + + var sb = new StringBuilder(); + sb.Append("Price:\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Id: ").Append(Id).Append("\n"); + sb.Append(" Metadata: ").Append(Metadata).Append("\n"); + sb.Append(" Product: ").Append(Product).Append("\n"); + sb.Append(" Active: ").Append(Active).Append("\n"); + sb.Append(" Currency: ").Append(Currency).Append("\n"); + sb.Append(" UnitAmount: ").Append(UnitAmount).Append("\n"); + sb.Append(" Recurring: ").Append(Recurring).Append("\n"); + sb.Append(" Nickname: ").Append(Nickname).Append("\n"); + sb.Append(" Tiers: ").Append(Tiers).Append("\n"); + return sb.ToString(); + } + + /// + /// Returns the object from JSON string + /// + /// Price object + public static Price FromJson(string json) + { + var obj = JsonConvert.DeserializeObject(json, JsonSetting.AnyOfConvertSetting); + if (obj == null) + return null; + return obj.Type.ToLower() == obj.GetType().Name.ToLower() ? obj : null; + } + + /// + /// Creates a new instance with the same properties. + /// + /// Price object + public virtual Price DuplicatePrice() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicatePrice(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override ExternalResource DuplicateExternalResource() + { + return DuplicatePrice(); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + input = input is AnyOf anyOf ? anyOf.Obj : input; + return this.Equals(input as Price); + } + + /// + /// Returns true if Price instances are equal + /// + /// Instance of Price to be compared + /// Boolean + public bool Equals(Price input) + { + if (input == null) + return false; + return base.Equals(input) && + ( + this.Product == input.Product || + (this.Product != null && + this.Product.Equals(input.Product)) + ) && base.Equals(input) && + ( + this.Active == input.Active || + (this.Active != null && + this.Active.Equals(input.Active)) + ) && base.Equals(input) && + ( + this.Currency == input.Currency || + (this.Currency != null && + this.Currency.Equals(input.Currency)) + ) && base.Equals(input) && + ( + this.Type == input.Type || + (this.Type != null && + this.Type.Equals(input.Type)) + ) && base.Equals(input) && + ( + this.UnitAmount == input.UnitAmount || + (this.UnitAmount != null && + this.UnitAmount.Equals(input.UnitAmount)) + ) && base.Equals(input) && + ( + this.Recurring == input.Recurring || + (this.Recurring != null && + this.Recurring.Equals(input.Recurring)) + ) && base.Equals(input) && + ( + this.Nickname == input.Nickname || + (this.Nickname != null && + this.Nickname.Equals(input.Nickname)) + ) && base.Equals(input) && + ( + this.Tiers == input.Tiers || + this.Tiers != null && + input.Tiers != null && + this.Tiers.SequenceEqual(input.Tiers) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = base.GetHashCode(); + if (this.Product != null) + hashCode = hashCode * 59 + this.Product.GetHashCode(); + if (this.Active != null) + hashCode = hashCode * 59 + this.Active.GetHashCode(); + if (this.Currency != null) + hashCode = hashCode * 59 + this.Currency.GetHashCode(); + if (this.Type != null) + hashCode = hashCode * 59 + this.Type.GetHashCode(); + if (this.UnitAmount != null) + hashCode = hashCode * 59 + this.UnitAmount.GetHashCode(); + if (this.Recurring != null) + hashCode = hashCode * 59 + this.Recurring.GetHashCode(); + if (this.Nickname != null) + hashCode = hashCode * 59 + this.Nickname.GetHashCode(); + if (this.Tiers != null) + hashCode = hashCode * 59 + this.Tiers.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + foreach(var x in base.BaseValidate(validationContext)) yield return x; + yield break; + } + } +} diff --git a/src/PollinationSDK/Model/PriceRecurrence.cs b/src/PollinationSDK/Model/PriceRecurrence.cs new file mode 100644 index 000000000..5f22fa161 --- /dev/null +++ b/src/PollinationSDK/Model/PriceRecurrence.cs @@ -0,0 +1,237 @@ +/* + * pollination-server + * + * Pollination Server OpenAPI Definition + * + * Contact: info@pollination.cloud + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; + + +namespace PollinationSDK +{ + /// + /// PriceRecurrence + /// + [DataContract(Name = "PriceRecurrence")] + public partial class PriceRecurrence : OpenAPIGenBaseModel, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected PriceRecurrence() + { + // Set non-required readonly properties with defaultValue + this.Type = "PriceRecurrence"; + } + + /// + /// Initializes a new instance of the class. + /// + /// interval (required). + /// intervalCount (required). + /// usageType (required). + public PriceRecurrence + ( + string interval, int intervalCount, string usageType// Required parameters + // Optional parameters + ) : base()// BaseClass + { + // to ensure "interval" is required (not null) + this.Interval = interval ?? throw new ArgumentNullException("interval is a required property for PriceRecurrence and cannot be null"); + this.IntervalCount = intervalCount; + // to ensure "usageType" is required (not null) + this.UsageType = usageType ?? throw new ArgumentNullException("usageType is a required property for PriceRecurrence and cannot be null"); + + // Set non-required readonly properties with defaultValue + this.Type = "PriceRecurrence"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "PriceRecurrence"; + + /// + /// Gets or Sets Interval + /// + [DataMember(Name = "interval", IsRequired = true, EmitDefaultValue = false)] + public string Interval { get; set; } + /// + /// Gets or Sets IntervalCount + /// + [DataMember(Name = "interval_count", IsRequired = true, EmitDefaultValue = false)] + public int IntervalCount { get; set; } + /// + /// Gets or Sets UsageType + /// + [DataMember(Name = "usage_type", IsRequired = true, EmitDefaultValue = false)] + public string UsageType { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + return "PriceRecurrence"; + } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString(bool detailed) + { + if (!detailed) + return this.ToString(); + + var sb = new StringBuilder(); + sb.Append("PriceRecurrence:\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Interval: ").Append(Interval).Append("\n"); + sb.Append(" IntervalCount: ").Append(IntervalCount).Append("\n"); + sb.Append(" UsageType: ").Append(UsageType).Append("\n"); + return sb.ToString(); + } + + /// + /// Returns the object from JSON string + /// + /// PriceRecurrence object + public static PriceRecurrence FromJson(string json) + { + var obj = JsonConvert.DeserializeObject(json, JsonSetting.AnyOfConvertSetting); + if (obj == null) + return null; + return obj.Type.ToLower() == obj.GetType().Name.ToLower() ? obj : null; + } + + /// + /// Creates a new instance with the same properties. + /// + /// PriceRecurrence object + public virtual PriceRecurrence DuplicatePriceRecurrence() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicatePriceRecurrence(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel DuplicateOpenAPIGenBaseModel() + { + return DuplicatePriceRecurrence(); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + input = input is AnyOf anyOf ? anyOf.Obj : input; + return this.Equals(input as PriceRecurrence); + } + + /// + /// Returns true if PriceRecurrence instances are equal + /// + /// Instance of PriceRecurrence to be compared + /// Boolean + public bool Equals(PriceRecurrence input) + { + if (input == null) + return false; + return base.Equals(input) && + ( + this.Interval == input.Interval || + (this.Interval != null && + this.Interval.Equals(input.Interval)) + ) && base.Equals(input) && + ( + this.IntervalCount == input.IntervalCount || + (this.IntervalCount != null && + this.IntervalCount.Equals(input.IntervalCount)) + ) && base.Equals(input) && + ( + this.UsageType == input.UsageType || + (this.UsageType != null && + this.UsageType.Equals(input.UsageType)) + ) && base.Equals(input) && + ( + this.Type == input.Type || + (this.Type != null && + this.Type.Equals(input.Type)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = base.GetHashCode(); + if (this.Interval != null) + hashCode = hashCode * 59 + this.Interval.GetHashCode(); + if (this.IntervalCount != null) + hashCode = hashCode * 59 + this.IntervalCount.GetHashCode(); + if (this.UsageType != null) + hashCode = hashCode * 59 + this.UsageType.GetHashCode(); + if (this.Type != null) + hashCode = hashCode * 59 + this.Type.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + foreach(var x in base.BaseValidate(validationContext)) yield return x; + + + // Type (string) pattern + Regex regexType = new Regex(@"^PriceRecurrence$", RegexOptions.CultureInvariant); + if (false == regexType.Match(this.Type).Success) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Type, must match a pattern of " + regexType, new [] { "Type" }); + } + + yield break; + } + } +} diff --git a/src/PollinationSDK/Model/PriceTier.cs b/src/PollinationSDK/Model/PriceTier.cs new file mode 100644 index 000000000..d482addf2 --- /dev/null +++ b/src/PollinationSDK/Model/PriceTier.cs @@ -0,0 +1,266 @@ +/* + * pollination-server + * + * Pollination Server OpenAPI Definition + * + * Contact: info@pollination.cloud + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; + + +namespace PollinationSDK +{ + /// + /// PriceTier + /// + [DataContract(Name = "PriceTier")] + public partial class PriceTier : OpenAPIGenBaseModel, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected PriceTier() + { + // Set non-required readonly properties with defaultValue + this.Type = "PriceTier"; + } + + /// + /// Initializes a new instance of the class. + /// + /// unitAmount (required). + /// unitAmountDecimal (required). + /// flatAmount. + /// flatAmountDecimal. + /// upTo. + public PriceTier + ( + int unitAmount, string unitAmountDecimal, // Required parameters + int flatAmount= default, string flatAmountDecimal= default, int upTo= default // Optional parameters + ) : base()// BaseClass + { + this.UnitAmount = unitAmount; + // to ensure "unitAmountDecimal" is required (not null) + this.UnitAmountDecimal = unitAmountDecimal ?? throw new ArgumentNullException("unitAmountDecimal is a required property for PriceTier and cannot be null"); + this.FlatAmount = flatAmount; + this.FlatAmountDecimal = flatAmountDecimal; + this.UpTo = upTo; + + // Set non-required readonly properties with defaultValue + this.Type = "PriceTier"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "PriceTier"; + + /// + /// Gets or Sets UnitAmount + /// + [DataMember(Name = "unit_amount", IsRequired = true, EmitDefaultValue = false)] + public int UnitAmount { get; set; } + /// + /// Gets or Sets UnitAmountDecimal + /// + [DataMember(Name = "unit_amount_decimal", IsRequired = true, EmitDefaultValue = false)] + public string UnitAmountDecimal { get; set; } + /// + /// Gets or Sets FlatAmount + /// + [DataMember(Name = "flat_amount", EmitDefaultValue = false)] + public int FlatAmount { get; set; } + /// + /// Gets or Sets FlatAmountDecimal + /// + [DataMember(Name = "flat_amount_decimal", EmitDefaultValue = false)] + public string FlatAmountDecimal { get; set; } + /// + /// Gets or Sets UpTo + /// + [DataMember(Name = "up_to", EmitDefaultValue = false)] + public int UpTo { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + return "PriceTier"; + } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString(bool detailed) + { + if (!detailed) + return this.ToString(); + + var sb = new StringBuilder(); + sb.Append("PriceTier:\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" UnitAmount: ").Append(UnitAmount).Append("\n"); + sb.Append(" UnitAmountDecimal: ").Append(UnitAmountDecimal).Append("\n"); + sb.Append(" FlatAmount: ").Append(FlatAmount).Append("\n"); + sb.Append(" FlatAmountDecimal: ").Append(FlatAmountDecimal).Append("\n"); + sb.Append(" UpTo: ").Append(UpTo).Append("\n"); + return sb.ToString(); + } + + /// + /// Returns the object from JSON string + /// + /// PriceTier object + public static PriceTier FromJson(string json) + { + var obj = JsonConvert.DeserializeObject(json, JsonSetting.AnyOfConvertSetting); + if (obj == null) + return null; + return obj.Type.ToLower() == obj.GetType().Name.ToLower() ? obj : null; + } + + /// + /// Creates a new instance with the same properties. + /// + /// PriceTier object + public virtual PriceTier DuplicatePriceTier() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicatePriceTier(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel DuplicateOpenAPIGenBaseModel() + { + return DuplicatePriceTier(); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + input = input is AnyOf anyOf ? anyOf.Obj : input; + return this.Equals(input as PriceTier); + } + + /// + /// Returns true if PriceTier instances are equal + /// + /// Instance of PriceTier to be compared + /// Boolean + public bool Equals(PriceTier input) + { + if (input == null) + return false; + return base.Equals(input) && + ( + this.UnitAmount == input.UnitAmount || + (this.UnitAmount != null && + this.UnitAmount.Equals(input.UnitAmount)) + ) && base.Equals(input) && + ( + this.UnitAmountDecimal == input.UnitAmountDecimal || + (this.UnitAmountDecimal != null && + this.UnitAmountDecimal.Equals(input.UnitAmountDecimal)) + ) && base.Equals(input) && + ( + this.FlatAmount == input.FlatAmount || + (this.FlatAmount != null && + this.FlatAmount.Equals(input.FlatAmount)) + ) && base.Equals(input) && + ( + this.FlatAmountDecimal == input.FlatAmountDecimal || + (this.FlatAmountDecimal != null && + this.FlatAmountDecimal.Equals(input.FlatAmountDecimal)) + ) && base.Equals(input) && + ( + this.UpTo == input.UpTo || + (this.UpTo != null && + this.UpTo.Equals(input.UpTo)) + ) && base.Equals(input) && + ( + this.Type == input.Type || + (this.Type != null && + this.Type.Equals(input.Type)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = base.GetHashCode(); + if (this.UnitAmount != null) + hashCode = hashCode * 59 + this.UnitAmount.GetHashCode(); + if (this.UnitAmountDecimal != null) + hashCode = hashCode * 59 + this.UnitAmountDecimal.GetHashCode(); + if (this.FlatAmount != null) + hashCode = hashCode * 59 + this.FlatAmount.GetHashCode(); + if (this.FlatAmountDecimal != null) + hashCode = hashCode * 59 + this.FlatAmountDecimal.GetHashCode(); + if (this.UpTo != null) + hashCode = hashCode * 59 + this.UpTo.GetHashCode(); + if (this.Type != null) + hashCode = hashCode * 59 + this.Type.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + foreach(var x in base.BaseValidate(validationContext)) yield return x; + + + // Type (string) pattern + Regex regexType = new Regex(@"^PriceTier$", RegexOptions.CultureInvariant); + if (false == regexType.Match(this.Type).Success) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Type, must match a pattern of " + regexType, new [] { "Type" }); + } + + yield break; + } + } +} diff --git a/src/PollinationSDK/Model/PriceType.cs b/src/PollinationSDK/Model/PriceType.cs new file mode 100644 index 000000000..9fa54266f --- /dev/null +++ b/src/PollinationSDK/Model/PriceType.cs @@ -0,0 +1,49 @@ +/* + * pollination-server + * + * Pollination Server OpenAPI Definition + * + * Contact: info@pollination.cloud + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; + + +namespace PollinationSDK +{ + /// + /// An enumeration. + /// + /// An enumeration. + + [JsonConverter(typeof(StringEnumConverter))] + + public enum PriceType + { + /// + /// Enum Recurring for value: recurring + /// + [EnumMember(Value = "recurring")] + Recurring = 1, + + /// + /// Enum Onetime for value: one_time + /// + [EnumMember(Value = "one_time")] + Onetime = 2 + + } + +} diff --git a/src/PollinationSDK/Model/Product.cs b/src/PollinationSDK/Model/Product.cs new file mode 100644 index 000000000..b8a5cf2c4 --- /dev/null +++ b/src/PollinationSDK/Model/Product.cs @@ -0,0 +1,250 @@ +/* + * pollination-server + * + * Pollination Server OpenAPI Definition + * + * Contact: info@pollination.cloud + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; + + +namespace PollinationSDK +{ + /// + /// Product + /// + [DataContract(Name = "Product")] + public partial class Product : ExternalResource, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected Product() + { + // Set non-required readonly properties with defaultValue + this.Type = "Product"; + } + + /// + /// Initializes a new instance of the class. + /// + /// active (required). + /// name (required). + /// description. + /// id (required). + /// metadata. + public Product + ( + string id, bool active, string name, // Required parameters + Object metadata= default, string description= default // Optional parameters + ) : base(id: id, metadata: metadata)// BaseClass + { + this.Active = active; + // to ensure "name" is required (not null) + this.Name = name ?? throw new ArgumentNullException("name is a required property for Product and cannot be null"); + this.Description = description; + + // Set non-required readonly properties with defaultValue + this.Type = "Product"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "Product"; + + /// + /// Gets or Sets Active + /// + [DataMember(Name = "active", IsRequired = true, EmitDefaultValue = false)] + public bool Active { get; set; } + /// + /// Gets or Sets Name + /// + [DataMember(Name = "name", IsRequired = true, EmitDefaultValue = false)] + public string Name { get; set; } + /// + /// Gets or Sets Description + /// + [DataMember(Name = "description", EmitDefaultValue = false)] + public string Description { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + return "Product"; + } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString(bool detailed) + { + if (!detailed) + return this.ToString(); + + var sb = new StringBuilder(); + sb.Append("Product:\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Id: ").Append(Id).Append("\n"); + sb.Append(" Metadata: ").Append(Metadata).Append("\n"); + sb.Append(" Active: ").Append(Active).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Description: ").Append(Description).Append("\n"); + return sb.ToString(); + } + + /// + /// Returns the object from JSON string + /// + /// Product object + public static Product FromJson(string json) + { + var obj = JsonConvert.DeserializeObject(json, JsonSetting.AnyOfConvertSetting); + if (obj == null) + return null; + return obj.Type.ToLower() == obj.GetType().Name.ToLower() ? obj : null; + } + + /// + /// Creates a new instance with the same properties. + /// + /// Product object + public virtual Product DuplicateProduct() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateProduct(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override ExternalResource DuplicateExternalResource() + { + return DuplicateProduct(); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + input = input is AnyOf anyOf ? anyOf.Obj : input; + return this.Equals(input as Product); + } + + /// + /// Returns true if Product instances are equal + /// + /// Instance of Product to be compared + /// Boolean + public bool Equals(Product input) + { + if (input == null) + return false; + return base.Equals(input) && + ( + this.Active == input.Active || + (this.Active != null && + this.Active.Equals(input.Active)) + ) && base.Equals(input) && + ( + this.Name == input.Name || + (this.Name != null && + this.Name.Equals(input.Name)) + ) && base.Equals(input) && + ( + this.Description == input.Description || + (this.Description != null && + this.Description.Equals(input.Description)) + ) && base.Equals(input) && + ( + this.Type == input.Type || + (this.Type != null && + this.Type.Equals(input.Type)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = base.GetHashCode(); + if (this.Active != null) + hashCode = hashCode * 59 + this.Active.GetHashCode(); + if (this.Name != null) + hashCode = hashCode * 59 + this.Name.GetHashCode(); + if (this.Description != null) + hashCode = hashCode * 59 + this.Description.GetHashCode(); + if (this.Type != null) + hashCode = hashCode * 59 + this.Type.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + return this.BaseValidate(validationContext); + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + protected IEnumerable BaseValidate(ValidationContext validationContext) + { + foreach(var x in base.BaseValidate(validationContext)) yield return x; + + + // Type (string) pattern + Regex regexType = new Regex(@"^Product$", RegexOptions.CultureInvariant); + if (false == regexType.Match(this.Type).Success) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Type, must match a pattern of " + regexType, new [] { "Type" }); + } + + yield break; + } + } +} diff --git a/src/PollinationSDK/Model/ProductFamily.cs b/src/PollinationSDK/Model/ProductFamily.cs new file mode 100644 index 000000000..07c543d71 --- /dev/null +++ b/src/PollinationSDK/Model/ProductFamily.cs @@ -0,0 +1,217 @@ +/* + * pollination-server + * + * Pollination Server OpenAPI Definition + * + * Contact: info@pollination.cloud + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; + + +namespace PollinationSDK +{ + /// + /// ProductFamily + /// + [DataContract(Name = "ProductFamily")] + public partial class ProductFamily : Product, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected ProductFamily() + { + // Set non-required readonly properties with defaultValue + this.Type = "ProductFamily"; + } + + /// + /// Initializes a new instance of the class. + /// + /// prices (required). + /// id (required). + /// metadata. + /// active (required). + /// name (required). + /// description. + public ProductFamily + ( + string id, bool active, string name, List prices, // Required parameters + Object metadata= default, string description= default // Optional parameters + ) : base(id: id, metadata: metadata, active: active, name: name, description: description)// BaseClass + { + // to ensure "prices" is required (not null) + this.Prices = prices ?? throw new ArgumentNullException("prices is a required property for ProductFamily and cannot be null"); + + // Set non-required readonly properties with defaultValue + this.Type = "ProductFamily"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "ProductFamily"; + + /// + /// Gets or Sets Prices + /// + [DataMember(Name = "prices", IsRequired = true, EmitDefaultValue = false)] + public List Prices { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + return "ProductFamily"; + } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString(bool detailed) + { + if (!detailed) + return this.ToString(); + + var sb = new StringBuilder(); + sb.Append("ProductFamily:\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Id: ").Append(Id).Append("\n"); + sb.Append(" Metadata: ").Append(Metadata).Append("\n"); + sb.Append(" Active: ").Append(Active).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Description: ").Append(Description).Append("\n"); + sb.Append(" Prices: ").Append(Prices).Append("\n"); + return sb.ToString(); + } + + /// + /// Returns the object from JSON string + /// + /// ProductFamily object + public static ProductFamily FromJson(string json) + { + var obj = JsonConvert.DeserializeObject(json, JsonSetting.AnyOfConvertSetting); + if (obj == null) + return null; + return obj.Type.ToLower() == obj.GetType().Name.ToLower() ? obj : null; + } + + /// + /// Creates a new instance with the same properties. + /// + /// ProductFamily object + public virtual ProductFamily DuplicateProductFamily() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateProductFamily(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override Product DuplicateProduct() + { + return DuplicateProductFamily(); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + input = input is AnyOf anyOf ? anyOf.Obj : input; + return this.Equals(input as ProductFamily); + } + + /// + /// Returns true if ProductFamily instances are equal + /// + /// Instance of ProductFamily to be compared + /// Boolean + public bool Equals(ProductFamily input) + { + if (input == null) + return false; + return base.Equals(input) && + ( + this.Prices == input.Prices || + this.Prices != null && + input.Prices != null && + this.Prices.SequenceEqual(input.Prices) + ) && base.Equals(input) && + ( + this.Type == input.Type || + (this.Type != null && + this.Type.Equals(input.Type)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = base.GetHashCode(); + if (this.Prices != null) + hashCode = hashCode * 59 + this.Prices.GetHashCode(); + if (this.Type != null) + hashCode = hashCode * 59 + this.Type.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + foreach(var x in base.BaseValidate(validationContext)) yield return x; + + + // Type (string) pattern + Regex regexType = new Regex(@"^ProductFamily$", RegexOptions.CultureInvariant); + if (false == regexType.Match(this.Type).Success) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Type, must match a pattern of " + regexType, new [] { "Type" }); + } + + yield break; + } + } +} diff --git a/src/PollinationSDK/Model/ProjectSortKey.cs b/src/PollinationSDK/Model/ProjectSortKey.cs new file mode 100644 index 000000000..292468cae --- /dev/null +++ b/src/PollinationSDK/Model/ProjectSortKey.cs @@ -0,0 +1,55 @@ +/* + * pollination-server + * + * Pollination Server OpenAPI Definition + * + * Contact: info@pollination.cloud + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; + + +namespace PollinationSDK +{ + /// + /// An enumeration. + /// + /// An enumeration. + + [JsonConverter(typeof(StringEnumConverter))] + + public enum ProjectSortKey + { + /// + /// Enum Createdat for value: created_at + /// + [EnumMember(Value = "created_at")] + Createdat = 1, + + /// + /// Enum Updatedat for value: updated_at + /// + [EnumMember(Value = "updated_at")] + Updatedat = 2, + + /// + /// Enum Name for value: name + /// + [EnumMember(Value = "name")] + Name = 3 + + } + +} diff --git a/src/PollinationSDK/Model/Quota.cs b/src/PollinationSDK/Model/Quota.cs new file mode 100644 index 000000000..910f7b871 --- /dev/null +++ b/src/PollinationSDK/Model/Quota.cs @@ -0,0 +1,364 @@ +/* + * pollination-server + * + * Pollination Server OpenAPI Definition + * + * Contact: info@pollination.cloud + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; + + +namespace PollinationSDK +{ + /// + /// Quota + /// + [DataContract(Name = "Quota")] + public partial class Quota : OpenAPIGenBaseModel, IEquatable, IValidatableObject + { + /// + /// The type of resource + /// + /// The type of resource + [DataMember(Name="type", EmitDefaultValue=false)] + public QuotaType Type { get; set; } + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected Quota() + { + // Set non-required readonly properties with defaultValue + } + + /// + /// Initializes a new instance of the class. + /// + /// The quota owner (required). + /// The unique ID for this Quota. + /// The start of the quota usage tracking period. + /// The maximum amount of a resource the account can consume. + /// The current amount of a resource allocated to the account linked to the subscription. + /// Whether consumption is reset to 0 every billing period (default to false). + /// Whether the limit triggers a blocking response from the server (default to false). + /// Whether the resource usage is greater than or equal to the limit (default to false). + /// The human-readable name. + /// The description. + /// The unit in which the usage and limit are measured. + public Quota + ( + AccountPublic owner, // Required parameters + Guid id= default, DateTime periodStart= default, double limit= default, double usage= default, bool resets = false, bool enforced = false, bool exceeded = false, string displayName= default, string description= default, string unit= default// Optional parameters + ) : base()// BaseClass + { + // to ensure "owner" is required (not null) + this.Owner = owner ?? throw new ArgumentNullException("owner is a required property for Quota and cannot be null"); + this.Id = id; + this.PeriodStart = periodStart; + this.Limit = limit; + this.Usage = usage; + this.Resets = resets; + this.Enforced = enforced; + this.Exceeded = exceeded; + this.DisplayName = displayName; + this.Description = description; + this.Unit = unit; + + // Set non-required readonly properties with defaultValue + } + + + /// + /// The quota owner + /// + /// The quota owner + [DataMember(Name = "owner", IsRequired = true, EmitDefaultValue = false)] + public AccountPublic Owner { get; set; } + /// + /// The unique ID for this Quota + /// + /// The unique ID for this Quota + [DataMember(Name = "id", EmitDefaultValue = false)] + public Guid Id { get; set; } + /// + /// The start of the quota usage tracking period + /// + /// The start of the quota usage tracking period + [DataMember(Name = "period_start", EmitDefaultValue = false)] + public DateTime PeriodStart { get; set; } + /// + /// The maximum amount of a resource the account can consume + /// + /// The maximum amount of a resource the account can consume + [DataMember(Name = "limit", EmitDefaultValue = false)] + public double Limit { get; set; } + /// + /// The current amount of a resource allocated to the account linked to the subscription + /// + /// The current amount of a resource allocated to the account linked to the subscription + [DataMember(Name = "usage", EmitDefaultValue = false)] + public double Usage { get; set; } + /// + /// Whether consumption is reset to 0 every billing period + /// + /// Whether consumption is reset to 0 every billing period + [DataMember(Name = "resets", EmitDefaultValue = true)] + public bool Resets { get; set; } = false; + /// + /// Whether the limit triggers a blocking response from the server + /// + /// Whether the limit triggers a blocking response from the server + [DataMember(Name = "enforced", EmitDefaultValue = true)] + public bool Enforced { get; set; } = false; + /// + /// Whether the resource usage is greater than or equal to the limit + /// + /// Whether the resource usage is greater than or equal to the limit + [DataMember(Name = "exceeded", EmitDefaultValue = true)] + public bool Exceeded { get; set; } = false; + /// + /// The human-readable name + /// + /// The human-readable name + [DataMember(Name = "display_name", EmitDefaultValue = false)] + public string DisplayName { get; set; } + /// + /// The description + /// + /// The description + [DataMember(Name = "description", EmitDefaultValue = false)] + public string Description { get; set; } + /// + /// The unit in which the usage and limit are measured + /// + /// The unit in which the usage and limit are measured + [DataMember(Name = "unit", EmitDefaultValue = false)] + public string Unit { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + return "Quota"; + } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString(bool detailed) + { + if (!detailed) + return this.ToString(); + + var sb = new StringBuilder(); + sb.Append("Quota:\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Owner: ").Append(Owner).Append("\n"); + sb.Append(" Id: ").Append(Id).Append("\n"); + sb.Append(" PeriodStart: ").Append(PeriodStart).Append("\n"); + sb.Append(" Limit: ").Append(Limit).Append("\n"); + sb.Append(" Usage: ").Append(Usage).Append("\n"); + sb.Append(" Resets: ").Append(Resets).Append("\n"); + sb.Append(" Enforced: ").Append(Enforced).Append("\n"); + sb.Append(" Exceeded: ").Append(Exceeded).Append("\n"); + sb.Append(" DisplayName: ").Append(DisplayName).Append("\n"); + sb.Append(" Description: ").Append(Description).Append("\n"); + sb.Append(" Unit: ").Append(Unit).Append("\n"); + return sb.ToString(); + } + + /// + /// Returns the object from JSON string + /// + /// Quota object + public static Quota FromJson(string json) + { + var obj = JsonConvert.DeserializeObject(json, JsonSetting.AnyOfConvertSetting); + if (obj == null) + return null; + return obj.Type.ToLower() == obj.GetType().Name.ToLower() ? obj : null; + } + + /// + /// Creates a new instance with the same properties. + /// + /// Quota object + public virtual Quota DuplicateQuota() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateQuota(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel DuplicateOpenAPIGenBaseModel() + { + return DuplicateQuota(); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + input = input is AnyOf anyOf ? anyOf.Obj : input; + return this.Equals(input as Quota); + } + + /// + /// Returns true if Quota instances are equal + /// + /// Instance of Quota to be compared + /// Boolean + public bool Equals(Quota input) + { + if (input == null) + return false; + return base.Equals(input) && + ( + this.Type == input.Type || + (this.Type != null && + this.Type.Equals(input.Type)) + ) && base.Equals(input) && + ( + this.Owner == input.Owner || + (this.Owner != null && + this.Owner.Equals(input.Owner)) + ) && base.Equals(input) && + ( + this.Id == input.Id || + (this.Id != null && + this.Id.Equals(input.Id)) + ) && base.Equals(input) && + ( + this.PeriodStart == input.PeriodStart || + (this.PeriodStart != null && + this.PeriodStart.Equals(input.PeriodStart)) + ) && base.Equals(input) && + ( + this.Limit == input.Limit || + (this.Limit != null && + this.Limit.Equals(input.Limit)) + ) && base.Equals(input) && + ( + this.Usage == input.Usage || + (this.Usage != null && + this.Usage.Equals(input.Usage)) + ) && base.Equals(input) && + ( + this.Resets == input.Resets || + (this.Resets != null && + this.Resets.Equals(input.Resets)) + ) && base.Equals(input) && + ( + this.Enforced == input.Enforced || + (this.Enforced != null && + this.Enforced.Equals(input.Enforced)) + ) && base.Equals(input) && + ( + this.Exceeded == input.Exceeded || + (this.Exceeded != null && + this.Exceeded.Equals(input.Exceeded)) + ) && base.Equals(input) && + ( + this.DisplayName == input.DisplayName || + (this.DisplayName != null && + this.DisplayName.Equals(input.DisplayName)) + ) && base.Equals(input) && + ( + this.Description == input.Description || + (this.Description != null && + this.Description.Equals(input.Description)) + ) && base.Equals(input) && + ( + this.Unit == input.Unit || + (this.Unit != null && + this.Unit.Equals(input.Unit)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = base.GetHashCode(); + if (this.Type != null) + hashCode = hashCode * 59 + this.Type.GetHashCode(); + if (this.Owner != null) + hashCode = hashCode * 59 + this.Owner.GetHashCode(); + if (this.Id != null) + hashCode = hashCode * 59 + this.Id.GetHashCode(); + if (this.PeriodStart != null) + hashCode = hashCode * 59 + this.PeriodStart.GetHashCode(); + if (this.Limit != null) + hashCode = hashCode * 59 + this.Limit.GetHashCode(); + if (this.Usage != null) + hashCode = hashCode * 59 + this.Usage.GetHashCode(); + if (this.Resets != null) + hashCode = hashCode * 59 + this.Resets.GetHashCode(); + if (this.Enforced != null) + hashCode = hashCode * 59 + this.Enforced.GetHashCode(); + if (this.Exceeded != null) + hashCode = hashCode * 59 + this.Exceeded.GetHashCode(); + if (this.DisplayName != null) + hashCode = hashCode * 59 + this.DisplayName.GetHashCode(); + if (this.Description != null) + hashCode = hashCode * 59 + this.Description.GetHashCode(); + if (this.Unit != null) + hashCode = hashCode * 59 + this.Unit.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + foreach(var x in base.BaseValidate(validationContext)) yield return x; + + + // Usage (double) minimum + if(this.Usage < (double)0) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Usage, must be a value greater than or equal to 0.", new [] { "Usage" }); + } + + yield break; + } + } +} diff --git a/src/PollinationSDK/Model/QuotaExtension.cs b/src/PollinationSDK/Model/QuotaExtension.cs new file mode 100644 index 000000000..e72806324 --- /dev/null +++ b/src/PollinationSDK/Model/QuotaExtension.cs @@ -0,0 +1,253 @@ +/* + * pollination-server + * + * Pollination Server OpenAPI Definition + * + * Contact: info@pollination.cloud + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; + + +namespace PollinationSDK +{ + /// + /// A quota extension + /// + [DataContract(Name = "QuotaExtension")] + public partial class QuotaExtension : OpenAPIGenBaseModel, IEquatable, IValidatableObject + { + /// + /// The type of quota this applies to + /// + /// The type of quota this applies to + [DataMember(Name="type", EmitDefaultValue=false)] + public QuotaType Type { get; set; } + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected QuotaExtension() + { + // Set non-required readonly properties with defaultValue + } + + /// + /// Initializes a new instance of the class. + /// + /// The ID of the quota extension (required). + /// Name of the quota extension plan (required). + /// The amount by which this object extends a given quota (required). + /// The number of times to count this extension (required). + public QuotaExtension + ( + string id, string name, double unitAmount, int quantity// Required parameters + // Optional parameters + ) : base()// BaseClass + { + // to ensure "id" is required (not null) + this.Id = id ?? throw new ArgumentNullException("id is a required property for QuotaExtension and cannot be null"); + // to ensure "name" is required (not null) + this.Name = name ?? throw new ArgumentNullException("name is a required property for QuotaExtension and cannot be null"); + this.UnitAmount = unitAmount; + this.Quantity = quantity; + + // Set non-required readonly properties with defaultValue + } + + + /// + /// The ID of the quota extension + /// + /// The ID of the quota extension + [DataMember(Name = "id", IsRequired = true, EmitDefaultValue = false)] + public string Id { get; set; } + /// + /// Name of the quota extension plan + /// + /// Name of the quota extension plan + [DataMember(Name = "name", IsRequired = true, EmitDefaultValue = false)] + public string Name { get; set; } + /// + /// The amount by which this object extends a given quota + /// + /// The amount by which this object extends a given quota + [DataMember(Name = "unit_amount", IsRequired = true, EmitDefaultValue = false)] + public double UnitAmount { get; set; } + /// + /// The number of times to count this extension + /// + /// The number of times to count this extension + [DataMember(Name = "quantity", IsRequired = true, EmitDefaultValue = false)] + public int Quantity { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + return "QuotaExtension"; + } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString(bool detailed) + { + if (!detailed) + return this.ToString(); + + var sb = new StringBuilder(); + sb.Append("QuotaExtension:\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Id: ").Append(Id).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" UnitAmount: ").Append(UnitAmount).Append("\n"); + sb.Append(" Quantity: ").Append(Quantity).Append("\n"); + return sb.ToString(); + } + + /// + /// Returns the object from JSON string + /// + /// QuotaExtension object + public static QuotaExtension FromJson(string json) + { + var obj = JsonConvert.DeserializeObject(json, JsonSetting.AnyOfConvertSetting); + if (obj == null) + return null; + return obj.Type.ToLower() == obj.GetType().Name.ToLower() ? obj : null; + } + + /// + /// Creates a new instance with the same properties. + /// + /// QuotaExtension object + public virtual QuotaExtension DuplicateQuotaExtension() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateQuotaExtension(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel DuplicateOpenAPIGenBaseModel() + { + return DuplicateQuotaExtension(); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + input = input is AnyOf anyOf ? anyOf.Obj : input; + return this.Equals(input as QuotaExtension); + } + + /// + /// Returns true if QuotaExtension instances are equal + /// + /// Instance of QuotaExtension to be compared + /// Boolean + public bool Equals(QuotaExtension input) + { + if (input == null) + return false; + return base.Equals(input) && + ( + this.Id == input.Id || + (this.Id != null && + this.Id.Equals(input.Id)) + ) && base.Equals(input) && + ( + this.Name == input.Name || + (this.Name != null && + this.Name.Equals(input.Name)) + ) && base.Equals(input) && + ( + this.Type == input.Type || + (this.Type != null && + this.Type.Equals(input.Type)) + ) && base.Equals(input) && + ( + this.UnitAmount == input.UnitAmount || + (this.UnitAmount != null && + this.UnitAmount.Equals(input.UnitAmount)) + ) && base.Equals(input) && + ( + this.Quantity == input.Quantity || + (this.Quantity != null && + this.Quantity.Equals(input.Quantity)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = base.GetHashCode(); + if (this.Id != null) + hashCode = hashCode * 59 + this.Id.GetHashCode(); + if (this.Name != null) + hashCode = hashCode * 59 + this.Name.GetHashCode(); + if (this.Type != null) + hashCode = hashCode * 59 + this.Type.GetHashCode(); + if (this.UnitAmount != null) + hashCode = hashCode * 59 + this.UnitAmount.GetHashCode(); + if (this.Quantity != null) + hashCode = hashCode * 59 + this.Quantity.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + foreach(var x in base.BaseValidate(validationContext)) yield return x; + + + // UnitAmount (double) minimum + if(this.UnitAmount < (double)0) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for UnitAmount, must be a value greater than or equal to 0.", new [] { "UnitAmount" }); + } + + yield break; + } + } +} diff --git a/src/PollinationSDK/Model/QuotaList.cs b/src/PollinationSDK/Model/QuotaList.cs new file mode 100644 index 000000000..8d0e838f6 --- /dev/null +++ b/src/PollinationSDK/Model/QuotaList.cs @@ -0,0 +1,287 @@ +/* + * pollination-server + * + * Pollination Server OpenAPI Definition + * + * Contact: info@pollination.cloud + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; + + +namespace PollinationSDK +{ + /// + /// A list response from a pagination request + /// + [DataContract(Name = "QuotaList")] + public partial class QuotaList : OpenAPIGenBaseModel, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected QuotaList() + { + // Set non-required readonly properties with defaultValue + this.Type = "QuotaList"; + } + + /// + /// Initializes a new instance of the class. + /// + /// The current page the pagination request is on (required). + /// The number of pages per pagination request (required). + /// The total number of pages (required). + /// The total number of resources matching the list request (required). + /// resources (required). + /// The next page, if this on is not the last. + public QuotaList + ( + int page, int perPage, int pageCount, int totalCount, List resources, // Required parameters + int nextPage= default // Optional parameters + ) : base()// BaseClass + { + this.Page = page; + this.PerPage = perPage; + this.PageCount = pageCount; + this.TotalCount = totalCount; + // to ensure "resources" is required (not null) + this.Resources = resources ?? throw new ArgumentNullException("resources is a required property for QuotaList and cannot be null"); + this.NextPage = nextPage; + + // Set non-required readonly properties with defaultValue + this.Type = "QuotaList"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "QuotaList"; + + /// + /// The current page the pagination request is on + /// + /// The current page the pagination request is on + [DataMember(Name = "page", IsRequired = true, EmitDefaultValue = false)] + public int Page { get; set; } + /// + /// The number of pages per pagination request + /// + /// The number of pages per pagination request + [DataMember(Name = "per_page", IsRequired = true, EmitDefaultValue = false)] + public int PerPage { get; set; } + /// + /// The total number of pages + /// + /// The total number of pages + [DataMember(Name = "page_count", IsRequired = true, EmitDefaultValue = false)] + public int PageCount { get; set; } + /// + /// The total number of resources matching the list request + /// + /// The total number of resources matching the list request + [DataMember(Name = "total_count", IsRequired = true, EmitDefaultValue = false)] + public int TotalCount { get; set; } + /// + /// Gets or Sets Resources + /// + [DataMember(Name = "resources", IsRequired = true, EmitDefaultValue = false)] + public List Resources { get; set; } + /// + /// The next page, if this on is not the last + /// + /// The next page, if this on is not the last + [DataMember(Name = "next_page", EmitDefaultValue = false)] + public int NextPage { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + return "QuotaList"; + } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString(bool detailed) + { + if (!detailed) + return this.ToString(); + + var sb = new StringBuilder(); + sb.Append("QuotaList:\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Page: ").Append(Page).Append("\n"); + sb.Append(" PerPage: ").Append(PerPage).Append("\n"); + sb.Append(" PageCount: ").Append(PageCount).Append("\n"); + sb.Append(" TotalCount: ").Append(TotalCount).Append("\n"); + sb.Append(" Resources: ").Append(Resources).Append("\n"); + sb.Append(" NextPage: ").Append(NextPage).Append("\n"); + return sb.ToString(); + } + + /// + /// Returns the object from JSON string + /// + /// QuotaList object + public static QuotaList FromJson(string json) + { + var obj = JsonConvert.DeserializeObject(json, JsonSetting.AnyOfConvertSetting); + if (obj == null) + return null; + return obj.Type.ToLower() == obj.GetType().Name.ToLower() ? obj : null; + } + + /// + /// Creates a new instance with the same properties. + /// + /// QuotaList object + public virtual QuotaList DuplicateQuotaList() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateQuotaList(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel DuplicateOpenAPIGenBaseModel() + { + return DuplicateQuotaList(); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + input = input is AnyOf anyOf ? anyOf.Obj : input; + return this.Equals(input as QuotaList); + } + + /// + /// Returns true if QuotaList instances are equal + /// + /// Instance of QuotaList to be compared + /// Boolean + public bool Equals(QuotaList input) + { + if (input == null) + return false; + return base.Equals(input) && + ( + this.Page == input.Page || + (this.Page != null && + this.Page.Equals(input.Page)) + ) && base.Equals(input) && + ( + this.PerPage == input.PerPage || + (this.PerPage != null && + this.PerPage.Equals(input.PerPage)) + ) && base.Equals(input) && + ( + this.PageCount == input.PageCount || + (this.PageCount != null && + this.PageCount.Equals(input.PageCount)) + ) && base.Equals(input) && + ( + this.TotalCount == input.TotalCount || + (this.TotalCount != null && + this.TotalCount.Equals(input.TotalCount)) + ) && base.Equals(input) && + ( + this.Resources == input.Resources || + this.Resources != null && + input.Resources != null && + this.Resources.SequenceEqual(input.Resources) + ) && base.Equals(input) && + ( + this.NextPage == input.NextPage || + (this.NextPage != null && + this.NextPage.Equals(input.NextPage)) + ) && base.Equals(input) && + ( + this.Type == input.Type || + (this.Type != null && + this.Type.Equals(input.Type)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = base.GetHashCode(); + if (this.Page != null) + hashCode = hashCode * 59 + this.Page.GetHashCode(); + if (this.PerPage != null) + hashCode = hashCode * 59 + this.PerPage.GetHashCode(); + if (this.PageCount != null) + hashCode = hashCode * 59 + this.PageCount.GetHashCode(); + if (this.TotalCount != null) + hashCode = hashCode * 59 + this.TotalCount.GetHashCode(); + if (this.Resources != null) + hashCode = hashCode * 59 + this.Resources.GetHashCode(); + if (this.NextPage != null) + hashCode = hashCode * 59 + this.NextPage.GetHashCode(); + if (this.Type != null) + hashCode = hashCode * 59 + this.Type.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + foreach(var x in base.BaseValidate(validationContext)) yield return x; + + + // Type (string) pattern + Regex regexType = new Regex(@"^QuotaList$", RegexOptions.CultureInvariant); + if (false == regexType.Match(this.Type).Success) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Type, must match a pattern of " + regexType, new [] { "Type" }); + } + + yield break; + } + } +} diff --git a/src/PollinationSDK/Model/QuotaPlan.cs b/src/PollinationSDK/Model/QuotaPlan.cs new file mode 100644 index 000000000..c47ba10ce --- /dev/null +++ b/src/PollinationSDK/Model/QuotaPlan.cs @@ -0,0 +1,255 @@ +/* + * pollination-server + * + * Pollination Server OpenAPI Definition + * + * Contact: info@pollination.cloud + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; + + +namespace PollinationSDK +{ + /// + /// A quota plan + /// + [DataContract(Name = "QuotaPlan")] + public partial class QuotaPlan : OpenAPIGenBaseModel, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected QuotaPlan() + { + // Set non-required readonly properties with defaultValue + this.Type = "QuotaPlan"; + } + + /// + /// Initializes a new instance of the class. + /// + /// The name of the quota (required). + /// Whether consumption is reset to 0 every month (default to false). + /// The maximum amount of a resource that a subscription allows. + /// Whether the limit is triggers a blocking response from the server (default to false). + public QuotaPlan + ( + string name, // Required parameters + bool resets = false, double limit= default, bool enforced = false // Optional parameters + ) : base()// BaseClass + { + // to ensure "name" is required (not null) + this.Name = name ?? throw new ArgumentNullException("name is a required property for QuotaPlan and cannot be null"); + this.Resets = resets; + this.Limit = limit; + this.Enforced = enforced; + + // Set non-required readonly properties with defaultValue + this.Type = "QuotaPlan"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "QuotaPlan"; + + /// + /// The name of the quota + /// + /// The name of the quota + [DataMember(Name = "name", IsRequired = true, EmitDefaultValue = false)] + public string Name { get; set; } + /// + /// Whether consumption is reset to 0 every month + /// + /// Whether consumption is reset to 0 every month + [DataMember(Name = "resets", EmitDefaultValue = true)] + public bool Resets { get; set; } = false; + /// + /// The maximum amount of a resource that a subscription allows + /// + /// The maximum amount of a resource that a subscription allows + [DataMember(Name = "limit", EmitDefaultValue = false)] + public double Limit { get; set; } + /// + /// Whether the limit is triggers a blocking response from the server + /// + /// Whether the limit is triggers a blocking response from the server + [DataMember(Name = "enforced", EmitDefaultValue = true)] + public bool Enforced { get; set; } = false; + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + return "QuotaPlan"; + } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString(bool detailed) + { + if (!detailed) + return this.ToString(); + + var sb = new StringBuilder(); + sb.Append("QuotaPlan:\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Resets: ").Append(Resets).Append("\n"); + sb.Append(" Limit: ").Append(Limit).Append("\n"); + sb.Append(" Enforced: ").Append(Enforced).Append("\n"); + return sb.ToString(); + } + + /// + /// Returns the object from JSON string + /// + /// QuotaPlan object + public static QuotaPlan FromJson(string json) + { + var obj = JsonConvert.DeserializeObject(json, JsonSetting.AnyOfConvertSetting); + if (obj == null) + return null; + return obj.Type.ToLower() == obj.GetType().Name.ToLower() ? obj : null; + } + + /// + /// Creates a new instance with the same properties. + /// + /// QuotaPlan object + public virtual QuotaPlan DuplicateQuotaPlan() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateQuotaPlan(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel DuplicateOpenAPIGenBaseModel() + { + return DuplicateQuotaPlan(); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + input = input is AnyOf anyOf ? anyOf.Obj : input; + return this.Equals(input as QuotaPlan); + } + + /// + /// Returns true if QuotaPlan instances are equal + /// + /// Instance of QuotaPlan to be compared + /// Boolean + public bool Equals(QuotaPlan input) + { + if (input == null) + return false; + return base.Equals(input) && + ( + this.Name == input.Name || + (this.Name != null && + this.Name.Equals(input.Name)) + ) && base.Equals(input) && + ( + this.Resets == input.Resets || + (this.Resets != null && + this.Resets.Equals(input.Resets)) + ) && base.Equals(input) && + ( + this.Limit == input.Limit || + (this.Limit != null && + this.Limit.Equals(input.Limit)) + ) && base.Equals(input) && + ( + this.Enforced == input.Enforced || + (this.Enforced != null && + this.Enforced.Equals(input.Enforced)) + ) && base.Equals(input) && + ( + this.Type == input.Type || + (this.Type != null && + this.Type.Equals(input.Type)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = base.GetHashCode(); + if (this.Name != null) + hashCode = hashCode * 59 + this.Name.GetHashCode(); + if (this.Resets != null) + hashCode = hashCode * 59 + this.Resets.GetHashCode(); + if (this.Limit != null) + hashCode = hashCode * 59 + this.Limit.GetHashCode(); + if (this.Enforced != null) + hashCode = hashCode * 59 + this.Enforced.GetHashCode(); + if (this.Type != null) + hashCode = hashCode * 59 + this.Type.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + foreach(var x in base.BaseValidate(validationContext)) yield return x; + + + // Type (string) pattern + Regex regexType = new Regex(@"^QuotaPlan$", RegexOptions.CultureInvariant); + if (false == regexType.Match(this.Type).Success) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Type, must match a pattern of " + regexType, new [] { "Type" }); + } + + yield break; + } + } +} diff --git a/src/PollinationSDK/Model/QuotaType.cs b/src/PollinationSDK/Model/QuotaType.cs new file mode 100644 index 000000000..31968e2c8 --- /dev/null +++ b/src/PollinationSDK/Model/QuotaType.cs @@ -0,0 +1,103 @@ +/* + * pollination-server + * + * Pollination Server OpenAPI Definition + * + * Contact: info@pollination.cloud + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; + + +namespace PollinationSDK +{ + /// + /// The type of comsumption-limited resource to which the quota refers. + /// + /// The type of comsumption-limited resource to which the quota refers. + + [JsonConverter(typeof(StringEnumConverter))] + + public enum QuotaType + { + /// + /// Enum Storage for value: storage + /// + [EnumMember(Value = "storage")] + Storage = 1, + + /// + /// Enum Computehours for value: compute_hours + /// + [EnumMember(Value = "compute_hours")] + Computehours = 2, + + /// + /// Enum Parallelworkflowcontainers for value: parallel_workflow_containers + /// + [EnumMember(Value = "parallel_workflow_containers")] + Parallelworkflowcontainers = 3, + + /// + /// Enum Privaterepositories for value: private_repositories + /// + [EnumMember(Value = "private_repositories")] + Privaterepositories = 4, + + /// + /// Enum Privateprojects for value: private_projects + /// + [EnumMember(Value = "private_projects")] + Privateprojects = 5, + + /// + /// Enum Teams for value: teams + /// + [EnumMember(Value = "teams")] + Teams = 6, + + /// + /// Enum Members for value: members + /// + [EnumMember(Value = "members")] + Members = 7, + + /// + /// Enum Cpulimit for value: cpu_limit + /// + [EnumMember(Value = "cpu_limit")] + Cpulimit = 8, + + /// + /// Enum Memorylimit for value: memory_limit + /// + [EnumMember(Value = "memory_limit")] + Memorylimit = 9, + + /// + /// Enum Rhinopluginlicense for value: rhino_plugin_license + /// + [EnumMember(Value = "rhino_plugin_license")] + Rhinopluginlicense = 10, + + /// + /// Enum Revitpluginlicense for value: revit_plugin_license + /// + [EnumMember(Value = "revit_plugin_license")] + Revitpluginlicense = 11 + + } + +} diff --git a/src/PollinationSDK/Model/RepositorySortKey.cs b/src/PollinationSDK/Model/RepositorySortKey.cs new file mode 100644 index 000000000..8c26f7810 --- /dev/null +++ b/src/PollinationSDK/Model/RepositorySortKey.cs @@ -0,0 +1,61 @@ +/* + * pollination-server + * + * Pollination Server OpenAPI Definition + * + * Contact: info@pollination.cloud + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; + + +namespace PollinationSDK +{ + /// + /// An enumeration. + /// + /// An enumeration. + + [JsonConverter(typeof(StringEnumConverter))] + + public enum RepositorySortKey + { + /// + /// Enum Createdat for value: created_at + /// + [EnumMember(Value = "created_at")] + Createdat = 1, + + /// + /// Enum Updatedat for value: updated_at + /// + [EnumMember(Value = "updated_at")] + Updatedat = 2, + + /// + /// Enum Name for value: name + /// + [EnumMember(Value = "name")] + Name = 3, + + /// + /// Enum Latesttag for value: latest_tag + /// + [EnumMember(Value = "latest_tag")] + Latesttag = 4 + + } + +} diff --git a/src/PollinationSDK/Model/ResourcesDuration.cs b/src/PollinationSDK/Model/ResourcesDuration.cs new file mode 100644 index 000000000..8ed777dfc --- /dev/null +++ b/src/PollinationSDK/Model/ResourcesDuration.cs @@ -0,0 +1,210 @@ +/* + * pollination-server + * + * Pollination Server OpenAPI Definition + * + * Contact: info@pollination.cloud + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; + + +namespace PollinationSDK +{ + /// + /// ResourcesDuration + /// + [DataContract(Name = "ResourcesDuration")] + public partial class ResourcesDuration : OpenAPIGenBaseModel, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// cpu (default to 0). + /// memory (default to 0). + public ResourcesDuration + ( + // Required parameters + int cpu = 0, int memory = 0 // Optional parameters + ) : base()// BaseClass + { + this.Cpu = cpu; + this.Memory = memory; + + // Set non-required readonly properties with defaultValue + this.Type = "ResourcesDuration"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "ResourcesDuration"; + + /// + /// Gets or Sets Cpu + /// + [DataMember(Name = "cpu", EmitDefaultValue = true)] + public int Cpu { get; set; } = 0; + /// + /// Gets or Sets Memory + /// + [DataMember(Name = "memory", EmitDefaultValue = true)] + public int Memory { get; set; } = 0; + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + return "ResourcesDuration"; + } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString(bool detailed) + { + if (!detailed) + return this.ToString(); + + var sb = new StringBuilder(); + sb.Append("ResourcesDuration:\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Cpu: ").Append(Cpu).Append("\n"); + sb.Append(" Memory: ").Append(Memory).Append("\n"); + return sb.ToString(); + } + + /// + /// Returns the object from JSON string + /// + /// ResourcesDuration object + public static ResourcesDuration FromJson(string json) + { + var obj = JsonConvert.DeserializeObject(json, JsonSetting.AnyOfConvertSetting); + if (obj == null) + return null; + return obj.Type.ToLower() == obj.GetType().Name.ToLower() ? obj : null; + } + + /// + /// Creates a new instance with the same properties. + /// + /// ResourcesDuration object + public virtual ResourcesDuration DuplicateResourcesDuration() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateResourcesDuration(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel DuplicateOpenAPIGenBaseModel() + { + return DuplicateResourcesDuration(); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + input = input is AnyOf anyOf ? anyOf.Obj : input; + return this.Equals(input as ResourcesDuration); + } + + /// + /// Returns true if ResourcesDuration instances are equal + /// + /// Instance of ResourcesDuration to be compared + /// Boolean + public bool Equals(ResourcesDuration input) + { + if (input == null) + return false; + return base.Equals(input) && + ( + this.Cpu == input.Cpu || + (this.Cpu != null && + this.Cpu.Equals(input.Cpu)) + ) && base.Equals(input) && + ( + this.Memory == input.Memory || + (this.Memory != null && + this.Memory.Equals(input.Memory)) + ) && base.Equals(input) && + ( + this.Type == input.Type || + (this.Type != null && + this.Type.Equals(input.Type)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = base.GetHashCode(); + if (this.Cpu != null) + hashCode = hashCode * 59 + this.Cpu.GetHashCode(); + if (this.Memory != null) + hashCode = hashCode * 59 + this.Memory.GetHashCode(); + if (this.Type != null) + hashCode = hashCode * 59 + this.Type.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + foreach(var x in base.BaseValidate(validationContext)) yield return x; + + + // Type (string) pattern + Regex regexType = new Regex(@"^ResourcesDuration$", RegexOptions.CultureInvariant); + if (false == regexType.Match(this.Type).Success) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Type, must match a pattern of " + regexType, new [] { "Type" }); + } + + yield break; + } + } +} diff --git a/src/PollinationSDK/Model/Run.cs b/src/PollinationSDK/Model/Run.cs index e55755d8c..d77a47c54 100644 --- a/src/PollinationSDK/Model/Run.cs +++ b/src/PollinationSDK/Model/Run.cs @@ -48,10 +48,11 @@ protected Run() /// The recipe used to generate this . /// The generation of this run. /// The status of the run. + /// Extra metadata about the run. public Run ( string id, // Required parameters - AccountPublic author= default, AccountPublic owner= default, RecipeInterface recipe= default, double generation= default, RunStatus status= default // Optional parameters + AccountPublic author= default, AccountPublic owner= default, RecipeInterface recipe= default, double generation= default, RunStatus status= default, RunMeta meta= default // Optional parameters ) : base()// BaseClass { // to ensure "id" is required (not null) @@ -61,6 +62,7 @@ public Run this.Recipe = recipe; this.Generation = generation; this.Status = status; + this.Meta = meta; // Set non-required readonly properties with defaultValue this.Type = "Run"; @@ -109,6 +111,12 @@ public Run /// The status of the run [DataMember(Name = "status", EmitDefaultValue = false)] public RunStatus Status { get; set; } + /// + /// Extra metadata about the run + /// + /// Extra metadata about the run + [DataMember(Name = "meta", EmitDefaultValue = false)] + public RunMeta Meta { get; set; } /// /// Returns the string presentation of the object @@ -137,6 +145,7 @@ public override string ToString(bool detailed) sb.Append(" Recipe: ").Append(Recipe).Append("\n"); sb.Append(" Generation: ").Append(Generation).Append("\n"); sb.Append(" Status: ").Append(Status).Append("\n"); + sb.Append(" Meta: ").Append(Meta).Append("\n"); return sb.ToString(); } @@ -230,6 +239,11 @@ public bool Equals(Run input) (this.Status != null && this.Status.Equals(input.Status)) ) && base.Equals(input) && + ( + this.Meta == input.Meta || + (this.Meta != null && + this.Meta.Equals(input.Meta)) + ) && base.Equals(input) && ( this.Type == input.Type || (this.Type != null && @@ -258,6 +272,8 @@ public override int GetHashCode() hashCode = hashCode * 59 + this.Generation.GetHashCode(); if (this.Status != null) hashCode = hashCode * 59 + this.Status.GetHashCode(); + if (this.Meta != null) + hashCode = hashCode * 59 + this.Meta.GetHashCode(); if (this.Type != null) hashCode = hashCode * 59 + this.Type.GetHashCode(); return hashCode; diff --git a/src/PollinationSDK/Model/RunMeta.cs b/src/PollinationSDK/Model/RunMeta.cs new file mode 100644 index 000000000..59a8b9f7a --- /dev/null +++ b/src/PollinationSDK/Model/RunMeta.cs @@ -0,0 +1,212 @@ +/* + * pollination-server + * + * Pollination Server OpenAPI Definition + * + * Contact: info@pollination.cloud + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; + + +namespace PollinationSDK +{ + /// + /// RunMeta + /// + [DataContract(Name = "RunMeta")] + public partial class RunMeta : OpenAPIGenBaseModel, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// resource usage. + /// progress of the run. + public RunMeta + ( + // Required parameters + ResourcesDuration resourcesDuration= default, RunProgress progress= default // Optional parameters + ) : base()// BaseClass + { + this.ResourcesDuration = resourcesDuration; + this.Progress = progress; + + // Set non-required readonly properties with defaultValue + this.Type = "RunMeta"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "RunMeta"; + + /// + /// resource usage + /// + /// resource usage + [DataMember(Name = "resources_duration", EmitDefaultValue = false)] + public ResourcesDuration ResourcesDuration { get; set; } + /// + /// progress of the run + /// + /// progress of the run + [DataMember(Name = "progress", EmitDefaultValue = false)] + public RunProgress Progress { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + return "RunMeta"; + } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString(bool detailed) + { + if (!detailed) + return this.ToString(); + + var sb = new StringBuilder(); + sb.Append("RunMeta:\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" ResourcesDuration: ").Append(ResourcesDuration).Append("\n"); + sb.Append(" Progress: ").Append(Progress).Append("\n"); + return sb.ToString(); + } + + /// + /// Returns the object from JSON string + /// + /// RunMeta object + public static RunMeta FromJson(string json) + { + var obj = JsonConvert.DeserializeObject(json, JsonSetting.AnyOfConvertSetting); + if (obj == null) + return null; + return obj.Type.ToLower() == obj.GetType().Name.ToLower() ? obj : null; + } + + /// + /// Creates a new instance with the same properties. + /// + /// RunMeta object + public virtual RunMeta DuplicateRunMeta() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateRunMeta(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel DuplicateOpenAPIGenBaseModel() + { + return DuplicateRunMeta(); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + input = input is AnyOf anyOf ? anyOf.Obj : input; + return this.Equals(input as RunMeta); + } + + /// + /// Returns true if RunMeta instances are equal + /// + /// Instance of RunMeta to be compared + /// Boolean + public bool Equals(RunMeta input) + { + if (input == null) + return false; + return base.Equals(input) && + ( + this.ResourcesDuration == input.ResourcesDuration || + (this.ResourcesDuration != null && + this.ResourcesDuration.Equals(input.ResourcesDuration)) + ) && base.Equals(input) && + ( + this.Progress == input.Progress || + (this.Progress != null && + this.Progress.Equals(input.Progress)) + ) && base.Equals(input) && + ( + this.Type == input.Type || + (this.Type != null && + this.Type.Equals(input.Type)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = base.GetHashCode(); + if (this.ResourcesDuration != null) + hashCode = hashCode * 59 + this.ResourcesDuration.GetHashCode(); + if (this.Progress != null) + hashCode = hashCode * 59 + this.Progress.GetHashCode(); + if (this.Type != null) + hashCode = hashCode * 59 + this.Type.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + foreach(var x in base.BaseValidate(validationContext)) yield return x; + + + // Type (string) pattern + Regex regexType = new Regex(@"^RunMeta$", RegexOptions.CultureInvariant); + if (false == regexType.Match(this.Type).Success) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Type, must match a pattern of " + regexType, new [] { "Type" }); + } + + yield break; + } + } +} diff --git a/src/PollinationSDK/Model/RunProgress.cs b/src/PollinationSDK/Model/RunProgress.cs new file mode 100644 index 000000000..591d2d20b --- /dev/null +++ b/src/PollinationSDK/Model/RunProgress.cs @@ -0,0 +1,225 @@ +/* + * pollination-server + * + * Pollination Server OpenAPI Definition + * + * Contact: info@pollination.cloud + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; + + +namespace PollinationSDK +{ + /// + /// RunProgress + /// + [DataContract(Name = "RunProgress")] + public partial class RunProgress : OpenAPIGenBaseModel, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// completed (default to 0). + /// running (default to 0). + /// total (default to 0). + public RunProgress + ( + // Required parameters + int completed = 0, int running = 0, int total = 0 // Optional parameters + ) : base()// BaseClass + { + this.Completed = completed; + this.Running = running; + this.Total = total; + + // Set non-required readonly properties with defaultValue + this.Type = "RunProgress"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "RunProgress"; + + /// + /// Gets or Sets Completed + /// + [DataMember(Name = "completed", EmitDefaultValue = true)] + public int Completed { get; set; } = 0; + /// + /// Gets or Sets Running + /// + [DataMember(Name = "running", EmitDefaultValue = true)] + public int Running { get; set; } = 0; + /// + /// Gets or Sets Total + /// + [DataMember(Name = "total", EmitDefaultValue = true)] + public int Total { get; set; } = 0; + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + return "RunProgress"; + } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString(bool detailed) + { + if (!detailed) + return this.ToString(); + + var sb = new StringBuilder(); + sb.Append("RunProgress:\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Completed: ").Append(Completed).Append("\n"); + sb.Append(" Running: ").Append(Running).Append("\n"); + sb.Append(" Total: ").Append(Total).Append("\n"); + return sb.ToString(); + } + + /// + /// Returns the object from JSON string + /// + /// RunProgress object + public static RunProgress FromJson(string json) + { + var obj = JsonConvert.DeserializeObject(json, JsonSetting.AnyOfConvertSetting); + if (obj == null) + return null; + return obj.Type.ToLower() == obj.GetType().Name.ToLower() ? obj : null; + } + + /// + /// Creates a new instance with the same properties. + /// + /// RunProgress object + public virtual RunProgress DuplicateRunProgress() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateRunProgress(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel DuplicateOpenAPIGenBaseModel() + { + return DuplicateRunProgress(); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + input = input is AnyOf anyOf ? anyOf.Obj : input; + return this.Equals(input as RunProgress); + } + + /// + /// Returns true if RunProgress instances are equal + /// + /// Instance of RunProgress to be compared + /// Boolean + public bool Equals(RunProgress input) + { + if (input == null) + return false; + return base.Equals(input) && + ( + this.Completed == input.Completed || + (this.Completed != null && + this.Completed.Equals(input.Completed)) + ) && base.Equals(input) && + ( + this.Running == input.Running || + (this.Running != null && + this.Running.Equals(input.Running)) + ) && base.Equals(input) && + ( + this.Total == input.Total || + (this.Total != null && + this.Total.Equals(input.Total)) + ) && base.Equals(input) && + ( + this.Type == input.Type || + (this.Type != null && + this.Type.Equals(input.Type)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = base.GetHashCode(); + if (this.Completed != null) + hashCode = hashCode * 59 + this.Completed.GetHashCode(); + if (this.Running != null) + hashCode = hashCode * 59 + this.Running.GetHashCode(); + if (this.Total != null) + hashCode = hashCode * 59 + this.Total.GetHashCode(); + if (this.Type != null) + hashCode = hashCode * 59 + this.Type.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + foreach(var x in base.BaseValidate(validationContext)) yield return x; + + + // Type (string) pattern + Regex regexType = new Regex(@"^RunProgress$", RegexOptions.CultureInvariant); + if (false == regexType.Match(this.Type).Success) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Type, must match a pattern of " + regexType, new [] { "Type" }); + } + + yield break; + } + } +} diff --git a/src/PollinationSDK/Model/SecureResourcePublic.cs b/src/PollinationSDK/Model/SecureResourcePublic.cs new file mode 100644 index 000000000..3d19a7817 --- /dev/null +++ b/src/PollinationSDK/Model/SecureResourcePublic.cs @@ -0,0 +1,217 @@ +/* + * pollination-server + * + * Pollination Server OpenAPI Definition + * + * Contact: info@pollination.cloud + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; + + +namespace PollinationSDK +{ + /// + /// SecureResourcePublic + /// + [DataContract(Name = "_SecureResourcePublic")] + public partial class SecureResourcePublic : OpenAPIGenBaseModel, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected SecureResourcePublic() + { + // Set non-required readonly properties with defaultValue + this.Type = "_SecureResourcePublic"; + } + + /// + /// Initializes a new instance of the class. + /// + /// Secret string to be used to retrieve the resource from the client (required). + public SecureResourcePublic + ( + string clientSecret// Required parameters + // Optional parameters + ) : base()// BaseClass + { + // to ensure "clientSecret" is required (not null) + this.ClientSecret = clientSecret ?? throw new ArgumentNullException("clientSecret is a required property for SecureResourcePublic and cannot be null"); + + // Set non-required readonly properties with defaultValue + this.Type = "_SecureResourcePublic"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "_SecureResourcePublic"; + + /// + /// Secret string to be used to retrieve the resource from the client + /// + /// Secret string to be used to retrieve the resource from the client + [DataMember(Name = "client_secret", IsRequired = true, EmitDefaultValue = false)] + public string ClientSecret { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + return "SecureResourcePublic"; + } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString(bool detailed) + { + if (!detailed) + return this.ToString(); + + var sb = new StringBuilder(); + sb.Append("SecureResourcePublic:\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" ClientSecret: ").Append(ClientSecret).Append("\n"); + return sb.ToString(); + } + + /// + /// Returns the object from JSON string + /// + /// SecureResourcePublic object + public static SecureResourcePublic FromJson(string json) + { + var obj = JsonConvert.DeserializeObject(json, JsonSetting.AnyOfConvertSetting); + if (obj == null) + return null; + return obj.Type.ToLower() == obj.GetType().Name.ToLower() ? obj : null; + } + + /// + /// Creates a new instance with the same properties. + /// + /// SecureResourcePublic object + public virtual SecureResourcePublic DuplicateSecureResourcePublic() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateSecureResourcePublic(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel DuplicateOpenAPIGenBaseModel() + { + return DuplicateSecureResourcePublic(); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + input = input is AnyOf anyOf ? anyOf.Obj : input; + return this.Equals(input as SecureResourcePublic); + } + + /// + /// Returns true if SecureResourcePublic instances are equal + /// + /// Instance of SecureResourcePublic to be compared + /// Boolean + public bool Equals(SecureResourcePublic input) + { + if (input == null) + return false; + return base.Equals(input) && + ( + this.ClientSecret == input.ClientSecret || + (this.ClientSecret != null && + this.ClientSecret.Equals(input.ClientSecret)) + ) && base.Equals(input) && + ( + this.Type == input.Type || + (this.Type != null && + this.Type.Equals(input.Type)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = base.GetHashCode(); + if (this.ClientSecret != null) + hashCode = hashCode * 59 + this.ClientSecret.GetHashCode(); + if (this.Type != null) + hashCode = hashCode * 59 + this.Type.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + return this.BaseValidate(validationContext); + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + protected IEnumerable BaseValidate(ValidationContext validationContext) + { + foreach(var x in base.BaseValidate(validationContext)) yield return x; + + + // Type (string) pattern + Regex regexType = new Regex(@"^_SecureResourcePublic$", RegexOptions.CultureInvariant); + if (false == regexType.Match(this.Type).Success) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Type, must match a pattern of " + regexType, new [] { "Type" }); + } + + yield break; + } + } +} diff --git a/src/PollinationSDK/Model/Status.cs b/src/PollinationSDK/Model/Status.cs new file mode 100644 index 000000000..b4c11cb78 --- /dev/null +++ b/src/PollinationSDK/Model/Status.cs @@ -0,0 +1,196 @@ +/* + * pollination-server + * + * Pollination Server OpenAPI Definition + * + * Contact: info@pollination.cloud + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; + + +namespace PollinationSDK +{ + /// + /// Status + /// + [DataContract(Name = "Status")] + public partial class Status : OpenAPIGenBaseModel, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// Whether account actions are currently blocked by a payment failure (default to false). + public Status + ( + // Required parameters + bool frozen = false // Optional parameters + ) : base()// BaseClass + { + this.Frozen = frozen; + + // Set non-required readonly properties with defaultValue + this.Type = "Status"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "Status"; + + /// + /// Whether account actions are currently blocked by a payment failure + /// + /// Whether account actions are currently blocked by a payment failure + [DataMember(Name = "frozen", EmitDefaultValue = true)] + public bool Frozen { get; set; } = false; + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + return "Status"; + } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString(bool detailed) + { + if (!detailed) + return this.ToString(); + + var sb = new StringBuilder(); + sb.Append("Status:\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Frozen: ").Append(Frozen).Append("\n"); + return sb.ToString(); + } + + /// + /// Returns the object from JSON string + /// + /// Status object + public static Status FromJson(string json) + { + var obj = JsonConvert.DeserializeObject(json, JsonSetting.AnyOfConvertSetting); + if (obj == null) + return null; + return obj.Type.ToLower() == obj.GetType().Name.ToLower() ? obj : null; + } + + /// + /// Creates a new instance with the same properties. + /// + /// Status object + public virtual Status DuplicateStatus() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateStatus(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel DuplicateOpenAPIGenBaseModel() + { + return DuplicateStatus(); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + input = input is AnyOf anyOf ? anyOf.Obj : input; + return this.Equals(input as Status); + } + + /// + /// Returns true if Status instances are equal + /// + /// Instance of Status to be compared + /// Boolean + public bool Equals(Status input) + { + if (input == null) + return false; + return base.Equals(input) && + ( + this.Frozen == input.Frozen || + (this.Frozen != null && + this.Frozen.Equals(input.Frozen)) + ) && base.Equals(input) && + ( + this.Type == input.Type || + (this.Type != null && + this.Type.Equals(input.Type)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = base.GetHashCode(); + if (this.Frozen != null) + hashCode = hashCode * 59 + this.Frozen.GetHashCode(); + if (this.Type != null) + hashCode = hashCode * 59 + this.Type.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + foreach(var x in base.BaseValidate(validationContext)) yield return x; + + + // Type (string) pattern + Regex regexType = new Regex(@"^Status$", RegexOptions.CultureInvariant); + if (false == regexType.Match(this.Type).Success) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Type, must match a pattern of " + regexType, new [] { "Type" }); + } + + yield break; + } + } +} diff --git a/src/PollinationSDK/Model/Subscribe.cs b/src/PollinationSDK/Model/Subscribe.cs new file mode 100644 index 000000000..91a1f40f1 --- /dev/null +++ b/src/PollinationSDK/Model/Subscribe.cs @@ -0,0 +1,207 @@ +/* + * pollination-server + * + * Pollination Server OpenAPI Definition + * + * Contact: info@pollination.cloud + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; + + +namespace PollinationSDK +{ + /// + /// Subscribe + /// + [DataContract(Name = "Subscribe")] + public partial class Subscribe : OpenAPIGenBaseModel, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected Subscribe() + { + // Set non-required readonly properties with defaultValue + this.Type = "Subscribe"; + } + + /// + /// Initializes a new instance of the class. + /// + /// The initial plan with which to create the subscription (required). + public Subscribe + ( + Price plan// Required parameters + // Optional parameters + ) : base()// BaseClass + { + // to ensure "plan" is required (not null) + this.Plan = plan ?? throw new ArgumentNullException("plan is a required property for Subscribe and cannot be null"); + + // Set non-required readonly properties with defaultValue + this.Type = "Subscribe"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "Subscribe"; + + /// + /// The initial plan with which to create the subscription + /// + /// The initial plan with which to create the subscription + [DataMember(Name = "plan", IsRequired = true, EmitDefaultValue = false)] + public Price Plan { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + return "Subscribe"; + } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString(bool detailed) + { + if (!detailed) + return this.ToString(); + + var sb = new StringBuilder(); + sb.Append("Subscribe:\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Plan: ").Append(Plan).Append("\n"); + return sb.ToString(); + } + + /// + /// Returns the object from JSON string + /// + /// Subscribe object + public static Subscribe FromJson(string json) + { + var obj = JsonConvert.DeserializeObject(json, JsonSetting.AnyOfConvertSetting); + if (obj == null) + return null; + return obj.Type.ToLower() == obj.GetType().Name.ToLower() ? obj : null; + } + + /// + /// Creates a new instance with the same properties. + /// + /// Subscribe object + public virtual Subscribe DuplicateSubscribe() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateSubscribe(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel DuplicateOpenAPIGenBaseModel() + { + return DuplicateSubscribe(); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + input = input is AnyOf anyOf ? anyOf.Obj : input; + return this.Equals(input as Subscribe); + } + + /// + /// Returns true if Subscribe instances are equal + /// + /// Instance of Subscribe to be compared + /// Boolean + public bool Equals(Subscribe input) + { + if (input == null) + return false; + return base.Equals(input) && + ( + this.Plan == input.Plan || + (this.Plan != null && + this.Plan.Equals(input.Plan)) + ) && base.Equals(input) && + ( + this.Type == input.Type || + (this.Type != null && + this.Type.Equals(input.Type)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = base.GetHashCode(); + if (this.Plan != null) + hashCode = hashCode * 59 + this.Plan.GetHashCode(); + if (this.Type != null) + hashCode = hashCode * 59 + this.Type.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + foreach(var x in base.BaseValidate(validationContext)) yield return x; + + + // Type (string) pattern + Regex regexType = new Regex(@"^Subscribe$", RegexOptions.CultureInvariant); + if (false == regexType.Match(this.Type).Success) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Type, must match a pattern of " + regexType, new [] { "Type" }); + } + + yield break; + } + } +} diff --git a/src/PollinationSDK/Model/Subscription.cs b/src/PollinationSDK/Model/Subscription.cs new file mode 100644 index 000000000..e2d1c68bd --- /dev/null +++ b/src/PollinationSDK/Model/Subscription.cs @@ -0,0 +1,342 @@ +/* + * pollination-server + * + * Pollination Server OpenAPI Definition + * + * Contact: info@pollination.cloud + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; + + +namespace PollinationSDK +{ + /// + /// Subscription + /// + [DataContract(Name = "Subscription")] + public partial class Subscription : ExternalResource, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected Subscription() + { + // Set non-required readonly properties with defaultValue + this.Type = "Subscription"; + } + + /// + /// Initializes a new instance of the class. + /// + /// cancelAtPeriodEnd (required). + /// currentPeriodStart (required). + /// currentPeriodEnd (required). + /// customer (required). + /// items (required). + /// latestInvoice (required). + /// defaultPaymentMethod. + /// schedule. + /// discount. + /// id (required). + /// metadata. + public Subscription + ( + string id, bool cancelAtPeriodEnd, DateTime currentPeriodStart, DateTime currentPeriodEnd, string customer, SubscriptionItemList items, string latestInvoice, // Required parameters + Object metadata= default, string defaultPaymentMethod= default, string schedule= default, Discount discount= default // Optional parameters + ) : base(id: id, metadata: metadata)// BaseClass + { + this.CancelAtPeriodEnd = cancelAtPeriodEnd; + this.CurrentPeriodStart = currentPeriodStart; + this.CurrentPeriodEnd = currentPeriodEnd; + // to ensure "customer" is required (not null) + this.Customer = customer ?? throw new ArgumentNullException("customer is a required property for Subscription and cannot be null"); + // to ensure "items" is required (not null) + this.Items = items ?? throw new ArgumentNullException("items is a required property for Subscription and cannot be null"); + // to ensure "latestInvoice" is required (not null) + this.LatestInvoice = latestInvoice ?? throw new ArgumentNullException("latestInvoice is a required property for Subscription and cannot be null"); + this.DefaultPaymentMethod = defaultPaymentMethod; + this.Schedule = schedule; + this.Discount = discount; + + // Set non-required readonly properties with defaultValue + this.Type = "Subscription"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "Subscription"; + + /// + /// Gets or Sets CancelAtPeriodEnd + /// + [DataMember(Name = "cancel_at_period_end", IsRequired = true, EmitDefaultValue = false)] + public bool CancelAtPeriodEnd { get; set; } + /// + /// Gets or Sets CurrentPeriodStart + /// + [DataMember(Name = "current_period_start", IsRequired = true, EmitDefaultValue = false)] + public DateTime CurrentPeriodStart { get; set; } + /// + /// Gets or Sets CurrentPeriodEnd + /// + [DataMember(Name = "current_period_end", IsRequired = true, EmitDefaultValue = false)] + public DateTime CurrentPeriodEnd { get; set; } + /// + /// Gets or Sets Customer + /// + [DataMember(Name = "customer", IsRequired = true, EmitDefaultValue = false)] + public string Customer { get; set; } + /// + /// Gets or Sets Items + /// + [DataMember(Name = "items", IsRequired = true, EmitDefaultValue = false)] + public SubscriptionItemList Items { get; set; } + /// + /// Gets or Sets LatestInvoice + /// + [DataMember(Name = "latest_invoice", IsRequired = true, EmitDefaultValue = false)] + public string LatestInvoice { get; set; } + /// + /// Gets or Sets DefaultPaymentMethod + /// + [DataMember(Name = "default_payment_method", EmitDefaultValue = false)] + public string DefaultPaymentMethod { get; set; } + /// + /// Gets or Sets Schedule + /// + [DataMember(Name = "schedule", EmitDefaultValue = false)] + public string Schedule { get; set; } + /// + /// Gets or Sets Discount + /// + [DataMember(Name = "discount", EmitDefaultValue = false)] + public Discount Discount { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + return "Subscription"; + } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString(bool detailed) + { + if (!detailed) + return this.ToString(); + + var sb = new StringBuilder(); + sb.Append("Subscription:\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Id: ").Append(Id).Append("\n"); + sb.Append(" Metadata: ").Append(Metadata).Append("\n"); + sb.Append(" CancelAtPeriodEnd: ").Append(CancelAtPeriodEnd).Append("\n"); + sb.Append(" CurrentPeriodStart: ").Append(CurrentPeriodStart).Append("\n"); + sb.Append(" CurrentPeriodEnd: ").Append(CurrentPeriodEnd).Append("\n"); + sb.Append(" Customer: ").Append(Customer).Append("\n"); + sb.Append(" Items: ").Append(Items).Append("\n"); + sb.Append(" LatestInvoice: ").Append(LatestInvoice).Append("\n"); + sb.Append(" DefaultPaymentMethod: ").Append(DefaultPaymentMethod).Append("\n"); + sb.Append(" Schedule: ").Append(Schedule).Append("\n"); + sb.Append(" Discount: ").Append(Discount).Append("\n"); + return sb.ToString(); + } + + /// + /// Returns the object from JSON string + /// + /// Subscription object + public static Subscription FromJson(string json) + { + var obj = JsonConvert.DeserializeObject(json, JsonSetting.AnyOfConvertSetting); + if (obj == null) + return null; + return obj.Type.ToLower() == obj.GetType().Name.ToLower() ? obj : null; + } + + /// + /// Creates a new instance with the same properties. + /// + /// Subscription object + public virtual Subscription DuplicateSubscription() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateSubscription(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override ExternalResource DuplicateExternalResource() + { + return DuplicateSubscription(); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + input = input is AnyOf anyOf ? anyOf.Obj : input; + return this.Equals(input as Subscription); + } + + /// + /// Returns true if Subscription instances are equal + /// + /// Instance of Subscription to be compared + /// Boolean + public bool Equals(Subscription input) + { + if (input == null) + return false; + return base.Equals(input) && + ( + this.CancelAtPeriodEnd == input.CancelAtPeriodEnd || + (this.CancelAtPeriodEnd != null && + this.CancelAtPeriodEnd.Equals(input.CancelAtPeriodEnd)) + ) && base.Equals(input) && + ( + this.CurrentPeriodStart == input.CurrentPeriodStart || + (this.CurrentPeriodStart != null && + this.CurrentPeriodStart.Equals(input.CurrentPeriodStart)) + ) && base.Equals(input) && + ( + this.CurrentPeriodEnd == input.CurrentPeriodEnd || + (this.CurrentPeriodEnd != null && + this.CurrentPeriodEnd.Equals(input.CurrentPeriodEnd)) + ) && base.Equals(input) && + ( + this.Customer == input.Customer || + (this.Customer != null && + this.Customer.Equals(input.Customer)) + ) && base.Equals(input) && + ( + this.Items == input.Items || + (this.Items != null && + this.Items.Equals(input.Items)) + ) && base.Equals(input) && + ( + this.LatestInvoice == input.LatestInvoice || + (this.LatestInvoice != null && + this.LatestInvoice.Equals(input.LatestInvoice)) + ) && base.Equals(input) && + ( + this.DefaultPaymentMethod == input.DefaultPaymentMethod || + (this.DefaultPaymentMethod != null && + this.DefaultPaymentMethod.Equals(input.DefaultPaymentMethod)) + ) && base.Equals(input) && + ( + this.Schedule == input.Schedule || + (this.Schedule != null && + this.Schedule.Equals(input.Schedule)) + ) && base.Equals(input) && + ( + this.Discount == input.Discount || + (this.Discount != null && + this.Discount.Equals(input.Discount)) + ) && base.Equals(input) && + ( + this.Type == input.Type || + (this.Type != null && + this.Type.Equals(input.Type)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = base.GetHashCode(); + if (this.CancelAtPeriodEnd != null) + hashCode = hashCode * 59 + this.CancelAtPeriodEnd.GetHashCode(); + if (this.CurrentPeriodStart != null) + hashCode = hashCode * 59 + this.CurrentPeriodStart.GetHashCode(); + if (this.CurrentPeriodEnd != null) + hashCode = hashCode * 59 + this.CurrentPeriodEnd.GetHashCode(); + if (this.Customer != null) + hashCode = hashCode * 59 + this.Customer.GetHashCode(); + if (this.Items != null) + hashCode = hashCode * 59 + this.Items.GetHashCode(); + if (this.LatestInvoice != null) + hashCode = hashCode * 59 + this.LatestInvoice.GetHashCode(); + if (this.DefaultPaymentMethod != null) + hashCode = hashCode * 59 + this.DefaultPaymentMethod.GetHashCode(); + if (this.Schedule != null) + hashCode = hashCode * 59 + this.Schedule.GetHashCode(); + if (this.Discount != null) + hashCode = hashCode * 59 + this.Discount.GetHashCode(); + if (this.Type != null) + hashCode = hashCode * 59 + this.Type.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + return this.BaseValidate(validationContext); + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + protected IEnumerable BaseValidate(ValidationContext validationContext) + { + foreach(var x in base.BaseValidate(validationContext)) yield return x; + + + // Type (string) pattern + Regex regexType = new Regex(@"^Subscription$", RegexOptions.CultureInvariant); + if (false == regexType.Match(this.Type).Success) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Type, must match a pattern of " + regexType, new [] { "Type" }); + } + + yield break; + } + } +} diff --git a/src/PollinationSDK/Model/SubscriptionCreate.cs b/src/PollinationSDK/Model/SubscriptionCreate.cs new file mode 100644 index 000000000..41b504c51 --- /dev/null +++ b/src/PollinationSDK/Model/SubscriptionCreate.cs @@ -0,0 +1,197 @@ +/* + * pollination-server + * + * Pollination Server OpenAPI Definition + * + * Contact: info@pollination.cloud + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; + + +namespace PollinationSDK +{ + /// + /// SubscriptionCreate + /// + [DataContract(Name = "SubscriptionCreate")] + public partial class SubscriptionCreate : OpenAPIGenBaseModel, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// The list of recurring price items and the quantity of each to attach to the new subscription. + public SubscriptionCreate + ( + // Required parameters + List items= default // Optional parameters + ) : base()// BaseClass + { + this.Items = items; + + // Set non-required readonly properties with defaultValue + this.Type = "SubscriptionCreate"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "SubscriptionCreate"; + + /// + /// The list of recurring price items and the quantity of each to attach to the new subscription + /// + /// The list of recurring price items and the quantity of each to attach to the new subscription + [DataMember(Name = "items", EmitDefaultValue = false)] + public List Items { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + return "SubscriptionCreate"; + } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString(bool detailed) + { + if (!detailed) + return this.ToString(); + + var sb = new StringBuilder(); + sb.Append("SubscriptionCreate:\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Items: ").Append(Items).Append("\n"); + return sb.ToString(); + } + + /// + /// Returns the object from JSON string + /// + /// SubscriptionCreate object + public static SubscriptionCreate FromJson(string json) + { + var obj = JsonConvert.DeserializeObject(json, JsonSetting.AnyOfConvertSetting); + if (obj == null) + return null; + return obj.Type.ToLower() == obj.GetType().Name.ToLower() ? obj : null; + } + + /// + /// Creates a new instance with the same properties. + /// + /// SubscriptionCreate object + public virtual SubscriptionCreate DuplicateSubscriptionCreate() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateSubscriptionCreate(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel DuplicateOpenAPIGenBaseModel() + { + return DuplicateSubscriptionCreate(); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + input = input is AnyOf anyOf ? anyOf.Obj : input; + return this.Equals(input as SubscriptionCreate); + } + + /// + /// Returns true if SubscriptionCreate instances are equal + /// + /// Instance of SubscriptionCreate to be compared + /// Boolean + public bool Equals(SubscriptionCreate input) + { + if (input == null) + return false; + return base.Equals(input) && + ( + this.Items == input.Items || + this.Items != null && + input.Items != null && + this.Items.SequenceEqual(input.Items) + ) && base.Equals(input) && + ( + this.Type == input.Type || + (this.Type != null && + this.Type.Equals(input.Type)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = base.GetHashCode(); + if (this.Items != null) + hashCode = hashCode * 59 + this.Items.GetHashCode(); + if (this.Type != null) + hashCode = hashCode * 59 + this.Type.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + foreach(var x in base.BaseValidate(validationContext)) yield return x; + + + // Type (string) pattern + Regex regexType = new Regex(@"^SubscriptionCreate$", RegexOptions.CultureInvariant); + if (false == regexType.Match(this.Type).Success) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Type, must match a pattern of " + regexType, new [] { "Type" }); + } + + yield break; + } + } +} diff --git a/src/PollinationSDK/Model/SubscriptionItem.cs b/src/PollinationSDK/Model/SubscriptionItem.cs new file mode 100644 index 000000000..b9fb19df5 --- /dev/null +++ b/src/PollinationSDK/Model/SubscriptionItem.cs @@ -0,0 +1,204 @@ +/* + * pollination-server + * + * Pollination Server OpenAPI Definition + * + * Contact: info@pollination.cloud + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; + + +namespace PollinationSDK +{ + /// + /// SubscriptionItem + /// + [DataContract(Name = "SubscriptionItem")] + public partial class SubscriptionItem : ExternalResource, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected SubscriptionItem() + { + // Set non-required readonly properties with defaultValue + this.Type = "SubscriptionItem"; + } + + /// + /// Initializes a new instance of the class. + /// + /// id (required). + /// metadata. + public SubscriptionItem + ( + string id, // Required parameters + Object metadata= default // Optional parameters + ) : base(id: id, metadata: metadata)// BaseClass + { + + // Set non-required readonly properties with defaultValue + this.Type = "SubscriptionItem"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "SubscriptionItem"; + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + return "SubscriptionItem"; + } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString(bool detailed) + { + if (!detailed) + return this.ToString(); + + var sb = new StringBuilder(); + sb.Append("SubscriptionItem:\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Id: ").Append(Id).Append("\n"); + sb.Append(" Metadata: ").Append(Metadata).Append("\n"); + return sb.ToString(); + } + + /// + /// Returns the object from JSON string + /// + /// SubscriptionItem object + public static SubscriptionItem FromJson(string json) + { + var obj = JsonConvert.DeserializeObject(json, JsonSetting.AnyOfConvertSetting); + if (obj == null) + return null; + return obj.Type.ToLower() == obj.GetType().Name.ToLower() ? obj : null; + } + + /// + /// Creates a new instance with the same properties. + /// + /// SubscriptionItem object + public virtual SubscriptionItem DuplicateSubscriptionItem() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateSubscriptionItem(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override ExternalResource DuplicateExternalResource() + { + return DuplicateSubscriptionItem(); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + input = input is AnyOf anyOf ? anyOf.Obj : input; + return this.Equals(input as SubscriptionItem); + } + + /// + /// Returns true if SubscriptionItem instances are equal + /// + /// Instance of SubscriptionItem to be compared + /// Boolean + public bool Equals(SubscriptionItem input) + { + if (input == null) + return false; + return base.Equals(input) && + ( + this.Type == input.Type || + (this.Type != null && + this.Type.Equals(input.Type)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = base.GetHashCode(); + if (this.Type != null) + hashCode = hashCode * 59 + this.Type.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + return this.BaseValidate(validationContext); + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + protected IEnumerable BaseValidate(ValidationContext validationContext) + { + foreach(var x in base.BaseValidate(validationContext)) yield return x; + + + // Type (string) pattern + Regex regexType = new Regex(@"^SubscriptionItem$", RegexOptions.CultureInvariant); + if (false == regexType.Match(this.Type).Success) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Type, must match a pattern of " + regexType, new [] { "Type" }); + } + + yield break; + } + } +} diff --git a/src/PollinationSDK/Model/SubscriptionItemList.cs b/src/PollinationSDK/Model/SubscriptionItemList.cs new file mode 100644 index 000000000..85a0e7a76 --- /dev/null +++ b/src/PollinationSDK/Model/SubscriptionItemList.cs @@ -0,0 +1,222 @@ +/* + * pollination-server + * + * Pollination Server OpenAPI Definition + * + * Contact: info@pollination.cloud + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; + + +namespace PollinationSDK +{ + /// + /// SubscriptionItemList + /// + [DataContract(Name = "SubscriptionItemList")] + public partial class SubscriptionItemList : OpenAPIGenBaseModel, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected SubscriptionItemList() + { + // Set non-required readonly properties with defaultValue + this.Type = "SubscriptionItemList"; + } + + /// + /// Initializes a new instance of the class. + /// + /// hasMore (required). + /// data (required). + public SubscriptionItemList + ( + bool hasMore, List> data// Required parameters + // Optional parameters + ) : base()// BaseClass + { + this.HasMore = hasMore; + // to ensure "data" is required (not null) + this.Data = data ?? throw new ArgumentNullException("data is a required property for SubscriptionItemList and cannot be null"); + + // Set non-required readonly properties with defaultValue + this.Type = "SubscriptionItemList"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "SubscriptionItemList"; + + /// + /// Gets or Sets HasMore + /// + [DataMember(Name = "has_more", IsRequired = true, EmitDefaultValue = false)] + public bool HasMore { get; set; } + /// + /// Gets or Sets Data + /// + [DataMember(Name = "data", IsRequired = true, EmitDefaultValue = false)] + public List> Data { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + return "SubscriptionItemList"; + } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString(bool detailed) + { + if (!detailed) + return this.ToString(); + + var sb = new StringBuilder(); + sb.Append("SubscriptionItemList:\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" HasMore: ").Append(HasMore).Append("\n"); + sb.Append(" Data: ").Append(Data).Append("\n"); + return sb.ToString(); + } + + /// + /// Returns the object from JSON string + /// + /// SubscriptionItemList object + public static SubscriptionItemList FromJson(string json) + { + var obj = JsonConvert.DeserializeObject(json, JsonSetting.AnyOfConvertSetting); + if (obj == null) + return null; + return obj.Type.ToLower() == obj.GetType().Name.ToLower() ? obj : null; + } + + /// + /// Creates a new instance with the same properties. + /// + /// SubscriptionItemList object + public virtual SubscriptionItemList DuplicateSubscriptionItemList() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateSubscriptionItemList(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel DuplicateOpenAPIGenBaseModel() + { + return DuplicateSubscriptionItemList(); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + input = input is AnyOf anyOf ? anyOf.Obj : input; + return this.Equals(input as SubscriptionItemList); + } + + /// + /// Returns true if SubscriptionItemList instances are equal + /// + /// Instance of SubscriptionItemList to be compared + /// Boolean + public bool Equals(SubscriptionItemList input) + { + if (input == null) + return false; + return base.Equals(input) && + ( + this.HasMore == input.HasMore || + (this.HasMore != null && + this.HasMore.Equals(input.HasMore)) + ) && base.Equals(input) && + ( + this.Data == input.Data || + this.Data != null && + input.Data != null && + this.Data.SequenceEqual(input.Data) + ) && base.Equals(input) && + ( + this.Type == input.Type || + (this.Type != null && + this.Type.Equals(input.Type)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = base.GetHashCode(); + if (this.HasMore != null) + hashCode = hashCode * 59 + this.HasMore.GetHashCode(); + if (this.Data != null) + hashCode = hashCode * 59 + this.Data.GetHashCode(); + if (this.Type != null) + hashCode = hashCode * 59 + this.Type.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + foreach(var x in base.BaseValidate(validationContext)) yield return x; + + + // Type (string) pattern + Regex regexType = new Regex(@"^SubscriptionItemList$", RegexOptions.CultureInvariant); + if (false == regexType.Match(this.Type).Success) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Type, must match a pattern of " + regexType, new [] { "Type" }); + } + + yield break; + } + } +} diff --git a/src/PollinationSDK/Model/SubscriptionPlan.cs b/src/PollinationSDK/Model/SubscriptionPlan.cs new file mode 100644 index 000000000..bd4af9fe8 --- /dev/null +++ b/src/PollinationSDK/Model/SubscriptionPlan.cs @@ -0,0 +1,259 @@ +/* + * pollination-server + * + * Pollination Server OpenAPI Definition + * + * Contact: info@pollination.cloud + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; + + +namespace PollinationSDK +{ + /// + /// A Subscription plan + /// + [DataContract(Name = "SubscriptionPlan")] + public partial class SubscriptionPlan : OpenAPIGenBaseModel, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected SubscriptionPlan() + { + // Set non-required readonly properties with defaultValue + this.Type = "SubscriptionPlan"; + } + + /// + /// Initializes a new instance of the class. + /// + /// A slug of the config plan used to create this subscription (required). + /// A name of the config plan used to create this subscription (required). + /// The types of account to which the plan can be applied (required). + /// A list of quota plans for a given subscription. + public SubscriptionPlan + ( + string slug, string name, List accountTypes, // Required parameters + List quotas= default // Optional parameters + ) : base()// BaseClass + { + // to ensure "slug" is required (not null) + this.Slug = slug ?? throw new ArgumentNullException("slug is a required property for SubscriptionPlan and cannot be null"); + // to ensure "name" is required (not null) + this.Name = name ?? throw new ArgumentNullException("name is a required property for SubscriptionPlan and cannot be null"); + // to ensure "accountTypes" is required (not null) + this.AccountTypes = accountTypes ?? throw new ArgumentNullException("accountTypes is a required property for SubscriptionPlan and cannot be null"); + this.Quotas = quotas; + + // Set non-required readonly properties with defaultValue + this.Type = "SubscriptionPlan"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "SubscriptionPlan"; + + /// + /// A slug of the config plan used to create this subscription + /// + /// A slug of the config plan used to create this subscription + [DataMember(Name = "slug", IsRequired = true, EmitDefaultValue = false)] + public string Slug { get; set; } + /// + /// A name of the config plan used to create this subscription + /// + /// A name of the config plan used to create this subscription + [DataMember(Name = "name", IsRequired = true, EmitDefaultValue = false)] + public string Name { get; set; } + /// + /// The types of account to which the plan can be applied + /// + /// The types of account to which the plan can be applied + [DataMember(Name = "account_types", IsRequired = true, EmitDefaultValue = false)] + public List AccountTypes { get; set; } + /// + /// A list of quota plans for a given subscription + /// + /// A list of quota plans for a given subscription + [DataMember(Name = "quotas", EmitDefaultValue = false)] + public List Quotas { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + return "SubscriptionPlan"; + } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString(bool detailed) + { + if (!detailed) + return this.ToString(); + + var sb = new StringBuilder(); + sb.Append("SubscriptionPlan:\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Slug: ").Append(Slug).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" AccountTypes: ").Append(AccountTypes).Append("\n"); + sb.Append(" Quotas: ").Append(Quotas).Append("\n"); + return sb.ToString(); + } + + /// + /// Returns the object from JSON string + /// + /// SubscriptionPlan object + public static SubscriptionPlan FromJson(string json) + { + var obj = JsonConvert.DeserializeObject(json, JsonSetting.AnyOfConvertSetting); + if (obj == null) + return null; + return obj.Type.ToLower() == obj.GetType().Name.ToLower() ? obj : null; + } + + /// + /// Creates a new instance with the same properties. + /// + /// SubscriptionPlan object + public virtual SubscriptionPlan DuplicateSubscriptionPlan() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateSubscriptionPlan(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel DuplicateOpenAPIGenBaseModel() + { + return DuplicateSubscriptionPlan(); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + input = input is AnyOf anyOf ? anyOf.Obj : input; + return this.Equals(input as SubscriptionPlan); + } + + /// + /// Returns true if SubscriptionPlan instances are equal + /// + /// Instance of SubscriptionPlan to be compared + /// Boolean + public bool Equals(SubscriptionPlan input) + { + if (input == null) + return false; + return base.Equals(input) && + ( + this.Slug == input.Slug || + (this.Slug != null && + this.Slug.Equals(input.Slug)) + ) && base.Equals(input) && + ( + this.Name == input.Name || + (this.Name != null && + this.Name.Equals(input.Name)) + ) && base.Equals(input) && + ( + this.AccountTypes == input.AccountTypes || + this.AccountTypes != null && + input.AccountTypes != null && + this.AccountTypes.SequenceEqual(input.AccountTypes) + ) && base.Equals(input) && + ( + this.Quotas == input.Quotas || + this.Quotas != null && + input.Quotas != null && + this.Quotas.SequenceEqual(input.Quotas) + ) && base.Equals(input) && + ( + this.Type == input.Type || + (this.Type != null && + this.Type.Equals(input.Type)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = base.GetHashCode(); + if (this.Slug != null) + hashCode = hashCode * 59 + this.Slug.GetHashCode(); + if (this.Name != null) + hashCode = hashCode * 59 + this.Name.GetHashCode(); + if (this.AccountTypes != null) + hashCode = hashCode * 59 + this.AccountTypes.GetHashCode(); + if (this.Quotas != null) + hashCode = hashCode * 59 + this.Quotas.GetHashCode(); + if (this.Type != null) + hashCode = hashCode * 59 + this.Type.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + foreach(var x in base.BaseValidate(validationContext)) yield return x; + + + // Type (string) pattern + Regex regexType = new Regex(@"^SubscriptionPlan$", RegexOptions.CultureInvariant); + if (false == regexType.Match(this.Type).Success) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Type, must match a pattern of " + regexType, new [] { "Type" }); + } + + yield break; + } + } +} diff --git a/src/PollinationSDK/Model/SubscriptionUpdate.cs b/src/PollinationSDK/Model/SubscriptionUpdate.cs new file mode 100644 index 000000000..26bf23d41 --- /dev/null +++ b/src/PollinationSDK/Model/SubscriptionUpdate.cs @@ -0,0 +1,263 @@ +/* + * pollination-server + * + * Pollination Server OpenAPI Definition + * + * Contact: info@pollination.cloud + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; + + +namespace PollinationSDK +{ + /// + /// SubscriptionUpdate + /// + [DataContract(Name = "SubscriptionUpdate")] + public partial class SubscriptionUpdate : OpenAPIGenBaseModel, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// The Pollination plan to subscribe to. + /// The items to add. + /// The items to update. + /// The items to delete. + /// A promotion code to apply a discount to the subscription. + public SubscriptionUpdate + ( + // Required parameters + Price toSubscribe= default, List toAdd= default, List toUpdate= default, List toDelete= default, string promotionCode= default // Optional parameters + ) : base()// BaseClass + { + this.ToSubscribe = toSubscribe; + this.ToAdd = toAdd; + this.ToUpdate = toUpdate; + this.ToDelete = toDelete; + this.PromotionCode = promotionCode; + + // Set non-required readonly properties with defaultValue + this.Type = "SubscriptionUpdate"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "SubscriptionUpdate"; + + /// + /// The Pollination plan to subscribe to + /// + /// The Pollination plan to subscribe to + [DataMember(Name = "to_subscribe", EmitDefaultValue = false)] + public Price ToSubscribe { get; set; } + /// + /// The items to add + /// + /// The items to add + [DataMember(Name = "to_add", EmitDefaultValue = false)] + public List ToAdd { get; set; } + /// + /// The items to update + /// + /// The items to update + [DataMember(Name = "to_update", EmitDefaultValue = false)] + public List ToUpdate { get; set; } + /// + /// The items to delete + /// + /// The items to delete + [DataMember(Name = "to_delete", EmitDefaultValue = false)] + public List ToDelete { get; set; } + /// + /// A promotion code to apply a discount to the subscription + /// + /// A promotion code to apply a discount to the subscription + [DataMember(Name = "promotion_code", EmitDefaultValue = false)] + public string PromotionCode { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + return "SubscriptionUpdate"; + } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString(bool detailed) + { + if (!detailed) + return this.ToString(); + + var sb = new StringBuilder(); + sb.Append("SubscriptionUpdate:\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" ToSubscribe: ").Append(ToSubscribe).Append("\n"); + sb.Append(" ToAdd: ").Append(ToAdd).Append("\n"); + sb.Append(" ToUpdate: ").Append(ToUpdate).Append("\n"); + sb.Append(" ToDelete: ").Append(ToDelete).Append("\n"); + sb.Append(" PromotionCode: ").Append(PromotionCode).Append("\n"); + return sb.ToString(); + } + + /// + /// Returns the object from JSON string + /// + /// SubscriptionUpdate object + public static SubscriptionUpdate FromJson(string json) + { + var obj = JsonConvert.DeserializeObject(json, JsonSetting.AnyOfConvertSetting); + if (obj == null) + return null; + return obj.Type.ToLower() == obj.GetType().Name.ToLower() ? obj : null; + } + + /// + /// Creates a new instance with the same properties. + /// + /// SubscriptionUpdate object + public virtual SubscriptionUpdate DuplicateSubscriptionUpdate() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateSubscriptionUpdate(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel DuplicateOpenAPIGenBaseModel() + { + return DuplicateSubscriptionUpdate(); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + input = input is AnyOf anyOf ? anyOf.Obj : input; + return this.Equals(input as SubscriptionUpdate); + } + + /// + /// Returns true if SubscriptionUpdate instances are equal + /// + /// Instance of SubscriptionUpdate to be compared + /// Boolean + public bool Equals(SubscriptionUpdate input) + { + if (input == null) + return false; + return base.Equals(input) && + ( + this.ToSubscribe == input.ToSubscribe || + (this.ToSubscribe != null && + this.ToSubscribe.Equals(input.ToSubscribe)) + ) && base.Equals(input) && + ( + this.ToAdd == input.ToAdd || + this.ToAdd != null && + input.ToAdd != null && + this.ToAdd.SequenceEqual(input.ToAdd) + ) && base.Equals(input) && + ( + this.ToUpdate == input.ToUpdate || + this.ToUpdate != null && + input.ToUpdate != null && + this.ToUpdate.SequenceEqual(input.ToUpdate) + ) && base.Equals(input) && + ( + this.ToDelete == input.ToDelete || + this.ToDelete != null && + input.ToDelete != null && + this.ToDelete.SequenceEqual(input.ToDelete) + ) && base.Equals(input) && + ( + this.PromotionCode == input.PromotionCode || + (this.PromotionCode != null && + this.PromotionCode.Equals(input.PromotionCode)) + ) && base.Equals(input) && + ( + this.Type == input.Type || + (this.Type != null && + this.Type.Equals(input.Type)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = base.GetHashCode(); + if (this.ToSubscribe != null) + hashCode = hashCode * 59 + this.ToSubscribe.GetHashCode(); + if (this.ToAdd != null) + hashCode = hashCode * 59 + this.ToAdd.GetHashCode(); + if (this.ToUpdate != null) + hashCode = hashCode * 59 + this.ToUpdate.GetHashCode(); + if (this.ToDelete != null) + hashCode = hashCode * 59 + this.ToDelete.GetHashCode(); + if (this.PromotionCode != null) + hashCode = hashCode * 59 + this.PromotionCode.GetHashCode(); + if (this.Type != null) + hashCode = hashCode * 59 + this.Type.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + foreach(var x in base.BaseValidate(validationContext)) yield return x; + + + // Type (string) pattern + Regex regexType = new Regex(@"^SubscriptionUpdate$", RegexOptions.CultureInvariant); + if (false == regexType.Match(this.Type).Success) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Type, must match a pattern of " + regexType, new [] { "Type" }); + } + + yield break; + } + } +} diff --git a/src/PollinationSDK/Model/TemplateFunction.cs b/src/PollinationSDK/Model/TemplateFunction.cs new file mode 100644 index 000000000..02fd97ab1 --- /dev/null +++ b/src/PollinationSDK/Model/TemplateFunction.cs @@ -0,0 +1,308 @@ +/* + * pollination-server + * + * Pollination Server OpenAPI Definition + * + * Contact: info@pollination.cloud + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; + + +namespace PollinationSDK +{ + /// + /// Function template. + /// + [DataContract(Name = "TemplateFunction")] + public partial class TemplateFunction : OpenAPIGenBaseModel, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected TemplateFunction() + { + // Set non-required readonly properties with defaultValue + this.Type = "TemplateFunction"; + } + + /// + /// Initializes a new instance of the class. + /// + /// Function name. Must be unique within a plugin. (required). + /// Full shell command for this function. Each function accepts only one command. The command will be executed as a shell command in plugin. For running several commands after each other use && between the commands or pipe data from one to another using | (required). + /// The plugin config to use for this function (required). + /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. + /// Input arguments for this function.. + /// List of output arguments.. + /// Function description. A short human readable description for this function.. + public TemplateFunction + ( + string name, string command, PluginConfig config, // Required parameters + Dictionary annotations= default, List> inputs= default, List> outputs= default, string description= default // Optional parameters + ) : base()// BaseClass + { + // to ensure "name" is required (not null) + this.Name = name ?? throw new ArgumentNullException("name is a required property for TemplateFunction and cannot be null"); + // to ensure "command" is required (not null) + this.Command = command ?? throw new ArgumentNullException("command is a required property for TemplateFunction and cannot be null"); + // to ensure "config" is required (not null) + this.Config = config ?? throw new ArgumentNullException("config is a required property for TemplateFunction and cannot be null"); + this.Annotations = annotations; + this.Inputs = inputs; + this.Outputs = outputs; + this.Description = description; + + // Set non-required readonly properties with defaultValue + this.Type = "TemplateFunction"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "TemplateFunction"; + + /// + /// Function name. Must be unique within a plugin. + /// + /// Function name. Must be unique within a plugin. + [DataMember(Name = "name", IsRequired = true, EmitDefaultValue = false)] + public string Name { get; set; } + /// + /// Full shell command for this function. Each function accepts only one command. The command will be executed as a shell command in plugin. For running several commands after each other use && between the commands or pipe data from one to another using | + /// + /// Full shell command for this function. Each function accepts only one command. The command will be executed as a shell command in plugin. For running several commands after each other use && between the commands or pipe data from one to another using | + [DataMember(Name = "command", IsRequired = true, EmitDefaultValue = false)] + public string Command { get; set; } + /// + /// The plugin config to use for this function + /// + /// The plugin config to use for this function + [DataMember(Name = "config", IsRequired = true, EmitDefaultValue = false)] + public PluginConfig Config { get; set; } + /// + /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries. + /// + /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries. + [DataMember(Name = "annotations", EmitDefaultValue = false)] + public Dictionary Annotations { get; set; } + /// + /// Input arguments for this function. + /// + /// Input arguments for this function. + [DataMember(Name = "inputs", EmitDefaultValue = false)] + public List> Inputs { get; set; } + /// + /// List of output arguments. + /// + /// List of output arguments. + [DataMember(Name = "outputs", EmitDefaultValue = false)] + public List> Outputs { get; set; } + /// + /// Function description. A short human readable description for this function. + /// + /// Function description. A short human readable description for this function. + [DataMember(Name = "description", EmitDefaultValue = false)] + public string Description { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + return "TemplateFunction"; + } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString(bool detailed) + { + if (!detailed) + return this.ToString(); + + var sb = new StringBuilder(); + sb.Append("TemplateFunction:\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Command: ").Append(Command).Append("\n"); + sb.Append(" Config: ").Append(Config).Append("\n"); + sb.Append(" Annotations: ").Append(Annotations).Append("\n"); + sb.Append(" Inputs: ").Append(Inputs).Append("\n"); + sb.Append(" Outputs: ").Append(Outputs).Append("\n"); + sb.Append(" Description: ").Append(Description).Append("\n"); + return sb.ToString(); + } + + /// + /// Returns the object from JSON string + /// + /// TemplateFunction object + public static TemplateFunction FromJson(string json) + { + var obj = JsonConvert.DeserializeObject(json, JsonSetting.AnyOfConvertSetting); + if (obj == null) + return null; + return obj.Type.ToLower() == obj.GetType().Name.ToLower() ? obj : null; + } + + /// + /// Creates a new instance with the same properties. + /// + /// TemplateFunction object + public virtual TemplateFunction DuplicateTemplateFunction() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateTemplateFunction(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel DuplicateOpenAPIGenBaseModel() + { + return DuplicateTemplateFunction(); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + input = input is AnyOf anyOf ? anyOf.Obj : input; + return this.Equals(input as TemplateFunction); + } + + /// + /// Returns true if TemplateFunction instances are equal + /// + /// Instance of TemplateFunction to be compared + /// Boolean + public bool Equals(TemplateFunction input) + { + if (input == null) + return false; + return base.Equals(input) && + ( + this.Name == input.Name || + (this.Name != null && + this.Name.Equals(input.Name)) + ) && base.Equals(input) && + ( + this.Command == input.Command || + (this.Command != null && + this.Command.Equals(input.Command)) + ) && base.Equals(input) && + ( + this.Config == input.Config || + (this.Config != null && + this.Config.Equals(input.Config)) + ) && base.Equals(input) && + ( + this.Annotations == input.Annotations || + this.Annotations != null && + input.Annotations != null && + this.Annotations.SequenceEqual(input.Annotations) + ) && base.Equals(input) && + ( + this.Inputs == input.Inputs || + this.Inputs != null && + input.Inputs != null && + this.Inputs.SequenceEqual(input.Inputs) + ) && base.Equals(input) && + ( + this.Outputs == input.Outputs || + this.Outputs != null && + input.Outputs != null && + this.Outputs.SequenceEqual(input.Outputs) + ) && base.Equals(input) && + ( + this.Description == input.Description || + (this.Description != null && + this.Description.Equals(input.Description)) + ) && base.Equals(input) && + ( + this.Type == input.Type || + (this.Type != null && + this.Type.Equals(input.Type)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = base.GetHashCode(); + if (this.Name != null) + hashCode = hashCode * 59 + this.Name.GetHashCode(); + if (this.Command != null) + hashCode = hashCode * 59 + this.Command.GetHashCode(); + if (this.Config != null) + hashCode = hashCode * 59 + this.Config.GetHashCode(); + if (this.Annotations != null) + hashCode = hashCode * 59 + this.Annotations.GetHashCode(); + if (this.Inputs != null) + hashCode = hashCode * 59 + this.Inputs.GetHashCode(); + if (this.Outputs != null) + hashCode = hashCode * 59 + this.Outputs.GetHashCode(); + if (this.Description != null) + hashCode = hashCode * 59 + this.Description.GetHashCode(); + if (this.Type != null) + hashCode = hashCode * 59 + this.Type.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + foreach(var x in base.BaseValidate(validationContext)) yield return x; + + + // Type (string) pattern + Regex regexType = new Regex(@"^TemplateFunction$", RegexOptions.CultureInvariant); + if (false == regexType.Match(this.Type).Success) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Type, must match a pattern of " + regexType, new [] { "Type" }); + } + + yield break; + } + } +} diff --git a/src/PollinationSDK/Model/UpdateInvoicePreview.cs b/src/PollinationSDK/Model/UpdateInvoicePreview.cs new file mode 100644 index 000000000..4ca5413fa --- /dev/null +++ b/src/PollinationSDK/Model/UpdateInvoicePreview.cs @@ -0,0 +1,257 @@ +/* + * pollination-server + * + * Pollination Server OpenAPI Definition + * + * Contact: info@pollination.cloud + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; + + +namespace PollinationSDK +{ + /// + /// UpdateInvoicePreview + /// + [DataContract(Name = "UpdateInvoicePreview")] + public partial class UpdateInvoicePreview : OpenAPIGenBaseModel, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected UpdateInvoicePreview() + { + // Set non-required readonly properties with defaultValue + this.Type = "UpdateInvoicePreview"; + } + + /// + /// Initializes a new instance of the class. + /// + /// The invoice that will be finalized right after changes are applied (required). + /// The invoice that will be finalized at the end of the current billing cycle (required). + /// The payment method that will be billed when this invoice is due.. + /// A list of quotas that would be exceeded by the update. + public UpdateInvoicePreview + ( + InvoicePreview immediate, InvoicePreview upcoming, // Required parameters + CardPublic paymentMethod= default, List exceededQuotas= default // Optional parameters + ) : base()// BaseClass + { + // to ensure "immediate" is required (not null) + this.Immediate = immediate ?? throw new ArgumentNullException("immediate is a required property for UpdateInvoicePreview and cannot be null"); + // to ensure "upcoming" is required (not null) + this.Upcoming = upcoming ?? throw new ArgumentNullException("upcoming is a required property for UpdateInvoicePreview and cannot be null"); + this.PaymentMethod = paymentMethod; + this.ExceededQuotas = exceededQuotas; + + // Set non-required readonly properties with defaultValue + this.Type = "UpdateInvoicePreview"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "UpdateInvoicePreview"; + + /// + /// The invoice that will be finalized right after changes are applied + /// + /// The invoice that will be finalized right after changes are applied + [DataMember(Name = "immediate", IsRequired = true, EmitDefaultValue = false)] + public InvoicePreview Immediate { get; set; } + /// + /// The invoice that will be finalized at the end of the current billing cycle + /// + /// The invoice that will be finalized at the end of the current billing cycle + [DataMember(Name = "upcoming", IsRequired = true, EmitDefaultValue = false)] + public InvoicePreview Upcoming { get; set; } + /// + /// The payment method that will be billed when this invoice is due. + /// + /// The payment method that will be billed when this invoice is due. + [DataMember(Name = "payment_method", EmitDefaultValue = false)] + public CardPublic PaymentMethod { get; set; } + /// + /// A list of quotas that would be exceeded by the update + /// + /// A list of quotas that would be exceeded by the update + [DataMember(Name = "exceeded_quotas", EmitDefaultValue = false)] + public List ExceededQuotas { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + return "UpdateInvoicePreview"; + } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString(bool detailed) + { + if (!detailed) + return this.ToString(); + + var sb = new StringBuilder(); + sb.Append("UpdateInvoicePreview:\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Immediate: ").Append(Immediate).Append("\n"); + sb.Append(" Upcoming: ").Append(Upcoming).Append("\n"); + sb.Append(" PaymentMethod: ").Append(PaymentMethod).Append("\n"); + sb.Append(" ExceededQuotas: ").Append(ExceededQuotas).Append("\n"); + return sb.ToString(); + } + + /// + /// Returns the object from JSON string + /// + /// UpdateInvoicePreview object + public static UpdateInvoicePreview FromJson(string json) + { + var obj = JsonConvert.DeserializeObject(json, JsonSetting.AnyOfConvertSetting); + if (obj == null) + return null; + return obj.Type.ToLower() == obj.GetType().Name.ToLower() ? obj : null; + } + + /// + /// Creates a new instance with the same properties. + /// + /// UpdateInvoicePreview object + public virtual UpdateInvoicePreview DuplicateUpdateInvoicePreview() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateUpdateInvoicePreview(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel DuplicateOpenAPIGenBaseModel() + { + return DuplicateUpdateInvoicePreview(); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + input = input is AnyOf anyOf ? anyOf.Obj : input; + return this.Equals(input as UpdateInvoicePreview); + } + + /// + /// Returns true if UpdateInvoicePreview instances are equal + /// + /// Instance of UpdateInvoicePreview to be compared + /// Boolean + public bool Equals(UpdateInvoicePreview input) + { + if (input == null) + return false; + return base.Equals(input) && + ( + this.Immediate == input.Immediate || + (this.Immediate != null && + this.Immediate.Equals(input.Immediate)) + ) && base.Equals(input) && + ( + this.Upcoming == input.Upcoming || + (this.Upcoming != null && + this.Upcoming.Equals(input.Upcoming)) + ) && base.Equals(input) && + ( + this.PaymentMethod == input.PaymentMethod || + (this.PaymentMethod != null && + this.PaymentMethod.Equals(input.PaymentMethod)) + ) && base.Equals(input) && + ( + this.ExceededQuotas == input.ExceededQuotas || + this.ExceededQuotas != null && + input.ExceededQuotas != null && + this.ExceededQuotas.SequenceEqual(input.ExceededQuotas) + ) && base.Equals(input) && + ( + this.Type == input.Type || + (this.Type != null && + this.Type.Equals(input.Type)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = base.GetHashCode(); + if (this.Immediate != null) + hashCode = hashCode * 59 + this.Immediate.GetHashCode(); + if (this.Upcoming != null) + hashCode = hashCode * 59 + this.Upcoming.GetHashCode(); + if (this.PaymentMethod != null) + hashCode = hashCode * 59 + this.PaymentMethod.GetHashCode(); + if (this.ExceededQuotas != null) + hashCode = hashCode * 59 + this.ExceededQuotas.GetHashCode(); + if (this.Type != null) + hashCode = hashCode * 59 + this.Type.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + foreach(var x in base.BaseValidate(validationContext)) yield return x; + + + // Type (string) pattern + Regex regexType = new Regex(@"^UpdateInvoicePreview$", RegexOptions.CultureInvariant); + if (false == regexType.Match(this.Type).Success) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Type, must match a pattern of " + regexType, new [] { "Type" }); + } + + yield break; + } + } +} diff --git a/src/PollinationSDK/Model/ValidationError.cs b/src/PollinationSDK/Model/ValidationError.cs new file mode 100644 index 000000000..0edd52a45 --- /dev/null +++ b/src/PollinationSDK/Model/ValidationError.cs @@ -0,0 +1,203 @@ +/* + * pollination-server + * + * Pollination Server OpenAPI Definition + * + * Contact: info@pollination.cloud + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; + + +namespace PollinationSDK +{ + /// + /// ValidationError + /// + [DataContract(Name = "ValidationError")] + public partial class ValidationError : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected ValidationError() + { + // Set non-required readonly properties with defaultValue + } + + /// + /// Initializes a new instance of the class. + /// + /// loc (required). + /// msg (required). + public ValidationError + ( + List loc, string msg// Required parameters + // Optional parameters + )// BaseClass + { + // to ensure "loc" is required (not null) + this.Loc = loc ?? throw new ArgumentNullException("loc is a required property for ValidationError and cannot be null"); + // to ensure "msg" is required (not null) + this.Msg = msg ?? throw new ArgumentNullException("msg is a required property for ValidationError and cannot be null"); + + // Set non-required readonly properties with defaultValue + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", IsRequired = true, EmitDefaultValue = false)] + public string Type { get; protected internal set; } + + /// + /// Gets or Sets Loc + /// + [DataMember(Name = "loc", IsRequired = true, EmitDefaultValue = false)] + public List Loc { get; set; } + /// + /// Gets or Sets Msg + /// + [DataMember(Name = "msg", IsRequired = true, EmitDefaultValue = false)] + public string Msg { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + return "ValidationError"; + } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString(bool detailed) + { + if (!detailed) + return this.ToString(); + + var sb = new StringBuilder(); + sb.Append("ValidationError:\n"); + sb.Append(" Loc: ").Append(Loc).Append("\n"); + sb.Append(" Msg: ").Append(Msg).Append("\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + return sb.ToString(); + } + + /// + /// Returns the object from JSON string + /// + /// ValidationError object + public static ValidationError FromJson(string json) + { + var obj = JsonConvert.DeserializeObject(json, JsonSetting.AnyOfConvertSetting); + if (obj == null) + return null; + return obj.Type.ToLower() == obj.GetType().Name.ToLower() ? obj : null; + } + + /// + /// Creates a new instance with the same properties. + /// + /// ValidationError object + public virtual ValidationError DuplicateValidationError() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateValidationError(); + } + + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + input = input is AnyOf anyOf ? anyOf.Obj : input; + return this.Equals(input as ValidationError); + } + + /// + /// Returns true if ValidationError instances are equal + /// + /// Instance of ValidationError to be compared + /// Boolean + public bool Equals(ValidationError input) + { + if (input == null) + return false; + return + ( + this.Loc == input.Loc || + this.Loc != null && + input.Loc != null && + this.Loc.SequenceEqual(input.Loc) + ) && + ( + this.Msg == input.Msg || + (this.Msg != null && + this.Msg.Equals(input.Msg)) + ) && + ( + this.Type == input.Type || + (this.Type != null && + this.Type.Equals(input.Type)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Loc != null) + hashCode = hashCode * 59 + this.Loc.GetHashCode(); + if (this.Msg != null) + hashCode = hashCode * 59 + this.Msg.GetHashCode(); + if (this.Type != null) + hashCode = hashCode * 59 + this.Type.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } +} diff --git a/src/PollinationSDK/PollinationSDK.csproj b/src/PollinationSDK/PollinationSDK.csproj index dd5cb4f64..8fde16c3b 100644 --- a/src/PollinationSDK/PollinationSDK.csproj +++ b/src/PollinationSDK/PollinationSDK.csproj @@ -3,14 +3,14 @@ netstandard2.0;net452 true - 0.0.68.0-dev + 0.23.0.0 Ladybug Tools This is the .Net version of PollinationSDK Copyright © 2020 Ladybug Tools LLC MIT https://github.com/pollination/csharp-sdk - 0.0.0.0 - 0.0.0.0 + 0.23.0.0 + 0.23.0.0 https://github.com/pollination/csharp-sdk true