From a521ba3e42f71843001930db3a6dbc676dce8295 Mon Sep 17 00:00:00 2001 From: Antoine Dao Date: Thu, 6 Jan 2022 17:31:27 +0000 Subject: [PATCH 1/7] docs(openapi): update docs --- .openapi-docs/openapi_inheritance.json | 20985 ++++++++++++++--------- .openapi-docs/openapi_mapper.json | 75 +- 2 files changed, 12765 insertions(+), 8295 deletions(-) diff --git a/.openapi-docs/openapi_inheritance.json b/.openapi-docs/openapi_inheritance.json index 7b6a89b13..fc60824c3 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.22.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,89 @@ "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": [ { - "required": true, - "schema": { - "title": "Run id.", - "type": "string" - }, - "name": "run_id", - "in": "path" + "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 +6842,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 +6952,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 +6972,6 @@ } } }, - "deprecated": true, "security": [ { "JWTAuth": [] @@ -6972,75 +6982,135 @@ ] } }, - "/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": [ + { + "JWTAuth": [] }, + { + "APIKeyAuth": [] + } + ] + } + }, + "/payments/{account_name}/status": { + "get": { + "tags": [ + "Payments" + ], + "summary": "Get Status", + "operationId": "get_status", + "parameters": [ { "required": true, "schema": { - "title": "Project Name", + "title": "Account Name", "type": "string" }, - "name": "name", + "name": "account_name", "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Status" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "JWTAuth": [] }, + { + "APIKeyAuth": [] + } + ] + } + }, + "/subscriptions/{account_name}": { + "get": { + "tags": [ + "Subscriptions" + ], + "summary": "Get Subscription", + "operationId": "get_pollination_subscription", + "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/PollinationSubscription" + } } } }, - "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,92 +7131,3577 @@ } ] } - } - }, - "components": { + }, + "/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": { + "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" + }, + "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" + } + }, + "Status": { + "allOf": [ + { + "$ref": "#/components/schemas/_OpenAPIGenBaseModel" + }, + { + "type": "object", + "properties": { + "frozen": { + "title": "Frozen", + "description": "Whether account actions are currently blocked by a payment failure", + "default": false, + "type": "boolean" + }, + "type": { + "title": "Type", + "default": "Status", + "type": "string", + "pattern": "^Status$", + "readOnly": true + } + } + } + ], + "title": "Status", + "discriminator": { + "propertyName": "type" + } + }, + "CouponDuration": { + "title": "CouponDuration", + "description": "An enumeration.", + "enum": [ + "forever", + "once", + "repeating" + ], + "type": "string" + }, + "Coupon": { + "allOf": [ + { + "$ref": "#/components/schemas/ExternalResource" + }, + { + "type": "object", + "required": [ + "name", + "valid", + "duration" + ], + "properties": { + "name": { + "title": "Name", + "type": "string" + }, + "valid": { + "title": "Valid", + "type": "boolean" + }, + "duration": { + "$ref": "#/components/schemas/CouponDuration" + }, + "amount_off": { + "title": "Amount Off", + "type": "number", + "format": "double" + }, + "percent_off": { + "title": "Percent Off", + "type": "number", + "format": "double" + }, + "duration_in_months": { + "title": "Duration In Months", + "type": "integer", + "format": "int32" + }, + "type": { + "title": "Type", + "default": "Coupon", + "type": "string", + "pattern": "^Coupon$", + "readOnly": true + } + } + } + ], + "title": "Coupon", + "discriminator": { + "propertyName": "type" + } + }, + "Discount": { + "allOf": [ + { + "$ref": "#/components/schemas/ExternalResource" + }, + { + "type": "object", + "required": [ + "start", + "coupon" + ], + "properties": { + "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": "Discount", + "type": "string", + "pattern": "^Discount$", + "readOnly": true + } + } + } + ], + "title": "Discount", + "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" + } + }, + "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" + } + }, + "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" + } + }, + "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" + } + }, + "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": { + "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" + } + }, + "StepBooleanInput": { + "allOf": [ + { + "$ref": "#/components/schemas/GenericInput" + }, + { + "type": "object", + "required": [ + "value" + ], + "properties": { + "value": { + "title": "Value", + "type": "boolean" + }, + "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": "StepBooleanInput", + "pattern": "^StepBooleanInput$", + "type": "string", + "readOnly": true + } + } + } + ], + "title": "StepBooleanInput", + "description": "The boolean type matches only two special values: True and False.", + "discriminator": { + "propertyName": "type" + } + }, + "TaskPathReturn": { + "allOf": [ + { + "$ref": "#/components/schemas/PathOutput" + }, + { + "type": "object", + "properties": { + "type": { + "title": "Type", + "default": "TaskPathReturn", + "pattern": "^TaskPathReturn$", + "type": "string", + "readOnly": true + } + } + } + ], + "title": "TaskPathReturn", + "description": "A Task output that returns a file or a folder output from a function or a DAG.", + "discriminator": { + "propertyName": "type" + } + }, + "Team": { + "allOf": [ + { + "$ref": "#/components/schemas/TeamUpdate" + }, + { + "type": "object", + "required": [ + "id", + "slug" + ], + "properties": { + "id": { + "title": "Id", + "description": "The team ID", + "example": "142ee933-6110-4186-92ab-92df359aa108", + "type": "string" + }, + "slug": { + "title": "Slug", + "description": "The public slug of the team", + "example": "ladybug-tools/honeybee-contributors", + "type": "string" + }, + "member_count": { + "title": "Member Count", + "description": "The number of members that are part of this team", + "default": 0, + "example": 5, + "type": "integer", + "format": "int32" + }, + "type": { + "title": "Type", + "default": "Team", + "type": "string", + "pattern": "^Team$", + "readOnly": true + } + } + } + ], + "title": "Team", + "discriminator": { + "propertyName": "type" + } + }, + "RunProgress": { + "allOf": [ + { + "$ref": "#/components/schemas/_OpenAPIGenBaseModel" + }, + { + "type": "object", + "properties": { + "completed": { + "title": "Completed", + "default": 0, + "type": "integer", + "format": "int32" + }, + "running": { + "title": "Running", + "default": 0, + "type": "integer", + "format": "int32" + }, + "total": { + "title": "Total", + "default": 0, + "type": "integer", + "format": "int32" + }, + "type": { + "title": "Type", + "default": "RunProgress", + "type": "string", + "pattern": "^RunProgress$", + "readOnly": true + } + } + } + ], + "title": "RunProgress", + "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" + } + }, + "PriceType": { + "title": "PriceType", + "description": "An enumeration.", + "enum": [ + "recurring", + "one_time" + ], + "type": "string" + }, + "PriceRecurrence": { + "allOf": [ + { + "$ref": "#/components/schemas/_OpenAPIGenBaseModel" + }, + { + "type": "object", + "properties": { + "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": "PriceRecurrence", + "type": "string", + "pattern": "^PriceRecurrence$", + "readOnly": true + } + }, + "required": [ + "interval", + "interval_count", + "usage_type" + ] + } + ], + "title": "PriceRecurrence", + "discriminator": { + "propertyName": "type" + } + }, + "PriceTier": { + "allOf": [ + { + "$ref": "#/components/schemas/_OpenAPIGenBaseModel" + }, + { + "type": "object", + "properties": { + "unit_amount": { + "title": "Unit Amount", + "type": "integer", + "format": "int32" + }, + "unit_amount_decimal": { + "title": "Unit Amount Decimal", + "type": "string" + }, + "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": "PriceTier", + "type": "string", + "pattern": "^PriceTier$", + "readOnly": true + } + }, + "required": [ + "unit_amount", + "unit_amount_decimal" + ] + } + ], + "title": "PriceTier", + "discriminator": { + "propertyName": "type" + } + }, + "Price": { + "allOf": [ + { + "$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": { + "$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": "Price", + "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" + } + }, + "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": "^InvoiceStatusTransitions$", + "readOnly": true + } + } + } + ], + "title": "InvoiceStatusTransitions", + "discriminator": { + "propertyName": "type" + } + }, + "DiscountAmount": { + "allOf": [ + { + "$ref": "#/components/schemas/_OpenAPIGenBaseModel" + }, + { + "type": "object", + "properties": { + "discount": { + "title": "Discount", + "type": "string" + }, + "amount": { + "title": "Amount", + "type": "integer", + "format": "int32" + }, + "type": { + "title": "Type", + "default": "DiscountAmount", + "type": "string", + "pattern": "^DiscountAmount$", + "readOnly": true + } + }, + "required": [ + "discount", + "amount" + ] + } + ], + "title": "DiscountAmount", + "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" + } + }, + "InvoicePreview": { + "allOf": [ + { + "$ref": "#/components/schemas/_OpenAPIGenBaseModel" + }, + { + "type": "object", + "required": [ + "collection_method", + "currency", + "customer", + "lines", + "period_start", + "period_end", + "status", + "status_transitions", + "subtotal", + "total" + ], + "properties": { + "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", + "type": "string" + }, + "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": "InvoicePreview", + "type": "string", + "pattern": "^InvoicePreview$", + "readOnly": true + } + } + } + ], + "title": "InvoicePreview", + "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" + } + }, + "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/_InputReferenceBase" + "$ref": "#/components/schemas/_OpenAPIGenBaseModel" }, { "type": "object", "properties": { "type": { "title": "Type", - "default": "InputReference", - "pattern": "^InputReference$", + "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": "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": "LocalConfig", + "description": "Plugin Configuration to run on a desktop.", "discriminator": { "propertyName": "type" } }, - "TaskReference": { + "PluginConfig": { "allOf": [ { - "$ref": "#/components/schemas/_TaskReferenceBase" + "$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": "TaskReference", - "pattern": "^TaskReference$", + "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": "TaskReference", - "description": "A Task reference for parameters other than files or folders.", + "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" } }, - "ValueListReference": { + "UserPublic": { "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": "array", - "items": {} + "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", + "type": "string" }, "type": { "title": "Type", - "default": "ValueListReference", - "pattern": "^ValueListReference$", + "default": "UserPublic", "type": "string", + "pattern": "^UserPublic$", "readOnly": true } - } + }, + "required": [ + "username" + ] } ], - "title": "ValueListReference", - "description": "A reference to a fixed value.", + "title": "UserPublic", "discriminator": { "propertyName": "type" } }, - "DAGTaskLoop": { + "UserUpdate": { "allOf": [ { "$ref": "#/components/schemas/_OpenAPIGenBaseModel" @@ -7155,46 +10709,91 @@ { "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": "DAGTaskLoop", - "pattern": "^DAGTaskLoop$", + "default": "UserUpdate", "type": "string", + "pattern": "^UserUpdate$", "readOnly": true + } + }, + "required": [ + "name", + "picture_url" + ] + } + ], + "title": "UserUpdate", + "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" } }, - "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" - } - ] + "type": { + "title": "Type", + "default": "APIToken", + "type": "string", + "pattern": "^APIToken$", + "readOnly": true } - } + }, + "required": [ + "token_id", + "name" + ] } ], - "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": "APIToken", "discriminator": { "propertyName": "type" } }, - "IOAliasHandler": { + "Maintainer": { "allOf": [ { "$ref": "#/components/schemas/_OpenAPIGenBaseModel" @@ -7202,26 +10801,15 @@ { "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.", + "name": { + "title": "Name", + "description": "The name of the author/maintainer person or organization.", "type": "string" }, "type": { "title": "Type", - "default": "IOAliasHandler", - "pattern": "^IOAliasHandler$", + "default": "Maintainer", + "pattern": "^Maintainer$", "type": "string", "readOnly": true }, @@ -7233,266 +10821,230 @@ "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" + "email": { + "title": "Email", + "description": "The email address of the author/maintainer person or organization.", + "type": "string" } }, "required": [ - "language", - "module", - "function" + "name" ] } ], - "title": "IOAliasHandler", - "description": "Input and output alias handler object.", + "title": "Maintainer", + "description": "Maintainer information", "discriminator": { "propertyName": "type" } }, - "DAGGenericInputAlias": { + "License": { "allOf": [ { - "$ref": "#/components/schemas/GenericInput" + "$ref": "#/components/schemas/_OpenAPIGenBaseModel" }, { "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.", + "name": { + "title": "Name", + "description": "The license name used for the package.", "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$", + "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": "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.", + "title": "License", + "description": "License information for the Package", "discriminator": { "propertyName": "type" } }, - "DAGStringInputAlias": { + "MetaData": { "allOf": [ { - "$ref": "#/components/schemas/DAGGenericInputAlias" + "$ref": "#/components/schemas/_OpenAPIGenBaseModel" }, { "type": "object", "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" + }, "type": { "title": "Type", - "default": "DAGStringInputAlias", - "pattern": "^DAGStringInputAlias$", + "default": "MetaData", + "pattern": "^MetaData$", "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": { + }, + "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" } }, - "handler": { - "title": "Handler", - "description": "List of process actions to process the input or output value.", + "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": { - "$ref": "#/components/schemas/IOAliasHandler" + "type": "string" } }, - "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.", + "maintainers": { + "title": "Maintainers", + "description": "A list of maintainers for the package", "type": "array", "items": { - "type": "string" + "$ref": "#/components/schemas/Maintainer" } }, - "handler": { - "title": "Handler", - "description": "List of process actions to process the input or output value.", + "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": { - "$ref": "#/components/schemas/IOAliasHandler" + "type": "string" } }, - "default": { - "title": "Default", - "description": "Default value to use for an input if a value was not supplied.", - "type": "number", - "format": "double" + "icon": { + "title": "Icon", + "description": "A URL to an SVG or PNG image to be used as an icon", + "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, + "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" }, - "type": { - "title": "Type", - "default": "DAGNumberInputAlias", - "pattern": "^DAGNumberInputAlias$", - "type": "string", - "readOnly": true + "license": { + "title": "License", + "description": "The license information.", + "allOf": [ + { + "$ref": "#/components/schemas/License" + } + ] } - } + }, + "required": [ + "name", + "tag" + ] } ], - "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": "MetaData", + "description": "Package metadata information.", "discriminator": { "propertyName": "type" } }, - "DAGBooleanInputAlias": { + "DAGGenericInput": { "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" - } + "default": { + "title": "Default", + "description": "Default value for generic input.", + "type": "string" }, - "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 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.", @@ -7506,172 +11058,99 @@ }, "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" - } - }, - "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$", + "default": "DAGGenericInput", + "pattern": "^DAGGenericInput$", "type": "string", "readOnly": true } } } ], - "title": "S3", - "description": "S3 Source\n\nAn S3 bucket artifact Source.", + "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" } }, - "ProjectFolder": { + "DAGStringInput": { "allOf": [ { - "$ref": "#/components/schemas/_ArtifactSource" + "$ref": "#/components/schemas/DAGGenericInput" }, { "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$", + "default": "DAGStringInput", + "pattern": "^DAGStringInput$", "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": "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" } }, - "DAGFolderInputAlias": { + "DAGIntegerInput": { "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" - } + "default": { + "title": "Default", + "description": "Default value to use for an input if a value was not supplied.", + "type": "integer", + "format": "int32" }, - "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" - } - }, - "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" - } - ] + "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", @@ -7686,63 +11165,76 @@ }, "type": { "title": "Type", - "default": "DAGFolderInputAlias", - "pattern": "^DAGFolderInputAlias$", + "default": "DAGIntegerInput", + "pattern": "^DAGIntegerInput$", "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": "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" } }, - "DAGFileInputAlias": { + "DAGNumberInput": { "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" - } + "default": { + "title": "Default", + "description": "Default value to use for an input if a value was not supplied.", + "type": "number", + "format": "double" }, - "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": "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.", @@ -7754,73 +11246,77 @@ "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": "DAGNumberInput", + "pattern": "^DAGNumberInput$", "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": "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" } }, - "DAGPathInputAlias": { + "DAGBooleanInput": { "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" - } + "default": { + "title": "Default", + "description": "Default value to use for an input if a value was not supplied.", + "type": "boolean" }, - "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": "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.", @@ -7832,78 +11328,87 @@ "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": "DAGBooleanInput", + "pattern": "^DAGBooleanInput$", "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": "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" } }, - "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": { + "DAGFolderInput": { "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" - } + "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 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.", @@ -7915,64 +11420,87 @@ "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$", + "default": "DAGFolderInput", + "pattern": "^DAGFolderInput$", "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": "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" } }, - "DAGJSONObjectInputAlias": { + "DAGFileInput": { "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" - } + "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 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.", @@ -7984,47 +11512,31 @@ "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": "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$", + "default": "DAGFileInput", + "pattern": "^DAGFileInput$", "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.", + "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" } }, - "DAGBooleanInput": { + "DAGPathInput": { "allOf": [ { "$ref": "#/components/schemas/GenericInput" @@ -8034,8 +11546,18 @@ "properties": { "default": { "title": "Default", - "description": "Default value to use for an input if a value was not supplied.", - "type": "boolean" + "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", @@ -8090,68 +11612,123 @@ "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": "DAGBooleanInput", - "pattern": "^DAGBooleanInput$", + "default": "DAGPathInput", + "pattern": "^DAGPathInput$", "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.", + "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" } }, - "JobArgument": { + "DAGArrayInput": { "allOf": [ { - "$ref": "#/components/schemas/_OpenAPIGenBaseModel" + "$ref": "#/components/schemas/GenericInput" }, { "type": "object", "properties": { - "name": { - "title": "Name", - "description": "Argument name. The name must match one of the input names from Job's DAG template.", - "type": "string" + "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" }, - "value": { - "title": "Value", - "description": "The value of the job argument." + "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": "JobArgument", - "pattern": "^JobArgument$", + "default": "DAGArrayInput", + "pattern": "^DAGArrayInput$", "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": "JobArgument", - "description": "Job argument is an argument input for arguments which are not files or folders.", + "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" } }, - "DAGNumberInput": { + "DAGJSONObjectInput": { "allOf": [ { "$ref": "#/components/schemas/GenericInput" @@ -8162,8 +11739,7 @@ "default": { "title": "Default", "description": "Default value to use for an input if a value was not supplied.", - "type": "number", - "format": "double" + "type": "object" }, "alias": { "title": "Alias", @@ -8220,192 +11796,238 @@ }, "type": { "title": "Type", - "default": "DAGNumberInput", - "pattern": "^DAGNumberInput$", + "default": "DAGJSONObjectInput", + "pattern": "^DAGJSONObjectInput$", "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.", + "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" } }, - "JobPathArgument": { + "DAGGenericOutputAlias": { "allOf": [ { - "$ref": "#/components/schemas/_OpenAPIGenBaseModel" + "$ref": "#/components/schemas/GenericOutput" }, { "type": "object", + "required": [ + "platform", + "handler" + ], "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.", - "type": "string" + "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.", + "type": "array", + "items": { + "$ref": "#/components/schemas/IOAliasHandler" + } }, "type": { "title": "Type", - "default": "JobPathArgument", - "pattern": "^JobPathArgument$", + "default": "DAGGenericOutputAlias", + "pattern": "^DAGGenericOutputAlias$", "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": "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" } }, - "Job": { + "TaskReference": { "allOf": [ { - "$ref": "#/components/schemas/_OpenAPIGenBaseModel" + "$ref": "#/components/schemas/_TaskReferenceBase" }, { "type": "object", "properties": { - "source": { - "title": "Source", - "description": "The source url for downloading the recipe.", - "type": "string" - }, "type": { "title": "Type", - "default": "Job", - "pattern": "^Job$", + "default": "TaskReference", + "pattern": "^TaskReference$", "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$", + } + } + } + ], + "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" }, - "arguments": { - "title": "Arguments", - "description": "Input arguments for this job.", - "type": "array", - "items": { - "type": "array", - "items": { - "anyOf": [ - { - "$ref": "#/components/schemas/JobArgument" - }, - { - "$ref": "#/components/schemas/JobPathArgument" - } - ] + "type": { + "title": "Type", + "default": "FileReference", + "pattern": "^FileReference$", + "type": "string", + "readOnly": true + } + } + } + ], + "title": "FileReference", + "description": "Reference to a file.", + "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" } - } - }, - "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" + "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" + } + ] }, - "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" - } + "type": { + "title": "Type", + "default": "DAGIntegerOutputAlias", + "pattern": "^DAGIntegerOutputAlias$", + "type": "string", + "readOnly": true } - }, - "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": "DAGIntegerOutputAlias", + "description": "DAG alias integer output.\n\nThis output loads the content from a file as an integer.", "discriminator": { "propertyName": "type" } }, - "FileReference": { + "DAGNumberOutputAlias": { "allOf": [ { - "$ref": "#/components/schemas/_BaseReference" + "$ref": "#/components/schemas/_DAGArtifactOutputAlias" }, { "type": "object", "required": [ - "path" + "from" ], "properties": { - "path": { - "title": "Path", - "description": "Relative path to a file.", - "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" + } + ] }, "type": { "title": "Type", - "default": "FileReference", - "pattern": "^FileReference$", + "default": "DAGNumberOutputAlias", + "pattern": "^DAGNumberOutputAlias$", "type": "string", "readOnly": true } } } ], - "title": "FileReference", - "description": "Reference to a file.", + "title": "DAGNumberOutputAlias", + "description": "DAG alias number output.\n\nThis output loads the content from a file as a floating number.", "discriminator": { "propertyName": "type" } }, - "DAGIntegerOutputAlias": { + "DAGBooleanOutputAlias": { "allOf": [ { "$ref": "#/components/schemas/_DAGArtifactOutputAlias" @@ -8430,1470 +12052,1549 @@ }, "type": { "title": "Type", - "default": "DAGIntegerOutputAlias", - "pattern": "^DAGIntegerOutputAlias$", + "default": "DAGBooleanOutputAlias", + "pattern": "^DAGBooleanOutputAlias$", "type": "string", "readOnly": true } } } ], - "title": "DAGIntegerOutputAlias", - "description": "DAG alias integer output.\n\nThis output loads the content from a file as an integer.", + "title": "DAGBooleanOutputAlias", + "description": "DAG alias boolean output.\n\nThis output loads the content from a file as a boolean.", "discriminator": { "propertyName": "type" } }, - "UserPermission": { + "FolderReference": { "allOf": [ { - "$ref": "#/components/schemas/_OpenAPIGenBaseModel" + "$ref": "#/components/schemas/_BaseReference" }, { "type": "object", + "required": [ + "path" + ], "properties": { - "admin": { - "title": "Admin", - "description": "The user has admin permission to this resource", - "default": false, - "example": false, - "type": "boolean" - }, - "write": { - "title": "Write", - "description": "The user has write permission on this resource", - "default": false, - "example": false, - "type": "boolean" - }, - "read": { - "title": "Read", - "description": "The user has read permission on this resource", - "default": false, - "example": true, - "type": "boolean" + "path": { + "title": "Path", + "description": "Relative path to a folder.", + "type": "string" }, "type": { "title": "Type", - "default": "UserPermission", + "default": "FolderReference", + "pattern": "^FolderReference$", "type": "string", - "pattern": "^UserPermission$", "readOnly": true } } } ], - "title": "UserPermission", + "title": "FolderReference", + "description": "Reference to a folder.", "discriminator": { "propertyName": "type" } }, - "FunctionStringOutput": { + "DAGFolderOutputAlias": { "allOf": [ { - "$ref": "#/components/schemas/FunctionFileOutput" + "$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": "FunctionStringOutput", - "pattern": "^FunctionStringOutput$", + "default": "DAGFolderOutputAlias", + "pattern": "^DAGFolderOutputAlias$", "type": "string", "readOnly": true } } } ], - "title": "FunctionStringOutput", - "description": "Function string output.\n\nThis output loads the content from a file as a string.", + "title": "DAGFolderOutputAlias", + "description": "DAG alias folder output.", "discriminator": { "propertyName": "type" } }, - "DAGLinkedOutputAlias": { + "DAGFileOutputAlias": { "allOf": [ { - "$ref": "#/components/schemas/DAGGenericOutputAlias" + "$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": "DAGLinkedOutputAlias", - "pattern": "^DAGLinkedOutputAlias$", + "default": "DAGFileOutputAlias", + "pattern": "^DAGFileOutputAlias$", "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.", + "title": "DAGFileOutputAlias", + "description": "DAG alias file output.", "discriminator": { "propertyName": "type" } }, - "DailyUsage": { + "DAGPathOutputAlias": { "allOf": [ { - "$ref": "#/components/schemas/_OpenAPIGenBaseModel" + "$ref": "#/components/schemas/_DAGArtifactOutputAlias" }, { "type": "object", + "required": [ + "from" + ], "properties": { - "date": { - "title": "Date", - "description": "The day this usage was aggregated for", - "type": "string", - "format": "date-time" - }, - "cpu": { - "title": "Cpu", - "description": "cpu usage", - "default": 0, - "type": "number", - "format": "double" - }, - "memory": { - "title": "Memory", - "description": "memory usage", - "default": 0, - "type": "number", - "format": "double" + "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" + } + ] }, - "succeeded": { - "title": "Succeeded", - "description": "succeeded usage", - "default": 0, - "type": "integer", - "format": "int32" + "type": { + "title": "Type", + "default": "DAGPathOutputAlias", + "pattern": "^DAGPathOutputAlias$", + "type": "string", + "readOnly": true + } + } + } + ], + "title": "DAGPathOutputAlias", + "description": "DAG alias path output.", + "discriminator": { + "propertyName": "type" + } + }, + "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" + } + ] }, - "failed": { - "title": "Failed", - "description": "failed usage", - "default": 0, - "type": "integer", - "format": "int32" + "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": "DailyUsage", + "default": "DAGArrayOutputAlias", + "pattern": "^DAGArrayOutputAlias$", "type": "string", - "pattern": "^DailyUsage$", "readOnly": true } - }, - "required": [ - "date" - ] + } } ], - "title": "DailyUsage", + "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" } }, - "StepStringInput": { + "DAGJSONObjectOutputAlias": { "allOf": [ { - "$ref": "#/components/schemas/FunctionStringInput" + "$ref": "#/components/schemas/_DAGArtifactOutputAlias" }, { "type": "object", "required": [ - "value" + "from" ], "properties": { - "value": { - "title": "Value", - "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" + } + ] }, "type": { "title": "Type", - "default": "StepStringInput", - "pattern": "^StepStringInput$", + "default": "DAGJSONObjectOutputAlias", + "pattern": "^DAGJSONObjectOutputAlias$", "type": "string", "readOnly": true } } } ], - "title": "StepStringInput", - "description": "A String input.", + "title": "DAGJSONObjectOutputAlias", + "description": "DAG alias object output.\n\nThis output loads the content from a file as a JSON object.", "discriminator": { "propertyName": "type" } }, - "StepIntegerInput": { + "DAGLinkedOutputAlias": { "allOf": [ { - "$ref": "#/components/schemas/GenericInput" + "$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" + } + }, + "DAGGenericOutput": { + "allOf": [ + { + "$ref": "#/components/schemas/FromOutput" }, { "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.", + "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, - "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": "StepIntegerInput", - "pattern": "^StepIntegerInput$", + "default": "DAGGenericOutput", + "pattern": "^DAGGenericOutput$", "type": "string", "readOnly": true } } } ], - "title": "StepIntegerInput", - "description": "An integer input.", + "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" } }, - "StepNumberInput": { + "DAGStringOutput": { "allOf": [ { - "$ref": "#/components/schemas/GenericInput" + "$ref": "#/components/schemas/GenericOutput" }, { "type": "object", "required": [ - "value" + "from" ], "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" + "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": "StepNumberInput", - "pattern": "^StepNumberInput$", + "default": "DAGStringOutput", + "pattern": "^DAGStringOutput$", "type": "string", "readOnly": true } } } ], - "title": "StepNumberInput", - "description": "A number input.", + "title": "DAGStringOutput", + "description": "DAG string output.\n\nThis output loads the content from a file as a string.", "discriminator": { "propertyName": "type" } }, - "StepBooleanInput": { + "DAGIntegerOutput": { "allOf": [ { - "$ref": "#/components/schemas/GenericInput" + "$ref": "#/components/schemas/GenericOutput" }, { "type": "object", "required": [ - "value" + "from" ], "properties": { - "value": { - "title": "Value", - "type": "boolean" - }, - "default": { - "title": "Default", - "description": "Default value to use for an input if a value was not supplied.", - "type": "boolean" + "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": "StepBooleanInput", - "pattern": "^StepBooleanInput$", + "default": "DAGIntegerOutput", + "pattern": "^DAGIntegerOutput$", "type": "string", "readOnly": true } } } ], - "title": "StepBooleanInput", - "description": "The boolean type matches only two special values: True and False.", + "title": "DAGIntegerOutput", + "description": "DAG integer output.\n\nThis output loads the content from a file as an integer.", "discriminator": { "propertyName": "type" } }, - "StepFolderInput": { + "DAGNumberOutput": { "allOf": [ { - "$ref": "#/components/schemas/GenericInput" + "$ref": "#/components/schemas/GenericOutput" }, { "type": "object", "required": [ - "source" + "from" ], "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.", + "from": { + "title": "From", + "description": "Reference to a file or a task output. Task output must be file.", "anyOf": [ { - "$ref": "#/components/schemas/HTTP" - }, - { - "$ref": "#/components/schemas/S3" + "$ref": "#/components/schemas/TaskReference" }, { - "$ref": "#/components/schemas/ProjectFolder" + "$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" - }, - "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": "StepFolderInput", - "pattern": "^StepFolderInput$", + "default": "DAGNumberOutput", + "pattern": "^DAGNumberOutput$", "type": "string", "readOnly": true } } } ], - "title": "StepFolderInput", - "description": "A folder input.", + "title": "DAGNumberOutput", + "description": "DAG number output.\n\nThis output loads the content from a file as a floating number.", "discriminator": { "propertyName": "type" } }, - "StepFileInput": { + "DAGBooleanOutput": { "allOf": [ { - "$ref": "#/components/schemas/GenericInput" + "$ref": "#/components/schemas/GenericOutput" }, { "type": "object", "required": [ - "source" + "from" ], "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.", + "from": { + "title": "From", + "description": "Reference to a file or a task output. Task output must be file.", "anyOf": [ { - "$ref": "#/components/schemas/HTTP" - }, - { - "$ref": "#/components/schemas/S3" + "$ref": "#/components/schemas/TaskReference" }, { - "$ref": "#/components/schemas/ProjectFolder" + "$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" - }, - "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": "StepFileInput", - "pattern": "^StepFileInput$", + "default": "DAGBooleanOutput", + "pattern": "^DAGBooleanOutput$", "type": "string", "readOnly": true } } } ], - "title": "StepFileInput", - "description": "A file input.", + "title": "DAGBooleanOutput", + "description": "DAG boolean output.\n\nThis output loads the content from a file as a boolean.", "discriminator": { "propertyName": "type" } }, - "StepPathInput": { + "DAGFolderOutput": { "allOf": [ { - "$ref": "#/components/schemas/GenericInput" + "$ref": "#/components/schemas/GenericOutput" }, { "type": "object", "required": [ - "source" + "from" ], "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.", + "from": { + "title": "From", + "description": "Reference to a folder or a task output. Task output must be folder.", "anyOf": [ { - "$ref": "#/components/schemas/HTTP" - }, - { - "$ref": "#/components/schemas/S3" + "$ref": "#/components/schemas/TaskReference" }, { - "$ref": "#/components/schemas/ProjectFolder" + "$ref": "#/components/schemas/FolderReference" } ] }, "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/DAGStringInputAlias" - }, - { - "$ref": "#/components/schemas/DAGIntegerInputAlias" + "$ref": "#/components/schemas/DAGGenericOutputAlias" }, { - "$ref": "#/components/schemas/DAGNumberInputAlias" + "$ref": "#/components/schemas/DAGStringOutputAlias" }, { - "$ref": "#/components/schemas/DAGBooleanInputAlias" + "$ref": "#/components/schemas/DAGIntegerOutputAlias" }, { - "$ref": "#/components/schemas/DAGFolderInputAlias" + "$ref": "#/components/schemas/DAGNumberOutputAlias" }, { - "$ref": "#/components/schemas/DAGFileInputAlias" + "$ref": "#/components/schemas/DAGBooleanOutputAlias" }, { - "$ref": "#/components/schemas/DAGPathInputAlias" + "$ref": "#/components/schemas/DAGFolderOutputAlias" }, { - "$ref": "#/components/schemas/DAGArrayInputAlias" + "$ref": "#/components/schemas/DAGFileOutputAlias" }, { - "$ref": "#/components/schemas/DAGJSONObjectInputAlias" + "$ref": "#/components/schemas/DAGPathOutputAlias" }, - { - "$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.", - "type": "string" - }, - "extensions": { - "title": "Extensions", - "description": "Optional list of extensions for file. The check for extension is case-insensitive.", - "type": "array", - "items": { - "type": "string" + { + "$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": "StepPathInput", - "pattern": "^StepPathInput$", + "default": "DAGFolderOutput", + "pattern": "^DAGFolderOutput$", "type": "string", "readOnly": true } } } ], - "title": "StepPathInput", - "description": "A file or a folder input.", + "title": "DAGFolderOutput", + "description": "DAG folder output.", "discriminator": { "propertyName": "type" } }, - "StepArrayInput": { + "DAGFileOutput": { "allOf": [ { - "$ref": "#/components/schemas/GenericInput" + "$ref": "#/components/schemas/GenericOutput" }, { "type": "object", "required": [ - "value" + "from" ], "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": {} + "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" - }, - "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$", + "default": "DAGFileOutput", + "pattern": "^DAGFileOutput$", "type": "string", "readOnly": true } } } ], - "title": "StepArrayInput", - "description": "A JSON array input.", + "title": "DAGFileOutput", + "description": "DAG file output.", "discriminator": { "propertyName": "type" } }, - "StepJSONObjectInput": { + "DAGPathOutput": { "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, 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 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": "DAGPathOutput", + "pattern": "^DAGPathOutput$", "type": "string", "readOnly": true } } } ], - "title": "StepJSONObjectInput", - "description": "A JSON object input.", + "title": "DAGPathOutput", + "description": "DAG path output.", "discriminator": { "propertyName": "type" } }, - "StepStringOutput": { + "DAGArrayOutput": { "allOf": [ { - "$ref": "#/components/schemas/FunctionStringOutput" + "$ref": "#/components/schemas/GenericOutput" }, { "type": "object", "required": [ - "value" + "from" ], "properties": { - "value": { - "title": "Value", - "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" + } + ] }, - "type": { - "title": "Type", - "default": "StepStringOutput", - "pattern": "^StepStringOutput$", - "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" + "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": "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", - "type": "number", - "format": "double" + "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", + "allOf": [ + { + "$ref": "#/components/schemas/ItemType" + } + ] }, "type": { "title": "Type", - "default": "StepNumberOutput", - "pattern": "^StepNumberOutput$", + "default": "DAGArrayOutput", + "pattern": "^DAGArrayOutput$", "type": "string", "readOnly": true } } } ], - "title": "StepNumberOutput", - "description": "A number output.", + "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" } }, - "StepBooleanOutput": { + "DAGJSONObjectOutput": { "allOf": [ { - "$ref": "#/components/schemas/FunctionBooleanOutput" + "$ref": "#/components/schemas/GenericOutput" }, { "type": "object", "required": [ - "value" + "from" ], "properties": { - "value": { - "title": "Value", + "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": "StepBooleanOutput", - "pattern": "^StepBooleanOutput$", + "default": "DAGJSONObjectOutput", + "pattern": "^DAGJSONObjectOutput$", "type": "string", "readOnly": true } } } ], - "title": "StepBooleanOutput", - "description": "The boolean type matches only two special values: True and False.", + "title": "DAGJSONObjectOutput", + "description": "DAG object output.\n\nThis output loads the content from a file as a JSON object.", "discriminator": { "propertyName": "type" } }, - "StepFolderOutput": { + "RecipeInterface": { "allOf": [ { - "$ref": "#/components/schemas/FunctionFolderOutput" + "$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" - }, + "metadata": { + "title": "Metadata", + "description": "Recipe metadata information.", + "allOf": [ { - "$ref": "#/components/schemas/ProjectFolder" + "$ref": "#/components/schemas/MetaData" } ] }, "type": { "title": "Type", - "default": "StepFolderOutput", - "pattern": "^StepFolderOutput$", + "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/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" + } + ] + } + }, + "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" + } + ] + } } - } + }, + "required": [ + "metadata" + ] } ], - "title": "StepFolderOutput", - "description": "A folder output.", + "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" } }, - "StepFileOutput": { + "RecipePackage": { "allOf": [ { - "$ref": "#/components/schemas/FunctionFileOutput" + "$ref": "#/components/schemas/RepositoryPackage" }, { "type": "object", "required": [ - "source" + "manifest" ], "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" - } - ] + "manifest": { + "$ref": "#/components/schemas/RecipeInterface" }, "type": { "title": "Type", - "default": "StepFileOutput", - "pattern": "^StepFileOutput$", + "default": "RecipePackage", "type": "string", + "pattern": "^RecipePackage$", "readOnly": true } } } ], - "title": "StepFileOutput", - "description": "A file output.", + "title": "RecipePackage", "discriminator": { "propertyName": "type" } }, - "StepPathOutput": { + "RecipePackageList": { "allOf": [ { - "$ref": "#/components/schemas/FunctionPathOutput" + "$ref": "#/components/schemas/_OpenAPIGenBaseModel" }, { "type": "object", "required": [ - "source" + "page", + "per_page", + "page_count", + "total_count", + "resources" ], "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" - } - ] + "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/RecipePackage" + } + }, + "next_page": { + "title": "Next Page", + "description": "The next page, if this on is not the last", + "type": "integer", + "format": "int32" }, "type": { "title": "Type", - "default": "StepPathOutput", - "pattern": "^StepPathOutput$", + "default": "RecipePackageList", "type": "string", + "pattern": "^RecipePackageList$", "readOnly": true } } } ], - "title": "StepPathOutput", - "description": "A file or a folder output.", + "title": "RecipePackageList", + "description": "A list response from a pagination request", "discriminator": { "propertyName": "type" } }, - "StepArrayOutput": { + "InputReference": { "allOf": [ { - "$ref": "#/components/schemas/FunctionStringOutput" + "$ref": "#/components/schemas/_InputReferenceBase" }, { "type": "object", - "required": [ - "value" - ], "properties": { - "value": { - "title": "Value", - "type": "array", - "items": {} - }, - "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": "StepArrayOutput", - "pattern": "^StepArrayOutput$", + "default": "InputReference", + "pattern": "^InputReference$", "type": "string", "readOnly": true } } } ], - "title": "StepArrayOutput", - "description": "A JSON array output.", + "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" } }, - "StepJSONObjectOutput": { + "ItemReference": { "allOf": [ { - "$ref": "#/components/schemas/FunctionJSONObjectOutput" + "$ref": "#/components/schemas/_BaseReference" }, { "type": "object", - "required": [ - "value" - ], "properties": { - "value": { - "title": "Value", - "type": "object" + "variable": { + "title": "Variable", + "description": "The name of the looped item variable (use dot notation for nested json values)", + "type": "string" }, "type": { "title": "Type", - "default": "StepJSONObjectOutput", - "pattern": "^StepJSONObjectOutput$", + "default": "ItemReference", + "pattern": "^ItemReference$", "type": "string", "readOnly": true } } } ], - "title": "StepJSONObjectOutput", - "description": "A JSON object output.", + "title": "ItemReference", + "description": "An Item Reference.", "discriminator": { "propertyName": "type" } }, - "RunResultList": { + "ValueReference": { "allOf": [ { - "$ref": "#/components/schemas/_OpenAPIGenBaseModel" + "$ref": "#/components/schemas/_BaseReference" }, { "type": "object", "required": [ - "page", - "per_page", - "page_count", - "total_count", - "resources" + "value" ], - "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": { - "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" - } - ] + "properties": { + "value": { + "title": "Value", + "description": "A fixed value for this reference." + }, + "type": { + "title": "Type", + "default": "ValueReference", + "pattern": "^ValueReference$", + "type": "string", + "readOnly": true + } + } + } + ], + "title": "ValueReference", + "description": "A reference to a fixed value.", + "discriminator": { + "propertyName": "type" + } + }, + "TaskArgument": { + "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" + }, + "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": "TaskArgument", + "pattern": "^TaskArgument$", + "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", + "from" + ] + } + ], + "title": "TaskArgument", + "description": "Task argument for receiving inputs that are not files or folders.", + "discriminator": { + "propertyName": "type" + } + }, + "NewSubscriptionItem": { + "allOf": [ + { + "$ref": "#/components/schemas/_OpenAPIGenBaseModel" + }, + { + "type": "object", + "properties": { + "price": { + "$ref": "#/components/schemas/Price" }, - "next_page": { - "title": "Next Page", - "description": "The next page, if this on is not the last", + "quantity": { + "title": "Quantity", "type": "integer", "format": "int32" }, "type": { "title": "Type", - "default": "RunResultList", + "default": "NewSubscriptionItem", "type": "string", - "pattern": "^RunResultList$", + "pattern": "^NewSubscriptionItem$", "readOnly": true } - } + }, + "required": [ + "price", + "quantity" + ] } ], - "title": "RunResultList", - "description": "A list response from a pagination request", + "title": "NewSubscriptionItem", "discriminator": { "propertyName": "type" } @@ -9956,7 +13657,7 @@ "propertyName": "type" } }, - "Usage": { + "Accessor": { "allOf": [ { "$ref": "#/components/schemas/_OpenAPIGenBaseModel" @@ -9964,298 +13665,531 @@ { "type": "object", "properties": { - "start": { - "title": "Start", - "description": "The start date for this usage aggregation", + "subject": { + "title": "Subject", + "anyOf": [ + { + "$ref": "#/components/schemas/AccountPublic" + }, + { + "$ref": "#/components/schemas/Team" + } + ] + }, + "permission": { + "$ref": "#/components/schemas/Permission" + }, + "type": { + "title": "Type", + "default": "Accessor", "type": "string", - "format": "date-time" + "pattern": "^Accessor$", + "readOnly": true + } + }, + "required": [ + "subject", + "permission" + ] + } + ], + "title": "Accessor", + "discriminator": { + "propertyName": "type" + } + }, + "UserPermission": { + "allOf": [ + { + "$ref": "#/components/schemas/_OpenAPIGenBaseModel" + }, + { + "type": "object", + "properties": { + "admin": { + "title": "Admin", + "description": "The user has admin permission to this resource", + "default": false, + "example": false, + "type": "boolean" }, - "end": { - "title": "End", - "description": "The end date for this usage aggregation", + "write": { + "title": "Write", + "description": "The user has write permission on this resource", + "default": false, + "example": false, + "type": "boolean" + }, + "read": { + "title": "Read", + "description": "The user has read permission on this resource", + "default": false, + "example": true, + "type": "boolean" + }, + "type": { + "title": "Type", + "default": "UserPermission", "type": "string", - "format": "date-time" + "pattern": "^UserPermission$", + "readOnly": true + } + } + } + ], + "title": "UserPermission", + "discriminator": { + "propertyName": "type" + } + }, + "LicensePoolPublic": { + "allOf": [ + { + "$ref": "#/components/schemas/_OpenAPIGenBaseModel" + }, + { + "type": "object", + "properties": { + "id": { + "title": "Id", + "description": "The ID of the pool", + "type": "string", + "format": "uuid" }, - "cpu": { - "title": "Cpu", - "description": "cpu usage", - "default": 0, - "type": "number", - "format": "double" + "license_id": { + "title": "License Id", + "description": "The ID of the license to which the pool provides access", + "type": "string" }, - "memory": { - "title": "Memory", - "description": "memory usage", - "default": 0, - "type": "number", - "format": "double" + "owner": { + "title": "Owner", + "description": "The account that owns the license", + "allOf": [ + { + "$ref": "#/components/schemas/AccountPublic" + } + ] }, - "succeeded": { - "title": "Succeeded", - "description": "succeeded usage", - "default": 0, - "type": "integer", - "format": "int32" + "permissions": { + "$ref": "#/components/schemas/UserPermission" }, - "failed": { - "title": "Failed", - "description": "failed usage", - "default": 0, - "type": "integer", - "format": "int32" + "product": { + "title": "Product", + "description": "The pollination product to which this pool provides access", + "type": "string" }, - "daily_usage": { - "title": "Daily Usage", - "description": "daily breakdown of usage", + "accessors": { + "title": "Accessors", + "description": "The entities that can access the license though the pool", "default": [], "type": "array", "items": { - "$ref": "#/components/schemas/DailyUsage" + "$ref": "#/components/schemas/Accessor" + } + }, + "description": { + "title": "Description", + "description": "The description of the pool", + "type": "string" + }, + "type": { + "title": "Type", + "default": "LicensePoolPublic", + "type": "string", + "pattern": "^LicensePoolPublic$", + "readOnly": true + } + }, + "required": [ + "id", + "license_id", + "owner", + "permissions", + "product" + ] + } + ], + "title": "LicensePoolPublic", + "discriminator": { + "propertyName": "type" + } + }, + "LicensePoolList": { + "allOf": [ + { + "$ref": "#/components/schemas/_OpenAPIGenBaseModel" + }, + { + "type": "object", + "properties": { + "resources": { + "title": "Resources", + "type": "array", + "items": { + "$ref": "#/components/schemas/LicensePoolPublic" } }, "type": { "title": "Type", - "default": "Usage", + "default": "LicensePoolList", "type": "string", - "pattern": "^Usage$", + "pattern": "^LicensePoolList$", "readOnly": true } }, "required": [ - "start", - "end" + "resources" ] } ], - "title": "Usage", + "title": "LicensePoolList", "discriminator": { "propertyName": "type" } }, - "Project": { + "ProjectAccessPolicy": { "allOf": [ { - "$ref": "#/components/schemas/ProjectCreate" + "$ref": "#/components/schemas/_OpenAPIGenBaseModel" }, { "type": "object", "required": [ - "id", - "owner", - "permissions", - "slug" + "subject", + "permission" ], "properties": { - "id": { - "title": "Id", - "description": "The project ID", - "example": "50bb7fe0-8f19-499e-972e-1ebec8af2c71", - "type": "string" - }, - "owner": { - "title": "Owner", - "description": "The project owner", + "subject": { + "title": "Subject", + "description": "The subject of the access policy", "allOf": [ { - "$ref": "#/components/schemas/AccountPublic" + "$ref": "#/components/schemas/PolicySubject" } ] }, - "permissions": { - "$ref": "#/components/schemas/UserPermission" - }, - "slug": { - "title": "Slug", - "description": "The project name in slug format", - "example": "project-falcon", - "type": "string" - }, - "usage": { - "title": "Usage", - "description": "The resource consumption of this project", + "permission": { + "description": "The permission given to the subject of the access policy", + "example": "write", "allOf": [ { - "$ref": "#/components/schemas/Usage" + "$ref": "#/components/schemas/Permission" } ] }, "type": { "title": "Type", - "default": "Project", + "default": "ProjectAccessPolicy", "type": "string", - "pattern": "^Project$", + "pattern": "^ProjectAccessPolicy$", "readOnly": true } } } ], - "title": "Project", + "title": "ProjectAccessPolicy", "discriminator": { "propertyName": "type" } }, - "DAGGenericOutputAlias": { + "FunctionStringInput": { "allOf": [ { - "$ref": "#/components/schemas/GenericOutput" + "$ref": "#/components/schemas/DAGStringInput" }, { "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$", + "default": "FunctionStringInput", + "pattern": "^FunctionStringInput$", "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.", + "title": "FunctionStringInput", + "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" } }, - "DAGStringOutputAlias": { + "FunctionPathOutput": { "allOf": [ { - "$ref": "#/components/schemas/_DAGArtifactOutputAlias" + "$ref": "#/components/schemas/PathOutput" }, { "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" - }, + "type": { + "title": "Type", + "default": "FunctionPathOutput", + "pattern": "^FunctionPathOutput$", + "type": "string", + "readOnly": true + } + } + } + ], + "title": "FunctionPathOutput", + "description": "Function Path output.", + "discriminator": { + "propertyName": "type" + } + }, + "DependencyKind": { + "title": "DependencyKind", + "description": "Dependency kind.", + "enum": [ + "recipe", + "plugin" + ], + "type": "string" + }, + "Dependency": { + "allOf": [ + { + "$ref": "#/components/schemas/_OpenAPIGenBaseModel" + }, + { + "type": "object", + "properties": { + "kind": { + "description": "The kind of dependency. It can be a recipe or an plugin.", + "allOf": [ { - "$ref": "#/components/schemas/FileReference" + "$ref": "#/components/schemas/DependencyKind" } ] }, + "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.", + "type": "string" + }, + "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": "DAGStringOutputAlias", - "pattern": "^DAGStringOutputAlias$", + "default": "Dependency", + "pattern": "^Dependency$", "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" + } + }, + "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": [ + "kind", + "name", + "tag", + "source" + ] } ], - "title": "DAGStringOutputAlias", - "description": "DAG alias string output.\n\nThis output loads the content from a file as a string.", + "title": "Dependency", + "description": "Configuration to fetch a Recipe or Plugin that another Recipe depends on.", "discriminator": { "propertyName": "type" } }, - "DAGNumberOutputAlias": { + "ProductFamily": { "allOf": [ { - "$ref": "#/components/schemas/_DAGArtifactOutputAlias" + "$ref": "#/components/schemas/Product" }, { "type": "object", "required": [ - "from" + "prices" ], "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" - } - ] + "prices": { + "title": "Prices", + "type": "array", + "items": { + "$ref": "#/components/schemas/Price" + } + }, + "type": { + "title": "Type", + "default": "ProductFamily", + "type": "string", + "pattern": "^ProductFamily$", + "readOnly": true + } + } + } + ], + "title": "ProductFamily", + "discriminator": { + "propertyName": "type" + } + }, + "DailyUsage": { + "allOf": [ + { + "$ref": "#/components/schemas/_OpenAPIGenBaseModel" + }, + { + "type": "object", + "properties": { + "date": { + "title": "Date", + "description": "The day this usage was aggregated for", + "type": "string", + "format": "date-time" + }, + "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" + }, + "failed": { + "title": "Failed", + "description": "failed usage", + "default": 0, + "type": "integer", + "format": "int32" }, "type": { "title": "Type", - "default": "DAGNumberOutputAlias", - "pattern": "^DAGNumberOutputAlias$", + "default": "DailyUsage", "type": "string", + "pattern": "^DailyUsage$", "readOnly": true } - } + }, + "required": [ + "date" + ] } ], - "title": "DAGNumberOutputAlias", - "description": "DAG alias number output.\n\nThis output loads the content from a file as a floating number.", + "title": "DailyUsage", "discriminator": { "propertyName": "type" } }, - "DAGBooleanOutputAlias": { + "Usage": { "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" - } - ] + "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" + }, + "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" + }, + "daily_usage": { + "title": "Daily Usage", + "description": "daily breakdown of usage", + "default": [], + "type": "array", + "items": { + "$ref": "#/components/schemas/DailyUsage" + } }, "type": { "title": "Type", - "default": "DAGBooleanOutputAlias", - "pattern": "^DAGBooleanOutputAlias$", + "default": "Usage", "type": "string", + "pattern": "^Usage$", "readOnly": true } - } + }, + "required": [ + "start", + "end" + ] } ], - "title": "DAGBooleanOutputAlias", - "description": "DAG alias boolean output.\n\nThis output loads the content from a file as a boolean.", + "title": "Usage", "discriminator": { "propertyName": "type" } }, - "FolderReference": { + "ValueListReference": { "allOf": [ { "$ref": "#/components/schemas/_BaseReference" @@ -10263,580 +14197,330 @@ { "type": "object", "required": [ - "path" + "value" ], "properties": { - "path": { - "title": "Path", - "description": "Relative path to a folder.", - "type": "string" + "value": { + "title": "Value", + "description": "A fixed value for this reference.", + "type": "array", + "items": {} }, "type": { "title": "Type", - "default": "FolderReference", - "pattern": "^FolderReference$", + "default": "ValueListReference", + "pattern": "^ValueListReference$", "type": "string", "readOnly": true } } } ], - "title": "FolderReference", - "description": "Reference to a folder.", + "title": "ValueListReference", + "description": "A reference to a fixed value.", "discriminator": { "propertyName": "type" } }, - "DAGFolderOutputAlias": { + "UserCreate": { "allOf": [ { - "$ref": "#/components/schemas/_DAGArtifactOutputAlias" + "$ref": "#/components/schemas/UserUpdate" }, { "type": "object", "required": [ - "from" + "username" ], "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" - } - ] + "username": { + "title": "Username", + "description": "The unique name of the user in small case without spaces", + "example": "ladybugbot", + "type": "string" }, "type": { "title": "Type", - "default": "DAGFolderOutputAlias", - "pattern": "^DAGFolderOutputAlias$", + "default": "UserCreate", "type": "string", + "pattern": "^UserCreate$", "readOnly": true } } } ], - "title": "DAGFolderOutputAlias", - "description": "DAG alias folder output.", + "title": "UserCreate", "discriminator": { "propertyName": "type" } }, - "DAGFileOutputAlias": { + "FunctionIntegerOutput": { "allOf": [ { - "$ref": "#/components/schemas/_DAGArtifactOutputAlias" + "$ref": "#/components/schemas/FunctionStringOutput" }, { "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$", + "default": "FunctionIntegerOutput", + "pattern": "^FunctionIntegerOutput$", "type": "string", "readOnly": true } } } ], - "title": "DAGFileOutputAlias", - "description": "DAG alias file output.", + "title": "FunctionIntegerOutput", + "description": "Function integer output.\n\nThis output loads the content from a file as an integer.", "discriminator": { "propertyName": "type" } }, - "DAGPathOutputAlias": { + "StepPathOutput": { "allOf": [ { - "$ref": "#/components/schemas/_DAGArtifactOutputAlias" + "$ref": "#/components/schemas/FunctionPathOutput" }, { "type": "object", "required": [ - "from" + "source" ], "properties": { - "from": { - "title": "From", - "description": "Reference to a file, folder or a task output. Task output must either be a file or a folder.", + "source": { + "title": "Source", + "description": "The path to source the file from.", "anyOf": [ { - "$ref": "#/components/schemas/TaskReference" + "$ref": "#/components/schemas/HTTP" }, { - "$ref": "#/components/schemas/FileReference" + "$ref": "#/components/schemas/S3" }, { - "$ref": "#/components/schemas/FolderReference" + "$ref": "#/components/schemas/ProjectFolder" } ] }, "type": { "title": "Type", - "default": "DAGPathOutputAlias", - "pattern": "^DAGPathOutputAlias$", + "default": "StepPathOutput", + "pattern": "^StepPathOutput$", "type": "string", "readOnly": true } } } ], - "title": "DAGPathOutputAlias", - "description": "DAG alias path output.", + "title": "StepPathOutput", + "description": "A file or a folder output.", "discriminator": { "propertyName": "type" } }, - "DAGArrayOutputAlias": { + "InputFileReference": { "allOf": [ { - "$ref": "#/components/schemas/_DAGArtifactOutputAlias" + "$ref": "#/components/schemas/_InputReferenceBase" }, { "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$", + "default": "InputFileReference", + "pattern": "^InputFileReference$", "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.", + "title": "InputFileReference", + "description": "An input file reference", "discriminator": { "propertyName": "type" } }, - "DAGJSONObjectOutputAlias": { + "InputFolderReference": { "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" - } - ] - }, + "$ref": "#/components/schemas/_InputReferenceBase" + }, + { + "type": "object", + "properties": { "type": { "title": "Type", - "default": "DAGJSONObjectOutputAlias", - "pattern": "^DAGJSONObjectOutputAlias$", + "default": "InputFolderReference", + "pattern": "^InputFolderReference$", "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": "InputFolderReference", + "description": "An input folder reference", "discriminator": { "propertyName": "type" } }, - "DAGArrayOutput": { + "InputPathReference": { "allOf": [ { - "$ref": "#/components/schemas/GenericOutput" + "$ref": "#/components/schemas/_InputReferenceBase" }, { "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" - }, - "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": "InputPathReference", + "pattern": "^InputPathReference$", "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": "InputPathReference", + "description": "An input file or folder reference", "discriminator": { "propertyName": "type" } }, - "FunctionBooleanInput": { + "TaskFileReference": { "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": "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": "FunctionBooleanInput", - "pattern": "^FunctionBooleanInput$", + "default": "TaskFileReference", + "pattern": "^TaskFileReference$", "type": "string", "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": "TaskFileReference", + "description": "A reference to a file that is generated in a task.", "discriminator": { "propertyName": "type" } }, - "FunctionIntegerOutput": { + "TaskFolderReference": { "allOf": [ { - "$ref": "#/components/schemas/FunctionStringOutput" + "$ref": "#/components/schemas/_TaskReferenceBase" }, { "type": "object", "properties": { "type": { "title": "Type", - "default": "FunctionIntegerOutput", - "pattern": "^FunctionIntegerOutput$", + "default": "TaskFolderReference", + "pattern": "^TaskFolderReference$", "type": "string", "readOnly": true } } } ], - "title": "FunctionIntegerOutput", - "description": "Function integer output.\n\nThis output loads the content from a file as an integer.", + "title": "TaskFolderReference", + "description": "A reference to a folder that is generated in a task.", "discriminator": { "propertyName": "type" } }, - "Team": { + "TaskPathReference": { "allOf": [ { - "$ref": "#/components/schemas/TeamUpdate" + "$ref": "#/components/schemas/_TaskReferenceBase" }, { "type": "object", - "required": [ - "id", - "slug" - ], "properties": { - "id": { - "title": "Id", - "description": "The team ID", - "example": "142ee933-6110-4186-92ab-92df359aa108", - "type": "string" - }, - "slug": { - "title": "Slug", - "description": "The public slug of the team", - "example": "ladybug-tools/honeybee-contributors", - "type": "string" - }, - "member_count": { - "title": "Member Count", - "description": "The number of members that are part of this team", - "default": 0, - "example": 5, - "type": "integer", - "format": "int32" - }, "type": { "title": "Type", - "default": "Team", + "default": "TaskPathReference", + "pattern": "^TaskPathReference$", "type": "string", - "pattern": "^Team$", "readOnly": true } } } ], - "title": "Team", + "title": "TaskPathReference", + "description": "A reference to a file or folder that is generated in a task.", "discriminator": { "propertyName": "type" } }, - "Maintainer": { + "ValueFileReference": { "allOf": [ { - "$ref": "#/components/schemas/_OpenAPIGenBaseModel" + "$ref": "#/components/schemas/_BaseReference" }, { "type": "object", + "required": [ + "path" + ], "properties": { - "name": { - "title": "Name", - "description": "The name of the author/maintainer person or organization.", + "path": { + "title": "Path", + "description": "A fixed value for this reference.", "type": "string" }, "type": { "title": "Type", - "default": "Maintainer", - "pattern": "^Maintainer$", + "default": "ValueFileReference", + "pattern": "^ValueFileReference$", "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": "Maintainer", - "description": "Maintainer information", + "title": "ValueFileReference", + "description": "A reference to a fixed file.", "discriminator": { "propertyName": "type" } }, - "License": { + "ValueFolderReference": { "allOf": [ { - "$ref": "#/components/schemas/_OpenAPIGenBaseModel" + "$ref": "#/components/schemas/ValueFileReference" }, { "type": "object", "properties": { - "name": { - "title": "Name", - "description": "The license name used for the package.", - "type": "string" - }, "type": { "title": "Type", - "default": "License", - "pattern": "^License$", + "default": "ValueFolderReference", + "pattern": "^ValueFolderReference$", "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": "License", - "description": "License information for the Package", + "title": "ValueFolderReference", + "description": "A reference to a fixed folder.", "discriminator": { "propertyName": "type" } }, - "MetaData": { + "TaskPathArgument": { "allOf": [ { "$ref": "#/components/schemas/_OpenAPIGenBaseModel" @@ -10846,18 +14530,43 @@ "properties": { "name": { "title": "Name", - "description": "Package name. Make it descriptive and helpful ;)", + "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 tag of the package", - "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/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" + } + ] }, "type": { "title": "Type", - "default": "MetaData", - "pattern": "^MetaData$", + "default": "TaskPathArgument", + "pattern": "^TaskPathArgument$", "type": "string", "readOnly": true }, @@ -10869,78 +14578,25 @@ "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", + "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" - }, - "license": { - "title": "License", - "description": "The license information.", - "allOf": [ - { - "$ref": "#/components/schemas/License" - } - ] } }, "required": [ "name", - "tag" + "from" ] } ], - "title": "MetaData", - "description": "Package metadata information.", + "title": "TaskPathArgument", + "description": "BaseModel with functionality to return the object as a yaml string.", "discriminator": { "propertyName": "type" } }, - "DockerConfig": { + "DAGTaskLoop": { "allOf": [ { "$ref": "#/components/schemas/_OpenAPIGenBaseModel" @@ -10948,20 +14604,10 @@ { "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", + "default": "DAGTaskLoop", + "pattern": "^DAGTaskLoop$", "type": "string", "readOnly": true }, @@ -10973,57 +14619,55 @@ "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" + "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" + } + ] } - }, - "required": [ - "image", - "workdir" - ] + } } ], - "title": "DockerConfig", - "description": "Plugin Configuration to run in a Docker container", + "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" } }, - "LocalConfig": { + "TaskReturn": { "allOf": [ { - "$ref": "#/components/schemas/_OpenAPIGenBaseModel" + "$ref": "#/components/schemas/GenericOutput" }, { "type": "object", "properties": { "type": { "title": "Type", - "default": "LocalConfig", - "pattern": "^LocalConfig", + "default": "TaskReturn", + "pattern": "^TaskReturn$", "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": "TaskReturn", + "description": "A Task return output that exposes the values from a function or a DAG.", "discriminator": { "propertyName": "type" } }, - "PluginConfig": { + "DAGTask": { "allOf": [ { "$ref": "#/components/schemas/_OpenAPIGenBaseModel" @@ -11031,19 +14675,20 @@ { "type": "object", "properties": { - "docker": { - "title": "Docker", - "description": "The configuration to use this plugin in a docker container", - "allOf": [ - { - "$ref": "#/components/schemas/DockerConfig" - } - ] + "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" }, "type": { "title": "Type", - "default": "PluginConfig", - "pattern": "^PluginConfig", + "default": "DAGTask", + "pattern": "^DAGTask$", "type": "string", "readOnly": true }, @@ -11055,47 +14700,200 @@ "type": "string" } }, - "local": { - "title": "Local", - "description": "The configuration to use this plugin locally", + "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/LocalConfig" + "$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": [ - "docker" + "name", + "template" ] } ], - "title": "PluginConfig", - "description": "Plugin configuration.\n\nThe config is used to schedule functions on a desktop or in other contexts\n(ie: Docker).", + "title": "DAGTask", + "description": "A single task in a DAG flow.", "discriminator": { "propertyName": "type" } }, - "FunctionStringInput": { + "DAG": { "allOf": [ { - "$ref": "#/components/schemas/DAGStringInput" + "$ref": "#/components/schemas/_OpenAPIGenBaseModel" }, { "type": "object", + "required": [ + "name", + "tasks" + ], "properties": { + "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/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" + } + ] + } + }, + "outputs": { + "title": "Outputs", + "description": "Outputs of the DAG that can be used by other DAGs.", + "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" + } + ] + } + }, + "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": "FunctionStringInput", - "pattern": "^FunctionStringInput$", + "default": "DAG", + "pattern": "^DAG$", "type": "string", "readOnly": true } } } ], - "title": "FunctionStringInput", - "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": "DAG", + "description": "A Directed Acyclic Graph containing a list of tasks.", "discriminator": { "propertyName": "type" } @@ -11266,6 +15064,88 @@ "propertyName": "type" } }, + "FunctionBooleanInput": { + "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": "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": "FunctionBooleanInput", + "pattern": "^FunctionBooleanInput$", + "type": "string", + "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.", + "discriminator": { + "propertyName": "type" + } + }, "FunctionFolderInput": { "allOf": [ { @@ -11742,16 +15622,40 @@ }, "type": { "title": "Type", - "default": "FunctionJSONObjectInput", - "pattern": "^FunctionJSONObjectInput$", + "default": "FunctionJSONObjectInput", + "pattern": "^FunctionJSONObjectInput$", + "type": "string", + "readOnly": true + } + } + } + ], + "title": "FunctionJSONObjectInput", + "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" + } + }, + "FunctionStringOutput": { + "allOf": [ + { + "$ref": "#/components/schemas/FunctionFileOutput" + }, + { + "type": "object", + "properties": { + "type": { + "title": "Type", + "default": "FunctionStringOutput", + "pattern": "^FunctionStringOutput$", "type": "string", "readOnly": true } } } ], - "title": "FunctionJSONObjectInput", - "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": "FunctionStringOutput", + "description": "Function string output.\n\nThis output loads the content from a file as a string.", "discriminator": { "propertyName": "type" } @@ -11852,30 +15756,6 @@ "propertyName": "type" } }, - "FunctionPathOutput": { - "allOf": [ - { - "$ref": "#/components/schemas/PathOutput" - }, - { - "type": "object", - "properties": { - "type": { - "title": "Type", - "default": "FunctionPathOutput", - "pattern": "^FunctionPathOutput$", - "type": "string", - "readOnly": true - } - } - } - ], - "title": "FunctionPathOutput", - "description": "Function Path output.", - "discriminator": { - "propertyName": "type" - } - }, "FunctionArrayOutput": { "allOf": [ { @@ -11933,7 +15813,7 @@ "propertyName": "type" } }, - "Function": { + "TemplateFunction": { "allOf": [ { "$ref": "#/components/schemas/_OpenAPIGenBaseModel" @@ -11942,7 +15822,8 @@ "type": "object", "required": [ "name", - "command" + "command", + "config" ], "properties": { "name": { @@ -11955,6 +15836,15 @@ "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" }, + "config": { + "title": "Config", + "description": "The plugin config to use for this function", + "allOf": [ + { + "$ref": "#/components/schemas/PluginConfig" + } + ] + }, "annotations": { "title": "Annotations", "description": "An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.", @@ -12042,61 +15932,60 @@ }, "type": { "title": "Type", - "default": "Function", - "pattern": "^Function$", + "default": "TemplateFunction", + "pattern": "^TemplateFunction$", "type": "string", "readOnly": true } } } ], - "title": "Function", - "description": "A Function with a single command", + "title": "TemplateFunction", + "description": "Function template.", "discriminator": { "propertyName": "type" } }, - "Plugin": { + "BakedRecipe": { "allOf": [ { "$ref": "#/components/schemas/_OpenAPIGenBaseModel" }, { "type": "object", + "required": [ + "flow", + "digest", + "templates" + ], "properties": { - "metadata": { - "title": "Metadata", - "description": "The Plugin metadata information", - "allOf": [ - { - "$ref": "#/components/schemas/MetaData" - } - ] + "flow": { + "title": "Flow", + "description": "A list of tasks to create a DAG recipe.", + "type": "array", + "items": { + "$ref": "#/components/schemas/DAG" + } }, - "config": { - "title": "Config", - "description": "The configuration information to run this plugin", - "allOf": [ - { - "$ref": "#/components/schemas/PluginConfig" - } - ] + "digest": { + "title": "Digest", + "type": "string" }, - "functions": { - "title": "Functions", - "description": "List of Plugin functions", + "templates": { + "title": "Templates", + "description": "A list of templates. Templates can be Function or a DAG.", "type": "array", "items": { - "$ref": "#/components/schemas/Function" + "anyOf": [ + { + "$ref": "#/components/schemas/TemplateFunction" + }, + { + "$ref": "#/components/schemas/DAG" + } + ] } }, - "type": { - "title": "Type", - "default": "Plugin", - "pattern": "^Plugin", - "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.", @@ -12111,251 +16000,510 @@ "readOnly": true, "pattern": "^v1beta1$", "type": "string" + }, + "metadata": { + "title": "Metadata", + "description": "Recipe metadata information.", + "allOf": [ + { + "$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" + } + }, + "type": { + "title": "Type", + "default": "BakedRecipe", + "pattern": "^BakedRecipe$", + "type": "string", + "readOnly": true + } + } + } + ], + "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" + } + }, + "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" + } + }, + "SubscriptionItemPublic": { + "allOf": [ + { + "$ref": "#/components/schemas/SubscriptionItem" + }, + { + "type": "object", + "properties": { + "type": { + "title": "Type", + "default": "SubscriptionItemPublic", + "type": "string", + "pattern": "^SubscriptionItemPublic$", + "readOnly": true + } + } + } + ], + "title": "SubscriptionItemPublic", + "discriminator": { + "propertyName": "type" + } + }, + "SubscriptionItemPublicList": { + "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/SubscriptionItemPublic" + } + }, + "type": { + "title": "Type", + "default": "SubscriptionItemPublicList", + "type": "string", + "pattern": "^SubscriptionItemPublicList$", + "readOnly": true } - }, - "required": [ - "metadata", - "config", - "functions" - ] + } } ], - "title": "Plugin", - "description": "A Queenbee Plugin.\n\nA plugin contains runtime configuration for a Command Line Interface (CLI) and\na list of functions that can be executed using this CLI tool.", + "title": "SubscriptionItemPublicList", "discriminator": { "propertyName": "type" } }, - "PluginPackage": { + "Invoice": { "allOf": [ { - "$ref": "#/components/schemas/RepositoryPackage" + "$ref": "#/components/schemas/InvoicePreview" }, { "type": "object", - "required": [ - "manifest" - ], "properties": { - "manifest": { - "$ref": "#/components/schemas/Plugin" - }, "type": { "title": "Type", - "default": "PluginPackage", + "default": "Invoice", "type": "string", - "pattern": "^PluginPackage$", + "pattern": "^Invoice$", "readOnly": true } } } ], - "title": "PluginPackage", + "title": "Invoice", "discriminator": { "propertyName": "type" } }, - "PluginPackageList": { + "TeamRoleEnum": { + "title": "TeamRoleEnum", + "description": "An enumeration.", + "enum": [ + "owner", + "member" + ], + "type": "string" + }, + "TeamMember": { "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/PluginPackage" - } + "user": { + "title": "User", + "description": "The team member", + "allOf": [ + { + "$ref": "#/components/schemas/UserPublic" + } + ] }, - "next_page": { - "title": "Next Page", - "description": "The next page, if this on is not the last", - "type": "integer", - "format": "int32" + "role": { + "description": "The role the user has within the team", + "example": "member", + "allOf": [ + { + "$ref": "#/components/schemas/TeamRoleEnum" + } + ] }, "type": { "title": "Type", - "default": "PluginPackageList", + "default": "TeamMember", "type": "string", - "pattern": "^PluginPackageList$", + "pattern": "^TeamMember$", "readOnly": true } - } + }, + "required": [ + "user", + "role" + ] } ], - "title": "PluginPackageList", - "description": "A list response from a pagination request", + "title": "TeamMember", "discriminator": { "propertyName": "type" } }, - "RepositoryCreate": { + "LicenseType": { + "title": "LicenseType", + "description": "An enumeration.", + "enum": [ + "node-locked", + "hosted-floating", + "on-premise-floating" + ], + "type": "string" + }, + "Metadata": { "allOf": [ { - "$ref": "#/components/schemas/RepositoryUpdate" + "$ref": "#/components/schemas/CryptlexBase" }, { "type": "object", "required": [ - "name" + "key", + "value" ], "properties": { - "name": { - "title": "Name", - "description": "The name of the repository", - "example": "daylight-factor", + "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": "RepositoryCreate", + "default": "Metadata", "type": "string", - "pattern": "^RepositoryCreate$", + "pattern": "^Metadata$", "readOnly": true } } } ], - "title": "RepositoryCreate", + "title": "Metadata", "discriminator": { "propertyName": "type" } }, - "ProjectCreate": { + "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": { - "name": { - "title": "Name", - "description": "The name of the project. Must be unique to a given owner", - "example": "Project Falcon", + "id": { + "title": "Id", "type": "string" }, - "description": { - "title": "Description", - "description": "A description of the project", - "default": "", - "example": "I always wanted to have a project called project Falcon", + "created_at": { + "title": "Created At", + "type": "string", + "format": "date-time" + }, + "updated_at": { + "title": "Updated At", + "type": "string", + "format": "date-time" + }, + "key": { + "title": "Key", + "description": "The key used to activate this license. Treat this like a password.", "type": "string" }, - "public": { - "title": "Public", - "description": "Whether or not a project is publicly viewable", - "default": true, + "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": { - "title": "Type", - "default": "ProjectCreate", - "type": "string", - "pattern": "^ProjectCreate$", + "$ref": "#/components/schemas/LicenseType", "readOnly": true + }, + "notes": { + "title": "Notes", + "type": "string" } - }, - "required": [ - "name" - ] + } } ], - "title": "ProjectCreate", + "title": "LicensePublic", "discriminator": { "propertyName": "type" } }, - "SubjectType": { - "title": "SubjectType", - "description": "An enumeration.", - "enum": [ - "user", - "team" - ], - "type": "string" - }, - "PolicySubject": { + "Project": { "allOf": [ { - "$ref": "#/components/schemas/_OpenAPIGenBaseModel" + "$ref": "#/components/schemas/ProjectCreate" }, { "type": "object", + "required": [ + "id", + "owner", + "permissions", + "slug" + ], "properties": { - "subject_type": { - "$ref": "#/components/schemas/SubjectType" + "id": { + "title": "Id", + "description": "The project ID", + "example": "50bb7fe0-8f19-499e-972e-1ebec8af2c71", + "type": "string" }, - "name": { - "title": "Name", - "description": "The name of the policy subject", - "example": "ladybugbot", + "owner": { + "title": "Owner", + "description": "The project owner", + "allOf": [ + { + "$ref": "#/components/schemas/AccountPublic" + } + ] + }, + "permissions": { + "$ref": "#/components/schemas/UserPermission" + }, + "slug": { + "title": "Slug", + "description": "The project name in slug format", + "example": "project-falcon", "type": "string" }, + "usage": { + "title": "Usage", + "description": "The resource consumption of this project", + "allOf": [ + { + "$ref": "#/components/schemas/Usage" + } + ] + }, "type": { "title": "Type", - "default": "PolicySubject", + "default": "Project", "type": "string", - "pattern": "^PolicySubject$", + "pattern": "^Project$", "readOnly": true } - }, - "required": [ - "subject_type", - "name" - ] + } } ], - "title": "PolicySubject", + "title": "Project", "discriminator": { "propertyName": "type" } }, - "Permission": { - "title": "Permission", - "description": "An enumeration.", - "enum": [ - "admin", - "write", - "read" - ], - "type": "string" - }, - "RepositoryAccessPolicy": { + "ProjectList": { "allOf": [ { "$ref": "#/components/schemas/_OpenAPIGenBaseModel" @@ -12363,80 +16511,90 @@ { "type": "object", "required": [ - "subject", - "permission" + "page", + "per_page", + "page_count", + "total_count", + "resources" ], "properties": { - "subject": { - "title": "Subject", - "description": "The subject of the access policy", - "allOf": [ - { - "$ref": "#/components/schemas/PolicySubject" - } - ] + "page": { + "title": "Page", + "description": "The current page the pagination request is on", + "type": "integer", + "format": "int32" }, - "permission": { - "description": "The permission given to the subject of the access policy", - "example": "write", - "allOf": [ - { - "$ref": "#/components/schemas/Permission" - } - ] + "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/Project" + } + }, + "next_page": { + "title": "Next Page", + "description": "The next page, if this on is not the last", + "type": "integer", + "format": "int32" }, "type": { "title": "Type", - "default": "RepositoryAccessPolicy", + "default": "ProjectList", "type": "string", - "pattern": "^RepositoryAccessPolicy$", + "pattern": "^ProjectList$", "readOnly": true } } } ], - "title": "RepositoryAccessPolicy", + "title": "ProjectList", + "description": "A list response from a pagination request", "discriminator": { "propertyName": "type" } }, - "TeamCreate": { + "OrganizationCreate": { "allOf": [ { - "$ref": "#/components/schemas/_OpenAPIGenBaseModel" + "$ref": "#/components/schemas/OrganizationUpdate" }, { "type": "object", "properties": { - "name": { - "title": "Name", - "example": "Honeybee Contributors", - "type": "string" - }, - "description": { - "title": "Description", - "example": "The Honeybee team works on all things energy modelling", - "type": "string" - }, "type": { "title": "Type", - "default": "TeamCreate", + "default": "OrganizationCreate", "type": "string", - "pattern": "^TeamCreate$", + "pattern": "^OrganizationCreate$", "readOnly": true } - }, - "required": [ - "name" - ] + } } ], - "title": "TeamCreate", + "title": "OrganizationCreate", "discriminator": { "propertyName": "type" } }, - "Body_post_plugin__owner__plugins_post": { + "SubscriptionCreate": { "allOf": [ { "$ref": "#/components/schemas/_OpenAPIGenBaseModel" @@ -12444,117 +16602,159 @@ { "type": "object", "properties": { - "package": { - "title": "Plugin Package", - "type": "string", - "format": "binary" + "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": "Body_post_plugin__owner__plugins_post", + "default": "SubscriptionCreate", "type": "string", - "pattern": "^Body_post_plugin__owner__plugins_post$", + "pattern": "^SubscriptionCreate$", "readOnly": true } - }, - "required": [ - "package" - ] + } } ], - "title": "Body_post_plugin__owner__plugins_post", + "title": "SubscriptionCreate", "discriminator": { "propertyName": "type" } }, - "DAGJSONObjectOutput": { + "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/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" - } - ] + "id": { + "title": "Id", + "description": "The ID of the individual job.", + "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" - } - ] + "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" } }, - "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" + "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" + } + ] }, - "type": { - "title": "Type", - "default": "DAGJSONObjectOutput", - "pattern": "^DAGJSONObjectOutput$", + "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", - "readOnly": true + "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": "DAGJSONObjectOutput", - "description": "DAG object output.\n\nThis output loads the content from a file as a JSON object.", + "title": "JobStatus", + "description": "Parametric Job Status.", "discriminator": { "propertyName": "type" } }, - "Body_post_recipe__owner__recipes_post": { + "JobArgument": { "allOf": [ { "$ref": "#/components/schemas/_OpenAPIGenBaseModel" @@ -12562,30 +16762,44 @@ { "type": "object", "properties": { - "package": { - "title": "Recipe Package", - "type": "string", - "format": "binary" + "name": { + "title": "Name", + "description": "Argument name. The name must match one of the input names from Job's DAG template.", + "type": "string" + }, + "value": { + "title": "Value", + "description": "The value of the job argument." }, "type": { "title": "Type", - "default": "Body_post_recipe__owner__recipes_post", + "default": "JobArgument", + "pattern": "^JobArgument$", "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" + } } }, "required": [ - "package" + "name", + "value" ] } ], - "title": "Body_post_recipe__owner__recipes_post", + "title": "JobArgument", + "description": "Job argument is an argument input for arguments which are not files or folders.", "discriminator": { "propertyName": "type" } }, - "ProjectRecipeFilter": { + "JobPathArgument": { "allOf": [ { "$ref": "#/components/schemas/_OpenAPIGenBaseModel" @@ -12593,2092 +16807,2096 @@ { "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 Job'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" + "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": "ProjectRecipeFilter", + "default": "JobPathArgument", + "pattern": "^JobPathArgument$", "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", + "source" ] } ], - "title": "ProjectRecipeFilter", + "title": "JobPathArgument", + "description": "BaseModel with functionality to return the object as a yaml string.", "discriminator": { "propertyName": "type" } }, - "TaskFileReference": { + "Job": { "allOf": [ { - "$ref": "#/components/schemas/_TaskReferenceBase" + "$ref": "#/components/schemas/_OpenAPIGenBaseModel" }, { "type": "object", "properties": { + "source": { + "title": "Source", + "description": "The source url for downloading the recipe.", + "type": "string" + }, "type": { "title": "Type", - "default": "TaskFileReference", - "pattern": "^TaskFileReference$", + "default": "Job", + "pattern": "^Job$", "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" + }, + "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": "TaskFileReference", - "description": "A reference to a file that is generated in a task.", + "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" } }, - "TaskFolderReference": { + "CloudJob": { "allOf": [ { - "$ref": "#/components/schemas/_TaskReferenceBase" + "$ref": "#/components/schemas/_OpenAPIGenBaseModel" }, { "type": "object", "properties": { + "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": "TaskFolderReference", - "pattern": "^TaskFolderReference$", + "default": "CloudJob", "type": "string", + "pattern": "^CloudJob$", "readOnly": true } - } + }, + "required": [ + "id", + "spec" + ] } ], - "title": "TaskFolderReference", - "description": "A reference to a folder that is generated in a task.", + "title": "CloudJob", "discriminator": { "propertyName": "type" } }, - "UserCreate": { + "CloudJobList": { "allOf": [ { - "$ref": "#/components/schemas/UserUpdate" + "$ref": "#/components/schemas/_OpenAPIGenBaseModel" }, { "type": "object", "required": [ - "username" + "page", + "per_page", + "page_count", + "total_count", + "resources" ], "properties": { - "username": { - "title": "Username", - "description": "The unique name of the user in small case without spaces", - "example": "ladybugbot", - "type": "string" + "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/CloudJob" + } + }, + "next_page": { + "title": "Next Page", + "description": "The next page, if this on is not the last", + "type": "integer", + "format": "int32" }, "type": { "title": "Type", - "default": "UserCreate", + "default": "CloudJobList", "type": "string", - "pattern": "^UserCreate$", + "pattern": "^CloudJobList$", "readOnly": true } } } ], - "title": "UserCreate", + "title": "CloudJobList", + "description": "A list response from a pagination request", "discriminator": { "propertyName": "type" } }, - "DAGGenericInput": { + "Function": { "allOf": [ { - "$ref": "#/components/schemas/GenericInput" + "$ref": "#/components/schemas/_OpenAPIGenBaseModel" }, { "type": "object", + "required": [ + "name", + "command" + ], "properties": { - "default": { - "title": "Default", - "description": "Default value for generic input.", + "name": { + "title": "Name", + "description": "Function name. Must be unique within a plugin.", "type": "string" }, - "alias": { - "title": "Alias", - "description": "A list of aliases for this input in different platforms.", + "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" + }, + "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": "Input arguments for this function.", "type": "array", "items": { "anyOf": [ { - "$ref": "#/components/schemas/DAGGenericInputAlias" + "$ref": "#/components/schemas/FunctionStringInput" }, { - "$ref": "#/components/schemas/DAGStringInputAlias" + "$ref": "#/components/schemas/FunctionIntegerInput" }, { - "$ref": "#/components/schemas/DAGIntegerInputAlias" + "$ref": "#/components/schemas/FunctionNumberInput" }, { - "$ref": "#/components/schemas/DAGNumberInputAlias" + "$ref": "#/components/schemas/FunctionBooleanInput" }, { - "$ref": "#/components/schemas/DAGBooleanInputAlias" + "$ref": "#/components/schemas/FunctionFolderInput" }, { - "$ref": "#/components/schemas/DAGFolderInputAlias" + "$ref": "#/components/schemas/FunctionFileInput" }, { - "$ref": "#/components/schemas/DAGFileInputAlias" + "$ref": "#/components/schemas/FunctionPathInput" }, { - "$ref": "#/components/schemas/DAGPathInputAlias" + "$ref": "#/components/schemas/FunctionArrayInput" }, { - "$ref": "#/components/schemas/DAGArrayInputAlias" + "$ref": "#/components/schemas/FunctionJSONObjectInput" + } + ] + } + }, + "outputs": { + "title": "Outputs", + "description": "List of output arguments.", + "type": "array", + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/FunctionStringOutput" }, { - "$ref": "#/components/schemas/DAGJSONObjectInputAlias" + "$ref": "#/components/schemas/FunctionIntegerOutput" }, { - "$ref": "#/components/schemas/DAGLinkedInputAlias" + "$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" } ] } }, - "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" + "description": { + "title": "Description", + "description": "Function description. A short human readable description for this function.", + "type": "string" }, "type": { "title": "Type", - "default": "DAGGenericInput", - "pattern": "^DAGGenericInput$", + "default": "Function", + "pattern": "^Function$", "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": "Function", + "description": "A Function with a single command", "discriminator": { "propertyName": "type" } }, - "DAGStringInput": { + "Plugin": { "allOf": [ { - "$ref": "#/components/schemas/DAGGenericInput" + "$ref": "#/components/schemas/_OpenAPIGenBaseModel" }, { "type": "object", "properties": { + "metadata": { + "title": "Metadata", + "description": "The Plugin metadata information", + "allOf": [ + { + "$ref": "#/components/schemas/MetaData" + } + ] + }, + "config": { + "title": "Config", + "description": "The configuration information to run this plugin", + "allOf": [ + { + "$ref": "#/components/schemas/PluginConfig" + } + ] + }, + "functions": { + "title": "Functions", + "description": "List of Plugin functions", + "type": "array", + "items": { + "$ref": "#/components/schemas/Function" + } + }, "type": { "title": "Type", - "default": "DAGStringInput", - "pattern": "^DAGStringInput$", + "default": "Plugin", + "pattern": "^Plugin", "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" } - } + }, + "required": [ + "metadata", + "config", + "functions" + ] } ], - "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": "Plugin", + "description": "A Queenbee Plugin.\n\nA plugin contains runtime configuration for a Command Line Interface (CLI) and\na list of functions that can be executed using this CLI tool.", "discriminator": { "propertyName": "type" } }, - "DAGIntegerInput": { + "StepStringInput": { "allOf": [ { - "$ref": "#/components/schemas/GenericInput" + "$ref": "#/components/schemas/FunctionStringInput" }, { "type": "object", + "required": [ + "value" + ], "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" + "value": { + "title": "Value", + "type": "string" }, "type": { "title": "Type", - "default": "DAGIntegerInput", - "pattern": "^DAGIntegerInput$", + "default": "StepStringInput", + "pattern": "^StepStringInput$", "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": "StepStringInput", + "description": "A String input.", "discriminator": { "propertyName": "type" } }, - "DAGFolderInput": { + "RepositoryAccessPolicy": { "allOf": [ { - "$ref": "#/components/schemas/GenericInput" + "$ref": "#/components/schemas/_OpenAPIGenBaseModel" }, { "type": "object", + "required": [ + "subject", + "permission" + ], "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" - }, + "subject": { + "title": "Subject", + "description": "The subject of the access policy", + "allOf": [ { - "$ref": "#/components/schemas/ProjectFolder" + "$ref": "#/components/schemas/PolicySubject" } ] }, - "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" + "permission": { + "description": "The permission given to the subject of the access policy", + "example": "write", + "allOf": [ + { + "$ref": "#/components/schemas/Permission" + } + ] }, "type": { "title": "Type", - "default": "DAGFolderInput", - "pattern": "^DAGFolderInput$", + "default": "RepositoryAccessPolicy", "type": "string", + "pattern": "^RepositoryAccessPolicy$", "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": "RepositoryAccessPolicy", "discriminator": { "propertyName": "type" } }, - "DAGFileInput": { + "RepositoryAccessPolicyList": { "allOf": [ { - "$ref": "#/components/schemas/GenericInput" + "$ref": "#/components/schemas/_OpenAPIGenBaseModel" }, { "type": "object", + "required": [ + "page", + "per_page", + "page_count", + "total_count", + "resources" + ], "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" - } - ] + "page": { + "title": "Page", + "description": "The current page the pagination request is on", + "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" - } - ] - } + "per_page": { + "title": "Per Page", + "description": "The number of pages per pagination request", + "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" + "page_count": { + "title": "Page Count", + "description": "The total number of pages", + "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" + "total_count": { + "title": "Total Count", + "description": "The total number of resources matching the list request", + "type": "integer", + "format": "int32" }, - "extensions": { - "title": "Extensions", - "description": "Optional list of extensions for file. The check for extension is case-insensitive.", + "resources": { + "title": "Resources", "type": "array", "items": { - "type": "string" + "$ref": "#/components/schemas/RepositoryAccessPolicy" } }, + "next_page": { + "title": "Next Page", + "description": "The next page, if this on is not the last", + "type": "integer", + "format": "int32" + }, "type": { "title": "Type", - "default": "DAGFileInput", - "pattern": "^DAGFileInput$", + "default": "RepositoryAccessPolicyList", "type": "string", + "pattern": "^RepositoryAccessPolicyList$", "readOnly": true } } } ], - "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": "RepositoryAccessPolicyList", + "description": "A list response from a pagination request", "discriminator": { "propertyName": "type" } }, - "DAGPathInput": { + "LicensePoolPolicySubject": { "allOf": [ { - "$ref": "#/components/schemas/GenericInput" + "$ref": "#/components/schemas/PolicySubject" }, { "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" - }, - "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": "DAGPathInput", - "pattern": "^DAGPathInput$", + "default": "LicensePoolPolicySubject", "type": "string", + "pattern": "^LicensePoolPolicySubject$", "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": "LicensePoolPolicySubject", "discriminator": { "propertyName": "type" } }, - "DAGArrayInput": { + "LicensePoolPolicySubjectList": { "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": "array", - "items": {} - }, - "alias": { - "title": "Alias", - "description": "A list of aliases for this input in different platforms.", + "resources": { + "title": "Resources", + "description": "The list of subjects which currently have access to the pool", + "default": [], "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" - } - ] + "$ref": "#/components/schemas/LicensePoolPolicySubject" } }, - "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": "LicensePoolPolicySubjectList", "type": "string", + "pattern": "^LicensePoolPolicySubjectList$", "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": "LicensePoolPolicySubjectList", "discriminator": { "propertyName": "type" } }, - "DAGJSONObjectInput": { + "StepJSONObjectOutput": { "allOf": [ { - "$ref": "#/components/schemas/GenericInput" + "$ref": "#/components/schemas/FunctionJSONObjectOutput" }, { "type": "object", + "required": [ + "value" + ], "properties": { - "default": { - "title": "Default", - "description": "Default value to use for an input if a value was not supplied.", - "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", - "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": "DAGJSONObjectInput", - "pattern": "^DAGJSONObjectInput$", + "default": "StepJSONObjectOutput", + "pattern": "^StepJSONObjectOutput$", "type": "string", "readOnly": true } } } ], - "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": "StepJSONObjectOutput", + "description": "A JSON object output.", "discriminator": { "propertyName": "type" } }, - "DAGGenericOutput": { + "APITokenList": { "allOf": [ { - "$ref": "#/components/schemas/FromOutput" + "$ref": "#/components/schemas/_OpenAPIGenBaseModel" }, { "type": "object", + "required": [ + "page", + "per_page", + "page_count", + "total_count", + "resources" + ], "properties": { - "alias": { - "title": "Alias", - "description": "A list of additional processes for loading this output on different platforms.", + "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/APIToken" } }, + "next_page": { + "title": "Next Page", + "description": "The next page, if this on is not the last", + "type": "integer", + "format": "int32" + }, "type": { "title": "Type", - "default": "DAGGenericOutput", - "pattern": "^DAGGenericOutput$", + "default": "APITokenList", "type": "string", + "pattern": "^APITokenList$", "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.", + "title": "APITokenList", + "description": "A list response from a pagination request", "discriminator": { "propertyName": "type" } }, - "DAGStringOutput": { + "RepositoryUserPermissions": { "allOf": [ { - "$ref": "#/components/schemas/GenericOutput" + "$ref": "#/components/schemas/UserPermission" }, { "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": "DAGStringOutput", - "pattern": "^DAGStringOutput$", + "default": "RepositoryUserPermissions", "type": "string", + "pattern": "^RepositoryUserPermissions$", "readOnly": true } } } ], - "title": "DAGStringOutput", - "description": "DAG string output.\n\nThis output loads the content from a file as a string.", + "title": "RepositoryUserPermissions", "discriminator": { "propertyName": "type" } }, - "DAGIntegerOutput": { + "Repository": { "allOf": [ { - "$ref": "#/components/schemas/GenericOutput" + "$ref": "#/components/schemas/RepositoryCreate" }, { "type": "object", "required": [ - "from" + "id", + "latest_tag", + "owner" ], "properties": { - "from": { - "title": "From", - "description": "Reference to a file or a task output. Task output must be file.", - "anyOf": [ - { - "$ref": "#/components/schemas/TaskReference" - }, + "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/FileReference" + "$ref": "#/components/schemas/AccountPublic" } ] }, - "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" + "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": "DAGIntegerOutput", - "pattern": "^DAGIntegerOutput$", + "default": "Repository", "type": "string", + "pattern": "^Repository$", "readOnly": true } } } ], - "title": "DAGIntegerOutput", - "description": "DAG integer output.\n\nThis output loads the content from a file as an integer.", + "title": "Repository", "discriminator": { "propertyName": "type" } }, - "DAGNumberOutput": { + "ResourcesDuration": { "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" - } - ] - } + "cpu": { + "title": "Cpu", + "default": 0, + "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" + "memory": { + "title": "Memory", + "default": 0, + "type": "integer", + "format": "int32" }, "type": { "title": "Type", - "default": "DAGNumberOutput", - "pattern": "^DAGNumberOutput$", + "default": "ResourcesDuration", "type": "string", + "pattern": "^ResourcesDuration$", "readOnly": true } } } ], - "title": "DAGNumberOutput", - "description": "DAG number output.\n\nThis output loads the content from a file as a floating number.", + "title": "ResourcesDuration", "discriminator": { "propertyName": "type" } }, - "DAGBooleanOutput": { + "RunMeta": { "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" - }, + "resources_duration": { + "title": "Resources Duration", + "description": "resource usage", + "default": { + "cpu": 0, + "memory": 0 + }, + "allOf": [ { - "$ref": "#/components/schemas/FileReference" + "$ref": "#/components/schemas/ResourcesDuration" } ] }, - "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" + "progress": { + "title": "Progress", + "description": "progress of the run", + "default": { + "completed": 0, + "running": 0, + "total": 0 + }, + "allOf": [ + { + "$ref": "#/components/schemas/RunProgress" + } + ] }, "type": { "title": "Type", - "default": "DAGBooleanOutput", - "pattern": "^DAGBooleanOutput$", + "default": "RunMeta", "type": "string", + "pattern": "^RunMeta$", "readOnly": true } } } ], - "title": "DAGBooleanOutput", - "description": "DAG boolean output.\n\nThis output loads the content from a file as a boolean.", + "title": "RunMeta", "discriminator": { "propertyName": "type" } }, - "DAGFolderOutput": { + "QuotaPlan": { "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" - } - ] + "name": { + "title": "Name", + "description": "The name of the quota", + "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" - } - ] - } + "resets": { + "title": "Resets", + "description": "Whether consumption is reset to 0 every month", + "default": false, + "type": "boolean" }, - "required": { - "title": "Required", - "description": "A boolean to indicate if an artifact output is required. A False value makes the artifact optional.", - "default": true, + "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": "DAGFolderOutput", - "pattern": "^DAGFolderOutput$", + "default": "QuotaPlan", "type": "string", + "pattern": "^QuotaPlan$", "readOnly": true } - } + }, + "required": [ + "name" + ] } ], - "title": "DAGFolderOutput", - "description": "DAG folder output.", + "title": "QuotaPlan", + "description": "A quota plan", "discriminator": { "propertyName": "type" } }, - "DAGFileOutput": { + "StepFileInput": { "allOf": [ { - "$ref": "#/components/schemas/GenericOutput" + "$ref": "#/components/schemas/GenericInput" }, { "type": "object", "required": [ - "from" + "source" ], - "properties": { - "from": { - "title": "From", - "description": "Reference to a file or a task output. Task output must be file.", + "properties": { + "source": { + "title": "Source", + "description": "The path to source the file from.", "anyOf": [ { - "$ref": "#/components/schemas/TaskReference" + "$ref": "#/components/schemas/HTTP" }, { - "$ref": "#/components/schemas/FileReference" + "$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 additional processes for loading this output on different platforms.", + "description": "A list of aliases for this input in different platforms.", "type": "array", "items": { "anyOf": [ { - "$ref": "#/components/schemas/DAGGenericOutputAlias" + "$ref": "#/components/schemas/DAGGenericInputAlias" }, { - "$ref": "#/components/schemas/DAGStringOutputAlias" + "$ref": "#/components/schemas/DAGStringInputAlias" }, { - "$ref": "#/components/schemas/DAGIntegerOutputAlias" + "$ref": "#/components/schemas/DAGIntegerInputAlias" }, { - "$ref": "#/components/schemas/DAGNumberOutputAlias" + "$ref": "#/components/schemas/DAGNumberInputAlias" }, { - "$ref": "#/components/schemas/DAGBooleanOutputAlias" + "$ref": "#/components/schemas/DAGBooleanInputAlias" }, { - "$ref": "#/components/schemas/DAGFolderOutputAlias" + "$ref": "#/components/schemas/DAGFolderInputAlias" }, { - "$ref": "#/components/schemas/DAGFileOutputAlias" + "$ref": "#/components/schemas/DAGFileInputAlias" }, { - "$ref": "#/components/schemas/DAGPathOutputAlias" + "$ref": "#/components/schemas/DAGPathInputAlias" }, { - "$ref": "#/components/schemas/DAGArrayOutputAlias" + "$ref": "#/components/schemas/DAGArrayInputAlias" }, { - "$ref": "#/components/schemas/DAGJSONObjectOutputAlias" + "$ref": "#/components/schemas/DAGJSONObjectInputAlias" }, { - "$ref": "#/components/schemas/DAGLinkedOutputAlias" + "$ref": "#/components/schemas/DAGLinkedInputAlias" } ] } }, "required": { "title": "Required", - "description": "A boolean to indicate if an artifact output is required. A False value makes the artifact optional.", - "default": true, + "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.", + "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": "DAGFileOutput", - "pattern": "^DAGFileOutput$", + "default": "StepFileInput", + "pattern": "^StepFileInput$", "type": "string", "readOnly": true } } } ], - "title": "DAGFileOutput", - "description": "DAG file output.", + "title": "StepFileInput", + "description": "A file input.", "discriminator": { "propertyName": "type" } }, - "DAGPathOutput": { + "StepFileOutput": { "allOf": [ { - "$ref": "#/components/schemas/GenericOutput" + "$ref": "#/components/schemas/FunctionFileOutput" }, { "type": "object", "required": [ - "from" + "source" ], "properties": { - "from": { - "title": "From", - "description": "Reference to a file, folder or a task output. Task output must either be a file or a folder.", + "source": { + "title": "Source", + "description": "The path to source the file from.", "anyOf": [ { - "$ref": "#/components/schemas/TaskReference" + "$ref": "#/components/schemas/HTTP" }, { - "$ref": "#/components/schemas/FileReference" + "$ref": "#/components/schemas/S3" }, { - "$ref": "#/components/schemas/FolderReference" + "$ref": "#/components/schemas/ProjectFolder" } ] }, - "alias": { - "title": "Alias", - "description": "A list of additional processes for loading this output on different platforms.", + "type": { + "title": "Type", + "default": "StepFileOutput", + "pattern": "^StepFileOutput$", + "type": "string", + "readOnly": true + } + } + } + ], + "title": "StepFileOutput", + "description": "A file output.", + "discriminator": { + "propertyName": "type" + } + }, + "Location": { + "allOf": [ + { + "$ref": "#/components/schemas/CryptlexBase" + }, + { + "type": "object", + "properties": { + "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": "Location", + "type": "string", + "pattern": "^Location$", + "readOnly": true + } + } + } + ], + "title": "Location", + "discriminator": { + "propertyName": "type" + } + }, + "Activation": { + "allOf": [ + { + "$ref": "#/components/schemas/Activation" + }, + { + "type": "object", + "properties": { + "type": { + "title": "Type", + "default": "Activation", + "type": "string", + "pattern": "^Activation$", + "readOnly": true + } + } + } + ], + "title": "Activation", + "discriminator": { + "propertyName": "type" + } + }, + "ActivationList": { + "allOf": [ + { + "$ref": "#/components/schemas/_OpenAPIGenBaseModel" + }, + { + "type": "object", + "properties": { + "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/Activation" + } + }, + "type": { + "title": "Type", + "default": "ActivationList", + "type": "string", + "pattern": "^ActivationList$", + "readOnly": true + } + }, + "required": [ + "resources" + ] + } + ], + "title": "ActivationList", + "discriminator": { + "propertyName": "type" + } + }, + "ProjectAccessPolicyList": { + "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/ProjectAccessPolicy" } }, - "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": "DAGPathOutput", - "pattern": "^DAGPathOutput$", + "default": "ProjectAccessPolicyList", "type": "string", + "pattern": "^ProjectAccessPolicyList$", "readOnly": true } } } ], - "title": "DAGPathOutput", - "description": "DAG path output.", + "title": "ProjectAccessPolicyList", + "description": "A list response from a pagination request", "discriminator": { "propertyName": "type" } }, - "RecipeInterface": { + "StepIntegerInput": { "allOf": [ { - "$ref": "#/components/schemas/_OpenAPIGenBaseModel" + "$ref": "#/components/schemas/GenericInput" }, { "type": "object", + "required": [ + "value" + ], "properties": { - "metadata": { - "title": "Metadata", - "description": "Recipe metadata information.", - "allOf": [ - { - "$ref": "#/components/schemas/MetaData" - } - ] - }, - "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" + "value": { + "title": "Value", + "type": "integer", + "format": "int32" }, - "source": { - "title": "Source", - "description": "A URL to the source this recipe from a registry.", - "type": "string" + "default": { + "title": "Default", + "description": "Default value to use for an input if a value was not supplied.", + "type": "integer", + "format": "int32" }, - "inputs": { - "title": "Inputs", - "description": "A list of recipe inputs.", + "alias": { + "title": "Alias", + "description": "A list of aliases for this input in different platforms.", "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/DAGGenericInputAlias" }, { - "$ref": "#/components/schemas/DAGJSONObjectInput" - } - ] - } - }, - "outputs": { - "title": "Outputs", - "description": "A list of recipe outputs.", - "type": "array", - "items": { - "anyOf": [ - { - "$ref": "#/components/schemas/DAGGenericOutput" + "$ref": "#/components/schemas/DAGStringInputAlias" }, { - "$ref": "#/components/schemas/DAGStringOutput" + "$ref": "#/components/schemas/DAGIntegerInputAlias" }, { - "$ref": "#/components/schemas/DAGIntegerOutput" + "$ref": "#/components/schemas/DAGNumberInputAlias" }, { - "$ref": "#/components/schemas/DAGNumberOutput" + "$ref": "#/components/schemas/DAGBooleanInputAlias" }, { - "$ref": "#/components/schemas/DAGBooleanOutput" + "$ref": "#/components/schemas/DAGFolderInputAlias" }, { - "$ref": "#/components/schemas/DAGFolderOutput" + "$ref": "#/components/schemas/DAGFileInputAlias" }, { - "$ref": "#/components/schemas/DAGFileOutput" + "$ref": "#/components/schemas/DAGPathInputAlias" }, { - "$ref": "#/components/schemas/DAGPathOutput" + "$ref": "#/components/schemas/DAGArrayInputAlias" }, { - "$ref": "#/components/schemas/DAGArrayOutput" + "$ref": "#/components/schemas/DAGJSONObjectInputAlias" }, { - "$ref": "#/components/schemas/DAGJSONObjectOutput" + "$ref": "#/components/schemas/DAGLinkedInputAlias" } ] } - } - }, - "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", + "default": "StepIntegerInput", + "pattern": "^StepIntegerInput$", "type": "string", - "pattern": "^RecipePackage$", "readOnly": true } } } ], - "title": "RecipePackage", + "title": "StepIntegerInput", + "description": "An integer input.", "discriminator": { "propertyName": "type" } }, - "RecipePackageList": { + "StepNumberInput": { "allOf": [ { - "$ref": "#/components/schemas/_OpenAPIGenBaseModel" + "$ref": "#/components/schemas/GenericInput" }, { "type": "object", "required": [ - "page", - "per_page", - "page_count", - "total_count", - "resources" + "value" ], "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" + "value": { + "title": "Value", + "type": "number", + "format": "double" }, - "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": { - "$ref": "#/components/schemas/RecipePackage" + "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": "RecipePackageList", + "default": "StepNumberInput", + "pattern": "^StepNumberInput$", "type": "string", - "pattern": "^RecipePackageList$", "readOnly": true } } } ], - "title": "RecipePackageList", - "description": "A list response from a pagination request", + "title": "StepNumberInput", + "description": "A number input.", "discriminator": { "propertyName": "type" } }, - "RepositoryUserPermissions": { + "StepFolderInput": { "allOf": [ { - "$ref": "#/components/schemas/UserPermission" + "$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": "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.", + "type": "string" + }, "type": { "title": "Type", - "default": "RepositoryUserPermissions", + "default": "StepFolderInput", + "pattern": "^StepFolderInput$", "type": "string", - "pattern": "^RepositoryUserPermissions$", "readOnly": true } } } ], - "title": "RepositoryUserPermissions", + "title": "StepFolderInput", + "description": "A folder input.", "discriminator": { "propertyName": "type" } }, - "Repository": { + "StepPathInput": { "allOf": [ { - "$ref": "#/components/schemas/RepositoryCreate" + "$ref": "#/components/schemas/GenericInput" }, { "type": "object", "required": [ - "id", - "latest_tag", - "owner" + "source" ], "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": [ + "source": { + "title": "Source", + "description": "The path to source the file from.", + "anyOf": [ { - "$ref": "#/components/schemas/AccountPublic" + "$ref": "#/components/schemas/HTTP" + }, + { + "$ref": "#/components/schemas/S3" + }, + { + "$ref": "#/components/schemas/ProjectFolder" } ] }, - "permissions": { - "title": "Permissions", - "description": "The permissions the user making the API call has on the resource", - "default": { - "admin": false, - "write": false, - "read": false - }, - "allOf": [ + "default": { + "title": "Default", + "description": "The default source for file if the value is not provided.", + "anyOf": [ { - "$ref": "#/components/schemas/RepositoryUserPermissions" + "$ref": "#/components/schemas/HTTP" + }, + { + "$ref": "#/components/schemas/S3" + }, + { + "$ref": "#/components/schemas/ProjectFolder" } ] }, - "slug": { - "title": "Slug", - "description": "The repository slug", - "example": "ladybug-tools/daylight-factor", + "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.", "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": "Repository", + "default": "StepPathInput", + "pattern": "^StepPathInput$", "type": "string", - "pattern": "^Repository$", "readOnly": true } } } ], - "title": "Repository", + "title": "StepPathInput", + "description": "A file or a folder input.", "discriminator": { "propertyName": "type" } }, - "RepositoryList": { + "StepJSONObjectInput": { "allOf": [ { - "$ref": "#/components/schemas/_OpenAPIGenBaseModel" + "$ref": "#/components/schemas/GenericInput" }, { "type": "object", "required": [ - "page", - "per_page", - "page_count", - "total_count", - "resources" + "value" ], "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" + "value": { + "title": "Value", + "type": "object" }, - "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": "object" }, - "resources": { - "title": "Resources", + "alias": { + "title": "Alias", + "description": "A list of aliases for this input in different platforms.", "type": "array", "items": { - "$ref": "#/components/schemas/Repository" + "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": "RepositoryList", + "default": "StepJSONObjectInput", + "pattern": "^StepJSONObjectInput$", "type": "string", - "pattern": "^RepositoryList$", "readOnly": true } } } ], - "title": "RepositoryList", - "description": "A list response from a pagination request", + "title": "StepJSONObjectInput", + "description": "A JSON object input.", "discriminator": { "propertyName": "type" } }, - "ValueFolderReference": { + "StepStringOutput": { "allOf": [ { - "$ref": "#/components/schemas/ValueFileReference" + "$ref": "#/components/schemas/FunctionStringOutput" }, { "type": "object", + "required": [ + "value" + ], "properties": { + "value": { + "title": "Value", + "type": "string" + }, "type": { "title": "Type", - "default": "ValueFolderReference", - "pattern": "^ValueFolderReference$", + "default": "StepStringOutput", + "pattern": "^StepStringOutput$", "type": "string", "readOnly": true } } } ], - "title": "ValueFolderReference", - "description": "A reference to a fixed folder.", + "title": "StepStringOutput", + "description": "A String output.", "discriminator": { "propertyName": "type" } }, - "RepositoryUpdate": { + "StepIntegerOutput": { "allOf": [ { - "$ref": "#/components/schemas/_OpenAPIGenBaseModel" + "$ref": "#/components/schemas/FunctionIntegerOutput" }, { "type": "object", + "required": [ + "value" + ], "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" + "value": { + "title": "Value", + "type": "integer", + "format": "int32" }, "type": { "title": "Type", - "default": "RepositoryUpdate", + "default": "StepIntegerOutput", + "pattern": "^StepIntegerOutput$", "type": "string", - "pattern": "^RepositoryUpdate$", "readOnly": true } } } ], - "title": "RepositoryUpdate", + "title": "StepIntegerOutput", + "description": "An integer output.", "discriminator": { "propertyName": "type" } }, - "UserPublic": { + "StepNumberOutput": { "allOf": [ { - "$ref": "#/components/schemas/_OpenAPIGenBaseModel" + "$ref": "#/components/schemas/FunctionNumberOutput" }, { "type": "object", + "required": [ + "value" + ], "properties": { - "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", - "type": "string" + "value": { + "title": "Value", + "type": "number", + "format": "double" }, "type": { "title": "Type", - "default": "UserPublic", + "default": "StepNumberOutput", + "pattern": "^StepNumberOutput$", "type": "string", - "pattern": "^UserPublic$", "readOnly": true } - }, + } + } + ], + "title": "StepNumberOutput", + "description": "A number output.", + "discriminator": { + "propertyName": "type" + } + }, + "StepBooleanOutput": { + "allOf": [ + { + "$ref": "#/components/schemas/FunctionBooleanOutput" + }, + { + "type": "object", "required": [ - "username" - ] + "value" + ], + "properties": { + "value": { + "title": "Value", + "type": "boolean" + }, + "type": { + "title": "Type", + "default": "StepBooleanOutput", + "pattern": "^StepBooleanOutput$", + "type": "string", + "readOnly": true + } + } } ], - "title": "UserPublic", + "title": "StepBooleanOutput", + "description": "The boolean type matches only two special values: True and False.", "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": { + "StepFolderOutput": { "allOf": [ { - "$ref": "#/components/schemas/_OpenAPIGenBaseModel" + "$ref": "#/components/schemas/FunctionFolderOutput" }, { "type": "object", + "required": [ + "source" + ], "properties": { - "user": { - "title": "User", - "description": "The organization member", - "allOf": [ + "source": { + "title": "Source", + "description": "The path to source the file from.", + "anyOf": [ { - "$ref": "#/components/schemas/UserPublic" - } - ] - }, - "role": { - "description": "The role the user has within the organization", - "example": "member", - "allOf": [ + "$ref": "#/components/schemas/HTTP" + }, { - "$ref": "#/components/schemas/OrganizationRoleEnum" + "$ref": "#/components/schemas/S3" + }, + { + "$ref": "#/components/schemas/ProjectFolder" } ] }, "type": { "title": "Type", - "default": "OrganizationMember", + "default": "StepFolderOutput", + "pattern": "^StepFolderOutput$", "type": "string", - "pattern": "^OrganizationMember$", "readOnly": true } - }, - "required": [ - "user", - "role" - ] + } } ], - "title": "OrganizationMember", + "title": "StepFolderOutput", + "description": "A folder output.", "discriminator": { "propertyName": "type" } }, - "APIToken": { + "StepArrayOutput": { "allOf": [ { - "$ref": "#/components/schemas/_OpenAPIGenBaseModel" + "$ref": "#/components/schemas/FunctionStringOutput" }, { "type": "object", + "required": [ + "value" + ], "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" + "value": { + "title": "Value", + "type": "array", + "items": {} }, - "claims": { - "title": "Claims", - "description": "Key value pairs of auth claims the API token is entitled to", - "default": {}, - "type": "object", - "additionalProperties": { - "type": "string" - } + "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": "APIToken", + "default": "StepArrayOutput", + "pattern": "^StepArrayOutput$", "type": "string", - "pattern": "^APIToken$", "readOnly": true } - }, - "required": [ - "token_id", - "name" - ] + } } ], - "title": "APIToken", + "title": "StepArrayOutput", + "description": "A JSON array output.", "discriminator": { "propertyName": "type" } }, - "APITokenList": { + "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": { "allOf": [ { "$ref": "#/components/schemas/_OpenAPIGenBaseModel" @@ -14686,80 +18904,133 @@ { "type": "object", "required": [ - "page", - "per_page", - "page_count", - "total_count", - "resources" + "inputs", + "outputs", + "started_at", + "id", + "name", + "status_type", + "template_ref", + "children_ids", + "outbound_steps" ], "properties": { - "page": { - "title": "Page", - "description": "The current page the pagination request is on", - "type": "integer", - "format": "int32" + "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" + } + ] + } }, - "per_page": { - "title": "Per Page", - "description": "The number of pages per pagination request", - "type": "integer", - "format": "int32" + "started_at": { + "title": "Started At", + "description": "The time at which the task was started", + "type": "string", + "format": "date-time" }, - "page_count": { - "title": "Page Count", - "description": "The total number of pages", - "type": "integer", - "format": "int32" + "id": { + "title": "Id", + "description": "The step unique ID", + "type": "string" }, - "total_count": { - "title": "Total Count", - "description": "The total number of resources matching the list request", - "type": "integer", - "format": "int32" + "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" }, - "resources": { - "title": "Resources", + "status_type": { + "description": "The type of step this status is for. Can be \"Function\", \"DAG\" or \"Loop\"", + "allOf": [ + { + "$ref": "#/components/schemas/StatusType" + } + ] + }, + "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": { - "$ref": "#/components/schemas/APIToken" + "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": "APITokenList", - "type": "string", - "pattern": "^APITokenList$", - "readOnly": true - } - } - } - ], - "title": "APITokenList", - "description": "A list response from a pagination request", - "discriminator": { - "propertyName": "type" - } - }, - "RepositoryMetadata": { - "allOf": [ - { - "$ref": "#/components/schemas/_OpenAPIGenBaseModel" - }, - { - "type": "object", - "properties": { - "type": { - "title": "Type", - "default": "RepositoryMetadata", - "pattern": "^RepositoryMetadata$", - "type": "string", - "readOnly": true + "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", @@ -14769,95 +19040,159 @@ "type": "string" } }, - "name": { - "title": "Name", - "description": "The name of the repository", + "message": { + "title": "Message", + "description": "Any message produced by the task. Usually error/debugging hints.", "type": "string" }, - "description": { - "title": "Description", - "description": "A short description of the repository", - "default": "A Queenbee package repository", - "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 source path (url or local) to the repository", + "description": "Source url for the status object. It can be a recipe or a function.", "type": "string" }, - "plugin_count": { - "title": "Plugin Count", - "description": "The number of plugins hosted by the repository", - "default": 0, - "type": "integer", - "format": "int32" + "status": { + "description": "The status of this step.", + "default": "Unknown", + "allOf": [ + { + "$ref": "#/components/schemas/StepStatusEnum" + } + ] }, - "recipe_count": { - "title": "Recipe Count", - "description": "The number of recipes hosted by the repository", - "default": 0, - "type": "integer", - "format": "int32" + "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 } } } ], - "title": "RepositoryMetadata", - "description": "BaseModel with functionality to return the object as a yaml string.", + "title": "StepStatus", + "description": "The Status of a Job Step", "discriminator": { "propertyName": "type" } }, - "DependencyKind": { - "title": "DependencyKind", - "description": "Dependency kind.", - "enum": [ - "recipe", - "plugin" - ], - "type": "string" - }, - "Dependency": { + "RunStatus": { "allOf": [ { "$ref": "#/components/schemas/_OpenAPIGenBaseModel" }, { "type": "object", + "required": [ + "inputs", + "outputs", + "started_at", + "id", + "job_id" + ], "properties": { - "kind": { - "description": "The kind of dependency. It can be a recipe or an plugin.", - "allOf": [ - { - "$ref": "#/components/schemas/DependencyKind" - } - ] + "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" + } + ] + } }, - "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.", - "type": "string" + "outputs": { + "title": "Outputs", + "description": "The outputs produced by this run.", + "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" + } + ] + } }, - "tag": { - "title": "Tag", - "description": "Tag of the resource.", - "type": "string" + "started_at": { + "title": "Started At", + "description": "The time at which the task was started", + "type": "string", + "format": "date-time" }, - "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" - ], + "id": { + "title": "Id", + "description": "The ID of the individual run.", "type": "string" }, - "type": { - "title": "Type", - "default": "Dependency", - "pattern": "^Dependency$", - "type": "string", - "readOnly": true + "job_id": { + "title": "Job Id", + "description": "The ID of the job that generated this run.", + "type": "string" }, "annotations": { "title": "Annotations", @@ -14867,92 +19202,68 @@ "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.", + "message": { + "title": "Message", + "description": "Any message produced by the task. Usually error/debugging hints.", "type": "string" }, - "alias": { - "title": "Alias", - "description": "An optional alias to refer to this dependency. Useful if the name is already used somewhere else.", + "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" - } - }, - "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)", + }, + "api_version": { + "title": "Api Version", + "default": "v1beta1", + "readOnly": true, + "pattern": "^v1beta1$", "type": "string" }, - "type": { - "title": "Type", - "default": "ItemReference", - "pattern": "^ItemReference$", - "type": "string", - "readOnly": true - } - } - } - ], - "title": "ItemReference", - "description": "An Item Reference.", - "discriminator": { - "propertyName": "type" - } - }, - "ValueReference": { - "allOf": [ - { - "$ref": "#/components/schemas/_BaseReference" - }, - { - "type": "object", - "required": [ - "value" - ], - "properties": { - "value": { - "title": "Value", - "description": "A fixed value for this reference." + "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/RunStatusEnum" + } + ] + }, + "steps": { + "title": "Steps", + "default": {}, + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/StepStatus" + } }, "type": { "title": "Type", - "default": "ValueReference", - "pattern": "^ValueReference$", + "default": "RunStatus", + "pattern": "^RunStatus$", "type": "string", "readOnly": true } } } ], - "title": "ValueReference", - "description": "A reference to a fixed value.", + "title": "RunStatus", + "description": "Job Status.", "discriminator": { "propertyName": "type" } }, - "TaskArgument": { + "Run": { "allOf": [ { "$ref": "#/components/schemas/_OpenAPIGenBaseModel" @@ -14960,408 +19271,550 @@ { "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.", + "id": { + "title": "Id", + "description": "The unique ID for this run", "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": [ + "author": { + "title": "Author", + "description": "author", + "allOf": [ { - "$ref": "#/components/schemas/InputReference" - }, + "$ref": "#/components/schemas/AccountPublic" + } + ] + }, + "owner": { + "title": "Owner", + "description": "owner", + "allOf": [ { - "$ref": "#/components/schemas/TaskReference" - }, + "$ref": "#/components/schemas/AccountPublic" + } + ] + }, + "recipe": { + "title": "Recipe", + "description": "The recipe used to generate this ", + "allOf": [ { - "$ref": "#/components/schemas/ItemReference" + "$ref": "#/components/schemas/RecipeInterface" + } + ] + }, + "generation": { + "title": "Generation", + "description": "The generation of this run", + "type": "number", + "format": "double" + }, + "status": { + "title": "Status", + "description": "The status of the run", + "allOf": [ + { + "$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/ValueReference" + "$ref": "#/components/schemas/RunMeta" } ] }, "type": { "title": "Type", - "default": "TaskArgument", - "pattern": "^TaskArgument$", + "default": "Run", "type": "string", + "pattern": "^Run$", "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", - "from" + "id" ] } ], - "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$", - "type": "string", - "readOnly": true - } - } - } - ], - "title": "InputFolderReference", - "description": "An input folder reference", + "title": "Run", "discriminator": { "propertyName": "type" } }, - "InputPathReference": { + "RunList": { "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/Run" + } + }, + "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": "RunList", "type": "string", + "pattern": "^RunList$", "readOnly": true } } } ], - "title": "InputPathReference", - "description": "An input file or folder reference", + "title": "RunList", + "description": "A list response from a pagination request", "discriminator": { "propertyName": "type" } }, - "TaskPathReference": { + "OrganizationRoleEnum": { + "title": "OrganizationRoleEnum", + "description": "An enumeration.", + "enum": [ + "owner", + "member" + ], + "type": "string" + }, + "OrganizationMember": { "allOf": [ { - "$ref": "#/components/schemas/_TaskReferenceBase" + "$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": { "title": "Type", - "default": "TaskPathReference", - "pattern": "^TaskPathReference$", + "default": "OrganizationMember", "type": "string", + "pattern": "^OrganizationMember$", "readOnly": true } - } + }, + "required": [ + "user", + "role" + ] } ], - "title": "TaskPathReference", - "description": "A reference to a file or folder that is generated in a task.", + "title": "OrganizationMember", "discriminator": { "propertyName": "type" } }, - "ValueFileReference": { + "OrganizationMemberList": { "allOf": [ { - "$ref": "#/components/schemas/_BaseReference" + "$ref": "#/components/schemas/_OpenAPIGenBaseModel" }, { "type": "object", "required": [ - "path" + "page", + "per_page", + "page_count", + "total_count", + "resources" ], "properties": { - "path": { - "title": "Path", - "description": "A fixed value for this reference.", - "type": "string" + "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/OrganizationMember" + } + }, + "next_page": { + "title": "Next Page", + "description": "The next page, if this on is not the last", + "type": "integer", + "format": "int32" }, "type": { "title": "Type", - "default": "ValueFileReference", - "pattern": "^ValueFileReference$", + "default": "OrganizationMemberList", "type": "string", + "pattern": "^OrganizationMemberList$", "readOnly": true } } } ], - "title": "ValueFileReference", - "description": "A reference to a fixed file.", + "title": "OrganizationMemberList", + "description": "A list response from a pagination request", "discriminator": { "propertyName": "type" } }, - "TaskPathArgument": { + "PublicAccountList": { "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/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" - } - ] + "per_page": { + "title": "Per Page", + "description": "The number of pages per pagination request", + "type": "integer", + "format": "int32" }, - "type": { - "title": "Type", - "default": "TaskPathArgument", - "pattern": "^TaskPathArgument$", - "type": "string", - "readOnly": true + "page_count": { + "title": "Page Count", + "description": "The total number of pages", + "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" + "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/AccountPublic" } }, - "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" - ] + "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": "TaskPathArgument", - "description": "BaseModel with functionality to return the object as a yaml string.", + "title": "PublicAccountList", + "description": "A list response from a pagination request", "discriminator": { "propertyName": "type" } }, - "TaskReturn": { + "RecipeInterfaceList": { "allOf": [ { - "$ref": "#/components/schemas/GenericOutput" + "$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/RecipeInterface" + } + }, + "next_page": { + "title": "Next Page", + "description": "The next page, if this on is not the last", + "type": "integer", + "format": "int32" + }, "type": { "title": "Type", - "default": "TaskReturn", - "pattern": "^TaskReturn$", + "default": "RecipeInterfaceList", "type": "string", + "pattern": "^RecipeInterfaceList$", "readOnly": true } } } ], - "title": "TaskReturn", - "description": "A Task return output that exposes the values from a function or a DAG.", + "title": "RecipeInterfaceList", + "description": "A list response from a pagination request", "discriminator": { "propertyName": "type" } }, - "TaskPathReturn": { + "UserPrivate": { "allOf": [ { - "$ref": "#/components/schemas/PathOutput" + "$ref": "#/components/schemas/_OpenAPIGenBaseModel" }, { "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", + "type": "string" + }, "type": { "title": "Type", - "default": "TaskPathReturn", - "pattern": "^TaskPathReturn$", + "default": "UserPrivate", "type": "string", + "pattern": "^UserPrivate$", "readOnly": true } - } + }, + "required": [ + "id", + "email", + "username" + ] } ], - "title": "TaskPathReturn", - "description": "A Task output that returns a file or a folder output from a function or a DAG.", + "title": "UserPrivate", "discriminator": { "propertyName": "type" } }, - "DAGTask": { + "StepList": { "allOf": [ { "$ref": "#/components/schemas/_OpenAPIGenBaseModel" }, { "type": "object", + "required": [ + "page", + "per_page", + "page_count", + "total_count", + "resources" + ], "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" + "page": { + "title": "Page", + "description": "The current page the pagination request is on", + "type": "integer", + "format": "int32" }, - "type": { - "title": "Type", - "default": "DAGTask", - "pattern": "^DAGTask$", - "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" }, - "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" - } + "total_count": { + "title": "Total Count", + "description": "The total number of resources matching the list request", + "type": "integer", + "format": "int32" }, - "arguments": { - "title": "Arguments", - "description": "The input arguments for this task.", + "resources": { + "title": "Resources", "type": "array", "items": { - "anyOf": [ - { - "$ref": "#/components/schemas/TaskArgument" - }, - { - "$ref": "#/components/schemas/TaskPathArgument" - } - ] + "$ref": "#/components/schemas/StepStatus" } }, - "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" + "next_page": { + "title": "Next Page", + "description": "The next page, if this on is not the last", + "type": "integer", + "format": "int32" }, - "returns": { - "title": "Returns", - "description": "List of task returns.", - "type": "array", - "items": { - "anyOf": [ - { - "$ref": "#/components/schemas/TaskReturn" - }, - { - "$ref": "#/components/schemas/TaskPathReturn" - } - ] - } + "type": { + "title": "Type", + "default": "StepList", + "type": "string", + "pattern": "^StepList$", + "readOnly": true } - }, - "required": [ - "name", - "template" - ] + } } ], - "title": "DAGTask", - "description": "A single task in a DAG flow.", + "title": "StepList", + "description": "A list response from a pagination request", "discriminator": { "propertyName": "type" } }, - "DAG": { + "TeamMemberList": { "allOf": [ { "$ref": "#/components/schemas/_OpenAPIGenBaseModel" @@ -15369,127 +19822,62 @@ { "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/TeamMember" } }, - "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": "TeamMemberList", "type": "string", + "pattern": "^TeamMemberList$", "readOnly": true } } } ], - "title": "DAG", - "description": "A Directed Acyclic Graph containing a list of tasks.", + "title": "TeamMemberList", + "description": "A list response from a pagination request", "discriminator": { "propertyName": "type" } @@ -15561,155 +19949,164 @@ "propertyName": "type" } }, - "PackageVersion": { + "TeamCreate": { "allOf": [ { "$ref": "#/components/schemas/_OpenAPIGenBaseModel" }, { "type": "object", - "required": [ - "name", - "tag", - "url", - "created", - "digest" - ], "properties": { "name": { "title": "Name", - "description": "Package name. Make it descriptive and helpful ;)", - "type": "string" - }, - "tag": { - "title": "Tag", - "description": "The tag of the package", + "example": "Honeybee Contributors", "type": "string" }, - "url": { - "title": "Url", + "description": { + "title": "Description", + "example": "The Honeybee team works on all things energy modelling", "type": "string" }, - "created": { - "title": "Created", + "type": { + "title": "Type", + "default": "TeamCreate", "type": "string", - "format": "date-time" - }, - "digest": { - "title": "Digest", + "pattern": "^TeamCreate$", + "readOnly": true + } + }, + "required": [ + "name" + ] + } + ], + "title": "TeamCreate", + "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" }, - "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", + "name": { + "title": "Name", + "description": "A name of the config plan used to create this subscription", "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", + "account_types": { + "description": "The types of account to which the plan can be applied", "type": "array", "items": { - "$ref": "#/components/schemas/Maintainer" - } - }, - "home": { - "title": "Home", - "description": "The URL of this package's home page", - "type": "string" + "$ref": "#/components/schemas/AccountType" + }, + "uniqueItems": true }, - "sources": { - "title": "Sources", - "description": "A list of URLs to source code for this project", + "quotas": { + "title": "Quotas", + "description": "A list of quota plans for a given subscription", + "default": [], "type": "array", "items": { - "type": "string" + "$ref": "#/components/schemas/QuotaPlan" } }, - "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" + "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" + } + }, + "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" }, - "license": { - "title": "License", - "description": "The license information.", + "subscription_plan": { + "title": "Subscription Plan", + "description": "A subscription plan", "allOf": [ { - "$ref": "#/components/schemas/License" + "$ref": "#/components/schemas/SubscriptionPlan" } ] }, - "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", + "external_id": { + "title": "External Id", + "description": "The ID of this subscription", "type": "string" }, - "manifest": { - "title": "Manifest", - "description": "The package Recipe or Plugin manifest", - "anyOf": [ - { - "$ref": "#/components/schemas/Recipe" - }, - { - "$ref": "#/components/schemas/Plugin" - } - ] + "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": "PackageVersion", - "pattern": "^PackageVersion$", + "default": "PollinationSubscription", "type": "string", + "pattern": "^PollinationSubscription$", "readOnly": true } } } ], - "title": "PackageVersion", - "description": "Package Version\n\nA MetaData object to distinguish a specific package version within a repository\nindex.", + "title": "PollinationSubscription", "discriminator": { "propertyName": "type" } }, - "RepositoryIndex": { + "UpdateAccepted": { "allOf": [ { "$ref": "#/components/schemas/_OpenAPIGenBaseModel" @@ -15717,100 +20114,28 @@ { "type": "object", "properties": { + "status": { + "title": "Status", + "default": "accepted", + "type": "string" + }, "type": { "title": "Type", - "default": "RepositoryIndex", - "pattern": "^RepositoryIndex$", + "default": "UpdateAccepted", "type": "string", + "pattern": "^UpdateAccepted$", "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": "RepositoryIndex", - "description": "A searchable index for a Queenbee Plugin and Recipe repository", + "title": "UpdateAccepted", + "description": "Accepted request response for existing resource", "discriminator": { "propertyName": "type" } }, - "JobStatusEnum": { - "title": "JobStatusEnum", - "description": "Enumaration of allowable status strings", - "enum": [ - "Created", - "Pre-Processing", - "Running", - "Failed", - "Cancelled", - "Completed", - "Unknown" - ], - "type": "string" - }, - "JobStatus": { + "ProjectRecipeFilter": { "allOf": [ { "$ref": "#/components/schemas/_OpenAPIGenBaseModel" @@ -15818,190 +20143,167 @@ { "type": "object", "properties": { - "id": { - "title": "Id", - "description": "The ID of the individual job.", + "owner": { + "title": "Owner", + "description": "The name of the account the recipe belongs to", + "example": "ladybug-tools", "type": "string" }, - "started_at": { - "title": "Started At", - "description": "The time at which the job was started", - "type": "string", - "format": "date-time" + "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": "JobStatus", - "pattern": "^JobStatus$", + "default": "ProjectRecipeFilter", "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" - } - }, - "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", + } + }, + "required": [ + "owner", + "name" + ] + } + ], + "title": "ProjectRecipeFilter", + "discriminator": { + "propertyName": "type" + } + }, + "PaymentSetup": { + "allOf": [ + { + "$ref": "#/components/schemas/_SecureResourcePublic" + }, + { + "type": "object", + "properties": { + "type": { + "title": "Type", + "default": "PaymentSetup", "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" + "pattern": "^PaymentSetup$", + "readOnly": true + } + } + } + ], + "title": "PaymentSetup", + "discriminator": { + "propertyName": "type" + } + }, + "LicensePoolUpdate": { + "allOf": [ + { + "$ref": "#/components/schemas/_OpenAPIGenBaseModel" + }, + { + "type": "object", + "properties": { + "description": { + "title": "Description", + "description": "The description of the license pool", + "type": "string" }, - "runs_cancelled": { - "title": "Runs Cancelled", - "description": "The count of runs that have been cancelled", - "default": 0, - "type": "integer", - "format": "int32" + "type": { + "title": "Type", + "default": "LicensePoolUpdate", + "type": "string", + "pattern": "^LicensePoolUpdate$", + "readOnly": true } - }, - "required": [ - "id", - "started_at" - ] + } } ], - "title": "JobStatus", - "description": "Parametric Job Status.", + "title": "LicensePoolUpdate", "discriminator": { "propertyName": "type" } }, - "CloudJob": { + "Organization": { "allOf": [ { - "$ref": "#/components/schemas/_OpenAPIGenBaseModel" + "$ref": "#/components/schemas/OrganizationUpdate" }, { "type": "object", + "required": [ + "id", + "owner" + ], "properties": { "id": { "title": "Id", - "description": "The unique ID for this run", + "description": "The org ID", + "example": "1eb8e60d-771d-4a30-8078-fe553eb2f0bc", "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", + "description": "The account the organization represents", + "example": { + "id": "e4d0d922-2031-4b39-94d2-aa6d584d6bb2", + "type": "org", + "name": "ladybug-tools" + }, "allOf": [ { "$ref": "#/components/schemas/AccountPublic" } ] }, - "recipe": { - "title": "Recipe", - "description": "The recipe used to generate this ", + "role": { + "description": "The role the user has within the organization", + "example": "member", "allOf": [ { - "$ref": "#/components/schemas/RecipeInterface" + "$ref": "#/components/schemas/OrganizationRoleEnum" } ] }, - "status": { - "title": "Status", - "description": "The status of the job", - "allOf": [ - { - "$ref": "#/components/schemas/JobStatus" - } - ] + "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": "CloudJob", + "default": "Organization", "type": "string", - "pattern": "^CloudJob$", + "pattern": "^Organization$", "readOnly": true } - }, - "required": [ - "id", - "spec" - ] + } } ], - "title": "CloudJob", + "title": "Organization", "discriminator": { "propertyName": "type" } }, - "CloudJobList": { + "OrganizationList": { "allOf": [ { "$ref": "#/components/schemas/_OpenAPIGenBaseModel" @@ -16044,7 +20346,7 @@ "title": "Resources", "type": "array", "items": { - "$ref": "#/components/schemas/CloudJob" + "$ref": "#/components/schemas/Organization" } }, "next_page": { @@ -16055,21 +20357,44 @@ }, "type": { "title": "Type", - "default": "CloudJobList", + "default": "OrganizationList", "type": "string", - "pattern": "^CloudJobList$", + "pattern": "^OrganizationList$", "readOnly": true } } } ], - "title": "CloudJobList", + "title": "OrganizationList", "description": "A list response from a pagination request", "discriminator": { "propertyName": "type" } }, - "FileMeta": { + "SubscriptionItem": { + "allOf": [ + { + "$ref": "#/components/schemas/ExternalResource" + }, + { + "type": "object", + "properties": { + "type": { + "title": "Type", + "default": "SubscriptionItem", + "type": "string", + "pattern": "^SubscriptionItem$", + "readOnly": true + } + } + } + ], + "title": "SubscriptionItem", + "discriminator": { + "propertyName": "type" + } + }, + "SubscriptionUpdate": { "allOf": [ { "$ref": "#/components/schemas/_OpenAPIGenBaseModel" @@ -16077,72 +20402,86 @@ { "type": "object", "properties": { - "key": { - "title": "Key", - "type": "string" + "to_subscribe": { + "title": "To Subscribe", + "description": "The Pollination plan to subscribe to", + "allOf": [ + { + "$ref": "#/components/schemas/Price" + } + ] }, - "file_type": { - "title": "File Type", - "type": "string" + "to_add": { + "title": "To Add", + "description": "The items to add", + "default": [], + "type": "array", + "items": { + "$ref": "#/components/schemas/NewSubscriptionItem" + } }, - "file_name": { - "title": "File Name", - "type": "string" + "to_update": { + "title": "To Update", + "description": "The items to update", + "default": [], + "type": "array", + "items": { + "$ref": "#/components/schemas/SubscriptionItem" + } }, - "last_modified": { - "title": "Last Modified", - "type": "string", - "format": "date-time" + "to_delete": { + "title": "To Delete", + "description": "The items to delete", + "default": [], + "type": "array", + "items": { + "$ref": "#/components/schemas/SubscriptionItem" + } }, - "size": { - "title": "Size", - "type": "integer", - "format": "int32" + "promotion_code": { + "title": "Promotion Code", + "description": "A promotion code to apply a discount to the subscription", + "type": "string" }, "type": { "title": "Type", - "default": "FileMeta", + "default": "SubscriptionUpdate", "type": "string", - "pattern": "^FileMeta$", + "pattern": "^SubscriptionUpdate$", "readOnly": true } - }, - "required": [ - "key", - "file_type", - "file_name" - ] + } } ], - "title": "FileMeta", + "title": "SubscriptionUpdate", "discriminator": { "propertyName": "type" } }, - "ProjectPolicySubject": { + "TeamUpdate": { "allOf": [ { - "$ref": "#/components/schemas/PolicySubject" + "$ref": "#/components/schemas/TeamCreate" }, { "type": "object", "properties": { "type": { "title": "Type", - "default": "ProjectPolicySubject", + "default": "TeamUpdate", "type": "string", - "pattern": "^ProjectPolicySubject$", + "pattern": "^TeamUpdate$", "readOnly": true } } } ], - "title": "ProjectPolicySubject", + "title": "TeamUpdate", "discriminator": { "propertyName": "type" } }, - "S3UploadRequest": { + "Subscribe": { "allOf": [ { "$ref": "#/components/schemas/_OpenAPIGenBaseModel" @@ -16150,105 +20489,125 @@ { "type": "object", "properties": { - "url": { - "title": "Url", - "type": "string" - }, - "fields": { - "title": "Fields", - "type": "object", - "additionalProperties": { - "type": "string" - } + "plan": { + "title": "Plan", + "description": "The initial plan with which to create the subscription", + "allOf": [ + { + "$ref": "#/components/schemas/Price" + } + ] }, "type": { "title": "Type", - "default": "S3UploadRequest", + "default": "Subscribe", "type": "string", - "pattern": "^S3UploadRequest$", + "pattern": "^Subscribe$", "readOnly": true } }, "required": [ - "url", - "fields" + "plan" ] } ], - "title": "S3UploadRequest", + "title": "Subscribe", "discriminator": { "propertyName": "type" } }, - "ProjectList": { + "PluginPackage": { "allOf": [ { - "$ref": "#/components/schemas/_OpenAPIGenBaseModel" + "$ref": "#/components/schemas/RepositoryPackage" }, { "type": "object", "required": [ - "page", - "per_page", - "page_count", - "total_count", - "resources" + "manifest" ], "properties": { - "page": { - "title": "Page", - "description": "The current page the pagination request is on", - "type": "integer", - "format": "int32" + "manifest": { + "$ref": "#/components/schemas/Plugin" + }, + "type": { + "title": "Type", + "default": "PluginPackage", + "type": "string", + "pattern": "^PluginPackage$", + "readOnly": true + } + } + } + ], + "title": "PluginPackage", + "discriminator": { + "propertyName": "type" + } + }, + "RepositoryMetadata": { + "allOf": [ + { + "$ref": "#/components/schemas/_OpenAPIGenBaseModel" + }, + { + "type": "object", + "properties": { + "type": { + "title": "Type", + "default": "RepositoryMetadata", + "pattern": "^RepositoryMetadata$", + "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" + "name": { + "title": "Name", + "description": "The name of the repository", + "type": "string" }, - "total_count": { - "title": "Total Count", - "description": "The total number of resources matching the list request", - "type": "integer", - "format": "int32" + "description": { + "title": "Description", + "description": "A short description of the repository", + "default": "A Queenbee package repository", + "type": "string" }, - "resources": { - "title": "Resources", - "type": "array", - "items": { - "$ref": "#/components/schemas/Project" - } + "source": { + "title": "Source", + "description": "The source path (url or local) to the repository", + "type": "string" }, - "next_page": { - "title": "Next Page", - "description": "The next page, if this on is not the last", + "plugin_count": { + "title": "Plugin Count", + "description": "The number of plugins hosted by the repository", + "default": 0, "type": "integer", "format": "int32" }, - "type": { - "title": "Type", - "default": "ProjectList", - "type": "string", - "pattern": "^ProjectList$", - "readOnly": true + "recipe_count": { + "title": "Recipe Count", + "description": "The number of recipes hosted by the repository", + "default": 0, + "type": "integer", + "format": "int32" } } } ], - "title": "ProjectList", - "description": "A list response from a pagination request", + "title": "RepositoryMetadata", + "description": "BaseModel with functionality to return the object as a yaml string.", "discriminator": { "propertyName": "type" } }, - "PublicAccountList": { + "PluginPackageList": { "allOf": [ { "$ref": "#/components/schemas/_OpenAPIGenBaseModel" @@ -16291,7 +20650,7 @@ "title": "Resources", "type": "array", "items": { - "$ref": "#/components/schemas/AccountPublic" + "$ref": "#/components/schemas/PluginPackage" } }, "next_page": { @@ -16302,21 +20661,21 @@ }, "type": { "title": "Type", - "default": "PublicAccountList", + "default": "PluginPackageList", "type": "string", - "pattern": "^PublicAccountList$", + "pattern": "^PluginPackageList$", "readOnly": true } } } ], - "title": "PublicAccountList", + "title": "PluginPackageList", "description": "A list response from a pagination request", "discriminator": { "propertyName": "type" } }, - "UserPrivate": { + "ProjectUpdate": { "allOf": [ { "$ref": "#/components/schemas/_OpenAPIGenBaseModel" @@ -16324,468 +20683,206 @@ { "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", + "description": "The name of the project. Must be unique to a given owner", + "example": "Project Falcon", "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", - "type": "string" - }, - "type": { - "title": "Type", - "default": "UserPrivate", - "type": "string", - "pattern": "^UserPrivate$", - "readOnly": true - } - }, - "required": [ - "id", - "email", - "username" - ] - } - ], - "title": "UserPrivate", - "discriminator": { - "propertyName": "type" - } - }, - "Organization": { - "allOf": [ - { - "$ref": "#/components/schemas/OrganizationUpdate" - }, - { - "type": "object", - "required": [ - "id", - "owner" - ], - "properties": { - "id": { - "title": "Id", - "description": "The org ID", - "example": "1eb8e60d-771d-4a30-8078-fe553eb2f0bc", + "description": "A description of the project", + "example": "I always wanted to have a project called project Falcon", "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" + "public": { + "title": "Public", + "description": "Whether or not a project is publicly viewable", + "type": "boolean" }, "type": { "title": "Type", - "default": "Organization", + "default": "ProjectUpdate", "type": "string", - "pattern": "^Organization$", + "pattern": "^ProjectUpdate$", "readOnly": true } } } ], - "title": "Organization", + "title": "ProjectUpdate", "discriminator": { "propertyName": "type" } }, - "OrganizationList": { + "KeyRequest": { "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" - } - }, - "next_page": { - "title": "Next Page", - "description": "The next page, if this on is not the last", - "type": "integer", - "format": "int32" + "key": { + "title": "Key", + "type": "string" }, "type": { "title": "Type", - "default": "OrganizationList", + "default": "KeyRequest", "type": "string", - "pattern": "^OrganizationList$", + "pattern": "^KeyRequest$", "readOnly": true } - } + }, + "required": [ + "key" + ] } ], - "title": "OrganizationList", - "description": "A list response from a pagination request", + "title": "KeyRequest", "discriminator": { "propertyName": "type" } }, - "APITokenPrivate": { + "NewRecipePackage": { "allOf": [ { - "$ref": "#/components/schemas/APITokenCreate" + "$ref": "#/components/schemas/_OpenAPIGenBaseModel" }, { "type": "object", - "required": [ - "token" - ], "properties": { - "token": { - "title": "Token", - "description": "The decoded API token", + "manifest": { + "title": "Manifest", + "description": "The Recipe manifest to be created", + "allOf": [ + { + "$ref": "#/components/schemas/Recipe" + } + ] + }, + "readme": { + "title": "Readme", + "description": "The README file to attach to this package", + "default": "", "type": "string" }, "type": { "title": "Type", - "default": "APITokenPrivate", + "default": "NewRecipePackage", "type": "string", - "pattern": "^APITokenPrivate$", + "pattern": "^NewRecipePackage$", "readOnly": true } - } + }, + "required": [ + "manifest" + ] } ], - "title": "APITokenPrivate", + "title": "NewRecipePackage", "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": { + "Quota": { "allOf": [ { "$ref": "#/components/schemas/_OpenAPIGenBaseModel" }, { "type": "object", - "required": [ - "inputs", - "outputs", - "started_at", - "id", - "name", - "status_type", - "template_ref", - "children_ids", - "outbound_steps" - ], "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" + "type": { + "description": "The type of resource", + "allOf": [ + { + "$ref": "#/components/schemas/QuotaType" + } + ], + "readOnly": true }, - "status_type": { - "description": "The type of step this status is for. Can be \"Function\", \"DAG\" or \"Loop\"", + "owner": { + "title": "Owner", + "description": "The quota owner", "allOf": [ { - "$ref": "#/components/schemas/StatusType" + "$ref": "#/components/schemas/AccountPublic" } ] }, - "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" - } + "id": { + "title": "Id", + "description": "The unique ID for this Quota", + "type": "string", + "format": "uuid" }, - "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" - } + "period_start": { + "title": "Period Start", + "description": "The start of the quota usage tracking period", + "type": "string", + "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" - } + "limit": { + "title": "Limit", + "description": "The maximum amount of a resource the account can consume", + "type": "number", + "format": "double" }, - "message": { - "title": "Message", - "description": "Any message produced by the task. Usually error/debugging hints.", - "type": "string" + "usage": { + "title": "Usage", + "description": "The current amount of a resource allocated to the account linked to the subscription", + "minimum": 0, + "type": "number", + "format": "double" }, - "finished_at": { - "title": "Finished At", - "description": "The time at which the task was completed", - "type": "string", - "format": "date-time" + "resets": { + "title": "Resets", + "description": "Whether consumption is reset to 0 every billing period", + "default": false, + "type": "boolean" }, - "source": { - "title": "Source", - "description": "Source url for the status object. It can be a recipe or a function.", - "type": "string" + "enforced": { + "title": "Enforced", + "description": "Whether the limit triggers a blocking response from the server", + "default": false, + "type": "boolean" }, - "status": { - "description": "The status of this step.", - "default": "Unknown", - "allOf": [ - { - "$ref": "#/components/schemas/StepStatusEnum" - } - ] + "exceeded": { + "title": "Exceeded", + "description": "Whether the resource usage is greater than or equal to the limit", + "default": false, + "type": "boolean" }, - "command": { - "title": "Command", - "description": "The command used to run this step. Only applies to Function steps.", + "display_name": { + "title": "Display Name", + "description": "The human-readable name", "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.", + "description": { + "title": "Description", + "description": "The description", "type": "string" }, - "type": { - "title": "Type", - "default": "StepStatus", - "pattern": "^StepStatus$", - "type": "string", - "readOnly": true + "unit": { + "title": "Unit", + "description": "The unit in which the usage and limit are measured", + "type": "string" } - } + }, + "required": [ + "type", + "owner" + ] } ], - "title": "StepStatus", - "description": "The Status of a Job Step", + "title": "Quota", "discriminator": { "propertyName": "type" } }, - "RunStatus": { + "PackageVersion": { "allOf": [ { "$ref": "#/components/schemas/_OpenAPIGenBaseModel" @@ -16793,99 +20890,34 @@ { "type": "object", "required": [ - "inputs", - "outputs", - "started_at", - "id", - "job_id" + "name", + "tag", + "url", + "created", + "digest" ], "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" - } - ] - } + "name": { + "title": "Name", + "description": "Package name. Make it descriptive and helpful ;)", + "type": "string" }, - "outputs": { - "title": "Outputs", - "description": "The outputs produced by this run.", - "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" - } - ] - } + "tag": { + "title": "Tag", + "description": "The tag of the package", + "type": "string" }, - "started_at": { - "title": "Started At", - "description": "The time at which the task was started", + "url": { + "title": "Url", + "type": "string" + }, + "created": { + "title": "Created", "type": "string", "format": "date-time" }, - "id": { - "title": "Id", - "description": "The ID of the individual run.", - "type": "string" - }, - "job_id": { - "title": "Job Id", - "description": "The ID of the job that generated this run.", + "digest": { + "title": "Digest", "type": "string" }, "annotations": { @@ -16896,214 +20928,219 @@ "type": "string" } }, - "message": { - "title": "Message", - "description": "Any message produced by the task. Usually error/debugging hints.", + "app_version": { + "title": "App Version", + "description": "The version of the application code underlying the manifest", "type": "string" }, - "finished_at": { - "title": "Finished At", - "description": "The time at which the task was completed", - "type": "string", - "format": "date-time" + "keywords": { + "title": "Keywords", + "description": "A list of keywords to search the package by", + "type": "array", + "items": { + "type": "string" + } }, - "source": { - "title": "Source", - "description": "Source url for the status object. It can be a recipe or a function.", - "type": "string" + "maintainers": { + "title": "Maintainers", + "description": "A list of maintainers for the package", + "type": "array", + "items": { + "$ref": "#/components/schemas/Maintainer" + } }, - "api_version": { - "title": "Api Version", - "default": "v1beta1", - "readOnly": true, - "pattern": "^v1beta1$", + "home": { + "title": "Home", + "description": "The URL of this package's home page", "type": "string" }, - "entrypoint": { - "title": "Entrypoint", - "description": "The ID of the first step in the run.", - "type": "string" + "sources": { + "title": "Sources", + "description": "A list of URLs to source code for this project", + "type": "array", + "items": { + "type": "string" + } }, - "status": { - "description": "The status of this run.", - "default": "Unknown", - "allOf": [ - { - "$ref": "#/components/schemas/RunStatusEnum" - } - ] + "icon": { + "title": "Icon", + "description": "A URL to an SVG or PNG image to be used as an icon", + "type": "string" }, - "steps": { - "title": "Steps", - "default": {}, - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/StepStatus" - } + "deprecated": { + "title": "Deprecated", + "description": "Whether this package is deprecated", + "type": "boolean" }, - "type": { - "title": "Type", - "default": "RunStatus", - "pattern": "^RunStatus$", - "type": "string", - "readOnly": true - } - } - } - ], - "title": "RunStatus", - "description": "Job Status.", - "discriminator": { - "propertyName": "type" - } - }, - "Run": { - "allOf": [ - { - "$ref": "#/components/schemas/_OpenAPIGenBaseModel" - }, - { - "type": "object", - "properties": { - "id": { - "title": "Id", - "description": "The unique ID for this run", + "description": { + "title": "Description", + "description": "A description of what this package does", "type": "string" }, - "author": { - "title": "Author", - "description": "author", + "license": { + "title": "License", + "description": "The license information.", "allOf": [ { - "$ref": "#/components/schemas/AccountPublic" + "$ref": "#/components/schemas/License" } ] }, - "owner": { - "title": "Owner", - "description": "owner", - "allOf": [ - { - "$ref": "#/components/schemas/AccountPublic" - } - ] + "slug": { + "title": "Slug", + "description": "A slug of the repository name and the package name.", + "type": "string" }, - "recipe": { - "title": "Recipe", - "description": "The recipe used to generate this ", - "allOf": [ - { - "$ref": "#/components/schemas/RecipeInterface" - } - ] + "kind": { + "title": "Kind", + "description": "The type of Queenbee package (ie: recipe or plugin)", + "default": "", + "type": "string" }, - "generation": { - "title": "Generation", - "description": "The generation of this run", - "type": "number", - "format": "double" + "readme": { + "title": "Readme", + "description": "The README file string for this package", + "type": "string" }, - "status": { - "title": "Status", - "description": "The status of the run", - "allOf": [ + "manifest": { + "title": "Manifest", + "description": "The package Recipe or Plugin manifest", + "anyOf": [ { - "$ref": "#/components/schemas/RunStatus" + "$ref": "#/components/schemas/Recipe" + }, + { + "$ref": "#/components/schemas/Plugin" } ] }, "type": { "title": "Type", - "default": "Run", + "default": "PackageVersion", + "pattern": "^PackageVersion$", "type": "string", - "pattern": "^Run$", "readOnly": true } - }, - "required": [ - "id" - ] + } } ], - "title": "Run", + "title": "PackageVersion", + "description": "Package Version\n\nA MetaData object to distinguish a specific package version within a repository\nindex.", "discriminator": { "propertyName": "type" } }, - "TeamUpdate": { + "RepositoryIndex": { "allOf": [ { - "$ref": "#/components/schemas/TeamCreate" + "$ref": "#/components/schemas/_OpenAPIGenBaseModel" }, { "type": "object", "properties": { "type": { "title": "Type", - "default": "TeamUpdate", + "default": "RepositoryIndex", + "pattern": "^RepositoryIndex$", "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" + }, + "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": "TeamUpdate", + "title": "RepositoryIndex", + "description": "A searchable index for a Queenbee Plugin and Recipe repository", "discriminator": { "propertyName": "type" } }, - "NewPluginPackage": { + "APITokenCreate": { "allOf": [ { - "$ref": "#/components/schemas/_OpenAPIGenBaseModel" + "$ref": "#/components/schemas/APIToken" }, { "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", + "default": "APITokenCreate", "type": "string", - "pattern": "^NewPluginPackage$", + "pattern": "^APITokenCreate$", "readOnly": true } - }, - "required": [ - "manifest" - ] + } } ], - "title": "NewPluginPackage", + "title": "APITokenCreate", "discriminator": { "propertyName": "type" } }, - "TeamRoleEnum": { - "title": "TeamRoleEnum", - "description": "An enumeration.", - "enum": [ - "owner", - "member" - ], - "type": "string" - }, - "TeamMember": { + "UpdateInvoicePreview": { "allOf": [ { "$ref": "#/components/schemas/_OpenAPIGenBaseModel" @@ -17111,44 +21148,62 @@ { "type": "object", "properties": { - "user": { - "title": "User", - "description": "The team member", + "immediate": { + "title": "Immediate", + "description": "The invoice that will be finalized right after changes are applied", "allOf": [ { - "$ref": "#/components/schemas/UserPublic" + "$ref": "#/components/schemas/InvoicePreview" } ] }, - "role": { - "description": "The role the user has within the team", - "example": "member", + "upcoming": { + "title": "Upcoming", + "description": "The invoice that will be finalized at the end of the current billing cycle", "allOf": [ { - "$ref": "#/components/schemas/TeamRoleEnum" + "$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": "TeamMember", + "default": "UpdateInvoicePreview", "type": "string", - "pattern": "^TeamMember$", + "pattern": "^UpdateInvoicePreview$", "readOnly": true } }, "required": [ - "user", - "role" + "immediate", + "upcoming" ] } ], - "title": "TeamMember", + "title": "UpdateInvoicePreview", "discriminator": { "propertyName": "type" } }, - "StepList": { + "TeamList": { "allOf": [ { "$ref": "#/components/schemas/_OpenAPIGenBaseModel" @@ -17191,7 +21246,7 @@ "title": "Resources", "type": "array", "items": { - "$ref": "#/components/schemas/StepStatus" + "$ref": "#/components/schemas/Team" } }, "next_page": { @@ -17202,129 +21257,156 @@ }, "type": { "title": "Type", - "default": "StepList", + "default": "TeamList", "type": "string", - "pattern": "^StepList$", + "pattern": "^TeamList$", "readOnly": true } } } ], - "title": "StepList", + "title": "TeamList", "description": "A list response from a pagination request", "discriminator": { "propertyName": "type" } }, - "OrganizationCreate": { + "OrganizationUpdate": { "allOf": [ { - "$ref": "#/components/schemas/OrganizationUpdate" + "$ref": "#/components/schemas/_OpenAPIGenBaseModel" }, { "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" + }, + "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": "OrganizationCreate", + "default": "OrganizationUpdate", "type": "string", - "pattern": "^OrganizationCreate$", + "pattern": "^OrganizationUpdate$", "readOnly": true } } } ], - "title": "OrganizationCreate", + "title": "OrganizationUpdate", "discriminator": { "propertyName": "type" } }, - "CreatedContent": { + "Body_post_recipe__owner__recipes_post": { + "allOf": [ + { + "$ref": "#/components/schemas/_OpenAPIGenBaseModel" + }, + { + "type": "object", + "properties": { + "package": { + "title": "Recipe Package", + "type": "string", + "format": "binary" + }, + "type": { + "title": "Type", + "default": "Body_post_recipe__owner__recipes_post", + "type": "string", + "pattern": "^Body_post_recipe__owner__recipes_post$", + "readOnly": true + } + }, + "required": [ + "package" + ] + } + ], + "title": "Body_post_recipe__owner__recipes_post", + "discriminator": { + "propertyName": "type" + } + }, + "ProjectPolicySubject": { "allOf": [ { - "$ref": "#/components/schemas/_OpenAPIGenBaseModel" + "$ref": "#/components/schemas/PolicySubject" }, { "type": "object", "properties": { - "id": { - "title": "Id", - "description": "Id for the newly created resource.", - "example": "3fa85f64-5717-4562-b3fc-2c963f66afa6", - "type": "string", - "format": "uuid" - }, - "message": { - "title": "Message", - "description": " A human readable message", - "example": "Use Location in headers to access the new object.", - "type": "string" - }, "type": { "title": "Type", - "default": "CreatedContent", + "default": "ProjectPolicySubject", "type": "string", - "pattern": "^CreatedContent$", + "pattern": "^ProjectPolicySubject$", "readOnly": true } - }, - "required": [ - "id" - ] + } } ], - "title": "CreatedContent", - "description": "Content for created response.", + "title": "ProjectPolicySubject", "discriminator": { "propertyName": "type" } }, - "ProjectAccessPolicy": { + "PaymentCreate": { "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" - } - ] + "description": { + "title": "Description", + "description": "The description of this payment method", + "type": "string" }, "type": { "title": "Type", - "default": "ProjectAccessPolicy", + "default": "PaymentCreate", "type": "string", - "pattern": "^ProjectAccessPolicy$", + "pattern": "^PaymentCreate$", "readOnly": true } } } ], - "title": "ProjectAccessPolicy", + "title": "PaymentCreate", "discriminator": { "propertyName": "type" } }, - "ProjectAccessPolicyList": { + "QuotaList": { "allOf": [ { "$ref": "#/components/schemas/_OpenAPIGenBaseModel" @@ -17367,7 +21449,7 @@ "title": "Resources", "type": "array", "items": { - "$ref": "#/components/schemas/ProjectAccessPolicy" + "$ref": "#/components/schemas/Quota" } }, "next_page": { @@ -17378,67 +21460,52 @@ }, "type": { "title": "Type", - "default": "ProjectAccessPolicyList", + "default": "QuotaList", "type": "string", - "pattern": "^ProjectAccessPolicyList$", + "pattern": "^QuotaList$", "readOnly": true } } } ], - "title": "ProjectAccessPolicyList", + "title": "QuotaList", "description": "A list response from a pagination request", "discriminator": { "propertyName": "type" } }, - "UserUpdate": { + "APITokenPrivate": { "allOf": [ { - "$ref": "#/components/schemas/_OpenAPIGenBaseModel" + "$ref": "#/components/schemas/APITokenCreate" }, { "type": "object", + "required": [ + "token" + ], "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", + "token": { + "title": "Token", + "description": "The decoded API token", "type": "string" }, "type": { "title": "Type", - "default": "UserUpdate", + "default": "APITokenPrivate", "type": "string", - "pattern": "^UserUpdate$", + "pattern": "^APITokenPrivate$", "readOnly": true } - }, - "required": [ - "name", - "picture_url" - ] + } } ], - "title": "UserUpdate", + "title": "APITokenPrivate", "discriminator": { "propertyName": "type" } }, - "NewRecipePackage": { + "RepositoryUpdate": { "allOf": [ { "$ref": "#/components/schemas/_OpenAPIGenBaseModel" @@ -17446,108 +21513,89 @@ { "type": "object", "properties": { - "manifest": { - "title": "Manifest", - "description": "The Recipe manifest to be created", - "allOf": [ - { - "$ref": "#/components/schemas/Recipe" - } - ] + "public": { + "title": "Public", + "description": "Whether or not a repository is publicly viewable", + "type": "boolean" }, - "readme": { - "title": "Readme", - "description": "The README file to attach to this package", - "default": "", + "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": "NewRecipePackage", + "default": "RepositoryUpdate", "type": "string", - "pattern": "^NewRecipePackage$", + "pattern": "^RepositoryUpdate$", "readOnly": true } - }, - "required": [ - "manifest" - ] + } } ], - "title": "NewRecipePackage", + "title": "RepositoryUpdate", "discriminator": { "propertyName": "type" } }, - "OrganizationMemberList": { + "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/OrganizationMember" + "$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": "OrganizationMemberList", + "default": "InvoiceList", "type": "string", - "pattern": "^OrganizationMemberList$", + "pattern": "^InvoiceList$", "readOnly": true } - } + }, + "required": [ + "resources", + "has_more" + ] } ], - "title": "OrganizationMemberList", - "description": "A list response from a pagination request", + "title": "InvoiceList", "discriminator": { "propertyName": "type" } }, - "RepositoryAccessPolicyList": { + "RunResultList": { "allOf": [ { "$ref": "#/components/schemas/_OpenAPIGenBaseModel" @@ -17590,7 +21638,65 @@ "title": "Resources", "type": "array", "items": { - "$ref": "#/components/schemas/RepositoryAccessPolicy" + "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" + } + ] + } } }, "next_page": { @@ -17601,148 +21707,108 @@ }, "type": { "title": "Type", - "default": "RepositoryAccessPolicyList", + "default": "RunResultList", "type": "string", - "pattern": "^RepositoryAccessPolicyList$", + "pattern": "^RunResultList$", "readOnly": true } } } ], - "title": "RepositoryAccessPolicyList", + "title": "RunResultList", "description": "A list response from a pagination request", "discriminator": { "propertyName": "type" } }, - "UpdateAccepted": { + "PaymentIntent": { "allOf": [ { - "$ref": "#/components/schemas/_OpenAPIGenBaseModel" + "$ref": "#/components/schemas/_SecureResourcePublic" }, { "type": "object", "properties": { - "status": { - "title": "Status", - "default": "accepted", - "type": "string" - }, "type": { "title": "Type", - "default": "UpdateAccepted", + "default": "PaymentIntent", "type": "string", - "pattern": "^UpdateAccepted$", + "pattern": "^PaymentIntent$", "readOnly": true } } } ], - "title": "UpdateAccepted", - "description": "Accepted request response for existing resource", + "title": "PaymentIntent", "discriminator": { "propertyName": "type" } }, - "RecipeInterfaceList": { + "NewPluginPackage": { "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/RecipeInterface" - } + "manifest": { + "title": "Manifest", + "description": "The Plugin manifest to be created", + "allOf": [ + { + "$ref": "#/components/schemas/Plugin" + } + ] }, - "next_page": { - "title": "Next Page", - "description": "The next page, if this on is not the last", - "type": "integer", - "format": "int32" + "readme": { + "title": "Readme", + "description": "The README file to attach to this package", + "default": "", + "type": "string" }, "type": { "title": "Type", - "default": "RecipeInterfaceList", + "default": "NewPluginPackage", "type": "string", - "pattern": "^RecipeInterfaceList$", + "pattern": "^NewPluginPackage$", "readOnly": true } - } + }, + "required": [ + "manifest" + ] } ], - "title": "RecipeInterfaceList", - "description": "A list response from a pagination request", + "title": "NewPluginPackage", "discriminator": { "propertyName": "type" } }, - "KeyRequest": { + "Subscription": { "allOf": [ { - "$ref": "#/components/schemas/_OpenAPIGenBaseModel" + "$ref": "#/components/schemas/Subscription" }, { "type": "object", "properties": { - "key": { - "title": "Key", - "type": "string" - }, "type": { "title": "Type", - "default": "KeyRequest", + "default": "Subscription", "type": "string", - "pattern": "^KeyRequest$", + "pattern": "^Subscription$", "readOnly": true } - }, - "required": [ - "key" - ] + } } ], - "title": "KeyRequest", + "title": "Subscription", "discriminator": { "propertyName": "type" } }, - "ProjectUpdate": { + "Body_post_plugin__owner__plugins_post": { "allOf": [ { "$ref": "#/components/schemas/_OpenAPIGenBaseModel" @@ -17750,153 +21816,157 @@ { "type": "object", "properties": { - "name": { - "title": "Name", - "description": "The name of the project. Must be unique to a given owner", - "example": "Project Falcon", - "type": "string" - }, - "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" + "package": { + "title": "Plugin Package", + "type": "string", + "format": "binary" }, "type": { "title": "Type", - "default": "ProjectUpdate", + "default": "Body_post_plugin__owner__plugins_post", "type": "string", - "pattern": "^ProjectUpdate$", + "pattern": "^Body_post_plugin__owner__plugins_post$", "readOnly": true } - } + }, + "required": [ + "package" + ] } ], - "title": "ProjectUpdate", + "title": "Body_post_plugin__owner__plugins_post", "discriminator": { "propertyName": "type" } }, - "RunList": { + "FileMeta": { "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" + "key": { + "title": "Key", + "type": "string" }, - "page_count": { - "title": "Page Count", - "description": "The total number of pages", - "type": "integer", - "format": "int32" + "file_type": { + "title": "File Type", + "type": "string" }, - "total_count": { - "title": "Total Count", - "description": "The total number of resources matching the list request", - "type": "integer", - "format": "int32" + "file_name": { + "title": "File Name", + "type": "string" }, - "resources": { - "title": "Resources", - "type": "array", - "items": { - "$ref": "#/components/schemas/Run" - } + "last_modified": { + "title": "Last Modified", + "type": "string", + "format": "date-time" }, - "next_page": { - "title": "Next Page", - "description": "The next page, if this on is not the last", + "size": { + "title": "Size", "type": "integer", "format": "int32" }, "type": { "title": "Type", - "default": "RunList", + "default": "FileMeta", "type": "string", - "pattern": "^RunList$", + "pattern": "^FileMeta$", "readOnly": true } - } + }, + "required": [ + "key", + "file_type", + "file_name" + ] } ], - "title": "RunList", - "description": "A list response from a pagination request", + "title": "FileMeta", "discriminator": { "propertyName": "type" } }, - "RepositoryPolicySubject": { + "ProjectCreate": { "allOf": [ { - "$ref": "#/components/schemas/PolicySubject" + "$ref": "#/components/schemas/_OpenAPIGenBaseModel" }, { "type": "object", "properties": { + "name": { + "title": "Name", + "description": "The name of the project. Must be unique to a given owner", + "example": "Project Falcon", + "type": "string" + }, + "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" + }, "type": { "title": "Type", - "default": "RepositoryPolicySubject", + "default": "ProjectCreate", "type": "string", - "pattern": "^RepositoryPolicySubject$", + "pattern": "^ProjectCreate$", "readOnly": true } - } + }, + "required": [ + "name" + ] } ], - "title": "RepositoryPolicySubject", + "title": "ProjectCreate", "discriminator": { "propertyName": "type" } }, - "APITokenCreate": { + "RepositoryCreate": { "allOf": [ { - "$ref": "#/components/schemas/APIToken" + "$ref": "#/components/schemas/RepositoryUpdate" }, { "type": "object", + "required": [ + "name" + ], "properties": { + "name": { + "title": "Name", + "description": "The name of the repository", + "example": "daylight-factor", + "type": "string" + }, "type": { "title": "Type", - "default": "APITokenCreate", + "default": "RepositoryCreate", "type": "string", - "pattern": "^APITokenCreate$", + "pattern": "^RepositoryCreate$", "readOnly": true } } } ], - "title": "APITokenCreate", + "title": "RepositoryCreate", "discriminator": { "propertyName": "type" } }, - "UserPublicList": { + "PaymentMethodList": { "allOf": [ { "$ref": "#/components/schemas/_OpenAPIGenBaseModel" @@ -17939,7 +22009,7 @@ "title": "Resources", "type": "array", "items": { - "$ref": "#/components/schemas/UserPublic" + "$ref": "#/components/schemas/CardPublic" } }, "next_page": { @@ -17950,21 +22020,21 @@ }, "type": { "title": "Type", - "default": "UserPublicList", + "default": "PaymentMethodList", "type": "string", - "pattern": "^UserPublicList$", + "pattern": "^PaymentMethodList$", "readOnly": true } } } ], - "title": "UserPublicList", + "title": "PaymentMethodList", "description": "A list response from a pagination request", "discriminator": { "propertyName": "type" } }, - "TeamList": { + "ProjectRecipeFilterList": { "allOf": [ { "$ref": "#/components/schemas/_OpenAPIGenBaseModel" @@ -18007,7 +22077,7 @@ "title": "Resources", "type": "array", "items": { - "$ref": "#/components/schemas/Team" + "$ref": "#/components/schemas/ProjectRecipeFilter" } }, "next_page": { @@ -18018,21 +22088,21 @@ }, "type": { "title": "Type", - "default": "TeamList", + "default": "ProjectRecipeFilterList", "type": "string", - "pattern": "^TeamList$", + "pattern": "^ProjectRecipeFilterList$", "readOnly": true } } } ], - "title": "TeamList", + "title": "ProjectRecipeFilterList", "description": "A list response from a pagination request", "discriminator": { "propertyName": "type" } }, - "TeamMemberList": { + "UserPublicList": { "allOf": [ { "$ref": "#/components/schemas/_OpenAPIGenBaseModel" @@ -18075,7 +22145,7 @@ "title": "Resources", "type": "array", "items": { - "$ref": "#/components/schemas/TeamMember" + "$ref": "#/components/schemas/UserPublic" } }, "next_page": { @@ -18086,21 +22156,145 @@ }, "type": { "title": "Type", - "default": "TeamMemberList", + "default": "UserPublicList", "type": "string", - "pattern": "^TeamMemberList$", + "pattern": "^UserPublicList$", "readOnly": true } } } ], - "title": "TeamMemberList", + "title": "UserPublicList", "description": "A list response from a pagination request", "discriminator": { "propertyName": "type" } }, - "ProjectRecipeFilterList": { + "S3UploadRequest": { + "allOf": [ + { + "$ref": "#/components/schemas/_OpenAPIGenBaseModel" + }, + { + "type": "object", + "properties": { + "url": { + "title": "Url", + "type": "string" + }, + "fields": { + "title": "Fields", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "type": { + "title": "Type", + "default": "S3UploadRequest", + "type": "string", + "pattern": "^S3UploadRequest$", + "readOnly": true + } + }, + "required": [ + "url", + "fields" + ] + } + ], + "title": "S3UploadRequest", + "discriminator": { + "propertyName": "type" + } + }, + "CreatedContent": { + "allOf": [ + { + "$ref": "#/components/schemas/_OpenAPIGenBaseModel" + }, + { + "type": "object", + "properties": { + "id": { + "title": "Id", + "description": "Id for the newly created resource.", + "example": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "type": "string", + "format": "uuid" + }, + "message": { + "title": "Message", + "description": " A human readable message", + "example": "Use Location in headers to access the new object.", + "type": "string" + }, + "type": { + "title": "Type", + "default": "CreatedContent", + "type": "string", + "pattern": "^CreatedContent$", + "readOnly": true + } + }, + "required": [ + "id" + ] + } + ], + "title": "CreatedContent", + "description": "Content for created response.", + "discriminator": { + "propertyName": "type" + } + }, + "Inventory": { + "allOf": [ + { + "$ref": "#/components/schemas/Inventory" + }, + { + "type": "object", + "properties": { + "type": { + "title": "Type", + "default": "Inventory", + "type": "string", + "pattern": "^Inventory$", + "readOnly": true + } + } + } + ], + "title": "Inventory", + "discriminator": { + "propertyName": "type" + } + }, + "RepositoryPolicySubject": { + "allOf": [ + { + "$ref": "#/components/schemas/PolicySubject" + }, + { + "type": "object", + "properties": { + "type": { + "title": "Type", + "default": "RepositoryPolicySubject", + "type": "string", + "pattern": "^RepositoryPolicySubject$", + "readOnly": true + } + } + } + ], + "title": "RepositoryPolicySubject", + "discriminator": { + "propertyName": "type" + } + }, + "RepositoryList": { "allOf": [ { "$ref": "#/components/schemas/_OpenAPIGenBaseModel" @@ -18143,7 +22337,7 @@ "title": "Resources", "type": "array", "items": { - "$ref": "#/components/schemas/ProjectRecipeFilter" + "$ref": "#/components/schemas/Repository" } }, "next_page": { @@ -18154,21 +22348,21 @@ }, "type": { "title": "Type", - "default": "ProjectRecipeFilterList", + "default": "RepositoryList", "type": "string", - "pattern": "^ProjectRecipeFilterList$", + "pattern": "^RepositoryList$", "readOnly": true } } } ], - "title": "ProjectRecipeFilterList", + "title": "RepositoryList", "description": "A list response from a pagination request", "discriminator": { "propertyName": "type" } }, - "OrganizationUpdate": { + "ExternalResource": { "allOf": [ { "$ref": "#/components/schemas/_OpenAPIGenBaseModel" @@ -18176,47 +22370,29 @@ { "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", + "id": { + "title": "Id", "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" + "metadata": { + "title": "Metadata", + "default": {}, + "type": "object" }, "type": { "title": "Type", - "default": "OrganizationUpdate", + "default": "ExternalResource", "type": "string", - "pattern": "^OrganizationUpdate$", + "pattern": "^ExternalResource$", "readOnly": true } - } + }, + "required": [ + "id" + ] } ], - "title": "OrganizationUpdate", + "title": "ExternalResource", "discriminator": { "propertyName": "type" } @@ -18266,14 +22442,22 @@ "propertyName": "type" } }, - "_DAGArtifactOutputAlias": { + "PathOutput": { "allOf": [ { - "$ref": "#/components/schemas/DAGGenericOutputAlias" + "$ref": "#/components/schemas/GenericOutput" }, { "type": "object", + "required": [ + "path" + ], "properties": { + "path": { + "title": "Path", + "description": "Path to the output artifact relative to where the function command is executed.", + "type": "string" + }, "required": { "title": "Required", "description": "A boolean to indicate if an artifact output is required. A False value makes the artifact optional.", @@ -18282,16 +22466,16 @@ }, "type": { "title": "Type", - "default": "DAGGenericOutputAlias", - "pattern": "^DAGGenericOutputAlias$", + "default": "PathOutput", + "pattern": "^PathOutput$", "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": "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" } @@ -18341,45 +22525,7 @@ "propertyName": "type" } }, - "PathOutput": { - "allOf": [ - { - "$ref": "#/components/schemas/GenericOutput" - }, - { - "type": "object", - "required": [ - "path" - ], - "properties": { - "path": { - "title": "Path", - "description": "Path to the output artifact relative to where the function command is executed.", - "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" - }, - "type": { - "title": "Type", - "default": "PathOutput", - "pattern": "^PathOutput$", - "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.", - "discriminator": { - "propertyName": "type" - } - }, - "_ArtifactSource": { + "AccessPolicy": { "allOf": [ { "$ref": "#/components/schemas/_OpenAPIGenBaseModel" @@ -18387,26 +22533,39 @@ { "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": "_ArtifactSource", - "pattern": "^_ArtifactSource$", + "default": "AccessPolicy", "type": "string", + "pattern": "^AccessPolicy$", "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": [ + "subject", + "permission" + ] } ], - "title": "_ArtifactSource", - "description": "ArtifactSource.\n\nAn Artifact Source System.", + "title": "AccessPolicy", "discriminator": { "propertyName": "type" } @@ -18478,6 +22637,44 @@ "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": "BaseList", + "type": "string", + "pattern": "^BaseList$", + "readOnly": true + } + }, + "required": [ + "has_more", + "data" + ] + } + ], + "title": "BaseList", + "discriminator": { + "propertyName": "type" + } + }, "_DAGArtifactOutput": { "allOf": [ { @@ -18539,90 +22736,231 @@ "propertyName": "type" } }, - "AccessPolicy": { + "_DAGArtifactOutputAlias": { "allOf": [ { - "$ref": "#/components/schemas/_OpenAPIGenBaseModel" + "$ref": "#/components/schemas/DAGGenericOutputAlias" }, { "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" - } - ] + "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": "AccessPolicy", + "default": "DAGGenericOutputAlias", + "pattern": "^DAGGenericOutputAlias$", "type": "string", - "pattern": "^AccessPolicy$", "readOnly": true } - }, - "required": [ - "subject", - "permission" - ] + } } ], - "title": "AccessPolicy", + "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" } }, - "_TaskReferenceBase": { + "Product": { "allOf": [ { - "$ref": "#/components/schemas/_BaseReference" + "$ref": "#/components/schemas/ExternalResource" }, { "type": "object", "required": [ - "name", - "variable" + "active", + "name" ], "properties": { + "active": { + "title": "Active", + "type": "boolean" + }, "name": { "title": "Name", - "description": "The name of the task to pull output data from.", "type": "string" }, + "description": { + "title": "Description", + "type": "string" + }, + "type": { + "title": "Type", + "default": "Product", + "type": "string", + "pattern": "^Product$", + "readOnly": true + } + } + } + ], + "title": "Product", + "discriminator": { + "propertyName": "type" + } + }, + "_BaseReference": { + "allOf": [ + { + "$ref": "#/components/schemas/_OpenAPIGenBaseModel" + }, + { + "type": "object", + "properties": { + "type": { + "title": "Type", + "default": "_BaseReference", + "pattern": "^_BaseReference$", + "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": "_BaseReference", + "description": "A Base reference model.", + "discriminator": { + "propertyName": "type" + } + }, + "CryptlexBase": { + "allOf": [ + { + "$ref": "#/components/schemas/_OpenAPIGenBaseModel" + }, + { + "type": "object", + "properties": { + "type": { + "title": "Type", + "default": "CryptlexBase", + "type": "string", + "pattern": "^CryptlexBase$", + "readOnly": true + } + } + } + ], + "title": "CryptlexBase", + "discriminator": { + "propertyName": "type" + } + }, + "_InputReferenceBase": { + "allOf": [ + { + "$ref": "#/components/schemas/_BaseReference" + }, + { + "type": "object", + "required": [ + "variable" + ], + "properties": { "variable": { "title": "Variable", - "description": "The name of the variable.", + "description": "The name of the DAG input variable", "type": "string" }, "type": { "title": "Type", - "default": "_TaskReferenceBase", - "pattern": "^_TaskReferenceBase$", + "default": "_InputReferenceBase", + "pattern": "^_InputReferenceBase$", + "type": "string", + "readOnly": true + } + } + } + ], + "title": "_InputReferenceBase", + "description": "An input reference.", + "discriminator": { + "propertyName": "type" + } + }, + "AccessPolicyList": { + "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/AccessPolicy" + } + }, + "next_page": { + "title": "Next Page", + "description": "The next page, if this on is not the last", + "type": "integer", + "format": "int32" + }, + "type": { + "title": "Type", + "default": "AccessPolicyList", "type": "string", + "pattern": "^AccessPolicyList$", "readOnly": true } } } ], - "title": "_TaskReferenceBase", - "description": "A Task Reference", + "title": "AccessPolicyList", + "description": "A list response from a pagination request", "discriminator": { "propertyName": "type" } }, - "_BaseReference": { + "IOBase": { "allOf": [ { "$ref": "#/components/schemas/_OpenAPIGenBaseModel" @@ -18632,8 +22970,8 @@ "properties": { "type": { "title": "Type", - "default": "_BaseReference", - "pattern": "^_BaseReference$", + "default": "IOBase", + "pattern": "^IOBase$", "type": "string", "readOnly": true }, @@ -18644,49 +22982,61 @@ "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": "_BaseReference", - "description": "A Base reference model.", + "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" } }, - "_InputReferenceBase": { + "_ArtifactSource": { "allOf": [ { - "$ref": "#/components/schemas/_BaseReference" + "$ref": "#/components/schemas/_OpenAPIGenBaseModel" }, { "type": "object", - "required": [ - "variable" - ], "properties": { - "variable": { - "title": "Variable", - "description": "The name of the DAG input variable", - "type": "string" - }, "type": { "title": "Type", - "default": "_InputReferenceBase", - "pattern": "^_InputReferenceBase$", + "default": "_ArtifactSource", + "pattern": "^_ArtifactSource$", "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": "_InputReferenceBase", - "description": "An input reference.", + "title": "_ArtifactSource", + "description": "ArtifactSource.\n\nAn Artifact Source System.", "discriminator": { "propertyName": "type" } }, - "IOBase": { + "_SecureResourcePublic": { "allOf": [ { "$ref": "#/components/schemas/_OpenAPIGenBaseModel" @@ -18694,106 +23044,74 @@ { "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": "IOBase", - "pattern": "^IOBase$", + "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" - } - }, - "inputs": { - "title": "Inputs", - "description": "Place-holder. Overwrite this!", - "type": "array", - "items": {} - }, - "outputs": { - "title": "Outputs", - "description": "Place-holder. Overwrite this!", - "type": "array", - "items": {} } - } + }, + "required": [ + "client_secret" + ] } ], - "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": "_SecureResourcePublic", "discriminator": { "propertyName": "type" } }, - "AccessPolicyList": { + "BaseStatus": { "allOf": [ { - "$ref": "#/components/schemas/_OpenAPIGenBaseModel" + "$ref": "#/components/schemas/IOBase" }, { "type": "object", "required": [ - "page", - "per_page", - "page_count", - "total_count", - "resources" + "started_at" ], "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" + "started_at": { + "title": "Started At", + "description": "The time at which the task was started", + "type": "string", + "format": "date-time" }, - "total_count": { - "title": "Total Count", - "description": "The total number of resources matching the list request", - "type": "integer", - "format": "int32" + "message": { + "title": "Message", + "description": "Any message produced by the task. Usually error/debugging hints.", + "type": "string" }, - "resources": { - "title": "Resources", - "type": "array", - "items": { - "$ref": "#/components/schemas/AccessPolicy" - } + "finished_at": { + "title": "Finished At", + "description": "The time at which the task was completed", + "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" + "source": { + "title": "Source", + "description": "Source url for the status object. It can be a recipe or a function.", + "type": "string" }, "type": { "title": "Type", - "default": "AccessPolicyList", + "default": "BaseStatus", + "pattern": "^BaseStatus$", "type": "string", - "pattern": "^AccessPolicyList$", "readOnly": true } } } ], - "title": "AccessPolicyList", - "description": "A list response from a pagination request", + "title": "BaseStatus", + "description": "Base Status model", "discriminator": { "propertyName": "type" } @@ -18865,51 +23183,40 @@ "propertyName": "type" } }, - "BaseStatus": { + "_TaskReferenceBase": { "allOf": [ { - "$ref": "#/components/schemas/IOBase" + "$ref": "#/components/schemas/_BaseReference" }, { "type": "object", "required": [ - "started_at" + "name", + "variable" ], "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.", + "name": { + "title": "Name", + "description": "The name of the task to pull output data from.", "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.", + "variable": { + "title": "Variable", + "description": "The name of the variable.", "type": "string" }, "type": { "title": "Type", - "default": "BaseStatus", - "pattern": "^BaseStatus$", + "default": "_TaskReferenceBase", + "pattern": "^_TaskReferenceBase$", "type": "string", "readOnly": true } } } ], - "title": "BaseStatus", - "description": "Base Status model", + "title": "_TaskReferenceBase", + "description": "A Task Reference", "discriminator": { "propertyName": "type" } @@ -18929,12 +23236,102 @@ "discriminator": { "propertyName": "type" } + }, + "HTTPValidationError": { + "title": "HTTPValidationError", + "type": "object", + "properties": { + "detail": { + "title": "Detail", + "type": "array", + "items": { + "$ref": "#/components/schemas/ValidationError" + } + } + } + }, + "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": "Error Type", + "type": "string", + "readOnly": true + } + } } }, "securitySchemes": { "JWTAuth": { "type": "http", - "scheme": "bearer" + "scheme": "bearer", + "bearerFormat": "JWT" }, "APIKeyAuth": { "type": "apiKey", @@ -18943,4 +23340,4 @@ } } } -} \ No newline at end of file +} diff --git a/.openapi-docs/openapi_mapper.json b/.openapi-docs/openapi_mapper.json index 11d024755..8953fd67a 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.server.rest.licenses.dto", + "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", @@ -60,7 +68,10 @@ "DAGTaskLoop": "queenbee.recipe.task", "DailyUsage": "app.domains.jobs.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 +104,11 @@ "InputFolderReference": "queenbee.io.reference", "InputPathReference": "queenbee.io.reference", "InputReference": "queenbee.io.reference", + "Inventory": "app.server.rest.payments.dto", + "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 +116,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 +144,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 +172,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 +193,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 +225,14 @@ "StepStatus": "queenbee.job.run", "StepStringInput": "queenbee.io.inputs.step", "StepStringOutput": "queenbee.io.outputs.step", + "Subscribe": "app.server.rest.payments.dto", + "Subscription": "app.server.rest.payments.dto", + "SubscriptionCreate": "app.server.rest.payments.dto", + "SubscriptionItem": "app.domains.payments.entities", + "SubscriptionItemPublic": "app.server.rest.payments.dto", + "SubscriptionItemPublicList": "app.server.rest.payments.dto", + "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 +} From a32923580aa97efb0535a362796f2792519ad8ad Mon Sep 17 00:00:00 2001 From: Antoine Dao Date: Thu, 6 Jan 2022 17:39:13 +0000 Subject: [PATCH 2/7] build(sdk): regenerate SDK code --- src/PollinationSDK/Api/APITokensApi.cs | 933 ----- src/PollinationSDK/Api/AccountsApi.cs | 523 --- src/PollinationSDK/Api/ArtifactsApi.cs | 1077 ------ src/PollinationSDK/Api/JobsApi.cs | 1607 --------- src/PollinationSDK/Api/OrgsApi.cs | 1821 ---------- src/PollinationSDK/Api/PluginsApi.cs | 2800 --------------- src/PollinationSDK/Api/ProjectsApi.cs | 3041 ----------------- src/PollinationSDK/Api/RecipesApi.cs | 2800 --------------- src/PollinationSDK/Api/RegistriesApi.cs | 1256 ------- src/PollinationSDK/Api/RunsApi.cs | 2386 ------------- src/PollinationSDK/Api/TeamsApi.cs | 1905 ----------- src/PollinationSDK/Api/UserApi.cs | 903 ----- src/PollinationSDK/Api/UsersApi.cs | 660 ---- src/PollinationSDK/Client/ApiClient.cs | 553 --- src/PollinationSDK/Client/ApiException.cs | 59 - src/PollinationSDK/Client/ApiResponse.cs | 53 - src/PollinationSDK/Client/Configuration.cs | 541 --- src/PollinationSDK/Client/ExceptionFactory.cs | 23 - .../Client/GlobalConfiguration.cs | 33 - src/PollinationSDK/Client/IApiAccessor.cs | 41 - .../Client/IReadableConfiguration.cs | 93 - .../Client/OpenAPIDateConverter.cs | 29 - .../Interface/Domains/Jobs/Entities.cs | 3 + .../Interface/Domains/Licenses/Entities.cs | 14 + .../Interface/Domains/Payments/Entities.cs | 28 + .../Domains/Subscriptions/Entities.cs | 14 + src/PollinationSDK/Interface/Helpers/Query.cs | 12 + src/PollinationSDK/Interface/Recipe/Recipe.cs | 2 + .../Server/Rest/AccessPolicies/Dto.cs | 1 + .../Interface/Server/Rest/Accounts/Query.cs | 12 + .../Interface/Server/Rest/Licenses/Dto.cs | 21 + .../Interface/Server/Rest/Payments/Dto.cs | 27 + .../Interface/Server/Rest/Quotas/Dto.cs | 13 + .../Server/Rest/Subscriptions/Dto.cs | 12 + src/PollinationSDK/Model/APIToken.cs | 251 -- src/PollinationSDK/Model/APITokenCreate.cs | 206 -- src/PollinationSDK/Model/APITokenList.cs | 287 -- src/PollinationSDK/Model/APITokenPrivate.cs | 213 -- src/PollinationSDK/Model/AccessPolicy.cs | 223 -- src/PollinationSDK/Model/AccessPolicyList.cs | 287 -- src/PollinationSDK/Model/AccountPublic.cs | 284 -- src/PollinationSDK/Model/ArtifactSource.cs | 207 -- src/PollinationSDK/Model/BaseReference.cs | 207 -- src/PollinationSDK/Model/BaseStatus.cs | 260 -- .../Model/BodyPostPluginOwnerPluginsPost.cs | 206 -- .../Model/BodyPostRecipeOwnerRecipesPost.cs | 206 -- src/PollinationSDK/Model/CloudJob.cs | 283 -- src/PollinationSDK/Model/CloudJobList.cs | 287 -- src/PollinationSDK/Model/CreatedContent.cs | 222 -- src/PollinationSDK/Model/DAG.cs | 292 -- src/PollinationSDK/Model/DAGArrayInput.cs | 273 -- .../Model/DAGArrayInputAlias.cs | 292 -- src/PollinationSDK/Model/DAGArrayOutput.cs | 262 -- .../Model/DAGArrayOutputAlias.cs | 235 -- src/PollinationSDK/Model/DAGArtifactOutput.cs | 216 -- .../Model/DAGArtifactOutputAlias.cs | 226 -- src/PollinationSDK/Model/DAGBooleanInput.cs | 256 -- .../Model/DAGBooleanInputAlias.cs | 275 -- src/PollinationSDK/Model/DAGBooleanOutput.cs | 246 -- .../Model/DAGBooleanOutputAlias.cs | 219 -- src/PollinationSDK/Model/DAGFileInput.cs | 273 -- src/PollinationSDK/Model/DAGFileInputAlias.cs | 292 -- src/PollinationSDK/Model/DAGFileOutput.cs | 246 -- .../Model/DAGFileOutputAlias.cs | 219 -- src/PollinationSDK/Model/DAGFolderInput.cs | 256 -- .../Model/DAGFolderInputAlias.cs | 275 -- src/PollinationSDK/Model/DAGFolderOutput.cs | 246 -- .../Model/DAGFolderOutputAlias.cs | 219 -- src/PollinationSDK/Model/DAGGenericInput.cs | 266 -- .../Model/DAGGenericInputAlias.cs | 285 -- src/PollinationSDK/Model/DAGGenericOutput.cs | 225 -- .../Model/DAGGenericOutputAlias.cs | 242 -- src/PollinationSDK/Model/DAGIntegerInput.cs | 256 -- .../Model/DAGIntegerInputAlias.cs | 275 -- src/PollinationSDK/Model/DAGIntegerOutput.cs | 246 -- .../Model/DAGIntegerOutputAlias.cs | 219 -- .../Model/DAGJSONObjectInput.cs | 256 -- .../Model/DAGJSONObjectInputAlias.cs | 275 -- .../Model/DAGJSONObjectOutput.cs | 246 -- .../Model/DAGJSONObjectOutputAlias.cs | 219 -- .../Model/DAGLinkedInputAlias.cs | 206 -- .../Model/DAGLinkedOutputAlias.cs | 200 -- src/PollinationSDK/Model/DAGNumberInput.cs | 256 -- .../Model/DAGNumberInputAlias.cs | 275 -- src/PollinationSDK/Model/DAGNumberOutput.cs | 246 -- .../Model/DAGNumberOutputAlias.cs | 219 -- src/PollinationSDK/Model/DAGPathInput.cs | 273 -- src/PollinationSDK/Model/DAGPathInputAlias.cs | 292 -- src/PollinationSDK/Model/DAGPathOutput.cs | 246 -- .../Model/DAGPathOutputAlias.cs | 219 -- src/PollinationSDK/Model/DAGStringInput.cs | 214 -- .../Model/DAGStringInputAlias.cs | 206 -- src/PollinationSDK/Model/DAGStringOutput.cs | 246 -- .../Model/DAGStringOutputAlias.cs | 219 -- src/PollinationSDK/Model/DAGTask.cs | 324 -- src/PollinationSDK/Model/DAGTaskLoop.cs | 213 -- src/PollinationSDK/Model/DailyUsage.cs | 270 -- src/PollinationSDK/Model/Dependency.cs | 306 -- src/PollinationSDK/Model/DependencyKind.cs | 49 - src/PollinationSDK/Model/DockerConfig.cs | 257 -- src/PollinationSDK/Model/FileMeta.cs | 268 -- src/PollinationSDK/Model/FileReference.cs | 209 -- src/PollinationSDK/Model/FolderReference.cs | 209 -- src/PollinationSDK/Model/FromOutput.cs | 223 -- src/PollinationSDK/Model/Function.cs | 291 -- .../Model/FunctionArrayInput.cs | 273 -- .../Model/FunctionArrayOutput.cs | 216 -- .../Model/FunctionBooleanInput.cs | 256 -- .../Model/FunctionBooleanOutput.cs | 210 -- src/PollinationSDK/Model/FunctionFileInput.cs | 290 -- .../Model/FunctionFileOutput.cs | 210 -- .../Model/FunctionFolderInput.cs | 273 -- .../Model/FunctionFolderOutput.cs | 210 -- .../Model/FunctionIntegerInput.cs | 256 -- .../Model/FunctionIntegerOutput.cs | 210 -- .../Model/FunctionJSONObjectInput.cs | 256 -- .../Model/FunctionJSONObjectOutput.cs | 210 -- .../Model/FunctionNumberInput.cs | 256 -- .../Model/FunctionNumberOutput.cs | 210 -- src/PollinationSDK/Model/FunctionPathInput.cs | 290 -- .../Model/FunctionPathOutput.cs | 210 -- .../Model/FunctionStringInput.cs | 214 -- .../Model/FunctionStringOutput.cs | 210 -- src/PollinationSDK/Model/GenericInput.cs | 250 -- src/PollinationSDK/Model/GenericOutput.cs | 250 -- src/PollinationSDK/Model/HTTP.cs | 209 -- src/PollinationSDK/Model/IOAliasHandler.cs | 274 -- src/PollinationSDK/Model/IOBase.cs | 241 -- .../Model/InputFileReference.cs | 194 -- .../Model/InputFolderReference.cs | 194 -- .../Model/InputPathReference.cs | 194 -- src/PollinationSDK/Model/InputReference.cs | 194 -- .../Model/InputReferenceBase.cs | 219 -- src/PollinationSDK/Model/ItemReference.cs | 198 -- src/PollinationSDK/Model/ItemType.cs | 79 - src/PollinationSDK/Model/Job.cs | 315 -- src/PollinationSDK/Model/JobArgument.cs | 241 -- src/PollinationSDK/Model/JobPathArgument.cs | 241 -- src/PollinationSDK/Model/JobStatus.cs | 409 --- src/PollinationSDK/Model/JobStatusEnum.cs | 79 - src/PollinationSDK/Model/KeyRequest.cs | 206 -- src/PollinationSDK/Model/License.cs | 252 -- src/PollinationSDK/Model/ListResponseMeta.cs | 287 -- src/PollinationSDK/Model/LocalConfig.cs | 197 -- src/PollinationSDK/Model/Maintainer.cs | 240 -- src/PollinationSDK/Model/MetaData.cs | 388 --- src/PollinationSDK/Model/NewPluginPackage.cs | 224 -- src/PollinationSDK/Model/NewRecipePackage.cs | 224 -- .../Model/OpenAPIGenBaseModel.cs | 174 - src/PollinationSDK/Model/Organization.cs | 282 -- .../Model/OrganizationCreate.cs | 190 - src/PollinationSDK/Model/OrganizationList.cs | 287 -- .../Model/OrganizationMember.cs | 223 -- .../Model/OrganizationMemberList.cs | 287 -- .../Model/OrganizationRoleEnum.cs | 49 - .../Model/OrganizationUpdate.cs | 270 -- src/PollinationSDK/Model/PackageVersion.cs | 500 --- src/PollinationSDK/Model/PathOutput.cs | 239 -- src/PollinationSDK/Model/Permission.cs | 55 - src/PollinationSDK/Model/Plugin.cs | 284 -- src/PollinationSDK/Model/PluginConfig.cs | 240 -- src/PollinationSDK/Model/PluginPackage.cs | 220 -- src/PollinationSDK/Model/PluginPackageList.cs | 287 -- src/PollinationSDK/Model/PolicySubject.cs | 232 -- src/PollinationSDK/Model/Project.cs | 279 -- .../Model/ProjectAccessPolicy.cs | 223 -- .../Model/ProjectAccessPolicyList.cs | 287 -- src/PollinationSDK/Model/ProjectCreate.cs | 250 -- src/PollinationSDK/Model/ProjectFolder.cs | 198 -- src/PollinationSDK/Model/ProjectList.cs | 287 -- .../Model/ProjectPolicySubject.cs | 194 -- .../Model/ProjectRecipeFilter.cs | 240 -- .../Model/ProjectRecipeFilterList.cs | 287 -- src/PollinationSDK/Model/ProjectUpdate.cs | 228 -- src/PollinationSDK/Model/PublicAccountList.cs | 287 -- src/PollinationSDK/Model/Recipe.cs | 283 -- src/PollinationSDK/Model/RecipeInterface.cs | 299 -- .../Model/RecipeInterfaceList.cs | 287 -- src/PollinationSDK/Model/RecipePackage.cs | 220 -- src/PollinationSDK/Model/RecipePackageList.cs | 287 -- src/PollinationSDK/Model/Repository.cs | 283 -- .../Model/RepositoryAccessPolicy.cs | 223 -- .../Model/RepositoryAccessPolicyList.cs | 287 -- src/PollinationSDK/Model/RepositoryCreate.cs | 225 -- src/PollinationSDK/Model/RepositoryIndex.cs | 287 -- src/PollinationSDK/Model/RepositoryList.cs | 287 -- .../Model/RepositoryMetadata.cs | 278 -- src/PollinationSDK/Model/RepositoryPackage.cs | 315 -- .../Model/RepositoryPolicySubject.cs | 194 -- src/PollinationSDK/Model/RepositoryUpdate.cs | 255 -- .../Model/RepositoryUserPermissions.cs | 186 - src/PollinationSDK/Model/RoleEnum.cs | 49 - src/PollinationSDK/Model/Run.cs | 287 -- src/PollinationSDK/Model/RunList.cs | 287 -- src/PollinationSDK/Model/RunResultList.cs | 287 -- src/PollinationSDK/Model/RunStatus.cs | 414 --- src/PollinationSDK/Model/RunStatusEnum.cs | 85 - src/PollinationSDK/Model/S3.cs | 259 -- src/PollinationSDK/Model/S3UploadRequest.cs | 223 -- src/PollinationSDK/Model/SortEnum.cs | 49 - src/PollinationSDK/Model/StatusType.cs | 61 - src/PollinationSDK/Model/StepArrayInput.cs | 290 -- src/PollinationSDK/Model/StepArrayOutput.cs | 233 -- src/PollinationSDK/Model/StepBooleanInput.cs | 271 -- src/PollinationSDK/Model/StepBooleanOutput.cs | 215 -- src/PollinationSDK/Model/StepFileInput.cs | 306 -- src/PollinationSDK/Model/StepFileOutput.cs | 217 -- src/PollinationSDK/Model/StepFolderInput.cs | 289 -- src/PollinationSDK/Model/StepFolderOutput.cs | 217 -- src/PollinationSDK/Model/StepIntegerInput.cs | 271 -- src/PollinationSDK/Model/StepIntegerOutput.cs | 215 -- .../Model/StepJSONObjectInput.cs | 272 -- .../Model/StepJSONObjectOutput.cs | 216 -- src/PollinationSDK/Model/StepList.cs | 287 -- src/PollinationSDK/Model/StepNumberInput.cs | 271 -- src/PollinationSDK/Model/StepNumberOutput.cs | 215 -- src/PollinationSDK/Model/StepPathInput.cs | 306 -- src/PollinationSDK/Model/StepPathOutput.cs | 217 -- src/PollinationSDK/Model/StepStatus.cs | 458 --- src/PollinationSDK/Model/StepStatusEnum.cs | 73 - src/PollinationSDK/Model/StepStringInput.cs | 220 -- src/PollinationSDK/Model/StepStringOutput.cs | 216 -- src/PollinationSDK/Model/SubjectType.cs | 49 - src/PollinationSDK/Model/TaskArgument.cs | 241 -- src/PollinationSDK/Model/TaskFileReference.cs | 196 -- .../Model/TaskFolderReference.cs | 196 -- src/PollinationSDK/Model/TaskPathArgument.cs | 257 -- src/PollinationSDK/Model/TaskPathReference.cs | 196 -- src/PollinationSDK/Model/TaskPathReturn.cs | 200 -- src/PollinationSDK/Model/TaskReference.cs | 196 -- src/PollinationSDK/Model/TaskReferenceBase.cs | 236 -- src/PollinationSDK/Model/TaskReturn.cs | 196 -- src/PollinationSDK/Model/Team.cs | 244 -- src/PollinationSDK/Model/TeamCreate.cs | 231 -- src/PollinationSDK/Model/TeamList.cs | 287 -- src/PollinationSDK/Model/TeamMember.cs | 223 -- src/PollinationSDK/Model/TeamMemberList.cs | 287 -- src/PollinationSDK/Model/TeamRoleEnum.cs | 49 - src/PollinationSDK/Model/TeamUpdate.cs | 204 -- src/PollinationSDK/Model/UpdateAccepted.cs | 196 -- src/PollinationSDK/Model/Usage.cs | 303 -- src/PollinationSDK/Model/UserCreate.cs | 213 -- src/PollinationSDK/Model/UserPermission.cs | 238 -- src/PollinationSDK/Model/UserPrivate.cs | 289 -- src/PollinationSDK/Model/UserPublic.cs | 255 -- src/PollinationSDK/Model/UserPublicList.cs | 287 -- src/PollinationSDK/Model/UserUpdate.cs | 251 -- .../Model/ValueFileReference.cs | 219 -- .../Model/ValueFolderReference.cs | 194 -- .../Model/ValueListReference.cs | 210 -- src/PollinationSDK/Model/ValueReference.cs | 209 -- src/PollinationSDK/PollinationSDK.csproj | 6 +- 252 files changed, 162 insertions(+), 74995 deletions(-) delete mode 100644 src/PollinationSDK/Api/APITokensApi.cs delete mode 100644 src/PollinationSDK/Api/AccountsApi.cs delete mode 100644 src/PollinationSDK/Api/ArtifactsApi.cs delete mode 100644 src/PollinationSDK/Api/JobsApi.cs delete mode 100644 src/PollinationSDK/Api/OrgsApi.cs delete mode 100644 src/PollinationSDK/Api/PluginsApi.cs delete mode 100644 src/PollinationSDK/Api/ProjectsApi.cs delete mode 100644 src/PollinationSDK/Api/RecipesApi.cs delete mode 100644 src/PollinationSDK/Api/RegistriesApi.cs delete mode 100644 src/PollinationSDK/Api/RunsApi.cs delete mode 100644 src/PollinationSDK/Api/TeamsApi.cs delete mode 100644 src/PollinationSDK/Api/UserApi.cs delete mode 100644 src/PollinationSDK/Api/UsersApi.cs delete mode 100644 src/PollinationSDK/Client/ApiClient.cs delete mode 100644 src/PollinationSDK/Client/ApiException.cs delete mode 100644 src/PollinationSDK/Client/ApiResponse.cs delete mode 100644 src/PollinationSDK/Client/Configuration.cs delete mode 100644 src/PollinationSDK/Client/ExceptionFactory.cs delete mode 100644 src/PollinationSDK/Client/GlobalConfiguration.cs delete mode 100644 src/PollinationSDK/Client/IApiAccessor.cs delete mode 100644 src/PollinationSDK/Client/IReadableConfiguration.cs delete mode 100644 src/PollinationSDK/Client/OpenAPIDateConverter.cs create mode 100644 src/PollinationSDK/Interface/Domains/Licenses/Entities.cs create mode 100644 src/PollinationSDK/Interface/Domains/Payments/Entities.cs create mode 100644 src/PollinationSDK/Interface/Domains/Subscriptions/Entities.cs create mode 100644 src/PollinationSDK/Interface/Helpers/Query.cs create mode 100644 src/PollinationSDK/Interface/Server/Rest/Accounts/Query.cs create mode 100644 src/PollinationSDK/Interface/Server/Rest/Licenses/Dto.cs create mode 100644 src/PollinationSDK/Interface/Server/Rest/Payments/Dto.cs create mode 100644 src/PollinationSDK/Interface/Server/Rest/Quotas/Dto.cs create mode 100644 src/PollinationSDK/Interface/Server/Rest/Subscriptions/Dto.cs delete mode 100644 src/PollinationSDK/Model/APIToken.cs delete mode 100644 src/PollinationSDK/Model/APITokenCreate.cs delete mode 100644 src/PollinationSDK/Model/APITokenList.cs delete mode 100644 src/PollinationSDK/Model/APITokenPrivate.cs delete mode 100644 src/PollinationSDK/Model/AccessPolicy.cs delete mode 100644 src/PollinationSDK/Model/AccessPolicyList.cs delete mode 100644 src/PollinationSDK/Model/AccountPublic.cs delete mode 100644 src/PollinationSDK/Model/ArtifactSource.cs delete mode 100644 src/PollinationSDK/Model/BaseReference.cs delete mode 100644 src/PollinationSDK/Model/BaseStatus.cs delete mode 100644 src/PollinationSDK/Model/BodyPostPluginOwnerPluginsPost.cs delete mode 100644 src/PollinationSDK/Model/BodyPostRecipeOwnerRecipesPost.cs delete mode 100644 src/PollinationSDK/Model/CloudJob.cs delete mode 100644 src/PollinationSDK/Model/CloudJobList.cs delete mode 100644 src/PollinationSDK/Model/CreatedContent.cs delete mode 100644 src/PollinationSDK/Model/DAG.cs delete mode 100644 src/PollinationSDK/Model/DAGArrayInput.cs delete mode 100644 src/PollinationSDK/Model/DAGArrayInputAlias.cs delete mode 100644 src/PollinationSDK/Model/DAGArrayOutput.cs delete mode 100644 src/PollinationSDK/Model/DAGArrayOutputAlias.cs delete mode 100644 src/PollinationSDK/Model/DAGArtifactOutput.cs delete mode 100644 src/PollinationSDK/Model/DAGArtifactOutputAlias.cs delete mode 100644 src/PollinationSDK/Model/DAGBooleanInput.cs delete mode 100644 src/PollinationSDK/Model/DAGBooleanInputAlias.cs delete mode 100644 src/PollinationSDK/Model/DAGBooleanOutput.cs delete mode 100644 src/PollinationSDK/Model/DAGBooleanOutputAlias.cs delete mode 100644 src/PollinationSDK/Model/DAGFileInput.cs delete mode 100644 src/PollinationSDK/Model/DAGFileInputAlias.cs delete mode 100644 src/PollinationSDK/Model/DAGFileOutput.cs delete mode 100644 src/PollinationSDK/Model/DAGFileOutputAlias.cs delete mode 100644 src/PollinationSDK/Model/DAGFolderInput.cs delete mode 100644 src/PollinationSDK/Model/DAGFolderInputAlias.cs delete mode 100644 src/PollinationSDK/Model/DAGFolderOutput.cs delete mode 100644 src/PollinationSDK/Model/DAGFolderOutputAlias.cs delete mode 100644 src/PollinationSDK/Model/DAGGenericInput.cs delete mode 100644 src/PollinationSDK/Model/DAGGenericInputAlias.cs delete mode 100644 src/PollinationSDK/Model/DAGGenericOutput.cs delete mode 100644 src/PollinationSDK/Model/DAGGenericOutputAlias.cs delete mode 100644 src/PollinationSDK/Model/DAGIntegerInput.cs delete mode 100644 src/PollinationSDK/Model/DAGIntegerInputAlias.cs delete mode 100644 src/PollinationSDK/Model/DAGIntegerOutput.cs delete mode 100644 src/PollinationSDK/Model/DAGIntegerOutputAlias.cs delete mode 100644 src/PollinationSDK/Model/DAGJSONObjectInput.cs delete mode 100644 src/PollinationSDK/Model/DAGJSONObjectInputAlias.cs delete mode 100644 src/PollinationSDK/Model/DAGJSONObjectOutput.cs delete mode 100644 src/PollinationSDK/Model/DAGJSONObjectOutputAlias.cs delete mode 100644 src/PollinationSDK/Model/DAGLinkedInputAlias.cs delete mode 100644 src/PollinationSDK/Model/DAGLinkedOutputAlias.cs delete mode 100644 src/PollinationSDK/Model/DAGNumberInput.cs delete mode 100644 src/PollinationSDK/Model/DAGNumberInputAlias.cs delete mode 100644 src/PollinationSDK/Model/DAGNumberOutput.cs delete mode 100644 src/PollinationSDK/Model/DAGNumberOutputAlias.cs delete mode 100644 src/PollinationSDK/Model/DAGPathInput.cs delete mode 100644 src/PollinationSDK/Model/DAGPathInputAlias.cs delete mode 100644 src/PollinationSDK/Model/DAGPathOutput.cs delete mode 100644 src/PollinationSDK/Model/DAGPathOutputAlias.cs delete mode 100644 src/PollinationSDK/Model/DAGStringInput.cs delete mode 100644 src/PollinationSDK/Model/DAGStringInputAlias.cs delete mode 100644 src/PollinationSDK/Model/DAGStringOutput.cs delete mode 100644 src/PollinationSDK/Model/DAGStringOutputAlias.cs delete mode 100644 src/PollinationSDK/Model/DAGTask.cs delete mode 100644 src/PollinationSDK/Model/DAGTaskLoop.cs delete mode 100644 src/PollinationSDK/Model/DailyUsage.cs delete mode 100644 src/PollinationSDK/Model/Dependency.cs delete mode 100644 src/PollinationSDK/Model/DependencyKind.cs delete mode 100644 src/PollinationSDK/Model/DockerConfig.cs delete mode 100644 src/PollinationSDK/Model/FileMeta.cs delete mode 100644 src/PollinationSDK/Model/FileReference.cs delete mode 100644 src/PollinationSDK/Model/FolderReference.cs delete mode 100644 src/PollinationSDK/Model/FromOutput.cs delete mode 100644 src/PollinationSDK/Model/Function.cs delete mode 100644 src/PollinationSDK/Model/FunctionArrayInput.cs delete mode 100644 src/PollinationSDK/Model/FunctionArrayOutput.cs delete mode 100644 src/PollinationSDK/Model/FunctionBooleanInput.cs delete mode 100644 src/PollinationSDK/Model/FunctionBooleanOutput.cs delete mode 100644 src/PollinationSDK/Model/FunctionFileInput.cs delete mode 100644 src/PollinationSDK/Model/FunctionFileOutput.cs delete mode 100644 src/PollinationSDK/Model/FunctionFolderInput.cs delete mode 100644 src/PollinationSDK/Model/FunctionFolderOutput.cs delete mode 100644 src/PollinationSDK/Model/FunctionIntegerInput.cs delete mode 100644 src/PollinationSDK/Model/FunctionIntegerOutput.cs delete mode 100644 src/PollinationSDK/Model/FunctionJSONObjectInput.cs delete mode 100644 src/PollinationSDK/Model/FunctionJSONObjectOutput.cs delete mode 100644 src/PollinationSDK/Model/FunctionNumberInput.cs delete mode 100644 src/PollinationSDK/Model/FunctionNumberOutput.cs delete mode 100644 src/PollinationSDK/Model/FunctionPathInput.cs delete mode 100644 src/PollinationSDK/Model/FunctionPathOutput.cs delete mode 100644 src/PollinationSDK/Model/FunctionStringInput.cs delete mode 100644 src/PollinationSDK/Model/FunctionStringOutput.cs delete mode 100644 src/PollinationSDK/Model/GenericInput.cs delete mode 100644 src/PollinationSDK/Model/GenericOutput.cs delete mode 100644 src/PollinationSDK/Model/HTTP.cs delete mode 100644 src/PollinationSDK/Model/IOAliasHandler.cs delete mode 100644 src/PollinationSDK/Model/IOBase.cs delete mode 100644 src/PollinationSDK/Model/InputFileReference.cs delete mode 100644 src/PollinationSDK/Model/InputFolderReference.cs delete mode 100644 src/PollinationSDK/Model/InputPathReference.cs delete mode 100644 src/PollinationSDK/Model/InputReference.cs delete mode 100644 src/PollinationSDK/Model/InputReferenceBase.cs delete mode 100644 src/PollinationSDK/Model/ItemReference.cs delete mode 100644 src/PollinationSDK/Model/ItemType.cs delete mode 100644 src/PollinationSDK/Model/Job.cs delete mode 100644 src/PollinationSDK/Model/JobArgument.cs delete mode 100644 src/PollinationSDK/Model/JobPathArgument.cs delete mode 100644 src/PollinationSDK/Model/JobStatus.cs delete mode 100644 src/PollinationSDK/Model/JobStatusEnum.cs delete mode 100644 src/PollinationSDK/Model/KeyRequest.cs delete mode 100644 src/PollinationSDK/Model/License.cs delete mode 100644 src/PollinationSDK/Model/ListResponseMeta.cs delete mode 100644 src/PollinationSDK/Model/LocalConfig.cs delete mode 100644 src/PollinationSDK/Model/Maintainer.cs delete mode 100644 src/PollinationSDK/Model/MetaData.cs delete mode 100644 src/PollinationSDK/Model/NewPluginPackage.cs delete mode 100644 src/PollinationSDK/Model/NewRecipePackage.cs delete mode 100644 src/PollinationSDK/Model/OpenAPIGenBaseModel.cs delete mode 100644 src/PollinationSDK/Model/Organization.cs delete mode 100644 src/PollinationSDK/Model/OrganizationCreate.cs delete mode 100644 src/PollinationSDK/Model/OrganizationList.cs delete mode 100644 src/PollinationSDK/Model/OrganizationMember.cs delete mode 100644 src/PollinationSDK/Model/OrganizationMemberList.cs delete mode 100644 src/PollinationSDK/Model/OrganizationRoleEnum.cs delete mode 100644 src/PollinationSDK/Model/OrganizationUpdate.cs delete mode 100644 src/PollinationSDK/Model/PackageVersion.cs delete mode 100644 src/PollinationSDK/Model/PathOutput.cs delete mode 100644 src/PollinationSDK/Model/Permission.cs delete mode 100644 src/PollinationSDK/Model/Plugin.cs delete mode 100644 src/PollinationSDK/Model/PluginConfig.cs delete mode 100644 src/PollinationSDK/Model/PluginPackage.cs delete mode 100644 src/PollinationSDK/Model/PluginPackageList.cs delete mode 100644 src/PollinationSDK/Model/PolicySubject.cs delete mode 100644 src/PollinationSDK/Model/Project.cs delete mode 100644 src/PollinationSDK/Model/ProjectAccessPolicy.cs delete mode 100644 src/PollinationSDK/Model/ProjectAccessPolicyList.cs delete mode 100644 src/PollinationSDK/Model/ProjectCreate.cs delete mode 100644 src/PollinationSDK/Model/ProjectFolder.cs delete mode 100644 src/PollinationSDK/Model/ProjectList.cs delete mode 100644 src/PollinationSDK/Model/ProjectPolicySubject.cs delete mode 100644 src/PollinationSDK/Model/ProjectRecipeFilter.cs delete mode 100644 src/PollinationSDK/Model/ProjectRecipeFilterList.cs delete mode 100644 src/PollinationSDK/Model/ProjectUpdate.cs delete mode 100644 src/PollinationSDK/Model/PublicAccountList.cs delete mode 100644 src/PollinationSDK/Model/Recipe.cs delete mode 100644 src/PollinationSDK/Model/RecipeInterface.cs delete mode 100644 src/PollinationSDK/Model/RecipeInterfaceList.cs delete mode 100644 src/PollinationSDK/Model/RecipePackage.cs delete mode 100644 src/PollinationSDK/Model/RecipePackageList.cs delete mode 100644 src/PollinationSDK/Model/Repository.cs delete mode 100644 src/PollinationSDK/Model/RepositoryAccessPolicy.cs delete mode 100644 src/PollinationSDK/Model/RepositoryAccessPolicyList.cs delete mode 100644 src/PollinationSDK/Model/RepositoryCreate.cs delete mode 100644 src/PollinationSDK/Model/RepositoryIndex.cs delete mode 100644 src/PollinationSDK/Model/RepositoryList.cs delete mode 100644 src/PollinationSDK/Model/RepositoryMetadata.cs delete mode 100644 src/PollinationSDK/Model/RepositoryPackage.cs delete mode 100644 src/PollinationSDK/Model/RepositoryPolicySubject.cs delete mode 100644 src/PollinationSDK/Model/RepositoryUpdate.cs delete mode 100644 src/PollinationSDK/Model/RepositoryUserPermissions.cs delete mode 100644 src/PollinationSDK/Model/RoleEnum.cs delete mode 100644 src/PollinationSDK/Model/Run.cs delete mode 100644 src/PollinationSDK/Model/RunList.cs delete mode 100644 src/PollinationSDK/Model/RunResultList.cs delete mode 100644 src/PollinationSDK/Model/RunStatus.cs delete mode 100644 src/PollinationSDK/Model/RunStatusEnum.cs delete mode 100644 src/PollinationSDK/Model/S3.cs delete mode 100644 src/PollinationSDK/Model/S3UploadRequest.cs delete mode 100644 src/PollinationSDK/Model/SortEnum.cs delete mode 100644 src/PollinationSDK/Model/StatusType.cs delete mode 100644 src/PollinationSDK/Model/StepArrayInput.cs delete mode 100644 src/PollinationSDK/Model/StepArrayOutput.cs delete mode 100644 src/PollinationSDK/Model/StepBooleanInput.cs delete mode 100644 src/PollinationSDK/Model/StepBooleanOutput.cs delete mode 100644 src/PollinationSDK/Model/StepFileInput.cs delete mode 100644 src/PollinationSDK/Model/StepFileOutput.cs delete mode 100644 src/PollinationSDK/Model/StepFolderInput.cs delete mode 100644 src/PollinationSDK/Model/StepFolderOutput.cs delete mode 100644 src/PollinationSDK/Model/StepIntegerInput.cs delete mode 100644 src/PollinationSDK/Model/StepIntegerOutput.cs delete mode 100644 src/PollinationSDK/Model/StepJSONObjectInput.cs delete mode 100644 src/PollinationSDK/Model/StepJSONObjectOutput.cs delete mode 100644 src/PollinationSDK/Model/StepList.cs delete mode 100644 src/PollinationSDK/Model/StepNumberInput.cs delete mode 100644 src/PollinationSDK/Model/StepNumberOutput.cs delete mode 100644 src/PollinationSDK/Model/StepPathInput.cs delete mode 100644 src/PollinationSDK/Model/StepPathOutput.cs delete mode 100644 src/PollinationSDK/Model/StepStatus.cs delete mode 100644 src/PollinationSDK/Model/StepStatusEnum.cs delete mode 100644 src/PollinationSDK/Model/StepStringInput.cs delete mode 100644 src/PollinationSDK/Model/StepStringOutput.cs delete mode 100644 src/PollinationSDK/Model/SubjectType.cs delete mode 100644 src/PollinationSDK/Model/TaskArgument.cs delete mode 100644 src/PollinationSDK/Model/TaskFileReference.cs delete mode 100644 src/PollinationSDK/Model/TaskFolderReference.cs delete mode 100644 src/PollinationSDK/Model/TaskPathArgument.cs delete mode 100644 src/PollinationSDK/Model/TaskPathReference.cs delete mode 100644 src/PollinationSDK/Model/TaskPathReturn.cs delete mode 100644 src/PollinationSDK/Model/TaskReference.cs delete mode 100644 src/PollinationSDK/Model/TaskReferenceBase.cs delete mode 100644 src/PollinationSDK/Model/TaskReturn.cs delete mode 100644 src/PollinationSDK/Model/Team.cs delete mode 100644 src/PollinationSDK/Model/TeamCreate.cs delete mode 100644 src/PollinationSDK/Model/TeamList.cs delete mode 100644 src/PollinationSDK/Model/TeamMember.cs delete mode 100644 src/PollinationSDK/Model/TeamMemberList.cs delete mode 100644 src/PollinationSDK/Model/TeamRoleEnum.cs delete mode 100644 src/PollinationSDK/Model/TeamUpdate.cs delete mode 100644 src/PollinationSDK/Model/UpdateAccepted.cs delete mode 100644 src/PollinationSDK/Model/Usage.cs delete mode 100644 src/PollinationSDK/Model/UserCreate.cs delete mode 100644 src/PollinationSDK/Model/UserPermission.cs delete mode 100644 src/PollinationSDK/Model/UserPrivate.cs delete mode 100644 src/PollinationSDK/Model/UserPublic.cs delete mode 100644 src/PollinationSDK/Model/UserPublicList.cs delete mode 100644 src/PollinationSDK/Model/UserUpdate.cs delete mode 100644 src/PollinationSDK/Model/ValueFileReference.cs delete mode 100644 src/PollinationSDK/Model/ValueFolderReference.cs delete mode 100644 src/PollinationSDK/Model/ValueListReference.cs delete mode 100644 src/PollinationSDK/Model/ValueReference.cs diff --git a/src/PollinationSDK/Api/APITokensApi.cs b/src/PollinationSDK/Api/APITokensApi.cs deleted file mode 100644 index 91950404f..000000000 --- a/src/PollinationSDK/Api/APITokensApi.cs +++ /dev/null @@ -1,933 +0,0 @@ -/* - * 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 IAPITokensApi : IApiAccessor - { - #region Synchronous Operations - /// - /// Create a new API token - /// - /// - /// Create a new API token - /// - /// Thrown when fails to make API call - /// - /// APITokenPrivate - APITokenPrivate CreateToken (APITokenCreate aPITokenCreate); - - /// - /// Create a new API token - /// - /// - /// Create a new API token - /// - /// Thrown when fails to make API call - /// - /// ApiResponse of APITokenPrivate - ApiResponse CreateTokenWithHttpInfo (APITokenCreate aPITokenCreate); - /// - /// Delete an API Token - /// - /// - /// Delete a token - /// - /// Thrown when fails to make API call - /// - /// object - object DeleteToken (string tokenId); - - /// - /// Delete an API Token - /// - /// - /// Delete a token - /// - /// Thrown when fails to make API call - /// - /// ApiResponse of object - ApiResponse DeleteTokenWithHttpInfo (string tokenId); - /// - /// List user API tokens - /// - /// - /// List API tokens for the authenticated user - /// - /// Thrown when fails to make API call - /// Page number starting from 1 (optional, default to 1) - /// Number of items per page (optional, default to 25) - /// APITokenList - APITokenList ListTokens (int? page = default, int? perPage = default); - - /// - /// List user API tokens - /// - /// - /// List API tokens for the authenticated user - /// - /// Thrown when fails to make API call - /// Page number starting from 1 (optional, default to 1) - /// Number of items per page (optional, default to 25) - /// ApiResponse of APITokenList - ApiResponse ListTokensWithHttpInfo (int? page = default, int? perPage = default); - /// - /// Regenerate an API token - /// - /// - /// Regenerate a token - /// - /// Thrown when fails to make API call - /// - /// APITokenPrivate - APITokenPrivate RegenerateToken (string tokenId); - - /// - /// Regenerate an API token - /// - /// - /// Regenerate a token - /// - /// Thrown when fails to make API call - /// - /// ApiResponse of APITokenPrivate - ApiResponse RegenerateTokenWithHttpInfo (string tokenId); - #endregion Synchronous Operations - #region Asynchronous Operations - /// - /// Create a new API token - /// - /// - /// Create a new API token - /// - /// Thrown when fails to make API call - /// - /// Cancellation Token to cancel request (optional) - /// Task of APITokenPrivate - System.Threading.Tasks.Task CreateTokenAsync (APITokenCreate aPITokenCreate, CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// Create a new API token - /// - /// - /// Create a new API token - /// - /// Thrown when fails to make API call - /// - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (APITokenPrivate) - System.Threading.Tasks.Task> CreateTokenWithHttpInfoAsync (APITokenCreate aPITokenCreate, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Delete an API Token - /// - /// - /// Delete a token - /// - /// Thrown when fails to make API call - /// - /// Cancellation Token to cancel request (optional) - /// Task of object - System.Threading.Tasks.Task DeleteTokenAsync (string tokenId, CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// Delete an API Token - /// - /// - /// Delete a token - /// - /// Thrown when fails to make API call - /// - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (object) - System.Threading.Tasks.Task> DeleteTokenWithHttpInfoAsync (string tokenId, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// List user API tokens - /// - /// - /// List API tokens for the authenticated user - /// - /// Thrown when fails to make API call - /// 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 APITokenList - System.Threading.Tasks.Task ListTokensAsync (int? page = default, int? perPage = default, CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// List user API tokens - /// - /// - /// List API tokens for the authenticated user - /// - /// Thrown when fails to make API call - /// 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 (APITokenList) - System.Threading.Tasks.Task> ListTokensWithHttpInfoAsync (int? page = default, int? perPage = default, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Regenerate an API token - /// - /// - /// Regenerate a token - /// - /// Thrown when fails to make API call - /// - /// Cancellation Token to cancel request (optional) - /// Task of APITokenPrivate - System.Threading.Tasks.Task RegenerateTokenAsync (string tokenId, CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// Regenerate an API token - /// - /// - /// Regenerate a token - /// - /// Thrown when fails to make API call - /// - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (APITokenPrivate) - System.Threading.Tasks.Task> RegenerateTokenWithHttpInfoAsync (string tokenId, CancellationToken cancellationToken = default(CancellationToken)); - #endregion Asynchronous Operations - } - - /// - /// Represents a collection of functions to interact with the API endpoints - /// - public partial class APITokensApi : IAPITokensApi - { - private PollinationSDK.Client.ExceptionFactory _exceptionFactory = (name, response) => null; - - /// - /// Initializes a new instance of the class. - /// - /// - public APITokensApi(String basePath) - { - this.Configuration = new PollinationSDK.Client.Configuration { BasePath = basePath }; - - ExceptionFactory = PollinationSDK.Client.Configuration.DefaultExceptionFactory; - } - - /// - /// Initializes a new instance of the class - /// - /// - public APITokensApi() - { - 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 APITokensApi(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; } - } - - /// - /// Create a new API token Create a new API token - /// - /// Thrown when fails to make API call - /// - /// APITokenPrivate - public APITokenPrivate CreateToken (APITokenCreate aPITokenCreate) - { - ApiResponse localVarResponse = CreateTokenWithHttpInfo(aPITokenCreate); - return localVarResponse.Data; - } - - /// - /// Create a new API token Create a new API token - /// - /// Thrown when fails to make API call - /// - /// ApiResponse of APITokenPrivate - public ApiResponse CreateTokenWithHttpInfo (APITokenCreate aPITokenCreate) - { - // verify the required parameter 'aPITokenCreate' is set - if (aPITokenCreate == null) - throw new ApiException(400, "Missing required parameter 'aPITokenCreate' when calling APITokensApi->CreateToken"); - - var localVarPath = "/tokens"; - 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 (aPITokenCreate != null && aPITokenCreate.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(aPITokenCreate); // http body (model) parameter - } - else - { - localVarPostBody = aPITokenCreate; // 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("CreateToken", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (APITokenPrivate) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(APITokenPrivate))); - } - - /// - /// Create a new API token Create a new API token - /// - /// Thrown when fails to make API call - /// - /// Cancellation Token to cancel request (optional) - /// Task of APITokenPrivate - public async System.Threading.Tasks.Task CreateTokenAsync (APITokenCreate aPITokenCreate, CancellationToken cancellationToken = default(CancellationToken)) - { - ApiResponse localVarResponse = await CreateTokenWithHttpInfoAsync(aPITokenCreate, cancellationToken); - return localVarResponse.Data; - - } - - /// - /// Create a new API token Create a new API token - /// - /// Thrown when fails to make API call - /// - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (APITokenPrivate) - public async System.Threading.Tasks.Task> CreateTokenWithHttpInfoAsync (APITokenCreate aPITokenCreate, CancellationToken cancellationToken = default(CancellationToken)) - { - // verify the required parameter 'aPITokenCreate' is set - if (aPITokenCreate == null) - throw new ApiException(400, "Missing required parameter 'aPITokenCreate' when calling APITokensApi->CreateToken"); - - var localVarPath = "/tokens"; - 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 (aPITokenCreate != null && aPITokenCreate.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(aPITokenCreate); // http body (model) parameter - } - else - { - localVarPostBody = aPITokenCreate; // 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("CreateToken", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (APITokenPrivate) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(APITokenPrivate))); - } - - /// - /// Delete an API Token Delete a token - /// - /// Thrown when fails to make API call - /// - /// object - public object DeleteToken (string tokenId) - { - ApiResponse localVarResponse = DeleteTokenWithHttpInfo(tokenId); - return localVarResponse.Data; - } - - /// - /// Delete an API Token Delete a token - /// - /// Thrown when fails to make API call - /// - /// ApiResponse of object - public ApiResponse DeleteTokenWithHttpInfo (string tokenId) - { - // verify the required parameter 'tokenId' is set - if (tokenId == null) - throw new ApiException(400, "Missing required parameter 'tokenId' when calling APITokensApi->DeleteToken"); - - var localVarPath = "/tokens/{token_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 (tokenId != null) localVarPathParams.Add("token_id", this.Configuration.ApiClient.ParameterToString(tokenId)); // 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("DeleteToken", 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 an API Token Delete a token - /// - /// Thrown when fails to make API call - /// - /// Cancellation Token to cancel request (optional) - /// Task of object - public async System.Threading.Tasks.Task DeleteTokenAsync (string tokenId, CancellationToken cancellationToken = default(CancellationToken)) - { - ApiResponse localVarResponse = await DeleteTokenWithHttpInfoAsync(tokenId, cancellationToken); - return localVarResponse.Data; - - } - - /// - /// Delete an API Token Delete a token - /// - /// Thrown when fails to make API call - /// - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (object) - public async System.Threading.Tasks.Task> DeleteTokenWithHttpInfoAsync (string tokenId, CancellationToken cancellationToken = default(CancellationToken)) - { - // verify the required parameter 'tokenId' is set - if (tokenId == null) - throw new ApiException(400, "Missing required parameter 'tokenId' when calling APITokensApi->DeleteToken"); - - var localVarPath = "/tokens/{token_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 (tokenId != null) localVarPathParams.Add("token_id", this.Configuration.ApiClient.ParameterToString(tokenId)); // 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("DeleteToken", 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))); - } - - /// - /// List user API tokens List API tokens for the authenticated user - /// - /// Thrown when fails to make API call - /// Page number starting from 1 (optional, default to 1) - /// Number of items per page (optional, default to 25) - /// APITokenList - public APITokenList ListTokens (int? page = default, int? perPage = default) - { - ApiResponse localVarResponse = ListTokensWithHttpInfo(page, perPage); - return localVarResponse.Data; - } - - /// - /// List user API tokens List API tokens for the authenticated user - /// - /// Thrown when fails to make API call - /// Page number starting from 1 (optional, default to 1) - /// Number of items per page (optional, default to 25) - /// ApiResponse of APITokenList - public ApiResponse ListTokensWithHttpInfo (int? page = default, int? perPage = default) - { - - var localVarPath = "/tokens"; - 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 (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("ListTokens", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (APITokenList) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(APITokenList))); - } - - /// - /// List user API tokens List API tokens for the authenticated user - /// - /// Thrown when fails to make API call - /// 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 APITokenList - public async System.Threading.Tasks.Task ListTokensAsync (int? page = default, int? perPage = default, CancellationToken cancellationToken = default(CancellationToken)) - { - ApiResponse localVarResponse = await ListTokensWithHttpInfoAsync(page, perPage, cancellationToken); - return localVarResponse.Data; - - } - - /// - /// List user API tokens List API tokens for the authenticated user - /// - /// Thrown when fails to make API call - /// 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 (APITokenList) - public async System.Threading.Tasks.Task> ListTokensWithHttpInfoAsync (int? page = default, int? perPage = default, CancellationToken cancellationToken = default(CancellationToken)) - { - - var localVarPath = "/tokens"; - 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 (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("ListTokens", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (APITokenList) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(APITokenList))); - } - - /// - /// Regenerate an API token Regenerate a token - /// - /// Thrown when fails to make API call - /// - /// APITokenPrivate - public APITokenPrivate RegenerateToken (string tokenId) - { - ApiResponse localVarResponse = RegenerateTokenWithHttpInfo(tokenId); - return localVarResponse.Data; - } - - /// - /// Regenerate an API token Regenerate a token - /// - /// Thrown when fails to make API call - /// - /// ApiResponse of APITokenPrivate - public ApiResponse RegenerateTokenWithHttpInfo (string tokenId) - { - // verify the required parameter 'tokenId' is set - if (tokenId == null) - throw new ApiException(400, "Missing required parameter 'tokenId' when calling APITokensApi->RegenerateToken"); - - var localVarPath = "/tokens/{token_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 (tokenId != null) localVarPathParams.Add("token_id", this.Configuration.ApiClient.ParameterToString(tokenId)); // 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.PUT, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("RegenerateToken", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (APITokenPrivate) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(APITokenPrivate))); - } - - /// - /// Regenerate an API token Regenerate a token - /// - /// Thrown when fails to make API call - /// - /// Cancellation Token to cancel request (optional) - /// Task of APITokenPrivate - public async System.Threading.Tasks.Task RegenerateTokenAsync (string tokenId, CancellationToken cancellationToken = default(CancellationToken)) - { - ApiResponse localVarResponse = await RegenerateTokenWithHttpInfoAsync(tokenId, cancellationToken); - return localVarResponse.Data; - - } - - /// - /// Regenerate an API token Regenerate a token - /// - /// Thrown when fails to make API call - /// - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (APITokenPrivate) - public async System.Threading.Tasks.Task> RegenerateTokenWithHttpInfoAsync (string tokenId, CancellationToken cancellationToken = default(CancellationToken)) - { - // verify the required parameter 'tokenId' is set - if (tokenId == null) - throw new ApiException(400, "Missing required parameter 'tokenId' when calling APITokensApi->RegenerateToken"); - - var localVarPath = "/tokens/{token_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 (tokenId != null) localVarPathParams.Add("token_id", this.Configuration.ApiClient.ParameterToString(tokenId)); // 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.PUT, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType, cancellationToken); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("RegenerateToken", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (APITokenPrivate) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(APITokenPrivate))); - } - - } -} diff --git a/src/PollinationSDK/Api/AccountsApi.cs b/src/PollinationSDK/Api/AccountsApi.cs deleted file mode 100644 index 42c809571..000000000 --- a/src/PollinationSDK/Api/AccountsApi.cs +++ /dev/null @@ -1,523 +0,0 @@ -/* - * 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 IAccountsApi : IApiAccessor - { - #region Synchronous Operations - /// - /// Get an account by name - /// - /// - /// Retrieve an account by name - /// - /// Thrown when fails to make API call - /// - /// AccountPublic - AccountPublic GetAccount (string name); - - /// - /// Get an account by name - /// - /// - /// Retrieve an account by name - /// - /// Thrown when fails to make API call - /// - /// ApiResponse of AccountPublic - ApiResponse GetAccountWithHttpInfo (string name); - /// - /// List Accounts on the Pollination platform - /// - /// - /// List accounts - /// - /// Thrown when fails to make API call - /// Search string to find accounts (optional) - /// Whether the account is for a user or an org (optional) - /// The role the user has in relation to this account (optional) - /// Page number starting from 1 (optional, default to 1) - /// Number of items per page (optional, default to 25) - /// PublicAccountList - PublicAccountList ListAccounts (string search = default, string type = default, RoleEnum? role = default, int? page = default, int? perPage = default); - - /// - /// List Accounts on the Pollination platform - /// - /// - /// List accounts - /// - /// Thrown when fails to make API call - /// Search string to find accounts (optional) - /// Whether the account is for a user or an org (optional) - /// The role the user has in relation to this account (optional) - /// Page number starting from 1 (optional, default to 1) - /// 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); - #endregion Synchronous Operations - #region Asynchronous Operations - /// - /// Get an account by name - /// - /// - /// Retrieve an account by name - /// - /// Thrown when fails to make API call - /// - /// Cancellation Token to cancel request (optional) - /// Task of AccountPublic - System.Threading.Tasks.Task GetAccountAsync (string name, CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// Get an account by name - /// - /// - /// Retrieve an account by name - /// - /// Thrown when fails to make API call - /// - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (AccountPublic) - System.Threading.Tasks.Task> GetAccountWithHttpInfoAsync (string name, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// List Accounts on the Pollination platform - /// - /// - /// List accounts - /// - /// Thrown when fails to make API call - /// Search string to find accounts (optional) - /// Whether the account is for a user or an org (optional) - /// The role the user has in relation to this account (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 PublicAccountList - System.Threading.Tasks.Task ListAccountsAsync (string search = default, string type = default, RoleEnum? role = default, int? page = default, int? perPage = default, CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// List Accounts on the Pollination platform - /// - /// - /// List accounts - /// - /// Thrown when fails to make API call - /// Search string to find accounts (optional) - /// Whether the account is for a user or an org (optional) - /// The role the user has in relation to this account (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 (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)); - #endregion Asynchronous Operations - } - - /// - /// Represents a collection of functions to interact with the API endpoints - /// - public partial class AccountsApi : IAccountsApi - { - private PollinationSDK.Client.ExceptionFactory _exceptionFactory = (name, response) => null; - - /// - /// Initializes a new instance of the class. - /// - /// - public AccountsApi(String basePath) - { - this.Configuration = new PollinationSDK.Client.Configuration { BasePath = basePath }; - - ExceptionFactory = PollinationSDK.Client.Configuration.DefaultExceptionFactory; - } - - /// - /// Initializes a new instance of the class - /// - /// - public AccountsApi() - { - 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 AccountsApi(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 an account by name Retrieve an account by name - /// - /// Thrown when fails to make API call - /// - /// AccountPublic - public AccountPublic GetAccount (string name) - { - ApiResponse localVarResponse = GetAccountWithHttpInfo(name); - return localVarResponse.Data; - } - - /// - /// Get an account by name Retrieve an account by name - /// - /// Thrown when fails to make API call - /// - /// ApiResponse of AccountPublic - public ApiResponse GetAccountWithHttpInfo (string name) - { - // verify the required parameter 'name' is set - if (name == null) - throw new ApiException(400, "Missing required parameter 'name' when calling AccountsApi->GetAccount"); - - var localVarPath = "/accounts/{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("GetAccount", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (AccountPublic) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(AccountPublic))); - } - - /// - /// Get an account by name Retrieve an account by name - /// - /// Thrown when fails to make API call - /// - /// Cancellation Token to cancel request (optional) - /// Task of AccountPublic - public async System.Threading.Tasks.Task GetAccountAsync (string name, CancellationToken cancellationToken = default(CancellationToken)) - { - ApiResponse localVarResponse = await GetAccountWithHttpInfoAsync(name, cancellationToken); - return localVarResponse.Data; - - } - - /// - /// Get an account by name Retrieve an account by name - /// - /// Thrown when fails to make API call - /// - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (AccountPublic) - public async System.Threading.Tasks.Task> GetAccountWithHttpInfoAsync (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->GetAccount"); - - var localVarPath = "/accounts/{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("GetAccount", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (AccountPublic) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(AccountPublic))); - } - - /// - /// List Accounts on the Pollination platform List accounts - /// - /// Thrown when fails to make API call - /// Search string to find accounts (optional) - /// Whether the account is for a user or an org (optional) - /// The role the user has in relation to this account (optional) - /// Page number starting from 1 (optional, default to 1) - /// Number of items per page (optional, default to 25) - /// PublicAccountList - public PublicAccountList ListAccounts (string search = default, string type = default, RoleEnum? role = default, int? page = default, int? perPage = default) - { - ApiResponse localVarResponse = ListAccountsWithHttpInfo(search, type, role, page, perPage); - return localVarResponse.Data; - } - - /// - /// List Accounts on the Pollination platform List accounts - /// - /// Thrown when fails to make API call - /// Search string to find accounts (optional) - /// Whether the account is for a user or an org (optional) - /// The role the user has in relation to this account (optional) - /// Page number starting from 1 (optional, default to 1) - /// Number of items per page (optional, default to 25) - /// ApiResponse of PublicAccountList - public ApiResponse ListAccountsWithHttpInfo (string search = default, string type = default, RoleEnum? role = default, int? page = default, int? perPage = default) - { - - var localVarPath = "/accounts"; - 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 (search != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "search", search)); // query parameter - if (type != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "type", type)); // query parameter - if (role != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "role", role)); // 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("ListAccounts", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (PublicAccountList) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(PublicAccountList))); - } - - /// - /// List Accounts on the Pollination platform List accounts - /// - /// Thrown when fails to make API call - /// Search string to find accounts (optional) - /// Whether the account is for a user or an org (optional) - /// The role the user has in relation to this account (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 PublicAccountList - public async System.Threading.Tasks.Task ListAccountsAsync (string search = default, string type = default, RoleEnum? role = default, int? page = default, int? perPage = default, CancellationToken cancellationToken = default(CancellationToken)) - { - ApiResponse localVarResponse = await ListAccountsWithHttpInfoAsync(search, type, role, page, perPage, cancellationToken); - return localVarResponse.Data; - - } - - /// - /// List Accounts on the Pollination platform List accounts - /// - /// Thrown when fails to make API call - /// Search string to find accounts (optional) - /// Whether the account is for a user or an org (optional) - /// The role the user has in relation to this account (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 (PublicAccountList) - public async System.Threading.Tasks.Task> ListAccountsWithHttpInfoAsync (string search = default, string type = default, RoleEnum? role = default, int? page = default, int? perPage = default, CancellationToken cancellationToken = default(CancellationToken)) - { - - var localVarPath = "/accounts"; - 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 (search != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "search", search)); // query parameter - if (type != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "type", type)); // query parameter - if (role != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "role", role)); // 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("ListAccounts", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (PublicAccountList) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(PublicAccountList))); - } - - } -} diff --git a/src/PollinationSDK/Api/ArtifactsApi.cs b/src/PollinationSDK/Api/ArtifactsApi.cs deleted file mode 100644 index 3b09fd36b..000000000 --- a/src/PollinationSDK/Api/ArtifactsApi.cs +++ /dev/null @@ -1,1077 +0,0 @@ -/* - * 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 IArtifactsApi : IApiAccessor - { - #region Synchronous Operations - /// - /// Get an Artifact upload link. - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// - /// - /// S3UploadRequest - S3UploadRequest CreateArtifact (string owner, string name, KeyRequest keyRequest); - - /// - /// Get an Artifact upload link. - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// - /// - /// ApiResponse of S3UploadRequest - ApiResponse CreateArtifactWithHttpInfo (string owner, string name, KeyRequest keyRequest); - /// - /// Delete one or many artifacts by key/prefix - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// - /// The path to an file within a project folder (optional) - /// Page number starting from 1 (optional, default to 1) - /// Number of items per page (optional, default to 25) - /// - void DeleteArtifact (string owner, string name, List path = default, int? page = default, int? perPage = default); - - /// - /// Delete one or many artifacts by key/prefix - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// - /// The path to an file within a project folder (optional) - /// Page number starting from 1 (optional, default to 1) - /// Number of items per page (optional, default to 25) - /// ApiResponse of Object(void) - ApiResponse DeleteArtifactWithHttpInfo (string owner, string name, List path = default, int? page = default, int? perPage = default); - /// - /// Download an artifact from the project folder - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// - /// The path to an file within a project folder (optional) - /// object - object DownloadArtifact (string owner, string name, string path = default); - - /// - /// Download an artifact from the project folder - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// - /// The path to an file within a project folder (optional) - /// ApiResponse of object - ApiResponse DownloadArtifactWithHttpInfo (string owner, string name, string path = default); - /// - /// List artifacts in a project folder - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// - /// The path to an file within a project folder (optional) - /// Page number starting from 1 (optional, default to 1) - /// Number of items per page (optional, default to 25) - /// List<FileMeta> - List ListArtifacts (string owner, string name, List path = default, int? page = default, int? perPage = default); - - /// - /// List artifacts in a project folder - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// - /// The path to an file within a project folder (optional) - /// Page number starting from 1 (optional, default to 1) - /// Number of items per page (optional, default to 25) - /// ApiResponse of List<FileMeta> - ApiResponse> ListArtifactsWithHttpInfo (string owner, string name, List path = default, int? page = default, int? perPage = default); - #endregion Synchronous Operations - #region Asynchronous Operations - /// - /// Get an Artifact upload link. - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// - /// - /// Cancellation Token to cancel request (optional) - /// Task of S3UploadRequest - System.Threading.Tasks.Task CreateArtifactAsync (string owner, string name, KeyRequest keyRequest, CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// Get an Artifact upload link. - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// - /// - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (S3UploadRequest) - System.Threading.Tasks.Task> CreateArtifactWithHttpInfoAsync (string owner, string name, KeyRequest keyRequest, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Delete one or many artifacts by key/prefix - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// - /// The path to an file within a project folder (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 void - System.Threading.Tasks.Task DeleteArtifactAsync (string owner, string name, List path = default, int? page = default, int? perPage = default, CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// Delete one or many artifacts by key/prefix - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// - /// The path to an file within a project folder (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 - System.Threading.Tasks.Task> DeleteArtifactWithHttpInfoAsync (string owner, string name, List path = default, int? page = default, int? perPage = default, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Download an artifact from the project folder - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// - /// The path to an file within a project folder (optional) - /// Cancellation Token to cancel request (optional) - /// Task of object - System.Threading.Tasks.Task DownloadArtifactAsync (string owner, string name, string path = default, CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// Download an artifact from the project folder - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// - /// The path to an file within a project folder (optional) - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (object) - System.Threading.Tasks.Task> DownloadArtifactWithHttpInfoAsync (string owner, string name, string path = default, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// List artifacts in a project folder - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// - /// The path to an file within a project folder (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 List<FileMeta> - System.Threading.Tasks.Task> ListArtifactsAsync (string owner, string name, List path = default, int? page = default, int? perPage = default, CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// List artifacts in a project folder - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// - /// The path to an file within a project folder (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 (List<FileMeta>) - System.Threading.Tasks.Task>> ListArtifactsWithHttpInfoAsync (string owner, string name, List path = default, int? page = default, int? perPage = default, CancellationToken cancellationToken = default(CancellationToken)); - #endregion Asynchronous Operations - } - - /// - /// Represents a collection of functions to interact with the API endpoints - /// - public partial class ArtifactsApi : IArtifactsApi - { - private PollinationSDK.Client.ExceptionFactory _exceptionFactory = (name, response) => null; - - /// - /// Initializes a new instance of the class. - /// - /// - public ArtifactsApi(String basePath) - { - this.Configuration = new PollinationSDK.Client.Configuration { BasePath = basePath }; - - ExceptionFactory = PollinationSDK.Client.Configuration.DefaultExceptionFactory; - } - - /// - /// Initializes a new instance of the class - /// - /// - public ArtifactsApi() - { - 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 ArtifactsApi(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 an Artifact upload link. - /// - /// Thrown when fails to make API call - /// - /// - /// - /// S3UploadRequest - public S3UploadRequest CreateArtifact (string owner, string name, KeyRequest keyRequest) - { - ApiResponse localVarResponse = CreateArtifactWithHttpInfo(owner, name, keyRequest); - return localVarResponse.Data; - } - - /// - /// Get an Artifact upload link. - /// - /// Thrown when fails to make API call - /// - /// - /// - /// ApiResponse of S3UploadRequest - public ApiResponse CreateArtifactWithHttpInfo (string owner, string name, KeyRequest keyRequest) - { - // verify the required parameter 'owner' is set - if (owner == null) - throw new ApiException(400, "Missing required parameter 'owner' when calling ArtifactsApi->CreateArtifact"); - // verify the required parameter 'name' is set - if (name == null) - throw new ApiException(400, "Missing required parameter 'name' when calling ArtifactsApi->CreateArtifact"); - // verify the required parameter 'keyRequest' is set - if (keyRequest == null) - throw new ApiException(400, "Missing required parameter 'keyRequest' when calling ArtifactsApi->CreateArtifact"); - - var localVarPath = "/projects/{owner}/{name}/artifacts"; - 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 (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 (keyRequest != null && keyRequest.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(keyRequest); // http body (model) parameter - } - else - { - localVarPostBody = keyRequest; // 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("CreateArtifact", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (S3UploadRequest) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(S3UploadRequest))); - } - - /// - /// Get an Artifact upload link. - /// - /// Thrown when fails to make API call - /// - /// - /// - /// Cancellation Token to cancel request (optional) - /// Task of S3UploadRequest - public async System.Threading.Tasks.Task CreateArtifactAsync (string owner, string name, KeyRequest keyRequest, CancellationToken cancellationToken = default(CancellationToken)) - { - ApiResponse localVarResponse = await CreateArtifactWithHttpInfoAsync(owner, name, keyRequest, cancellationToken); - return localVarResponse.Data; - - } - - /// - /// Get an Artifact upload link. - /// - /// Thrown when fails to make API call - /// - /// - /// - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (S3UploadRequest) - public async System.Threading.Tasks.Task> CreateArtifactWithHttpInfoAsync (string owner, string name, KeyRequest keyRequest, CancellationToken cancellationToken = default(CancellationToken)) - { - // verify the required parameter 'owner' is set - if (owner == null) - throw new ApiException(400, "Missing required parameter 'owner' when calling ArtifactsApi->CreateArtifact"); - // verify the required parameter 'name' is set - if (name == null) - throw new ApiException(400, "Missing required parameter 'name' when calling ArtifactsApi->CreateArtifact"); - // verify the required parameter 'keyRequest' is set - if (keyRequest == null) - throw new ApiException(400, "Missing required parameter 'keyRequest' when calling ArtifactsApi->CreateArtifact"); - - var localVarPath = "/projects/{owner}/{name}/artifacts"; - 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 (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 (keyRequest != null && keyRequest.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(keyRequest); // http body (model) parameter - } - else - { - localVarPostBody = keyRequest; // 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("CreateArtifact", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (S3UploadRequest) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(S3UploadRequest))); - } - - /// - /// Delete one or many artifacts by key/prefix - /// - /// Thrown when fails to make API call - /// - /// - /// The path to an file within a project folder (optional) - /// Page number starting from 1 (optional, default to 1) - /// Number of items per page (optional, default to 25) - /// - public void DeleteArtifact (string owner, string name, List path = default, int? page = default, int? perPage = default) - { - DeleteArtifactWithHttpInfo(owner, name, path, page, perPage); - } - - /// - /// Delete one or many artifacts by key/prefix - /// - /// Thrown when fails to make API call - /// - /// - /// The path to an file within a project folder (optional) - /// Page number starting from 1 (optional, default to 1) - /// Number of items per page (optional, default to 25) - /// ApiResponse of Object(void) - public ApiResponse DeleteArtifactWithHttpInfo (string owner, string name, List path = default, int? page = default, int? perPage = default) - { - // verify the required parameter 'owner' is set - if (owner == null) - throw new ApiException(400, "Missing required parameter 'owner' when calling ArtifactsApi->DeleteArtifact"); - // verify the required parameter 'name' is set - if (name == null) - throw new ApiException(400, "Missing required parameter 'name' when calling ArtifactsApi->DeleteArtifact"); - - var localVarPath = "/projects/{owner}/{name}/artifacts"; - 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 (path != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("multi", "path", path)); // 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.DELETE, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("DeleteArtifact", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); - } - - /// - /// Delete one or many artifacts by key/prefix - /// - /// Thrown when fails to make API call - /// - /// - /// The path to an file within a project folder (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 void - public async System.Threading.Tasks.Task DeleteArtifactAsync (string owner, string name, List path = default, int? page = default, int? perPage = default, CancellationToken cancellationToken = default(CancellationToken)) - { - await DeleteArtifactWithHttpInfoAsync(owner, name, path, page, perPage, cancellationToken); - - } - - /// - /// Delete one or many artifacts by key/prefix - /// - /// Thrown when fails to make API call - /// - /// - /// The path to an file within a project folder (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 - public async System.Threading.Tasks.Task> DeleteArtifactWithHttpInfoAsync (string owner, string name, List path = default, int? page = default, int? perPage = default, CancellationToken cancellationToken = default(CancellationToken)) - { - // verify the required parameter 'owner' is set - if (owner == null) - throw new ApiException(400, "Missing required parameter 'owner' when calling ArtifactsApi->DeleteArtifact"); - // verify the required parameter 'name' is set - if (name == null) - throw new ApiException(400, "Missing required parameter 'name' when calling ArtifactsApi->DeleteArtifact"); - - var localVarPath = "/projects/{owner}/{name}/artifacts"; - 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 (path != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("multi", "path", path)); // 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.DELETE, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType, cancellationToken); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("DeleteArtifact", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); - } - - /// - /// Download an artifact from the project folder - /// - /// Thrown when fails to make API call - /// - /// - /// The path to an file within a project folder (optional) - /// object - public object DownloadArtifact (string owner, string name, string path = default) - { - ApiResponse localVarResponse = DownloadArtifactWithHttpInfo(owner, name, path); - return localVarResponse.Data; - } - - /// - /// Download an artifact from the project folder - /// - /// Thrown when fails to make API call - /// - /// - /// The path to an file within a project folder (optional) - /// ApiResponse of object - public ApiResponse DownloadArtifactWithHttpInfo (string owner, string name, string path = default) - { - // verify the required parameter 'owner' is set - if (owner == null) - throw new ApiException(400, "Missing required parameter 'owner' when calling ArtifactsApi->DownloadArtifact"); - // verify the required parameter 'name' is set - if (name == null) - throw new ApiException(400, "Missing required parameter 'name' when calling ArtifactsApi->DownloadArtifact"); - - var localVarPath = "/projects/{owner}/{name}/artifacts/download"; - 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 (path != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "path", path)); // 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("DownloadArtifact", 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 project folder - /// - /// Thrown when fails to make API call - /// - /// - /// The path to an file within a project folder (optional) - /// Cancellation Token to cancel request (optional) - /// Task of object - public async System.Threading.Tasks.Task DownloadArtifactAsync (string owner, string name, string path = default, CancellationToken cancellationToken = default(CancellationToken)) - { - ApiResponse localVarResponse = await DownloadArtifactWithHttpInfoAsync(owner, name, path, cancellationToken); - return localVarResponse.Data; - - } - - /// - /// Download an artifact from the project folder - /// - /// Thrown when fails to make API call - /// - /// - /// The path to an file within a project folder (optional) - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (object) - public async System.Threading.Tasks.Task> DownloadArtifactWithHttpInfoAsync (string owner, string name, string path = default, CancellationToken cancellationToken = default(CancellationToken)) - { - // verify the required parameter 'owner' is set - if (owner == null) - throw new ApiException(400, "Missing required parameter 'owner' when calling ArtifactsApi->DownloadArtifact"); - // verify the required parameter 'name' is set - if (name == null) - throw new ApiException(400, "Missing required parameter 'name' when calling ArtifactsApi->DownloadArtifact"); - - var localVarPath = "/projects/{owner}/{name}/artifacts/download"; - 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 (path != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "path", path)); // 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("DownloadArtifact", 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))); - } - - /// - /// List artifacts in a project folder - /// - /// Thrown when fails to make API call - /// - /// - /// The path to an file within a project folder (optional) - /// Page number starting from 1 (optional, default to 1) - /// Number of items per page (optional, default to 25) - /// List<FileMeta> - public List ListArtifacts (string owner, string name, List path = default, int? page = default, int? perPage = default) - { - ApiResponse> localVarResponse = ListArtifactsWithHttpInfo(owner, name, path, page, perPage); - return localVarResponse.Data; - } - - /// - /// List artifacts in a project folder - /// - /// Thrown when fails to make API call - /// - /// - /// The path to an file within a project folder (optional) - /// Page number starting from 1 (optional, default to 1) - /// Number of items per page (optional, default to 25) - /// ApiResponse of List<FileMeta> - public ApiResponse> ListArtifactsWithHttpInfo (string owner, string name, List path = default, int? page = default, int? perPage = default) - { - // verify the required parameter 'owner' is set - if (owner == null) - throw new ApiException(400, "Missing required parameter 'owner' when calling ArtifactsApi->ListArtifacts"); - // verify the required parameter 'name' is set - if (name == null) - throw new ApiException(400, "Missing required parameter 'name' when calling ArtifactsApi->ListArtifacts"); - - var localVarPath = "/projects/{owner}/{name}/artifacts"; - 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 (path != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("multi", "path", path)); // 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("ListArtifacts", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse>(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (List) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(List))); - } - - /// - /// List artifacts in a project folder - /// - /// Thrown when fails to make API call - /// - /// - /// The path to an file within a project folder (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 List<FileMeta> - public async System.Threading.Tasks.Task> ListArtifactsAsync (string owner, string name, List path = default, int? page = default, int? perPage = default, CancellationToken cancellationToken = default(CancellationToken)) - { - ApiResponse> localVarResponse = await ListArtifactsWithHttpInfoAsync(owner, name, path, page, perPage, cancellationToken); - return localVarResponse.Data; - - } - - /// - /// List artifacts in a project folder - /// - /// Thrown when fails to make API call - /// - /// - /// The path to an file within a project folder (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 (List<FileMeta>) - public async System.Threading.Tasks.Task>> ListArtifactsWithHttpInfoAsync (string owner, string name, List path = default, int? page = default, int? perPage = default, CancellationToken cancellationToken = default(CancellationToken)) - { - // verify the required parameter 'owner' is set - if (owner == null) - throw new ApiException(400, "Missing required parameter 'owner' when calling ArtifactsApi->ListArtifacts"); - // verify the required parameter 'name' is set - if (name == null) - throw new ApiException(400, "Missing required parameter 'name' when calling ArtifactsApi->ListArtifacts"); - - var localVarPath = "/projects/{owner}/{name}/artifacts"; - 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 (path != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("multi", "path", path)); // 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("ListArtifacts", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse>(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (List) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(List))); - } - - } -} diff --git a/src/PollinationSDK/Api/JobsApi.cs b/src/PollinationSDK/Api/JobsApi.cs deleted file mode 100644 index a562d2c98..000000000 --- a/src/PollinationSDK/Api/JobsApi.cs +++ /dev/null @@ -1,1607 +0,0 @@ -/* - * 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 IJobsApi : IApiAccessor - { - #region Synchronous Operations - /// - /// Cancel a Job - /// - /// - /// Retrieve a job. - /// - /// Thrown when fails to make API call - /// - /// - /// - /// object - object CancelJob (string owner, string name, string jobId); - - /// - /// Cancel a Job - /// - /// - /// Retrieve a job. - /// - /// Thrown when fails to make API call - /// - /// - /// - /// ApiResponse of object - ApiResponse CancelJobWithHttpInfo (string owner, string name, string jobId); - /// - /// Schedule a job - /// - /// - /// Create a new job. - /// - /// Thrown when fails to make API call - /// - /// - /// - /// (optional) - /// (optional) - /// CreatedContent - CreatedContent CreateJob (string owner, string name, Job job, string authorization = default, string xPollinationToken = default); - - /// - /// Schedule a job - /// - /// - /// Create a new job. - /// - /// Thrown when fails to make API call - /// - /// - /// - /// (optional) - /// (optional) - /// ApiResponse of CreatedContent - ApiResponse CreateJobWithHttpInfo (string owner, string name, Job job, string authorization = default, string xPollinationToken = default); - /// - /// Download an artifact from the job folder - /// - /// - /// Get a download link for an artifact in a job folder - /// - /// Thrown when fails to make API call - /// - /// - /// - /// The path to an file within a project folder (optional) - /// object - object DownloadJobArtifact (string owner, string name, string jobId, string path = default); - - /// - /// Download an artifact from the job folder - /// - /// - /// Get a download link for an artifact in a job folder - /// - /// Thrown when fails to make API call - /// - /// - /// - /// The path to an file within a project folder (optional) - /// ApiResponse of object - ApiResponse DownloadJobArtifactWithHttpInfo (string owner, string name, string jobId, string path = default); - /// - /// Get a Job - /// - /// - /// Retrieve a job. - /// - /// Thrown when fails to make API call - /// - /// - /// - /// CloudJob - CloudJob GetJob (string owner, string name, string jobId); - - /// - /// Get a Job - /// - /// - /// Retrieve a job. - /// - /// Thrown when fails to make API call - /// - /// - /// - /// ApiResponse of CloudJob - ApiResponse GetJobWithHttpInfo (string owner, string name, string jobId); - /// - /// List Jobs - /// - /// - /// Retrieve a list of jobs. - /// - /// Thrown when fails to make API call - /// - /// - /// (optional) - /// (optional) - /// Page number starting from 1 (optional, default to 1) - /// Number of items per page (optional, default to 25) - /// CloudJobList - CloudJobList ListJobs (string owner, string name, List ids = default, JobStatusEnum? status = default, int? page = default, int? perPage = default); - - /// - /// List Jobs - /// - /// - /// Retrieve a list of jobs. - /// - /// Thrown when fails to make API call - /// - /// - /// (optional) - /// (optional) - /// Page number starting from 1 (optional, default to 1) - /// Number of items per page (optional, default to 25) - /// ApiResponse of CloudJobList - ApiResponse ListJobsWithHttpInfo (string owner, string name, List ids = default, JobStatusEnum? status = default, int? page = default, int? perPage = default); - /// - /// List files/folders in a job folder - /// - /// - /// Retrieve a list of artifacts in a job folder - /// - /// Thrown when fails to make API call - /// - /// - /// - /// The path to an file within a project folder (optional) - /// Page number starting from 1 (optional, default to 1) - /// Number of items per page (optional, default to 25) - /// List<FileMeta> - List SearchJobFolder (string owner, string name, string jobId, List path = default, int? page = default, int? perPage = default); - - /// - /// List files/folders in a job folder - /// - /// - /// Retrieve a list of artifacts in a job folder - /// - /// Thrown when fails to make API call - /// - /// - /// - /// The path to an file within a project folder (optional) - /// Page number starting from 1 (optional, default to 1) - /// Number of items per page (optional, default to 25) - /// ApiResponse of List<FileMeta> - ApiResponse> SearchJobFolderWithHttpInfo (string owner, string name, string jobId, List path = default, int? page = default, int? perPage = default); - #endregion Synchronous Operations - #region Asynchronous Operations - /// - /// Cancel a Job - /// - /// - /// Retrieve a job. - /// - /// Thrown when fails to make API call - /// - /// - /// - /// Cancellation Token to cancel request (optional) - /// Task of object - System.Threading.Tasks.Task CancelJobAsync (string owner, string name, string jobId, CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// Cancel a Job - /// - /// - /// Retrieve a job. - /// - /// Thrown when fails to make API call - /// - /// - /// - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (object) - System.Threading.Tasks.Task> CancelJobWithHttpInfoAsync (string owner, string name, string jobId, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Schedule a job - /// - /// - /// Create a new job. - /// - /// Thrown when fails to make API call - /// - /// - /// - /// (optional) - /// (optional) - /// Cancellation Token to cancel request (optional) - /// Task of CreatedContent - System.Threading.Tasks.Task CreateJobAsync (string owner, string name, Job job, string authorization = default, string xPollinationToken = default, CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// Schedule a job - /// - /// - /// Create a new job. - /// - /// Thrown when fails to make API call - /// - /// - /// - /// (optional) - /// (optional) - /// Cancellation Token to cancel request (optional) - /// 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)); - /// - /// Download an artifact from the job folder - /// - /// - /// Get a download link for an artifact in a job folder - /// - /// Thrown when fails to make API call - /// - /// - /// - /// The path to an file within a project folder (optional) - /// Cancellation Token to cancel request (optional) - /// Task of object - System.Threading.Tasks.Task DownloadJobArtifactAsync (string owner, string name, string jobId, string path = default, CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// Download an artifact from the job folder - /// - /// - /// Get a download link for an artifact in a job folder - /// - /// Thrown when fails to make API call - /// - /// - /// - /// The path to an file within a project folder (optional) - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (object) - System.Threading.Tasks.Task> DownloadJobArtifactWithHttpInfoAsync (string owner, string name, string jobId, string path = default, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Get a Job - /// - /// - /// Retrieve a job. - /// - /// Thrown when fails to make API call - /// - /// - /// - /// Cancellation Token to cancel request (optional) - /// Task of CloudJob - System.Threading.Tasks.Task GetJobAsync (string owner, string name, string jobId, CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// Get a Job - /// - /// - /// Retrieve a job. - /// - /// Thrown when fails to make API call - /// - /// - /// - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (CloudJob) - System.Threading.Tasks.Task> GetJobWithHttpInfoAsync (string owner, string name, string jobId, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// List Jobs - /// - /// - /// Retrieve a list of jobs. - /// - /// Thrown when fails to make API call - /// - /// - /// (optional) - /// (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 CloudJobList - System.Threading.Tasks.Task ListJobsAsync (string owner, string name, List ids = default, JobStatusEnum? status = default, int? page = default, int? perPage = default, CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// List Jobs - /// - /// - /// Retrieve a list of jobs. - /// - /// Thrown when fails to make API call - /// - /// - /// (optional) - /// (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 (CloudJobList) - System.Threading.Tasks.Task> ListJobsWithHttpInfoAsync (string owner, string name, List ids = default, JobStatusEnum? status = default, int? page = default, int? perPage = default, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// List files/folders in a job folder - /// - /// - /// Retrieve a list of artifacts in a job folder - /// - /// Thrown when fails to make API call - /// - /// - /// - /// The path to an file within a project folder (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 List<FileMeta> - System.Threading.Tasks.Task> SearchJobFolderAsync (string owner, string name, string jobId, List path = default, int? page = default, int? perPage = default, CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// List files/folders in a job folder - /// - /// - /// Retrieve a list of artifacts in a job folder - /// - /// Thrown when fails to make API call - /// - /// - /// - /// The path to an file within a project folder (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 (List<FileMeta>) - System.Threading.Tasks.Task>> SearchJobFolderWithHttpInfoAsync (string owner, string name, string jobId, List path = default, int? page = default, int? perPage = default, CancellationToken cancellationToken = default(CancellationToken)); - #endregion Asynchronous Operations - } - - /// - /// Represents a collection of functions to interact with the API endpoints - /// - public partial class JobsApi : IJobsApi - { - private PollinationSDK.Client.ExceptionFactory _exceptionFactory = (name, response) => null; - - /// - /// Initializes a new instance of the class. - /// - /// - public JobsApi(String basePath) - { - this.Configuration = new PollinationSDK.Client.Configuration { BasePath = basePath }; - - ExceptionFactory = PollinationSDK.Client.Configuration.DefaultExceptionFactory; - } - - /// - /// Initializes a new instance of the class - /// - /// - public JobsApi() - { - 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 JobsApi(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 a Job Retrieve a job. - /// - /// Thrown when fails to make API call - /// - /// - /// - /// object - public object CancelJob (string owner, string name, string jobId) - { - ApiResponse localVarResponse = CancelJobWithHttpInfo(owner, name, jobId); - return localVarResponse.Data; - } - - /// - /// Cancel a Job Retrieve a job. - /// - /// Thrown when fails to make API call - /// - /// - /// - /// ApiResponse of object - public ApiResponse CancelJobWithHttpInfo (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->CancelJob"); - // verify the required parameter 'name' is set - if (name == null) - throw new ApiException(400, "Missing required parameter 'name' when calling JobsApi->CancelJob"); - // verify the required parameter 'jobId' is set - if (jobId == null) - throw new ApiException(400, "Missing required parameter 'jobId' when calling JobsApi->CancelJob"); - - var localVarPath = "/projects/{owner}/{name}/jobs/{job_id}/cancel"; - 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.PUT, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("CancelJob", 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 a Job Retrieve a job. - /// - /// Thrown when fails to make API call - /// - /// - /// - /// Cancellation Token to cancel request (optional) - /// Task of object - public async System.Threading.Tasks.Task CancelJobAsync (string owner, string name, string jobId, CancellationToken cancellationToken = default(CancellationToken)) - { - ApiResponse localVarResponse = await CancelJobWithHttpInfoAsync(owner, name, jobId, cancellationToken); - return localVarResponse.Data; - - } - - /// - /// Cancel a Job Retrieve 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> CancelJobWithHttpInfoAsync (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->CancelJob"); - // verify the required parameter 'name' is set - if (name == null) - throw new ApiException(400, "Missing required parameter 'name' when calling JobsApi->CancelJob"); - // verify the required parameter 'jobId' is set - if (jobId == null) - throw new ApiException(400, "Missing required parameter 'jobId' when calling JobsApi->CancelJob"); - - var localVarPath = "/projects/{owner}/{name}/jobs/{job_id}/cancel"; - 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.PUT, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType, cancellationToken); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("CancelJob", 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))); - } - - /// - /// Schedule a job Create a new job. - /// - /// Thrown when fails to make API call - /// - /// - /// - /// (optional) - /// (optional) - /// CreatedContent - public CreatedContent CreateJob (string owner, string name, Job job, string authorization = default, string xPollinationToken = default) - { - ApiResponse localVarResponse = CreateJobWithHttpInfo(owner, name, job, authorization, xPollinationToken); - return localVarResponse.Data; - } - - /// - /// Schedule a job Create a new job. - /// - /// Thrown when fails to make API call - /// - /// - /// - /// (optional) - /// (optional) - /// ApiResponse of CreatedContent - public ApiResponse CreateJobWithHttpInfo (string owner, string name, Job job, string authorization = default, string xPollinationToken = default) - { - // verify the required parameter 'owner' is set - if (owner == null) - throw new ApiException(400, "Missing required parameter 'owner' when calling JobsApi->CreateJob"); - // verify the required parameter 'name' is set - if (name == null) - throw new ApiException(400, "Missing required parameter 'name' when calling JobsApi->CreateJob"); - // verify the required parameter 'job' is set - if (job == null) - throw new ApiException(400, "Missing required parameter 'job' when calling JobsApi->CreateJob"); - - var localVarPath = "/projects/{owner}/{name}/jobs"; - 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 (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 (authorization != null) localVarHeaderParams.Add("authorization", this.Configuration.ApiClient.ParameterToString(authorization)); // header parameter - if (xPollinationToken != null) localVarHeaderParams.Add("x-pollination-token", this.Configuration.ApiClient.ParameterToString(xPollinationToken)); // header parameter - if (job != null && job.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(job); // http body (model) parameter - } - else - { - localVarPostBody = job; // 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("CreateJob", 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))); - } - - /// - /// Schedule a job Create a new job. - /// - /// Thrown when fails to make API call - /// - /// - /// - /// (optional) - /// (optional) - /// Cancellation Token to cancel request (optional) - /// Task of CreatedContent - public async System.Threading.Tasks.Task CreateJobAsync (string owner, string name, Job job, string authorization = default, string xPollinationToken = default, CancellationToken cancellationToken = default(CancellationToken)) - { - ApiResponse localVarResponse = await CreateJobWithHttpInfoAsync(owner, name, job, authorization, xPollinationToken, cancellationToken); - return localVarResponse.Data; - - } - - /// - /// Schedule a job Create a new job. - /// - /// Thrown when fails to make API call - /// - /// - /// - /// (optional) - /// (optional) - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (CreatedContent) - public async System.Threading.Tasks.Task> CreateJobWithHttpInfoAsync (string owner, string name, Job job, string authorization = default, string xPollinationToken = default, 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->CreateJob"); - // verify the required parameter 'name' is set - if (name == null) - throw new ApiException(400, "Missing required parameter 'name' when calling JobsApi->CreateJob"); - // verify the required parameter 'job' is set - if (job == null) - throw new ApiException(400, "Missing required parameter 'job' when calling JobsApi->CreateJob"); - - var localVarPath = "/projects/{owner}/{name}/jobs"; - 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 (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 (authorization != null) localVarHeaderParams.Add("authorization", this.Configuration.ApiClient.ParameterToString(authorization)); // header parameter - if (xPollinationToken != null) localVarHeaderParams.Add("x-pollination-token", this.Configuration.ApiClient.ParameterToString(xPollinationToken)); // header parameter - if (job != null && job.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(job); // http body (model) parameter - } - else - { - localVarPostBody = job; // 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("CreateJob", 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))); - } - - /// - /// Download an artifact from the job folder Get a download link for an artifact in a job folder - /// - /// Thrown when fails to make API call - /// - /// - /// - /// The path to an file within a project folder (optional) - /// object - public object DownloadJobArtifact (string owner, string name, string jobId, string path = default) - { - ApiResponse localVarResponse = DownloadJobArtifactWithHttpInfo(owner, name, jobId, path); - return localVarResponse.Data; - } - - /// - /// Download an artifact from the job folder Get a download link for an artifact in a job folder - /// - /// Thrown when fails to make API call - /// - /// - /// - /// The path to an file within a project folder (optional) - /// ApiResponse of object - public ApiResponse DownloadJobArtifactWithHttpInfo (string owner, string name, string jobId, string path = default) - { - // verify the required parameter 'owner' is set - if (owner == null) - throw new ApiException(400, "Missing required parameter 'owner' when calling JobsApi->DownloadJobArtifact"); - // verify the required parameter 'name' is set - if (name == null) - throw new ApiException(400, "Missing required parameter 'name' when calling JobsApi->DownloadJobArtifact"); - // verify the required parameter 'jobId' is set - if (jobId == null) - throw new ApiException(400, "Missing required parameter 'jobId' when calling JobsApi->DownloadJobArtifact"); - - var localVarPath = "/projects/{owner}/{name}/jobs/{job_id}/artifacts/download"; - 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 - if (path != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "path", path)); // 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("DownloadJobArtifact", 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 - /// - /// Thrown when fails to make API call - /// - /// - /// - /// The path to an file within a project folder (optional) - /// Cancellation Token to cancel request (optional) - /// Task of object - public async System.Threading.Tasks.Task DownloadJobArtifactAsync (string owner, string name, string jobId, string path = default, CancellationToken cancellationToken = default(CancellationToken)) - { - ApiResponse localVarResponse = await DownloadJobArtifactWithHttpInfoAsync(owner, name, jobId, path, cancellationToken); - return localVarResponse.Data; - - } - - /// - /// Download an artifact from the job folder Get a download link for an artifact in a job folder - /// - /// Thrown when fails to make API call - /// - /// - /// - /// The path to an file within a project folder (optional) - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (object) - public async System.Threading.Tasks.Task> DownloadJobArtifactWithHttpInfoAsync (string owner, string name, string jobId, string path = default, 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->DownloadJobArtifact"); - // verify the required parameter 'name' is set - if (name == null) - throw new ApiException(400, "Missing required parameter 'name' when calling JobsApi->DownloadJobArtifact"); - // verify the required parameter 'jobId' is set - if (jobId == null) - throw new ApiException(400, "Missing required parameter 'jobId' when calling JobsApi->DownloadJobArtifact"); - - var localVarPath = "/projects/{owner}/{name}/jobs/{job_id}/artifacts/download"; - 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 - if (path != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "path", path)); // 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("DownloadJobArtifact", 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 a Job Retrieve a job. - /// - /// Thrown when fails to make API call - /// - /// - /// - /// CloudJob - public CloudJob GetJob (string owner, string name, string jobId) - { - ApiResponse localVarResponse = GetJobWithHttpInfo(owner, name, jobId); - return localVarResponse.Data; - } - - /// - /// Get a Job Retrieve a job. - /// - /// Thrown when fails to make API call - /// - /// - /// - /// ApiResponse of CloudJob - public ApiResponse GetJobWithHttpInfo (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->GetJob"); - // verify the required parameter 'name' is set - if (name == null) - throw new ApiException(400, "Missing required parameter 'name' when calling JobsApi->GetJob"); - // verify the required parameter 'jobId' is set - if (jobId == null) - throw new ApiException(400, "Missing required parameter 'jobId' when calling JobsApi->GetJob"); - - 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.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("GetJob", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (CloudJob) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(CloudJob))); - } - - /// - /// Get a Job Retrieve a job. - /// - /// Thrown when fails to make API call - /// - /// - /// - /// Cancellation Token to cancel request (optional) - /// Task of CloudJob - public async System.Threading.Tasks.Task GetJobAsync (string owner, string name, string jobId, CancellationToken cancellationToken = default(CancellationToken)) - { - ApiResponse localVarResponse = await GetJobWithHttpInfoAsync(owner, name, jobId, cancellationToken); - return localVarResponse.Data; - - } - - /// - /// Get a Job Retrieve a job. - /// - /// Thrown when fails to make API call - /// - /// - /// - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (CloudJob) - public async System.Threading.Tasks.Task> GetJobWithHttpInfoAsync (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->GetJob"); - // verify the required parameter 'name' is set - if (name == null) - throw new ApiException(400, "Missing required parameter 'name' when calling JobsApi->GetJob"); - // verify the required parameter 'jobId' is set - if (jobId == null) - throw new ApiException(400, "Missing required parameter 'jobId' when calling JobsApi->GetJob"); - - 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.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType, cancellationToken); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("GetJob", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (CloudJob) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(CloudJob))); - } - - /// - /// List Jobs Retrieve a list of jobs. - /// - /// Thrown when fails to make API call - /// - /// - /// (optional) - /// (optional) - /// Page number starting from 1 (optional, default to 1) - /// Number of items per page (optional, default to 25) - /// CloudJobList - public CloudJobList ListJobs (string owner, string name, List ids = default, JobStatusEnum? status = default, int? page = default, int? perPage = default) - { - ApiResponse localVarResponse = ListJobsWithHttpInfo(owner, name, ids, status, page, perPage); - return localVarResponse.Data; - } - - /// - /// List Jobs Retrieve a list of jobs. - /// - /// Thrown when fails to make API call - /// - /// - /// (optional) - /// (optional) - /// Page number starting from 1 (optional, default to 1) - /// Number of items per page (optional, default to 25) - /// ApiResponse of CloudJobList - public ApiResponse ListJobsWithHttpInfo (string owner, string name, List ids = default, JobStatusEnum? status = default, int? page = default, int? perPage = default) - { - // verify the required parameter 'owner' is set - if (owner == null) - throw new ApiException(400, "Missing required parameter 'owner' when calling JobsApi->ListJobs"); - // verify the required parameter 'name' is set - if (name == null) - throw new ApiException(400, "Missing required parameter 'name' when calling JobsApi->ListJobs"); - - var localVarPath = "/projects/{owner}/{name}/jobs"; - 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 (ids != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("multi", "ids", ids)); // query parameter - if (status != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "status", status)); // 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("ListJobs", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (CloudJobList) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(CloudJobList))); - } - - /// - /// List Jobs Retrieve a list of jobs. - /// - /// Thrown when fails to make API call - /// - /// - /// (optional) - /// (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 CloudJobList - public async System.Threading.Tasks.Task ListJobsAsync (string owner, string name, List ids = default, JobStatusEnum? status = default, int? page = default, int? perPage = default, CancellationToken cancellationToken = default(CancellationToken)) - { - ApiResponse localVarResponse = await ListJobsWithHttpInfoAsync(owner, name, ids, status, page, perPage, cancellationToken); - return localVarResponse.Data; - - } - - /// - /// List Jobs Retrieve a list of jobs. - /// - /// Thrown when fails to make API call - /// - /// - /// (optional) - /// (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 (CloudJobList) - public async System.Threading.Tasks.Task> ListJobsWithHttpInfoAsync (string owner, string name, List ids = default, JobStatusEnum? status = default, int? page = default, int? perPage = default, 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->ListJobs"); - // verify the required parameter 'name' is set - if (name == null) - throw new ApiException(400, "Missing required parameter 'name' when calling JobsApi->ListJobs"); - - var localVarPath = "/projects/{owner}/{name}/jobs"; - 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 (ids != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("multi", "ids", ids)); // query parameter - if (status != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "status", status)); // 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("ListJobs", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (CloudJobList) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(CloudJobList))); - } - - /// - /// List files/folders in a job folder Retrieve a list of artifacts in a job folder - /// - /// Thrown when fails to make API call - /// - /// - /// - /// The path to an file within a project folder (optional) - /// Page number starting from 1 (optional, default to 1) - /// Number of items per page (optional, default to 25) - /// List<FileMeta> - public List SearchJobFolder (string owner, string name, string jobId, List path = default, int? page = default, int? perPage = default) - { - ApiResponse> localVarResponse = SearchJobFolderWithHttpInfo(owner, name, jobId, path, page, perPage); - return localVarResponse.Data; - } - - /// - /// List files/folders in a job folder Retrieve a list of artifacts in a job folder - /// - /// Thrown when fails to make API call - /// - /// - /// - /// The path to an file within a project folder (optional) - /// Page number starting from 1 (optional, default to 1) - /// Number of items per page (optional, default to 25) - /// ApiResponse of List<FileMeta> - public ApiResponse> SearchJobFolderWithHttpInfo (string owner, string name, string jobId, List path = default, int? page = default, int? perPage = default) - { - // verify the required parameter 'owner' is set - if (owner == null) - throw new ApiException(400, "Missing required parameter 'owner' when calling JobsApi->SearchJobFolder"); - // verify the required parameter 'name' is set - if (name == null) - throw new ApiException(400, "Missing required parameter 'name' when calling JobsApi->SearchJobFolder"); - // verify the required parameter 'jobId' is set - if (jobId == null) - throw new ApiException(400, "Missing required parameter 'jobId' when calling JobsApi->SearchJobFolder"); - - var localVarPath = "/projects/{owner}/{name}/jobs/{job_id}/artifacts"; - 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 - if (path != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("multi", "path", path)); // 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("SearchJobFolder", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse>(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (List) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(List))); - } - - /// - /// List files/folders in a job folder Retrieve a list of artifacts in a job folder - /// - /// Thrown when fails to make API call - /// - /// - /// - /// The path to an file within a project folder (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 List<FileMeta> - public async System.Threading.Tasks.Task> SearchJobFolderAsync (string owner, string name, string jobId, List path = default, int? page = default, int? perPage = default, CancellationToken cancellationToken = default(CancellationToken)) - { - ApiResponse> localVarResponse = await SearchJobFolderWithHttpInfoAsync(owner, name, jobId, path, page, perPage, cancellationToken); - return localVarResponse.Data; - - } - - /// - /// List files/folders in a job folder Retrieve a list of artifacts in a job folder - /// - /// Thrown when fails to make API call - /// - /// - /// - /// The path to an file within a project folder (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 (List<FileMeta>) - public async System.Threading.Tasks.Task>> SearchJobFolderWithHttpInfoAsync (string owner, string name, string jobId, List path = default, int? page = default, int? perPage = default, 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->SearchJobFolder"); - // verify the required parameter 'name' is set - if (name == null) - throw new ApiException(400, "Missing required parameter 'name' when calling JobsApi->SearchJobFolder"); - // verify the required parameter 'jobId' is set - if (jobId == null) - throw new ApiException(400, "Missing required parameter 'jobId' when calling JobsApi->SearchJobFolder"); - - var localVarPath = "/projects/{owner}/{name}/jobs/{job_id}/artifacts"; - 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 - if (path != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("multi", "path", path)); // 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("SearchJobFolder", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse>(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (List) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(List))); - } - - } -} diff --git a/src/PollinationSDK/Api/OrgsApi.cs b/src/PollinationSDK/Api/OrgsApi.cs deleted file mode 100644 index 18295bc96..000000000 --- a/src/PollinationSDK/Api/OrgsApi.cs +++ /dev/null @@ -1,1821 +0,0 @@ -/* - * 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 IOrgsApi : IApiAccessor - { - #region Synchronous Operations - /// - /// Create an Org - /// - /// - /// Create a new org. - /// - /// Thrown when fails to make API call - /// - /// CreatedContent - CreatedContent CreateOrg (OrganizationCreate organizationCreate); - - /// - /// Create an Org - /// - /// - /// Create a new org. - /// - /// Thrown when fails to make API call - /// - /// ApiResponse of CreatedContent - ApiResponse CreateOrgWithHttpInfo (OrganizationCreate organizationCreate); - /// - /// Delete an Org - /// - /// - /// Delete a org (must have `admin` permission) - /// - /// Thrown when fails to make API call - /// - /// - void DeleteOrg (string name); - - /// - /// Delete an Org - /// - /// - /// Delete a org (must have `admin` permission) - /// - /// Thrown when fails to make API call - /// - /// ApiResponse of Object(void) - ApiResponse DeleteOrgWithHttpInfo (string name); - /// - /// Remove an Org member - /// - /// - /// Remove a member from the org (must have org `owner` role) - /// - /// Thrown when fails to make API call - /// - /// - /// - void DeleteOrgMember (string name, string username); - - /// - /// Remove an Org member - /// - /// - /// Remove a member from the org (must have org `owner` role) - /// - /// Thrown when fails to make API call - /// - /// - /// ApiResponse of Object(void) - ApiResponse DeleteOrgMemberWithHttpInfo (string name, string username); - /// - /// Get an Org - /// - /// - /// Retrieve a org by name - /// - /// Thrown when fails to make API call - /// - /// Organization - Organization GetOrg (string name); - - /// - /// Get an Org - /// - /// - /// Retrieve a org by name - /// - /// Thrown when fails to make API call - /// - /// ApiResponse of Organization - ApiResponse GetOrgWithHttpInfo (string name); - /// - /// List organization members - /// - /// - /// Retrieve a org's members - /// - /// Thrown when fails to make API call - /// - /// OrganizationMemberList - OrganizationMemberList GetOrgMembers (string name); - - /// - /// List organization members - /// - /// - /// Retrieve a org's members - /// - /// Thrown when fails to make API call - /// - /// ApiResponse of OrganizationMemberList - ApiResponse GetOrgMembersWithHttpInfo (string name); - /// - /// List Orgs - /// - /// - /// search for orgs using query parameters - /// - /// Thrown when fails to make API call - /// You know, for search (optional) - /// The account name (optional) - /// The username of a user (optional) - /// Page number starting from 1 (optional, default to 1) - /// Number of items per page (optional, default to 25) - /// OrganizationList - OrganizationList ListOrgs (List search = default, List name = default, List member = default, int? page = default, int? perPage = default); - - /// - /// List Orgs - /// - /// - /// search for orgs using query parameters - /// - /// Thrown when fails to make API call - /// You know, for search (optional) - /// The account name (optional) - /// The username of a user (optional) - /// Page number starting from 1 (optional, default to 1) - /// Number of items per page (optional, default to 25) - /// ApiResponse of OrganizationList - ApiResponse ListOrgsWithHttpInfo (List search = default, List name = default, List member = default, int? page = default, int? perPage = default); - /// - /// Update an Org - /// - /// - /// Update a org (must have org `owner` role) - /// - /// Thrown when fails to make API call - /// - /// - /// UpdateAccepted - UpdateAccepted UpdateOrg (string name, OrganizationUpdate organizationUpdate); - - /// - /// Update an Org - /// - /// - /// Update a org (must have org `owner` role) - /// - /// Thrown when fails to make API call - /// - /// - /// ApiResponse of UpdateAccepted - ApiResponse UpdateOrgWithHttpInfo (string name, OrganizationUpdate organizationUpdate); - /// - /// Add or update the role of an Org Member - /// - /// - /// Upsert a member role to the org (must have org `owner` role) - /// - /// Thrown when fails to make API call - /// - /// - /// - /// UpdateAccepted - UpdateAccepted UpsertOrgMember (string name, string username, OrganizationRoleEnum role); - - /// - /// Add or update the role of an Org Member - /// - /// - /// Upsert a member role to the org (must have org `owner` role) - /// - /// Thrown when fails to make API call - /// - /// - /// - /// ApiResponse of UpdateAccepted - ApiResponse UpsertOrgMemberWithHttpInfo (string name, string username, OrganizationRoleEnum role); - #endregion Synchronous Operations - #region Asynchronous Operations - /// - /// Create an Org - /// - /// - /// Create a new org. - /// - /// Thrown when fails to make API call - /// - /// Cancellation Token to cancel request (optional) - /// Task of CreatedContent - System.Threading.Tasks.Task CreateOrgAsync (OrganizationCreate organizationCreate, CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// Create an Org - /// - /// - /// Create a new org. - /// - /// Thrown when fails to make API call - /// - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (CreatedContent) - System.Threading.Tasks.Task> CreateOrgWithHttpInfoAsync (OrganizationCreate organizationCreate, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Delete an Org - /// - /// - /// Delete a org (must have `admin` permission) - /// - /// Thrown when fails to make API call - /// - /// Cancellation Token to cancel request (optional) - /// Task of void - System.Threading.Tasks.Task DeleteOrgAsync (string name, CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// Delete an Org - /// - /// - /// Delete a org (must have `admin` permission) - /// - /// Thrown when fails to make API call - /// - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse - System.Threading.Tasks.Task> DeleteOrgWithHttpInfoAsync (string name, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Remove an Org member - /// - /// - /// Remove a member from the org (must have org `owner` role) - /// - /// Thrown when fails to make API call - /// - /// - /// Cancellation Token to cancel request (optional) - /// Task of void - System.Threading.Tasks.Task DeleteOrgMemberAsync (string name, string username, CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// Remove an Org member - /// - /// - /// Remove a member from the org (must have org `owner` role) - /// - /// Thrown when fails to make API call - /// - /// - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse - System.Threading.Tasks.Task> DeleteOrgMemberWithHttpInfoAsync (string name, string username, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Get an Org - /// - /// - /// Retrieve a org by name - /// - /// Thrown when fails to make API call - /// - /// Cancellation Token to cancel request (optional) - /// Task of Organization - System.Threading.Tasks.Task GetOrgAsync (string name, CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// Get an Org - /// - /// - /// Retrieve a org by name - /// - /// Thrown when fails to make API call - /// - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (Organization) - System.Threading.Tasks.Task> GetOrgWithHttpInfoAsync (string name, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// List organization members - /// - /// - /// Retrieve a org's members - /// - /// Thrown when fails to make API call - /// - /// Cancellation Token to cancel request (optional) - /// Task of OrganizationMemberList - System.Threading.Tasks.Task GetOrgMembersAsync (string name, CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// List organization members - /// - /// - /// Retrieve a org's members - /// - /// Thrown when fails to make API call - /// - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (OrganizationMemberList) - System.Threading.Tasks.Task> GetOrgMembersWithHttpInfoAsync (string name, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// List Orgs - /// - /// - /// search for orgs using query parameters - /// - /// Thrown when fails to make API call - /// You know, for search (optional) - /// The account name (optional) - /// The username of a user (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 OrganizationList - System.Threading.Tasks.Task ListOrgsAsync (List search = default, List name = default, List member = default, int? page = default, int? perPage = default, CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// List Orgs - /// - /// - /// search for orgs using query parameters - /// - /// Thrown when fails to make API call - /// You know, for search (optional) - /// The account name (optional) - /// The username of a user (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 (OrganizationList) - System.Threading.Tasks.Task> ListOrgsWithHttpInfoAsync (List search = default, List name = default, List member = default, int? page = default, int? perPage = default, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Update an Org - /// - /// - /// Update a org (must have org `owner` role) - /// - /// Thrown when fails to make API call - /// - /// - /// Cancellation Token to cancel request (optional) - /// Task of UpdateAccepted - System.Threading.Tasks.Task UpdateOrgAsync (string name, OrganizationUpdate organizationUpdate, CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// Update an Org - /// - /// - /// Update a org (must have org `owner` role) - /// - /// Thrown when fails to make API call - /// - /// - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (UpdateAccepted) - System.Threading.Tasks.Task> UpdateOrgWithHttpInfoAsync (string name, OrganizationUpdate organizationUpdate, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Add or update the role of an Org Member - /// - /// - /// Upsert a member role to the org (must have org `owner` role) - /// - /// Thrown when fails to make API call - /// - /// - /// - /// Cancellation Token to cancel request (optional) - /// Task of UpdateAccepted - System.Threading.Tasks.Task UpsertOrgMemberAsync (string name, string username, OrganizationRoleEnum role, CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// Add or update the role of an Org Member - /// - /// - /// Upsert a member role to the org (must have org `owner` role) - /// - /// Thrown when fails to make API call - /// - /// - /// - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (UpdateAccepted) - System.Threading.Tasks.Task> UpsertOrgMemberWithHttpInfoAsync (string name, string username, OrganizationRoleEnum role, CancellationToken cancellationToken = default(CancellationToken)); - #endregion Asynchronous Operations - } - - /// - /// Represents a collection of functions to interact with the API endpoints - /// - public partial class OrgsApi : IOrgsApi - { - private PollinationSDK.Client.ExceptionFactory _exceptionFactory = (name, response) => null; - - /// - /// Initializes a new instance of the class. - /// - /// - public OrgsApi(String basePath) - { - this.Configuration = new PollinationSDK.Client.Configuration { BasePath = basePath }; - - ExceptionFactory = PollinationSDK.Client.Configuration.DefaultExceptionFactory; - } - - /// - /// Initializes a new instance of the class - /// - /// - public OrgsApi() - { - 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 OrgsApi(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; } - } - - /// - /// Create an Org Create a new org. - /// - /// Thrown when fails to make API call - /// - /// CreatedContent - public CreatedContent CreateOrg (OrganizationCreate organizationCreate) - { - ApiResponse localVarResponse = CreateOrgWithHttpInfo(organizationCreate); - return localVarResponse.Data; - } - - /// - /// Create an Org Create a new org. - /// - /// Thrown when fails to make API call - /// - /// ApiResponse of CreatedContent - public ApiResponse CreateOrgWithHttpInfo (OrganizationCreate organizationCreate) - { - // verify the required parameter 'organizationCreate' is set - if (organizationCreate == null) - throw new ApiException(400, "Missing required parameter 'organizationCreate' when calling OrgsApi->CreateOrg"); - - var localVarPath = "/orgs"; - 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 (organizationCreate != null && organizationCreate.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(organizationCreate); // http body (model) parameter - } - else - { - localVarPostBody = organizationCreate; // 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("CreateOrg", 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 an Org Create a new org. - /// - /// Thrown when fails to make API call - /// - /// Cancellation Token to cancel request (optional) - /// Task of CreatedContent - public async System.Threading.Tasks.Task CreateOrgAsync (OrganizationCreate organizationCreate, CancellationToken cancellationToken = default(CancellationToken)) - { - ApiResponse localVarResponse = await CreateOrgWithHttpInfoAsync(organizationCreate, cancellationToken); - return localVarResponse.Data; - - } - - /// - /// Create an Org Create a new org. - /// - /// Thrown when fails to make API call - /// - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (CreatedContent) - public async System.Threading.Tasks.Task> CreateOrgWithHttpInfoAsync (OrganizationCreate organizationCreate, CancellationToken cancellationToken = default(CancellationToken)) - { - // verify the required parameter 'organizationCreate' is set - if (organizationCreate == null) - throw new ApiException(400, "Missing required parameter 'organizationCreate' when calling OrgsApi->CreateOrg"); - - var localVarPath = "/orgs"; - 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 (organizationCreate != null && organizationCreate.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(organizationCreate); // http body (model) parameter - } - else - { - localVarPostBody = organizationCreate; // 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("CreateOrg", 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))); - } - - /// - /// Delete an Org Delete a org (must have `admin` permission) - /// - /// Thrown when fails to make API call - /// - /// - public void DeleteOrg (string name) - { - DeleteOrgWithHttpInfo(name); - } - - /// - /// Delete an Org Delete a org (must have `admin` permission) - /// - /// Thrown when fails to make API call - /// - /// ApiResponse of Object(void) - public ApiResponse DeleteOrgWithHttpInfo (string name) - { - // verify the required parameter 'name' is set - if (name == null) - throw new ApiException(400, "Missing required parameter 'name' when calling OrgsApi->DeleteOrg"); - - var localVarPath = "/orgs/{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 - - // 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("DeleteOrg", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); - } - - /// - /// Delete an Org Delete a org (must have `admin` permission) - /// - /// Thrown when fails to make API call - /// - /// Cancellation Token to cancel request (optional) - /// Task of void - public async System.Threading.Tasks.Task DeleteOrgAsync (string name, CancellationToken cancellationToken = default(CancellationToken)) - { - await DeleteOrgWithHttpInfoAsync(name, cancellationToken); - - } - - /// - /// Delete an Org Delete a org (must have `admin` permission) - /// - /// Thrown when fails to make API call - /// - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse - public async System.Threading.Tasks.Task> DeleteOrgWithHttpInfoAsync (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 OrgsApi->DeleteOrg"); - - var localVarPath = "/orgs/{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 - - // 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("DeleteOrg", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); - } - - /// - /// Remove an Org member Remove a member from the org (must have org `owner` role) - /// - /// Thrown when fails to make API call - /// - /// - /// - public void DeleteOrgMember (string name, string username) - { - DeleteOrgMemberWithHttpInfo(name, username); - } - - /// - /// Remove an Org member Remove a member from the org (must have org `owner` role) - /// - /// Thrown when fails to make API call - /// - /// - /// ApiResponse of Object(void) - public ApiResponse DeleteOrgMemberWithHttpInfo (string name, string username) - { - // verify the required parameter 'name' is set - if (name == null) - throw new ApiException(400, "Missing required parameter 'name' when calling OrgsApi->DeleteOrgMember"); - // verify the required parameter 'username' is set - if (username == null) - throw new ApiException(400, "Missing required parameter 'username' when calling OrgsApi->DeleteOrgMember"); - - var localVarPath = "/orgs/{name}/members/{username}"; - 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 (username != null) localVarPathParams.Add("username", this.Configuration.ApiClient.ParameterToString(username)); // 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("DeleteOrgMember", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); - } - - /// - /// Remove an Org member Remove a member from the org (must have org `owner` role) - /// - /// Thrown when fails to make API call - /// - /// - /// Cancellation Token to cancel request (optional) - /// Task of void - public async System.Threading.Tasks.Task DeleteOrgMemberAsync (string name, string username, CancellationToken cancellationToken = default(CancellationToken)) - { - await DeleteOrgMemberWithHttpInfoAsync(name, username, cancellationToken); - - } - - /// - /// Remove an Org member Remove a member from the org (must have org `owner` role) - /// - /// Thrown when fails to make API call - /// - /// - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse - public async System.Threading.Tasks.Task> DeleteOrgMemberWithHttpInfoAsync (string name, string username, CancellationToken cancellationToken = default(CancellationToken)) - { - // verify the required parameter 'name' is set - if (name == null) - throw new ApiException(400, "Missing required parameter 'name' when calling OrgsApi->DeleteOrgMember"); - // verify the required parameter 'username' is set - if (username == null) - throw new ApiException(400, "Missing required parameter 'username' when calling OrgsApi->DeleteOrgMember"); - - var localVarPath = "/orgs/{name}/members/{username}"; - 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 (username != null) localVarPathParams.Add("username", this.Configuration.ApiClient.ParameterToString(username)); // 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("DeleteOrgMember", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); - } - - /// - /// Get an Org Retrieve a org by name - /// - /// Thrown when fails to make API call - /// - /// Organization - public Organization GetOrg (string name) - { - ApiResponse localVarResponse = GetOrgWithHttpInfo(name); - return localVarResponse.Data; - } - - /// - /// Get an Org Retrieve a org by name - /// - /// Thrown when fails to make API call - /// - /// ApiResponse of Organization - public ApiResponse GetOrgWithHttpInfo (string name) - { - // verify the required parameter 'name' is set - if (name == null) - throw new ApiException(400, "Missing required parameter 'name' when calling OrgsApi->GetOrg"); - - var localVarPath = "/orgs/{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 - - // 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("GetOrg", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (Organization) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Organization))); - } - - /// - /// Get an Org Retrieve a org by name - /// - /// Thrown when fails to make API call - /// - /// Cancellation Token to cancel request (optional) - /// Task of Organization - public async System.Threading.Tasks.Task GetOrgAsync (string name, CancellationToken cancellationToken = default(CancellationToken)) - { - ApiResponse localVarResponse = await GetOrgWithHttpInfoAsync(name, cancellationToken); - return localVarResponse.Data; - - } - - /// - /// Get an Org Retrieve a org by name - /// - /// Thrown when fails to make API call - /// - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (Organization) - public async System.Threading.Tasks.Task> GetOrgWithHttpInfoAsync (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 OrgsApi->GetOrg"); - - var localVarPath = "/orgs/{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 - - // 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("GetOrg", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (Organization) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Organization))); - } - - /// - /// List organization members Retrieve a org's members - /// - /// Thrown when fails to make API call - /// - /// OrganizationMemberList - public OrganizationMemberList GetOrgMembers (string name) - { - ApiResponse localVarResponse = GetOrgMembersWithHttpInfo(name); - return localVarResponse.Data; - } - - /// - /// List organization members Retrieve a org's members - /// - /// Thrown when fails to make API call - /// - /// ApiResponse of OrganizationMemberList - public ApiResponse GetOrgMembersWithHttpInfo (string name) - { - // verify the required parameter 'name' is set - if (name == null) - throw new ApiException(400, "Missing required parameter 'name' when calling OrgsApi->GetOrgMembers"); - - var localVarPath = "/orgs/{name}/members"; - 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("GetOrgMembers", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (OrganizationMemberList) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(OrganizationMemberList))); - } - - /// - /// List organization members Retrieve a org's members - /// - /// Thrown when fails to make API call - /// - /// Cancellation Token to cancel request (optional) - /// Task of OrganizationMemberList - public async System.Threading.Tasks.Task GetOrgMembersAsync (string name, CancellationToken cancellationToken = default(CancellationToken)) - { - ApiResponse localVarResponse = await GetOrgMembersWithHttpInfoAsync(name, cancellationToken); - return localVarResponse.Data; - - } - - /// - /// List organization members Retrieve a org's members - /// - /// Thrown when fails to make API call - /// - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (OrganizationMemberList) - public async System.Threading.Tasks.Task> GetOrgMembersWithHttpInfoAsync (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 OrgsApi->GetOrgMembers"); - - var localVarPath = "/orgs/{name}/members"; - 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("GetOrgMembers", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (OrganizationMemberList) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(OrganizationMemberList))); - } - - /// - /// List Orgs search for orgs using query parameters - /// - /// Thrown when fails to make API call - /// You know, for search (optional) - /// The account name (optional) - /// The username of a user (optional) - /// Page number starting from 1 (optional, default to 1) - /// Number of items per page (optional, default to 25) - /// OrganizationList - public OrganizationList ListOrgs (List search = default, List name = default, List member = default, int? page = default, int? perPage = default) - { - ApiResponse localVarResponse = ListOrgsWithHttpInfo(search, name, member, page, perPage); - return localVarResponse.Data; - } - - /// - /// List Orgs search for orgs using query parameters - /// - /// Thrown when fails to make API call - /// You know, for search (optional) - /// The account name (optional) - /// The username of a user (optional) - /// Page number starting from 1 (optional, default to 1) - /// Number of items per page (optional, default to 25) - /// ApiResponse of OrganizationList - public ApiResponse ListOrgsWithHttpInfo (List search = default, List name = default, List member = default, int? page = default, int? perPage = default) - { - - var localVarPath = "/orgs"; - 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 (search != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("multi", "search", search)); // query parameter - if (name != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("multi", "name", name)); // query parameter - if (member != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("multi", "member", member)); // 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("ListOrgs", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (OrganizationList) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(OrganizationList))); - } - - /// - /// List Orgs search for orgs using query parameters - /// - /// Thrown when fails to make API call - /// You know, for search (optional) - /// The account name (optional) - /// The username of a user (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 OrganizationList - public async System.Threading.Tasks.Task ListOrgsAsync (List search = default, List name = default, List member = default, int? page = default, int? perPage = default, CancellationToken cancellationToken = default(CancellationToken)) - { - ApiResponse localVarResponse = await ListOrgsWithHttpInfoAsync(search, name, member, page, perPage, cancellationToken); - return localVarResponse.Data; - - } - - /// - /// List Orgs search for orgs using query parameters - /// - /// Thrown when fails to make API call - /// You know, for search (optional) - /// The account name (optional) - /// The username of a user (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 (OrganizationList) - public async System.Threading.Tasks.Task> ListOrgsWithHttpInfoAsync (List search = default, List name = default, List member = default, int? page = default, int? perPage = default, CancellationToken cancellationToken = default(CancellationToken)) - { - - var localVarPath = "/orgs"; - 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 (search != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("multi", "search", search)); // query parameter - if (name != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("multi", "name", name)); // query parameter - if (member != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("multi", "member", member)); // 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("ListOrgs", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (OrganizationList) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(OrganizationList))); - } - - /// - /// Update an Org Update a org (must have org `owner` role) - /// - /// Thrown when fails to make API call - /// - /// - /// UpdateAccepted - public UpdateAccepted UpdateOrg (string name, OrganizationUpdate organizationUpdate) - { - ApiResponse localVarResponse = UpdateOrgWithHttpInfo(name, organizationUpdate); - return localVarResponse.Data; - } - - /// - /// Update an Org Update a org (must have org `owner` role) - /// - /// Thrown when fails to make API call - /// - /// - /// ApiResponse of UpdateAccepted - public ApiResponse UpdateOrgWithHttpInfo (string name, OrganizationUpdate organizationUpdate) - { - // verify the required parameter 'name' is set - if (name == null) - throw new ApiException(400, "Missing required parameter 'name' when calling OrgsApi->UpdateOrg"); - // verify the required parameter 'organizationUpdate' is set - if (organizationUpdate == null) - throw new ApiException(400, "Missing required parameter 'organizationUpdate' when calling OrgsApi->UpdateOrg"); - - var localVarPath = "/orgs/{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[] { - "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 (name != null) localVarPathParams.Add("name", this.Configuration.ApiClient.ParameterToString(name)); // path parameter - if (organizationUpdate != null && organizationUpdate.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(organizationUpdate); // http body (model) parameter - } - else - { - localVarPostBody = organizationUpdate; // 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("UpdateOrg", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (UpdateAccepted) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(UpdateAccepted))); - } - - /// - /// Update an Org Update a org (must have org `owner` role) - /// - /// Thrown when fails to make API call - /// - /// - /// Cancellation Token to cancel request (optional) - /// Task of UpdateAccepted - public async System.Threading.Tasks.Task UpdateOrgAsync (string name, OrganizationUpdate organizationUpdate, CancellationToken cancellationToken = default(CancellationToken)) - { - ApiResponse localVarResponse = await UpdateOrgWithHttpInfoAsync(name, organizationUpdate, cancellationToken); - return localVarResponse.Data; - - } - - /// - /// Update an Org Update a org (must have org `owner` role) - /// - /// Thrown when fails to make API call - /// - /// - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (UpdateAccepted) - public async System.Threading.Tasks.Task> UpdateOrgWithHttpInfoAsync (string name, OrganizationUpdate organizationUpdate, CancellationToken cancellationToken = default(CancellationToken)) - { - // verify the required parameter 'name' is set - if (name == null) - throw new ApiException(400, "Missing required parameter 'name' when calling OrgsApi->UpdateOrg"); - // verify the required parameter 'organizationUpdate' is set - if (organizationUpdate == null) - throw new ApiException(400, "Missing required parameter 'organizationUpdate' when calling OrgsApi->UpdateOrg"); - - var localVarPath = "/orgs/{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[] { - "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 (name != null) localVarPathParams.Add("name", this.Configuration.ApiClient.ParameterToString(name)); // path parameter - if (organizationUpdate != null && organizationUpdate.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(organizationUpdate); // http body (model) parameter - } - else - { - localVarPostBody = organizationUpdate; // 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("UpdateOrg", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (UpdateAccepted) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(UpdateAccepted))); - } - - /// - /// Add or update the role of an Org Member Upsert a member role to the org (must have org `owner` role) - /// - /// Thrown when fails to make API call - /// - /// - /// - /// UpdateAccepted - public UpdateAccepted UpsertOrgMember (string name, string username, OrganizationRoleEnum role) - { - ApiResponse localVarResponse = UpsertOrgMemberWithHttpInfo(name, username, role); - return localVarResponse.Data; - } - - /// - /// Add or update the role of an Org Member Upsert a member role to the org (must have org `owner` role) - /// - /// Thrown when fails to make API call - /// - /// - /// - /// ApiResponse of UpdateAccepted - public ApiResponse UpsertOrgMemberWithHttpInfo (string name, string username, OrganizationRoleEnum role) - { - // verify the required parameter 'name' is set - if (name == null) - throw new ApiException(400, "Missing required parameter 'name' when calling OrgsApi->UpsertOrgMember"); - // verify the required parameter 'username' is set - if (username == null) - throw new ApiException(400, "Missing required parameter 'username' when calling OrgsApi->UpsertOrgMember"); - // verify the required parameter 'role' is set - if (role == null) - throw new ApiException(400, "Missing required parameter 'role' when calling OrgsApi->UpsertOrgMember"); - - var localVarPath = "/orgs/{name}/members/{username}/{role}"; - 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 (username != null) localVarPathParams.Add("username", this.Configuration.ApiClient.ParameterToString(username)); // path parameter - if (role != null) localVarPathParams.Add("role", this.Configuration.ApiClient.ParameterToString(role)); // 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.PATCH, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("UpsertOrgMember", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (UpdateAccepted) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(UpdateAccepted))); - } - - /// - /// Add or update the role of an Org Member Upsert a member role to the org (must have org `owner` role) - /// - /// Thrown when fails to make API call - /// - /// - /// - /// Cancellation Token to cancel request (optional) - /// Task of UpdateAccepted - public async System.Threading.Tasks.Task UpsertOrgMemberAsync (string name, string username, OrganizationRoleEnum role, CancellationToken cancellationToken = default(CancellationToken)) - { - ApiResponse localVarResponse = await UpsertOrgMemberWithHttpInfoAsync(name, username, role, cancellationToken); - return localVarResponse.Data; - - } - - /// - /// Add or update the role of an Org Member Upsert a member role to the org (must have org `owner` role) - /// - /// Thrown when fails to make API call - /// - /// - /// - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (UpdateAccepted) - public async System.Threading.Tasks.Task> UpsertOrgMemberWithHttpInfoAsync (string name, string username, OrganizationRoleEnum role, CancellationToken cancellationToken = default(CancellationToken)) - { - // verify the required parameter 'name' is set - if (name == null) - throw new ApiException(400, "Missing required parameter 'name' when calling OrgsApi->UpsertOrgMember"); - // verify the required parameter 'username' is set - if (username == null) - throw new ApiException(400, "Missing required parameter 'username' when calling OrgsApi->UpsertOrgMember"); - // verify the required parameter 'role' is set - if (role == null) - throw new ApiException(400, "Missing required parameter 'role' when calling OrgsApi->UpsertOrgMember"); - - var localVarPath = "/orgs/{name}/members/{username}/{role}"; - 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 (username != null) localVarPathParams.Add("username", this.Configuration.ApiClient.ParameterToString(username)); // path parameter - if (role != null) localVarPathParams.Add("role", this.Configuration.ApiClient.ParameterToString(role)); // 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.PATCH, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType, cancellationToken); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("UpsertOrgMember", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (UpdateAccepted) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(UpdateAccepted))); - } - - } -} diff --git a/src/PollinationSDK/Api/PluginsApi.cs b/src/PollinationSDK/Api/PluginsApi.cs deleted file mode 100644 index 070ce4a23..000000000 --- a/src/PollinationSDK/Api/PluginsApi.cs +++ /dev/null @@ -1,2800 +0,0 @@ -/* - * 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 IPluginsApi : IApiAccessor - { - #region Synchronous Operations - /// - /// Create a Plugin - /// - /// - /// Create a new plugin. - /// - /// Thrown when fails to make API call - /// - /// - /// CreatedContent - CreatedContent CreatePlugin (string owner, RepositoryCreate repositoryCreate); - - /// - /// Create a Plugin - /// - /// - /// Create a new plugin. - /// - /// Thrown when fails to make API call - /// - /// - /// ApiResponse of CreatedContent - ApiResponse CreatePluginWithHttpInfo (string owner, RepositoryCreate repositoryCreate); - /// - /// Create a new Plugin package - /// - /// - /// Create a new plugin package version - /// - /// Thrown when fails to make API call - /// - /// - /// - /// CreatedContent - CreatedContent CreatePluginPackage (string owner, string name, NewPluginPackage newPluginPackage); - - /// - /// Create a new Plugin package - /// - /// - /// Create a new plugin package version - /// - /// Thrown when fails to make API call - /// - /// - /// - /// ApiResponse of CreatedContent - ApiResponse CreatePluginPackageWithHttpInfo (string owner, string name, NewPluginPackage newPluginPackage); - /// - /// Delete a Plugin - /// - /// - /// Delete a plugin (must have `admin` permission) - /// - /// Thrown when fails to make API call - /// - /// - /// - void DeletePlugin (string owner, string name); - - /// - /// Delete a Plugin - /// - /// - /// Delete a plugin (must have `admin` permission) - /// - /// Thrown when fails to make API call - /// - /// - /// ApiResponse of Object(void) - ApiResponse DeletePluginWithHttpInfo (string owner, string name); - /// - /// Remove a Repository permissions - /// - /// - /// Delete a plugin's access policy (must have `admin` permission) - /// - /// Thrown when fails to make API call - /// - /// - /// - /// - void DeletePluginOrgPermission (string owner, string name, RepositoryPolicySubject repositoryPolicySubject); - - /// - /// Remove a Repository permissions - /// - /// - /// Delete a plugin's access policy (must have `admin` permission) - /// - /// Thrown when fails to make API call - /// - /// - /// - /// ApiResponse of Object(void) - ApiResponse DeletePluginOrgPermissionWithHttpInfo (string owner, string name, RepositoryPolicySubject repositoryPolicySubject); - /// - /// Get a plugin - /// - /// - /// Retrieve a plugin by name - /// - /// Thrown when fails to make API call - /// - /// - /// Repository - Repository GetPlugin (string owner, string name); - - /// - /// Get a plugin - /// - /// - /// Retrieve a plugin by name - /// - /// Thrown when fails to make API call - /// - /// - /// ApiResponse of Repository - ApiResponse GetPluginWithHttpInfo (string owner, string name); - /// - /// Get plugin access permissions - /// - /// - /// Retrieve a plugin's access permissions (must have `write` permission) - /// - /// Thrown when fails to make API call - /// - /// - /// Page number starting from 1 (optional, default to 1) - /// Number of items per page (optional, default to 25) - /// The type of access policy subject (optional) - /// An access policy permission string (optional) - /// RepositoryAccessPolicyList - RepositoryAccessPolicyList GetPluginAccessPermissions (string owner, string name, int? page = default, int? perPage = default, List subjectType = default, List permission = default); - - /// - /// Get plugin access permissions - /// - /// - /// Retrieve a plugin's access permissions (must have `write` permission) - /// - /// Thrown when fails to make API call - /// - /// - /// Page number starting from 1 (optional, default to 1) - /// Number of items per page (optional, default to 25) - /// The type of access policy subject (optional) - /// An access policy permission string (optional) - /// ApiResponse of RepositoryAccessPolicyList - ApiResponse GetPluginAccessPermissionsWithHttpInfo (string owner, string name, int? page = default, int? perPage = default, List subjectType = default, List permission = default); - /// - /// Get a plugin tag - /// - /// - /// Retrieve a plugin tag by name and tag - /// - /// Thrown when fails to make API call - /// - /// - /// - /// PluginPackage - PluginPackage GetPluginByTag (string owner, string name, string tag); - - /// - /// Get a plugin tag - /// - /// - /// Retrieve a plugin tag by name and tag - /// - /// Thrown when fails to make API call - /// - /// - /// - /// ApiResponse of PluginPackage - ApiResponse GetPluginByTagWithHttpInfo (string owner, string name, string tag); - /// - /// Get a plugin tags - /// - /// - /// Retrieve a plugin by name - /// - /// Thrown when fails to make API call - /// - /// - /// Key to sort the list by (optional) - /// The order to sort the list (optional) - /// 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); - - /// - /// Get a plugin tags - /// - /// - /// Retrieve a plugin by name - /// - /// Thrown when fails to make API call - /// - /// - /// Key to sort the list by (optional) - /// The order to sort the list (optional) - /// 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); - /// - /// List plugins - /// - /// - /// - /// - /// Thrown when fails to make API call - /// You know, for search (optional) - /// The account name (optional) - /// Owner of the project (optional) - /// Boolean check for public/private projects (optional) - /// A keyword to index the repository by (optional) - /// Filter by permission on given resource (optional) - /// Key to sort the list by (optional) - /// The order to sort the list (optional) - /// 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); - - /// - /// List plugins - /// - /// - /// - /// - /// Thrown when fails to make API call - /// You know, for search (optional) - /// The account name (optional) - /// Owner of the project (optional) - /// Boolean check for public/private projects (optional) - /// A keyword to index the repository by (optional) - /// Filter by permission on given resource (optional) - /// Key to sort the list by (optional) - /// The order to sort the list (optional) - /// 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); - /// - /// Update a Plugin - /// - /// - /// Update a plugin (must have `contribute` permission) - /// - /// Thrown when fails to make API call - /// - /// - /// - /// UpdateAccepted - UpdateAccepted UpdatePlugin (string owner, string name, RepositoryUpdate repositoryUpdate); - - /// - /// Update a Plugin - /// - /// - /// Update a plugin (must have `contribute` permission) - /// - /// Thrown when fails to make API call - /// - /// - /// - /// ApiResponse of UpdateAccepted - ApiResponse UpdatePluginWithHttpInfo (string owner, string name, RepositoryUpdate repositoryUpdate); - /// - /// Upsert a new permission to a plugin - /// - /// - /// Upsert a plugin's access policy (must have `admin` permission) - /// - /// Thrown when fails to make API call - /// - /// - /// - /// UpdateAccepted - UpdateAccepted UpsertPluginPermission (string owner, string name, RepositoryAccessPolicy repositoryAccessPolicy); - - /// - /// Upsert a new permission to a plugin - /// - /// - /// Upsert a plugin's access policy (must have `admin` permission) - /// - /// Thrown when fails to make API call - /// - /// - /// - /// ApiResponse of UpdateAccepted - ApiResponse UpsertPluginPermissionWithHttpInfo (string owner, string name, RepositoryAccessPolicy repositoryAccessPolicy); - #endregion Synchronous Operations - #region Asynchronous Operations - /// - /// Create a Plugin - /// - /// - /// Create a new plugin. - /// - /// Thrown when fails to make API call - /// - /// - /// Cancellation Token to cancel request (optional) - /// Task of CreatedContent - System.Threading.Tasks.Task CreatePluginAsync (string owner, RepositoryCreate repositoryCreate, CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// Create a Plugin - /// - /// - /// Create a new plugin. - /// - /// Thrown when fails to make API call - /// - /// - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (CreatedContent) - System.Threading.Tasks.Task> CreatePluginWithHttpInfoAsync (string owner, RepositoryCreate repositoryCreate, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Create a new Plugin package - /// - /// - /// Create a new plugin package version - /// - /// Thrown when fails to make API call - /// - /// - /// - /// Cancellation Token to cancel request (optional) - /// Task of CreatedContent - System.Threading.Tasks.Task CreatePluginPackageAsync (string owner, string name, NewPluginPackage newPluginPackage, CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// Create a new Plugin package - /// - /// - /// Create a new plugin package version - /// - /// Thrown when fails to make API call - /// - /// - /// - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (CreatedContent) - System.Threading.Tasks.Task> CreatePluginPackageWithHttpInfoAsync (string owner, string name, NewPluginPackage newPluginPackage, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Delete a Plugin - /// - /// - /// Delete a plugin (must have `admin` permission) - /// - /// Thrown when fails to make API call - /// - /// - /// Cancellation Token to cancel request (optional) - /// Task of void - System.Threading.Tasks.Task DeletePluginAsync (string owner, string name, CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// Delete a Plugin - /// - /// - /// Delete a plugin (must have `admin` permission) - /// - /// Thrown when fails to make API call - /// - /// - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse - System.Threading.Tasks.Task> DeletePluginWithHttpInfoAsync (string owner, string name, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Remove a Repository permissions - /// - /// - /// Delete a plugin's access policy (must have `admin` permission) - /// - /// Thrown when fails to make API call - /// - /// - /// - /// Cancellation Token to cancel request (optional) - /// Task of void - System.Threading.Tasks.Task DeletePluginOrgPermissionAsync (string owner, string name, RepositoryPolicySubject repositoryPolicySubject, CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// Remove a Repository permissions - /// - /// - /// Delete a plugin's access policy (must have `admin` permission) - /// - /// Thrown when fails to make API call - /// - /// - /// - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse - System.Threading.Tasks.Task> DeletePluginOrgPermissionWithHttpInfoAsync (string owner, string name, RepositoryPolicySubject repositoryPolicySubject, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Get a plugin - /// - /// - /// Retrieve a plugin by name - /// - /// Thrown when fails to make API call - /// - /// - /// Cancellation Token to cancel request (optional) - /// Task of Repository - System.Threading.Tasks.Task GetPluginAsync (string owner, string name, CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// Get a plugin - /// - /// - /// Retrieve a plugin by name - /// - /// Thrown when fails to make API call - /// - /// - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (Repository) - System.Threading.Tasks.Task> GetPluginWithHttpInfoAsync (string owner, string name, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Get plugin access permissions - /// - /// - /// Retrieve a plugin's access permissions (must have `write` permission) - /// - /// Thrown when fails to make API call - /// - /// - /// Page number starting from 1 (optional, default to 1) - /// Number of items per page (optional, default to 25) - /// The type of access policy subject (optional) - /// An access policy permission string (optional) - /// Cancellation Token to cancel request (optional) - /// Task of RepositoryAccessPolicyList - System.Threading.Tasks.Task GetPluginAccessPermissionsAsync (string owner, string name, int? page = default, int? perPage = default, List subjectType = default, List permission = default, CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// Get plugin access permissions - /// - /// - /// Retrieve a plugin's access permissions (must have `write` permission) - /// - /// Thrown when fails to make API call - /// - /// - /// Page number starting from 1 (optional, default to 1) - /// Number of items per page (optional, default to 25) - /// The type of access policy subject (optional) - /// An access policy permission string (optional) - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (RepositoryAccessPolicyList) - System.Threading.Tasks.Task> GetPluginAccessPermissionsWithHttpInfoAsync (string owner, string name, int? page = default, int? perPage = default, List subjectType = default, List permission = default, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Get a plugin tag - /// - /// - /// Retrieve a plugin tag by name and tag - /// - /// Thrown when fails to make API call - /// - /// - /// - /// Cancellation Token to cancel request (optional) - /// Task of PluginPackage - System.Threading.Tasks.Task GetPluginByTagAsync (string owner, string name, string tag, CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// Get a plugin tag - /// - /// - /// Retrieve a plugin tag by name and tag - /// - /// Thrown when fails to make API call - /// - /// - /// - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (PluginPackage) - System.Threading.Tasks.Task> GetPluginByTagWithHttpInfoAsync (string owner, string name, string tag, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Get a plugin tags - /// - /// - /// Retrieve a plugin by name - /// - /// Thrown when fails to make API call - /// - /// - /// Key to sort the list by (optional) - /// The order to sort the list (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 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)); - - /// - /// Get a plugin tags - /// - /// - /// Retrieve a plugin by name - /// - /// Thrown when fails to make API call - /// - /// - /// Key to sort the list by (optional) - /// The order to sort the list (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 (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)); - /// - /// List plugins - /// - /// - /// - /// - /// Thrown when fails to make API call - /// You know, for search (optional) - /// The account name (optional) - /// Owner of the project (optional) - /// Boolean check for public/private projects (optional) - /// A keyword to index the repository by (optional) - /// Filter by permission on given resource (optional) - /// Key to sort the list by (optional) - /// The order to sort the list (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 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)); - - /// - /// List plugins - /// - /// - /// - /// - /// Thrown when fails to make API call - /// You know, for search (optional) - /// The account name (optional) - /// Owner of the project (optional) - /// Boolean check for public/private projects (optional) - /// A keyword to index the repository by (optional) - /// Filter by permission on given resource (optional) - /// Key to sort the list by (optional) - /// The order to sort the list (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 (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)); - /// - /// Update a Plugin - /// - /// - /// Update a plugin (must have `contribute` permission) - /// - /// Thrown when fails to make API call - /// - /// - /// - /// Cancellation Token to cancel request (optional) - /// Task of UpdateAccepted - System.Threading.Tasks.Task UpdatePluginAsync (string owner, string name, RepositoryUpdate repositoryUpdate, CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// Update a Plugin - /// - /// - /// Update a plugin (must have `contribute` permission) - /// - /// Thrown when fails to make API call - /// - /// - /// - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (UpdateAccepted) - System.Threading.Tasks.Task> UpdatePluginWithHttpInfoAsync (string owner, string name, RepositoryUpdate repositoryUpdate, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Upsert a new permission to a plugin - /// - /// - /// Upsert a plugin's access policy (must have `admin` permission) - /// - /// Thrown when fails to make API call - /// - /// - /// - /// Cancellation Token to cancel request (optional) - /// Task of UpdateAccepted - System.Threading.Tasks.Task UpsertPluginPermissionAsync (string owner, string name, RepositoryAccessPolicy repositoryAccessPolicy, CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// Upsert a new permission to a plugin - /// - /// - /// Upsert a plugin's access policy (must have `admin` permission) - /// - /// Thrown when fails to make API call - /// - /// - /// - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (UpdateAccepted) - System.Threading.Tasks.Task> UpsertPluginPermissionWithHttpInfoAsync (string owner, string name, RepositoryAccessPolicy repositoryAccessPolicy, CancellationToken cancellationToken = default(CancellationToken)); - #endregion Asynchronous Operations - } - - /// - /// Represents a collection of functions to interact with the API endpoints - /// - public partial class PluginsApi : IPluginsApi - { - private PollinationSDK.Client.ExceptionFactory _exceptionFactory = (name, response) => null; - - /// - /// Initializes a new instance of the class. - /// - /// - public PluginsApi(String basePath) - { - this.Configuration = new PollinationSDK.Client.Configuration { BasePath = basePath }; - - ExceptionFactory = PollinationSDK.Client.Configuration.DefaultExceptionFactory; - } - - /// - /// Initializes a new instance of the class - /// - /// - public PluginsApi() - { - 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 PluginsApi(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; } - } - - /// - /// Create a Plugin Create a new plugin. - /// - /// Thrown when fails to make API call - /// - /// - /// CreatedContent - public CreatedContent CreatePlugin (string owner, RepositoryCreate repositoryCreate) - { - ApiResponse localVarResponse = CreatePluginWithHttpInfo(owner, repositoryCreate); - return localVarResponse.Data; - } - - /// - /// Create a Plugin Create a new plugin. - /// - /// Thrown when fails to make API call - /// - /// - /// ApiResponse of CreatedContent - public ApiResponse CreatePluginWithHttpInfo (string owner, RepositoryCreate repositoryCreate) - { - // verify the required parameter 'owner' is set - if (owner == null) - throw new ApiException(400, "Missing required parameter 'owner' when calling PluginsApi->CreatePlugin"); - // verify the required parameter 'repositoryCreate' is set - if (repositoryCreate == null) - throw new ApiException(400, "Missing required parameter 'repositoryCreate' when calling PluginsApi->CreatePlugin"); - - var localVarPath = "/plugins/{owner}"; - 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 (owner != null) localVarPathParams.Add("owner", this.Configuration.ApiClient.ParameterToString(owner)); // path parameter - if (repositoryCreate != null && repositoryCreate.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(repositoryCreate); // http body (model) parameter - } - else - { - localVarPostBody = repositoryCreate; // 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("CreatePlugin", 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 a Plugin Create a new plugin. - /// - /// Thrown when fails to make API call - /// - /// - /// Cancellation Token to cancel request (optional) - /// Task of CreatedContent - public async System.Threading.Tasks.Task CreatePluginAsync (string owner, RepositoryCreate repositoryCreate, CancellationToken cancellationToken = default(CancellationToken)) - { - ApiResponse localVarResponse = await CreatePluginWithHttpInfoAsync(owner, repositoryCreate, cancellationToken); - return localVarResponse.Data; - - } - - /// - /// Create a Plugin Create a new plugin. - /// - /// Thrown when fails to make API call - /// - /// - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (CreatedContent) - public async System.Threading.Tasks.Task> CreatePluginWithHttpInfoAsync (string owner, RepositoryCreate repositoryCreate, CancellationToken cancellationToken = default(CancellationToken)) - { - // verify the required parameter 'owner' is set - if (owner == null) - throw new ApiException(400, "Missing required parameter 'owner' when calling PluginsApi->CreatePlugin"); - // verify the required parameter 'repositoryCreate' is set - if (repositoryCreate == null) - throw new ApiException(400, "Missing required parameter 'repositoryCreate' when calling PluginsApi->CreatePlugin"); - - var localVarPath = "/plugins/{owner}"; - 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 (owner != null) localVarPathParams.Add("owner", this.Configuration.ApiClient.ParameterToString(owner)); // path parameter - if (repositoryCreate != null && repositoryCreate.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(repositoryCreate); // http body (model) parameter - } - else - { - localVarPostBody = repositoryCreate; // 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("CreatePlugin", 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 a new Plugin package Create a new plugin package version - /// - /// Thrown when fails to make API call - /// - /// - /// - /// CreatedContent - public CreatedContent CreatePluginPackage (string owner, string name, NewPluginPackage newPluginPackage) - { - ApiResponse localVarResponse = CreatePluginPackageWithHttpInfo(owner, name, newPluginPackage); - return localVarResponse.Data; - } - - /// - /// Create a new Plugin package Create a new plugin package version - /// - /// Thrown when fails to make API call - /// - /// - /// - /// ApiResponse of CreatedContent - public ApiResponse CreatePluginPackageWithHttpInfo (string owner, string name, NewPluginPackage newPluginPackage) - { - // verify the required parameter 'owner' is set - if (owner == null) - throw new ApiException(400, "Missing required parameter 'owner' when calling PluginsApi->CreatePluginPackage"); - // verify the required parameter 'name' is set - if (name == null) - throw new ApiException(400, "Missing required parameter 'name' when calling PluginsApi->CreatePluginPackage"); - // verify the required parameter 'newPluginPackage' is set - if (newPluginPackage == null) - throw new ApiException(400, "Missing required parameter 'newPluginPackage' when calling PluginsApi->CreatePluginPackage"); - - var localVarPath = "/plugins/{owner}/{name}/tags"; - 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 (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 (newPluginPackage != null && newPluginPackage.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(newPluginPackage); // http body (model) parameter - } - else - { - localVarPostBody = newPluginPackage; // 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("CreatePluginPackage", 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 a new Plugin package Create a new plugin package version - /// - /// Thrown when fails to make API call - /// - /// - /// - /// Cancellation Token to cancel request (optional) - /// Task of CreatedContent - public async System.Threading.Tasks.Task CreatePluginPackageAsync (string owner, string name, NewPluginPackage newPluginPackage, CancellationToken cancellationToken = default(CancellationToken)) - { - ApiResponse localVarResponse = await CreatePluginPackageWithHttpInfoAsync(owner, name, newPluginPackage, cancellationToken); - return localVarResponse.Data; - - } - - /// - /// Create a new Plugin package Create a new plugin package version - /// - /// Thrown when fails to make API call - /// - /// - /// - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (CreatedContent) - public async System.Threading.Tasks.Task> CreatePluginPackageWithHttpInfoAsync (string owner, string name, NewPluginPackage newPluginPackage, CancellationToken cancellationToken = default(CancellationToken)) - { - // verify the required parameter 'owner' is set - if (owner == null) - throw new ApiException(400, "Missing required parameter 'owner' when calling PluginsApi->CreatePluginPackage"); - // verify the required parameter 'name' is set - if (name == null) - throw new ApiException(400, "Missing required parameter 'name' when calling PluginsApi->CreatePluginPackage"); - // verify the required parameter 'newPluginPackage' is set - if (newPluginPackage == null) - throw new ApiException(400, "Missing required parameter 'newPluginPackage' when calling PluginsApi->CreatePluginPackage"); - - var localVarPath = "/plugins/{owner}/{name}/tags"; - 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 (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 (newPluginPackage != null && newPluginPackage.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(newPluginPackage); // http body (model) parameter - } - else - { - localVarPostBody = newPluginPackage; // 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("CreatePluginPackage", 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))); - } - - /// - /// Delete a Plugin Delete a plugin (must have `admin` permission) - /// - /// Thrown when fails to make API call - /// - /// - /// - public void DeletePlugin (string owner, string name) - { - DeletePluginWithHttpInfo(owner, name); - } - - /// - /// Delete a Plugin Delete a plugin (must have `admin` permission) - /// - /// Thrown when fails to make API call - /// - /// - /// ApiResponse of Object(void) - public ApiResponse DeletePluginWithHttpInfo (string owner, string name) - { - // verify the required parameter 'owner' is set - if (owner == null) - throw new ApiException(400, "Missing required parameter 'owner' when calling PluginsApi->DeletePlugin"); - // verify the required parameter 'name' is set - if (name == null) - throw new ApiException(400, "Missing required parameter 'name' when calling PluginsApi->DeletePlugin"); - - var localVarPath = "/plugins/{owner}/{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 (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 - - // 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("DeletePlugin", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); - } - - /// - /// Delete a Plugin Delete a plugin (must have `admin` permission) - /// - /// Thrown when fails to make API call - /// - /// - /// Cancellation Token to cancel request (optional) - /// Task of void - public async System.Threading.Tasks.Task DeletePluginAsync (string owner, string name, CancellationToken cancellationToken = default(CancellationToken)) - { - await DeletePluginWithHttpInfoAsync(owner, name, cancellationToken); - - } - - /// - /// Delete a Plugin Delete a plugin (must have `admin` permission) - /// - /// Thrown when fails to make API call - /// - /// - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse - public async System.Threading.Tasks.Task> DeletePluginWithHttpInfoAsync (string owner, string name, CancellationToken cancellationToken = default(CancellationToken)) - { - // verify the required parameter 'owner' is set - if (owner == null) - throw new ApiException(400, "Missing required parameter 'owner' when calling PluginsApi->DeletePlugin"); - // verify the required parameter 'name' is set - if (name == null) - throw new ApiException(400, "Missing required parameter 'name' when calling PluginsApi->DeletePlugin"); - - var localVarPath = "/plugins/{owner}/{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 (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 - - // 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("DeletePlugin", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); - } - - /// - /// Remove a Repository permissions Delete a plugin's access policy (must have `admin` permission) - /// - /// Thrown when fails to make API call - /// - /// - /// - /// - public void DeletePluginOrgPermission (string owner, string name, RepositoryPolicySubject repositoryPolicySubject) - { - DeletePluginOrgPermissionWithHttpInfo(owner, name, repositoryPolicySubject); - } - - /// - /// Remove a Repository permissions Delete a plugin's access policy (must have `admin` permission) - /// - /// Thrown when fails to make API call - /// - /// - /// - /// ApiResponse of Object(void) - public ApiResponse DeletePluginOrgPermissionWithHttpInfo (string owner, string name, RepositoryPolicySubject repositoryPolicySubject) - { - // verify the required parameter 'owner' is set - if (owner == null) - throw new ApiException(400, "Missing required parameter 'owner' when calling PluginsApi->DeletePluginOrgPermission"); - // verify the required parameter 'name' is set - if (name == null) - throw new ApiException(400, "Missing required parameter 'name' when calling PluginsApi->DeletePluginOrgPermission"); - // verify the required parameter 'repositoryPolicySubject' is set - if (repositoryPolicySubject == null) - throw new ApiException(400, "Missing required parameter 'repositoryPolicySubject' when calling PluginsApi->DeletePluginOrgPermission"); - - var localVarPath = "/plugins/{owner}/{name}/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 (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 (repositoryPolicySubject != null && repositoryPolicySubject.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(repositoryPolicySubject); // http body (model) parameter - } - else - { - localVarPostBody = repositoryPolicySubject; // 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("DeletePluginOrgPermission", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); - } - - /// - /// Remove a Repository permissions Delete a plugin's access policy (must have `admin` permission) - /// - /// Thrown when fails to make API call - /// - /// - /// - /// Cancellation Token to cancel request (optional) - /// Task of void - public async System.Threading.Tasks.Task DeletePluginOrgPermissionAsync (string owner, string name, RepositoryPolicySubject repositoryPolicySubject, CancellationToken cancellationToken = default(CancellationToken)) - { - await DeletePluginOrgPermissionWithHttpInfoAsync(owner, name, repositoryPolicySubject, cancellationToken); - - } - - /// - /// Remove a Repository permissions Delete a plugin's access policy (must have `admin` permission) - /// - /// Thrown when fails to make API call - /// - /// - /// - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse - public async System.Threading.Tasks.Task> DeletePluginOrgPermissionWithHttpInfoAsync (string owner, string name, RepositoryPolicySubject repositoryPolicySubject, CancellationToken cancellationToken = default(CancellationToken)) - { - // verify the required parameter 'owner' is set - if (owner == null) - throw new ApiException(400, "Missing required parameter 'owner' when calling PluginsApi->DeletePluginOrgPermission"); - // verify the required parameter 'name' is set - if (name == null) - throw new ApiException(400, "Missing required parameter 'name' when calling PluginsApi->DeletePluginOrgPermission"); - // verify the required parameter 'repositoryPolicySubject' is set - if (repositoryPolicySubject == null) - throw new ApiException(400, "Missing required parameter 'repositoryPolicySubject' when calling PluginsApi->DeletePluginOrgPermission"); - - var localVarPath = "/plugins/{owner}/{name}/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 (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 (repositoryPolicySubject != null && repositoryPolicySubject.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(repositoryPolicySubject); // http body (model) parameter - } - else - { - localVarPostBody = repositoryPolicySubject; // 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("DeletePluginOrgPermission", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); - } - - /// - /// Get a plugin Retrieve a plugin by name - /// - /// Thrown when fails to make API call - /// - /// - /// Repository - public Repository GetPlugin (string owner, string name) - { - ApiResponse localVarResponse = GetPluginWithHttpInfo(owner, name); - return localVarResponse.Data; - } - - /// - /// Get a plugin Retrieve a plugin by name - /// - /// Thrown when fails to make API call - /// - /// - /// ApiResponse of Repository - public ApiResponse GetPluginWithHttpInfo (string owner, string name) - { - // verify the required parameter 'owner' is set - if (owner == null) - throw new ApiException(400, "Missing required parameter 'owner' when calling PluginsApi->GetPlugin"); - // verify the required parameter 'name' is set - if (name == null) - throw new ApiException(400, "Missing required parameter 'name' when calling PluginsApi->GetPlugin"); - - var localVarPath = "/plugins/{owner}/{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 (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 - - // 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("GetPlugin", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (Repository) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Repository))); - } - - /// - /// Get a plugin Retrieve a plugin by name - /// - /// Thrown when fails to make API call - /// - /// - /// Cancellation Token to cancel request (optional) - /// Task of Repository - public async System.Threading.Tasks.Task GetPluginAsync (string owner, string name, CancellationToken cancellationToken = default(CancellationToken)) - { - ApiResponse localVarResponse = await GetPluginWithHttpInfoAsync(owner, name, cancellationToken); - return localVarResponse.Data; - - } - - /// - /// Get a plugin Retrieve a plugin by name - /// - /// Thrown when fails to make API call - /// - /// - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (Repository) - public async System.Threading.Tasks.Task> GetPluginWithHttpInfoAsync (string owner, string name, CancellationToken cancellationToken = default(CancellationToken)) - { - // verify the required parameter 'owner' is set - if (owner == null) - throw new ApiException(400, "Missing required parameter 'owner' when calling PluginsApi->GetPlugin"); - // verify the required parameter 'name' is set - if (name == null) - throw new ApiException(400, "Missing required parameter 'name' when calling PluginsApi->GetPlugin"); - - var localVarPath = "/plugins/{owner}/{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 (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 - - // 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("GetPlugin", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (Repository) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Repository))); - } - - /// - /// Get plugin access permissions Retrieve a plugin's access permissions (must have `write` permission) - /// - /// Thrown when fails to make API call - /// - /// - /// Page number starting from 1 (optional, default to 1) - /// Number of items per page (optional, default to 25) - /// The type of access policy subject (optional) - /// An access policy permission string (optional) - /// RepositoryAccessPolicyList - public RepositoryAccessPolicyList GetPluginAccessPermissions (string owner, string name, int? page = default, int? perPage = default, List subjectType = default, List permission = default) - { - ApiResponse localVarResponse = GetPluginAccessPermissionsWithHttpInfo(owner, name, page, perPage, subjectType, permission); - return localVarResponse.Data; - } - - /// - /// Get plugin access permissions Retrieve a plugin's access permissions (must have `write` permission) - /// - /// Thrown when fails to make API call - /// - /// - /// Page number starting from 1 (optional, default to 1) - /// Number of items per page (optional, default to 25) - /// The type of access policy subject (optional) - /// An access policy permission string (optional) - /// ApiResponse of RepositoryAccessPolicyList - public ApiResponse GetPluginAccessPermissionsWithHttpInfo (string owner, string name, int? page = default, int? perPage = default, List subjectType = default, List permission = default) - { - // verify the required parameter 'owner' is set - if (owner == null) - throw new ApiException(400, "Missing required parameter 'owner' when calling PluginsApi->GetPluginAccessPermissions"); - // verify the required parameter 'name' is set - if (name == null) - throw new ApiException(400, "Missing required parameter 'name' when calling PluginsApi->GetPluginAccessPermissions"); - - var localVarPath = "/plugins/{owner}/{name}/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[] { - }; - 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 (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 - if (subjectType != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("multi", "subject_type", subjectType)); // query parameter - if (permission != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("multi", "permission", permission)); // 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("GetPluginAccessPermissions", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (RepositoryAccessPolicyList) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(RepositoryAccessPolicyList))); - } - - /// - /// Get plugin access permissions Retrieve a plugin's access permissions (must have `write` permission) - /// - /// Thrown when fails to make API call - /// - /// - /// Page number starting from 1 (optional, default to 1) - /// Number of items per page (optional, default to 25) - /// The type of access policy subject (optional) - /// An access policy permission string (optional) - /// Cancellation Token to cancel request (optional) - /// Task of RepositoryAccessPolicyList - public async System.Threading.Tasks.Task GetPluginAccessPermissionsAsync (string owner, string name, int? page = default, int? perPage = default, List subjectType = default, List permission = default, CancellationToken cancellationToken = default(CancellationToken)) - { - ApiResponse localVarResponse = await GetPluginAccessPermissionsWithHttpInfoAsync(owner, name, page, perPage, subjectType, permission, cancellationToken); - return localVarResponse.Data; - - } - - /// - /// Get plugin access permissions Retrieve a plugin's access permissions (must have `write` permission) - /// - /// Thrown when fails to make API call - /// - /// - /// Page number starting from 1 (optional, default to 1) - /// Number of items per page (optional, default to 25) - /// The type of access policy subject (optional) - /// An access policy permission string (optional) - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (RepositoryAccessPolicyList) - public async System.Threading.Tasks.Task> GetPluginAccessPermissionsWithHttpInfoAsync (string owner, string name, int? page = default, int? perPage = default, List subjectType = default, List permission = default, CancellationToken cancellationToken = default(CancellationToken)) - { - // verify the required parameter 'owner' is set - if (owner == null) - throw new ApiException(400, "Missing required parameter 'owner' when calling PluginsApi->GetPluginAccessPermissions"); - // verify the required parameter 'name' is set - if (name == null) - throw new ApiException(400, "Missing required parameter 'name' when calling PluginsApi->GetPluginAccessPermissions"); - - var localVarPath = "/plugins/{owner}/{name}/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[] { - }; - 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 (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 - if (subjectType != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("multi", "subject_type", subjectType)); // query parameter - if (permission != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("multi", "permission", permission)); // 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("GetPluginAccessPermissions", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (RepositoryAccessPolicyList) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(RepositoryAccessPolicyList))); - } - - /// - /// Get a plugin tag Retrieve a plugin tag by name and tag - /// - /// Thrown when fails to make API call - /// - /// - /// - /// PluginPackage - public PluginPackage GetPluginByTag (string owner, string name, string tag) - { - ApiResponse localVarResponse = GetPluginByTagWithHttpInfo(owner, name, tag); - return localVarResponse.Data; - } - - /// - /// Get a plugin tag Retrieve a plugin tag by name and tag - /// - /// Thrown when fails to make API call - /// - /// - /// - /// ApiResponse of PluginPackage - public ApiResponse GetPluginByTagWithHttpInfo (string owner, string name, string tag) - { - // verify the required parameter 'owner' is set - if (owner == null) - throw new ApiException(400, "Missing required parameter 'owner' when calling PluginsApi->GetPluginByTag"); - // verify the required parameter 'name' is set - if (name == null) - throw new ApiException(400, "Missing required parameter 'name' when calling PluginsApi->GetPluginByTag"); - // verify the required parameter 'tag' is set - if (tag == null) - throw new ApiException(400, "Missing required parameter 'tag' when calling PluginsApi->GetPluginByTag"); - - var localVarPath = "/plugins/{owner}/{name}/tags/{tag}"; - 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 (tag != null) localVarPathParams.Add("tag", this.Configuration.ApiClient.ParameterToString(tag)); // 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("GetPluginByTag", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (PluginPackage) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(PluginPackage))); - } - - /// - /// Get a plugin tag Retrieve a plugin tag by name and tag - /// - /// Thrown when fails to make API call - /// - /// - /// - /// Cancellation Token to cancel request (optional) - /// Task of PluginPackage - public async System.Threading.Tasks.Task GetPluginByTagAsync (string owner, string name, string tag, CancellationToken cancellationToken = default(CancellationToken)) - { - ApiResponse localVarResponse = await GetPluginByTagWithHttpInfoAsync(owner, name, tag, cancellationToken); - return localVarResponse.Data; - - } - - /// - /// Get a plugin tag Retrieve a plugin tag by name and tag - /// - /// Thrown when fails to make API call - /// - /// - /// - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (PluginPackage) - public async System.Threading.Tasks.Task> GetPluginByTagWithHttpInfoAsync (string owner, string name, string tag, CancellationToken cancellationToken = default(CancellationToken)) - { - // verify the required parameter 'owner' is set - if (owner == null) - throw new ApiException(400, "Missing required parameter 'owner' when calling PluginsApi->GetPluginByTag"); - // verify the required parameter 'name' is set - if (name == null) - throw new ApiException(400, "Missing required parameter 'name' when calling PluginsApi->GetPluginByTag"); - // verify the required parameter 'tag' is set - if (tag == null) - throw new ApiException(400, "Missing required parameter 'tag' when calling PluginsApi->GetPluginByTag"); - - var localVarPath = "/plugins/{owner}/{name}/tags/{tag}"; - 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 (tag != null) localVarPathParams.Add("tag", this.Configuration.ApiClient.ParameterToString(tag)); // 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("GetPluginByTag", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (PluginPackage) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(PluginPackage))); - } - - /// - /// Get a plugin tags Retrieve a plugin by name - /// - /// Thrown when fails to make API call - /// - /// - /// Key to sort the list by (optional) - /// The order to sort the list (optional) - /// 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) - { - ApiResponse localVarResponse = ListPluginTagsWithHttpInfo(owner, name, sortBy, sortOrder, page, perPage); - return localVarResponse.Data; - } - - /// - /// Get a plugin tags Retrieve a plugin by name - /// - /// Thrown when fails to make API call - /// - /// - /// Key to sort the list by (optional) - /// The order to sort the list (optional) - /// 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) - { - // verify the required parameter 'owner' is set - if (owner == null) - throw new ApiException(400, "Missing required parameter 'owner' when calling PluginsApi->ListPluginTags"); - // verify the required parameter 'name' is set - if (name == null) - throw new ApiException(400, "Missing required parameter 'name' when calling PluginsApi->ListPluginTags"); - - var localVarPath = "/plugins/{owner}/{name}/tags"; - 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 (sortBy != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "sort_by", sortBy)); // query parameter - if (sortOrder != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "sort_order", sortOrder)); // 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("ListPluginTags", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (PluginPackageList) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(PluginPackageList))); - } - - /// - /// Get a plugin tags Retrieve a plugin by name - /// - /// Thrown when fails to make API call - /// - /// - /// Key to sort the list by (optional) - /// The order to sort the list (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 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)) - { - ApiResponse localVarResponse = await ListPluginTagsWithHttpInfoAsync(owner, name, sortBy, sortOrder, page, perPage, cancellationToken); - return localVarResponse.Data; - - } - - /// - /// Get a plugin tags Retrieve a plugin by name - /// - /// Thrown when fails to make API call - /// - /// - /// Key to sort the list by (optional) - /// The order to sort the list (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 (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)) - { - // verify the required parameter 'owner' is set - if (owner == null) - throw new ApiException(400, "Missing required parameter 'owner' when calling PluginsApi->ListPluginTags"); - // verify the required parameter 'name' is set - if (name == null) - throw new ApiException(400, "Missing required parameter 'name' when calling PluginsApi->ListPluginTags"); - - var localVarPath = "/plugins/{owner}/{name}/tags"; - 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 (sortBy != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "sort_by", sortBy)); // query parameter - if (sortOrder != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "sort_order", sortOrder)); // 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("ListPluginTags", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (PluginPackageList) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(PluginPackageList))); - } - - /// - /// List plugins - /// - /// Thrown when fails to make API call - /// You know, for search (optional) - /// The account name (optional) - /// Owner of the project (optional) - /// Boolean check for public/private projects (optional) - /// A keyword to index the repository by (optional) - /// Filter by permission on given resource (optional) - /// Key to sort the list by (optional) - /// The order to sort the list (optional) - /// 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) - { - ApiResponse localVarResponse = ListPluginsWithHttpInfo(search, name, owner, _public, keyword, permission, sortBy, sortOrder, page, perPage); - return localVarResponse.Data; - } - - /// - /// List plugins - /// - /// Thrown when fails to make API call - /// You know, for search (optional) - /// The account name (optional) - /// Owner of the project (optional) - /// Boolean check for public/private projects (optional) - /// A keyword to index the repository by (optional) - /// Filter by permission on given resource (optional) - /// Key to sort the list by (optional) - /// The order to sort the list (optional) - /// 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) - { - - var localVarPath = "/plugins"; - 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 (search != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("multi", "search", search)); // query parameter - if (name != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("multi", "name", name)); // query parameter - if (owner != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("multi", "owner", owner)); // query parameter - if (_public != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "public", _public)); // query parameter - if (keyword != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("multi", "keyword", keyword)); // query parameter - if (permission != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("multi", "permission", permission)); // query parameter - if (sortBy != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "sort_by", sortBy)); // query parameter - if (sortOrder != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "sort_order", sortOrder)); // 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("ListPlugins", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (RepositoryList) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(RepositoryList))); - } - - /// - /// List plugins - /// - /// Thrown when fails to make API call - /// You know, for search (optional) - /// The account name (optional) - /// Owner of the project (optional) - /// Boolean check for public/private projects (optional) - /// A keyword to index the repository by (optional) - /// Filter by permission on given resource (optional) - /// Key to sort the list by (optional) - /// The order to sort the list (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 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)) - { - ApiResponse localVarResponse = await ListPluginsWithHttpInfoAsync(search, name, owner, _public, keyword, permission, sortBy, sortOrder, page, perPage, cancellationToken); - return localVarResponse.Data; - - } - - /// - /// List plugins - /// - /// Thrown when fails to make API call - /// You know, for search (optional) - /// The account name (optional) - /// Owner of the project (optional) - /// Boolean check for public/private projects (optional) - /// A keyword to index the repository by (optional) - /// Filter by permission on given resource (optional) - /// Key to sort the list by (optional) - /// The order to sort the list (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 (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)) - { - - var localVarPath = "/plugins"; - 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 (search != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("multi", "search", search)); // query parameter - if (name != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("multi", "name", name)); // query parameter - if (owner != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("multi", "owner", owner)); // query parameter - if (_public != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "public", _public)); // query parameter - if (keyword != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("multi", "keyword", keyword)); // query parameter - if (permission != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("multi", "permission", permission)); // query parameter - if (sortBy != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "sort_by", sortBy)); // query parameter - if (sortOrder != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "sort_order", sortOrder)); // 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("ListPlugins", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (RepositoryList) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(RepositoryList))); - } - - /// - /// Update a Plugin Update a plugin (must have `contribute` permission) - /// - /// Thrown when fails to make API call - /// - /// - /// - /// UpdateAccepted - public UpdateAccepted UpdatePlugin (string owner, string name, RepositoryUpdate repositoryUpdate) - { - ApiResponse localVarResponse = UpdatePluginWithHttpInfo(owner, name, repositoryUpdate); - return localVarResponse.Data; - } - - /// - /// Update a Plugin Update a plugin (must have `contribute` permission) - /// - /// Thrown when fails to make API call - /// - /// - /// - /// ApiResponse of UpdateAccepted - public ApiResponse UpdatePluginWithHttpInfo (string owner, string name, RepositoryUpdate repositoryUpdate) - { - // verify the required parameter 'owner' is set - if (owner == null) - throw new ApiException(400, "Missing required parameter 'owner' when calling PluginsApi->UpdatePlugin"); - // verify the required parameter 'name' is set - if (name == null) - throw new ApiException(400, "Missing required parameter 'name' when calling PluginsApi->UpdatePlugin"); - // verify the required parameter 'repositoryUpdate' is set - if (repositoryUpdate == null) - throw new ApiException(400, "Missing required parameter 'repositoryUpdate' when calling PluginsApi->UpdatePlugin"); - - var localVarPath = "/plugins/{owner}/{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[] { - "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 (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 (repositoryUpdate != null && repositoryUpdate.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(repositoryUpdate); // http body (model) parameter - } - else - { - localVarPostBody = repositoryUpdate; // 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("UpdatePlugin", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (UpdateAccepted) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(UpdateAccepted))); - } - - /// - /// Update a Plugin Update a plugin (must have `contribute` permission) - /// - /// Thrown when fails to make API call - /// - /// - /// - /// Cancellation Token to cancel request (optional) - /// Task of UpdateAccepted - public async System.Threading.Tasks.Task UpdatePluginAsync (string owner, string name, RepositoryUpdate repositoryUpdate, CancellationToken cancellationToken = default(CancellationToken)) - { - ApiResponse localVarResponse = await UpdatePluginWithHttpInfoAsync(owner, name, repositoryUpdate, cancellationToken); - return localVarResponse.Data; - - } - - /// - /// Update a Plugin Update a plugin (must have `contribute` permission) - /// - /// Thrown when fails to make API call - /// - /// - /// - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (UpdateAccepted) - public async System.Threading.Tasks.Task> UpdatePluginWithHttpInfoAsync (string owner, string name, RepositoryUpdate repositoryUpdate, CancellationToken cancellationToken = default(CancellationToken)) - { - // verify the required parameter 'owner' is set - if (owner == null) - throw new ApiException(400, "Missing required parameter 'owner' when calling PluginsApi->UpdatePlugin"); - // verify the required parameter 'name' is set - if (name == null) - throw new ApiException(400, "Missing required parameter 'name' when calling PluginsApi->UpdatePlugin"); - // verify the required parameter 'repositoryUpdate' is set - if (repositoryUpdate == null) - throw new ApiException(400, "Missing required parameter 'repositoryUpdate' when calling PluginsApi->UpdatePlugin"); - - var localVarPath = "/plugins/{owner}/{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[] { - "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 (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 (repositoryUpdate != null && repositoryUpdate.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(repositoryUpdate); // http body (model) parameter - } - else - { - localVarPostBody = repositoryUpdate; // 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("UpdatePlugin", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (UpdateAccepted) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(UpdateAccepted))); - } - - /// - /// Upsert a new permission to a plugin Upsert a plugin's access policy (must have `admin` permission) - /// - /// Thrown when fails to make API call - /// - /// - /// - /// UpdateAccepted - public UpdateAccepted UpsertPluginPermission (string owner, string name, RepositoryAccessPolicy repositoryAccessPolicy) - { - ApiResponse localVarResponse = UpsertPluginPermissionWithHttpInfo(owner, name, repositoryAccessPolicy); - return localVarResponse.Data; - } - - /// - /// Upsert a new permission to a plugin Upsert a plugin's access policy (must have `admin` permission) - /// - /// Thrown when fails to make API call - /// - /// - /// - /// ApiResponse of UpdateAccepted - public ApiResponse UpsertPluginPermissionWithHttpInfo (string owner, string name, RepositoryAccessPolicy repositoryAccessPolicy) - { - // verify the required parameter 'owner' is set - if (owner == null) - throw new ApiException(400, "Missing required parameter 'owner' when calling PluginsApi->UpsertPluginPermission"); - // verify the required parameter 'name' is set - if (name == null) - throw new ApiException(400, "Missing required parameter 'name' when calling PluginsApi->UpsertPluginPermission"); - // verify the required parameter 'repositoryAccessPolicy' is set - if (repositoryAccessPolicy == null) - throw new ApiException(400, "Missing required parameter 'repositoryAccessPolicy' when calling PluginsApi->UpsertPluginPermission"); - - var localVarPath = "/plugins/{owner}/{name}/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 (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 (repositoryAccessPolicy != null && repositoryAccessPolicy.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(repositoryAccessPolicy); // http body (model) parameter - } - else - { - localVarPostBody = repositoryAccessPolicy; // 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("UpsertPluginPermission", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (UpdateAccepted) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(UpdateAccepted))); - } - - /// - /// Upsert a new permission to a plugin Upsert a plugin's access policy (must have `admin` permission) - /// - /// Thrown when fails to make API call - /// - /// - /// - /// Cancellation Token to cancel request (optional) - /// Task of UpdateAccepted - public async System.Threading.Tasks.Task UpsertPluginPermissionAsync (string owner, string name, RepositoryAccessPolicy repositoryAccessPolicy, CancellationToken cancellationToken = default(CancellationToken)) - { - ApiResponse localVarResponse = await UpsertPluginPermissionWithHttpInfoAsync(owner, name, repositoryAccessPolicy, cancellationToken); - return localVarResponse.Data; - - } - - /// - /// Upsert a new permission to a plugin Upsert a plugin's access policy (must have `admin` permission) - /// - /// Thrown when fails to make API call - /// - /// - /// - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (UpdateAccepted) - public async System.Threading.Tasks.Task> UpsertPluginPermissionWithHttpInfoAsync (string owner, string name, RepositoryAccessPolicy repositoryAccessPolicy, CancellationToken cancellationToken = default(CancellationToken)) - { - // verify the required parameter 'owner' is set - if (owner == null) - throw new ApiException(400, "Missing required parameter 'owner' when calling PluginsApi->UpsertPluginPermission"); - // verify the required parameter 'name' is set - if (name == null) - throw new ApiException(400, "Missing required parameter 'name' when calling PluginsApi->UpsertPluginPermission"); - // verify the required parameter 'repositoryAccessPolicy' is set - if (repositoryAccessPolicy == null) - throw new ApiException(400, "Missing required parameter 'repositoryAccessPolicy' when calling PluginsApi->UpsertPluginPermission"); - - var localVarPath = "/plugins/{owner}/{name}/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 (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 (repositoryAccessPolicy != null && repositoryAccessPolicy.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(repositoryAccessPolicy); // http body (model) parameter - } - else - { - localVarPostBody = repositoryAccessPolicy; // 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("UpsertPluginPermission", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (UpdateAccepted) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(UpdateAccepted))); - } - - } -} diff --git a/src/PollinationSDK/Api/ProjectsApi.cs b/src/PollinationSDK/Api/ProjectsApi.cs deleted file mode 100644 index ebd1bbc4d..000000000 --- a/src/PollinationSDK/Api/ProjectsApi.cs +++ /dev/null @@ -1,3041 +0,0 @@ -/* - * 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 IProjectsApi : IApiAccessor - { - #region Synchronous Operations - /// - /// Create a Project - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// - /// CreatedContent - CreatedContent CreateProject (string owner, ProjectCreate projectCreate); - - /// - /// Create a Project - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// - /// ApiResponse of CreatedContent - ApiResponse CreateProjectWithHttpInfo (string owner, ProjectCreate projectCreate); - /// - /// Upsert a recipe filter to a project - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// - /// - /// ProjectRecipeFilter - ProjectRecipeFilter CreateProjectRecipeFilter (string owner, string name, ProjectRecipeFilter projectRecipeFilter); - - /// - /// Upsert a recipe filter to a project - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// - /// - /// ApiResponse of ProjectRecipeFilter - ApiResponse CreateProjectRecipeFilterWithHttpInfo (string owner, string name, ProjectRecipeFilter projectRecipeFilter); - /// - /// Delete a Project - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// - /// - void DeleteProject (string owner, string name); - - /// - /// Delete a Project - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// - /// ApiResponse of Object(void) - ApiResponse DeleteProjectWithHttpInfo (string owner, string name); - /// - /// Remove a Project permissions - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// - /// - /// - void DeleteProjectOrgPermission (string owner, string name, ProjectPolicySubject projectPolicySubject); - - /// - /// Remove a Project permissions - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// - /// - /// ApiResponse of Object(void) - ApiResponse DeleteProjectOrgPermissionWithHttpInfo (string owner, string name, ProjectPolicySubject projectPolicySubject); - /// - /// Remove a Project recipe filter - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// - /// - /// - void DeleteProjectRecipeFilter (string owner, string name, ProjectRecipeFilter projectRecipeFilter); - - /// - /// Remove a Project recipe filter - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// - /// - /// ApiResponse of Object(void) - ApiResponse DeleteProjectRecipeFilterWithHttpInfo (string owner, string name, ProjectRecipeFilter projectRecipeFilter); - /// - /// Get a project - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// - /// Project - Project GetProject (string owner, string name); - - /// - /// Get a project - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// - /// ApiResponse of Project - ApiResponse GetProjectWithHttpInfo (string owner, string name); - /// - /// Get project access permissions - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// - /// Page number starting from 1 (optional, default to 1) - /// Number of items per page (optional, default to 25) - /// The type of access policy subject (optional) - /// An access policy permission string (optional) - /// ProjectAccessPolicyList - ProjectAccessPolicyList GetProjectAccessPermissions (string owner, string name, int? page = default, int? perPage = default, List subjectType = default, List permission = default); - - /// - /// Get project access permissions - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// - /// Page number starting from 1 (optional, default to 1) - /// Number of items per page (optional, default to 25) - /// The type of access policy subject (optional) - /// An access policy permission string (optional) - /// ApiResponse of ProjectAccessPolicyList - ApiResponse GetProjectAccessPermissionsWithHttpInfo (string owner, string name, int? page = default, int? perPage = default, List subjectType = default, List permission = default); - /// - /// Get project recipe filters - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// - /// Page number starting from 1 (optional, default to 1) - /// Number of items per page (optional, default to 25) - /// ProjectRecipeFilterList - ProjectRecipeFilterList GetProjectRecipeFilters (string owner, string name, int? page = default, int? perPage = default); - - /// - /// Get project recipe filters - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// - /// Page number starting from 1 (optional, default to 1) - /// Number of items per page (optional, default to 25) - /// ApiResponse of ProjectRecipeFilterList - ApiResponse GetProjectRecipeFiltersWithHttpInfo (string owner, string name, int? page = default, int? perPage = default); - /// - /// Get project recipes - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// - /// Search string to find recipes (optional) - /// Page number starting from 1 (optional, default to 1) - /// Number of items per page (optional, default to 25) - /// RecipeInterfaceList - RecipeInterfaceList GetProjectRecipes (string owner, string name, string search = default, int? page = default, int? perPage = default); - - /// - /// Get project recipes - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// - /// Search string to find recipes (optional) - /// Page number starting from 1 (optional, default to 1) - /// Number of items per page (optional, default to 25) - /// ApiResponse of RecipeInterfaceList - ApiResponse GetProjectRecipesWithHttpInfo (string owner, string name, string search = default, int? page = default, int? perPage = default); - /// - /// List Projects - /// - /// - /// - /// - /// Thrown when fails to make API call - /// Search string to find projects (optional) - /// The ID of a project to search for (optional) - /// The name of the project (optional) - /// Owner of the project (optional) - /// Boolean check for public/private projects (optional) - /// Filter by permission on given resource (optional) - /// Key to sort the list by (optional) - /// The order to sort the list (optional) - /// 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); - - /// - /// List Projects - /// - /// - /// - /// - /// Thrown when fails to make API call - /// Search string to find projects (optional) - /// The ID of a project to search for (optional) - /// The name of the project (optional) - /// Owner of the project (optional) - /// Boolean check for public/private projects (optional) - /// Filter by permission on given resource (optional) - /// Key to sort the list by (optional) - /// The order to sort the list (optional) - /// 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); - /// - /// Update a Project - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// - /// - /// UpdateAccepted - UpdateAccepted Update (string owner, string name, ProjectUpdate projectUpdate); - - /// - /// Update a Project - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// - /// - /// ApiResponse of UpdateAccepted - ApiResponse UpdateWithHttpInfo (string owner, string name, ProjectUpdate projectUpdate); - /// - /// Upsert a new permission to a project - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// - /// - /// UpdateAccepted - UpdateAccepted UpsertProjectPermission (string owner, string name, ProjectAccessPolicy projectAccessPolicy); - - /// - /// Upsert a new permission to a project - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// - /// - /// ApiResponse of UpdateAccepted - ApiResponse UpsertProjectPermissionWithHttpInfo (string owner, string name, ProjectAccessPolicy projectAccessPolicy); - #endregion Synchronous Operations - #region Asynchronous Operations - /// - /// Create a Project - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// - /// Cancellation Token to cancel request (optional) - /// Task of CreatedContent - System.Threading.Tasks.Task CreateProjectAsync (string owner, ProjectCreate projectCreate, CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// Create a Project - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (CreatedContent) - System.Threading.Tasks.Task> CreateProjectWithHttpInfoAsync (string owner, ProjectCreate projectCreate, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Upsert a recipe filter to a project - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// - /// - /// Cancellation Token to cancel request (optional) - /// Task of ProjectRecipeFilter - System.Threading.Tasks.Task CreateProjectRecipeFilterAsync (string owner, string name, ProjectRecipeFilter projectRecipeFilter, CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// Upsert a recipe filter to a project - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// - /// - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (ProjectRecipeFilter) - System.Threading.Tasks.Task> CreateProjectRecipeFilterWithHttpInfoAsync (string owner, string name, ProjectRecipeFilter projectRecipeFilter, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Delete a Project - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// - /// Cancellation Token to cancel request (optional) - /// Task of void - System.Threading.Tasks.Task DeleteProjectAsync (string owner, string name, CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// Delete a Project - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse - System.Threading.Tasks.Task> DeleteProjectWithHttpInfoAsync (string owner, string name, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Remove a Project permissions - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// - /// - /// Cancellation Token to cancel request (optional) - /// Task of void - System.Threading.Tasks.Task DeleteProjectOrgPermissionAsync (string owner, string name, ProjectPolicySubject projectPolicySubject, CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// Remove a Project permissions - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// - /// - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse - System.Threading.Tasks.Task> DeleteProjectOrgPermissionWithHttpInfoAsync (string owner, string name, ProjectPolicySubject projectPolicySubject, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Remove a Project recipe filter - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// - /// - /// Cancellation Token to cancel request (optional) - /// Task of void - System.Threading.Tasks.Task DeleteProjectRecipeFilterAsync (string owner, string name, ProjectRecipeFilter projectRecipeFilter, CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// Remove a Project recipe filter - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// - /// - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse - System.Threading.Tasks.Task> DeleteProjectRecipeFilterWithHttpInfoAsync (string owner, string name, ProjectRecipeFilter projectRecipeFilter, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Get a project - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// - /// Cancellation Token to cancel request (optional) - /// Task of Project - System.Threading.Tasks.Task GetProjectAsync (string owner, string name, CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// Get a project - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (Project) - System.Threading.Tasks.Task> GetProjectWithHttpInfoAsync (string owner, string name, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Get project access permissions - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// - /// Page number starting from 1 (optional, default to 1) - /// Number of items per page (optional, default to 25) - /// The type of access policy subject (optional) - /// An access policy permission string (optional) - /// Cancellation Token to cancel request (optional) - /// Task of ProjectAccessPolicyList - System.Threading.Tasks.Task GetProjectAccessPermissionsAsync (string owner, string name, int? page = default, int? perPage = default, List subjectType = default, List permission = default, CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// Get project access permissions - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// - /// Page number starting from 1 (optional, default to 1) - /// Number of items per page (optional, default to 25) - /// The type of access policy subject (optional) - /// An access policy permission string (optional) - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (ProjectAccessPolicyList) - System.Threading.Tasks.Task> GetProjectAccessPermissionsWithHttpInfoAsync (string owner, string name, int? page = default, int? perPage = default, List subjectType = default, List permission = default, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Get project recipe filters - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// - /// 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 ProjectRecipeFilterList - System.Threading.Tasks.Task GetProjectRecipeFiltersAsync (string owner, string name, int? page = default, int? perPage = default, CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// Get project recipe filters - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// - /// 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 (ProjectRecipeFilterList) - System.Threading.Tasks.Task> GetProjectRecipeFiltersWithHttpInfoAsync (string owner, string name, int? page = default, int? perPage = default, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Get project recipes - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// - /// Search string to find recipes (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 RecipeInterfaceList - System.Threading.Tasks.Task GetProjectRecipesAsync (string owner, string name, string search = default, int? page = default, int? perPage = default, CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// Get project recipes - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// - /// Search string to find recipes (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 (RecipeInterfaceList) - System.Threading.Tasks.Task> GetProjectRecipesWithHttpInfoAsync (string owner, string name, string search = default, int? page = default, int? perPage = default, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// List Projects - /// - /// - /// - /// - /// Thrown when fails to make API call - /// Search string to find projects (optional) - /// The ID of a project to search for (optional) - /// The name of the project (optional) - /// Owner of the project (optional) - /// Boolean check for public/private projects (optional) - /// Filter by permission on given resource (optional) - /// Key to sort the list by (optional) - /// The order to sort the list (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 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)); - - /// - /// List Projects - /// - /// - /// - /// - /// Thrown when fails to make API call - /// Search string to find projects (optional) - /// The ID of a project to search for (optional) - /// The name of the project (optional) - /// Owner of the project (optional) - /// Boolean check for public/private projects (optional) - /// Filter by permission on given resource (optional) - /// Key to sort the list by (optional) - /// The order to sort the list (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 (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)); - /// - /// Update a Project - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// - /// - /// Cancellation Token to cancel request (optional) - /// Task of UpdateAccepted - System.Threading.Tasks.Task UpdateAsync (string owner, string name, ProjectUpdate projectUpdate, CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// Update a Project - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// - /// - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (UpdateAccepted) - System.Threading.Tasks.Task> UpdateWithHttpInfoAsync (string owner, string name, ProjectUpdate projectUpdate, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Upsert a new permission to a project - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// - /// - /// Cancellation Token to cancel request (optional) - /// Task of UpdateAccepted - System.Threading.Tasks.Task UpsertProjectPermissionAsync (string owner, string name, ProjectAccessPolicy projectAccessPolicy, CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// Upsert a new permission to a project - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// - /// - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (UpdateAccepted) - System.Threading.Tasks.Task> UpsertProjectPermissionWithHttpInfoAsync (string owner, string name, ProjectAccessPolicy projectAccessPolicy, CancellationToken cancellationToken = default(CancellationToken)); - #endregion Asynchronous Operations - } - - /// - /// Represents a collection of functions to interact with the API endpoints - /// - public partial class ProjectsApi : IProjectsApi - { - private PollinationSDK.Client.ExceptionFactory _exceptionFactory = (name, response) => null; - - /// - /// Initializes a new instance of the class. - /// - /// - public ProjectsApi(String basePath) - { - this.Configuration = new PollinationSDK.Client.Configuration { BasePath = basePath }; - - ExceptionFactory = PollinationSDK.Client.Configuration.DefaultExceptionFactory; - } - - /// - /// Initializes a new instance of the class - /// - /// - public ProjectsApi() - { - 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 ProjectsApi(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; } - } - - /// - /// Create a Project - /// - /// Thrown when fails to make API call - /// - /// - /// CreatedContent - public CreatedContent CreateProject (string owner, ProjectCreate projectCreate) - { - ApiResponse localVarResponse = CreateProjectWithHttpInfo(owner, projectCreate); - return localVarResponse.Data; - } - - /// - /// Create a Project - /// - /// Thrown when fails to make API call - /// - /// - /// ApiResponse of CreatedContent - public ApiResponse CreateProjectWithHttpInfo (string owner, ProjectCreate projectCreate) - { - // verify the required parameter 'owner' is set - if (owner == null) - throw new ApiException(400, "Missing required parameter 'owner' when calling ProjectsApi->CreateProject"); - // verify the required parameter 'projectCreate' is set - if (projectCreate == null) - throw new ApiException(400, "Missing required parameter 'projectCreate' when calling ProjectsApi->CreateProject"); - - var localVarPath = "/projects/{owner}"; - 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 (owner != null) localVarPathParams.Add("owner", this.Configuration.ApiClient.ParameterToString(owner)); // path parameter - if (projectCreate != null && projectCreate.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(projectCreate); // http body (model) parameter - } - else - { - localVarPostBody = projectCreate; // 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("CreateProject", 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 a Project - /// - /// Thrown when fails to make API call - /// - /// - /// Cancellation Token to cancel request (optional) - /// Task of CreatedContent - public async System.Threading.Tasks.Task CreateProjectAsync (string owner, ProjectCreate projectCreate, CancellationToken cancellationToken = default(CancellationToken)) - { - ApiResponse localVarResponse = await CreateProjectWithHttpInfoAsync(owner, projectCreate, cancellationToken); - return localVarResponse.Data; - - } - - /// - /// Create a Project - /// - /// Thrown when fails to make API call - /// - /// - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (CreatedContent) - public async System.Threading.Tasks.Task> CreateProjectWithHttpInfoAsync (string owner, ProjectCreate projectCreate, CancellationToken cancellationToken = default(CancellationToken)) - { - // verify the required parameter 'owner' is set - if (owner == null) - throw new ApiException(400, "Missing required parameter 'owner' when calling ProjectsApi->CreateProject"); - // verify the required parameter 'projectCreate' is set - if (projectCreate == null) - throw new ApiException(400, "Missing required parameter 'projectCreate' when calling ProjectsApi->CreateProject"); - - var localVarPath = "/projects/{owner}"; - 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 (owner != null) localVarPathParams.Add("owner", this.Configuration.ApiClient.ParameterToString(owner)); // path parameter - if (projectCreate != null && projectCreate.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(projectCreate); // http body (model) parameter - } - else - { - localVarPostBody = projectCreate; // 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("CreateProject", 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))); - } - - /// - /// Upsert a recipe filter to a project - /// - /// Thrown when fails to make API call - /// - /// - /// - /// ProjectRecipeFilter - public ProjectRecipeFilter CreateProjectRecipeFilter (string owner, string name, ProjectRecipeFilter projectRecipeFilter) - { - ApiResponse localVarResponse = CreateProjectRecipeFilterWithHttpInfo(owner, name, projectRecipeFilter); - return localVarResponse.Data; - } - - /// - /// Upsert a recipe filter to a project - /// - /// Thrown when fails to make API call - /// - /// - /// - /// ApiResponse of ProjectRecipeFilter - public ApiResponse CreateProjectRecipeFilterWithHttpInfo (string owner, string name, ProjectRecipeFilter projectRecipeFilter) - { - // verify the required parameter 'owner' is set - if (owner == null) - throw new ApiException(400, "Missing required parameter 'owner' when calling ProjectsApi->CreateProjectRecipeFilter"); - // verify the required parameter 'name' is set - if (name == null) - throw new ApiException(400, "Missing required parameter 'name' when calling ProjectsApi->CreateProjectRecipeFilter"); - // verify the required parameter 'projectRecipeFilter' is set - if (projectRecipeFilter == null) - throw new ApiException(400, "Missing required parameter 'projectRecipeFilter' when calling ProjectsApi->CreateProjectRecipeFilter"); - - var localVarPath = "/projects/{owner}/{name}/recipes/filters"; - 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 (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 (projectRecipeFilter != null && projectRecipeFilter.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(projectRecipeFilter); // http body (model) parameter - } - else - { - localVarPostBody = projectRecipeFilter; // 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("CreateProjectRecipeFilter", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (ProjectRecipeFilter) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(ProjectRecipeFilter))); - } - - /// - /// Upsert a recipe filter to a project - /// - /// Thrown when fails to make API call - /// - /// - /// - /// Cancellation Token to cancel request (optional) - /// Task of ProjectRecipeFilter - public async System.Threading.Tasks.Task CreateProjectRecipeFilterAsync (string owner, string name, ProjectRecipeFilter projectRecipeFilter, CancellationToken cancellationToken = default(CancellationToken)) - { - ApiResponse localVarResponse = await CreateProjectRecipeFilterWithHttpInfoAsync(owner, name, projectRecipeFilter, cancellationToken); - return localVarResponse.Data; - - } - - /// - /// Upsert a recipe filter to a project - /// - /// Thrown when fails to make API call - /// - /// - /// - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (ProjectRecipeFilter) - public async System.Threading.Tasks.Task> CreateProjectRecipeFilterWithHttpInfoAsync (string owner, string name, ProjectRecipeFilter projectRecipeFilter, CancellationToken cancellationToken = default(CancellationToken)) - { - // verify the required parameter 'owner' is set - if (owner == null) - throw new ApiException(400, "Missing required parameter 'owner' when calling ProjectsApi->CreateProjectRecipeFilter"); - // verify the required parameter 'name' is set - if (name == null) - throw new ApiException(400, "Missing required parameter 'name' when calling ProjectsApi->CreateProjectRecipeFilter"); - // verify the required parameter 'projectRecipeFilter' is set - if (projectRecipeFilter == null) - throw new ApiException(400, "Missing required parameter 'projectRecipeFilter' when calling ProjectsApi->CreateProjectRecipeFilter"); - - var localVarPath = "/projects/{owner}/{name}/recipes/filters"; - 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 (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 (projectRecipeFilter != null && projectRecipeFilter.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(projectRecipeFilter); // http body (model) parameter - } - else - { - localVarPostBody = projectRecipeFilter; // 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("CreateProjectRecipeFilter", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (ProjectRecipeFilter) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(ProjectRecipeFilter))); - } - - /// - /// Delete a Project - /// - /// Thrown when fails to make API call - /// - /// - /// - public void DeleteProject (string owner, string name) - { - DeleteProjectWithHttpInfo(owner, name); - } - - /// - /// Delete a Project - /// - /// Thrown when fails to make API call - /// - /// - /// ApiResponse of Object(void) - public ApiResponse DeleteProjectWithHttpInfo (string owner, string name) - { - // verify the required parameter 'owner' is set - if (owner == null) - throw new ApiException(400, "Missing required parameter 'owner' when calling ProjectsApi->DeleteProject"); - // verify the required parameter 'name' is set - if (name == null) - throw new ApiException(400, "Missing required parameter 'name' when calling ProjectsApi->DeleteProject"); - - var localVarPath = "/projects/{owner}/{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 (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 - - // 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("DeleteProject", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); - } - - /// - /// Delete a Project - /// - /// Thrown when fails to make API call - /// - /// - /// Cancellation Token to cancel request (optional) - /// Task of void - public async System.Threading.Tasks.Task DeleteProjectAsync (string owner, string name, CancellationToken cancellationToken = default(CancellationToken)) - { - await DeleteProjectWithHttpInfoAsync(owner, name, cancellationToken); - - } - - /// - /// Delete a Project - /// - /// Thrown when fails to make API call - /// - /// - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse - public async System.Threading.Tasks.Task> DeleteProjectWithHttpInfoAsync (string owner, string name, CancellationToken cancellationToken = default(CancellationToken)) - { - // verify the required parameter 'owner' is set - if (owner == null) - throw new ApiException(400, "Missing required parameter 'owner' when calling ProjectsApi->DeleteProject"); - // verify the required parameter 'name' is set - if (name == null) - throw new ApiException(400, "Missing required parameter 'name' when calling ProjectsApi->DeleteProject"); - - var localVarPath = "/projects/{owner}/{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 (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 - - // 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("DeleteProject", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); - } - - /// - /// Remove a Project permissions - /// - /// Thrown when fails to make API call - /// - /// - /// - /// - public void DeleteProjectOrgPermission (string owner, string name, ProjectPolicySubject projectPolicySubject) - { - DeleteProjectOrgPermissionWithHttpInfo(owner, name, projectPolicySubject); - } - - /// - /// Remove a Project permissions - /// - /// Thrown when fails to make API call - /// - /// - /// - /// ApiResponse of Object(void) - public ApiResponse DeleteProjectOrgPermissionWithHttpInfo (string owner, string name, ProjectPolicySubject projectPolicySubject) - { - // verify the required parameter 'owner' is set - if (owner == null) - throw new ApiException(400, "Missing required parameter 'owner' when calling ProjectsApi->DeleteProjectOrgPermission"); - // verify the required parameter 'name' is set - if (name == null) - throw new ApiException(400, "Missing required parameter 'name' when calling ProjectsApi->DeleteProjectOrgPermission"); - // verify the required parameter 'projectPolicySubject' is set - if (projectPolicySubject == null) - throw new ApiException(400, "Missing required parameter 'projectPolicySubject' when calling ProjectsApi->DeleteProjectOrgPermission"); - - var localVarPath = "/projects/{owner}/{name}/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 (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 (projectPolicySubject != null && projectPolicySubject.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(projectPolicySubject); // http body (model) parameter - } - else - { - localVarPostBody = projectPolicySubject; // 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("DeleteProjectOrgPermission", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); - } - - /// - /// Remove a Project permissions - /// - /// Thrown when fails to make API call - /// - /// - /// - /// Cancellation Token to cancel request (optional) - /// Task of void - public async System.Threading.Tasks.Task DeleteProjectOrgPermissionAsync (string owner, string name, ProjectPolicySubject projectPolicySubject, CancellationToken cancellationToken = default(CancellationToken)) - { - await DeleteProjectOrgPermissionWithHttpInfoAsync(owner, name, projectPolicySubject, cancellationToken); - - } - - /// - /// Remove a Project permissions - /// - /// Thrown when fails to make API call - /// - /// - /// - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse - public async System.Threading.Tasks.Task> DeleteProjectOrgPermissionWithHttpInfoAsync (string owner, string name, ProjectPolicySubject projectPolicySubject, CancellationToken cancellationToken = default(CancellationToken)) - { - // verify the required parameter 'owner' is set - if (owner == null) - throw new ApiException(400, "Missing required parameter 'owner' when calling ProjectsApi->DeleteProjectOrgPermission"); - // verify the required parameter 'name' is set - if (name == null) - throw new ApiException(400, "Missing required parameter 'name' when calling ProjectsApi->DeleteProjectOrgPermission"); - // verify the required parameter 'projectPolicySubject' is set - if (projectPolicySubject == null) - throw new ApiException(400, "Missing required parameter 'projectPolicySubject' when calling ProjectsApi->DeleteProjectOrgPermission"); - - var localVarPath = "/projects/{owner}/{name}/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 (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 (projectPolicySubject != null && projectPolicySubject.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(projectPolicySubject); // http body (model) parameter - } - else - { - localVarPostBody = projectPolicySubject; // 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("DeleteProjectOrgPermission", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); - } - - /// - /// Remove a Project recipe filter - /// - /// Thrown when fails to make API call - /// - /// - /// - /// - public void DeleteProjectRecipeFilter (string owner, string name, ProjectRecipeFilter projectRecipeFilter) - { - DeleteProjectRecipeFilterWithHttpInfo(owner, name, projectRecipeFilter); - } - - /// - /// Remove a Project recipe filter - /// - /// Thrown when fails to make API call - /// - /// - /// - /// ApiResponse of Object(void) - public ApiResponse DeleteProjectRecipeFilterWithHttpInfo (string owner, string name, ProjectRecipeFilter projectRecipeFilter) - { - // verify the required parameter 'owner' is set - if (owner == null) - throw new ApiException(400, "Missing required parameter 'owner' when calling ProjectsApi->DeleteProjectRecipeFilter"); - // verify the required parameter 'name' is set - if (name == null) - throw new ApiException(400, "Missing required parameter 'name' when calling ProjectsApi->DeleteProjectRecipeFilter"); - // verify the required parameter 'projectRecipeFilter' is set - if (projectRecipeFilter == null) - throw new ApiException(400, "Missing required parameter 'projectRecipeFilter' when calling ProjectsApi->DeleteProjectRecipeFilter"); - - var localVarPath = "/projects/{owner}/{name}/recipes/filters"; - 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 (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 (projectRecipeFilter != null && projectRecipeFilter.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(projectRecipeFilter); // http body (model) parameter - } - else - { - localVarPostBody = projectRecipeFilter; // 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("DeleteProjectRecipeFilter", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); - } - - /// - /// Remove a Project recipe filter - /// - /// Thrown when fails to make API call - /// - /// - /// - /// Cancellation Token to cancel request (optional) - /// Task of void - public async System.Threading.Tasks.Task DeleteProjectRecipeFilterAsync (string owner, string name, ProjectRecipeFilter projectRecipeFilter, CancellationToken cancellationToken = default(CancellationToken)) - { - await DeleteProjectRecipeFilterWithHttpInfoAsync(owner, name, projectRecipeFilter, cancellationToken); - - } - - /// - /// Remove a Project recipe filter - /// - /// Thrown when fails to make API call - /// - /// - /// - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse - public async System.Threading.Tasks.Task> DeleteProjectRecipeFilterWithHttpInfoAsync (string owner, string name, ProjectRecipeFilter projectRecipeFilter, CancellationToken cancellationToken = default(CancellationToken)) - { - // verify the required parameter 'owner' is set - if (owner == null) - throw new ApiException(400, "Missing required parameter 'owner' when calling ProjectsApi->DeleteProjectRecipeFilter"); - // verify the required parameter 'name' is set - if (name == null) - throw new ApiException(400, "Missing required parameter 'name' when calling ProjectsApi->DeleteProjectRecipeFilter"); - // verify the required parameter 'projectRecipeFilter' is set - if (projectRecipeFilter == null) - throw new ApiException(400, "Missing required parameter 'projectRecipeFilter' when calling ProjectsApi->DeleteProjectRecipeFilter"); - - var localVarPath = "/projects/{owner}/{name}/recipes/filters"; - 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 (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 (projectRecipeFilter != null && projectRecipeFilter.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(projectRecipeFilter); // http body (model) parameter - } - else - { - localVarPostBody = projectRecipeFilter; // 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("DeleteProjectRecipeFilter", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); - } - - /// - /// Get a project - /// - /// Thrown when fails to make API call - /// - /// - /// Project - public Project GetProject (string owner, string name) - { - ApiResponse localVarResponse = GetProjectWithHttpInfo(owner, name); - return localVarResponse.Data; - } - - /// - /// Get a project - /// - /// Thrown when fails to make API call - /// - /// - /// ApiResponse of Project - public ApiResponse GetProjectWithHttpInfo (string owner, string name) - { - // verify the required parameter 'owner' is set - if (owner == null) - throw new ApiException(400, "Missing required parameter 'owner' when calling ProjectsApi->GetProject"); - // verify the required parameter 'name' is set - if (name == null) - throw new ApiException(400, "Missing required parameter 'name' when calling ProjectsApi->GetProject"); - - var localVarPath = "/projects/{owner}/{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 (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 - - // 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("GetProject", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (Project) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Project))); - } - - /// - /// Get a project - /// - /// Thrown when fails to make API call - /// - /// - /// Cancellation Token to cancel request (optional) - /// Task of Project - public async System.Threading.Tasks.Task GetProjectAsync (string owner, string name, CancellationToken cancellationToken = default(CancellationToken)) - { - ApiResponse localVarResponse = await GetProjectWithHttpInfoAsync(owner, name, cancellationToken); - return localVarResponse.Data; - - } - - /// - /// Get a project - /// - /// Thrown when fails to make API call - /// - /// - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (Project) - public async System.Threading.Tasks.Task> GetProjectWithHttpInfoAsync (string owner, string name, CancellationToken cancellationToken = default(CancellationToken)) - { - // verify the required parameter 'owner' is set - if (owner == null) - throw new ApiException(400, "Missing required parameter 'owner' when calling ProjectsApi->GetProject"); - // verify the required parameter 'name' is set - if (name == null) - throw new ApiException(400, "Missing required parameter 'name' when calling ProjectsApi->GetProject"); - - var localVarPath = "/projects/{owner}/{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 (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 - - // 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("GetProject", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (Project) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Project))); - } - - /// - /// Get project access permissions - /// - /// Thrown when fails to make API call - /// - /// - /// Page number starting from 1 (optional, default to 1) - /// Number of items per page (optional, default to 25) - /// The type of access policy subject (optional) - /// An access policy permission string (optional) - /// ProjectAccessPolicyList - public ProjectAccessPolicyList GetProjectAccessPermissions (string owner, string name, int? page = default, int? perPage = default, List subjectType = default, List permission = default) - { - ApiResponse localVarResponse = GetProjectAccessPermissionsWithHttpInfo(owner, name, page, perPage, subjectType, permission); - return localVarResponse.Data; - } - - /// - /// Get project access permissions - /// - /// Thrown when fails to make API call - /// - /// - /// Page number starting from 1 (optional, default to 1) - /// Number of items per page (optional, default to 25) - /// The type of access policy subject (optional) - /// An access policy permission string (optional) - /// ApiResponse of ProjectAccessPolicyList - public ApiResponse GetProjectAccessPermissionsWithHttpInfo (string owner, string name, int? page = default, int? perPage = default, List subjectType = default, List permission = default) - { - // verify the required parameter 'owner' is set - if (owner == null) - throw new ApiException(400, "Missing required parameter 'owner' when calling ProjectsApi->GetProjectAccessPermissions"); - // verify the required parameter 'name' is set - if (name == null) - throw new ApiException(400, "Missing required parameter 'name' when calling ProjectsApi->GetProjectAccessPermissions"); - - var localVarPath = "/projects/{owner}/{name}/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[] { - }; - 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 (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 - if (subjectType != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("multi", "subject_type", subjectType)); // query parameter - if (permission != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("multi", "permission", permission)); // 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("GetProjectAccessPermissions", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (ProjectAccessPolicyList) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(ProjectAccessPolicyList))); - } - - /// - /// Get project access permissions - /// - /// Thrown when fails to make API call - /// - /// - /// Page number starting from 1 (optional, default to 1) - /// Number of items per page (optional, default to 25) - /// The type of access policy subject (optional) - /// An access policy permission string (optional) - /// Cancellation Token to cancel request (optional) - /// Task of ProjectAccessPolicyList - public async System.Threading.Tasks.Task GetProjectAccessPermissionsAsync (string owner, string name, int? page = default, int? perPage = default, List subjectType = default, List permission = default, CancellationToken cancellationToken = default(CancellationToken)) - { - ApiResponse localVarResponse = await GetProjectAccessPermissionsWithHttpInfoAsync(owner, name, page, perPage, subjectType, permission, cancellationToken); - return localVarResponse.Data; - - } - - /// - /// Get project access permissions - /// - /// Thrown when fails to make API call - /// - /// - /// Page number starting from 1 (optional, default to 1) - /// Number of items per page (optional, default to 25) - /// The type of access policy subject (optional) - /// An access policy permission string (optional) - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (ProjectAccessPolicyList) - public async System.Threading.Tasks.Task> GetProjectAccessPermissionsWithHttpInfoAsync (string owner, string name, int? page = default, int? perPage = default, List subjectType = default, List permission = default, CancellationToken cancellationToken = default(CancellationToken)) - { - // verify the required parameter 'owner' is set - if (owner == null) - throw new ApiException(400, "Missing required parameter 'owner' when calling ProjectsApi->GetProjectAccessPermissions"); - // verify the required parameter 'name' is set - if (name == null) - throw new ApiException(400, "Missing required parameter 'name' when calling ProjectsApi->GetProjectAccessPermissions"); - - var localVarPath = "/projects/{owner}/{name}/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[] { - }; - 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 (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 - if (subjectType != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("multi", "subject_type", subjectType)); // query parameter - if (permission != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("multi", "permission", permission)); // 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("GetProjectAccessPermissions", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (ProjectAccessPolicyList) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(ProjectAccessPolicyList))); - } - - /// - /// Get project recipe filters - /// - /// Thrown when fails to make API call - /// - /// - /// Page number starting from 1 (optional, default to 1) - /// Number of items per page (optional, default to 25) - /// ProjectRecipeFilterList - public ProjectRecipeFilterList GetProjectRecipeFilters (string owner, string name, int? page = default, int? perPage = default) - { - ApiResponse localVarResponse = GetProjectRecipeFiltersWithHttpInfo(owner, name, page, perPage); - return localVarResponse.Data; - } - - /// - /// Get project recipe filters - /// - /// Thrown when fails to make API call - /// - /// - /// Page number starting from 1 (optional, default to 1) - /// Number of items per page (optional, default to 25) - /// ApiResponse of ProjectRecipeFilterList - public ApiResponse GetProjectRecipeFiltersWithHttpInfo (string owner, string name, int? page = default, int? perPage = default) - { - // verify the required parameter 'owner' is set - if (owner == null) - throw new ApiException(400, "Missing required parameter 'owner' when calling ProjectsApi->GetProjectRecipeFilters"); - // verify the required parameter 'name' is set - if (name == null) - throw new ApiException(400, "Missing required parameter 'name' when calling ProjectsApi->GetProjectRecipeFilters"); - - var localVarPath = "/projects/{owner}/{name}/recipes/filters"; - 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 (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("GetProjectRecipeFilters", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (ProjectRecipeFilterList) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(ProjectRecipeFilterList))); - } - - /// - /// Get project recipe filters - /// - /// Thrown when fails to make API call - /// - /// - /// 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 ProjectRecipeFilterList - public async System.Threading.Tasks.Task GetProjectRecipeFiltersAsync (string owner, string name, int? page = default, int? perPage = default, CancellationToken cancellationToken = default(CancellationToken)) - { - ApiResponse localVarResponse = await GetProjectRecipeFiltersWithHttpInfoAsync(owner, name, page, perPage, cancellationToken); - return localVarResponse.Data; - - } - - /// - /// Get project recipe filters - /// - /// Thrown when fails to make API call - /// - /// - /// 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 (ProjectRecipeFilterList) - public async System.Threading.Tasks.Task> GetProjectRecipeFiltersWithHttpInfoAsync (string owner, string name, int? page = default, int? perPage = default, CancellationToken cancellationToken = default(CancellationToken)) - { - // verify the required parameter 'owner' is set - if (owner == null) - throw new ApiException(400, "Missing required parameter 'owner' when calling ProjectsApi->GetProjectRecipeFilters"); - // verify the required parameter 'name' is set - if (name == null) - throw new ApiException(400, "Missing required parameter 'name' when calling ProjectsApi->GetProjectRecipeFilters"); - - var localVarPath = "/projects/{owner}/{name}/recipes/filters"; - 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 (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("GetProjectRecipeFilters", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (ProjectRecipeFilterList) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(ProjectRecipeFilterList))); - } - - /// - /// Get project recipes - /// - /// Thrown when fails to make API call - /// - /// - /// Search string to find recipes (optional) - /// Page number starting from 1 (optional, default to 1) - /// Number of items per page (optional, default to 25) - /// RecipeInterfaceList - public RecipeInterfaceList GetProjectRecipes (string owner, string name, string search = default, int? page = default, int? perPage = default) - { - ApiResponse localVarResponse = GetProjectRecipesWithHttpInfo(owner, name, search, page, perPage); - return localVarResponse.Data; - } - - /// - /// Get project recipes - /// - /// Thrown when fails to make API call - /// - /// - /// Search string to find recipes (optional) - /// Page number starting from 1 (optional, default to 1) - /// Number of items per page (optional, default to 25) - /// ApiResponse of RecipeInterfaceList - public ApiResponse GetProjectRecipesWithHttpInfo (string owner, string name, string search = default, int? page = default, int? perPage = default) - { - // verify the required parameter 'owner' is set - if (owner == null) - throw new ApiException(400, "Missing required parameter 'owner' when calling ProjectsApi->GetProjectRecipes"); - // verify the required parameter 'name' is set - if (name == null) - throw new ApiException(400, "Missing required parameter 'name' when calling ProjectsApi->GetProjectRecipes"); - - var localVarPath = "/projects/{owner}/{name}/recipes"; - 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 (search != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "search", search)); // 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("GetProjectRecipes", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (RecipeInterfaceList) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(RecipeInterfaceList))); - } - - /// - /// Get project recipes - /// - /// Thrown when fails to make API call - /// - /// - /// Search string to find recipes (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 RecipeInterfaceList - public async System.Threading.Tasks.Task GetProjectRecipesAsync (string owner, string name, string search = default, int? page = default, int? perPage = default, CancellationToken cancellationToken = default(CancellationToken)) - { - ApiResponse localVarResponse = await GetProjectRecipesWithHttpInfoAsync(owner, name, search, page, perPage, cancellationToken); - return localVarResponse.Data; - - } - - /// - /// Get project recipes - /// - /// Thrown when fails to make API call - /// - /// - /// Search string to find recipes (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 (RecipeInterfaceList) - public async System.Threading.Tasks.Task> GetProjectRecipesWithHttpInfoAsync (string owner, string name, string search = default, int? page = default, int? perPage = default, CancellationToken cancellationToken = default(CancellationToken)) - { - // verify the required parameter 'owner' is set - if (owner == null) - throw new ApiException(400, "Missing required parameter 'owner' when calling ProjectsApi->GetProjectRecipes"); - // verify the required parameter 'name' is set - if (name == null) - throw new ApiException(400, "Missing required parameter 'name' when calling ProjectsApi->GetProjectRecipes"); - - var localVarPath = "/projects/{owner}/{name}/recipes"; - 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 (search != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "search", search)); // 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("GetProjectRecipes", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (RecipeInterfaceList) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(RecipeInterfaceList))); - } - - /// - /// List Projects - /// - /// Thrown when fails to make API call - /// Search string to find projects (optional) - /// The ID of a project to search for (optional) - /// The name of the project (optional) - /// Owner of the project (optional) - /// Boolean check for public/private projects (optional) - /// Filter by permission on given resource (optional) - /// Key to sort the list by (optional) - /// The order to sort the list (optional) - /// 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) - { - ApiResponse localVarResponse = ListProjectsWithHttpInfo(search, ids, names, owner, _public, permissions, sortBy, sortOrder, page, perPage); - return localVarResponse.Data; - } - - /// - /// List Projects - /// - /// Thrown when fails to make API call - /// Search string to find projects (optional) - /// The ID of a project to search for (optional) - /// The name of the project (optional) - /// Owner of the project (optional) - /// Boolean check for public/private projects (optional) - /// Filter by permission on given resource (optional) - /// Key to sort the list by (optional) - /// The order to sort the list (optional) - /// 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) - { - - var localVarPath = "/projects"; - 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 (search != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "search", search)); // query parameter - if (ids != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("multi", "ids", ids)); // query parameter - if (names != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("multi", "names", names)); // query parameter - if (owner != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("multi", "owner", owner)); // query parameter - if (_public != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "public", _public)); // query parameter - if (permissions != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("multi", "permissions", permissions)); // query parameter - if (sortBy != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "sort_by", sortBy)); // query parameter - if (sortOrder != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "sort_order", sortOrder)); // 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("ListProjects", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (ProjectList) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(ProjectList))); - } - - /// - /// List Projects - /// - /// Thrown when fails to make API call - /// Search string to find projects (optional) - /// The ID of a project to search for (optional) - /// The name of the project (optional) - /// Owner of the project (optional) - /// Boolean check for public/private projects (optional) - /// Filter by permission on given resource (optional) - /// Key to sort the list by (optional) - /// The order to sort the list (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 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)) - { - ApiResponse localVarResponse = await ListProjectsWithHttpInfoAsync(search, ids, names, owner, _public, permissions, sortBy, sortOrder, page, perPage, cancellationToken); - return localVarResponse.Data; - - } - - /// - /// List Projects - /// - /// Thrown when fails to make API call - /// Search string to find projects (optional) - /// The ID of a project to search for (optional) - /// The name of the project (optional) - /// Owner of the project (optional) - /// Boolean check for public/private projects (optional) - /// Filter by permission on given resource (optional) - /// Key to sort the list by (optional) - /// The order to sort the list (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 (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)) - { - - var localVarPath = "/projects"; - 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 (search != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "search", search)); // query parameter - if (ids != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("multi", "ids", ids)); // query parameter - if (names != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("multi", "names", names)); // query parameter - if (owner != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("multi", "owner", owner)); // query parameter - if (_public != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "public", _public)); // query parameter - if (permissions != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("multi", "permissions", permissions)); // query parameter - if (sortBy != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "sort_by", sortBy)); // query parameter - if (sortOrder != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "sort_order", sortOrder)); // 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("ListProjects", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (ProjectList) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(ProjectList))); - } - - /// - /// Update a Project - /// - /// Thrown when fails to make API call - /// - /// - /// - /// UpdateAccepted - public UpdateAccepted Update (string owner, string name, ProjectUpdate projectUpdate) - { - ApiResponse localVarResponse = UpdateWithHttpInfo(owner, name, projectUpdate); - return localVarResponse.Data; - } - - /// - /// Update a Project - /// - /// Thrown when fails to make API call - /// - /// - /// - /// ApiResponse of UpdateAccepted - public ApiResponse UpdateWithHttpInfo (string owner, string name, ProjectUpdate projectUpdate) - { - // verify the required parameter 'owner' is set - if (owner == null) - throw new ApiException(400, "Missing required parameter 'owner' when calling ProjectsApi->Update"); - // verify the required parameter 'name' is set - if (name == null) - throw new ApiException(400, "Missing required parameter 'name' when calling ProjectsApi->Update"); - // verify the required parameter 'projectUpdate' is set - if (projectUpdate == null) - throw new ApiException(400, "Missing required parameter 'projectUpdate' when calling ProjectsApi->Update"); - - var localVarPath = "/projects/{owner}/{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[] { - "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 (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 (projectUpdate != null && projectUpdate.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(projectUpdate); // http body (model) parameter - } - else - { - localVarPostBody = projectUpdate; // 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("Update", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (UpdateAccepted) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(UpdateAccepted))); - } - - /// - /// Update a Project - /// - /// Thrown when fails to make API call - /// - /// - /// - /// Cancellation Token to cancel request (optional) - /// Task of UpdateAccepted - public async System.Threading.Tasks.Task UpdateAsync (string owner, string name, ProjectUpdate projectUpdate, CancellationToken cancellationToken = default(CancellationToken)) - { - ApiResponse localVarResponse = await UpdateWithHttpInfoAsync(owner, name, projectUpdate, cancellationToken); - return localVarResponse.Data; - - } - - /// - /// Update a Project - /// - /// Thrown when fails to make API call - /// - /// - /// - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (UpdateAccepted) - public async System.Threading.Tasks.Task> UpdateWithHttpInfoAsync (string owner, string name, ProjectUpdate projectUpdate, CancellationToken cancellationToken = default(CancellationToken)) - { - // verify the required parameter 'owner' is set - if (owner == null) - throw new ApiException(400, "Missing required parameter 'owner' when calling ProjectsApi->Update"); - // verify the required parameter 'name' is set - if (name == null) - throw new ApiException(400, "Missing required parameter 'name' when calling ProjectsApi->Update"); - // verify the required parameter 'projectUpdate' is set - if (projectUpdate == null) - throw new ApiException(400, "Missing required parameter 'projectUpdate' when calling ProjectsApi->Update"); - - var localVarPath = "/projects/{owner}/{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[] { - "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 (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 (projectUpdate != null && projectUpdate.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(projectUpdate); // http body (model) parameter - } - else - { - localVarPostBody = projectUpdate; // 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("Update", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (UpdateAccepted) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(UpdateAccepted))); - } - - /// - /// Upsert a new permission to a project - /// - /// Thrown when fails to make API call - /// - /// - /// - /// UpdateAccepted - public UpdateAccepted UpsertProjectPermission (string owner, string name, ProjectAccessPolicy projectAccessPolicy) - { - ApiResponse localVarResponse = UpsertProjectPermissionWithHttpInfo(owner, name, projectAccessPolicy); - return localVarResponse.Data; - } - - /// - /// Upsert a new permission to a project - /// - /// Thrown when fails to make API call - /// - /// - /// - /// ApiResponse of UpdateAccepted - public ApiResponse UpsertProjectPermissionWithHttpInfo (string owner, string name, ProjectAccessPolicy projectAccessPolicy) - { - // verify the required parameter 'owner' is set - if (owner == null) - throw new ApiException(400, "Missing required parameter 'owner' when calling ProjectsApi->UpsertProjectPermission"); - // verify the required parameter 'name' is set - if (name == null) - throw new ApiException(400, "Missing required parameter 'name' when calling ProjectsApi->UpsertProjectPermission"); - // verify the required parameter 'projectAccessPolicy' is set - if (projectAccessPolicy == null) - throw new ApiException(400, "Missing required parameter 'projectAccessPolicy' when calling ProjectsApi->UpsertProjectPermission"); - - var localVarPath = "/projects/{owner}/{name}/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 (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 (projectAccessPolicy != null && projectAccessPolicy.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(projectAccessPolicy); // http body (model) parameter - } - else - { - localVarPostBody = projectAccessPolicy; // 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("UpsertProjectPermission", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (UpdateAccepted) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(UpdateAccepted))); - } - - /// - /// Upsert a new permission to a project - /// - /// Thrown when fails to make API call - /// - /// - /// - /// Cancellation Token to cancel request (optional) - /// Task of UpdateAccepted - public async System.Threading.Tasks.Task UpsertProjectPermissionAsync (string owner, string name, ProjectAccessPolicy projectAccessPolicy, CancellationToken cancellationToken = default(CancellationToken)) - { - ApiResponse localVarResponse = await UpsertProjectPermissionWithHttpInfoAsync(owner, name, projectAccessPolicy, cancellationToken); - return localVarResponse.Data; - - } - - /// - /// Upsert a new permission to a project - /// - /// Thrown when fails to make API call - /// - /// - /// - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (UpdateAccepted) - public async System.Threading.Tasks.Task> UpsertProjectPermissionWithHttpInfoAsync (string owner, string name, ProjectAccessPolicy projectAccessPolicy, CancellationToken cancellationToken = default(CancellationToken)) - { - // verify the required parameter 'owner' is set - if (owner == null) - throw new ApiException(400, "Missing required parameter 'owner' when calling ProjectsApi->UpsertProjectPermission"); - // verify the required parameter 'name' is set - if (name == null) - throw new ApiException(400, "Missing required parameter 'name' when calling ProjectsApi->UpsertProjectPermission"); - // verify the required parameter 'projectAccessPolicy' is set - if (projectAccessPolicy == null) - throw new ApiException(400, "Missing required parameter 'projectAccessPolicy' when calling ProjectsApi->UpsertProjectPermission"); - - var localVarPath = "/projects/{owner}/{name}/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 (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 (projectAccessPolicy != null && projectAccessPolicy.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(projectAccessPolicy); // http body (model) parameter - } - else - { - localVarPostBody = projectAccessPolicy; // 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("UpsertProjectPermission", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (UpdateAccepted) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(UpdateAccepted))); - } - - } -} diff --git a/src/PollinationSDK/Api/RecipesApi.cs b/src/PollinationSDK/Api/RecipesApi.cs deleted file mode 100644 index a7e605653..000000000 --- a/src/PollinationSDK/Api/RecipesApi.cs +++ /dev/null @@ -1,2800 +0,0 @@ -/* - * 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 IRecipesApi : IApiAccessor - { - #region Synchronous Operations - /// - /// Create a Recipe - /// - /// - /// Create a new recipe. - /// - /// Thrown when fails to make API call - /// - /// - /// CreatedContent - CreatedContent CreateRecipe (string owner, RepositoryCreate repositoryCreate); - - /// - /// Create a Recipe - /// - /// - /// Create a new recipe. - /// - /// Thrown when fails to make API call - /// - /// - /// ApiResponse of CreatedContent - ApiResponse CreateRecipeWithHttpInfo (string owner, RepositoryCreate repositoryCreate); - /// - /// Create a new Recipe package - /// - /// - /// Create a new recipe package version - /// - /// Thrown when fails to make API call - /// - /// - /// - /// CreatedContent - CreatedContent CreateRecipePackage (string owner, string name, NewRecipePackage newRecipePackage); - - /// - /// Create a new Recipe package - /// - /// - /// Create a new recipe package version - /// - /// Thrown when fails to make API call - /// - /// - /// - /// ApiResponse of CreatedContent - ApiResponse CreateRecipePackageWithHttpInfo (string owner, string name, NewRecipePackage newRecipePackage); - /// - /// Delete a Recipe - /// - /// - /// Delete a recipe (must have `admin` permission) - /// - /// Thrown when fails to make API call - /// - /// - /// - void DeleteRecipe (string owner, string name); - - /// - /// Delete a Recipe - /// - /// - /// Delete a recipe (must have `admin` permission) - /// - /// Thrown when fails to make API call - /// - /// - /// ApiResponse of Object(void) - ApiResponse DeleteRecipeWithHttpInfo (string owner, string name); - /// - /// Remove a Repository permissions - /// - /// - /// Delete a recipe's access policy (must have `admin` permission) - /// - /// Thrown when fails to make API call - /// - /// - /// - /// - void DeleteRecipeOrgPermission (string owner, string name, RepositoryPolicySubject repositoryPolicySubject); - - /// - /// Remove a Repository permissions - /// - /// - /// Delete a recipe's access policy (must have `admin` permission) - /// - /// Thrown when fails to make API call - /// - /// - /// - /// ApiResponse of Object(void) - ApiResponse DeleteRecipeOrgPermissionWithHttpInfo (string owner, string name, RepositoryPolicySubject repositoryPolicySubject); - /// - /// Get a recipe - /// - /// - /// Retrieve a recipe by name - /// - /// Thrown when fails to make API call - /// - /// - /// Repository - Repository GetRecipe (string owner, string name); - - /// - /// Get a recipe - /// - /// - /// Retrieve a recipe by name - /// - /// Thrown when fails to make API call - /// - /// - /// ApiResponse of Repository - ApiResponse GetRecipeWithHttpInfo (string owner, string name); - /// - /// Get recipe access permissions - /// - /// - /// Retrieve a recipe's access permissions (must have `write` permission) - /// - /// Thrown when fails to make API call - /// - /// - /// Page number starting from 1 (optional, default to 1) - /// Number of items per page (optional, default to 25) - /// The type of access policy subject (optional) - /// An access policy permission string (optional) - /// RepositoryAccessPolicyList - RepositoryAccessPolicyList GetRecipeAccessPermissions (string owner, string name, int? page = default, int? perPage = default, List subjectType = default, List permission = default); - - /// - /// Get recipe access permissions - /// - /// - /// Retrieve a recipe's access permissions (must have `write` permission) - /// - /// Thrown when fails to make API call - /// - /// - /// Page number starting from 1 (optional, default to 1) - /// Number of items per page (optional, default to 25) - /// The type of access policy subject (optional) - /// An access policy permission string (optional) - /// ApiResponse of RepositoryAccessPolicyList - ApiResponse GetRecipeAccessPermissionsWithHttpInfo (string owner, string name, int? page = default, int? perPage = default, List subjectType = default, List permission = default); - /// - /// Get a recipe tag - /// - /// - /// Retrieve a recipe tag by name and tag - /// - /// Thrown when fails to make API call - /// - /// - /// - /// RecipePackage - RecipePackage GetRecipeByTag (string owner, string name, string tag); - - /// - /// Get a recipe tag - /// - /// - /// Retrieve a recipe tag by name and tag - /// - /// Thrown when fails to make API call - /// - /// - /// - /// ApiResponse of RecipePackage - ApiResponse GetRecipeByTagWithHttpInfo (string owner, string name, string tag); - /// - /// Get a recipe tags - /// - /// - /// Retrieve a recipe by name - /// - /// Thrown when fails to make API call - /// - /// - /// Key to sort the list by (optional) - /// The order to sort the list (optional) - /// 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); - - /// - /// Get a recipe tags - /// - /// - /// Retrieve a recipe by name - /// - /// Thrown when fails to make API call - /// - /// - /// Key to sort the list by (optional) - /// The order to sort the list (optional) - /// 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); - /// - /// List recipes - /// - /// - /// - /// - /// Thrown when fails to make API call - /// You know, for search (optional) - /// The account name (optional) - /// Owner of the project (optional) - /// Boolean check for public/private projects (optional) - /// A keyword to index the repository by (optional) - /// Filter by permission on given resource (optional) - /// Key to sort the list by (optional) - /// The order to sort the list (optional) - /// 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); - - /// - /// List recipes - /// - /// - /// - /// - /// Thrown when fails to make API call - /// You know, for search (optional) - /// The account name (optional) - /// Owner of the project (optional) - /// Boolean check for public/private projects (optional) - /// A keyword to index the repository by (optional) - /// Filter by permission on given resource (optional) - /// Key to sort the list by (optional) - /// The order to sort the list (optional) - /// 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); - /// - /// Update a Recipe - /// - /// - /// Update a recipe (must have `contribute` permission) - /// - /// Thrown when fails to make API call - /// - /// - /// - /// UpdateAccepted - UpdateAccepted UpdateRecipe (string owner, string name, RepositoryUpdate repositoryUpdate); - - /// - /// Update a Recipe - /// - /// - /// Update a recipe (must have `contribute` permission) - /// - /// Thrown when fails to make API call - /// - /// - /// - /// ApiResponse of UpdateAccepted - ApiResponse UpdateRecipeWithHttpInfo (string owner, string name, RepositoryUpdate repositoryUpdate); - /// - /// Upsert a new permission to a recipe - /// - /// - /// Upsert a recipe's access policy (must have `admin` permission) - /// - /// Thrown when fails to make API call - /// - /// - /// - /// UpdateAccepted - UpdateAccepted UpsertRecipePermission (string owner, string name, RepositoryAccessPolicy repositoryAccessPolicy); - - /// - /// Upsert a new permission to a recipe - /// - /// - /// Upsert a recipe's access policy (must have `admin` permission) - /// - /// Thrown when fails to make API call - /// - /// - /// - /// ApiResponse of UpdateAccepted - ApiResponse UpsertRecipePermissionWithHttpInfo (string owner, string name, RepositoryAccessPolicy repositoryAccessPolicy); - #endregion Synchronous Operations - #region Asynchronous Operations - /// - /// Create a Recipe - /// - /// - /// Create a new recipe. - /// - /// Thrown when fails to make API call - /// - /// - /// Cancellation Token to cancel request (optional) - /// Task of CreatedContent - System.Threading.Tasks.Task CreateRecipeAsync (string owner, RepositoryCreate repositoryCreate, CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// Create a Recipe - /// - /// - /// Create a new recipe. - /// - /// Thrown when fails to make API call - /// - /// - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (CreatedContent) - System.Threading.Tasks.Task> CreateRecipeWithHttpInfoAsync (string owner, RepositoryCreate repositoryCreate, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Create a new Recipe package - /// - /// - /// Create a new recipe package version - /// - /// Thrown when fails to make API call - /// - /// - /// - /// Cancellation Token to cancel request (optional) - /// Task of CreatedContent - System.Threading.Tasks.Task CreateRecipePackageAsync (string owner, string name, NewRecipePackage newRecipePackage, CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// Create a new Recipe package - /// - /// - /// Create a new recipe package version - /// - /// Thrown when fails to make API call - /// - /// - /// - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (CreatedContent) - System.Threading.Tasks.Task> CreateRecipePackageWithHttpInfoAsync (string owner, string name, NewRecipePackage newRecipePackage, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Delete a Recipe - /// - /// - /// Delete a recipe (must have `admin` permission) - /// - /// Thrown when fails to make API call - /// - /// - /// Cancellation Token to cancel request (optional) - /// Task of void - System.Threading.Tasks.Task DeleteRecipeAsync (string owner, string name, CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// Delete a Recipe - /// - /// - /// Delete a recipe (must have `admin` permission) - /// - /// Thrown when fails to make API call - /// - /// - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse - System.Threading.Tasks.Task> DeleteRecipeWithHttpInfoAsync (string owner, string name, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Remove a Repository permissions - /// - /// - /// Delete a recipe's access policy (must have `admin` permission) - /// - /// Thrown when fails to make API call - /// - /// - /// - /// Cancellation Token to cancel request (optional) - /// Task of void - System.Threading.Tasks.Task DeleteRecipeOrgPermissionAsync (string owner, string name, RepositoryPolicySubject repositoryPolicySubject, CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// Remove a Repository permissions - /// - /// - /// Delete a recipe's access policy (must have `admin` permission) - /// - /// Thrown when fails to make API call - /// - /// - /// - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse - System.Threading.Tasks.Task> DeleteRecipeOrgPermissionWithHttpInfoAsync (string owner, string name, RepositoryPolicySubject repositoryPolicySubject, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Get a recipe - /// - /// - /// Retrieve a recipe by name - /// - /// Thrown when fails to make API call - /// - /// - /// Cancellation Token to cancel request (optional) - /// Task of Repository - System.Threading.Tasks.Task GetRecipeAsync (string owner, string name, CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// Get a recipe - /// - /// - /// Retrieve a recipe by name - /// - /// Thrown when fails to make API call - /// - /// - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (Repository) - System.Threading.Tasks.Task> GetRecipeWithHttpInfoAsync (string owner, string name, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Get recipe access permissions - /// - /// - /// Retrieve a recipe's access permissions (must have `write` permission) - /// - /// Thrown when fails to make API call - /// - /// - /// Page number starting from 1 (optional, default to 1) - /// Number of items per page (optional, default to 25) - /// The type of access policy subject (optional) - /// An access policy permission string (optional) - /// Cancellation Token to cancel request (optional) - /// Task of RepositoryAccessPolicyList - System.Threading.Tasks.Task GetRecipeAccessPermissionsAsync (string owner, string name, int? page = default, int? perPage = default, List subjectType = default, List permission = default, CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// Get recipe access permissions - /// - /// - /// Retrieve a recipe's access permissions (must have `write` permission) - /// - /// Thrown when fails to make API call - /// - /// - /// Page number starting from 1 (optional, default to 1) - /// Number of items per page (optional, default to 25) - /// The type of access policy subject (optional) - /// An access policy permission string (optional) - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (RepositoryAccessPolicyList) - System.Threading.Tasks.Task> GetRecipeAccessPermissionsWithHttpInfoAsync (string owner, string name, int? page = default, int? perPage = default, List subjectType = default, List permission = default, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Get a recipe tag - /// - /// - /// Retrieve a recipe tag by name and tag - /// - /// Thrown when fails to make API call - /// - /// - /// - /// Cancellation Token to cancel request (optional) - /// Task of RecipePackage - System.Threading.Tasks.Task GetRecipeByTagAsync (string owner, string name, string tag, CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// Get a recipe tag - /// - /// - /// Retrieve a recipe tag by name and tag - /// - /// Thrown when fails to make API call - /// - /// - /// - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (RecipePackage) - System.Threading.Tasks.Task> GetRecipeByTagWithHttpInfoAsync (string owner, string name, string tag, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Get a recipe tags - /// - /// - /// Retrieve a recipe by name - /// - /// Thrown when fails to make API call - /// - /// - /// Key to sort the list by (optional) - /// The order to sort the list (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 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)); - - /// - /// Get a recipe tags - /// - /// - /// Retrieve a recipe by name - /// - /// Thrown when fails to make API call - /// - /// - /// Key to sort the list by (optional) - /// The order to sort the list (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 (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)); - /// - /// List recipes - /// - /// - /// - /// - /// Thrown when fails to make API call - /// You know, for search (optional) - /// The account name (optional) - /// Owner of the project (optional) - /// Boolean check for public/private projects (optional) - /// A keyword to index the repository by (optional) - /// Filter by permission on given resource (optional) - /// Key to sort the list by (optional) - /// The order to sort the list (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 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)); - - /// - /// List recipes - /// - /// - /// - /// - /// Thrown when fails to make API call - /// You know, for search (optional) - /// The account name (optional) - /// Owner of the project (optional) - /// Boolean check for public/private projects (optional) - /// A keyword to index the repository by (optional) - /// Filter by permission on given resource (optional) - /// Key to sort the list by (optional) - /// The order to sort the list (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 (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)); - /// - /// Update a Recipe - /// - /// - /// Update a recipe (must have `contribute` permission) - /// - /// Thrown when fails to make API call - /// - /// - /// - /// Cancellation Token to cancel request (optional) - /// Task of UpdateAccepted - System.Threading.Tasks.Task UpdateRecipeAsync (string owner, string name, RepositoryUpdate repositoryUpdate, CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// Update a Recipe - /// - /// - /// Update a recipe (must have `contribute` permission) - /// - /// Thrown when fails to make API call - /// - /// - /// - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (UpdateAccepted) - System.Threading.Tasks.Task> UpdateRecipeWithHttpInfoAsync (string owner, string name, RepositoryUpdate repositoryUpdate, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Upsert a new permission to a recipe - /// - /// - /// Upsert a recipe's access policy (must have `admin` permission) - /// - /// Thrown when fails to make API call - /// - /// - /// - /// Cancellation Token to cancel request (optional) - /// Task of UpdateAccepted - System.Threading.Tasks.Task UpsertRecipePermissionAsync (string owner, string name, RepositoryAccessPolicy repositoryAccessPolicy, CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// Upsert a new permission to a recipe - /// - /// - /// Upsert a recipe's access policy (must have `admin` permission) - /// - /// Thrown when fails to make API call - /// - /// - /// - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (UpdateAccepted) - System.Threading.Tasks.Task> UpsertRecipePermissionWithHttpInfoAsync (string owner, string name, RepositoryAccessPolicy repositoryAccessPolicy, CancellationToken cancellationToken = default(CancellationToken)); - #endregion Asynchronous Operations - } - - /// - /// Represents a collection of functions to interact with the API endpoints - /// - public partial class RecipesApi : IRecipesApi - { - private PollinationSDK.Client.ExceptionFactory _exceptionFactory = (name, response) => null; - - /// - /// Initializes a new instance of the class. - /// - /// - public RecipesApi(String basePath) - { - this.Configuration = new PollinationSDK.Client.Configuration { BasePath = basePath }; - - ExceptionFactory = PollinationSDK.Client.Configuration.DefaultExceptionFactory; - } - - /// - /// Initializes a new instance of the class - /// - /// - public RecipesApi() - { - 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 RecipesApi(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; } - } - - /// - /// Create a Recipe Create a new recipe. - /// - /// Thrown when fails to make API call - /// - /// - /// CreatedContent - public CreatedContent CreateRecipe (string owner, RepositoryCreate repositoryCreate) - { - ApiResponse localVarResponse = CreateRecipeWithHttpInfo(owner, repositoryCreate); - return localVarResponse.Data; - } - - /// - /// Create a Recipe Create a new recipe. - /// - /// Thrown when fails to make API call - /// - /// - /// ApiResponse of CreatedContent - public ApiResponse CreateRecipeWithHttpInfo (string owner, RepositoryCreate repositoryCreate) - { - // verify the required parameter 'owner' is set - if (owner == null) - throw new ApiException(400, "Missing required parameter 'owner' when calling RecipesApi->CreateRecipe"); - // verify the required parameter 'repositoryCreate' is set - if (repositoryCreate == null) - throw new ApiException(400, "Missing required parameter 'repositoryCreate' when calling RecipesApi->CreateRecipe"); - - var localVarPath = "/recipes/{owner}"; - 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 (owner != null) localVarPathParams.Add("owner", this.Configuration.ApiClient.ParameterToString(owner)); // path parameter - if (repositoryCreate != null && repositoryCreate.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(repositoryCreate); // http body (model) parameter - } - else - { - localVarPostBody = repositoryCreate; // 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("CreateRecipe", 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 a Recipe Create a new recipe. - /// - /// Thrown when fails to make API call - /// - /// - /// Cancellation Token to cancel request (optional) - /// Task of CreatedContent - public async System.Threading.Tasks.Task CreateRecipeAsync (string owner, RepositoryCreate repositoryCreate, CancellationToken cancellationToken = default(CancellationToken)) - { - ApiResponse localVarResponse = await CreateRecipeWithHttpInfoAsync(owner, repositoryCreate, cancellationToken); - return localVarResponse.Data; - - } - - /// - /// Create a Recipe Create a new recipe. - /// - /// Thrown when fails to make API call - /// - /// - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (CreatedContent) - public async System.Threading.Tasks.Task> CreateRecipeWithHttpInfoAsync (string owner, RepositoryCreate repositoryCreate, CancellationToken cancellationToken = default(CancellationToken)) - { - // verify the required parameter 'owner' is set - if (owner == null) - throw new ApiException(400, "Missing required parameter 'owner' when calling RecipesApi->CreateRecipe"); - // verify the required parameter 'repositoryCreate' is set - if (repositoryCreate == null) - throw new ApiException(400, "Missing required parameter 'repositoryCreate' when calling RecipesApi->CreateRecipe"); - - var localVarPath = "/recipes/{owner}"; - 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 (owner != null) localVarPathParams.Add("owner", this.Configuration.ApiClient.ParameterToString(owner)); // path parameter - if (repositoryCreate != null && repositoryCreate.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(repositoryCreate); // http body (model) parameter - } - else - { - localVarPostBody = repositoryCreate; // 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("CreateRecipe", 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 a new Recipe package Create a new recipe package version - /// - /// Thrown when fails to make API call - /// - /// - /// - /// CreatedContent - public CreatedContent CreateRecipePackage (string owner, string name, NewRecipePackage newRecipePackage) - { - ApiResponse localVarResponse = CreateRecipePackageWithHttpInfo(owner, name, newRecipePackage); - return localVarResponse.Data; - } - - /// - /// Create a new Recipe package Create a new recipe package version - /// - /// Thrown when fails to make API call - /// - /// - /// - /// ApiResponse of CreatedContent - public ApiResponse CreateRecipePackageWithHttpInfo (string owner, string name, NewRecipePackage newRecipePackage) - { - // verify the required parameter 'owner' is set - if (owner == null) - throw new ApiException(400, "Missing required parameter 'owner' when calling RecipesApi->CreateRecipePackage"); - // verify the required parameter 'name' is set - if (name == null) - throw new ApiException(400, "Missing required parameter 'name' when calling RecipesApi->CreateRecipePackage"); - // verify the required parameter 'newRecipePackage' is set - if (newRecipePackage == null) - throw new ApiException(400, "Missing required parameter 'newRecipePackage' when calling RecipesApi->CreateRecipePackage"); - - var localVarPath = "/recipes/{owner}/{name}/tags"; - 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 (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 (newRecipePackage != null && newRecipePackage.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(newRecipePackage); // http body (model) parameter - } - else - { - localVarPostBody = newRecipePackage; // 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("CreateRecipePackage", 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 a new Recipe package Create a new recipe package version - /// - /// Thrown when fails to make API call - /// - /// - /// - /// Cancellation Token to cancel request (optional) - /// Task of CreatedContent - public async System.Threading.Tasks.Task CreateRecipePackageAsync (string owner, string name, NewRecipePackage newRecipePackage, CancellationToken cancellationToken = default(CancellationToken)) - { - ApiResponse localVarResponse = await CreateRecipePackageWithHttpInfoAsync(owner, name, newRecipePackage, cancellationToken); - return localVarResponse.Data; - - } - - /// - /// Create a new Recipe package Create a new recipe package version - /// - /// Thrown when fails to make API call - /// - /// - /// - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (CreatedContent) - public async System.Threading.Tasks.Task> CreateRecipePackageWithHttpInfoAsync (string owner, string name, NewRecipePackage newRecipePackage, CancellationToken cancellationToken = default(CancellationToken)) - { - // verify the required parameter 'owner' is set - if (owner == null) - throw new ApiException(400, "Missing required parameter 'owner' when calling RecipesApi->CreateRecipePackage"); - // verify the required parameter 'name' is set - if (name == null) - throw new ApiException(400, "Missing required parameter 'name' when calling RecipesApi->CreateRecipePackage"); - // verify the required parameter 'newRecipePackage' is set - if (newRecipePackage == null) - throw new ApiException(400, "Missing required parameter 'newRecipePackage' when calling RecipesApi->CreateRecipePackage"); - - var localVarPath = "/recipes/{owner}/{name}/tags"; - 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 (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 (newRecipePackage != null && newRecipePackage.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(newRecipePackage); // http body (model) parameter - } - else - { - localVarPostBody = newRecipePackage; // 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("CreateRecipePackage", 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))); - } - - /// - /// Delete a Recipe Delete a recipe (must have `admin` permission) - /// - /// Thrown when fails to make API call - /// - /// - /// - public void DeleteRecipe (string owner, string name) - { - DeleteRecipeWithHttpInfo(owner, name); - } - - /// - /// Delete a Recipe Delete a recipe (must have `admin` permission) - /// - /// Thrown when fails to make API call - /// - /// - /// ApiResponse of Object(void) - public ApiResponse DeleteRecipeWithHttpInfo (string owner, string name) - { - // verify the required parameter 'owner' is set - if (owner == null) - throw new ApiException(400, "Missing required parameter 'owner' when calling RecipesApi->DeleteRecipe"); - // verify the required parameter 'name' is set - if (name == null) - throw new ApiException(400, "Missing required parameter 'name' when calling RecipesApi->DeleteRecipe"); - - var localVarPath = "/recipes/{owner}/{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 (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 - - // 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("DeleteRecipe", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); - } - - /// - /// Delete a Recipe Delete a recipe (must have `admin` permission) - /// - /// Thrown when fails to make API call - /// - /// - /// Cancellation Token to cancel request (optional) - /// Task of void - public async System.Threading.Tasks.Task DeleteRecipeAsync (string owner, string name, CancellationToken cancellationToken = default(CancellationToken)) - { - await DeleteRecipeWithHttpInfoAsync(owner, name, cancellationToken); - - } - - /// - /// Delete a Recipe Delete a recipe (must have `admin` permission) - /// - /// Thrown when fails to make API call - /// - /// - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse - public async System.Threading.Tasks.Task> DeleteRecipeWithHttpInfoAsync (string owner, string name, CancellationToken cancellationToken = default(CancellationToken)) - { - // verify the required parameter 'owner' is set - if (owner == null) - throw new ApiException(400, "Missing required parameter 'owner' when calling RecipesApi->DeleteRecipe"); - // verify the required parameter 'name' is set - if (name == null) - throw new ApiException(400, "Missing required parameter 'name' when calling RecipesApi->DeleteRecipe"); - - var localVarPath = "/recipes/{owner}/{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 (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 - - // 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("DeleteRecipe", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); - } - - /// - /// Remove a Repository permissions Delete a recipe's access policy (must have `admin` permission) - /// - /// Thrown when fails to make API call - /// - /// - /// - /// - public void DeleteRecipeOrgPermission (string owner, string name, RepositoryPolicySubject repositoryPolicySubject) - { - DeleteRecipeOrgPermissionWithHttpInfo(owner, name, repositoryPolicySubject); - } - - /// - /// Remove a Repository permissions Delete a recipe's access policy (must have `admin` permission) - /// - /// Thrown when fails to make API call - /// - /// - /// - /// ApiResponse of Object(void) - public ApiResponse DeleteRecipeOrgPermissionWithHttpInfo (string owner, string name, RepositoryPolicySubject repositoryPolicySubject) - { - // verify the required parameter 'owner' is set - if (owner == null) - throw new ApiException(400, "Missing required parameter 'owner' when calling RecipesApi->DeleteRecipeOrgPermission"); - // verify the required parameter 'name' is set - if (name == null) - throw new ApiException(400, "Missing required parameter 'name' when calling RecipesApi->DeleteRecipeOrgPermission"); - // verify the required parameter 'repositoryPolicySubject' is set - if (repositoryPolicySubject == null) - throw new ApiException(400, "Missing required parameter 'repositoryPolicySubject' when calling RecipesApi->DeleteRecipeOrgPermission"); - - var localVarPath = "/recipes/{owner}/{name}/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 (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 (repositoryPolicySubject != null && repositoryPolicySubject.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(repositoryPolicySubject); // http body (model) parameter - } - else - { - localVarPostBody = repositoryPolicySubject; // 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("DeleteRecipeOrgPermission", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); - } - - /// - /// Remove a Repository permissions Delete a recipe's access policy (must have `admin` permission) - /// - /// Thrown when fails to make API call - /// - /// - /// - /// Cancellation Token to cancel request (optional) - /// Task of void - public async System.Threading.Tasks.Task DeleteRecipeOrgPermissionAsync (string owner, string name, RepositoryPolicySubject repositoryPolicySubject, CancellationToken cancellationToken = default(CancellationToken)) - { - await DeleteRecipeOrgPermissionWithHttpInfoAsync(owner, name, repositoryPolicySubject, cancellationToken); - - } - - /// - /// Remove a Repository permissions Delete a recipe's access policy (must have `admin` permission) - /// - /// Thrown when fails to make API call - /// - /// - /// - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse - public async System.Threading.Tasks.Task> DeleteRecipeOrgPermissionWithHttpInfoAsync (string owner, string name, RepositoryPolicySubject repositoryPolicySubject, CancellationToken cancellationToken = default(CancellationToken)) - { - // verify the required parameter 'owner' is set - if (owner == null) - throw new ApiException(400, "Missing required parameter 'owner' when calling RecipesApi->DeleteRecipeOrgPermission"); - // verify the required parameter 'name' is set - if (name == null) - throw new ApiException(400, "Missing required parameter 'name' when calling RecipesApi->DeleteRecipeOrgPermission"); - // verify the required parameter 'repositoryPolicySubject' is set - if (repositoryPolicySubject == null) - throw new ApiException(400, "Missing required parameter 'repositoryPolicySubject' when calling RecipesApi->DeleteRecipeOrgPermission"); - - var localVarPath = "/recipes/{owner}/{name}/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 (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 (repositoryPolicySubject != null && repositoryPolicySubject.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(repositoryPolicySubject); // http body (model) parameter - } - else - { - localVarPostBody = repositoryPolicySubject; // 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("DeleteRecipeOrgPermission", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); - } - - /// - /// Get a recipe Retrieve a recipe by name - /// - /// Thrown when fails to make API call - /// - /// - /// Repository - public Repository GetRecipe (string owner, string name) - { - ApiResponse localVarResponse = GetRecipeWithHttpInfo(owner, name); - return localVarResponse.Data; - } - - /// - /// Get a recipe Retrieve a recipe by name - /// - /// Thrown when fails to make API call - /// - /// - /// ApiResponse of Repository - public ApiResponse GetRecipeWithHttpInfo (string owner, string name) - { - // verify the required parameter 'owner' is set - if (owner == null) - throw new ApiException(400, "Missing required parameter 'owner' when calling RecipesApi->GetRecipe"); - // verify the required parameter 'name' is set - if (name == null) - throw new ApiException(400, "Missing required parameter 'name' when calling RecipesApi->GetRecipe"); - - var localVarPath = "/recipes/{owner}/{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 (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 - - // 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("GetRecipe", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (Repository) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Repository))); - } - - /// - /// Get a recipe Retrieve a recipe by name - /// - /// Thrown when fails to make API call - /// - /// - /// Cancellation Token to cancel request (optional) - /// Task of Repository - public async System.Threading.Tasks.Task GetRecipeAsync (string owner, string name, CancellationToken cancellationToken = default(CancellationToken)) - { - ApiResponse localVarResponse = await GetRecipeWithHttpInfoAsync(owner, name, cancellationToken); - return localVarResponse.Data; - - } - - /// - /// Get a recipe Retrieve a recipe by name - /// - /// Thrown when fails to make API call - /// - /// - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (Repository) - public async System.Threading.Tasks.Task> GetRecipeWithHttpInfoAsync (string owner, string name, CancellationToken cancellationToken = default(CancellationToken)) - { - // verify the required parameter 'owner' is set - if (owner == null) - throw new ApiException(400, "Missing required parameter 'owner' when calling RecipesApi->GetRecipe"); - // verify the required parameter 'name' is set - if (name == null) - throw new ApiException(400, "Missing required parameter 'name' when calling RecipesApi->GetRecipe"); - - var localVarPath = "/recipes/{owner}/{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 (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 - - // 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("GetRecipe", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (Repository) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Repository))); - } - - /// - /// Get recipe access permissions Retrieve a recipe's access permissions (must have `write` permission) - /// - /// Thrown when fails to make API call - /// - /// - /// Page number starting from 1 (optional, default to 1) - /// Number of items per page (optional, default to 25) - /// The type of access policy subject (optional) - /// An access policy permission string (optional) - /// RepositoryAccessPolicyList - public RepositoryAccessPolicyList GetRecipeAccessPermissions (string owner, string name, int? page = default, int? perPage = default, List subjectType = default, List permission = default) - { - ApiResponse localVarResponse = GetRecipeAccessPermissionsWithHttpInfo(owner, name, page, perPage, subjectType, permission); - return localVarResponse.Data; - } - - /// - /// Get recipe access permissions Retrieve a recipe's access permissions (must have `write` permission) - /// - /// Thrown when fails to make API call - /// - /// - /// Page number starting from 1 (optional, default to 1) - /// Number of items per page (optional, default to 25) - /// The type of access policy subject (optional) - /// An access policy permission string (optional) - /// ApiResponse of RepositoryAccessPolicyList - public ApiResponse GetRecipeAccessPermissionsWithHttpInfo (string owner, string name, int? page = default, int? perPage = default, List subjectType = default, List permission = default) - { - // verify the required parameter 'owner' is set - if (owner == null) - throw new ApiException(400, "Missing required parameter 'owner' when calling RecipesApi->GetRecipeAccessPermissions"); - // verify the required parameter 'name' is set - if (name == null) - throw new ApiException(400, "Missing required parameter 'name' when calling RecipesApi->GetRecipeAccessPermissions"); - - var localVarPath = "/recipes/{owner}/{name}/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[] { - }; - 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 (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 - if (subjectType != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("multi", "subject_type", subjectType)); // query parameter - if (permission != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("multi", "permission", permission)); // 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("GetRecipeAccessPermissions", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (RepositoryAccessPolicyList) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(RepositoryAccessPolicyList))); - } - - /// - /// Get recipe access permissions Retrieve a recipe's access permissions (must have `write` permission) - /// - /// Thrown when fails to make API call - /// - /// - /// Page number starting from 1 (optional, default to 1) - /// Number of items per page (optional, default to 25) - /// The type of access policy subject (optional) - /// An access policy permission string (optional) - /// Cancellation Token to cancel request (optional) - /// Task of RepositoryAccessPolicyList - public async System.Threading.Tasks.Task GetRecipeAccessPermissionsAsync (string owner, string name, int? page = default, int? perPage = default, List subjectType = default, List permission = default, CancellationToken cancellationToken = default(CancellationToken)) - { - ApiResponse localVarResponse = await GetRecipeAccessPermissionsWithHttpInfoAsync(owner, name, page, perPage, subjectType, permission, cancellationToken); - return localVarResponse.Data; - - } - - /// - /// Get recipe access permissions Retrieve a recipe's access permissions (must have `write` permission) - /// - /// Thrown when fails to make API call - /// - /// - /// Page number starting from 1 (optional, default to 1) - /// Number of items per page (optional, default to 25) - /// The type of access policy subject (optional) - /// An access policy permission string (optional) - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (RepositoryAccessPolicyList) - public async System.Threading.Tasks.Task> GetRecipeAccessPermissionsWithHttpInfoAsync (string owner, string name, int? page = default, int? perPage = default, List subjectType = default, List permission = default, CancellationToken cancellationToken = default(CancellationToken)) - { - // verify the required parameter 'owner' is set - if (owner == null) - throw new ApiException(400, "Missing required parameter 'owner' when calling RecipesApi->GetRecipeAccessPermissions"); - // verify the required parameter 'name' is set - if (name == null) - throw new ApiException(400, "Missing required parameter 'name' when calling RecipesApi->GetRecipeAccessPermissions"); - - var localVarPath = "/recipes/{owner}/{name}/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[] { - }; - 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 (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 - if (subjectType != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("multi", "subject_type", subjectType)); // query parameter - if (permission != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("multi", "permission", permission)); // 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("GetRecipeAccessPermissions", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (RepositoryAccessPolicyList) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(RepositoryAccessPolicyList))); - } - - /// - /// Get a recipe tag Retrieve a recipe tag by name and tag - /// - /// Thrown when fails to make API call - /// - /// - /// - /// RecipePackage - public RecipePackage GetRecipeByTag (string owner, string name, string tag) - { - ApiResponse localVarResponse = GetRecipeByTagWithHttpInfo(owner, name, tag); - return localVarResponse.Data; - } - - /// - /// Get a recipe tag Retrieve a recipe tag by name and tag - /// - /// Thrown when fails to make API call - /// - /// - /// - /// ApiResponse of RecipePackage - public ApiResponse GetRecipeByTagWithHttpInfo (string owner, string name, string tag) - { - // verify the required parameter 'owner' is set - if (owner == null) - throw new ApiException(400, "Missing required parameter 'owner' when calling RecipesApi->GetRecipeByTag"); - // verify the required parameter 'name' is set - if (name == null) - throw new ApiException(400, "Missing required parameter 'name' when calling RecipesApi->GetRecipeByTag"); - // verify the required parameter 'tag' is set - if (tag == null) - throw new ApiException(400, "Missing required parameter 'tag' when calling RecipesApi->GetRecipeByTag"); - - var localVarPath = "/recipes/{owner}/{name}/tags/{tag}"; - 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 (tag != null) localVarPathParams.Add("tag", this.Configuration.ApiClient.ParameterToString(tag)); // 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("GetRecipeByTag", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (RecipePackage) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(RecipePackage))); - } - - /// - /// Get a recipe tag Retrieve a recipe tag by name and tag - /// - /// Thrown when fails to make API call - /// - /// - /// - /// Cancellation Token to cancel request (optional) - /// Task of RecipePackage - public async System.Threading.Tasks.Task GetRecipeByTagAsync (string owner, string name, string tag, CancellationToken cancellationToken = default(CancellationToken)) - { - ApiResponse localVarResponse = await GetRecipeByTagWithHttpInfoAsync(owner, name, tag, cancellationToken); - return localVarResponse.Data; - - } - - /// - /// Get a recipe tag Retrieve a recipe tag by name and tag - /// - /// Thrown when fails to make API call - /// - /// - /// - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (RecipePackage) - public async System.Threading.Tasks.Task> GetRecipeByTagWithHttpInfoAsync (string owner, string name, string tag, CancellationToken cancellationToken = default(CancellationToken)) - { - // verify the required parameter 'owner' is set - if (owner == null) - throw new ApiException(400, "Missing required parameter 'owner' when calling RecipesApi->GetRecipeByTag"); - // verify the required parameter 'name' is set - if (name == null) - throw new ApiException(400, "Missing required parameter 'name' when calling RecipesApi->GetRecipeByTag"); - // verify the required parameter 'tag' is set - if (tag == null) - throw new ApiException(400, "Missing required parameter 'tag' when calling RecipesApi->GetRecipeByTag"); - - var localVarPath = "/recipes/{owner}/{name}/tags/{tag}"; - 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 (tag != null) localVarPathParams.Add("tag", this.Configuration.ApiClient.ParameterToString(tag)); // 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("GetRecipeByTag", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (RecipePackage) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(RecipePackage))); - } - - /// - /// Get a recipe tags Retrieve a recipe by name - /// - /// Thrown when fails to make API call - /// - /// - /// Key to sort the list by (optional) - /// The order to sort the list (optional) - /// 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) - { - ApiResponse localVarResponse = ListRecipeTagsWithHttpInfo(owner, name, sortBy, sortOrder, page, perPage); - return localVarResponse.Data; - } - - /// - /// Get a recipe tags Retrieve a recipe by name - /// - /// Thrown when fails to make API call - /// - /// - /// Key to sort the list by (optional) - /// The order to sort the list (optional) - /// 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) - { - // verify the required parameter 'owner' is set - if (owner == null) - throw new ApiException(400, "Missing required parameter 'owner' when calling RecipesApi->ListRecipeTags"); - // verify the required parameter 'name' is set - if (name == null) - throw new ApiException(400, "Missing required parameter 'name' when calling RecipesApi->ListRecipeTags"); - - var localVarPath = "/recipes/{owner}/{name}/tags"; - 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 (sortBy != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "sort_by", sortBy)); // query parameter - if (sortOrder != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "sort_order", sortOrder)); // 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("ListRecipeTags", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (RecipePackageList) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(RecipePackageList))); - } - - /// - /// Get a recipe tags Retrieve a recipe by name - /// - /// Thrown when fails to make API call - /// - /// - /// Key to sort the list by (optional) - /// The order to sort the list (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 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)) - { - ApiResponse localVarResponse = await ListRecipeTagsWithHttpInfoAsync(owner, name, sortBy, sortOrder, page, perPage, cancellationToken); - return localVarResponse.Data; - - } - - /// - /// Get a recipe tags Retrieve a recipe by name - /// - /// Thrown when fails to make API call - /// - /// - /// Key to sort the list by (optional) - /// The order to sort the list (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 (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)) - { - // verify the required parameter 'owner' is set - if (owner == null) - throw new ApiException(400, "Missing required parameter 'owner' when calling RecipesApi->ListRecipeTags"); - // verify the required parameter 'name' is set - if (name == null) - throw new ApiException(400, "Missing required parameter 'name' when calling RecipesApi->ListRecipeTags"); - - var localVarPath = "/recipes/{owner}/{name}/tags"; - 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 (sortBy != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "sort_by", sortBy)); // query parameter - if (sortOrder != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "sort_order", sortOrder)); // 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("ListRecipeTags", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (RecipePackageList) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(RecipePackageList))); - } - - /// - /// List recipes - /// - /// Thrown when fails to make API call - /// You know, for search (optional) - /// The account name (optional) - /// Owner of the project (optional) - /// Boolean check for public/private projects (optional) - /// A keyword to index the repository by (optional) - /// Filter by permission on given resource (optional) - /// Key to sort the list by (optional) - /// The order to sort the list (optional) - /// 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) - { - ApiResponse localVarResponse = ListRecipesWithHttpInfo(search, name, owner, _public, keyword, permission, sortBy, sortOrder, page, perPage); - return localVarResponse.Data; - } - - /// - /// List recipes - /// - /// Thrown when fails to make API call - /// You know, for search (optional) - /// The account name (optional) - /// Owner of the project (optional) - /// Boolean check for public/private projects (optional) - /// A keyword to index the repository by (optional) - /// Filter by permission on given resource (optional) - /// Key to sort the list by (optional) - /// The order to sort the list (optional) - /// 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) - { - - var localVarPath = "/recipes"; - 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 (search != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("multi", "search", search)); // query parameter - if (name != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("multi", "name", name)); // query parameter - if (owner != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("multi", "owner", owner)); // query parameter - if (_public != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "public", _public)); // query parameter - if (keyword != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("multi", "keyword", keyword)); // query parameter - if (permission != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("multi", "permission", permission)); // query parameter - if (sortBy != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "sort_by", sortBy)); // query parameter - if (sortOrder != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "sort_order", sortOrder)); // 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("ListRecipes", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (RepositoryList) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(RepositoryList))); - } - - /// - /// List recipes - /// - /// Thrown when fails to make API call - /// You know, for search (optional) - /// The account name (optional) - /// Owner of the project (optional) - /// Boolean check for public/private projects (optional) - /// A keyword to index the repository by (optional) - /// Filter by permission on given resource (optional) - /// Key to sort the list by (optional) - /// The order to sort the list (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 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)) - { - ApiResponse localVarResponse = await ListRecipesWithHttpInfoAsync(search, name, owner, _public, keyword, permission, sortBy, sortOrder, page, perPage, cancellationToken); - return localVarResponse.Data; - - } - - /// - /// List recipes - /// - /// Thrown when fails to make API call - /// You know, for search (optional) - /// The account name (optional) - /// Owner of the project (optional) - /// Boolean check for public/private projects (optional) - /// A keyword to index the repository by (optional) - /// Filter by permission on given resource (optional) - /// Key to sort the list by (optional) - /// The order to sort the list (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 (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)) - { - - var localVarPath = "/recipes"; - 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 (search != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("multi", "search", search)); // query parameter - if (name != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("multi", "name", name)); // query parameter - if (owner != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("multi", "owner", owner)); // query parameter - if (_public != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "public", _public)); // query parameter - if (keyword != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("multi", "keyword", keyword)); // query parameter - if (permission != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("multi", "permission", permission)); // query parameter - if (sortBy != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "sort_by", sortBy)); // query parameter - if (sortOrder != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "sort_order", sortOrder)); // 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("ListRecipes", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (RepositoryList) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(RepositoryList))); - } - - /// - /// Update a Recipe Update a recipe (must have `contribute` permission) - /// - /// Thrown when fails to make API call - /// - /// - /// - /// UpdateAccepted - public UpdateAccepted UpdateRecipe (string owner, string name, RepositoryUpdate repositoryUpdate) - { - ApiResponse localVarResponse = UpdateRecipeWithHttpInfo(owner, name, repositoryUpdate); - return localVarResponse.Data; - } - - /// - /// Update a Recipe Update a recipe (must have `contribute` permission) - /// - /// Thrown when fails to make API call - /// - /// - /// - /// ApiResponse of UpdateAccepted - public ApiResponse UpdateRecipeWithHttpInfo (string owner, string name, RepositoryUpdate repositoryUpdate) - { - // verify the required parameter 'owner' is set - if (owner == null) - throw new ApiException(400, "Missing required parameter 'owner' when calling RecipesApi->UpdateRecipe"); - // verify the required parameter 'name' is set - if (name == null) - throw new ApiException(400, "Missing required parameter 'name' when calling RecipesApi->UpdateRecipe"); - // verify the required parameter 'repositoryUpdate' is set - if (repositoryUpdate == null) - throw new ApiException(400, "Missing required parameter 'repositoryUpdate' when calling RecipesApi->UpdateRecipe"); - - var localVarPath = "/recipes/{owner}/{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[] { - "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 (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 (repositoryUpdate != null && repositoryUpdate.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(repositoryUpdate); // http body (model) parameter - } - else - { - localVarPostBody = repositoryUpdate; // 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("UpdateRecipe", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (UpdateAccepted) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(UpdateAccepted))); - } - - /// - /// Update a Recipe Update a recipe (must have `contribute` permission) - /// - /// Thrown when fails to make API call - /// - /// - /// - /// Cancellation Token to cancel request (optional) - /// Task of UpdateAccepted - public async System.Threading.Tasks.Task UpdateRecipeAsync (string owner, string name, RepositoryUpdate repositoryUpdate, CancellationToken cancellationToken = default(CancellationToken)) - { - ApiResponse localVarResponse = await UpdateRecipeWithHttpInfoAsync(owner, name, repositoryUpdate, cancellationToken); - return localVarResponse.Data; - - } - - /// - /// Update a Recipe Update a recipe (must have `contribute` permission) - /// - /// Thrown when fails to make API call - /// - /// - /// - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (UpdateAccepted) - public async System.Threading.Tasks.Task> UpdateRecipeWithHttpInfoAsync (string owner, string name, RepositoryUpdate repositoryUpdate, CancellationToken cancellationToken = default(CancellationToken)) - { - // verify the required parameter 'owner' is set - if (owner == null) - throw new ApiException(400, "Missing required parameter 'owner' when calling RecipesApi->UpdateRecipe"); - // verify the required parameter 'name' is set - if (name == null) - throw new ApiException(400, "Missing required parameter 'name' when calling RecipesApi->UpdateRecipe"); - // verify the required parameter 'repositoryUpdate' is set - if (repositoryUpdate == null) - throw new ApiException(400, "Missing required parameter 'repositoryUpdate' when calling RecipesApi->UpdateRecipe"); - - var localVarPath = "/recipes/{owner}/{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[] { - "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 (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 (repositoryUpdate != null && repositoryUpdate.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(repositoryUpdate); // http body (model) parameter - } - else - { - localVarPostBody = repositoryUpdate; // 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("UpdateRecipe", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (UpdateAccepted) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(UpdateAccepted))); - } - - /// - /// Upsert a new permission to a recipe Upsert a recipe's access policy (must have `admin` permission) - /// - /// Thrown when fails to make API call - /// - /// - /// - /// UpdateAccepted - public UpdateAccepted UpsertRecipePermission (string owner, string name, RepositoryAccessPolicy repositoryAccessPolicy) - { - ApiResponse localVarResponse = UpsertRecipePermissionWithHttpInfo(owner, name, repositoryAccessPolicy); - return localVarResponse.Data; - } - - /// - /// Upsert a new permission to a recipe Upsert a recipe's access policy (must have `admin` permission) - /// - /// Thrown when fails to make API call - /// - /// - /// - /// ApiResponse of UpdateAccepted - public ApiResponse UpsertRecipePermissionWithHttpInfo (string owner, string name, RepositoryAccessPolicy repositoryAccessPolicy) - { - // verify the required parameter 'owner' is set - if (owner == null) - throw new ApiException(400, "Missing required parameter 'owner' when calling RecipesApi->UpsertRecipePermission"); - // verify the required parameter 'name' is set - if (name == null) - throw new ApiException(400, "Missing required parameter 'name' when calling RecipesApi->UpsertRecipePermission"); - // verify the required parameter 'repositoryAccessPolicy' is set - if (repositoryAccessPolicy == null) - throw new ApiException(400, "Missing required parameter 'repositoryAccessPolicy' when calling RecipesApi->UpsertRecipePermission"); - - var localVarPath = "/recipes/{owner}/{name}/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 (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 (repositoryAccessPolicy != null && repositoryAccessPolicy.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(repositoryAccessPolicy); // http body (model) parameter - } - else - { - localVarPostBody = repositoryAccessPolicy; // 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("UpsertRecipePermission", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (UpdateAccepted) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(UpdateAccepted))); - } - - /// - /// Upsert a new permission to a recipe Upsert a recipe's access policy (must have `admin` permission) - /// - /// Thrown when fails to make API call - /// - /// - /// - /// Cancellation Token to cancel request (optional) - /// Task of UpdateAccepted - public async System.Threading.Tasks.Task UpsertRecipePermissionAsync (string owner, string name, RepositoryAccessPolicy repositoryAccessPolicy, CancellationToken cancellationToken = default(CancellationToken)) - { - ApiResponse localVarResponse = await UpsertRecipePermissionWithHttpInfoAsync(owner, name, repositoryAccessPolicy, cancellationToken); - return localVarResponse.Data; - - } - - /// - /// Upsert a new permission to a recipe Upsert a recipe's access policy (must have `admin` permission) - /// - /// Thrown when fails to make API call - /// - /// - /// - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (UpdateAccepted) - public async System.Threading.Tasks.Task> UpsertRecipePermissionWithHttpInfoAsync (string owner, string name, RepositoryAccessPolicy repositoryAccessPolicy, CancellationToken cancellationToken = default(CancellationToken)) - { - // verify the required parameter 'owner' is set - if (owner == null) - throw new ApiException(400, "Missing required parameter 'owner' when calling RecipesApi->UpsertRecipePermission"); - // verify the required parameter 'name' is set - if (name == null) - throw new ApiException(400, "Missing required parameter 'name' when calling RecipesApi->UpsertRecipePermission"); - // verify the required parameter 'repositoryAccessPolicy' is set - if (repositoryAccessPolicy == null) - throw new ApiException(400, "Missing required parameter 'repositoryAccessPolicy' when calling RecipesApi->UpsertRecipePermission"); - - var localVarPath = "/recipes/{owner}/{name}/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 (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 (repositoryAccessPolicy != null && repositoryAccessPolicy.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(repositoryAccessPolicy); // http body (model) parameter - } - else - { - localVarPostBody = repositoryAccessPolicy; // 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("UpsertRecipePermission", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (UpdateAccepted) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(UpdateAccepted))); - } - - } -} diff --git a/src/PollinationSDK/Api/RegistriesApi.cs b/src/PollinationSDK/Api/RegistriesApi.cs deleted file mode 100644 index e323137c2..000000000 --- a/src/PollinationSDK/Api/RegistriesApi.cs +++ /dev/null @@ -1,1256 +0,0 @@ -/* - * 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 IRegistriesApi : IApiAccessor - { - #region Synchronous Operations - /// - /// Get Package - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// - /// - /// - /// object - object GetPackage (string owner, string type, string name, string digest); - - /// - /// Get Package - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// - /// - /// - /// ApiResponse of object - ApiResponse GetPackageWithHttpInfo (string owner, string type, string name, string digest); - /// - /// Get Package in JSON format - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// - /// - /// - /// AnyOfRecipePlugin - AnyOf GetPackageJson (string owner, string type, string name, string digest); - - /// - /// Get Package in JSON format - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// - /// - /// - /// ApiResponse of AnyOfRecipePlugin - ApiResponse> GetPackageJsonWithHttpInfo (string owner, string type, string name, string digest); - /// - /// Get Registry Index - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// RepositoryIndex - RepositoryIndex GetRegistryIndex (string owner); - - /// - /// Get Registry Index - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// ApiResponse of RepositoryIndex - ApiResponse GetRegistryIndexWithHttpInfo (string owner); - /// - /// Push a plugin to the registry - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// (optional, default to "Body_post_plugin__owner__plugins_post") - /// (optional) - /// object - object PostPlugin (string owner, string type = default, System.IO.Stream package = default); - - /// - /// Push a plugin to the registry - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// (optional, default to "Body_post_plugin__owner__plugins_post") - /// (optional) - /// ApiResponse of object - ApiResponse PostPluginWithHttpInfo (string owner, string type = default, System.IO.Stream package = default); - /// - /// Push an Recipe to the registry - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// (optional, default to "Body_post_recipe__owner__recipes_post") - /// (optional) - /// object - object PostRecipe (string owner, string type = default, System.IO.Stream package = default); - - /// - /// Push an Recipe to the registry - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// (optional, default to "Body_post_recipe__owner__recipes_post") - /// (optional) - /// ApiResponse of object - ApiResponse PostRecipeWithHttpInfo (string owner, string type = default, System.IO.Stream package = default); - #endregion Synchronous Operations - #region Asynchronous Operations - /// - /// Get Package - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// - /// - /// - /// Cancellation Token to cancel request (optional) - /// Task of object - System.Threading.Tasks.Task GetPackageAsync (string owner, string type, string name, string digest, CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// Get Package - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// - /// - /// - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (object) - System.Threading.Tasks.Task> GetPackageWithHttpInfoAsync (string owner, string type, string name, string digest, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Get Package in JSON format - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// - /// - /// - /// 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)); - - /// - /// Get Package in JSON format - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// - /// - /// - /// 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)); - /// - /// Get Registry Index - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// Cancellation Token to cancel request (optional) - /// Task of RepositoryIndex - System.Threading.Tasks.Task GetRegistryIndexAsync (string owner, CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// Get Registry Index - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (RepositoryIndex) - System.Threading.Tasks.Task> GetRegistryIndexWithHttpInfoAsync (string owner, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Push a plugin to the registry - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// (optional, default to "Body_post_plugin__owner__plugins_post") - /// (optional) - /// Cancellation Token to cancel request (optional) - /// Task of object - System.Threading.Tasks.Task PostPluginAsync (string owner, string type = default, System.IO.Stream package = default, CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// Push a plugin to the registry - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// (optional, default to "Body_post_plugin__owner__plugins_post") - /// (optional) - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (object) - System.Threading.Tasks.Task> PostPluginWithHttpInfoAsync (string owner, string type = default, System.IO.Stream package = default, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Push an Recipe to the registry - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// (optional, default to "Body_post_recipe__owner__recipes_post") - /// (optional) - /// Cancellation Token to cancel request (optional) - /// Task of object - System.Threading.Tasks.Task PostRecipeAsync (string owner, string type = default, System.IO.Stream package = default, CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// Push an Recipe to the registry - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// (optional, default to "Body_post_recipe__owner__recipes_post") - /// (optional) - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (object) - System.Threading.Tasks.Task> PostRecipeWithHttpInfoAsync (string owner, string type = default, System.IO.Stream package = default, CancellationToken cancellationToken = default(CancellationToken)); - #endregion Asynchronous Operations - } - - /// - /// Represents a collection of functions to interact with the API endpoints - /// - public partial class RegistriesApi : IRegistriesApi - { - private PollinationSDK.Client.ExceptionFactory _exceptionFactory = (name, response) => null; - - /// - /// Initializes a new instance of the class. - /// - /// - public RegistriesApi(String basePath) - { - this.Configuration = new PollinationSDK.Client.Configuration { BasePath = basePath }; - - ExceptionFactory = PollinationSDK.Client.Configuration.DefaultExceptionFactory; - } - - /// - /// Initializes a new instance of the class - /// - /// - public RegistriesApi() - { - 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 RegistriesApi(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 Package - /// - /// Thrown when fails to make API call - /// - /// - /// - /// - /// object - public object GetPackage (string owner, string type, string name, string digest) - { - ApiResponse localVarResponse = GetPackageWithHttpInfo(owner, type, name, digest); - return localVarResponse.Data; - } - - /// - /// Get Package - /// - /// Thrown when fails to make API call - /// - /// - /// - /// - /// ApiResponse of object - public ApiResponse GetPackageWithHttpInfo (string owner, string type, string name, string digest) - { - // verify the required parameter 'owner' is set - if (owner == null) - throw new ApiException(400, "Missing required parameter 'owner' when calling RegistriesApi->GetPackage"); - // verify the required parameter 'type' is set - if (type == null) - throw new ApiException(400, "Missing required parameter 'type' when calling RegistriesApi->GetPackage"); - // verify the required parameter 'name' is set - if (name == null) - throw new ApiException(400, "Missing required parameter 'name' when calling RegistriesApi->GetPackage"); - // verify the required parameter 'digest' is set - if (digest == null) - throw new ApiException(400, "Missing required parameter 'digest' when calling RegistriesApi->GetPackage"); - - var localVarPath = "/registries/{owner}/{type}/{name}/{digest}"; - 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", - "application/x-tar" - }; - 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 (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 - - // 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("GetPackage", 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 Package - /// - /// Thrown when fails to make API call - /// - /// - /// - /// - /// Cancellation Token to cancel request (optional) - /// Task of object - public async System.Threading.Tasks.Task GetPackageAsync (string owner, string type, string name, string digest, CancellationToken cancellationToken = default(CancellationToken)) - { - ApiResponse localVarResponse = await GetPackageWithHttpInfoAsync(owner, type, name, digest, cancellationToken); - return localVarResponse.Data; - - } - - /// - /// Get Package - /// - /// Thrown when fails to make API call - /// - /// - /// - /// - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (object) - public async System.Threading.Tasks.Task> GetPackageWithHttpInfoAsync (string owner, string type, string name, string digest, CancellationToken cancellationToken = default(CancellationToken)) - { - // verify the required parameter 'owner' is set - if (owner == null) - throw new ApiException(400, "Missing required parameter 'owner' when calling RegistriesApi->GetPackage"); - // verify the required parameter 'type' is set - if (type == null) - throw new ApiException(400, "Missing required parameter 'type' when calling RegistriesApi->GetPackage"); - // verify the required parameter 'name' is set - if (name == null) - throw new ApiException(400, "Missing required parameter 'name' when calling RegistriesApi->GetPackage"); - // verify the required parameter 'digest' is set - if (digest == null) - throw new ApiException(400, "Missing required parameter 'digest' when calling RegistriesApi->GetPackage"); - - var localVarPath = "/registries/{owner}/{type}/{name}/{digest}"; - 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", - "application/x-tar" - }; - 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 (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 - - // 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("GetPackage", 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 Package in JSON format - /// - /// Thrown when fails to make API call - /// - /// - /// - /// - /// AnyOfRecipePlugin - public AnyOf GetPackageJson (string owner, string type, string name, string digest) - { - ApiResponse> localVarResponse = GetPackageJsonWithHttpInfo(owner, type, name, digest); - return localVarResponse.Data; - } - - /// - /// Get Package in JSON format - /// - /// Thrown when fails to make API call - /// - /// - /// - /// - /// ApiResponse of AnyOfRecipePlugin - public ApiResponse> GetPackageJsonWithHttpInfo (string owner, string type, string name, string digest) - { - // verify the required parameter 'owner' is set - if (owner == null) - throw new ApiException(400, "Missing required parameter 'owner' when calling RegistriesApi->GetPackageJson"); - // verify the required parameter 'type' is set - if (type == null) - throw new ApiException(400, "Missing required parameter 'type' when calling RegistriesApi->GetPackageJson"); - // verify the required parameter 'name' is set - if (name == null) - throw new ApiException(400, "Missing required parameter 'name' when calling RegistriesApi->GetPackageJson"); - // verify the required parameter 'digest' is set - if (digest == null) - throw new ApiException(400, "Missing required parameter 'digest' when calling RegistriesApi->GetPackageJson"); - - var localVarPath = "/registries/{owner}/{type}/{name}/{digest}/json"; - 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 (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 - - // 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("GetPackageJson", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse>(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (AnyOf) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(AnyOf))); - } - - /// - /// Get Package in JSON format - /// - /// Thrown when fails to make API call - /// - /// - /// - /// - /// 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)) - { - ApiResponse> localVarResponse = await GetPackageJsonWithHttpInfoAsync(owner, type, name, digest, cancellationToken); - return localVarResponse.Data; - - } - - /// - /// Get Package in JSON format - /// - /// Thrown when fails to make API call - /// - /// - /// - /// - /// 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)) - { - // verify the required parameter 'owner' is set - if (owner == null) - throw new ApiException(400, "Missing required parameter 'owner' when calling RegistriesApi->GetPackageJson"); - // verify the required parameter 'type' is set - if (type == null) - throw new ApiException(400, "Missing required parameter 'type' when calling RegistriesApi->GetPackageJson"); - // verify the required parameter 'name' is set - if (name == null) - throw new ApiException(400, "Missing required parameter 'name' when calling RegistriesApi->GetPackageJson"); - // verify the required parameter 'digest' is set - if (digest == null) - throw new ApiException(400, "Missing required parameter 'digest' when calling RegistriesApi->GetPackageJson"); - - var localVarPath = "/registries/{owner}/{type}/{name}/{digest}/json"; - 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 (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 - - // 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("GetPackageJson", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse>(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (AnyOf) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(AnyOf))); - } - - /// - /// Get Registry Index - /// - /// Thrown when fails to make API call - /// - /// RepositoryIndex - public RepositoryIndex GetRegistryIndex (string owner) - { - ApiResponse localVarResponse = GetRegistryIndexWithHttpInfo(owner); - return localVarResponse.Data; - } - - /// - /// Get Registry Index - /// - /// Thrown when fails to make API call - /// - /// ApiResponse of RepositoryIndex - public ApiResponse GetRegistryIndexWithHttpInfo (string owner) - { - // verify the required parameter 'owner' is set - if (owner == null) - throw new ApiException(400, "Missing required parameter 'owner' when calling RegistriesApi->GetRegistryIndex"); - - var localVarPath = "/registries/{owner}/index.json"; - 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 - - // 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("GetRegistryIndex", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (RepositoryIndex) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(RepositoryIndex))); - } - - /// - /// Get Registry Index - /// - /// Thrown when fails to make API call - /// - /// Cancellation Token to cancel request (optional) - /// Task of RepositoryIndex - public async System.Threading.Tasks.Task GetRegistryIndexAsync (string owner, CancellationToken cancellationToken = default(CancellationToken)) - { - ApiResponse localVarResponse = await GetRegistryIndexWithHttpInfoAsync(owner, cancellationToken); - return localVarResponse.Data; - - } - - /// - /// Get Registry Index - /// - /// Thrown when fails to make API call - /// - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (RepositoryIndex) - public async System.Threading.Tasks.Task> GetRegistryIndexWithHttpInfoAsync (string owner, CancellationToken cancellationToken = default(CancellationToken)) - { - // verify the required parameter 'owner' is set - if (owner == null) - throw new ApiException(400, "Missing required parameter 'owner' when calling RegistriesApi->GetRegistryIndex"); - - var localVarPath = "/registries/{owner}/index.json"; - 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 - - // 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("GetRegistryIndex", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (RepositoryIndex) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(RepositoryIndex))); - } - - /// - /// Push a plugin to the registry - /// - /// Thrown when fails to make API call - /// - /// (optional, default to "Body_post_plugin__owner__plugins_post") - /// (optional) - /// object - public object PostPlugin (string owner, string type = default, System.IO.Stream package = default) - { - ApiResponse localVarResponse = PostPluginWithHttpInfo(owner, type, package); - return localVarResponse.Data; - } - - /// - /// Push a plugin to the registry - /// - /// Thrown when fails to make API call - /// - /// (optional, default to "Body_post_plugin__owner__plugins_post") - /// (optional) - /// ApiResponse of object - public ApiResponse PostPluginWithHttpInfo (string owner, string type = default, System.IO.Stream package = default) - { - // verify the required parameter 'owner' is set - if (owner == null) - throw new ApiException(400, "Missing required parameter 'owner' when calling RegistriesApi->PostPlugin"); - - var localVarPath = "/registries/{owner}/plugins"; - 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[] { - "multipart/form-data" - }; - 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 (type != null) localVarFormParams.Add("type", this.Configuration.ApiClient.ParameterToString(type)); // form parameter - if (package != null) localVarFileParams.Add("package", this.Configuration.ApiClient.ParameterToFile("package", package)); - - // 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("PostPlugin", 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))); - } - - /// - /// Push a plugin to the registry - /// - /// Thrown when fails to make API call - /// - /// (optional, default to "Body_post_plugin__owner__plugins_post") - /// (optional) - /// Cancellation Token to cancel request (optional) - /// Task of object - public async System.Threading.Tasks.Task PostPluginAsync (string owner, string type = default, System.IO.Stream package = default, CancellationToken cancellationToken = default(CancellationToken)) - { - ApiResponse localVarResponse = await PostPluginWithHttpInfoAsync(owner, type, package, cancellationToken); - return localVarResponse.Data; - - } - - /// - /// Push a plugin to the registry - /// - /// Thrown when fails to make API call - /// - /// (optional, default to "Body_post_plugin__owner__plugins_post") - /// (optional) - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (object) - public async System.Threading.Tasks.Task> PostPluginWithHttpInfoAsync (string owner, string type = default, System.IO.Stream package = default, CancellationToken cancellationToken = default(CancellationToken)) - { - // verify the required parameter 'owner' is set - if (owner == null) - throw new ApiException(400, "Missing required parameter 'owner' when calling RegistriesApi->PostPlugin"); - - var localVarPath = "/registries/{owner}/plugins"; - 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[] { - "multipart/form-data" - }; - 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 (type != null) localVarFormParams.Add("type", this.Configuration.ApiClient.ParameterToString(type)); // form parameter - if (package != null) localVarFileParams.Add("package", this.Configuration.ApiClient.ParameterToFile("package", package)); - - // 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("PostPlugin", 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))); - } - - /// - /// Push an Recipe to the registry - /// - /// Thrown when fails to make API call - /// - /// (optional, default to "Body_post_recipe__owner__recipes_post") - /// (optional) - /// object - public object PostRecipe (string owner, string type = default, System.IO.Stream package = default) - { - ApiResponse localVarResponse = PostRecipeWithHttpInfo(owner, type, package); - return localVarResponse.Data; - } - - /// - /// Push an Recipe to the registry - /// - /// Thrown when fails to make API call - /// - /// (optional, default to "Body_post_recipe__owner__recipes_post") - /// (optional) - /// ApiResponse of object - public ApiResponse PostRecipeWithHttpInfo (string owner, string type = default, System.IO.Stream package = default) - { - // verify the required parameter 'owner' is set - if (owner == null) - throw new ApiException(400, "Missing required parameter 'owner' when calling RegistriesApi->PostRecipe"); - - var localVarPath = "/registries/{owner}/recipes"; - 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[] { - "multipart/form-data" - }; - 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 (type != null) localVarFormParams.Add("type", this.Configuration.ApiClient.ParameterToString(type)); // form parameter - if (package != null) localVarFileParams.Add("package", this.Configuration.ApiClient.ParameterToFile("package", package)); - - // 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("PostRecipe", 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))); - } - - /// - /// Push an Recipe to the registry - /// - /// Thrown when fails to make API call - /// - /// (optional, default to "Body_post_recipe__owner__recipes_post") - /// (optional) - /// Cancellation Token to cancel request (optional) - /// Task of object - public async System.Threading.Tasks.Task PostRecipeAsync (string owner, string type = default, System.IO.Stream package = default, CancellationToken cancellationToken = default(CancellationToken)) - { - ApiResponse localVarResponse = await PostRecipeWithHttpInfoAsync(owner, type, package, cancellationToken); - return localVarResponse.Data; - - } - - /// - /// Push an Recipe to the registry - /// - /// Thrown when fails to make API call - /// - /// (optional, default to "Body_post_recipe__owner__recipes_post") - /// (optional) - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (object) - public async System.Threading.Tasks.Task> PostRecipeWithHttpInfoAsync (string owner, string type = default, System.IO.Stream package = default, CancellationToken cancellationToken = default(CancellationToken)) - { - // verify the required parameter 'owner' is set - if (owner == null) - throw new ApiException(400, "Missing required parameter 'owner' when calling RegistriesApi->PostRecipe"); - - var localVarPath = "/registries/{owner}/recipes"; - 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[] { - "multipart/form-data" - }; - 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 (type != null) localVarFormParams.Add("type", this.Configuration.ApiClient.ParameterToString(type)); // form parameter - if (package != null) localVarFileParams.Add("package", this.Configuration.ApiClient.ParameterToFile("package", package)); - - // 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("PostRecipe", 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/RunsApi.cs b/src/PollinationSDK/Api/RunsApi.cs deleted file mode 100644 index 09f6b2096..000000000 --- a/src/PollinationSDK/Api/RunsApi.cs +++ /dev/null @@ -1,2386 +0,0 @@ -/* - * 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 IRunsApi : IApiAccessor - { - #region Synchronous Operations - /// - /// Cancel a run - /// - /// - /// Stop a run. - /// - /// Thrown when fails to make API call - /// - /// - /// - /// object - object CancelRun (string owner, string name, string runId); - - /// - /// Cancel a run - /// - /// - /// Stop a run. - /// - /// Thrown when fails to make API call - /// - /// - /// - /// ApiResponse of object - ApiResponse CancelRunWithHttpInfo (string owner, string name, string runId); - /// - /// Download an artifact from the run folder - /// - /// - /// Get a download link for an artifact in a run folder - /// - /// Thrown when fails to make API call - /// - /// - /// - /// The path to an file within a project folder (optional) - /// object - object DownloadRunArtifact (string owner, string name, string runId, string path = default); - - /// - /// Download an artifact from the run folder - /// - /// - /// Get a download link for an artifact in a run folder - /// - /// Thrown when fails to make API call - /// - /// - /// - /// The path to an file within a project folder (optional) - /// ApiResponse of object - ApiResponse DownloadRunArtifactWithHttpInfo (string owner, string name, string runId, string path = default); - /// - /// Get a Run - /// - /// - /// Retrieve a run. - /// - /// Thrown when fails to make API call - /// - /// - /// - /// Run - Run GetRun (string owner, string name, string runId); - - /// - /// Get a Run - /// - /// - /// Retrieve a run. - /// - /// Thrown when fails to make API call - /// - /// - /// - /// ApiResponse of Run - ApiResponse GetRunWithHttpInfo (string owner, string name, string runId); - /// - /// Get run output by name - /// - /// - /// get run output by name - /// - /// Thrown when fails to make API call - /// - /// - /// - /// - /// object - object GetRunOutput (string owner, string name, string runId, string outputName); - - /// - /// Get run output by name - /// - /// - /// get run output by name - /// - /// Thrown when fails to make API call - /// - /// - /// - /// - /// ApiResponse of object - ApiResponse GetRunOutputWithHttpInfo (string owner, string name, string runId, string outputName); - /// - /// Get the logs of a specific step of the run - /// - /// - /// get run step logs - /// - /// Thrown when fails to make API call - /// - /// - /// - /// - /// string - string GetRunStepLogs (string owner, string name, string runId, string stepId); - - /// - /// Get the logs of a specific step of the run - /// - /// - /// get run step logs - /// - /// Thrown when fails to make API call - /// - /// - /// - /// - /// ApiResponse of string - ApiResponse GetRunStepLogsWithHttpInfo (string owner, string name, string runId, string stepId); - /// - /// Query the steps of a run - /// - /// - /// list run steps - /// - /// Thrown when fails to make API call - /// - /// - /// - /// (optional) - /// (optional) - /// (optional) - /// (optional) - /// Page number starting from 1 (optional, default to 1) - /// Number of items per page (optional, default to 25) - /// StepList - StepList GetRunSteps (string owner, string name, string runId, StepStatusEnum? status = default, List stepId = default, string untilGeneration = default, string sinceGeneration = default, int? page = default, int? perPage = default); - - /// - /// Query the steps of a run - /// - /// - /// list run steps - /// - /// Thrown when fails to make API call - /// - /// - /// - /// (optional) - /// (optional) - /// (optional) - /// (optional) - /// Page number starting from 1 (optional, default to 1) - /// Number of items per page (optional, default to 25) - /// ApiResponse of StepList - ApiResponse GetRunStepsWithHttpInfo (string owner, string name, string runId, StepStatusEnum? status = default, List stepId = default, string untilGeneration = default, string sinceGeneration = default, int? page = default, int? perPage = default); - /// - /// List artifacts in a run folder - /// - /// - /// Retrieve a list of artifacts in a run folder - /// - /// Thrown when fails to make API call - /// - /// - /// - /// The path to an file within a project folder (optional) - /// Page number starting from 1 (optional, default to 1) - /// Number of items per page (optional, default to 25) - /// List<FileMeta> - List ListRunArtifacts (string owner, string name, string runId, List path = default, int? page = default, int? perPage = default); - - /// - /// List artifacts in a run folder - /// - /// - /// Retrieve a list of artifacts in a run folder - /// - /// Thrown when fails to make API call - /// - /// - /// - /// The path to an file within a project folder (optional) - /// Page number starting from 1 (optional, default to 1) - /// Number of items per page (optional, default to 25) - /// ApiResponse of List<FileMeta> - ApiResponse> ListRunArtifactsWithHttpInfo (string owner, string name, string runId, List path = default, int? page = default, int? perPage = default); - /// - /// List runs - /// - /// - /// Retrieve a list of runs. - /// - /// Thrown when fails to make API call - /// - /// - /// (optional) - /// (optional) - /// Page number starting from 1 (optional, default to 1) - /// Number of items per page (optional, default to 25) - /// RunList - RunList ListRuns (string owner, string name, List jobId = default, RunStatusEnum? status = default, int? page = default, int? perPage = default); - - /// - /// List runs - /// - /// - /// Retrieve a list of runs. - /// - /// Thrown when fails to make API call - /// - /// - /// (optional) - /// (optional) - /// Page number starting from 1 (optional, default to 1) - /// Number of items per page (optional, default to 25) - /// ApiResponse of RunList - ApiResponse ListRunsWithHttpInfo (string owner, string name, List jobId = default, RunStatusEnum? status = default, int? page = default, int? perPage = default); - /// - /// Query run results - /// - /// - /// Retrieve a list of run results. - /// - /// Thrown when fails to make API call - /// - /// - /// (optional) - /// (optional) - /// Page number starting from 1 (optional, default to 1) - /// Number of items per page (optional, default to 25) - /// RunResultList - RunResultList QueryResults (string owner, string name, List jobId = default, RunStatusEnum? status = default, int? page = default, int? perPage = default); - - /// - /// Query run results - /// - /// - /// Retrieve a list of run results. - /// - /// Thrown when fails to make API call - /// - /// - /// (optional) - /// (optional) - /// Page number starting from 1 (optional, default to 1) - /// Number of items per page (optional, default to 25) - /// ApiResponse of RunResultList - ApiResponse QueryResultsWithHttpInfo (string owner, string name, List jobId = default, RunStatusEnum? status = default, int? page = default, int? perPage = default); - #endregion Synchronous Operations - #region Asynchronous Operations - /// - /// Cancel a run - /// - /// - /// Stop a run. - /// - /// Thrown when fails to make API call - /// - /// - /// - /// Cancellation Token to cancel request (optional) - /// Task of object - System.Threading.Tasks.Task CancelRunAsync (string owner, string name, string runId, CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// Cancel a run - /// - /// - /// Stop a run. - /// - /// Thrown when fails to make API call - /// - /// - /// - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (object) - System.Threading.Tasks.Task> CancelRunWithHttpInfoAsync (string owner, string name, string runId, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Download an artifact from the run folder - /// - /// - /// Get a download link for an artifact in a run folder - /// - /// Thrown when fails to make API call - /// - /// - /// - /// The path to an file within a project folder (optional) - /// Cancellation Token to cancel request (optional) - /// Task of object - System.Threading.Tasks.Task DownloadRunArtifactAsync (string owner, string name, string runId, string path = default, CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// Download an artifact from the run folder - /// - /// - /// Get a download link for an artifact in a run folder - /// - /// Thrown when fails to make API call - /// - /// - /// - /// The path to an file within a project folder (optional) - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (object) - System.Threading.Tasks.Task> DownloadRunArtifactWithHttpInfoAsync (string owner, string name, string runId, string path = default, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Get a Run - /// - /// - /// Retrieve a run. - /// - /// Thrown when fails to make API call - /// - /// - /// - /// Cancellation Token to cancel request (optional) - /// Task of Run - System.Threading.Tasks.Task GetRunAsync (string owner, string name, string runId, CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// Get a Run - /// - /// - /// Retrieve a run. - /// - /// Thrown when fails to make API call - /// - /// - /// - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (Run) - System.Threading.Tasks.Task> GetRunWithHttpInfoAsync (string owner, string name, string runId, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Get run output by name - /// - /// - /// get run output by name - /// - /// Thrown when fails to make API call - /// - /// - /// - /// - /// Cancellation Token to cancel request (optional) - /// Task of object - System.Threading.Tasks.Task GetRunOutputAsync (string owner, string name, string runId, string outputName, CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// Get run output by name - /// - /// - /// get run output by name - /// - /// Thrown when fails to make API call - /// - /// - /// - /// - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (object) - System.Threading.Tasks.Task> GetRunOutputWithHttpInfoAsync (string owner, string name, string runId, string outputName, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Get the logs of a specific step of the run - /// - /// - /// get run step logs - /// - /// Thrown when fails to make API call - /// - /// - /// - /// - /// Cancellation Token to cancel request (optional) - /// Task of string - System.Threading.Tasks.Task GetRunStepLogsAsync (string owner, string name, string runId, string stepId, CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// Get the logs of a specific step of the run - /// - /// - /// get run step logs - /// - /// Thrown when fails to make API call - /// - /// - /// - /// - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (string) - System.Threading.Tasks.Task> GetRunStepLogsWithHttpInfoAsync (string owner, string name, string runId, string stepId, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Query the steps of a run - /// - /// - /// list run steps - /// - /// Thrown when fails to make API call - /// - /// - /// - /// (optional) - /// (optional) - /// (optional) - /// (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 StepList - System.Threading.Tasks.Task GetRunStepsAsync (string owner, string name, string runId, StepStatusEnum? status = default, List stepId = default, string untilGeneration = default, string sinceGeneration = default, int? page = default, int? perPage = default, CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// Query the steps of a run - /// - /// - /// list run steps - /// - /// Thrown when fails to make API call - /// - /// - /// - /// (optional) - /// (optional) - /// (optional) - /// (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 (StepList) - System.Threading.Tasks.Task> GetRunStepsWithHttpInfoAsync (string owner, string name, string runId, StepStatusEnum? status = default, List stepId = default, string untilGeneration = default, string sinceGeneration = default, int? page = default, int? perPage = default, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// List artifacts in a run folder - /// - /// - /// Retrieve a list of artifacts in a run folder - /// - /// Thrown when fails to make API call - /// - /// - /// - /// The path to an file within a project folder (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 List<FileMeta> - System.Threading.Tasks.Task> ListRunArtifactsAsync (string owner, string name, string runId, List path = default, int? page = default, int? perPage = default, CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// List artifacts in a run folder - /// - /// - /// Retrieve a list of artifacts in a run folder - /// - /// Thrown when fails to make API call - /// - /// - /// - /// The path to an file within a project folder (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 (List<FileMeta>) - System.Threading.Tasks.Task>> ListRunArtifactsWithHttpInfoAsync (string owner, string name, string runId, List path = default, int? page = default, int? perPage = default, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// List runs - /// - /// - /// Retrieve a list of runs. - /// - /// Thrown when fails to make API call - /// - /// - /// (optional) - /// (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 RunList - System.Threading.Tasks.Task ListRunsAsync (string owner, string name, List jobId = default, RunStatusEnum? status = default, int? page = default, int? perPage = default, CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// List runs - /// - /// - /// Retrieve a list of runs. - /// - /// Thrown when fails to make API call - /// - /// - /// (optional) - /// (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 (RunList) - System.Threading.Tasks.Task> ListRunsWithHttpInfoAsync (string owner, string name, List jobId = default, RunStatusEnum? status = default, int? page = default, int? perPage = default, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Query run results - /// - /// - /// Retrieve a list of run results. - /// - /// Thrown when fails to make API call - /// - /// - /// (optional) - /// (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 RunResultList - System.Threading.Tasks.Task QueryResultsAsync (string owner, string name, List jobId = default, RunStatusEnum? status = default, int? page = default, int? perPage = default, CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// Query run results - /// - /// - /// Retrieve a list of run results. - /// - /// Thrown when fails to make API call - /// - /// - /// (optional) - /// (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 (RunResultList) - System.Threading.Tasks.Task> QueryResultsWithHttpInfoAsync (string owner, string name, List jobId = default, RunStatusEnum? status = default, int? page = default, int? perPage = default, CancellationToken cancellationToken = default(CancellationToken)); - #endregion Asynchronous Operations - } - - /// - /// Represents a collection of functions to interact with the API endpoints - /// - public partial class RunsApi : IRunsApi - { - private PollinationSDK.Client.ExceptionFactory _exceptionFactory = (name, response) => null; - - /// - /// Initializes a new instance of the class. - /// - /// - public RunsApi(String basePath) - { - this.Configuration = new PollinationSDK.Client.Configuration { BasePath = basePath }; - - ExceptionFactory = PollinationSDK.Client.Configuration.DefaultExceptionFactory; - } - - /// - /// Initializes a new instance of the class - /// - /// - public RunsApi() - { - 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 RunsApi(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 a run Stop a run. - /// - /// Thrown when fails to make API call - /// - /// - /// - /// object - public object CancelRun (string owner, string name, string runId) - { - ApiResponse localVarResponse = CancelRunWithHttpInfo(owner, name, runId); - return localVarResponse.Data; - } - - /// - /// Cancel a run Stop a run. - /// - /// Thrown when fails to make API call - /// - /// - /// - /// ApiResponse of object - public ApiResponse CancelRunWithHttpInfo (string owner, string name, string runId) - { - // verify the required parameter 'owner' is set - if (owner == null) - throw new ApiException(400, "Missing required parameter 'owner' when calling RunsApi->CancelRun"); - // verify the required parameter 'name' is set - if (name == null) - throw new ApiException(400, "Missing required parameter 'name' when calling RunsApi->CancelRun"); - // verify the required parameter 'runId' is set - if (runId == null) - throw new ApiException(400, "Missing required parameter 'runId' when calling RunsApi->CancelRun"); - - var localVarPath = "/projects/{owner}/{name}/runs/{run_id}/cancel"; - 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 (runId != null) localVarPathParams.Add("run_id", this.Configuration.ApiClient.ParameterToString(runId)); // 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.PUT, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("CancelRun", 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 a run Stop a run. - /// - /// Thrown when fails to make API call - /// - /// - /// - /// Cancellation Token to cancel request (optional) - /// Task of object - public async System.Threading.Tasks.Task CancelRunAsync (string owner, string name, string runId, CancellationToken cancellationToken = default(CancellationToken)) - { - ApiResponse localVarResponse = await CancelRunWithHttpInfoAsync(owner, name, runId, cancellationToken); - return localVarResponse.Data; - - } - - /// - /// Cancel a run Stop a run. - /// - /// Thrown when fails to make API call - /// - /// - /// - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (object) - public async System.Threading.Tasks.Task> CancelRunWithHttpInfoAsync (string owner, string name, string runId, CancellationToken cancellationToken = default(CancellationToken)) - { - // verify the required parameter 'owner' is set - if (owner == null) - throw new ApiException(400, "Missing required parameter 'owner' when calling RunsApi->CancelRun"); - // verify the required parameter 'name' is set - if (name == null) - throw new ApiException(400, "Missing required parameter 'name' when calling RunsApi->CancelRun"); - // verify the required parameter 'runId' is set - if (runId == null) - throw new ApiException(400, "Missing required parameter 'runId' when calling RunsApi->CancelRun"); - - var localVarPath = "/projects/{owner}/{name}/runs/{run_id}/cancel"; - 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 (runId != null) localVarPathParams.Add("run_id", this.Configuration.ApiClient.ParameterToString(runId)); // 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.PUT, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType, cancellationToken); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("CancelRun", 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 run folder Get a download link for an artifact in a run folder - /// - /// Thrown when fails to make API call - /// - /// - /// - /// The path to an file within a project folder (optional) - /// object - public object DownloadRunArtifact (string owner, string name, string runId, string path = default) - { - ApiResponse localVarResponse = DownloadRunArtifactWithHttpInfo(owner, name, runId, path); - return localVarResponse.Data; - } - - /// - /// Download an artifact from the run folder Get a download link for an artifact in a run folder - /// - /// Thrown when fails to make API call - /// - /// - /// - /// The path to an file within a project folder (optional) - /// ApiResponse of object - public ApiResponse DownloadRunArtifactWithHttpInfo (string owner, string name, string runId, string path = default) - { - // verify the required parameter 'owner' is set - if (owner == null) - throw new ApiException(400, "Missing required parameter 'owner' when calling RunsApi->DownloadRunArtifact"); - // verify the required parameter 'name' is set - if (name == null) - throw new ApiException(400, "Missing required parameter 'name' when calling RunsApi->DownloadRunArtifact"); - // verify the required parameter 'runId' is set - if (runId == null) - throw new ApiException(400, "Missing required parameter 'runId' when calling RunsApi->DownloadRunArtifact"); - - var localVarPath = "/projects/{owner}/{name}/runs/{run_id}/artifacts/download"; - 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 (runId != null) localVarPathParams.Add("run_id", this.Configuration.ApiClient.ParameterToString(runId)); // path parameter - if (path != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "path", path)); // 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("DownloadRunArtifact", 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 run folder Get a download link for an artifact in a run folder - /// - /// Thrown when fails to make API call - /// - /// - /// - /// The path to an file within a project folder (optional) - /// Cancellation Token to cancel request (optional) - /// Task of object - public async System.Threading.Tasks.Task DownloadRunArtifactAsync (string owner, string name, string runId, string path = default, CancellationToken cancellationToken = default(CancellationToken)) - { - ApiResponse localVarResponse = await DownloadRunArtifactWithHttpInfoAsync(owner, name, runId, path, cancellationToken); - return localVarResponse.Data; - - } - - /// - /// Download an artifact from the run folder Get a download link for an artifact in a run folder - /// - /// Thrown when fails to make API call - /// - /// - /// - /// The path to an file within a project folder (optional) - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (object) - public async System.Threading.Tasks.Task> DownloadRunArtifactWithHttpInfoAsync (string owner, string name, string runId, string path = default, CancellationToken cancellationToken = default(CancellationToken)) - { - // verify the required parameter 'owner' is set - if (owner == null) - throw new ApiException(400, "Missing required parameter 'owner' when calling RunsApi->DownloadRunArtifact"); - // verify the required parameter 'name' is set - if (name == null) - throw new ApiException(400, "Missing required parameter 'name' when calling RunsApi->DownloadRunArtifact"); - // verify the required parameter 'runId' is set - if (runId == null) - throw new ApiException(400, "Missing required parameter 'runId' when calling RunsApi->DownloadRunArtifact"); - - var localVarPath = "/projects/{owner}/{name}/runs/{run_id}/artifacts/download"; - 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 (runId != null) localVarPathParams.Add("run_id", this.Configuration.ApiClient.ParameterToString(runId)); // path parameter - if (path != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "path", path)); // 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("DownloadRunArtifact", 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 a Run Retrieve a run. - /// - /// Thrown when fails to make API call - /// - /// - /// - /// Run - public Run GetRun (string owner, string name, string runId) - { - ApiResponse localVarResponse = GetRunWithHttpInfo(owner, name, runId); - return localVarResponse.Data; - } - - /// - /// Get a Run Retrieve a run. - /// - /// Thrown when fails to make API call - /// - /// - /// - /// ApiResponse of Run - public ApiResponse GetRunWithHttpInfo (string owner, string name, string runId) - { - // verify the required parameter 'owner' is set - if (owner == null) - throw new ApiException(400, "Missing required parameter 'owner' when calling RunsApi->GetRun"); - // verify the required parameter 'name' is set - if (name == null) - throw new ApiException(400, "Missing required parameter 'name' when calling RunsApi->GetRun"); - // verify the required parameter 'runId' is set - if (runId == null) - throw new ApiException(400, "Missing required parameter 'runId' when calling RunsApi->GetRun"); - - var localVarPath = "/projects/{owner}/{name}/runs/{run_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 (runId != null) localVarPathParams.Add("run_id", this.Configuration.ApiClient.ParameterToString(runId)); // 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("GetRun", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (Run) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Run))); - } - - /// - /// Get a Run Retrieve a run. - /// - /// Thrown when fails to make API call - /// - /// - /// - /// Cancellation Token to cancel request (optional) - /// Task of Run - public async System.Threading.Tasks.Task GetRunAsync (string owner, string name, string runId, CancellationToken cancellationToken = default(CancellationToken)) - { - ApiResponse localVarResponse = await GetRunWithHttpInfoAsync(owner, name, runId, cancellationToken); - return localVarResponse.Data; - - } - - /// - /// Get a Run Retrieve a run. - /// - /// Thrown when fails to make API call - /// - /// - /// - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (Run) - public async System.Threading.Tasks.Task> GetRunWithHttpInfoAsync (string owner, string name, string runId, CancellationToken cancellationToken = default(CancellationToken)) - { - // verify the required parameter 'owner' is set - if (owner == null) - throw new ApiException(400, "Missing required parameter 'owner' when calling RunsApi->GetRun"); - // verify the required parameter 'name' is set - if (name == null) - throw new ApiException(400, "Missing required parameter 'name' when calling RunsApi->GetRun"); - // verify the required parameter 'runId' is set - if (runId == null) - throw new ApiException(400, "Missing required parameter 'runId' when calling RunsApi->GetRun"); - - var localVarPath = "/projects/{owner}/{name}/runs/{run_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 (runId != null) localVarPathParams.Add("run_id", this.Configuration.ApiClient.ParameterToString(runId)); // 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("GetRun", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (Run) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Run))); - } - - /// - /// Get run output by name get run output by name - /// - /// Thrown when fails to make API call - /// - /// - /// - /// - /// object - public object GetRunOutput (string owner, string name, string runId, string outputName) - { - ApiResponse localVarResponse = GetRunOutputWithHttpInfo(owner, name, runId, outputName); - return localVarResponse.Data; - } - - /// - /// Get run output by name get run output by name - /// - /// Thrown when fails to make API call - /// - /// - /// - /// - /// ApiResponse of object - public ApiResponse GetRunOutputWithHttpInfo (string owner, string name, string runId, string outputName) - { - // verify the required parameter 'owner' is set - if (owner == null) - throw new ApiException(400, "Missing required parameter 'owner' when calling RunsApi->GetRunOutput"); - // verify the required parameter 'name' is set - if (name == null) - throw new ApiException(400, "Missing required parameter 'name' when calling RunsApi->GetRunOutput"); - // verify the required parameter 'runId' is set - if (runId == null) - throw new ApiException(400, "Missing required parameter 'runId' when calling RunsApi->GetRunOutput"); - // verify the required parameter 'outputName' is set - if (outputName == null) - throw new ApiException(400, "Missing required parameter 'outputName' when calling RunsApi->GetRunOutput"); - - var localVarPath = "/projects/{owner}/{name}/runs/{run_id}/outputs/{output_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 (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 (runId != null) localVarPathParams.Add("run_id", this.Configuration.ApiClient.ParameterToString(runId)); // path parameter - if (outputName != null) localVarPathParams.Add("output_name", this.Configuration.ApiClient.ParameterToString(outputName)); // 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("GetRunOutput", 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 run output by name get run output by name - /// - /// Thrown when fails to make API call - /// - /// - /// - /// - /// Cancellation Token to cancel request (optional) - /// Task of object - public async System.Threading.Tasks.Task GetRunOutputAsync (string owner, string name, string runId, string outputName, CancellationToken cancellationToken = default(CancellationToken)) - { - ApiResponse localVarResponse = await GetRunOutputWithHttpInfoAsync(owner, name, runId, outputName, cancellationToken); - return localVarResponse.Data; - - } - - /// - /// Get run output by name get run output by name - /// - /// Thrown when fails to make API call - /// - /// - /// - /// - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (object) - public async System.Threading.Tasks.Task> GetRunOutputWithHttpInfoAsync (string owner, string name, string runId, string outputName, CancellationToken cancellationToken = default(CancellationToken)) - { - // verify the required parameter 'owner' is set - if (owner == null) - throw new ApiException(400, "Missing required parameter 'owner' when calling RunsApi->GetRunOutput"); - // verify the required parameter 'name' is set - if (name == null) - throw new ApiException(400, "Missing required parameter 'name' when calling RunsApi->GetRunOutput"); - // verify the required parameter 'runId' is set - if (runId == null) - throw new ApiException(400, "Missing required parameter 'runId' when calling RunsApi->GetRunOutput"); - // verify the required parameter 'outputName' is set - if (outputName == null) - throw new ApiException(400, "Missing required parameter 'outputName' when calling RunsApi->GetRunOutput"); - - var localVarPath = "/projects/{owner}/{name}/runs/{run_id}/outputs/{output_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 (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 (runId != null) localVarPathParams.Add("run_id", this.Configuration.ApiClient.ParameterToString(runId)); // path parameter - if (outputName != null) localVarPathParams.Add("output_name", this.Configuration.ApiClient.ParameterToString(outputName)); // 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("GetRunOutput", 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 the logs of a specific step of the run get run step logs - /// - /// Thrown when fails to make API call - /// - /// - /// - /// - /// string - public string GetRunStepLogs (string owner, string name, string runId, string stepId) - { - ApiResponse localVarResponse = GetRunStepLogsWithHttpInfo(owner, name, runId, stepId); - return localVarResponse.Data; - } - - /// - /// Get the logs of a specific step of the run get run step logs - /// - /// Thrown when fails to make API call - /// - /// - /// - /// - /// ApiResponse of string - public ApiResponse GetRunStepLogsWithHttpInfo (string owner, string name, string runId, string stepId) - { - // verify the required parameter 'owner' is set - if (owner == null) - throw new ApiException(400, "Missing required parameter 'owner' when calling RunsApi->GetRunStepLogs"); - // verify the required parameter 'name' is set - if (name == null) - throw new ApiException(400, "Missing required parameter 'name' when calling RunsApi->GetRunStepLogs"); - // verify the required parameter 'runId' is set - if (runId == null) - throw new ApiException(400, "Missing required parameter 'runId' when calling RunsApi->GetRunStepLogs"); - // verify the required parameter 'stepId' is set - if (stepId == null) - throw new ApiException(400, "Missing required parameter 'stepId' when calling RunsApi->GetRunStepLogs"); - - var localVarPath = "/projects/{owner}/{name}/runs/{run_id}/steps/{step_id}/logs"; - 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 (runId != null) localVarPathParams.Add("run_id", this.Configuration.ApiClient.ParameterToString(runId)); // path parameter - if (stepId != null) localVarPathParams.Add("step_id", this.Configuration.ApiClient.ParameterToString(stepId)); // 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("GetRunStepLogs", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (string) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(string))); - } - - /// - /// Get the logs of a specific step of the run get run step logs - /// - /// Thrown when fails to make API call - /// - /// - /// - /// - /// Cancellation Token to cancel request (optional) - /// Task of string - public async System.Threading.Tasks.Task GetRunStepLogsAsync (string owner, string name, string runId, string stepId, CancellationToken cancellationToken = default(CancellationToken)) - { - ApiResponse localVarResponse = await GetRunStepLogsWithHttpInfoAsync(owner, name, runId, stepId, cancellationToken); - return localVarResponse.Data; - - } - - /// - /// Get the logs of a specific step of the run get run step logs - /// - /// Thrown when fails to make API call - /// - /// - /// - /// - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (string) - public async System.Threading.Tasks.Task> GetRunStepLogsWithHttpInfoAsync (string owner, string name, string runId, string stepId, CancellationToken cancellationToken = default(CancellationToken)) - { - // verify the required parameter 'owner' is set - if (owner == null) - throw new ApiException(400, "Missing required parameter 'owner' when calling RunsApi->GetRunStepLogs"); - // verify the required parameter 'name' is set - if (name == null) - throw new ApiException(400, "Missing required parameter 'name' when calling RunsApi->GetRunStepLogs"); - // verify the required parameter 'runId' is set - if (runId == null) - throw new ApiException(400, "Missing required parameter 'runId' when calling RunsApi->GetRunStepLogs"); - // verify the required parameter 'stepId' is set - if (stepId == null) - throw new ApiException(400, "Missing required parameter 'stepId' when calling RunsApi->GetRunStepLogs"); - - var localVarPath = "/projects/{owner}/{name}/runs/{run_id}/steps/{step_id}/logs"; - 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 (runId != null) localVarPathParams.Add("run_id", this.Configuration.ApiClient.ParameterToString(runId)); // path parameter - if (stepId != null) localVarPathParams.Add("step_id", this.Configuration.ApiClient.ParameterToString(stepId)); // 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("GetRunStepLogs", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (string) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(string))); - } - - /// - /// Query the steps of a run list run steps - /// - /// Thrown when fails to make API call - /// - /// - /// - /// (optional) - /// (optional) - /// (optional) - /// (optional) - /// Page number starting from 1 (optional, default to 1) - /// Number of items per page (optional, default to 25) - /// StepList - public StepList GetRunSteps (string owner, string name, string runId, StepStatusEnum? status = default, List stepId = default, string untilGeneration = default, string sinceGeneration = default, int? page = default, int? perPage = default) - { - ApiResponse localVarResponse = GetRunStepsWithHttpInfo(owner, name, runId, status, stepId, untilGeneration, sinceGeneration, page, perPage); - return localVarResponse.Data; - } - - /// - /// Query the steps of a run list run steps - /// - /// Thrown when fails to make API call - /// - /// - /// - /// (optional) - /// (optional) - /// (optional) - /// (optional) - /// Page number starting from 1 (optional, default to 1) - /// Number of items per page (optional, default to 25) - /// ApiResponse of StepList - public ApiResponse GetRunStepsWithHttpInfo (string owner, string name, string runId, StepStatusEnum? status = default, List stepId = default, string untilGeneration = default, string sinceGeneration = default, int? page = default, int? perPage = default) - { - // verify the required parameter 'owner' is set - if (owner == null) - throw new ApiException(400, "Missing required parameter 'owner' when calling RunsApi->GetRunSteps"); - // verify the required parameter 'name' is set - if (name == null) - throw new ApiException(400, "Missing required parameter 'name' when calling RunsApi->GetRunSteps"); - // verify the required parameter 'runId' is set - if (runId == null) - throw new ApiException(400, "Missing required parameter 'runId' when calling RunsApi->GetRunSteps"); - - var localVarPath = "/projects/{owner}/{name}/runs/{run_id}/steps"; - 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 (runId != null) localVarPathParams.Add("run_id", this.Configuration.ApiClient.ParameterToString(runId)); // path parameter - if (status != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "status", status)); // query parameter - if (stepId != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("multi", "step_id", stepId)); // query parameter - if (untilGeneration != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "until_generation", untilGeneration)); // query parameter - if (sinceGeneration != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "since_generation", sinceGeneration)); // 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("GetRunSteps", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (StepList) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(StepList))); - } - - /// - /// Query the steps of a run list run steps - /// - /// Thrown when fails to make API call - /// - /// - /// - /// (optional) - /// (optional) - /// (optional) - /// (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 StepList - public async System.Threading.Tasks.Task GetRunStepsAsync (string owner, string name, string runId, StepStatusEnum? status = default, List stepId = default, string untilGeneration = default, string sinceGeneration = default, int? page = default, int? perPage = default, CancellationToken cancellationToken = default(CancellationToken)) - { - ApiResponse localVarResponse = await GetRunStepsWithHttpInfoAsync(owner, name, runId, status, stepId, untilGeneration, sinceGeneration, page, perPage, cancellationToken); - return localVarResponse.Data; - - } - - /// - /// Query the steps of a run list run steps - /// - /// Thrown when fails to make API call - /// - /// - /// - /// (optional) - /// (optional) - /// (optional) - /// (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 (StepList) - public async System.Threading.Tasks.Task> GetRunStepsWithHttpInfoAsync (string owner, string name, string runId, StepStatusEnum? status = default, List stepId = default, string untilGeneration = default, string sinceGeneration = default, int? page = default, int? perPage = default, CancellationToken cancellationToken = default(CancellationToken)) - { - // verify the required parameter 'owner' is set - if (owner == null) - throw new ApiException(400, "Missing required parameter 'owner' when calling RunsApi->GetRunSteps"); - // verify the required parameter 'name' is set - if (name == null) - throw new ApiException(400, "Missing required parameter 'name' when calling RunsApi->GetRunSteps"); - // verify the required parameter 'runId' is set - if (runId == null) - throw new ApiException(400, "Missing required parameter 'runId' when calling RunsApi->GetRunSteps"); - - var localVarPath = "/projects/{owner}/{name}/runs/{run_id}/steps"; - 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 (runId != null) localVarPathParams.Add("run_id", this.Configuration.ApiClient.ParameterToString(runId)); // path parameter - if (status != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "status", status)); // query parameter - if (stepId != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("multi", "step_id", stepId)); // query parameter - if (untilGeneration != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "until_generation", untilGeneration)); // query parameter - if (sinceGeneration != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "since_generation", sinceGeneration)); // 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("GetRunSteps", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (StepList) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(StepList))); - } - - /// - /// List artifacts in a run folder Retrieve a list of artifacts in a run folder - /// - /// Thrown when fails to make API call - /// - /// - /// - /// The path to an file within a project folder (optional) - /// Page number starting from 1 (optional, default to 1) - /// Number of items per page (optional, default to 25) - /// List<FileMeta> - public List ListRunArtifacts (string owner, string name, string runId, List path = default, int? page = default, int? perPage = default) - { - ApiResponse> localVarResponse = ListRunArtifactsWithHttpInfo(owner, name, runId, path, page, perPage); - return localVarResponse.Data; - } - - /// - /// List artifacts in a run folder Retrieve a list of artifacts in a run folder - /// - /// Thrown when fails to make API call - /// - /// - /// - /// The path to an file within a project folder (optional) - /// Page number starting from 1 (optional, default to 1) - /// Number of items per page (optional, default to 25) - /// ApiResponse of List<FileMeta> - public ApiResponse> ListRunArtifactsWithHttpInfo (string owner, string name, string runId, List path = default, int? page = default, int? perPage = default) - { - // verify the required parameter 'owner' is set - if (owner == null) - throw new ApiException(400, "Missing required parameter 'owner' when calling RunsApi->ListRunArtifacts"); - // verify the required parameter 'name' is set - if (name == null) - throw new ApiException(400, "Missing required parameter 'name' when calling RunsApi->ListRunArtifacts"); - // verify the required parameter 'runId' is set - if (runId == null) - throw new ApiException(400, "Missing required parameter 'runId' when calling RunsApi->ListRunArtifacts"); - - var localVarPath = "/projects/{owner}/{name}/runs/{run_id}/artifacts"; - 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 (runId != null) localVarPathParams.Add("run_id", this.Configuration.ApiClient.ParameterToString(runId)); // path parameter - if (path != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("multi", "path", path)); // 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("ListRunArtifacts", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse>(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (List) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(List))); - } - - /// - /// List artifacts in a run folder Retrieve a list of artifacts in a run folder - /// - /// Thrown when fails to make API call - /// - /// - /// - /// The path to an file within a project folder (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 List<FileMeta> - public async System.Threading.Tasks.Task> ListRunArtifactsAsync (string owner, string name, string runId, List path = default, int? page = default, int? perPage = default, CancellationToken cancellationToken = default(CancellationToken)) - { - ApiResponse> localVarResponse = await ListRunArtifactsWithHttpInfoAsync(owner, name, runId, path, page, perPage, cancellationToken); - return localVarResponse.Data; - - } - - /// - /// List artifacts in a run folder Retrieve a list of artifacts in a run folder - /// - /// Thrown when fails to make API call - /// - /// - /// - /// The path to an file within a project folder (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 (List<FileMeta>) - public async System.Threading.Tasks.Task>> ListRunArtifactsWithHttpInfoAsync (string owner, string name, string runId, List path = default, int? page = default, int? perPage = default, CancellationToken cancellationToken = default(CancellationToken)) - { - // verify the required parameter 'owner' is set - if (owner == null) - throw new ApiException(400, "Missing required parameter 'owner' when calling RunsApi->ListRunArtifacts"); - // verify the required parameter 'name' is set - if (name == null) - throw new ApiException(400, "Missing required parameter 'name' when calling RunsApi->ListRunArtifacts"); - // verify the required parameter 'runId' is set - if (runId == null) - throw new ApiException(400, "Missing required parameter 'runId' when calling RunsApi->ListRunArtifacts"); - - var localVarPath = "/projects/{owner}/{name}/runs/{run_id}/artifacts"; - 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 (runId != null) localVarPathParams.Add("run_id", this.Configuration.ApiClient.ParameterToString(runId)); // path parameter - if (path != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("multi", "path", path)); // 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("ListRunArtifacts", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse>(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (List) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(List))); - } - - /// - /// List runs Retrieve a list of runs. - /// - /// Thrown when fails to make API call - /// - /// - /// (optional) - /// (optional) - /// Page number starting from 1 (optional, default to 1) - /// Number of items per page (optional, default to 25) - /// RunList - public RunList ListRuns (string owner, string name, List jobId = default, RunStatusEnum? status = default, int? page = default, int? perPage = default) - { - ApiResponse localVarResponse = ListRunsWithHttpInfo(owner, name, jobId, status, page, perPage); - return localVarResponse.Data; - } - - /// - /// List runs Retrieve a list of runs. - /// - /// Thrown when fails to make API call - /// - /// - /// (optional) - /// (optional) - /// Page number starting from 1 (optional, default to 1) - /// Number of items per page (optional, default to 25) - /// ApiResponse of RunList - public ApiResponse ListRunsWithHttpInfo (string owner, string name, List jobId = default, RunStatusEnum? status = default, int? page = default, int? perPage = default) - { - // verify the required parameter 'owner' is set - if (owner == null) - throw new ApiException(400, "Missing required parameter 'owner' when calling RunsApi->ListRuns"); - // verify the required parameter 'name' is set - if (name == null) - throw new ApiException(400, "Missing required parameter 'name' when calling RunsApi->ListRuns"); - - var localVarPath = "/projects/{owner}/{name}/runs"; - 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) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("multi", "job_id", jobId)); // query parameter - if (status != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "status", status)); // 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("ListRuns", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (RunList) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(RunList))); - } - - /// - /// List runs Retrieve a list of runs. - /// - /// Thrown when fails to make API call - /// - /// - /// (optional) - /// (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 RunList - public async System.Threading.Tasks.Task ListRunsAsync (string owner, string name, List jobId = default, RunStatusEnum? status = default, int? page = default, int? perPage = default, CancellationToken cancellationToken = default(CancellationToken)) - { - ApiResponse localVarResponse = await ListRunsWithHttpInfoAsync(owner, name, jobId, status, page, perPage, cancellationToken); - return localVarResponse.Data; - - } - - /// - /// List runs Retrieve a list of runs. - /// - /// Thrown when fails to make API call - /// - /// - /// (optional) - /// (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 (RunList) - public async System.Threading.Tasks.Task> ListRunsWithHttpInfoAsync (string owner, string name, List jobId = default, RunStatusEnum? status = default, int? page = default, int? perPage = default, CancellationToken cancellationToken = default(CancellationToken)) - { - // verify the required parameter 'owner' is set - if (owner == null) - throw new ApiException(400, "Missing required parameter 'owner' when calling RunsApi->ListRuns"); - // verify the required parameter 'name' is set - if (name == null) - throw new ApiException(400, "Missing required parameter 'name' when calling RunsApi->ListRuns"); - - var localVarPath = "/projects/{owner}/{name}/runs"; - 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) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("multi", "job_id", jobId)); // query parameter - if (status != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "status", status)); // 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("ListRuns", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (RunList) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(RunList))); - } - - /// - /// Query run results Retrieve a list of run results. - /// - /// Thrown when fails to make API call - /// - /// - /// (optional) - /// (optional) - /// Page number starting from 1 (optional, default to 1) - /// Number of items per page (optional, default to 25) - /// RunResultList - public RunResultList QueryResults (string owner, string name, List jobId = default, RunStatusEnum? status = default, int? page = default, int? perPage = default) - { - ApiResponse localVarResponse = QueryResultsWithHttpInfo(owner, name, jobId, status, page, perPage); - return localVarResponse.Data; - } - - /// - /// Query run results Retrieve a list of run results. - /// - /// Thrown when fails to make API call - /// - /// - /// (optional) - /// (optional) - /// Page number starting from 1 (optional, default to 1) - /// Number of items per page (optional, default to 25) - /// ApiResponse of RunResultList - public ApiResponse QueryResultsWithHttpInfo (string owner, string name, List jobId = default, RunStatusEnum? status = default, int? page = default, int? perPage = default) - { - // verify the required parameter 'owner' is set - if (owner == null) - throw new ApiException(400, "Missing required parameter 'owner' when calling RunsApi->QueryResults"); - // verify the required parameter 'name' is set - if (name == null) - throw new ApiException(400, "Missing required parameter 'name' when calling RunsApi->QueryResults"); - - var localVarPath = "/projects/{owner}/{name}/results"; - 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) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("multi", "job_id", jobId)); // query parameter - if (status != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "status", status)); // 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("QueryResults", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (RunResultList) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(RunResultList))); - } - - /// - /// Query run results Retrieve a list of run results. - /// - /// Thrown when fails to make API call - /// - /// - /// (optional) - /// (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 RunResultList - public async System.Threading.Tasks.Task QueryResultsAsync (string owner, string name, List jobId = default, RunStatusEnum? status = default, int? page = default, int? perPage = default, CancellationToken cancellationToken = default(CancellationToken)) - { - ApiResponse localVarResponse = await QueryResultsWithHttpInfoAsync(owner, name, jobId, status, page, perPage, cancellationToken); - return localVarResponse.Data; - - } - - /// - /// Query run results Retrieve a list of run results. - /// - /// Thrown when fails to make API call - /// - /// - /// (optional) - /// (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 (RunResultList) - public async System.Threading.Tasks.Task> QueryResultsWithHttpInfoAsync (string owner, string name, List jobId = default, RunStatusEnum? status = default, int? page = default, int? perPage = default, CancellationToken cancellationToken = default(CancellationToken)) - { - // verify the required parameter 'owner' is set - if (owner == null) - throw new ApiException(400, "Missing required parameter 'owner' when calling RunsApi->QueryResults"); - // verify the required parameter 'name' is set - if (name == null) - throw new ApiException(400, "Missing required parameter 'name' when calling RunsApi->QueryResults"); - - var localVarPath = "/projects/{owner}/{name}/results"; - 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) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("multi", "job_id", jobId)); // query parameter - if (status != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "status", status)); // 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("QueryResults", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (RunResultList) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(RunResultList))); - } - - } -} diff --git a/src/PollinationSDK/Api/TeamsApi.cs b/src/PollinationSDK/Api/TeamsApi.cs deleted file mode 100644 index 0cec7fafb..000000000 --- a/src/PollinationSDK/Api/TeamsApi.cs +++ /dev/null @@ -1,1905 +0,0 @@ -/* - * 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 ITeamsApi : IApiAccessor - { - #region Synchronous Operations - /// - /// Create a Team - /// - /// - /// Create a new team (must be parent org member) - /// - /// Thrown when fails to make API call - /// - /// - /// CreatedContent - CreatedContent CreateTeam (string orgName, TeamCreate teamCreate); - - /// - /// Create a Team - /// - /// - /// Create a new team (must be parent org member) - /// - /// Thrown when fails to make API call - /// - /// - /// ApiResponse of CreatedContent - ApiResponse CreateTeamWithHttpInfo (string orgName, TeamCreate teamCreate); - /// - /// Remove a team member - /// - /// - /// Remove a member from the org (must have org `owner` role) - /// - /// Thrown when fails to make API call - /// - /// - /// - /// - void DeleteOrgTeamMember (string orgName, string teamSlug, string username); - - /// - /// Remove a team member - /// - /// - /// Remove a member from the org (must have org `owner` role) - /// - /// Thrown when fails to make API call - /// - /// - /// - /// ApiResponse of Object(void) - ApiResponse DeleteOrgTeamMemberWithHttpInfo (string orgName, string teamSlug, string username); - /// - /// Delete a Team - /// - /// - /// Delete a team (must have team or org `owner` role) - /// - /// Thrown when fails to make API call - /// - /// - /// - void DeleteTeam (string orgName, string teamSlug); - - /// - /// Delete a Team - /// - /// - /// Delete a team (must have team or org `owner` role) - /// - /// Thrown when fails to make API call - /// - /// - /// ApiResponse of Object(void) - ApiResponse DeleteTeamWithHttpInfo (string orgName, string teamSlug); - /// - /// List team members - /// - /// - /// Retrieve a tean's members - /// - /// Thrown when fails to make API call - /// - /// - /// TeamMemberList - TeamMemberList GetOrgTeamMembers (string orgName, string teamSlug); - - /// - /// List team members - /// - /// - /// Retrieve a tean's members - /// - /// Thrown when fails to make API call - /// - /// - /// ApiResponse of TeamMemberList - ApiResponse GetOrgTeamMembersWithHttpInfo (string orgName, string teamSlug); - /// - /// Get a Team - /// - /// - /// Retrieve a team by name - /// - /// Thrown when fails to make API call - /// - /// - /// Team - Team GetTeam (string orgName, string teamSlug); - - /// - /// Get a Team - /// - /// - /// Retrieve a team by name - /// - /// Thrown when fails to make API call - /// - /// - /// ApiResponse of Team - ApiResponse GetTeamWithHttpInfo (string orgName, string teamSlug); - /// - /// List Teams - /// - /// - /// search for orgs using query parameters - /// - /// Thrown when fails to make API call - /// - /// You know, for search (optional) - /// The account name (optional) - /// The ID of a user (optional) - /// Page number starting from 1 (optional, default to 1) - /// Number of items per page (optional, default to 25) - /// TeamList - TeamList ListOrgTeams (string orgName, List search = default, List name = default, List member = default, int? page = default, int? perPage = default); - - /// - /// List Teams - /// - /// - /// search for orgs using query parameters - /// - /// Thrown when fails to make API call - /// - /// You know, for search (optional) - /// The account name (optional) - /// The ID of a user (optional) - /// Page number starting from 1 (optional, default to 1) - /// Number of items per page (optional, default to 25) - /// ApiResponse of TeamList - ApiResponse ListOrgTeamsWithHttpInfo (string orgName, List search = default, List name = default, List member = default, int? page = default, int? perPage = default); - /// - /// Update a Team - /// - /// - /// Update a team (must have team or org `owner` role) - /// - /// Thrown when fails to make API call - /// - /// - /// - /// UpdateAccepted - UpdateAccepted UpdateTeam (string orgName, string teamSlug, TeamUpdate teamUpdate); - - /// - /// Update a Team - /// - /// - /// Update a team (must have team or org `owner` role) - /// - /// Thrown when fails to make API call - /// - /// - /// - /// ApiResponse of UpdateAccepted - ApiResponse UpdateTeamWithHttpInfo (string orgName, string teamSlug, TeamUpdate teamUpdate); - /// - /// Add or update the role of an Team Member - /// - /// - /// Upsert a member role to the team (must have org or team `owner` role) - /// - /// Thrown when fails to make API call - /// - /// - /// - /// - /// UpdateAccepted - UpdateAccepted UpsertOrgTeamMember (string orgName, string teamSlug, string username, TeamRoleEnum role); - - /// - /// Add or update the role of an Team Member - /// - /// - /// Upsert a member role to the team (must have org or team `owner` role) - /// - /// Thrown when fails to make API call - /// - /// - /// - /// - /// ApiResponse of UpdateAccepted - ApiResponse UpsertOrgTeamMemberWithHttpInfo (string orgName, string teamSlug, string username, TeamRoleEnum role); - #endregion Synchronous Operations - #region Asynchronous Operations - /// - /// Create a Team - /// - /// - /// Create a new team (must be parent org member) - /// - /// Thrown when fails to make API call - /// - /// - /// Cancellation Token to cancel request (optional) - /// Task of CreatedContent - System.Threading.Tasks.Task CreateTeamAsync (string orgName, TeamCreate teamCreate, CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// Create a Team - /// - /// - /// Create a new team (must be parent org member) - /// - /// Thrown when fails to make API call - /// - /// - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (CreatedContent) - System.Threading.Tasks.Task> CreateTeamWithHttpInfoAsync (string orgName, TeamCreate teamCreate, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Remove a team member - /// - /// - /// Remove a member from the org (must have org `owner` role) - /// - /// Thrown when fails to make API call - /// - /// - /// - /// Cancellation Token to cancel request (optional) - /// Task of void - System.Threading.Tasks.Task DeleteOrgTeamMemberAsync (string orgName, string teamSlug, string username, CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// Remove a team member - /// - /// - /// Remove a member from the org (must have org `owner` role) - /// - /// Thrown when fails to make API call - /// - /// - /// - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse - System.Threading.Tasks.Task> DeleteOrgTeamMemberWithHttpInfoAsync (string orgName, string teamSlug, string username, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Delete a Team - /// - /// - /// Delete a team (must have team or org `owner` role) - /// - /// Thrown when fails to make API call - /// - /// - /// Cancellation Token to cancel request (optional) - /// Task of void - System.Threading.Tasks.Task DeleteTeamAsync (string orgName, string teamSlug, CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// Delete a Team - /// - /// - /// Delete a team (must have team or org `owner` role) - /// - /// Thrown when fails to make API call - /// - /// - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse - System.Threading.Tasks.Task> DeleteTeamWithHttpInfoAsync (string orgName, string teamSlug, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// List team members - /// - /// - /// Retrieve a tean's members - /// - /// Thrown when fails to make API call - /// - /// - /// Cancellation Token to cancel request (optional) - /// Task of TeamMemberList - System.Threading.Tasks.Task GetOrgTeamMembersAsync (string orgName, string teamSlug, CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// List team members - /// - /// - /// Retrieve a tean's members - /// - /// Thrown when fails to make API call - /// - /// - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (TeamMemberList) - System.Threading.Tasks.Task> GetOrgTeamMembersWithHttpInfoAsync (string orgName, string teamSlug, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Get a Team - /// - /// - /// Retrieve a team by name - /// - /// Thrown when fails to make API call - /// - /// - /// Cancellation Token to cancel request (optional) - /// Task of Team - System.Threading.Tasks.Task GetTeamAsync (string orgName, string teamSlug, CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// Get a Team - /// - /// - /// Retrieve a team by name - /// - /// Thrown when fails to make API call - /// - /// - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (Team) - System.Threading.Tasks.Task> GetTeamWithHttpInfoAsync (string orgName, string teamSlug, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// List Teams - /// - /// - /// search for orgs using query parameters - /// - /// Thrown when fails to make API call - /// - /// You know, for search (optional) - /// The account name (optional) - /// The ID of a user (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 TeamList - System.Threading.Tasks.Task ListOrgTeamsAsync (string orgName, List search = default, List name = default, List member = default, int? page = default, int? perPage = default, CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// List Teams - /// - /// - /// search for orgs using query parameters - /// - /// Thrown when fails to make API call - /// - /// You know, for search (optional) - /// The account name (optional) - /// The ID of a user (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 (TeamList) - System.Threading.Tasks.Task> ListOrgTeamsWithHttpInfoAsync (string orgName, List search = default, List name = default, List member = default, int? page = default, int? perPage = default, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Update a Team - /// - /// - /// Update a team (must have team or org `owner` role) - /// - /// Thrown when fails to make API call - /// - /// - /// - /// Cancellation Token to cancel request (optional) - /// Task of UpdateAccepted - System.Threading.Tasks.Task UpdateTeamAsync (string orgName, string teamSlug, TeamUpdate teamUpdate, CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// Update a Team - /// - /// - /// Update a team (must have team or org `owner` role) - /// - /// Thrown when fails to make API call - /// - /// - /// - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (UpdateAccepted) - System.Threading.Tasks.Task> UpdateTeamWithHttpInfoAsync (string orgName, string teamSlug, TeamUpdate teamUpdate, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Add or update the role of an Team Member - /// - /// - /// Upsert a member role to the team (must have org or team `owner` role) - /// - /// Thrown when fails to make API call - /// - /// - /// - /// - /// Cancellation Token to cancel request (optional) - /// Task of UpdateAccepted - System.Threading.Tasks.Task UpsertOrgTeamMemberAsync (string orgName, string teamSlug, string username, TeamRoleEnum role, CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// Add or update the role of an Team Member - /// - /// - /// Upsert a member role to the team (must have org or team `owner` role) - /// - /// Thrown when fails to make API call - /// - /// - /// - /// - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (UpdateAccepted) - System.Threading.Tasks.Task> UpsertOrgTeamMemberWithHttpInfoAsync (string orgName, string teamSlug, string username, TeamRoleEnum role, CancellationToken cancellationToken = default(CancellationToken)); - #endregion Asynchronous Operations - } - - /// - /// Represents a collection of functions to interact with the API endpoints - /// - public partial class TeamsApi : ITeamsApi - { - private PollinationSDK.Client.ExceptionFactory _exceptionFactory = (name, response) => null; - - /// - /// Initializes a new instance of the class. - /// - /// - public TeamsApi(String basePath) - { - this.Configuration = new PollinationSDK.Client.Configuration { BasePath = basePath }; - - ExceptionFactory = PollinationSDK.Client.Configuration.DefaultExceptionFactory; - } - - /// - /// Initializes a new instance of the class - /// - /// - public TeamsApi() - { - 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 TeamsApi(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; } - } - - /// - /// Create a Team Create a new team (must be parent org member) - /// - /// Thrown when fails to make API call - /// - /// - /// CreatedContent - public CreatedContent CreateTeam (string orgName, TeamCreate teamCreate) - { - ApiResponse localVarResponse = CreateTeamWithHttpInfo(orgName, teamCreate); - return localVarResponse.Data; - } - - /// - /// Create a Team Create a new team (must be parent org member) - /// - /// Thrown when fails to make API call - /// - /// - /// ApiResponse of CreatedContent - public ApiResponse CreateTeamWithHttpInfo (string orgName, TeamCreate teamCreate) - { - // verify the required parameter 'orgName' is set - if (orgName == null) - throw new ApiException(400, "Missing required parameter 'orgName' when calling TeamsApi->CreateTeam"); - // verify the required parameter 'teamCreate' is set - if (teamCreate == null) - throw new ApiException(400, "Missing required parameter 'teamCreate' when calling TeamsApi->CreateTeam"); - - var localVarPath = "/orgs/{org_name}/teams"; - 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 (orgName != null) localVarPathParams.Add("org_name", this.Configuration.ApiClient.ParameterToString(orgName)); // path parameter - if (teamCreate != null && teamCreate.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(teamCreate); // http body (model) parameter - } - else - { - localVarPostBody = teamCreate; // 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("CreateTeam", 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 a Team Create a new team (must be parent org member) - /// - /// Thrown when fails to make API call - /// - /// - /// Cancellation Token to cancel request (optional) - /// Task of CreatedContent - public async System.Threading.Tasks.Task CreateTeamAsync (string orgName, TeamCreate teamCreate, CancellationToken cancellationToken = default(CancellationToken)) - { - ApiResponse localVarResponse = await CreateTeamWithHttpInfoAsync(orgName, teamCreate, cancellationToken); - return localVarResponse.Data; - - } - - /// - /// Create a Team Create a new team (must be parent org member) - /// - /// Thrown when fails to make API call - /// - /// - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (CreatedContent) - public async System.Threading.Tasks.Task> CreateTeamWithHttpInfoAsync (string orgName, TeamCreate teamCreate, CancellationToken cancellationToken = default(CancellationToken)) - { - // verify the required parameter 'orgName' is set - if (orgName == null) - throw new ApiException(400, "Missing required parameter 'orgName' when calling TeamsApi->CreateTeam"); - // verify the required parameter 'teamCreate' is set - if (teamCreate == null) - throw new ApiException(400, "Missing required parameter 'teamCreate' when calling TeamsApi->CreateTeam"); - - var localVarPath = "/orgs/{org_name}/teams"; - 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 (orgName != null) localVarPathParams.Add("org_name", this.Configuration.ApiClient.ParameterToString(orgName)); // path parameter - if (teamCreate != null && teamCreate.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(teamCreate); // http body (model) parameter - } - else - { - localVarPostBody = teamCreate; // 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("CreateTeam", 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))); - } - - /// - /// Remove a team member Remove a member from the org (must have org `owner` role) - /// - /// Thrown when fails to make API call - /// - /// - /// - /// - public void DeleteOrgTeamMember (string orgName, string teamSlug, string username) - { - DeleteOrgTeamMemberWithHttpInfo(orgName, teamSlug, username); - } - - /// - /// Remove a team member Remove a member from the org (must have org `owner` role) - /// - /// Thrown when fails to make API call - /// - /// - /// - /// ApiResponse of Object(void) - public ApiResponse DeleteOrgTeamMemberWithHttpInfo (string orgName, string teamSlug, string username) - { - // verify the required parameter 'orgName' is set - if (orgName == null) - throw new ApiException(400, "Missing required parameter 'orgName' when calling TeamsApi->DeleteOrgTeamMember"); - // verify the required parameter 'teamSlug' is set - if (teamSlug == null) - throw new ApiException(400, "Missing required parameter 'teamSlug' when calling TeamsApi->DeleteOrgTeamMember"); - // verify the required parameter 'username' is set - if (username == null) - throw new ApiException(400, "Missing required parameter 'username' when calling TeamsApi->DeleteOrgTeamMember"); - - var localVarPath = "/orgs/{org_name}/teams/{team_slug}/members/{username}"; - 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 (orgName != null) localVarPathParams.Add("org_name", this.Configuration.ApiClient.ParameterToString(orgName)); // path parameter - if (teamSlug != null) localVarPathParams.Add("team_slug", this.Configuration.ApiClient.ParameterToString(teamSlug)); // path parameter - if (username != null) localVarPathParams.Add("username", this.Configuration.ApiClient.ParameterToString(username)); // 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("DeleteOrgTeamMember", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); - } - - /// - /// Remove a team member Remove a member from the org (must have org `owner` role) - /// - /// Thrown when fails to make API call - /// - /// - /// - /// Cancellation Token to cancel request (optional) - /// Task of void - public async System.Threading.Tasks.Task DeleteOrgTeamMemberAsync (string orgName, string teamSlug, string username, CancellationToken cancellationToken = default(CancellationToken)) - { - await DeleteOrgTeamMemberWithHttpInfoAsync(orgName, teamSlug, username, cancellationToken); - - } - - /// - /// Remove a team member Remove a member from the org (must have org `owner` role) - /// - /// Thrown when fails to make API call - /// - /// - /// - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse - public async System.Threading.Tasks.Task> DeleteOrgTeamMemberWithHttpInfoAsync (string orgName, string teamSlug, string username, CancellationToken cancellationToken = default(CancellationToken)) - { - // verify the required parameter 'orgName' is set - if (orgName == null) - throw new ApiException(400, "Missing required parameter 'orgName' when calling TeamsApi->DeleteOrgTeamMember"); - // verify the required parameter 'teamSlug' is set - if (teamSlug == null) - throw new ApiException(400, "Missing required parameter 'teamSlug' when calling TeamsApi->DeleteOrgTeamMember"); - // verify the required parameter 'username' is set - if (username == null) - throw new ApiException(400, "Missing required parameter 'username' when calling TeamsApi->DeleteOrgTeamMember"); - - var localVarPath = "/orgs/{org_name}/teams/{team_slug}/members/{username}"; - 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 (orgName != null) localVarPathParams.Add("org_name", this.Configuration.ApiClient.ParameterToString(orgName)); // path parameter - if (teamSlug != null) localVarPathParams.Add("team_slug", this.Configuration.ApiClient.ParameterToString(teamSlug)); // path parameter - if (username != null) localVarPathParams.Add("username", this.Configuration.ApiClient.ParameterToString(username)); // 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("DeleteOrgTeamMember", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); - } - - /// - /// Delete a Team Delete a team (must have team or org `owner` role) - /// - /// Thrown when fails to make API call - /// - /// - /// - public void DeleteTeam (string orgName, string teamSlug) - { - DeleteTeamWithHttpInfo(orgName, teamSlug); - } - - /// - /// Delete a Team Delete a team (must have team or org `owner` role) - /// - /// Thrown when fails to make API call - /// - /// - /// ApiResponse of Object(void) - public ApiResponse DeleteTeamWithHttpInfo (string orgName, string teamSlug) - { - // verify the required parameter 'orgName' is set - if (orgName == null) - throw new ApiException(400, "Missing required parameter 'orgName' when calling TeamsApi->DeleteTeam"); - // verify the required parameter 'teamSlug' is set - if (teamSlug == null) - throw new ApiException(400, "Missing required parameter 'teamSlug' when calling TeamsApi->DeleteTeam"); - - var localVarPath = "/orgs/{org_name}/teams/{team_slug}"; - 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 (orgName != null) localVarPathParams.Add("org_name", this.Configuration.ApiClient.ParameterToString(orgName)); // path parameter - if (teamSlug != null) localVarPathParams.Add("team_slug", this.Configuration.ApiClient.ParameterToString(teamSlug)); // 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("DeleteTeam", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); - } - - /// - /// Delete a Team Delete a team (must have team or org `owner` role) - /// - /// Thrown when fails to make API call - /// - /// - /// Cancellation Token to cancel request (optional) - /// Task of void - public async System.Threading.Tasks.Task DeleteTeamAsync (string orgName, string teamSlug, CancellationToken cancellationToken = default(CancellationToken)) - { - await DeleteTeamWithHttpInfoAsync(orgName, teamSlug, cancellationToken); - - } - - /// - /// Delete a Team Delete a team (must have team or org `owner` role) - /// - /// Thrown when fails to make API call - /// - /// - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse - public async System.Threading.Tasks.Task> DeleteTeamWithHttpInfoAsync (string orgName, string teamSlug, CancellationToken cancellationToken = default(CancellationToken)) - { - // verify the required parameter 'orgName' is set - if (orgName == null) - throw new ApiException(400, "Missing required parameter 'orgName' when calling TeamsApi->DeleteTeam"); - // verify the required parameter 'teamSlug' is set - if (teamSlug == null) - throw new ApiException(400, "Missing required parameter 'teamSlug' when calling TeamsApi->DeleteTeam"); - - var localVarPath = "/orgs/{org_name}/teams/{team_slug}"; - 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 (orgName != null) localVarPathParams.Add("org_name", this.Configuration.ApiClient.ParameterToString(orgName)); // path parameter - if (teamSlug != null) localVarPathParams.Add("team_slug", this.Configuration.ApiClient.ParameterToString(teamSlug)); // 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("DeleteTeam", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); - } - - /// - /// List team members Retrieve a tean's members - /// - /// Thrown when fails to make API call - /// - /// - /// TeamMemberList - public TeamMemberList GetOrgTeamMembers (string orgName, string teamSlug) - { - ApiResponse localVarResponse = GetOrgTeamMembersWithHttpInfo(orgName, teamSlug); - return localVarResponse.Data; - } - - /// - /// List team members Retrieve a tean's members - /// - /// Thrown when fails to make API call - /// - /// - /// ApiResponse of TeamMemberList - public ApiResponse GetOrgTeamMembersWithHttpInfo (string orgName, string teamSlug) - { - // verify the required parameter 'orgName' is set - if (orgName == null) - throw new ApiException(400, "Missing required parameter 'orgName' when calling TeamsApi->GetOrgTeamMembers"); - // verify the required parameter 'teamSlug' is set - if (teamSlug == null) - throw new ApiException(400, "Missing required parameter 'teamSlug' when calling TeamsApi->GetOrgTeamMembers"); - - var localVarPath = "/orgs/{org_name}/teams/{team_slug}/members"; - 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 (orgName != null) localVarPathParams.Add("org_name", this.Configuration.ApiClient.ParameterToString(orgName)); // path parameter - if (teamSlug != null) localVarPathParams.Add("team_slug", this.Configuration.ApiClient.ParameterToString(teamSlug)); // 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("GetOrgTeamMembers", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (TeamMemberList) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(TeamMemberList))); - } - - /// - /// List team members Retrieve a tean's members - /// - /// Thrown when fails to make API call - /// - /// - /// Cancellation Token to cancel request (optional) - /// Task of TeamMemberList - public async System.Threading.Tasks.Task GetOrgTeamMembersAsync (string orgName, string teamSlug, CancellationToken cancellationToken = default(CancellationToken)) - { - ApiResponse localVarResponse = await GetOrgTeamMembersWithHttpInfoAsync(orgName, teamSlug, cancellationToken); - return localVarResponse.Data; - - } - - /// - /// List team members Retrieve a tean's members - /// - /// Thrown when fails to make API call - /// - /// - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (TeamMemberList) - public async System.Threading.Tasks.Task> GetOrgTeamMembersWithHttpInfoAsync (string orgName, string teamSlug, CancellationToken cancellationToken = default(CancellationToken)) - { - // verify the required parameter 'orgName' is set - if (orgName == null) - throw new ApiException(400, "Missing required parameter 'orgName' when calling TeamsApi->GetOrgTeamMembers"); - // verify the required parameter 'teamSlug' is set - if (teamSlug == null) - throw new ApiException(400, "Missing required parameter 'teamSlug' when calling TeamsApi->GetOrgTeamMembers"); - - var localVarPath = "/orgs/{org_name}/teams/{team_slug}/members"; - 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 (orgName != null) localVarPathParams.Add("org_name", this.Configuration.ApiClient.ParameterToString(orgName)); // path parameter - if (teamSlug != null) localVarPathParams.Add("team_slug", this.Configuration.ApiClient.ParameterToString(teamSlug)); // 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("GetOrgTeamMembers", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (TeamMemberList) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(TeamMemberList))); - } - - /// - /// Get a Team Retrieve a team by name - /// - /// Thrown when fails to make API call - /// - /// - /// Team - public Team GetTeam (string orgName, string teamSlug) - { - ApiResponse localVarResponse = GetTeamWithHttpInfo(orgName, teamSlug); - return localVarResponse.Data; - } - - /// - /// Get a Team Retrieve a team by name - /// - /// Thrown when fails to make API call - /// - /// - /// ApiResponse of Team - public ApiResponse GetTeamWithHttpInfo (string orgName, string teamSlug) - { - // verify the required parameter 'orgName' is set - if (orgName == null) - throw new ApiException(400, "Missing required parameter 'orgName' when calling TeamsApi->GetTeam"); - // verify the required parameter 'teamSlug' is set - if (teamSlug == null) - throw new ApiException(400, "Missing required parameter 'teamSlug' when calling TeamsApi->GetTeam"); - - var localVarPath = "/orgs/{org_name}/teams/{team_slug}"; - 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 (orgName != null) localVarPathParams.Add("org_name", this.Configuration.ApiClient.ParameterToString(orgName)); // path parameter - if (teamSlug != null) localVarPathParams.Add("team_slug", this.Configuration.ApiClient.ParameterToString(teamSlug)); // 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("GetTeam", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (Team) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Team))); - } - - /// - /// Get a Team Retrieve a team by name - /// - /// Thrown when fails to make API call - /// - /// - /// Cancellation Token to cancel request (optional) - /// Task of Team - public async System.Threading.Tasks.Task GetTeamAsync (string orgName, string teamSlug, CancellationToken cancellationToken = default(CancellationToken)) - { - ApiResponse localVarResponse = await GetTeamWithHttpInfoAsync(orgName, teamSlug, cancellationToken); - return localVarResponse.Data; - - } - - /// - /// Get a Team Retrieve a team by name - /// - /// Thrown when fails to make API call - /// - /// - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (Team) - public async System.Threading.Tasks.Task> GetTeamWithHttpInfoAsync (string orgName, string teamSlug, CancellationToken cancellationToken = default(CancellationToken)) - { - // verify the required parameter 'orgName' is set - if (orgName == null) - throw new ApiException(400, "Missing required parameter 'orgName' when calling TeamsApi->GetTeam"); - // verify the required parameter 'teamSlug' is set - if (teamSlug == null) - throw new ApiException(400, "Missing required parameter 'teamSlug' when calling TeamsApi->GetTeam"); - - var localVarPath = "/orgs/{org_name}/teams/{team_slug}"; - 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 (orgName != null) localVarPathParams.Add("org_name", this.Configuration.ApiClient.ParameterToString(orgName)); // path parameter - if (teamSlug != null) localVarPathParams.Add("team_slug", this.Configuration.ApiClient.ParameterToString(teamSlug)); // 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("GetTeam", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (Team) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Team))); - } - - /// - /// List Teams search for orgs using query parameters - /// - /// Thrown when fails to make API call - /// - /// You know, for search (optional) - /// The account name (optional) - /// The ID of a user (optional) - /// Page number starting from 1 (optional, default to 1) - /// Number of items per page (optional, default to 25) - /// TeamList - public TeamList ListOrgTeams (string orgName, List search = default, List name = default, List member = default, int? page = default, int? perPage = default) - { - ApiResponse localVarResponse = ListOrgTeamsWithHttpInfo(orgName, search, name, member, page, perPage); - return localVarResponse.Data; - } - - /// - /// List Teams search for orgs using query parameters - /// - /// Thrown when fails to make API call - /// - /// You know, for search (optional) - /// The account name (optional) - /// The ID of a user (optional) - /// Page number starting from 1 (optional, default to 1) - /// Number of items per page (optional, default to 25) - /// ApiResponse of TeamList - public ApiResponse ListOrgTeamsWithHttpInfo (string orgName, List search = default, List name = default, List member = default, int? page = default, int? perPage = default) - { - // verify the required parameter 'orgName' is set - if (orgName == null) - throw new ApiException(400, "Missing required parameter 'orgName' when calling TeamsApi->ListOrgTeams"); - - var localVarPath = "/orgs/{org_name}/teams"; - 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 (orgName != null) localVarPathParams.Add("org_name", this.Configuration.ApiClient.ParameterToString(orgName)); // path parameter - if (search != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("multi", "search", search)); // query parameter - if (name != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("multi", "name", name)); // query parameter - if (member != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("multi", "member", member)); // 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 - - - // 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("ListOrgTeams", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (TeamList) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(TeamList))); - } - - /// - /// List Teams search for orgs using query parameters - /// - /// Thrown when fails to make API call - /// - /// You know, for search (optional) - /// The account name (optional) - /// The ID of a user (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 TeamList - public async System.Threading.Tasks.Task ListOrgTeamsAsync (string orgName, List search = default, List name = default, List member = default, int? page = default, int? perPage = default, CancellationToken cancellationToken = default(CancellationToken)) - { - ApiResponse localVarResponse = await ListOrgTeamsWithHttpInfoAsync(orgName, search, name, member, page, perPage, cancellationToken); - return localVarResponse.Data; - - } - - /// - /// List Teams search for orgs using query parameters - /// - /// Thrown when fails to make API call - /// - /// You know, for search (optional) - /// The account name (optional) - /// The ID of a user (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 (TeamList) - public async System.Threading.Tasks.Task> ListOrgTeamsWithHttpInfoAsync (string orgName, List search = default, List name = default, List member = default, int? page = default, int? perPage = default, CancellationToken cancellationToken = default(CancellationToken)) - { - // verify the required parameter 'orgName' is set - if (orgName == null) - throw new ApiException(400, "Missing required parameter 'orgName' when calling TeamsApi->ListOrgTeams"); - - var localVarPath = "/orgs/{org_name}/teams"; - 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 (orgName != null) localVarPathParams.Add("org_name", this.Configuration.ApiClient.ParameterToString(orgName)); // path parameter - if (search != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("multi", "search", search)); // query parameter - if (name != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("multi", "name", name)); // query parameter - if (member != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("multi", "member", member)); // 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 - - - // 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("ListOrgTeams", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (TeamList) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(TeamList))); - } - - /// - /// Update a Team Update a team (must have team or org `owner` role) - /// - /// Thrown when fails to make API call - /// - /// - /// - /// UpdateAccepted - public UpdateAccepted UpdateTeam (string orgName, string teamSlug, TeamUpdate teamUpdate) - { - ApiResponse localVarResponse = UpdateTeamWithHttpInfo(orgName, teamSlug, teamUpdate); - return localVarResponse.Data; - } - - /// - /// Update a Team Update a team (must have team or org `owner` role) - /// - /// Thrown when fails to make API call - /// - /// - /// - /// ApiResponse of UpdateAccepted - public ApiResponse UpdateTeamWithHttpInfo (string orgName, string teamSlug, TeamUpdate teamUpdate) - { - // verify the required parameter 'orgName' is set - if (orgName == null) - throw new ApiException(400, "Missing required parameter 'orgName' when calling TeamsApi->UpdateTeam"); - // verify the required parameter 'teamSlug' is set - if (teamSlug == null) - throw new ApiException(400, "Missing required parameter 'teamSlug' when calling TeamsApi->UpdateTeam"); - // verify the required parameter 'teamUpdate' is set - if (teamUpdate == null) - throw new ApiException(400, "Missing required parameter 'teamUpdate' when calling TeamsApi->UpdateTeam"); - - var localVarPath = "/orgs/{org_name}/teams/{team_slug}"; - 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 (orgName != null) localVarPathParams.Add("org_name", this.Configuration.ApiClient.ParameterToString(orgName)); // path parameter - if (teamSlug != null) localVarPathParams.Add("team_slug", this.Configuration.ApiClient.ParameterToString(teamSlug)); // path parameter - if (teamUpdate != null && teamUpdate.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(teamUpdate); // http body (model) parameter - } - else - { - localVarPostBody = teamUpdate; // 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("UpdateTeam", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (UpdateAccepted) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(UpdateAccepted))); - } - - /// - /// Update a Team Update a team (must have team or org `owner` role) - /// - /// Thrown when fails to make API call - /// - /// - /// - /// Cancellation Token to cancel request (optional) - /// Task of UpdateAccepted - public async System.Threading.Tasks.Task UpdateTeamAsync (string orgName, string teamSlug, TeamUpdate teamUpdate, CancellationToken cancellationToken = default(CancellationToken)) - { - ApiResponse localVarResponse = await UpdateTeamWithHttpInfoAsync(orgName, teamSlug, teamUpdate, cancellationToken); - return localVarResponse.Data; - - } - - /// - /// Update a Team Update a team (must have team or org `owner` role) - /// - /// Thrown when fails to make API call - /// - /// - /// - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (UpdateAccepted) - public async System.Threading.Tasks.Task> UpdateTeamWithHttpInfoAsync (string orgName, string teamSlug, TeamUpdate teamUpdate, CancellationToken cancellationToken = default(CancellationToken)) - { - // verify the required parameter 'orgName' is set - if (orgName == null) - throw new ApiException(400, "Missing required parameter 'orgName' when calling TeamsApi->UpdateTeam"); - // verify the required parameter 'teamSlug' is set - if (teamSlug == null) - throw new ApiException(400, "Missing required parameter 'teamSlug' when calling TeamsApi->UpdateTeam"); - // verify the required parameter 'teamUpdate' is set - if (teamUpdate == null) - throw new ApiException(400, "Missing required parameter 'teamUpdate' when calling TeamsApi->UpdateTeam"); - - var localVarPath = "/orgs/{org_name}/teams/{team_slug}"; - 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 (orgName != null) localVarPathParams.Add("org_name", this.Configuration.ApiClient.ParameterToString(orgName)); // path parameter - if (teamSlug != null) localVarPathParams.Add("team_slug", this.Configuration.ApiClient.ParameterToString(teamSlug)); // path parameter - if (teamUpdate != null && teamUpdate.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(teamUpdate); // http body (model) parameter - } - else - { - localVarPostBody = teamUpdate; // 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("UpdateTeam", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (UpdateAccepted) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(UpdateAccepted))); - } - - /// - /// Add or update the role of an Team Member Upsert a member role to the team (must have org or team `owner` role) - /// - /// Thrown when fails to make API call - /// - /// - /// - /// - /// UpdateAccepted - public UpdateAccepted UpsertOrgTeamMember (string orgName, string teamSlug, string username, TeamRoleEnum role) - { - ApiResponse localVarResponse = UpsertOrgTeamMemberWithHttpInfo(orgName, teamSlug, username, role); - return localVarResponse.Data; - } - - /// - /// Add or update the role of an Team Member Upsert a member role to the team (must have org or team `owner` role) - /// - /// Thrown when fails to make API call - /// - /// - /// - /// - /// ApiResponse of UpdateAccepted - public ApiResponse UpsertOrgTeamMemberWithHttpInfo (string orgName, string teamSlug, string username, TeamRoleEnum role) - { - // verify the required parameter 'orgName' is set - if (orgName == null) - throw new ApiException(400, "Missing required parameter 'orgName' when calling TeamsApi->UpsertOrgTeamMember"); - // verify the required parameter 'teamSlug' is set - if (teamSlug == null) - throw new ApiException(400, "Missing required parameter 'teamSlug' when calling TeamsApi->UpsertOrgTeamMember"); - // verify the required parameter 'username' is set - if (username == null) - throw new ApiException(400, "Missing required parameter 'username' when calling TeamsApi->UpsertOrgTeamMember"); - // verify the required parameter 'role' is set - if (role == null) - throw new ApiException(400, "Missing required parameter 'role' when calling TeamsApi->UpsertOrgTeamMember"); - - var localVarPath = "/orgs/{org_name}/teams/{team_slug}/members/{username}/{role}"; - 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 (orgName != null) localVarPathParams.Add("org_name", this.Configuration.ApiClient.ParameterToString(orgName)); // path parameter - if (teamSlug != null) localVarPathParams.Add("team_slug", this.Configuration.ApiClient.ParameterToString(teamSlug)); // path parameter - if (username != null) localVarPathParams.Add("username", this.Configuration.ApiClient.ParameterToString(username)); // path parameter - if (role != null) localVarPathParams.Add("role", this.Configuration.ApiClient.ParameterToString(role)); // 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.PATCH, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("UpsertOrgTeamMember", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (UpdateAccepted) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(UpdateAccepted))); - } - - /// - /// Add or update the role of an Team Member Upsert a member role to the team (must have org or team `owner` role) - /// - /// Thrown when fails to make API call - /// - /// - /// - /// - /// Cancellation Token to cancel request (optional) - /// Task of UpdateAccepted - public async System.Threading.Tasks.Task UpsertOrgTeamMemberAsync (string orgName, string teamSlug, string username, TeamRoleEnum role, CancellationToken cancellationToken = default(CancellationToken)) - { - ApiResponse localVarResponse = await UpsertOrgTeamMemberWithHttpInfoAsync(orgName, teamSlug, username, role, cancellationToken); - return localVarResponse.Data; - - } - - /// - /// Add or update the role of an Team Member Upsert a member role to the team (must have org or team `owner` role) - /// - /// Thrown when fails to make API call - /// - /// - /// - /// - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (UpdateAccepted) - public async System.Threading.Tasks.Task> UpsertOrgTeamMemberWithHttpInfoAsync (string orgName, string teamSlug, string username, TeamRoleEnum role, CancellationToken cancellationToken = default(CancellationToken)) - { - // verify the required parameter 'orgName' is set - if (orgName == null) - throw new ApiException(400, "Missing required parameter 'orgName' when calling TeamsApi->UpsertOrgTeamMember"); - // verify the required parameter 'teamSlug' is set - if (teamSlug == null) - throw new ApiException(400, "Missing required parameter 'teamSlug' when calling TeamsApi->UpsertOrgTeamMember"); - // verify the required parameter 'username' is set - if (username == null) - throw new ApiException(400, "Missing required parameter 'username' when calling TeamsApi->UpsertOrgTeamMember"); - // verify the required parameter 'role' is set - if (role == null) - throw new ApiException(400, "Missing required parameter 'role' when calling TeamsApi->UpsertOrgTeamMember"); - - var localVarPath = "/orgs/{org_name}/teams/{team_slug}/members/{username}/{role}"; - 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 (orgName != null) localVarPathParams.Add("org_name", this.Configuration.ApiClient.ParameterToString(orgName)); // path parameter - if (teamSlug != null) localVarPathParams.Add("team_slug", this.Configuration.ApiClient.ParameterToString(teamSlug)); // path parameter - if (username != null) localVarPathParams.Add("username", this.Configuration.ApiClient.ParameterToString(username)); // path parameter - if (role != null) localVarPathParams.Add("role", this.Configuration.ApiClient.ParameterToString(role)); // 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.PATCH, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType, cancellationToken); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("UpsertOrgTeamMember", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (UpdateAccepted) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(UpdateAccepted))); - } - - } -} diff --git a/src/PollinationSDK/Api/UserApi.cs b/src/PollinationSDK/Api/UserApi.cs deleted file mode 100644 index 581543311..000000000 --- a/src/PollinationSDK/Api/UserApi.cs +++ /dev/null @@ -1,903 +0,0 @@ -/* - * 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 IUserApi : IApiAccessor - { - #region Synchronous Operations - /// - /// Register a new user - /// - /// - /// Create a new user. - /// - /// Thrown when fails to make API call - /// - /// CreatedContent - CreatedContent CreateUser (UserCreate userCreate); - - /// - /// Register a new user - /// - /// - /// Create a new user. - /// - /// Thrown when fails to make API call - /// - /// ApiResponse of CreatedContent - ApiResponse CreateUserWithHttpInfo (UserCreate userCreate); - /// - /// Get authenticated user profile. - /// - /// - /// Get authenticated user profile - /// - /// Thrown when fails to make API call - /// UserPrivate - UserPrivate GetMe (); - - /// - /// Get authenticated user profile. - /// - /// - /// Get authenticated user profile - /// - /// Thrown when fails to make API call - /// ApiResponse of UserPrivate - ApiResponse GetMeWithHttpInfo (); - /// - /// Get the authenticated user roles - /// - /// - /// - /// - /// Thrown when fails to make API call - /// List<string> - List GetRoles (); - - /// - /// Get the authenticated user roles - /// - /// - /// - /// - /// Thrown when fails to make API call - /// ApiResponse of List<string> - ApiResponse> GetRolesWithHttpInfo (); - /// - /// Update the authenticated user - /// - /// - /// Update the authenticated user profile - /// - /// Thrown when fails to make API call - /// - /// UpdateAccepted - UpdateAccepted UpdateUserProfile (UserUpdate userUpdate); - - /// - /// Update the authenticated user - /// - /// - /// Update the authenticated user profile - /// - /// Thrown when fails to make API call - /// - /// ApiResponse of UpdateAccepted - ApiResponse UpdateUserProfileWithHttpInfo (UserUpdate userUpdate); - #endregion Synchronous Operations - #region Asynchronous Operations - /// - /// Register a new user - /// - /// - /// Create a new user. - /// - /// Thrown when fails to make API call - /// - /// Cancellation Token to cancel request (optional) - /// Task of CreatedContent - System.Threading.Tasks.Task CreateUserAsync (UserCreate userCreate, CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// Register a new user - /// - /// - /// Create a new user. - /// - /// Thrown when fails to make API call - /// - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (CreatedContent) - System.Threading.Tasks.Task> CreateUserWithHttpInfoAsync (UserCreate userCreate, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Get authenticated user profile. - /// - /// - /// Get authenticated user profile - /// - /// Thrown when fails to make API call - /// Cancellation Token to cancel request (optional) - /// Task of UserPrivate - System.Threading.Tasks.Task GetMeAsync (CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// Get authenticated user profile. - /// - /// - /// Get authenticated user profile - /// - /// Thrown when fails to make API call - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (UserPrivate) - System.Threading.Tasks.Task> GetMeWithHttpInfoAsync (CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Get the authenticated user roles - /// - /// - /// - /// - /// Thrown when fails to make API call - /// Cancellation Token to cancel request (optional) - /// Task of List<string> - System.Threading.Tasks.Task> GetRolesAsync (CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// Get the authenticated user roles - /// - /// - /// - /// - /// Thrown when fails to make API call - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (List<string>) - System.Threading.Tasks.Task>> GetRolesWithHttpInfoAsync (CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Update the authenticated user - /// - /// - /// Update the authenticated user profile - /// - /// Thrown when fails to make API call - /// - /// Cancellation Token to cancel request (optional) - /// Task of UpdateAccepted - System.Threading.Tasks.Task UpdateUserProfileAsync (UserUpdate userUpdate, CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// Update the authenticated user - /// - /// - /// Update the authenticated user profile - /// - /// Thrown when fails to make API call - /// - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (UpdateAccepted) - System.Threading.Tasks.Task> UpdateUserProfileWithHttpInfoAsync (UserUpdate userUpdate, CancellationToken cancellationToken = default(CancellationToken)); - #endregion Asynchronous Operations - } - - /// - /// Represents a collection of functions to interact with the API endpoints - /// - public partial class UserApi : IUserApi - { - private PollinationSDK.Client.ExceptionFactory _exceptionFactory = (name, response) => null; - - /// - /// Initializes a new instance of the class. - /// - /// - public UserApi(String basePath) - { - this.Configuration = new PollinationSDK.Client.Configuration { BasePath = basePath }; - - ExceptionFactory = PollinationSDK.Client.Configuration.DefaultExceptionFactory; - } - - /// - /// Initializes a new instance of the class - /// - /// - public UserApi() - { - 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 UserApi(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; } - } - - /// - /// Register a new user Create a new user. - /// - /// Thrown when fails to make API call - /// - /// CreatedContent - public CreatedContent CreateUser (UserCreate userCreate) - { - ApiResponse localVarResponse = CreateUserWithHttpInfo(userCreate); - return localVarResponse.Data; - } - - /// - /// Register a new user Create a new user. - /// - /// Thrown when fails to make API call - /// - /// ApiResponse of CreatedContent - public ApiResponse CreateUserWithHttpInfo (UserCreate userCreate) - { - // verify the required parameter 'userCreate' is set - if (userCreate == null) - throw new ApiException(400, "Missing required parameter 'userCreate' when calling UserApi->CreateUser"); - - var localVarPath = "/user"; - 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 (userCreate != null && userCreate.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(userCreate); // http body (model) parameter - } - else - { - localVarPostBody = userCreate; // byte array - } - - // 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("CreateUser", 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))); - } - - /// - /// Register a new user Create a new user. - /// - /// Thrown when fails to make API call - /// - /// Cancellation Token to cancel request (optional) - /// Task of CreatedContent - public async System.Threading.Tasks.Task CreateUserAsync (UserCreate userCreate, CancellationToken cancellationToken = default(CancellationToken)) - { - ApiResponse localVarResponse = await CreateUserWithHttpInfoAsync(userCreate, cancellationToken); - return localVarResponse.Data; - - } - - /// - /// Register a new user Create a new user. - /// - /// Thrown when fails to make API call - /// - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (CreatedContent) - public async System.Threading.Tasks.Task> CreateUserWithHttpInfoAsync (UserCreate userCreate, CancellationToken cancellationToken = default(CancellationToken)) - { - // verify the required parameter 'userCreate' is set - if (userCreate == null) - throw new ApiException(400, "Missing required parameter 'userCreate' when calling UserApi->CreateUser"); - - var localVarPath = "/user"; - 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 (userCreate != null && userCreate.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(userCreate); // http body (model) parameter - } - else - { - localVarPostBody = userCreate; // byte array - } - - // 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("CreateUser", 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 authenticated user profile. Get authenticated user profile - /// - /// Thrown when fails to make API call - /// UserPrivate - public UserPrivate GetMe () - { - ApiResponse localVarResponse = GetMeWithHttpInfo(); - return localVarResponse.Data; - } - - /// - /// Get authenticated user profile. Get authenticated user profile - /// - /// Thrown when fails to make API call - /// ApiResponse of UserPrivate - public ApiResponse GetMeWithHttpInfo () - { - - var localVarPath = "/user"; - 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); - - - // 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("GetMe", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (UserPrivate) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(UserPrivate))); - } - - /// - /// Get authenticated user profile. Get authenticated user profile - /// - /// Thrown when fails to make API call - /// Cancellation Token to cancel request (optional) - /// Task of UserPrivate - public async System.Threading.Tasks.Task GetMeAsync (CancellationToken cancellationToken = default(CancellationToken)) - { - ApiResponse localVarResponse = await GetMeWithHttpInfoAsync(cancellationToken); - return localVarResponse.Data; - - } - - /// - /// Get authenticated user profile. Get authenticated user profile - /// - /// Thrown when fails to make API call - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (UserPrivate) - public async System.Threading.Tasks.Task> GetMeWithHttpInfoAsync (CancellationToken cancellationToken = default(CancellationToken)) - { - - var localVarPath = "/user"; - 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); - - - // 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("GetMe", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (UserPrivate) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(UserPrivate))); - } - - /// - /// Get the authenticated user roles - /// - /// Thrown when fails to make API call - /// List<string> - public List GetRoles () - { - ApiResponse> localVarResponse = GetRolesWithHttpInfo(); - return localVarResponse.Data; - } - - /// - /// Get the authenticated user roles - /// - /// Thrown when fails to make API call - /// ApiResponse of List<string> - public ApiResponse> GetRolesWithHttpInfo () - { - - var localVarPath = "/user/roles"; - 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); - - - // 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("GetRoles", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse>(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (List) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(List))); - } - - /// - /// Get the authenticated user roles - /// - /// Thrown when fails to make API call - /// Cancellation Token to cancel request (optional) - /// Task of List<string> - public async System.Threading.Tasks.Task> GetRolesAsync (CancellationToken cancellationToken = default(CancellationToken)) - { - ApiResponse> localVarResponse = await GetRolesWithHttpInfoAsync(cancellationToken); - return localVarResponse.Data; - - } - - /// - /// Get the authenticated user roles - /// - /// Thrown when fails to make API call - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (List<string>) - public async System.Threading.Tasks.Task>> GetRolesWithHttpInfoAsync (CancellationToken cancellationToken = default(CancellationToken)) - { - - var localVarPath = "/user/roles"; - 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); - - - // 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("GetRoles", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse>(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (List) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(List))); - } - - /// - /// Update the authenticated user Update the authenticated user profile - /// - /// Thrown when fails to make API call - /// - /// UpdateAccepted - public UpdateAccepted UpdateUserProfile (UserUpdate userUpdate) - { - ApiResponse localVarResponse = UpdateUserProfileWithHttpInfo(userUpdate); - return localVarResponse.Data; - } - - /// - /// Update the authenticated user Update the authenticated user profile - /// - /// Thrown when fails to make API call - /// - /// ApiResponse of UpdateAccepted - public ApiResponse UpdateUserProfileWithHttpInfo (UserUpdate userUpdate) - { - // verify the required parameter 'userUpdate' is set - if (userUpdate == null) - throw new ApiException(400, "Missing required parameter 'userUpdate' when calling UserApi->UpdateUserProfile"); - - var localVarPath = "/user"; - 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 (userUpdate != null && userUpdate.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(userUpdate); // http body (model) parameter - } - else - { - localVarPostBody = userUpdate; // 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("UpdateUserProfile", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (UpdateAccepted) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(UpdateAccepted))); - } - - /// - /// Update the authenticated user Update the authenticated user profile - /// - /// Thrown when fails to make API call - /// - /// Cancellation Token to cancel request (optional) - /// Task of UpdateAccepted - public async System.Threading.Tasks.Task UpdateUserProfileAsync (UserUpdate userUpdate, CancellationToken cancellationToken = default(CancellationToken)) - { - ApiResponse localVarResponse = await UpdateUserProfileWithHttpInfoAsync(userUpdate, cancellationToken); - return localVarResponse.Data; - - } - - /// - /// Update the authenticated user Update the authenticated user profile - /// - /// Thrown when fails to make API call - /// - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (UpdateAccepted) - public async System.Threading.Tasks.Task> UpdateUserProfileWithHttpInfoAsync (UserUpdate userUpdate, CancellationToken cancellationToken = default(CancellationToken)) - { - // verify the required parameter 'userUpdate' is set - if (userUpdate == null) - throw new ApiException(400, "Missing required parameter 'userUpdate' when calling UserApi->UpdateUserProfile"); - - var localVarPath = "/user"; - 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 (userUpdate != null && userUpdate.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(userUpdate); // http body (model) parameter - } - else - { - localVarPostBody = userUpdate; // 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("UpdateUserProfile", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (UpdateAccepted) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(UpdateAccepted))); - } - - } -} diff --git a/src/PollinationSDK/Api/UsersApi.cs b/src/PollinationSDK/Api/UsersApi.cs deleted file mode 100644 index fdfa23b20..000000000 --- a/src/PollinationSDK/Api/UsersApi.cs +++ /dev/null @@ -1,660 +0,0 @@ -/* - * 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 IUsersApi : IApiAccessor - { - #region Synchronous Operations - /// - /// Check if a username is already taken - /// - /// - /// Check if a username is already taken by a user or an org - /// - /// Thrown when fails to make API call - /// - /// object - object CheckUsername (string username); - - /// - /// Check if a username is already taken - /// - /// - /// Check if a username is already taken by a user or an org - /// - /// Thrown when fails to make API call - /// - /// ApiResponse of object - ApiResponse CheckUsernameWithHttpInfo (string username); - /// - /// Get a specific user profile - /// - /// - /// Get a specific user profile by name - /// - /// Thrown when fails to make API call - /// - /// UserPublic - UserPublic GetOneUser (string name); - - /// - /// Get a specific user profile - /// - /// - /// Get a specific user profile by name - /// - /// Thrown when fails to make API call - /// - /// ApiResponse of UserPublic - ApiResponse GetOneUserWithHttpInfo (string name); - /// - /// List Users - /// - /// - /// - /// - /// Thrown when fails to make API call - /// Search string to find users (optional) - /// Page number starting from 1 (optional, default to 1) - /// Number of items per page (optional, default to 25) - /// UserPublicList - UserPublicList ListUsers (string search = default, int? page = default, int? perPage = default); - - /// - /// List Users - /// - /// - /// - /// - /// Thrown when fails to make API call - /// Search string to find users (optional) - /// Page number starting from 1 (optional, default to 1) - /// Number of items per page (optional, default to 25) - /// ApiResponse of UserPublicList - ApiResponse ListUsersWithHttpInfo (string search = default, int? page = default, int? perPage = default); - #endregion Synchronous Operations - #region Asynchronous Operations - /// - /// Check if a username is already taken - /// - /// - /// Check if a username is already taken by a user or an org - /// - /// Thrown when fails to make API call - /// - /// Cancellation Token to cancel request (optional) - /// Task of object - System.Threading.Tasks.Task CheckUsernameAsync (string username, CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// Check if a username is already taken - /// - /// - /// Check if a username is already taken by a user or an org - /// - /// Thrown when fails to make API call - /// - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (object) - System.Threading.Tasks.Task> CheckUsernameWithHttpInfoAsync (string username, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Get a specific user profile - /// - /// - /// Get a specific user profile by name - /// - /// Thrown when fails to make API call - /// - /// Cancellation Token to cancel request (optional) - /// Task of UserPublic - System.Threading.Tasks.Task GetOneUserAsync (string name, CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// Get a specific user profile - /// - /// - /// Get a specific user profile by name - /// - /// Thrown when fails to make API call - /// - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (UserPublic) - System.Threading.Tasks.Task> GetOneUserWithHttpInfoAsync (string name, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// List Users - /// - /// - /// - /// - /// Thrown when fails to make API call - /// Search string to find users (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 UserPublicList - System.Threading.Tasks.Task ListUsersAsync (string search = default, int? page = default, int? perPage = default, CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// List Users - /// - /// - /// - /// - /// Thrown when fails to make API call - /// Search string to find users (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 (UserPublicList) - System.Threading.Tasks.Task> ListUsersWithHttpInfoAsync (string search = default, int? page = default, int? perPage = default, CancellationToken cancellationToken = default(CancellationToken)); - #endregion Asynchronous Operations - } - - /// - /// Represents a collection of functions to interact with the API endpoints - /// - public partial class UsersApi : IUsersApi - { - private PollinationSDK.Client.ExceptionFactory _exceptionFactory = (name, response) => null; - - /// - /// Initializes a new instance of the class. - /// - /// - public UsersApi(String basePath) - { - this.Configuration = new PollinationSDK.Client.Configuration { BasePath = basePath }; - - ExceptionFactory = PollinationSDK.Client.Configuration.DefaultExceptionFactory; - } - - /// - /// Initializes a new instance of the class - /// - /// - public UsersApi() - { - 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 UsersApi(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; } - } - - /// - /// Check if a username is already taken Check if a username is already taken by a user or an org - /// - /// Thrown when fails to make API call - /// - /// object - public object CheckUsername (string username) - { - ApiResponse localVarResponse = CheckUsernameWithHttpInfo(username); - return localVarResponse.Data; - } - - /// - /// Check if a username is already taken Check if a username is already taken by a user or an org - /// - /// Thrown when fails to make API call - /// - /// ApiResponse of object - public ApiResponse CheckUsernameWithHttpInfo (string username) - { - // verify the required parameter 'username' is set - if (username == null) - throw new ApiException(400, "Missing required parameter 'username' when calling UsersApi->CheckUsername"); - - var localVarPath = "/users/check_username/{username}"; - 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 (username != null) localVarPathParams.Add("username", this.Configuration.ApiClient.ParameterToString(username)); // 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("CheckUsername", 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 a username is already taken Check if a username is already taken by a user or an org - /// - /// Thrown when fails to make API call - /// - /// Cancellation Token to cancel request (optional) - /// Task of object - public async System.Threading.Tasks.Task CheckUsernameAsync (string username, CancellationToken cancellationToken = default(CancellationToken)) - { - ApiResponse localVarResponse = await CheckUsernameWithHttpInfoAsync(username, cancellationToken); - return localVarResponse.Data; - - } - - /// - /// Check if a username is already taken Check if a username is already taken by a user or an org - /// - /// Thrown when fails to make API call - /// - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (object) - public async System.Threading.Tasks.Task> CheckUsernameWithHttpInfoAsync (string username, CancellationToken cancellationToken = default(CancellationToken)) - { - // verify the required parameter 'username' is set - if (username == null) - throw new ApiException(400, "Missing required parameter 'username' when calling UsersApi->CheckUsername"); - - var localVarPath = "/users/check_username/{username}"; - 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 (username != null) localVarPathParams.Add("username", this.Configuration.ApiClient.ParameterToString(username)); // 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("CheckUsername", 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 a specific user profile Get a specific user profile by name - /// - /// Thrown when fails to make API call - /// - /// UserPublic - public UserPublic GetOneUser (string name) - { - ApiResponse localVarResponse = GetOneUserWithHttpInfo(name); - return localVarResponse.Data; - } - - /// - /// Get a specific user profile Get a specific user profile by name - /// - /// Thrown when fails to make API call - /// - /// ApiResponse of UserPublic - public ApiResponse GetOneUserWithHttpInfo (string name) - { - // verify the required parameter 'name' is set - if (name == null) - throw new ApiException(400, "Missing required parameter 'name' when calling UsersApi->GetOneUser"); - - var localVarPath = "/users/{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("GetOneUser", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (UserPublic) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(UserPublic))); - } - - /// - /// Get a specific user profile Get a specific user profile by name - /// - /// Thrown when fails to make API call - /// - /// Cancellation Token to cancel request (optional) - /// Task of UserPublic - public async System.Threading.Tasks.Task GetOneUserAsync (string name, CancellationToken cancellationToken = default(CancellationToken)) - { - ApiResponse localVarResponse = await GetOneUserWithHttpInfoAsync(name, cancellationToken); - return localVarResponse.Data; - - } - - /// - /// Get a specific user profile Get a specific user profile by name - /// - /// Thrown when fails to make API call - /// - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (UserPublic) - public async System.Threading.Tasks.Task> GetOneUserWithHttpInfoAsync (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 UsersApi->GetOneUser"); - - var localVarPath = "/users/{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("GetOneUser", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (UserPublic) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(UserPublic))); - } - - /// - /// List Users - /// - /// Thrown when fails to make API call - /// Search string to find users (optional) - /// Page number starting from 1 (optional, default to 1) - /// Number of items per page (optional, default to 25) - /// UserPublicList - public UserPublicList ListUsers (string search = default, int? page = default, int? perPage = default) - { - ApiResponse localVarResponse = ListUsersWithHttpInfo(search, page, perPage); - return localVarResponse.Data; - } - - /// - /// List Users - /// - /// Thrown when fails to make API call - /// Search string to find users (optional) - /// Page number starting from 1 (optional, default to 1) - /// Number of items per page (optional, default to 25) - /// ApiResponse of UserPublicList - public ApiResponse ListUsersWithHttpInfo (string search = default, int? page = default, int? perPage = default) - { - - var localVarPath = "/users"; - 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 (search != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "search", search)); // 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 - - - // 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("ListUsers", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (UserPublicList) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(UserPublicList))); - } - - /// - /// List Users - /// - /// Thrown when fails to make API call - /// Search string to find users (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 UserPublicList - public async System.Threading.Tasks.Task ListUsersAsync (string search = default, int? page = default, int? perPage = default, CancellationToken cancellationToken = default(CancellationToken)) - { - ApiResponse localVarResponse = await ListUsersWithHttpInfoAsync(search, page, perPage, cancellationToken); - return localVarResponse.Data; - - } - - /// - /// List Users - /// - /// Thrown when fails to make API call - /// Search string to find users (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 (UserPublicList) - public async System.Threading.Tasks.Task> ListUsersWithHttpInfoAsync (string search = default, int? page = default, int? perPage = default, CancellationToken cancellationToken = default(CancellationToken)) - { - - var localVarPath = "/users"; - 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 (search != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "search", search)); // 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 - - - // 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("ListUsers", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (UserPublicList) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(UserPublicList))); - } - - } -} diff --git a/src/PollinationSDK/Client/ApiClient.cs b/src/PollinationSDK/Client/ApiClient.cs deleted file mode 100644 index 6943771ef..000000000 --- a/src/PollinationSDK/Client/ApiClient.cs +++ /dev/null @@ -1,553 +0,0 @@ -/* - * pollination-server - * - * Pollination Server OpenAPI Definition - * - * Contact: info@pollination.cloud - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Globalization; -using System.Text.RegularExpressions; -using System.IO; -using System.Threading; -using System.Runtime.Serialization; -using System.Web; -using System.Linq; -using System.Net; -using System.Text; -using Newtonsoft.Json; -using RestSharp; - -namespace PollinationSDK.Client -{ - /// - /// API client is mainly responsible for making the HTTP call to the API backend. - /// - public partial class ApiClient - { - private JsonSerializerSettings serializerSettings = new JsonSerializerSettings - { - ConstructorHandling = ConstructorHandling.AllowNonPublicDefaultConstructor, - MissingMemberHandling = MissingMemberHandling.Ignore, - NullValueHandling = NullValueHandling.Ignore, - Converters = new List() { new AnyOfJsonConverter() } - }; - - /// - /// Allows for extending request processing for generated code. - /// - /// The RestSharp request object - partial void InterceptRequest(IRestRequest request); - - /// - /// Allows for extending response processing for generated code. - /// - /// The RestSharp request object - /// The RestSharp response object - partial void InterceptResponse(IRestRequest request, IRestResponse response); - - /// - /// Initializes a new instance of the class - /// with default configuration. - /// - public ApiClient() - { - Configuration = PollinationSDK.Client.Configuration.Default; - RestClient = new RestClient("http://localhost"); - } - - /// - /// Initializes a new instance of the class - /// with default base path (http://localhost). - /// - /// An instance of Configuration. - public ApiClient(Configuration config) - { - Configuration = config ?? PollinationSDK.Client.Configuration.Default; - - RestClient = new RestClient(Configuration.BasePath); - } - - /// - /// Initializes a new instance of the class - /// with default configuration. - /// - /// The base path. - public ApiClient(String basePath = "http://localhost") - { - if (String.IsNullOrEmpty(basePath)) - throw new ArgumentException("basePath cannot be empty"); - - RestClient = new RestClient(basePath); - Configuration = Client.Configuration.Default; - } - - /// - /// Gets or sets the default API client for making HTTP calls. - /// - /// The default API client. - [Obsolete("ApiClient.Default is deprecated, please use 'Configuration.Default.ApiClient' instead.")] - public static ApiClient Default; - - /// - /// Gets or sets an instance of the IReadableConfiguration. - /// - /// An instance of the IReadableConfiguration. - /// - /// helps us to avoid modifying possibly global - /// configuration values from within a given client. It does not guarantee thread-safety - /// of the instance in any way. - /// - public IReadableConfiguration Configuration { get; set; } - - /// - /// Gets or sets the RestClient. - /// - /// An instance of the RestClient - public RestClient RestClient { get; set; } - - // Creates and sets up a RestRequest prior to a call. - private RestRequest PrepareRequest( - String path, RestSharp.Method method, List> queryParams, Object postBody, - Dictionary headerParams, Dictionary formParams, - Dictionary fileParams, Dictionary pathParams, - String contentType) - { - var request = new RestRequest(path, method); - - // add path parameter, if any - foreach(var param in pathParams) - request.AddParameter(param.Key, param.Value, ParameterType.UrlSegment); - - // add header parameter, if any - foreach(var param in headerParams) - request.AddHeader(param.Key, param.Value); - - // add query parameter, if any - foreach(var param in queryParams) - request.AddQueryParameter(param.Key, param.Value); - - // add form parameter, if any - foreach(var param in formParams) - request.AddParameter(param.Key, param.Value); - - // add file parameter, if any - foreach(var param in fileParams) - { - request.AddFile(param.Value.Name, param.Value.Writer, param.Value.FileName, param.Value.ContentLength, param.Value.ContentType); - } - - if (postBody != null) // http body (model or byte[]) parameter - { - request.AddParameter(contentType, postBody, ParameterType.RequestBody); - } - - return request; - } - - /// - /// Makes the HTTP request (Sync). - /// - /// URL path. - /// HTTP method. - /// Query parameters. - /// HTTP body (POST request). - /// Header parameters. - /// Form parameters. - /// File parameters. - /// Path parameters. - /// Content Type of the request - /// Object - public Object CallApi( - String path, RestSharp.Method method, List> queryParams, Object postBody, - Dictionary headerParams, Dictionary formParams, - Dictionary fileParams, Dictionary pathParams, - String contentType) - { - var request = PrepareRequest( - path, method, queryParams, postBody, headerParams, formParams, fileParams, - pathParams, contentType); - // set timeout - - RestClient.Timeout = Configuration.Timeout; - // set user agent - RestClient.UserAgent = Configuration.UserAgent; - - InterceptRequest(request); - var response = RestClient.Execute(request); - InterceptResponse(request, response); - - return (Object) response; - } - /// - /// Makes the asynchronous HTTP request. - /// - /// URL path. - /// HTTP method. - /// Query parameters. - /// HTTP body (POST request). - /// Header parameters. - /// Form parameters. - /// File parameters. - /// Path parameters. - /// Content type. - /// Cancellation Token. - /// The Task instance. - public async System.Threading.Tasks.Task CallApiAsync( - String path, RestSharp.Method method, List> queryParams, Object postBody, - Dictionary headerParams, Dictionary formParams, - Dictionary fileParams, Dictionary pathParams, - String contentType, CancellationToken cancellationToken) - { - var request = PrepareRequest( - path, method, queryParams, postBody, headerParams, formParams, fileParams, - pathParams, contentType); - RestClient.UserAgent = Configuration.UserAgent; - InterceptRequest(request); - var response = await RestClient.ExecuteTaskAsync(request, cancellationToken); - InterceptResponse(request, response); - return (Object)response; - } - - /// - /// Escape string (url-encoded). - /// - /// String to be escaped. - /// Escaped string. - public string EscapeString(string str) - { - return UrlEncode(str); - } - - /// - /// Create FileParameter based on Stream. - /// - /// Parameter name. - /// Input stream. - /// FileParameter. - public FileParameter ParameterToFile(string name, Stream stream) - { - if (stream is FileStream) - return FileParameter.Create(name, ReadAsBytes(stream), Path.GetFileName(((FileStream)stream).Name)); - else - return FileParameter.Create(name, ReadAsBytes(stream), "no_file_name_provided"); - } - - /// - /// If parameter is DateTime, output in a formatted string (default ISO 8601), customizable with Configuration.DateTime. - /// If parameter is a list, join the list with ",". - /// Otherwise just return the string. - /// - /// The parameter (header, path, query, form). - /// Formatted string. - public string ParameterToString(object obj) - { - if (obj is DateTime) - // Return a formatted date string - Can be customized with Configuration.DateTimeFormat - // Defaults to an ISO 8601, using the known as a Round-trip date/time pattern ("o") - // https://msdn.microsoft.com/en-us/library/az4se3k1(v=vs.110).aspx#Anchor_8 - // For example: 2009-06-15T13:45:30.0000000 - return ((DateTime)obj).ToString (Configuration.DateTimeFormat); - else if (obj is DateTimeOffset) - // Return a formatted date string - Can be customized with Configuration.DateTimeFormat - // Defaults to an ISO 8601, using the known as a Round-trip date/time pattern ("o") - // https://msdn.microsoft.com/en-us/library/az4se3k1(v=vs.110).aspx#Anchor_8 - // For example: 2009-06-15T13:45:30.0000000 - return ((DateTimeOffset)obj).ToString (Configuration.DateTimeFormat); - else if (obj is bool) - return (bool)obj ? "true" : "false"; - else if (obj is IList) - { - var flattenedString = new StringBuilder(); - foreach (var param in (IList)obj) - { - if (flattenedString.Length > 0) - flattenedString.Append(","); - flattenedString.Append(param); - } - return flattenedString.ToString(); - } - else if (obj is Enum) - { - return GetEnumMemberAttrValue(obj.GetType(), obj); - } - else - return Convert.ToString (obj); - } - - public string GetEnumMemberAttrValue(Type enumType, object enumVal) - { - var memInfo = enumType.GetMember(enumVal.ToString()); - var attr = memInfo[0].GetCustomAttributes(false).OfType().FirstOrDefault(); - if (attr != null) - { - return attr.Value; - } - return null; - } - - /// - /// Deserialize the JSON string into a proper object. - /// - /// The HTTP response. - /// Object type. - /// Object representation of the JSON string. - public object Deserialize(IRestResponse response, Type type) - { - IList headers = response.Headers; - if (type == typeof(byte[])) // return byte array - { - return response.RawBytes; - } - - // TODO: ? if (type.IsAssignableFrom(typeof(Stream))) - if (type == typeof(Stream)) - { - if (headers != null) - { - var filePath = String.IsNullOrEmpty(Configuration.TempFolderPath) - ? Path.GetTempPath() - : Configuration.TempFolderPath; - var regex = new Regex(@"Content-Disposition=.*filename=['""]?([^'""\s]+)['""]?$"); - foreach (var header in headers) - { - var match = regex.Match(header.ToString()); - if (match.Success) - { - string fileName = filePath + SanitizeFilename(match.Groups[1].Value.Replace("\"", "").Replace("'", "")); - File.WriteAllBytes(fileName, response.RawBytes); - return new FileStream(fileName, FileMode.Open); - } - } - } - var stream = new MemoryStream(response.RawBytes); - return stream; - } - - if (type.Name.StartsWith("System.Nullable`1[[System.DateTime")) // return a datetime object - { - return DateTime.Parse(response.Content, null, System.Globalization.DateTimeStyles.RoundtripKind); - } - - if (type == typeof(String) || type.Name.StartsWith("System.Nullable")) // return primitive type - { - return ConvertType(response.Content, type); - } - - // at this point, it must be a model (json) - try - { - return JsonConvert.DeserializeObject(response.Content, type, serializerSettings); - } - catch (Exception e) - { - throw new ApiException(500, e.Message); - } - } - - /// - /// Serialize an input (model) into JSON string - /// - /// Object. - /// JSON string. - public String Serialize(object obj) - { - try - { - return obj != null ? JsonConvert.SerializeObject(obj, serializerSettings) : null; - } - catch (Exception e) - { - throw new ApiException(500, e.Message); - } - } - - /// - ///Check if the given MIME is a JSON MIME. - ///JSON MIME examples: - /// application/json - /// application/json; charset=UTF8 - /// APPLICATION/JSON - /// application/vnd.company+json - /// - /// MIME - /// Returns True if MIME type is json. - public bool IsJsonMime(String mime) - { - var jsonRegex = new Regex("(?i)^(application/json|[^;/ \t]+/[^;/ \t]+[+]json)[ \t]*(;.*)?$"); - return mime != null && (jsonRegex.IsMatch(mime) || mime.Equals("application/json-patch+json")); - } - - /// - /// Select the Content-Type header's value from the given content-type array: - /// if JSON type exists in the given array, use it; - /// otherwise use the first one defined in 'consumes' - /// - /// The Content-Type array to select from. - /// The Content-Type header to use. - public String SelectHeaderContentType(String[] contentTypes) - { - if (contentTypes.Length == 0) - return "application/json"; - - foreach (var contentType in contentTypes) - { - if (IsJsonMime(contentType.ToLower())) - return contentType; - } - - return contentTypes[0]; // use the first content type specified in 'consumes' - } - - /// - /// Select the Accept header's value from the given accepts array: - /// if JSON exists in the given array, use it; - /// otherwise use all of them (joining into a string) - /// - /// The accepts array to select from. - /// The Accept header to use. - public String SelectHeaderAccept(String[] accepts) - { - if (accepts.Length == 0) - return null; - - if (accepts.Contains("application/json", StringComparer.OrdinalIgnoreCase)) - return "application/json"; - - return String.Join(",", accepts); - } - - /// - /// Encode string in base64 format. - /// - /// String to be encoded. - /// Encoded string. - public static string Base64Encode(string text) - { - return System.Convert.ToBase64String(System.Text.Encoding.UTF8.GetBytes(text)); - } - - /// - /// Dynamically cast the object into target type. - /// - /// Object to be casted - /// Target type - /// Casted object - public static dynamic ConvertType(dynamic fromObject, Type toObject) - { - return Convert.ChangeType(fromObject, toObject); - } - - /// - /// Convert stream to byte array - /// - /// Input stream to be converted - /// Byte array - public static byte[] ReadAsBytes(Stream inputStream) - { - byte[] buf = new byte[16*1024]; - using (MemoryStream ms = new MemoryStream()) - { - int count; - while ((count = inputStream.Read(buf, 0, buf.Length)) > 0) - { - ms.Write(buf, 0, count); - } - return ms.ToArray(); - } - } - - /// - /// URL encode a string - /// Credit/Ref: https://github.com/restsharp/RestSharp/blob/master/RestSharp/Extensions/StringExtensions.cs#L50 - /// - /// String to be URL encoded - /// Byte array - public static string UrlEncode(string input) - { - const int maxLength = 32766; - - if (input == null) - { - throw new ArgumentNullException("input"); - } - - if (input.Length <= maxLength) - { - return Uri.EscapeDataString(input); - } - - StringBuilder sb = new StringBuilder(input.Length * 2); - int index = 0; - - while (index < input.Length) - { - int length = Math.Min(input.Length - index, maxLength); - string subString = input.Substring(index, length); - - sb.Append(Uri.EscapeDataString(subString)); - index += subString.Length; - } - - return sb.ToString(); - } - - /// - /// Sanitize filename by removing the path - /// - /// Filename - /// Filename - public static string SanitizeFilename(string filename) - { - Match match = Regex.Match(filename, @".*[/\\](.*)$"); - - if (match.Success) - { - return match.Groups[1].Value; - } - else - { - return filename; - } - } - - /// - /// Convert params to key/value pairs. - /// Use collectionFormat to properly format lists and collections. - /// - /// Collection format. - /// Key name. - /// Value object. - /// A list of KeyValuePairs - public IEnumerable> ParameterToKeyValuePairs(string collectionFormat, string name, object value) - { - var parameters = new List>(); - - if (IsCollection(value) && collectionFormat == "multi") - { - var valueCollection = value as IEnumerable; - parameters.AddRange(from object item in valueCollection select new KeyValuePair(name, ParameterToString(item))); - } - else - { - parameters.Add(new KeyValuePair(name, ParameterToString(value))); - } - - return parameters; - } - - /// - /// Check if generic object is a collection. - /// - /// - /// True if object is a collection type - private static bool IsCollection(object value) - { - return value is IList || value is ICollection; - } - } -} diff --git a/src/PollinationSDK/Client/ApiException.cs b/src/PollinationSDK/Client/ApiException.cs deleted file mode 100644 index a770b4940..000000000 --- a/src/PollinationSDK/Client/ApiException.cs +++ /dev/null @@ -1,59 +0,0 @@ -/* - * pollination-server - * - * Pollination Server OpenAPI Definition - * - * Contact: info@pollination.cloud - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; - -namespace PollinationSDK.Client -{ - /// - /// API Exception - /// - public class ApiException : Exception - { - /// - /// Gets or sets the error code (HTTP status code) - /// - /// The error code (HTTP status code). - public int ErrorCode { get; set; } - - /// - /// Gets or sets the error content (body json object) - /// - /// The error content (Http response body). - public dynamic ErrorContent { get; private set; } - - /// - /// Initializes a new instance of the class. - /// - public ApiException() {} - - /// - /// Initializes a new instance of the class. - /// - /// HTTP status code. - /// Error message. - public ApiException(int errorCode, string message) : base(message) - { - this.ErrorCode = errorCode; - } - - /// - /// Initializes a new instance of the class. - /// - /// HTTP status code. - /// Error message. - /// Error content. - public ApiException(int errorCode, string message, dynamic errorContent = null) : base(message) - { - this.ErrorCode = errorCode; - this.ErrorContent = errorContent; - } - } - -} diff --git a/src/PollinationSDK/Client/ApiResponse.cs b/src/PollinationSDK/Client/ApiResponse.cs deleted file mode 100644 index b54fc0500..000000000 --- a/src/PollinationSDK/Client/ApiResponse.cs +++ /dev/null @@ -1,53 +0,0 @@ -/* - * 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; - -namespace PollinationSDK.Client -{ - /// - /// API Response - /// - public class ApiResponse - { - /// - /// Gets or sets the status code (HTTP status code) - /// - /// The status code. - public int StatusCode { get; private set; } - - /// - /// Gets or sets the HTTP headers - /// - /// HTTP headers - public IDictionary Headers { get; private set; } - - /// - /// Gets or sets the data (parsed HTTP body) - /// - /// The data. - public T Data { get; private set; } - - /// - /// Initializes a new instance of the class. - /// - /// HTTP status code. - /// HTTP headers. - /// Data (parsed HTTP body) - public ApiResponse(int statusCode, IDictionary headers, T data) - { - this.StatusCode= statusCode; - this.Headers = headers; - this.Data = data; - } - - } - -} diff --git a/src/PollinationSDK/Client/Configuration.cs b/src/PollinationSDK/Client/Configuration.cs deleted file mode 100644 index 310bf03d2..000000000 --- a/src/PollinationSDK/Client/Configuration.cs +++ /dev/null @@ -1,541 +0,0 @@ -/* - * pollination-server - * - * Pollination Server OpenAPI Definition - * - * Contact: info@pollination.cloud - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Reflection; -using System.Collections.Concurrent; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using System.Text; -using RestSharp; - -namespace PollinationSDK.Client -{ - /// - /// TokenRepo is responsible for holding and acquiring auth tokens - /// - public class TokenRepo - { - public string RefreshURL; - private string IDToken; - public DateTime ExpiresAt; - public string RefreshToken; - - public TokenRepo(string refreshURL, string idToken, int expiresInSeconds, string refreshToken) - { - RefreshURL = refreshURL; - IDToken = idToken; - ExpiresAt = DateTime.Now.AddSeconds(expiresInSeconds); - RefreshToken = refreshToken; - this.LogTokenExpiration(); - } - - private void LogTokenExpiration() - { - Helper.Logger.Information($"Token expires at: {ExpiresAt}"); - } - - private void DoTokenRefresh() - { - var client = new RestClient(this.RefreshURL); - - var req = new RestRequest().AddJsonBody( - new Dictionary - { - {"token", this.RefreshToken} - } - ); - - var res = client.Post>(req); - - string detail = null; - - res.Data.TryGetValue("detail", out detail); - res.Data.TryGetValue("message", out detail); - - if (detail != null) - { - throw new Exception(detail); - } - - this.IDToken = res.Data["id_token"]; - this.ExpiresAt = DateTime.Now.AddSeconds(int.Parse(res.Data["expires_in"])); - this.RefreshToken = res.Data["refresh_token"]; - } - - private void DoTokenRefreshLogged() - { - Helper.Logger.Information("Refreshing token"); - this.DoTokenRefresh(); - Helper.Logger.Information("Token refresh finished"); - this.LogTokenExpiration(); - } - public string GetToken() - { - if (DateTime.Now >= this.ExpiresAt) - { - this.DoTokenRefreshLogged(); - } - - return this.IDToken; - } - } - - /// - /// Represents a set of configuration settings - /// - public class Configuration : IReadableConfiguration - { - #region Constants - - /// - /// Version of the package. - /// - /// Version of the package. - public const string Version = "0.14.0"; - - /// - /// Identifier for ISO 8601 DateTime Format - /// - /// See https://msdn.microsoft.com/en-us/library/az4se3k1(v=vs.110).aspx#Anchor_8 for more information. - // ReSharper disable once InconsistentNaming - public const string ISO8601_DATETIME_FORMAT = "o"; - - #endregion Constants - - #region Static Members - - private static readonly object GlobalConfigSync = new { }; - private static Configuration _globalConfiguration; - - /// - /// Default creation of exceptions for a given method name and response object - /// - public static readonly ExceptionFactory DefaultExceptionFactory = (methodName, response) => - { - var status = (int)response.StatusCode; - if (status >= 400) - { - return new ApiException(status, - string.Format("Error calling {0}: {1}", methodName, response.Content), - response.Content); - } - if (status == 0) - { - return new ApiException(status, - string.Format("Error calling {0}: {1}", methodName, response.ErrorMessage), response.ErrorMessage); - } - return null; - }; - - /// - /// Gets or sets the default Configuration. - /// - /// Configuration. - public static Configuration Default - { - get { return _globalConfiguration; } - set - { - lock (GlobalConfigSync) - { - _globalConfiguration = value; - } - } - } - - #endregion Static Members - - #region Private Members - - /// - /// Gets or sets the API key based on the authentication name. - /// - /// The API key. - private IDictionary _apiKey = null; - - /// - /// Gets or sets the prefix (e.g. Token) of the API key based on the authentication name. - /// - /// The prefix of the API key. - private IDictionary _apiKeyPrefix = null; - - private string _dateTimeFormat = ISO8601_DATETIME_FORMAT; - private string _tempFolderPath = Path.GetTempPath(); - - #endregion Private Members - - #region Public Members - - public TokenRepo TokenRepo; - - #endregion - - #region Constructors - - static Configuration() - { - _globalConfiguration = new GlobalConfiguration(); - } - - /// - /// Initializes a new instance of the class - /// - public Configuration() - { - UserAgent = "OpenAPI-Generator/0.14.0/csharp"; - BasePath = "http://localhost"; - DefaultHeader = new ConcurrentDictionary(); - ApiKey = new ConcurrentDictionary(); - ApiKeyPrefix = new ConcurrentDictionary(); - - // Setting Timeout has side effects (forces ApiClient creation). - Timeout = Env.HTTPTimeout; - } - - /// - /// Initializes a new instance of the class - /// - public Configuration( - IDictionary defaultHeader, - IDictionary apiKey, - IDictionary apiKeyPrefix, - string basePath = "http://localhost") : this() - { - if (string.IsNullOrWhiteSpace(basePath)) - throw new ArgumentException("The provided basePath is invalid.", "basePath"); - if (defaultHeader == null) - throw new ArgumentNullException("defaultHeader"); - if (apiKey == null) - throw new ArgumentNullException("apiKey"); - if (apiKeyPrefix == null) - throw new ArgumentNullException("apiKeyPrefix"); - - BasePath = basePath; - - foreach (var keyValuePair in defaultHeader) - { - DefaultHeader.Add(keyValuePair); - } - - foreach (var keyValuePair in apiKey) - { - ApiKey.Add(keyValuePair); - } - - foreach (var keyValuePair in apiKeyPrefix) - { - ApiKeyPrefix.Add(keyValuePair); - } - } - - /// - /// Initializes a new instance of the class with different settings - /// - /// Api client - /// Dictionary of default HTTP header - /// Username - /// Password - /// accessToken - /// Dictionary of API key - /// Dictionary of API key prefix - /// Temp folder path - /// DateTime format string - /// HTTP connection timeout (in milliseconds) - /// HTTP user agent - [Obsolete("Use explicit object construction and setting of properties.", true)] - public Configuration( - // ReSharper disable UnusedParameter.Local - ApiClient apiClient = null, - IDictionary defaultHeader = null, - string username = null, - string password = null, - string accessToken = null, - IDictionary apiKey = null, - IDictionary apiKeyPrefix = null, - string tempFolderPath = null, - string dateTimeFormat = null, - int timeout = 100000, - string userAgent = "OpenAPI-Generator/0.14.0/csharp" - // ReSharper restore UnusedParameter.Local - ) - { - - } - - /// - /// Initializes a new instance of the Configuration class. - /// - /// Api client. - [Obsolete("This constructor caused unexpected sharing of static data. It is no longer supported.", true)] - // ReSharper disable once UnusedParameter.Local - public Configuration(ApiClient apiClient) - { - - } - - #endregion Constructors - - - #region Properties - - private ApiClient _apiClient = null; - /// - /// Gets an instance of an ApiClient for this configuration - /// - public virtual ApiClient ApiClient - { - get - { - if (_apiClient == null) _apiClient = CreateApiClient(); - return _apiClient; - } - } - - private String _basePath = null; - /// - /// Gets or sets the base path for API access. - /// - public virtual string BasePath - { - get { return _basePath; } - set - { - _basePath = value; - // pass-through to ApiClient if it's set. - if (_apiClient != null) - { - _apiClient.RestClient.BaseUrl = new Uri(_basePath); - } - } - } - - /// - /// Gets or sets the default header. - /// - public virtual IDictionary DefaultHeader { get; set; } - - /// - /// Gets or sets the HTTP timeout (milliseconds) of ApiClient. Default to 100000 milliseconds. - /// - public virtual int Timeout - { - - get { return ApiClient.RestClient.Timeout; } - set { ApiClient.RestClient.Timeout = value; } - } - - /// - /// Gets or sets the HTTP user agent. - /// - /// Http user agent. - public virtual string UserAgent { get; set; } - - /// - /// Gets or sets the username (HTTP basic authentication). - /// - /// The username. - public virtual string Username { get; set; } - - /// - /// Gets or sets the password (HTTP basic authentication). - /// - /// The password. - public virtual string Password { get; set; } - - /// - /// Gets the API key with prefix. - /// - /// API key identifier (authentication scheme). - /// API key with prefix. - public string GetApiKeyWithPrefix(string apiKeyIdentifier) - { - var apiKeyValue = ""; - ApiKey.TryGetValue(apiKeyIdentifier, out apiKeyValue); - var apiKeyPrefix = ""; - if (ApiKeyPrefix.TryGetValue(apiKeyIdentifier, out apiKeyPrefix)) - return apiKeyPrefix + " " + apiKeyValue; - else - return apiKeyValue; - } - - /// - /// Gets or sets the access token for OAuth2 authentication. - /// - /// The access token. - public virtual string AccessToken - { - get - { - if (TokenRepo != null) - { - return TokenRepo.GetToken(); - } - return ""; - } - } - - /// - /// Gets or sets the temporary folder path to store the files downloaded from the server. - /// - /// Folder path. - public virtual string TempFolderPath - { - get { return _tempFolderPath; } - - set - { - if (string.IsNullOrEmpty(value)) - { - _tempFolderPath = Path.GetTempPath(); - return; - } - - // create the directory if it does not exist - if (!Directory.Exists(value)) - { - Directory.CreateDirectory(value); - } - - // check if the path contains directory separator at the end - if (value[value.Length - 1] == Path.DirectorySeparatorChar) - { - _tempFolderPath = value; - } - else - { - _tempFolderPath = value + Path.DirectorySeparatorChar; - } - } - } - - /// - /// Gets or sets the date time format used when serializing in the ApiClient - /// By default, it's set to ISO 8601 - "o", for others see: - /// https://msdn.microsoft.com/en-us/library/az4se3k1(v=vs.110).aspx - /// and https://msdn.microsoft.com/en-us/library/8kb3ddd4(v=vs.110).aspx - /// No validation is done to ensure that the string you're providing is valid - /// - /// The DateTimeFormat string - public virtual string DateTimeFormat - { - get { return _dateTimeFormat; } - set - { - if (string.IsNullOrEmpty(value)) - { - // Never allow a blank or null string, go back to the default - _dateTimeFormat = ISO8601_DATETIME_FORMAT; - return; - } - - // Caution, no validation when you choose date time format other than ISO 8601 - // Take a look at the above links - _dateTimeFormat = value; - } - } - - /// - /// Gets or sets the prefix (e.g. Token) of the API key based on the authentication name. - /// - /// The prefix of the API key. - public virtual IDictionary ApiKeyPrefix - { - get { return _apiKeyPrefix; } - set - { - if (value == null) - { - throw new InvalidOperationException("ApiKeyPrefix collection may not be null."); - } - _apiKeyPrefix = value; - } - } - - /// - /// Gets or sets the API key based on the authentication name. - /// - /// The API key. - public virtual IDictionary ApiKey - { - get { return _apiKey; } - set - { - if (value == null) - { - throw new InvalidOperationException("ApiKey collection may not be null."); - } - _apiKey = value; - } - } - - #endregion Properties - - #region Methods - - /// - /// Add default header. - /// - /// Header field name. - /// Header field value. - /// - public void AddDefaultHeader(string key, string value) - { - DefaultHeader[key] = value; - } - - /// - /// Creates a new based on this instance. - /// - /// - public ApiClient CreateApiClient() - { - return new ApiClient(BasePath) { Configuration = this }; - } - - - /// - /// Returns a string with essential information for debugging. - /// - 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"; - - return report; - } - - /// - /// Add Api Key Header. - /// - /// Api Key name. - /// Api Key value. - /// - public void AddApiKey(string key, string value) - { - ApiKey[key] = value; - } - - /// - /// Sets the API key prefix. - /// - /// Api Key name. - /// Api Key value. - public void AddApiKeyPrefix(string key, string value) - { - ApiKeyPrefix[key] = value; - } - - #endregion Methods - } -} diff --git a/src/PollinationSDK/Client/ExceptionFactory.cs b/src/PollinationSDK/Client/ExceptionFactory.cs deleted file mode 100644 index d16363491..000000000 --- a/src/PollinationSDK/Client/ExceptionFactory.cs +++ /dev/null @@ -1,23 +0,0 @@ -/* - * pollination-server - * - * Pollination Server OpenAPI Definition - * - * Contact: info@pollination.cloud - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using RestSharp; - -namespace PollinationSDK.Client -{ - /// - /// A delegate to ExceptionFactory method - /// - /// Method name - /// Response - /// Exceptions - public delegate Exception ExceptionFactory(string methodName, IRestResponse response); -} diff --git a/src/PollinationSDK/Client/GlobalConfiguration.cs b/src/PollinationSDK/Client/GlobalConfiguration.cs deleted file mode 100644 index e9158f333..000000000 --- a/src/PollinationSDK/Client/GlobalConfiguration.cs +++ /dev/null @@ -1,33 +0,0 @@ -/* - * pollination-server - * - * Pollination Server OpenAPI Definition - * - * Contact: info@pollination.cloud - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Reflection; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using System.Text; -using System.Threading; - -namespace PollinationSDK.Client -{ - /// - /// provides a compile-time extension point for globally configuring - /// API Clients. - /// - /// - /// A customized implementation via partial class may reside in another file and may - /// be excluded from automatic generation via a .openapi-generator-ignore file. - /// - public partial class GlobalConfiguration : Configuration - { - - } -} \ No newline at end of file diff --git a/src/PollinationSDK/Client/IApiAccessor.cs b/src/PollinationSDK/Client/IApiAccessor.cs deleted file mode 100644 index 0a47e256f..000000000 --- a/src/PollinationSDK/Client/IApiAccessor.cs +++ /dev/null @@ -1,41 +0,0 @@ -/* - * 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 RestSharp; - -namespace PollinationSDK.Client -{ - /// - /// Represents configuration aspects required to interact with the API endpoints. - /// - public interface IApiAccessor - { - /// - /// Gets or sets the configuration object - /// - /// An instance of the Configuration - Configuration Configuration {get; set;} - - /// - /// Gets the base path of the API client. - /// - /// The base path - String GetBasePath(); - - /// - /// Provides a factory method hook for the creation of exceptions. - /// - ExceptionFactory ExceptionFactory { get; set; } - } -} diff --git a/src/PollinationSDK/Client/IReadableConfiguration.cs b/src/PollinationSDK/Client/IReadableConfiguration.cs deleted file mode 100644 index 5405b9ffe..000000000 --- a/src/PollinationSDK/Client/IReadableConfiguration.cs +++ /dev/null @@ -1,93 +0,0 @@ -/* - * pollination-server - * - * Pollination Server OpenAPI Definition - * - * Contact: info@pollination.cloud - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System.Collections.Generic; - -namespace PollinationSDK.Client -{ - /// - /// Represents a readable-only configuration contract. - /// - public interface IReadableConfiguration - { - /// - /// Gets the access token. - /// - /// Access token. - string AccessToken { get; } - - /// - /// Gets the API key. - /// - /// API key. - IDictionary ApiKey { get; } - - /// - /// Gets the API key prefix. - /// - /// API key prefix. - IDictionary ApiKeyPrefix { get; } - - /// - /// Gets the base path. - /// - /// Base path. - string BasePath { get; } - - /// - /// Gets the date time format. - /// - /// Date time foramt. - string DateTimeFormat { get; } - - /// - /// Gets the default header. - /// - /// Default header. - IDictionary DefaultHeader { get; } - - /// - /// Gets the temp folder path. - /// - /// Temp folder path. - string TempFolderPath { get; } - - /// - /// Gets the HTTP connection timeout (in milliseconds) - /// - /// HTTP connection timeout. - int Timeout { get; } - - /// - /// Gets the user agent. - /// - /// User agent. - string UserAgent { get; } - - /// - /// Gets the username. - /// - /// Username. - string Username { get; } - - /// - /// Gets the password. - /// - /// Password. - string Password { get; } - - /// - /// Gets the API key with prefix. - /// - /// API key identifier (authentication scheme). - /// API key with prefix. - string GetApiKeyWithPrefix(string apiKeyIdentifier); - } -} diff --git a/src/PollinationSDK/Client/OpenAPIDateConverter.cs b/src/PollinationSDK/Client/OpenAPIDateConverter.cs deleted file mode 100644 index 64c38bba0..000000000 --- a/src/PollinationSDK/Client/OpenAPIDateConverter.cs +++ /dev/null @@ -1,29 +0,0 @@ -/* - * pollination-server - * - * Pollination Server OpenAPI Definition - * - * Contact: info@pollination.cloud - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using Newtonsoft.Json.Converters; - -namespace PollinationSDK.Client -{ - /// - /// Formatter for 'date' openapi formats ss defined by full-date - RFC3339 - /// see https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.0.md#data-types - /// - public class OpenAPIDateConverter : IsoDateTimeConverter - { - /// - /// Initializes a new instance of the class. - /// - public OpenAPIDateConverter() - { - // full-date = date-fullyear "-" date-month "-" date-mday - DateTimeFormat = "yyyy-MM-dd"; - } - } -} 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..0fdb8b761 --- /dev/null +++ b/src/PollinationSDK/Interface/Domains/Licenses/Entities.cs @@ -0,0 +1,14 @@ +//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 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..4efc1bfe6 --- /dev/null +++ b/src/PollinationSDK/Interface/Domains/Payments/Entities.cs @@ -0,0 +1,28 @@ +//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 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 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 SubscriptionItem: 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..777ec9847 --- /dev/null +++ b/src/PollinationSDK/Interface/Server/Rest/Licenses/Dto.cs @@ -0,0 +1,21 @@ +//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 Activation: PollinationSDK.Interface.Server.Rest.Licenses.IDto {} + 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..310ac0c28 --- /dev/null +++ b/src/PollinationSDK/Interface/Server/Rest/Payments/Dto.cs @@ -0,0 +1,27 @@ +//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 Inventory: 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 Subscription: PollinationSDK.Interface.Server.Rest.Payments.IDto {} + public partial class SubscriptionCreate: PollinationSDK.Interface.Server.Rest.Payments.IDto {} + public partial class SubscriptionItemPublic: PollinationSDK.Interface.Server.Rest.Payments.IDto {} + public partial class SubscriptionItemPublicList: 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/APIToken.cs b/src/PollinationSDK/Model/APIToken.cs deleted file mode 100644 index 05801f55d..000000000 --- a/src/PollinationSDK/Model/APIToken.cs +++ /dev/null @@ -1,251 +0,0 @@ -/* - * 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 -{ - /// - /// APIToken - /// - [DataContract(Name = "APIToken")] - public partial class APIToken : OpenAPIGenBaseModel, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected APIToken() - { - // Set non-required readonly properties with defaultValue - this.Type = "APIToken"; - } - - /// - /// Initializes a new instance of the class. - /// - /// The unique ID of this API token (required). - /// The user friendly name of the API token (required). - /// Key value pairs of auth claims the API token is entitled to. - public APIToken - ( - string tokenId, string name, // Required parameters - Dictionary claims= default // Optional parameters - ) : base()// BaseClass - { - // to ensure "tokenId" is required (not null) - this.TokenId = tokenId ?? throw new ArgumentNullException("tokenId is a required property for APIToken and cannot be null"); - // to ensure "name" is required (not null) - this.Name = name ?? throw new ArgumentNullException("name is a required property for APIToken and cannot be null"); - this.Claims = claims; - - // Set non-required readonly properties with defaultValue - this.Type = "APIToken"; - } - - //============================================== is ReadOnly - /// - /// Gets or Sets Type - /// - [DataMember(Name = "type", EmitDefaultValue = true)] - public string Type { get; protected internal set; } = "APIToken"; - - /// - /// The unique ID of this API token - /// - /// The unique ID of this API token - [DataMember(Name = "token_id", IsRequired = true, EmitDefaultValue = false)] - public string TokenId { get; set; } - /// - /// The user friendly name of the API token - /// - /// The user friendly name of the API token - [DataMember(Name = "name", IsRequired = true, EmitDefaultValue = false)] - public string Name { get; set; } - /// - /// Key value pairs of auth claims the API token is entitled to - /// - /// Key value pairs of auth claims the API token is entitled to - [DataMember(Name = "claims", EmitDefaultValue = false)] - public Dictionary Claims { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - return "APIToken"; - } - - /// - /// 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("APIToken:\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" TokenId: ").Append(TokenId).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" Claims: ").Append(Claims).Append("\n"); - return sb.ToString(); - } - - /// - /// Returns the object from JSON string - /// - /// APIToken object - public static APIToken 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. - /// - /// APIToken object - public virtual APIToken DuplicateAPIToken() - { - return FromJson(this.ToJson()); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel Duplicate() - { - return DuplicateAPIToken(); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel DuplicateOpenAPIGenBaseModel() - { - return DuplicateAPIToken(); - } - - /// - /// 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 APIToken); - } - - /// - /// Returns true if APIToken instances are equal - /// - /// Instance of APIToken to be compared - /// Boolean - public bool Equals(APIToken input) - { - if (input == null) - return false; - return base.Equals(input) && - ( - this.TokenId == input.TokenId || - (this.TokenId != null && - this.TokenId.Equals(input.TokenId)) - ) && base.Equals(input) && - ( - this.Name == input.Name || - (this.Name != null && - this.Name.Equals(input.Name)) - ) && base.Equals(input) && - ( - this.Claims == input.Claims || - this.Claims != null && - input.Claims != null && - this.Claims.SequenceEqual(input.Claims) - ) && 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.TokenId != null) - hashCode = hashCode * 59 + this.TokenId.GetHashCode(); - if (this.Name != null) - hashCode = hashCode * 59 + this.Name.GetHashCode(); - if (this.Claims != null) - hashCode = hashCode * 59 + this.Claims.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(@"^APIToken$", 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/APITokenCreate.cs b/src/PollinationSDK/Model/APITokenCreate.cs deleted file mode 100644 index ac14d3778..000000000 --- a/src/PollinationSDK/Model/APITokenCreate.cs +++ /dev/null @@ -1,206 +0,0 @@ -/* - * 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 -{ - /// - /// APITokenCreate - /// - [DataContract(Name = "APITokenCreate")] - public partial class APITokenCreate : APIToken, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected APITokenCreate() - { - // Set non-required readonly properties with defaultValue - this.Type = "APITokenCreate"; - } - - /// - /// Initializes a new instance of the class. - /// - /// The unique ID of this API token (required). - /// The user friendly name of the API token (required). - /// Key value pairs of auth claims the API token is entitled to. - public APITokenCreate - ( - string tokenId, string name, // Required parameters - Dictionary claims= default // Optional parameters - ) : base(tokenId: tokenId, name: name, claims: claims)// BaseClass - { - - // Set non-required readonly properties with defaultValue - this.Type = "APITokenCreate"; - } - - //============================================== is ReadOnly - /// - /// Gets or Sets Type - /// - [DataMember(Name = "type", EmitDefaultValue = true)] - public string Type { get; protected internal set; } = "APITokenCreate"; - - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - return "APITokenCreate"; - } - - /// - /// 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("APITokenCreate:\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" TokenId: ").Append(TokenId).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" Claims: ").Append(Claims).Append("\n"); - return sb.ToString(); - } - - /// - /// Returns the object from JSON string - /// - /// APITokenCreate object - public static APITokenCreate 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. - /// - /// APITokenCreate object - public virtual APITokenCreate DuplicateAPITokenCreate() - { - return FromJson(this.ToJson()); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel Duplicate() - { - return DuplicateAPITokenCreate(); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override APIToken DuplicateAPIToken() - { - return DuplicateAPITokenCreate(); - } - - /// - /// 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 APITokenCreate); - } - - /// - /// Returns true if APITokenCreate instances are equal - /// - /// Instance of APITokenCreate to be compared - /// Boolean - public bool Equals(APITokenCreate 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(@"^APITokenCreate$", 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/APITokenList.cs b/src/PollinationSDK/Model/APITokenList.cs deleted file mode 100644 index 6018120c8..000000000 --- a/src/PollinationSDK/Model/APITokenList.cs +++ /dev/null @@ -1,287 +0,0 @@ -/* - * 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 = "APITokenList")] - public partial class APITokenList : OpenAPIGenBaseModel, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected APITokenList() - { - // Set non-required readonly properties with defaultValue - this.Type = "APITokenList"; - } - - /// - /// 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 APITokenList - ( - 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 APITokenList and cannot be null"); - this.NextPage = nextPage; - - // Set non-required readonly properties with defaultValue - this.Type = "APITokenList"; - } - - //============================================== is ReadOnly - /// - /// Gets or Sets Type - /// - [DataMember(Name = "type", EmitDefaultValue = true)] - public string Type { get; protected internal set; } = "APITokenList"; - - /// - /// 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 "APITokenList"; - } - - /// - /// 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("APITokenList:\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 - /// - /// APITokenList object - public static APITokenList 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. - /// - /// APITokenList object - public virtual APITokenList DuplicateAPITokenList() - { - return FromJson(this.ToJson()); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel Duplicate() - { - return DuplicateAPITokenList(); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel DuplicateOpenAPIGenBaseModel() - { - return DuplicateAPITokenList(); - } - - /// - /// 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 APITokenList); - } - - /// - /// Returns true if APITokenList instances are equal - /// - /// Instance of APITokenList to be compared - /// Boolean - public bool Equals(APITokenList 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(@"^APITokenList$", 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/APITokenPrivate.cs b/src/PollinationSDK/Model/APITokenPrivate.cs deleted file mode 100644 index 5cd6642dd..000000000 --- a/src/PollinationSDK/Model/APITokenPrivate.cs +++ /dev/null @@ -1,213 +0,0 @@ -/* - * 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 -{ - /// - /// APITokenPrivate - /// - [DataContract(Name = "APITokenPrivate")] - public partial class APITokenPrivate : APITokenCreate, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected APITokenPrivate() - { - // Set non-required readonly properties with defaultValue - this.Type = "APITokenPrivate"; - } - - /// - /// Initializes a new instance of the class. - /// - /// The decoded API token (required). - /// The unique ID of this API token (required). - /// The user friendly name of the API token (required). - /// Key value pairs of auth claims the API token is entitled to. - public APITokenPrivate - ( - string tokenId, string name, string token, // Required parameters - Dictionary claims= default // Optional parameters - ) : base(tokenId: tokenId, name: name, claims: claims)// BaseClass - { - // to ensure "token" is required (not null) - this.Token = token ?? throw new ArgumentNullException("token is a required property for APITokenPrivate and cannot be null"); - - // Set non-required readonly properties with defaultValue - this.Type = "APITokenPrivate"; - } - - //============================================== is ReadOnly - /// - /// Gets or Sets Type - /// - [DataMember(Name = "type", EmitDefaultValue = true)] - public string Type { get; protected internal set; } = "APITokenPrivate"; - - /// - /// The decoded API token - /// - /// The decoded API token - [DataMember(Name = "token", IsRequired = true, EmitDefaultValue = false)] - public string Token { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - return "APITokenPrivate"; - } - - /// - /// 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("APITokenPrivate:\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" TokenId: ").Append(TokenId).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" Claims: ").Append(Claims).Append("\n"); - sb.Append(" Token: ").Append(Token).Append("\n"); - return sb.ToString(); - } - - /// - /// Returns the object from JSON string - /// - /// APITokenPrivate object - public static APITokenPrivate 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. - /// - /// APITokenPrivate object - public virtual APITokenPrivate DuplicateAPITokenPrivate() - { - return FromJson(this.ToJson()); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel Duplicate() - { - return DuplicateAPITokenPrivate(); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override APITokenCreate DuplicateAPITokenCreate() - { - return DuplicateAPITokenPrivate(); - } - - /// - /// 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 APITokenPrivate); - } - - /// - /// Returns true if APITokenPrivate instances are equal - /// - /// Instance of APITokenPrivate to be compared - /// Boolean - public bool Equals(APITokenPrivate input) - { - if (input == null) - return false; - return base.Equals(input) && - ( - this.Token == input.Token || - (this.Token != null && - this.Token.Equals(input.Token)) - ) && 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.Token != null) - hashCode = hashCode * 59 + this.Token.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(@"^APITokenPrivate$", 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/AccessPolicy.cs b/src/PollinationSDK/Model/AccessPolicy.cs deleted file mode 100644 index bbecbed94..000000000 --- a/src/PollinationSDK/Model/AccessPolicy.cs +++ /dev/null @@ -1,223 +0,0 @@ -/* - * 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 -{ - /// - /// AccessPolicy - /// - [DataContract(Name = "AccessPolicy")] - public partial class AccessPolicy : OpenAPIGenBaseModel, IEquatable, IValidatableObject - { - /// - /// The permission given to the subject of the access policy - /// - /// The permission given to the subject of the access policy - [DataMember(Name="permission", EmitDefaultValue=false)] - public Permission Permission { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected AccessPolicy() - { - // Set non-required readonly properties with defaultValue - this.Type = "AccessPolicy"; - } - - /// - /// Initializes a new instance of the class. - /// - /// The subject of the access policy (required). - /// The permission given to the subject of the access policy (required). - public AccessPolicy - ( - PolicySubject 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 AccessPolicy and cannot be null"); - this.Permission = permission; - - // Set non-required readonly properties with defaultValue - this.Type = "AccessPolicy"; - } - - //============================================== is ReadOnly - /// - /// Gets or Sets Type - /// - [DataMember(Name = "type", EmitDefaultValue = true)] - public string Type { get; protected internal set; } = "AccessPolicy"; - - /// - /// 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 "AccessPolicy"; - } - - /// - /// 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("AccessPolicy:\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 - /// - /// AccessPolicy object - public static AccessPolicy 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. - /// - /// AccessPolicy object - public virtual AccessPolicy DuplicateAccessPolicy() - { - return FromJson(this.ToJson()); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel Duplicate() - { - return DuplicateAccessPolicy(); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel DuplicateOpenAPIGenBaseModel() - { - return DuplicateAccessPolicy(); - } - - /// - /// 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 AccessPolicy); - } - - /// - /// Returns true if AccessPolicy instances are equal - /// - /// Instance of AccessPolicy to be compared - /// Boolean - public bool Equals(AccessPolicy 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(@"^AccessPolicy$", 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/AccessPolicyList.cs b/src/PollinationSDK/Model/AccessPolicyList.cs deleted file mode 100644 index 831757abc..000000000 --- a/src/PollinationSDK/Model/AccessPolicyList.cs +++ /dev/null @@ -1,287 +0,0 @@ -/* - * 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 = "AccessPolicyList")] - public partial class AccessPolicyList : OpenAPIGenBaseModel, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected AccessPolicyList() - { - // Set non-required readonly properties with defaultValue - this.Type = "AccessPolicyList"; - } - - /// - /// 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 AccessPolicyList - ( - 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 AccessPolicyList and cannot be null"); - this.NextPage = nextPage; - - // Set non-required readonly properties with defaultValue - this.Type = "AccessPolicyList"; - } - - //============================================== is ReadOnly - /// - /// Gets or Sets Type - /// - [DataMember(Name = "type", EmitDefaultValue = true)] - public string Type { get; protected internal set; } = "AccessPolicyList"; - - /// - /// 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 "AccessPolicyList"; - } - - /// - /// 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("AccessPolicyList:\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 - /// - /// AccessPolicyList object - public static AccessPolicyList 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. - /// - /// AccessPolicyList object - public virtual AccessPolicyList DuplicateAccessPolicyList() - { - return FromJson(this.ToJson()); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel Duplicate() - { - return DuplicateAccessPolicyList(); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel DuplicateOpenAPIGenBaseModel() - { - return DuplicateAccessPolicyList(); - } - - /// - /// 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 AccessPolicyList); - } - - /// - /// Returns true if AccessPolicyList instances are equal - /// - /// Instance of AccessPolicyList to be compared - /// Boolean - public bool Equals(AccessPolicyList 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(@"^AccessPolicyList$", 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/AccountPublic.cs b/src/PollinationSDK/Model/AccountPublic.cs deleted file mode 100644 index cf93a7246..000000000 --- a/src/PollinationSDK/Model/AccountPublic.cs +++ /dev/null @@ -1,284 +0,0 @@ -/* - * 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 -{ - /// - /// AccountPublic - /// - [DataContract(Name = "AccountPublic")] - public partial class AccountPublic : OpenAPIGenBaseModel, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected AccountPublic() - { - // Set non-required readonly properties with defaultValue - this.Type = "AccountPublic"; - } - - /// - /// Initializes a new instance of the class. - /// - /// id (required). - /// accountType (required). - /// name (required). - /// displayName. - /// description. - /// https://robohash.org/ladybugbot. - public AccountPublic - ( - string id, string accountType, string name, // Required parameters - string displayName= default, string description= default, string pictureUrl= default // Optional parameters - ) : base()// BaseClass - { - // to ensure "id" is required (not null) - this.Id = id ?? throw new ArgumentNullException("id is a required property for AccountPublic and cannot be null"); - // to ensure "accountType" is required (not null) - this.AccountType = accountType ?? throw new ArgumentNullException("accountType is a required property for AccountPublic and cannot be null"); - // to ensure "name" is required (not null) - this.Name = name ?? throw new ArgumentNullException("name is a required property for AccountPublic and cannot be null"); - this.DisplayName = displayName; - this.Description = description; - this.PictureUrl = pictureUrl; - - // Set non-required readonly properties with defaultValue - this.Type = "AccountPublic"; - } - - //============================================== is ReadOnly - /// - /// Gets or Sets Type - /// - [DataMember(Name = "type", EmitDefaultValue = true)] - public string Type { get; protected internal set; } = "AccountPublic"; - - /// - /// Gets or Sets Id - /// - [DataMember(Name = "id", IsRequired = true, EmitDefaultValue = false)] - public string Id { get; set; } - /// - /// Gets or Sets AccountType - /// - [DataMember(Name = "account_type", IsRequired = true, EmitDefaultValue = false)] - public string AccountType { get; set; } - /// - /// Gets or Sets Name - /// - [DataMember(Name = "name", IsRequired = true, EmitDefaultValue = false)] - public string Name { get; set; } - /// - /// Gets or Sets DisplayName - /// - [DataMember(Name = "display_name", EmitDefaultValue = false)] - public string DisplayName { get; set; } - /// - /// Gets or Sets Description - /// - [DataMember(Name = "description", EmitDefaultValue = false)] - public string Description { get; set; } - /// - /// https://robohash.org/ladybugbot - /// - /// https://robohash.org/ladybugbot - [DataMember(Name = "picture_url", EmitDefaultValue = false)] - public string PictureUrl { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - return "AccountPublic"; - } - - /// - /// 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("AccountPublic:\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" AccountType: ").Append(AccountType).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" DisplayName: ").Append(DisplayName).Append("\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" PictureUrl: ").Append(PictureUrl).Append("\n"); - return sb.ToString(); - } - - /// - /// Returns the object from JSON string - /// - /// AccountPublic object - public static AccountPublic 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. - /// - /// AccountPublic object - public virtual AccountPublic DuplicateAccountPublic() - { - return FromJson(this.ToJson()); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel Duplicate() - { - return DuplicateAccountPublic(); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel DuplicateOpenAPIGenBaseModel() - { - return DuplicateAccountPublic(); - } - - /// - /// 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 AccountPublic); - } - - /// - /// Returns true if AccountPublic instances are equal - /// - /// Instance of AccountPublic to be compared - /// Boolean - public bool Equals(AccountPublic 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.AccountType == input.AccountType || - (this.AccountType != null && - this.AccountType.Equals(input.AccountType)) - ) && base.Equals(input) && - ( - this.Name == input.Name || - (this.Name != null && - this.Name.Equals(input.Name)) - ) && 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.PictureUrl == input.PictureUrl || - (this.PictureUrl != null && - this.PictureUrl.Equals(input.PictureUrl)) - ) && 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.AccountType != null) - hashCode = hashCode * 59 + this.AccountType.GetHashCode(); - if (this.Name != null) - hashCode = hashCode * 59 + this.Name.GetHashCode(); - if (this.DisplayName != null) - hashCode = hashCode * 59 + this.DisplayName.GetHashCode(); - if (this.Description != null) - hashCode = hashCode * 59 + this.Description.GetHashCode(); - if (this.PictureUrl != null) - hashCode = hashCode * 59 + this.PictureUrl.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(@"^AccountPublic$", 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/ArtifactSource.cs b/src/PollinationSDK/Model/ArtifactSource.cs deleted file mode 100644 index 96d0bc8b7..000000000 --- a/src/PollinationSDK/Model/ArtifactSource.cs +++ /dev/null @@ -1,207 +0,0 @@ -/* - * 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 -{ - /// - /// ArtifactSource. An Artifact Source System. - /// - [DataContract(Name = "_ArtifactSource")] - public partial class ArtifactSource : OpenAPIGenBaseModel, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. - public ArtifactSource - ( - // Required parameters - Dictionary annotations= default// Optional parameters - ) : base()// BaseClass - { - this.Annotations = annotations; - - // Set non-required readonly properties with defaultValue - this.Type = "_ArtifactSource"; - } - - //============================================== is ReadOnly - /// - /// Gets or Sets Type - /// - [DataMember(Name = "type", EmitDefaultValue = true)] - public string Type { get; protected internal set; } = "_ArtifactSource"; - - /// - /// 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; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - return "ArtifactSource"; - } - - /// - /// 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("ArtifactSource:\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" Annotations: ").Append(Annotations).Append("\n"); - return sb.ToString(); - } - - /// - /// Returns the object from JSON string - /// - /// ArtifactSource object - public static ArtifactSource 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. - /// - /// ArtifactSource object - public virtual ArtifactSource DuplicateArtifactSource() - { - return FromJson(this.ToJson()); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel Duplicate() - { - return DuplicateArtifactSource(); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel DuplicateOpenAPIGenBaseModel() - { - return DuplicateArtifactSource(); - } - - /// - /// 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 ArtifactSource); - } - - /// - /// Returns true if ArtifactSource instances are equal - /// - /// Instance of ArtifactSource to be compared - /// Boolean - public bool Equals(ArtifactSource 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.Annotations == input.Annotations || - this.Annotations != null && - input.Annotations != null && - this.Annotations.SequenceEqual(input.Annotations) - ); - } - - /// - /// 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.Annotations != null) - hashCode = hashCode * 59 + this.Annotations.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(@"^_ArtifactSource$", 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/BaseReference.cs b/src/PollinationSDK/Model/BaseReference.cs deleted file mode 100644 index b9ef20003..000000000 --- a/src/PollinationSDK/Model/BaseReference.cs +++ /dev/null @@ -1,207 +0,0 @@ -/* - * 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 Base reference model. - /// - [DataContract(Name = "_BaseReference")] - public partial class BaseReference : OpenAPIGenBaseModel, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. - public BaseReference - ( - // Required parameters - Dictionary annotations= default// Optional parameters - ) : base()// BaseClass - { - this.Annotations = annotations; - - // Set non-required readonly properties with defaultValue - this.Type = "_BaseReference"; - } - - //============================================== is ReadOnly - /// - /// Gets or Sets Type - /// - [DataMember(Name = "type", EmitDefaultValue = true)] - public string Type { get; protected internal set; } = "_BaseReference"; - - /// - /// 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; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - return "BaseReference"; - } - - /// - /// 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("BaseReference:\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" Annotations: ").Append(Annotations).Append("\n"); - return sb.ToString(); - } - - /// - /// Returns the object from JSON string - /// - /// BaseReference object - public static BaseReference 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. - /// - /// BaseReference object - public virtual BaseReference DuplicateBaseReference() - { - return FromJson(this.ToJson()); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel Duplicate() - { - return DuplicateBaseReference(); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel DuplicateOpenAPIGenBaseModel() - { - return DuplicateBaseReference(); - } - - /// - /// 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 BaseReference); - } - - /// - /// Returns true if BaseReference instances are equal - /// - /// Instance of BaseReference to be compared - /// Boolean - public bool Equals(BaseReference 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.Annotations == input.Annotations || - this.Annotations != null && - input.Annotations != null && - this.Annotations.SequenceEqual(input.Annotations) - ); - } - - /// - /// 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.Annotations != null) - hashCode = hashCode * 59 + this.Annotations.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(@"^_BaseReference$", 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/BaseStatus.cs b/src/PollinationSDK/Model/BaseStatus.cs deleted file mode 100644 index 26fc823b0..000000000 --- a/src/PollinationSDK/Model/BaseStatus.cs +++ /dev/null @@ -1,260 +0,0 @@ -/* - * 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 -{ - /// - /// Base Status model - /// - [DataContract(Name = "BaseStatus")] - public partial class BaseStatus : IOBase, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected BaseStatus() - { - // Set non-required readonly properties with defaultValue - this.Type = "BaseStatus"; - } - - /// - /// Initializes a new instance of the class. - /// - /// The time at which the task was started (required). - /// Any message produced by the task. Usually error/debugging hints.. - /// The time at which the task was completed. - /// Source url for the status object. It can be a recipe or a function.. - /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. - /// Place-holder. Overwrite this!. - /// Place-holder. Overwrite this!. - public BaseStatus - ( - DateTime startedAt, // Required parameters - Dictionary annotations= default, List inputs= default, List outputs= default, string message= default, DateTime finishedAt= default, string source= default // Optional parameters - ) : base(annotations: annotations, inputs: inputs, outputs: outputs)// BaseClass - { - this.StartedAt = startedAt; - this.Message = message; - this.FinishedAt = finishedAt; - this.Source = source; - - // Set non-required readonly properties with defaultValue - this.Type = "BaseStatus"; - } - - //============================================== is ReadOnly - /// - /// Gets or Sets Type - /// - [DataMember(Name = "type", EmitDefaultValue = true)] - public string Type { get; protected internal set; } = "BaseStatus"; - - /// - /// The time at which the task was started - /// - /// The time at which the task was started - [DataMember(Name = "started_at", IsRequired = true, EmitDefaultValue = false)] - public DateTime StartedAt { get; set; } - /// - /// Any message produced by the task. Usually error/debugging hints. - /// - /// Any message produced by the task. Usually error/debugging hints. - [DataMember(Name = "message", EmitDefaultValue = false)] - public string Message { get; set; } - /// - /// The time at which the task was completed - /// - /// The time at which the task was completed - [DataMember(Name = "finished_at", EmitDefaultValue = false)] - public DateTime FinishedAt { get; set; } - /// - /// Source url for the status object. It can be a recipe or a function. - /// - /// Source url for the status object. It can be a recipe or a function. - [DataMember(Name = "source", EmitDefaultValue = false)] - public string Source { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - return "BaseStatus"; - } - - /// - /// 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("BaseStatus:\n"); - sb.Append(" Type: ").Append(Type).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(" StartedAt: ").Append(StartedAt).Append("\n"); - sb.Append(" Message: ").Append(Message).Append("\n"); - sb.Append(" FinishedAt: ").Append(FinishedAt).Append("\n"); - sb.Append(" Source: ").Append(Source).Append("\n"); - return sb.ToString(); - } - - /// - /// Returns the object from JSON string - /// - /// BaseStatus object - public static BaseStatus 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. - /// - /// BaseStatus object - public virtual BaseStatus DuplicateBaseStatus() - { - return FromJson(this.ToJson()); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel Duplicate() - { - return DuplicateBaseStatus(); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override IOBase DuplicateIOBase() - { - return DuplicateBaseStatus(); - } - - /// - /// 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 BaseStatus); - } - - /// - /// Returns true if BaseStatus instances are equal - /// - /// Instance of BaseStatus to be compared - /// Boolean - public bool Equals(BaseStatus input) - { - if (input == null) - return false; - return base.Equals(input) && - ( - this.StartedAt == input.StartedAt || - (this.StartedAt != null && - this.StartedAt.Equals(input.StartedAt)) - ) && base.Equals(input) && - ( - this.Message == input.Message || - (this.Message != null && - this.Message.Equals(input.Message)) - ) && base.Equals(input) && - ( - this.FinishedAt == input.FinishedAt || - (this.FinishedAt != null && - this.FinishedAt.Equals(input.FinishedAt)) - ) && base.Equals(input) && - ( - this.Source == input.Source || - (this.Source != null && - this.Source.Equals(input.Source)) - ) && 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.StartedAt != null) - hashCode = hashCode * 59 + this.StartedAt.GetHashCode(); - if (this.Message != null) - hashCode = hashCode * 59 + this.Message.GetHashCode(); - if (this.FinishedAt != null) - hashCode = hashCode * 59 + this.FinishedAt.GetHashCode(); - if (this.Source != null) - hashCode = hashCode * 59 + this.Source.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(@"^BaseStatus$", 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/BodyPostPluginOwnerPluginsPost.cs b/src/PollinationSDK/Model/BodyPostPluginOwnerPluginsPost.cs deleted file mode 100644 index a8ddca988..000000000 --- a/src/PollinationSDK/Model/BodyPostPluginOwnerPluginsPost.cs +++ /dev/null @@ -1,206 +0,0 @@ -/* - * 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 -{ - /// - /// BodyPostPluginOwnerPluginsPost - /// - [DataContract(Name = "Body_post_plugin__owner__plugins_post")] - public partial class BodyPostPluginOwnerPluginsPost : OpenAPIGenBaseModel, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected BodyPostPluginOwnerPluginsPost() - { - // Set non-required readonly properties with defaultValue - this.Type = "Body_post_plugin__owner__plugins_post"; - } - - /// - /// Initializes a new instance of the class. - /// - /// package (required). - public BodyPostPluginOwnerPluginsPost - ( - System.IO.Stream package// Required parameters - // Optional parameters - ) : base()// BaseClass - { - // to ensure "package" is required (not null) - this.Package = package ?? throw new ArgumentNullException("package is a required property for BodyPostPluginOwnerPluginsPost and cannot be null"); - - // Set non-required readonly properties with defaultValue - this.Type = "Body_post_plugin__owner__plugins_post"; - } - - //============================================== is ReadOnly - /// - /// Gets or Sets Type - /// - [DataMember(Name = "type", EmitDefaultValue = true)] - public string Type { get; protected internal set; } = "Body_post_plugin__owner__plugins_post"; - - /// - /// Gets or Sets Package - /// - [DataMember(Name = "package", IsRequired = true, EmitDefaultValue = false)] - public System.IO.Stream Package { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - return "BodyPostPluginOwnerPluginsPost"; - } - - /// - /// 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("BodyPostPluginOwnerPluginsPost:\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" Package: ").Append(Package).Append("\n"); - return sb.ToString(); - } - - /// - /// Returns the object from JSON string - /// - /// BodyPostPluginOwnerPluginsPost object - public static BodyPostPluginOwnerPluginsPost 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. - /// - /// BodyPostPluginOwnerPluginsPost object - public virtual BodyPostPluginOwnerPluginsPost DuplicateBodyPostPluginOwnerPluginsPost() - { - return FromJson(this.ToJson()); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel Duplicate() - { - return DuplicateBodyPostPluginOwnerPluginsPost(); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel DuplicateOpenAPIGenBaseModel() - { - return DuplicateBodyPostPluginOwnerPluginsPost(); - } - - /// - /// 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 BodyPostPluginOwnerPluginsPost); - } - - /// - /// Returns true if BodyPostPluginOwnerPluginsPost instances are equal - /// - /// Instance of BodyPostPluginOwnerPluginsPost to be compared - /// Boolean - public bool Equals(BodyPostPluginOwnerPluginsPost input) - { - if (input == null) - return false; - return base.Equals(input) && - ( - this.Package == input.Package || - (this.Package != null && - this.Package.Equals(input.Package)) - ) && 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.Package != null) - hashCode = hashCode * 59 + this.Package.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(@"^Body_post_plugin__owner__plugins_post$", 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/BodyPostRecipeOwnerRecipesPost.cs b/src/PollinationSDK/Model/BodyPostRecipeOwnerRecipesPost.cs deleted file mode 100644 index 7f821b29c..000000000 --- a/src/PollinationSDK/Model/BodyPostRecipeOwnerRecipesPost.cs +++ /dev/null @@ -1,206 +0,0 @@ -/* - * 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 -{ - /// - /// BodyPostRecipeOwnerRecipesPost - /// - [DataContract(Name = "Body_post_recipe__owner__recipes_post")] - public partial class BodyPostRecipeOwnerRecipesPost : OpenAPIGenBaseModel, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected BodyPostRecipeOwnerRecipesPost() - { - // Set non-required readonly properties with defaultValue - this.Type = "Body_post_recipe__owner__recipes_post"; - } - - /// - /// Initializes a new instance of the class. - /// - /// package (required). - public BodyPostRecipeOwnerRecipesPost - ( - System.IO.Stream package// Required parameters - // Optional parameters - ) : base()// BaseClass - { - // to ensure "package" is required (not null) - this.Package = package ?? throw new ArgumentNullException("package is a required property for BodyPostRecipeOwnerRecipesPost and cannot be null"); - - // Set non-required readonly properties with defaultValue - this.Type = "Body_post_recipe__owner__recipes_post"; - } - - //============================================== is ReadOnly - /// - /// Gets or Sets Type - /// - [DataMember(Name = "type", EmitDefaultValue = true)] - public string Type { get; protected internal set; } = "Body_post_recipe__owner__recipes_post"; - - /// - /// Gets or Sets Package - /// - [DataMember(Name = "package", IsRequired = true, EmitDefaultValue = false)] - public System.IO.Stream Package { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - return "BodyPostRecipeOwnerRecipesPost"; - } - - /// - /// 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("BodyPostRecipeOwnerRecipesPost:\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" Package: ").Append(Package).Append("\n"); - return sb.ToString(); - } - - /// - /// Returns the object from JSON string - /// - /// BodyPostRecipeOwnerRecipesPost object - public static BodyPostRecipeOwnerRecipesPost 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. - /// - /// BodyPostRecipeOwnerRecipesPost object - public virtual BodyPostRecipeOwnerRecipesPost DuplicateBodyPostRecipeOwnerRecipesPost() - { - return FromJson(this.ToJson()); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel Duplicate() - { - return DuplicateBodyPostRecipeOwnerRecipesPost(); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel DuplicateOpenAPIGenBaseModel() - { - return DuplicateBodyPostRecipeOwnerRecipesPost(); - } - - /// - /// 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 BodyPostRecipeOwnerRecipesPost); - } - - /// - /// Returns true if BodyPostRecipeOwnerRecipesPost instances are equal - /// - /// Instance of BodyPostRecipeOwnerRecipesPost to be compared - /// Boolean - public bool Equals(BodyPostRecipeOwnerRecipesPost input) - { - if (input == null) - return false; - return base.Equals(input) && - ( - this.Package == input.Package || - (this.Package != null && - this.Package.Equals(input.Package)) - ) && 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.Package != null) - hashCode = hashCode * 59 + this.Package.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(@"^Body_post_recipe__owner__recipes_post$", 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/CloudJob.cs b/src/PollinationSDK/Model/CloudJob.cs deleted file mode 100644 index 8a287f883..000000000 --- a/src/PollinationSDK/Model/CloudJob.cs +++ /dev/null @@ -1,283 +0,0 @@ -/* - * 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 -{ - /// - /// CloudJob - /// - [DataContract(Name = "CloudJob")] - public partial class CloudJob : OpenAPIGenBaseModel, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected CloudJob() - { - // Set non-required readonly properties with defaultValue - this.Type = "CloudJob"; - } - - /// - /// Initializes a new instance of the class. - /// - /// The unique ID for this run (required). - /// The job specification (required). - /// author. - /// owner. - /// The recipe used to generate this . - /// The status of the job. - public CloudJob - ( - string id, Job spec, // Required parameters - AccountPublic author= default, AccountPublic owner= default, RecipeInterface recipe= default, JobStatus status= default // Optional parameters - ) : base()// BaseClass - { - // to ensure "id" is required (not null) - this.Id = id ?? throw new ArgumentNullException("id is a required property for CloudJob and cannot be null"); - // to ensure "spec" is required (not null) - this.Spec = spec ?? throw new ArgumentNullException("spec is a required property for CloudJob and cannot be null"); - this.Author = author; - this.Owner = owner; - this.Recipe = recipe; - this.Status = status; - - // Set non-required readonly properties with defaultValue - this.Type = "CloudJob"; - } - - //============================================== is ReadOnly - /// - /// Gets or Sets Type - /// - [DataMember(Name = "type", EmitDefaultValue = true)] - public string Type { get; protected internal set; } = "CloudJob"; - - /// - /// The unique ID for this run - /// - /// The unique ID for this run - [DataMember(Name = "id", IsRequired = true, EmitDefaultValue = false)] - public string Id { get; set; } - /// - /// The job specification - /// - /// The job specification - [DataMember(Name = "spec", IsRequired = true, EmitDefaultValue = false)] - public Job Spec { get; set; } - /// - /// author - /// - /// author - [DataMember(Name = "author", EmitDefaultValue = false)] - public AccountPublic Author { get; set; } - /// - /// owner - /// - /// owner - [DataMember(Name = "owner", EmitDefaultValue = false)] - public AccountPublic Owner { get; set; } - /// - /// The recipe used to generate this - /// - /// The recipe used to generate this - [DataMember(Name = "recipe", EmitDefaultValue = false)] - public RecipeInterface Recipe { get; set; } - /// - /// The status of the job - /// - /// The status of the job - [DataMember(Name = "status", EmitDefaultValue = false)] - public JobStatus Status { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - return "CloudJob"; - } - - /// - /// 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("CloudJob:\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" Spec: ").Append(Spec).Append("\n"); - sb.Append(" Author: ").Append(Author).Append("\n"); - sb.Append(" Owner: ").Append(Owner).Append("\n"); - sb.Append(" Recipe: ").Append(Recipe).Append("\n"); - sb.Append(" Status: ").Append(Status).Append("\n"); - return sb.ToString(); - } - - /// - /// Returns the object from JSON string - /// - /// CloudJob object - public static CloudJob 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. - /// - /// CloudJob object - public virtual CloudJob DuplicateCloudJob() - { - return FromJson(this.ToJson()); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel Duplicate() - { - return DuplicateCloudJob(); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel DuplicateOpenAPIGenBaseModel() - { - return DuplicateCloudJob(); - } - - /// - /// 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 CloudJob); - } - - /// - /// Returns true if CloudJob instances are equal - /// - /// Instance of CloudJob to be compared - /// Boolean - public bool Equals(CloudJob 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.Author == input.Author || - (this.Author != null && - this.Author.Equals(input.Author)) - ) && base.Equals(input) && - ( - this.Owner == input.Owner || - (this.Owner != null && - this.Owner.Equals(input.Owner)) - ) && base.Equals(input) && - ( - this.Recipe == input.Recipe || - (this.Recipe != null && - this.Recipe.Equals(input.Recipe)) - ) && base.Equals(input) && - ( - this.Status == input.Status || - (this.Status != null && - this.Status.Equals(input.Status)) - ) && 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.Spec != null) - hashCode = hashCode * 59 + this.Spec.GetHashCode(); - if (this.Author != null) - hashCode = hashCode * 59 + this.Author.GetHashCode(); - if (this.Owner != null) - hashCode = hashCode * 59 + this.Owner.GetHashCode(); - if (this.Recipe != null) - hashCode = hashCode * 59 + this.Recipe.GetHashCode(); - if (this.Status != null) - hashCode = hashCode * 59 + this.Status.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(@"^CloudJob$", 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/CloudJobList.cs b/src/PollinationSDK/Model/CloudJobList.cs deleted file mode 100644 index 765f40708..000000000 --- a/src/PollinationSDK/Model/CloudJobList.cs +++ /dev/null @@ -1,287 +0,0 @@ -/* - * 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 = "CloudJobList")] - public partial class CloudJobList : OpenAPIGenBaseModel, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected CloudJobList() - { - // Set non-required readonly properties with defaultValue - this.Type = "CloudJobList"; - } - - /// - /// 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 CloudJobList - ( - 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 CloudJobList and cannot be null"); - this.NextPage = nextPage; - - // Set non-required readonly properties with defaultValue - this.Type = "CloudJobList"; - } - - //============================================== is ReadOnly - /// - /// Gets or Sets Type - /// - [DataMember(Name = "type", EmitDefaultValue = true)] - public string Type { get; protected internal set; } = "CloudJobList"; - - /// - /// 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 "CloudJobList"; - } - - /// - /// 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("CloudJobList:\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 - /// - /// CloudJobList object - public static CloudJobList 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. - /// - /// CloudJobList object - public virtual CloudJobList DuplicateCloudJobList() - { - return FromJson(this.ToJson()); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel Duplicate() - { - return DuplicateCloudJobList(); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel DuplicateOpenAPIGenBaseModel() - { - return DuplicateCloudJobList(); - } - - /// - /// 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 CloudJobList); - } - - /// - /// Returns true if CloudJobList instances are equal - /// - /// Instance of CloudJobList to be compared - /// Boolean - public bool Equals(CloudJobList 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(@"^CloudJobList$", 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/CreatedContent.cs b/src/PollinationSDK/Model/CreatedContent.cs deleted file mode 100644 index 3169197f7..000000000 --- a/src/PollinationSDK/Model/CreatedContent.cs +++ /dev/null @@ -1,222 +0,0 @@ -/* - * 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 -{ - /// - /// Content for created response. - /// - [DataContract(Name = "CreatedContent")] - public partial class CreatedContent : OpenAPIGenBaseModel, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected CreatedContent() - { - // Set non-required readonly properties with defaultValue - this.Type = "CreatedContent"; - } - - /// - /// Initializes a new instance of the class. - /// - /// Id for the newly created resource. (required). - /// A human readable message. - public CreatedContent - ( - Guid id, // Required parameters - string message= default // Optional parameters - ) : base()// BaseClass - { - this.Id = id; - this.Message = message; - - // Set non-required readonly properties with defaultValue - this.Type = "CreatedContent"; - } - - //============================================== is ReadOnly - /// - /// Gets or Sets Type - /// - [DataMember(Name = "type", EmitDefaultValue = true)] - public string Type { get; protected internal set; } = "CreatedContent"; - - /// - /// Id for the newly created resource. - /// - /// Id for the newly created resource. - [DataMember(Name = "id", IsRequired = true, EmitDefaultValue = false)] - public Guid Id { get; set; } - /// - /// A human readable message - /// - /// A human readable message - [DataMember(Name = "message", EmitDefaultValue = false)] - public string Message { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - return "CreatedContent"; - } - - /// - /// 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("CreatedContent:\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" Message: ").Append(Message).Append("\n"); - return sb.ToString(); - } - - /// - /// Returns the object from JSON string - /// - /// CreatedContent object - public static CreatedContent 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. - /// - /// CreatedContent object - public virtual CreatedContent DuplicateCreatedContent() - { - return FromJson(this.ToJson()); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel Duplicate() - { - return DuplicateCreatedContent(); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel DuplicateOpenAPIGenBaseModel() - { - return DuplicateCreatedContent(); - } - - /// - /// 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 CreatedContent); - } - - /// - /// Returns true if CreatedContent instances are equal - /// - /// Instance of CreatedContent to be compared - /// Boolean - public bool Equals(CreatedContent 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.Message == input.Message || - (this.Message != null && - this.Message.Equals(input.Message)) - ) && 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.Message != null) - hashCode = hashCode * 59 + this.Message.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(@"^CreatedContent$", 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/DAG.cs b/src/PollinationSDK/Model/DAG.cs deleted file mode 100644 index 99e4e6cb9..000000000 --- a/src/PollinationSDK/Model/DAG.cs +++ /dev/null @@ -1,292 +0,0 @@ -/* - * 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 Directed Acyclic Graph containing a list of tasks. - /// - [DataContract(Name = "DAG")] - public partial class DAG : OpenAPIGenBaseModel, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected DAG() - { - // Set non-required readonly properties with defaultValue - this.Type = "DAG"; - } - - /// - /// Initializes a new instance of the class. - /// - /// A unique name for this dag. (required). - /// Tasks are a list of DAG steps (required). - /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. - /// Inputs for the DAG.. - /// Outputs of the DAG that can be used by other DAGs.. - /// Stop scheduling new steps, as soon as it detects that one of the DAG nodes is failed. Default is True. (default to true). - public DAG - ( - string name, List tasks, // Required parameters - Dictionary annotations= default, List> inputs= default, List> outputs= default, bool failFast = true // Optional parameters - ) : base()// BaseClass - { - // to ensure "name" is required (not null) - this.Name = name ?? throw new ArgumentNullException("name is a required property for DAG and cannot be null"); - // to ensure "tasks" is required (not null) - this.Tasks = tasks ?? throw new ArgumentNullException("tasks is a required property for DAG and cannot be null"); - this.Annotations = annotations; - this.Inputs = inputs; - this.Outputs = outputs; - this.FailFast = failFast; - - // Set non-required readonly properties with defaultValue - this.Type = "DAG"; - } - - //============================================== is ReadOnly - /// - /// Gets or Sets Type - /// - [DataMember(Name = "type", EmitDefaultValue = true)] - public string Type { get; protected internal set; } = "DAG"; - - /// - /// A unique name for this dag. - /// - /// A unique name for this dag. - [DataMember(Name = "name", IsRequired = true, EmitDefaultValue = false)] - public string Name { get; set; } - /// - /// Tasks are a list of DAG steps - /// - /// Tasks are a list of DAG steps - [DataMember(Name = "tasks", IsRequired = true, EmitDefaultValue = false)] - public List Tasks { 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; } - /// - /// Inputs for the DAG. - /// - /// Inputs for the DAG. - [DataMember(Name = "inputs", EmitDefaultValue = false)] - public List> Inputs { get; set; } - /// - /// Outputs of the DAG that can be used by other DAGs. - /// - /// Outputs of the DAG that can be used by other DAGs. - [DataMember(Name = "outputs", EmitDefaultValue = false)] - public List> Outputs { get; set; } - /// - /// Stop scheduling new steps, as soon as it detects that one of the DAG nodes is failed. Default is True. - /// - /// Stop scheduling new steps, as soon as it detects that one of the DAG nodes is failed. Default is True. - [DataMember(Name = "fail_fast", EmitDefaultValue = true)] - public bool FailFast { get; set; } = true; - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - return "DAG"; - } - - /// - /// 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("DAG:\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" Tasks: ").Append(Tasks).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(" FailFast: ").Append(FailFast).Append("\n"); - return sb.ToString(); - } - - /// - /// Returns the object from JSON string - /// - /// DAG object - public static DAG 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. - /// - /// DAG object - public virtual DAG DuplicateDAG() - { - return FromJson(this.ToJson()); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel Duplicate() - { - return DuplicateDAG(); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel DuplicateOpenAPIGenBaseModel() - { - return DuplicateDAG(); - } - - /// - /// 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 DAG); - } - - /// - /// Returns true if DAG instances are equal - /// - /// Instance of DAG to be compared - /// Boolean - public bool Equals(DAG 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.Tasks == input.Tasks || - this.Tasks != null && - input.Tasks != null && - this.Tasks.SequenceEqual(input.Tasks) - ) && 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.FailFast == input.FailFast || - (this.FailFast != null && - this.FailFast.Equals(input.FailFast)) - ) && 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.Tasks != null) - hashCode = hashCode * 59 + this.Tasks.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.FailFast != null) - hashCode = hashCode * 59 + this.FailFast.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(@"^DAG$", 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/DAGArrayInput.cs b/src/PollinationSDK/Model/DAGArrayInput.cs deleted file mode 100644 index cd5f65003..000000000 --- a/src/PollinationSDK/Model/DAGArrayInput.cs +++ /dev/null @@ -1,273 +0,0 @@ -/* - * 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 JSON array input. You can add additional validation by defining a JSONSchema specification. See http://json-schema.org/understanding-json-schema/reference/array.html for more information. - /// - [DataContract(Name = "DAGArrayInput")] - public partial class DAGArrayInput : GenericInput, IEquatable, IValidatableObject - { - /// - /// Type of items in an array. All the items in an array must be from the same type. - /// - /// Type of items in an array. All the items in an array must be from the same type. - [DataMember(Name="items_type", EmitDefaultValue=false)] - public ItemType ItemsType { get; set; } = ItemType.String; - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected DAGArrayInput() - { - // Set non-required readonly properties with defaultValue - this.Type = "DAGArrayInput"; - } - - /// - /// Initializes a new instance of the class. - /// - /// Default value to use for an input if a value was not supplied.. - /// A list of aliases for this input in different platforms.. - /// A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. (default to false). - /// An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec.. - /// Type of items in an array. All the items in an array must be from the same type.. - /// Input name. (required). - /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. - /// Optional description for input.. - public DAGArrayInput - ( - string name, // Required parameters - Dictionary annotations= default, string description= default, List _default= default, List> alias= default, bool required = false, Object spec= default, ItemType itemsType= ItemType.String // Optional parameters - ) : base(name: name, annotations: annotations, description: description)// BaseClass - { - this.Default = _default; - this.Alias = alias; - this.Required = required; - this.Spec = spec; - this.ItemsType = itemsType; - - // Set non-required readonly properties with defaultValue - this.Type = "DAGArrayInput"; - } - - //============================================== is ReadOnly - /// - /// Gets or Sets Type - /// - [DataMember(Name = "type", EmitDefaultValue = true)] - public string Type { get; protected internal set; } = "DAGArrayInput"; - - /// - /// Default value to use for an input if a value was not supplied. - /// - /// Default value to use for an input if a value was not supplied. - [DataMember(Name = "default", EmitDefaultValue = false)] - public List Default { get; set; } - /// - /// A list of aliases for this input in different platforms. - /// - /// A list of aliases for this input in different platforms. - [DataMember(Name = "alias", EmitDefaultValue = false)] - public List> Alias { get; set; } - /// - /// A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. - /// - /// A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. - [DataMember(Name = "required", EmitDefaultValue = true)] - public bool Required { get; set; } = false; - /// - /// An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec. - /// - /// An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec. - [DataMember(Name = "spec", EmitDefaultValue = false)] - public Object Spec { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - return "DAGArrayInput"; - } - - /// - /// 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("DAGArrayInput:\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" Annotations: ").Append(Annotations).Append("\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" Default: ").Append(Default).Append("\n"); - sb.Append(" Alias: ").Append(Alias).Append("\n"); - sb.Append(" Required: ").Append(Required).Append("\n"); - sb.Append(" Spec: ").Append(Spec).Append("\n"); - sb.Append(" ItemsType: ").Append(ItemsType).Append("\n"); - return sb.ToString(); - } - - /// - /// Returns the object from JSON string - /// - /// DAGArrayInput object - public static DAGArrayInput 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. - /// - /// DAGArrayInput object - public virtual DAGArrayInput DuplicateDAGArrayInput() - { - return FromJson(this.ToJson()); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel Duplicate() - { - return DuplicateDAGArrayInput(); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override GenericInput DuplicateGenericInput() - { - return DuplicateDAGArrayInput(); - } - - /// - /// 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 DAGArrayInput); - } - - /// - /// Returns true if DAGArrayInput instances are equal - /// - /// Instance of DAGArrayInput to be compared - /// Boolean - public bool Equals(DAGArrayInput input) - { - if (input == null) - return false; - return base.Equals(input) && - ( - this.Default == input.Default || - this.Default != null && - input.Default != null && - this.Default.SequenceEqual(input.Default) - ) && base.Equals(input) && - ( - this.Alias == input.Alias || - this.Alias != null && - input.Alias != null && - this.Alias.SequenceEqual(input.Alias) - ) && base.Equals(input) && - ( - this.Required == input.Required || - (this.Required != null && - this.Required.Equals(input.Required)) - ) && base.Equals(input) && - ( - this.ItemsType == input.ItemsType || - (this.ItemsType != null && - this.ItemsType.Equals(input.ItemsType)) - ) && 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.Default != null) - hashCode = hashCode * 59 + this.Default.GetHashCode(); - if (this.Alias != null) - hashCode = hashCode * 59 + this.Alias.GetHashCode(); - if (this.Required != null) - hashCode = hashCode * 59 + this.Required.GetHashCode(); - if (this.Spec != null) - hashCode = hashCode * 59 + this.Spec.GetHashCode(); - if (this.ItemsType != null) - hashCode = hashCode * 59 + this.ItemsType.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(@"^DAGArrayInput$", 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/DAGArrayInputAlias.cs b/src/PollinationSDK/Model/DAGArrayInputAlias.cs deleted file mode 100644 index 96c158a31..000000000 --- a/src/PollinationSDK/Model/DAGArrayInputAlias.cs +++ /dev/null @@ -1,292 +0,0 @@ -/* - * 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 JSON array input. You can add additional validation by defining a JSONSchema specification. See http://json-schema.org/understanding-json-schema/reference/array.html for more information. - /// - [DataContract(Name = "DAGArrayInputAlias")] - public partial class DAGArrayInputAlias : GenericInput, IEquatable, IValidatableObject - { - /// - /// Type of items in an array. All the items in an array must be from the same type. - /// - /// Type of items in an array. All the items in an array must be from the same type. - [DataMember(Name="items_type", EmitDefaultValue=false)] - public ItemType ItemsType { get; set; } = ItemType.String; - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected DAGArrayInputAlias() - { - // Set non-required readonly properties with defaultValue - this.Type = "DAGArrayInputAlias"; - } - - /// - /// Initializes a new instance of the class. - /// - /// 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. (required). - /// List of process actions to process the input or output value. (required). - /// Default value to use for an input if a value was not supplied.. - /// A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. (default to false). - /// An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec.. - /// Type of items in an array. All the items in an array must be from the same type.. - /// Input name. (required). - /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. - /// Optional description for input.. - public DAGArrayInputAlias - ( - string name, List platform, List handler, // Required parameters - Dictionary annotations= default, string description= default, List _default= default, bool required = false, Object spec= default, ItemType itemsType= ItemType.String // Optional parameters - ) : base(name: name, annotations: annotations, description: description)// BaseClass - { - // to ensure "platform" is required (not null) - this.Platform = platform ?? throw new ArgumentNullException("platform is a required property for DAGArrayInputAlias and cannot be null"); - // to ensure "handler" is required (not null) - this.Handler = handler ?? throw new ArgumentNullException("handler is a required property for DAGArrayInputAlias and cannot be null"); - this.Default = _default; - this.Required = required; - this.Spec = spec; - this.ItemsType = itemsType; - - // Set non-required readonly properties with defaultValue - this.Type = "DAGArrayInputAlias"; - } - - //============================================== is ReadOnly - /// - /// Gets or Sets Type - /// - [DataMember(Name = "type", EmitDefaultValue = true)] - public string Type { get; protected internal set; } = "DAGArrayInputAlias"; - - /// - /// 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. - /// - /// 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. - [DataMember(Name = "platform", IsRequired = true, EmitDefaultValue = false)] - public List Platform { get; set; } - /// - /// List of process actions to process the input or output value. - /// - /// List of process actions to process the input or output value. - [DataMember(Name = "handler", IsRequired = true, EmitDefaultValue = false)] - public List Handler { get; set; } - /// - /// Default value to use for an input if a value was not supplied. - /// - /// Default value to use for an input if a value was not supplied. - [DataMember(Name = "default", EmitDefaultValue = false)] - public List Default { get; set; } - /// - /// A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. - /// - /// A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. - [DataMember(Name = "required", EmitDefaultValue = true)] - public bool Required { get; set; } = false; - /// - /// An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec. - /// - /// An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec. - [DataMember(Name = "spec", EmitDefaultValue = false)] - public Object Spec { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - return "DAGArrayInputAlias"; - } - - /// - /// 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("DAGArrayInputAlias:\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" Annotations: ").Append(Annotations).Append("\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" Platform: ").Append(Platform).Append("\n"); - sb.Append(" Handler: ").Append(Handler).Append("\n"); - sb.Append(" Default: ").Append(Default).Append("\n"); - sb.Append(" Required: ").Append(Required).Append("\n"); - sb.Append(" Spec: ").Append(Spec).Append("\n"); - sb.Append(" ItemsType: ").Append(ItemsType).Append("\n"); - return sb.ToString(); - } - - /// - /// Returns the object from JSON string - /// - /// DAGArrayInputAlias object - public static DAGArrayInputAlias 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. - /// - /// DAGArrayInputAlias object - public virtual DAGArrayInputAlias DuplicateDAGArrayInputAlias() - { - return FromJson(this.ToJson()); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel Duplicate() - { - return DuplicateDAGArrayInputAlias(); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override GenericInput DuplicateGenericInput() - { - return DuplicateDAGArrayInputAlias(); - } - - /// - /// 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 DAGArrayInputAlias); - } - - /// - /// Returns true if DAGArrayInputAlias instances are equal - /// - /// Instance of DAGArrayInputAlias to be compared - /// Boolean - public bool Equals(DAGArrayInputAlias input) - { - if (input == null) - return false; - return base.Equals(input) && - ( - this.Platform == input.Platform || - this.Platform != null && - input.Platform != null && - this.Platform.SequenceEqual(input.Platform) - ) && base.Equals(input) && - ( - this.Handler == input.Handler || - this.Handler != null && - input.Handler != null && - this.Handler.SequenceEqual(input.Handler) - ) && base.Equals(input) && - ( - this.Default == input.Default || - this.Default != null && - input.Default != null && - this.Default.SequenceEqual(input.Default) - ) && base.Equals(input) && - ( - this.Required == input.Required || - (this.Required != null && - this.Required.Equals(input.Required)) - ) && base.Equals(input) && - ( - this.ItemsType == input.ItemsType || - (this.ItemsType != null && - this.ItemsType.Equals(input.ItemsType)) - ) && 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.Platform != null) - hashCode = hashCode * 59 + this.Platform.GetHashCode(); - if (this.Handler != null) - hashCode = hashCode * 59 + this.Handler.GetHashCode(); - if (this.Default != null) - hashCode = hashCode * 59 + this.Default.GetHashCode(); - if (this.Required != null) - hashCode = hashCode * 59 + this.Required.GetHashCode(); - if (this.Spec != null) - hashCode = hashCode * 59 + this.Spec.GetHashCode(); - if (this.ItemsType != null) - hashCode = hashCode * 59 + this.ItemsType.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(@"^DAGArrayInputAlias$", 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/DAGArrayOutput.cs b/src/PollinationSDK/Model/DAGArrayOutput.cs deleted file mode 100644 index 8c93af786..000000000 --- a/src/PollinationSDK/Model/DAGArrayOutput.cs +++ /dev/null @@ -1,262 +0,0 @@ -/* - * 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 -{ - /// - /// DAG array output. This output loads the content from a JSON file which must be a JSON Array. - /// - [DataContract(Name = "DAGArrayOutput")] - public partial class DAGArrayOutput : GenericOutput, IEquatable, IValidatableObject - { - /// - /// Type of items in this array. All the items in an array must be from the same type. - /// - /// Type of items in this array. All the items in an array must be from the same type. - [DataMember(Name="items_type", EmitDefaultValue=false)] - public ItemType ItemsType { get; set; } = ItemType.String; - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected DAGArrayOutput() - { - // Set non-required readonly properties with defaultValue - this.Type = "DAGArrayOutput"; - } - - /// - /// Initializes a new instance of the class. - /// - /// Reference to a file or a task output. Task output must be file. (required). - /// A list of additional processes for loading this output on different platforms.. - /// A boolean to indicate if an artifact output is required. A False value makes the artifact optional. (default to true). - /// Type of items in this array. All the items in an array must be from the same type.. - /// Output name. (required). - /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. - /// Optional description for output.. - public DAGArrayOutput - ( - string name, AnyOf from, // Required parameters - Dictionary annotations= default, string description= default, List> alias= default, bool required = true, ItemType itemsType= ItemType.String // Optional parameters - ) : base(name: name, annotations: annotations, description: description)// BaseClass - { - // to ensure "from" is required (not null) - this.From = from ?? throw new ArgumentNullException("from is a required property for DAGArrayOutput and cannot be null"); - this.Alias = alias; - this.Required = required; - this.ItemsType = itemsType; - - // Set non-required readonly properties with defaultValue - this.Type = "DAGArrayOutput"; - } - - //============================================== is ReadOnly - /// - /// Gets or Sets Type - /// - [DataMember(Name = "type", EmitDefaultValue = true)] - public string Type { get; protected internal set; } = "DAGArrayOutput"; - - /// - /// Reference to a file or a task output. Task output must be file. - /// - /// Reference to a file or a task output. Task output must be file. - [DataMember(Name = "from", IsRequired = true, EmitDefaultValue = false)] - public AnyOf From { get; set; } - /// - /// A list of additional processes for loading this output on different platforms. - /// - /// A list of additional processes for loading this output on different platforms. - [DataMember(Name = "alias", EmitDefaultValue = false)] - public List> Alias { get; set; } - /// - /// A boolean to indicate if an artifact output is required. A False value makes the artifact optional. - /// - /// A boolean to indicate if an artifact output is required. A False value makes the artifact optional. - [DataMember(Name = "required", EmitDefaultValue = true)] - public bool Required { get; set; } = true; - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - return "DAGArrayOutput"; - } - - /// - /// 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("DAGArrayOutput:\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" Annotations: ").Append(Annotations).Append("\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" From: ").Append(From).Append("\n"); - sb.Append(" Alias: ").Append(Alias).Append("\n"); - sb.Append(" Required: ").Append(Required).Append("\n"); - sb.Append(" ItemsType: ").Append(ItemsType).Append("\n"); - return sb.ToString(); - } - - /// - /// Returns the object from JSON string - /// - /// DAGArrayOutput object - public static DAGArrayOutput 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. - /// - /// DAGArrayOutput object - public virtual DAGArrayOutput DuplicateDAGArrayOutput() - { - return FromJson(this.ToJson()); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel Duplicate() - { - return DuplicateDAGArrayOutput(); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override GenericOutput DuplicateGenericOutput() - { - return DuplicateDAGArrayOutput(); - } - - /// - /// 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 DAGArrayOutput); - } - - /// - /// Returns true if DAGArrayOutput instances are equal - /// - /// Instance of DAGArrayOutput to be compared - /// Boolean - public bool Equals(DAGArrayOutput input) - { - if (input == null) - return false; - return base.Equals(input) && - ( - this.From == input.From || - (this.From != null && - this.From.Equals(input.From)) - ) && base.Equals(input) && - ( - this.Alias == input.Alias || - this.Alias != null && - input.Alias != null && - this.Alias.SequenceEqual(input.Alias) - ) && base.Equals(input) && - ( - this.Required == input.Required || - (this.Required != null && - this.Required.Equals(input.Required)) - ) && base.Equals(input) && - ( - this.ItemsType == input.ItemsType || - (this.ItemsType != null && - this.ItemsType.Equals(input.ItemsType)) - ) && 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.From != null) - hashCode = hashCode * 59 + this.From.GetHashCode(); - if (this.Alias != null) - hashCode = hashCode * 59 + this.Alias.GetHashCode(); - if (this.Required != null) - hashCode = hashCode * 59 + this.Required.GetHashCode(); - if (this.ItemsType != null) - hashCode = hashCode * 59 + this.ItemsType.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(@"^DAGArrayOutput$", 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/DAGArrayOutputAlias.cs b/src/PollinationSDK/Model/DAGArrayOutputAlias.cs deleted file mode 100644 index a969e1dfa..000000000 --- a/src/PollinationSDK/Model/DAGArrayOutputAlias.cs +++ /dev/null @@ -1,235 +0,0 @@ -/* - * 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 -{ - /// - /// DAG alias array output. This output loads the content from a JSON file which must be a JSON Array. - /// - [DataContract(Name = "DAGArrayOutputAlias")] - public partial class DAGArrayOutputAlias : DAGArtifactOutputAlias, IEquatable, IValidatableObject - { - /// - /// Type of items in this array. All the items in an array must be from the same type. - /// - /// Type of items in this array. All the items in an array must be from the same type. - [DataMember(Name="items_type", EmitDefaultValue=false)] - public ItemType ItemsType { get; set; } = ItemType.String; - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected DAGArrayOutputAlias() - { - // Set non-required readonly properties with defaultValue - this.Type = "DAGArrayOutputAlias"; - } - - /// - /// Initializes a new instance of the class. - /// - /// Reference to a file or a task output. Task output must be file. (required). - /// Type of items in this array. All the items in an array must be from the same type.. - /// Output name. (required). - /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. - /// Optional description for output.. - /// 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. (required). - /// List of process actions to process the input or output value. (required). - /// A boolean to indicate if an artifact output is required. A False value makes the artifact optional. (default to true). - public DAGArrayOutputAlias - ( - string name, List platform, List handler, AnyOf from, // Required parameters - Dictionary annotations= default, string description= default, bool required = true, ItemType itemsType= ItemType.String // Optional parameters - ) : base(name: name, annotations: annotations, description: description, platform: platform, handler: handler, required: required)// BaseClass - { - // to ensure "from" is required (not null) - this.From = from ?? throw new ArgumentNullException("from is a required property for DAGArrayOutputAlias and cannot be null"); - this.ItemsType = itemsType; - - // Set non-required readonly properties with defaultValue - this.Type = "DAGArrayOutputAlias"; - } - - //============================================== is ReadOnly - /// - /// Gets or Sets Type - /// - [DataMember(Name = "type", EmitDefaultValue = true)] - public string Type { get; protected internal set; } = "DAGArrayOutputAlias"; - - /// - /// Reference to a file or a task output. Task output must be file. - /// - /// Reference to a file or a task output. Task output must be file. - [DataMember(Name = "from", IsRequired = true, EmitDefaultValue = false)] - public AnyOf From { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - return "DAGArrayOutputAlias"; - } - - /// - /// 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("DAGArrayOutputAlias:\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" Annotations: ").Append(Annotations).Append("\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" Platform: ").Append(Platform).Append("\n"); - sb.Append(" Handler: ").Append(Handler).Append("\n"); - sb.Append(" Required: ").Append(Required).Append("\n"); - sb.Append(" From: ").Append(From).Append("\n"); - sb.Append(" ItemsType: ").Append(ItemsType).Append("\n"); - return sb.ToString(); - } - - /// - /// Returns the object from JSON string - /// - /// DAGArrayOutputAlias object - public static DAGArrayOutputAlias 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. - /// - /// DAGArrayOutputAlias object - public virtual DAGArrayOutputAlias DuplicateDAGArrayOutputAlias() - { - return FromJson(this.ToJson()); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel Duplicate() - { - return DuplicateDAGArrayOutputAlias(); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override DAGArtifactOutputAlias DuplicateDAGArtifactOutputAlias() - { - return DuplicateDAGArrayOutputAlias(); - } - - /// - /// 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 DAGArrayOutputAlias); - } - - /// - /// Returns true if DAGArrayOutputAlias instances are equal - /// - /// Instance of DAGArrayOutputAlias to be compared - /// Boolean - public bool Equals(DAGArrayOutputAlias input) - { - if (input == null) - return false; - return base.Equals(input) && - ( - this.From == input.From || - (this.From != null && - this.From.Equals(input.From)) - ) && base.Equals(input) && - ( - this.ItemsType == input.ItemsType || - (this.ItemsType != null && - this.ItemsType.Equals(input.ItemsType)) - ) && 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.From != null) - hashCode = hashCode * 59 + this.From.GetHashCode(); - if (this.ItemsType != null) - hashCode = hashCode * 59 + this.ItemsType.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(@"^DAGArrayOutputAlias$", 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/DAGArtifactOutput.cs b/src/PollinationSDK/Model/DAGArtifactOutput.cs deleted file mode 100644 index 2e9e87004..000000000 --- a/src/PollinationSDK/Model/DAGArtifactOutput.cs +++ /dev/null @@ -1,216 +0,0 @@ -/* - * 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 -{ - /// - /// Base class for DAG artifact outputs. This class add a required input. By default all artifact outputs are required. - /// - [DataContract(Name = "_DAGArtifactOutput")] - public partial class DAGArtifactOutput : DAGGenericOutput, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected DAGArtifactOutput() - { - // Set non-required readonly properties with defaultValue - this.Type = "DAGGenericOutput"; - } - - /// - /// Initializes a new instance of the class. - /// - /// A boolean to indicate if an artifact output is required. A False value makes the artifact optional. (default to true). - /// Output name. (required). - /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. - /// Optional description for output.. - /// Reference to a file or a task output. Task output must be file. (required). - /// A list of additional processes for loading this output on different platforms.. - public DAGArtifactOutput - ( - string name, object from, // Required parameters - Dictionary annotations= default, string description= default, List> alias= default, bool required = true // Optional parameters - ) : base(name: name, annotations: annotations, description: description, from: from, alias: alias)// BaseClass - { - this.Required = required; - - // Set non-required readonly properties with defaultValue - this.Type = "DAGGenericOutput"; - } - - //============================================== is ReadOnly - /// - /// Gets or Sets Type - /// - [DataMember(Name = "type", EmitDefaultValue = true)] - public string Type { get; protected internal set; } = "DAGGenericOutput"; - - /// - /// A boolean to indicate if an artifact output is required. A False value makes the artifact optional. - /// - /// A boolean to indicate if an artifact output is required. A False value makes the artifact optional. - [DataMember(Name = "required", EmitDefaultValue = true)] - public bool Required { get; set; } = true; - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - return "DAGArtifactOutput"; - } - - /// - /// 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("DAGArtifactOutput:\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" Annotations: ").Append(Annotations).Append("\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" From: ").Append(From).Append("\n"); - sb.Append(" Alias: ").Append(Alias).Append("\n"); - sb.Append(" Required: ").Append(Required).Append("\n"); - return sb.ToString(); - } - - /// - /// Returns the object from JSON string - /// - /// DAGArtifactOutput object - public static DAGArtifactOutput 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. - /// - /// DAGArtifactOutput object - public virtual DAGArtifactOutput DuplicateDAGArtifactOutput() - { - return FromJson(this.ToJson()); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel Duplicate() - { - return DuplicateDAGArtifactOutput(); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override DAGGenericOutput DuplicateDAGGenericOutput() - { - return DuplicateDAGArtifactOutput(); - } - - /// - /// 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 DAGArtifactOutput); - } - - /// - /// Returns true if DAGArtifactOutput instances are equal - /// - /// Instance of DAGArtifactOutput to be compared - /// Boolean - public bool Equals(DAGArtifactOutput input) - { - if (input == null) - return false; - return base.Equals(input) && - ( - this.Required == input.Required || - (this.Required != null && - this.Required.Equals(input.Required)) - ) && 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.Required != null) - hashCode = hashCode * 59 + this.Required.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(@"^DAGGenericOutput$", 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/DAGArtifactOutputAlias.cs b/src/PollinationSDK/Model/DAGArtifactOutputAlias.cs deleted file mode 100644 index cd44c810e..000000000 --- a/src/PollinationSDK/Model/DAGArtifactOutputAlias.cs +++ /dev/null @@ -1,226 +0,0 @@ -/* - * 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 -{ - /// - /// Base class for DAG artifact output aliases. This class add a required input. By default all artifact outputs are required. - /// - [DataContract(Name = "_DAGArtifactOutputAlias")] - public partial class DAGArtifactOutputAlias : DAGGenericOutputAlias, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected DAGArtifactOutputAlias() - { - // Set non-required readonly properties with defaultValue - this.Type = "DAGGenericOutputAlias"; - } - - /// - /// Initializes a new instance of the class. - /// - /// A boolean to indicate if an artifact output is required. A False value makes the artifact optional. (default to true). - /// Output name. (required). - /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. - /// Optional description for output.. - /// 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. (required). - /// List of process actions to process the input or output value. (required). - public DAGArtifactOutputAlias - ( - string name, List platform, List handler, // Required parameters - Dictionary annotations= default, string description= default, bool required = true // Optional parameters - ) : base(name: name, annotations: annotations, description: description, platform: platform, handler: handler)// BaseClass - { - this.Required = required; - - // Set non-required readonly properties with defaultValue - this.Type = "DAGGenericOutputAlias"; - } - - //============================================== is ReadOnly - /// - /// Gets or Sets Type - /// - [DataMember(Name = "type", EmitDefaultValue = true)] - public string Type { get; protected internal set; } = "DAGGenericOutputAlias"; - - /// - /// A boolean to indicate if an artifact output is required. A False value makes the artifact optional. - /// - /// A boolean to indicate if an artifact output is required. A False value makes the artifact optional. - [DataMember(Name = "required", EmitDefaultValue = true)] - public bool Required { get; set; } = true; - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - return "DAGArtifactOutputAlias"; - } - - /// - /// 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("DAGArtifactOutputAlias:\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" Annotations: ").Append(Annotations).Append("\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" Platform: ").Append(Platform).Append("\n"); - sb.Append(" Handler: ").Append(Handler).Append("\n"); - sb.Append(" Required: ").Append(Required).Append("\n"); - return sb.ToString(); - } - - /// - /// Returns the object from JSON string - /// - /// DAGArtifactOutputAlias object - public static DAGArtifactOutputAlias 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. - /// - /// DAGArtifactOutputAlias object - public virtual DAGArtifactOutputAlias DuplicateDAGArtifactOutputAlias() - { - return FromJson(this.ToJson()); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel Duplicate() - { - return DuplicateDAGArtifactOutputAlias(); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override DAGGenericOutputAlias DuplicateDAGGenericOutputAlias() - { - return DuplicateDAGArtifactOutputAlias(); - } - - /// - /// 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 DAGArtifactOutputAlias); - } - - /// - /// Returns true if DAGArtifactOutputAlias instances are equal - /// - /// Instance of DAGArtifactOutputAlias to be compared - /// Boolean - public bool Equals(DAGArtifactOutputAlias input) - { - if (input == null) - return false; - return base.Equals(input) && - ( - this.Required == input.Required || - (this.Required != null && - this.Required.Equals(input.Required)) - ) && 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.Required != null) - hashCode = hashCode * 59 + this.Required.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(@"^DAGGenericOutputAlias$", 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/DAGBooleanInput.cs b/src/PollinationSDK/Model/DAGBooleanInput.cs deleted file mode 100644 index 284964b0e..000000000 --- a/src/PollinationSDK/Model/DAGBooleanInput.cs +++ /dev/null @@ -1,256 +0,0 @@ -/* - * 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 boolean type matches only two special values: True and False. Note that values that evaluate to true or false, such as 1 and 0, are not accepted. You can add additional validation by defining a JSONSchema specification. See http://json-schema.org/understanding-json-schema/reference/boolean.html for more information. - /// - [DataContract(Name = "DAGBooleanInput")] - public partial class DAGBooleanInput : GenericInput, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected DAGBooleanInput() - { - // Set non-required readonly properties with defaultValue - this.Type = "DAGBooleanInput"; - } - - /// - /// Initializes a new instance of the class. - /// - /// Default value to use for an input if a value was not supplied.. - /// A list of aliases for this input in different platforms.. - /// A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. (default to false). - /// An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec.. - /// Input name. (required). - /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. - /// Optional description for input.. - public DAGBooleanInput - ( - string name, // Required parameters - Dictionary annotations= default, string description= default, bool _default= default, List> alias= default, bool required = false, Object spec= default // Optional parameters - ) : base(name: name, annotations: annotations, description: description)// BaseClass - { - this.Default = _default; - this.Alias = alias; - this.Required = required; - this.Spec = spec; - - // Set non-required readonly properties with defaultValue - this.Type = "DAGBooleanInput"; - } - - //============================================== is ReadOnly - /// - /// Gets or Sets Type - /// - [DataMember(Name = "type", EmitDefaultValue = true)] - public string Type { get; protected internal set; } = "DAGBooleanInput"; - - /// - /// Default value to use for an input if a value was not supplied. - /// - /// Default value to use for an input if a value was not supplied. - [DataMember(Name = "default", EmitDefaultValue = false)] - public bool Default { get; set; } - /// - /// A list of aliases for this input in different platforms. - /// - /// A list of aliases for this input in different platforms. - [DataMember(Name = "alias", EmitDefaultValue = false)] - public List> Alias { get; set; } - /// - /// A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. - /// - /// A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. - [DataMember(Name = "required", EmitDefaultValue = true)] - public bool Required { get; set; } = false; - /// - /// An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec. - /// - /// An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec. - [DataMember(Name = "spec", EmitDefaultValue = false)] - public Object Spec { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - return "DAGBooleanInput"; - } - - /// - /// 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("DAGBooleanInput:\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" Annotations: ").Append(Annotations).Append("\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" Default: ").Append(Default).Append("\n"); - sb.Append(" Alias: ").Append(Alias).Append("\n"); - sb.Append(" Required: ").Append(Required).Append("\n"); - sb.Append(" Spec: ").Append(Spec).Append("\n"); - return sb.ToString(); - } - - /// - /// Returns the object from JSON string - /// - /// DAGBooleanInput object - public static DAGBooleanInput 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. - /// - /// DAGBooleanInput object - public virtual DAGBooleanInput DuplicateDAGBooleanInput() - { - return FromJson(this.ToJson()); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel Duplicate() - { - return DuplicateDAGBooleanInput(); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override GenericInput DuplicateGenericInput() - { - return DuplicateDAGBooleanInput(); - } - - /// - /// 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 DAGBooleanInput); - } - - /// - /// Returns true if DAGBooleanInput instances are equal - /// - /// Instance of DAGBooleanInput to be compared - /// Boolean - public bool Equals(DAGBooleanInput input) - { - if (input == null) - return false; - return base.Equals(input) && - ( - this.Default == input.Default || - (this.Default != null && - this.Default.Equals(input.Default)) - ) && base.Equals(input) && - ( - this.Alias == input.Alias || - this.Alias != null && - input.Alias != null && - this.Alias.SequenceEqual(input.Alias) - ) && base.Equals(input) && - ( - this.Required == input.Required || - (this.Required != null && - this.Required.Equals(input.Required)) - ) && 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.Default != null) - hashCode = hashCode * 59 + this.Default.GetHashCode(); - if (this.Alias != null) - hashCode = hashCode * 59 + this.Alias.GetHashCode(); - if (this.Required != null) - hashCode = hashCode * 59 + this.Required.GetHashCode(); - if (this.Spec != null) - hashCode = hashCode * 59 + this.Spec.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(@"^DAGBooleanInput$", 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/DAGBooleanInputAlias.cs b/src/PollinationSDK/Model/DAGBooleanInputAlias.cs deleted file mode 100644 index 660746da6..000000000 --- a/src/PollinationSDK/Model/DAGBooleanInputAlias.cs +++ /dev/null @@ -1,275 +0,0 @@ -/* - * 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 boolean type matches only two special values: True and False. Note that values that evaluate to true or false, such as 1 and 0, are not accepted. You can add additional validation by defining a JSONSchema specification. See http://json-schema.org/understanding-json-schema/reference/boolean.html for more information. - /// - [DataContract(Name = "DAGBooleanInputAlias")] - public partial class DAGBooleanInputAlias : GenericInput, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected DAGBooleanInputAlias() - { - // Set non-required readonly properties with defaultValue - this.Type = "DAGBooleanInputAlias"; - } - - /// - /// Initializes a new instance of the class. - /// - /// 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. (required). - /// List of process actions to process the input or output value. (required). - /// Default value to use for an input if a value was not supplied.. - /// A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. (default to false). - /// An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec.. - /// Input name. (required). - /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. - /// Optional description for input.. - public DAGBooleanInputAlias - ( - string name, List platform, List handler, // Required parameters - Dictionary annotations= default, string description= default, bool _default= default, bool required = false, Object spec= default // Optional parameters - ) : base(name: name, annotations: annotations, description: description)// BaseClass - { - // to ensure "platform" is required (not null) - this.Platform = platform ?? throw new ArgumentNullException("platform is a required property for DAGBooleanInputAlias and cannot be null"); - // to ensure "handler" is required (not null) - this.Handler = handler ?? throw new ArgumentNullException("handler is a required property for DAGBooleanInputAlias and cannot be null"); - this.Default = _default; - this.Required = required; - this.Spec = spec; - - // Set non-required readonly properties with defaultValue - this.Type = "DAGBooleanInputAlias"; - } - - //============================================== is ReadOnly - /// - /// Gets or Sets Type - /// - [DataMember(Name = "type", EmitDefaultValue = true)] - public string Type { get; protected internal set; } = "DAGBooleanInputAlias"; - - /// - /// 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. - /// - /// 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. - [DataMember(Name = "platform", IsRequired = true, EmitDefaultValue = false)] - public List Platform { get; set; } - /// - /// List of process actions to process the input or output value. - /// - /// List of process actions to process the input or output value. - [DataMember(Name = "handler", IsRequired = true, EmitDefaultValue = false)] - public List Handler { get; set; } - /// - /// Default value to use for an input if a value was not supplied. - /// - /// Default value to use for an input if a value was not supplied. - [DataMember(Name = "default", EmitDefaultValue = false)] - public bool Default { get; set; } - /// - /// A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. - /// - /// A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. - [DataMember(Name = "required", EmitDefaultValue = true)] - public bool Required { get; set; } = false; - /// - /// An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec. - /// - /// An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec. - [DataMember(Name = "spec", EmitDefaultValue = false)] - public Object Spec { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - return "DAGBooleanInputAlias"; - } - - /// - /// 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("DAGBooleanInputAlias:\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" Annotations: ").Append(Annotations).Append("\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" Platform: ").Append(Platform).Append("\n"); - sb.Append(" Handler: ").Append(Handler).Append("\n"); - sb.Append(" Default: ").Append(Default).Append("\n"); - sb.Append(" Required: ").Append(Required).Append("\n"); - sb.Append(" Spec: ").Append(Spec).Append("\n"); - return sb.ToString(); - } - - /// - /// Returns the object from JSON string - /// - /// DAGBooleanInputAlias object - public static DAGBooleanInputAlias 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. - /// - /// DAGBooleanInputAlias object - public virtual DAGBooleanInputAlias DuplicateDAGBooleanInputAlias() - { - return FromJson(this.ToJson()); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel Duplicate() - { - return DuplicateDAGBooleanInputAlias(); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override GenericInput DuplicateGenericInput() - { - return DuplicateDAGBooleanInputAlias(); - } - - /// - /// 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 DAGBooleanInputAlias); - } - - /// - /// Returns true if DAGBooleanInputAlias instances are equal - /// - /// Instance of DAGBooleanInputAlias to be compared - /// Boolean - public bool Equals(DAGBooleanInputAlias input) - { - if (input == null) - return false; - return base.Equals(input) && - ( - this.Platform == input.Platform || - this.Platform != null && - input.Platform != null && - this.Platform.SequenceEqual(input.Platform) - ) && base.Equals(input) && - ( - this.Handler == input.Handler || - this.Handler != null && - input.Handler != null && - this.Handler.SequenceEqual(input.Handler) - ) && base.Equals(input) && - ( - this.Default == input.Default || - (this.Default != null && - this.Default.Equals(input.Default)) - ) && base.Equals(input) && - ( - this.Required == input.Required || - (this.Required != null && - this.Required.Equals(input.Required)) - ) && 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.Platform != null) - hashCode = hashCode * 59 + this.Platform.GetHashCode(); - if (this.Handler != null) - hashCode = hashCode * 59 + this.Handler.GetHashCode(); - if (this.Default != null) - hashCode = hashCode * 59 + this.Default.GetHashCode(); - if (this.Required != null) - hashCode = hashCode * 59 + this.Required.GetHashCode(); - if (this.Spec != null) - hashCode = hashCode * 59 + this.Spec.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(@"^DAGBooleanInputAlias$", 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/DAGBooleanOutput.cs b/src/PollinationSDK/Model/DAGBooleanOutput.cs deleted file mode 100644 index 6c0ac5e36..000000000 --- a/src/PollinationSDK/Model/DAGBooleanOutput.cs +++ /dev/null @@ -1,246 +0,0 @@ -/* - * 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 -{ - /// - /// DAG boolean output. This output loads the content from a file as a boolean. - /// - [DataContract(Name = "DAGBooleanOutput")] - public partial class DAGBooleanOutput : GenericOutput, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected DAGBooleanOutput() - { - // Set non-required readonly properties with defaultValue - this.Type = "DAGBooleanOutput"; - } - - /// - /// Initializes a new instance of the class. - /// - /// Reference to a file or a task output. Task output must be file. (required). - /// A list of additional processes for loading this output on different platforms.. - /// A boolean to indicate if an artifact output is required. A False value makes the artifact optional. (default to true). - /// Output name. (required). - /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. - /// Optional description for output.. - public DAGBooleanOutput - ( - string name, AnyOf from, // Required parameters - Dictionary annotations= default, string description= default, List> alias= default, bool required = true // Optional parameters - ) : base(name: name, annotations: annotations, description: description)// BaseClass - { - // to ensure "from" is required (not null) - this.From = from ?? throw new ArgumentNullException("from is a required property for DAGBooleanOutput and cannot be null"); - this.Alias = alias; - this.Required = required; - - // Set non-required readonly properties with defaultValue - this.Type = "DAGBooleanOutput"; - } - - //============================================== is ReadOnly - /// - /// Gets or Sets Type - /// - [DataMember(Name = "type", EmitDefaultValue = true)] - public string Type { get; protected internal set; } = "DAGBooleanOutput"; - - /// - /// Reference to a file or a task output. Task output must be file. - /// - /// Reference to a file or a task output. Task output must be file. - [DataMember(Name = "from", IsRequired = true, EmitDefaultValue = false)] - public AnyOf From { get; set; } - /// - /// A list of additional processes for loading this output on different platforms. - /// - /// A list of additional processes for loading this output on different platforms. - [DataMember(Name = "alias", EmitDefaultValue = false)] - public List> Alias { get; set; } - /// - /// A boolean to indicate if an artifact output is required. A False value makes the artifact optional. - /// - /// A boolean to indicate if an artifact output is required. A False value makes the artifact optional. - [DataMember(Name = "required", EmitDefaultValue = true)] - public bool Required { get; set; } = true; - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - return "DAGBooleanOutput"; - } - - /// - /// 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("DAGBooleanOutput:\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" Annotations: ").Append(Annotations).Append("\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" From: ").Append(From).Append("\n"); - sb.Append(" Alias: ").Append(Alias).Append("\n"); - sb.Append(" Required: ").Append(Required).Append("\n"); - return sb.ToString(); - } - - /// - /// Returns the object from JSON string - /// - /// DAGBooleanOutput object - public static DAGBooleanOutput 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. - /// - /// DAGBooleanOutput object - public virtual DAGBooleanOutput DuplicateDAGBooleanOutput() - { - return FromJson(this.ToJson()); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel Duplicate() - { - return DuplicateDAGBooleanOutput(); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override GenericOutput DuplicateGenericOutput() - { - return DuplicateDAGBooleanOutput(); - } - - /// - /// 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 DAGBooleanOutput); - } - - /// - /// Returns true if DAGBooleanOutput instances are equal - /// - /// Instance of DAGBooleanOutput to be compared - /// Boolean - public bool Equals(DAGBooleanOutput input) - { - if (input == null) - return false; - return base.Equals(input) && - ( - this.From == input.From || - (this.From != null && - this.From.Equals(input.From)) - ) && base.Equals(input) && - ( - this.Alias == input.Alias || - this.Alias != null && - input.Alias != null && - this.Alias.SequenceEqual(input.Alias) - ) && base.Equals(input) && - ( - this.Required == input.Required || - (this.Required != null && - this.Required.Equals(input.Required)) - ) && 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.From != null) - hashCode = hashCode * 59 + this.From.GetHashCode(); - if (this.Alias != null) - hashCode = hashCode * 59 + this.Alias.GetHashCode(); - if (this.Required != null) - hashCode = hashCode * 59 + this.Required.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(@"^DAGBooleanOutput$", 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/DAGBooleanOutputAlias.cs b/src/PollinationSDK/Model/DAGBooleanOutputAlias.cs deleted file mode 100644 index 548df0bae..000000000 --- a/src/PollinationSDK/Model/DAGBooleanOutputAlias.cs +++ /dev/null @@ -1,219 +0,0 @@ -/* - * 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 -{ - /// - /// DAG alias boolean output. This output loads the content from a file as a boolean. - /// - [DataContract(Name = "DAGBooleanOutputAlias")] - public partial class DAGBooleanOutputAlias : DAGArtifactOutputAlias, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected DAGBooleanOutputAlias() - { - // Set non-required readonly properties with defaultValue - this.Type = "DAGBooleanOutputAlias"; - } - - /// - /// Initializes a new instance of the class. - /// - /// Reference to a file or a task output. Task output must be file. (required). - /// Output name. (required). - /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. - /// Optional description for output.. - /// 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. (required). - /// List of process actions to process the input or output value. (required). - /// A boolean to indicate if an artifact output is required. A False value makes the artifact optional. (default to true). - public DAGBooleanOutputAlias - ( - string name, List platform, List handler, AnyOf from, // Required parameters - Dictionary annotations= default, string description= default, bool required = true // Optional parameters - ) : base(name: name, annotations: annotations, description: description, platform: platform, handler: handler, required: required)// BaseClass - { - // to ensure "from" is required (not null) - this.From = from ?? throw new ArgumentNullException("from is a required property for DAGBooleanOutputAlias and cannot be null"); - - // Set non-required readonly properties with defaultValue - this.Type = "DAGBooleanOutputAlias"; - } - - //============================================== is ReadOnly - /// - /// Gets or Sets Type - /// - [DataMember(Name = "type", EmitDefaultValue = true)] - public string Type { get; protected internal set; } = "DAGBooleanOutputAlias"; - - /// - /// Reference to a file or a task output. Task output must be file. - /// - /// Reference to a file or a task output. Task output must be file. - [DataMember(Name = "from", IsRequired = true, EmitDefaultValue = false)] - public AnyOf From { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - return "DAGBooleanOutputAlias"; - } - - /// - /// 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("DAGBooleanOutputAlias:\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" Annotations: ").Append(Annotations).Append("\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" Platform: ").Append(Platform).Append("\n"); - sb.Append(" Handler: ").Append(Handler).Append("\n"); - sb.Append(" Required: ").Append(Required).Append("\n"); - sb.Append(" From: ").Append(From).Append("\n"); - return sb.ToString(); - } - - /// - /// Returns the object from JSON string - /// - /// DAGBooleanOutputAlias object - public static DAGBooleanOutputAlias 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. - /// - /// DAGBooleanOutputAlias object - public virtual DAGBooleanOutputAlias DuplicateDAGBooleanOutputAlias() - { - return FromJson(this.ToJson()); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel Duplicate() - { - return DuplicateDAGBooleanOutputAlias(); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override DAGArtifactOutputAlias DuplicateDAGArtifactOutputAlias() - { - return DuplicateDAGBooleanOutputAlias(); - } - - /// - /// 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 DAGBooleanOutputAlias); - } - - /// - /// Returns true if DAGBooleanOutputAlias instances are equal - /// - /// Instance of DAGBooleanOutputAlias to be compared - /// Boolean - public bool Equals(DAGBooleanOutputAlias input) - { - if (input == null) - return false; - return base.Equals(input) && - ( - this.From == input.From || - (this.From != null && - this.From.Equals(input.From)) - ) && 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.From != null) - hashCode = hashCode * 59 + this.From.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(@"^DAGBooleanOutputAlias$", 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/DAGFileInput.cs b/src/PollinationSDK/Model/DAGFileInput.cs deleted file mode 100644 index 0bd55e651..000000000 --- a/src/PollinationSDK/Model/DAGFileInput.cs +++ /dev/null @@ -1,273 +0,0 @@ -/* - * 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 file input. File is a special string input. Unlike other string inputs, a file will be copied from its location to execution folder when a workflow is executed. You can add additional validation by defining a JSONSchema specification. See http://json-schema.org/understanding-json-schema/reference/string.html#string for more information. .. code-block:: python # a file with maximum 50 characters with an ``epw`` extension. \"schema\": { \"type\": \"string\", \"maxLength\": 50, \"pattern\": \"(?i)(^.*\\.epw$)\" } - /// - [DataContract(Name = "DAGFileInput")] - public partial class DAGFileInput : GenericInput, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected DAGFileInput() - { - // Set non-required readonly properties with defaultValue - this.Type = "DAGFileInput"; - } - - /// - /// Initializes a new instance of the class. - /// - /// The default source for file if the value is not provided.. - /// A list of aliases for this input in different platforms.. - /// A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. (default to false). - /// An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec.. - /// Optional list of extensions for file. The check for extension is case-insensitive.. - /// Input name. (required). - /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. - /// Optional description for input.. - public DAGFileInput - ( - string name, // Required parameters - Dictionary annotations= default, string description= default, AnyOf _default= default, List> alias= default, bool required = false, Object spec= default, List extensions= default // Optional parameters - ) : base(name: name, annotations: annotations, description: description)// BaseClass - { - this.Default = _default; - this.Alias = alias; - this.Required = required; - this.Spec = spec; - this.Extensions = extensions; - - // Set non-required readonly properties with defaultValue - this.Type = "DAGFileInput"; - } - - //============================================== is ReadOnly - /// - /// Gets or Sets Type - /// - [DataMember(Name = "type", EmitDefaultValue = true)] - public string Type { get; protected internal set; } = "DAGFileInput"; - - /// - /// The default source for file if the value is not provided. - /// - /// The default source for file if the value is not provided. - [DataMember(Name = "default", EmitDefaultValue = false)] - public AnyOf Default { get; set; } - /// - /// A list of aliases for this input in different platforms. - /// - /// A list of aliases for this input in different platforms. - [DataMember(Name = "alias", EmitDefaultValue = false)] - public List> Alias { get; set; } - /// - /// A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. - /// - /// A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. - [DataMember(Name = "required", EmitDefaultValue = true)] - public bool Required { get; set; } = false; - /// - /// An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec. - /// - /// An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec. - [DataMember(Name = "spec", EmitDefaultValue = false)] - public Object Spec { get; set; } - /// - /// Optional list of extensions for file. The check for extension is case-insensitive. - /// - /// Optional list of extensions for file. The check for extension is case-insensitive. - [DataMember(Name = "extensions", EmitDefaultValue = false)] - public List Extensions { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - return "DAGFileInput"; - } - - /// - /// 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("DAGFileInput:\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" Annotations: ").Append(Annotations).Append("\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" Default: ").Append(Default).Append("\n"); - sb.Append(" Alias: ").Append(Alias).Append("\n"); - sb.Append(" Required: ").Append(Required).Append("\n"); - sb.Append(" Spec: ").Append(Spec).Append("\n"); - sb.Append(" Extensions: ").Append(Extensions).Append("\n"); - return sb.ToString(); - } - - /// - /// Returns the object from JSON string - /// - /// DAGFileInput object - public static DAGFileInput 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. - /// - /// DAGFileInput object - public virtual DAGFileInput DuplicateDAGFileInput() - { - return FromJson(this.ToJson()); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel Duplicate() - { - return DuplicateDAGFileInput(); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override GenericInput DuplicateGenericInput() - { - return DuplicateDAGFileInput(); - } - - /// - /// 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 DAGFileInput); - } - - /// - /// Returns true if DAGFileInput instances are equal - /// - /// Instance of DAGFileInput to be compared - /// Boolean - public bool Equals(DAGFileInput input) - { - if (input == null) - return false; - return base.Equals(input) && - ( - this.Default == input.Default || - (this.Default != null && - this.Default.Equals(input.Default)) - ) && base.Equals(input) && - ( - this.Alias == input.Alias || - this.Alias != null && - input.Alias != null && - this.Alias.SequenceEqual(input.Alias) - ) && base.Equals(input) && - ( - this.Required == input.Required || - (this.Required != null && - this.Required.Equals(input.Required)) - ) && base.Equals(input) && - ( - this.Extensions == input.Extensions || - this.Extensions != null && - input.Extensions != null && - this.Extensions.SequenceEqual(input.Extensions) - ) && 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.Default != null) - hashCode = hashCode * 59 + this.Default.GetHashCode(); - if (this.Alias != null) - hashCode = hashCode * 59 + this.Alias.GetHashCode(); - if (this.Required != null) - hashCode = hashCode * 59 + this.Required.GetHashCode(); - if (this.Spec != null) - hashCode = hashCode * 59 + this.Spec.GetHashCode(); - if (this.Extensions != null) - hashCode = hashCode * 59 + this.Extensions.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(@"^DAGFileInput$", 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/DAGFileInputAlias.cs b/src/PollinationSDK/Model/DAGFileInputAlias.cs deleted file mode 100644 index 5441a73b8..000000000 --- a/src/PollinationSDK/Model/DAGFileInputAlias.cs +++ /dev/null @@ -1,292 +0,0 @@ -/* - * 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 alias file input. File is a special string input. Unlike other string inputs, a file will be copied from its location to execution folder when a workflow is executed. You can add additional validation by defining a JSONSchema specification. See http://json-schema.org/understanding-json-schema/reference/string.html#string for more information. .. code-block:: python # a file with maximum 50 characters with an ``epw`` extension. \"schema\": { \"type\": \"string\", \"maxLength\": 50, \"pattern\": \"(?i)(^.*\\.epw$)\" } - /// - [DataContract(Name = "DAGFileInputAlias")] - public partial class DAGFileInputAlias : GenericInput, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected DAGFileInputAlias() - { - // Set non-required readonly properties with defaultValue - this.Type = "DAGFileInputAlias"; - } - - /// - /// Initializes a new instance of the class. - /// - /// 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. (required). - /// List of process actions to process the input or output value. (required). - /// The default source for file if the value is not provided.. - /// A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. (default to false). - /// An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec.. - /// Optional list of extensions for file. The check for extension is case-insensitive.. - /// Input name. (required). - /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. - /// Optional description for input.. - public DAGFileInputAlias - ( - string name, List platform, List handler, // Required parameters - Dictionary annotations= default, string description= default, AnyOf _default= default, bool required = false, Object spec= default, List extensions= default // Optional parameters - ) : base(name: name, annotations: annotations, description: description)// BaseClass - { - // to ensure "platform" is required (not null) - this.Platform = platform ?? throw new ArgumentNullException("platform is a required property for DAGFileInputAlias and cannot be null"); - // to ensure "handler" is required (not null) - this.Handler = handler ?? throw new ArgumentNullException("handler is a required property for DAGFileInputAlias and cannot be null"); - this.Default = _default; - this.Required = required; - this.Spec = spec; - this.Extensions = extensions; - - // Set non-required readonly properties with defaultValue - this.Type = "DAGFileInputAlias"; - } - - //============================================== is ReadOnly - /// - /// Gets or Sets Type - /// - [DataMember(Name = "type", EmitDefaultValue = true)] - public string Type { get; protected internal set; } = "DAGFileInputAlias"; - - /// - /// 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. - /// - /// 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. - [DataMember(Name = "platform", IsRequired = true, EmitDefaultValue = false)] - public List Platform { get; set; } - /// - /// List of process actions to process the input or output value. - /// - /// List of process actions to process the input or output value. - [DataMember(Name = "handler", IsRequired = true, EmitDefaultValue = false)] - public List Handler { get; set; } - /// - /// The default source for file if the value is not provided. - /// - /// The default source for file if the value is not provided. - [DataMember(Name = "default", EmitDefaultValue = false)] - public AnyOf Default { get; set; } - /// - /// A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. - /// - /// A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. - [DataMember(Name = "required", EmitDefaultValue = true)] - public bool Required { get; set; } = false; - /// - /// An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec. - /// - /// An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec. - [DataMember(Name = "spec", EmitDefaultValue = false)] - public Object Spec { get; set; } - /// - /// Optional list of extensions for file. The check for extension is case-insensitive. - /// - /// Optional list of extensions for file. The check for extension is case-insensitive. - [DataMember(Name = "extensions", EmitDefaultValue = false)] - public List Extensions { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - return "DAGFileInputAlias"; - } - - /// - /// 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("DAGFileInputAlias:\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" Annotations: ").Append(Annotations).Append("\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" Platform: ").Append(Platform).Append("\n"); - sb.Append(" Handler: ").Append(Handler).Append("\n"); - sb.Append(" Default: ").Append(Default).Append("\n"); - sb.Append(" Required: ").Append(Required).Append("\n"); - sb.Append(" Spec: ").Append(Spec).Append("\n"); - sb.Append(" Extensions: ").Append(Extensions).Append("\n"); - return sb.ToString(); - } - - /// - /// Returns the object from JSON string - /// - /// DAGFileInputAlias object - public static DAGFileInputAlias 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. - /// - /// DAGFileInputAlias object - public virtual DAGFileInputAlias DuplicateDAGFileInputAlias() - { - return FromJson(this.ToJson()); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel Duplicate() - { - return DuplicateDAGFileInputAlias(); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override GenericInput DuplicateGenericInput() - { - return DuplicateDAGFileInputAlias(); - } - - /// - /// 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 DAGFileInputAlias); - } - - /// - /// Returns true if DAGFileInputAlias instances are equal - /// - /// Instance of DAGFileInputAlias to be compared - /// Boolean - public bool Equals(DAGFileInputAlias input) - { - if (input == null) - return false; - return base.Equals(input) && - ( - this.Platform == input.Platform || - this.Platform != null && - input.Platform != null && - this.Platform.SequenceEqual(input.Platform) - ) && base.Equals(input) && - ( - this.Handler == input.Handler || - this.Handler != null && - input.Handler != null && - this.Handler.SequenceEqual(input.Handler) - ) && base.Equals(input) && - ( - this.Default == input.Default || - (this.Default != null && - this.Default.Equals(input.Default)) - ) && base.Equals(input) && - ( - this.Required == input.Required || - (this.Required != null && - this.Required.Equals(input.Required)) - ) && base.Equals(input) && - ( - this.Extensions == input.Extensions || - this.Extensions != null && - input.Extensions != null && - this.Extensions.SequenceEqual(input.Extensions) - ) && 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.Platform != null) - hashCode = hashCode * 59 + this.Platform.GetHashCode(); - if (this.Handler != null) - hashCode = hashCode * 59 + this.Handler.GetHashCode(); - if (this.Default != null) - hashCode = hashCode * 59 + this.Default.GetHashCode(); - if (this.Required != null) - hashCode = hashCode * 59 + this.Required.GetHashCode(); - if (this.Spec != null) - hashCode = hashCode * 59 + this.Spec.GetHashCode(); - if (this.Extensions != null) - hashCode = hashCode * 59 + this.Extensions.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(@"^DAGFileInputAlias$", 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/DAGFileOutput.cs b/src/PollinationSDK/Model/DAGFileOutput.cs deleted file mode 100644 index 992989a5d..000000000 --- a/src/PollinationSDK/Model/DAGFileOutput.cs +++ /dev/null @@ -1,246 +0,0 @@ -/* - * 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 -{ - /// - /// DAG file output. - /// - [DataContract(Name = "DAGFileOutput")] - public partial class DAGFileOutput : GenericOutput, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected DAGFileOutput() - { - // Set non-required readonly properties with defaultValue - this.Type = "DAGFileOutput"; - } - - /// - /// Initializes a new instance of the class. - /// - /// Reference to a file or a task output. Task output must be file. (required). - /// A list of additional processes for loading this output on different platforms.. - /// A boolean to indicate if an artifact output is required. A False value makes the artifact optional. (default to true). - /// Output name. (required). - /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. - /// Optional description for output.. - public DAGFileOutput - ( - string name, AnyOf from, // Required parameters - Dictionary annotations= default, string description= default, List> alias= default, bool required = true // Optional parameters - ) : base(name: name, annotations: annotations, description: description)// BaseClass - { - // to ensure "from" is required (not null) - this.From = from ?? throw new ArgumentNullException("from is a required property for DAGFileOutput and cannot be null"); - this.Alias = alias; - this.Required = required; - - // Set non-required readonly properties with defaultValue - this.Type = "DAGFileOutput"; - } - - //============================================== is ReadOnly - /// - /// Gets or Sets Type - /// - [DataMember(Name = "type", EmitDefaultValue = true)] - public string Type { get; protected internal set; } = "DAGFileOutput"; - - /// - /// Reference to a file or a task output. Task output must be file. - /// - /// Reference to a file or a task output. Task output must be file. - [DataMember(Name = "from", IsRequired = true, EmitDefaultValue = false)] - public AnyOf From { get; set; } - /// - /// A list of additional processes for loading this output on different platforms. - /// - /// A list of additional processes for loading this output on different platforms. - [DataMember(Name = "alias", EmitDefaultValue = false)] - public List> Alias { get; set; } - /// - /// A boolean to indicate if an artifact output is required. A False value makes the artifact optional. - /// - /// A boolean to indicate if an artifact output is required. A False value makes the artifact optional. - [DataMember(Name = "required", EmitDefaultValue = true)] - public bool Required { get; set; } = true; - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - return "DAGFileOutput"; - } - - /// - /// 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("DAGFileOutput:\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" Annotations: ").Append(Annotations).Append("\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" From: ").Append(From).Append("\n"); - sb.Append(" Alias: ").Append(Alias).Append("\n"); - sb.Append(" Required: ").Append(Required).Append("\n"); - return sb.ToString(); - } - - /// - /// Returns the object from JSON string - /// - /// DAGFileOutput object - public static DAGFileOutput 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. - /// - /// DAGFileOutput object - public virtual DAGFileOutput DuplicateDAGFileOutput() - { - return FromJson(this.ToJson()); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel Duplicate() - { - return DuplicateDAGFileOutput(); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override GenericOutput DuplicateGenericOutput() - { - return DuplicateDAGFileOutput(); - } - - /// - /// 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 DAGFileOutput); - } - - /// - /// Returns true if DAGFileOutput instances are equal - /// - /// Instance of DAGFileOutput to be compared - /// Boolean - public bool Equals(DAGFileOutput input) - { - if (input == null) - return false; - return base.Equals(input) && - ( - this.From == input.From || - (this.From != null && - this.From.Equals(input.From)) - ) && base.Equals(input) && - ( - this.Alias == input.Alias || - this.Alias != null && - input.Alias != null && - this.Alias.SequenceEqual(input.Alias) - ) && base.Equals(input) && - ( - this.Required == input.Required || - (this.Required != null && - this.Required.Equals(input.Required)) - ) && 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.From != null) - hashCode = hashCode * 59 + this.From.GetHashCode(); - if (this.Alias != null) - hashCode = hashCode * 59 + this.Alias.GetHashCode(); - if (this.Required != null) - hashCode = hashCode * 59 + this.Required.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(@"^DAGFileOutput$", 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/DAGFileOutputAlias.cs b/src/PollinationSDK/Model/DAGFileOutputAlias.cs deleted file mode 100644 index ed3217e4e..000000000 --- a/src/PollinationSDK/Model/DAGFileOutputAlias.cs +++ /dev/null @@ -1,219 +0,0 @@ -/* - * 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 -{ - /// - /// DAG alias file output. - /// - [DataContract(Name = "DAGFileOutputAlias")] - public partial class DAGFileOutputAlias : DAGArtifactOutputAlias, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected DAGFileOutputAlias() - { - // Set non-required readonly properties with defaultValue - this.Type = "DAGFileOutputAlias"; - } - - /// - /// Initializes a new instance of the class. - /// - /// Reference to a file or a task output. Task output must be file. (required). - /// Output name. (required). - /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. - /// Optional description for output.. - /// 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. (required). - /// List of process actions to process the input or output value. (required). - /// A boolean to indicate if an artifact output is required. A False value makes the artifact optional. (default to true). - public DAGFileOutputAlias - ( - string name, List platform, List handler, AnyOf from, // Required parameters - Dictionary annotations= default, string description= default, bool required = true // Optional parameters - ) : base(name: name, annotations: annotations, description: description, platform: platform, handler: handler, required: required)// BaseClass - { - // to ensure "from" is required (not null) - this.From = from ?? throw new ArgumentNullException("from is a required property for DAGFileOutputAlias and cannot be null"); - - // Set non-required readonly properties with defaultValue - this.Type = "DAGFileOutputAlias"; - } - - //============================================== is ReadOnly - /// - /// Gets or Sets Type - /// - [DataMember(Name = "type", EmitDefaultValue = true)] - public string Type { get; protected internal set; } = "DAGFileOutputAlias"; - - /// - /// Reference to a file or a task output. Task output must be file. - /// - /// Reference to a file or a task output. Task output must be file. - [DataMember(Name = "from", IsRequired = true, EmitDefaultValue = false)] - public AnyOf From { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - return "DAGFileOutputAlias"; - } - - /// - /// 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("DAGFileOutputAlias:\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" Annotations: ").Append(Annotations).Append("\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" Platform: ").Append(Platform).Append("\n"); - sb.Append(" Handler: ").Append(Handler).Append("\n"); - sb.Append(" Required: ").Append(Required).Append("\n"); - sb.Append(" From: ").Append(From).Append("\n"); - return sb.ToString(); - } - - /// - /// Returns the object from JSON string - /// - /// DAGFileOutputAlias object - public static DAGFileOutputAlias 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. - /// - /// DAGFileOutputAlias object - public virtual DAGFileOutputAlias DuplicateDAGFileOutputAlias() - { - return FromJson(this.ToJson()); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel Duplicate() - { - return DuplicateDAGFileOutputAlias(); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override DAGArtifactOutputAlias DuplicateDAGArtifactOutputAlias() - { - return DuplicateDAGFileOutputAlias(); - } - - /// - /// 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 DAGFileOutputAlias); - } - - /// - /// Returns true if DAGFileOutputAlias instances are equal - /// - /// Instance of DAGFileOutputAlias to be compared - /// Boolean - public bool Equals(DAGFileOutputAlias input) - { - if (input == null) - return false; - return base.Equals(input) && - ( - this.From == input.From || - (this.From != null && - this.From.Equals(input.From)) - ) && 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.From != null) - hashCode = hashCode * 59 + this.From.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(@"^DAGFileOutputAlias$", 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/DAGFolderInput.cs b/src/PollinationSDK/Model/DAGFolderInput.cs deleted file mode 100644 index 6de36587a..000000000 --- a/src/PollinationSDK/Model/DAGFolderInput.cs +++ /dev/null @@ -1,256 +0,0 @@ -/* - * 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 folder input. Folder is a special string input. Unlike other string inputs, a folder will be copied from its location to execution folder when a workflow is executed. You can add additional validation by defining a JSONSchema specification. See http://json-schema.org/understanding-json-schema/reference/string.html#string for more information. .. code-block:: python \"schema\": { \"type\": \"string\", \"maxLength\": 50, } - /// - [DataContract(Name = "DAGFolderInput")] - public partial class DAGFolderInput : GenericInput, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected DAGFolderInput() - { - // Set non-required readonly properties with defaultValue - this.Type = "DAGFolderInput"; - } - - /// - /// Initializes a new instance of the class. - /// - /// The default source for file if the value is not provided.. - /// A list of aliases for this input in different platforms.. - /// A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. (default to false). - /// An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec.. - /// Input name. (required). - /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. - /// Optional description for input.. - public DAGFolderInput - ( - string name, // Required parameters - Dictionary annotations= default, string description= default, AnyOf _default= default, List> alias= default, bool required = false, Object spec= default // Optional parameters - ) : base(name: name, annotations: annotations, description: description)// BaseClass - { - this.Default = _default; - this.Alias = alias; - this.Required = required; - this.Spec = spec; - - // Set non-required readonly properties with defaultValue - this.Type = "DAGFolderInput"; - } - - //============================================== is ReadOnly - /// - /// Gets or Sets Type - /// - [DataMember(Name = "type", EmitDefaultValue = true)] - public string Type { get; protected internal set; } = "DAGFolderInput"; - - /// - /// The default source for file if the value is not provided. - /// - /// The default source for file if the value is not provided. - [DataMember(Name = "default", EmitDefaultValue = false)] - public AnyOf Default { get; set; } - /// - /// A list of aliases for this input in different platforms. - /// - /// A list of aliases for this input in different platforms. - [DataMember(Name = "alias", EmitDefaultValue = false)] - public List> Alias { get; set; } - /// - /// A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. - /// - /// A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. - [DataMember(Name = "required", EmitDefaultValue = true)] - public bool Required { get; set; } = false; - /// - /// An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec. - /// - /// An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec. - [DataMember(Name = "spec", EmitDefaultValue = false)] - public Object Spec { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - return "DAGFolderInput"; - } - - /// - /// 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("DAGFolderInput:\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" Annotations: ").Append(Annotations).Append("\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" Default: ").Append(Default).Append("\n"); - sb.Append(" Alias: ").Append(Alias).Append("\n"); - sb.Append(" Required: ").Append(Required).Append("\n"); - sb.Append(" Spec: ").Append(Spec).Append("\n"); - return sb.ToString(); - } - - /// - /// Returns the object from JSON string - /// - /// DAGFolderInput object - public static DAGFolderInput 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. - /// - /// DAGFolderInput object - public virtual DAGFolderInput DuplicateDAGFolderInput() - { - return FromJson(this.ToJson()); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel Duplicate() - { - return DuplicateDAGFolderInput(); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override GenericInput DuplicateGenericInput() - { - return DuplicateDAGFolderInput(); - } - - /// - /// 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 DAGFolderInput); - } - - /// - /// Returns true if DAGFolderInput instances are equal - /// - /// Instance of DAGFolderInput to be compared - /// Boolean - public bool Equals(DAGFolderInput input) - { - if (input == null) - return false; - return base.Equals(input) && - ( - this.Default == input.Default || - (this.Default != null && - this.Default.Equals(input.Default)) - ) && base.Equals(input) && - ( - this.Alias == input.Alias || - this.Alias != null && - input.Alias != null && - this.Alias.SequenceEqual(input.Alias) - ) && base.Equals(input) && - ( - this.Required == input.Required || - (this.Required != null && - this.Required.Equals(input.Required)) - ) && 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.Default != null) - hashCode = hashCode * 59 + this.Default.GetHashCode(); - if (this.Alias != null) - hashCode = hashCode * 59 + this.Alias.GetHashCode(); - if (this.Required != null) - hashCode = hashCode * 59 + this.Required.GetHashCode(); - if (this.Spec != null) - hashCode = hashCode * 59 + this.Spec.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(@"^DAGFolderInput$", 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/DAGFolderInputAlias.cs b/src/PollinationSDK/Model/DAGFolderInputAlias.cs deleted file mode 100644 index 3034e3d12..000000000 --- a/src/PollinationSDK/Model/DAGFolderInputAlias.cs +++ /dev/null @@ -1,275 +0,0 @@ -/* - * 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 alias folder input. Folder is a special string input. Unlike other string inputs, a folder will be copied from its location to execution folder when a workflow is executed. You can add additional validation by defining a JSONSchema specification. See http://json-schema.org/understanding-json-schema/reference/string.html#string for more information. .. code-block:: python \"schema\": { \"type\": \"string\", \"maxLength\": 50, } - /// - [DataContract(Name = "DAGFolderInputAlias")] - public partial class DAGFolderInputAlias : GenericInput, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected DAGFolderInputAlias() - { - // Set non-required readonly properties with defaultValue - this.Type = "DAGFolderInputAlias"; - } - - /// - /// Initializes a new instance of the class. - /// - /// 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. (required). - /// List of process actions to process the input or output value. (required). - /// The default source for file if the value is not provided.. - /// A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. (default to false). - /// An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec.. - /// Input name. (required). - /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. - /// Optional description for input.. - public DAGFolderInputAlias - ( - string name, List platform, List handler, // Required parameters - Dictionary annotations= default, string description= default, AnyOf _default= default, bool required = false, Object spec= default // Optional parameters - ) : base(name: name, annotations: annotations, description: description)// BaseClass - { - // to ensure "platform" is required (not null) - this.Platform = platform ?? throw new ArgumentNullException("platform is a required property for DAGFolderInputAlias and cannot be null"); - // to ensure "handler" is required (not null) - this.Handler = handler ?? throw new ArgumentNullException("handler is a required property for DAGFolderInputAlias and cannot be null"); - this.Default = _default; - this.Required = required; - this.Spec = spec; - - // Set non-required readonly properties with defaultValue - this.Type = "DAGFolderInputAlias"; - } - - //============================================== is ReadOnly - /// - /// Gets or Sets Type - /// - [DataMember(Name = "type", EmitDefaultValue = true)] - public string Type { get; protected internal set; } = "DAGFolderInputAlias"; - - /// - /// 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. - /// - /// 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. - [DataMember(Name = "platform", IsRequired = true, EmitDefaultValue = false)] - public List Platform { get; set; } - /// - /// List of process actions to process the input or output value. - /// - /// List of process actions to process the input or output value. - [DataMember(Name = "handler", IsRequired = true, EmitDefaultValue = false)] - public List Handler { get; set; } - /// - /// The default source for file if the value is not provided. - /// - /// The default source for file if the value is not provided. - [DataMember(Name = "default", EmitDefaultValue = false)] - public AnyOf Default { get; set; } - /// - /// A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. - /// - /// A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. - [DataMember(Name = "required", EmitDefaultValue = true)] - public bool Required { get; set; } = false; - /// - /// An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec. - /// - /// An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec. - [DataMember(Name = "spec", EmitDefaultValue = false)] - public Object Spec { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - return "DAGFolderInputAlias"; - } - - /// - /// 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("DAGFolderInputAlias:\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" Annotations: ").Append(Annotations).Append("\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" Platform: ").Append(Platform).Append("\n"); - sb.Append(" Handler: ").Append(Handler).Append("\n"); - sb.Append(" Default: ").Append(Default).Append("\n"); - sb.Append(" Required: ").Append(Required).Append("\n"); - sb.Append(" Spec: ").Append(Spec).Append("\n"); - return sb.ToString(); - } - - /// - /// Returns the object from JSON string - /// - /// DAGFolderInputAlias object - public static DAGFolderInputAlias 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. - /// - /// DAGFolderInputAlias object - public virtual DAGFolderInputAlias DuplicateDAGFolderInputAlias() - { - return FromJson(this.ToJson()); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel Duplicate() - { - return DuplicateDAGFolderInputAlias(); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override GenericInput DuplicateGenericInput() - { - return DuplicateDAGFolderInputAlias(); - } - - /// - /// 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 DAGFolderInputAlias); - } - - /// - /// Returns true if DAGFolderInputAlias instances are equal - /// - /// Instance of DAGFolderInputAlias to be compared - /// Boolean - public bool Equals(DAGFolderInputAlias input) - { - if (input == null) - return false; - return base.Equals(input) && - ( - this.Platform == input.Platform || - this.Platform != null && - input.Platform != null && - this.Platform.SequenceEqual(input.Platform) - ) && base.Equals(input) && - ( - this.Handler == input.Handler || - this.Handler != null && - input.Handler != null && - this.Handler.SequenceEqual(input.Handler) - ) && base.Equals(input) && - ( - this.Default == input.Default || - (this.Default != null && - this.Default.Equals(input.Default)) - ) && base.Equals(input) && - ( - this.Required == input.Required || - (this.Required != null && - this.Required.Equals(input.Required)) - ) && 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.Platform != null) - hashCode = hashCode * 59 + this.Platform.GetHashCode(); - if (this.Handler != null) - hashCode = hashCode * 59 + this.Handler.GetHashCode(); - if (this.Default != null) - hashCode = hashCode * 59 + this.Default.GetHashCode(); - if (this.Required != null) - hashCode = hashCode * 59 + this.Required.GetHashCode(); - if (this.Spec != null) - hashCode = hashCode * 59 + this.Spec.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(@"^DAGFolderInputAlias$", 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/DAGFolderOutput.cs b/src/PollinationSDK/Model/DAGFolderOutput.cs deleted file mode 100644 index 685ebfa5c..000000000 --- a/src/PollinationSDK/Model/DAGFolderOutput.cs +++ /dev/null @@ -1,246 +0,0 @@ -/* - * 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 -{ - /// - /// DAG folder output. - /// - [DataContract(Name = "DAGFolderOutput")] - public partial class DAGFolderOutput : GenericOutput, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected DAGFolderOutput() - { - // Set non-required readonly properties with defaultValue - this.Type = "DAGFolderOutput"; - } - - /// - /// Initializes a new instance of the class. - /// - /// Reference to a folder or a task output. Task output must be folder. (required). - /// A list of additional processes for loading this output on different platforms.. - /// A boolean to indicate if an artifact output is required. A False value makes the artifact optional. (default to true). - /// Output name. (required). - /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. - /// Optional description for output.. - public DAGFolderOutput - ( - string name, AnyOf from, // Required parameters - Dictionary annotations= default, string description= default, List> alias= default, bool required = true // Optional parameters - ) : base(name: name, annotations: annotations, description: description)// BaseClass - { - // to ensure "from" is required (not null) - this.From = from ?? throw new ArgumentNullException("from is a required property for DAGFolderOutput and cannot be null"); - this.Alias = alias; - this.Required = required; - - // Set non-required readonly properties with defaultValue - this.Type = "DAGFolderOutput"; - } - - //============================================== is ReadOnly - /// - /// Gets or Sets Type - /// - [DataMember(Name = "type", EmitDefaultValue = true)] - public string Type { get; protected internal set; } = "DAGFolderOutput"; - - /// - /// Reference to a folder or a task output. Task output must be folder. - /// - /// Reference to a folder or a task output. Task output must be folder. - [DataMember(Name = "from", IsRequired = true, EmitDefaultValue = false)] - public AnyOf From { get; set; } - /// - /// A list of additional processes for loading this output on different platforms. - /// - /// A list of additional processes for loading this output on different platforms. - [DataMember(Name = "alias", EmitDefaultValue = false)] - public List> Alias { get; set; } - /// - /// A boolean to indicate if an artifact output is required. A False value makes the artifact optional. - /// - /// A boolean to indicate if an artifact output is required. A False value makes the artifact optional. - [DataMember(Name = "required", EmitDefaultValue = true)] - public bool Required { get; set; } = true; - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - return "DAGFolderOutput"; - } - - /// - /// 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("DAGFolderOutput:\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" Annotations: ").Append(Annotations).Append("\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" From: ").Append(From).Append("\n"); - sb.Append(" Alias: ").Append(Alias).Append("\n"); - sb.Append(" Required: ").Append(Required).Append("\n"); - return sb.ToString(); - } - - /// - /// Returns the object from JSON string - /// - /// DAGFolderOutput object - public static DAGFolderOutput 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. - /// - /// DAGFolderOutput object - public virtual DAGFolderOutput DuplicateDAGFolderOutput() - { - return FromJson(this.ToJson()); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel Duplicate() - { - return DuplicateDAGFolderOutput(); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override GenericOutput DuplicateGenericOutput() - { - return DuplicateDAGFolderOutput(); - } - - /// - /// 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 DAGFolderOutput); - } - - /// - /// Returns true if DAGFolderOutput instances are equal - /// - /// Instance of DAGFolderOutput to be compared - /// Boolean - public bool Equals(DAGFolderOutput input) - { - if (input == null) - return false; - return base.Equals(input) && - ( - this.From == input.From || - (this.From != null && - this.From.Equals(input.From)) - ) && base.Equals(input) && - ( - this.Alias == input.Alias || - this.Alias != null && - input.Alias != null && - this.Alias.SequenceEqual(input.Alias) - ) && base.Equals(input) && - ( - this.Required == input.Required || - (this.Required != null && - this.Required.Equals(input.Required)) - ) && 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.From != null) - hashCode = hashCode * 59 + this.From.GetHashCode(); - if (this.Alias != null) - hashCode = hashCode * 59 + this.Alias.GetHashCode(); - if (this.Required != null) - hashCode = hashCode * 59 + this.Required.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(@"^DAGFolderOutput$", 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/DAGFolderOutputAlias.cs b/src/PollinationSDK/Model/DAGFolderOutputAlias.cs deleted file mode 100644 index 47f2e67f3..000000000 --- a/src/PollinationSDK/Model/DAGFolderOutputAlias.cs +++ /dev/null @@ -1,219 +0,0 @@ -/* - * 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 -{ - /// - /// DAG alias folder output. - /// - [DataContract(Name = "DAGFolderOutputAlias")] - public partial class DAGFolderOutputAlias : DAGArtifactOutputAlias, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected DAGFolderOutputAlias() - { - // Set non-required readonly properties with defaultValue - this.Type = "DAGFolderOutputAlias"; - } - - /// - /// Initializes a new instance of the class. - /// - /// Reference to a folder or a task output. Task output must be folder. (required). - /// Output name. (required). - /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. - /// Optional description for output.. - /// 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. (required). - /// List of process actions to process the input or output value. (required). - /// A boolean to indicate if an artifact output is required. A False value makes the artifact optional. (default to true). - public DAGFolderOutputAlias - ( - string name, List platform, List handler, AnyOf from, // Required parameters - Dictionary annotations= default, string description= default, bool required = true // Optional parameters - ) : base(name: name, annotations: annotations, description: description, platform: platform, handler: handler, required: required)// BaseClass - { - // to ensure "from" is required (not null) - this.From = from ?? throw new ArgumentNullException("from is a required property for DAGFolderOutputAlias and cannot be null"); - - // Set non-required readonly properties with defaultValue - this.Type = "DAGFolderOutputAlias"; - } - - //============================================== is ReadOnly - /// - /// Gets or Sets Type - /// - [DataMember(Name = "type", EmitDefaultValue = true)] - public string Type { get; protected internal set; } = "DAGFolderOutputAlias"; - - /// - /// Reference to a folder or a task output. Task output must be folder. - /// - /// Reference to a folder or a task output. Task output must be folder. - [DataMember(Name = "from", IsRequired = true, EmitDefaultValue = false)] - public AnyOf From { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - return "DAGFolderOutputAlias"; - } - - /// - /// 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("DAGFolderOutputAlias:\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" Annotations: ").Append(Annotations).Append("\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" Platform: ").Append(Platform).Append("\n"); - sb.Append(" Handler: ").Append(Handler).Append("\n"); - sb.Append(" Required: ").Append(Required).Append("\n"); - sb.Append(" From: ").Append(From).Append("\n"); - return sb.ToString(); - } - - /// - /// Returns the object from JSON string - /// - /// DAGFolderOutputAlias object - public static DAGFolderOutputAlias 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. - /// - /// DAGFolderOutputAlias object - public virtual DAGFolderOutputAlias DuplicateDAGFolderOutputAlias() - { - return FromJson(this.ToJson()); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel Duplicate() - { - return DuplicateDAGFolderOutputAlias(); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override DAGArtifactOutputAlias DuplicateDAGArtifactOutputAlias() - { - return DuplicateDAGFolderOutputAlias(); - } - - /// - /// 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 DAGFolderOutputAlias); - } - - /// - /// Returns true if DAGFolderOutputAlias instances are equal - /// - /// Instance of DAGFolderOutputAlias to be compared - /// Boolean - public bool Equals(DAGFolderOutputAlias input) - { - if (input == null) - return false; - return base.Equals(input) && - ( - this.From == input.From || - (this.From != null && - this.From.Equals(input.From)) - ) && 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.From != null) - hashCode = hashCode * 59 + this.From.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(@"^DAGFolderOutputAlias$", 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/DAGGenericInput.cs b/src/PollinationSDK/Model/DAGGenericInput.cs deleted file mode 100644 index 04a679c3a..000000000 --- a/src/PollinationSDK/Model/DAGGenericInput.cs +++ /dev/null @@ -1,266 +0,0 @@ -/* - * 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 -{ - /// - /// Base class for DAG inputs. This class adds a handler to input to handle the process of loading the input from different graphical interfaces. - /// - [DataContract(Name = "DAGGenericInput")] - public partial class DAGGenericInput : GenericInput, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected DAGGenericInput() - { - // Set non-required readonly properties with defaultValue - this.Type = "DAGGenericInput"; - } - - /// - /// Initializes a new instance of the class. - /// - /// Default value for generic input.. - /// A list of aliases for this input in different platforms.. - /// A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. (default to false). - /// An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec.. - /// Input name. (required). - /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. - /// Optional description for input.. - public DAGGenericInput - ( - string name, // Required parameters - Dictionary annotations= default, string description= default, string _default= default, List> alias= default, bool required = false, Object spec= default // Optional parameters - ) : base(name: name, annotations: annotations, description: description)// BaseClass - { - this.Default = _default; - this.Alias = alias; - this.Required = required; - this.Spec = spec; - - // Set non-required readonly properties with defaultValue - this.Type = "DAGGenericInput"; - } - - //============================================== is ReadOnly - /// - /// Gets or Sets Type - /// - [DataMember(Name = "type", EmitDefaultValue = true)] - public string Type { get; protected internal set; } = "DAGGenericInput"; - - /// - /// Default value for generic input. - /// - /// Default value for generic input. - [DataMember(Name = "default", EmitDefaultValue = false)] - public string Default { get; set; } - /// - /// A list of aliases for this input in different platforms. - /// - /// A list of aliases for this input in different platforms. - [DataMember(Name = "alias", EmitDefaultValue = false)] - public List> Alias { get; set; } - /// - /// A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. - /// - /// A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. - [DataMember(Name = "required", EmitDefaultValue = true)] - public bool Required { get; set; } = false; - /// - /// An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec. - /// - /// An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec. - [DataMember(Name = "spec", EmitDefaultValue = false)] - public Object Spec { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - return "DAGGenericInput"; - } - - /// - /// 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("DAGGenericInput:\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" Annotations: ").Append(Annotations).Append("\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" Default: ").Append(Default).Append("\n"); - sb.Append(" Alias: ").Append(Alias).Append("\n"); - sb.Append(" Required: ").Append(Required).Append("\n"); - sb.Append(" Spec: ").Append(Spec).Append("\n"); - return sb.ToString(); - } - - /// - /// Returns the object from JSON string - /// - /// DAGGenericInput object - public static DAGGenericInput 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. - /// - /// DAGGenericInput object - public virtual DAGGenericInput DuplicateDAGGenericInput() - { - return FromJson(this.ToJson()); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel Duplicate() - { - return DuplicateDAGGenericInput(); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override GenericInput DuplicateGenericInput() - { - return DuplicateDAGGenericInput(); - } - - /// - /// 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 DAGGenericInput); - } - - /// - /// Returns true if DAGGenericInput instances are equal - /// - /// Instance of DAGGenericInput to be compared - /// Boolean - public bool Equals(DAGGenericInput input) - { - if (input == null) - return false; - return base.Equals(input) && - ( - this.Default == input.Default || - (this.Default != null && - this.Default.Equals(input.Default)) - ) && base.Equals(input) && - ( - this.Alias == input.Alias || - this.Alias != null && - input.Alias != null && - this.Alias.SequenceEqual(input.Alias) - ) && base.Equals(input) && - ( - this.Required == input.Required || - (this.Required != null && - this.Required.Equals(input.Required)) - ) && 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.Default != null) - hashCode = hashCode * 59 + this.Default.GetHashCode(); - if (this.Alias != null) - hashCode = hashCode * 59 + this.Alias.GetHashCode(); - if (this.Required != null) - hashCode = hashCode * 59 + this.Required.GetHashCode(); - if (this.Spec != null) - hashCode = hashCode * 59 + this.Spec.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(@"^DAGGenericInput$", 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/DAGGenericInputAlias.cs b/src/PollinationSDK/Model/DAGGenericInputAlias.cs deleted file mode 100644 index 869b99c10..000000000 --- a/src/PollinationSDK/Model/DAGGenericInputAlias.cs +++ /dev/null @@ -1,285 +0,0 @@ -/* - * 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 -{ - /// - /// Base class for DAG Alias inputs. This class adds a handler to input to handle the process of loading the input from different graphical interfaces. - /// - [DataContract(Name = "DAGGenericInputAlias")] - public partial class DAGGenericInputAlias : GenericInput, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected DAGGenericInputAlias() - { - // Set non-required readonly properties with defaultValue - this.Type = "DAGGenericInputAlias"; - } - - /// - /// Initializes a new instance of the class. - /// - /// 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. (required). - /// List of process actions to process the input or output value. (required). - /// Default value for generic input.. - /// A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. (default to false). - /// An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec.. - /// Input name. (required). - /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. - /// Optional description for input.. - public DAGGenericInputAlias - ( - string name, List platform, List handler, // Required parameters - Dictionary annotations= default, string description= default, string _default= default, bool required = false, Object spec= default // Optional parameters - ) : base(name: name, annotations: annotations, description: description)// BaseClass - { - // to ensure "platform" is required (not null) - this.Platform = platform ?? throw new ArgumentNullException("platform is a required property for DAGGenericInputAlias and cannot be null"); - // to ensure "handler" is required (not null) - this.Handler = handler ?? throw new ArgumentNullException("handler is a required property for DAGGenericInputAlias and cannot be null"); - this.Default = _default; - this.Required = required; - this.Spec = spec; - - // Set non-required readonly properties with defaultValue - this.Type = "DAGGenericInputAlias"; - } - - //============================================== is ReadOnly - /// - /// Gets or Sets Type - /// - [DataMember(Name = "type", EmitDefaultValue = true)] - public string Type { get; protected internal set; } = "DAGGenericInputAlias"; - - /// - /// 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. - /// - /// 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. - [DataMember(Name = "platform", IsRequired = true, EmitDefaultValue = false)] - public List Platform { get; set; } - /// - /// List of process actions to process the input or output value. - /// - /// List of process actions to process the input or output value. - [DataMember(Name = "handler", IsRequired = true, EmitDefaultValue = false)] - public List Handler { get; set; } - /// - /// Default value for generic input. - /// - /// Default value for generic input. - [DataMember(Name = "default", EmitDefaultValue = false)] - public string Default { get; set; } - /// - /// A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. - /// - /// A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. - [DataMember(Name = "required", EmitDefaultValue = true)] - public bool Required { get; set; } = false; - /// - /// An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec. - /// - /// An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec. - [DataMember(Name = "spec", EmitDefaultValue = false)] - public Object Spec { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - return "DAGGenericInputAlias"; - } - - /// - /// 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("DAGGenericInputAlias:\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" Annotations: ").Append(Annotations).Append("\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" Platform: ").Append(Platform).Append("\n"); - sb.Append(" Handler: ").Append(Handler).Append("\n"); - sb.Append(" Default: ").Append(Default).Append("\n"); - sb.Append(" Required: ").Append(Required).Append("\n"); - sb.Append(" Spec: ").Append(Spec).Append("\n"); - return sb.ToString(); - } - - /// - /// Returns the object from JSON string - /// - /// DAGGenericInputAlias object - public static DAGGenericInputAlias 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. - /// - /// DAGGenericInputAlias object - public virtual DAGGenericInputAlias DuplicateDAGGenericInputAlias() - { - return FromJson(this.ToJson()); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel Duplicate() - { - return DuplicateDAGGenericInputAlias(); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override GenericInput DuplicateGenericInput() - { - return DuplicateDAGGenericInputAlias(); - } - - /// - /// 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 DAGGenericInputAlias); - } - - /// - /// Returns true if DAGGenericInputAlias instances are equal - /// - /// Instance of DAGGenericInputAlias to be compared - /// Boolean - public bool Equals(DAGGenericInputAlias input) - { - if (input == null) - return false; - return base.Equals(input) && - ( - this.Platform == input.Platform || - this.Platform != null && - input.Platform != null && - this.Platform.SequenceEqual(input.Platform) - ) && base.Equals(input) && - ( - this.Handler == input.Handler || - this.Handler != null && - input.Handler != null && - this.Handler.SequenceEqual(input.Handler) - ) && base.Equals(input) && - ( - this.Default == input.Default || - (this.Default != null && - this.Default.Equals(input.Default)) - ) && base.Equals(input) && - ( - this.Required == input.Required || - (this.Required != null && - this.Required.Equals(input.Required)) - ) && 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.Platform != null) - hashCode = hashCode * 59 + this.Platform.GetHashCode(); - if (this.Handler != null) - hashCode = hashCode * 59 + this.Handler.GetHashCode(); - if (this.Default != null) - hashCode = hashCode * 59 + this.Default.GetHashCode(); - if (this.Required != null) - hashCode = hashCode * 59 + this.Required.GetHashCode(); - if (this.Spec != null) - hashCode = hashCode * 59 + this.Spec.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(@"^DAGGenericInputAlias$", 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/DAGGenericOutput.cs b/src/PollinationSDK/Model/DAGGenericOutput.cs deleted file mode 100644 index 907c133cb..000000000 --- a/src/PollinationSDK/Model/DAGGenericOutput.cs +++ /dev/null @@ -1,225 +0,0 @@ -/* - * 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 -{ - /// - /// DAG generic output. In most cases, you should not be using the generic output unless you need a dynamic output that changes its type in different platforms because of returning different objects in handler. - /// - [DataContract(Name = "DAGGenericOutput")] - public partial class DAGGenericOutput : FromOutput, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected DAGGenericOutput() - { - // Set non-required readonly properties with defaultValue - this.Type = "DAGGenericOutput"; - } - - /// - /// Initializes a new instance of the class. - /// - /// A list of additional processes for loading this output on different platforms.. - /// Output name. (required). - /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. - /// Optional description for output.. - /// Reference to a file or a task output. Task output must be file. (required). - public DAGGenericOutput - ( - string name, object from, // Required parameters - Dictionary annotations= default, string description= default, List> alias= default // Optional parameters - ) : base(name: name, annotations: annotations, description: description, from: from)// BaseClass - { - this.Alias = alias; - - // Set non-required readonly properties with defaultValue - this.Type = "DAGGenericOutput"; - } - - //============================================== is ReadOnly - /// - /// Gets or Sets Type - /// - [DataMember(Name = "type", EmitDefaultValue = true)] - public string Type { get; protected internal set; } = "DAGGenericOutput"; - - /// - /// A list of additional processes for loading this output on different platforms. - /// - /// A list of additional processes for loading this output on different platforms. - [DataMember(Name = "alias", EmitDefaultValue = false)] - public List> Alias { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - return "DAGGenericOutput"; - } - - /// - /// 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("DAGGenericOutput:\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" Annotations: ").Append(Annotations).Append("\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" From: ").Append(From).Append("\n"); - sb.Append(" Alias: ").Append(Alias).Append("\n"); - return sb.ToString(); - } - - /// - /// Returns the object from JSON string - /// - /// DAGGenericOutput object - public static DAGGenericOutput 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. - /// - /// DAGGenericOutput object - public virtual DAGGenericOutput DuplicateDAGGenericOutput() - { - return FromJson(this.ToJson()); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel Duplicate() - { - return DuplicateDAGGenericOutput(); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override FromOutput DuplicateFromOutput() - { - return DuplicateDAGGenericOutput(); - } - - /// - /// 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 DAGGenericOutput); - } - - /// - /// Returns true if DAGGenericOutput instances are equal - /// - /// Instance of DAGGenericOutput to be compared - /// Boolean - public bool Equals(DAGGenericOutput input) - { - if (input == null) - return false; - return base.Equals(input) && - ( - this.Alias == input.Alias || - this.Alias != null && - input.Alias != null && - this.Alias.SequenceEqual(input.Alias) - ) && 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.Alias != null) - hashCode = hashCode * 59 + this.Alias.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(@"^DAGGenericOutput$", 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/DAGGenericOutputAlias.cs b/src/PollinationSDK/Model/DAGGenericOutputAlias.cs deleted file mode 100644 index a1c5f141f..000000000 --- a/src/PollinationSDK/Model/DAGGenericOutputAlias.cs +++ /dev/null @@ -1,242 +0,0 @@ -/* - * 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 -{ - /// - /// DAG generic alias output. In most cases, you should not be using the generic output unless you need a dynamic output that changes its type in different platforms because of returning different objects in handler. - /// - [DataContract(Name = "DAGGenericOutputAlias")] - public partial class DAGGenericOutputAlias : GenericOutput, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected DAGGenericOutputAlias() - { - // Set non-required readonly properties with defaultValue - this.Type = "DAGGenericOutputAlias"; - } - - /// - /// Initializes a new instance of the class. - /// - /// 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. (required). - /// List of process actions to process the input or output value. (required). - /// Output name. (required). - /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. - /// Optional description for output.. - public DAGGenericOutputAlias - ( - string name, List platform, List handler, // Required parameters - Dictionary annotations= default, string description= default // Optional parameters - ) : base(name: name, annotations: annotations, description: description)// BaseClass - { - // to ensure "platform" is required (not null) - this.Platform = platform ?? throw new ArgumentNullException("platform is a required property for DAGGenericOutputAlias and cannot be null"); - // to ensure "handler" is required (not null) - this.Handler = handler ?? throw new ArgumentNullException("handler is a required property for DAGGenericOutputAlias and cannot be null"); - - // Set non-required readonly properties with defaultValue - this.Type = "DAGGenericOutputAlias"; - } - - //============================================== is ReadOnly - /// - /// Gets or Sets Type - /// - [DataMember(Name = "type", EmitDefaultValue = true)] - public string Type { get; protected internal set; } = "DAGGenericOutputAlias"; - - /// - /// 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. - /// - /// 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. - [DataMember(Name = "platform", IsRequired = true, EmitDefaultValue = false)] - public List Platform { get; set; } - /// - /// List of process actions to process the input or output value. - /// - /// List of process actions to process the input or output value. - [DataMember(Name = "handler", IsRequired = true, EmitDefaultValue = false)] - public List Handler { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - return "DAGGenericOutputAlias"; - } - - /// - /// 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("DAGGenericOutputAlias:\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" Annotations: ").Append(Annotations).Append("\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" Platform: ").Append(Platform).Append("\n"); - sb.Append(" Handler: ").Append(Handler).Append("\n"); - return sb.ToString(); - } - - /// - /// Returns the object from JSON string - /// - /// DAGGenericOutputAlias object - public static DAGGenericOutputAlias 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. - /// - /// DAGGenericOutputAlias object - public virtual DAGGenericOutputAlias DuplicateDAGGenericOutputAlias() - { - return FromJson(this.ToJson()); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel Duplicate() - { - return DuplicateDAGGenericOutputAlias(); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override GenericOutput DuplicateGenericOutput() - { - return DuplicateDAGGenericOutputAlias(); - } - - /// - /// 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 DAGGenericOutputAlias); - } - - /// - /// Returns true if DAGGenericOutputAlias instances are equal - /// - /// Instance of DAGGenericOutputAlias to be compared - /// Boolean - public bool Equals(DAGGenericOutputAlias input) - { - if (input == null) - return false; - return base.Equals(input) && - ( - this.Platform == input.Platform || - this.Platform != null && - input.Platform != null && - this.Platform.SequenceEqual(input.Platform) - ) && base.Equals(input) && - ( - this.Handler == input.Handler || - this.Handler != null && - input.Handler != null && - this.Handler.SequenceEqual(input.Handler) - ) && 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.Platform != null) - hashCode = hashCode * 59 + this.Platform.GetHashCode(); - if (this.Handler != null) - hashCode = hashCode * 59 + this.Handler.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(@"^DAGGenericOutputAlias$", 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/DAGIntegerInput.cs b/src/PollinationSDK/Model/DAGIntegerInput.cs deleted file mode 100644 index 0840d1e41..000000000 --- a/src/PollinationSDK/Model/DAGIntegerInput.cs +++ /dev/null @@ -1,256 +0,0 @@ -/* - * 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 integer input. You can add additional validation by defining a JSONSchema specification. See http://json-schema.org/understanding-json-schema/reference/numeric.html#numeric for more information. - /// - [DataContract(Name = "DAGIntegerInput")] - public partial class DAGIntegerInput : GenericInput, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected DAGIntegerInput() - { - // Set non-required readonly properties with defaultValue - this.Type = "DAGIntegerInput"; - } - - /// - /// Initializes a new instance of the class. - /// - /// Default value to use for an input if a value was not supplied.. - /// A list of aliases for this input in different platforms.. - /// A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. (default to false). - /// An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec.. - /// Input name. (required). - /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. - /// Optional description for input.. - public DAGIntegerInput - ( - string name, // Required parameters - Dictionary annotations= default, string description= default, int _default= default, List> alias= default, bool required = false, Object spec= default // Optional parameters - ) : base(name: name, annotations: annotations, description: description)// BaseClass - { - this.Default = _default; - this.Alias = alias; - this.Required = required; - this.Spec = spec; - - // Set non-required readonly properties with defaultValue - this.Type = "DAGIntegerInput"; - } - - //============================================== is ReadOnly - /// - /// Gets or Sets Type - /// - [DataMember(Name = "type", EmitDefaultValue = true)] - public string Type { get; protected internal set; } = "DAGIntegerInput"; - - /// - /// Default value to use for an input if a value was not supplied. - /// - /// Default value to use for an input if a value was not supplied. - [DataMember(Name = "default", EmitDefaultValue = false)] - public int Default { get; set; } - /// - /// A list of aliases for this input in different platforms. - /// - /// A list of aliases for this input in different platforms. - [DataMember(Name = "alias", EmitDefaultValue = false)] - public List> Alias { get; set; } - /// - /// A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. - /// - /// A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. - [DataMember(Name = "required", EmitDefaultValue = true)] - public bool Required { get; set; } = false; - /// - /// An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec. - /// - /// An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec. - [DataMember(Name = "spec", EmitDefaultValue = false)] - public Object Spec { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - return "DAGIntegerInput"; - } - - /// - /// 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("DAGIntegerInput:\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" Annotations: ").Append(Annotations).Append("\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" Default: ").Append(Default).Append("\n"); - sb.Append(" Alias: ").Append(Alias).Append("\n"); - sb.Append(" Required: ").Append(Required).Append("\n"); - sb.Append(" Spec: ").Append(Spec).Append("\n"); - return sb.ToString(); - } - - /// - /// Returns the object from JSON string - /// - /// DAGIntegerInput object - public static DAGIntegerInput 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. - /// - /// DAGIntegerInput object - public virtual DAGIntegerInput DuplicateDAGIntegerInput() - { - return FromJson(this.ToJson()); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel Duplicate() - { - return DuplicateDAGIntegerInput(); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override GenericInput DuplicateGenericInput() - { - return DuplicateDAGIntegerInput(); - } - - /// - /// 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 DAGIntegerInput); - } - - /// - /// Returns true if DAGIntegerInput instances are equal - /// - /// Instance of DAGIntegerInput to be compared - /// Boolean - public bool Equals(DAGIntegerInput input) - { - if (input == null) - return false; - return base.Equals(input) && - ( - this.Default == input.Default || - (this.Default != null && - this.Default.Equals(input.Default)) - ) && base.Equals(input) && - ( - this.Alias == input.Alias || - this.Alias != null && - input.Alias != null && - this.Alias.SequenceEqual(input.Alias) - ) && base.Equals(input) && - ( - this.Required == input.Required || - (this.Required != null && - this.Required.Equals(input.Required)) - ) && 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.Default != null) - hashCode = hashCode * 59 + this.Default.GetHashCode(); - if (this.Alias != null) - hashCode = hashCode * 59 + this.Alias.GetHashCode(); - if (this.Required != null) - hashCode = hashCode * 59 + this.Required.GetHashCode(); - if (this.Spec != null) - hashCode = hashCode * 59 + this.Spec.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(@"^DAGIntegerInput$", 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/DAGIntegerInputAlias.cs b/src/PollinationSDK/Model/DAGIntegerInputAlias.cs deleted file mode 100644 index 130d2d6c7..000000000 --- a/src/PollinationSDK/Model/DAGIntegerInputAlias.cs +++ /dev/null @@ -1,275 +0,0 @@ -/* - * 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 alias integer input. You can add additional validation by defining a JSONSchema specification. See http://json-schema.org/understanding-json-schema/reference/numeric.html#numeric for more information. - /// - [DataContract(Name = "DAGIntegerInputAlias")] - public partial class DAGIntegerInputAlias : GenericInput, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected DAGIntegerInputAlias() - { - // Set non-required readonly properties with defaultValue - this.Type = "DAGIntegerInputAlias"; - } - - /// - /// Initializes a new instance of the class. - /// - /// 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. (required). - /// List of process actions to process the input or output value. (required). - /// Default value to use for an input if a value was not supplied.. - /// A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. (default to false). - /// An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec.. - /// Input name. (required). - /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. - /// Optional description for input.. - public DAGIntegerInputAlias - ( - string name, List platform, List handler, // Required parameters - Dictionary annotations= default, string description= default, int _default= default, bool required = false, Object spec= default // Optional parameters - ) : base(name: name, annotations: annotations, description: description)// BaseClass - { - // to ensure "platform" is required (not null) - this.Platform = platform ?? throw new ArgumentNullException("platform is a required property for DAGIntegerInputAlias and cannot be null"); - // to ensure "handler" is required (not null) - this.Handler = handler ?? throw new ArgumentNullException("handler is a required property for DAGIntegerInputAlias and cannot be null"); - this.Default = _default; - this.Required = required; - this.Spec = spec; - - // Set non-required readonly properties with defaultValue - this.Type = "DAGIntegerInputAlias"; - } - - //============================================== is ReadOnly - /// - /// Gets or Sets Type - /// - [DataMember(Name = "type", EmitDefaultValue = true)] - public string Type { get; protected internal set; } = "DAGIntegerInputAlias"; - - /// - /// 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. - /// - /// 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. - [DataMember(Name = "platform", IsRequired = true, EmitDefaultValue = false)] - public List Platform { get; set; } - /// - /// List of process actions to process the input or output value. - /// - /// List of process actions to process the input or output value. - [DataMember(Name = "handler", IsRequired = true, EmitDefaultValue = false)] - public List Handler { get; set; } - /// - /// Default value to use for an input if a value was not supplied. - /// - /// Default value to use for an input if a value was not supplied. - [DataMember(Name = "default", EmitDefaultValue = false)] - public int Default { get; set; } - /// - /// A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. - /// - /// A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. - [DataMember(Name = "required", EmitDefaultValue = true)] - public bool Required { get; set; } = false; - /// - /// An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec. - /// - /// An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec. - [DataMember(Name = "spec", EmitDefaultValue = false)] - public Object Spec { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - return "DAGIntegerInputAlias"; - } - - /// - /// 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("DAGIntegerInputAlias:\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" Annotations: ").Append(Annotations).Append("\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" Platform: ").Append(Platform).Append("\n"); - sb.Append(" Handler: ").Append(Handler).Append("\n"); - sb.Append(" Default: ").Append(Default).Append("\n"); - sb.Append(" Required: ").Append(Required).Append("\n"); - sb.Append(" Spec: ").Append(Spec).Append("\n"); - return sb.ToString(); - } - - /// - /// Returns the object from JSON string - /// - /// DAGIntegerInputAlias object - public static DAGIntegerInputAlias 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. - /// - /// DAGIntegerInputAlias object - public virtual DAGIntegerInputAlias DuplicateDAGIntegerInputAlias() - { - return FromJson(this.ToJson()); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel Duplicate() - { - return DuplicateDAGIntegerInputAlias(); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override GenericInput DuplicateGenericInput() - { - return DuplicateDAGIntegerInputAlias(); - } - - /// - /// 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 DAGIntegerInputAlias); - } - - /// - /// Returns true if DAGIntegerInputAlias instances are equal - /// - /// Instance of DAGIntegerInputAlias to be compared - /// Boolean - public bool Equals(DAGIntegerInputAlias input) - { - if (input == null) - return false; - return base.Equals(input) && - ( - this.Platform == input.Platform || - this.Platform != null && - input.Platform != null && - this.Platform.SequenceEqual(input.Platform) - ) && base.Equals(input) && - ( - this.Handler == input.Handler || - this.Handler != null && - input.Handler != null && - this.Handler.SequenceEqual(input.Handler) - ) && base.Equals(input) && - ( - this.Default == input.Default || - (this.Default != null && - this.Default.Equals(input.Default)) - ) && base.Equals(input) && - ( - this.Required == input.Required || - (this.Required != null && - this.Required.Equals(input.Required)) - ) && 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.Platform != null) - hashCode = hashCode * 59 + this.Platform.GetHashCode(); - if (this.Handler != null) - hashCode = hashCode * 59 + this.Handler.GetHashCode(); - if (this.Default != null) - hashCode = hashCode * 59 + this.Default.GetHashCode(); - if (this.Required != null) - hashCode = hashCode * 59 + this.Required.GetHashCode(); - if (this.Spec != null) - hashCode = hashCode * 59 + this.Spec.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(@"^DAGIntegerInputAlias$", 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/DAGIntegerOutput.cs b/src/PollinationSDK/Model/DAGIntegerOutput.cs deleted file mode 100644 index 3b93edeb3..000000000 --- a/src/PollinationSDK/Model/DAGIntegerOutput.cs +++ /dev/null @@ -1,246 +0,0 @@ -/* - * 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 -{ - /// - /// DAG integer output. This output loads the content from a file as an integer. - /// - [DataContract(Name = "DAGIntegerOutput")] - public partial class DAGIntegerOutput : GenericOutput, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected DAGIntegerOutput() - { - // Set non-required readonly properties with defaultValue - this.Type = "DAGIntegerOutput"; - } - - /// - /// Initializes a new instance of the class. - /// - /// Reference to a file or a task output. Task output must be file. (required). - /// A list of additional processes for loading this output on different platforms.. - /// A boolean to indicate if an artifact output is required. A False value makes the artifact optional. (default to true). - /// Output name. (required). - /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. - /// Optional description for output.. - public DAGIntegerOutput - ( - string name, AnyOf from, // Required parameters - Dictionary annotations= default, string description= default, List> alias= default, bool required = true // Optional parameters - ) : base(name: name, annotations: annotations, description: description)// BaseClass - { - // to ensure "from" is required (not null) - this.From = from ?? throw new ArgumentNullException("from is a required property for DAGIntegerOutput and cannot be null"); - this.Alias = alias; - this.Required = required; - - // Set non-required readonly properties with defaultValue - this.Type = "DAGIntegerOutput"; - } - - //============================================== is ReadOnly - /// - /// Gets or Sets Type - /// - [DataMember(Name = "type", EmitDefaultValue = true)] - public string Type { get; protected internal set; } = "DAGIntegerOutput"; - - /// - /// Reference to a file or a task output. Task output must be file. - /// - /// Reference to a file or a task output. Task output must be file. - [DataMember(Name = "from", IsRequired = true, EmitDefaultValue = false)] - public AnyOf From { get; set; } - /// - /// A list of additional processes for loading this output on different platforms. - /// - /// A list of additional processes for loading this output on different platforms. - [DataMember(Name = "alias", EmitDefaultValue = false)] - public List> Alias { get; set; } - /// - /// A boolean to indicate if an artifact output is required. A False value makes the artifact optional. - /// - /// A boolean to indicate if an artifact output is required. A False value makes the artifact optional. - [DataMember(Name = "required", EmitDefaultValue = true)] - public bool Required { get; set; } = true; - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - return "DAGIntegerOutput"; - } - - /// - /// 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("DAGIntegerOutput:\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" Annotations: ").Append(Annotations).Append("\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" From: ").Append(From).Append("\n"); - sb.Append(" Alias: ").Append(Alias).Append("\n"); - sb.Append(" Required: ").Append(Required).Append("\n"); - return sb.ToString(); - } - - /// - /// Returns the object from JSON string - /// - /// DAGIntegerOutput object - public static DAGIntegerOutput 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. - /// - /// DAGIntegerOutput object - public virtual DAGIntegerOutput DuplicateDAGIntegerOutput() - { - return FromJson(this.ToJson()); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel Duplicate() - { - return DuplicateDAGIntegerOutput(); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override GenericOutput DuplicateGenericOutput() - { - return DuplicateDAGIntegerOutput(); - } - - /// - /// 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 DAGIntegerOutput); - } - - /// - /// Returns true if DAGIntegerOutput instances are equal - /// - /// Instance of DAGIntegerOutput to be compared - /// Boolean - public bool Equals(DAGIntegerOutput input) - { - if (input == null) - return false; - return base.Equals(input) && - ( - this.From == input.From || - (this.From != null && - this.From.Equals(input.From)) - ) && base.Equals(input) && - ( - this.Alias == input.Alias || - this.Alias != null && - input.Alias != null && - this.Alias.SequenceEqual(input.Alias) - ) && base.Equals(input) && - ( - this.Required == input.Required || - (this.Required != null && - this.Required.Equals(input.Required)) - ) && 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.From != null) - hashCode = hashCode * 59 + this.From.GetHashCode(); - if (this.Alias != null) - hashCode = hashCode * 59 + this.Alias.GetHashCode(); - if (this.Required != null) - hashCode = hashCode * 59 + this.Required.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(@"^DAGIntegerOutput$", 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/DAGIntegerOutputAlias.cs b/src/PollinationSDK/Model/DAGIntegerOutputAlias.cs deleted file mode 100644 index 605cc592f..000000000 --- a/src/PollinationSDK/Model/DAGIntegerOutputAlias.cs +++ /dev/null @@ -1,219 +0,0 @@ -/* - * 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 -{ - /// - /// DAG alias integer output. This output loads the content from a file as an integer. - /// - [DataContract(Name = "DAGIntegerOutputAlias")] - public partial class DAGIntegerOutputAlias : DAGArtifactOutputAlias, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected DAGIntegerOutputAlias() - { - // Set non-required readonly properties with defaultValue - this.Type = "DAGIntegerOutputAlias"; - } - - /// - /// Initializes a new instance of the class. - /// - /// Reference to a file or a task output. Task output must be file. (required). - /// Output name. (required). - /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. - /// Optional description for output.. - /// 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. (required). - /// List of process actions to process the input or output value. (required). - /// A boolean to indicate if an artifact output is required. A False value makes the artifact optional. (default to true). - public DAGIntegerOutputAlias - ( - string name, List platform, List handler, AnyOf from, // Required parameters - Dictionary annotations= default, string description= default, bool required = true // Optional parameters - ) : base(name: name, annotations: annotations, description: description, platform: platform, handler: handler, required: required)// BaseClass - { - // to ensure "from" is required (not null) - this.From = from ?? throw new ArgumentNullException("from is a required property for DAGIntegerOutputAlias and cannot be null"); - - // Set non-required readonly properties with defaultValue - this.Type = "DAGIntegerOutputAlias"; - } - - //============================================== is ReadOnly - /// - /// Gets or Sets Type - /// - [DataMember(Name = "type", EmitDefaultValue = true)] - public string Type { get; protected internal set; } = "DAGIntegerOutputAlias"; - - /// - /// Reference to a file or a task output. Task output must be file. - /// - /// Reference to a file or a task output. Task output must be file. - [DataMember(Name = "from", IsRequired = true, EmitDefaultValue = false)] - public AnyOf From { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - return "DAGIntegerOutputAlias"; - } - - /// - /// 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("DAGIntegerOutputAlias:\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" Annotations: ").Append(Annotations).Append("\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" Platform: ").Append(Platform).Append("\n"); - sb.Append(" Handler: ").Append(Handler).Append("\n"); - sb.Append(" Required: ").Append(Required).Append("\n"); - sb.Append(" From: ").Append(From).Append("\n"); - return sb.ToString(); - } - - /// - /// Returns the object from JSON string - /// - /// DAGIntegerOutputAlias object - public static DAGIntegerOutputAlias 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. - /// - /// DAGIntegerOutputAlias object - public virtual DAGIntegerOutputAlias DuplicateDAGIntegerOutputAlias() - { - return FromJson(this.ToJson()); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel Duplicate() - { - return DuplicateDAGIntegerOutputAlias(); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override DAGArtifactOutputAlias DuplicateDAGArtifactOutputAlias() - { - return DuplicateDAGIntegerOutputAlias(); - } - - /// - /// 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 DAGIntegerOutputAlias); - } - - /// - /// Returns true if DAGIntegerOutputAlias instances are equal - /// - /// Instance of DAGIntegerOutputAlias to be compared - /// Boolean - public bool Equals(DAGIntegerOutputAlias input) - { - if (input == null) - return false; - return base.Equals(input) && - ( - this.From == input.From || - (this.From != null && - this.From.Equals(input.From)) - ) && 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.From != null) - hashCode = hashCode * 59 + this.From.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(@"^DAGIntegerOutputAlias$", 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/DAGJSONObjectInput.cs b/src/PollinationSDK/Model/DAGJSONObjectInput.cs deleted file mode 100644 index 56308a317..000000000 --- a/src/PollinationSDK/Model/DAGJSONObjectInput.cs +++ /dev/null @@ -1,256 +0,0 @@ -/* - * 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 JSON object input. JSON objects are similar to Python dictionaries. You can add additional validation by defining a JSONSchema specification. See http://json-schema.org/understanding-json-schema/reference/object.html for more information. - /// - [DataContract(Name = "DAGJSONObjectInput")] - public partial class DAGJSONObjectInput : GenericInput, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected DAGJSONObjectInput() - { - // Set non-required readonly properties with defaultValue - this.Type = "DAGJSONObjectInput"; - } - - /// - /// Initializes a new instance of the class. - /// - /// Default value to use for an input if a value was not supplied.. - /// A list of aliases for this input in different platforms.. - /// A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. (default to false). - /// An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec.. - /// Input name. (required). - /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. - /// Optional description for input.. - public DAGJSONObjectInput - ( - string name, // Required parameters - Dictionary annotations= default, string description= default, Object _default= default, List> alias= default, bool required = false, Object spec= default // Optional parameters - ) : base(name: name, annotations: annotations, description: description)// BaseClass - { - this.Default = _default; - this.Alias = alias; - this.Required = required; - this.Spec = spec; - - // Set non-required readonly properties with defaultValue - this.Type = "DAGJSONObjectInput"; - } - - //============================================== is ReadOnly - /// - /// Gets or Sets Type - /// - [DataMember(Name = "type", EmitDefaultValue = true)] - public string Type { get; protected internal set; } = "DAGJSONObjectInput"; - - /// - /// Default value to use for an input if a value was not supplied. - /// - /// Default value to use for an input if a value was not supplied. - [DataMember(Name = "default", EmitDefaultValue = false)] - public Object Default { get; set; } - /// - /// A list of aliases for this input in different platforms. - /// - /// A list of aliases for this input in different platforms. - [DataMember(Name = "alias", EmitDefaultValue = false)] - public List> Alias { get; set; } - /// - /// A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. - /// - /// A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. - [DataMember(Name = "required", EmitDefaultValue = true)] - public bool Required { get; set; } = false; - /// - /// An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec. - /// - /// An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec. - [DataMember(Name = "spec", EmitDefaultValue = false)] - public Object Spec { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - return "DAGJSONObjectInput"; - } - - /// - /// 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("DAGJSONObjectInput:\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" Annotations: ").Append(Annotations).Append("\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" Default: ").Append(Default).Append("\n"); - sb.Append(" Alias: ").Append(Alias).Append("\n"); - sb.Append(" Required: ").Append(Required).Append("\n"); - sb.Append(" Spec: ").Append(Spec).Append("\n"); - return sb.ToString(); - } - - /// - /// Returns the object from JSON string - /// - /// DAGJSONObjectInput object - public static DAGJSONObjectInput 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. - /// - /// DAGJSONObjectInput object - public virtual DAGJSONObjectInput DuplicateDAGJSONObjectInput() - { - return FromJson(this.ToJson()); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel Duplicate() - { - return DuplicateDAGJSONObjectInput(); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override GenericInput DuplicateGenericInput() - { - return DuplicateDAGJSONObjectInput(); - } - - /// - /// 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 DAGJSONObjectInput); - } - - /// - /// Returns true if DAGJSONObjectInput instances are equal - /// - /// Instance of DAGJSONObjectInput to be compared - /// Boolean - public bool Equals(DAGJSONObjectInput input) - { - if (input == null) - return false; - return base.Equals(input) && - ( - this.Default == input.Default || - (this.Default != null && - this.Default.Equals(input.Default)) - ) && base.Equals(input) && - ( - this.Alias == input.Alias || - this.Alias != null && - input.Alias != null && - this.Alias.SequenceEqual(input.Alias) - ) && base.Equals(input) && - ( - this.Required == input.Required || - (this.Required != null && - this.Required.Equals(input.Required)) - ) && 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.Default != null) - hashCode = hashCode * 59 + this.Default.GetHashCode(); - if (this.Alias != null) - hashCode = hashCode * 59 + this.Alias.GetHashCode(); - if (this.Required != null) - hashCode = hashCode * 59 + this.Required.GetHashCode(); - if (this.Spec != null) - hashCode = hashCode * 59 + this.Spec.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(@"^DAGJSONObjectInput$", 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/DAGJSONObjectInputAlias.cs b/src/PollinationSDK/Model/DAGJSONObjectInputAlias.cs deleted file mode 100644 index b4f3114b3..000000000 --- a/src/PollinationSDK/Model/DAGJSONObjectInputAlias.cs +++ /dev/null @@ -1,275 +0,0 @@ -/* - * 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 alias JSON object input. JSON objects are similar to Python dictionaries. You can add additional validation by defining a JSONSchema specification. See http://json-schema.org/understanding-json-schema/reference/object.html for more information. - /// - [DataContract(Name = "DAGJSONObjectInputAlias")] - public partial class DAGJSONObjectInputAlias : GenericInput, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected DAGJSONObjectInputAlias() - { - // Set non-required readonly properties with defaultValue - this.Type = "DAGJSONObjectInputAlias"; - } - - /// - /// Initializes a new instance of the class. - /// - /// 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. (required). - /// List of process actions to process the input or output value. (required). - /// Default value to use for an input if a value was not supplied.. - /// A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. (default to false). - /// An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec.. - /// Input name. (required). - /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. - /// Optional description for input.. - public DAGJSONObjectInputAlias - ( - string name, List platform, List handler, // Required parameters - Dictionary annotations= default, string description= default, Object _default= default, bool required = false, Object spec= default // Optional parameters - ) : base(name: name, annotations: annotations, description: description)// BaseClass - { - // to ensure "platform" is required (not null) - this.Platform = platform ?? throw new ArgumentNullException("platform is a required property for DAGJSONObjectInputAlias and cannot be null"); - // to ensure "handler" is required (not null) - this.Handler = handler ?? throw new ArgumentNullException("handler is a required property for DAGJSONObjectInputAlias and cannot be null"); - this.Default = _default; - this.Required = required; - this.Spec = spec; - - // Set non-required readonly properties with defaultValue - this.Type = "DAGJSONObjectInputAlias"; - } - - //============================================== is ReadOnly - /// - /// Gets or Sets Type - /// - [DataMember(Name = "type", EmitDefaultValue = true)] - public string Type { get; protected internal set; } = "DAGJSONObjectInputAlias"; - - /// - /// 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. - /// - /// 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. - [DataMember(Name = "platform", IsRequired = true, EmitDefaultValue = false)] - public List Platform { get; set; } - /// - /// List of process actions to process the input or output value. - /// - /// List of process actions to process the input or output value. - [DataMember(Name = "handler", IsRequired = true, EmitDefaultValue = false)] - public List Handler { get; set; } - /// - /// Default value to use for an input if a value was not supplied. - /// - /// Default value to use for an input if a value was not supplied. - [DataMember(Name = "default", EmitDefaultValue = false)] - public Object Default { get; set; } - /// - /// A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. - /// - /// A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. - [DataMember(Name = "required", EmitDefaultValue = true)] - public bool Required { get; set; } = false; - /// - /// An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec. - /// - /// An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec. - [DataMember(Name = "spec", EmitDefaultValue = false)] - public Object Spec { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - return "DAGJSONObjectInputAlias"; - } - - /// - /// 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("DAGJSONObjectInputAlias:\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" Annotations: ").Append(Annotations).Append("\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" Platform: ").Append(Platform).Append("\n"); - sb.Append(" Handler: ").Append(Handler).Append("\n"); - sb.Append(" Default: ").Append(Default).Append("\n"); - sb.Append(" Required: ").Append(Required).Append("\n"); - sb.Append(" Spec: ").Append(Spec).Append("\n"); - return sb.ToString(); - } - - /// - /// Returns the object from JSON string - /// - /// DAGJSONObjectInputAlias object - public static DAGJSONObjectInputAlias 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. - /// - /// DAGJSONObjectInputAlias object - public virtual DAGJSONObjectInputAlias DuplicateDAGJSONObjectInputAlias() - { - return FromJson(this.ToJson()); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel Duplicate() - { - return DuplicateDAGJSONObjectInputAlias(); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override GenericInput DuplicateGenericInput() - { - return DuplicateDAGJSONObjectInputAlias(); - } - - /// - /// 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 DAGJSONObjectInputAlias); - } - - /// - /// Returns true if DAGJSONObjectInputAlias instances are equal - /// - /// Instance of DAGJSONObjectInputAlias to be compared - /// Boolean - public bool Equals(DAGJSONObjectInputAlias input) - { - if (input == null) - return false; - return base.Equals(input) && - ( - this.Platform == input.Platform || - this.Platform != null && - input.Platform != null && - this.Platform.SequenceEqual(input.Platform) - ) && base.Equals(input) && - ( - this.Handler == input.Handler || - this.Handler != null && - input.Handler != null && - this.Handler.SequenceEqual(input.Handler) - ) && base.Equals(input) && - ( - this.Default == input.Default || - (this.Default != null && - this.Default.Equals(input.Default)) - ) && base.Equals(input) && - ( - this.Required == input.Required || - (this.Required != null && - this.Required.Equals(input.Required)) - ) && 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.Platform != null) - hashCode = hashCode * 59 + this.Platform.GetHashCode(); - if (this.Handler != null) - hashCode = hashCode * 59 + this.Handler.GetHashCode(); - if (this.Default != null) - hashCode = hashCode * 59 + this.Default.GetHashCode(); - if (this.Required != null) - hashCode = hashCode * 59 + this.Required.GetHashCode(); - if (this.Spec != null) - hashCode = hashCode * 59 + this.Spec.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(@"^DAGJSONObjectInputAlias$", 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/DAGJSONObjectOutput.cs b/src/PollinationSDK/Model/DAGJSONObjectOutput.cs deleted file mode 100644 index 6a955d889..000000000 --- a/src/PollinationSDK/Model/DAGJSONObjectOutput.cs +++ /dev/null @@ -1,246 +0,0 @@ -/* - * 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 -{ - /// - /// DAG object output. This output loads the content from a file as a JSON object. - /// - [DataContract(Name = "DAGJSONObjectOutput")] - public partial class DAGJSONObjectOutput : GenericOutput, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected DAGJSONObjectOutput() - { - // Set non-required readonly properties with defaultValue - this.Type = "DAGJSONObjectOutput"; - } - - /// - /// Initializes a new instance of the class. - /// - /// Reference to a file or a task output. Task output must be file. (required). - /// A list of additional processes for loading this output on different platforms.. - /// A boolean to indicate if an artifact output is required. A False value makes the artifact optional. (default to true). - /// Output name. (required). - /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. - /// Optional description for output.. - public DAGJSONObjectOutput - ( - string name, AnyOf from, // Required parameters - Dictionary annotations= default, string description= default, List> alias= default, bool required = true // Optional parameters - ) : base(name: name, annotations: annotations, description: description)// BaseClass - { - // to ensure "from" is required (not null) - this.From = from ?? throw new ArgumentNullException("from is a required property for DAGJSONObjectOutput and cannot be null"); - this.Alias = alias; - this.Required = required; - - // Set non-required readonly properties with defaultValue - this.Type = "DAGJSONObjectOutput"; - } - - //============================================== is ReadOnly - /// - /// Gets or Sets Type - /// - [DataMember(Name = "type", EmitDefaultValue = true)] - public string Type { get; protected internal set; } = "DAGJSONObjectOutput"; - - /// - /// Reference to a file or a task output. Task output must be file. - /// - /// Reference to a file or a task output. Task output must be file. - [DataMember(Name = "from", IsRequired = true, EmitDefaultValue = false)] - public AnyOf From { get; set; } - /// - /// A list of additional processes for loading this output on different platforms. - /// - /// A list of additional processes for loading this output on different platforms. - [DataMember(Name = "alias", EmitDefaultValue = false)] - public List> Alias { get; set; } - /// - /// A boolean to indicate if an artifact output is required. A False value makes the artifact optional. - /// - /// A boolean to indicate if an artifact output is required. A False value makes the artifact optional. - [DataMember(Name = "required", EmitDefaultValue = true)] - public bool Required { get; set; } = true; - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - return "DAGJSONObjectOutput"; - } - - /// - /// 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("DAGJSONObjectOutput:\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" Annotations: ").Append(Annotations).Append("\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" From: ").Append(From).Append("\n"); - sb.Append(" Alias: ").Append(Alias).Append("\n"); - sb.Append(" Required: ").Append(Required).Append("\n"); - return sb.ToString(); - } - - /// - /// Returns the object from JSON string - /// - /// DAGJSONObjectOutput object - public static DAGJSONObjectOutput 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. - /// - /// DAGJSONObjectOutput object - public virtual DAGJSONObjectOutput DuplicateDAGJSONObjectOutput() - { - return FromJson(this.ToJson()); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel Duplicate() - { - return DuplicateDAGJSONObjectOutput(); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override GenericOutput DuplicateGenericOutput() - { - return DuplicateDAGJSONObjectOutput(); - } - - /// - /// 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 DAGJSONObjectOutput); - } - - /// - /// Returns true if DAGJSONObjectOutput instances are equal - /// - /// Instance of DAGJSONObjectOutput to be compared - /// Boolean - public bool Equals(DAGJSONObjectOutput input) - { - if (input == null) - return false; - return base.Equals(input) && - ( - this.From == input.From || - (this.From != null && - this.From.Equals(input.From)) - ) && base.Equals(input) && - ( - this.Alias == input.Alias || - this.Alias != null && - input.Alias != null && - this.Alias.SequenceEqual(input.Alias) - ) && base.Equals(input) && - ( - this.Required == input.Required || - (this.Required != null && - this.Required.Equals(input.Required)) - ) && 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.From != null) - hashCode = hashCode * 59 + this.From.GetHashCode(); - if (this.Alias != null) - hashCode = hashCode * 59 + this.Alias.GetHashCode(); - if (this.Required != null) - hashCode = hashCode * 59 + this.Required.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(@"^DAGJSONObjectOutput$", 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/DAGJSONObjectOutputAlias.cs b/src/PollinationSDK/Model/DAGJSONObjectOutputAlias.cs deleted file mode 100644 index a26b09da7..000000000 --- a/src/PollinationSDK/Model/DAGJSONObjectOutputAlias.cs +++ /dev/null @@ -1,219 +0,0 @@ -/* - * 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 -{ - /// - /// DAG alias object output. This output loads the content from a file as a JSON object. - /// - [DataContract(Name = "DAGJSONObjectOutputAlias")] - public partial class DAGJSONObjectOutputAlias : DAGArtifactOutputAlias, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected DAGJSONObjectOutputAlias() - { - // Set non-required readonly properties with defaultValue - this.Type = "DAGJSONObjectOutputAlias"; - } - - /// - /// Initializes a new instance of the class. - /// - /// Reference to a file or a task output. Task output must be file. (required). - /// Output name. (required). - /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. - /// Optional description for output.. - /// 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. (required). - /// List of process actions to process the input or output value. (required). - /// A boolean to indicate if an artifact output is required. A False value makes the artifact optional. (default to true). - public DAGJSONObjectOutputAlias - ( - string name, List platform, List handler, AnyOf from, // Required parameters - Dictionary annotations= default, string description= default, bool required = true // Optional parameters - ) : base(name: name, annotations: annotations, description: description, platform: platform, handler: handler, required: required)// BaseClass - { - // to ensure "from" is required (not null) - this.From = from ?? throw new ArgumentNullException("from is a required property for DAGJSONObjectOutputAlias and cannot be null"); - - // Set non-required readonly properties with defaultValue - this.Type = "DAGJSONObjectOutputAlias"; - } - - //============================================== is ReadOnly - /// - /// Gets or Sets Type - /// - [DataMember(Name = "type", EmitDefaultValue = true)] - public string Type { get; protected internal set; } = "DAGJSONObjectOutputAlias"; - - /// - /// Reference to a file or a task output. Task output must be file. - /// - /// Reference to a file or a task output. Task output must be file. - [DataMember(Name = "from", IsRequired = true, EmitDefaultValue = false)] - public AnyOf From { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - return "DAGJSONObjectOutputAlias"; - } - - /// - /// 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("DAGJSONObjectOutputAlias:\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" Annotations: ").Append(Annotations).Append("\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" Platform: ").Append(Platform).Append("\n"); - sb.Append(" Handler: ").Append(Handler).Append("\n"); - sb.Append(" Required: ").Append(Required).Append("\n"); - sb.Append(" From: ").Append(From).Append("\n"); - return sb.ToString(); - } - - /// - /// Returns the object from JSON string - /// - /// DAGJSONObjectOutputAlias object - public static DAGJSONObjectOutputAlias 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. - /// - /// DAGJSONObjectOutputAlias object - public virtual DAGJSONObjectOutputAlias DuplicateDAGJSONObjectOutputAlias() - { - return FromJson(this.ToJson()); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel Duplicate() - { - return DuplicateDAGJSONObjectOutputAlias(); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override DAGArtifactOutputAlias DuplicateDAGArtifactOutputAlias() - { - return DuplicateDAGJSONObjectOutputAlias(); - } - - /// - /// 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 DAGJSONObjectOutputAlias); - } - - /// - /// Returns true if DAGJSONObjectOutputAlias instances are equal - /// - /// Instance of DAGJSONObjectOutputAlias to be compared - /// Boolean - public bool Equals(DAGJSONObjectOutputAlias input) - { - if (input == null) - return false; - return base.Equals(input) && - ( - this.From == input.From || - (this.From != null && - this.From.Equals(input.From)) - ) && 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.From != null) - hashCode = hashCode * 59 + this.From.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(@"^DAGJSONObjectOutputAlias$", 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/DAGLinkedInputAlias.cs b/src/PollinationSDK/Model/DAGLinkedInputAlias.cs deleted file mode 100644 index af6c5a571..000000000 --- a/src/PollinationSDK/Model/DAGLinkedInputAlias.cs +++ /dev/null @@ -1,206 +0,0 @@ -/* - * 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 Alias for Linked Inputs. A linked input alias will be hidden in the UI and will be linked to an object in the UI using the input handler. - /// - [DataContract(Name = "DAGLinkedInputAlias")] - public partial class DAGLinkedInputAlias : DAGGenericInputAlias, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected DAGLinkedInputAlias() - { - // Set non-required readonly properties with defaultValue - this.Type = "DAGLinkedInputAlias"; - } - - /// - /// Initializes a new instance of the class. - /// - /// Input name. (required). - /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. - /// Optional description for input.. - /// 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. (required). - /// List of process actions to process the input or output value. (required). - /// Default value for generic input.. - /// A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. (default to false). - /// An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec.. - public DAGLinkedInputAlias - ( - string name, List platform, List handler, // Required parameters - Dictionary annotations= default, string description= default, string _default= default, bool required = false, Object spec= default // Optional parameters - ) : base(name: name, annotations: annotations, description: description, platform: platform, handler: handler, _default: _default, required: required, spec: spec)// BaseClass - { - - // Set non-required readonly properties with defaultValue - this.Type = "DAGLinkedInputAlias"; - } - - //============================================== is ReadOnly - /// - /// Gets or Sets Type - /// - [DataMember(Name = "type", EmitDefaultValue = true)] - public string Type { get; protected internal set; } = "DAGLinkedInputAlias"; - - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - return "DAGLinkedInputAlias"; - } - - /// - /// 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("DAGLinkedInputAlias:\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" Annotations: ").Append(Annotations).Append("\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" Platform: ").Append(Platform).Append("\n"); - sb.Append(" Handler: ").Append(Handler).Append("\n"); - sb.Append(" Default: ").Append(Default).Append("\n"); - sb.Append(" Required: ").Append(Required).Append("\n"); - sb.Append(" Spec: ").Append(Spec).Append("\n"); - return sb.ToString(); - } - - /// - /// Returns the object from JSON string - /// - /// DAGLinkedInputAlias object - public static DAGLinkedInputAlias 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. - /// - /// DAGLinkedInputAlias object - public virtual DAGLinkedInputAlias DuplicateDAGLinkedInputAlias() - { - return FromJson(this.ToJson()); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel Duplicate() - { - return DuplicateDAGLinkedInputAlias(); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override DAGGenericInputAlias DuplicateDAGGenericInputAlias() - { - return DuplicateDAGLinkedInputAlias(); - } - - /// - /// 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 DAGLinkedInputAlias); - } - - /// - /// Returns true if DAGLinkedInputAlias instances are equal - /// - /// Instance of DAGLinkedInputAlias to be compared - /// Boolean - public bool Equals(DAGLinkedInputAlias 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(@"^DAGLinkedInputAlias$", 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/DAGLinkedOutputAlias.cs b/src/PollinationSDK/Model/DAGLinkedOutputAlias.cs deleted file mode 100644 index 7a658749d..000000000 --- a/src/PollinationSDK/Model/DAGLinkedOutputAlias.cs +++ /dev/null @@ -1,200 +0,0 @@ -/* - * 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 Alias for Linked Outputs. A linked output alias will be translated to an object in the UI and stay linked to it. - /// - [DataContract(Name = "DAGLinkedOutputAlias")] - public partial class DAGLinkedOutputAlias : DAGGenericOutputAlias, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected DAGLinkedOutputAlias() - { - // Set non-required readonly properties with defaultValue - this.Type = "DAGLinkedOutputAlias"; - } - - /// - /// Initializes a new instance of the class. - /// - /// Output name. (required). - /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. - /// Optional description for output.. - /// 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. (required). - /// List of process actions to process the input or output value. (required). - public DAGLinkedOutputAlias - ( - string name, List platform, List handler, // Required parameters - Dictionary annotations= default, string description= default // Optional parameters - ) : base(name: name, annotations: annotations, description: description, platform: platform, handler: handler)// BaseClass - { - - // Set non-required readonly properties with defaultValue - this.Type = "DAGLinkedOutputAlias"; - } - - //============================================== is ReadOnly - /// - /// Gets or Sets Type - /// - [DataMember(Name = "type", EmitDefaultValue = true)] - public string Type { get; protected internal set; } = "DAGLinkedOutputAlias"; - - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - return "DAGLinkedOutputAlias"; - } - - /// - /// 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("DAGLinkedOutputAlias:\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" Annotations: ").Append(Annotations).Append("\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" Platform: ").Append(Platform).Append("\n"); - sb.Append(" Handler: ").Append(Handler).Append("\n"); - return sb.ToString(); - } - - /// - /// Returns the object from JSON string - /// - /// DAGLinkedOutputAlias object - public static DAGLinkedOutputAlias 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. - /// - /// DAGLinkedOutputAlias object - public virtual DAGLinkedOutputAlias DuplicateDAGLinkedOutputAlias() - { - return FromJson(this.ToJson()); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel Duplicate() - { - return DuplicateDAGLinkedOutputAlias(); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override DAGGenericOutputAlias DuplicateDAGGenericOutputAlias() - { - return DuplicateDAGLinkedOutputAlias(); - } - - /// - /// 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 DAGLinkedOutputAlias); - } - - /// - /// Returns true if DAGLinkedOutputAlias instances are equal - /// - /// Instance of DAGLinkedOutputAlias to be compared - /// Boolean - public bool Equals(DAGLinkedOutputAlias 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(@"^DAGLinkedOutputAlias$", 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/DAGNumberInput.cs b/src/PollinationSDK/Model/DAGNumberInput.cs deleted file mode 100644 index 3bd81bc0e..000000000 --- a/src/PollinationSDK/Model/DAGNumberInput.cs +++ /dev/null @@ -1,256 +0,0 @@ -/* - * 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 number input. You can add additional validation by defining a JSONSchema specification. See http://json-schema.org/understanding-json-schema/reference/numeric.html#numeric for more information. - /// - [DataContract(Name = "DAGNumberInput")] - public partial class DAGNumberInput : GenericInput, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected DAGNumberInput() - { - // Set non-required readonly properties with defaultValue - this.Type = "DAGNumberInput"; - } - - /// - /// Initializes a new instance of the class. - /// - /// Default value to use for an input if a value was not supplied.. - /// A list of aliases for this input in different platforms.. - /// A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. (default to false). - /// An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec.. - /// Input name. (required). - /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. - /// Optional description for input.. - public DAGNumberInput - ( - string name, // Required parameters - Dictionary annotations= default, string description= default, double _default= default, List> alias= default, bool required = false, Object spec= default // Optional parameters - ) : base(name: name, annotations: annotations, description: description)// BaseClass - { - this.Default = _default; - this.Alias = alias; - this.Required = required; - this.Spec = spec; - - // Set non-required readonly properties with defaultValue - this.Type = "DAGNumberInput"; - } - - //============================================== is ReadOnly - /// - /// Gets or Sets Type - /// - [DataMember(Name = "type", EmitDefaultValue = true)] - public string Type { get; protected internal set; } = "DAGNumberInput"; - - /// - /// Default value to use for an input if a value was not supplied. - /// - /// Default value to use for an input if a value was not supplied. - [DataMember(Name = "default", EmitDefaultValue = false)] - public double Default { get; set; } - /// - /// A list of aliases for this input in different platforms. - /// - /// A list of aliases for this input in different platforms. - [DataMember(Name = "alias", EmitDefaultValue = false)] - public List> Alias { get; set; } - /// - /// A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. - /// - /// A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. - [DataMember(Name = "required", EmitDefaultValue = true)] - public bool Required { get; set; } = false; - /// - /// An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec. - /// - /// An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec. - [DataMember(Name = "spec", EmitDefaultValue = false)] - public Object Spec { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - return "DAGNumberInput"; - } - - /// - /// 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("DAGNumberInput:\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" Annotations: ").Append(Annotations).Append("\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" Default: ").Append(Default).Append("\n"); - sb.Append(" Alias: ").Append(Alias).Append("\n"); - sb.Append(" Required: ").Append(Required).Append("\n"); - sb.Append(" Spec: ").Append(Spec).Append("\n"); - return sb.ToString(); - } - - /// - /// Returns the object from JSON string - /// - /// DAGNumberInput object - public static DAGNumberInput 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. - /// - /// DAGNumberInput object - public virtual DAGNumberInput DuplicateDAGNumberInput() - { - return FromJson(this.ToJson()); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel Duplicate() - { - return DuplicateDAGNumberInput(); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override GenericInput DuplicateGenericInput() - { - return DuplicateDAGNumberInput(); - } - - /// - /// 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 DAGNumberInput); - } - - /// - /// Returns true if DAGNumberInput instances are equal - /// - /// Instance of DAGNumberInput to be compared - /// Boolean - public bool Equals(DAGNumberInput input) - { - if (input == null) - return false; - return base.Equals(input) && - ( - this.Default == input.Default || - (this.Default != null && - this.Default.Equals(input.Default)) - ) && base.Equals(input) && - ( - this.Alias == input.Alias || - this.Alias != null && - input.Alias != null && - this.Alias.SequenceEqual(input.Alias) - ) && base.Equals(input) && - ( - this.Required == input.Required || - (this.Required != null && - this.Required.Equals(input.Required)) - ) && 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.Default != null) - hashCode = hashCode * 59 + this.Default.GetHashCode(); - if (this.Alias != null) - hashCode = hashCode * 59 + this.Alias.GetHashCode(); - if (this.Required != null) - hashCode = hashCode * 59 + this.Required.GetHashCode(); - if (this.Spec != null) - hashCode = hashCode * 59 + this.Spec.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(@"^DAGNumberInput$", 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/DAGNumberInputAlias.cs b/src/PollinationSDK/Model/DAGNumberInputAlias.cs deleted file mode 100644 index a1fd61bfa..000000000 --- a/src/PollinationSDK/Model/DAGNumberInputAlias.cs +++ /dev/null @@ -1,275 +0,0 @@ -/* - * 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 alias number input. You can add additional validation by defining a JSONSchema specification. See http://json-schema.org/understanding-json-schema/reference/numeric.html#numeric for more information. - /// - [DataContract(Name = "DAGNumberInputAlias")] - public partial class DAGNumberInputAlias : GenericInput, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected DAGNumberInputAlias() - { - // Set non-required readonly properties with defaultValue - this.Type = "DAGNumberInputAlias"; - } - - /// - /// Initializes a new instance of the class. - /// - /// 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. (required). - /// List of process actions to process the input or output value. (required). - /// Default value to use for an input if a value was not supplied.. - /// A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. (default to false). - /// An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec.. - /// Input name. (required). - /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. - /// Optional description for input.. - public DAGNumberInputAlias - ( - string name, List platform, List handler, // Required parameters - Dictionary annotations= default, string description= default, double _default= default, bool required = false, Object spec= default // Optional parameters - ) : base(name: name, annotations: annotations, description: description)// BaseClass - { - // to ensure "platform" is required (not null) - this.Platform = platform ?? throw new ArgumentNullException("platform is a required property for DAGNumberInputAlias and cannot be null"); - // to ensure "handler" is required (not null) - this.Handler = handler ?? throw new ArgumentNullException("handler is a required property for DAGNumberInputAlias and cannot be null"); - this.Default = _default; - this.Required = required; - this.Spec = spec; - - // Set non-required readonly properties with defaultValue - this.Type = "DAGNumberInputAlias"; - } - - //============================================== is ReadOnly - /// - /// Gets or Sets Type - /// - [DataMember(Name = "type", EmitDefaultValue = true)] - public string Type { get; protected internal set; } = "DAGNumberInputAlias"; - - /// - /// 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. - /// - /// 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. - [DataMember(Name = "platform", IsRequired = true, EmitDefaultValue = false)] - public List Platform { get; set; } - /// - /// List of process actions to process the input or output value. - /// - /// List of process actions to process the input or output value. - [DataMember(Name = "handler", IsRequired = true, EmitDefaultValue = false)] - public List Handler { get; set; } - /// - /// Default value to use for an input if a value was not supplied. - /// - /// Default value to use for an input if a value was not supplied. - [DataMember(Name = "default", EmitDefaultValue = false)] - public double Default { get; set; } - /// - /// A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. - /// - /// A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. - [DataMember(Name = "required", EmitDefaultValue = true)] - public bool Required { get; set; } = false; - /// - /// An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec. - /// - /// An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec. - [DataMember(Name = "spec", EmitDefaultValue = false)] - public Object Spec { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - return "DAGNumberInputAlias"; - } - - /// - /// 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("DAGNumberInputAlias:\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" Annotations: ").Append(Annotations).Append("\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" Platform: ").Append(Platform).Append("\n"); - sb.Append(" Handler: ").Append(Handler).Append("\n"); - sb.Append(" Default: ").Append(Default).Append("\n"); - sb.Append(" Required: ").Append(Required).Append("\n"); - sb.Append(" Spec: ").Append(Spec).Append("\n"); - return sb.ToString(); - } - - /// - /// Returns the object from JSON string - /// - /// DAGNumberInputAlias object - public static DAGNumberInputAlias 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. - /// - /// DAGNumberInputAlias object - public virtual DAGNumberInputAlias DuplicateDAGNumberInputAlias() - { - return FromJson(this.ToJson()); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel Duplicate() - { - return DuplicateDAGNumberInputAlias(); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override GenericInput DuplicateGenericInput() - { - return DuplicateDAGNumberInputAlias(); - } - - /// - /// 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 DAGNumberInputAlias); - } - - /// - /// Returns true if DAGNumberInputAlias instances are equal - /// - /// Instance of DAGNumberInputAlias to be compared - /// Boolean - public bool Equals(DAGNumberInputAlias input) - { - if (input == null) - return false; - return base.Equals(input) && - ( - this.Platform == input.Platform || - this.Platform != null && - input.Platform != null && - this.Platform.SequenceEqual(input.Platform) - ) && base.Equals(input) && - ( - this.Handler == input.Handler || - this.Handler != null && - input.Handler != null && - this.Handler.SequenceEqual(input.Handler) - ) && base.Equals(input) && - ( - this.Default == input.Default || - (this.Default != null && - this.Default.Equals(input.Default)) - ) && base.Equals(input) && - ( - this.Required == input.Required || - (this.Required != null && - this.Required.Equals(input.Required)) - ) && 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.Platform != null) - hashCode = hashCode * 59 + this.Platform.GetHashCode(); - if (this.Handler != null) - hashCode = hashCode * 59 + this.Handler.GetHashCode(); - if (this.Default != null) - hashCode = hashCode * 59 + this.Default.GetHashCode(); - if (this.Required != null) - hashCode = hashCode * 59 + this.Required.GetHashCode(); - if (this.Spec != null) - hashCode = hashCode * 59 + this.Spec.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(@"^DAGNumberInputAlias$", 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/DAGNumberOutput.cs b/src/PollinationSDK/Model/DAGNumberOutput.cs deleted file mode 100644 index af6f6e404..000000000 --- a/src/PollinationSDK/Model/DAGNumberOutput.cs +++ /dev/null @@ -1,246 +0,0 @@ -/* - * 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 -{ - /// - /// DAG number output. This output loads the content from a file as a floating number. - /// - [DataContract(Name = "DAGNumberOutput")] - public partial class DAGNumberOutput : GenericOutput, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected DAGNumberOutput() - { - // Set non-required readonly properties with defaultValue - this.Type = "DAGNumberOutput"; - } - - /// - /// Initializes a new instance of the class. - /// - /// Reference to a file or a task output. Task output must be file. (required). - /// A list of additional processes for loading this output on different platforms.. - /// A boolean to indicate if an artifact output is required. A False value makes the artifact optional. (default to true). - /// Output name. (required). - /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. - /// Optional description for output.. - public DAGNumberOutput - ( - string name, AnyOf from, // Required parameters - Dictionary annotations= default, string description= default, List> alias= default, bool required = true // Optional parameters - ) : base(name: name, annotations: annotations, description: description)// BaseClass - { - // to ensure "from" is required (not null) - this.From = from ?? throw new ArgumentNullException("from is a required property for DAGNumberOutput and cannot be null"); - this.Alias = alias; - this.Required = required; - - // Set non-required readonly properties with defaultValue - this.Type = "DAGNumberOutput"; - } - - //============================================== is ReadOnly - /// - /// Gets or Sets Type - /// - [DataMember(Name = "type", EmitDefaultValue = true)] - public string Type { get; protected internal set; } = "DAGNumberOutput"; - - /// - /// Reference to a file or a task output. Task output must be file. - /// - /// Reference to a file or a task output. Task output must be file. - [DataMember(Name = "from", IsRequired = true, EmitDefaultValue = false)] - public AnyOf From { get; set; } - /// - /// A list of additional processes for loading this output on different platforms. - /// - /// A list of additional processes for loading this output on different platforms. - [DataMember(Name = "alias", EmitDefaultValue = false)] - public List> Alias { get; set; } - /// - /// A boolean to indicate if an artifact output is required. A False value makes the artifact optional. - /// - /// A boolean to indicate if an artifact output is required. A False value makes the artifact optional. - [DataMember(Name = "required", EmitDefaultValue = true)] - public bool Required { get; set; } = true; - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - return "DAGNumberOutput"; - } - - /// - /// 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("DAGNumberOutput:\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" Annotations: ").Append(Annotations).Append("\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" From: ").Append(From).Append("\n"); - sb.Append(" Alias: ").Append(Alias).Append("\n"); - sb.Append(" Required: ").Append(Required).Append("\n"); - return sb.ToString(); - } - - /// - /// Returns the object from JSON string - /// - /// DAGNumberOutput object - public static DAGNumberOutput 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. - /// - /// DAGNumberOutput object - public virtual DAGNumberOutput DuplicateDAGNumberOutput() - { - return FromJson(this.ToJson()); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel Duplicate() - { - return DuplicateDAGNumberOutput(); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override GenericOutput DuplicateGenericOutput() - { - return DuplicateDAGNumberOutput(); - } - - /// - /// 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 DAGNumberOutput); - } - - /// - /// Returns true if DAGNumberOutput instances are equal - /// - /// Instance of DAGNumberOutput to be compared - /// Boolean - public bool Equals(DAGNumberOutput input) - { - if (input == null) - return false; - return base.Equals(input) && - ( - this.From == input.From || - (this.From != null && - this.From.Equals(input.From)) - ) && base.Equals(input) && - ( - this.Alias == input.Alias || - this.Alias != null && - input.Alias != null && - this.Alias.SequenceEqual(input.Alias) - ) && base.Equals(input) && - ( - this.Required == input.Required || - (this.Required != null && - this.Required.Equals(input.Required)) - ) && 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.From != null) - hashCode = hashCode * 59 + this.From.GetHashCode(); - if (this.Alias != null) - hashCode = hashCode * 59 + this.Alias.GetHashCode(); - if (this.Required != null) - hashCode = hashCode * 59 + this.Required.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(@"^DAGNumberOutput$", 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/DAGNumberOutputAlias.cs b/src/PollinationSDK/Model/DAGNumberOutputAlias.cs deleted file mode 100644 index fa18f5fda..000000000 --- a/src/PollinationSDK/Model/DAGNumberOutputAlias.cs +++ /dev/null @@ -1,219 +0,0 @@ -/* - * 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 -{ - /// - /// DAG alias number output. This output loads the content from a file as a floating number. - /// - [DataContract(Name = "DAGNumberOutputAlias")] - public partial class DAGNumberOutputAlias : DAGArtifactOutputAlias, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected DAGNumberOutputAlias() - { - // Set non-required readonly properties with defaultValue - this.Type = "DAGNumberOutputAlias"; - } - - /// - /// Initializes a new instance of the class. - /// - /// Reference to a file or a task output. Task output must be file. (required). - /// Output name. (required). - /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. - /// Optional description for output.. - /// 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. (required). - /// List of process actions to process the input or output value. (required). - /// A boolean to indicate if an artifact output is required. A False value makes the artifact optional. (default to true). - public DAGNumberOutputAlias - ( - string name, List platform, List handler, AnyOf from, // Required parameters - Dictionary annotations= default, string description= default, bool required = true // Optional parameters - ) : base(name: name, annotations: annotations, description: description, platform: platform, handler: handler, required: required)// BaseClass - { - // to ensure "from" is required (not null) - this.From = from ?? throw new ArgumentNullException("from is a required property for DAGNumberOutputAlias and cannot be null"); - - // Set non-required readonly properties with defaultValue - this.Type = "DAGNumberOutputAlias"; - } - - //============================================== is ReadOnly - /// - /// Gets or Sets Type - /// - [DataMember(Name = "type", EmitDefaultValue = true)] - public string Type { get; protected internal set; } = "DAGNumberOutputAlias"; - - /// - /// Reference to a file or a task output. Task output must be file. - /// - /// Reference to a file or a task output. Task output must be file. - [DataMember(Name = "from", IsRequired = true, EmitDefaultValue = false)] - public AnyOf From { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - return "DAGNumberOutputAlias"; - } - - /// - /// 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("DAGNumberOutputAlias:\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" Annotations: ").Append(Annotations).Append("\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" Platform: ").Append(Platform).Append("\n"); - sb.Append(" Handler: ").Append(Handler).Append("\n"); - sb.Append(" Required: ").Append(Required).Append("\n"); - sb.Append(" From: ").Append(From).Append("\n"); - return sb.ToString(); - } - - /// - /// Returns the object from JSON string - /// - /// DAGNumberOutputAlias object - public static DAGNumberOutputAlias 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. - /// - /// DAGNumberOutputAlias object - public virtual DAGNumberOutputAlias DuplicateDAGNumberOutputAlias() - { - return FromJson(this.ToJson()); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel Duplicate() - { - return DuplicateDAGNumberOutputAlias(); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override DAGArtifactOutputAlias DuplicateDAGArtifactOutputAlias() - { - return DuplicateDAGNumberOutputAlias(); - } - - /// - /// 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 DAGNumberOutputAlias); - } - - /// - /// Returns true if DAGNumberOutputAlias instances are equal - /// - /// Instance of DAGNumberOutputAlias to be compared - /// Boolean - public bool Equals(DAGNumberOutputAlias input) - { - if (input == null) - return false; - return base.Equals(input) && - ( - this.From == input.From || - (this.From != null && - this.From.Equals(input.From)) - ) && 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.From != null) - hashCode = hashCode * 59 + this.From.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(@"^DAGNumberOutputAlias$", 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/DAGPathInput.cs b/src/PollinationSDK/Model/DAGPathInput.cs deleted file mode 100644 index 7dcbfb53f..000000000 --- a/src/PollinationSDK/Model/DAGPathInput.cs +++ /dev/null @@ -1,273 +0,0 @@ -/* - * 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 file or a folder input. Use this input only in cases that the input can be either a file or folder. For file or folder-only inputs see File and Folder. Path is a special string input. Unlike other string inputs, a path will be copied from its location to execution folder when a workflow is executed. You can add additional validation by defining a JSONSchema specification. See http://json-schema.org/understanding-json-schema/reference/string.html#string for more information. .. code-block:: python # a file with maximum 50 characters with an ``epw`` extension. \"schema\": { \"type\": \"string\", \"maxLength\": 50, \"pattern\": \"(?i)(^.*\\.epw$)\" } - /// - [DataContract(Name = "DAGPathInput")] - public partial class DAGPathInput : GenericInput, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected DAGPathInput() - { - // Set non-required readonly properties with defaultValue - this.Type = "DAGPathInput"; - } - - /// - /// Initializes a new instance of the class. - /// - /// The default source for file if the value is not provided.. - /// A list of aliases for this input in different platforms.. - /// A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. (default to false). - /// An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec.. - /// Optional list of extensions for path. The check for extension is case-insensitive. The extension will only be validated for file inputs.. - /// Input name. (required). - /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. - /// Optional description for input.. - public DAGPathInput - ( - string name, // Required parameters - Dictionary annotations= default, string description= default, AnyOf _default= default, List> alias= default, bool required = false, Object spec= default, List extensions= default // Optional parameters - ) : base(name: name, annotations: annotations, description: description)// BaseClass - { - this.Default = _default; - this.Alias = alias; - this.Required = required; - this.Spec = spec; - this.Extensions = extensions; - - // Set non-required readonly properties with defaultValue - this.Type = "DAGPathInput"; - } - - //============================================== is ReadOnly - /// - /// Gets or Sets Type - /// - [DataMember(Name = "type", EmitDefaultValue = true)] - public string Type { get; protected internal set; } = "DAGPathInput"; - - /// - /// The default source for file if the value is not provided. - /// - /// The default source for file if the value is not provided. - [DataMember(Name = "default", EmitDefaultValue = false)] - public AnyOf Default { get; set; } - /// - /// A list of aliases for this input in different platforms. - /// - /// A list of aliases for this input in different platforms. - [DataMember(Name = "alias", EmitDefaultValue = false)] - public List> Alias { get; set; } - /// - /// A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. - /// - /// A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. - [DataMember(Name = "required", EmitDefaultValue = true)] - public bool Required { get; set; } = false; - /// - /// An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec. - /// - /// An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec. - [DataMember(Name = "spec", EmitDefaultValue = false)] - public Object Spec { get; set; } - /// - /// Optional list of extensions for path. The check for extension is case-insensitive. The extension will only be validated for file inputs. - /// - /// Optional list of extensions for path. The check for extension is case-insensitive. The extension will only be validated for file inputs. - [DataMember(Name = "extensions", EmitDefaultValue = false)] - public List Extensions { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - return "DAGPathInput"; - } - - /// - /// 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("DAGPathInput:\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" Annotations: ").Append(Annotations).Append("\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" Default: ").Append(Default).Append("\n"); - sb.Append(" Alias: ").Append(Alias).Append("\n"); - sb.Append(" Required: ").Append(Required).Append("\n"); - sb.Append(" Spec: ").Append(Spec).Append("\n"); - sb.Append(" Extensions: ").Append(Extensions).Append("\n"); - return sb.ToString(); - } - - /// - /// Returns the object from JSON string - /// - /// DAGPathInput object - public static DAGPathInput 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. - /// - /// DAGPathInput object - public virtual DAGPathInput DuplicateDAGPathInput() - { - return FromJson(this.ToJson()); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel Duplicate() - { - return DuplicateDAGPathInput(); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override GenericInput DuplicateGenericInput() - { - return DuplicateDAGPathInput(); - } - - /// - /// 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 DAGPathInput); - } - - /// - /// Returns true if DAGPathInput instances are equal - /// - /// Instance of DAGPathInput to be compared - /// Boolean - public bool Equals(DAGPathInput input) - { - if (input == null) - return false; - return base.Equals(input) && - ( - this.Default == input.Default || - (this.Default != null && - this.Default.Equals(input.Default)) - ) && base.Equals(input) && - ( - this.Alias == input.Alias || - this.Alias != null && - input.Alias != null && - this.Alias.SequenceEqual(input.Alias) - ) && base.Equals(input) && - ( - this.Required == input.Required || - (this.Required != null && - this.Required.Equals(input.Required)) - ) && base.Equals(input) && - ( - this.Extensions == input.Extensions || - this.Extensions != null && - input.Extensions != null && - this.Extensions.SequenceEqual(input.Extensions) - ) && 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.Default != null) - hashCode = hashCode * 59 + this.Default.GetHashCode(); - if (this.Alias != null) - hashCode = hashCode * 59 + this.Alias.GetHashCode(); - if (this.Required != null) - hashCode = hashCode * 59 + this.Required.GetHashCode(); - if (this.Spec != null) - hashCode = hashCode * 59 + this.Spec.GetHashCode(); - if (this.Extensions != null) - hashCode = hashCode * 59 + this.Extensions.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(@"^DAGPathInput$", 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/DAGPathInputAlias.cs b/src/PollinationSDK/Model/DAGPathInputAlias.cs deleted file mode 100644 index d76598c42..000000000 --- a/src/PollinationSDK/Model/DAGPathInputAlias.cs +++ /dev/null @@ -1,292 +0,0 @@ -/* - * 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 file or a folder input. Use this input only in cases that the input can be either a file or folder. For file or folder-only inputs see File and Folder. Path is a special string input. Unlike other string inputs, a path will be copied from its location to execution folder when a workflow is executed. You can add additional validation by defining a JSONSchema specification. See http://json-schema.org/understanding-json-schema/reference/string.html#string for more information. .. code-block:: python # a file with maximum 50 characters with an ``epw`` extension. \"schema\": { \"type\": \"string\", \"maxLength\": 50, \"pattern\": \"(?i)(^.*\\.epw$)\" } - /// - [DataContract(Name = "DAGPathInputAlias")] - public partial class DAGPathInputAlias : GenericInput, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected DAGPathInputAlias() - { - // Set non-required readonly properties with defaultValue - this.Type = "DAGPathInputAlias"; - } - - /// - /// Initializes a new instance of the class. - /// - /// 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. (required). - /// List of process actions to process the input or output value. (required). - /// The default source for file if the value is not provided.. - /// A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. (default to false). - /// An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec.. - /// Optional list of extensions for path. The check for extension is case-insensitive. The extension will only be validated for file inputs.. - /// Input name. (required). - /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. - /// Optional description for input.. - public DAGPathInputAlias - ( - string name, List platform, List handler, // Required parameters - Dictionary annotations= default, string description= default, AnyOf _default= default, bool required = false, Object spec= default, List extensions= default // Optional parameters - ) : base(name: name, annotations: annotations, description: description)// BaseClass - { - // to ensure "platform" is required (not null) - this.Platform = platform ?? throw new ArgumentNullException("platform is a required property for DAGPathInputAlias and cannot be null"); - // to ensure "handler" is required (not null) - this.Handler = handler ?? throw new ArgumentNullException("handler is a required property for DAGPathInputAlias and cannot be null"); - this.Default = _default; - this.Required = required; - this.Spec = spec; - this.Extensions = extensions; - - // Set non-required readonly properties with defaultValue - this.Type = "DAGPathInputAlias"; - } - - //============================================== is ReadOnly - /// - /// Gets or Sets Type - /// - [DataMember(Name = "type", EmitDefaultValue = true)] - public string Type { get; protected internal set; } = "DAGPathInputAlias"; - - /// - /// 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. - /// - /// 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. - [DataMember(Name = "platform", IsRequired = true, EmitDefaultValue = false)] - public List Platform { get; set; } - /// - /// List of process actions to process the input or output value. - /// - /// List of process actions to process the input or output value. - [DataMember(Name = "handler", IsRequired = true, EmitDefaultValue = false)] - public List Handler { get; set; } - /// - /// The default source for file if the value is not provided. - /// - /// The default source for file if the value is not provided. - [DataMember(Name = "default", EmitDefaultValue = false)] - public AnyOf Default { get; set; } - /// - /// A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. - /// - /// A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. - [DataMember(Name = "required", EmitDefaultValue = true)] - public bool Required { get; set; } = false; - /// - /// An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec. - /// - /// An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec. - [DataMember(Name = "spec", EmitDefaultValue = false)] - public Object Spec { get; set; } - /// - /// Optional list of extensions for path. The check for extension is case-insensitive. The extension will only be validated for file inputs. - /// - /// Optional list of extensions for path. The check for extension is case-insensitive. The extension will only be validated for file inputs. - [DataMember(Name = "extensions", EmitDefaultValue = false)] - public List Extensions { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - return "DAGPathInputAlias"; - } - - /// - /// 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("DAGPathInputAlias:\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" Annotations: ").Append(Annotations).Append("\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" Platform: ").Append(Platform).Append("\n"); - sb.Append(" Handler: ").Append(Handler).Append("\n"); - sb.Append(" Default: ").Append(Default).Append("\n"); - sb.Append(" Required: ").Append(Required).Append("\n"); - sb.Append(" Spec: ").Append(Spec).Append("\n"); - sb.Append(" Extensions: ").Append(Extensions).Append("\n"); - return sb.ToString(); - } - - /// - /// Returns the object from JSON string - /// - /// DAGPathInputAlias object - public static DAGPathInputAlias 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. - /// - /// DAGPathInputAlias object - public virtual DAGPathInputAlias DuplicateDAGPathInputAlias() - { - return FromJson(this.ToJson()); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel Duplicate() - { - return DuplicateDAGPathInputAlias(); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override GenericInput DuplicateGenericInput() - { - return DuplicateDAGPathInputAlias(); - } - - /// - /// 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 DAGPathInputAlias); - } - - /// - /// Returns true if DAGPathInputAlias instances are equal - /// - /// Instance of DAGPathInputAlias to be compared - /// Boolean - public bool Equals(DAGPathInputAlias input) - { - if (input == null) - return false; - return base.Equals(input) && - ( - this.Platform == input.Platform || - this.Platform != null && - input.Platform != null && - this.Platform.SequenceEqual(input.Platform) - ) && base.Equals(input) && - ( - this.Handler == input.Handler || - this.Handler != null && - input.Handler != null && - this.Handler.SequenceEqual(input.Handler) - ) && base.Equals(input) && - ( - this.Default == input.Default || - (this.Default != null && - this.Default.Equals(input.Default)) - ) && base.Equals(input) && - ( - this.Required == input.Required || - (this.Required != null && - this.Required.Equals(input.Required)) - ) && base.Equals(input) && - ( - this.Extensions == input.Extensions || - this.Extensions != null && - input.Extensions != null && - this.Extensions.SequenceEqual(input.Extensions) - ) && 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.Platform != null) - hashCode = hashCode * 59 + this.Platform.GetHashCode(); - if (this.Handler != null) - hashCode = hashCode * 59 + this.Handler.GetHashCode(); - if (this.Default != null) - hashCode = hashCode * 59 + this.Default.GetHashCode(); - if (this.Required != null) - hashCode = hashCode * 59 + this.Required.GetHashCode(); - if (this.Spec != null) - hashCode = hashCode * 59 + this.Spec.GetHashCode(); - if (this.Extensions != null) - hashCode = hashCode * 59 + this.Extensions.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(@"^DAGPathInputAlias$", 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/DAGPathOutput.cs b/src/PollinationSDK/Model/DAGPathOutput.cs deleted file mode 100644 index d4bfa6fbd..000000000 --- a/src/PollinationSDK/Model/DAGPathOutput.cs +++ /dev/null @@ -1,246 +0,0 @@ -/* - * 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 -{ - /// - /// DAG path output. - /// - [DataContract(Name = "DAGPathOutput")] - public partial class DAGPathOutput : GenericOutput, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected DAGPathOutput() - { - // Set non-required readonly properties with defaultValue - this.Type = "DAGPathOutput"; - } - - /// - /// Initializes a new instance of the class. - /// - /// Reference to a file, folder or a task output. Task output must either be a file or a folder. (required). - /// A list of additional processes for loading this output on different platforms.. - /// A boolean to indicate if an artifact output is required. A False value makes the artifact optional. (default to true). - /// Output name. (required). - /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. - /// Optional description for output.. - public DAGPathOutput - ( - string name, AnyOf from, // Required parameters - Dictionary annotations= default, string description= default, List> alias= default, bool required = true // Optional parameters - ) : base(name: name, annotations: annotations, description: description)// BaseClass - { - // to ensure "from" is required (not null) - this.From = from ?? throw new ArgumentNullException("from is a required property for DAGPathOutput and cannot be null"); - this.Alias = alias; - this.Required = required; - - // Set non-required readonly properties with defaultValue - this.Type = "DAGPathOutput"; - } - - //============================================== is ReadOnly - /// - /// Gets or Sets Type - /// - [DataMember(Name = "type", EmitDefaultValue = true)] - public string Type { get; protected internal set; } = "DAGPathOutput"; - - /// - /// Reference to a file, folder or a task output. Task output must either be a file or a folder. - /// - /// Reference to a file, folder or a task output. Task output must either be a file or a folder. - [DataMember(Name = "from", IsRequired = true, EmitDefaultValue = false)] - public AnyOf From { get; set; } - /// - /// A list of additional processes for loading this output on different platforms. - /// - /// A list of additional processes for loading this output on different platforms. - [DataMember(Name = "alias", EmitDefaultValue = false)] - public List> Alias { get; set; } - /// - /// A boolean to indicate if an artifact output is required. A False value makes the artifact optional. - /// - /// A boolean to indicate if an artifact output is required. A False value makes the artifact optional. - [DataMember(Name = "required", EmitDefaultValue = true)] - public bool Required { get; set; } = true; - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - return "DAGPathOutput"; - } - - /// - /// 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("DAGPathOutput:\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" Annotations: ").Append(Annotations).Append("\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" From: ").Append(From).Append("\n"); - sb.Append(" Alias: ").Append(Alias).Append("\n"); - sb.Append(" Required: ").Append(Required).Append("\n"); - return sb.ToString(); - } - - /// - /// Returns the object from JSON string - /// - /// DAGPathOutput object - public static DAGPathOutput 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. - /// - /// DAGPathOutput object - public virtual DAGPathOutput DuplicateDAGPathOutput() - { - return FromJson(this.ToJson()); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel Duplicate() - { - return DuplicateDAGPathOutput(); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override GenericOutput DuplicateGenericOutput() - { - return DuplicateDAGPathOutput(); - } - - /// - /// 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 DAGPathOutput); - } - - /// - /// Returns true if DAGPathOutput instances are equal - /// - /// Instance of DAGPathOutput to be compared - /// Boolean - public bool Equals(DAGPathOutput input) - { - if (input == null) - return false; - return base.Equals(input) && - ( - this.From == input.From || - (this.From != null && - this.From.Equals(input.From)) - ) && base.Equals(input) && - ( - this.Alias == input.Alias || - this.Alias != null && - input.Alias != null && - this.Alias.SequenceEqual(input.Alias) - ) && base.Equals(input) && - ( - this.Required == input.Required || - (this.Required != null && - this.Required.Equals(input.Required)) - ) && 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.From != null) - hashCode = hashCode * 59 + this.From.GetHashCode(); - if (this.Alias != null) - hashCode = hashCode * 59 + this.Alias.GetHashCode(); - if (this.Required != null) - hashCode = hashCode * 59 + this.Required.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(@"^DAGPathOutput$", 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/DAGPathOutputAlias.cs b/src/PollinationSDK/Model/DAGPathOutputAlias.cs deleted file mode 100644 index 2354711a8..000000000 --- a/src/PollinationSDK/Model/DAGPathOutputAlias.cs +++ /dev/null @@ -1,219 +0,0 @@ -/* - * 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 -{ - /// - /// DAG alias path output. - /// - [DataContract(Name = "DAGPathOutputAlias")] - public partial class DAGPathOutputAlias : DAGArtifactOutputAlias, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected DAGPathOutputAlias() - { - // Set non-required readonly properties with defaultValue - this.Type = "DAGPathOutputAlias"; - } - - /// - /// Initializes a new instance of the class. - /// - /// Reference to a file, folder or a task output. Task output must either be a file or a folder. (required). - /// Output name. (required). - /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. - /// Optional description for output.. - /// 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. (required). - /// List of process actions to process the input or output value. (required). - /// A boolean to indicate if an artifact output is required. A False value makes the artifact optional. (default to true). - public DAGPathOutputAlias - ( - string name, List platform, List handler, AnyOf from, // Required parameters - Dictionary annotations= default, string description= default, bool required = true // Optional parameters - ) : base(name: name, annotations: annotations, description: description, platform: platform, handler: handler, required: required)// BaseClass - { - // to ensure "from" is required (not null) - this.From = from ?? throw new ArgumentNullException("from is a required property for DAGPathOutputAlias and cannot be null"); - - // Set non-required readonly properties with defaultValue - this.Type = "DAGPathOutputAlias"; - } - - //============================================== is ReadOnly - /// - /// Gets or Sets Type - /// - [DataMember(Name = "type", EmitDefaultValue = true)] - public string Type { get; protected internal set; } = "DAGPathOutputAlias"; - - /// - /// Reference to a file, folder or a task output. Task output must either be a file or a folder. - /// - /// Reference to a file, folder or a task output. Task output must either be a file or a folder. - [DataMember(Name = "from", IsRequired = true, EmitDefaultValue = false)] - public AnyOf From { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - return "DAGPathOutputAlias"; - } - - /// - /// 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("DAGPathOutputAlias:\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" Annotations: ").Append(Annotations).Append("\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" Platform: ").Append(Platform).Append("\n"); - sb.Append(" Handler: ").Append(Handler).Append("\n"); - sb.Append(" Required: ").Append(Required).Append("\n"); - sb.Append(" From: ").Append(From).Append("\n"); - return sb.ToString(); - } - - /// - /// Returns the object from JSON string - /// - /// DAGPathOutputAlias object - public static DAGPathOutputAlias 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. - /// - /// DAGPathOutputAlias object - public virtual DAGPathOutputAlias DuplicateDAGPathOutputAlias() - { - return FromJson(this.ToJson()); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel Duplicate() - { - return DuplicateDAGPathOutputAlias(); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override DAGArtifactOutputAlias DuplicateDAGArtifactOutputAlias() - { - return DuplicateDAGPathOutputAlias(); - } - - /// - /// 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 DAGPathOutputAlias); - } - - /// - /// Returns true if DAGPathOutputAlias instances are equal - /// - /// Instance of DAGPathOutputAlias to be compared - /// Boolean - public bool Equals(DAGPathOutputAlias input) - { - if (input == null) - return false; - return base.Equals(input) && - ( - this.From == input.From || - (this.From != null && - this.From.Equals(input.From)) - ) && 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.From != null) - hashCode = hashCode * 59 + this.From.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(@"^DAGPathOutputAlias$", 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/DAGStringInput.cs b/src/PollinationSDK/Model/DAGStringInput.cs deleted file mode 100644 index 0ad5ab7ed..000000000 --- a/src/PollinationSDK/Model/DAGStringInput.cs +++ /dev/null @@ -1,214 +0,0 @@ -/* - * 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 String input. You can add additional validation by defining a JSONSchema specification. See http://json-schema.org/understanding-json-schema/reference/string.html#string for more information. .. code-block:: python \"schema\": { \"type\": \"string\", \"maxLength\": 50, \"pattern\": \"(?i)(^.*\\.epw$)\" } - /// - [DataContract(Name = "DAGStringInput")] - public partial class DAGStringInput : DAGGenericInput, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected DAGStringInput() - { - // Set non-required readonly properties with defaultValue - this.Type = "DAGStringInput"; - } - - /// - /// Initializes a new instance of the class. - /// - /// Input name. (required). - /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. - /// Optional description for input.. - /// Default value for generic input.. - /// A list of aliases for this input in different platforms.. - /// A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. (default to false). - /// An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec.. - public DAGStringInput - ( - string name, // Required parameters - Dictionary annotations= default, string description= default, string _default= default, List> alias= default, bool required = false, Object spec= default // Optional parameters - ) : base(name: name, annotations: annotations, description: description, _default: _default, alias: alias, required: required, spec: spec)// BaseClass - { - - // Set non-required readonly properties with defaultValue - this.Type = "DAGStringInput"; - } - - //============================================== is ReadOnly - /// - /// Gets or Sets Type - /// - [DataMember(Name = "type", EmitDefaultValue = true)] - public string Type { get; protected internal set; } = "DAGStringInput"; - - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - return "DAGStringInput"; - } - - /// - /// 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("DAGStringInput:\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" Annotations: ").Append(Annotations).Append("\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" Default: ").Append(Default).Append("\n"); - sb.Append(" Alias: ").Append(Alias).Append("\n"); - sb.Append(" Required: ").Append(Required).Append("\n"); - sb.Append(" Spec: ").Append(Spec).Append("\n"); - return sb.ToString(); - } - - /// - /// Returns the object from JSON string - /// - /// DAGStringInput object - public static DAGStringInput 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. - /// - /// DAGStringInput object - public virtual DAGStringInput DuplicateDAGStringInput() - { - return FromJson(this.ToJson()); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel Duplicate() - { - return DuplicateDAGStringInput(); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override DAGGenericInput DuplicateDAGGenericInput() - { - return DuplicateDAGStringInput(); - } - - /// - /// 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 DAGStringInput); - } - - /// - /// Returns true if DAGStringInput instances are equal - /// - /// Instance of DAGStringInput to be compared - /// Boolean - public bool Equals(DAGStringInput 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(@"^DAGStringInput$", 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/DAGStringInputAlias.cs b/src/PollinationSDK/Model/DAGStringInputAlias.cs deleted file mode 100644 index d55831060..000000000 --- a/src/PollinationSDK/Model/DAGStringInputAlias.cs +++ /dev/null @@ -1,206 +0,0 @@ -/* - * 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 Alias String input. You can add additional validation by defining a JSONSchema specification. See http://json-schema.org/understanding-json-schema/reference/string.html#string for more information. .. code-block:: python \"schema\": { \"type\": \"string\", \"maxLength\": 50, \"pattern\": \"(?i)(^.*\\.epw$)\" } - /// - [DataContract(Name = "DAGStringInputAlias")] - public partial class DAGStringInputAlias : DAGGenericInputAlias, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected DAGStringInputAlias() - { - // Set non-required readonly properties with defaultValue - this.Type = "DAGStringInputAlias"; - } - - /// - /// Initializes a new instance of the class. - /// - /// Input name. (required). - /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. - /// Optional description for input.. - /// 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. (required). - /// List of process actions to process the input or output value. (required). - /// Default value for generic input.. - /// A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. (default to false). - /// An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec.. - public DAGStringInputAlias - ( - string name, List platform, List handler, // Required parameters - Dictionary annotations= default, string description= default, string _default= default, bool required = false, Object spec= default // Optional parameters - ) : base(name: name, annotations: annotations, description: description, platform: platform, handler: handler, _default: _default, required: required, spec: spec)// BaseClass - { - - // Set non-required readonly properties with defaultValue - this.Type = "DAGStringInputAlias"; - } - - //============================================== is ReadOnly - /// - /// Gets or Sets Type - /// - [DataMember(Name = "type", EmitDefaultValue = true)] - public string Type { get; protected internal set; } = "DAGStringInputAlias"; - - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - return "DAGStringInputAlias"; - } - - /// - /// 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("DAGStringInputAlias:\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" Annotations: ").Append(Annotations).Append("\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" Platform: ").Append(Platform).Append("\n"); - sb.Append(" Handler: ").Append(Handler).Append("\n"); - sb.Append(" Default: ").Append(Default).Append("\n"); - sb.Append(" Required: ").Append(Required).Append("\n"); - sb.Append(" Spec: ").Append(Spec).Append("\n"); - return sb.ToString(); - } - - /// - /// Returns the object from JSON string - /// - /// DAGStringInputAlias object - public static DAGStringInputAlias 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. - /// - /// DAGStringInputAlias object - public virtual DAGStringInputAlias DuplicateDAGStringInputAlias() - { - return FromJson(this.ToJson()); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel Duplicate() - { - return DuplicateDAGStringInputAlias(); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override DAGGenericInputAlias DuplicateDAGGenericInputAlias() - { - return DuplicateDAGStringInputAlias(); - } - - /// - /// 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 DAGStringInputAlias); - } - - /// - /// Returns true if DAGStringInputAlias instances are equal - /// - /// Instance of DAGStringInputAlias to be compared - /// Boolean - public bool Equals(DAGStringInputAlias 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(@"^DAGStringInputAlias$", 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/DAGStringOutput.cs b/src/PollinationSDK/Model/DAGStringOutput.cs deleted file mode 100644 index 2537e9137..000000000 --- a/src/PollinationSDK/Model/DAGStringOutput.cs +++ /dev/null @@ -1,246 +0,0 @@ -/* - * 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 -{ - /// - /// DAG string output. This output loads the content from a file as a string. - /// - [DataContract(Name = "DAGStringOutput")] - public partial class DAGStringOutput : GenericOutput, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected DAGStringOutput() - { - // Set non-required readonly properties with defaultValue - this.Type = "DAGStringOutput"; - } - - /// - /// Initializes a new instance of the class. - /// - /// Reference to a file or a task output. Task output must be file. (required). - /// A list of additional processes for loading this output on different platforms.. - /// A boolean to indicate if an artifact output is required. A False value makes the artifact optional. (default to true). - /// Output name. (required). - /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. - /// Optional description for output.. - public DAGStringOutput - ( - string name, AnyOf from, // Required parameters - Dictionary annotations= default, string description= default, List> alias= default, bool required = true // Optional parameters - ) : base(name: name, annotations: annotations, description: description)// BaseClass - { - // to ensure "from" is required (not null) - this.From = from ?? throw new ArgumentNullException("from is a required property for DAGStringOutput and cannot be null"); - this.Alias = alias; - this.Required = required; - - // Set non-required readonly properties with defaultValue - this.Type = "DAGStringOutput"; - } - - //============================================== is ReadOnly - /// - /// Gets or Sets Type - /// - [DataMember(Name = "type", EmitDefaultValue = true)] - public string Type { get; protected internal set; } = "DAGStringOutput"; - - /// - /// Reference to a file or a task output. Task output must be file. - /// - /// Reference to a file or a task output. Task output must be file. - [DataMember(Name = "from", IsRequired = true, EmitDefaultValue = false)] - public AnyOf From { get; set; } - /// - /// A list of additional processes for loading this output on different platforms. - /// - /// A list of additional processes for loading this output on different platforms. - [DataMember(Name = "alias", EmitDefaultValue = false)] - public List> Alias { get; set; } - /// - /// A boolean to indicate if an artifact output is required. A False value makes the artifact optional. - /// - /// A boolean to indicate if an artifact output is required. A False value makes the artifact optional. - [DataMember(Name = "required", EmitDefaultValue = true)] - public bool Required { get; set; } = true; - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - return "DAGStringOutput"; - } - - /// - /// 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("DAGStringOutput:\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" Annotations: ").Append(Annotations).Append("\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" From: ").Append(From).Append("\n"); - sb.Append(" Alias: ").Append(Alias).Append("\n"); - sb.Append(" Required: ").Append(Required).Append("\n"); - return sb.ToString(); - } - - /// - /// Returns the object from JSON string - /// - /// DAGStringOutput object - public static DAGStringOutput 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. - /// - /// DAGStringOutput object - public virtual DAGStringOutput DuplicateDAGStringOutput() - { - return FromJson(this.ToJson()); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel Duplicate() - { - return DuplicateDAGStringOutput(); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override GenericOutput DuplicateGenericOutput() - { - return DuplicateDAGStringOutput(); - } - - /// - /// 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 DAGStringOutput); - } - - /// - /// Returns true if DAGStringOutput instances are equal - /// - /// Instance of DAGStringOutput to be compared - /// Boolean - public bool Equals(DAGStringOutput input) - { - if (input == null) - return false; - return base.Equals(input) && - ( - this.From == input.From || - (this.From != null && - this.From.Equals(input.From)) - ) && base.Equals(input) && - ( - this.Alias == input.Alias || - this.Alias != null && - input.Alias != null && - this.Alias.SequenceEqual(input.Alias) - ) && base.Equals(input) && - ( - this.Required == input.Required || - (this.Required != null && - this.Required.Equals(input.Required)) - ) && 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.From != null) - hashCode = hashCode * 59 + this.From.GetHashCode(); - if (this.Alias != null) - hashCode = hashCode * 59 + this.Alias.GetHashCode(); - if (this.Required != null) - hashCode = hashCode * 59 + this.Required.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(@"^DAGStringOutput$", 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/DAGStringOutputAlias.cs b/src/PollinationSDK/Model/DAGStringOutputAlias.cs deleted file mode 100644 index e96e96525..000000000 --- a/src/PollinationSDK/Model/DAGStringOutputAlias.cs +++ /dev/null @@ -1,219 +0,0 @@ -/* - * 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 -{ - /// - /// DAG alias string output. This output loads the content from a file as a string. - /// - [DataContract(Name = "DAGStringOutputAlias")] - public partial class DAGStringOutputAlias : DAGArtifactOutputAlias, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected DAGStringOutputAlias() - { - // Set non-required readonly properties with defaultValue - this.Type = "DAGStringOutputAlias"; - } - - /// - /// Initializes a new instance of the class. - /// - /// Reference to a file or a task output. Task output must be file. (required). - /// Output name. (required). - /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. - /// Optional description for output.. - /// 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. (required). - /// List of process actions to process the input or output value. (required). - /// A boolean to indicate if an artifact output is required. A False value makes the artifact optional. (default to true). - public DAGStringOutputAlias - ( - string name, List platform, List handler, AnyOf from, // Required parameters - Dictionary annotations= default, string description= default, bool required = true // Optional parameters - ) : base(name: name, annotations: annotations, description: description, platform: platform, handler: handler, required: required)// BaseClass - { - // to ensure "from" is required (not null) - this.From = from ?? throw new ArgumentNullException("from is a required property for DAGStringOutputAlias and cannot be null"); - - // Set non-required readonly properties with defaultValue - this.Type = "DAGStringOutputAlias"; - } - - //============================================== is ReadOnly - /// - /// Gets or Sets Type - /// - [DataMember(Name = "type", EmitDefaultValue = true)] - public string Type { get; protected internal set; } = "DAGStringOutputAlias"; - - /// - /// Reference to a file or a task output. Task output must be file. - /// - /// Reference to a file or a task output. Task output must be file. - [DataMember(Name = "from", IsRequired = true, EmitDefaultValue = false)] - public AnyOf From { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - return "DAGStringOutputAlias"; - } - - /// - /// 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("DAGStringOutputAlias:\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" Annotations: ").Append(Annotations).Append("\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" Platform: ").Append(Platform).Append("\n"); - sb.Append(" Handler: ").Append(Handler).Append("\n"); - sb.Append(" Required: ").Append(Required).Append("\n"); - sb.Append(" From: ").Append(From).Append("\n"); - return sb.ToString(); - } - - /// - /// Returns the object from JSON string - /// - /// DAGStringOutputAlias object - public static DAGStringOutputAlias 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. - /// - /// DAGStringOutputAlias object - public virtual DAGStringOutputAlias DuplicateDAGStringOutputAlias() - { - return FromJson(this.ToJson()); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel Duplicate() - { - return DuplicateDAGStringOutputAlias(); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override DAGArtifactOutputAlias DuplicateDAGArtifactOutputAlias() - { - return DuplicateDAGStringOutputAlias(); - } - - /// - /// 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 DAGStringOutputAlias); - } - - /// - /// Returns true if DAGStringOutputAlias instances are equal - /// - /// Instance of DAGStringOutputAlias to be compared - /// Boolean - public bool Equals(DAGStringOutputAlias input) - { - if (input == null) - return false; - return base.Equals(input) && - ( - this.From == input.From || - (this.From != null && - this.From.Equals(input.From)) - ) && 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.From != null) - hashCode = hashCode * 59 + this.From.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(@"^DAGStringOutputAlias$", 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/DAGTask.cs b/src/PollinationSDK/Model/DAGTask.cs deleted file mode 100644 index df95d830e..000000000 --- a/src/PollinationSDK/Model/DAGTask.cs +++ /dev/null @@ -1,324 +0,0 @@ -/* - * 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 single task in a DAG flow. - /// - [DataContract(Name = "DAGTask")] - public partial class DAGTask : OpenAPIGenBaseModel, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected DAGTask() - { - // Set non-required readonly properties with defaultValue - this.Type = "DAGTask"; - } - - /// - /// Initializes a new instance of the class. - /// - /// Name for this task. It must be unique in a DAG. (required). - /// Template name. A template is a Function or a DAG. This template must be available in the dependencies. (required). - /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. - /// List of DAG tasks that this task depends on and needs to be executed before this task.. - /// The input arguments for this task.. - /// Loop configuration for this task.. - /// 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.. - /// List of task returns.. - public DAGTask - ( - string name, string template, // Required parameters - Dictionary annotations= default, List needs= default, List> arguments= default, DAGTaskLoop loop= default, string subFolder= default, List> returns= default// Optional parameters - ) : base()// BaseClass - { - // to ensure "name" is required (not null) - this.Name = name ?? throw new ArgumentNullException("name is a required property for DAGTask and cannot be null"); - // to ensure "template" is required (not null) - this.Template = template ?? throw new ArgumentNullException("template is a required property for DAGTask and cannot be null"); - this.Annotations = annotations; - this.Needs = needs; - this.Arguments = arguments; - this.Loop = loop; - this.SubFolder = subFolder; - this.Returns = returns; - - // Set non-required readonly properties with defaultValue - this.Type = "DAGTask"; - } - - //============================================== is ReadOnly - /// - /// Gets or Sets Type - /// - [DataMember(Name = "type", EmitDefaultValue = true)] - public string Type { get; protected internal set; } = "DAGTask"; - - /// - /// Name for this task. It must be unique in a DAG. - /// - /// Name for this task. It must be unique in a DAG. - [DataMember(Name = "name", IsRequired = true, EmitDefaultValue = false)] - public string Name { get; set; } - /// - /// Template name. A template is a Function or a DAG. This template must be available in the dependencies. - /// - /// Template name. A template is a Function or a DAG. This template must be available in the dependencies. - [DataMember(Name = "template", IsRequired = true, EmitDefaultValue = false)] - public string Template { 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; } - /// - /// List of DAG tasks that this task depends on and needs to be executed before this task. - /// - /// List of DAG tasks that this task depends on and needs to be executed before this task. - [DataMember(Name = "needs", EmitDefaultValue = false)] - public List Needs { get; set; } - /// - /// The input arguments for this task. - /// - /// The input arguments for this task. - [DataMember(Name = "arguments", EmitDefaultValue = false)] - public List> Arguments { get; set; } - /// - /// Loop configuration for this task. - /// - /// Loop configuration for this task. - [DataMember(Name = "loop", EmitDefaultValue = false)] - public DAGTaskLoop Loop { get; set; } - /// - /// 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. - /// - /// 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. - [DataMember(Name = "sub_folder", EmitDefaultValue = false)] - public string SubFolder { get; set; } - /// - /// List of task returns. - /// - /// List of task returns. - [DataMember(Name = "returns", EmitDefaultValue = false)] - public List> Returns { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - return "DAGTask"; - } - - /// - /// 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("DAGTask:\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" Template: ").Append(Template).Append("\n"); - sb.Append(" Annotations: ").Append(Annotations).Append("\n"); - sb.Append(" Needs: ").Append(Needs).Append("\n"); - sb.Append(" Arguments: ").Append(Arguments).Append("\n"); - sb.Append(" Loop: ").Append(Loop).Append("\n"); - sb.Append(" SubFolder: ").Append(SubFolder).Append("\n"); - sb.Append(" Returns: ").Append(Returns).Append("\n"); - return sb.ToString(); - } - - /// - /// Returns the object from JSON string - /// - /// DAGTask object - public static DAGTask 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. - /// - /// DAGTask object - public virtual DAGTask DuplicateDAGTask() - { - return FromJson(this.ToJson()); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel Duplicate() - { - return DuplicateDAGTask(); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel DuplicateOpenAPIGenBaseModel() - { - return DuplicateDAGTask(); - } - - /// - /// 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 DAGTask); - } - - /// - /// Returns true if DAGTask instances are equal - /// - /// Instance of DAGTask to be compared - /// Boolean - public bool Equals(DAGTask 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.Template == input.Template || - (this.Template != null && - this.Template.Equals(input.Template)) - ) && base.Equals(input) && - ( - this.Type == input.Type || - (this.Type != null && - this.Type.Equals(input.Type)) - ) && base.Equals(input) && - ( - this.Annotations == input.Annotations || - this.Annotations != null && - input.Annotations != null && - this.Annotations.SequenceEqual(input.Annotations) - ) && base.Equals(input) && - ( - this.Needs == input.Needs || - this.Needs != null && - input.Needs != null && - this.Needs.SequenceEqual(input.Needs) - ) && base.Equals(input) && - ( - this.Arguments == input.Arguments || - this.Arguments != null && - input.Arguments != null && - this.Arguments.SequenceEqual(input.Arguments) - ) && base.Equals(input) && - ( - this.Loop == input.Loop || - (this.Loop != null && - this.Loop.Equals(input.Loop)) - ) && base.Equals(input) && - ( - this.SubFolder == input.SubFolder || - (this.SubFolder != null && - this.SubFolder.Equals(input.SubFolder)) - ) && base.Equals(input) && - ( - this.Returns == input.Returns || - this.Returns != null && - input.Returns != null && - this.Returns.SequenceEqual(input.Returns) - ); - } - - /// - /// 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.Template != null) - hashCode = hashCode * 59 + this.Template.GetHashCode(); - if (this.Type != null) - hashCode = hashCode * 59 + this.Type.GetHashCode(); - if (this.Annotations != null) - hashCode = hashCode * 59 + this.Annotations.GetHashCode(); - if (this.Needs != null) - hashCode = hashCode * 59 + this.Needs.GetHashCode(); - if (this.Arguments != null) - hashCode = hashCode * 59 + this.Arguments.GetHashCode(); - if (this.Loop != null) - hashCode = hashCode * 59 + this.Loop.GetHashCode(); - if (this.SubFolder != null) - hashCode = hashCode * 59 + this.SubFolder.GetHashCode(); - if (this.Returns != null) - hashCode = hashCode * 59 + this.Returns.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(@"^DAGTask$", 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/DAGTaskLoop.cs b/src/PollinationSDK/Model/DAGTaskLoop.cs deleted file mode 100644 index 11b1d177b..000000000 --- a/src/PollinationSDK/Model/DAGTaskLoop.cs +++ /dev/null @@ -1,213 +0,0 @@ -/* - * 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 -{ - /// - /// Loop configuration for the task. This will run the template provided multiple times and in parallel relative to an input or task parameter which should be a list. - /// - [DataContract(Name = "DAGTaskLoop")] - public partial class DAGTaskLoop : OpenAPIGenBaseModel, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. - /// The task or DAG parameter to loop over (must be iterable).. - public DAGTaskLoop - ( - // Required parameters - Dictionary annotations= default, AnyOf from= default// Optional parameters - ) : base()// BaseClass - { - this.Annotations = annotations; - this.From = from; - - // Set non-required readonly properties with defaultValue - this.Type = "DAGTaskLoop"; - } - - //============================================== is ReadOnly - /// - /// Gets or Sets Type - /// - [DataMember(Name = "type", EmitDefaultValue = true)] - public string Type { get; protected internal set; } = "DAGTaskLoop"; - - /// - /// 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; } - /// - /// The task or DAG parameter to loop over (must be iterable). - /// - /// The task or DAG parameter to loop over (must be iterable). - [DataMember(Name = "from", EmitDefaultValue = false)] - public AnyOf From { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - return "DAGTaskLoop"; - } - - /// - /// 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("DAGTaskLoop:\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" Annotations: ").Append(Annotations).Append("\n"); - sb.Append(" From: ").Append(From).Append("\n"); - return sb.ToString(); - } - - /// - /// Returns the object from JSON string - /// - /// DAGTaskLoop object - public static DAGTaskLoop 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. - /// - /// DAGTaskLoop object - public virtual DAGTaskLoop DuplicateDAGTaskLoop() - { - return FromJson(this.ToJson()); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel Duplicate() - { - return DuplicateDAGTaskLoop(); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel DuplicateOpenAPIGenBaseModel() - { - return DuplicateDAGTaskLoop(); - } - - /// - /// 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 DAGTaskLoop); - } - - /// - /// Returns true if DAGTaskLoop instances are equal - /// - /// Instance of DAGTaskLoop to be compared - /// Boolean - public bool Equals(DAGTaskLoop 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.Annotations == input.Annotations || - this.Annotations != null && - input.Annotations != null && - this.Annotations.SequenceEqual(input.Annotations) - ) && base.Equals(input) && - ( - this.From == input.From || - (this.From != null && - this.From.Equals(input.From)) - ); - } - - /// - /// 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.Annotations != null) - hashCode = hashCode * 59 + this.Annotations.GetHashCode(); - if (this.From != null) - hashCode = hashCode * 59 + this.From.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(@"^DAGTaskLoop$", 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/DailyUsage.cs b/src/PollinationSDK/Model/DailyUsage.cs deleted file mode 100644 index dec7d9dd3..000000000 --- a/src/PollinationSDK/Model/DailyUsage.cs +++ /dev/null @@ -1,270 +0,0 @@ -/* - * 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 -{ - /// - /// DailyUsage - /// - [DataContract(Name = "DailyUsage")] - public partial class DailyUsage : OpenAPIGenBaseModel, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected DailyUsage() - { - // Set non-required readonly properties with defaultValue - this.Type = "DailyUsage"; - } - - /// - /// Initializes a new instance of the class. - /// - /// The day this usage was aggregated for (required). - /// cpu usage (default to 0D). - /// memory usage (default to 0D). - /// succeeded usage (default to 0). - /// failed usage (default to 0). - public DailyUsage - ( - DateTime date, // Required parameters - double cpu = 0D, double memory = 0D, int succeeded = 0, int failed = 0 // Optional parameters - ) : base()// BaseClass - { - this.Date = date; - this.Cpu = cpu; - this.Memory = memory; - this.Succeeded = succeeded; - this.Failed = failed; - - // Set non-required readonly properties with defaultValue - this.Type = "DailyUsage"; - } - - //============================================== is ReadOnly - /// - /// Gets or Sets Type - /// - [DataMember(Name = "type", EmitDefaultValue = true)] - public string Type { get; protected internal set; } = "DailyUsage"; - - /// - /// The day this usage was aggregated for - /// - /// The day this usage was aggregated for - [DataMember(Name = "date", IsRequired = true, EmitDefaultValue = false)] - public DateTime Date { get; set; } - /// - /// cpu usage - /// - /// cpu usage - [DataMember(Name = "cpu", EmitDefaultValue = true)] - public double Cpu { get; set; } = 0D; - /// - /// memory usage - /// - /// memory usage - [DataMember(Name = "memory", EmitDefaultValue = true)] - public double Memory { get; set; } = 0D; - /// - /// succeeded usage - /// - /// succeeded usage - [DataMember(Name = "succeeded", EmitDefaultValue = true)] - public int Succeeded { get; set; } = 0; - /// - /// failed usage - /// - /// failed usage - [DataMember(Name = "failed", EmitDefaultValue = true)] - public int Failed { get; set; } = 0; - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - return "DailyUsage"; - } - - /// - /// 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("DailyUsage:\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" Date: ").Append(Date).Append("\n"); - sb.Append(" Cpu: ").Append(Cpu).Append("\n"); - sb.Append(" Memory: ").Append(Memory).Append("\n"); - sb.Append(" Succeeded: ").Append(Succeeded).Append("\n"); - sb.Append(" Failed: ").Append(Failed).Append("\n"); - return sb.ToString(); - } - - /// - /// Returns the object from JSON string - /// - /// DailyUsage object - public static DailyUsage 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. - /// - /// DailyUsage object - public virtual DailyUsage DuplicateDailyUsage() - { - return FromJson(this.ToJson()); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel Duplicate() - { - return DuplicateDailyUsage(); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel DuplicateOpenAPIGenBaseModel() - { - return DuplicateDailyUsage(); - } - - /// - /// 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 DailyUsage); - } - - /// - /// Returns true if DailyUsage instances are equal - /// - /// Instance of DailyUsage to be compared - /// Boolean - public bool Equals(DailyUsage input) - { - if (input == null) - return false; - return base.Equals(input) && - ( - this.Date == input.Date || - (this.Date != null && - this.Date.Equals(input.Date)) - ) && 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.Succeeded == input.Succeeded || - (this.Succeeded != null && - this.Succeeded.Equals(input.Succeeded)) - ) && base.Equals(input) && - ( - this.Failed == input.Failed || - (this.Failed != null && - this.Failed.Equals(input.Failed)) - ) && 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.Date != null) - hashCode = hashCode * 59 + this.Date.GetHashCode(); - if (this.Cpu != null) - hashCode = hashCode * 59 + this.Cpu.GetHashCode(); - if (this.Memory != null) - hashCode = hashCode * 59 + this.Memory.GetHashCode(); - if (this.Succeeded != null) - hashCode = hashCode * 59 + this.Succeeded.GetHashCode(); - if (this.Failed != null) - hashCode = hashCode * 59 + this.Failed.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(@"^DailyUsage$", 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/Dependency.cs b/src/PollinationSDK/Model/Dependency.cs deleted file mode 100644 index 3ac84fa28..000000000 --- a/src/PollinationSDK/Model/Dependency.cs +++ /dev/null @@ -1,306 +0,0 @@ -/* - * 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 -{ - /// - /// Configuration to fetch a Recipe or Plugin that another Recipe depends on. - /// - [DataContract(Name = "Dependency")] - public partial class Dependency : OpenAPIGenBaseModel, IEquatable, IValidatableObject - { - /// - /// The kind of dependency. It can be a recipe or an plugin. - /// - /// The kind of dependency. It can be a recipe or an plugin. - [DataMember(Name="kind", EmitDefaultValue=false)] - public DependencyKind Kind { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected Dependency() - { - // Set non-required readonly properties with defaultValue - this.Type = "Dependency"; - } - - /// - /// Initializes a new instance of the class. - /// - /// The kind of dependency. It can be a recipe or an plugin. (required). - /// Workflow name. This name should be unique among all the resources in your resource. Use an alias if this is not the case. (required). - /// Tag of the resource. (required). - /// URL to a repository where this resource can be found. (required). - /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. - /// The digest hash of the dependency when retrieved from its source. This is locked when the resource dependencies are downloaded.. - /// An optional alias to refer to this dependency. Useful if the name is already used somewhere else.. - public Dependency - ( - DependencyKind kind, string name, string tag, string source, // Required parameters - Dictionary annotations= default, string hash= default, string alias= default// Optional parameters - ) : base()// BaseClass - { - this.Kind = kind; - // to ensure "name" is required (not null) - this.Name = name ?? throw new ArgumentNullException("name is a required property for Dependency and cannot be null"); - // to ensure "tag" is required (not null) - this.Tag = tag ?? throw new ArgumentNullException("tag is a required property for Dependency and cannot be null"); - // to ensure "source" is required (not null) - this.Source = source ?? throw new ArgumentNullException("source is a required property for Dependency and cannot be null"); - this.Annotations = annotations; - this.Hash = hash; - this.Alias = alias; - - // Set non-required readonly properties with defaultValue - this.Type = "Dependency"; - } - - //============================================== is ReadOnly - /// - /// Gets or Sets Type - /// - [DataMember(Name = "type", EmitDefaultValue = true)] - public string Type { get; protected internal set; } = "Dependency"; - - /// - /// Workflow name. This name should be unique among all the resources in your resource. Use an alias if this is not the case. - /// - /// Workflow name. This name should be unique among all the resources in your resource. Use an alias if this is not the case. - [DataMember(Name = "name", IsRequired = true, EmitDefaultValue = false)] - public string Name { get; set; } - /// - /// Tag of the resource. - /// - /// Tag of the resource. - [DataMember(Name = "tag", IsRequired = true, EmitDefaultValue = false)] - public string Tag { get; set; } - /// - /// URL to a repository where this resource can be found. - /// - /// URL to a repository where this resource can be found. - [DataMember(Name = "source", IsRequired = true, EmitDefaultValue = false)] - public string Source { 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; } - /// - /// The digest hash of the dependency when retrieved from its source. This is locked when the resource dependencies are downloaded. - /// - /// The digest hash of the dependency when retrieved from its source. This is locked when the resource dependencies are downloaded. - [DataMember(Name = "hash", EmitDefaultValue = false)] - public string Hash { get; set; } - /// - /// An optional alias to refer to this dependency. Useful if the name is already used somewhere else. - /// - /// An optional alias to refer to this dependency. Useful if the name is already used somewhere else. - [DataMember(Name = "alias", EmitDefaultValue = false)] - public string Alias { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - return "Dependency"; - } - - /// - /// 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("Dependency:\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" Kind: ").Append(Kind).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" Tag: ").Append(Tag).Append("\n"); - sb.Append(" Source: ").Append(Source).Append("\n"); - sb.Append(" Annotations: ").Append(Annotations).Append("\n"); - sb.Append(" Hash: ").Append(Hash).Append("\n"); - sb.Append(" Alias: ").Append(Alias).Append("\n"); - return sb.ToString(); - } - - /// - /// Returns the object from JSON string - /// - /// Dependency object - public static Dependency 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. - /// - /// Dependency object - public virtual Dependency DuplicateDependency() - { - return FromJson(this.ToJson()); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel Duplicate() - { - return DuplicateDependency(); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel DuplicateOpenAPIGenBaseModel() - { - return DuplicateDependency(); - } - - /// - /// 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 Dependency); - } - - /// - /// Returns true if Dependency instances are equal - /// - /// Instance of Dependency to be compared - /// Boolean - public bool Equals(Dependency input) - { - if (input == null) - return false; - return base.Equals(input) && - ( - this.Kind == input.Kind || - (this.Kind != null && - this.Kind.Equals(input.Kind)) - ) && base.Equals(input) && - ( - this.Name == input.Name || - (this.Name != null && - this.Name.Equals(input.Name)) - ) && base.Equals(input) && - ( - this.Tag == input.Tag || - (this.Tag != null && - this.Tag.Equals(input.Tag)) - ) && base.Equals(input) && - ( - this.Source == input.Source || - (this.Source != null && - this.Source.Equals(input.Source)) - ) && base.Equals(input) && - ( - this.Type == input.Type || - (this.Type != null && - this.Type.Equals(input.Type)) - ) && base.Equals(input) && - ( - this.Annotations == input.Annotations || - this.Annotations != null && - input.Annotations != null && - this.Annotations.SequenceEqual(input.Annotations) - ) && base.Equals(input) && - ( - this.Hash == input.Hash || - (this.Hash != null && - this.Hash.Equals(input.Hash)) - ) && base.Equals(input) && - ( - this.Alias == input.Alias || - (this.Alias != null && - this.Alias.Equals(input.Alias)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = base.GetHashCode(); - if (this.Kind != null) - hashCode = hashCode * 59 + this.Kind.GetHashCode(); - if (this.Name != null) - hashCode = hashCode * 59 + this.Name.GetHashCode(); - if (this.Tag != null) - hashCode = hashCode * 59 + this.Tag.GetHashCode(); - if (this.Source != null) - hashCode = hashCode * 59 + this.Source.GetHashCode(); - if (this.Type != null) - hashCode = hashCode * 59 + this.Type.GetHashCode(); - if (this.Annotations != null) - hashCode = hashCode * 59 + this.Annotations.GetHashCode(); - if (this.Hash != null) - hashCode = hashCode * 59 + this.Hash.GetHashCode(); - if (this.Alias != null) - hashCode = hashCode * 59 + this.Alias.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(@"^Dependency$", 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/DependencyKind.cs b/src/PollinationSDK/Model/DependencyKind.cs deleted file mode 100644 index dacc74150..000000000 --- a/src/PollinationSDK/Model/DependencyKind.cs +++ /dev/null @@ -1,49 +0,0 @@ -/* - * 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 -{ - /// - /// Dependency kind. - /// - /// Dependency kind. - - [JsonConverter(typeof(StringEnumConverter))] - - public enum DependencyKind - { - /// - /// Enum Recipe for value: recipe - /// - [EnumMember(Value = "recipe")] - Recipe = 1, - - /// - /// Enum Plugin for value: plugin - /// - [EnumMember(Value = "plugin")] - Plugin = 2 - - } - -} diff --git a/src/PollinationSDK/Model/DockerConfig.cs b/src/PollinationSDK/Model/DockerConfig.cs deleted file mode 100644 index 2ec13db2b..000000000 --- a/src/PollinationSDK/Model/DockerConfig.cs +++ /dev/null @@ -1,257 +0,0 @@ -/* - * 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 -{ - /// - /// Plugin Configuration to run in a Docker container - /// - [DataContract(Name = "DockerConfig")] - public partial class DockerConfig : OpenAPIGenBaseModel, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected DockerConfig() - { - // Set non-required readonly properties with defaultValue - this.Type = "DockerConfig"; - } - - /// - /// Initializes a new instance of the class. - /// - /// Docker image name. Must include tag. (required). - /// The working directory the entrypoint command of the container runsin. This is used to determine where to load artifacts when running in the container. (required). - /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. - /// The container registry URLs that this container should be pulled from. Will default to Dockerhub if none is specified.. - public DockerConfig - ( - string image, string workdir, // Required parameters - Dictionary annotations= default, string registry= default// Optional parameters - ) : base()// BaseClass - { - // to ensure "image" is required (not null) - this.Image = image ?? throw new ArgumentNullException("image is a required property for DockerConfig and cannot be null"); - // to ensure "workdir" is required (not null) - this.Workdir = workdir ?? throw new ArgumentNullException("workdir is a required property for DockerConfig and cannot be null"); - this.Annotations = annotations; - this.Registry = registry; - - // Set non-required readonly properties with defaultValue - this.Type = "DockerConfig"; - } - - //============================================== is ReadOnly - /// - /// Gets or Sets Type - /// - [DataMember(Name = "type", EmitDefaultValue = true)] - public string Type { get; protected internal set; } = "DockerConfig"; - - /// - /// Docker image name. Must include tag. - /// - /// Docker image name. Must include tag. - [DataMember(Name = "image", IsRequired = true, EmitDefaultValue = false)] - public string Image { get; set; } - /// - /// The working directory the entrypoint command of the container runsin. This is used to determine where to load artifacts when running in the container. - /// - /// The working directory the entrypoint command of the container runsin. This is used to determine where to load artifacts when running in the container. - [DataMember(Name = "workdir", IsRequired = true, EmitDefaultValue = false)] - public string Workdir { 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; } - /// - /// The container registry URLs that this container should be pulled from. Will default to Dockerhub if none is specified. - /// - /// The container registry URLs that this container should be pulled from. Will default to Dockerhub if none is specified. - [DataMember(Name = "registry", EmitDefaultValue = false)] - public string Registry { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - return "DockerConfig"; - } - - /// - /// 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("DockerConfig:\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" Image: ").Append(Image).Append("\n"); - sb.Append(" Workdir: ").Append(Workdir).Append("\n"); - sb.Append(" Annotations: ").Append(Annotations).Append("\n"); - sb.Append(" Registry: ").Append(Registry).Append("\n"); - return sb.ToString(); - } - - /// - /// Returns the object from JSON string - /// - /// DockerConfig object - public static DockerConfig 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. - /// - /// DockerConfig object - public virtual DockerConfig DuplicateDockerConfig() - { - return FromJson(this.ToJson()); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel Duplicate() - { - return DuplicateDockerConfig(); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel DuplicateOpenAPIGenBaseModel() - { - return DuplicateDockerConfig(); - } - - /// - /// 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 DockerConfig); - } - - /// - /// Returns true if DockerConfig instances are equal - /// - /// Instance of DockerConfig to be compared - /// Boolean - public bool Equals(DockerConfig input) - { - if (input == null) - return false; - return base.Equals(input) && - ( - this.Image == input.Image || - (this.Image != null && - this.Image.Equals(input.Image)) - ) && base.Equals(input) && - ( - this.Workdir == input.Workdir || - (this.Workdir != null && - this.Workdir.Equals(input.Workdir)) - ) && base.Equals(input) && - ( - this.Type == input.Type || - (this.Type != null && - this.Type.Equals(input.Type)) - ) && base.Equals(input) && - ( - this.Annotations == input.Annotations || - this.Annotations != null && - input.Annotations != null && - this.Annotations.SequenceEqual(input.Annotations) - ) && base.Equals(input) && - ( - this.Registry == input.Registry || - (this.Registry != null && - this.Registry.Equals(input.Registry)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = base.GetHashCode(); - if (this.Image != null) - hashCode = hashCode * 59 + this.Image.GetHashCode(); - if (this.Workdir != null) - hashCode = hashCode * 59 + this.Workdir.GetHashCode(); - if (this.Type != null) - hashCode = hashCode * 59 + this.Type.GetHashCode(); - if (this.Annotations != null) - hashCode = hashCode * 59 + this.Annotations.GetHashCode(); - if (this.Registry != null) - hashCode = hashCode * 59 + this.Registry.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(@"^DockerConfig", 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/FileMeta.cs b/src/PollinationSDK/Model/FileMeta.cs deleted file mode 100644 index c7ebb1a29..000000000 --- a/src/PollinationSDK/Model/FileMeta.cs +++ /dev/null @@ -1,268 +0,0 @@ -/* - * 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 -{ - /// - /// FileMeta - /// - [DataContract(Name = "FileMeta")] - public partial class FileMeta : OpenAPIGenBaseModel, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected FileMeta() - { - // Set non-required readonly properties with defaultValue - this.Type = "FileMeta"; - } - - /// - /// Initializes a new instance of the class. - /// - /// key (required). - /// fileType (required). - /// fileName (required). - /// lastModified. - /// size. - public FileMeta - ( - string key, string fileType, string fileName, // Required parameters - DateTime lastModified= default, int size= default // Optional parameters - ) : base()// BaseClass - { - // to ensure "key" is required (not null) - this.Key = key ?? throw new ArgumentNullException("key is a required property for FileMeta and cannot be null"); - // to ensure "fileType" is required (not null) - this.FileType = fileType ?? throw new ArgumentNullException("fileType is a required property for FileMeta and cannot be null"); - // to ensure "fileName" is required (not null) - this.FileName = fileName ?? throw new ArgumentNullException("fileName is a required property for FileMeta and cannot be null"); - this.LastModified = lastModified; - this.Size = size; - - // Set non-required readonly properties with defaultValue - this.Type = "FileMeta"; - } - - //============================================== is ReadOnly - /// - /// Gets or Sets Type - /// - [DataMember(Name = "type", EmitDefaultValue = true)] - public string Type { get; protected internal set; } = "FileMeta"; - - /// - /// Gets or Sets Key - /// - [DataMember(Name = "key", IsRequired = true, EmitDefaultValue = false)] - public string Key { get; set; } - /// - /// Gets or Sets FileType - /// - [DataMember(Name = "file_type", IsRequired = true, EmitDefaultValue = false)] - public string FileType { get; set; } - /// - /// Gets or Sets FileName - /// - [DataMember(Name = "file_name", IsRequired = true, EmitDefaultValue = false)] - public string FileName { get; set; } - /// - /// Gets or Sets LastModified - /// - [DataMember(Name = "last_modified", EmitDefaultValue = false)] - public DateTime LastModified { get; set; } - /// - /// Gets or Sets Size - /// - [DataMember(Name = "size", EmitDefaultValue = false)] - public int Size { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - return "FileMeta"; - } - - /// - /// 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("FileMeta:\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" Key: ").Append(Key).Append("\n"); - sb.Append(" FileType: ").Append(FileType).Append("\n"); - sb.Append(" FileName: ").Append(FileName).Append("\n"); - sb.Append(" LastModified: ").Append(LastModified).Append("\n"); - sb.Append(" Size: ").Append(Size).Append("\n"); - return sb.ToString(); - } - - /// - /// Returns the object from JSON string - /// - /// FileMeta object - public static FileMeta 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. - /// - /// FileMeta object - public virtual FileMeta DuplicateFileMeta() - { - return FromJson(this.ToJson()); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel Duplicate() - { - return DuplicateFileMeta(); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel DuplicateOpenAPIGenBaseModel() - { - return DuplicateFileMeta(); - } - - /// - /// 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 FileMeta); - } - - /// - /// Returns true if FileMeta instances are equal - /// - /// Instance of FileMeta to be compared - /// Boolean - public bool Equals(FileMeta 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.FileType == input.FileType || - (this.FileType != null && - this.FileType.Equals(input.FileType)) - ) && base.Equals(input) && - ( - this.FileName == input.FileName || - (this.FileName != null && - this.FileName.Equals(input.FileName)) - ) && base.Equals(input) && - ( - this.LastModified == input.LastModified || - (this.LastModified != null && - this.LastModified.Equals(input.LastModified)) - ) && base.Equals(input) && - ( - this.Size == input.Size || - (this.Size != null && - this.Size.Equals(input.Size)) - ) && 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.FileType != null) - hashCode = hashCode * 59 + this.FileType.GetHashCode(); - if (this.FileName != null) - hashCode = hashCode * 59 + this.FileName.GetHashCode(); - if (this.LastModified != null) - hashCode = hashCode * 59 + this.LastModified.GetHashCode(); - if (this.Size != null) - hashCode = hashCode * 59 + this.Size.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(@"^FileMeta$", 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/FileReference.cs b/src/PollinationSDK/Model/FileReference.cs deleted file mode 100644 index f3b9e9a6c..000000000 --- a/src/PollinationSDK/Model/FileReference.cs +++ /dev/null @@ -1,209 +0,0 @@ -/* - * 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 -{ - /// - /// Reference to a file. - /// - [DataContract(Name = "FileReference")] - public partial class FileReference : BaseReference, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected FileReference() - { - // Set non-required readonly properties with defaultValue - this.Type = "FileReference"; - } - - /// - /// Initializes a new instance of the class. - /// - /// Relative path to a file. (required). - /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. - public FileReference - ( - string path, // Required parameters - Dictionary annotations= default // Optional parameters - ) : base(annotations: annotations)// BaseClass - { - // to ensure "path" is required (not null) - this.Path = path ?? throw new ArgumentNullException("path is a required property for FileReference and cannot be null"); - - // Set non-required readonly properties with defaultValue - this.Type = "FileReference"; - } - - //============================================== is ReadOnly - /// - /// Gets or Sets Type - /// - [DataMember(Name = "type", EmitDefaultValue = true)] - public string Type { get; protected internal set; } = "FileReference"; - - /// - /// Relative path to a file. - /// - /// Relative path to a file. - [DataMember(Name = "path", IsRequired = true, EmitDefaultValue = false)] - public string Path { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - return "FileReference"; - } - - /// - /// 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("FileReference:\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" Annotations: ").Append(Annotations).Append("\n"); - sb.Append(" Path: ").Append(Path).Append("\n"); - return sb.ToString(); - } - - /// - /// Returns the object from JSON string - /// - /// FileReference object - public static FileReference 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. - /// - /// FileReference object - public virtual FileReference DuplicateFileReference() - { - return FromJson(this.ToJson()); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel Duplicate() - { - return DuplicateFileReference(); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override BaseReference DuplicateBaseReference() - { - return DuplicateFileReference(); - } - - /// - /// 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 FileReference); - } - - /// - /// Returns true if FileReference instances are equal - /// - /// Instance of FileReference to be compared - /// Boolean - public bool Equals(FileReference input) - { - if (input == null) - return false; - return base.Equals(input) && - ( - this.Path == input.Path || - (this.Path != null && - this.Path.Equals(input.Path)) - ) && 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.Path != null) - hashCode = hashCode * 59 + this.Path.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(@"^FileReference$", 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/FolderReference.cs b/src/PollinationSDK/Model/FolderReference.cs deleted file mode 100644 index fbd44b8d7..000000000 --- a/src/PollinationSDK/Model/FolderReference.cs +++ /dev/null @@ -1,209 +0,0 @@ -/* - * 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 -{ - /// - /// Reference to a folder. - /// - [DataContract(Name = "FolderReference")] - public partial class FolderReference : BaseReference, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected FolderReference() - { - // Set non-required readonly properties with defaultValue - this.Type = "FolderReference"; - } - - /// - /// Initializes a new instance of the class. - /// - /// Relative path to a folder. (required). - /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. - public FolderReference - ( - string path, // Required parameters - Dictionary annotations= default // Optional parameters - ) : base(annotations: annotations)// BaseClass - { - // to ensure "path" is required (not null) - this.Path = path ?? throw new ArgumentNullException("path is a required property for FolderReference and cannot be null"); - - // Set non-required readonly properties with defaultValue - this.Type = "FolderReference"; - } - - //============================================== is ReadOnly - /// - /// Gets or Sets Type - /// - [DataMember(Name = "type", EmitDefaultValue = true)] - public string Type { get; protected internal set; } = "FolderReference"; - - /// - /// Relative path to a folder. - /// - /// Relative path to a folder. - [DataMember(Name = "path", IsRequired = true, EmitDefaultValue = false)] - public string Path { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - return "FolderReference"; - } - - /// - /// 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("FolderReference:\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" Annotations: ").Append(Annotations).Append("\n"); - sb.Append(" Path: ").Append(Path).Append("\n"); - return sb.ToString(); - } - - /// - /// Returns the object from JSON string - /// - /// FolderReference object - public static FolderReference 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. - /// - /// FolderReference object - public virtual FolderReference DuplicateFolderReference() - { - return FromJson(this.ToJson()); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel Duplicate() - { - return DuplicateFolderReference(); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override BaseReference DuplicateBaseReference() - { - return DuplicateFolderReference(); - } - - /// - /// 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 FolderReference); - } - - /// - /// Returns true if FolderReference instances are equal - /// - /// Instance of FolderReference to be compared - /// Boolean - public bool Equals(FolderReference input) - { - if (input == null) - return false; - return base.Equals(input) && - ( - this.Path == input.Path || - (this.Path != null && - this.Path.Equals(input.Path)) - ) && 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.Path != null) - hashCode = hashCode * 59 + this.Path.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(@"^FolderReference$", 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/FromOutput.cs b/src/PollinationSDK/Model/FromOutput.cs deleted file mode 100644 index f12d9c3c8..000000000 --- a/src/PollinationSDK/Model/FromOutput.cs +++ /dev/null @@ -1,223 +0,0 @@ -/* - * 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 -{ - /// - /// Base class for output classes that source ``from`` an object. See DAG output classes for more examples. - /// - [DataContract(Name = "FromOutput")] - public partial class FromOutput : GenericOutput, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected FromOutput() - { - // Set non-required readonly properties with defaultValue - this.Type = "FromOutput"; - } - - /// - /// Initializes a new instance of the class. - /// - /// Reference to a file or a task output. Task output must be file. (required). - /// Output name. (required). - /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. - /// Optional description for output.. - public FromOutput - ( - string name, object from, // Required parameters - Dictionary annotations= default, string description= default // Optional parameters - ) : base(name: name, annotations: annotations, description: description)// BaseClass - { - // to ensure "from" is required (not null) - this.From = from ?? throw new ArgumentNullException("from is a required property for FromOutput and cannot be null"); - - // Set non-required readonly properties with defaultValue - this.Type = "FromOutput"; - } - - //============================================== is ReadOnly - /// - /// Gets or Sets Type - /// - [DataMember(Name = "type", EmitDefaultValue = true)] - public string Type { get; protected internal set; } = "FromOutput"; - - /// - /// Reference to a file or a task output. Task output must be file. - /// - /// Reference to a file or a task output. Task output must be file. - [DataMember(Name = "from", IsRequired = true, EmitDefaultValue = true)] - public object From { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - return "FromOutput"; - } - - /// - /// 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("FromOutput:\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" Annotations: ").Append(Annotations).Append("\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" From: ").Append(From).Append("\n"); - return sb.ToString(); - } - - /// - /// Returns the object from JSON string - /// - /// FromOutput object - public static FromOutput 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. - /// - /// FromOutput object - public virtual FromOutput DuplicateFromOutput() - { - return FromJson(this.ToJson()); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel Duplicate() - { - return DuplicateFromOutput(); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override GenericOutput DuplicateGenericOutput() - { - return DuplicateFromOutput(); - } - - /// - /// 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 FromOutput); - } - - /// - /// Returns true if FromOutput instances are equal - /// - /// Instance of FromOutput to be compared - /// Boolean - public bool Equals(FromOutput input) - { - if (input == null) - return false; - return base.Equals(input) && - ( - this.From == input.From || - (this.From != null && - this.From.Equals(input.From)) - ) && 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.From != null) - hashCode = hashCode * 59 + this.From.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(@"^FromOutput$", 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/Function.cs b/src/PollinationSDK/Model/Function.cs deleted file mode 100644 index 039d3a4d9..000000000 --- a/src/PollinationSDK/Model/Function.cs +++ /dev/null @@ -1,291 +0,0 @@ -/* - * 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 Function with a single command - /// - [DataContract(Name = "Function")] - public partial class Function : OpenAPIGenBaseModel, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected Function() - { - // Set non-required readonly properties with defaultValue - this.Type = "Function"; - } - - /// - /// 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). - /// 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 Function - ( - string name, string command, // 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 Function and cannot be null"); - // to ensure "command" is required (not null) - this.Command = command ?? throw new ArgumentNullException("command is a required property for Function 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 = "Function"; - } - - //============================================== is ReadOnly - /// - /// Gets or Sets Type - /// - [DataMember(Name = "type", EmitDefaultValue = true)] - public string Type { get; protected internal set; } = "Function"; - - /// - /// 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; } - /// - /// 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 "Function"; - } - - /// - /// 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("Function:\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" Command: ").Append(Command).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 - /// - /// Function object - public static Function 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. - /// - /// Function object - public virtual Function DuplicateFunction() - { - return FromJson(this.ToJson()); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel Duplicate() - { - return DuplicateFunction(); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel DuplicateOpenAPIGenBaseModel() - { - return DuplicateFunction(); - } - - /// - /// 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 Function); - } - - /// - /// Returns true if Function instances are equal - /// - /// Instance of Function to be compared - /// Boolean - public bool Equals(Function 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.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.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(@"^Function$", 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/FunctionArrayInput.cs b/src/PollinationSDK/Model/FunctionArrayInput.cs deleted file mode 100644 index 4a8e7110b..000000000 --- a/src/PollinationSDK/Model/FunctionArrayInput.cs +++ /dev/null @@ -1,273 +0,0 @@ -/* - * 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 JSON array input. You can add additional validation by defining a JSONSchema specification. See http://json-schema.org/understanding-json-schema/reference/array.html for more information. - /// - [DataContract(Name = "FunctionArrayInput")] - public partial class FunctionArrayInput : GenericInput, IEquatable, IValidatableObject - { - /// - /// Type of items in an array. All the items in an array must be from the same type. - /// - /// Type of items in an array. All the items in an array must be from the same type. - [DataMember(Name="items_type", EmitDefaultValue=false)] - public ItemType ItemsType { get; set; } = ItemType.String; - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected FunctionArrayInput() - { - // Set non-required readonly properties with defaultValue - this.Type = "FunctionArrayInput"; - } - - /// - /// Initializes a new instance of the class. - /// - /// Default value to use for an input if a value was not supplied.. - /// A list of aliases for this input in different platforms.. - /// A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. (default to false). - /// An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec.. - /// Type of items in an array. All the items in an array must be from the same type.. - /// Input name. (required). - /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. - /// Optional description for input.. - public FunctionArrayInput - ( - string name, // Required parameters - Dictionary annotations= default, string description= default, List _default= default, List> alias= default, bool required = false, Object spec= default, ItemType itemsType= ItemType.String // Optional parameters - ) : base(name: name, annotations: annotations, description: description)// BaseClass - { - this.Default = _default; - this.Alias = alias; - this.Required = required; - this.Spec = spec; - this.ItemsType = itemsType; - - // Set non-required readonly properties with defaultValue - this.Type = "FunctionArrayInput"; - } - - //============================================== is ReadOnly - /// - /// Gets or Sets Type - /// - [DataMember(Name = "type", EmitDefaultValue = true)] - public string Type { get; protected internal set; } = "FunctionArrayInput"; - - /// - /// Default value to use for an input if a value was not supplied. - /// - /// Default value to use for an input if a value was not supplied. - [DataMember(Name = "default", EmitDefaultValue = false)] - public List Default { get; set; } - /// - /// A list of aliases for this input in different platforms. - /// - /// A list of aliases for this input in different platforms. - [DataMember(Name = "alias", EmitDefaultValue = false)] - public List> Alias { get; set; } - /// - /// A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. - /// - /// A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. - [DataMember(Name = "required", EmitDefaultValue = true)] - public bool Required { get; set; } = false; - /// - /// An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec. - /// - /// An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec. - [DataMember(Name = "spec", EmitDefaultValue = false)] - public Object Spec { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - return "FunctionArrayInput"; - } - - /// - /// 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("FunctionArrayInput:\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" Annotations: ").Append(Annotations).Append("\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" Default: ").Append(Default).Append("\n"); - sb.Append(" Alias: ").Append(Alias).Append("\n"); - sb.Append(" Required: ").Append(Required).Append("\n"); - sb.Append(" Spec: ").Append(Spec).Append("\n"); - sb.Append(" ItemsType: ").Append(ItemsType).Append("\n"); - return sb.ToString(); - } - - /// - /// Returns the object from JSON string - /// - /// FunctionArrayInput object - public static FunctionArrayInput 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. - /// - /// FunctionArrayInput object - public virtual FunctionArrayInput DuplicateFunctionArrayInput() - { - return FromJson(this.ToJson()); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel Duplicate() - { - return DuplicateFunctionArrayInput(); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override GenericInput DuplicateGenericInput() - { - return DuplicateFunctionArrayInput(); - } - - /// - /// 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 FunctionArrayInput); - } - - /// - /// Returns true if FunctionArrayInput instances are equal - /// - /// Instance of FunctionArrayInput to be compared - /// Boolean - public bool Equals(FunctionArrayInput input) - { - if (input == null) - return false; - return base.Equals(input) && - ( - this.Default == input.Default || - this.Default != null && - input.Default != null && - this.Default.SequenceEqual(input.Default) - ) && base.Equals(input) && - ( - this.Alias == input.Alias || - this.Alias != null && - input.Alias != null && - this.Alias.SequenceEqual(input.Alias) - ) && base.Equals(input) && - ( - this.Required == input.Required || - (this.Required != null && - this.Required.Equals(input.Required)) - ) && base.Equals(input) && - ( - this.ItemsType == input.ItemsType || - (this.ItemsType != null && - this.ItemsType.Equals(input.ItemsType)) - ) && 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.Default != null) - hashCode = hashCode * 59 + this.Default.GetHashCode(); - if (this.Alias != null) - hashCode = hashCode * 59 + this.Alias.GetHashCode(); - if (this.Required != null) - hashCode = hashCode * 59 + this.Required.GetHashCode(); - if (this.Spec != null) - hashCode = hashCode * 59 + this.Spec.GetHashCode(); - if (this.ItemsType != null) - hashCode = hashCode * 59 + this.ItemsType.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(@"^FunctionArrayInput$", 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/FunctionArrayOutput.cs b/src/PollinationSDK/Model/FunctionArrayOutput.cs deleted file mode 100644 index 6adfe40ef..000000000 --- a/src/PollinationSDK/Model/FunctionArrayOutput.cs +++ /dev/null @@ -1,216 +0,0 @@ -/* - * 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 array output. This output loads the content from a JSON file which must be a JSON Array. - /// - [DataContract(Name = "FunctionArrayOutput")] - public partial class FunctionArrayOutput : FunctionStringOutput, IEquatable, IValidatableObject - { - /// - /// Type of items in this array. All the items in an array must be from the same type. - /// - /// Type of items in this array. All the items in an array must be from the same type. - [DataMember(Name="items_type", EmitDefaultValue=false)] - public ItemType ItemsType { get; set; } = ItemType.String; - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected FunctionArrayOutput() - { - // Set non-required readonly properties with defaultValue - this.Type = "FunctionArrayOutput"; - } - - /// - /// Initializes a new instance of the class. - /// - /// Type of items in this array. All the items in an array must be from the same type.. - /// Output name. (required). - /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. - /// Optional description for output.. - /// Path to the output artifact relative to where the function command is executed. (required). - /// A boolean to indicate if an artifact output is required. A False value makes the artifact optional. (default to true). - public FunctionArrayOutput - ( - string name, string path, // Required parameters - Dictionary annotations= default, string description= default, bool required = true, ItemType itemsType= ItemType.String // Optional parameters - ) : base(name: name, annotations: annotations, description: description, path: path, required: required)// BaseClass - { - this.ItemsType = itemsType; - - // Set non-required readonly properties with defaultValue - this.Type = "FunctionArrayOutput"; - } - - //============================================== is ReadOnly - /// - /// Gets or Sets Type - /// - [DataMember(Name = "type", EmitDefaultValue = true)] - public string Type { get; protected internal set; } = "FunctionArrayOutput"; - - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - return "FunctionArrayOutput"; - } - - /// - /// 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("FunctionArrayOutput:\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" Annotations: ").Append(Annotations).Append("\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" Path: ").Append(Path).Append("\n"); - sb.Append(" Required: ").Append(Required).Append("\n"); - sb.Append(" ItemsType: ").Append(ItemsType).Append("\n"); - return sb.ToString(); - } - - /// - /// Returns the object from JSON string - /// - /// FunctionArrayOutput object - public static FunctionArrayOutput 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. - /// - /// FunctionArrayOutput object - public virtual FunctionArrayOutput DuplicateFunctionArrayOutput() - { - return FromJson(this.ToJson()); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel Duplicate() - { - return DuplicateFunctionArrayOutput(); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override FunctionStringOutput DuplicateFunctionStringOutput() - { - return DuplicateFunctionArrayOutput(); - } - - /// - /// 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 FunctionArrayOutput); - } - - /// - /// Returns true if FunctionArrayOutput instances are equal - /// - /// Instance of FunctionArrayOutput to be compared - /// Boolean - public bool Equals(FunctionArrayOutput input) - { - if (input == null) - return false; - return base.Equals(input) && - ( - this.ItemsType == input.ItemsType || - (this.ItemsType != null && - this.ItemsType.Equals(input.ItemsType)) - ) && 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.ItemsType != null) - hashCode = hashCode * 59 + this.ItemsType.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(@"^FunctionArrayOutput$", 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/FunctionBooleanInput.cs b/src/PollinationSDK/Model/FunctionBooleanInput.cs deleted file mode 100644 index 97ad71975..000000000 --- a/src/PollinationSDK/Model/FunctionBooleanInput.cs +++ /dev/null @@ -1,256 +0,0 @@ -/* - * 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 boolean type matches only two special values: True and False. Note that values that evaluate to true or false, such as 1 and 0, are not accepted. You can add additional validation by defining a JSONSchema specification. See http://json-schema.org/understanding-json-schema/reference/boolean.html for more information. - /// - [DataContract(Name = "FunctionBooleanInput")] - public partial class FunctionBooleanInput : GenericInput, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected FunctionBooleanInput() - { - // Set non-required readonly properties with defaultValue - this.Type = "FunctionBooleanInput"; - } - - /// - /// Initializes a new instance of the class. - /// - /// Default value to use for an input if a value was not supplied.. - /// A list of aliases for this input in different platforms.. - /// A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. (default to false). - /// An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec.. - /// Input name. (required). - /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. - /// Optional description for input.. - public FunctionBooleanInput - ( - string name, // Required parameters - Dictionary annotations= default, string description= default, bool _default= default, List> alias= default, bool required = false, Object spec= default // Optional parameters - ) : base(name: name, annotations: annotations, description: description)// BaseClass - { - this.Default = _default; - this.Alias = alias; - this.Required = required; - this.Spec = spec; - - // Set non-required readonly properties with defaultValue - this.Type = "FunctionBooleanInput"; - } - - //============================================== is ReadOnly - /// - /// Gets or Sets Type - /// - [DataMember(Name = "type", EmitDefaultValue = true)] - public string Type { get; protected internal set; } = "FunctionBooleanInput"; - - /// - /// Default value to use for an input if a value was not supplied. - /// - /// Default value to use for an input if a value was not supplied. - [DataMember(Name = "default", EmitDefaultValue = false)] - public bool Default { get; set; } - /// - /// A list of aliases for this input in different platforms. - /// - /// A list of aliases for this input in different platforms. - [DataMember(Name = "alias", EmitDefaultValue = false)] - public List> Alias { get; set; } - /// - /// A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. - /// - /// A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. - [DataMember(Name = "required", EmitDefaultValue = true)] - public bool Required { get; set; } = false; - /// - /// An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec. - /// - /// An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec. - [DataMember(Name = "spec", EmitDefaultValue = false)] - public Object Spec { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - return "FunctionBooleanInput"; - } - - /// - /// 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("FunctionBooleanInput:\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" Annotations: ").Append(Annotations).Append("\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" Default: ").Append(Default).Append("\n"); - sb.Append(" Alias: ").Append(Alias).Append("\n"); - sb.Append(" Required: ").Append(Required).Append("\n"); - sb.Append(" Spec: ").Append(Spec).Append("\n"); - return sb.ToString(); - } - - /// - /// Returns the object from JSON string - /// - /// FunctionBooleanInput object - public static FunctionBooleanInput 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. - /// - /// FunctionBooleanInput object - public virtual FunctionBooleanInput DuplicateFunctionBooleanInput() - { - return FromJson(this.ToJson()); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel Duplicate() - { - return DuplicateFunctionBooleanInput(); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override GenericInput DuplicateGenericInput() - { - return DuplicateFunctionBooleanInput(); - } - - /// - /// 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 FunctionBooleanInput); - } - - /// - /// Returns true if FunctionBooleanInput instances are equal - /// - /// Instance of FunctionBooleanInput to be compared - /// Boolean - public bool Equals(FunctionBooleanInput input) - { - if (input == null) - return false; - return base.Equals(input) && - ( - this.Default == input.Default || - (this.Default != null && - this.Default.Equals(input.Default)) - ) && base.Equals(input) && - ( - this.Alias == input.Alias || - this.Alias != null && - input.Alias != null && - this.Alias.SequenceEqual(input.Alias) - ) && base.Equals(input) && - ( - this.Required == input.Required || - (this.Required != null && - this.Required.Equals(input.Required)) - ) && 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.Default != null) - hashCode = hashCode * 59 + this.Default.GetHashCode(); - if (this.Alias != null) - hashCode = hashCode * 59 + this.Alias.GetHashCode(); - if (this.Required != null) - hashCode = hashCode * 59 + this.Required.GetHashCode(); - if (this.Spec != null) - hashCode = hashCode * 59 + this.Spec.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(@"^FunctionBooleanInput$", 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/FunctionBooleanOutput.cs b/src/PollinationSDK/Model/FunctionBooleanOutput.cs deleted file mode 100644 index 8ca2c0492..000000000 --- a/src/PollinationSDK/Model/FunctionBooleanOutput.cs +++ /dev/null @@ -1,210 +0,0 @@ -/* - * 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 boolean output. This output loads the content from a file as a boolean. - /// - [DataContract(Name = "FunctionBooleanOutput")] - public partial class FunctionBooleanOutput : FunctionStringOutput, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected FunctionBooleanOutput() - { - // Set non-required readonly properties with defaultValue - this.Type = "FunctionBooleanOutput"; - } - - /// - /// Initializes a new instance of the class. - /// - /// Output name. (required). - /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. - /// Optional description for output.. - /// Path to the output artifact relative to where the function command is executed. (required). - /// A boolean to indicate if an artifact output is required. A False value makes the artifact optional. (default to true). - public FunctionBooleanOutput - ( - string name, string path, // Required parameters - Dictionary annotations= default, string description= default, bool required = true // Optional parameters - ) : base(name: name, annotations: annotations, description: description, path: path, required: required)// BaseClass - { - - // Set non-required readonly properties with defaultValue - this.Type = "FunctionBooleanOutput"; - } - - //============================================== is ReadOnly - /// - /// Gets or Sets Type - /// - [DataMember(Name = "type", EmitDefaultValue = true)] - public string Type { get; protected internal set; } = "FunctionBooleanOutput"; - - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - return "FunctionBooleanOutput"; - } - - /// - /// 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("FunctionBooleanOutput:\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" Annotations: ").Append(Annotations).Append("\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" Path: ").Append(Path).Append("\n"); - sb.Append(" Required: ").Append(Required).Append("\n"); - return sb.ToString(); - } - - /// - /// Returns the object from JSON string - /// - /// FunctionBooleanOutput object - public static FunctionBooleanOutput 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. - /// - /// FunctionBooleanOutput object - public virtual FunctionBooleanOutput DuplicateFunctionBooleanOutput() - { - return FromJson(this.ToJson()); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel Duplicate() - { - return DuplicateFunctionBooleanOutput(); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override FunctionStringOutput DuplicateFunctionStringOutput() - { - return DuplicateFunctionBooleanOutput(); - } - - /// - /// 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 FunctionBooleanOutput); - } - - /// - /// Returns true if FunctionBooleanOutput instances are equal - /// - /// Instance of FunctionBooleanOutput to be compared - /// Boolean - public bool Equals(FunctionBooleanOutput 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(@"^FunctionBooleanOutput$", 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/FunctionFileInput.cs b/src/PollinationSDK/Model/FunctionFileInput.cs deleted file mode 100644 index 644a887f0..000000000 --- a/src/PollinationSDK/Model/FunctionFileInput.cs +++ /dev/null @@ -1,290 +0,0 @@ -/* - * 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 file input. File is a special string input. Unlike other string inputs, a file will be copied from its location to execution folder when a workflow is executed. You can add additional validation by defining a JSONSchema specification. See http://json-schema.org/understanding-json-schema/reference/string.html#string for more information. .. code-block:: python # a file with maximum 50 characters with an ``epw`` extension. \"schema\": { \"type\": \"string\", \"maxLength\": 50, \"pattern\": \"(?i)(^.*\\.epw$)\" } - /// - [DataContract(Name = "FunctionFileInput")] - public partial class FunctionFileInput : GenericInput, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected FunctionFileInput() - { - // Set non-required readonly properties with defaultValue - this.Type = "FunctionFileInput"; - } - - /// - /// Initializes a new instance of the class. - /// - /// 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. (required). - /// The default source for file if the value is not provided.. - /// A list of aliases for this input in different platforms.. - /// A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. (default to false). - /// An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec.. - /// Optional list of extensions for file. The check for extension is case-insensitive.. - /// Input name. (required). - /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. - /// Optional description for input.. - public FunctionFileInput - ( - string name, string path, // Required parameters - Dictionary annotations= default, string description= default, AnyOf _default= default, List> alias= default, bool required = false, Object spec= default, List extensions= default // Optional parameters - ) : base(name: name, annotations: annotations, description: description)// BaseClass - { - // to ensure "path" is required (not null) - this.Path = path ?? throw new ArgumentNullException("path is a required property for FunctionFileInput and cannot be null"); - this.Default = _default; - this.Alias = alias; - this.Required = required; - this.Spec = spec; - this.Extensions = extensions; - - // Set non-required readonly properties with defaultValue - this.Type = "FunctionFileInput"; - } - - //============================================== is ReadOnly - /// - /// Gets or Sets Type - /// - [DataMember(Name = "type", EmitDefaultValue = true)] - public string Type { get; protected internal set; } = "FunctionFileInput"; - - /// - /// 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. - /// - /// 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. - [DataMember(Name = "path", IsRequired = true, EmitDefaultValue = false)] - public string Path { get; set; } - /// - /// The default source for file if the value is not provided. - /// - /// The default source for file if the value is not provided. - [DataMember(Name = "default", EmitDefaultValue = false)] - public AnyOf Default { get; set; } - /// - /// A list of aliases for this input in different platforms. - /// - /// A list of aliases for this input in different platforms. - [DataMember(Name = "alias", EmitDefaultValue = false)] - public List> Alias { get; set; } - /// - /// A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. - /// - /// A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. - [DataMember(Name = "required", EmitDefaultValue = true)] - public bool Required { get; set; } = false; - /// - /// An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec. - /// - /// An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec. - [DataMember(Name = "spec", EmitDefaultValue = false)] - public Object Spec { get; set; } - /// - /// Optional list of extensions for file. The check for extension is case-insensitive. - /// - /// Optional list of extensions for file. The check for extension is case-insensitive. - [DataMember(Name = "extensions", EmitDefaultValue = false)] - public List Extensions { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - return "FunctionFileInput"; - } - - /// - /// 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("FunctionFileInput:\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" Annotations: ").Append(Annotations).Append("\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" Path: ").Append(Path).Append("\n"); - sb.Append(" Default: ").Append(Default).Append("\n"); - sb.Append(" Alias: ").Append(Alias).Append("\n"); - sb.Append(" Required: ").Append(Required).Append("\n"); - sb.Append(" Spec: ").Append(Spec).Append("\n"); - sb.Append(" Extensions: ").Append(Extensions).Append("\n"); - return sb.ToString(); - } - - /// - /// Returns the object from JSON string - /// - /// FunctionFileInput object - public static FunctionFileInput 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. - /// - /// FunctionFileInput object - public virtual FunctionFileInput DuplicateFunctionFileInput() - { - return FromJson(this.ToJson()); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel Duplicate() - { - return DuplicateFunctionFileInput(); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override GenericInput DuplicateGenericInput() - { - return DuplicateFunctionFileInput(); - } - - /// - /// 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 FunctionFileInput); - } - - /// - /// Returns true if FunctionFileInput instances are equal - /// - /// Instance of FunctionFileInput to be compared - /// Boolean - public bool Equals(FunctionFileInput input) - { - if (input == null) - return false; - return base.Equals(input) && - ( - this.Path == input.Path || - (this.Path != null && - this.Path.Equals(input.Path)) - ) && base.Equals(input) && - ( - this.Default == input.Default || - (this.Default != null && - this.Default.Equals(input.Default)) - ) && base.Equals(input) && - ( - this.Alias == input.Alias || - this.Alias != null && - input.Alias != null && - this.Alias.SequenceEqual(input.Alias) - ) && base.Equals(input) && - ( - this.Required == input.Required || - (this.Required != null && - this.Required.Equals(input.Required)) - ) && base.Equals(input) && - ( - this.Extensions == input.Extensions || - this.Extensions != null && - input.Extensions != null && - this.Extensions.SequenceEqual(input.Extensions) - ) && 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.Path != null) - hashCode = hashCode * 59 + this.Path.GetHashCode(); - if (this.Default != null) - hashCode = hashCode * 59 + this.Default.GetHashCode(); - if (this.Alias != null) - hashCode = hashCode * 59 + this.Alias.GetHashCode(); - if (this.Required != null) - hashCode = hashCode * 59 + this.Required.GetHashCode(); - if (this.Spec != null) - hashCode = hashCode * 59 + this.Spec.GetHashCode(); - if (this.Extensions != null) - hashCode = hashCode * 59 + this.Extensions.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(@"^FunctionFileInput$", 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/FunctionFileOutput.cs b/src/PollinationSDK/Model/FunctionFileOutput.cs deleted file mode 100644 index b151defb5..000000000 --- a/src/PollinationSDK/Model/FunctionFileOutput.cs +++ /dev/null @@ -1,210 +0,0 @@ -/* - * 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 File output. - /// - [DataContract(Name = "FunctionFileOutput")] - public partial class FunctionFileOutput : PathOutput, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected FunctionFileOutput() - { - // Set non-required readonly properties with defaultValue - this.Type = "FunctionFileOutput"; - } - - /// - /// Initializes a new instance of the class. - /// - /// Output name. (required). - /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. - /// Optional description for output.. - /// Path to the output artifact relative to where the function command is executed. (required). - /// A boolean to indicate if an artifact output is required. A False value makes the artifact optional. (default to true). - public FunctionFileOutput - ( - string name, string path, // Required parameters - Dictionary annotations= default, string description= default, bool required = true // Optional parameters - ) : base(name: name, annotations: annotations, description: description, path: path, required: required)// BaseClass - { - - // Set non-required readonly properties with defaultValue - this.Type = "FunctionFileOutput"; - } - - //============================================== is ReadOnly - /// - /// Gets or Sets Type - /// - [DataMember(Name = "type", EmitDefaultValue = true)] - public string Type { get; protected internal set; } = "FunctionFileOutput"; - - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - return "FunctionFileOutput"; - } - - /// - /// 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("FunctionFileOutput:\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" Annotations: ").Append(Annotations).Append("\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" Path: ").Append(Path).Append("\n"); - sb.Append(" Required: ").Append(Required).Append("\n"); - return sb.ToString(); - } - - /// - /// Returns the object from JSON string - /// - /// FunctionFileOutput object - public static FunctionFileOutput 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. - /// - /// FunctionFileOutput object - public virtual FunctionFileOutput DuplicateFunctionFileOutput() - { - return FromJson(this.ToJson()); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel Duplicate() - { - return DuplicateFunctionFileOutput(); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override PathOutput DuplicatePathOutput() - { - return DuplicateFunctionFileOutput(); - } - - /// - /// 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 FunctionFileOutput); - } - - /// - /// Returns true if FunctionFileOutput instances are equal - /// - /// Instance of FunctionFileOutput to be compared - /// Boolean - public bool Equals(FunctionFileOutput 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(@"^FunctionFileOutput$", 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/FunctionFolderInput.cs b/src/PollinationSDK/Model/FunctionFolderInput.cs deleted file mode 100644 index 1b49bfcc2..000000000 --- a/src/PollinationSDK/Model/FunctionFolderInput.cs +++ /dev/null @@ -1,273 +0,0 @@ -/* - * 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 folder input. Folder is a special string input. Unlike other string inputs, a folder will be copied from its location to execution folder when a workflow is executed. You can add additional validation by defining a JSONSchema specification. See http://json-schema.org/understanding-json-schema/reference/string.html#string for more information. .. code-block:: python \"schema\": { \"type\": \"string\", \"maxLength\": 50, } - /// - [DataContract(Name = "FunctionFolderInput")] - public partial class FunctionFolderInput : GenericInput, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected FunctionFolderInput() - { - // Set non-required readonly properties with defaultValue - this.Type = "FunctionFolderInput"; - } - - /// - /// Initializes a new instance of the class. - /// - /// 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. (required). - /// The default source for file if the value is not provided.. - /// A list of aliases for this input in different platforms.. - /// A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. (default to false). - /// An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec.. - /// Input name. (required). - /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. - /// Optional description for input.. - public FunctionFolderInput - ( - string name, string path, // Required parameters - Dictionary annotations= default, string description= default, AnyOf _default= default, List> alias= default, bool required = false, Object spec= default // Optional parameters - ) : base(name: name, annotations: annotations, description: description)// BaseClass - { - // to ensure "path" is required (not null) - this.Path = path ?? throw new ArgumentNullException("path is a required property for FunctionFolderInput and cannot be null"); - this.Default = _default; - this.Alias = alias; - this.Required = required; - this.Spec = spec; - - // Set non-required readonly properties with defaultValue - this.Type = "FunctionFolderInput"; - } - - //============================================== is ReadOnly - /// - /// Gets or Sets Type - /// - [DataMember(Name = "type", EmitDefaultValue = true)] - public string Type { get; protected internal set; } = "FunctionFolderInput"; - - /// - /// 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. - /// - /// 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. - [DataMember(Name = "path", IsRequired = true, EmitDefaultValue = false)] - public string Path { get; set; } - /// - /// The default source for file if the value is not provided. - /// - /// The default source for file if the value is not provided. - [DataMember(Name = "default", EmitDefaultValue = false)] - public AnyOf Default { get; set; } - /// - /// A list of aliases for this input in different platforms. - /// - /// A list of aliases for this input in different platforms. - [DataMember(Name = "alias", EmitDefaultValue = false)] - public List> Alias { get; set; } - /// - /// A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. - /// - /// A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. - [DataMember(Name = "required", EmitDefaultValue = true)] - public bool Required { get; set; } = false; - /// - /// An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec. - /// - /// An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec. - [DataMember(Name = "spec", EmitDefaultValue = false)] - public Object Spec { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - return "FunctionFolderInput"; - } - - /// - /// 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("FunctionFolderInput:\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" Annotations: ").Append(Annotations).Append("\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" Path: ").Append(Path).Append("\n"); - sb.Append(" Default: ").Append(Default).Append("\n"); - sb.Append(" Alias: ").Append(Alias).Append("\n"); - sb.Append(" Required: ").Append(Required).Append("\n"); - sb.Append(" Spec: ").Append(Spec).Append("\n"); - return sb.ToString(); - } - - /// - /// Returns the object from JSON string - /// - /// FunctionFolderInput object - public static FunctionFolderInput 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. - /// - /// FunctionFolderInput object - public virtual FunctionFolderInput DuplicateFunctionFolderInput() - { - return FromJson(this.ToJson()); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel Duplicate() - { - return DuplicateFunctionFolderInput(); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override GenericInput DuplicateGenericInput() - { - return DuplicateFunctionFolderInput(); - } - - /// - /// 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 FunctionFolderInput); - } - - /// - /// Returns true if FunctionFolderInput instances are equal - /// - /// Instance of FunctionFolderInput to be compared - /// Boolean - public bool Equals(FunctionFolderInput input) - { - if (input == null) - return false; - return base.Equals(input) && - ( - this.Path == input.Path || - (this.Path != null && - this.Path.Equals(input.Path)) - ) && base.Equals(input) && - ( - this.Default == input.Default || - (this.Default != null && - this.Default.Equals(input.Default)) - ) && base.Equals(input) && - ( - this.Alias == input.Alias || - this.Alias != null && - input.Alias != null && - this.Alias.SequenceEqual(input.Alias) - ) && base.Equals(input) && - ( - this.Required == input.Required || - (this.Required != null && - this.Required.Equals(input.Required)) - ) && 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.Path != null) - hashCode = hashCode * 59 + this.Path.GetHashCode(); - if (this.Default != null) - hashCode = hashCode * 59 + this.Default.GetHashCode(); - if (this.Alias != null) - hashCode = hashCode * 59 + this.Alias.GetHashCode(); - if (this.Required != null) - hashCode = hashCode * 59 + this.Required.GetHashCode(); - if (this.Spec != null) - hashCode = hashCode * 59 + this.Spec.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(@"^FunctionFolderInput$", 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/FunctionFolderOutput.cs b/src/PollinationSDK/Model/FunctionFolderOutput.cs deleted file mode 100644 index a7ec4028b..000000000 --- a/src/PollinationSDK/Model/FunctionFolderOutput.cs +++ /dev/null @@ -1,210 +0,0 @@ -/* - * 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 Folder output. - /// - [DataContract(Name = "FunctionFolderOutput")] - public partial class FunctionFolderOutput : PathOutput, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected FunctionFolderOutput() - { - // Set non-required readonly properties with defaultValue - this.Type = "FunctionFolderOutput"; - } - - /// - /// Initializes a new instance of the class. - /// - /// Output name. (required). - /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. - /// Optional description for output.. - /// Path to the output artifact relative to where the function command is executed. (required). - /// A boolean to indicate if an artifact output is required. A False value makes the artifact optional. (default to true). - public FunctionFolderOutput - ( - string name, string path, // Required parameters - Dictionary annotations= default, string description= default, bool required = true // Optional parameters - ) : base(name: name, annotations: annotations, description: description, path: path, required: required)// BaseClass - { - - // Set non-required readonly properties with defaultValue - this.Type = "FunctionFolderOutput"; - } - - //============================================== is ReadOnly - /// - /// Gets or Sets Type - /// - [DataMember(Name = "type", EmitDefaultValue = true)] - public string Type { get; protected internal set; } = "FunctionFolderOutput"; - - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - return "FunctionFolderOutput"; - } - - /// - /// 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("FunctionFolderOutput:\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" Annotations: ").Append(Annotations).Append("\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" Path: ").Append(Path).Append("\n"); - sb.Append(" Required: ").Append(Required).Append("\n"); - return sb.ToString(); - } - - /// - /// Returns the object from JSON string - /// - /// FunctionFolderOutput object - public static FunctionFolderOutput 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. - /// - /// FunctionFolderOutput object - public virtual FunctionFolderOutput DuplicateFunctionFolderOutput() - { - return FromJson(this.ToJson()); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel Duplicate() - { - return DuplicateFunctionFolderOutput(); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override PathOutput DuplicatePathOutput() - { - return DuplicateFunctionFolderOutput(); - } - - /// - /// 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 FunctionFolderOutput); - } - - /// - /// Returns true if FunctionFolderOutput instances are equal - /// - /// Instance of FunctionFolderOutput to be compared - /// Boolean - public bool Equals(FunctionFolderOutput 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(@"^FunctionFolderOutput$", 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/FunctionIntegerInput.cs b/src/PollinationSDK/Model/FunctionIntegerInput.cs deleted file mode 100644 index 070e8f463..000000000 --- a/src/PollinationSDK/Model/FunctionIntegerInput.cs +++ /dev/null @@ -1,256 +0,0 @@ -/* - * 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 integer input. You can add additional validation by defining a JSONSchema specification. See http://json-schema.org/understanding-json-schema/reference/numeric.html#numeric for more information. - /// - [DataContract(Name = "FunctionIntegerInput")] - public partial class FunctionIntegerInput : GenericInput, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected FunctionIntegerInput() - { - // Set non-required readonly properties with defaultValue - this.Type = "FunctionIntegerInput"; - } - - /// - /// Initializes a new instance of the class. - /// - /// Default value to use for an input if a value was not supplied.. - /// A list of aliases for this input in different platforms.. - /// A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. (default to false). - /// An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec.. - /// Input name. (required). - /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. - /// Optional description for input.. - public FunctionIntegerInput - ( - string name, // Required parameters - Dictionary annotations= default, string description= default, int _default= default, List> alias= default, bool required = false, Object spec= default // Optional parameters - ) : base(name: name, annotations: annotations, description: description)// BaseClass - { - this.Default = _default; - this.Alias = alias; - this.Required = required; - this.Spec = spec; - - // Set non-required readonly properties with defaultValue - this.Type = "FunctionIntegerInput"; - } - - //============================================== is ReadOnly - /// - /// Gets or Sets Type - /// - [DataMember(Name = "type", EmitDefaultValue = true)] - public string Type { get; protected internal set; } = "FunctionIntegerInput"; - - /// - /// Default value to use for an input if a value was not supplied. - /// - /// Default value to use for an input if a value was not supplied. - [DataMember(Name = "default", EmitDefaultValue = false)] - public int Default { get; set; } - /// - /// A list of aliases for this input in different platforms. - /// - /// A list of aliases for this input in different platforms. - [DataMember(Name = "alias", EmitDefaultValue = false)] - public List> Alias { get; set; } - /// - /// A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. - /// - /// A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. - [DataMember(Name = "required", EmitDefaultValue = true)] - public bool Required { get; set; } = false; - /// - /// An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec. - /// - /// An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec. - [DataMember(Name = "spec", EmitDefaultValue = false)] - public Object Spec { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - return "FunctionIntegerInput"; - } - - /// - /// 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("FunctionIntegerInput:\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" Annotations: ").Append(Annotations).Append("\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" Default: ").Append(Default).Append("\n"); - sb.Append(" Alias: ").Append(Alias).Append("\n"); - sb.Append(" Required: ").Append(Required).Append("\n"); - sb.Append(" Spec: ").Append(Spec).Append("\n"); - return sb.ToString(); - } - - /// - /// Returns the object from JSON string - /// - /// FunctionIntegerInput object - public static FunctionIntegerInput 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. - /// - /// FunctionIntegerInput object - public virtual FunctionIntegerInput DuplicateFunctionIntegerInput() - { - return FromJson(this.ToJson()); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel Duplicate() - { - return DuplicateFunctionIntegerInput(); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override GenericInput DuplicateGenericInput() - { - return DuplicateFunctionIntegerInput(); - } - - /// - /// 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 FunctionIntegerInput); - } - - /// - /// Returns true if FunctionIntegerInput instances are equal - /// - /// Instance of FunctionIntegerInput to be compared - /// Boolean - public bool Equals(FunctionIntegerInput input) - { - if (input == null) - return false; - return base.Equals(input) && - ( - this.Default == input.Default || - (this.Default != null && - this.Default.Equals(input.Default)) - ) && base.Equals(input) && - ( - this.Alias == input.Alias || - this.Alias != null && - input.Alias != null && - this.Alias.SequenceEqual(input.Alias) - ) && base.Equals(input) && - ( - this.Required == input.Required || - (this.Required != null && - this.Required.Equals(input.Required)) - ) && 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.Default != null) - hashCode = hashCode * 59 + this.Default.GetHashCode(); - if (this.Alias != null) - hashCode = hashCode * 59 + this.Alias.GetHashCode(); - if (this.Required != null) - hashCode = hashCode * 59 + this.Required.GetHashCode(); - if (this.Spec != null) - hashCode = hashCode * 59 + this.Spec.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(@"^FunctionIntegerInput$", 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/FunctionIntegerOutput.cs b/src/PollinationSDK/Model/FunctionIntegerOutput.cs deleted file mode 100644 index 7d36d64d4..000000000 --- a/src/PollinationSDK/Model/FunctionIntegerOutput.cs +++ /dev/null @@ -1,210 +0,0 @@ -/* - * 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 integer output. This output loads the content from a file as an integer. - /// - [DataContract(Name = "FunctionIntegerOutput")] - public partial class FunctionIntegerOutput : FunctionStringOutput, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected FunctionIntegerOutput() - { - // Set non-required readonly properties with defaultValue - this.Type = "FunctionIntegerOutput"; - } - - /// - /// Initializes a new instance of the class. - /// - /// Output name. (required). - /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. - /// Optional description for output.. - /// Path to the output artifact relative to where the function command is executed. (required). - /// A boolean to indicate if an artifact output is required. A False value makes the artifact optional. (default to true). - public FunctionIntegerOutput - ( - string name, string path, // Required parameters - Dictionary annotations= default, string description= default, bool required = true // Optional parameters - ) : base(name: name, annotations: annotations, description: description, path: path, required: required)// BaseClass - { - - // Set non-required readonly properties with defaultValue - this.Type = "FunctionIntegerOutput"; - } - - //============================================== is ReadOnly - /// - /// Gets or Sets Type - /// - [DataMember(Name = "type", EmitDefaultValue = true)] - public string Type { get; protected internal set; } = "FunctionIntegerOutput"; - - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - return "FunctionIntegerOutput"; - } - - /// - /// 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("FunctionIntegerOutput:\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" Annotations: ").Append(Annotations).Append("\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" Path: ").Append(Path).Append("\n"); - sb.Append(" Required: ").Append(Required).Append("\n"); - return sb.ToString(); - } - - /// - /// Returns the object from JSON string - /// - /// FunctionIntegerOutput object - public static FunctionIntegerOutput 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. - /// - /// FunctionIntegerOutput object - public virtual FunctionIntegerOutput DuplicateFunctionIntegerOutput() - { - return FromJson(this.ToJson()); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel Duplicate() - { - return DuplicateFunctionIntegerOutput(); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override FunctionStringOutput DuplicateFunctionStringOutput() - { - return DuplicateFunctionIntegerOutput(); - } - - /// - /// 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 FunctionIntegerOutput); - } - - /// - /// Returns true if FunctionIntegerOutput instances are equal - /// - /// Instance of FunctionIntegerOutput to be compared - /// Boolean - public bool Equals(FunctionIntegerOutput 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(@"^FunctionIntegerOutput$", 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/FunctionJSONObjectInput.cs b/src/PollinationSDK/Model/FunctionJSONObjectInput.cs deleted file mode 100644 index c22c84fa8..000000000 --- a/src/PollinationSDK/Model/FunctionJSONObjectInput.cs +++ /dev/null @@ -1,256 +0,0 @@ -/* - * 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 JSON object input. JSON objects are similar to Python dictionaries. You can add additional validation by defining a JSONSchema specification. See http://json-schema.org/understanding-json-schema/reference/object.html for more information. - /// - [DataContract(Name = "FunctionJSONObjectInput")] - public partial class FunctionJSONObjectInput : GenericInput, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected FunctionJSONObjectInput() - { - // Set non-required readonly properties with defaultValue - this.Type = "FunctionJSONObjectInput"; - } - - /// - /// Initializes a new instance of the class. - /// - /// Default value to use for an input if a value was not supplied.. - /// A list of aliases for this input in different platforms.. - /// A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. (default to false). - /// An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec.. - /// Input name. (required). - /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. - /// Optional description for input.. - public FunctionJSONObjectInput - ( - string name, // Required parameters - Dictionary annotations= default, string description= default, Object _default= default, List> alias= default, bool required = false, Object spec= default // Optional parameters - ) : base(name: name, annotations: annotations, description: description)// BaseClass - { - this.Default = _default; - this.Alias = alias; - this.Required = required; - this.Spec = spec; - - // Set non-required readonly properties with defaultValue - this.Type = "FunctionJSONObjectInput"; - } - - //============================================== is ReadOnly - /// - /// Gets or Sets Type - /// - [DataMember(Name = "type", EmitDefaultValue = true)] - public string Type { get; protected internal set; } = "FunctionJSONObjectInput"; - - /// - /// Default value to use for an input if a value was not supplied. - /// - /// Default value to use for an input if a value was not supplied. - [DataMember(Name = "default", EmitDefaultValue = false)] - public Object Default { get; set; } - /// - /// A list of aliases for this input in different platforms. - /// - /// A list of aliases for this input in different platforms. - [DataMember(Name = "alias", EmitDefaultValue = false)] - public List> Alias { get; set; } - /// - /// A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. - /// - /// A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. - [DataMember(Name = "required", EmitDefaultValue = true)] - public bool Required { get; set; } = false; - /// - /// An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec. - /// - /// An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec. - [DataMember(Name = "spec", EmitDefaultValue = false)] - public Object Spec { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - return "FunctionJSONObjectInput"; - } - - /// - /// 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("FunctionJSONObjectInput:\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" Annotations: ").Append(Annotations).Append("\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" Default: ").Append(Default).Append("\n"); - sb.Append(" Alias: ").Append(Alias).Append("\n"); - sb.Append(" Required: ").Append(Required).Append("\n"); - sb.Append(" Spec: ").Append(Spec).Append("\n"); - return sb.ToString(); - } - - /// - /// Returns the object from JSON string - /// - /// FunctionJSONObjectInput object - public static FunctionJSONObjectInput 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. - /// - /// FunctionJSONObjectInput object - public virtual FunctionJSONObjectInput DuplicateFunctionJSONObjectInput() - { - return FromJson(this.ToJson()); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel Duplicate() - { - return DuplicateFunctionJSONObjectInput(); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override GenericInput DuplicateGenericInput() - { - return DuplicateFunctionJSONObjectInput(); - } - - /// - /// 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 FunctionJSONObjectInput); - } - - /// - /// Returns true if FunctionJSONObjectInput instances are equal - /// - /// Instance of FunctionJSONObjectInput to be compared - /// Boolean - public bool Equals(FunctionJSONObjectInput input) - { - if (input == null) - return false; - return base.Equals(input) && - ( - this.Default == input.Default || - (this.Default != null && - this.Default.Equals(input.Default)) - ) && base.Equals(input) && - ( - this.Alias == input.Alias || - this.Alias != null && - input.Alias != null && - this.Alias.SequenceEqual(input.Alias) - ) && base.Equals(input) && - ( - this.Required == input.Required || - (this.Required != null && - this.Required.Equals(input.Required)) - ) && 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.Default != null) - hashCode = hashCode * 59 + this.Default.GetHashCode(); - if (this.Alias != null) - hashCode = hashCode * 59 + this.Alias.GetHashCode(); - if (this.Required != null) - hashCode = hashCode * 59 + this.Required.GetHashCode(); - if (this.Spec != null) - hashCode = hashCode * 59 + this.Spec.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(@"^FunctionJSONObjectInput$", 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/FunctionJSONObjectOutput.cs b/src/PollinationSDK/Model/FunctionJSONObjectOutput.cs deleted file mode 100644 index e00804540..000000000 --- a/src/PollinationSDK/Model/FunctionJSONObjectOutput.cs +++ /dev/null @@ -1,210 +0,0 @@ -/* - * 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 object output. This output loads the content from a file as a JSON object. - /// - [DataContract(Name = "FunctionJSONObjectOutput")] - public partial class FunctionJSONObjectOutput : FunctionStringOutput, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected FunctionJSONObjectOutput() - { - // Set non-required readonly properties with defaultValue - this.Type = "FunctionJSONObjectOutput"; - } - - /// - /// Initializes a new instance of the class. - /// - /// Output name. (required). - /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. - /// Optional description for output.. - /// Path to the output artifact relative to where the function command is executed. (required). - /// A boolean to indicate if an artifact output is required. A False value makes the artifact optional. (default to true). - public FunctionJSONObjectOutput - ( - string name, string path, // Required parameters - Dictionary annotations= default, string description= default, bool required = true // Optional parameters - ) : base(name: name, annotations: annotations, description: description, path: path, required: required)// BaseClass - { - - // Set non-required readonly properties with defaultValue - this.Type = "FunctionJSONObjectOutput"; - } - - //============================================== is ReadOnly - /// - /// Gets or Sets Type - /// - [DataMember(Name = "type", EmitDefaultValue = true)] - public string Type { get; protected internal set; } = "FunctionJSONObjectOutput"; - - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - return "FunctionJSONObjectOutput"; - } - - /// - /// 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("FunctionJSONObjectOutput:\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" Annotations: ").Append(Annotations).Append("\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" Path: ").Append(Path).Append("\n"); - sb.Append(" Required: ").Append(Required).Append("\n"); - return sb.ToString(); - } - - /// - /// Returns the object from JSON string - /// - /// FunctionJSONObjectOutput object - public static FunctionJSONObjectOutput 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. - /// - /// FunctionJSONObjectOutput object - public virtual FunctionJSONObjectOutput DuplicateFunctionJSONObjectOutput() - { - return FromJson(this.ToJson()); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel Duplicate() - { - return DuplicateFunctionJSONObjectOutput(); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override FunctionStringOutput DuplicateFunctionStringOutput() - { - return DuplicateFunctionJSONObjectOutput(); - } - - /// - /// 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 FunctionJSONObjectOutput); - } - - /// - /// Returns true if FunctionJSONObjectOutput instances are equal - /// - /// Instance of FunctionJSONObjectOutput to be compared - /// Boolean - public bool Equals(FunctionJSONObjectOutput 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(@"^FunctionJSONObjectOutput$", 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/FunctionNumberInput.cs b/src/PollinationSDK/Model/FunctionNumberInput.cs deleted file mode 100644 index b7c0d7874..000000000 --- a/src/PollinationSDK/Model/FunctionNumberInput.cs +++ /dev/null @@ -1,256 +0,0 @@ -/* - * 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 number input. You can add additional validation by defining a JSONSchema specification. See http://json-schema.org/understanding-json-schema/reference/numeric.html#numeric for more information. - /// - [DataContract(Name = "FunctionNumberInput")] - public partial class FunctionNumberInput : GenericInput, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected FunctionNumberInput() - { - // Set non-required readonly properties with defaultValue - this.Type = "FunctionNumberInput"; - } - - /// - /// Initializes a new instance of the class. - /// - /// Default value to use for an input if a value was not supplied.. - /// A list of aliases for this input in different platforms.. - /// A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. (default to false). - /// An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec.. - /// Input name. (required). - /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. - /// Optional description for input.. - public FunctionNumberInput - ( - string name, // Required parameters - Dictionary annotations= default, string description= default, double _default= default, List> alias= default, bool required = false, Object spec= default // Optional parameters - ) : base(name: name, annotations: annotations, description: description)// BaseClass - { - this.Default = _default; - this.Alias = alias; - this.Required = required; - this.Spec = spec; - - // Set non-required readonly properties with defaultValue - this.Type = "FunctionNumberInput"; - } - - //============================================== is ReadOnly - /// - /// Gets or Sets Type - /// - [DataMember(Name = "type", EmitDefaultValue = true)] - public string Type { get; protected internal set; } = "FunctionNumberInput"; - - /// - /// Default value to use for an input if a value was not supplied. - /// - /// Default value to use for an input if a value was not supplied. - [DataMember(Name = "default", EmitDefaultValue = false)] - public double Default { get; set; } - /// - /// A list of aliases for this input in different platforms. - /// - /// A list of aliases for this input in different platforms. - [DataMember(Name = "alias", EmitDefaultValue = false)] - public List> Alias { get; set; } - /// - /// A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. - /// - /// A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. - [DataMember(Name = "required", EmitDefaultValue = true)] - public bool Required { get; set; } = false; - /// - /// An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec. - /// - /// An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec. - [DataMember(Name = "spec", EmitDefaultValue = false)] - public Object Spec { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - return "FunctionNumberInput"; - } - - /// - /// 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("FunctionNumberInput:\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" Annotations: ").Append(Annotations).Append("\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" Default: ").Append(Default).Append("\n"); - sb.Append(" Alias: ").Append(Alias).Append("\n"); - sb.Append(" Required: ").Append(Required).Append("\n"); - sb.Append(" Spec: ").Append(Spec).Append("\n"); - return sb.ToString(); - } - - /// - /// Returns the object from JSON string - /// - /// FunctionNumberInput object - public static FunctionNumberInput 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. - /// - /// FunctionNumberInput object - public virtual FunctionNumberInput DuplicateFunctionNumberInput() - { - return FromJson(this.ToJson()); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel Duplicate() - { - return DuplicateFunctionNumberInput(); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override GenericInput DuplicateGenericInput() - { - return DuplicateFunctionNumberInput(); - } - - /// - /// 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 FunctionNumberInput); - } - - /// - /// Returns true if FunctionNumberInput instances are equal - /// - /// Instance of FunctionNumberInput to be compared - /// Boolean - public bool Equals(FunctionNumberInput input) - { - if (input == null) - return false; - return base.Equals(input) && - ( - this.Default == input.Default || - (this.Default != null && - this.Default.Equals(input.Default)) - ) && base.Equals(input) && - ( - this.Alias == input.Alias || - this.Alias != null && - input.Alias != null && - this.Alias.SequenceEqual(input.Alias) - ) && base.Equals(input) && - ( - this.Required == input.Required || - (this.Required != null && - this.Required.Equals(input.Required)) - ) && 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.Default != null) - hashCode = hashCode * 59 + this.Default.GetHashCode(); - if (this.Alias != null) - hashCode = hashCode * 59 + this.Alias.GetHashCode(); - if (this.Required != null) - hashCode = hashCode * 59 + this.Required.GetHashCode(); - if (this.Spec != null) - hashCode = hashCode * 59 + this.Spec.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(@"^FunctionNumberInput$", 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/FunctionNumberOutput.cs b/src/PollinationSDK/Model/FunctionNumberOutput.cs deleted file mode 100644 index 1b4e331cc..000000000 --- a/src/PollinationSDK/Model/FunctionNumberOutput.cs +++ /dev/null @@ -1,210 +0,0 @@ -/* - * 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 number output. This output loads the content from a file as a floating number. - /// - [DataContract(Name = "FunctionNumberOutput")] - public partial class FunctionNumberOutput : FunctionStringOutput, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected FunctionNumberOutput() - { - // Set non-required readonly properties with defaultValue - this.Type = "FunctionNumberOutput"; - } - - /// - /// Initializes a new instance of the class. - /// - /// Output name. (required). - /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. - /// Optional description for output.. - /// Path to the output artifact relative to where the function command is executed. (required). - /// A boolean to indicate if an artifact output is required. A False value makes the artifact optional. (default to true). - public FunctionNumberOutput - ( - string name, string path, // Required parameters - Dictionary annotations= default, string description= default, bool required = true // Optional parameters - ) : base(name: name, annotations: annotations, description: description, path: path, required: required)// BaseClass - { - - // Set non-required readonly properties with defaultValue - this.Type = "FunctionNumberOutput"; - } - - //============================================== is ReadOnly - /// - /// Gets or Sets Type - /// - [DataMember(Name = "type", EmitDefaultValue = true)] - public string Type { get; protected internal set; } = "FunctionNumberOutput"; - - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - return "FunctionNumberOutput"; - } - - /// - /// 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("FunctionNumberOutput:\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" Annotations: ").Append(Annotations).Append("\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" Path: ").Append(Path).Append("\n"); - sb.Append(" Required: ").Append(Required).Append("\n"); - return sb.ToString(); - } - - /// - /// Returns the object from JSON string - /// - /// FunctionNumberOutput object - public static FunctionNumberOutput 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. - /// - /// FunctionNumberOutput object - public virtual FunctionNumberOutput DuplicateFunctionNumberOutput() - { - return FromJson(this.ToJson()); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel Duplicate() - { - return DuplicateFunctionNumberOutput(); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override FunctionStringOutput DuplicateFunctionStringOutput() - { - return DuplicateFunctionNumberOutput(); - } - - /// - /// 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 FunctionNumberOutput); - } - - /// - /// Returns true if FunctionNumberOutput instances are equal - /// - /// Instance of FunctionNumberOutput to be compared - /// Boolean - public bool Equals(FunctionNumberOutput 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(@"^FunctionNumberOutput$", 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/FunctionPathInput.cs b/src/PollinationSDK/Model/FunctionPathInput.cs deleted file mode 100644 index bb3823ba0..000000000 --- a/src/PollinationSDK/Model/FunctionPathInput.cs +++ /dev/null @@ -1,290 +0,0 @@ -/* - * 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 file or a folder input. Use this input only in cases that the input can be either a file or folder. For file or folder-only inputs see File and Folder. Path is a special string input. Unlike other string inputs, a path will be copied from its location to execution folder when a workflow is executed. You can add additional validation by defining a JSONSchema specification. See http://json-schema.org/understanding-json-schema/reference/string.html#string for more information. .. code-block:: python # a file with maximum 50 characters with an ``epw`` extension. \"schema\": { \"type\": \"string\", \"maxLength\": 50, \"pattern\": \"(?i)(^.*\\.epw$)\" } - /// - [DataContract(Name = "FunctionPathInput")] - public partial class FunctionPathInput : GenericInput, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected FunctionPathInput() - { - // Set non-required readonly properties with defaultValue - this.Type = "FunctionPathInput"; - } - - /// - /// Initializes a new instance of the class. - /// - /// 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. (required). - /// The default source for file if the value is not provided.. - /// A list of aliases for this input in different platforms.. - /// A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. (default to false). - /// An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec.. - /// Optional list of extensions for file. The check for extension is case-insensitive.. - /// Input name. (required). - /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. - /// Optional description for input.. - public FunctionPathInput - ( - string name, string path, // Required parameters - Dictionary annotations= default, string description= default, AnyOf _default= default, List> alias= default, bool required = false, Object spec= default, List extensions= default // Optional parameters - ) : base(name: name, annotations: annotations, description: description)// BaseClass - { - // to ensure "path" is required (not null) - this.Path = path ?? throw new ArgumentNullException("path is a required property for FunctionPathInput and cannot be null"); - this.Default = _default; - this.Alias = alias; - this.Required = required; - this.Spec = spec; - this.Extensions = extensions; - - // Set non-required readonly properties with defaultValue - this.Type = "FunctionPathInput"; - } - - //============================================== is ReadOnly - /// - /// Gets or Sets Type - /// - [DataMember(Name = "type", EmitDefaultValue = true)] - public string Type { get; protected internal set; } = "FunctionPathInput"; - - /// - /// 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. - /// - /// 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. - [DataMember(Name = "path", IsRequired = true, EmitDefaultValue = false)] - public string Path { get; set; } - /// - /// The default source for file if the value is not provided. - /// - /// The default source for file if the value is not provided. - [DataMember(Name = "default", EmitDefaultValue = false)] - public AnyOf Default { get; set; } - /// - /// A list of aliases for this input in different platforms. - /// - /// A list of aliases for this input in different platforms. - [DataMember(Name = "alias", EmitDefaultValue = false)] - public List> Alias { get; set; } - /// - /// A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. - /// - /// A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. - [DataMember(Name = "required", EmitDefaultValue = true)] - public bool Required { get; set; } = false; - /// - /// An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec. - /// - /// An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec. - [DataMember(Name = "spec", EmitDefaultValue = false)] - public Object Spec { get; set; } - /// - /// Optional list of extensions for file. The check for extension is case-insensitive. - /// - /// Optional list of extensions for file. The check for extension is case-insensitive. - [DataMember(Name = "extensions", EmitDefaultValue = false)] - public List Extensions { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - return "FunctionPathInput"; - } - - /// - /// 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("FunctionPathInput:\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" Annotations: ").Append(Annotations).Append("\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" Path: ").Append(Path).Append("\n"); - sb.Append(" Default: ").Append(Default).Append("\n"); - sb.Append(" Alias: ").Append(Alias).Append("\n"); - sb.Append(" Required: ").Append(Required).Append("\n"); - sb.Append(" Spec: ").Append(Spec).Append("\n"); - sb.Append(" Extensions: ").Append(Extensions).Append("\n"); - return sb.ToString(); - } - - /// - /// Returns the object from JSON string - /// - /// FunctionPathInput object - public static FunctionPathInput 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. - /// - /// FunctionPathInput object - public virtual FunctionPathInput DuplicateFunctionPathInput() - { - return FromJson(this.ToJson()); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel Duplicate() - { - return DuplicateFunctionPathInput(); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override GenericInput DuplicateGenericInput() - { - return DuplicateFunctionPathInput(); - } - - /// - /// 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 FunctionPathInput); - } - - /// - /// Returns true if FunctionPathInput instances are equal - /// - /// Instance of FunctionPathInput to be compared - /// Boolean - public bool Equals(FunctionPathInput input) - { - if (input == null) - return false; - return base.Equals(input) && - ( - this.Path == input.Path || - (this.Path != null && - this.Path.Equals(input.Path)) - ) && base.Equals(input) && - ( - this.Default == input.Default || - (this.Default != null && - this.Default.Equals(input.Default)) - ) && base.Equals(input) && - ( - this.Alias == input.Alias || - this.Alias != null && - input.Alias != null && - this.Alias.SequenceEqual(input.Alias) - ) && base.Equals(input) && - ( - this.Required == input.Required || - (this.Required != null && - this.Required.Equals(input.Required)) - ) && base.Equals(input) && - ( - this.Extensions == input.Extensions || - this.Extensions != null && - input.Extensions != null && - this.Extensions.SequenceEqual(input.Extensions) - ) && 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.Path != null) - hashCode = hashCode * 59 + this.Path.GetHashCode(); - if (this.Default != null) - hashCode = hashCode * 59 + this.Default.GetHashCode(); - if (this.Alias != null) - hashCode = hashCode * 59 + this.Alias.GetHashCode(); - if (this.Required != null) - hashCode = hashCode * 59 + this.Required.GetHashCode(); - if (this.Spec != null) - hashCode = hashCode * 59 + this.Spec.GetHashCode(); - if (this.Extensions != null) - hashCode = hashCode * 59 + this.Extensions.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(@"^FunctionPathInput$", 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/FunctionPathOutput.cs b/src/PollinationSDK/Model/FunctionPathOutput.cs deleted file mode 100644 index 852f71e3e..000000000 --- a/src/PollinationSDK/Model/FunctionPathOutput.cs +++ /dev/null @@ -1,210 +0,0 @@ -/* - * 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 Path output. - /// - [DataContract(Name = "FunctionPathOutput")] - public partial class FunctionPathOutput : PathOutput, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected FunctionPathOutput() - { - // Set non-required readonly properties with defaultValue - this.Type = "FunctionPathOutput"; - } - - /// - /// Initializes a new instance of the class. - /// - /// Output name. (required). - /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. - /// Optional description for output.. - /// Path to the output artifact relative to where the function command is executed. (required). - /// A boolean to indicate if an artifact output is required. A False value makes the artifact optional. (default to true). - public FunctionPathOutput - ( - string name, string path, // Required parameters - Dictionary annotations= default, string description= default, bool required = true // Optional parameters - ) : base(name: name, annotations: annotations, description: description, path: path, required: required)// BaseClass - { - - // Set non-required readonly properties with defaultValue - this.Type = "FunctionPathOutput"; - } - - //============================================== is ReadOnly - /// - /// Gets or Sets Type - /// - [DataMember(Name = "type", EmitDefaultValue = true)] - public string Type { get; protected internal set; } = "FunctionPathOutput"; - - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - return "FunctionPathOutput"; - } - - /// - /// 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("FunctionPathOutput:\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" Annotations: ").Append(Annotations).Append("\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" Path: ").Append(Path).Append("\n"); - sb.Append(" Required: ").Append(Required).Append("\n"); - return sb.ToString(); - } - - /// - /// Returns the object from JSON string - /// - /// FunctionPathOutput object - public static FunctionPathOutput 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. - /// - /// FunctionPathOutput object - public virtual FunctionPathOutput DuplicateFunctionPathOutput() - { - return FromJson(this.ToJson()); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel Duplicate() - { - return DuplicateFunctionPathOutput(); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override PathOutput DuplicatePathOutput() - { - return DuplicateFunctionPathOutput(); - } - - /// - /// 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 FunctionPathOutput); - } - - /// - /// Returns true if FunctionPathOutput instances are equal - /// - /// Instance of FunctionPathOutput to be compared - /// Boolean - public bool Equals(FunctionPathOutput 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(@"^FunctionPathOutput$", 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/FunctionStringInput.cs b/src/PollinationSDK/Model/FunctionStringInput.cs deleted file mode 100644 index eaf3bf1fb..000000000 --- a/src/PollinationSDK/Model/FunctionStringInput.cs +++ /dev/null @@ -1,214 +0,0 @@ -/* - * 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 String input. You can add additional validation by defining a JSONSchema specification. See http://json-schema.org/understanding-json-schema/reference/string.html#string for more information. .. code-block:: python \"schema\": { \"type\": \"string\", \"maxLength\": 50, \"pattern\": \"(?i)(^.*\\.epw$)\" } - /// - [DataContract(Name = "FunctionStringInput")] - public partial class FunctionStringInput : DAGStringInput, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected FunctionStringInput() - { - // Set non-required readonly properties with defaultValue - this.Type = "FunctionStringInput"; - } - - /// - /// Initializes a new instance of the class. - /// - /// Input name. (required). - /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. - /// Optional description for input.. - /// Default value for generic input.. - /// A list of aliases for this input in different platforms.. - /// A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. (default to false). - /// An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec.. - public FunctionStringInput - ( - string name, // Required parameters - Dictionary annotations= default, string description= default, string _default= default, List> alias= default, bool required = false, Object spec= default // Optional parameters - ) : base(name: name, annotations: annotations, description: description, _default: _default, alias: alias, required: required, spec: spec)// BaseClass - { - - // Set non-required readonly properties with defaultValue - this.Type = "FunctionStringInput"; - } - - //============================================== is ReadOnly - /// - /// Gets or Sets Type - /// - [DataMember(Name = "type", EmitDefaultValue = true)] - public string Type { get; protected internal set; } = "FunctionStringInput"; - - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - return "FunctionStringInput"; - } - - /// - /// 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("FunctionStringInput:\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" Annotations: ").Append(Annotations).Append("\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" Default: ").Append(Default).Append("\n"); - sb.Append(" Alias: ").Append(Alias).Append("\n"); - sb.Append(" Required: ").Append(Required).Append("\n"); - sb.Append(" Spec: ").Append(Spec).Append("\n"); - return sb.ToString(); - } - - /// - /// Returns the object from JSON string - /// - /// FunctionStringInput object - public static FunctionStringInput 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. - /// - /// FunctionStringInput object - public virtual FunctionStringInput DuplicateFunctionStringInput() - { - return FromJson(this.ToJson()); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel Duplicate() - { - return DuplicateFunctionStringInput(); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override DAGStringInput DuplicateDAGStringInput() - { - return DuplicateFunctionStringInput(); - } - - /// - /// 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 FunctionStringInput); - } - - /// - /// Returns true if FunctionStringInput instances are equal - /// - /// Instance of FunctionStringInput to be compared - /// Boolean - public bool Equals(FunctionStringInput 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(@"^FunctionStringInput$", 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/FunctionStringOutput.cs b/src/PollinationSDK/Model/FunctionStringOutput.cs deleted file mode 100644 index 59a9fd5eb..000000000 --- a/src/PollinationSDK/Model/FunctionStringOutput.cs +++ /dev/null @@ -1,210 +0,0 @@ -/* - * 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 string output. This output loads the content from a file as a string. - /// - [DataContract(Name = "FunctionStringOutput")] - public partial class FunctionStringOutput : FunctionFileOutput, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected FunctionStringOutput() - { - // Set non-required readonly properties with defaultValue - this.Type = "FunctionStringOutput"; - } - - /// - /// Initializes a new instance of the class. - /// - /// Output name. (required). - /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. - /// Optional description for output.. - /// Path to the output artifact relative to where the function command is executed. (required). - /// A boolean to indicate if an artifact output is required. A False value makes the artifact optional. (default to true). - public FunctionStringOutput - ( - string name, string path, // Required parameters - Dictionary annotations= default, string description= default, bool required = true // Optional parameters - ) : base(name: name, annotations: annotations, description: description, path: path, required: required)// BaseClass - { - - // Set non-required readonly properties with defaultValue - this.Type = "FunctionStringOutput"; - } - - //============================================== is ReadOnly - /// - /// Gets or Sets Type - /// - [DataMember(Name = "type", EmitDefaultValue = true)] - public string Type { get; protected internal set; } = "FunctionStringOutput"; - - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - return "FunctionStringOutput"; - } - - /// - /// 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("FunctionStringOutput:\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" Annotations: ").Append(Annotations).Append("\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" Path: ").Append(Path).Append("\n"); - sb.Append(" Required: ").Append(Required).Append("\n"); - return sb.ToString(); - } - - /// - /// Returns the object from JSON string - /// - /// FunctionStringOutput object - public static FunctionStringOutput 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. - /// - /// FunctionStringOutput object - public virtual FunctionStringOutput DuplicateFunctionStringOutput() - { - return FromJson(this.ToJson()); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel Duplicate() - { - return DuplicateFunctionStringOutput(); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override FunctionFileOutput DuplicateFunctionFileOutput() - { - return DuplicateFunctionStringOutput(); - } - - /// - /// 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 FunctionStringOutput); - } - - /// - /// Returns true if FunctionStringOutput instances are equal - /// - /// Instance of FunctionStringOutput to be compared - /// Boolean - public bool Equals(FunctionStringOutput 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(@"^FunctionStringOutput$", 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/GenericInput.cs b/src/PollinationSDK/Model/GenericInput.cs deleted file mode 100644 index cfc9c702c..000000000 --- a/src/PollinationSDK/Model/GenericInput.cs +++ /dev/null @@ -1,250 +0,0 @@ -/* - * 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 -{ - /// - /// Base class for all input types. - /// - [DataContract(Name = "GenericInput")] - public partial class GenericInput : OpenAPIGenBaseModel, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected GenericInput() - { - // Set non-required readonly properties with defaultValue - this.Type = "GenericInput"; - } - - /// - /// Initializes a new instance of the class. - /// - /// Input name. (required). - /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. - /// Optional description for input.. - public GenericInput - ( - string name, // Required parameters - Dictionary annotations= 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 GenericInput and cannot be null"); - this.Annotations = annotations; - this.Description = description; - - // Set non-required readonly properties with defaultValue - this.Type = "GenericInput"; - } - - //============================================== is ReadOnly - /// - /// Gets or Sets Type - /// - [DataMember(Name = "type", EmitDefaultValue = true)] - public string Type { get; protected internal set; } = "GenericInput"; - - /// - /// Input name. - /// - /// Input name. - [DataMember(Name = "name", IsRequired = true, EmitDefaultValue = false)] - public string Name { 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; } - /// - /// Optional description for input. - /// - /// Optional description for input. - [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 "GenericInput"; - } - - /// - /// 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("GenericInput:\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" Annotations: ").Append(Annotations).Append("\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - return sb.ToString(); - } - - /// - /// Returns the object from JSON string - /// - /// GenericInput object - public static GenericInput 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. - /// - /// GenericInput object - public virtual GenericInput DuplicateGenericInput() - { - return FromJson(this.ToJson()); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel Duplicate() - { - return DuplicateGenericInput(); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel DuplicateOpenAPIGenBaseModel() - { - return DuplicateGenericInput(); - } - - /// - /// 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 GenericInput); - } - - /// - /// Returns true if GenericInput instances are equal - /// - /// Instance of GenericInput to be compared - /// Boolean - public bool Equals(GenericInput 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.Type == input.Type || - (this.Type != null && - this.Type.Equals(input.Type)) - ) && base.Equals(input) && - ( - this.Annotations == input.Annotations || - this.Annotations != null && - input.Annotations != null && - this.Annotations.SequenceEqual(input.Annotations) - ) && base.Equals(input) && - ( - this.Description == input.Description || - (this.Description != null && - this.Description.Equals(input.Description)) - ); - } - - /// - /// 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.Type != null) - hashCode = hashCode * 59 + this.Type.GetHashCode(); - if (this.Annotations != null) - hashCode = hashCode * 59 + this.Annotations.GetHashCode(); - if (this.Description != null) - hashCode = hashCode * 59 + this.Description.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(@"^GenericInput$", 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/GenericOutput.cs b/src/PollinationSDK/Model/GenericOutput.cs deleted file mode 100644 index b957d9dfa..000000000 --- a/src/PollinationSDK/Model/GenericOutput.cs +++ /dev/null @@ -1,250 +0,0 @@ -/* - * 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 -{ - /// - /// Base class for all output types. The baseclass uses a name to source the output. - /// - [DataContract(Name = "GenericOutput")] - public partial class GenericOutput : OpenAPIGenBaseModel, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected GenericOutput() - { - // Set non-required readonly properties with defaultValue - this.Type = "GenericOutput"; - } - - /// - /// Initializes a new instance of the class. - /// - /// Output name. (required). - /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. - /// Optional description for output.. - public GenericOutput - ( - string name, // Required parameters - Dictionary annotations= 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 GenericOutput and cannot be null"); - this.Annotations = annotations; - this.Description = description; - - // Set non-required readonly properties with defaultValue - this.Type = "GenericOutput"; - } - - //============================================== is ReadOnly - /// - /// Gets or Sets Type - /// - [DataMember(Name = "type", EmitDefaultValue = true)] - public string Type { get; protected internal set; } = "GenericOutput"; - - /// - /// Output name. - /// - /// Output name. - [DataMember(Name = "name", IsRequired = true, EmitDefaultValue = false)] - public string Name { 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; } - /// - /// Optional description for output. - /// - /// Optional description for output. - [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 "GenericOutput"; - } - - /// - /// 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("GenericOutput:\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" Annotations: ").Append(Annotations).Append("\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - return sb.ToString(); - } - - /// - /// Returns the object from JSON string - /// - /// GenericOutput object - public static GenericOutput 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. - /// - /// GenericOutput object - public virtual GenericOutput DuplicateGenericOutput() - { - return FromJson(this.ToJson()); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel Duplicate() - { - return DuplicateGenericOutput(); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel DuplicateOpenAPIGenBaseModel() - { - return DuplicateGenericOutput(); - } - - /// - /// 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 GenericOutput); - } - - /// - /// Returns true if GenericOutput instances are equal - /// - /// Instance of GenericOutput to be compared - /// Boolean - public bool Equals(GenericOutput 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.Type == input.Type || - (this.Type != null && - this.Type.Equals(input.Type)) - ) && base.Equals(input) && - ( - this.Annotations == input.Annotations || - this.Annotations != null && - input.Annotations != null && - this.Annotations.SequenceEqual(input.Annotations) - ) && base.Equals(input) && - ( - this.Description == input.Description || - (this.Description != null && - this.Description.Equals(input.Description)) - ); - } - - /// - /// 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.Type != null) - hashCode = hashCode * 59 + this.Type.GetHashCode(); - if (this.Annotations != null) - hashCode = hashCode * 59 + this.Annotations.GetHashCode(); - if (this.Description != null) - hashCode = hashCode * 59 + this.Description.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(@"^GenericOutput$", 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/HTTP.cs b/src/PollinationSDK/Model/HTTP.cs deleted file mode 100644 index d8d3a7bf5..000000000 --- a/src/PollinationSDK/Model/HTTP.cs +++ /dev/null @@ -1,209 +0,0 @@ -/* - * 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 -{ - /// - /// HTTP Source A web HTTP to an FTP server or an API for example. - /// - [DataContract(Name = "HTTP")] - public partial class HTTP : ArtifactSource, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected HTTP() - { - // Set non-required readonly properties with defaultValue - this.Type = "HTTP"; - } - - /// - /// Initializes a new instance of the class. - /// - /// For a HTTP endpoint this can be http://climate.onebuilding.org. (required). - /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. - public HTTP - ( - string url, // Required parameters - Dictionary annotations= default // Optional parameters - ) : base(annotations: annotations)// BaseClass - { - // to ensure "url" is required (not null) - this.Url = url ?? throw new ArgumentNullException("url is a required property for HTTP and cannot be null"); - - // Set non-required readonly properties with defaultValue - this.Type = "HTTP"; - } - - //============================================== is ReadOnly - /// - /// Gets or Sets Type - /// - [DataMember(Name = "type", EmitDefaultValue = true)] - public string Type { get; protected internal set; } = "HTTP"; - - /// - /// For a HTTP endpoint this can be http://climate.onebuilding.org. - /// - /// For a HTTP endpoint this can be http://climate.onebuilding.org. - [DataMember(Name = "url", IsRequired = true, EmitDefaultValue = false)] - public string Url { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - return "HTTP"; - } - - /// - /// 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("HTTP:\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" Annotations: ").Append(Annotations).Append("\n"); - sb.Append(" Url: ").Append(Url).Append("\n"); - return sb.ToString(); - } - - /// - /// Returns the object from JSON string - /// - /// HTTP object - public static HTTP 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. - /// - /// HTTP object - public virtual HTTP DuplicateHTTP() - { - return FromJson(this.ToJson()); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel Duplicate() - { - return DuplicateHTTP(); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override ArtifactSource DuplicateArtifactSource() - { - return DuplicateHTTP(); - } - - /// - /// 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 HTTP); - } - - /// - /// Returns true if HTTP instances are equal - /// - /// Instance of HTTP to be compared - /// Boolean - public bool Equals(HTTP input) - { - if (input == null) - return false; - return base.Equals(input) && - ( - this.Url == input.Url || - (this.Url != null && - this.Url.Equals(input.Url)) - ) && 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.Url != null) - hashCode = hashCode * 59 + this.Url.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(@"^HTTP$", 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/IOAliasHandler.cs b/src/PollinationSDK/Model/IOAliasHandler.cs deleted file mode 100644 index c01b05b2d..000000000 --- a/src/PollinationSDK/Model/IOAliasHandler.cs +++ /dev/null @@ -1,274 +0,0 @@ -/* - * 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 -{ - /// - /// Input and output alias handler object. - /// - [DataContract(Name = "IOAliasHandler")] - public partial class IOAliasHandler : OpenAPIGenBaseModel, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected IOAliasHandler() - { - // Set non-required readonly properties with defaultValue - this.Type = "IOAliasHandler"; - } - - /// - /// Initializes a new instance of the class. - /// - /// Declare the language (e.g. python, csharp, etc.). This option allows the recipe to be flexible on handling different programming languages. (required). - /// Target module or namespace to load the alias function. (required). - /// Name of the function. The input value will be passed to this function as the first argument. (required). - /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. - /// 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 to 0). - public IOAliasHandler - ( - string language, string module, string function, // Required parameters - Dictionary annotations= default, int index = 0// Optional parameters - ) : base()// BaseClass - { - // to ensure "language" is required (not null) - this.Language = language ?? throw new ArgumentNullException("language is a required property for IOAliasHandler and cannot be null"); - // to ensure "module" is required (not null) - this.Module = module ?? throw new ArgumentNullException("module is a required property for IOAliasHandler and cannot be null"); - // to ensure "function" is required (not null) - this.Function = function ?? throw new ArgumentNullException("function is a required property for IOAliasHandler and cannot be null"); - this.Annotations = annotations; - this.Index = index; - - // Set non-required readonly properties with defaultValue - this.Type = "IOAliasHandler"; - } - - //============================================== is ReadOnly - /// - /// Gets or Sets Type - /// - [DataMember(Name = "type", EmitDefaultValue = true)] - public string Type { get; protected internal set; } = "IOAliasHandler"; - - /// - /// Declare the language (e.g. python, csharp, etc.). This option allows the recipe to be flexible on handling different programming languages. - /// - /// Declare the language (e.g. python, csharp, etc.). This option allows the recipe to be flexible on handling different programming languages. - [DataMember(Name = "language", IsRequired = true, EmitDefaultValue = false)] - public string Language { get; set; } - /// - /// Target module or namespace to load the alias function. - /// - /// Target module or namespace to load the alias function. - [DataMember(Name = "module", IsRequired = true, EmitDefaultValue = false)] - public string Module { get; set; } - /// - /// Name of the function. The input value will be passed to this function as the first argument. - /// - /// Name of the function. The input value will be passed to this function as the first argument. - [DataMember(Name = "function", IsRequired = true, EmitDefaultValue = false)] - public string Function { 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; } - /// - /// 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. - /// - /// 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. - [DataMember(Name = "index", EmitDefaultValue = true)] - public int Index { get; set; } = 0; - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - return "IOAliasHandler"; - } - - /// - /// 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("IOAliasHandler:\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" Language: ").Append(Language).Append("\n"); - sb.Append(" Module: ").Append(Module).Append("\n"); - sb.Append(" Function: ").Append(Function).Append("\n"); - sb.Append(" Annotations: ").Append(Annotations).Append("\n"); - sb.Append(" Index: ").Append(Index).Append("\n"); - return sb.ToString(); - } - - /// - /// Returns the object from JSON string - /// - /// IOAliasHandler object - public static IOAliasHandler 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. - /// - /// IOAliasHandler object - public virtual IOAliasHandler DuplicateIOAliasHandler() - { - return FromJson(this.ToJson()); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel Duplicate() - { - return DuplicateIOAliasHandler(); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel DuplicateOpenAPIGenBaseModel() - { - return DuplicateIOAliasHandler(); - } - - /// - /// 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 IOAliasHandler); - } - - /// - /// Returns true if IOAliasHandler instances are equal - /// - /// Instance of IOAliasHandler to be compared - /// Boolean - public bool Equals(IOAliasHandler input) - { - if (input == null) - return false; - return base.Equals(input) && - ( - this.Language == input.Language || - (this.Language != null && - this.Language.Equals(input.Language)) - ) && base.Equals(input) && - ( - this.Module == input.Module || - (this.Module != null && - this.Module.Equals(input.Module)) - ) && base.Equals(input) && - ( - this.Function == input.Function || - (this.Function != null && - this.Function.Equals(input.Function)) - ) && base.Equals(input) && - ( - this.Type == input.Type || - (this.Type != null && - this.Type.Equals(input.Type)) - ) && base.Equals(input) && - ( - this.Annotations == input.Annotations || - this.Annotations != null && - input.Annotations != null && - this.Annotations.SequenceEqual(input.Annotations) - ) && base.Equals(input) && - ( - this.Index == input.Index || - (this.Index != null && - this.Index.Equals(input.Index)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = base.GetHashCode(); - if (this.Language != null) - hashCode = hashCode * 59 + this.Language.GetHashCode(); - if (this.Module != null) - hashCode = hashCode * 59 + this.Module.GetHashCode(); - if (this.Function != null) - hashCode = hashCode * 59 + this.Function.GetHashCode(); - if (this.Type != null) - hashCode = hashCode * 59 + this.Type.GetHashCode(); - if (this.Annotations != null) - hashCode = hashCode * 59 + this.Annotations.GetHashCode(); - if (this.Index != null) - hashCode = hashCode * 59 + this.Index.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(@"^IOAliasHandler$", 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/IOBase.cs b/src/PollinationSDK/Model/IOBase.cs deleted file mode 100644 index 75d08109a..000000000 --- a/src/PollinationSDK/Model/IOBase.cs +++ /dev/null @@ -1,241 +0,0 @@ -/* - * 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 reusable model for classes with Input and Output (IO) objects. IOBase is the baseclass for Function, DAG and Workflow. - /// - [DataContract(Name = "IOBase")] - public partial class IOBase : OpenAPIGenBaseModel, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. - /// Place-holder. Overwrite this!. - /// Place-holder. Overwrite this!. - public IOBase - ( - // Required parameters - Dictionary annotations= default, List inputs= default, List outputs= default// Optional parameters - ) : base()// BaseClass - { - this.Annotations = annotations; - this.Inputs = inputs; - this.Outputs = outputs; - - // Set non-required readonly properties with defaultValue - this.Type = "IOBase"; - } - - //============================================== is ReadOnly - /// - /// Gets or Sets Type - /// - [DataMember(Name = "type", EmitDefaultValue = true)] - public string Type { get; protected internal set; } = "IOBase"; - - /// - /// 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; } - /// - /// Place-holder. Overwrite this! - /// - /// Place-holder. Overwrite this! - [DataMember(Name = "inputs", EmitDefaultValue = false)] - public List Inputs { get; set; } - /// - /// Place-holder. Overwrite this! - /// - /// Place-holder. Overwrite this! - [DataMember(Name = "outputs", EmitDefaultValue = false)] - public List Outputs { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - return "IOBase"; - } - - /// - /// 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("IOBase:\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" Annotations: ").Append(Annotations).Append("\n"); - sb.Append(" Inputs: ").Append(Inputs).Append("\n"); - sb.Append(" Outputs: ").Append(Outputs).Append("\n"); - return sb.ToString(); - } - - /// - /// Returns the object from JSON string - /// - /// IOBase object - public static IOBase 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. - /// - /// IOBase object - public virtual IOBase DuplicateIOBase() - { - return FromJson(this.ToJson()); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel Duplicate() - { - return DuplicateIOBase(); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel DuplicateOpenAPIGenBaseModel() - { - return DuplicateIOBase(); - } - - /// - /// 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 IOBase); - } - - /// - /// Returns true if IOBase instances are equal - /// - /// Instance of IOBase to be compared - /// Boolean - public bool Equals(IOBase 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.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) - ); - } - - /// - /// 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.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(); - 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(@"^IOBase$", 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/InputFileReference.cs b/src/PollinationSDK/Model/InputFileReference.cs deleted file mode 100644 index 40c604c8d..000000000 --- a/src/PollinationSDK/Model/InputFileReference.cs +++ /dev/null @@ -1,194 +0,0 @@ -/* - * 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 input file reference - /// - [DataContract(Name = "InputFileReference")] - public partial class InputFileReference : InputReferenceBase, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected InputFileReference() - { - // Set non-required readonly properties with defaultValue - this.Type = "InputFileReference"; - } - - /// - /// Initializes a new instance of the class. - /// - /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. - /// The name of the DAG input variable (required). - public InputFileReference - ( - string variable, // Required parameters - Dictionary annotations= default // Optional parameters - ) : base(annotations: annotations, variable: variable)// BaseClass - { - - // Set non-required readonly properties with defaultValue - this.Type = "InputFileReference"; - } - - //============================================== is ReadOnly - /// - /// Gets or Sets Type - /// - [DataMember(Name = "type", EmitDefaultValue = true)] - public string Type { get; protected internal set; } = "InputFileReference"; - - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - return "InputFileReference"; - } - - /// - /// 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("InputFileReference:\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" Annotations: ").Append(Annotations).Append("\n"); - sb.Append(" Variable: ").Append(Variable).Append("\n"); - return sb.ToString(); - } - - /// - /// Returns the object from JSON string - /// - /// InputFileReference object - public static InputFileReference 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. - /// - /// InputFileReference object - public virtual InputFileReference DuplicateInputFileReference() - { - return FromJson(this.ToJson()); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel Duplicate() - { - return DuplicateInputFileReference(); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override InputReferenceBase DuplicateInputReferenceBase() - { - return DuplicateInputFileReference(); - } - - /// - /// 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 InputFileReference); - } - - /// - /// Returns true if InputFileReference instances are equal - /// - /// Instance of InputFileReference to be compared - /// Boolean - public bool Equals(InputFileReference 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(@"^InputFileReference$", 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/InputFolderReference.cs b/src/PollinationSDK/Model/InputFolderReference.cs deleted file mode 100644 index a57db9fdd..000000000 --- a/src/PollinationSDK/Model/InputFolderReference.cs +++ /dev/null @@ -1,194 +0,0 @@ -/* - * 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 input folder reference - /// - [DataContract(Name = "InputFolderReference")] - public partial class InputFolderReference : InputReferenceBase, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected InputFolderReference() - { - // Set non-required readonly properties with defaultValue - this.Type = "InputFolderReference"; - } - - /// - /// Initializes a new instance of the class. - /// - /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. - /// The name of the DAG input variable (required). - public InputFolderReference - ( - string variable, // Required parameters - Dictionary annotations= default // Optional parameters - ) : base(annotations: annotations, variable: variable)// BaseClass - { - - // Set non-required readonly properties with defaultValue - this.Type = "InputFolderReference"; - } - - //============================================== is ReadOnly - /// - /// Gets or Sets Type - /// - [DataMember(Name = "type", EmitDefaultValue = true)] - public string Type { get; protected internal set; } = "InputFolderReference"; - - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - return "InputFolderReference"; - } - - /// - /// 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("InputFolderReference:\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" Annotations: ").Append(Annotations).Append("\n"); - sb.Append(" Variable: ").Append(Variable).Append("\n"); - return sb.ToString(); - } - - /// - /// Returns the object from JSON string - /// - /// InputFolderReference object - public static InputFolderReference 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. - /// - /// InputFolderReference object - public virtual InputFolderReference DuplicateInputFolderReference() - { - return FromJson(this.ToJson()); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel Duplicate() - { - return DuplicateInputFolderReference(); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override InputReferenceBase DuplicateInputReferenceBase() - { - return DuplicateInputFolderReference(); - } - - /// - /// 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 InputFolderReference); - } - - /// - /// Returns true if InputFolderReference instances are equal - /// - /// Instance of InputFolderReference to be compared - /// Boolean - public bool Equals(InputFolderReference 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(@"^InputFolderReference$", 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/InputPathReference.cs b/src/PollinationSDK/Model/InputPathReference.cs deleted file mode 100644 index 6e1872afb..000000000 --- a/src/PollinationSDK/Model/InputPathReference.cs +++ /dev/null @@ -1,194 +0,0 @@ -/* - * 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 input file or folder reference - /// - [DataContract(Name = "InputPathReference")] - public partial class InputPathReference : InputReferenceBase, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected InputPathReference() - { - // Set non-required readonly properties with defaultValue - this.Type = "InputPathReference"; - } - - /// - /// Initializes a new instance of the class. - /// - /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. - /// The name of the DAG input variable (required). - public InputPathReference - ( - string variable, // Required parameters - Dictionary annotations= default // Optional parameters - ) : base(annotations: annotations, variable: variable)// BaseClass - { - - // Set non-required readonly properties with defaultValue - this.Type = "InputPathReference"; - } - - //============================================== is ReadOnly - /// - /// Gets or Sets Type - /// - [DataMember(Name = "type", EmitDefaultValue = true)] - public string Type { get; protected internal set; } = "InputPathReference"; - - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - return "InputPathReference"; - } - - /// - /// 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("InputPathReference:\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" Annotations: ").Append(Annotations).Append("\n"); - sb.Append(" Variable: ").Append(Variable).Append("\n"); - return sb.ToString(); - } - - /// - /// Returns the object from JSON string - /// - /// InputPathReference object - public static InputPathReference 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. - /// - /// InputPathReference object - public virtual InputPathReference DuplicateInputPathReference() - { - return FromJson(this.ToJson()); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel Duplicate() - { - return DuplicateInputPathReference(); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override InputReferenceBase DuplicateInputReferenceBase() - { - return DuplicateInputPathReference(); - } - - /// - /// 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 InputPathReference); - } - - /// - /// Returns true if InputPathReference instances are equal - /// - /// Instance of InputPathReference to be compared - /// Boolean - public bool Equals(InputPathReference 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(@"^InputPathReference$", 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/InputReference.cs b/src/PollinationSDK/Model/InputReference.cs deleted file mode 100644 index 55252fe1b..000000000 --- a/src/PollinationSDK/Model/InputReference.cs +++ /dev/null @@ -1,194 +0,0 @@ -/* - * 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 input parameter reference which is not a file or a folder. For a file or a folder use InputFileReference, InputFolderReference or InputPathReference instead. - /// - [DataContract(Name = "InputReference")] - public partial class InputReference : InputReferenceBase, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected InputReference() - { - // Set non-required readonly properties with defaultValue - this.Type = "InputReference"; - } - - /// - /// Initializes a new instance of the class. - /// - /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. - /// The name of the DAG input variable (required). - public InputReference - ( - string variable, // Required parameters - Dictionary annotations= default // Optional parameters - ) : base(annotations: annotations, variable: variable)// BaseClass - { - - // Set non-required readonly properties with defaultValue - this.Type = "InputReference"; - } - - //============================================== is ReadOnly - /// - /// Gets or Sets Type - /// - [DataMember(Name = "type", EmitDefaultValue = true)] - public string Type { get; protected internal set; } = "InputReference"; - - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - return "InputReference"; - } - - /// - /// 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("InputReference:\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" Annotations: ").Append(Annotations).Append("\n"); - sb.Append(" Variable: ").Append(Variable).Append("\n"); - return sb.ToString(); - } - - /// - /// Returns the object from JSON string - /// - /// InputReference object - public static InputReference 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. - /// - /// InputReference object - public virtual InputReference DuplicateInputReference() - { - return FromJson(this.ToJson()); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel Duplicate() - { - return DuplicateInputReference(); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override InputReferenceBase DuplicateInputReferenceBase() - { - return DuplicateInputReference(); - } - - /// - /// 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 InputReference); - } - - /// - /// Returns true if InputReference instances are equal - /// - /// Instance of InputReference to be compared - /// Boolean - public bool Equals(InputReference 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(@"^InputReference$", 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/InputReferenceBase.cs b/src/PollinationSDK/Model/InputReferenceBase.cs deleted file mode 100644 index 5f7492864..000000000 --- a/src/PollinationSDK/Model/InputReferenceBase.cs +++ /dev/null @@ -1,219 +0,0 @@ -/* - * 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 input reference. - /// - [DataContract(Name = "_InputReferenceBase")] - public partial class InputReferenceBase : BaseReference, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected InputReferenceBase() - { - // Set non-required readonly properties with defaultValue - this.Type = "_InputReferenceBase"; - } - - /// - /// Initializes a new instance of the class. - /// - /// The name of the DAG input variable (required). - /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. - public InputReferenceBase - ( - string variable, // Required parameters - Dictionary annotations= default // Optional parameters - ) : base(annotations: annotations)// BaseClass - { - // to ensure "variable" is required (not null) - this.Variable = variable ?? throw new ArgumentNullException("variable is a required property for InputReferenceBase and cannot be null"); - - // Set non-required readonly properties with defaultValue - this.Type = "_InputReferenceBase"; - } - - //============================================== is ReadOnly - /// - /// Gets or Sets Type - /// - [DataMember(Name = "type", EmitDefaultValue = true)] - public string Type { get; protected internal set; } = "_InputReferenceBase"; - - /// - /// The name of the DAG input variable - /// - /// The name of the DAG input variable - [DataMember(Name = "variable", IsRequired = true, EmitDefaultValue = false)] - public string Variable { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - return "InputReferenceBase"; - } - - /// - /// 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("InputReferenceBase:\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" Annotations: ").Append(Annotations).Append("\n"); - sb.Append(" Variable: ").Append(Variable).Append("\n"); - return sb.ToString(); - } - - /// - /// Returns the object from JSON string - /// - /// InputReferenceBase object - public static InputReferenceBase 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. - /// - /// InputReferenceBase object - public virtual InputReferenceBase DuplicateInputReferenceBase() - { - return FromJson(this.ToJson()); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel Duplicate() - { - return DuplicateInputReferenceBase(); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override BaseReference DuplicateBaseReference() - { - return DuplicateInputReferenceBase(); - } - - /// - /// 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 InputReferenceBase); - } - - /// - /// Returns true if InputReferenceBase instances are equal - /// - /// Instance of InputReferenceBase to be compared - /// Boolean - public bool Equals(InputReferenceBase input) - { - if (input == null) - return false; - return base.Equals(input) && - ( - this.Variable == input.Variable || - (this.Variable != null && - this.Variable.Equals(input.Variable)) - ) && 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.Variable != null) - hashCode = hashCode * 59 + this.Variable.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(@"^_InputReferenceBase$", 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/ItemReference.cs b/src/PollinationSDK/Model/ItemReference.cs deleted file mode 100644 index d78af44a2..000000000 --- a/src/PollinationSDK/Model/ItemReference.cs +++ /dev/null @@ -1,198 +0,0 @@ -/* - * 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 Item Reference. - /// - [DataContract(Name = "ItemReference")] - public partial class ItemReference : BaseReference, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// The name of the looped item variable (use dot notation for nested json values). - /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. - public ItemReference - ( - // Required parameters - Dictionary annotations= default, string variable= default // Optional parameters - ) : base(annotations: annotations)// BaseClass - { - this.Variable = variable; - - // Set non-required readonly properties with defaultValue - this.Type = "ItemReference"; - } - - //============================================== is ReadOnly - /// - /// Gets or Sets Type - /// - [DataMember(Name = "type", EmitDefaultValue = true)] - public string Type { get; protected internal set; } = "ItemReference"; - - /// - /// The name of the looped item variable (use dot notation for nested json values) - /// - /// The name of the looped item variable (use dot notation for nested json values) - [DataMember(Name = "variable", EmitDefaultValue = false)] - public string Variable { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - return "ItemReference"; - } - - /// - /// 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("ItemReference:\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" Annotations: ").Append(Annotations).Append("\n"); - sb.Append(" Variable: ").Append(Variable).Append("\n"); - return sb.ToString(); - } - - /// - /// Returns the object from JSON string - /// - /// ItemReference object - public static ItemReference 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. - /// - /// ItemReference object - public virtual ItemReference DuplicateItemReference() - { - return FromJson(this.ToJson()); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel Duplicate() - { - return DuplicateItemReference(); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override BaseReference DuplicateBaseReference() - { - return DuplicateItemReference(); - } - - /// - /// 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 ItemReference); - } - - /// - /// Returns true if ItemReference instances are equal - /// - /// Instance of ItemReference to be compared - /// Boolean - public bool Equals(ItemReference input) - { - if (input == null) - return false; - return base.Equals(input) && - ( - this.Variable == input.Variable || - (this.Variable != null && - this.Variable.Equals(input.Variable)) - ) && 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.Variable != null) - hashCode = hashCode * 59 + this.Variable.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(@"^ItemReference$", 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/ItemType.cs b/src/PollinationSDK/Model/ItemType.cs deleted file mode 100644 index f8fb7f504..000000000 --- a/src/PollinationSDK/Model/ItemType.cs +++ /dev/null @@ -1,79 +0,0 @@ -/* - * 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 -{ - /// - /// Type enum for items in a list. Items can not be files or folder. For a list of files you should copy them to a folder and use FolderInput input instead of using ArrayInput. - /// - /// Type enum for items in a list. Items can not be files or folder. For a list of files you should copy them to a folder and use FolderInput input instead of using ArrayInput. - - [JsonConverter(typeof(StringEnumConverter))] - - public enum ItemType - { - /// - /// Enum Generic for value: Generic - /// - [EnumMember(Value = "Generic")] - Generic = 1, - - /// - /// Enum String for value: String - /// - [EnumMember(Value = "String")] - String = 2, - - /// - /// Enum Integer for value: Integer - /// - [EnumMember(Value = "Integer")] - Integer = 3, - - /// - /// Enum Number for value: Number - /// - [EnumMember(Value = "Number")] - Number = 4, - - /// - /// Enum Boolean for value: Boolean - /// - [EnumMember(Value = "Boolean")] - Boolean = 5, - - /// - /// Enum Array for value: Array - /// - [EnumMember(Value = "Array")] - Array = 6, - - /// - /// Enum JSONObject for value: JSONObject - /// - [EnumMember(Value = "JSONObject")] - JSONObject = 7 - - } - -} diff --git a/src/PollinationSDK/Model/Job.cs b/src/PollinationSDK/Model/Job.cs deleted file mode 100644 index 3c06fbd3e..000000000 --- a/src/PollinationSDK/Model/Job.cs +++ /dev/null @@ -1,315 +0,0 @@ -/* - * 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 -{ - /// - /// Queenbee Job. A Job is an object to submit a list of arguments to execute a Queenbee recipe. - /// - [DataContract(Name = "Job")] - public partial class Job : OpenAPIGenBaseModel, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected Job() - { - // Set non-required readonly properties with defaultValue - this.Type = "Job"; - this.ApiVersion = "v1beta1"; - } - - /// - /// Initializes a new instance of the class. - /// - /// The source url for downloading the recipe. (required). - /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. - /// Input arguments for this job.. - /// An optional name for this job. This name will be used a the display name for the run.. - /// Run 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.. - public Job - ( - string source, // Required parameters - Dictionary annotations= default, List>> arguments= default, string name= default, string description= default, Dictionary labels= default// Optional parameters - ) : base()// BaseClass - { - // to ensure "source" is required (not null) - this.Source = source ?? throw new ArgumentNullException("source is a required property for Job and cannot be null"); - this.Annotations = annotations; - this.Arguments = arguments; - this.Name = name; - this.Description = description; - this.Labels = labels; - - // Set non-required readonly properties with defaultValue - this.Type = "Job"; - this.ApiVersion = "v1beta1"; - } - - //============================================== is ReadOnly - /// - /// Gets or Sets Type - /// - [DataMember(Name = "type", EmitDefaultValue = true)] - public string Type { get; protected internal set; } = "Job"; - //============================================== is ReadOnly - /// - /// Gets or Sets ApiVersion - /// - [DataMember(Name = "api_version", EmitDefaultValue = true)] - public string ApiVersion { get; protected internal set; } = "v1beta1"; - - /// - /// The source url for downloading the recipe. - /// - /// The source url for downloading the recipe. - [DataMember(Name = "source", IsRequired = true, EmitDefaultValue = false)] - public string Source { 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 job. - /// - /// Input arguments for this job. - [DataMember(Name = "arguments", EmitDefaultValue = false)] - public List>> Arguments { get; set; } - /// - /// An optional name for this job. This name will be used a the display name for the run. - /// - /// An optional name for this job. This name will be used a the display name for the run. - [DataMember(Name = "name", EmitDefaultValue = false)] - public string Name { get; set; } - /// - /// Run description. - /// - /// Run description. - [DataMember(Name = "description", EmitDefaultValue = false)] - public string Description { get; set; } - /// - /// Optional user data as a dictionary. User data is for user reference only and will not be used in the execution of the job. - /// - /// Optional user data as a dictionary. User data is for user reference only and will not be used in the execution of the job. - [DataMember(Name = "labels", EmitDefaultValue = false)] - public Dictionary Labels { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - return "Job"; - } - - /// - /// 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("Job:\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" Source: ").Append(Source).Append("\n"); - sb.Append(" Annotations: ").Append(Annotations).Append("\n"); - sb.Append(" ApiVersion: ").Append(ApiVersion).Append("\n"); - sb.Append(" Arguments: ").Append(Arguments).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" Labels: ").Append(Labels).Append("\n"); - return sb.ToString(); - } - - /// - /// Returns the object from JSON string - /// - /// Job object - public static Job 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. - /// - /// Job object - public virtual Job DuplicateJob() - { - return FromJson(this.ToJson()); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel Duplicate() - { - return DuplicateJob(); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel DuplicateOpenAPIGenBaseModel() - { - return DuplicateJob(); - } - - /// - /// 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 Job); - } - - /// - /// Returns true if Job instances are equal - /// - /// Instance of Job to be compared - /// Boolean - public bool Equals(Job input) - { - if (input == null) - return false; - return base.Equals(input) && - ( - this.Source == input.Source || - (this.Source != null && - this.Source.Equals(input.Source)) - ) && base.Equals(input) && - ( - this.Type == input.Type || - (this.Type != null && - this.Type.Equals(input.Type)) - ) && 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.Arguments == input.Arguments || - this.Arguments != null && - input.Arguments != null && - this.Arguments.SequenceEqual(input.Arguments) - ) && 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.Labels == input.Labels || - this.Labels != null && - input.Labels != null && - this.Labels.SequenceEqual(input.Labels) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = base.GetHashCode(); - if (this.Source != null) - hashCode = hashCode * 59 + this.Source.GetHashCode(); - if (this.Type != null) - hashCode = hashCode * 59 + this.Type.GetHashCode(); - if (this.Annotations != null) - hashCode = hashCode * 59 + this.Annotations.GetHashCode(); - if (this.ApiVersion != null) - hashCode = hashCode * 59 + this.ApiVersion.GetHashCode(); - if (this.Arguments != null) - hashCode = hashCode * 59 + this.Arguments.GetHashCode(); - if (this.Name != null) - hashCode = hashCode * 59 + this.Name.GetHashCode(); - if (this.Description != null) - hashCode = hashCode * 59 + this.Description.GetHashCode(); - if (this.Labels != null) - hashCode = hashCode * 59 + this.Labels.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(@"^Job$", 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" }); - } - - - - // 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" }); - } - - yield break; - } - } -} diff --git a/src/PollinationSDK/Model/JobArgument.cs b/src/PollinationSDK/Model/JobArgument.cs deleted file mode 100644 index b85a47fb5..000000000 --- a/src/PollinationSDK/Model/JobArgument.cs +++ /dev/null @@ -1,241 +0,0 @@ -/* - * 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 -{ - /// - /// Job argument is an argument input for arguments which are not files or folders. - /// - [DataContract(Name = "JobArgument")] - public partial class JobArgument : OpenAPIGenBaseModel, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected JobArgument() - { - // Set non-required readonly properties with defaultValue - this.Type = "JobArgument"; - } - - /// - /// Initializes a new instance of the class. - /// - /// Argument name. The name must match one of the input names from Job's DAG template. (required). - /// The value of the job argument. (required). - /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. - public JobArgument - ( - string name, object value, // Required parameters - Dictionary annotations= default// Optional parameters - ) : base()// BaseClass - { - // to ensure "name" is required (not null) - this.Name = name ?? throw new ArgumentNullException("name is a required property for JobArgument and cannot be null"); - // to ensure "value" is required (not null) - this.Value = value ?? throw new ArgumentNullException("value is a required property for JobArgument and cannot be null"); - this.Annotations = annotations; - - // Set non-required readonly properties with defaultValue - this.Type = "JobArgument"; - } - - //============================================== is ReadOnly - /// - /// Gets or Sets Type - /// - [DataMember(Name = "type", EmitDefaultValue = true)] - public string Type { get; protected internal set; } = "JobArgument"; - - /// - /// Argument name. The name must match one of the input names from Job's DAG template. - /// - /// Argument name. The name must match one of the input names from Job's DAG template. - [DataMember(Name = "name", IsRequired = true, EmitDefaultValue = false)] - public string Name { get; set; } - /// - /// The value of the job argument. - /// - /// The value of the job argument. - [DataMember(Name = "value", IsRequired = true, EmitDefaultValue = true)] - public object Value { 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; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - return "JobArgument"; - } - - /// - /// 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("JobArgument:\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" Value: ").Append(Value).Append("\n"); - sb.Append(" Annotations: ").Append(Annotations).Append("\n"); - return sb.ToString(); - } - - /// - /// Returns the object from JSON string - /// - /// JobArgument object - public static JobArgument 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. - /// - /// JobArgument object - public virtual JobArgument DuplicateJobArgument() - { - return FromJson(this.ToJson()); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel Duplicate() - { - return DuplicateJobArgument(); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel DuplicateOpenAPIGenBaseModel() - { - return DuplicateJobArgument(); - } - - /// - /// 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 JobArgument); - } - - /// - /// Returns true if JobArgument instances are equal - /// - /// Instance of JobArgument to be compared - /// Boolean - public bool Equals(JobArgument 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.Value == input.Value || - (this.Value != null && - this.Value.Equals(input.Value)) - ) && base.Equals(input) && - ( - this.Type == input.Type || - (this.Type != null && - this.Type.Equals(input.Type)) - ) && base.Equals(input) && - ( - this.Annotations == input.Annotations || - this.Annotations != null && - input.Annotations != null && - this.Annotations.SequenceEqual(input.Annotations) - ); - } - - /// - /// 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.Value != null) - hashCode = hashCode * 59 + this.Value.GetHashCode(); - if (this.Type != null) - hashCode = hashCode * 59 + this.Type.GetHashCode(); - if (this.Annotations != null) - hashCode = hashCode * 59 + this.Annotations.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(@"^JobArgument$", 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/JobPathArgument.cs b/src/PollinationSDK/Model/JobPathArgument.cs deleted file mode 100644 index ee39415f9..000000000 --- a/src/PollinationSDK/Model/JobPathArgument.cs +++ /dev/null @@ -1,241 +0,0 @@ -/* - * 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 -{ - /// - /// BaseModel with functionality to return the object as a yaml string. - /// - [DataContract(Name = "JobPathArgument")] - public partial class JobPathArgument : OpenAPIGenBaseModel, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected JobPathArgument() - { - // Set non-required readonly properties with defaultValue - this.Type = "JobPathArgument"; - } - - /// - /// Initializes a new instance of the class. - /// - /// Argument name. The name must match one of the input names from Job's template which can be a function or DAG. (required). - /// The path to source the file from. (required). - /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. - public JobPathArgument - ( - string name, AnyOf source, // Required parameters - Dictionary annotations= default// Optional parameters - ) : base()// BaseClass - { - // to ensure "name" is required (not null) - this.Name = name ?? throw new ArgumentNullException("name is a required property for JobPathArgument and cannot be null"); - // to ensure "source" is required (not null) - this.Source = source ?? throw new ArgumentNullException("source is a required property for JobPathArgument and cannot be null"); - this.Annotations = annotations; - - // Set non-required readonly properties with defaultValue - this.Type = "JobPathArgument"; - } - - //============================================== is ReadOnly - /// - /// Gets or Sets Type - /// - [DataMember(Name = "type", EmitDefaultValue = true)] - public string Type { get; protected internal set; } = "JobPathArgument"; - - /// - /// Argument name. The name must match one of the input names from Job's template which can be a function or DAG. - /// - /// Argument name. The name must match one of the input names from Job's template which can be a function or DAG. - [DataMember(Name = "name", IsRequired = true, EmitDefaultValue = false)] - public string Name { get; set; } - /// - /// The path to source the file from. - /// - /// The path to source the file from. - [DataMember(Name = "source", IsRequired = true, EmitDefaultValue = false)] - public AnyOf Source { 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; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - return "JobPathArgument"; - } - - /// - /// 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("JobPathArgument:\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" Source: ").Append(Source).Append("\n"); - sb.Append(" Annotations: ").Append(Annotations).Append("\n"); - return sb.ToString(); - } - - /// - /// Returns the object from JSON string - /// - /// JobPathArgument object - public static JobPathArgument 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. - /// - /// JobPathArgument object - public virtual JobPathArgument DuplicateJobPathArgument() - { - return FromJson(this.ToJson()); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel Duplicate() - { - return DuplicateJobPathArgument(); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel DuplicateOpenAPIGenBaseModel() - { - return DuplicateJobPathArgument(); - } - - /// - /// 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 JobPathArgument); - } - - /// - /// Returns true if JobPathArgument instances are equal - /// - /// Instance of JobPathArgument to be compared - /// Boolean - public bool Equals(JobPathArgument 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.Source == input.Source || - (this.Source != null && - this.Source.Equals(input.Source)) - ) && base.Equals(input) && - ( - this.Type == input.Type || - (this.Type != null && - this.Type.Equals(input.Type)) - ) && base.Equals(input) && - ( - this.Annotations == input.Annotations || - this.Annotations != null && - input.Annotations != null && - this.Annotations.SequenceEqual(input.Annotations) - ); - } - - /// - /// 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.Source != null) - hashCode = hashCode * 59 + this.Source.GetHashCode(); - if (this.Type != null) - hashCode = hashCode * 59 + this.Type.GetHashCode(); - if (this.Annotations != null) - hashCode = hashCode * 59 + this.Annotations.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(@"^JobPathArgument$", 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/JobStatus.cs b/src/PollinationSDK/Model/JobStatus.cs deleted file mode 100644 index 6daefa024..000000000 --- a/src/PollinationSDK/Model/JobStatus.cs +++ /dev/null @@ -1,409 +0,0 @@ -/* - * 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 -{ - /// - /// Parametric Job Status. - /// - [DataContract(Name = "JobStatus")] - public partial class JobStatus : OpenAPIGenBaseModel, IEquatable, IValidatableObject - { - /// - /// The status of this job. - /// - /// The status of this job. - [DataMember(Name="status", EmitDefaultValue=false)] - public JobStatusEnum Status { get; set; } = JobStatusEnum.Unknown; - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected JobStatus() - { - // Set non-required readonly properties with defaultValue - this.Type = "JobStatus"; - this.ApiVersion = "v1beta1"; - } - - /// - /// Initializes a new instance of the class. - /// - /// The ID of the individual job. (required). - /// The time at which the job was started (required). - /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. - /// The status of this job.. - /// Any message produced by the job. Usually error/debugging hints.. - /// The time at which the task was completed. - /// Source url for the status object. It can be a recipe or a function.. - /// The count of runs that are pending (default to 0). - /// The count of runs that are running (default to 0). - /// The count of runs that have completed (default to 0). - /// The count of runs that have failed (default to 0). - /// The count of runs that have been cancelled (default to 0). - public JobStatus - ( - string id, DateTime startedAt, // Required parameters - Dictionary annotations= default, JobStatusEnum status= JobStatusEnum.Unknown, string message= default, DateTime finishedAt= default, string source= default, int runsPending = 0, int runsRunning = 0, int runsCompleted = 0, int runsFailed = 0, int runsCancelled = 0// Optional parameters - ) : base()// BaseClass - { - // to ensure "id" is required (not null) - this.Id = id ?? throw new ArgumentNullException("id is a required property for JobStatus and cannot be null"); - this.StartedAt = startedAt; - this.Annotations = annotations; - this.Status = status; - this.Message = message; - this.FinishedAt = finishedAt; - this.Source = source; - this.RunsPending = runsPending; - this.RunsRunning = runsRunning; - this.RunsCompleted = runsCompleted; - this.RunsFailed = runsFailed; - this.RunsCancelled = runsCancelled; - - // Set non-required readonly properties with defaultValue - this.Type = "JobStatus"; - this.ApiVersion = "v1beta1"; - } - - //============================================== is ReadOnly - /// - /// Gets or Sets Type - /// - [DataMember(Name = "type", EmitDefaultValue = true)] - public string Type { get; protected internal set; } = "JobStatus"; - //============================================== is ReadOnly - /// - /// Gets or Sets ApiVersion - /// - [DataMember(Name = "api_version", EmitDefaultValue = true)] - public string ApiVersion { get; protected internal set; } = "v1beta1"; - - /// - /// The ID of the individual job. - /// - /// The ID of the individual job. - [DataMember(Name = "id", IsRequired = true, EmitDefaultValue = false)] - public string Id { get; set; } - /// - /// The time at which the job was started - /// - /// The time at which the job was started - [DataMember(Name = "started_at", IsRequired = true, EmitDefaultValue = false)] - public DateTime StartedAt { 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; } - /// - /// Any message produced by the job. Usually error/debugging hints. - /// - /// Any message produced by the job. Usually error/debugging hints. - [DataMember(Name = "message", EmitDefaultValue = false)] - public string Message { get; set; } - /// - /// The time at which the task was completed - /// - /// The time at which the task was completed - [DataMember(Name = "finished_at", EmitDefaultValue = false)] - public DateTime FinishedAt { get; set; } - /// - /// Source url for the status object. It can be a recipe or a function. - /// - /// Source url for the status object. It can be a recipe or a function. - [DataMember(Name = "source", EmitDefaultValue = false)] - public string Source { get; set; } - /// - /// The count of runs that are pending - /// - /// The count of runs that are pending - [DataMember(Name = "runs_pending", EmitDefaultValue = true)] - public int RunsPending { get; set; } = 0; - /// - /// The count of runs that are running - /// - /// The count of runs that are running - [DataMember(Name = "runs_running", EmitDefaultValue = true)] - public int RunsRunning { get; set; } = 0; - /// - /// The count of runs that have completed - /// - /// The count of runs that have completed - [DataMember(Name = "runs_completed", EmitDefaultValue = true)] - public int RunsCompleted { get; set; } = 0; - /// - /// The count of runs that have failed - /// - /// The count of runs that have failed - [DataMember(Name = "runs_failed", EmitDefaultValue = true)] - public int RunsFailed { get; set; } = 0; - /// - /// The count of runs that have been cancelled - /// - /// The count of runs that have been cancelled - [DataMember(Name = "runs_cancelled", EmitDefaultValue = true)] - public int RunsCancelled { get; set; } = 0; - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - return "JobStatus"; - } - - /// - /// 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("JobStatus:\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" StartedAt: ").Append(StartedAt).Append("\n"); - sb.Append(" Annotations: ").Append(Annotations).Append("\n"); - sb.Append(" ApiVersion: ").Append(ApiVersion).Append("\n"); - sb.Append(" Status: ").Append(Status).Append("\n"); - sb.Append(" Message: ").Append(Message).Append("\n"); - sb.Append(" FinishedAt: ").Append(FinishedAt).Append("\n"); - sb.Append(" Source: ").Append(Source).Append("\n"); - sb.Append(" RunsPending: ").Append(RunsPending).Append("\n"); - sb.Append(" RunsRunning: ").Append(RunsRunning).Append("\n"); - sb.Append(" RunsCompleted: ").Append(RunsCompleted).Append("\n"); - sb.Append(" RunsFailed: ").Append(RunsFailed).Append("\n"); - sb.Append(" RunsCancelled: ").Append(RunsCancelled).Append("\n"); - return sb.ToString(); - } - - /// - /// Returns the object from JSON string - /// - /// JobStatus object - public static JobStatus 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. - /// - /// JobStatus object - public virtual JobStatus DuplicateJobStatus() - { - return FromJson(this.ToJson()); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel Duplicate() - { - return DuplicateJobStatus(); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel DuplicateOpenAPIGenBaseModel() - { - return DuplicateJobStatus(); - } - - /// - /// 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 JobStatus); - } - - /// - /// Returns true if JobStatus instances are equal - /// - /// Instance of JobStatus to be compared - /// Boolean - public bool Equals(JobStatus 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.StartedAt == input.StartedAt || - (this.StartedAt != null && - this.StartedAt.Equals(input.StartedAt)) - ) && base.Equals(input) && - ( - this.Type == input.Type || - (this.Type != null && - this.Type.Equals(input.Type)) - ) && 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.Status == input.Status || - (this.Status != null && - this.Status.Equals(input.Status)) - ) && base.Equals(input) && - ( - this.Message == input.Message || - (this.Message != null && - this.Message.Equals(input.Message)) - ) && base.Equals(input) && - ( - this.FinishedAt == input.FinishedAt || - (this.FinishedAt != null && - this.FinishedAt.Equals(input.FinishedAt)) - ) && base.Equals(input) && - ( - this.Source == input.Source || - (this.Source != null && - this.Source.Equals(input.Source)) - ) && base.Equals(input) && - ( - this.RunsPending == input.RunsPending || - (this.RunsPending != null && - this.RunsPending.Equals(input.RunsPending)) - ) && base.Equals(input) && - ( - this.RunsRunning == input.RunsRunning || - (this.RunsRunning != null && - this.RunsRunning.Equals(input.RunsRunning)) - ) && base.Equals(input) && - ( - this.RunsCompleted == input.RunsCompleted || - (this.RunsCompleted != null && - this.RunsCompleted.Equals(input.RunsCompleted)) - ) && base.Equals(input) && - ( - this.RunsFailed == input.RunsFailed || - (this.RunsFailed != null && - this.RunsFailed.Equals(input.RunsFailed)) - ) && base.Equals(input) && - ( - this.RunsCancelled == input.RunsCancelled || - (this.RunsCancelled != null && - this.RunsCancelled.Equals(input.RunsCancelled)) - ); - } - - /// - /// 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.StartedAt != null) - hashCode = hashCode * 59 + this.StartedAt.GetHashCode(); - if (this.Type != null) - hashCode = hashCode * 59 + this.Type.GetHashCode(); - if (this.Annotations != null) - hashCode = hashCode * 59 + this.Annotations.GetHashCode(); - if (this.ApiVersion != null) - hashCode = hashCode * 59 + this.ApiVersion.GetHashCode(); - if (this.Status != null) - hashCode = hashCode * 59 + this.Status.GetHashCode(); - if (this.Message != null) - hashCode = hashCode * 59 + this.Message.GetHashCode(); - if (this.FinishedAt != null) - hashCode = hashCode * 59 + this.FinishedAt.GetHashCode(); - if (this.Source != null) - hashCode = hashCode * 59 + this.Source.GetHashCode(); - if (this.RunsPending != null) - hashCode = hashCode * 59 + this.RunsPending.GetHashCode(); - if (this.RunsRunning != null) - hashCode = hashCode * 59 + this.RunsRunning.GetHashCode(); - if (this.RunsCompleted != null) - hashCode = hashCode * 59 + this.RunsCompleted.GetHashCode(); - if (this.RunsFailed != null) - hashCode = hashCode * 59 + this.RunsFailed.GetHashCode(); - if (this.RunsCancelled != null) - hashCode = hashCode * 59 + this.RunsCancelled.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(@"^JobStatus$", 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" }); - } - - - - // 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" }); - } - - yield break; - } - } -} diff --git a/src/PollinationSDK/Model/JobStatusEnum.cs b/src/PollinationSDK/Model/JobStatusEnum.cs deleted file mode 100644 index fa97a13b1..000000000 --- a/src/PollinationSDK/Model/JobStatusEnum.cs +++ /dev/null @@ -1,79 +0,0 @@ -/* - * 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 -{ - /// - /// Enumaration of allowable status strings - /// - /// Enumaration of allowable status strings - - [JsonConverter(typeof(StringEnumConverter))] - - public enum JobStatusEnum - { - /// - /// Enum Created for value: Created - /// - [EnumMember(Value = "Created")] - Created = 1, - - /// - /// Enum PreProcessing for value: Pre-Processing - /// - [EnumMember(Value = "Pre-Processing")] - PreProcessing = 2, - - /// - /// Enum Running for value: Running - /// - [EnumMember(Value = "Running")] - Running = 3, - - /// - /// Enum Failed for value: Failed - /// - [EnumMember(Value = "Failed")] - Failed = 4, - - /// - /// Enum Cancelled for value: Cancelled - /// - [EnumMember(Value = "Cancelled")] - Cancelled = 5, - - /// - /// Enum Completed for value: Completed - /// - [EnumMember(Value = "Completed")] - Completed = 6, - - /// - /// Enum Unknown for value: Unknown - /// - [EnumMember(Value = "Unknown")] - Unknown = 7 - - } - -} diff --git a/src/PollinationSDK/Model/KeyRequest.cs b/src/PollinationSDK/Model/KeyRequest.cs deleted file mode 100644 index 544339aea..000000000 --- a/src/PollinationSDK/Model/KeyRequest.cs +++ /dev/null @@ -1,206 +0,0 @@ -/* - * 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 -{ - /// - /// KeyRequest - /// - [DataContract(Name = "KeyRequest")] - public partial class KeyRequest : OpenAPIGenBaseModel, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected KeyRequest() - { - // Set non-required readonly properties with defaultValue - this.Type = "KeyRequest"; - } - - /// - /// Initializes a new instance of the class. - /// - /// key (required). - public KeyRequest - ( - string key// Required parameters - // Optional parameters - ) : base()// BaseClass - { - // to ensure "key" is required (not null) - this.Key = key ?? throw new ArgumentNullException("key is a required property for KeyRequest and cannot be null"); - - // Set non-required readonly properties with defaultValue - this.Type = "KeyRequest"; - } - - //============================================== is ReadOnly - /// - /// Gets or Sets Type - /// - [DataMember(Name = "type", EmitDefaultValue = true)] - public string Type { get; protected internal set; } = "KeyRequest"; - - /// - /// Gets or Sets Key - /// - [DataMember(Name = "key", IsRequired = true, EmitDefaultValue = false)] - public string Key { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - return "KeyRequest"; - } - - /// - /// 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("KeyRequest:\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" Key: ").Append(Key).Append("\n"); - return sb.ToString(); - } - - /// - /// Returns the object from JSON string - /// - /// KeyRequest object - public static KeyRequest 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. - /// - /// KeyRequest object - public virtual KeyRequest DuplicateKeyRequest() - { - return FromJson(this.ToJson()); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel Duplicate() - { - return DuplicateKeyRequest(); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel DuplicateOpenAPIGenBaseModel() - { - return DuplicateKeyRequest(); - } - - /// - /// 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 KeyRequest); - } - - /// - /// Returns true if KeyRequest instances are equal - /// - /// Instance of KeyRequest to be compared - /// Boolean - public bool Equals(KeyRequest 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.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.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(@"^KeyRequest$", 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 deleted file mode 100644 index 25f521413..000000000 --- a/src/PollinationSDK/Model/License.cs +++ /dev/null @@ -1,252 +0,0 @@ -/* - * 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 -{ - /// - /// License information for the Package - /// - [DataContract(Name = "License")] - public partial class License : OpenAPIGenBaseModel, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected License() - { - // Set non-required readonly properties with defaultValue - this.Type = "License"; - } - - /// - /// Initializes a new instance of the class. - /// - /// 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 License - ( - string name, // Required parameters - Dictionary annotations= default, string url= default// Optional parameters - ) : base()// BaseClass - { - // to ensure "name" is required (not null) - this.Name = name ?? throw new ArgumentNullException("name is a required property for License and cannot be null"); - this.Annotations = annotations; - this.Url = url; - - // Set non-required readonly properties with defaultValue - this.Type = "License"; - } - - //============================================== is ReadOnly - /// - /// Gets or Sets Type - /// - [DataMember(Name = "type", EmitDefaultValue = true)] - public string Type { get; protected internal set; } = "License"; - - /// - /// The license name used for the package. - /// - /// The license name used for the package. - [DataMember(Name = "name", IsRequired = true, EmitDefaultValue = false)] - public string Name { 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; } - /// - /// A URL to the license used for the package. - /// - /// A URL to the license used for the package. - [DataMember(Name = "url", EmitDefaultValue = false)] - public string Url { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - return "License"; - } - - /// - /// 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("License:\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"); - return sb.ToString(); - } - - /// - /// Returns the object from JSON string - /// - /// License object - public static License 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. - /// - /// License object - public virtual License DuplicateLicense() - { - return FromJson(this.ToJson()); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel Duplicate() - { - return DuplicateLicense(); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel DuplicateOpenAPIGenBaseModel() - { - return DuplicateLicense(); - } - - /// - /// 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 License); - } - - /// - /// Returns true if License instances are equal - /// - /// Instance of License to be compared - /// Boolean - public bool Equals(License 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.Type == input.Type || - (this.Type != null && - this.Type.Equals(input.Type)) - ) && base.Equals(input) && - ( - this.Annotations == input.Annotations || - this.Annotations != null && - input.Annotations != null && - this.Annotations.SequenceEqual(input.Annotations) - ) && base.Equals(input) && - ( - this.Url == input.Url || - (this.Url != null && - this.Url.Equals(input.Url)) - ); - } - - /// - /// 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.Type != null) - hashCode = hashCode * 59 + this.Type.GetHashCode(); - if (this.Annotations != null) - hashCode = hashCode * 59 + this.Annotations.GetHashCode(); - if (this.Url != null) - hashCode = hashCode * 59 + this.Url.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(@"^License$", 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" }); - } - - // Url (string) maxLength - if(this.Url != null && this.Url.Length > 65536) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Url, length must be less than 65536.", new [] { "Url" }); - } - - // Url (string) minLength - if(this.Url != null && this.Url.Length < 1) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Url, length must be greater than 1.", new [] { "Url" }); - } - - yield break; - } - } -} diff --git a/src/PollinationSDK/Model/ListResponseMeta.cs b/src/PollinationSDK/Model/ListResponseMeta.cs deleted file mode 100644 index 64e00cc7d..000000000 --- a/src/PollinationSDK/Model/ListResponseMeta.cs +++ /dev/null @@ -1,287 +0,0 @@ -/* - * 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 = "ListResponseMeta")] - public partial class ListResponseMeta : OpenAPIGenBaseModel, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected ListResponseMeta() - { - // Set non-required readonly properties with defaultValue - this.Type = "ListResponseMeta"; - } - - /// - /// 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). - /// The next page, if this on is not the last. - /// The list of resources returned from the list query. - public ListResponseMeta - ( - int page, int perPage, int pageCount, int totalCount, // Required parameters - int nextPage= default, List resources= default // Optional parameters - ) : base()// BaseClass - { - this.Page = page; - this.PerPage = perPage; - this.PageCount = pageCount; - this.TotalCount = totalCount; - this.NextPage = nextPage; - this.Resources = resources; - - // Set non-required readonly properties with defaultValue - this.Type = "ListResponseMeta"; - } - - //============================================== is ReadOnly - /// - /// Gets or Sets Type - /// - [DataMember(Name = "type", EmitDefaultValue = true)] - public string Type { get; protected internal set; } = "ListResponseMeta"; - - /// - /// 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; } - /// - /// 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; } - /// - /// The list of resources returned from the list query - /// - /// The list of resources returned from the list query - [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 "ListResponseMeta"; - } - - /// - /// 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("ListResponseMeta:\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(" NextPage: ").Append(NextPage).Append("\n"); - sb.Append(" Resources: ").Append(Resources).Append("\n"); - return sb.ToString(); - } - - /// - /// Returns the object from JSON string - /// - /// ListResponseMeta object - public static ListResponseMeta 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. - /// - /// ListResponseMeta object - public virtual ListResponseMeta DuplicateListResponseMeta() - { - return FromJson(this.ToJson()); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel Duplicate() - { - return DuplicateListResponseMeta(); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel DuplicateOpenAPIGenBaseModel() - { - return DuplicateListResponseMeta(); - } - - /// - /// 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 ListResponseMeta); - } - - /// - /// Returns true if ListResponseMeta instances are equal - /// - /// Instance of ListResponseMeta to be compared - /// Boolean - public bool Equals(ListResponseMeta 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.NextPage == input.NextPage || - (this.NextPage != null && - this.NextPage.Equals(input.NextPage)) - ) && 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.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.NextPage != null) - hashCode = hashCode * 59 + this.NextPage.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(@"^ListResponseMeta$", 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/LocalConfig.cs b/src/PollinationSDK/Model/LocalConfig.cs deleted file mode 100644 index 742a0a7e6..000000000 --- a/src/PollinationSDK/Model/LocalConfig.cs +++ /dev/null @@ -1,197 +0,0 @@ -/* - * 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 -{ - /// - /// Plugin Configuration to run on a desktop. - /// - [DataContract(Name = "LocalConfig")] - public partial class LocalConfig : OpenAPIGenBaseModel, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. - public LocalConfig - ( - // Required parameters - Dictionary annotations= default// Optional parameters - ) : base()// BaseClass - { - this.Annotations = annotations; - - // Set non-required readonly properties with defaultValue - this.Type = "LocalConfig"; - } - - //============================================== is ReadOnly - /// - /// Gets or Sets Type - /// - [DataMember(Name = "type", EmitDefaultValue = true)] - public string Type { get; protected internal set; } = "LocalConfig"; - - /// - /// 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; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - return "LocalConfig"; - } - - /// - /// 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("LocalConfig:\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" Annotations: ").Append(Annotations).Append("\n"); - return sb.ToString(); - } - - /// - /// Returns the object from JSON string - /// - /// LocalConfig object - public static LocalConfig 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. - /// - /// LocalConfig object - public virtual LocalConfig DuplicateLocalConfig() - { - return FromJson(this.ToJson()); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel Duplicate() - { - return DuplicateLocalConfig(); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel DuplicateOpenAPIGenBaseModel() - { - return DuplicateLocalConfig(); - } - - /// - /// 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 LocalConfig); - } - - /// - /// Returns true if LocalConfig instances are equal - /// - /// Instance of LocalConfig to be compared - /// Boolean - public bool Equals(LocalConfig 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.Annotations == input.Annotations || - this.Annotations != null && - input.Annotations != null && - this.Annotations.SequenceEqual(input.Annotations) - ); - } - - /// - /// 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.Annotations != null) - hashCode = hashCode * 59 + this.Annotations.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(@"^LocalConfig", 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/Maintainer.cs b/src/PollinationSDK/Model/Maintainer.cs deleted file mode 100644 index 1bf1e88e8..000000000 --- a/src/PollinationSDK/Model/Maintainer.cs +++ /dev/null @@ -1,240 +0,0 @@ -/* - * 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 -{ - /// - /// Maintainer information - /// - [DataContract(Name = "Maintainer")] - public partial class Maintainer : OpenAPIGenBaseModel, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected Maintainer() - { - // Set non-required readonly properties with defaultValue - this.Type = "Maintainer"; - } - - /// - /// Initializes a new instance of the class. - /// - /// The name of the author/maintainer person or organization. (required). - /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. - /// The email address of the author/maintainer person or organization.. - public Maintainer - ( - string name, // Required parameters - Dictionary annotations= default, string email= default// Optional parameters - ) : base()// BaseClass - { - // to ensure "name" is required (not null) - this.Name = name ?? throw new ArgumentNullException("name is a required property for Maintainer and cannot be null"); - this.Annotations = annotations; - this.Email = email; - - // Set non-required readonly properties with defaultValue - this.Type = "Maintainer"; - } - - //============================================== is ReadOnly - /// - /// Gets or Sets Type - /// - [DataMember(Name = "type", EmitDefaultValue = true)] - public string Type { get; protected internal set; } = "Maintainer"; - - /// - /// The name of the author/maintainer person or organization. - /// - /// The name of the author/maintainer person or organization. - [DataMember(Name = "name", IsRequired = true, EmitDefaultValue = false)] - public string Name { 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; } - /// - /// The email address of the author/maintainer person or organization. - /// - /// The email address of the author/maintainer person or organization. - [DataMember(Name = "email", EmitDefaultValue = false)] - public string Email { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - return "Maintainer"; - } - - /// - /// 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("Maintainer:\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" Annotations: ").Append(Annotations).Append("\n"); - sb.Append(" Email: ").Append(Email).Append("\n"); - return sb.ToString(); - } - - /// - /// Returns the object from JSON string - /// - /// Maintainer object - public static Maintainer 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. - /// - /// Maintainer object - public virtual Maintainer DuplicateMaintainer() - { - return FromJson(this.ToJson()); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel Duplicate() - { - return DuplicateMaintainer(); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel DuplicateOpenAPIGenBaseModel() - { - return DuplicateMaintainer(); - } - - /// - /// 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 Maintainer); - } - - /// - /// Returns true if Maintainer instances are equal - /// - /// Instance of Maintainer to be compared - /// Boolean - public bool Equals(Maintainer 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.Type == input.Type || - (this.Type != null && - this.Type.Equals(input.Type)) - ) && base.Equals(input) && - ( - this.Annotations == input.Annotations || - this.Annotations != null && - input.Annotations != null && - this.Annotations.SequenceEqual(input.Annotations) - ) && base.Equals(input) && - ( - this.Email == input.Email || - (this.Email != null && - this.Email.Equals(input.Email)) - ); - } - - /// - /// 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.Type != null) - hashCode = hashCode * 59 + this.Type.GetHashCode(); - if (this.Annotations != null) - hashCode = hashCode * 59 + this.Annotations.GetHashCode(); - if (this.Email != null) - hashCode = hashCode * 59 + this.Email.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(@"^Maintainer$", 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 deleted file mode 100644 index c443ebad5..000000000 --- a/src/PollinationSDK/Model/MetaData.cs +++ /dev/null @@ -1,388 +0,0 @@ -/* - * 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 -{ - /// - /// Package metadata information. - /// - [DataContract(Name = "MetaData")] - public partial class MetaData : OpenAPIGenBaseModel, 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. - /// - /// Package name. Make it descriptive and helpful ;) (required). - /// The tag of the package (required). - /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. - /// The version of the application code underlying the manifest. - /// A list of keywords to search the package by. - /// A list of maintainers for the package. - /// The URL of this package's home page. - /// A list of URLs to source code for this project. - /// A URL to an SVG or PNG image to be used as an icon. - /// Whether this package is deprecated. - /// A description of what this package does. - /// The license information.. - public MetaData - ( - string name, string tag, // Required parameters - Dictionary annotations= default, string appVersion= default, List keywords= default, List maintainers= default, string home= default, List sources= default, string icon= default, bool deprecated= default, string description= default, License license= default// Optional parameters - ) : base()// BaseClass - { - // to ensure "name" is required (not null) - this.Name = name ?? throw new ArgumentNullException("name is a required property for MetaData and cannot be null"); - // to ensure "tag" is required (not null) - this.Tag = tag ?? throw new ArgumentNullException("tag is a required property for MetaData and cannot be null"); - this.Annotations = annotations; - this.AppVersion = appVersion; - this.Keywords = keywords; - this.Maintainers = maintainers; - this.Home = home; - this.Sources = sources; - this.Icon = icon; - this.Deprecated = deprecated; - this.Description = description; - this.License = license; - - // 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"; - - /// - /// Package name. Make it descriptive and helpful ;) - /// - /// Package name. Make it descriptive and helpful ;) - [DataMember(Name = "name", IsRequired = true, EmitDefaultValue = false)] - public string Name { get; set; } - /// - /// The tag of the package - /// - /// The tag of the package - [DataMember(Name = "tag", IsRequired = true, EmitDefaultValue = false)] - public string Tag { 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; } - /// - /// The version of the application code underlying the manifest - /// - /// The version of the application code underlying the manifest - [DataMember(Name = "app_version", EmitDefaultValue = false)] - public string AppVersion { get; set; } - /// - /// A list of keywords to search the package by - /// - /// A list of keywords to search the package by - [DataMember(Name = "keywords", EmitDefaultValue = false)] - public List Keywords { get; set; } - /// - /// A list of maintainers for the package - /// - /// A list of maintainers for the package - [DataMember(Name = "maintainers", EmitDefaultValue = false)] - public List Maintainers { get; set; } - /// - /// The URL of this package's home page - /// - /// The URL of this package's home page - [DataMember(Name = "home", EmitDefaultValue = false)] - public string Home { get; set; } - /// - /// A list of URLs to source code for this project - /// - /// A list of URLs to source code for this project - [DataMember(Name = "sources", EmitDefaultValue = false)] - public List Sources { get; set; } - /// - /// A URL to an SVG or PNG image to be used as an icon - /// - /// A URL to an SVG or PNG image to be used as an icon - [DataMember(Name = "icon", EmitDefaultValue = false)] - public string Icon { get; set; } - /// - /// Whether this package is deprecated - /// - /// Whether this package is deprecated - [DataMember(Name = "deprecated", EmitDefaultValue = false)] - public bool Deprecated { get; set; } - /// - /// A description of what this package does - /// - /// A description of what this package does - [DataMember(Name = "description", EmitDefaultValue = false)] - public string Description { get; set; } - /// - /// The license information. - /// - /// The license information. - [DataMember(Name = "license", EmitDefaultValue = false)] - public License License { get; set; } - - /// - /// 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(" Name: ").Append(Name).Append("\n"); - sb.Append(" Tag: ").Append(Tag).Append("\n"); - sb.Append(" Annotations: ").Append(Annotations).Append("\n"); - sb.Append(" AppVersion: ").Append(AppVersion).Append("\n"); - sb.Append(" Keywords: ").Append(Keywords).Append("\n"); - sb.Append(" Maintainers: ").Append(Maintainers).Append("\n"); - sb.Append(" Home: ").Append(Home).Append("\n"); - sb.Append(" Sources: ").Append(Sources).Append("\n"); - sb.Append(" Icon: ").Append(Icon).Append("\n"); - sb.Append(" Deprecated: ").Append(Deprecated).Append("\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" License: ").Append(License).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 OpenAPIGenBaseModel DuplicateOpenAPIGenBaseModel() - { - 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.Name == input.Name || - (this.Name != null && - this.Name.Equals(input.Name)) - ) && base.Equals(input) && - ( - this.Tag == input.Tag || - (this.Tag != null && - this.Tag.Equals(input.Tag)) - ) && base.Equals(input) && - ( - this.Type == input.Type || - (this.Type != null && - this.Type.Equals(input.Type)) - ) && base.Equals(input) && - ( - this.Annotations == input.Annotations || - this.Annotations != null && - input.Annotations != null && - this.Annotations.SequenceEqual(input.Annotations) - ) && base.Equals(input) && - ( - this.AppVersion == input.AppVersion || - (this.AppVersion != null && - this.AppVersion.Equals(input.AppVersion)) - ) && base.Equals(input) && - ( - this.Keywords == input.Keywords || - this.Keywords != null && - input.Keywords != null && - this.Keywords.SequenceEqual(input.Keywords) - ) && base.Equals(input) && - ( - this.Maintainers == input.Maintainers || - this.Maintainers != null && - input.Maintainers != null && - this.Maintainers.SequenceEqual(input.Maintainers) - ) && base.Equals(input) && - ( - this.Home == input.Home || - (this.Home != null && - this.Home.Equals(input.Home)) - ) && base.Equals(input) && - ( - this.Sources == input.Sources || - this.Sources != null && - input.Sources != null && - this.Sources.SequenceEqual(input.Sources) - ) && base.Equals(input) && - ( - this.Icon == input.Icon || - (this.Icon != null && - this.Icon.Equals(input.Icon)) - ) && base.Equals(input) && - ( - this.Deprecated == input.Deprecated || - (this.Deprecated != null && - this.Deprecated.Equals(input.Deprecated)) - ) && base.Equals(input) && - ( - this.Description == input.Description || - (this.Description != null && - this.Description.Equals(input.Description)) - ) && base.Equals(input) && - ( - this.License == input.License || - (this.License != null && - this.License.Equals(input.License)) - ); - } - - /// - /// 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.Tag != null) - hashCode = hashCode * 59 + this.Tag.GetHashCode(); - if (this.Type != null) - hashCode = hashCode * 59 + this.Type.GetHashCode(); - if (this.Annotations != null) - hashCode = hashCode * 59 + this.Annotations.GetHashCode(); - if (this.AppVersion != null) - hashCode = hashCode * 59 + this.AppVersion.GetHashCode(); - if (this.Keywords != null) - hashCode = hashCode * 59 + this.Keywords.GetHashCode(); - if (this.Maintainers != null) - hashCode = hashCode * 59 + this.Maintainers.GetHashCode(); - if (this.Home != null) - hashCode = hashCode * 59 + this.Home.GetHashCode(); - if (this.Sources != null) - hashCode = hashCode * 59 + this.Sources.GetHashCode(); - if (this.Icon != null) - hashCode = hashCode * 59 + this.Icon.GetHashCode(); - if (this.Deprecated != null) - hashCode = hashCode * 59 + this.Deprecated.GetHashCode(); - if (this.Description != null) - hashCode = hashCode * 59 + this.Description.GetHashCode(); - if (this.License != null) - hashCode = hashCode * 59 + this.License.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/NewPluginPackage.cs b/src/PollinationSDK/Model/NewPluginPackage.cs deleted file mode 100644 index 726db068f..000000000 --- a/src/PollinationSDK/Model/NewPluginPackage.cs +++ /dev/null @@ -1,224 +0,0 @@ -/* - * 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 -{ - /// - /// NewPluginPackage - /// - [DataContract(Name = "NewPluginPackage")] - public partial class NewPluginPackage : OpenAPIGenBaseModel, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected NewPluginPackage() - { - // Set non-required readonly properties with defaultValue - this.Type = "NewPluginPackage"; - } - - /// - /// Initializes a new instance of the class. - /// - /// The Plugin manifest to be created (required). - /// The README file to attach to this package (default to ""). - public NewPluginPackage - ( - Plugin manifest, // Required parameters - string readme = "" // Optional parameters - ) : base()// BaseClass - { - // to ensure "manifest" is required (not null) - this.Manifest = manifest ?? throw new ArgumentNullException("manifest is a required property for NewPluginPackage and cannot be null"); - // use default value if no "readme" provided - this.Readme = readme ?? ""; - - // Set non-required readonly properties with defaultValue - this.Type = "NewPluginPackage"; - } - - //============================================== is ReadOnly - /// - /// Gets or Sets Type - /// - [DataMember(Name = "type", EmitDefaultValue = true)] - public string Type { get; protected internal set; } = "NewPluginPackage"; - - /// - /// The Plugin manifest to be created - /// - /// The Plugin manifest to be created - [DataMember(Name = "manifest", IsRequired = true, EmitDefaultValue = false)] - public Plugin Manifest { get; set; } - /// - /// The README file to attach to this package - /// - /// The README file to attach to this package - [DataMember(Name = "readme", EmitDefaultValue = true)] - public string Readme { get; set; } = ""; - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - return "NewPluginPackage"; - } - - /// - /// 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("NewPluginPackage:\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" Manifest: ").Append(Manifest).Append("\n"); - sb.Append(" Readme: ").Append(Readme).Append("\n"); - return sb.ToString(); - } - - /// - /// Returns the object from JSON string - /// - /// NewPluginPackage object - public static NewPluginPackage 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. - /// - /// NewPluginPackage object - public virtual NewPluginPackage DuplicateNewPluginPackage() - { - return FromJson(this.ToJson()); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel Duplicate() - { - return DuplicateNewPluginPackage(); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel DuplicateOpenAPIGenBaseModel() - { - return DuplicateNewPluginPackage(); - } - - /// - /// 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 NewPluginPackage); - } - - /// - /// Returns true if NewPluginPackage instances are equal - /// - /// Instance of NewPluginPackage to be compared - /// Boolean - public bool Equals(NewPluginPackage input) - { - if (input == null) - return false; - return base.Equals(input) && - ( - this.Manifest == input.Manifest || - (this.Manifest != null && - this.Manifest.Equals(input.Manifest)) - ) && base.Equals(input) && - ( - this.Readme == input.Readme || - (this.Readme != null && - this.Readme.Equals(input.Readme)) - ) && 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.Manifest != null) - hashCode = hashCode * 59 + this.Manifest.GetHashCode(); - if (this.Readme != null) - hashCode = hashCode * 59 + this.Readme.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(@"^NewPluginPackage$", 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/NewRecipePackage.cs b/src/PollinationSDK/Model/NewRecipePackage.cs deleted file mode 100644 index 8feaa361d..000000000 --- a/src/PollinationSDK/Model/NewRecipePackage.cs +++ /dev/null @@ -1,224 +0,0 @@ -/* - * 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 -{ - /// - /// NewRecipePackage - /// - [DataContract(Name = "NewRecipePackage")] - public partial class NewRecipePackage : OpenAPIGenBaseModel, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected NewRecipePackage() - { - // Set non-required readonly properties with defaultValue - this.Type = "NewRecipePackage"; - } - - /// - /// Initializes a new instance of the class. - /// - /// The Recipe manifest to be created (required). - /// The README file to attach to this package (default to ""). - public NewRecipePackage - ( - Recipe manifest, // Required parameters - string readme = "" // Optional parameters - ) : base()// BaseClass - { - // to ensure "manifest" is required (not null) - this.Manifest = manifest ?? throw new ArgumentNullException("manifest is a required property for NewRecipePackage and cannot be null"); - // use default value if no "readme" provided - this.Readme = readme ?? ""; - - // Set non-required readonly properties with defaultValue - this.Type = "NewRecipePackage"; - } - - //============================================== is ReadOnly - /// - /// Gets or Sets Type - /// - [DataMember(Name = "type", EmitDefaultValue = true)] - public string Type { get; protected internal set; } = "NewRecipePackage"; - - /// - /// The Recipe manifest to be created - /// - /// The Recipe manifest to be created - [DataMember(Name = "manifest", IsRequired = true, EmitDefaultValue = false)] - public Recipe Manifest { get; set; } - /// - /// The README file to attach to this package - /// - /// The README file to attach to this package - [DataMember(Name = "readme", EmitDefaultValue = true)] - public string Readme { get; set; } = ""; - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - return "NewRecipePackage"; - } - - /// - /// 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("NewRecipePackage:\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" Manifest: ").Append(Manifest).Append("\n"); - sb.Append(" Readme: ").Append(Readme).Append("\n"); - return sb.ToString(); - } - - /// - /// Returns the object from JSON string - /// - /// NewRecipePackage object - public static NewRecipePackage 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. - /// - /// NewRecipePackage object - public virtual NewRecipePackage DuplicateNewRecipePackage() - { - return FromJson(this.ToJson()); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel Duplicate() - { - return DuplicateNewRecipePackage(); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel DuplicateOpenAPIGenBaseModel() - { - return DuplicateNewRecipePackage(); - } - - /// - /// 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 NewRecipePackage); - } - - /// - /// Returns true if NewRecipePackage instances are equal - /// - /// Instance of NewRecipePackage to be compared - /// Boolean - public bool Equals(NewRecipePackage input) - { - if (input == null) - return false; - return base.Equals(input) && - ( - this.Manifest == input.Manifest || - (this.Manifest != null && - this.Manifest.Equals(input.Manifest)) - ) && base.Equals(input) && - ( - this.Readme == input.Readme || - (this.Readme != null && - this.Readme.Equals(input.Readme)) - ) && 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.Manifest != null) - hashCode = hashCode * 59 + this.Manifest.GetHashCode(); - if (this.Readme != null) - hashCode = hashCode * 59 + this.Readme.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(@"^NewRecipePackage$", 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/OpenAPIGenBaseModel.cs b/src/PollinationSDK/Model/OpenAPIGenBaseModel.cs deleted file mode 100644 index b053ab112..000000000 --- a/src/PollinationSDK/Model/OpenAPIGenBaseModel.cs +++ /dev/null @@ -1,174 +0,0 @@ -/* - * 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 -{ - /// - /// OpenAPIGenBaseModel - /// - [DataContract(Name = "_OpenAPIGenBaseModel")] - public partial class OpenAPIGenBaseModel : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - public OpenAPIGenBaseModel - ( - // Required parameters - // Optional parameters - )// BaseClass - { - - // Set non-required readonly properties with defaultValue - this.Type = "InvalidType"; - } - - //============================================== is ReadOnly - /// - /// A base class to use when there is no baseclass available to fall on. - /// - /// A base class to use when there is no baseclass available to fall on. - [DataMember(Name = "type", EmitDefaultValue = true)] - public string Type { get; protected internal set; } = "InvalidType"; - - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - return "OpenAPIGenBaseModel"; - } - - /// - /// 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("OpenAPIGenBaseModel:\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - return sb.ToString(); - } - - /// - /// Returns the object from JSON string - /// - /// OpenAPIGenBaseModel object - public static OpenAPIGenBaseModel 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. - /// - /// OpenAPIGenBaseModel object - public virtual OpenAPIGenBaseModel DuplicateOpenAPIGenBaseModel() - { - return FromJson(this.ToJson()); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel Duplicate() - { - return DuplicateOpenAPIGenBaseModel(); - } - - - /// - /// 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 OpenAPIGenBaseModel); - } - - /// - /// Returns true if OpenAPIGenBaseModel instances are equal - /// - /// Instance of OpenAPIGenBaseModel to be compared - /// Boolean - public bool Equals(OpenAPIGenBaseModel input) - { - if (input == null) - return false; - return - ( - 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.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) - { - yield break; - } - } -} diff --git a/src/PollinationSDK/Model/Organization.cs b/src/PollinationSDK/Model/Organization.cs deleted file mode 100644 index f02e97f37..000000000 --- a/src/PollinationSDK/Model/Organization.cs +++ /dev/null @@ -1,282 +0,0 @@ -/* - * 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 -{ - /// - /// Organization - /// - [DataContract(Name = "Organization")] - public partial class Organization : OrganizationUpdate, IEquatable, IValidatableObject - { - /// - /// The role the user has within the organization - /// - /// The role the user has within the organization - [DataMember(Name="role", EmitDefaultValue=false)] - public OrganizationRoleEnum Role { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected Organization() - { - // Set non-required readonly properties with defaultValue - this.Type = "Organization"; - } - - /// - /// Initializes a new instance of the class. - /// - /// The org ID (required). - /// The account the organization represents (required). - /// The role the user has within the organization. - /// The number of members that are part of this org (default to 0). - /// The number of teams that are part of this org (default to 0). - /// The unique name of the org in small case without spaces. - /// The display name for this org. - /// URL to the picture associated with this org. - /// The contact email for the Organization. - /// A description of the org. - public Organization - ( - string id, AccountPublic owner, // Required parameters - string accountName= default, string name= default, string pictureUrl= default, string contactEmail= default, string description= default, OrganizationRoleEnum role= default, int memberCount = 0, int teamCount = 0 // Optional parameters - ) : base(accountName: accountName, name: name, pictureUrl: pictureUrl, contactEmail: contactEmail, description: description)// BaseClass - { - // to ensure "id" is required (not null) - this.Id = id ?? throw new ArgumentNullException("id is a required property for Organization and cannot be null"); - // to ensure "owner" is required (not null) - this.Owner = owner ?? throw new ArgumentNullException("owner is a required property for Organization and cannot be null"); - this.Role = role; - this.MemberCount = memberCount; - this.TeamCount = teamCount; - - // Set non-required readonly properties with defaultValue - this.Type = "Organization"; - } - - //============================================== is ReadOnly - /// - /// Gets or Sets Type - /// - [DataMember(Name = "type", EmitDefaultValue = true)] - public string Type { get; protected internal set; } = "Organization"; - - /// - /// The org ID - /// - /// The org ID - [DataMember(Name = "id", IsRequired = true, EmitDefaultValue = false)] - public string Id { get; set; } - /// - /// The account the organization represents - /// - /// The account the organization represents - [DataMember(Name = "owner", IsRequired = true, EmitDefaultValue = false)] - public AccountPublic Owner { get; set; } - /// - /// The number of members that are part of this org - /// - /// The number of members that are part of this org - [DataMember(Name = "member_count", EmitDefaultValue = true)] - public int MemberCount { get; set; } = 0; - /// - /// The number of teams that are part of this org - /// - /// The number of teams that are part of this org - [DataMember(Name = "team_count", EmitDefaultValue = true)] - public int TeamCount { get; set; } = 0; - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - return "Organization"; - } - - /// - /// 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("Organization:\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" AccountName: ").Append(AccountName).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" PictureUrl: ").Append(PictureUrl).Append("\n"); - sb.Append(" ContactEmail: ").Append(ContactEmail).Append("\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" Owner: ").Append(Owner).Append("\n"); - sb.Append(" Role: ").Append(Role).Append("\n"); - sb.Append(" MemberCount: ").Append(MemberCount).Append("\n"); - sb.Append(" TeamCount: ").Append(TeamCount).Append("\n"); - return sb.ToString(); - } - - /// - /// Returns the object from JSON string - /// - /// Organization object - public static Organization 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. - /// - /// Organization object - public virtual Organization DuplicateOrganization() - { - return FromJson(this.ToJson()); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel Duplicate() - { - return DuplicateOrganization(); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OrganizationUpdate DuplicateOrganizationUpdate() - { - return DuplicateOrganization(); - } - - /// - /// 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 Organization); - } - - /// - /// Returns true if Organization instances are equal - /// - /// Instance of Organization to be compared - /// Boolean - public bool Equals(Organization 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.Owner == input.Owner || - (this.Owner != null && - this.Owner.Equals(input.Owner)) - ) && base.Equals(input) && - ( - this.Role == input.Role || - (this.Role != null && - this.Role.Equals(input.Role)) - ) && base.Equals(input) && - ( - this.MemberCount == input.MemberCount || - (this.MemberCount != null && - this.MemberCount.Equals(input.MemberCount)) - ) && base.Equals(input) && - ( - this.TeamCount == input.TeamCount || - (this.TeamCount != null && - this.TeamCount.Equals(input.TeamCount)) - ) && 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.Owner != null) - hashCode = hashCode * 59 + this.Owner.GetHashCode(); - if (this.Role != null) - hashCode = hashCode * 59 + this.Role.GetHashCode(); - if (this.MemberCount != null) - hashCode = hashCode * 59 + this.MemberCount.GetHashCode(); - if (this.TeamCount != null) - hashCode = hashCode * 59 + this.TeamCount.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(@"^Organization$", 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/OrganizationCreate.cs b/src/PollinationSDK/Model/OrganizationCreate.cs deleted file mode 100644 index df1f3f935..000000000 --- a/src/PollinationSDK/Model/OrganizationCreate.cs +++ /dev/null @@ -1,190 +0,0 @@ -/* - * 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 -{ - /// - /// OrganizationCreate - /// - [DataContract(Name = "OrganizationCreate")] - public partial class OrganizationCreate : OrganizationUpdate, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// The unique name of the org in small case without spaces. - /// The display name for this org. - /// URL to the picture associated with this org. - /// The contact email for the Organization. - /// A description of the org. - public OrganizationCreate - ( - // Required parameters - string accountName= default, string name= default, string pictureUrl= default, string contactEmail= default, string description= default // Optional parameters - ) : base(accountName: accountName, name: name, pictureUrl: pictureUrl, contactEmail: contactEmail, description: description)// BaseClass - { - - // Set non-required readonly properties with defaultValue - this.Type = "OrganizationCreate"; - } - - //============================================== is ReadOnly - /// - /// Gets or Sets Type - /// - [DataMember(Name = "type", EmitDefaultValue = true)] - public string Type { get; protected internal set; } = "OrganizationCreate"; - - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - return "OrganizationCreate"; - } - - /// - /// 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("OrganizationCreate:\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" AccountName: ").Append(AccountName).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" PictureUrl: ").Append(PictureUrl).Append("\n"); - sb.Append(" ContactEmail: ").Append(ContactEmail).Append("\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - return sb.ToString(); - } - - /// - /// Returns the object from JSON string - /// - /// OrganizationCreate object - public static OrganizationCreate 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. - /// - /// OrganizationCreate object - public virtual OrganizationCreate DuplicateOrganizationCreate() - { - return FromJson(this.ToJson()); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel Duplicate() - { - return DuplicateOrganizationCreate(); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OrganizationUpdate DuplicateOrganizationUpdate() - { - return DuplicateOrganizationCreate(); - } - - /// - /// 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 OrganizationCreate); - } - - /// - /// Returns true if OrganizationCreate instances are equal - /// - /// Instance of OrganizationCreate to be compared - /// Boolean - public bool Equals(OrganizationCreate 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(@"^OrganizationCreate$", 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/OrganizationList.cs b/src/PollinationSDK/Model/OrganizationList.cs deleted file mode 100644 index 8573a2b1b..000000000 --- a/src/PollinationSDK/Model/OrganizationList.cs +++ /dev/null @@ -1,287 +0,0 @@ -/* - * 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 = "OrganizationList")] - public partial class OrganizationList : OpenAPIGenBaseModel, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected OrganizationList() - { - // Set non-required readonly properties with defaultValue - this.Type = "OrganizationList"; - } - - /// - /// 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 OrganizationList - ( - 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 OrganizationList and cannot be null"); - this.NextPage = nextPage; - - // Set non-required readonly properties with defaultValue - this.Type = "OrganizationList"; - } - - //============================================== is ReadOnly - /// - /// Gets or Sets Type - /// - [DataMember(Name = "type", EmitDefaultValue = true)] - public string Type { get; protected internal set; } = "OrganizationList"; - - /// - /// 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 "OrganizationList"; - } - - /// - /// 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("OrganizationList:\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 - /// - /// OrganizationList object - public static OrganizationList 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. - /// - /// OrganizationList object - public virtual OrganizationList DuplicateOrganizationList() - { - return FromJson(this.ToJson()); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel Duplicate() - { - return DuplicateOrganizationList(); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel DuplicateOpenAPIGenBaseModel() - { - return DuplicateOrganizationList(); - } - - /// - /// 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 OrganizationList); - } - - /// - /// Returns true if OrganizationList instances are equal - /// - /// Instance of OrganizationList to be compared - /// Boolean - public bool Equals(OrganizationList 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(@"^OrganizationList$", 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/OrganizationMember.cs b/src/PollinationSDK/Model/OrganizationMember.cs deleted file mode 100644 index 5b16742e1..000000000 --- a/src/PollinationSDK/Model/OrganizationMember.cs +++ /dev/null @@ -1,223 +0,0 @@ -/* - * 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 -{ - /// - /// OrganizationMember - /// - [DataContract(Name = "OrganizationMember")] - public partial class OrganizationMember : OpenAPIGenBaseModel, IEquatable, IValidatableObject - { - /// - /// The role the user has within the organization - /// - /// The role the user has within the organization - [DataMember(Name="role", EmitDefaultValue=false)] - public OrganizationRoleEnum Role { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected OrganizationMember() - { - // Set non-required readonly properties with defaultValue - this.Type = "OrganizationMember"; - } - - /// - /// Initializes a new instance of the class. - /// - /// The organization member (required). - /// The role the user has within the organization (required). - public OrganizationMember - ( - UserPublic user, OrganizationRoleEnum role// Required parameters - // Optional parameters - ) : base()// BaseClass - { - // to ensure "user" is required (not null) - this.User = user ?? throw new ArgumentNullException("user is a required property for OrganizationMember and cannot be null"); - this.Role = role; - - // Set non-required readonly properties with defaultValue - this.Type = "OrganizationMember"; - } - - //============================================== is ReadOnly - /// - /// Gets or Sets Type - /// - [DataMember(Name = "type", EmitDefaultValue = true)] - public string Type { get; protected internal set; } = "OrganizationMember"; - - /// - /// The organization member - /// - /// The organization member - [DataMember(Name = "user", IsRequired = true, EmitDefaultValue = false)] - public UserPublic User { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - return "OrganizationMember"; - } - - /// - /// 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("OrganizationMember:\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" User: ").Append(User).Append("\n"); - sb.Append(" Role: ").Append(Role).Append("\n"); - return sb.ToString(); - } - - /// - /// Returns the object from JSON string - /// - /// OrganizationMember object - public static OrganizationMember 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. - /// - /// OrganizationMember object - public virtual OrganizationMember DuplicateOrganizationMember() - { - return FromJson(this.ToJson()); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel Duplicate() - { - return DuplicateOrganizationMember(); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel DuplicateOpenAPIGenBaseModel() - { - return DuplicateOrganizationMember(); - } - - /// - /// 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 OrganizationMember); - } - - /// - /// Returns true if OrganizationMember instances are equal - /// - /// Instance of OrganizationMember to be compared - /// Boolean - public bool Equals(OrganizationMember input) - { - if (input == null) - return false; - return base.Equals(input) && - ( - this.User == input.User || - (this.User != null && - this.User.Equals(input.User)) - ) && base.Equals(input) && - ( - this.Role == input.Role || - (this.Role != null && - this.Role.Equals(input.Role)) - ) && 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.User != null) - hashCode = hashCode * 59 + this.User.GetHashCode(); - if (this.Role != null) - hashCode = hashCode * 59 + this.Role.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(@"^OrganizationMember$", 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/OrganizationMemberList.cs b/src/PollinationSDK/Model/OrganizationMemberList.cs deleted file mode 100644 index 48692cbf1..000000000 --- a/src/PollinationSDK/Model/OrganizationMemberList.cs +++ /dev/null @@ -1,287 +0,0 @@ -/* - * 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 = "OrganizationMemberList")] - public partial class OrganizationMemberList : OpenAPIGenBaseModel, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected OrganizationMemberList() - { - // Set non-required readonly properties with defaultValue - this.Type = "OrganizationMemberList"; - } - - /// - /// 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 OrganizationMemberList - ( - 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 OrganizationMemberList and cannot be null"); - this.NextPage = nextPage; - - // Set non-required readonly properties with defaultValue - this.Type = "OrganizationMemberList"; - } - - //============================================== is ReadOnly - /// - /// Gets or Sets Type - /// - [DataMember(Name = "type", EmitDefaultValue = true)] - public string Type { get; protected internal set; } = "OrganizationMemberList"; - - /// - /// 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 "OrganizationMemberList"; - } - - /// - /// 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("OrganizationMemberList:\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 - /// - /// OrganizationMemberList object - public static OrganizationMemberList 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. - /// - /// OrganizationMemberList object - public virtual OrganizationMemberList DuplicateOrganizationMemberList() - { - return FromJson(this.ToJson()); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel Duplicate() - { - return DuplicateOrganizationMemberList(); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel DuplicateOpenAPIGenBaseModel() - { - return DuplicateOrganizationMemberList(); - } - - /// - /// 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 OrganizationMemberList); - } - - /// - /// Returns true if OrganizationMemberList instances are equal - /// - /// Instance of OrganizationMemberList to be compared - /// Boolean - public bool Equals(OrganizationMemberList 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(@"^OrganizationMemberList$", 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/OrganizationRoleEnum.cs b/src/PollinationSDK/Model/OrganizationRoleEnum.cs deleted file mode 100644 index c3d6186ef..000000000 --- a/src/PollinationSDK/Model/OrganizationRoleEnum.cs +++ /dev/null @@ -1,49 +0,0 @@ -/* - * 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 OrganizationRoleEnum - { - /// - /// Enum Owner for value: owner - /// - [EnumMember(Value = "owner")] - Owner = 1, - - /// - /// Enum Member for value: member - /// - [EnumMember(Value = "member")] - Member = 2 - - } - -} diff --git a/src/PollinationSDK/Model/OrganizationUpdate.cs b/src/PollinationSDK/Model/OrganizationUpdate.cs deleted file mode 100644 index e666ac4ce..000000000 --- a/src/PollinationSDK/Model/OrganizationUpdate.cs +++ /dev/null @@ -1,270 +0,0 @@ -/* - * 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 -{ - /// - /// OrganizationUpdate - /// - [DataContract(Name = "OrganizationUpdate")] - public partial class OrganizationUpdate : OpenAPIGenBaseModel, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// The unique name of the org in small case without spaces. - /// The display name for this org. - /// URL to the picture associated with this org. - /// The contact email for the Organization. - /// A description of the org. - public OrganizationUpdate - ( - // Required parameters - string accountName= default, string name= default, string pictureUrl= default, string contactEmail= default, string description= default // Optional parameters - ) : base()// BaseClass - { - this.AccountName = accountName; - this.Name = name; - this.PictureUrl = pictureUrl; - this.ContactEmail = contactEmail; - this.Description = description; - - // Set non-required readonly properties with defaultValue - this.Type = "OrganizationUpdate"; - } - - //============================================== is ReadOnly - /// - /// Gets or Sets Type - /// - [DataMember(Name = "type", EmitDefaultValue = true)] - public string Type { get; protected internal set; } = "OrganizationUpdate"; - - /// - /// The unique name of the org in small case without spaces - /// - /// The unique name of the org in small case without spaces - [DataMember(Name = "account_name", EmitDefaultValue = false)] - public string AccountName { get; set; } - /// - /// The display name for this org - /// - /// The display name for this org - [DataMember(Name = "name", EmitDefaultValue = false)] - public string Name { get; set; } - /// - /// URL to the picture associated with this org - /// - /// URL to the picture associated with this org - [DataMember(Name = "picture_url", EmitDefaultValue = false)] - public string PictureUrl { get; set; } - /// - /// The contact email for the Organization - /// - /// The contact email for the Organization - [DataMember(Name = "contact_email", EmitDefaultValue = false)] - public string ContactEmail { get; set; } - /// - /// A description of the org - /// - /// A description of the org - [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 "OrganizationUpdate"; - } - - /// - /// 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("OrganizationUpdate:\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" AccountName: ").Append(AccountName).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" PictureUrl: ").Append(PictureUrl).Append("\n"); - sb.Append(" ContactEmail: ").Append(ContactEmail).Append("\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - return sb.ToString(); - } - - /// - /// Returns the object from JSON string - /// - /// OrganizationUpdate object - public static OrganizationUpdate 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. - /// - /// OrganizationUpdate object - public virtual OrganizationUpdate DuplicateOrganizationUpdate() - { - return FromJson(this.ToJson()); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel Duplicate() - { - return DuplicateOrganizationUpdate(); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel DuplicateOpenAPIGenBaseModel() - { - return DuplicateOrganizationUpdate(); - } - - /// - /// 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 OrganizationUpdate); - } - - /// - /// Returns true if OrganizationUpdate instances are equal - /// - /// Instance of OrganizationUpdate to be compared - /// Boolean - public bool Equals(OrganizationUpdate input) - { - if (input == null) - return false; - return base.Equals(input) && - ( - this.AccountName == input.AccountName || - (this.AccountName != null && - this.AccountName.Equals(input.AccountName)) - ) && base.Equals(input) && - ( - this.Name == input.Name || - (this.Name != null && - this.Name.Equals(input.Name)) - ) && base.Equals(input) && - ( - this.PictureUrl == input.PictureUrl || - (this.PictureUrl != null && - this.PictureUrl.Equals(input.PictureUrl)) - ) && base.Equals(input) && - ( - this.ContactEmail == input.ContactEmail || - (this.ContactEmail != null && - this.ContactEmail.Equals(input.ContactEmail)) - ) && 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.AccountName != null) - hashCode = hashCode * 59 + this.AccountName.GetHashCode(); - if (this.Name != null) - hashCode = hashCode * 59 + this.Name.GetHashCode(); - if (this.PictureUrl != null) - hashCode = hashCode * 59 + this.PictureUrl.GetHashCode(); - if (this.ContactEmail != null) - hashCode = hashCode * 59 + this.ContactEmail.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(@"^OrganizationUpdate$", 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/PackageVersion.cs b/src/PollinationSDK/Model/PackageVersion.cs deleted file mode 100644 index f13bda001..000000000 --- a/src/PollinationSDK/Model/PackageVersion.cs +++ /dev/null @@ -1,500 +0,0 @@ -/* - * 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 -{ - /// - /// Package Version A MetaData object to distinguish a specific package version within a repository index. - /// - [DataContract(Name = "PackageVersion")] - public partial class PackageVersion : OpenAPIGenBaseModel, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected PackageVersion() - { - // Set non-required readonly properties with defaultValue - this.Type = "PackageVersion"; - } - - /// - /// Initializes a new instance of the class. - /// - /// Package name. Make it descriptive and helpful ;) (required). - /// The tag of the package (required). - /// url (required). - /// created (required). - /// digest (required). - /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. - /// The version of the application code underlying the manifest. - /// A list of keywords to search the package by. - /// A list of maintainers for the package. - /// The URL of this package's home page. - /// A list of URLs to source code for this project. - /// A URL to an SVG or PNG image to be used as an icon. - /// Whether this package is deprecated. - /// A description of what this package does. - /// The license information.. - /// A slug of the repository name and the package name.. - /// The type of Queenbee package (ie: recipe or plugin) (default to ""). - /// The README file string for this package. - /// The package Recipe or Plugin manifest. - public PackageVersion - ( - string name, string tag, string url, DateTime created, string digest, // Required parameters - Dictionary annotations= default, string appVersion= default, List keywords= default, List maintainers= default, string home= default, List sources= default, string icon= default, bool deprecated= default, string description= default, License license= default, string slug= default, string kind = "", string readme= default, AnyOf manifest= default // Optional parameters - ) : base()// BaseClass - { - // to ensure "name" is required (not null) - this.Name = name ?? throw new ArgumentNullException("name is a required property for PackageVersion and cannot be null"); - // to ensure "tag" is required (not null) - this.Tag = tag ?? throw new ArgumentNullException("tag is a required property for PackageVersion and cannot be null"); - // to ensure "url" is required (not null) - this.Url = url ?? throw new ArgumentNullException("url is a required property for PackageVersion and cannot be null"); - this.Created = created; - // to ensure "digest" is required (not null) - this.Digest = digest ?? throw new ArgumentNullException("digest is a required property for PackageVersion and cannot be null"); - this.Annotations = annotations; - this.AppVersion = appVersion; - this.Keywords = keywords; - this.Maintainers = maintainers; - this.Home = home; - this.Sources = sources; - this.Icon = icon; - this.Deprecated = deprecated; - this.Description = description; - this.License = license; - this.Slug = slug; - // use default value if no "kind" provided - this.Kind = kind ?? ""; - this.Readme = readme; - this.Manifest = manifest; - - // Set non-required readonly properties with defaultValue - this.Type = "PackageVersion"; - } - - //============================================== is ReadOnly - /// - /// Gets or Sets Type - /// - [DataMember(Name = "type", EmitDefaultValue = true)] - public string Type { get; protected internal set; } = "PackageVersion"; - - /// - /// Package name. Make it descriptive and helpful ;) - /// - /// Package name. Make it descriptive and helpful ;) - [DataMember(Name = "name", IsRequired = true, EmitDefaultValue = false)] - public string Name { get; set; } - /// - /// The tag of the package - /// - /// The tag of the package - [DataMember(Name = "tag", IsRequired = true, EmitDefaultValue = false)] - public string Tag { get; set; } - /// - /// Gets or Sets Url - /// - [DataMember(Name = "url", IsRequired = true, EmitDefaultValue = false)] - public string Url { get; set; } - /// - /// Gets or Sets Created - /// - [DataMember(Name = "created", IsRequired = true, EmitDefaultValue = false)] - public DateTime Created { get; set; } - /// - /// Gets or Sets Digest - /// - [DataMember(Name = "digest", IsRequired = true, EmitDefaultValue = false)] - public string Digest { 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; } - /// - /// The version of the application code underlying the manifest - /// - /// The version of the application code underlying the manifest - [DataMember(Name = "app_version", EmitDefaultValue = false)] - public string AppVersion { get; set; } - /// - /// A list of keywords to search the package by - /// - /// A list of keywords to search the package by - [DataMember(Name = "keywords", EmitDefaultValue = false)] - public List Keywords { get; set; } - /// - /// A list of maintainers for the package - /// - /// A list of maintainers for the package - [DataMember(Name = "maintainers", EmitDefaultValue = false)] - public List Maintainers { get; set; } - /// - /// The URL of this package's home page - /// - /// The URL of this package's home page - [DataMember(Name = "home", EmitDefaultValue = false)] - public string Home { get; set; } - /// - /// A list of URLs to source code for this project - /// - /// A list of URLs to source code for this project - [DataMember(Name = "sources", EmitDefaultValue = false)] - public List Sources { get; set; } - /// - /// A URL to an SVG or PNG image to be used as an icon - /// - /// A URL to an SVG or PNG image to be used as an icon - [DataMember(Name = "icon", EmitDefaultValue = false)] - public string Icon { get; set; } - /// - /// Whether this package is deprecated - /// - /// Whether this package is deprecated - [DataMember(Name = "deprecated", EmitDefaultValue = false)] - public bool Deprecated { get; set; } - /// - /// A description of what this package does - /// - /// A description of what this package does - [DataMember(Name = "description", EmitDefaultValue = false)] - public string Description { get; set; } - /// - /// The license information. - /// - /// The license information. - [DataMember(Name = "license", EmitDefaultValue = false)] - public License License { get; set; } - /// - /// A slug of the repository name and the package name. - /// - /// A slug of the repository name and the package name. - [DataMember(Name = "slug", EmitDefaultValue = false)] - public string Slug { get; set; } - /// - /// The type of Queenbee package (ie: recipe or plugin) - /// - /// The type of Queenbee package (ie: recipe or plugin) - [DataMember(Name = "kind", EmitDefaultValue = true)] - public string Kind { get; set; } = ""; - /// - /// The README file string for this package - /// - /// The README file string for this package - [DataMember(Name = "readme", EmitDefaultValue = false)] - public string Readme { get; set; } - /// - /// The package Recipe or Plugin manifest - /// - /// The package Recipe or Plugin manifest - [DataMember(Name = "manifest", EmitDefaultValue = false)] - public AnyOf Manifest { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - return "PackageVersion"; - } - - /// - /// 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("PackageVersion:\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" Tag: ").Append(Tag).Append("\n"); - sb.Append(" Url: ").Append(Url).Append("\n"); - sb.Append(" Created: ").Append(Created).Append("\n"); - sb.Append(" Digest: ").Append(Digest).Append("\n"); - sb.Append(" Annotations: ").Append(Annotations).Append("\n"); - sb.Append(" AppVersion: ").Append(AppVersion).Append("\n"); - sb.Append(" Keywords: ").Append(Keywords).Append("\n"); - sb.Append(" Maintainers: ").Append(Maintainers).Append("\n"); - sb.Append(" Home: ").Append(Home).Append("\n"); - sb.Append(" Sources: ").Append(Sources).Append("\n"); - sb.Append(" Icon: ").Append(Icon).Append("\n"); - sb.Append(" Deprecated: ").Append(Deprecated).Append("\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" License: ").Append(License).Append("\n"); - sb.Append(" Slug: ").Append(Slug).Append("\n"); - sb.Append(" Kind: ").Append(Kind).Append("\n"); - sb.Append(" Readme: ").Append(Readme).Append("\n"); - sb.Append(" Manifest: ").Append(Manifest).Append("\n"); - return sb.ToString(); - } - - /// - /// Returns the object from JSON string - /// - /// PackageVersion object - public static PackageVersion 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. - /// - /// PackageVersion object - public virtual PackageVersion DuplicatePackageVersion() - { - return FromJson(this.ToJson()); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel Duplicate() - { - return DuplicatePackageVersion(); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel DuplicateOpenAPIGenBaseModel() - { - return DuplicatePackageVersion(); - } - - /// - /// 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 PackageVersion); - } - - /// - /// Returns true if PackageVersion instances are equal - /// - /// Instance of PackageVersion to be compared - /// Boolean - public bool Equals(PackageVersion 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.Tag == input.Tag || - (this.Tag != null && - this.Tag.Equals(input.Tag)) - ) && base.Equals(input) && - ( - this.Url == input.Url || - (this.Url != null && - this.Url.Equals(input.Url)) - ) && base.Equals(input) && - ( - this.Created == input.Created || - (this.Created != null && - this.Created.Equals(input.Created)) - ) && base.Equals(input) && - ( - this.Digest == input.Digest || - (this.Digest != null && - this.Digest.Equals(input.Digest)) - ) && base.Equals(input) && - ( - this.Annotations == input.Annotations || - this.Annotations != null && - input.Annotations != null && - this.Annotations.SequenceEqual(input.Annotations) - ) && base.Equals(input) && - ( - this.AppVersion == input.AppVersion || - (this.AppVersion != null && - this.AppVersion.Equals(input.AppVersion)) - ) && base.Equals(input) && - ( - this.Keywords == input.Keywords || - this.Keywords != null && - input.Keywords != null && - this.Keywords.SequenceEqual(input.Keywords) - ) && base.Equals(input) && - ( - this.Maintainers == input.Maintainers || - this.Maintainers != null && - input.Maintainers != null && - this.Maintainers.SequenceEqual(input.Maintainers) - ) && base.Equals(input) && - ( - this.Home == input.Home || - (this.Home != null && - this.Home.Equals(input.Home)) - ) && base.Equals(input) && - ( - this.Sources == input.Sources || - this.Sources != null && - input.Sources != null && - this.Sources.SequenceEqual(input.Sources) - ) && base.Equals(input) && - ( - this.Icon == input.Icon || - (this.Icon != null && - this.Icon.Equals(input.Icon)) - ) && base.Equals(input) && - ( - this.Deprecated == input.Deprecated || - (this.Deprecated != null && - this.Deprecated.Equals(input.Deprecated)) - ) && base.Equals(input) && - ( - this.Description == input.Description || - (this.Description != null && - this.Description.Equals(input.Description)) - ) && base.Equals(input) && - ( - this.License == input.License || - (this.License != null && - this.License.Equals(input.License)) - ) && base.Equals(input) && - ( - this.Slug == input.Slug || - (this.Slug != null && - this.Slug.Equals(input.Slug)) - ) && base.Equals(input) && - ( - this.Kind == input.Kind || - (this.Kind != null && - this.Kind.Equals(input.Kind)) - ) && base.Equals(input) && - ( - this.Readme == input.Readme || - (this.Readme != null && - this.Readme.Equals(input.Readme)) - ) && base.Equals(input) && - ( - this.Manifest == input.Manifest || - (this.Manifest != null && - this.Manifest.Equals(input.Manifest)) - ) && 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.Tag != null) - hashCode = hashCode * 59 + this.Tag.GetHashCode(); - if (this.Url != null) - hashCode = hashCode * 59 + this.Url.GetHashCode(); - if (this.Created != null) - hashCode = hashCode * 59 + this.Created.GetHashCode(); - if (this.Digest != null) - hashCode = hashCode * 59 + this.Digest.GetHashCode(); - if (this.Annotations != null) - hashCode = hashCode * 59 + this.Annotations.GetHashCode(); - if (this.AppVersion != null) - hashCode = hashCode * 59 + this.AppVersion.GetHashCode(); - if (this.Keywords != null) - hashCode = hashCode * 59 + this.Keywords.GetHashCode(); - if (this.Maintainers != null) - hashCode = hashCode * 59 + this.Maintainers.GetHashCode(); - if (this.Home != null) - hashCode = hashCode * 59 + this.Home.GetHashCode(); - if (this.Sources != null) - hashCode = hashCode * 59 + this.Sources.GetHashCode(); - if (this.Icon != null) - hashCode = hashCode * 59 + this.Icon.GetHashCode(); - if (this.Deprecated != null) - hashCode = hashCode * 59 + this.Deprecated.GetHashCode(); - if (this.Description != null) - hashCode = hashCode * 59 + this.Description.GetHashCode(); - if (this.License != null) - hashCode = hashCode * 59 + this.License.GetHashCode(); - if (this.Slug != null) - hashCode = hashCode * 59 + this.Slug.GetHashCode(); - if (this.Kind != null) - hashCode = hashCode * 59 + this.Kind.GetHashCode(); - if (this.Readme != null) - hashCode = hashCode * 59 + this.Readme.GetHashCode(); - if (this.Manifest != null) - hashCode = hashCode * 59 + this.Manifest.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(@"^PackageVersion$", 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/PathOutput.cs b/src/PollinationSDK/Model/PathOutput.cs deleted file mode 100644 index 79897076a..000000000 --- a/src/PollinationSDK/Model/PathOutput.cs +++ /dev/null @@ -1,239 +0,0 @@ -/* - * 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 -{ - /// - /// Base class for output classes that source tha output from a path. An example of using PathOutput is TaskFile and TaskFolder outputs. - /// - [DataContract(Name = "PathOutput")] - public partial class PathOutput : GenericOutput, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected PathOutput() - { - // Set non-required readonly properties with defaultValue - this.Type = "PathOutput"; - } - - /// - /// Initializes a new instance of the class. - /// - /// Path to the output artifact relative to where the function command is executed. (required). - /// A boolean to indicate if an artifact output is required. A False value makes the artifact optional. (default to true). - /// Output name. (required). - /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. - /// Optional description for output.. - public PathOutput - ( - string name, string path, // Required parameters - Dictionary annotations= default, string description= default, bool required = true // Optional parameters - ) : base(name: name, annotations: annotations, description: description)// BaseClass - { - // to ensure "path" is required (not null) - this.Path = path ?? throw new ArgumentNullException("path is a required property for PathOutput and cannot be null"); - this.Required = required; - - // Set non-required readonly properties with defaultValue - this.Type = "PathOutput"; - } - - //============================================== is ReadOnly - /// - /// Gets or Sets Type - /// - [DataMember(Name = "type", EmitDefaultValue = true)] - public string Type { get; protected internal set; } = "PathOutput"; - - /// - /// Path to the output artifact relative to where the function command is executed. - /// - /// Path to the output artifact relative to where the function command is executed. - [DataMember(Name = "path", IsRequired = true, EmitDefaultValue = false)] - public string Path { get; set; } - /// - /// A boolean to indicate if an artifact output is required. A False value makes the artifact optional. - /// - /// A boolean to indicate if an artifact output is required. A False value makes the artifact optional. - [DataMember(Name = "required", EmitDefaultValue = true)] - public bool Required { get; set; } = true; - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - return "PathOutput"; - } - - /// - /// 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("PathOutput:\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" Annotations: ").Append(Annotations).Append("\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" Path: ").Append(Path).Append("\n"); - sb.Append(" Required: ").Append(Required).Append("\n"); - return sb.ToString(); - } - - /// - /// Returns the object from JSON string - /// - /// PathOutput object - public static PathOutput 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. - /// - /// PathOutput object - public virtual PathOutput DuplicatePathOutput() - { - return FromJson(this.ToJson()); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel Duplicate() - { - return DuplicatePathOutput(); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override GenericOutput DuplicateGenericOutput() - { - return DuplicatePathOutput(); - } - - /// - /// 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 PathOutput); - } - - /// - /// Returns true if PathOutput instances are equal - /// - /// Instance of PathOutput to be compared - /// Boolean - public bool Equals(PathOutput input) - { - if (input == null) - return false; - return base.Equals(input) && - ( - this.Path == input.Path || - (this.Path != null && - this.Path.Equals(input.Path)) - ) && base.Equals(input) && - ( - this.Required == input.Required || - (this.Required != null && - this.Required.Equals(input.Required)) - ) && 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.Path != null) - hashCode = hashCode * 59 + this.Path.GetHashCode(); - if (this.Required != null) - hashCode = hashCode * 59 + this.Required.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(@"^PathOutput$", 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/Permission.cs b/src/PollinationSDK/Model/Permission.cs deleted file mode 100644 index f8f6c0cf3..000000000 --- a/src/PollinationSDK/Model/Permission.cs +++ /dev/null @@ -1,55 +0,0 @@ -/* - * 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 Permission - { - /// - /// Enum Admin for value: admin - /// - [EnumMember(Value = "admin")] - Admin = 1, - - /// - /// Enum Write for value: write - /// - [EnumMember(Value = "write")] - Write = 2, - - /// - /// Enum Read for value: read - /// - [EnumMember(Value = "read")] - Read = 3 - - } - -} diff --git a/src/PollinationSDK/Model/Plugin.cs b/src/PollinationSDK/Model/Plugin.cs deleted file mode 100644 index 0f4a92860..000000000 --- a/src/PollinationSDK/Model/Plugin.cs +++ /dev/null @@ -1,284 +0,0 @@ -/* - * 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 Queenbee Plugin. A plugin contains runtime configuration for a Command Line Interface (CLI) and a list of functions that can be executed using this CLI tool. - /// - [DataContract(Name = "Plugin")] - public partial class Plugin : OpenAPIGenBaseModel, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected Plugin() - { - // Set non-required readonly properties with defaultValue - this.Type = "Plugin"; - this.ApiVersion = "v1beta1"; - } - - /// - /// Initializes a new instance of the class. - /// - /// The Plugin metadata information (required). - /// The configuration information to run this plugin (required). - /// List of Plugin functions (required). - /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. - public Plugin - ( - MetaData metadata, PluginConfig config, List functions, // Required parameters - Dictionary annotations= default // Optional parameters - ) : base()// BaseClass - { - // to ensure "metadata" is required (not null) - this.Metadata = metadata ?? throw new ArgumentNullException("metadata is a required property for Plugin and cannot be null"); - // to ensure "config" is required (not null) - this.Config = config ?? throw new ArgumentNullException("config is a required property for Plugin and cannot be null"); - // to ensure "functions" is required (not null) - this.Functions = functions ?? throw new ArgumentNullException("functions is a required property for Plugin and cannot be null"); - this.Annotations = annotations; - - // Set non-required readonly properties with defaultValue - this.Type = "Plugin"; - this.ApiVersion = "v1beta1"; - } - - //============================================== is ReadOnly - /// - /// Gets or Sets Type - /// - [DataMember(Name = "type", EmitDefaultValue = true)] - public string Type { get; protected internal set; } = "Plugin"; - //============================================== is ReadOnly - /// - /// Gets or Sets ApiVersion - /// - [DataMember(Name = "api_version", EmitDefaultValue = true)] - public string ApiVersion { get; protected internal set; } = "v1beta1"; - - /// - /// The Plugin metadata information - /// - /// The Plugin metadata information - [DataMember(Name = "metadata", IsRequired = true, EmitDefaultValue = false)] - public MetaData Metadata { get; set; } - /// - /// The configuration information to run this plugin - /// - /// The configuration information to run this plugin - [DataMember(Name = "config", IsRequired = true, EmitDefaultValue = false)] - public PluginConfig Config { get; set; } - /// - /// List of Plugin functions - /// - /// List of Plugin functions - [DataMember(Name = "functions", IsRequired = true, EmitDefaultValue = false)] - public List Functions { 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; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - return "Plugin"; - } - - /// - /// 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("Plugin:\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" Metadata: ").Append(Metadata).Append("\n"); - sb.Append(" Config: ").Append(Config).Append("\n"); - sb.Append(" Functions: ").Append(Functions).Append("\n"); - sb.Append(" Annotations: ").Append(Annotations).Append("\n"); - sb.Append(" ApiVersion: ").Append(ApiVersion).Append("\n"); - return sb.ToString(); - } - - /// - /// Returns the object from JSON string - /// - /// Plugin object - public static Plugin 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. - /// - /// Plugin object - public virtual Plugin DuplicatePlugin() - { - return FromJson(this.ToJson()); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel Duplicate() - { - return DuplicatePlugin(); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel DuplicateOpenAPIGenBaseModel() - { - return DuplicatePlugin(); - } - - /// - /// 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 Plugin); - } - - /// - /// Returns true if Plugin instances are equal - /// - /// Instance of Plugin to be compared - /// Boolean - public bool Equals(Plugin input) - { - if (input == null) - return false; - return base.Equals(input) && - ( - this.Metadata == input.Metadata || - (this.Metadata != null && - this.Metadata.Equals(input.Metadata)) - ) && base.Equals(input) && - ( - this.Config == input.Config || - (this.Config != null && - this.Config.Equals(input.Config)) - ) && base.Equals(input) && - ( - this.Functions == input.Functions || - this.Functions != null && - input.Functions != null && - this.Functions.SequenceEqual(input.Functions) - ) && base.Equals(input) && - ( - this.Type == input.Type || - (this.Type != null && - this.Type.Equals(input.Type)) - ) && 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)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = base.GetHashCode(); - if (this.Metadata != null) - hashCode = hashCode * 59 + this.Metadata.GetHashCode(); - if (this.Config != null) - hashCode = hashCode * 59 + this.Config.GetHashCode(); - if (this.Functions != null) - hashCode = hashCode * 59 + this.Functions.GetHashCode(); - if (this.Type != null) - hashCode = hashCode * 59 + this.Type.GetHashCode(); - if (this.Annotations != null) - hashCode = hashCode * 59 + this.Annotations.GetHashCode(); - if (this.ApiVersion != null) - hashCode = hashCode * 59 + this.ApiVersion.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(@"^Plugin", 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" }); - } - - - - // 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" }); - } - - yield break; - } - } -} diff --git a/src/PollinationSDK/Model/PluginConfig.cs b/src/PollinationSDK/Model/PluginConfig.cs deleted file mode 100644 index 3e06993df..000000000 --- a/src/PollinationSDK/Model/PluginConfig.cs +++ /dev/null @@ -1,240 +0,0 @@ -/* - * 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 -{ - /// - /// Plugin configuration. The config is used to schedule functions on a desktop or in other contexts (ie: Docker). - /// - [DataContract(Name = "PluginConfig")] - public partial class PluginConfig : OpenAPIGenBaseModel, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected PluginConfig() - { - // Set non-required readonly properties with defaultValue - this.Type = "PluginConfig"; - } - - /// - /// Initializes a new instance of the class. - /// - /// The configuration to use this plugin in a docker container (required). - /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. - /// The configuration to use this plugin locally. - public PluginConfig - ( - DockerConfig docker, // Required parameters - Dictionary annotations= default, LocalConfig local= default// Optional parameters - ) : base()// BaseClass - { - // to ensure "docker" is required (not null) - this.Docker = docker ?? throw new ArgumentNullException("docker is a required property for PluginConfig and cannot be null"); - this.Annotations = annotations; - this.Local = local; - - // Set non-required readonly properties with defaultValue - this.Type = "PluginConfig"; - } - - //============================================== is ReadOnly - /// - /// Gets or Sets Type - /// - [DataMember(Name = "type", EmitDefaultValue = true)] - public string Type { get; protected internal set; } = "PluginConfig"; - - /// - /// The configuration to use this plugin in a docker container - /// - /// The configuration to use this plugin in a docker container - [DataMember(Name = "docker", IsRequired = true, EmitDefaultValue = false)] - public DockerConfig Docker { 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; } - /// - /// The configuration to use this plugin locally - /// - /// The configuration to use this plugin locally - [DataMember(Name = "local", EmitDefaultValue = false)] - public LocalConfig Local { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - return "PluginConfig"; - } - - /// - /// 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("PluginConfig:\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" Docker: ").Append(Docker).Append("\n"); - sb.Append(" Annotations: ").Append(Annotations).Append("\n"); - sb.Append(" Local: ").Append(Local).Append("\n"); - return sb.ToString(); - } - - /// - /// Returns the object from JSON string - /// - /// PluginConfig object - public static PluginConfig 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. - /// - /// PluginConfig object - public virtual PluginConfig DuplicatePluginConfig() - { - return FromJson(this.ToJson()); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel Duplicate() - { - return DuplicatePluginConfig(); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel DuplicateOpenAPIGenBaseModel() - { - return DuplicatePluginConfig(); - } - - /// - /// 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 PluginConfig); - } - - /// - /// Returns true if PluginConfig instances are equal - /// - /// Instance of PluginConfig to be compared - /// Boolean - public bool Equals(PluginConfig input) - { - if (input == null) - return false; - return base.Equals(input) && - ( - this.Docker == input.Docker || - (this.Docker != null && - this.Docker.Equals(input.Docker)) - ) && base.Equals(input) && - ( - this.Type == input.Type || - (this.Type != null && - this.Type.Equals(input.Type)) - ) && base.Equals(input) && - ( - this.Annotations == input.Annotations || - this.Annotations != null && - input.Annotations != null && - this.Annotations.SequenceEqual(input.Annotations) - ) && base.Equals(input) && - ( - this.Local == input.Local || - (this.Local != null && - this.Local.Equals(input.Local)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = base.GetHashCode(); - if (this.Docker != null) - hashCode = hashCode * 59 + this.Docker.GetHashCode(); - if (this.Type != null) - hashCode = hashCode * 59 + this.Type.GetHashCode(); - if (this.Annotations != null) - hashCode = hashCode * 59 + this.Annotations.GetHashCode(); - if (this.Local != null) - hashCode = hashCode * 59 + this.Local.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(@"^PluginConfig", 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/PluginPackage.cs b/src/PollinationSDK/Model/PluginPackage.cs deleted file mode 100644 index 571fdd95e..000000000 --- a/src/PollinationSDK/Model/PluginPackage.cs +++ /dev/null @@ -1,220 +0,0 @@ -/* - * 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 -{ - /// - /// PluginPackage - /// - [DataContract(Name = "PluginPackage")] - public partial class PluginPackage : RepositoryPackage, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected PluginPackage() - { - // Set non-required readonly properties with defaultValue - this.Type = "PluginPackage"; - } - - /// - /// Initializes a new instance of the class. - /// - /// manifest (required). - /// The new package digest (required). - /// The new package tag (required). - /// keywords. - /// description. - /// icon. - /// Creation Timestamp. - /// The Repository Readme. - public PluginPackage - ( - string digest, string tag, Plugin manifest, // Required parameters - List keywords= default, string description= default, string icon= default, DateTime createdAt= default, string readme= default // Optional parameters - ) : base(digest: digest, tag: tag, keywords: keywords, description: description, icon: icon, createdAt: createdAt, readme: readme)// BaseClass - { - // to ensure "manifest" is required (not null) - this.Manifest = manifest ?? throw new ArgumentNullException("manifest is a required property for PluginPackage and cannot be null"); - - // Set non-required readonly properties with defaultValue - this.Type = "PluginPackage"; - } - - //============================================== is ReadOnly - /// - /// Gets or Sets Type - /// - [DataMember(Name = "type", EmitDefaultValue = true)] - public string Type { get; protected internal set; } = "PluginPackage"; - - /// - /// Gets or Sets Manifest - /// - [DataMember(Name = "manifest", IsRequired = true, EmitDefaultValue = false)] - public Plugin Manifest { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - return "PluginPackage"; - } - - /// - /// 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("PluginPackage:\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" Digest: ").Append(Digest).Append("\n"); - sb.Append(" Tag: ").Append(Tag).Append("\n"); - sb.Append(" Keywords: ").Append(Keywords).Append("\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" Icon: ").Append(Icon).Append("\n"); - sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n"); - sb.Append(" Readme: ").Append(Readme).Append("\n"); - sb.Append(" Manifest: ").Append(Manifest).Append("\n"); - return sb.ToString(); - } - - /// - /// Returns the object from JSON string - /// - /// PluginPackage object - public static PluginPackage 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. - /// - /// PluginPackage object - public virtual PluginPackage DuplicatePluginPackage() - { - return FromJson(this.ToJson()); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel Duplicate() - { - return DuplicatePluginPackage(); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override RepositoryPackage DuplicateRepositoryPackage() - { - return DuplicatePluginPackage(); - } - - /// - /// 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 PluginPackage); - } - - /// - /// Returns true if PluginPackage instances are equal - /// - /// Instance of PluginPackage to be compared - /// Boolean - public bool Equals(PluginPackage input) - { - if (input == null) - return false; - return base.Equals(input) && - ( - this.Manifest == input.Manifest || - (this.Manifest != null && - this.Manifest.Equals(input.Manifest)) - ) && 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.Manifest != null) - hashCode = hashCode * 59 + this.Manifest.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(@"^PluginPackage$", 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/PluginPackageList.cs b/src/PollinationSDK/Model/PluginPackageList.cs deleted file mode 100644 index 4f691883f..000000000 --- a/src/PollinationSDK/Model/PluginPackageList.cs +++ /dev/null @@ -1,287 +0,0 @@ -/* - * 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 = "PluginPackageList")] - public partial class PluginPackageList : OpenAPIGenBaseModel, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected PluginPackageList() - { - // Set non-required readonly properties with defaultValue - this.Type = "PluginPackageList"; - } - - /// - /// 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 PluginPackageList - ( - 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 PluginPackageList and cannot be null"); - this.NextPage = nextPage; - - // Set non-required readonly properties with defaultValue - this.Type = "PluginPackageList"; - } - - //============================================== is ReadOnly - /// - /// Gets or Sets Type - /// - [DataMember(Name = "type", EmitDefaultValue = true)] - public string Type { get; protected internal set; } = "PluginPackageList"; - - /// - /// 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 "PluginPackageList"; - } - - /// - /// 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("PluginPackageList:\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 - /// - /// PluginPackageList object - public static PluginPackageList 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. - /// - /// PluginPackageList object - public virtual PluginPackageList DuplicatePluginPackageList() - { - return FromJson(this.ToJson()); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel Duplicate() - { - return DuplicatePluginPackageList(); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel DuplicateOpenAPIGenBaseModel() - { - return DuplicatePluginPackageList(); - } - - /// - /// 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 PluginPackageList); - } - - /// - /// Returns true if PluginPackageList instances are equal - /// - /// Instance of PluginPackageList to be compared - /// Boolean - public bool Equals(PluginPackageList 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(@"^PluginPackageList$", 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/PolicySubject.cs b/src/PollinationSDK/Model/PolicySubject.cs deleted file mode 100644 index 226d6ca4a..000000000 --- a/src/PollinationSDK/Model/PolicySubject.cs +++ /dev/null @@ -1,232 +0,0 @@ -/* - * 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 -{ - /// - /// PolicySubject - /// - [DataContract(Name = "PolicySubject")] - public partial class PolicySubject : OpenAPIGenBaseModel, IEquatable, IValidatableObject - { - /// - /// Gets or Sets SubjectType - /// - [DataMember(Name="subject_type", EmitDefaultValue=false)] - public SubjectType SubjectType { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected PolicySubject() - { - // Set non-required readonly properties with defaultValue - this.Type = "PolicySubject"; - } - - /// - /// Initializes a new instance of the class. - /// - /// subjectType (required). - /// The name of the policy subject (required). - public PolicySubject - ( - SubjectType subjectType, string name// Required parameters - // Optional parameters - ) : base()// BaseClass - { - this.SubjectType = subjectType; - // to ensure "name" is required (not null) - this.Name = name ?? throw new ArgumentNullException("name is a required property for PolicySubject and cannot be null"); - - // Set non-required readonly properties with defaultValue - this.Type = "PolicySubject"; - } - - //============================================== is ReadOnly - /// - /// Gets or Sets Type - /// - [DataMember(Name = "type", EmitDefaultValue = true)] - public string Type { get; protected internal set; } = "PolicySubject"; - - /// - /// The name of the policy subject - /// - /// The name of the policy subject - [DataMember(Name = "name", IsRequired = true, EmitDefaultValue = false)] - public string Name { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - return "PolicySubject"; - } - - /// - /// 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("PolicySubject:\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 - /// - /// PolicySubject object - public static PolicySubject 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. - /// - /// PolicySubject object - public virtual PolicySubject DuplicatePolicySubject() - { - return FromJson(this.ToJson()); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel Duplicate() - { - return DuplicatePolicySubject(); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel DuplicateOpenAPIGenBaseModel() - { - return DuplicatePolicySubject(); - } - - /// - /// 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 PolicySubject); - } - - /// - /// Returns true if PolicySubject instances are equal - /// - /// Instance of PolicySubject to be compared - /// Boolean - public bool Equals(PolicySubject input) - { - if (input == null) - return false; - return base.Equals(input) && - ( - this.SubjectType == input.SubjectType || - (this.SubjectType != null && - this.SubjectType.Equals(input.SubjectType)) - ) && 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)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = base.GetHashCode(); - if (this.SubjectType != null) - hashCode = hashCode * 59 + this.SubjectType.GetHashCode(); - if (this.Name != null) - hashCode = hashCode * 59 + this.Name.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(@"^PolicySubject$", 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/Project.cs b/src/PollinationSDK/Model/Project.cs deleted file mode 100644 index bee683aa9..000000000 --- a/src/PollinationSDK/Model/Project.cs +++ /dev/null @@ -1,279 +0,0 @@ -/* - * 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 -{ - /// - /// Project - /// - [DataContract(Name = "Project")] - public partial class Project : ProjectCreate, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected Project() - { - // Set non-required readonly properties with defaultValue - this.Type = "Project"; - } - - /// - /// Initializes a new instance of the class. - /// - /// The project ID (required). - /// The project owner (required). - /// permissions (required). - /// The project name in slug format (required). - /// The resource consumption of this project. - /// The name of the project. Must be unique to a given owner (required). - /// A description of the project (default to ""). - /// Whether or not a project is publicly viewable (default to true). - public Project - ( - string name, string id, AccountPublic owner, UserPermission permissions, string slug, // Required parameters - string description = "", bool _public = true, Usage usage= default // Optional parameters - ) : base(name: name, description: description, _public: _public)// BaseClass - { - // to ensure "id" is required (not null) - this.Id = id ?? throw new ArgumentNullException("id is a required property for Project and cannot be null"); - // to ensure "owner" is required (not null) - this.Owner = owner ?? throw new ArgumentNullException("owner is a required property for Project and cannot be null"); - // to ensure "permissions" is required (not null) - this.Permissions = permissions ?? throw new ArgumentNullException("permissions is a required property for Project and cannot be null"); - // to ensure "slug" is required (not null) - this.Slug = slug ?? throw new ArgumentNullException("slug is a required property for Project and cannot be null"); - this.Usage = usage; - - // Set non-required readonly properties with defaultValue - this.Type = "Project"; - } - - //============================================== is ReadOnly - /// - /// Gets or Sets Type - /// - [DataMember(Name = "type", EmitDefaultValue = true)] - public string Type { get; protected internal set; } = "Project"; - - /// - /// The project ID - /// - /// The project ID - [DataMember(Name = "id", IsRequired = true, EmitDefaultValue = false)] - public string Id { get; set; } - /// - /// The project owner - /// - /// The project owner - [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 project name in slug format - /// - /// The project name in slug format - [DataMember(Name = "slug", IsRequired = true, EmitDefaultValue = false)] - public string Slug { get; set; } - /// - /// The resource consumption of this project - /// - /// The resource consumption of this project - [DataMember(Name = "usage", EmitDefaultValue = false)] - public Usage Usage { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - return "Project"; - } - - /// - /// 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("Project:\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" Public: ").Append(Public).Append("\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" Owner: ").Append(Owner).Append("\n"); - sb.Append(" Permissions: ").Append(Permissions).Append("\n"); - sb.Append(" Slug: ").Append(Slug).Append("\n"); - sb.Append(" Usage: ").Append(Usage).Append("\n"); - return sb.ToString(); - } - - /// - /// Returns the object from JSON string - /// - /// Project object - public static Project 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. - /// - /// Project object - public virtual Project DuplicateProject() - { - return FromJson(this.ToJson()); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel Duplicate() - { - return DuplicateProject(); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override ProjectCreate DuplicateProjectCreate() - { - return DuplicateProject(); - } - - /// - /// 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 Project); - } - - /// - /// Returns true if Project instances are equal - /// - /// Instance of Project to be compared - /// Boolean - public bool Equals(Project 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.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.Slug == input.Slug || - (this.Slug != null && - this.Slug.Equals(input.Slug)) - ) && base.Equals(input) && - ( - this.Usage == input.Usage || - (this.Usage != null && - this.Usage.Equals(input.Usage)) - ) && 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.Owner != null) - hashCode = hashCode * 59 + this.Owner.GetHashCode(); - if (this.Permissions != null) - hashCode = hashCode * 59 + this.Permissions.GetHashCode(); - if (this.Slug != null) - hashCode = hashCode * 59 + this.Slug.GetHashCode(); - if (this.Usage != null) - hashCode = hashCode * 59 + this.Usage.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(@"^Project$", 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/ProjectAccessPolicy.cs b/src/PollinationSDK/Model/ProjectAccessPolicy.cs deleted file mode 100644 index be4987690..000000000 --- a/src/PollinationSDK/Model/ProjectAccessPolicy.cs +++ /dev/null @@ -1,223 +0,0 @@ -/* - * 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 -{ - /// - /// ProjectAccessPolicy - /// - [DataContract(Name = "ProjectAccessPolicy")] - public partial class ProjectAccessPolicy : OpenAPIGenBaseModel, IEquatable, IValidatableObject - { - /// - /// The permission given to the subject of the access policy - /// - /// The permission given to the subject of the access policy - [DataMember(Name="permission", EmitDefaultValue=false)] - public Permission Permission { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected ProjectAccessPolicy() - { - // Set non-required readonly properties with defaultValue - this.Type = "ProjectAccessPolicy"; - } - - /// - /// Initializes a new instance of the class. - /// - /// The subject of the access policy (required). - /// The permission given to the subject of the access policy (required). - public ProjectAccessPolicy - ( - PolicySubject 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 ProjectAccessPolicy and cannot be null"); - this.Permission = permission; - - // Set non-required readonly properties with defaultValue - this.Type = "ProjectAccessPolicy"; - } - - //============================================== is ReadOnly - /// - /// Gets or Sets Type - /// - [DataMember(Name = "type", EmitDefaultValue = true)] - public string Type { get; protected internal set; } = "ProjectAccessPolicy"; - - /// - /// 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 "ProjectAccessPolicy"; - } - - /// - /// 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("ProjectAccessPolicy:\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 - /// - /// ProjectAccessPolicy object - public static ProjectAccessPolicy 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. - /// - /// ProjectAccessPolicy object - public virtual ProjectAccessPolicy DuplicateProjectAccessPolicy() - { - return FromJson(this.ToJson()); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel Duplicate() - { - return DuplicateProjectAccessPolicy(); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel DuplicateOpenAPIGenBaseModel() - { - return DuplicateProjectAccessPolicy(); - } - - /// - /// 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 ProjectAccessPolicy); - } - - /// - /// Returns true if ProjectAccessPolicy instances are equal - /// - /// Instance of ProjectAccessPolicy to be compared - /// Boolean - public bool Equals(ProjectAccessPolicy 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(@"^ProjectAccessPolicy$", 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/ProjectAccessPolicyList.cs b/src/PollinationSDK/Model/ProjectAccessPolicyList.cs deleted file mode 100644 index 9bfc5ac1a..000000000 --- a/src/PollinationSDK/Model/ProjectAccessPolicyList.cs +++ /dev/null @@ -1,287 +0,0 @@ -/* - * 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 = "ProjectAccessPolicyList")] - public partial class ProjectAccessPolicyList : OpenAPIGenBaseModel, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected ProjectAccessPolicyList() - { - // Set non-required readonly properties with defaultValue - this.Type = "ProjectAccessPolicyList"; - } - - /// - /// 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 ProjectAccessPolicyList - ( - 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 ProjectAccessPolicyList and cannot be null"); - this.NextPage = nextPage; - - // Set non-required readonly properties with defaultValue - this.Type = "ProjectAccessPolicyList"; - } - - //============================================== is ReadOnly - /// - /// Gets or Sets Type - /// - [DataMember(Name = "type", EmitDefaultValue = true)] - public string Type { get; protected internal set; } = "ProjectAccessPolicyList"; - - /// - /// 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 "ProjectAccessPolicyList"; - } - - /// - /// 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("ProjectAccessPolicyList:\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 - /// - /// ProjectAccessPolicyList object - public static ProjectAccessPolicyList 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. - /// - /// ProjectAccessPolicyList object - public virtual ProjectAccessPolicyList DuplicateProjectAccessPolicyList() - { - return FromJson(this.ToJson()); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel Duplicate() - { - return DuplicateProjectAccessPolicyList(); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel DuplicateOpenAPIGenBaseModel() - { - return DuplicateProjectAccessPolicyList(); - } - - /// - /// 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 ProjectAccessPolicyList); - } - - /// - /// Returns true if ProjectAccessPolicyList instances are equal - /// - /// Instance of ProjectAccessPolicyList to be compared - /// Boolean - public bool Equals(ProjectAccessPolicyList 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(@"^ProjectAccessPolicyList$", 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/ProjectCreate.cs b/src/PollinationSDK/Model/ProjectCreate.cs deleted file mode 100644 index d28b0a7e1..000000000 --- a/src/PollinationSDK/Model/ProjectCreate.cs +++ /dev/null @@ -1,250 +0,0 @@ -/* - * 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 -{ - /// - /// ProjectCreate - /// - [DataContract(Name = "ProjectCreate")] - public partial class ProjectCreate : OpenAPIGenBaseModel, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected ProjectCreate() - { - // Set non-required readonly properties with defaultValue - this.Type = "ProjectCreate"; - } - - /// - /// Initializes a new instance of the class. - /// - /// The name of the project. Must be unique to a given owner (required). - /// A description of the project (default to ""). - /// Whether or not a project is publicly viewable (default to true). - public ProjectCreate - ( - string name, // Required parameters - string description = "", bool _public = true // Optional parameters - ) : base()// BaseClass - { - // to ensure "name" is required (not null) - this.Name = name ?? throw new ArgumentNullException("name is a required property for ProjectCreate and cannot be null"); - // use default value if no "description" provided - this.Description = description ?? ""; - this.Public = _public; - - // Set non-required readonly properties with defaultValue - this.Type = "ProjectCreate"; - } - - //============================================== is ReadOnly - /// - /// Gets or Sets Type - /// - [DataMember(Name = "type", EmitDefaultValue = true)] - public string Type { get; protected internal set; } = "ProjectCreate"; - - /// - /// The name of the project. Must be unique to a given owner - /// - /// The name of the project. Must be unique to a given owner - [DataMember(Name = "name", IsRequired = true, EmitDefaultValue = false)] - public string Name { get; set; } - /// - /// A description of the project - /// - /// A description of the project - [DataMember(Name = "description", EmitDefaultValue = true)] - public string Description { get; set; } = ""; - /// - /// Whether or not a project is publicly viewable - /// - /// Whether or not a project is publicly viewable - [DataMember(Name = "public", EmitDefaultValue = true)] - public bool Public { get; set; } = true; - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - return "ProjectCreate"; - } - - /// - /// 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("ProjectCreate:\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" Public: ").Append(Public).Append("\n"); - return sb.ToString(); - } - - /// - /// Returns the object from JSON string - /// - /// ProjectCreate object - public static ProjectCreate 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. - /// - /// ProjectCreate object - public virtual ProjectCreate DuplicateProjectCreate() - { - return FromJson(this.ToJson()); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel Duplicate() - { - return DuplicateProjectCreate(); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel DuplicateOpenAPIGenBaseModel() - { - return DuplicateProjectCreate(); - } - - /// - /// 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 ProjectCreate); - } - - /// - /// Returns true if ProjectCreate instances are equal - /// - /// Instance of ProjectCreate to be compared - /// Boolean - public bool Equals(ProjectCreate 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.Description == input.Description || - (this.Description != null && - this.Description.Equals(input.Description)) - ) && base.Equals(input) && - ( - this.Public == input.Public || - (this.Public != null && - this.Public.Equals(input.Public)) - ) && 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.Description != null) - hashCode = hashCode * 59 + this.Description.GetHashCode(); - if (this.Public != null) - hashCode = hashCode * 59 + this.Public.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(@"^ProjectCreate$", 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/ProjectFolder.cs b/src/PollinationSDK/Model/ProjectFolder.cs deleted file mode 100644 index f27e378f6..000000000 --- a/src/PollinationSDK/Model/ProjectFolder.cs +++ /dev/null @@ -1,198 +0,0 @@ -/* - * 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 -{ - /// - /// Project Folder Source This is the path to a folder where files and folders can be sourced. In the context of a desktop run Workflow this folder will correspond to a local folder. In the context of a workflow run on Pollination this folder will correspond to a Project scoped folder. - /// - [DataContract(Name = "ProjectFolder")] - public partial class ProjectFolder : ArtifactSource, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// The path to a folder where files and folders can be sourced. For a local filesystem this can be \"C:\\Users\\me\\jobs\\test\".. - /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. - public ProjectFolder - ( - // Required parameters - Dictionary annotations= default, string path= default // Optional parameters - ) : base(annotations: annotations)// BaseClass - { - this.Path = path; - - // Set non-required readonly properties with defaultValue - this.Type = "ProjectFolder"; - } - - //============================================== is ReadOnly - /// - /// Gets or Sets Type - /// - [DataMember(Name = "type", EmitDefaultValue = true)] - public string Type { get; protected internal set; } = "ProjectFolder"; - - /// - /// The path to a folder where files and folders can be sourced. For a local filesystem this can be \"C:\\Users\\me\\jobs\\test\". - /// - /// The path to a folder where files and folders can be sourced. For a local filesystem this can be \"C:\\Users\\me\\jobs\\test\". - [DataMember(Name = "path", EmitDefaultValue = false)] - public string Path { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - return "ProjectFolder"; - } - - /// - /// 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("ProjectFolder:\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" Annotations: ").Append(Annotations).Append("\n"); - sb.Append(" Path: ").Append(Path).Append("\n"); - return sb.ToString(); - } - - /// - /// Returns the object from JSON string - /// - /// ProjectFolder object - public static ProjectFolder 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. - /// - /// ProjectFolder object - public virtual ProjectFolder DuplicateProjectFolder() - { - return FromJson(this.ToJson()); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel Duplicate() - { - return DuplicateProjectFolder(); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override ArtifactSource DuplicateArtifactSource() - { - return DuplicateProjectFolder(); - } - - /// - /// 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 ProjectFolder); - } - - /// - /// Returns true if ProjectFolder instances are equal - /// - /// Instance of ProjectFolder to be compared - /// Boolean - public bool Equals(ProjectFolder input) - { - if (input == null) - return false; - return base.Equals(input) && - ( - this.Path == input.Path || - (this.Path != null && - this.Path.Equals(input.Path)) - ) && 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.Path != null) - hashCode = hashCode * 59 + this.Path.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(@"^ProjectFolder$", 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/ProjectList.cs b/src/PollinationSDK/Model/ProjectList.cs deleted file mode 100644 index 955b90745..000000000 --- a/src/PollinationSDK/Model/ProjectList.cs +++ /dev/null @@ -1,287 +0,0 @@ -/* - * 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 = "ProjectList")] - public partial class ProjectList : OpenAPIGenBaseModel, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected ProjectList() - { - // Set non-required readonly properties with defaultValue - this.Type = "ProjectList"; - } - - /// - /// 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 ProjectList - ( - 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 ProjectList and cannot be null"); - this.NextPage = nextPage; - - // Set non-required readonly properties with defaultValue - this.Type = "ProjectList"; - } - - //============================================== is ReadOnly - /// - /// Gets or Sets Type - /// - [DataMember(Name = "type", EmitDefaultValue = true)] - public string Type { get; protected internal set; } = "ProjectList"; - - /// - /// 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 "ProjectList"; - } - - /// - /// 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("ProjectList:\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 - /// - /// ProjectList object - public static ProjectList 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. - /// - /// ProjectList object - public virtual ProjectList DuplicateProjectList() - { - return FromJson(this.ToJson()); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel Duplicate() - { - return DuplicateProjectList(); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel DuplicateOpenAPIGenBaseModel() - { - return DuplicateProjectList(); - } - - /// - /// 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 ProjectList); - } - - /// - /// Returns true if ProjectList instances are equal - /// - /// Instance of ProjectList to be compared - /// Boolean - public bool Equals(ProjectList 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(@"^ProjectList$", 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/ProjectPolicySubject.cs b/src/PollinationSDK/Model/ProjectPolicySubject.cs deleted file mode 100644 index 5ad0f4301..000000000 --- a/src/PollinationSDK/Model/ProjectPolicySubject.cs +++ /dev/null @@ -1,194 +0,0 @@ -/* - * 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 -{ - /// - /// ProjectPolicySubject - /// - [DataContract(Name = "ProjectPolicySubject")] - public partial class ProjectPolicySubject : PolicySubject, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected ProjectPolicySubject() - { - // Set non-required readonly properties with defaultValue - this.Type = "ProjectPolicySubject"; - } - - /// - /// Initializes a new instance of the class. - /// - /// subjectType (required). - /// The name of the policy subject (required). - public ProjectPolicySubject - ( - SubjectType subjectType, string name// Required parameters - // Optional parameters - ) : base(subjectType: subjectType, name: name)// BaseClass - { - - // Set non-required readonly properties with defaultValue - this.Type = "ProjectPolicySubject"; - } - - //============================================== is ReadOnly - /// - /// Gets or Sets Type - /// - [DataMember(Name = "type", EmitDefaultValue = true)] - public string Type { get; protected internal set; } = "ProjectPolicySubject"; - - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - return "ProjectPolicySubject"; - } - - /// - /// 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("ProjectPolicySubject:\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 - /// - /// ProjectPolicySubject object - public static ProjectPolicySubject 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. - /// - /// ProjectPolicySubject object - public virtual ProjectPolicySubject DuplicateProjectPolicySubject() - { - return FromJson(this.ToJson()); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel Duplicate() - { - return DuplicateProjectPolicySubject(); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override PolicySubject DuplicatePolicySubject() - { - return DuplicateProjectPolicySubject(); - } - - /// - /// 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 ProjectPolicySubject); - } - - /// - /// Returns true if ProjectPolicySubject instances are equal - /// - /// Instance of ProjectPolicySubject to be compared - /// Boolean - public bool Equals(ProjectPolicySubject 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(@"^ProjectPolicySubject$", 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/ProjectRecipeFilter.cs b/src/PollinationSDK/Model/ProjectRecipeFilter.cs deleted file mode 100644 index e8afee549..000000000 --- a/src/PollinationSDK/Model/ProjectRecipeFilter.cs +++ /dev/null @@ -1,240 +0,0 @@ -/* - * 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 -{ - /// - /// ProjectRecipeFilter - /// - [DataContract(Name = "ProjectRecipeFilter")] - public partial class ProjectRecipeFilter : OpenAPIGenBaseModel, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected ProjectRecipeFilter() - { - // Set non-required readonly properties with defaultValue - this.Type = "ProjectRecipeFilter"; - } - - /// - /// Initializes a new instance of the class. - /// - /// The name of the account the recipe belongs to (required). - /// The name of the recipe (required). - /// The specific recipe tag. - public ProjectRecipeFilter - ( - string owner, string name, // Required parameters - string tag= default // Optional parameters - ) : base()// BaseClass - { - // to ensure "owner" is required (not null) - this.Owner = owner ?? throw new ArgumentNullException("owner is a required property for ProjectRecipeFilter and cannot be null"); - // to ensure "name" is required (not null) - this.Name = name ?? throw new ArgumentNullException("name is a required property for ProjectRecipeFilter and cannot be null"); - this.Tag = tag; - - // Set non-required readonly properties with defaultValue - this.Type = "ProjectRecipeFilter"; - } - - //============================================== is ReadOnly - /// - /// Gets or Sets Type - /// - [DataMember(Name = "type", EmitDefaultValue = true)] - public string Type { get; protected internal set; } = "ProjectRecipeFilter"; - - /// - /// The name of the account the recipe belongs to - /// - /// The name of the account the recipe belongs to - [DataMember(Name = "owner", IsRequired = true, EmitDefaultValue = false)] - public string Owner { get; set; } - /// - /// The name of the recipe - /// - /// The name of the recipe - [DataMember(Name = "name", IsRequired = true, EmitDefaultValue = false)] - public string Name { get; set; } - /// - /// The specific recipe tag - /// - /// The specific recipe tag - [DataMember(Name = "tag", EmitDefaultValue = false)] - public string Tag { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - return "ProjectRecipeFilter"; - } - - /// - /// 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("ProjectRecipeFilter:\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" Owner: ").Append(Owner).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" Tag: ").Append(Tag).Append("\n"); - return sb.ToString(); - } - - /// - /// Returns the object from JSON string - /// - /// ProjectRecipeFilter object - public static ProjectRecipeFilter 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. - /// - /// ProjectRecipeFilter object - public virtual ProjectRecipeFilter DuplicateProjectRecipeFilter() - { - return FromJson(this.ToJson()); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel Duplicate() - { - return DuplicateProjectRecipeFilter(); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel DuplicateOpenAPIGenBaseModel() - { - return DuplicateProjectRecipeFilter(); - } - - /// - /// 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 ProjectRecipeFilter); - } - - /// - /// Returns true if ProjectRecipeFilter instances are equal - /// - /// Instance of ProjectRecipeFilter to be compared - /// Boolean - public bool Equals(ProjectRecipeFilter input) - { - if (input == null) - return false; - return base.Equals(input) && - ( - this.Owner == input.Owner || - (this.Owner != null && - this.Owner.Equals(input.Owner)) - ) && base.Equals(input) && - ( - this.Name == input.Name || - (this.Name != null && - this.Name.Equals(input.Name)) - ) && base.Equals(input) && - ( - this.Tag == input.Tag || - (this.Tag != null && - this.Tag.Equals(input.Tag)) - ) && 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.Owner != null) - hashCode = hashCode * 59 + this.Owner.GetHashCode(); - if (this.Name != null) - hashCode = hashCode * 59 + this.Name.GetHashCode(); - if (this.Tag != null) - hashCode = hashCode * 59 + this.Tag.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(@"^ProjectRecipeFilter$", 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/ProjectRecipeFilterList.cs b/src/PollinationSDK/Model/ProjectRecipeFilterList.cs deleted file mode 100644 index 75b243e31..000000000 --- a/src/PollinationSDK/Model/ProjectRecipeFilterList.cs +++ /dev/null @@ -1,287 +0,0 @@ -/* - * 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 = "ProjectRecipeFilterList")] - public partial class ProjectRecipeFilterList : OpenAPIGenBaseModel, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected ProjectRecipeFilterList() - { - // Set non-required readonly properties with defaultValue - this.Type = "ProjectRecipeFilterList"; - } - - /// - /// 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 ProjectRecipeFilterList - ( - 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 ProjectRecipeFilterList and cannot be null"); - this.NextPage = nextPage; - - // Set non-required readonly properties with defaultValue - this.Type = "ProjectRecipeFilterList"; - } - - //============================================== is ReadOnly - /// - /// Gets or Sets Type - /// - [DataMember(Name = "type", EmitDefaultValue = true)] - public string Type { get; protected internal set; } = "ProjectRecipeFilterList"; - - /// - /// 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 "ProjectRecipeFilterList"; - } - - /// - /// 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("ProjectRecipeFilterList:\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 - /// - /// ProjectRecipeFilterList object - public static ProjectRecipeFilterList 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. - /// - /// ProjectRecipeFilterList object - public virtual ProjectRecipeFilterList DuplicateProjectRecipeFilterList() - { - return FromJson(this.ToJson()); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel Duplicate() - { - return DuplicateProjectRecipeFilterList(); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel DuplicateOpenAPIGenBaseModel() - { - return DuplicateProjectRecipeFilterList(); - } - - /// - /// 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 ProjectRecipeFilterList); - } - - /// - /// Returns true if ProjectRecipeFilterList instances are equal - /// - /// Instance of ProjectRecipeFilterList to be compared - /// Boolean - public bool Equals(ProjectRecipeFilterList 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(@"^ProjectRecipeFilterList$", 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/ProjectUpdate.cs b/src/PollinationSDK/Model/ProjectUpdate.cs deleted file mode 100644 index e88536fe7..000000000 --- a/src/PollinationSDK/Model/ProjectUpdate.cs +++ /dev/null @@ -1,228 +0,0 @@ -/* - * 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 -{ - /// - /// ProjectUpdate - /// - [DataContract(Name = "ProjectUpdate")] - public partial class ProjectUpdate : OpenAPIGenBaseModel, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// The name of the project. Must be unique to a given owner. - /// A description of the project. - /// Whether or not a project is publicly viewable. - public ProjectUpdate - ( - // Required parameters - string name= default, string description= default, bool _public= default // Optional parameters - ) : base()// BaseClass - { - this.Name = name; - this.Description = description; - this.Public = _public; - - // Set non-required readonly properties with defaultValue - this.Type = "ProjectUpdate"; - } - - //============================================== is ReadOnly - /// - /// Gets or Sets Type - /// - [DataMember(Name = "type", EmitDefaultValue = true)] - public string Type { get; protected internal set; } = "ProjectUpdate"; - - /// - /// The name of the project. Must be unique to a given owner - /// - /// The name of the project. Must be unique to a given owner - [DataMember(Name = "name", EmitDefaultValue = false)] - public string Name { get; set; } - /// - /// A description of the project - /// - /// A description of the project - [DataMember(Name = "description", EmitDefaultValue = false)] - public string Description { get; set; } - /// - /// Whether or not a project is publicly viewable - /// - /// Whether or not a project is publicly viewable - [DataMember(Name = "public", EmitDefaultValue = false)] - public bool Public { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - return "ProjectUpdate"; - } - - /// - /// 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("ProjectUpdate:\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" Public: ").Append(Public).Append("\n"); - return sb.ToString(); - } - - /// - /// Returns the object from JSON string - /// - /// ProjectUpdate object - public static ProjectUpdate 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. - /// - /// ProjectUpdate object - public virtual ProjectUpdate DuplicateProjectUpdate() - { - return FromJson(this.ToJson()); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel Duplicate() - { - return DuplicateProjectUpdate(); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel DuplicateOpenAPIGenBaseModel() - { - return DuplicateProjectUpdate(); - } - - /// - /// 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 ProjectUpdate); - } - - /// - /// Returns true if ProjectUpdate instances are equal - /// - /// Instance of ProjectUpdate to be compared - /// Boolean - public bool Equals(ProjectUpdate 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.Description == input.Description || - (this.Description != null && - this.Description.Equals(input.Description)) - ) && base.Equals(input) && - ( - this.Public == input.Public || - (this.Public != null && - this.Public.Equals(input.Public)) - ) && 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.Description != null) - hashCode = hashCode * 59 + this.Description.GetHashCode(); - if (this.Public != null) - hashCode = hashCode * 59 + this.Public.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(@"^ProjectUpdate$", 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/PublicAccountList.cs b/src/PollinationSDK/Model/PublicAccountList.cs deleted file mode 100644 index 9f55b9356..000000000 --- a/src/PollinationSDK/Model/PublicAccountList.cs +++ /dev/null @@ -1,287 +0,0 @@ -/* - * 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 = "PublicAccountList")] - public partial class PublicAccountList : OpenAPIGenBaseModel, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected PublicAccountList() - { - // Set non-required readonly properties with defaultValue - this.Type = "PublicAccountList"; - } - - /// - /// 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 PublicAccountList - ( - 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 PublicAccountList and cannot be null"); - this.NextPage = nextPage; - - // Set non-required readonly properties with defaultValue - this.Type = "PublicAccountList"; - } - - //============================================== is ReadOnly - /// - /// Gets or Sets Type - /// - [DataMember(Name = "type", EmitDefaultValue = true)] - public string Type { get; protected internal set; } = "PublicAccountList"; - - /// - /// 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 "PublicAccountList"; - } - - /// - /// 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("PublicAccountList:\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 - /// - /// PublicAccountList object - public static PublicAccountList 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. - /// - /// PublicAccountList object - public virtual PublicAccountList DuplicatePublicAccountList() - { - return FromJson(this.ToJson()); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel Duplicate() - { - return DuplicatePublicAccountList(); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel DuplicateOpenAPIGenBaseModel() - { - return DuplicatePublicAccountList(); - } - - /// - /// 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 PublicAccountList); - } - - /// - /// Returns true if PublicAccountList instances are equal - /// - /// Instance of PublicAccountList to be compared - /// Boolean - public bool Equals(PublicAccountList 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(@"^PublicAccountList$", 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/Recipe.cs b/src/PollinationSDK/Model/Recipe.cs deleted file mode 100644 index 53520a885..000000000 --- a/src/PollinationSDK/Model/Recipe.cs +++ /dev/null @@ -1,283 +0,0 @@ -/* - * 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 Queenbee Recipe - /// - [DataContract(Name = "Recipe")] - public partial class Recipe : OpenAPIGenBaseModel, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected Recipe() - { - // Set non-required readonly properties with defaultValue - this.Type = "Recipe"; - this.ApiVersion = "v1beta1"; - } - - /// - /// Initializes a new instance of the class. - /// - /// A list of tasks to create a DAG recipe. (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 Recipe - ( - List flow, // 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 Recipe and cannot be null"); - this.Annotations = annotations; - this.Metadata = metadata; - this.Dependencies = dependencies; - - // Set non-required readonly properties with defaultValue - this.Type = "Recipe"; - this.ApiVersion = "v1beta1"; - } - - //============================================== is ReadOnly - /// - /// Gets or Sets Type - /// - [DataMember(Name = "type", EmitDefaultValue = true)] - public string Type { get; protected internal set; } = "Recipe"; - //============================================== is ReadOnly - /// - /// Gets or Sets ApiVersion - /// - [DataMember(Name = "api_version", EmitDefaultValue = true)] - public string ApiVersion { get; protected internal set; } = "v1beta1"; - - /// - /// 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; } - /// - /// 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 "Recipe"; - } - - /// - /// 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("Recipe:\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" Flow: ").Append(Flow).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 - /// - /// Recipe object - public static Recipe 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. - /// - /// Recipe object - public virtual Recipe DuplicateRecipe() - { - return FromJson(this.ToJson()); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel Duplicate() - { - return DuplicateRecipe(); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel DuplicateOpenAPIGenBaseModel() - { - return DuplicateRecipe(); - } - - /// - /// 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 Recipe); - } - - /// - /// Returns true if Recipe instances are equal - /// - /// Instance of Recipe to be compared - /// Boolean - public bool Equals(Recipe 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.Type == input.Type || - (this.Type != null && - this.Type.Equals(input.Type)) - ) && 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) - ); - } - - /// - /// 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.Type != null) - hashCode = hashCode * 59 + this.Type.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(); - 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(@"^Recipe$", 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" }); - } - - - - // 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" }); - } - - yield break; - } - } -} diff --git a/src/PollinationSDK/Model/RecipeInterface.cs b/src/PollinationSDK/Model/RecipeInterface.cs deleted file mode 100644 index 78812f27d..000000000 --- a/src/PollinationSDK/Model/RecipeInterface.cs +++ /dev/null @@ -1,299 +0,0 @@ -/* - * 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 interface object for creating a Recipe. Recipe information only includes metadata, source, inputs and outputs of a Recipe. This object is useful for creating user interface for Recipes. - /// - [DataContract(Name = "RecipeInterface")] - public partial class RecipeInterface : OpenAPIGenBaseModel, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected RecipeInterface() - { - // Set non-required readonly properties with defaultValue - this.Type = "RecipeInterface"; - this.ApiVersion = "v1beta1"; - } - - /// - /// Initializes a new instance of the class. - /// - /// Recipe metadata information. (required). - /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. - /// A URL to the source this recipe from a registry.. - /// A list of recipe inputs.. - /// A list of recipe outputs.. - public RecipeInterface - ( - MetaData metadata, // Required parameters - Dictionary annotations= default, string source= default, List> inputs= default, List> outputs= default// Optional parameters - ) : base()// BaseClass - { - // to ensure "metadata" is required (not null) - this.Metadata = metadata ?? throw new ArgumentNullException("metadata is a required property for RecipeInterface and cannot be null"); - this.Annotations = annotations; - this.Source = source; - this.Inputs = inputs; - this.Outputs = outputs; - - // Set non-required readonly properties with defaultValue - this.Type = "RecipeInterface"; - this.ApiVersion = "v1beta1"; - } - - //============================================== is ReadOnly - /// - /// Gets or Sets Type - /// - [DataMember(Name = "type", EmitDefaultValue = true)] - public string Type { get; protected internal set; } = "RecipeInterface"; - //============================================== is ReadOnly - /// - /// Gets or Sets ApiVersion - /// - [DataMember(Name = "api_version", EmitDefaultValue = true)] - public string ApiVersion { get; protected internal set; } = "v1beta1"; - - /// - /// Recipe metadata information. - /// - /// Recipe metadata information. - [DataMember(Name = "metadata", IsRequired = true, EmitDefaultValue = false)] - public MetaData Metadata { 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; } - /// - /// A URL to the source this recipe from a registry. - /// - /// A URL to the source this recipe from a registry. - [DataMember(Name = "source", EmitDefaultValue = false)] - public string Source { get; set; } - /// - /// A list of recipe inputs. - /// - /// A list of recipe inputs. - [DataMember(Name = "inputs", EmitDefaultValue = false)] - public List> Inputs { get; set; } - /// - /// A list of recipe outputs. - /// - /// A list of recipe outputs. - [DataMember(Name = "outputs", EmitDefaultValue = false)] - public List> Outputs { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - return "RecipeInterface"; - } - - /// - /// 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("RecipeInterface:\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" Metadata: ").Append(Metadata).Append("\n"); - sb.Append(" Annotations: ").Append(Annotations).Append("\n"); - sb.Append(" ApiVersion: ").Append(ApiVersion).Append("\n"); - sb.Append(" Source: ").Append(Source).Append("\n"); - sb.Append(" Inputs: ").Append(Inputs).Append("\n"); - sb.Append(" Outputs: ").Append(Outputs).Append("\n"); - return sb.ToString(); - } - - /// - /// Returns the object from JSON string - /// - /// RecipeInterface object - public static RecipeInterface 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. - /// - /// RecipeInterface object - public virtual RecipeInterface DuplicateRecipeInterface() - { - return FromJson(this.ToJson()); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel Duplicate() - { - return DuplicateRecipeInterface(); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel DuplicateOpenAPIGenBaseModel() - { - return DuplicateRecipeInterface(); - } - - /// - /// 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 RecipeInterface); - } - - /// - /// Returns true if RecipeInterface instances are equal - /// - /// Instance of RecipeInterface to be compared - /// Boolean - public bool Equals(RecipeInterface input) - { - if (input == null) - return false; - return 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)) - ) && 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.Source == input.Source || - (this.Source != null && - this.Source.Equals(input.Source)) - ) && 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) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = base.GetHashCode(); - if (this.Metadata != null) - hashCode = hashCode * 59 + this.Metadata.GetHashCode(); - if (this.Type != null) - hashCode = hashCode * 59 + this.Type.GetHashCode(); - if (this.Annotations != null) - hashCode = hashCode * 59 + this.Annotations.GetHashCode(); - if (this.ApiVersion != null) - hashCode = hashCode * 59 + this.ApiVersion.GetHashCode(); - if (this.Source != null) - hashCode = hashCode * 59 + this.Source.GetHashCode(); - if (this.Inputs != null) - hashCode = hashCode * 59 + this.Inputs.GetHashCode(); - if (this.Outputs != null) - hashCode = hashCode * 59 + this.Outputs.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(@"^RecipeInterface$", 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" }); - } - - - - // 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" }); - } - - yield break; - } - } -} diff --git a/src/PollinationSDK/Model/RecipeInterfaceList.cs b/src/PollinationSDK/Model/RecipeInterfaceList.cs deleted file mode 100644 index dd6dc8c9d..000000000 --- a/src/PollinationSDK/Model/RecipeInterfaceList.cs +++ /dev/null @@ -1,287 +0,0 @@ -/* - * 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 = "RecipeInterfaceList")] - public partial class RecipeInterfaceList : OpenAPIGenBaseModel, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected RecipeInterfaceList() - { - // Set non-required readonly properties with defaultValue - this.Type = "RecipeInterfaceList"; - } - - /// - /// 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 RecipeInterfaceList - ( - 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 RecipeInterfaceList and cannot be null"); - this.NextPage = nextPage; - - // Set non-required readonly properties with defaultValue - this.Type = "RecipeInterfaceList"; - } - - //============================================== is ReadOnly - /// - /// Gets or Sets Type - /// - [DataMember(Name = "type", EmitDefaultValue = true)] - public string Type { get; protected internal set; } = "RecipeInterfaceList"; - - /// - /// 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 "RecipeInterfaceList"; - } - - /// - /// 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("RecipeInterfaceList:\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 - /// - /// RecipeInterfaceList object - public static RecipeInterfaceList 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. - /// - /// RecipeInterfaceList object - public virtual RecipeInterfaceList DuplicateRecipeInterfaceList() - { - return FromJson(this.ToJson()); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel Duplicate() - { - return DuplicateRecipeInterfaceList(); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel DuplicateOpenAPIGenBaseModel() - { - return DuplicateRecipeInterfaceList(); - } - - /// - /// 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 RecipeInterfaceList); - } - - /// - /// Returns true if RecipeInterfaceList instances are equal - /// - /// Instance of RecipeInterfaceList to be compared - /// Boolean - public bool Equals(RecipeInterfaceList 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(@"^RecipeInterfaceList$", 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/RecipePackage.cs b/src/PollinationSDK/Model/RecipePackage.cs deleted file mode 100644 index c4910a915..000000000 --- a/src/PollinationSDK/Model/RecipePackage.cs +++ /dev/null @@ -1,220 +0,0 @@ -/* - * 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 -{ - /// - /// RecipePackage - /// - [DataContract(Name = "RecipePackage")] - public partial class RecipePackage : RepositoryPackage, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected RecipePackage() - { - // Set non-required readonly properties with defaultValue - this.Type = "RecipePackage"; - } - - /// - /// Initializes a new instance of the class. - /// - /// manifest (required). - /// The new package digest (required). - /// The new package tag (required). - /// keywords. - /// description. - /// icon. - /// Creation Timestamp. - /// The Repository Readme. - public RecipePackage - ( - string digest, string tag, RecipeInterface manifest, // Required parameters - List keywords= default, string description= default, string icon= default, DateTime createdAt= default, string readme= default // Optional parameters - ) : base(digest: digest, tag: tag, keywords: keywords, description: description, icon: icon, createdAt: createdAt, readme: readme)// BaseClass - { - // to ensure "manifest" is required (not null) - this.Manifest = manifest ?? throw new ArgumentNullException("manifest is a required property for RecipePackage and cannot be null"); - - // Set non-required readonly properties with defaultValue - this.Type = "RecipePackage"; - } - - //============================================== is ReadOnly - /// - /// Gets or Sets Type - /// - [DataMember(Name = "type", EmitDefaultValue = true)] - public string Type { get; protected internal set; } = "RecipePackage"; - - /// - /// Gets or Sets Manifest - /// - [DataMember(Name = "manifest", IsRequired = true, EmitDefaultValue = false)] - public RecipeInterface Manifest { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - return "RecipePackage"; - } - - /// - /// 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("RecipePackage:\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" Digest: ").Append(Digest).Append("\n"); - sb.Append(" Tag: ").Append(Tag).Append("\n"); - sb.Append(" Keywords: ").Append(Keywords).Append("\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" Icon: ").Append(Icon).Append("\n"); - sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n"); - sb.Append(" Readme: ").Append(Readme).Append("\n"); - sb.Append(" Manifest: ").Append(Manifest).Append("\n"); - return sb.ToString(); - } - - /// - /// Returns the object from JSON string - /// - /// RecipePackage object - public static RecipePackage 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. - /// - /// RecipePackage object - public virtual RecipePackage DuplicateRecipePackage() - { - return FromJson(this.ToJson()); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel Duplicate() - { - return DuplicateRecipePackage(); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override RepositoryPackage DuplicateRepositoryPackage() - { - return DuplicateRecipePackage(); - } - - /// - /// 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 RecipePackage); - } - - /// - /// Returns true if RecipePackage instances are equal - /// - /// Instance of RecipePackage to be compared - /// Boolean - public bool Equals(RecipePackage input) - { - if (input == null) - return false; - return base.Equals(input) && - ( - this.Manifest == input.Manifest || - (this.Manifest != null && - this.Manifest.Equals(input.Manifest)) - ) && 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.Manifest != null) - hashCode = hashCode * 59 + this.Manifest.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(@"^RecipePackage$", 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/RecipePackageList.cs b/src/PollinationSDK/Model/RecipePackageList.cs deleted file mode 100644 index 66684f98c..000000000 --- a/src/PollinationSDK/Model/RecipePackageList.cs +++ /dev/null @@ -1,287 +0,0 @@ -/* - * 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 = "RecipePackageList")] - public partial class RecipePackageList : OpenAPIGenBaseModel, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected RecipePackageList() - { - // Set non-required readonly properties with defaultValue - this.Type = "RecipePackageList"; - } - - /// - /// 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 RecipePackageList - ( - 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 RecipePackageList and cannot be null"); - this.NextPage = nextPage; - - // Set non-required readonly properties with defaultValue - this.Type = "RecipePackageList"; - } - - //============================================== is ReadOnly - /// - /// Gets or Sets Type - /// - [DataMember(Name = "type", EmitDefaultValue = true)] - public string Type { get; protected internal set; } = "RecipePackageList"; - - /// - /// 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 "RecipePackageList"; - } - - /// - /// 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("RecipePackageList:\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 - /// - /// RecipePackageList object - public static RecipePackageList 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. - /// - /// RecipePackageList object - public virtual RecipePackageList DuplicateRecipePackageList() - { - return FromJson(this.ToJson()); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel Duplicate() - { - return DuplicateRecipePackageList(); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel DuplicateOpenAPIGenBaseModel() - { - return DuplicateRecipePackageList(); - } - - /// - /// 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 RecipePackageList); - } - - /// - /// Returns true if RecipePackageList instances are equal - /// - /// Instance of RecipePackageList to be compared - /// Boolean - public bool Equals(RecipePackageList 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(@"^RecipePackageList$", 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/Repository.cs b/src/PollinationSDK/Model/Repository.cs deleted file mode 100644 index 41cf28560..000000000 --- a/src/PollinationSDK/Model/Repository.cs +++ /dev/null @@ -1,283 +0,0 @@ -/* - * 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 -{ - /// - /// Repository - /// - [DataContract(Name = "Repository")] - public partial class Repository : RepositoryCreate, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected Repository() - { - // Set non-required readonly properties with defaultValue - this.Type = "Repository"; - } - - /// - /// Initializes a new instance of the class. - /// - /// The recipe unique ID (required). - /// The latest package version to be indexed (required). - /// The owner of the repository (required). - /// The permissions the user making the API call has on the resource. - /// The repository slug. - /// Whether or not a repository is publicly viewable. - /// A list of keywords to index the repository by. - /// A description of the repository. - /// An icon to represent this repository. - /// The name of the repository (required). - public Repository - ( - string name, string id, string latestTag, AccountPublic owner, // Required parameters - bool _public= default, List keywords= default, string description= default, string icon= default, RepositoryUserPermissions permissions= default, string slug= default // Optional parameters - ) : base(_public: _public, keywords: keywords, description: description, icon: icon, name: name)// BaseClass - { - // to ensure "id" is required (not null) - this.Id = id ?? throw new ArgumentNullException("id is a required property for Repository and cannot be null"); - // to ensure "latestTag" is required (not null) - this.LatestTag = latestTag ?? throw new ArgumentNullException("latestTag is a required property for Repository and cannot be null"); - // to ensure "owner" is required (not null) - this.Owner = owner ?? throw new ArgumentNullException("owner is a required property for Repository and cannot be null"); - this.Permissions = permissions; - this.Slug = slug; - - // Set non-required readonly properties with defaultValue - this.Type = "Repository"; - } - - //============================================== is ReadOnly - /// - /// Gets or Sets Type - /// - [DataMember(Name = "type", EmitDefaultValue = true)] - public string Type { get; protected internal set; } = "Repository"; - - /// - /// The recipe unique ID - /// - /// The recipe unique ID - [DataMember(Name = "id", IsRequired = true, EmitDefaultValue = false)] - public string Id { get; set; } - /// - /// The latest package version to be indexed - /// - /// The latest package version to be indexed - [DataMember(Name = "latest_tag", IsRequired = true, EmitDefaultValue = false)] - public string LatestTag { get; set; } - /// - /// The owner of the repository - /// - /// The owner of the repository - [DataMember(Name = "owner", IsRequired = true, EmitDefaultValue = false)] - public AccountPublic Owner { get; set; } - /// - /// The permissions the user making the API call has on the resource - /// - /// The permissions the user making the API call has on the resource - [DataMember(Name = "permissions", EmitDefaultValue = false)] - public RepositoryUserPermissions Permissions { get; set; } - /// - /// The repository slug - /// - /// The repository slug - [DataMember(Name = "slug", EmitDefaultValue = false)] - public string Slug { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - return "Repository"; - } - - /// - /// 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("Repository:\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" Public: ").Append(Public).Append("\n"); - sb.Append(" Keywords: ").Append(Keywords).Append("\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" Icon: ").Append(Icon).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" LatestTag: ").Append(LatestTag).Append("\n"); - sb.Append(" Owner: ").Append(Owner).Append("\n"); - sb.Append(" Permissions: ").Append(Permissions).Append("\n"); - sb.Append(" Slug: ").Append(Slug).Append("\n"); - return sb.ToString(); - } - - /// - /// Returns the object from JSON string - /// - /// Repository object - public static Repository 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. - /// - /// Repository object - public virtual Repository DuplicateRepository() - { - return FromJson(this.ToJson()); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel Duplicate() - { - return DuplicateRepository(); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override RepositoryCreate DuplicateRepositoryCreate() - { - return DuplicateRepository(); - } - - /// - /// 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 Repository); - } - - /// - /// Returns true if Repository instances are equal - /// - /// Instance of Repository to be compared - /// Boolean - public bool Equals(Repository 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.LatestTag == input.LatestTag || - (this.LatestTag != null && - this.LatestTag.Equals(input.LatestTag)) - ) && 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.Slug == input.Slug || - (this.Slug != null && - this.Slug.Equals(input.Slug)) - ) && 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.LatestTag != null) - hashCode = hashCode * 59 + this.LatestTag.GetHashCode(); - if (this.Owner != null) - hashCode = hashCode * 59 + this.Owner.GetHashCode(); - if (this.Permissions != null) - hashCode = hashCode * 59 + this.Permissions.GetHashCode(); - if (this.Slug != null) - hashCode = hashCode * 59 + this.Slug.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(@"^Repository$", 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/RepositoryAccessPolicy.cs b/src/PollinationSDK/Model/RepositoryAccessPolicy.cs deleted file mode 100644 index 047770108..000000000 --- a/src/PollinationSDK/Model/RepositoryAccessPolicy.cs +++ /dev/null @@ -1,223 +0,0 @@ -/* - * 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 -{ - /// - /// RepositoryAccessPolicy - /// - [DataContract(Name = "RepositoryAccessPolicy")] - public partial class RepositoryAccessPolicy : OpenAPIGenBaseModel, IEquatable, IValidatableObject - { - /// - /// The permission given to the subject of the access policy - /// - /// The permission given to the subject of the access policy - [DataMember(Name="permission", EmitDefaultValue=false)] - public Permission Permission { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected RepositoryAccessPolicy() - { - // Set non-required readonly properties with defaultValue - this.Type = "RepositoryAccessPolicy"; - } - - /// - /// Initializes a new instance of the class. - /// - /// The subject of the access policy (required). - /// The permission given to the subject of the access policy (required). - public RepositoryAccessPolicy - ( - PolicySubject 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 RepositoryAccessPolicy and cannot be null"); - this.Permission = permission; - - // Set non-required readonly properties with defaultValue - this.Type = "RepositoryAccessPolicy"; - } - - //============================================== is ReadOnly - /// - /// Gets or Sets Type - /// - [DataMember(Name = "type", EmitDefaultValue = true)] - public string Type { get; protected internal set; } = "RepositoryAccessPolicy"; - - /// - /// 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 "RepositoryAccessPolicy"; - } - - /// - /// 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("RepositoryAccessPolicy:\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 - /// - /// RepositoryAccessPolicy object - public static RepositoryAccessPolicy 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. - /// - /// RepositoryAccessPolicy object - public virtual RepositoryAccessPolicy DuplicateRepositoryAccessPolicy() - { - return FromJson(this.ToJson()); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel Duplicate() - { - return DuplicateRepositoryAccessPolicy(); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel DuplicateOpenAPIGenBaseModel() - { - return DuplicateRepositoryAccessPolicy(); - } - - /// - /// 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 RepositoryAccessPolicy); - } - - /// - /// Returns true if RepositoryAccessPolicy instances are equal - /// - /// Instance of RepositoryAccessPolicy to be compared - /// Boolean - public bool Equals(RepositoryAccessPolicy 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(@"^RepositoryAccessPolicy$", 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/RepositoryAccessPolicyList.cs b/src/PollinationSDK/Model/RepositoryAccessPolicyList.cs deleted file mode 100644 index ae9a46adb..000000000 --- a/src/PollinationSDK/Model/RepositoryAccessPolicyList.cs +++ /dev/null @@ -1,287 +0,0 @@ -/* - * 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 = "RepositoryAccessPolicyList")] - public partial class RepositoryAccessPolicyList : OpenAPIGenBaseModel, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected RepositoryAccessPolicyList() - { - // Set non-required readonly properties with defaultValue - this.Type = "RepositoryAccessPolicyList"; - } - - /// - /// 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 RepositoryAccessPolicyList - ( - 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 RepositoryAccessPolicyList and cannot be null"); - this.NextPage = nextPage; - - // Set non-required readonly properties with defaultValue - this.Type = "RepositoryAccessPolicyList"; - } - - //============================================== is ReadOnly - /// - /// Gets or Sets Type - /// - [DataMember(Name = "type", EmitDefaultValue = true)] - public string Type { get; protected internal set; } = "RepositoryAccessPolicyList"; - - /// - /// 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 "RepositoryAccessPolicyList"; - } - - /// - /// 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("RepositoryAccessPolicyList:\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 - /// - /// RepositoryAccessPolicyList object - public static RepositoryAccessPolicyList 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. - /// - /// RepositoryAccessPolicyList object - public virtual RepositoryAccessPolicyList DuplicateRepositoryAccessPolicyList() - { - return FromJson(this.ToJson()); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel Duplicate() - { - return DuplicateRepositoryAccessPolicyList(); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel DuplicateOpenAPIGenBaseModel() - { - return DuplicateRepositoryAccessPolicyList(); - } - - /// - /// 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 RepositoryAccessPolicyList); - } - - /// - /// Returns true if RepositoryAccessPolicyList instances are equal - /// - /// Instance of RepositoryAccessPolicyList to be compared - /// Boolean - public bool Equals(RepositoryAccessPolicyList 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(@"^RepositoryAccessPolicyList$", 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/RepositoryCreate.cs b/src/PollinationSDK/Model/RepositoryCreate.cs deleted file mode 100644 index e90c82ce7..000000000 --- a/src/PollinationSDK/Model/RepositoryCreate.cs +++ /dev/null @@ -1,225 +0,0 @@ -/* - * 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 -{ - /// - /// RepositoryCreate - /// - [DataContract(Name = "RepositoryCreate")] - public partial class RepositoryCreate : RepositoryUpdate, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected RepositoryCreate() - { - // Set non-required readonly properties with defaultValue - this.Type = "RepositoryCreate"; - } - - /// - /// Initializes a new instance of the class. - /// - /// The name of the repository (required). - /// Whether or not a repository is publicly viewable. - /// A list of keywords to index the repository by. - /// A description of the repository. - /// An icon to represent this repository. - public RepositoryCreate - ( - string name, // Required parameters - bool _public= default, List keywords= default, string description= default, string icon= default // Optional parameters - ) : base(_public: _public, keywords: keywords, description: description, icon: icon)// BaseClass - { - // to ensure "name" is required (not null) - this.Name = name ?? throw new ArgumentNullException("name is a required property for RepositoryCreate and cannot be null"); - - // Set non-required readonly properties with defaultValue - this.Type = "RepositoryCreate"; - } - - //============================================== is ReadOnly - /// - /// Gets or Sets Type - /// - [DataMember(Name = "type", EmitDefaultValue = true)] - public string Type { get; protected internal set; } = "RepositoryCreate"; - - /// - /// The name of the repository - /// - /// The name of the repository - [DataMember(Name = "name", IsRequired = true, EmitDefaultValue = false)] - public string Name { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - return "RepositoryCreate"; - } - - /// - /// 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("RepositoryCreate:\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" Public: ").Append(Public).Append("\n"); - sb.Append(" Keywords: ").Append(Keywords).Append("\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" Icon: ").Append(Icon).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - return sb.ToString(); - } - - /// - /// Returns the object from JSON string - /// - /// RepositoryCreate object - public static RepositoryCreate 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. - /// - /// RepositoryCreate object - public virtual RepositoryCreate DuplicateRepositoryCreate() - { - return FromJson(this.ToJson()); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel Duplicate() - { - return DuplicateRepositoryCreate(); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override RepositoryUpdate DuplicateRepositoryUpdate() - { - return DuplicateRepositoryCreate(); - } - - /// - /// 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 RepositoryCreate); - } - - /// - /// Returns true if RepositoryCreate instances are equal - /// - /// Instance of RepositoryCreate to be compared - /// Boolean - public bool Equals(RepositoryCreate 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.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.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(@"^RepositoryCreate$", 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/RepositoryIndex.cs b/src/PollinationSDK/Model/RepositoryIndex.cs deleted file mode 100644 index 9236bf20a..000000000 --- a/src/PollinationSDK/Model/RepositoryIndex.cs +++ /dev/null @@ -1,287 +0,0 @@ -/* - * 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 searchable index for a Queenbee Plugin and Recipe repository - /// - [DataContract(Name = "RepositoryIndex")] - public partial class RepositoryIndex : OpenAPIGenBaseModel, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. - /// The timestamp at which the index was generated. - /// Extra information about the repository. - /// A dict of plugins accessible by name. Each name key points to a list of plugin versions. - /// A dict of recipes accessible by name. Each name key points to a list of recipesversions. - public RepositoryIndex - ( - // Required parameters - Dictionary annotations= default, DateTime generated= default, RepositoryMetadata metadata= default, Dictionary> plugin= default, Dictionary> recipe= default// Optional parameters - ) : base()// BaseClass - { - this.Annotations = annotations; - this.Generated = generated; - this.Metadata = metadata; - this.Plugin = plugin; - this.Recipe = recipe; - - // Set non-required readonly properties with defaultValue - this.Type = "RepositoryIndex"; - this.ApiVersion = "v1beta1"; - } - - //============================================== is ReadOnly - /// - /// Gets or Sets Type - /// - [DataMember(Name = "type", EmitDefaultValue = true)] - public string Type { get; protected internal set; } = "RepositoryIndex"; - //============================================== is ReadOnly - /// - /// Gets or Sets ApiVersion - /// - [DataMember(Name = "api_version", EmitDefaultValue = true)] - public string ApiVersion { get; protected internal set; } = "v1beta1"; - - /// - /// 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; } - /// - /// The timestamp at which the index was generated - /// - /// The timestamp at which the index was generated - [DataMember(Name = "generated", EmitDefaultValue = false)] - public DateTime Generated { get; set; } - /// - /// Extra information about the repository - /// - /// Extra information about the repository - [DataMember(Name = "metadata", EmitDefaultValue = false)] - public RepositoryMetadata Metadata { get; set; } - /// - /// A dict of plugins accessible by name. Each name key points to a list of plugin versions - /// - /// A dict of plugins accessible by name. Each name key points to a list of plugin versions - [DataMember(Name = "plugin", EmitDefaultValue = false)] - public Dictionary> Plugin { get; set; } - /// - /// A dict of recipes accessible by name. Each name key points to a list of recipesversions - /// - /// A dict of recipes accessible by name. Each name key points to a list of recipesversions - [DataMember(Name = "recipe", EmitDefaultValue = false)] - public Dictionary> Recipe { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - return "RepositoryIndex"; - } - - /// - /// 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("RepositoryIndex:\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" Annotations: ").Append(Annotations).Append("\n"); - sb.Append(" ApiVersion: ").Append(ApiVersion).Append("\n"); - sb.Append(" Generated: ").Append(Generated).Append("\n"); - sb.Append(" Metadata: ").Append(Metadata).Append("\n"); - sb.Append(" Plugin: ").Append(Plugin).Append("\n"); - sb.Append(" Recipe: ").Append(Recipe).Append("\n"); - return sb.ToString(); - } - - /// - /// Returns the object from JSON string - /// - /// RepositoryIndex object - public static RepositoryIndex 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. - /// - /// RepositoryIndex object - public virtual RepositoryIndex DuplicateRepositoryIndex() - { - return FromJson(this.ToJson()); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel Duplicate() - { - return DuplicateRepositoryIndex(); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel DuplicateOpenAPIGenBaseModel() - { - return DuplicateRepositoryIndex(); - } - - /// - /// 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 RepositoryIndex); - } - - /// - /// Returns true if RepositoryIndex instances are equal - /// - /// Instance of RepositoryIndex to be compared - /// Boolean - public bool Equals(RepositoryIndex 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.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.Generated == input.Generated || - (this.Generated != null && - this.Generated.Equals(input.Generated)) - ) && base.Equals(input) && - ( - this.Metadata == input.Metadata || - (this.Metadata != null && - this.Metadata.Equals(input.Metadata)) - ) && base.Equals(input) && - ( - this.Plugin == input.Plugin || - this.Plugin != null && - input.Plugin != null && - this.Plugin.SequenceEqual(input.Plugin) - ) && base.Equals(input) && - ( - this.Recipe == input.Recipe || - this.Recipe != null && - input.Recipe != null && - this.Recipe.SequenceEqual(input.Recipe) - ); - } - - /// - /// 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.Annotations != null) - hashCode = hashCode * 59 + this.Annotations.GetHashCode(); - if (this.ApiVersion != null) - hashCode = hashCode * 59 + this.ApiVersion.GetHashCode(); - if (this.Generated != null) - hashCode = hashCode * 59 + this.Generated.GetHashCode(); - if (this.Metadata != null) - hashCode = hashCode * 59 + this.Metadata.GetHashCode(); - if (this.Plugin != null) - hashCode = hashCode * 59 + this.Plugin.GetHashCode(); - if (this.Recipe != null) - hashCode = hashCode * 59 + this.Recipe.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(@"^RepositoryIndex$", 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" }); - } - - - - // 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" }); - } - - yield break; - } - } -} diff --git a/src/PollinationSDK/Model/RepositoryList.cs b/src/PollinationSDK/Model/RepositoryList.cs deleted file mode 100644 index a2ea2c907..000000000 --- a/src/PollinationSDK/Model/RepositoryList.cs +++ /dev/null @@ -1,287 +0,0 @@ -/* - * 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 = "RepositoryList")] - public partial class RepositoryList : OpenAPIGenBaseModel, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected RepositoryList() - { - // Set non-required readonly properties with defaultValue - this.Type = "RepositoryList"; - } - - /// - /// 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 RepositoryList - ( - 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 RepositoryList and cannot be null"); - this.NextPage = nextPage; - - // Set non-required readonly properties with defaultValue - this.Type = "RepositoryList"; - } - - //============================================== is ReadOnly - /// - /// Gets or Sets Type - /// - [DataMember(Name = "type", EmitDefaultValue = true)] - public string Type { get; protected internal set; } = "RepositoryList"; - - /// - /// 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 "RepositoryList"; - } - - /// - /// 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("RepositoryList:\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 - /// - /// RepositoryList object - public static RepositoryList 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. - /// - /// RepositoryList object - public virtual RepositoryList DuplicateRepositoryList() - { - return FromJson(this.ToJson()); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel Duplicate() - { - return DuplicateRepositoryList(); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel DuplicateOpenAPIGenBaseModel() - { - return DuplicateRepositoryList(); - } - - /// - /// 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 RepositoryList); - } - - /// - /// Returns true if RepositoryList instances are equal - /// - /// Instance of RepositoryList to be compared - /// Boolean - public bool Equals(RepositoryList 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(@"^RepositoryList$", 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/RepositoryMetadata.cs b/src/PollinationSDK/Model/RepositoryMetadata.cs deleted file mode 100644 index 838881986..000000000 --- a/src/PollinationSDK/Model/RepositoryMetadata.cs +++ /dev/null @@ -1,278 +0,0 @@ -/* - * 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 -{ - /// - /// BaseModel with functionality to return the object as a yaml string. - /// - [DataContract(Name = "RepositoryMetadata")] - public partial class RepositoryMetadata : OpenAPIGenBaseModel, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. - /// The name of the repository. - /// A short description of the repository (default to "A Queenbee package repository"). - /// The source path (url or local) to the repository. - /// The number of plugins hosted by the repository (default to 0). - /// The number of recipes hosted by the repository (default to 0). - public RepositoryMetadata - ( - // Required parameters - Dictionary annotations= default, string name= default, string description = "A Queenbee package repository", string source= default, int pluginCount = 0, int recipeCount = 0// Optional parameters - ) : base()// BaseClass - { - this.Annotations = annotations; - this.Name = name; - // use default value if no "description" provided - this.Description = description ?? "A Queenbee package repository"; - this.Source = source; - this.PluginCount = pluginCount; - this.RecipeCount = recipeCount; - - // Set non-required readonly properties with defaultValue - this.Type = "RepositoryMetadata"; - } - - //============================================== is ReadOnly - /// - /// Gets or Sets Type - /// - [DataMember(Name = "type", EmitDefaultValue = true)] - public string Type { get; protected internal set; } = "RepositoryMetadata"; - - /// - /// 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; } - /// - /// The name of the repository - /// - /// The name of the repository - [DataMember(Name = "name", EmitDefaultValue = false)] - public string Name { get; set; } - /// - /// A short description of the repository - /// - /// A short description of the repository - [DataMember(Name = "description", EmitDefaultValue = true)] - public string Description { get; set; } = "A Queenbee package repository"; - /// - /// The source path (url or local) to the repository - /// - /// The source path (url or local) to the repository - [DataMember(Name = "source", EmitDefaultValue = false)] - public string Source { get; set; } - /// - /// The number of plugins hosted by the repository - /// - /// The number of plugins hosted by the repository - [DataMember(Name = "plugin_count", EmitDefaultValue = true)] - public int PluginCount { get; set; } = 0; - /// - /// The number of recipes hosted by the repository - /// - /// The number of recipes hosted by the repository - [DataMember(Name = "recipe_count", EmitDefaultValue = true)] - public int RecipeCount { get; set; } = 0; - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - return "RepositoryMetadata"; - } - - /// - /// 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("RepositoryMetadata:\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" Annotations: ").Append(Annotations).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" Source: ").Append(Source).Append("\n"); - sb.Append(" PluginCount: ").Append(PluginCount).Append("\n"); - sb.Append(" RecipeCount: ").Append(RecipeCount).Append("\n"); - return sb.ToString(); - } - - /// - /// Returns the object from JSON string - /// - /// RepositoryMetadata object - public static RepositoryMetadata 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. - /// - /// RepositoryMetadata object - public virtual RepositoryMetadata DuplicateRepositoryMetadata() - { - return FromJson(this.ToJson()); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel Duplicate() - { - return DuplicateRepositoryMetadata(); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel DuplicateOpenAPIGenBaseModel() - { - return DuplicateRepositoryMetadata(); - } - - /// - /// 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 RepositoryMetadata); - } - - /// - /// Returns true if RepositoryMetadata instances are equal - /// - /// Instance of RepositoryMetadata to be compared - /// Boolean - public bool Equals(RepositoryMetadata 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.Annotations == input.Annotations || - this.Annotations != null && - input.Annotations != null && - this.Annotations.SequenceEqual(input.Annotations) - ) && 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.Source == input.Source || - (this.Source != null && - this.Source.Equals(input.Source)) - ) && base.Equals(input) && - ( - this.PluginCount == input.PluginCount || - (this.PluginCount != null && - this.PluginCount.Equals(input.PluginCount)) - ) && base.Equals(input) && - ( - this.RecipeCount == input.RecipeCount || - (this.RecipeCount != null && - this.RecipeCount.Equals(input.RecipeCount)) - ); - } - - /// - /// 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.Annotations != null) - hashCode = hashCode * 59 + this.Annotations.GetHashCode(); - if (this.Name != null) - hashCode = hashCode * 59 + this.Name.GetHashCode(); - if (this.Description != null) - hashCode = hashCode * 59 + this.Description.GetHashCode(); - if (this.Source != null) - hashCode = hashCode * 59 + this.Source.GetHashCode(); - if (this.PluginCount != null) - hashCode = hashCode * 59 + this.PluginCount.GetHashCode(); - if (this.RecipeCount != null) - hashCode = hashCode * 59 + this.RecipeCount.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(@"^RepositoryMetadata$", 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/RepositoryPackage.cs b/src/PollinationSDK/Model/RepositoryPackage.cs deleted file mode 100644 index b375dedb9..000000000 --- a/src/PollinationSDK/Model/RepositoryPackage.cs +++ /dev/null @@ -1,315 +0,0 @@ -/* - * 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 -{ - /// - /// RepositoryPackage - /// - [DataContract(Name = "RepositoryPackage")] - public partial class RepositoryPackage : OpenAPIGenBaseModel, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected RepositoryPackage() - { - // Set non-required readonly properties with defaultValue - this.Type = "RepositoryPackage"; - } - - /// - /// Initializes a new instance of the class. - /// - /// The new package digest (required). - /// The new package tag (required). - /// keywords. - /// description. - /// icon. - /// Creation Timestamp. - /// The Repository Readme. - public RepositoryPackage - ( - string digest, string tag, // Required parameters - List keywords= default, string description= default, string icon= default, DateTime createdAt= default, string readme= default // Optional parameters - ) : base()// BaseClass - { - // to ensure "digest" is required (not null) - this.Digest = digest ?? throw new ArgumentNullException("digest is a required property for RepositoryPackage and cannot be null"); - // to ensure "tag" is required (not null) - this.Tag = tag ?? throw new ArgumentNullException("tag is a required property for RepositoryPackage and cannot be null"); - this.Keywords = keywords; - this.Description = description; - this.Icon = icon; - this.CreatedAt = createdAt; - this.Readme = readme; - - // Set non-required readonly properties with defaultValue - this.Type = "RepositoryPackage"; - } - - //============================================== is ReadOnly - /// - /// Gets or Sets Type - /// - [DataMember(Name = "type", EmitDefaultValue = true)] - public string Type { get; protected internal set; } = "RepositoryPackage"; - - /// - /// The new package digest - /// - /// The new package digest - [DataMember(Name = "digest", IsRequired = true, EmitDefaultValue = false)] - public string Digest { get; set; } - /// - /// The new package tag - /// - /// The new package tag - [DataMember(Name = "tag", IsRequired = true, EmitDefaultValue = false)] - public string Tag { get; set; } - /// - /// keywords - /// - /// keywords - [DataMember(Name = "keywords", EmitDefaultValue = false)] - public List Keywords { get; set; } - /// - /// description - /// - /// description - [DataMember(Name = "description", EmitDefaultValue = false)] - public string Description { get; set; } - /// - /// icon - /// - /// icon - [DataMember(Name = "icon", EmitDefaultValue = false)] - public string Icon { get; set; } - /// - /// Creation Timestamp - /// - /// Creation Timestamp - [DataMember(Name = "created_at", EmitDefaultValue = false)] - public DateTime CreatedAt { get; set; } - /// - /// The Repository Readme - /// - /// The Repository Readme - [DataMember(Name = "readme", EmitDefaultValue = false)] - public string Readme { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - return "RepositoryPackage"; - } - - /// - /// 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("RepositoryPackage:\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" Digest: ").Append(Digest).Append("\n"); - sb.Append(" Tag: ").Append(Tag).Append("\n"); - sb.Append(" Keywords: ").Append(Keywords).Append("\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" Icon: ").Append(Icon).Append("\n"); - sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n"); - sb.Append(" Readme: ").Append(Readme).Append("\n"); - return sb.ToString(); - } - - /// - /// Returns the object from JSON string - /// - /// RepositoryPackage object - public static RepositoryPackage 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. - /// - /// RepositoryPackage object - public virtual RepositoryPackage DuplicateRepositoryPackage() - { - return FromJson(this.ToJson()); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel Duplicate() - { - return DuplicateRepositoryPackage(); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel DuplicateOpenAPIGenBaseModel() - { - return DuplicateRepositoryPackage(); - } - - /// - /// 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 RepositoryPackage); - } - - /// - /// Returns true if RepositoryPackage instances are equal - /// - /// Instance of RepositoryPackage to be compared - /// Boolean - public bool Equals(RepositoryPackage input) - { - if (input == null) - return false; - return base.Equals(input) && - ( - this.Digest == input.Digest || - (this.Digest != null && - this.Digest.Equals(input.Digest)) - ) && base.Equals(input) && - ( - this.Tag == input.Tag || - (this.Tag != null && - this.Tag.Equals(input.Tag)) - ) && base.Equals(input) && - ( - this.Keywords == input.Keywords || - this.Keywords != null && - input.Keywords != null && - this.Keywords.SequenceEqual(input.Keywords) - ) && base.Equals(input) && - ( - this.Description == input.Description || - (this.Description != null && - this.Description.Equals(input.Description)) - ) && base.Equals(input) && - ( - this.Icon == input.Icon || - (this.Icon != null && - this.Icon.Equals(input.Icon)) - ) && base.Equals(input) && - ( - this.CreatedAt == input.CreatedAt || - (this.CreatedAt != null && - this.CreatedAt.Equals(input.CreatedAt)) - ) && base.Equals(input) && - ( - this.Readme == input.Readme || - (this.Readme != null && - this.Readme.Equals(input.Readme)) - ) && 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.Digest != null) - hashCode = hashCode * 59 + this.Digest.GetHashCode(); - if (this.Tag != null) - hashCode = hashCode * 59 + this.Tag.GetHashCode(); - if (this.Keywords != null) - hashCode = hashCode * 59 + this.Keywords.GetHashCode(); - if (this.Description != null) - hashCode = hashCode * 59 + this.Description.GetHashCode(); - if (this.Icon != null) - hashCode = hashCode * 59 + this.Icon.GetHashCode(); - if (this.CreatedAt != null) - hashCode = hashCode * 59 + this.CreatedAt.GetHashCode(); - if (this.Readme != null) - hashCode = hashCode * 59 + this.Readme.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(@"^RepositoryPackage$", 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/RepositoryPolicySubject.cs b/src/PollinationSDK/Model/RepositoryPolicySubject.cs deleted file mode 100644 index 0eba578e1..000000000 --- a/src/PollinationSDK/Model/RepositoryPolicySubject.cs +++ /dev/null @@ -1,194 +0,0 @@ -/* - * 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 -{ - /// - /// RepositoryPolicySubject - /// - [DataContract(Name = "RepositoryPolicySubject")] - public partial class RepositoryPolicySubject : PolicySubject, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected RepositoryPolicySubject() - { - // Set non-required readonly properties with defaultValue - this.Type = "RepositoryPolicySubject"; - } - - /// - /// Initializes a new instance of the class. - /// - /// subjectType (required). - /// The name of the policy subject (required). - public RepositoryPolicySubject - ( - SubjectType subjectType, string name// Required parameters - // Optional parameters - ) : base(subjectType: subjectType, name: name)// BaseClass - { - - // Set non-required readonly properties with defaultValue - this.Type = "RepositoryPolicySubject"; - } - - //============================================== is ReadOnly - /// - /// Gets or Sets Type - /// - [DataMember(Name = "type", EmitDefaultValue = true)] - public string Type { get; protected internal set; } = "RepositoryPolicySubject"; - - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - return "RepositoryPolicySubject"; - } - - /// - /// 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("RepositoryPolicySubject:\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 - /// - /// RepositoryPolicySubject object - public static RepositoryPolicySubject 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. - /// - /// RepositoryPolicySubject object - public virtual RepositoryPolicySubject DuplicateRepositoryPolicySubject() - { - return FromJson(this.ToJson()); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel Duplicate() - { - return DuplicateRepositoryPolicySubject(); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override PolicySubject DuplicatePolicySubject() - { - return DuplicateRepositoryPolicySubject(); - } - - /// - /// 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 RepositoryPolicySubject); - } - - /// - /// Returns true if RepositoryPolicySubject instances are equal - /// - /// Instance of RepositoryPolicySubject to be compared - /// Boolean - public bool Equals(RepositoryPolicySubject 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(@"^RepositoryPolicySubject$", 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/RepositoryUpdate.cs b/src/PollinationSDK/Model/RepositoryUpdate.cs deleted file mode 100644 index 905da5e33..000000000 --- a/src/PollinationSDK/Model/RepositoryUpdate.cs +++ /dev/null @@ -1,255 +0,0 @@ -/* - * 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 -{ - /// - /// RepositoryUpdate - /// - [DataContract(Name = "RepositoryUpdate")] - public partial class RepositoryUpdate : OpenAPIGenBaseModel, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// Whether or not a repository is publicly viewable. - /// A list of keywords to index the repository by. - /// A description of the repository. - /// An icon to represent this repository. - public RepositoryUpdate - ( - // Required parameters - bool _public= default, List keywords= default, string description= default, string icon= default // Optional parameters - ) : base()// BaseClass - { - this.Public = _public; - this.Keywords = keywords; - this.Description = description; - this.Icon = icon; - - // Set non-required readonly properties with defaultValue - this.Type = "RepositoryUpdate"; - } - - //============================================== is ReadOnly - /// - /// Gets or Sets Type - /// - [DataMember(Name = "type", EmitDefaultValue = true)] - public string Type { get; protected internal set; } = "RepositoryUpdate"; - - /// - /// Whether or not a repository is publicly viewable - /// - /// Whether or not a repository is publicly viewable - [DataMember(Name = "public", EmitDefaultValue = false)] - public bool Public { get; set; } - /// - /// A list of keywords to index the repository by - /// - /// A list of keywords to index the repository by - [DataMember(Name = "keywords", EmitDefaultValue = false)] - public List Keywords { get; set; } - /// - /// A description of the repository - /// - /// A description of the repository - [DataMember(Name = "description", EmitDefaultValue = false)] - public string Description { get; set; } - /// - /// An icon to represent this repository - /// - /// An icon to represent this repository - [DataMember(Name = "icon", EmitDefaultValue = false)] - public string Icon { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - return "RepositoryUpdate"; - } - - /// - /// 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("RepositoryUpdate:\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" Public: ").Append(Public).Append("\n"); - sb.Append(" Keywords: ").Append(Keywords).Append("\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" Icon: ").Append(Icon).Append("\n"); - return sb.ToString(); - } - - /// - /// Returns the object from JSON string - /// - /// RepositoryUpdate object - public static RepositoryUpdate 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. - /// - /// RepositoryUpdate object - public virtual RepositoryUpdate DuplicateRepositoryUpdate() - { - return FromJson(this.ToJson()); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel Duplicate() - { - return DuplicateRepositoryUpdate(); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel DuplicateOpenAPIGenBaseModel() - { - return DuplicateRepositoryUpdate(); - } - - /// - /// 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 RepositoryUpdate); - } - - /// - /// Returns true if RepositoryUpdate instances are equal - /// - /// Instance of RepositoryUpdate to be compared - /// Boolean - public bool Equals(RepositoryUpdate input) - { - if (input == null) - return false; - return base.Equals(input) && - ( - this.Public == input.Public || - (this.Public != null && - this.Public.Equals(input.Public)) - ) && base.Equals(input) && - ( - this.Keywords == input.Keywords || - this.Keywords != null && - input.Keywords != null && - this.Keywords.SequenceEqual(input.Keywords) - ) && base.Equals(input) && - ( - this.Description == input.Description || - (this.Description != null && - this.Description.Equals(input.Description)) - ) && base.Equals(input) && - ( - this.Icon == input.Icon || - (this.Icon != null && - this.Icon.Equals(input.Icon)) - ) && 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.Public != null) - hashCode = hashCode * 59 + this.Public.GetHashCode(); - if (this.Keywords != null) - hashCode = hashCode * 59 + this.Keywords.GetHashCode(); - if (this.Description != null) - hashCode = hashCode * 59 + this.Description.GetHashCode(); - if (this.Icon != null) - hashCode = hashCode * 59 + this.Icon.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(@"^RepositoryUpdate$", 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/RepositoryUserPermissions.cs b/src/PollinationSDK/Model/RepositoryUserPermissions.cs deleted file mode 100644 index d46a11c94..000000000 --- a/src/PollinationSDK/Model/RepositoryUserPermissions.cs +++ /dev/null @@ -1,186 +0,0 @@ -/* - * 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 -{ - /// - /// RepositoryUserPermissions - /// - [DataContract(Name = "RepositoryUserPermissions")] - public partial class RepositoryUserPermissions : UserPermission, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// The user has admin permission to this resource (default to false). - /// The user has write permission on this resource (default to false). - /// The user has read permission on this resource (default to false). - public RepositoryUserPermissions - ( - // Required parameters - bool admin = false, bool write = false, bool read = false // Optional parameters - ) : base(admin: admin, write: write, read: read)// BaseClass - { - - // Set non-required readonly properties with defaultValue - this.Type = "RepositoryUserPermissions"; - } - - //============================================== is ReadOnly - /// - /// Gets or Sets Type - /// - [DataMember(Name = "type", EmitDefaultValue = true)] - public string Type { get; protected internal set; } = "RepositoryUserPermissions"; - - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - return "RepositoryUserPermissions"; - } - - /// - /// 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("RepositoryUserPermissions:\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" Admin: ").Append(Admin).Append("\n"); - sb.Append(" Write: ").Append(Write).Append("\n"); - sb.Append(" Read: ").Append(Read).Append("\n"); - return sb.ToString(); - } - - /// - /// Returns the object from JSON string - /// - /// RepositoryUserPermissions object - public static RepositoryUserPermissions 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. - /// - /// RepositoryUserPermissions object - public virtual RepositoryUserPermissions DuplicateRepositoryUserPermissions() - { - return FromJson(this.ToJson()); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel Duplicate() - { - return DuplicateRepositoryUserPermissions(); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override UserPermission DuplicateUserPermission() - { - return DuplicateRepositoryUserPermissions(); - } - - /// - /// 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 RepositoryUserPermissions); - } - - /// - /// Returns true if RepositoryUserPermissions instances are equal - /// - /// Instance of RepositoryUserPermissions to be compared - /// Boolean - public bool Equals(RepositoryUserPermissions 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(@"^RepositoryUserPermissions$", 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/RoleEnum.cs b/src/PollinationSDK/Model/RoleEnum.cs deleted file mode 100644 index 4f7d7545d..000000000 --- a/src/PollinationSDK/Model/RoleEnum.cs +++ /dev/null @@ -1,49 +0,0 @@ -/* - * 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 RoleEnum - { - /// - /// Enum Owner for value: owner - /// - [EnumMember(Value = "owner")] - Owner = 1, - - /// - /// Enum Member for value: member - /// - [EnumMember(Value = "member")] - Member = 2 - - } - -} diff --git a/src/PollinationSDK/Model/Run.cs b/src/PollinationSDK/Model/Run.cs deleted file mode 100644 index e55755d8c..000000000 --- a/src/PollinationSDK/Model/Run.cs +++ /dev/null @@ -1,287 +0,0 @@ -/* - * 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 -{ - /// - /// Run - /// - [DataContract(Name = "Run")] - public partial class Run : OpenAPIGenBaseModel, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected Run() - { - // Set non-required readonly properties with defaultValue - this.Type = "Run"; - } - - /// - /// Initializes a new instance of the class. - /// - /// The unique ID for this run (required). - /// author. - /// owner. - /// The recipe used to generate this . - /// The generation of this run. - /// The status of 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 - ) : base()// BaseClass - { - // to ensure "id" is required (not null) - this.Id = id ?? throw new ArgumentNullException("id is a required property for Run and cannot be null"); - this.Author = author; - this.Owner = owner; - this.Recipe = recipe; - this.Generation = generation; - this.Status = status; - - // Set non-required readonly properties with defaultValue - this.Type = "Run"; - } - - //============================================== is ReadOnly - /// - /// Gets or Sets Type - /// - [DataMember(Name = "type", EmitDefaultValue = true)] - public string Type { get; protected internal set; } = "Run"; - - /// - /// The unique ID for this run - /// - /// The unique ID for this run - [DataMember(Name = "id", IsRequired = true, EmitDefaultValue = false)] - public string Id { get; set; } - /// - /// author - /// - /// author - [DataMember(Name = "author", EmitDefaultValue = false)] - public AccountPublic Author { get; set; } - /// - /// owner - /// - /// owner - [DataMember(Name = "owner", EmitDefaultValue = false)] - public AccountPublic Owner { get; set; } - /// - /// The recipe used to generate this - /// - /// The recipe used to generate this - [DataMember(Name = "recipe", EmitDefaultValue = false)] - public RecipeInterface Recipe { get; set; } - /// - /// The generation of this run - /// - /// The generation of this run - [DataMember(Name = "generation", EmitDefaultValue = false)] - public double Generation { get; set; } - /// - /// The status of the run - /// - /// The status of the run - [DataMember(Name = "status", EmitDefaultValue = false)] - public RunStatus Status { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - return "Run"; - } - - /// - /// 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("Run:\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" Author: ").Append(Author).Append("\n"); - sb.Append(" Owner: ").Append(Owner).Append("\n"); - sb.Append(" Recipe: ").Append(Recipe).Append("\n"); - sb.Append(" Generation: ").Append(Generation).Append("\n"); - sb.Append(" Status: ").Append(Status).Append("\n"); - return sb.ToString(); - } - - /// - /// Returns the object from JSON string - /// - /// Run object - public static Run 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. - /// - /// Run object - public virtual Run DuplicateRun() - { - return FromJson(this.ToJson()); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel Duplicate() - { - return DuplicateRun(); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel DuplicateOpenAPIGenBaseModel() - { - return DuplicateRun(); - } - - /// - /// 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 Run); - } - - /// - /// Returns true if Run instances are equal - /// - /// Instance of Run to be compared - /// Boolean - public bool Equals(Run 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.Author == input.Author || - (this.Author != null && - this.Author.Equals(input.Author)) - ) && base.Equals(input) && - ( - this.Owner == input.Owner || - (this.Owner != null && - this.Owner.Equals(input.Owner)) - ) && base.Equals(input) && - ( - this.Recipe == input.Recipe || - (this.Recipe != null && - this.Recipe.Equals(input.Recipe)) - ) && base.Equals(input) && - ( - this.Generation == input.Generation || - (this.Generation != null && - this.Generation.Equals(input.Generation)) - ) && base.Equals(input) && - ( - this.Status == input.Status || - (this.Status != null && - this.Status.Equals(input.Status)) - ) && 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.Author != null) - hashCode = hashCode * 59 + this.Author.GetHashCode(); - if (this.Owner != null) - hashCode = hashCode * 59 + this.Owner.GetHashCode(); - if (this.Recipe != null) - hashCode = hashCode * 59 + this.Recipe.GetHashCode(); - if (this.Generation != null) - hashCode = hashCode * 59 + this.Generation.GetHashCode(); - if (this.Status != null) - hashCode = hashCode * 59 + this.Status.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(@"^Run$", 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/RunList.cs b/src/PollinationSDK/Model/RunList.cs deleted file mode 100644 index e903756a0..000000000 --- a/src/PollinationSDK/Model/RunList.cs +++ /dev/null @@ -1,287 +0,0 @@ -/* - * 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 = "RunList")] - public partial class RunList : OpenAPIGenBaseModel, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected RunList() - { - // Set non-required readonly properties with defaultValue - this.Type = "RunList"; - } - - /// - /// 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 RunList - ( - 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 RunList and cannot be null"); - this.NextPage = nextPage; - - // Set non-required readonly properties with defaultValue - this.Type = "RunList"; - } - - //============================================== is ReadOnly - /// - /// Gets or Sets Type - /// - [DataMember(Name = "type", EmitDefaultValue = true)] - public string Type { get; protected internal set; } = "RunList"; - - /// - /// 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 "RunList"; - } - - /// - /// 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("RunList:\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 - /// - /// RunList object - public static RunList 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. - /// - /// RunList object - public virtual RunList DuplicateRunList() - { - return FromJson(this.ToJson()); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel Duplicate() - { - return DuplicateRunList(); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel DuplicateOpenAPIGenBaseModel() - { - return DuplicateRunList(); - } - - /// - /// 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 RunList); - } - - /// - /// Returns true if RunList instances are equal - /// - /// Instance of RunList to be compared - /// Boolean - public bool Equals(RunList 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(@"^RunList$", 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/RunResultList.cs b/src/PollinationSDK/Model/RunResultList.cs deleted file mode 100644 index 809acb47b..000000000 --- a/src/PollinationSDK/Model/RunResultList.cs +++ /dev/null @@ -1,287 +0,0 @@ -/* - * 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 = "RunResultList")] - public partial class RunResultList : OpenAPIGenBaseModel, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected RunResultList() - { - // Set non-required readonly properties with defaultValue - this.Type = "RunResultList"; - } - - /// - /// 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 RunResultList - ( - 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 RunResultList and cannot be null"); - this.NextPage = nextPage; - - // Set non-required readonly properties with defaultValue - this.Type = "RunResultList"; - } - - //============================================== is ReadOnly - /// - /// Gets or Sets Type - /// - [DataMember(Name = "type", EmitDefaultValue = true)] - public string Type { get; protected internal set; } = "RunResultList"; - - /// - /// 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 "RunResultList"; - } - - /// - /// 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("RunResultList:\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 - /// - /// RunResultList object - public static RunResultList 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. - /// - /// RunResultList object - public virtual RunResultList DuplicateRunResultList() - { - return FromJson(this.ToJson()); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel Duplicate() - { - return DuplicateRunResultList(); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel DuplicateOpenAPIGenBaseModel() - { - return DuplicateRunResultList(); - } - - /// - /// 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 RunResultList); - } - - /// - /// Returns true if RunResultList instances are equal - /// - /// Instance of RunResultList to be compared - /// Boolean - public bool Equals(RunResultList 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(@"^RunResultList$", 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/RunStatus.cs b/src/PollinationSDK/Model/RunStatus.cs deleted file mode 100644 index 70362abe0..000000000 --- a/src/PollinationSDK/Model/RunStatus.cs +++ /dev/null @@ -1,414 +0,0 @@ -/* - * 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 -{ - /// - /// Job Status. - /// - [DataContract(Name = "RunStatus")] - public partial class RunStatus : OpenAPIGenBaseModel, IEquatable, IValidatableObject - { - /// - /// The status of this run. - /// - /// The status of this run. - [DataMember(Name="status", EmitDefaultValue=false)] - public RunStatusEnum Status { get; set; } = RunStatusEnum.Unknown; - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected RunStatus() - { - // Set non-required readonly properties with defaultValue - this.ApiVersion = "v1beta1"; - this.Type = "RunStatus"; - } - - /// - /// Initializes a new instance of the class. - /// - /// The inputs used for this run. (required). - /// The outputs produced by this run. (required). - /// The time at which the task was started (required). - /// The ID of the individual run. (required). - /// The ID of the job that generated this run. (required). - /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. - /// Any message produced by the task. Usually error/debugging hints.. - /// The time at which the task was completed. - /// Source url for the status object. It can be a recipe or a function.. - /// The ID of the first step in the run.. - /// The status of this run.. - /// steps. - public RunStatus - ( - List> inputs, List> outputs, DateTime startedAt, string id, string jobId, // Required parameters - Dictionary annotations= default, string message= default, DateTime finishedAt= default, string source= default, string entrypoint= default, RunStatusEnum status= RunStatusEnum.Unknown, Dictionary steps= default // Optional parameters - ) : base()// BaseClass - { - // to ensure "inputs" is required (not null) - this.Inputs = inputs ?? throw new ArgumentNullException("inputs is a required property for RunStatus and cannot be null"); - // to ensure "outputs" is required (not null) - this.Outputs = outputs ?? throw new ArgumentNullException("outputs is a required property for RunStatus and cannot be null"); - this.StartedAt = startedAt; - // to ensure "id" is required (not null) - this.Id = id ?? throw new ArgumentNullException("id is a required property for RunStatus and cannot be null"); - // to ensure "jobId" is required (not null) - this.JobId = jobId ?? throw new ArgumentNullException("jobId is a required property for RunStatus and cannot be null"); - this.Annotations = annotations; - this.Message = message; - this.FinishedAt = finishedAt; - this.Source = source; - this.Entrypoint = entrypoint; - this.Status = status; - this.Steps = steps; - - // Set non-required readonly properties with defaultValue - this.ApiVersion = "v1beta1"; - this.Type = "RunStatus"; - } - - //============================================== 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; } = "RunStatus"; - - /// - /// The inputs used for this run. - /// - /// The inputs used for this run. - [DataMember(Name = "inputs", IsRequired = true, EmitDefaultValue = false)] - public List> Inputs { get; set; } - /// - /// The outputs produced by this run. - /// - /// The outputs produced by this run. - [DataMember(Name = "outputs", IsRequired = true, EmitDefaultValue = false)] - public List> Outputs { get; set; } - /// - /// The time at which the task was started - /// - /// The time at which the task was started - [DataMember(Name = "started_at", IsRequired = true, EmitDefaultValue = false)] - public DateTime StartedAt { get; set; } - /// - /// The ID of the individual run. - /// - /// The ID of the individual run. - [DataMember(Name = "id", IsRequired = true, EmitDefaultValue = false)] - public string Id { get; set; } - /// - /// The ID of the job that generated this run. - /// - /// The ID of the job that generated this run. - [DataMember(Name = "job_id", IsRequired = true, EmitDefaultValue = false)] - public string JobId { 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; } - /// - /// Any message produced by the task. Usually error/debugging hints. - /// - /// Any message produced by the task. Usually error/debugging hints. - [DataMember(Name = "message", EmitDefaultValue = false)] - public string Message { get; set; } - /// - /// The time at which the task was completed - /// - /// The time at which the task was completed - [DataMember(Name = "finished_at", EmitDefaultValue = false)] - public DateTime FinishedAt { get; set; } - /// - /// Source url for the status object. It can be a recipe or a function. - /// - /// Source url for the status object. It can be a recipe or a function. - [DataMember(Name = "source", EmitDefaultValue = false)] - public string Source { get; set; } - /// - /// The ID of the first step in the run. - /// - /// The ID of the first step in the run. - [DataMember(Name = "entrypoint", EmitDefaultValue = false)] - public string Entrypoint { get; set; } - /// - /// Gets or Sets Steps - /// - [DataMember(Name = "steps", EmitDefaultValue = false)] - public Dictionary Steps { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - return "RunStatus"; - } - - /// - /// 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("RunStatus:\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" Inputs: ").Append(Inputs).Append("\n"); - sb.Append(" Outputs: ").Append(Outputs).Append("\n"); - sb.Append(" StartedAt: ").Append(StartedAt).Append("\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" JobId: ").Append(JobId).Append("\n"); - sb.Append(" Annotations: ").Append(Annotations).Append("\n"); - sb.Append(" Message: ").Append(Message).Append("\n"); - sb.Append(" FinishedAt: ").Append(FinishedAt).Append("\n"); - sb.Append(" Source: ").Append(Source).Append("\n"); - sb.Append(" ApiVersion: ").Append(ApiVersion).Append("\n"); - sb.Append(" Entrypoint: ").Append(Entrypoint).Append("\n"); - sb.Append(" Status: ").Append(Status).Append("\n"); - sb.Append(" Steps: ").Append(Steps).Append("\n"); - return sb.ToString(); - } - - /// - /// Returns the object from JSON string - /// - /// RunStatus object - public static RunStatus 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. - /// - /// RunStatus object - public virtual RunStatus DuplicateRunStatus() - { - return FromJson(this.ToJson()); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel Duplicate() - { - return DuplicateRunStatus(); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel DuplicateOpenAPIGenBaseModel() - { - return DuplicateRunStatus(); - } - - /// - /// 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 RunStatus); - } - - /// - /// Returns true if RunStatus instances are equal - /// - /// Instance of RunStatus to be compared - /// Boolean - public bool Equals(RunStatus input) - { - if (input == null) - return false; - return 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.StartedAt == input.StartedAt || - (this.StartedAt != null && - this.StartedAt.Equals(input.StartedAt)) - ) && base.Equals(input) && - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && base.Equals(input) && - ( - this.JobId == input.JobId || - (this.JobId != null && - this.JobId.Equals(input.JobId)) - ) && base.Equals(input) && - ( - this.Annotations == input.Annotations || - this.Annotations != null && - input.Annotations != null && - this.Annotations.SequenceEqual(input.Annotations) - ) && base.Equals(input) && - ( - this.Message == input.Message || - (this.Message != null && - this.Message.Equals(input.Message)) - ) && base.Equals(input) && - ( - this.FinishedAt == input.FinishedAt || - (this.FinishedAt != null && - this.FinishedAt.Equals(input.FinishedAt)) - ) && base.Equals(input) && - ( - this.Source == input.Source || - (this.Source != null && - this.Source.Equals(input.Source)) - ) && base.Equals(input) && - ( - this.ApiVersion == input.ApiVersion || - (this.ApiVersion != null && - this.ApiVersion.Equals(input.ApiVersion)) - ) && base.Equals(input) && - ( - this.Entrypoint == input.Entrypoint || - (this.Entrypoint != null && - this.Entrypoint.Equals(input.Entrypoint)) - ) && base.Equals(input) && - ( - this.Status == input.Status || - (this.Status != null && - this.Status.Equals(input.Status)) - ) && base.Equals(input) && - ( - this.Steps == input.Steps || - this.Steps != null && - input.Steps != null && - this.Steps.SequenceEqual(input.Steps) - ) && 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.Inputs != null) - hashCode = hashCode * 59 + this.Inputs.GetHashCode(); - if (this.Outputs != null) - hashCode = hashCode * 59 + this.Outputs.GetHashCode(); - if (this.StartedAt != null) - hashCode = hashCode * 59 + this.StartedAt.GetHashCode(); - if (this.Id != null) - hashCode = hashCode * 59 + this.Id.GetHashCode(); - if (this.JobId != null) - hashCode = hashCode * 59 + this.JobId.GetHashCode(); - if (this.Annotations != null) - hashCode = hashCode * 59 + this.Annotations.GetHashCode(); - if (this.Message != null) - hashCode = hashCode * 59 + this.Message.GetHashCode(); - if (this.FinishedAt != null) - hashCode = hashCode * 59 + this.FinishedAt.GetHashCode(); - if (this.Source != null) - hashCode = hashCode * 59 + this.Source.GetHashCode(); - if (this.ApiVersion != null) - hashCode = hashCode * 59 + this.ApiVersion.GetHashCode(); - if (this.Entrypoint != null) - hashCode = hashCode * 59 + this.Entrypoint.GetHashCode(); - if (this.Status != null) - hashCode = hashCode * 59 + this.Status.GetHashCode(); - if (this.Steps != null) - hashCode = hashCode * 59 + this.Steps.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(@"^RunStatus$", 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/RunStatusEnum.cs b/src/PollinationSDK/Model/RunStatusEnum.cs deleted file mode 100644 index 36fdefbb0..000000000 --- a/src/PollinationSDK/Model/RunStatusEnum.cs +++ /dev/null @@ -1,85 +0,0 @@ -/* - * 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 -{ - /// - /// Enumaration of allowable status strings - /// - /// Enumaration of allowable status strings - - [JsonConverter(typeof(StringEnumConverter))] - - public enum RunStatusEnum - { - /// - /// Enum Created for value: Created - /// - [EnumMember(Value = "Created")] - Created = 1, - - /// - /// Enum Scheduled for value: Scheduled - /// - [EnumMember(Value = "Scheduled")] - Scheduled = 2, - - /// - /// Enum Running for value: Running - /// - [EnumMember(Value = "Running")] - Running = 3, - - /// - /// Enum PostProcessing for value: Post-Processing - /// - [EnumMember(Value = "Post-Processing")] - PostProcessing = 4, - - /// - /// Enum Failed for value: Failed - /// - [EnumMember(Value = "Failed")] - Failed = 5, - - /// - /// Enum Cancelled for value: Cancelled - /// - [EnumMember(Value = "Cancelled")] - Cancelled = 6, - - /// - /// Enum Succeeded for value: Succeeded - /// - [EnumMember(Value = "Succeeded")] - Succeeded = 7, - - /// - /// Enum Unknown for value: Unknown - /// - [EnumMember(Value = "Unknown")] - Unknown = 8 - - } - -} diff --git a/src/PollinationSDK/Model/S3.cs b/src/PollinationSDK/Model/S3.cs deleted file mode 100644 index 8e8a9947c..000000000 --- a/src/PollinationSDK/Model/S3.cs +++ /dev/null @@ -1,259 +0,0 @@ -/* - * 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 -{ - /// - /// S3 Source An S3 bucket artifact Source. - /// - [DataContract(Name = "S3")] - public partial class S3 : ArtifactSource, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected S3() - { - // Set non-required readonly properties with defaultValue - this.Type = "S3"; - } - - /// - /// Initializes a new instance of the class. - /// - /// The path inside the bucket to source artifacts from. (required). - /// The HTTP endpoint to reach the S3 bucket. (required). - /// The name of the S3 bucket on the host server. (required). - /// Path to the file holding the AccessKey and SecretAccessKey to authenticate to the bucket. Assumes public bucket access if none are specified.. - /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. - public S3 - ( - string key, string endpoint, string bucket, // Required parameters - Dictionary annotations= default, string credentialsPath= default // Optional parameters - ) : base(annotations: annotations)// BaseClass - { - // to ensure "key" is required (not null) - this.Key = key ?? throw new ArgumentNullException("key is a required property for S3 and cannot be null"); - // to ensure "endpoint" is required (not null) - this.Endpoint = endpoint ?? throw new ArgumentNullException("endpoint is a required property for S3 and cannot be null"); - // to ensure "bucket" is required (not null) - this.Bucket = bucket ?? throw new ArgumentNullException("bucket is a required property for S3 and cannot be null"); - this.CredentialsPath = credentialsPath; - - // Set non-required readonly properties with defaultValue - this.Type = "S3"; - } - - //============================================== is ReadOnly - /// - /// Gets or Sets Type - /// - [DataMember(Name = "type", EmitDefaultValue = true)] - public string Type { get; protected internal set; } = "S3"; - - /// - /// The path inside the bucket to source artifacts from. - /// - /// The path inside the bucket to source artifacts from. - [DataMember(Name = "key", IsRequired = true, EmitDefaultValue = false)] - public string Key { get; set; } - /// - /// The HTTP endpoint to reach the S3 bucket. - /// - /// The HTTP endpoint to reach the S3 bucket. - [DataMember(Name = "endpoint", IsRequired = true, EmitDefaultValue = false)] - public string Endpoint { get; set; } - /// - /// The name of the S3 bucket on the host server. - /// - /// The name of the S3 bucket on the host server. - [DataMember(Name = "bucket", IsRequired = true, EmitDefaultValue = false)] - public string Bucket { get; set; } - /// - /// Path to the file holding the AccessKey and SecretAccessKey to authenticate to the bucket. Assumes public bucket access if none are specified. - /// - /// Path to the file holding the AccessKey and SecretAccessKey to authenticate to the bucket. Assumes public bucket access if none are specified. - [DataMember(Name = "credentials_path", EmitDefaultValue = false)] - public string CredentialsPath { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - return "S3"; - } - - /// - /// 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("S3:\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" Annotations: ").Append(Annotations).Append("\n"); - sb.Append(" Key: ").Append(Key).Append("\n"); - sb.Append(" Endpoint: ").Append(Endpoint).Append("\n"); - sb.Append(" Bucket: ").Append(Bucket).Append("\n"); - sb.Append(" CredentialsPath: ").Append(CredentialsPath).Append("\n"); - return sb.ToString(); - } - - /// - /// Returns the object from JSON string - /// - /// S3 object - public static S3 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. - /// - /// S3 object - public virtual S3 DuplicateS3() - { - return FromJson(this.ToJson()); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel Duplicate() - { - return DuplicateS3(); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override ArtifactSource DuplicateArtifactSource() - { - return DuplicateS3(); - } - - /// - /// 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 S3); - } - - /// - /// Returns true if S3 instances are equal - /// - /// Instance of S3 to be compared - /// Boolean - public bool Equals(S3 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.Endpoint == input.Endpoint || - (this.Endpoint != null && - this.Endpoint.Equals(input.Endpoint)) - ) && base.Equals(input) && - ( - this.Bucket == input.Bucket || - (this.Bucket != null && - this.Bucket.Equals(input.Bucket)) - ) && base.Equals(input) && - ( - this.CredentialsPath == input.CredentialsPath || - (this.CredentialsPath != null && - this.CredentialsPath.Equals(input.CredentialsPath)) - ) && 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.Endpoint != null) - hashCode = hashCode * 59 + this.Endpoint.GetHashCode(); - if (this.Bucket != null) - hashCode = hashCode * 59 + this.Bucket.GetHashCode(); - if (this.CredentialsPath != null) - hashCode = hashCode * 59 + this.CredentialsPath.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(@"^S3$", 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/S3UploadRequest.cs b/src/PollinationSDK/Model/S3UploadRequest.cs deleted file mode 100644 index 42d33bae8..000000000 --- a/src/PollinationSDK/Model/S3UploadRequest.cs +++ /dev/null @@ -1,223 +0,0 @@ -/* - * 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 -{ - /// - /// S3UploadRequest - /// - [DataContract(Name = "S3UploadRequest")] - public partial class S3UploadRequest : OpenAPIGenBaseModel, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected S3UploadRequest() - { - // Set non-required readonly properties with defaultValue - this.Type = "S3UploadRequest"; - } - - /// - /// Initializes a new instance of the class. - /// - /// url (required). - /// fields (required). - public S3UploadRequest - ( - string url, Dictionary fields// Required parameters - // Optional parameters - ) : base()// BaseClass - { - // to ensure "url" is required (not null) - this.Url = url ?? throw new ArgumentNullException("url is a required property for S3UploadRequest and cannot be null"); - // to ensure "fields" is required (not null) - this.Fields = fields ?? throw new ArgumentNullException("fields is a required property for S3UploadRequest and cannot be null"); - - // Set non-required readonly properties with defaultValue - this.Type = "S3UploadRequest"; - } - - //============================================== is ReadOnly - /// - /// Gets or Sets Type - /// - [DataMember(Name = "type", EmitDefaultValue = true)] - public string Type { get; protected internal set; } = "S3UploadRequest"; - - /// - /// Gets or Sets Url - /// - [DataMember(Name = "url", IsRequired = true, EmitDefaultValue = false)] - public string Url { get; set; } - /// - /// Gets or Sets Fields - /// - [DataMember(Name = "fields", IsRequired = true, EmitDefaultValue = false)] - public Dictionary Fields { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - return "S3UploadRequest"; - } - - /// - /// 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("S3UploadRequest:\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" Url: ").Append(Url).Append("\n"); - sb.Append(" Fields: ").Append(Fields).Append("\n"); - return sb.ToString(); - } - - /// - /// Returns the object from JSON string - /// - /// S3UploadRequest object - public static S3UploadRequest 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. - /// - /// S3UploadRequest object - public virtual S3UploadRequest DuplicateS3UploadRequest() - { - return FromJson(this.ToJson()); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel Duplicate() - { - return DuplicateS3UploadRequest(); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel DuplicateOpenAPIGenBaseModel() - { - return DuplicateS3UploadRequest(); - } - - /// - /// 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 S3UploadRequest); - } - - /// - /// Returns true if S3UploadRequest instances are equal - /// - /// Instance of S3UploadRequest to be compared - /// Boolean - public bool Equals(S3UploadRequest input) - { - if (input == null) - return false; - return base.Equals(input) && - ( - this.Url == input.Url || - (this.Url != null && - this.Url.Equals(input.Url)) - ) && base.Equals(input) && - ( - this.Fields == input.Fields || - this.Fields != null && - input.Fields != null && - this.Fields.SequenceEqual(input.Fields) - ) && 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.Url != null) - hashCode = hashCode * 59 + this.Url.GetHashCode(); - if (this.Fields != null) - hashCode = hashCode * 59 + this.Fields.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(@"^S3UploadRequest$", 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/SortEnum.cs b/src/PollinationSDK/Model/SortEnum.cs deleted file mode 100644 index ee9e0ec85..000000000 --- a/src/PollinationSDK/Model/SortEnum.cs +++ /dev/null @@ -1,49 +0,0 @@ -/* - * 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 SortEnum - { - /// - /// Enum Ascending for value: ascending - /// - [EnumMember(Value = "ascending")] - Ascending = 1, - - /// - /// Enum Descending for value: descending - /// - [EnumMember(Value = "descending")] - Descending = 2 - - } - -} diff --git a/src/PollinationSDK/Model/StatusType.cs b/src/PollinationSDK/Model/StatusType.cs deleted file mode 100644 index 14c026b01..000000000 --- a/src/PollinationSDK/Model/StatusType.cs +++ /dev/null @@ -1,61 +0,0 @@ -/* - * 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 -{ - /// - /// Type enum for status type. - /// - /// Type enum for status type. - - [JsonConverter(typeof(StringEnumConverter))] - - public enum StatusType - { - /// - /// Enum Function for value: Function - /// - [EnumMember(Value = "Function")] - Function = 1, - - /// - /// Enum DAG for value: DAG - /// - [EnumMember(Value = "DAG")] - DAG = 2, - - /// - /// Enum Loop for value: Loop - /// - [EnumMember(Value = "Loop")] - Loop = 3, - - /// - /// Enum Unknown for value: Unknown - /// - [EnumMember(Value = "Unknown")] - Unknown = 4 - - } - -} diff --git a/src/PollinationSDK/Model/StepArrayInput.cs b/src/PollinationSDK/Model/StepArrayInput.cs deleted file mode 100644 index 62d1704f1..000000000 --- a/src/PollinationSDK/Model/StepArrayInput.cs +++ /dev/null @@ -1,290 +0,0 @@ -/* - * 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 JSON array input. - /// - [DataContract(Name = "StepArrayInput")] - public partial class StepArrayInput : GenericInput, IEquatable, IValidatableObject - { - /// - /// Type of items in an array. All the items in an array must be from the same type. - /// - /// Type of items in an array. All the items in an array must be from the same type. - [DataMember(Name="items_type", EmitDefaultValue=false)] - public ItemType ItemsType { get; set; } = ItemType.String; - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected StepArrayInput() - { - // Set non-required readonly properties with defaultValue - this.Type = "StepArrayInput"; - } - - /// - /// Initializes a new instance of the class. - /// - /// value (required). - /// Default value to use for an input if a value was not supplied.. - /// A list of aliases for this input in different platforms.. - /// A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. (default to false). - /// An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec.. - /// Type of items in an array. All the items in an array must be from the same type.. - /// Input name. (required). - /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. - /// Optional description for input.. - public StepArrayInput - ( - string name, List value, // Required parameters - Dictionary annotations= default, string description= default, List _default= default, List> alias= default, bool required = false, Object spec= default, ItemType itemsType= ItemType.String // Optional parameters - ) : base(name: name, annotations: annotations, description: description)// BaseClass - { - // to ensure "value" is required (not null) - this.Value = value ?? throw new ArgumentNullException("value is a required property for StepArrayInput and cannot be null"); - this.Default = _default; - this.Alias = alias; - this.Required = required; - this.Spec = spec; - this.ItemsType = itemsType; - - // Set non-required readonly properties with defaultValue - this.Type = "StepArrayInput"; - } - - //============================================== is ReadOnly - /// - /// Gets or Sets Type - /// - [DataMember(Name = "type", EmitDefaultValue = true)] - public string Type { get; protected internal set; } = "StepArrayInput"; - - /// - /// Gets or Sets Value - /// - [DataMember(Name = "value", IsRequired = true, EmitDefaultValue = false)] - public List Value { get; set; } - /// - /// Default value to use for an input if a value was not supplied. - /// - /// Default value to use for an input if a value was not supplied. - [DataMember(Name = "default", EmitDefaultValue = false)] - public List Default { get; set; } - /// - /// A list of aliases for this input in different platforms. - /// - /// A list of aliases for this input in different platforms. - [DataMember(Name = "alias", EmitDefaultValue = false)] - public List> Alias { get; set; } - /// - /// A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. - /// - /// A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. - [DataMember(Name = "required", EmitDefaultValue = true)] - public bool Required { get; set; } = false; - /// - /// An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec. - /// - /// An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec. - [DataMember(Name = "spec", EmitDefaultValue = false)] - public Object Spec { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - return "StepArrayInput"; - } - - /// - /// 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("StepArrayInput:\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" Annotations: ").Append(Annotations).Append("\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" Value: ").Append(Value).Append("\n"); - sb.Append(" Default: ").Append(Default).Append("\n"); - sb.Append(" Alias: ").Append(Alias).Append("\n"); - sb.Append(" Required: ").Append(Required).Append("\n"); - sb.Append(" Spec: ").Append(Spec).Append("\n"); - sb.Append(" ItemsType: ").Append(ItemsType).Append("\n"); - return sb.ToString(); - } - - /// - /// Returns the object from JSON string - /// - /// StepArrayInput object - public static StepArrayInput 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. - /// - /// StepArrayInput object - public virtual StepArrayInput DuplicateStepArrayInput() - { - return FromJson(this.ToJson()); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel Duplicate() - { - return DuplicateStepArrayInput(); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override GenericInput DuplicateGenericInput() - { - return DuplicateStepArrayInput(); - } - - /// - /// 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 StepArrayInput); - } - - /// - /// Returns true if StepArrayInput instances are equal - /// - /// Instance of StepArrayInput to be compared - /// Boolean - public bool Equals(StepArrayInput input) - { - if (input == null) - return false; - return base.Equals(input) && - ( - this.Value == input.Value || - this.Value != null && - input.Value != null && - this.Value.SequenceEqual(input.Value) - ) && base.Equals(input) && - ( - this.Default == input.Default || - this.Default != null && - input.Default != null && - this.Default.SequenceEqual(input.Default) - ) && base.Equals(input) && - ( - this.Alias == input.Alias || - this.Alias != null && - input.Alias != null && - this.Alias.SequenceEqual(input.Alias) - ) && base.Equals(input) && - ( - this.Required == input.Required || - (this.Required != null && - this.Required.Equals(input.Required)) - ) && base.Equals(input) && - ( - this.ItemsType == input.ItemsType || - (this.ItemsType != null && - this.ItemsType.Equals(input.ItemsType)) - ) && 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.Value != null) - hashCode = hashCode * 59 + this.Value.GetHashCode(); - if (this.Default != null) - hashCode = hashCode * 59 + this.Default.GetHashCode(); - if (this.Alias != null) - hashCode = hashCode * 59 + this.Alias.GetHashCode(); - if (this.Required != null) - hashCode = hashCode * 59 + this.Required.GetHashCode(); - if (this.Spec != null) - hashCode = hashCode * 59 + this.Spec.GetHashCode(); - if (this.ItemsType != null) - hashCode = hashCode * 59 + this.ItemsType.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(@"^StepArrayInput$", 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/StepArrayOutput.cs b/src/PollinationSDK/Model/StepArrayOutput.cs deleted file mode 100644 index 219b515bf..000000000 --- a/src/PollinationSDK/Model/StepArrayOutput.cs +++ /dev/null @@ -1,233 +0,0 @@ -/* - * 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 JSON array output. - /// - [DataContract(Name = "StepArrayOutput")] - public partial class StepArrayOutput : FunctionStringOutput, IEquatable, IValidatableObject - { - /// - /// Type of items in this array. All the items in an array must be from the same type. - /// - /// Type of items in this array. All the items in an array must be from the same type. - [DataMember(Name="items_type", EmitDefaultValue=false)] - public ItemType ItemsType { get; set; } = ItemType.String; - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected StepArrayOutput() - { - // Set non-required readonly properties with defaultValue - this.Type = "StepArrayOutput"; - } - - /// - /// Initializes a new instance of the class. - /// - /// value (required). - /// Type of items in this array. All the items in an array must be from the same type.. - /// Output name. (required). - /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. - /// Optional description for output.. - /// Path to the output artifact relative to where the function command is executed. (required). - /// A boolean to indicate if an artifact output is required. A False value makes the artifact optional. (default to true). - public StepArrayOutput - ( - string name, string path, List value, // Required parameters - Dictionary annotations= default, string description= default, bool required = true, ItemType itemsType= ItemType.String // Optional parameters - ) : base(name: name, annotations: annotations, description: description, path: path, required: required)// BaseClass - { - // to ensure "value" is required (not null) - this.Value = value ?? throw new ArgumentNullException("value is a required property for StepArrayOutput and cannot be null"); - this.ItemsType = itemsType; - - // Set non-required readonly properties with defaultValue - this.Type = "StepArrayOutput"; - } - - //============================================== is ReadOnly - /// - /// Gets or Sets Type - /// - [DataMember(Name = "type", EmitDefaultValue = true)] - public string Type { get; protected internal set; } = "StepArrayOutput"; - - /// - /// Gets or Sets Value - /// - [DataMember(Name = "value", IsRequired = true, EmitDefaultValue = false)] - public List Value { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - return "StepArrayOutput"; - } - - /// - /// 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("StepArrayOutput:\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" Annotations: ").Append(Annotations).Append("\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" Path: ").Append(Path).Append("\n"); - sb.Append(" Required: ").Append(Required).Append("\n"); - sb.Append(" Value: ").Append(Value).Append("\n"); - sb.Append(" ItemsType: ").Append(ItemsType).Append("\n"); - return sb.ToString(); - } - - /// - /// Returns the object from JSON string - /// - /// StepArrayOutput object - public static StepArrayOutput 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. - /// - /// StepArrayOutput object - public virtual StepArrayOutput DuplicateStepArrayOutput() - { - return FromJson(this.ToJson()); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel Duplicate() - { - return DuplicateStepArrayOutput(); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override FunctionStringOutput DuplicateFunctionStringOutput() - { - return DuplicateStepArrayOutput(); - } - - /// - /// 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 StepArrayOutput); - } - - /// - /// Returns true if StepArrayOutput instances are equal - /// - /// Instance of StepArrayOutput to be compared - /// Boolean - public bool Equals(StepArrayOutput input) - { - if (input == null) - return false; - return base.Equals(input) && - ( - this.Value == input.Value || - this.Value != null && - input.Value != null && - this.Value.SequenceEqual(input.Value) - ) && base.Equals(input) && - ( - this.ItemsType == input.ItemsType || - (this.ItemsType != null && - this.ItemsType.Equals(input.ItemsType)) - ) && 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.Value != null) - hashCode = hashCode * 59 + this.Value.GetHashCode(); - if (this.ItemsType != null) - hashCode = hashCode * 59 + this.ItemsType.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(@"^StepArrayOutput$", 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/StepBooleanInput.cs b/src/PollinationSDK/Model/StepBooleanInput.cs deleted file mode 100644 index ac1ae39b1..000000000 --- a/src/PollinationSDK/Model/StepBooleanInput.cs +++ /dev/null @@ -1,271 +0,0 @@ -/* - * 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 boolean type matches only two special values: True and False. - /// - [DataContract(Name = "StepBooleanInput")] - public partial class StepBooleanInput : GenericInput, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected StepBooleanInput() - { - // Set non-required readonly properties with defaultValue - this.Type = "StepBooleanInput"; - } - - /// - /// Initializes a new instance of the class. - /// - /// value (required). - /// Default value to use for an input if a value was not supplied.. - /// A list of aliases for this input in different platforms.. - /// A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. (default to false). - /// An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec.. - /// Input name. (required). - /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. - /// Optional description for input.. - public StepBooleanInput - ( - string name, bool value, // Required parameters - Dictionary annotations= default, string description= default, bool _default= default, List> alias= default, bool required = false, Object spec= default // Optional parameters - ) : base(name: name, annotations: annotations, description: description)// BaseClass - { - this.Value = value; - this.Default = _default; - this.Alias = alias; - this.Required = required; - this.Spec = spec; - - // Set non-required readonly properties with defaultValue - this.Type = "StepBooleanInput"; - } - - //============================================== is ReadOnly - /// - /// Gets or Sets Type - /// - [DataMember(Name = "type", EmitDefaultValue = true)] - public string Type { get; protected internal set; } = "StepBooleanInput"; - - /// - /// Gets or Sets Value - /// - [DataMember(Name = "value", IsRequired = true, EmitDefaultValue = false)] - public bool Value { get; set; } - /// - /// Default value to use for an input if a value was not supplied. - /// - /// Default value to use for an input if a value was not supplied. - [DataMember(Name = "default", EmitDefaultValue = false)] - public bool Default { get; set; } - /// - /// A list of aliases for this input in different platforms. - /// - /// A list of aliases for this input in different platforms. - [DataMember(Name = "alias", EmitDefaultValue = false)] - public List> Alias { get; set; } - /// - /// A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. - /// - /// A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. - [DataMember(Name = "required", EmitDefaultValue = true)] - public bool Required { get; set; } = false; - /// - /// An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec. - /// - /// An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec. - [DataMember(Name = "spec", EmitDefaultValue = false)] - public Object Spec { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - return "StepBooleanInput"; - } - - /// - /// 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("StepBooleanInput:\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" Annotations: ").Append(Annotations).Append("\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" Value: ").Append(Value).Append("\n"); - sb.Append(" Default: ").Append(Default).Append("\n"); - sb.Append(" Alias: ").Append(Alias).Append("\n"); - sb.Append(" Required: ").Append(Required).Append("\n"); - sb.Append(" Spec: ").Append(Spec).Append("\n"); - return sb.ToString(); - } - - /// - /// Returns the object from JSON string - /// - /// StepBooleanInput object - public static StepBooleanInput 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. - /// - /// StepBooleanInput object - public virtual StepBooleanInput DuplicateStepBooleanInput() - { - return FromJson(this.ToJson()); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel Duplicate() - { - return DuplicateStepBooleanInput(); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override GenericInput DuplicateGenericInput() - { - return DuplicateStepBooleanInput(); - } - - /// - /// 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 StepBooleanInput); - } - - /// - /// Returns true if StepBooleanInput instances are equal - /// - /// Instance of StepBooleanInput to be compared - /// Boolean - public bool Equals(StepBooleanInput input) - { - if (input == null) - return false; - return base.Equals(input) && - ( - this.Value == input.Value || - (this.Value != null && - this.Value.Equals(input.Value)) - ) && base.Equals(input) && - ( - this.Default == input.Default || - (this.Default != null && - this.Default.Equals(input.Default)) - ) && base.Equals(input) && - ( - this.Alias == input.Alias || - this.Alias != null && - input.Alias != null && - this.Alias.SequenceEqual(input.Alias) - ) && base.Equals(input) && - ( - this.Required == input.Required || - (this.Required != null && - this.Required.Equals(input.Required)) - ) && 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.Value != null) - hashCode = hashCode * 59 + this.Value.GetHashCode(); - if (this.Default != null) - hashCode = hashCode * 59 + this.Default.GetHashCode(); - if (this.Alias != null) - hashCode = hashCode * 59 + this.Alias.GetHashCode(); - if (this.Required != null) - hashCode = hashCode * 59 + this.Required.GetHashCode(); - if (this.Spec != null) - hashCode = hashCode * 59 + this.Spec.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(@"^StepBooleanInput$", 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/StepBooleanOutput.cs b/src/PollinationSDK/Model/StepBooleanOutput.cs deleted file mode 100644 index f5fd6cfa1..000000000 --- a/src/PollinationSDK/Model/StepBooleanOutput.cs +++ /dev/null @@ -1,215 +0,0 @@ -/* - * 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 boolean type matches only two special values: True and False. - /// - [DataContract(Name = "StepBooleanOutput")] - public partial class StepBooleanOutput : FunctionBooleanOutput, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected StepBooleanOutput() - { - // Set non-required readonly properties with defaultValue - this.Type = "StepBooleanOutput"; - } - - /// - /// Initializes a new instance of the class. - /// - /// value (required). - /// Output name. (required). - /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. - /// Optional description for output.. - /// Path to the output artifact relative to where the function command is executed. (required). - /// A boolean to indicate if an artifact output is required. A False value makes the artifact optional. (default to true). - public StepBooleanOutput - ( - string name, string path, bool value, // Required parameters - Dictionary annotations= default, string description= default, bool required = true // Optional parameters - ) : base(name: name, annotations: annotations, description: description, path: path, required: required)// BaseClass - { - this.Value = value; - - // Set non-required readonly properties with defaultValue - this.Type = "StepBooleanOutput"; - } - - //============================================== is ReadOnly - /// - /// Gets or Sets Type - /// - [DataMember(Name = "type", EmitDefaultValue = true)] - public string Type { get; protected internal set; } = "StepBooleanOutput"; - - /// - /// Gets or Sets Value - /// - [DataMember(Name = "value", IsRequired = true, EmitDefaultValue = false)] - public bool Value { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - return "StepBooleanOutput"; - } - - /// - /// 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("StepBooleanOutput:\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" Annotations: ").Append(Annotations).Append("\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" Path: ").Append(Path).Append("\n"); - sb.Append(" Required: ").Append(Required).Append("\n"); - sb.Append(" Value: ").Append(Value).Append("\n"); - return sb.ToString(); - } - - /// - /// Returns the object from JSON string - /// - /// StepBooleanOutput object - public static StepBooleanOutput 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. - /// - /// StepBooleanOutput object - public virtual StepBooleanOutput DuplicateStepBooleanOutput() - { - return FromJson(this.ToJson()); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel Duplicate() - { - return DuplicateStepBooleanOutput(); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override FunctionBooleanOutput DuplicateFunctionBooleanOutput() - { - return DuplicateStepBooleanOutput(); - } - - /// - /// 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 StepBooleanOutput); - } - - /// - /// Returns true if StepBooleanOutput instances are equal - /// - /// Instance of StepBooleanOutput to be compared - /// Boolean - public bool Equals(StepBooleanOutput input) - { - if (input == null) - return false; - return base.Equals(input) && - ( - this.Value == input.Value || - (this.Value != null && - this.Value.Equals(input.Value)) - ) && 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.Value != null) - hashCode = hashCode * 59 + this.Value.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(@"^StepBooleanOutput$", 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/StepFileInput.cs b/src/PollinationSDK/Model/StepFileInput.cs deleted file mode 100644 index 7c99b9c87..000000000 --- a/src/PollinationSDK/Model/StepFileInput.cs +++ /dev/null @@ -1,306 +0,0 @@ -/* - * 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 file input. - /// - [DataContract(Name = "StepFileInput")] - public partial class StepFileInput : GenericInput, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected StepFileInput() - { - // Set non-required readonly properties with defaultValue - this.Type = "StepFileInput"; - } - - /// - /// Initializes a new instance of the class. - /// - /// The path to source the file from. (required). - /// The default source for file if the value is not provided.. - /// A list of aliases for this input in different platforms.. - /// A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. (default to false). - /// An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec.. - /// 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.. - /// Optional list of extensions for file. The check for extension is case-insensitive.. - /// Input name. (required). - /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. - /// Optional description for input.. - public StepFileInput - ( - string name, AnyOf source, // Required parameters - Dictionary annotations= default, string description= default, AnyOf _default= default, List> alias= default, bool required = false, Object spec= default, string path= default, List extensions= default // Optional parameters - ) : base(name: name, annotations: annotations, description: description)// BaseClass - { - // to ensure "source" is required (not null) - this.Source = source ?? throw new ArgumentNullException("source is a required property for StepFileInput and cannot be null"); - this.Default = _default; - this.Alias = alias; - this.Required = required; - this.Spec = spec; - this.Path = path; - this.Extensions = extensions; - - // Set non-required readonly properties with defaultValue - this.Type = "StepFileInput"; - } - - //============================================== is ReadOnly - /// - /// Gets or Sets Type - /// - [DataMember(Name = "type", EmitDefaultValue = true)] - public string Type { get; protected internal set; } = "StepFileInput"; - - /// - /// The path to source the file from. - /// - /// The path to source the file from. - [DataMember(Name = "source", IsRequired = true, EmitDefaultValue = false)] - public AnyOf Source { get; set; } - /// - /// The default source for file if the value is not provided. - /// - /// The default source for file if the value is not provided. - [DataMember(Name = "default", EmitDefaultValue = false)] - public AnyOf Default { get; set; } - /// - /// A list of aliases for this input in different platforms. - /// - /// A list of aliases for this input in different platforms. - [DataMember(Name = "alias", EmitDefaultValue = false)] - public List> Alias { get; set; } - /// - /// A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. - /// - /// A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. - [DataMember(Name = "required", EmitDefaultValue = true)] - public bool Required { get; set; } = false; - /// - /// An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec. - /// - /// An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec. - [DataMember(Name = "spec", EmitDefaultValue = false)] - public Object Spec { get; set; } - /// - /// 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. - /// - /// 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. - [DataMember(Name = "path", EmitDefaultValue = false)] - public string Path { get; set; } - /// - /// Optional list of extensions for file. The check for extension is case-insensitive. - /// - /// Optional list of extensions for file. The check for extension is case-insensitive. - [DataMember(Name = "extensions", EmitDefaultValue = false)] - public List Extensions { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - return "StepFileInput"; - } - - /// - /// 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("StepFileInput:\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" Annotations: ").Append(Annotations).Append("\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" Source: ").Append(Source).Append("\n"); - sb.Append(" Default: ").Append(Default).Append("\n"); - sb.Append(" Alias: ").Append(Alias).Append("\n"); - sb.Append(" Required: ").Append(Required).Append("\n"); - sb.Append(" Spec: ").Append(Spec).Append("\n"); - sb.Append(" Path: ").Append(Path).Append("\n"); - sb.Append(" Extensions: ").Append(Extensions).Append("\n"); - return sb.ToString(); - } - - /// - /// Returns the object from JSON string - /// - /// StepFileInput object - public static StepFileInput 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. - /// - /// StepFileInput object - public virtual StepFileInput DuplicateStepFileInput() - { - return FromJson(this.ToJson()); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel Duplicate() - { - return DuplicateStepFileInput(); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override GenericInput DuplicateGenericInput() - { - return DuplicateStepFileInput(); - } - - /// - /// 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 StepFileInput); - } - - /// - /// Returns true if StepFileInput instances are equal - /// - /// Instance of StepFileInput to be compared - /// Boolean - public bool Equals(StepFileInput input) - { - if (input == null) - return false; - return base.Equals(input) && - ( - this.Source == input.Source || - (this.Source != null && - this.Source.Equals(input.Source)) - ) && base.Equals(input) && - ( - this.Default == input.Default || - (this.Default != null && - this.Default.Equals(input.Default)) - ) && base.Equals(input) && - ( - this.Alias == input.Alias || - this.Alias != null && - input.Alias != null && - this.Alias.SequenceEqual(input.Alias) - ) && base.Equals(input) && - ( - this.Required == input.Required || - (this.Required != null && - this.Required.Equals(input.Required)) - ) && base.Equals(input) && - ( - this.Path == input.Path || - (this.Path != null && - this.Path.Equals(input.Path)) - ) && base.Equals(input) && - ( - this.Extensions == input.Extensions || - this.Extensions != null && - input.Extensions != null && - this.Extensions.SequenceEqual(input.Extensions) - ) && 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.Source != null) - hashCode = hashCode * 59 + this.Source.GetHashCode(); - if (this.Default != null) - hashCode = hashCode * 59 + this.Default.GetHashCode(); - if (this.Alias != null) - hashCode = hashCode * 59 + this.Alias.GetHashCode(); - if (this.Required != null) - hashCode = hashCode * 59 + this.Required.GetHashCode(); - if (this.Spec != null) - hashCode = hashCode * 59 + this.Spec.GetHashCode(); - if (this.Path != null) - hashCode = hashCode * 59 + this.Path.GetHashCode(); - if (this.Extensions != null) - hashCode = hashCode * 59 + this.Extensions.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(@"^StepFileInput$", 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/StepFileOutput.cs b/src/PollinationSDK/Model/StepFileOutput.cs deleted file mode 100644 index 7040d9468..000000000 --- a/src/PollinationSDK/Model/StepFileOutput.cs +++ /dev/null @@ -1,217 +0,0 @@ -/* - * 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 file output. - /// - [DataContract(Name = "StepFileOutput")] - public partial class StepFileOutput : FunctionFileOutput, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected StepFileOutput() - { - // Set non-required readonly properties with defaultValue - this.Type = "StepFileOutput"; - } - - /// - /// Initializes a new instance of the class. - /// - /// The path to source the file from. (required). - /// Output name. (required). - /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. - /// Optional description for output.. - /// Path to the output artifact relative to where the function command is executed. (required). - /// A boolean to indicate if an artifact output is required. A False value makes the artifact optional. (default to true). - public StepFileOutput - ( - string name, string path, AnyOf source, // Required parameters - Dictionary annotations= default, string description= default, bool required = true // Optional parameters - ) : base(name: name, annotations: annotations, description: description, path: path, required: required)// BaseClass - { - // to ensure "source" is required (not null) - this.Source = source ?? throw new ArgumentNullException("source is a required property for StepFileOutput and cannot be null"); - - // Set non-required readonly properties with defaultValue - this.Type = "StepFileOutput"; - } - - //============================================== is ReadOnly - /// - /// Gets or Sets Type - /// - [DataMember(Name = "type", EmitDefaultValue = true)] - public string Type { get; protected internal set; } = "StepFileOutput"; - - /// - /// The path to source the file from. - /// - /// The path to source the file from. - [DataMember(Name = "source", IsRequired = true, EmitDefaultValue = false)] - public AnyOf Source { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - return "StepFileOutput"; - } - - /// - /// 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("StepFileOutput:\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" Annotations: ").Append(Annotations).Append("\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" Path: ").Append(Path).Append("\n"); - sb.Append(" Required: ").Append(Required).Append("\n"); - sb.Append(" Source: ").Append(Source).Append("\n"); - return sb.ToString(); - } - - /// - /// Returns the object from JSON string - /// - /// StepFileOutput object - public static StepFileOutput 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. - /// - /// StepFileOutput object - public virtual StepFileOutput DuplicateStepFileOutput() - { - return FromJson(this.ToJson()); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel Duplicate() - { - return DuplicateStepFileOutput(); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override FunctionFileOutput DuplicateFunctionFileOutput() - { - return DuplicateStepFileOutput(); - } - - /// - /// 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 StepFileOutput); - } - - /// - /// Returns true if StepFileOutput instances are equal - /// - /// Instance of StepFileOutput to be compared - /// Boolean - public bool Equals(StepFileOutput input) - { - if (input == null) - return false; - return base.Equals(input) && - ( - this.Source == input.Source || - (this.Source != null && - this.Source.Equals(input.Source)) - ) && 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.Source != null) - hashCode = hashCode * 59 + this.Source.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(@"^StepFileOutput$", 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/StepFolderInput.cs b/src/PollinationSDK/Model/StepFolderInput.cs deleted file mode 100644 index 96703d06d..000000000 --- a/src/PollinationSDK/Model/StepFolderInput.cs +++ /dev/null @@ -1,289 +0,0 @@ -/* - * 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 folder input. - /// - [DataContract(Name = "StepFolderInput")] - public partial class StepFolderInput : GenericInput, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected StepFolderInput() - { - // Set non-required readonly properties with defaultValue - this.Type = "StepFolderInput"; - } - - /// - /// Initializes a new instance of the class. - /// - /// The path to source the file from. (required). - /// The default source for file if the value is not provided.. - /// A list of aliases for this input in different platforms.. - /// A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. (default to false). - /// An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec.. - /// 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.. - /// Input name. (required). - /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. - /// Optional description for input.. - public StepFolderInput - ( - string name, AnyOf source, // Required parameters - Dictionary annotations= default, string description= default, AnyOf _default= default, List> alias= default, bool required = false, Object spec= default, string path= default // Optional parameters - ) : base(name: name, annotations: annotations, description: description)// BaseClass - { - // to ensure "source" is required (not null) - this.Source = source ?? throw new ArgumentNullException("source is a required property for StepFolderInput and cannot be null"); - this.Default = _default; - this.Alias = alias; - this.Required = required; - this.Spec = spec; - this.Path = path; - - // Set non-required readonly properties with defaultValue - this.Type = "StepFolderInput"; - } - - //============================================== is ReadOnly - /// - /// Gets or Sets Type - /// - [DataMember(Name = "type", EmitDefaultValue = true)] - public string Type { get; protected internal set; } = "StepFolderInput"; - - /// - /// The path to source the file from. - /// - /// The path to source the file from. - [DataMember(Name = "source", IsRequired = true, EmitDefaultValue = false)] - public AnyOf Source { get; set; } - /// - /// The default source for file if the value is not provided. - /// - /// The default source for file if the value is not provided. - [DataMember(Name = "default", EmitDefaultValue = false)] - public AnyOf Default { get; set; } - /// - /// A list of aliases for this input in different platforms. - /// - /// A list of aliases for this input in different platforms. - [DataMember(Name = "alias", EmitDefaultValue = false)] - public List> Alias { get; set; } - /// - /// A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. - /// - /// A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. - [DataMember(Name = "required", EmitDefaultValue = true)] - public bool Required { get; set; } = false; - /// - /// An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec. - /// - /// An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec. - [DataMember(Name = "spec", EmitDefaultValue = false)] - public Object Spec { get; set; } - /// - /// 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. - /// - /// 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. - [DataMember(Name = "path", EmitDefaultValue = false)] - public string Path { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - return "StepFolderInput"; - } - - /// - /// 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("StepFolderInput:\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" Annotations: ").Append(Annotations).Append("\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" Source: ").Append(Source).Append("\n"); - sb.Append(" Default: ").Append(Default).Append("\n"); - sb.Append(" Alias: ").Append(Alias).Append("\n"); - sb.Append(" Required: ").Append(Required).Append("\n"); - sb.Append(" Spec: ").Append(Spec).Append("\n"); - sb.Append(" Path: ").Append(Path).Append("\n"); - return sb.ToString(); - } - - /// - /// Returns the object from JSON string - /// - /// StepFolderInput object - public static StepFolderInput 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. - /// - /// StepFolderInput object - public virtual StepFolderInput DuplicateStepFolderInput() - { - return FromJson(this.ToJson()); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel Duplicate() - { - return DuplicateStepFolderInput(); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override GenericInput DuplicateGenericInput() - { - return DuplicateStepFolderInput(); - } - - /// - /// 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 StepFolderInput); - } - - /// - /// Returns true if StepFolderInput instances are equal - /// - /// Instance of StepFolderInput to be compared - /// Boolean - public bool Equals(StepFolderInput input) - { - if (input == null) - return false; - return base.Equals(input) && - ( - this.Source == input.Source || - (this.Source != null && - this.Source.Equals(input.Source)) - ) && base.Equals(input) && - ( - this.Default == input.Default || - (this.Default != null && - this.Default.Equals(input.Default)) - ) && base.Equals(input) && - ( - this.Alias == input.Alias || - this.Alias != null && - input.Alias != null && - this.Alias.SequenceEqual(input.Alias) - ) && base.Equals(input) && - ( - this.Required == input.Required || - (this.Required != null && - this.Required.Equals(input.Required)) - ) && base.Equals(input) && - ( - this.Path == input.Path || - (this.Path != null && - this.Path.Equals(input.Path)) - ) && 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.Source != null) - hashCode = hashCode * 59 + this.Source.GetHashCode(); - if (this.Default != null) - hashCode = hashCode * 59 + this.Default.GetHashCode(); - if (this.Alias != null) - hashCode = hashCode * 59 + this.Alias.GetHashCode(); - if (this.Required != null) - hashCode = hashCode * 59 + this.Required.GetHashCode(); - if (this.Spec != null) - hashCode = hashCode * 59 + this.Spec.GetHashCode(); - if (this.Path != null) - hashCode = hashCode * 59 + this.Path.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(@"^StepFolderInput$", 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/StepFolderOutput.cs b/src/PollinationSDK/Model/StepFolderOutput.cs deleted file mode 100644 index f25480a82..000000000 --- a/src/PollinationSDK/Model/StepFolderOutput.cs +++ /dev/null @@ -1,217 +0,0 @@ -/* - * 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 folder output. - /// - [DataContract(Name = "StepFolderOutput")] - public partial class StepFolderOutput : FunctionFolderOutput, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected StepFolderOutput() - { - // Set non-required readonly properties with defaultValue - this.Type = "StepFolderOutput"; - } - - /// - /// Initializes a new instance of the class. - /// - /// The path to source the file from. (required). - /// Output name. (required). - /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. - /// Optional description for output.. - /// Path to the output artifact relative to where the function command is executed. (required). - /// A boolean to indicate if an artifact output is required. A False value makes the artifact optional. (default to true). - public StepFolderOutput - ( - string name, string path, AnyOf source, // Required parameters - Dictionary annotations= default, string description= default, bool required = true // Optional parameters - ) : base(name: name, annotations: annotations, description: description, path: path, required: required)// BaseClass - { - // to ensure "source" is required (not null) - this.Source = source ?? throw new ArgumentNullException("source is a required property for StepFolderOutput and cannot be null"); - - // Set non-required readonly properties with defaultValue - this.Type = "StepFolderOutput"; - } - - //============================================== is ReadOnly - /// - /// Gets or Sets Type - /// - [DataMember(Name = "type", EmitDefaultValue = true)] - public string Type { get; protected internal set; } = "StepFolderOutput"; - - /// - /// The path to source the file from. - /// - /// The path to source the file from. - [DataMember(Name = "source", IsRequired = true, EmitDefaultValue = false)] - public AnyOf Source { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - return "StepFolderOutput"; - } - - /// - /// 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("StepFolderOutput:\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" Annotations: ").Append(Annotations).Append("\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" Path: ").Append(Path).Append("\n"); - sb.Append(" Required: ").Append(Required).Append("\n"); - sb.Append(" Source: ").Append(Source).Append("\n"); - return sb.ToString(); - } - - /// - /// Returns the object from JSON string - /// - /// StepFolderOutput object - public static StepFolderOutput 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. - /// - /// StepFolderOutput object - public virtual StepFolderOutput DuplicateStepFolderOutput() - { - return FromJson(this.ToJson()); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel Duplicate() - { - return DuplicateStepFolderOutput(); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override FunctionFolderOutput DuplicateFunctionFolderOutput() - { - return DuplicateStepFolderOutput(); - } - - /// - /// 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 StepFolderOutput); - } - - /// - /// Returns true if StepFolderOutput instances are equal - /// - /// Instance of StepFolderOutput to be compared - /// Boolean - public bool Equals(StepFolderOutput input) - { - if (input == null) - return false; - return base.Equals(input) && - ( - this.Source == input.Source || - (this.Source != null && - this.Source.Equals(input.Source)) - ) && 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.Source != null) - hashCode = hashCode * 59 + this.Source.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(@"^StepFolderOutput$", 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/StepIntegerInput.cs b/src/PollinationSDK/Model/StepIntegerInput.cs deleted file mode 100644 index 63de1ef02..000000000 --- a/src/PollinationSDK/Model/StepIntegerInput.cs +++ /dev/null @@ -1,271 +0,0 @@ -/* - * 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 integer input. - /// - [DataContract(Name = "StepIntegerInput")] - public partial class StepIntegerInput : GenericInput, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected StepIntegerInput() - { - // Set non-required readonly properties with defaultValue - this.Type = "StepIntegerInput"; - } - - /// - /// Initializes a new instance of the class. - /// - /// value (required). - /// Default value to use for an input if a value was not supplied.. - /// A list of aliases for this input in different platforms.. - /// A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. (default to false). - /// An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec.. - /// Input name. (required). - /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. - /// Optional description for input.. - public StepIntegerInput - ( - string name, int value, // Required parameters - Dictionary annotations= default, string description= default, int _default= default, List> alias= default, bool required = false, Object spec= default // Optional parameters - ) : base(name: name, annotations: annotations, description: description)// BaseClass - { - this.Value = value; - this.Default = _default; - this.Alias = alias; - this.Required = required; - this.Spec = spec; - - // Set non-required readonly properties with defaultValue - this.Type = "StepIntegerInput"; - } - - //============================================== is ReadOnly - /// - /// Gets or Sets Type - /// - [DataMember(Name = "type", EmitDefaultValue = true)] - public string Type { get; protected internal set; } = "StepIntegerInput"; - - /// - /// Gets or Sets Value - /// - [DataMember(Name = "value", IsRequired = true, EmitDefaultValue = false)] - public int Value { get; set; } - /// - /// Default value to use for an input if a value was not supplied. - /// - /// Default value to use for an input if a value was not supplied. - [DataMember(Name = "default", EmitDefaultValue = false)] - public int Default { get; set; } - /// - /// A list of aliases for this input in different platforms. - /// - /// A list of aliases for this input in different platforms. - [DataMember(Name = "alias", EmitDefaultValue = false)] - public List> Alias { get; set; } - /// - /// A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. - /// - /// A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. - [DataMember(Name = "required", EmitDefaultValue = true)] - public bool Required { get; set; } = false; - /// - /// An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec. - /// - /// An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec. - [DataMember(Name = "spec", EmitDefaultValue = false)] - public Object Spec { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - return "StepIntegerInput"; - } - - /// - /// 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("StepIntegerInput:\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" Annotations: ").Append(Annotations).Append("\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" Value: ").Append(Value).Append("\n"); - sb.Append(" Default: ").Append(Default).Append("\n"); - sb.Append(" Alias: ").Append(Alias).Append("\n"); - sb.Append(" Required: ").Append(Required).Append("\n"); - sb.Append(" Spec: ").Append(Spec).Append("\n"); - return sb.ToString(); - } - - /// - /// Returns the object from JSON string - /// - /// StepIntegerInput object - public static StepIntegerInput 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. - /// - /// StepIntegerInput object - public virtual StepIntegerInput DuplicateStepIntegerInput() - { - return FromJson(this.ToJson()); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel Duplicate() - { - return DuplicateStepIntegerInput(); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override GenericInput DuplicateGenericInput() - { - return DuplicateStepIntegerInput(); - } - - /// - /// 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 StepIntegerInput); - } - - /// - /// Returns true if StepIntegerInput instances are equal - /// - /// Instance of StepIntegerInput to be compared - /// Boolean - public bool Equals(StepIntegerInput input) - { - if (input == null) - return false; - return base.Equals(input) && - ( - this.Value == input.Value || - (this.Value != null && - this.Value.Equals(input.Value)) - ) && base.Equals(input) && - ( - this.Default == input.Default || - (this.Default != null && - this.Default.Equals(input.Default)) - ) && base.Equals(input) && - ( - this.Alias == input.Alias || - this.Alias != null && - input.Alias != null && - this.Alias.SequenceEqual(input.Alias) - ) && base.Equals(input) && - ( - this.Required == input.Required || - (this.Required != null && - this.Required.Equals(input.Required)) - ) && 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.Value != null) - hashCode = hashCode * 59 + this.Value.GetHashCode(); - if (this.Default != null) - hashCode = hashCode * 59 + this.Default.GetHashCode(); - if (this.Alias != null) - hashCode = hashCode * 59 + this.Alias.GetHashCode(); - if (this.Required != null) - hashCode = hashCode * 59 + this.Required.GetHashCode(); - if (this.Spec != null) - hashCode = hashCode * 59 + this.Spec.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(@"^StepIntegerInput$", 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/StepIntegerOutput.cs b/src/PollinationSDK/Model/StepIntegerOutput.cs deleted file mode 100644 index c405fabb8..000000000 --- a/src/PollinationSDK/Model/StepIntegerOutput.cs +++ /dev/null @@ -1,215 +0,0 @@ -/* - * 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 integer output. - /// - [DataContract(Name = "StepIntegerOutput")] - public partial class StepIntegerOutput : FunctionIntegerOutput, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected StepIntegerOutput() - { - // Set non-required readonly properties with defaultValue - this.Type = "StepIntegerOutput"; - } - - /// - /// Initializes a new instance of the class. - /// - /// value (required). - /// Output name. (required). - /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. - /// Optional description for output.. - /// Path to the output artifact relative to where the function command is executed. (required). - /// A boolean to indicate if an artifact output is required. A False value makes the artifact optional. (default to true). - public StepIntegerOutput - ( - string name, string path, int value, // Required parameters - Dictionary annotations= default, string description= default, bool required = true // Optional parameters - ) : base(name: name, annotations: annotations, description: description, path: path, required: required)// BaseClass - { - this.Value = value; - - // Set non-required readonly properties with defaultValue - this.Type = "StepIntegerOutput"; - } - - //============================================== is ReadOnly - /// - /// Gets or Sets Type - /// - [DataMember(Name = "type", EmitDefaultValue = true)] - public string Type { get; protected internal set; } = "StepIntegerOutput"; - - /// - /// Gets or Sets Value - /// - [DataMember(Name = "value", IsRequired = true, EmitDefaultValue = false)] - public int Value { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - return "StepIntegerOutput"; - } - - /// - /// 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("StepIntegerOutput:\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" Annotations: ").Append(Annotations).Append("\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" Path: ").Append(Path).Append("\n"); - sb.Append(" Required: ").Append(Required).Append("\n"); - sb.Append(" Value: ").Append(Value).Append("\n"); - return sb.ToString(); - } - - /// - /// Returns the object from JSON string - /// - /// StepIntegerOutput object - public static StepIntegerOutput 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. - /// - /// StepIntegerOutput object - public virtual StepIntegerOutput DuplicateStepIntegerOutput() - { - return FromJson(this.ToJson()); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel Duplicate() - { - return DuplicateStepIntegerOutput(); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override FunctionIntegerOutput DuplicateFunctionIntegerOutput() - { - return DuplicateStepIntegerOutput(); - } - - /// - /// 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 StepIntegerOutput); - } - - /// - /// Returns true if StepIntegerOutput instances are equal - /// - /// Instance of StepIntegerOutput to be compared - /// Boolean - public bool Equals(StepIntegerOutput input) - { - if (input == null) - return false; - return base.Equals(input) && - ( - this.Value == input.Value || - (this.Value != null && - this.Value.Equals(input.Value)) - ) && 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.Value != null) - hashCode = hashCode * 59 + this.Value.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(@"^StepIntegerOutput$", 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/StepJSONObjectInput.cs b/src/PollinationSDK/Model/StepJSONObjectInput.cs deleted file mode 100644 index 75dfe295a..000000000 --- a/src/PollinationSDK/Model/StepJSONObjectInput.cs +++ /dev/null @@ -1,272 +0,0 @@ -/* - * 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 JSON object input. - /// - [DataContract(Name = "StepJSONObjectInput")] - public partial class StepJSONObjectInput : GenericInput, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected StepJSONObjectInput() - { - // Set non-required readonly properties with defaultValue - this.Type = "StepJSONObjectInput"; - } - - /// - /// Initializes a new instance of the class. - /// - /// value (required). - /// Default value to use for an input if a value was not supplied.. - /// A list of aliases for this input in different platforms.. - /// A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. (default to false). - /// An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec.. - /// Input name. (required). - /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. - /// Optional description for input.. - public StepJSONObjectInput - ( - string name, Object value, // Required parameters - Dictionary annotations= default, string description= default, Object _default= default, List> alias= default, bool required = false, Object spec= default // Optional parameters - ) : base(name: name, annotations: annotations, description: description)// BaseClass - { - // to ensure "value" is required (not null) - this.Value = value ?? throw new ArgumentNullException("value is a required property for StepJSONObjectInput and cannot be null"); - this.Default = _default; - this.Alias = alias; - this.Required = required; - this.Spec = spec; - - // Set non-required readonly properties with defaultValue - this.Type = "StepJSONObjectInput"; - } - - //============================================== is ReadOnly - /// - /// Gets or Sets Type - /// - [DataMember(Name = "type", EmitDefaultValue = true)] - public string Type { get; protected internal set; } = "StepJSONObjectInput"; - - /// - /// Gets or Sets Value - /// - [DataMember(Name = "value", IsRequired = true, EmitDefaultValue = false)] - public Object Value { get; set; } - /// - /// Default value to use for an input if a value was not supplied. - /// - /// Default value to use for an input if a value was not supplied. - [DataMember(Name = "default", EmitDefaultValue = false)] - public Object Default { get; set; } - /// - /// A list of aliases for this input in different platforms. - /// - /// A list of aliases for this input in different platforms. - [DataMember(Name = "alias", EmitDefaultValue = false)] - public List> Alias { get; set; } - /// - /// A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. - /// - /// A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. - [DataMember(Name = "required", EmitDefaultValue = true)] - public bool Required { get; set; } = false; - /// - /// An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec. - /// - /// An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec. - [DataMember(Name = "spec", EmitDefaultValue = false)] - public Object Spec { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - return "StepJSONObjectInput"; - } - - /// - /// 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("StepJSONObjectInput:\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" Annotations: ").Append(Annotations).Append("\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" Value: ").Append(Value).Append("\n"); - sb.Append(" Default: ").Append(Default).Append("\n"); - sb.Append(" Alias: ").Append(Alias).Append("\n"); - sb.Append(" Required: ").Append(Required).Append("\n"); - sb.Append(" Spec: ").Append(Spec).Append("\n"); - return sb.ToString(); - } - - /// - /// Returns the object from JSON string - /// - /// StepJSONObjectInput object - public static StepJSONObjectInput 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. - /// - /// StepJSONObjectInput object - public virtual StepJSONObjectInput DuplicateStepJSONObjectInput() - { - return FromJson(this.ToJson()); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel Duplicate() - { - return DuplicateStepJSONObjectInput(); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override GenericInput DuplicateGenericInput() - { - return DuplicateStepJSONObjectInput(); - } - - /// - /// 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 StepJSONObjectInput); - } - - /// - /// Returns true if StepJSONObjectInput instances are equal - /// - /// Instance of StepJSONObjectInput to be compared - /// Boolean - public bool Equals(StepJSONObjectInput input) - { - if (input == null) - return false; - return base.Equals(input) && - ( - this.Value == input.Value || - (this.Value != null && - this.Value.Equals(input.Value)) - ) && base.Equals(input) && - ( - this.Default == input.Default || - (this.Default != null && - this.Default.Equals(input.Default)) - ) && base.Equals(input) && - ( - this.Alias == input.Alias || - this.Alias != null && - input.Alias != null && - this.Alias.SequenceEqual(input.Alias) - ) && base.Equals(input) && - ( - this.Required == input.Required || - (this.Required != null && - this.Required.Equals(input.Required)) - ) && 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.Value != null) - hashCode = hashCode * 59 + this.Value.GetHashCode(); - if (this.Default != null) - hashCode = hashCode * 59 + this.Default.GetHashCode(); - if (this.Alias != null) - hashCode = hashCode * 59 + this.Alias.GetHashCode(); - if (this.Required != null) - hashCode = hashCode * 59 + this.Required.GetHashCode(); - if (this.Spec != null) - hashCode = hashCode * 59 + this.Spec.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(@"^StepJSONObjectInput$", 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/StepJSONObjectOutput.cs b/src/PollinationSDK/Model/StepJSONObjectOutput.cs deleted file mode 100644 index 82965776f..000000000 --- a/src/PollinationSDK/Model/StepJSONObjectOutput.cs +++ /dev/null @@ -1,216 +0,0 @@ -/* - * 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 JSON object output. - /// - [DataContract(Name = "StepJSONObjectOutput")] - public partial class StepJSONObjectOutput : FunctionJSONObjectOutput, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected StepJSONObjectOutput() - { - // Set non-required readonly properties with defaultValue - this.Type = "StepJSONObjectOutput"; - } - - /// - /// Initializes a new instance of the class. - /// - /// value (required). - /// Output name. (required). - /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. - /// Optional description for output.. - /// Path to the output artifact relative to where the function command is executed. (required). - /// A boolean to indicate if an artifact output is required. A False value makes the artifact optional. (default to true). - public StepJSONObjectOutput - ( - string name, string path, Object value, // Required parameters - Dictionary annotations= default, string description= default, bool required = true // Optional parameters - ) : base(name: name, annotations: annotations, description: description, path: path, required: required)// BaseClass - { - // to ensure "value" is required (not null) - this.Value = value ?? throw new ArgumentNullException("value is a required property for StepJSONObjectOutput and cannot be null"); - - // Set non-required readonly properties with defaultValue - this.Type = "StepJSONObjectOutput"; - } - - //============================================== is ReadOnly - /// - /// Gets or Sets Type - /// - [DataMember(Name = "type", EmitDefaultValue = true)] - public string Type { get; protected internal set; } = "StepJSONObjectOutput"; - - /// - /// Gets or Sets Value - /// - [DataMember(Name = "value", IsRequired = true, EmitDefaultValue = false)] - public Object Value { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - return "StepJSONObjectOutput"; - } - - /// - /// 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("StepJSONObjectOutput:\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" Annotations: ").Append(Annotations).Append("\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" Path: ").Append(Path).Append("\n"); - sb.Append(" Required: ").Append(Required).Append("\n"); - sb.Append(" Value: ").Append(Value).Append("\n"); - return sb.ToString(); - } - - /// - /// Returns the object from JSON string - /// - /// StepJSONObjectOutput object - public static StepJSONObjectOutput 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. - /// - /// StepJSONObjectOutput object - public virtual StepJSONObjectOutput DuplicateStepJSONObjectOutput() - { - return FromJson(this.ToJson()); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel Duplicate() - { - return DuplicateStepJSONObjectOutput(); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override FunctionJSONObjectOutput DuplicateFunctionJSONObjectOutput() - { - return DuplicateStepJSONObjectOutput(); - } - - /// - /// 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 StepJSONObjectOutput); - } - - /// - /// Returns true if StepJSONObjectOutput instances are equal - /// - /// Instance of StepJSONObjectOutput to be compared - /// Boolean - public bool Equals(StepJSONObjectOutput input) - { - if (input == null) - return false; - return base.Equals(input) && - ( - this.Value == input.Value || - (this.Value != null && - this.Value.Equals(input.Value)) - ) && 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.Value != null) - hashCode = hashCode * 59 + this.Value.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(@"^StepJSONObjectOutput$", 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/StepList.cs b/src/PollinationSDK/Model/StepList.cs deleted file mode 100644 index 3e6e1d970..000000000 --- a/src/PollinationSDK/Model/StepList.cs +++ /dev/null @@ -1,287 +0,0 @@ -/* - * 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 = "StepList")] - public partial class StepList : OpenAPIGenBaseModel, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected StepList() - { - // Set non-required readonly properties with defaultValue - this.Type = "StepList"; - } - - /// - /// 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 StepList - ( - 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 StepList and cannot be null"); - this.NextPage = nextPage; - - // Set non-required readonly properties with defaultValue - this.Type = "StepList"; - } - - //============================================== is ReadOnly - /// - /// Gets or Sets Type - /// - [DataMember(Name = "type", EmitDefaultValue = true)] - public string Type { get; protected internal set; } = "StepList"; - - /// - /// 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 "StepList"; - } - - /// - /// 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("StepList:\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 - /// - /// StepList object - public static StepList 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. - /// - /// StepList object - public virtual StepList DuplicateStepList() - { - return FromJson(this.ToJson()); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel Duplicate() - { - return DuplicateStepList(); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel DuplicateOpenAPIGenBaseModel() - { - return DuplicateStepList(); - } - - /// - /// 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 StepList); - } - - /// - /// Returns true if StepList instances are equal - /// - /// Instance of StepList to be compared - /// Boolean - public bool Equals(StepList 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(@"^StepList$", 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/StepNumberInput.cs b/src/PollinationSDK/Model/StepNumberInput.cs deleted file mode 100644 index 5c263399f..000000000 --- a/src/PollinationSDK/Model/StepNumberInput.cs +++ /dev/null @@ -1,271 +0,0 @@ -/* - * 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 number input. - /// - [DataContract(Name = "StepNumberInput")] - public partial class StepNumberInput : GenericInput, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected StepNumberInput() - { - // Set non-required readonly properties with defaultValue - this.Type = "StepNumberInput"; - } - - /// - /// Initializes a new instance of the class. - /// - /// value (required). - /// Default value to use for an input if a value was not supplied.. - /// A list of aliases for this input in different platforms.. - /// A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. (default to false). - /// An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec.. - /// Input name. (required). - /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. - /// Optional description for input.. - public StepNumberInput - ( - string name, double value, // Required parameters - Dictionary annotations= default, string description= default, double _default= default, List> alias= default, bool required = false, Object spec= default // Optional parameters - ) : base(name: name, annotations: annotations, description: description)// BaseClass - { - this.Value = value; - this.Default = _default; - this.Alias = alias; - this.Required = required; - this.Spec = spec; - - // Set non-required readonly properties with defaultValue - this.Type = "StepNumberInput"; - } - - //============================================== is ReadOnly - /// - /// Gets or Sets Type - /// - [DataMember(Name = "type", EmitDefaultValue = true)] - public string Type { get; protected internal set; } = "StepNumberInput"; - - /// - /// Gets or Sets Value - /// - [DataMember(Name = "value", IsRequired = true, EmitDefaultValue = false)] - public double Value { get; set; } - /// - /// Default value to use for an input if a value was not supplied. - /// - /// Default value to use for an input if a value was not supplied. - [DataMember(Name = "default", EmitDefaultValue = false)] - public double Default { get; set; } - /// - /// A list of aliases for this input in different platforms. - /// - /// A list of aliases for this input in different platforms. - [DataMember(Name = "alias", EmitDefaultValue = false)] - public List> Alias { get; set; } - /// - /// A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. - /// - /// A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. - [DataMember(Name = "required", EmitDefaultValue = true)] - public bool Required { get; set; } = false; - /// - /// An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec. - /// - /// An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec. - [DataMember(Name = "spec", EmitDefaultValue = false)] - public Object Spec { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - return "StepNumberInput"; - } - - /// - /// 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("StepNumberInput:\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" Annotations: ").Append(Annotations).Append("\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" Value: ").Append(Value).Append("\n"); - sb.Append(" Default: ").Append(Default).Append("\n"); - sb.Append(" Alias: ").Append(Alias).Append("\n"); - sb.Append(" Required: ").Append(Required).Append("\n"); - sb.Append(" Spec: ").Append(Spec).Append("\n"); - return sb.ToString(); - } - - /// - /// Returns the object from JSON string - /// - /// StepNumberInput object - public static StepNumberInput 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. - /// - /// StepNumberInput object - public virtual StepNumberInput DuplicateStepNumberInput() - { - return FromJson(this.ToJson()); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel Duplicate() - { - return DuplicateStepNumberInput(); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override GenericInput DuplicateGenericInput() - { - return DuplicateStepNumberInput(); - } - - /// - /// 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 StepNumberInput); - } - - /// - /// Returns true if StepNumberInput instances are equal - /// - /// Instance of StepNumberInput to be compared - /// Boolean - public bool Equals(StepNumberInput input) - { - if (input == null) - return false; - return base.Equals(input) && - ( - this.Value == input.Value || - (this.Value != null && - this.Value.Equals(input.Value)) - ) && base.Equals(input) && - ( - this.Default == input.Default || - (this.Default != null && - this.Default.Equals(input.Default)) - ) && base.Equals(input) && - ( - this.Alias == input.Alias || - this.Alias != null && - input.Alias != null && - this.Alias.SequenceEqual(input.Alias) - ) && base.Equals(input) && - ( - this.Required == input.Required || - (this.Required != null && - this.Required.Equals(input.Required)) - ) && 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.Value != null) - hashCode = hashCode * 59 + this.Value.GetHashCode(); - if (this.Default != null) - hashCode = hashCode * 59 + this.Default.GetHashCode(); - if (this.Alias != null) - hashCode = hashCode * 59 + this.Alias.GetHashCode(); - if (this.Required != null) - hashCode = hashCode * 59 + this.Required.GetHashCode(); - if (this.Spec != null) - hashCode = hashCode * 59 + this.Spec.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(@"^StepNumberInput$", 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/StepNumberOutput.cs b/src/PollinationSDK/Model/StepNumberOutput.cs deleted file mode 100644 index 1efa0c358..000000000 --- a/src/PollinationSDK/Model/StepNumberOutput.cs +++ /dev/null @@ -1,215 +0,0 @@ -/* - * 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 number output. - /// - [DataContract(Name = "StepNumberOutput")] - public partial class StepNumberOutput : FunctionNumberOutput, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected StepNumberOutput() - { - // Set non-required readonly properties with defaultValue - this.Type = "StepNumberOutput"; - } - - /// - /// Initializes a new instance of the class. - /// - /// value (required). - /// Output name. (required). - /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. - /// Optional description for output.. - /// Path to the output artifact relative to where the function command is executed. (required). - /// A boolean to indicate if an artifact output is required. A False value makes the artifact optional. (default to true). - public StepNumberOutput - ( - string name, string path, double value, // Required parameters - Dictionary annotations= default, string description= default, bool required = true // Optional parameters - ) : base(name: name, annotations: annotations, description: description, path: path, required: required)// BaseClass - { - this.Value = value; - - // Set non-required readonly properties with defaultValue - this.Type = "StepNumberOutput"; - } - - //============================================== is ReadOnly - /// - /// Gets or Sets Type - /// - [DataMember(Name = "type", EmitDefaultValue = true)] - public string Type { get; protected internal set; } = "StepNumberOutput"; - - /// - /// Gets or Sets Value - /// - [DataMember(Name = "value", IsRequired = true, EmitDefaultValue = false)] - public double Value { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - return "StepNumberOutput"; - } - - /// - /// 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("StepNumberOutput:\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" Annotations: ").Append(Annotations).Append("\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" Path: ").Append(Path).Append("\n"); - sb.Append(" Required: ").Append(Required).Append("\n"); - sb.Append(" Value: ").Append(Value).Append("\n"); - return sb.ToString(); - } - - /// - /// Returns the object from JSON string - /// - /// StepNumberOutput object - public static StepNumberOutput 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. - /// - /// StepNumberOutput object - public virtual StepNumberOutput DuplicateStepNumberOutput() - { - return FromJson(this.ToJson()); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel Duplicate() - { - return DuplicateStepNumberOutput(); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override FunctionNumberOutput DuplicateFunctionNumberOutput() - { - return DuplicateStepNumberOutput(); - } - - /// - /// 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 StepNumberOutput); - } - - /// - /// Returns true if StepNumberOutput instances are equal - /// - /// Instance of StepNumberOutput to be compared - /// Boolean - public bool Equals(StepNumberOutput input) - { - if (input == null) - return false; - return base.Equals(input) && - ( - this.Value == input.Value || - (this.Value != null && - this.Value.Equals(input.Value)) - ) && 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.Value != null) - hashCode = hashCode * 59 + this.Value.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(@"^StepNumberOutput$", 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/StepPathInput.cs b/src/PollinationSDK/Model/StepPathInput.cs deleted file mode 100644 index cd188c088..000000000 --- a/src/PollinationSDK/Model/StepPathInput.cs +++ /dev/null @@ -1,306 +0,0 @@ -/* - * 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 file or a folder input. - /// - [DataContract(Name = "StepPathInput")] - public partial class StepPathInput : GenericInput, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected StepPathInput() - { - // Set non-required readonly properties with defaultValue - this.Type = "StepPathInput"; - } - - /// - /// Initializes a new instance of the class. - /// - /// The path to source the file from. (required). - /// The default source for file if the value is not provided.. - /// A list of aliases for this input in different platforms.. - /// A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. (default to false). - /// An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec.. - /// 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.. - /// Optional list of extensions for file. The check for extension is case-insensitive.. - /// Input name. (required). - /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. - /// Optional description for input.. - public StepPathInput - ( - string name, AnyOf source, // Required parameters - Dictionary annotations= default, string description= default, AnyOf _default= default, List> alias= default, bool required = false, Object spec= default, string path= default, List extensions= default // Optional parameters - ) : base(name: name, annotations: annotations, description: description)// BaseClass - { - // to ensure "source" is required (not null) - this.Source = source ?? throw new ArgumentNullException("source is a required property for StepPathInput and cannot be null"); - this.Default = _default; - this.Alias = alias; - this.Required = required; - this.Spec = spec; - this.Path = path; - this.Extensions = extensions; - - // Set non-required readonly properties with defaultValue - this.Type = "StepPathInput"; - } - - //============================================== is ReadOnly - /// - /// Gets or Sets Type - /// - [DataMember(Name = "type", EmitDefaultValue = true)] - public string Type { get; protected internal set; } = "StepPathInput"; - - /// - /// The path to source the file from. - /// - /// The path to source the file from. - [DataMember(Name = "source", IsRequired = true, EmitDefaultValue = false)] - public AnyOf Source { get; set; } - /// - /// The default source for file if the value is not provided. - /// - /// The default source for file if the value is not provided. - [DataMember(Name = "default", EmitDefaultValue = false)] - public AnyOf Default { get; set; } - /// - /// A list of aliases for this input in different platforms. - /// - /// A list of aliases for this input in different platforms. - [DataMember(Name = "alias", EmitDefaultValue = false)] - public List> Alias { get; set; } - /// - /// A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. - /// - /// A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. - [DataMember(Name = "required", EmitDefaultValue = true)] - public bool Required { get; set; } = false; - /// - /// An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec. - /// - /// An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec. - [DataMember(Name = "spec", EmitDefaultValue = false)] - public Object Spec { get; set; } - /// - /// 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. - /// - /// 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. - [DataMember(Name = "path", EmitDefaultValue = false)] - public string Path { get; set; } - /// - /// Optional list of extensions for file. The check for extension is case-insensitive. - /// - /// Optional list of extensions for file. The check for extension is case-insensitive. - [DataMember(Name = "extensions", EmitDefaultValue = false)] - public List Extensions { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - return "StepPathInput"; - } - - /// - /// 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("StepPathInput:\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" Annotations: ").Append(Annotations).Append("\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" Source: ").Append(Source).Append("\n"); - sb.Append(" Default: ").Append(Default).Append("\n"); - sb.Append(" Alias: ").Append(Alias).Append("\n"); - sb.Append(" Required: ").Append(Required).Append("\n"); - sb.Append(" Spec: ").Append(Spec).Append("\n"); - sb.Append(" Path: ").Append(Path).Append("\n"); - sb.Append(" Extensions: ").Append(Extensions).Append("\n"); - return sb.ToString(); - } - - /// - /// Returns the object from JSON string - /// - /// StepPathInput object - public static StepPathInput 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. - /// - /// StepPathInput object - public virtual StepPathInput DuplicateStepPathInput() - { - return FromJson(this.ToJson()); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel Duplicate() - { - return DuplicateStepPathInput(); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override GenericInput DuplicateGenericInput() - { - return DuplicateStepPathInput(); - } - - /// - /// 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 StepPathInput); - } - - /// - /// Returns true if StepPathInput instances are equal - /// - /// Instance of StepPathInput to be compared - /// Boolean - public bool Equals(StepPathInput input) - { - if (input == null) - return false; - return base.Equals(input) && - ( - this.Source == input.Source || - (this.Source != null && - this.Source.Equals(input.Source)) - ) && base.Equals(input) && - ( - this.Default == input.Default || - (this.Default != null && - this.Default.Equals(input.Default)) - ) && base.Equals(input) && - ( - this.Alias == input.Alias || - this.Alias != null && - input.Alias != null && - this.Alias.SequenceEqual(input.Alias) - ) && base.Equals(input) && - ( - this.Required == input.Required || - (this.Required != null && - this.Required.Equals(input.Required)) - ) && base.Equals(input) && - ( - this.Path == input.Path || - (this.Path != null && - this.Path.Equals(input.Path)) - ) && base.Equals(input) && - ( - this.Extensions == input.Extensions || - this.Extensions != null && - input.Extensions != null && - this.Extensions.SequenceEqual(input.Extensions) - ) && 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.Source != null) - hashCode = hashCode * 59 + this.Source.GetHashCode(); - if (this.Default != null) - hashCode = hashCode * 59 + this.Default.GetHashCode(); - if (this.Alias != null) - hashCode = hashCode * 59 + this.Alias.GetHashCode(); - if (this.Required != null) - hashCode = hashCode * 59 + this.Required.GetHashCode(); - if (this.Spec != null) - hashCode = hashCode * 59 + this.Spec.GetHashCode(); - if (this.Path != null) - hashCode = hashCode * 59 + this.Path.GetHashCode(); - if (this.Extensions != null) - hashCode = hashCode * 59 + this.Extensions.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(@"^StepPathInput$", 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/StepPathOutput.cs b/src/PollinationSDK/Model/StepPathOutput.cs deleted file mode 100644 index ad970a0ab..000000000 --- a/src/PollinationSDK/Model/StepPathOutput.cs +++ /dev/null @@ -1,217 +0,0 @@ -/* - * 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 file or a folder output. - /// - [DataContract(Name = "StepPathOutput")] - public partial class StepPathOutput : FunctionPathOutput, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected StepPathOutput() - { - // Set non-required readonly properties with defaultValue - this.Type = "StepPathOutput"; - } - - /// - /// Initializes a new instance of the class. - /// - /// The path to source the file from. (required). - /// Output name. (required). - /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. - /// Optional description for output.. - /// Path to the output artifact relative to where the function command is executed. (required). - /// A boolean to indicate if an artifact output is required. A False value makes the artifact optional. (default to true). - public StepPathOutput - ( - string name, string path, AnyOf source, // Required parameters - Dictionary annotations= default, string description= default, bool required = true // Optional parameters - ) : base(name: name, annotations: annotations, description: description, path: path, required: required)// BaseClass - { - // to ensure "source" is required (not null) - this.Source = source ?? throw new ArgumentNullException("source is a required property for StepPathOutput and cannot be null"); - - // Set non-required readonly properties with defaultValue - this.Type = "StepPathOutput"; - } - - //============================================== is ReadOnly - /// - /// Gets or Sets Type - /// - [DataMember(Name = "type", EmitDefaultValue = true)] - public string Type { get; protected internal set; } = "StepPathOutput"; - - /// - /// The path to source the file from. - /// - /// The path to source the file from. - [DataMember(Name = "source", IsRequired = true, EmitDefaultValue = false)] - public AnyOf Source { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - return "StepPathOutput"; - } - - /// - /// 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("StepPathOutput:\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" Annotations: ").Append(Annotations).Append("\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" Path: ").Append(Path).Append("\n"); - sb.Append(" Required: ").Append(Required).Append("\n"); - sb.Append(" Source: ").Append(Source).Append("\n"); - return sb.ToString(); - } - - /// - /// Returns the object from JSON string - /// - /// StepPathOutput object - public static StepPathOutput 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. - /// - /// StepPathOutput object - public virtual StepPathOutput DuplicateStepPathOutput() - { - return FromJson(this.ToJson()); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel Duplicate() - { - return DuplicateStepPathOutput(); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override FunctionPathOutput DuplicateFunctionPathOutput() - { - return DuplicateStepPathOutput(); - } - - /// - /// 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 StepPathOutput); - } - - /// - /// Returns true if StepPathOutput instances are equal - /// - /// Instance of StepPathOutput to be compared - /// Boolean - public bool Equals(StepPathOutput input) - { - if (input == null) - return false; - return base.Equals(input) && - ( - this.Source == input.Source || - (this.Source != null && - this.Source.Equals(input.Source)) - ) && 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.Source != null) - hashCode = hashCode * 59 + this.Source.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(@"^StepPathOutput$", 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/StepStatus.cs b/src/PollinationSDK/Model/StepStatus.cs deleted file mode 100644 index 293260df7..000000000 --- a/src/PollinationSDK/Model/StepStatus.cs +++ /dev/null @@ -1,458 +0,0 @@ -/* - * 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 Status of a Job Step - /// - [DataContract(Name = "StepStatus")] - public partial class StepStatus : OpenAPIGenBaseModel, IEquatable, IValidatableObject - { - /// - /// The type of step this status is for. Can be \"Function\", \"DAG\" or \"Loop\" - /// - /// The type of step this status is for. Can be \"Function\", \"DAG\" or \"Loop\" - [DataMember(Name="status_type", EmitDefaultValue=false)] - public StatusType StatusType { get; set; } - /// - /// The status of this step. - /// - /// The status of this step. - [DataMember(Name="status", EmitDefaultValue=false)] - public StepStatusEnum Status { get; set; } = StepStatusEnum.Unknown; - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected StepStatus() - { - // Set non-required readonly properties with defaultValue - this.Type = "StepStatus"; - } - - /// - /// Initializes a new instance of the class. - /// - /// The inputs used by this step. (required). - /// The outputs produced by this step. (required). - /// The time at which the task was started (required). - /// The step unique ID (required). - /// 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. (required). - /// The type of step this status is for. Can be \"Function\", \"DAG\" or \"Loop\" (required). - /// The name of the template that spawned this step (required). - /// A list of child step IDs (required). - /// 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. (required). - /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. - /// Any message produced by the task. Usually error/debugging hints.. - /// The time at which the task was completed. - /// Source url for the status object. It can be a recipe or a function.. - /// The status of this step.. - /// The command used to run this step. Only applies to Function steps.. - /// 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.. - public StepStatus - ( - List> inputs, List> outputs, DateTime startedAt, string id, string name, StatusType statusType, string templateRef, List childrenIds, List outboundSteps, // Required parameters - Dictionary annotations= default, string message= default, DateTime finishedAt= default, string source= default, StepStatusEnum status= StepStatusEnum.Unknown, string command= default, string boundaryId= default // Optional parameters - ) : base()// BaseClass - { - // to ensure "inputs" is required (not null) - this.Inputs = inputs ?? throw new ArgumentNullException("inputs is a required property for StepStatus and cannot be null"); - // to ensure "outputs" is required (not null) - this.Outputs = outputs ?? throw new ArgumentNullException("outputs is a required property for StepStatus and cannot be null"); - this.StartedAt = startedAt; - // to ensure "id" is required (not null) - this.Id = id ?? throw new ArgumentNullException("id is a required property for StepStatus and cannot be null"); - // to ensure "name" is required (not null) - this.Name = name ?? throw new ArgumentNullException("name is a required property for StepStatus and cannot be null"); - this.StatusType = statusType; - // to ensure "templateRef" is required (not null) - this.TemplateRef = templateRef ?? throw new ArgumentNullException("templateRef is a required property for StepStatus and cannot be null"); - // to ensure "childrenIds" is required (not null) - this.ChildrenIds = childrenIds ?? throw new ArgumentNullException("childrenIds is a required property for StepStatus and cannot be null"); - // to ensure "outboundSteps" is required (not null) - this.OutboundSteps = outboundSteps ?? throw new ArgumentNullException("outboundSteps is a required property for StepStatus and cannot be null"); - this.Annotations = annotations; - this.Message = message; - this.FinishedAt = finishedAt; - this.Source = source; - this.Status = status; - this.Command = command; - this.BoundaryId = boundaryId; - - // Set non-required readonly properties with defaultValue - this.Type = "StepStatus"; - } - - //============================================== is ReadOnly - /// - /// Gets or Sets Type - /// - [DataMember(Name = "type", EmitDefaultValue = true)] - public string Type { get; protected internal set; } = "StepStatus"; - - /// - /// The inputs used by this step. - /// - /// The inputs used by this step. - [DataMember(Name = "inputs", IsRequired = true, EmitDefaultValue = false)] - public List> Inputs { get; set; } - /// - /// The outputs produced by this step. - /// - /// The outputs produced by this step. - [DataMember(Name = "outputs", IsRequired = true, EmitDefaultValue = false)] - public List> Outputs { get; set; } - /// - /// The time at which the task was started - /// - /// The time at which the task was started - [DataMember(Name = "started_at", IsRequired = true, EmitDefaultValue = false)] - public DateTime StartedAt { get; set; } - /// - /// The step unique ID - /// - /// The step unique ID - [DataMember(Name = "id", IsRequired = true, EmitDefaultValue = false)] - public string Id { get; set; } - /// - /// 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. - /// - /// 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. - [DataMember(Name = "name", IsRequired = true, EmitDefaultValue = false)] - public string Name { get; set; } - /// - /// The name of the template that spawned this step - /// - /// The name of the template that spawned this step - [DataMember(Name = "template_ref", IsRequired = true, EmitDefaultValue = false)] - public string TemplateRef { get; set; } - /// - /// A list of child step IDs - /// - /// A list of child step IDs - [DataMember(Name = "children_ids", IsRequired = true, EmitDefaultValue = false)] - public List ChildrenIds { get; set; } - /// - /// 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. - /// - /// 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. - [DataMember(Name = "outbound_steps", IsRequired = true, EmitDefaultValue = false)] - public List OutboundSteps { 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; } - /// - /// Any message produced by the task. Usually error/debugging hints. - /// - /// Any message produced by the task. Usually error/debugging hints. - [DataMember(Name = "message", EmitDefaultValue = false)] - public string Message { get; set; } - /// - /// The time at which the task was completed - /// - /// The time at which the task was completed - [DataMember(Name = "finished_at", EmitDefaultValue = false)] - public DateTime FinishedAt { get; set; } - /// - /// Source url for the status object. It can be a recipe or a function. - /// - /// Source url for the status object. It can be a recipe or a function. - [DataMember(Name = "source", EmitDefaultValue = false)] - public string Source { get; set; } - /// - /// The command used to run this step. Only applies to Function steps. - /// - /// The command used to run this step. Only applies to Function steps. - [DataMember(Name = "command", EmitDefaultValue = false)] - public string Command { get; set; } - /// - /// 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. - /// - /// 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. - [DataMember(Name = "boundary_id", EmitDefaultValue = false)] - public string BoundaryId { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - return "StepStatus"; - } - - /// - /// 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("StepStatus:\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" Inputs: ").Append(Inputs).Append("\n"); - sb.Append(" Outputs: ").Append(Outputs).Append("\n"); - sb.Append(" StartedAt: ").Append(StartedAt).Append("\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" StatusType: ").Append(StatusType).Append("\n"); - sb.Append(" TemplateRef: ").Append(TemplateRef).Append("\n"); - sb.Append(" ChildrenIds: ").Append(ChildrenIds).Append("\n"); - sb.Append(" OutboundSteps: ").Append(OutboundSteps).Append("\n"); - sb.Append(" Annotations: ").Append(Annotations).Append("\n"); - sb.Append(" Message: ").Append(Message).Append("\n"); - sb.Append(" FinishedAt: ").Append(FinishedAt).Append("\n"); - sb.Append(" Source: ").Append(Source).Append("\n"); - sb.Append(" Status: ").Append(Status).Append("\n"); - sb.Append(" Command: ").Append(Command).Append("\n"); - sb.Append(" BoundaryId: ").Append(BoundaryId).Append("\n"); - return sb.ToString(); - } - - /// - /// Returns the object from JSON string - /// - /// StepStatus object - public static StepStatus 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. - /// - /// StepStatus object - public virtual StepStatus DuplicateStepStatus() - { - return FromJson(this.ToJson()); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel Duplicate() - { - return DuplicateStepStatus(); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel DuplicateOpenAPIGenBaseModel() - { - return DuplicateStepStatus(); - } - - /// - /// 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 StepStatus); - } - - /// - /// Returns true if StepStatus instances are equal - /// - /// Instance of StepStatus to be compared - /// Boolean - public bool Equals(StepStatus input) - { - if (input == null) - return false; - return 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.StartedAt == input.StartedAt || - (this.StartedAt != null && - this.StartedAt.Equals(input.StartedAt)) - ) && 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.StatusType == input.StatusType || - (this.StatusType != null && - this.StatusType.Equals(input.StatusType)) - ) && base.Equals(input) && - ( - this.TemplateRef == input.TemplateRef || - (this.TemplateRef != null && - this.TemplateRef.Equals(input.TemplateRef)) - ) && base.Equals(input) && - ( - this.ChildrenIds == input.ChildrenIds || - this.ChildrenIds != null && - input.ChildrenIds != null && - this.ChildrenIds.SequenceEqual(input.ChildrenIds) - ) && base.Equals(input) && - ( - this.OutboundSteps == input.OutboundSteps || - this.OutboundSteps != null && - input.OutboundSteps != null && - this.OutboundSteps.SequenceEqual(input.OutboundSteps) - ) && base.Equals(input) && - ( - this.Annotations == input.Annotations || - this.Annotations != null && - input.Annotations != null && - this.Annotations.SequenceEqual(input.Annotations) - ) && base.Equals(input) && - ( - this.Message == input.Message || - (this.Message != null && - this.Message.Equals(input.Message)) - ) && base.Equals(input) && - ( - this.FinishedAt == input.FinishedAt || - (this.FinishedAt != null && - this.FinishedAt.Equals(input.FinishedAt)) - ) && base.Equals(input) && - ( - this.Source == input.Source || - (this.Source != null && - this.Source.Equals(input.Source)) - ) && base.Equals(input) && - ( - this.Status == input.Status || - (this.Status != null && - this.Status.Equals(input.Status)) - ) && base.Equals(input) && - ( - this.Command == input.Command || - (this.Command != null && - this.Command.Equals(input.Command)) - ) && base.Equals(input) && - ( - this.BoundaryId == input.BoundaryId || - (this.BoundaryId != null && - this.BoundaryId.Equals(input.BoundaryId)) - ) && 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.Inputs != null) - hashCode = hashCode * 59 + this.Inputs.GetHashCode(); - if (this.Outputs != null) - hashCode = hashCode * 59 + this.Outputs.GetHashCode(); - if (this.StartedAt != null) - hashCode = hashCode * 59 + this.StartedAt.GetHashCode(); - if (this.Id != null) - hashCode = hashCode * 59 + this.Id.GetHashCode(); - if (this.Name != null) - hashCode = hashCode * 59 + this.Name.GetHashCode(); - if (this.StatusType != null) - hashCode = hashCode * 59 + this.StatusType.GetHashCode(); - if (this.TemplateRef != null) - hashCode = hashCode * 59 + this.TemplateRef.GetHashCode(); - if (this.ChildrenIds != null) - hashCode = hashCode * 59 + this.ChildrenIds.GetHashCode(); - if (this.OutboundSteps != null) - hashCode = hashCode * 59 + this.OutboundSteps.GetHashCode(); - if (this.Annotations != null) - hashCode = hashCode * 59 + this.Annotations.GetHashCode(); - if (this.Message != null) - hashCode = hashCode * 59 + this.Message.GetHashCode(); - if (this.FinishedAt != null) - hashCode = hashCode * 59 + this.FinishedAt.GetHashCode(); - if (this.Source != null) - hashCode = hashCode * 59 + this.Source.GetHashCode(); - if (this.Status != null) - hashCode = hashCode * 59 + this.Status.GetHashCode(); - if (this.Command != null) - hashCode = hashCode * 59 + this.Command.GetHashCode(); - if (this.BoundaryId != null) - hashCode = hashCode * 59 + this.BoundaryId.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(@"^StepStatus$", 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/StepStatusEnum.cs b/src/PollinationSDK/Model/StepStatusEnum.cs deleted file mode 100644 index 0045365be..000000000 --- a/src/PollinationSDK/Model/StepStatusEnum.cs +++ /dev/null @@ -1,73 +0,0 @@ -/* - * 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 -{ - /// - /// Enumaration of allowable status strings - /// - /// Enumaration of allowable status strings - - [JsonConverter(typeof(StringEnumConverter))] - - public enum StepStatusEnum - { - /// - /// Enum Scheduled for value: Scheduled - /// - [EnumMember(Value = "Scheduled")] - Scheduled = 1, - - /// - /// Enum Running for value: Running - /// - [EnumMember(Value = "Running")] - Running = 2, - - /// - /// Enum Failed for value: Failed - /// - [EnumMember(Value = "Failed")] - Failed = 3, - - /// - /// Enum Succeeded for value: Succeeded - /// - [EnumMember(Value = "Succeeded")] - Succeeded = 4, - - /// - /// Enum Skipped for value: Skipped - /// - [EnumMember(Value = "Skipped")] - Skipped = 5, - - /// - /// Enum Unknown for value: Unknown - /// - [EnumMember(Value = "Unknown")] - Unknown = 6 - - } - -} diff --git a/src/PollinationSDK/Model/StepStringInput.cs b/src/PollinationSDK/Model/StepStringInput.cs deleted file mode 100644 index bc580f3e2..000000000 --- a/src/PollinationSDK/Model/StepStringInput.cs +++ /dev/null @@ -1,220 +0,0 @@ -/* - * 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 String input. - /// - [DataContract(Name = "StepStringInput")] - public partial class StepStringInput : FunctionStringInput, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected StepStringInput() - { - // Set non-required readonly properties with defaultValue - this.Type = "StepStringInput"; - } - - /// - /// Initializes a new instance of the class. - /// - /// value (required). - /// Input name. (required). - /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. - /// Optional description for input.. - /// Default value for generic input.. - /// A list of aliases for this input in different platforms.. - /// A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. (default to false). - /// An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec.. - public StepStringInput - ( - string name, string value, // Required parameters - Dictionary annotations= default, string description= default, string _default= default, List> alias= default, bool required = false, Object spec= default // Optional parameters - ) : base(name: name, annotations: annotations, description: description, _default: _default, alias: alias, required: required, spec: spec)// BaseClass - { - // to ensure "value" is required (not null) - this.Value = value ?? throw new ArgumentNullException("value is a required property for StepStringInput and cannot be null"); - - // Set non-required readonly properties with defaultValue - this.Type = "StepStringInput"; - } - - //============================================== is ReadOnly - /// - /// Gets or Sets Type - /// - [DataMember(Name = "type", EmitDefaultValue = true)] - public string Type { get; protected internal set; } = "StepStringInput"; - - /// - /// Gets or Sets Value - /// - [DataMember(Name = "value", IsRequired = true, EmitDefaultValue = false)] - public string Value { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - return "StepStringInput"; - } - - /// - /// 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("StepStringInput:\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" Annotations: ").Append(Annotations).Append("\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" Default: ").Append(Default).Append("\n"); - sb.Append(" Alias: ").Append(Alias).Append("\n"); - sb.Append(" Required: ").Append(Required).Append("\n"); - sb.Append(" Spec: ").Append(Spec).Append("\n"); - sb.Append(" Value: ").Append(Value).Append("\n"); - return sb.ToString(); - } - - /// - /// Returns the object from JSON string - /// - /// StepStringInput object - public static StepStringInput 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. - /// - /// StepStringInput object - public virtual StepStringInput DuplicateStepStringInput() - { - return FromJson(this.ToJson()); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel Duplicate() - { - return DuplicateStepStringInput(); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override FunctionStringInput DuplicateFunctionStringInput() - { - return DuplicateStepStringInput(); - } - - /// - /// 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 StepStringInput); - } - - /// - /// Returns true if StepStringInput instances are equal - /// - /// Instance of StepStringInput to be compared - /// Boolean - public bool Equals(StepStringInput input) - { - if (input == null) - return false; - return base.Equals(input) && - ( - this.Value == input.Value || - (this.Value != null && - this.Value.Equals(input.Value)) - ) && 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.Value != null) - hashCode = hashCode * 59 + this.Value.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(@"^StepStringInput$", 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/StepStringOutput.cs b/src/PollinationSDK/Model/StepStringOutput.cs deleted file mode 100644 index 55adb9561..000000000 --- a/src/PollinationSDK/Model/StepStringOutput.cs +++ /dev/null @@ -1,216 +0,0 @@ -/* - * 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 String output. - /// - [DataContract(Name = "StepStringOutput")] - public partial class StepStringOutput : FunctionStringOutput, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected StepStringOutput() - { - // Set non-required readonly properties with defaultValue - this.Type = "StepStringOutput"; - } - - /// - /// Initializes a new instance of the class. - /// - /// value (required). - /// Output name. (required). - /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. - /// Optional description for output.. - /// Path to the output artifact relative to where the function command is executed. (required). - /// A boolean to indicate if an artifact output is required. A False value makes the artifact optional. (default to true). - public StepStringOutput - ( - string name, string path, string value, // Required parameters - Dictionary annotations= default, string description= default, bool required = true // Optional parameters - ) : base(name: name, annotations: annotations, description: description, path: path, required: required)// BaseClass - { - // to ensure "value" is required (not null) - this.Value = value ?? throw new ArgumentNullException("value is a required property for StepStringOutput and cannot be null"); - - // Set non-required readonly properties with defaultValue - this.Type = "StepStringOutput"; - } - - //============================================== is ReadOnly - /// - /// Gets or Sets Type - /// - [DataMember(Name = "type", EmitDefaultValue = true)] - public string Type { get; protected internal set; } = "StepStringOutput"; - - /// - /// Gets or Sets Value - /// - [DataMember(Name = "value", IsRequired = true, EmitDefaultValue = false)] - public string Value { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - return "StepStringOutput"; - } - - /// - /// 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("StepStringOutput:\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" Annotations: ").Append(Annotations).Append("\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" Path: ").Append(Path).Append("\n"); - sb.Append(" Required: ").Append(Required).Append("\n"); - sb.Append(" Value: ").Append(Value).Append("\n"); - return sb.ToString(); - } - - /// - /// Returns the object from JSON string - /// - /// StepStringOutput object - public static StepStringOutput 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. - /// - /// StepStringOutput object - public virtual StepStringOutput DuplicateStepStringOutput() - { - return FromJson(this.ToJson()); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel Duplicate() - { - return DuplicateStepStringOutput(); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override FunctionStringOutput DuplicateFunctionStringOutput() - { - return DuplicateStepStringOutput(); - } - - /// - /// 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 StepStringOutput); - } - - /// - /// Returns true if StepStringOutput instances are equal - /// - /// Instance of StepStringOutput to be compared - /// Boolean - public bool Equals(StepStringOutput input) - { - if (input == null) - return false; - return base.Equals(input) && - ( - this.Value == input.Value || - (this.Value != null && - this.Value.Equals(input.Value)) - ) && 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.Value != null) - hashCode = hashCode * 59 + this.Value.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(@"^StepStringOutput$", 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/SubjectType.cs b/src/PollinationSDK/Model/SubjectType.cs deleted file mode 100644 index 83302d7b4..000000000 --- a/src/PollinationSDK/Model/SubjectType.cs +++ /dev/null @@ -1,49 +0,0 @@ -/* - * 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 SubjectType - { - /// - /// Enum User for value: user - /// - [EnumMember(Value = "user")] - User = 1, - - /// - /// Enum Team for value: team - /// - [EnumMember(Value = "team")] - Team = 2 - - } - -} diff --git a/src/PollinationSDK/Model/TaskArgument.cs b/src/PollinationSDK/Model/TaskArgument.cs deleted file mode 100644 index ecc33b50e..000000000 --- a/src/PollinationSDK/Model/TaskArgument.cs +++ /dev/null @@ -1,241 +0,0 @@ -/* - * 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 -{ - /// - /// Task argument for receiving inputs that are not files or folders. - /// - [DataContract(Name = "TaskArgument")] - public partial class TaskArgument : OpenAPIGenBaseModel, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected TaskArgument() - { - // Set non-required readonly properties with defaultValue - this.Type = "TaskArgument"; - } - - /// - /// Initializes a new instance of the class. - /// - /// Argument name. The name must match one of the input names from Task's template which can be a function or DAG. (required). - /// 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. (required). - /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. - public TaskArgument - ( - string name, AnyOf from, // Required parameters - Dictionary annotations= default// Optional parameters - ) : base()// BaseClass - { - // to ensure "name" is required (not null) - this.Name = name ?? throw new ArgumentNullException("name is a required property for TaskArgument and cannot be null"); - // to ensure "from" is required (not null) - this.From = from ?? throw new ArgumentNullException("from is a required property for TaskArgument and cannot be null"); - this.Annotations = annotations; - - // Set non-required readonly properties with defaultValue - this.Type = "TaskArgument"; - } - - //============================================== is ReadOnly - /// - /// Gets or Sets Type - /// - [DataMember(Name = "type", EmitDefaultValue = true)] - public string Type { get; protected internal set; } = "TaskArgument"; - - /// - /// Argument name. The name must match one of the input names from Task's template which can be a function or DAG. - /// - /// Argument name. The name must match one of the input names from Task's template which can be a function or DAG. - [DataMember(Name = "name", IsRequired = true, EmitDefaultValue = false)] - public string Name { get; set; } - /// - /// 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. - /// - /// 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. - [DataMember(Name = "from", IsRequired = true, EmitDefaultValue = false)] - public AnyOf From { 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; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - return "TaskArgument"; - } - - /// - /// 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("TaskArgument:\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" From: ").Append(From).Append("\n"); - sb.Append(" Annotations: ").Append(Annotations).Append("\n"); - return sb.ToString(); - } - - /// - /// Returns the object from JSON string - /// - /// TaskArgument object - public static TaskArgument 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. - /// - /// TaskArgument object - public virtual TaskArgument DuplicateTaskArgument() - { - return FromJson(this.ToJson()); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel Duplicate() - { - return DuplicateTaskArgument(); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel DuplicateOpenAPIGenBaseModel() - { - return DuplicateTaskArgument(); - } - - /// - /// 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 TaskArgument); - } - - /// - /// Returns true if TaskArgument instances are equal - /// - /// Instance of TaskArgument to be compared - /// Boolean - public bool Equals(TaskArgument 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.From == input.From || - (this.From != null && - this.From.Equals(input.From)) - ) && base.Equals(input) && - ( - this.Type == input.Type || - (this.Type != null && - this.Type.Equals(input.Type)) - ) && base.Equals(input) && - ( - this.Annotations == input.Annotations || - this.Annotations != null && - input.Annotations != null && - this.Annotations.SequenceEqual(input.Annotations) - ); - } - - /// - /// 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.From != null) - hashCode = hashCode * 59 + this.From.GetHashCode(); - if (this.Type != null) - hashCode = hashCode * 59 + this.Type.GetHashCode(); - if (this.Annotations != null) - hashCode = hashCode * 59 + this.Annotations.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(@"^TaskArgument$", 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/TaskFileReference.cs b/src/PollinationSDK/Model/TaskFileReference.cs deleted file mode 100644 index b034b992e..000000000 --- a/src/PollinationSDK/Model/TaskFileReference.cs +++ /dev/null @@ -1,196 +0,0 @@ -/* - * 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 reference to a file that is generated in a task. - /// - [DataContract(Name = "TaskFileReference")] - public partial class TaskFileReference : TaskReferenceBase, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected TaskFileReference() - { - // Set non-required readonly properties with defaultValue - this.Type = "TaskFileReference"; - } - - /// - /// Initializes a new instance of the class. - /// - /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. - /// The name of the task to pull output data from. (required). - /// The name of the variable. (required). - public TaskFileReference - ( - string name, string variable, // Required parameters - Dictionary annotations= default // Optional parameters - ) : base(annotations: annotations, name: name, variable: variable)// BaseClass - { - - // Set non-required readonly properties with defaultValue - this.Type = "TaskFileReference"; - } - - //============================================== is ReadOnly - /// - /// Gets or Sets Type - /// - [DataMember(Name = "type", EmitDefaultValue = true)] - public string Type { get; protected internal set; } = "TaskFileReference"; - - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - return "TaskFileReference"; - } - - /// - /// 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("TaskFileReference:\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" Annotations: ").Append(Annotations).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" Variable: ").Append(Variable).Append("\n"); - return sb.ToString(); - } - - /// - /// Returns the object from JSON string - /// - /// TaskFileReference object - public static TaskFileReference 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. - /// - /// TaskFileReference object - public virtual TaskFileReference DuplicateTaskFileReference() - { - return FromJson(this.ToJson()); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel Duplicate() - { - return DuplicateTaskFileReference(); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override TaskReferenceBase DuplicateTaskReferenceBase() - { - return DuplicateTaskFileReference(); - } - - /// - /// 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 TaskFileReference); - } - - /// - /// Returns true if TaskFileReference instances are equal - /// - /// Instance of TaskFileReference to be compared - /// Boolean - public bool Equals(TaskFileReference 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(@"^TaskFileReference$", 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/TaskFolderReference.cs b/src/PollinationSDK/Model/TaskFolderReference.cs deleted file mode 100644 index c4ba6cf26..000000000 --- a/src/PollinationSDK/Model/TaskFolderReference.cs +++ /dev/null @@ -1,196 +0,0 @@ -/* - * 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 reference to a folder that is generated in a task. - /// - [DataContract(Name = "TaskFolderReference")] - public partial class TaskFolderReference : TaskReferenceBase, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected TaskFolderReference() - { - // Set non-required readonly properties with defaultValue - this.Type = "TaskFolderReference"; - } - - /// - /// Initializes a new instance of the class. - /// - /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. - /// The name of the task to pull output data from. (required). - /// The name of the variable. (required). - public TaskFolderReference - ( - string name, string variable, // Required parameters - Dictionary annotations= default // Optional parameters - ) : base(annotations: annotations, name: name, variable: variable)// BaseClass - { - - // Set non-required readonly properties with defaultValue - this.Type = "TaskFolderReference"; - } - - //============================================== is ReadOnly - /// - /// Gets or Sets Type - /// - [DataMember(Name = "type", EmitDefaultValue = true)] - public string Type { get; protected internal set; } = "TaskFolderReference"; - - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - return "TaskFolderReference"; - } - - /// - /// 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("TaskFolderReference:\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" Annotations: ").Append(Annotations).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" Variable: ").Append(Variable).Append("\n"); - return sb.ToString(); - } - - /// - /// Returns the object from JSON string - /// - /// TaskFolderReference object - public static TaskFolderReference 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. - /// - /// TaskFolderReference object - public virtual TaskFolderReference DuplicateTaskFolderReference() - { - return FromJson(this.ToJson()); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel Duplicate() - { - return DuplicateTaskFolderReference(); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override TaskReferenceBase DuplicateTaskReferenceBase() - { - return DuplicateTaskFolderReference(); - } - - /// - /// 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 TaskFolderReference); - } - - /// - /// Returns true if TaskFolderReference instances are equal - /// - /// Instance of TaskFolderReference to be compared - /// Boolean - public bool Equals(TaskFolderReference 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(@"^TaskFolderReference$", 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/TaskPathArgument.cs b/src/PollinationSDK/Model/TaskPathArgument.cs deleted file mode 100644 index 52b62e1ce..000000000 --- a/src/PollinationSDK/Model/TaskPathArgument.cs +++ /dev/null @@ -1,257 +0,0 @@ -/* - * 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 -{ - /// - /// BaseModel with functionality to return the object as a yaml string. - /// - [DataContract(Name = "TaskPathArgument")] - public partial class TaskPathArgument : OpenAPIGenBaseModel, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected TaskPathArgument() - { - // Set non-required readonly properties with defaultValue - this.Type = "TaskPathArgument"; - } - - /// - /// Initializes a new instance of the class. - /// - /// Argument name. The name must match one of the input names from Task's template which can be a function or DAG. (required). - /// 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. (required). - /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. - /// 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.. - public TaskPathArgument - ( - string name, AnyOf from, // Required parameters - Dictionary annotations= default, string subPath= default// Optional parameters - ) : base()// BaseClass - { - // to ensure "name" is required (not null) - this.Name = name ?? throw new ArgumentNullException("name is a required property for TaskPathArgument and cannot be null"); - // to ensure "from" is required (not null) - this.From = from ?? throw new ArgumentNullException("from is a required property for TaskPathArgument and cannot be null"); - this.Annotations = annotations; - this.SubPath = subPath; - - // Set non-required readonly properties with defaultValue - this.Type = "TaskPathArgument"; - } - - //============================================== is ReadOnly - /// - /// Gets or Sets Type - /// - [DataMember(Name = "type", EmitDefaultValue = true)] - public string Type { get; protected internal set; } = "TaskPathArgument"; - - /// - /// Argument name. The name must match one of the input names from Task's template which can be a function or DAG. - /// - /// Argument name. The name must match one of the input names from Task's template which can be a function or DAG. - [DataMember(Name = "name", IsRequired = true, EmitDefaultValue = false)] - public string Name { get; set; } - /// - /// 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. - /// - /// 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. - [DataMember(Name = "from", IsRequired = true, EmitDefaultValue = false)] - public AnyOf From { 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; } - /// - /// 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. - /// - /// 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. - [DataMember(Name = "sub_path", EmitDefaultValue = false)] - public string SubPath { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - return "TaskPathArgument"; - } - - /// - /// 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("TaskPathArgument:\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" From: ").Append(From).Append("\n"); - sb.Append(" Annotations: ").Append(Annotations).Append("\n"); - sb.Append(" SubPath: ").Append(SubPath).Append("\n"); - return sb.ToString(); - } - - /// - /// Returns the object from JSON string - /// - /// TaskPathArgument object - public static TaskPathArgument 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. - /// - /// TaskPathArgument object - public virtual TaskPathArgument DuplicateTaskPathArgument() - { - return FromJson(this.ToJson()); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel Duplicate() - { - return DuplicateTaskPathArgument(); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel DuplicateOpenAPIGenBaseModel() - { - return DuplicateTaskPathArgument(); - } - - /// - /// 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 TaskPathArgument); - } - - /// - /// Returns true if TaskPathArgument instances are equal - /// - /// Instance of TaskPathArgument to be compared - /// Boolean - public bool Equals(TaskPathArgument 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.From == input.From || - (this.From != null && - this.From.Equals(input.From)) - ) && base.Equals(input) && - ( - this.Type == input.Type || - (this.Type != null && - this.Type.Equals(input.Type)) - ) && base.Equals(input) && - ( - this.Annotations == input.Annotations || - this.Annotations != null && - input.Annotations != null && - this.Annotations.SequenceEqual(input.Annotations) - ) && base.Equals(input) && - ( - this.SubPath == input.SubPath || - (this.SubPath != null && - this.SubPath.Equals(input.SubPath)) - ); - } - - /// - /// 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.From != null) - hashCode = hashCode * 59 + this.From.GetHashCode(); - if (this.Type != null) - hashCode = hashCode * 59 + this.Type.GetHashCode(); - if (this.Annotations != null) - hashCode = hashCode * 59 + this.Annotations.GetHashCode(); - if (this.SubPath != null) - hashCode = hashCode * 59 + this.SubPath.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(@"^TaskPathArgument$", 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/TaskPathReference.cs b/src/PollinationSDK/Model/TaskPathReference.cs deleted file mode 100644 index 57ddc18ef..000000000 --- a/src/PollinationSDK/Model/TaskPathReference.cs +++ /dev/null @@ -1,196 +0,0 @@ -/* - * 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 reference to a file or folder that is generated in a task. - /// - [DataContract(Name = "TaskPathReference")] - public partial class TaskPathReference : TaskReferenceBase, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected TaskPathReference() - { - // Set non-required readonly properties with defaultValue - this.Type = "TaskPathReference"; - } - - /// - /// Initializes a new instance of the class. - /// - /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. - /// The name of the task to pull output data from. (required). - /// The name of the variable. (required). - public TaskPathReference - ( - string name, string variable, // Required parameters - Dictionary annotations= default // Optional parameters - ) : base(annotations: annotations, name: name, variable: variable)// BaseClass - { - - // Set non-required readonly properties with defaultValue - this.Type = "TaskPathReference"; - } - - //============================================== is ReadOnly - /// - /// Gets or Sets Type - /// - [DataMember(Name = "type", EmitDefaultValue = true)] - public string Type { get; protected internal set; } = "TaskPathReference"; - - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - return "TaskPathReference"; - } - - /// - /// 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("TaskPathReference:\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" Annotations: ").Append(Annotations).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" Variable: ").Append(Variable).Append("\n"); - return sb.ToString(); - } - - /// - /// Returns the object from JSON string - /// - /// TaskPathReference object - public static TaskPathReference 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. - /// - /// TaskPathReference object - public virtual TaskPathReference DuplicateTaskPathReference() - { - return FromJson(this.ToJson()); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel Duplicate() - { - return DuplicateTaskPathReference(); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override TaskReferenceBase DuplicateTaskReferenceBase() - { - return DuplicateTaskPathReference(); - } - - /// - /// 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 TaskPathReference); - } - - /// - /// Returns true if TaskPathReference instances are equal - /// - /// Instance of TaskPathReference to be compared - /// Boolean - public bool Equals(TaskPathReference 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(@"^TaskPathReference$", 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/TaskPathReturn.cs b/src/PollinationSDK/Model/TaskPathReturn.cs deleted file mode 100644 index c3a1af782..000000000 --- a/src/PollinationSDK/Model/TaskPathReturn.cs +++ /dev/null @@ -1,200 +0,0 @@ -/* - * 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 Task output that returns a file or a folder output from a function or a DAG. - /// - [DataContract(Name = "TaskPathReturn")] - public partial class TaskPathReturn : PathOutput, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected TaskPathReturn() - { - // Set non-required readonly properties with defaultValue - this.Type = "TaskPathReturn"; - } - - /// - /// Initializes a new instance of the class. - /// - /// Output name. (required). - /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. - /// Optional description for output.. - /// Path to the output artifact relative to where the function command is executed. (required). - /// A boolean to indicate if an artifact output is required. A False value makes the artifact optional. (default to true). - public TaskPathReturn - ( - string name, string path, // Required parameters - Dictionary annotations= default, string description= default, bool required = true // Optional parameters - ) : base(name: name, annotations: annotations, description: description, path: path, required: required)// BaseClass - { - - // Set non-required readonly properties with defaultValue - this.Type = "TaskPathReturn"; - } - - //============================================== is ReadOnly - /// - /// Gets or Sets Type - /// - [DataMember(Name = "type", EmitDefaultValue = true)] - public string Type { get; protected internal set; } = "TaskPathReturn"; - - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - return "TaskPathReturn"; - } - - /// - /// 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("TaskPathReturn:\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" Annotations: ").Append(Annotations).Append("\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" Path: ").Append(Path).Append("\n"); - sb.Append(" Required: ").Append(Required).Append("\n"); - return sb.ToString(); - } - - /// - /// Returns the object from JSON string - /// - /// TaskPathReturn object - public static TaskPathReturn 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. - /// - /// TaskPathReturn object - public virtual TaskPathReturn DuplicateTaskPathReturn() - { - return FromJson(this.ToJson()); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel Duplicate() - { - return DuplicateTaskPathReturn(); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override PathOutput DuplicatePathOutput() - { - return DuplicateTaskPathReturn(); - } - - /// - /// 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 TaskPathReturn); - } - - /// - /// Returns true if TaskPathReturn instances are equal - /// - /// Instance of TaskPathReturn to be compared - /// Boolean - public bool Equals(TaskPathReturn 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(@"^TaskPathReturn$", 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/TaskReference.cs b/src/PollinationSDK/Model/TaskReference.cs deleted file mode 100644 index 46e68455b..000000000 --- a/src/PollinationSDK/Model/TaskReference.cs +++ /dev/null @@ -1,196 +0,0 @@ -/* - * 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 Task reference for parameters other than files or folders. - /// - [DataContract(Name = "TaskReference")] - public partial class TaskReference : TaskReferenceBase, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected TaskReference() - { - // Set non-required readonly properties with defaultValue - this.Type = "TaskReference"; - } - - /// - /// Initializes a new instance of the class. - /// - /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. - /// The name of the task to pull output data from. (required). - /// The name of the variable. (required). - public TaskReference - ( - string name, string variable, // Required parameters - Dictionary annotations= default // Optional parameters - ) : base(annotations: annotations, name: name, variable: variable)// BaseClass - { - - // Set non-required readonly properties with defaultValue - this.Type = "TaskReference"; - } - - //============================================== is ReadOnly - /// - /// Gets or Sets Type - /// - [DataMember(Name = "type", EmitDefaultValue = true)] - public string Type { get; protected internal set; } = "TaskReference"; - - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - return "TaskReference"; - } - - /// - /// 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("TaskReference:\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" Annotations: ").Append(Annotations).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" Variable: ").Append(Variable).Append("\n"); - return sb.ToString(); - } - - /// - /// Returns the object from JSON string - /// - /// TaskReference object - public static TaskReference 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. - /// - /// TaskReference object - public virtual TaskReference DuplicateTaskReference() - { - return FromJson(this.ToJson()); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel Duplicate() - { - return DuplicateTaskReference(); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override TaskReferenceBase DuplicateTaskReferenceBase() - { - return DuplicateTaskReference(); - } - - /// - /// 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 TaskReference); - } - - /// - /// Returns true if TaskReference instances are equal - /// - /// Instance of TaskReference to be compared - /// Boolean - public bool Equals(TaskReference 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(@"^TaskReference$", 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/TaskReferenceBase.cs b/src/PollinationSDK/Model/TaskReferenceBase.cs deleted file mode 100644 index 50aeca5b7..000000000 --- a/src/PollinationSDK/Model/TaskReferenceBase.cs +++ /dev/null @@ -1,236 +0,0 @@ -/* - * 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 Task Reference - /// - [DataContract(Name = "_TaskReferenceBase")] - public partial class TaskReferenceBase : BaseReference, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected TaskReferenceBase() - { - // Set non-required readonly properties with defaultValue - this.Type = "_TaskReferenceBase"; - } - - /// - /// Initializes a new instance of the class. - /// - /// The name of the task to pull output data from. (required). - /// The name of the variable. (required). - /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. - public TaskReferenceBase - ( - string name, string variable, // Required parameters - Dictionary annotations= default // Optional parameters - ) : base(annotations: annotations)// BaseClass - { - // to ensure "name" is required (not null) - this.Name = name ?? throw new ArgumentNullException("name is a required property for TaskReferenceBase and cannot be null"); - // to ensure "variable" is required (not null) - this.Variable = variable ?? throw new ArgumentNullException("variable is a required property for TaskReferenceBase and cannot be null"); - - // Set non-required readonly properties with defaultValue - this.Type = "_TaskReferenceBase"; - } - - //============================================== is ReadOnly - /// - /// Gets or Sets Type - /// - [DataMember(Name = "type", EmitDefaultValue = true)] - public string Type { get; protected internal set; } = "_TaskReferenceBase"; - - /// - /// The name of the task to pull output data from. - /// - /// The name of the task to pull output data from. - [DataMember(Name = "name", IsRequired = true, EmitDefaultValue = false)] - public string Name { get; set; } - /// - /// The name of the variable. - /// - /// The name of the variable. - [DataMember(Name = "variable", IsRequired = true, EmitDefaultValue = false)] - public string Variable { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - return "TaskReferenceBase"; - } - - /// - /// 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("TaskReferenceBase:\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" Annotations: ").Append(Annotations).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" Variable: ").Append(Variable).Append("\n"); - return sb.ToString(); - } - - /// - /// Returns the object from JSON string - /// - /// TaskReferenceBase object - public static TaskReferenceBase 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. - /// - /// TaskReferenceBase object - public virtual TaskReferenceBase DuplicateTaskReferenceBase() - { - return FromJson(this.ToJson()); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel Duplicate() - { - return DuplicateTaskReferenceBase(); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override BaseReference DuplicateBaseReference() - { - return DuplicateTaskReferenceBase(); - } - - /// - /// 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 TaskReferenceBase); - } - - /// - /// Returns true if TaskReferenceBase instances are equal - /// - /// Instance of TaskReferenceBase to be compared - /// Boolean - public bool Equals(TaskReferenceBase 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.Variable == input.Variable || - (this.Variable != null && - this.Variable.Equals(input.Variable)) - ) && 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.Variable != null) - hashCode = hashCode * 59 + this.Variable.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(@"^_TaskReferenceBase$", 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/TaskReturn.cs b/src/PollinationSDK/Model/TaskReturn.cs deleted file mode 100644 index 970069ead..000000000 --- a/src/PollinationSDK/Model/TaskReturn.cs +++ /dev/null @@ -1,196 +0,0 @@ -/* - * 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 Task return output that exposes the values from a function or a DAG. - /// - [DataContract(Name = "TaskReturn")] - public partial class TaskReturn : GenericOutput, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected TaskReturn() - { - // Set non-required readonly properties with defaultValue - this.Type = "TaskReturn"; - } - - /// - /// Initializes a new instance of the class. - /// - /// Output name. (required). - /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. - /// Optional description for output.. - public TaskReturn - ( - string name, // Required parameters - Dictionary annotations= default, string description= default // Optional parameters - ) : base(name: name, annotations: annotations, description: description)// BaseClass - { - - // Set non-required readonly properties with defaultValue - this.Type = "TaskReturn"; - } - - //============================================== is ReadOnly - /// - /// Gets or Sets Type - /// - [DataMember(Name = "type", EmitDefaultValue = true)] - public string Type { get; protected internal set; } = "TaskReturn"; - - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - return "TaskReturn"; - } - - /// - /// 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("TaskReturn:\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" Annotations: ").Append(Annotations).Append("\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - return sb.ToString(); - } - - /// - /// Returns the object from JSON string - /// - /// TaskReturn object - public static TaskReturn 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. - /// - /// TaskReturn object - public virtual TaskReturn DuplicateTaskReturn() - { - return FromJson(this.ToJson()); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel Duplicate() - { - return DuplicateTaskReturn(); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override GenericOutput DuplicateGenericOutput() - { - return DuplicateTaskReturn(); - } - - /// - /// 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 TaskReturn); - } - - /// - /// Returns true if TaskReturn instances are equal - /// - /// Instance of TaskReturn to be compared - /// Boolean - public bool Equals(TaskReturn 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(@"^TaskReturn$", 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/Team.cs b/src/PollinationSDK/Model/Team.cs deleted file mode 100644 index 83ffdfda9..000000000 --- a/src/PollinationSDK/Model/Team.cs +++ /dev/null @@ -1,244 +0,0 @@ -/* - * 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 -{ - /// - /// Team - /// - [DataContract(Name = "Team")] - public partial class Team : TeamUpdate, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected Team() - { - // Set non-required readonly properties with defaultValue - this.Type = "Team"; - } - - /// - /// Initializes a new instance of the class. - /// - /// The team ID (required). - /// The public slug of the team (required). - /// The number of members that are part of this team (default to 0). - /// name (required). - /// description. - public Team - ( - string name, string id, string slug, // Required parameters - string description= default, int memberCount = 0 // Optional parameters - ) : base(name: name, description: description)// BaseClass - { - // to ensure "id" is required (not null) - this.Id = id ?? throw new ArgumentNullException("id is a required property for Team and cannot be null"); - // to ensure "slug" is required (not null) - this.Slug = slug ?? throw new ArgumentNullException("slug is a required property for Team and cannot be null"); - this.MemberCount = memberCount; - - // Set non-required readonly properties with defaultValue - this.Type = "Team"; - } - - //============================================== is ReadOnly - /// - /// Gets or Sets Type - /// - [DataMember(Name = "type", EmitDefaultValue = true)] - public string Type { get; protected internal set; } = "Team"; - - /// - /// The team ID - /// - /// The team ID - [DataMember(Name = "id", IsRequired = true, EmitDefaultValue = false)] - public string Id { get; set; } - /// - /// The public slug of the team - /// - /// The public slug of the team - [DataMember(Name = "slug", IsRequired = true, EmitDefaultValue = false)] - public string Slug { get; set; } - /// - /// The number of members that are part of this team - /// - /// The number of members that are part of this team - [DataMember(Name = "member_count", EmitDefaultValue = true)] - public int MemberCount { get; set; } = 0; - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - return "Team"; - } - - /// - /// 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("Team:\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" Slug: ").Append(Slug).Append("\n"); - sb.Append(" MemberCount: ").Append(MemberCount).Append("\n"); - return sb.ToString(); - } - - /// - /// Returns the object from JSON string - /// - /// Team object - public static Team 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. - /// - /// Team object - public virtual Team DuplicateTeam() - { - return FromJson(this.ToJson()); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel Duplicate() - { - return DuplicateTeam(); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override TeamUpdate DuplicateTeamUpdate() - { - return DuplicateTeam(); - } - - /// - /// 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 Team); - } - - /// - /// Returns true if Team instances are equal - /// - /// Instance of Team to be compared - /// Boolean - public bool Equals(Team 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.Slug == input.Slug || - (this.Slug != null && - this.Slug.Equals(input.Slug)) - ) && base.Equals(input) && - ( - this.MemberCount == input.MemberCount || - (this.MemberCount != null && - this.MemberCount.Equals(input.MemberCount)) - ) && 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.Slug != null) - hashCode = hashCode * 59 + this.Slug.GetHashCode(); - if (this.MemberCount != null) - hashCode = hashCode * 59 + this.MemberCount.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(@"^Team$", 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/TeamCreate.cs b/src/PollinationSDK/Model/TeamCreate.cs deleted file mode 100644 index d5077f574..000000000 --- a/src/PollinationSDK/Model/TeamCreate.cs +++ /dev/null @@ -1,231 +0,0 @@ -/* - * 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 -{ - /// - /// TeamCreate - /// - [DataContract(Name = "TeamCreate")] - public partial class TeamCreate : OpenAPIGenBaseModel, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected TeamCreate() - { - // Set non-required readonly properties with defaultValue - this.Type = "TeamCreate"; - } - - /// - /// Initializes a new instance of the class. - /// - /// name (required). - /// description. - public TeamCreate - ( - string name, // Required parameters - 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 TeamCreate and cannot be null"); - this.Description = description; - - // Set non-required readonly properties with defaultValue - this.Type = "TeamCreate"; - } - - //============================================== is ReadOnly - /// - /// Gets or Sets Type - /// - [DataMember(Name = "type", EmitDefaultValue = true)] - public string Type { get; protected internal set; } = "TeamCreate"; - - /// - /// 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 "TeamCreate"; - } - - /// - /// 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("TeamCreate:\n"); - sb.Append(" Type: ").Append(Type).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 - /// - /// TeamCreate object - public static TeamCreate 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. - /// - /// TeamCreate object - public virtual TeamCreate DuplicateTeamCreate() - { - return FromJson(this.ToJson()); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel Duplicate() - { - return DuplicateTeamCreate(); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel DuplicateOpenAPIGenBaseModel() - { - return DuplicateTeamCreate(); - } - - /// - /// 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 TeamCreate); - } - - /// - /// Returns true if TeamCreate instances are equal - /// - /// Instance of TeamCreate to be compared - /// Boolean - public bool Equals(TeamCreate 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.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.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(@"^TeamCreate$", 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/TeamList.cs b/src/PollinationSDK/Model/TeamList.cs deleted file mode 100644 index d3cf3f2d2..000000000 --- a/src/PollinationSDK/Model/TeamList.cs +++ /dev/null @@ -1,287 +0,0 @@ -/* - * 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 = "TeamList")] - public partial class TeamList : OpenAPIGenBaseModel, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected TeamList() - { - // Set non-required readonly properties with defaultValue - this.Type = "TeamList"; - } - - /// - /// 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 TeamList - ( - 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 TeamList and cannot be null"); - this.NextPage = nextPage; - - // Set non-required readonly properties with defaultValue - this.Type = "TeamList"; - } - - //============================================== is ReadOnly - /// - /// Gets or Sets Type - /// - [DataMember(Name = "type", EmitDefaultValue = true)] - public string Type { get; protected internal set; } = "TeamList"; - - /// - /// 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 "TeamList"; - } - - /// - /// 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("TeamList:\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 - /// - /// TeamList object - public static TeamList 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. - /// - /// TeamList object - public virtual TeamList DuplicateTeamList() - { - return FromJson(this.ToJson()); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel Duplicate() - { - return DuplicateTeamList(); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel DuplicateOpenAPIGenBaseModel() - { - return DuplicateTeamList(); - } - - /// - /// 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 TeamList); - } - - /// - /// Returns true if TeamList instances are equal - /// - /// Instance of TeamList to be compared - /// Boolean - public bool Equals(TeamList 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(@"^TeamList$", 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/TeamMember.cs b/src/PollinationSDK/Model/TeamMember.cs deleted file mode 100644 index 26caf8509..000000000 --- a/src/PollinationSDK/Model/TeamMember.cs +++ /dev/null @@ -1,223 +0,0 @@ -/* - * 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 -{ - /// - /// TeamMember - /// - [DataContract(Name = "TeamMember")] - public partial class TeamMember : OpenAPIGenBaseModel, IEquatable, IValidatableObject - { - /// - /// The role the user has within the team - /// - /// The role the user has within the team - [DataMember(Name="role", EmitDefaultValue=false)] - public TeamRoleEnum Role { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected TeamMember() - { - // Set non-required readonly properties with defaultValue - this.Type = "TeamMember"; - } - - /// - /// Initializes a new instance of the class. - /// - /// The team member (required). - /// The role the user has within the team (required). - public TeamMember - ( - UserPublic user, TeamRoleEnum role// Required parameters - // Optional parameters - ) : base()// BaseClass - { - // to ensure "user" is required (not null) - this.User = user ?? throw new ArgumentNullException("user is a required property for TeamMember and cannot be null"); - this.Role = role; - - // Set non-required readonly properties with defaultValue - this.Type = "TeamMember"; - } - - //============================================== is ReadOnly - /// - /// Gets or Sets Type - /// - [DataMember(Name = "type", EmitDefaultValue = true)] - public string Type { get; protected internal set; } = "TeamMember"; - - /// - /// The team member - /// - /// The team member - [DataMember(Name = "user", IsRequired = true, EmitDefaultValue = false)] - public UserPublic User { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - return "TeamMember"; - } - - /// - /// 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("TeamMember:\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" User: ").Append(User).Append("\n"); - sb.Append(" Role: ").Append(Role).Append("\n"); - return sb.ToString(); - } - - /// - /// Returns the object from JSON string - /// - /// TeamMember object - public static TeamMember 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. - /// - /// TeamMember object - public virtual TeamMember DuplicateTeamMember() - { - return FromJson(this.ToJson()); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel Duplicate() - { - return DuplicateTeamMember(); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel DuplicateOpenAPIGenBaseModel() - { - return DuplicateTeamMember(); - } - - /// - /// 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 TeamMember); - } - - /// - /// Returns true if TeamMember instances are equal - /// - /// Instance of TeamMember to be compared - /// Boolean - public bool Equals(TeamMember input) - { - if (input == null) - return false; - return base.Equals(input) && - ( - this.User == input.User || - (this.User != null && - this.User.Equals(input.User)) - ) && base.Equals(input) && - ( - this.Role == input.Role || - (this.Role != null && - this.Role.Equals(input.Role)) - ) && 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.User != null) - hashCode = hashCode * 59 + this.User.GetHashCode(); - if (this.Role != null) - hashCode = hashCode * 59 + this.Role.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(@"^TeamMember$", 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/TeamMemberList.cs b/src/PollinationSDK/Model/TeamMemberList.cs deleted file mode 100644 index 1f8fef9d8..000000000 --- a/src/PollinationSDK/Model/TeamMemberList.cs +++ /dev/null @@ -1,287 +0,0 @@ -/* - * 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 = "TeamMemberList")] - public partial class TeamMemberList : OpenAPIGenBaseModel, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected TeamMemberList() - { - // Set non-required readonly properties with defaultValue - this.Type = "TeamMemberList"; - } - - /// - /// 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 TeamMemberList - ( - 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 TeamMemberList and cannot be null"); - this.NextPage = nextPage; - - // Set non-required readonly properties with defaultValue - this.Type = "TeamMemberList"; - } - - //============================================== is ReadOnly - /// - /// Gets or Sets Type - /// - [DataMember(Name = "type", EmitDefaultValue = true)] - public string Type { get; protected internal set; } = "TeamMemberList"; - - /// - /// 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 "TeamMemberList"; - } - - /// - /// 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("TeamMemberList:\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 - /// - /// TeamMemberList object - public static TeamMemberList 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. - /// - /// TeamMemberList object - public virtual TeamMemberList DuplicateTeamMemberList() - { - return FromJson(this.ToJson()); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel Duplicate() - { - return DuplicateTeamMemberList(); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel DuplicateOpenAPIGenBaseModel() - { - return DuplicateTeamMemberList(); - } - - /// - /// 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 TeamMemberList); - } - - /// - /// Returns true if TeamMemberList instances are equal - /// - /// Instance of TeamMemberList to be compared - /// Boolean - public bool Equals(TeamMemberList 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(@"^TeamMemberList$", 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/TeamRoleEnum.cs b/src/PollinationSDK/Model/TeamRoleEnum.cs deleted file mode 100644 index c94984a79..000000000 --- a/src/PollinationSDK/Model/TeamRoleEnum.cs +++ /dev/null @@ -1,49 +0,0 @@ -/* - * 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 TeamRoleEnum - { - /// - /// Enum Owner for value: owner - /// - [EnumMember(Value = "owner")] - Owner = 1, - - /// - /// Enum Member for value: member - /// - [EnumMember(Value = "member")] - Member = 2 - - } - -} diff --git a/src/PollinationSDK/Model/TeamUpdate.cs b/src/PollinationSDK/Model/TeamUpdate.cs deleted file mode 100644 index 01f88db63..000000000 --- a/src/PollinationSDK/Model/TeamUpdate.cs +++ /dev/null @@ -1,204 +0,0 @@ -/* - * 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 -{ - /// - /// TeamUpdate - /// - [DataContract(Name = "TeamUpdate")] - public partial class TeamUpdate : TeamCreate, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected TeamUpdate() - { - // Set non-required readonly properties with defaultValue - this.Type = "TeamUpdate"; - } - - /// - /// Initializes a new instance of the class. - /// - /// name (required). - /// description. - public TeamUpdate - ( - string name, // Required parameters - string description= default // Optional parameters - ) : base(name: name, description: description)// BaseClass - { - - // Set non-required readonly properties with defaultValue - this.Type = "TeamUpdate"; - } - - //============================================== is ReadOnly - /// - /// Gets or Sets Type - /// - [DataMember(Name = "type", EmitDefaultValue = true)] - public string Type { get; protected internal set; } = "TeamUpdate"; - - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - return "TeamUpdate"; - } - - /// - /// 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("TeamUpdate:\n"); - sb.Append(" Type: ").Append(Type).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 - /// - /// TeamUpdate object - public static TeamUpdate 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. - /// - /// TeamUpdate object - public virtual TeamUpdate DuplicateTeamUpdate() - { - return FromJson(this.ToJson()); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel Duplicate() - { - return DuplicateTeamUpdate(); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override TeamCreate DuplicateTeamCreate() - { - return DuplicateTeamUpdate(); - } - - /// - /// 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 TeamUpdate); - } - - /// - /// Returns true if TeamUpdate instances are equal - /// - /// Instance of TeamUpdate to be compared - /// Boolean - public bool Equals(TeamUpdate 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(@"^TeamUpdate$", 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/UpdateAccepted.cs b/src/PollinationSDK/Model/UpdateAccepted.cs deleted file mode 100644 index 9f76d34c8..000000000 --- a/src/PollinationSDK/Model/UpdateAccepted.cs +++ /dev/null @@ -1,196 +0,0 @@ -/* - * 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 -{ - /// - /// Accepted request response for existing resource - /// - [DataContract(Name = "UpdateAccepted")] - public partial class UpdateAccepted : OpenAPIGenBaseModel, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// status (default to "accepted"). - public UpdateAccepted - ( - // Required parameters - string status = "accepted" // Optional parameters - ) : base()// BaseClass - { - // use default value if no "status" provided - this.Status = status ?? "accepted"; - - // Set non-required readonly properties with defaultValue - this.Type = "UpdateAccepted"; - } - - //============================================== is ReadOnly - /// - /// Gets or Sets Type - /// - [DataMember(Name = "type", EmitDefaultValue = true)] - public string Type { get; protected internal set; } = "UpdateAccepted"; - - /// - /// Gets or Sets Status - /// - [DataMember(Name = "status", EmitDefaultValue = true)] - public string Status { get; set; } = "accepted"; - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - return "UpdateAccepted"; - } - - /// - /// 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("UpdateAccepted:\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" Status: ").Append(Status).Append("\n"); - return sb.ToString(); - } - - /// - /// Returns the object from JSON string - /// - /// UpdateAccepted object - public static UpdateAccepted 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. - /// - /// UpdateAccepted object - public virtual UpdateAccepted DuplicateUpdateAccepted() - { - return FromJson(this.ToJson()); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel Duplicate() - { - return DuplicateUpdateAccepted(); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel DuplicateOpenAPIGenBaseModel() - { - return DuplicateUpdateAccepted(); - } - - /// - /// 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 UpdateAccepted); - } - - /// - /// Returns true if UpdateAccepted instances are equal - /// - /// Instance of UpdateAccepted to be compared - /// Boolean - public bool Equals(UpdateAccepted input) - { - if (input == null) - return false; - return base.Equals(input) && - ( - this.Status == input.Status || - (this.Status != null && - this.Status.Equals(input.Status)) - ) && 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.Status != null) - hashCode = hashCode * 59 + this.Status.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(@"^UpdateAccepted$", 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/Usage.cs b/src/PollinationSDK/Model/Usage.cs deleted file mode 100644 index 36acec6e9..000000000 --- a/src/PollinationSDK/Model/Usage.cs +++ /dev/null @@ -1,303 +0,0 @@ -/* - * 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 -{ - /// - /// Usage - /// - [DataContract(Name = "Usage")] - public partial class Usage : OpenAPIGenBaseModel, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected Usage() - { - // Set non-required readonly properties with defaultValue - this.Type = "Usage"; - } - - /// - /// Initializes a new instance of the class. - /// - /// The start date for this usage aggregation (required). - /// The end date for this usage aggregation (required). - /// cpu usage (default to 0D). - /// memory usage (default to 0D). - /// succeeded usage (default to 0). - /// failed usage (default to 0). - /// daily breakdown of usage. - public Usage - ( - DateTime start, DateTime end, // Required parameters - double cpu = 0D, double memory = 0D, int succeeded = 0, int failed = 0, List dailyUsage= default // Optional parameters - ) : base()// BaseClass - { - this.Start = start; - this.End = end; - this.Cpu = cpu; - this.Memory = memory; - this.Succeeded = succeeded; - this.Failed = failed; - this.DailyUsage = dailyUsage; - - // Set non-required readonly properties with defaultValue - this.Type = "Usage"; - } - - //============================================== is ReadOnly - /// - /// Gets or Sets Type - /// - [DataMember(Name = "type", EmitDefaultValue = true)] - public string Type { get; protected internal set; } = "Usage"; - - /// - /// The start date for this usage aggregation - /// - /// The start date for this usage aggregation - [DataMember(Name = "start", IsRequired = true, EmitDefaultValue = false)] - public DateTime Start { get; set; } - /// - /// The end date for this usage aggregation - /// - /// The end date for this usage aggregation - [DataMember(Name = "end", IsRequired = true, EmitDefaultValue = false)] - public DateTime End { get; set; } - /// - /// cpu usage - /// - /// cpu usage - [DataMember(Name = "cpu", EmitDefaultValue = true)] - public double Cpu { get; set; } = 0D; - /// - /// memory usage - /// - /// memory usage - [DataMember(Name = "memory", EmitDefaultValue = true)] - public double Memory { get; set; } = 0D; - /// - /// succeeded usage - /// - /// succeeded usage - [DataMember(Name = "succeeded", EmitDefaultValue = true)] - public int Succeeded { get; set; } = 0; - /// - /// failed usage - /// - /// failed usage - [DataMember(Name = "failed", EmitDefaultValue = true)] - public int Failed { get; set; } = 0; - /// - /// daily breakdown of usage - /// - /// daily breakdown of usage - [DataMember(Name = "daily_usage", EmitDefaultValue = false)] - public List DailyUsage { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - return "Usage"; - } - - /// - /// 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("Usage:\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" Start: ").Append(Start).Append("\n"); - sb.Append(" End: ").Append(End).Append("\n"); - sb.Append(" Cpu: ").Append(Cpu).Append("\n"); - sb.Append(" Memory: ").Append(Memory).Append("\n"); - sb.Append(" Succeeded: ").Append(Succeeded).Append("\n"); - sb.Append(" Failed: ").Append(Failed).Append("\n"); - sb.Append(" DailyUsage: ").Append(DailyUsage).Append("\n"); - return sb.ToString(); - } - - /// - /// Returns the object from JSON string - /// - /// Usage object - public static Usage 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. - /// - /// Usage object - public virtual Usage DuplicateUsage() - { - return FromJson(this.ToJson()); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel Duplicate() - { - return DuplicateUsage(); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel DuplicateOpenAPIGenBaseModel() - { - return DuplicateUsage(); - } - - /// - /// 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 Usage); - } - - /// - /// Returns true if Usage instances are equal - /// - /// Instance of Usage to be compared - /// Boolean - public bool Equals(Usage 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.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.Succeeded == input.Succeeded || - (this.Succeeded != null && - this.Succeeded.Equals(input.Succeeded)) - ) && base.Equals(input) && - ( - this.Failed == input.Failed || - (this.Failed != null && - this.Failed.Equals(input.Failed)) - ) && base.Equals(input) && - ( - this.DailyUsage == input.DailyUsage || - this.DailyUsage != null && - input.DailyUsage != null && - this.DailyUsage.SequenceEqual(input.DailyUsage) - ) && 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.Cpu != null) - hashCode = hashCode * 59 + this.Cpu.GetHashCode(); - if (this.Memory != null) - hashCode = hashCode * 59 + this.Memory.GetHashCode(); - if (this.Succeeded != null) - hashCode = hashCode * 59 + this.Succeeded.GetHashCode(); - if (this.Failed != null) - hashCode = hashCode * 59 + this.Failed.GetHashCode(); - if (this.DailyUsage != null) - hashCode = hashCode * 59 + this.DailyUsage.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(@"^Usage$", 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/UserCreate.cs b/src/PollinationSDK/Model/UserCreate.cs deleted file mode 100644 index abf91c5f7..000000000 --- a/src/PollinationSDK/Model/UserCreate.cs +++ /dev/null @@ -1,213 +0,0 @@ -/* - * 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 -{ - /// - /// UserCreate - /// - [DataContract(Name = "UserCreate")] - public partial class UserCreate : UserUpdate, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected UserCreate() - { - // Set non-required readonly properties with defaultValue - this.Type = "UserCreate"; - } - - /// - /// Initializes a new instance of the class. - /// - /// The unique name of the user in small case without spaces (required). - /// The display name for this user (required). - /// URL to the picture associated with this user (required). - /// A description of the user (default to ""). - public UserCreate - ( - string name, string pictureUrl, string username, // Required parameters - string description = "" // Optional parameters - ) : base(name: name, pictureUrl: pictureUrl, description: description)// BaseClass - { - // to ensure "username" is required (not null) - this.Username = username ?? throw new ArgumentNullException("username is a required property for UserCreate and cannot be null"); - - // Set non-required readonly properties with defaultValue - this.Type = "UserCreate"; - } - - //============================================== is ReadOnly - /// - /// Gets or Sets Type - /// - [DataMember(Name = "type", EmitDefaultValue = true)] - public string Type { get; protected internal set; } = "UserCreate"; - - /// - /// The unique name of the user in small case without spaces - /// - /// The unique name of the user in small case without spaces - [DataMember(Name = "username", IsRequired = true, EmitDefaultValue = false)] - public string Username { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - return "UserCreate"; - } - - /// - /// 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("UserCreate:\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" PictureUrl: ").Append(PictureUrl).Append("\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" Username: ").Append(Username).Append("\n"); - return sb.ToString(); - } - - /// - /// Returns the object from JSON string - /// - /// UserCreate object - public static UserCreate 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. - /// - /// UserCreate object - public virtual UserCreate DuplicateUserCreate() - { - return FromJson(this.ToJson()); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel Duplicate() - { - return DuplicateUserCreate(); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override UserUpdate DuplicateUserUpdate() - { - return DuplicateUserCreate(); - } - - /// - /// 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 UserCreate); - } - - /// - /// Returns true if UserCreate instances are equal - /// - /// Instance of UserCreate to be compared - /// Boolean - public bool Equals(UserCreate input) - { - if (input == null) - return false; - return base.Equals(input) && - ( - this.Username == input.Username || - (this.Username != null && - this.Username.Equals(input.Username)) - ) && 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.Username != null) - hashCode = hashCode * 59 + this.Username.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(@"^UserCreate$", 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/UserPermission.cs b/src/PollinationSDK/Model/UserPermission.cs deleted file mode 100644 index 6fbf8c098..000000000 --- a/src/PollinationSDK/Model/UserPermission.cs +++ /dev/null @@ -1,238 +0,0 @@ -/* - * 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 -{ - /// - /// UserPermission - /// - [DataContract(Name = "UserPermission")] - public partial class UserPermission : OpenAPIGenBaseModel, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// The user has admin permission to this resource (default to false). - /// The user has write permission on this resource (default to false). - /// The user has read permission on this resource (default to false). - public UserPermission - ( - // Required parameters - bool admin = false, bool write = false, bool read = false // Optional parameters - ) : base()// BaseClass - { - this.Admin = admin; - this.Write = write; - this.Read = read; - - // Set non-required readonly properties with defaultValue - this.Type = "UserPermission"; - } - - //============================================== is ReadOnly - /// - /// Gets or Sets Type - /// - [DataMember(Name = "type", EmitDefaultValue = true)] - public string Type { get; protected internal set; } = "UserPermission"; - - /// - /// The user has admin permission to this resource - /// - /// The user has admin permission to this resource - [DataMember(Name = "admin", EmitDefaultValue = true)] - public bool Admin { get; set; } = false; - /// - /// The user has write permission on this resource - /// - /// The user has write permission on this resource - [DataMember(Name = "write", EmitDefaultValue = true)] - public bool Write { get; set; } = false; - /// - /// The user has read permission on this resource - /// - /// The user has read permission on this resource - [DataMember(Name = "read", EmitDefaultValue = true)] - public bool Read { get; set; } = false; - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - return "UserPermission"; - } - - /// - /// 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("UserPermission:\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" Admin: ").Append(Admin).Append("\n"); - sb.Append(" Write: ").Append(Write).Append("\n"); - sb.Append(" Read: ").Append(Read).Append("\n"); - return sb.ToString(); - } - - /// - /// Returns the object from JSON string - /// - /// UserPermission object - public static UserPermission 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. - /// - /// UserPermission object - public virtual UserPermission DuplicateUserPermission() - { - return FromJson(this.ToJson()); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel Duplicate() - { - return DuplicateUserPermission(); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel DuplicateOpenAPIGenBaseModel() - { - return DuplicateUserPermission(); - } - - /// - /// 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 UserPermission); - } - - /// - /// Returns true if UserPermission instances are equal - /// - /// Instance of UserPermission to be compared - /// Boolean - public bool Equals(UserPermission input) - { - if (input == null) - return false; - return base.Equals(input) && - ( - this.Admin == input.Admin || - (this.Admin != null && - this.Admin.Equals(input.Admin)) - ) && base.Equals(input) && - ( - this.Write == input.Write || - (this.Write != null && - this.Write.Equals(input.Write)) - ) && base.Equals(input) && - ( - this.Read == input.Read || - (this.Read != null && - this.Read.Equals(input.Read)) - ) && 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.Admin != null) - hashCode = hashCode * 59 + this.Admin.GetHashCode(); - if (this.Write != null) - hashCode = hashCode * 59 + this.Write.GetHashCode(); - if (this.Read != null) - hashCode = hashCode * 59 + this.Read.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(@"^UserPermission$", 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/UserPrivate.cs b/src/PollinationSDK/Model/UserPrivate.cs deleted file mode 100644 index 96f1715e9..000000000 --- a/src/PollinationSDK/Model/UserPrivate.cs +++ /dev/null @@ -1,289 +0,0 @@ -/* - * 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 -{ - /// - /// UserPrivate - /// - [DataContract(Name = "UserPrivate")] - public partial class UserPrivate : OpenAPIGenBaseModel, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected UserPrivate() - { - // Set non-required readonly properties with defaultValue - this.Type = "UserPrivate"; - } - - /// - /// Initializes a new instance of the class. - /// - /// The unique ID for that user (required). - /// The email associated with that user (required). - /// The lowercase account name for this user (required). - /// The display name for this user. - /// A short description of the user. - /// URL to the picture associated with this user. - public UserPrivate - ( - string id, string email, string username, // Required parameters - string name= default, string description= default, string picture= default // Optional parameters - ) : base()// BaseClass - { - // to ensure "id" is required (not null) - this.Id = id ?? throw new ArgumentNullException("id is a required property for UserPrivate and cannot be null"); - // to ensure "email" is required (not null) - this.Email = email ?? throw new ArgumentNullException("email is a required property for UserPrivate and cannot be null"); - // to ensure "username" is required (not null) - this.Username = username ?? throw new ArgumentNullException("username is a required property for UserPrivate and cannot be null"); - this.Name = name; - this.Description = description; - this.Picture = picture; - - // Set non-required readonly properties with defaultValue - this.Type = "UserPrivate"; - } - - //============================================== is ReadOnly - /// - /// Gets or Sets Type - /// - [DataMember(Name = "type", EmitDefaultValue = true)] - public string Type { get; protected internal set; } = "UserPrivate"; - - /// - /// The unique ID for that user - /// - /// The unique ID for that user - [DataMember(Name = "id", IsRequired = true, EmitDefaultValue = false)] - public string Id { get; set; } - /// - /// The email associated with that user - /// - /// The email associated with that user - [DataMember(Name = "email", IsRequired = true, EmitDefaultValue = false)] - public string Email { get; set; } - /// - /// The lowercase account name for this user - /// - /// The lowercase account name for this user - [DataMember(Name = "username", IsRequired = true, EmitDefaultValue = false)] - public string Username { get; set; } - /// - /// The display name for this user - /// - /// The display name for this user - [DataMember(Name = "name", EmitDefaultValue = false)] - public string Name { get; set; } - /// - /// A short description of the user - /// - /// A short description of the user - [DataMember(Name = "description", EmitDefaultValue = false)] - public string Description { get; set; } - /// - /// URL to the picture associated with this user - /// - /// URL to the picture associated with this user - [DataMember(Name = "picture", EmitDefaultValue = false)] - public string Picture { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - return "UserPrivate"; - } - - /// - /// 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("UserPrivate:\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" Email: ").Append(Email).Append("\n"); - sb.Append(" Username: ").Append(Username).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" Picture: ").Append(Picture).Append("\n"); - return sb.ToString(); - } - - /// - /// Returns the object from JSON string - /// - /// UserPrivate object - public static UserPrivate 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. - /// - /// UserPrivate object - public virtual UserPrivate DuplicateUserPrivate() - { - return FromJson(this.ToJson()); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel Duplicate() - { - return DuplicateUserPrivate(); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel DuplicateOpenAPIGenBaseModel() - { - return DuplicateUserPrivate(); - } - - /// - /// 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 UserPrivate); - } - - /// - /// Returns true if UserPrivate instances are equal - /// - /// Instance of UserPrivate to be compared - /// Boolean - public bool Equals(UserPrivate 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.Email == input.Email || - (this.Email != null && - this.Email.Equals(input.Email)) - ) && base.Equals(input) && - ( - this.Username == input.Username || - (this.Username != null && - this.Username.Equals(input.Username)) - ) && 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.Picture == input.Picture || - (this.Picture != null && - this.Picture.Equals(input.Picture)) - ) && 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.Email != null) - hashCode = hashCode * 59 + this.Email.GetHashCode(); - if (this.Username != null) - hashCode = hashCode * 59 + this.Username.GetHashCode(); - if (this.Name != null) - hashCode = hashCode * 59 + this.Name.GetHashCode(); - if (this.Description != null) - hashCode = hashCode * 59 + this.Description.GetHashCode(); - if (this.Picture != null) - hashCode = hashCode * 59 + this.Picture.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(@"^UserPrivate$", 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/UserPublic.cs b/src/PollinationSDK/Model/UserPublic.cs deleted file mode 100644 index 0eb40db95..000000000 --- a/src/PollinationSDK/Model/UserPublic.cs +++ /dev/null @@ -1,255 +0,0 @@ -/* - * 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 -{ - /// - /// UserPublic - /// - [DataContract(Name = "UserPublic")] - public partial class UserPublic : OpenAPIGenBaseModel, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected UserPublic() - { - // Set non-required readonly properties with defaultValue - this.Type = "UserPublic"; - } - - /// - /// Initializes a new instance of the class. - /// - /// The lowercase account name for this user (required). - /// The display name for this user. - /// A short description of the user. - /// URL to the picture associated with this user. - public UserPublic - ( - string username, // Required parameters - string name= default, string description= default, string picture= default // Optional parameters - ) : base()// BaseClass - { - // to ensure "username" is required (not null) - this.Username = username ?? throw new ArgumentNullException("username is a required property for UserPublic and cannot be null"); - this.Name = name; - this.Description = description; - this.Picture = picture; - - // Set non-required readonly properties with defaultValue - this.Type = "UserPublic"; - } - - //============================================== is ReadOnly - /// - /// Gets or Sets Type - /// - [DataMember(Name = "type", EmitDefaultValue = true)] - public string Type { get; protected internal set; } = "UserPublic"; - - /// - /// The lowercase account name for this user - /// - /// The lowercase account name for this user - [DataMember(Name = "username", IsRequired = true, EmitDefaultValue = false)] - public string Username { get; set; } - /// - /// The display name for this user - /// - /// The display name for this user - [DataMember(Name = "name", EmitDefaultValue = false)] - public string Name { get; set; } - /// - /// A short description of the user - /// - /// A short description of the user - [DataMember(Name = "description", EmitDefaultValue = false)] - public string Description { get; set; } - /// - /// URL to the picture associated with this user - /// - /// URL to the picture associated with this user - [DataMember(Name = "picture", EmitDefaultValue = false)] - public string Picture { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - return "UserPublic"; - } - - /// - /// 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("UserPublic:\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" Username: ").Append(Username).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" Picture: ").Append(Picture).Append("\n"); - return sb.ToString(); - } - - /// - /// Returns the object from JSON string - /// - /// UserPublic object - public static UserPublic 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. - /// - /// UserPublic object - public virtual UserPublic DuplicateUserPublic() - { - return FromJson(this.ToJson()); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel Duplicate() - { - return DuplicateUserPublic(); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel DuplicateOpenAPIGenBaseModel() - { - return DuplicateUserPublic(); - } - - /// - /// 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 UserPublic); - } - - /// - /// Returns true if UserPublic instances are equal - /// - /// Instance of UserPublic to be compared - /// Boolean - public bool Equals(UserPublic input) - { - if (input == null) - return false; - return base.Equals(input) && - ( - this.Username == input.Username || - (this.Username != null && - this.Username.Equals(input.Username)) - ) && 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.Picture == input.Picture || - (this.Picture != null && - this.Picture.Equals(input.Picture)) - ) && 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.Username != null) - hashCode = hashCode * 59 + this.Username.GetHashCode(); - if (this.Name != null) - hashCode = hashCode * 59 + this.Name.GetHashCode(); - if (this.Description != null) - hashCode = hashCode * 59 + this.Description.GetHashCode(); - if (this.Picture != null) - hashCode = hashCode * 59 + this.Picture.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(@"^UserPublic$", 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/UserPublicList.cs b/src/PollinationSDK/Model/UserPublicList.cs deleted file mode 100644 index 61e51c9f7..000000000 --- a/src/PollinationSDK/Model/UserPublicList.cs +++ /dev/null @@ -1,287 +0,0 @@ -/* - * 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 = "UserPublicList")] - public partial class UserPublicList : OpenAPIGenBaseModel, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected UserPublicList() - { - // Set non-required readonly properties with defaultValue - this.Type = "UserPublicList"; - } - - /// - /// 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 UserPublicList - ( - 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 UserPublicList and cannot be null"); - this.NextPage = nextPage; - - // Set non-required readonly properties with defaultValue - this.Type = "UserPublicList"; - } - - //============================================== is ReadOnly - /// - /// Gets or Sets Type - /// - [DataMember(Name = "type", EmitDefaultValue = true)] - public string Type { get; protected internal set; } = "UserPublicList"; - - /// - /// 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 "UserPublicList"; - } - - /// - /// 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("UserPublicList:\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 - /// - /// UserPublicList object - public static UserPublicList 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. - /// - /// UserPublicList object - public virtual UserPublicList DuplicateUserPublicList() - { - return FromJson(this.ToJson()); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel Duplicate() - { - return DuplicateUserPublicList(); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel DuplicateOpenAPIGenBaseModel() - { - return DuplicateUserPublicList(); - } - - /// - /// 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 UserPublicList); - } - - /// - /// Returns true if UserPublicList instances are equal - /// - /// Instance of UserPublicList to be compared - /// Boolean - public bool Equals(UserPublicList 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(@"^UserPublicList$", 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/UserUpdate.cs b/src/PollinationSDK/Model/UserUpdate.cs deleted file mode 100644 index 8f893b998..000000000 --- a/src/PollinationSDK/Model/UserUpdate.cs +++ /dev/null @@ -1,251 +0,0 @@ -/* - * 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 -{ - /// - /// UserUpdate - /// - [DataContract(Name = "UserUpdate")] - public partial class UserUpdate : OpenAPIGenBaseModel, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected UserUpdate() - { - // Set non-required readonly properties with defaultValue - this.Type = "UserUpdate"; - } - - /// - /// Initializes a new instance of the class. - /// - /// The display name for this user (required). - /// URL to the picture associated with this user (required). - /// A description of the user (default to ""). - public UserUpdate - ( - string name, string pictureUrl, // Required parameters - string description = "" // Optional parameters - ) : base()// BaseClass - { - // to ensure "name" is required (not null) - this.Name = name ?? throw new ArgumentNullException("name is a required property for UserUpdate and cannot be null"); - // to ensure "pictureUrl" is required (not null) - this.PictureUrl = pictureUrl ?? throw new ArgumentNullException("pictureUrl is a required property for UserUpdate and cannot be null"); - // use default value if no "description" provided - this.Description = description ?? ""; - - // Set non-required readonly properties with defaultValue - this.Type = "UserUpdate"; - } - - //============================================== is ReadOnly - /// - /// Gets or Sets Type - /// - [DataMember(Name = "type", EmitDefaultValue = true)] - public string Type { get; protected internal set; } = "UserUpdate"; - - /// - /// The display name for this user - /// - /// The display name for this user - [DataMember(Name = "name", IsRequired = true, EmitDefaultValue = false)] - public string Name { get; set; } - /// - /// URL to the picture associated with this user - /// - /// URL to the picture associated with this user - [DataMember(Name = "picture_url", IsRequired = true, EmitDefaultValue = false)] - public string PictureUrl { get; set; } - /// - /// A description of the user - /// - /// A description of the user - [DataMember(Name = "description", EmitDefaultValue = true)] - public string Description { get; set; } = ""; - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - return "UserUpdate"; - } - - /// - /// 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("UserUpdate:\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" PictureUrl: ").Append(PictureUrl).Append("\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - return sb.ToString(); - } - - /// - /// Returns the object from JSON string - /// - /// UserUpdate object - public static UserUpdate 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. - /// - /// UserUpdate object - public virtual UserUpdate DuplicateUserUpdate() - { - return FromJson(this.ToJson()); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel Duplicate() - { - return DuplicateUserUpdate(); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel DuplicateOpenAPIGenBaseModel() - { - return DuplicateUserUpdate(); - } - - /// - /// 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 UserUpdate); - } - - /// - /// Returns true if UserUpdate instances are equal - /// - /// Instance of UserUpdate to be compared - /// Boolean - public bool Equals(UserUpdate 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.PictureUrl == input.PictureUrl || - (this.PictureUrl != null && - this.PictureUrl.Equals(input.PictureUrl)) - ) && 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.PictureUrl != null) - hashCode = hashCode * 59 + this.PictureUrl.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(@"^UserUpdate$", 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/ValueFileReference.cs b/src/PollinationSDK/Model/ValueFileReference.cs deleted file mode 100644 index 363373f80..000000000 --- a/src/PollinationSDK/Model/ValueFileReference.cs +++ /dev/null @@ -1,219 +0,0 @@ -/* - * 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 reference to a fixed file. - /// - [DataContract(Name = "ValueFileReference")] - public partial class ValueFileReference : BaseReference, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected ValueFileReference() - { - // Set non-required readonly properties with defaultValue - this.Type = "ValueFileReference"; - } - - /// - /// Initializes a new instance of the class. - /// - /// A fixed value for this reference. (required). - /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. - public ValueFileReference - ( - string path, // Required parameters - Dictionary annotations= default // Optional parameters - ) : base(annotations: annotations)// BaseClass - { - // to ensure "path" is required (not null) - this.Path = path ?? throw new ArgumentNullException("path is a required property for ValueFileReference and cannot be null"); - - // Set non-required readonly properties with defaultValue - this.Type = "ValueFileReference"; - } - - //============================================== is ReadOnly - /// - /// Gets or Sets Type - /// - [DataMember(Name = "type", EmitDefaultValue = true)] - public string Type { get; protected internal set; } = "ValueFileReference"; - - /// - /// A fixed value for this reference. - /// - /// A fixed value for this reference. - [DataMember(Name = "path", IsRequired = true, EmitDefaultValue = false)] - public string Path { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - return "ValueFileReference"; - } - - /// - /// 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("ValueFileReference:\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" Annotations: ").Append(Annotations).Append("\n"); - sb.Append(" Path: ").Append(Path).Append("\n"); - return sb.ToString(); - } - - /// - /// Returns the object from JSON string - /// - /// ValueFileReference object - public static ValueFileReference 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. - /// - /// ValueFileReference object - public virtual ValueFileReference DuplicateValueFileReference() - { - return FromJson(this.ToJson()); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel Duplicate() - { - return DuplicateValueFileReference(); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override BaseReference DuplicateBaseReference() - { - return DuplicateValueFileReference(); - } - - /// - /// 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 ValueFileReference); - } - - /// - /// Returns true if ValueFileReference instances are equal - /// - /// Instance of ValueFileReference to be compared - /// Boolean - public bool Equals(ValueFileReference input) - { - if (input == null) - return false; - return base.Equals(input) && - ( - this.Path == input.Path || - (this.Path != null && - this.Path.Equals(input.Path)) - ) && 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.Path != null) - hashCode = hashCode * 59 + this.Path.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(@"^ValueFileReference$", 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/ValueFolderReference.cs b/src/PollinationSDK/Model/ValueFolderReference.cs deleted file mode 100644 index af3c83d2f..000000000 --- a/src/PollinationSDK/Model/ValueFolderReference.cs +++ /dev/null @@ -1,194 +0,0 @@ -/* - * 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 reference to a fixed folder. - /// - [DataContract(Name = "ValueFolderReference")] - public partial class ValueFolderReference : ValueFileReference, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected ValueFolderReference() - { - // Set non-required readonly properties with defaultValue - this.Type = "ValueFolderReference"; - } - - /// - /// Initializes a new instance of the class. - /// - /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. - /// A fixed value for this reference. (required). - public ValueFolderReference - ( - string path, // Required parameters - Dictionary annotations= default // Optional parameters - ) : base(annotations: annotations, path: path)// BaseClass - { - - // Set non-required readonly properties with defaultValue - this.Type = "ValueFolderReference"; - } - - //============================================== is ReadOnly - /// - /// Gets or Sets Type - /// - [DataMember(Name = "type", EmitDefaultValue = true)] - public string Type { get; protected internal set; } = "ValueFolderReference"; - - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - return "ValueFolderReference"; - } - - /// - /// 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("ValueFolderReference:\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" Annotations: ").Append(Annotations).Append("\n"); - sb.Append(" Path: ").Append(Path).Append("\n"); - return sb.ToString(); - } - - /// - /// Returns the object from JSON string - /// - /// ValueFolderReference object - public static ValueFolderReference 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. - /// - /// ValueFolderReference object - public virtual ValueFolderReference DuplicateValueFolderReference() - { - return FromJson(this.ToJson()); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel Duplicate() - { - return DuplicateValueFolderReference(); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override ValueFileReference DuplicateValueFileReference() - { - return DuplicateValueFolderReference(); - } - - /// - /// 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 ValueFolderReference); - } - - /// - /// Returns true if ValueFolderReference instances are equal - /// - /// Instance of ValueFolderReference to be compared - /// Boolean - public bool Equals(ValueFolderReference 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(@"^ValueFolderReference$", 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/ValueListReference.cs b/src/PollinationSDK/Model/ValueListReference.cs deleted file mode 100644 index 1e6ede95f..000000000 --- a/src/PollinationSDK/Model/ValueListReference.cs +++ /dev/null @@ -1,210 +0,0 @@ -/* - * 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 reference to a fixed value. - /// - [DataContract(Name = "ValueListReference")] - public partial class ValueListReference : BaseReference, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected ValueListReference() - { - // Set non-required readonly properties with defaultValue - this.Type = "ValueListReference"; - } - - /// - /// Initializes a new instance of the class. - /// - /// A fixed value for this reference. (required). - /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. - public ValueListReference - ( - List value, // Required parameters - Dictionary annotations= default // Optional parameters - ) : base(annotations: annotations)// BaseClass - { - // to ensure "value" is required (not null) - this.Value = value ?? throw new ArgumentNullException("value is a required property for ValueListReference and cannot be null"); - - // Set non-required readonly properties with defaultValue - this.Type = "ValueListReference"; - } - - //============================================== is ReadOnly - /// - /// Gets or Sets Type - /// - [DataMember(Name = "type", EmitDefaultValue = true)] - public string Type { get; protected internal set; } = "ValueListReference"; - - /// - /// A fixed value for this reference. - /// - /// A fixed value for this reference. - [DataMember(Name = "value", IsRequired = true, EmitDefaultValue = false)] - public List Value { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - return "ValueListReference"; - } - - /// - /// 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("ValueListReference:\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" Annotations: ").Append(Annotations).Append("\n"); - sb.Append(" Value: ").Append(Value).Append("\n"); - return sb.ToString(); - } - - /// - /// Returns the object from JSON string - /// - /// ValueListReference object - public static ValueListReference 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. - /// - /// ValueListReference object - public virtual ValueListReference DuplicateValueListReference() - { - return FromJson(this.ToJson()); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel Duplicate() - { - return DuplicateValueListReference(); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override BaseReference DuplicateBaseReference() - { - return DuplicateValueListReference(); - } - - /// - /// 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 ValueListReference); - } - - /// - /// Returns true if ValueListReference instances are equal - /// - /// Instance of ValueListReference to be compared - /// Boolean - public bool Equals(ValueListReference input) - { - if (input == null) - return false; - return base.Equals(input) && - ( - this.Value == input.Value || - this.Value != null && - input.Value != null && - this.Value.SequenceEqual(input.Value) - ) && 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.Value != null) - hashCode = hashCode * 59 + this.Value.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(@"^ValueListReference$", 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/ValueReference.cs b/src/PollinationSDK/Model/ValueReference.cs deleted file mode 100644 index 7d315b8dd..000000000 --- a/src/PollinationSDK/Model/ValueReference.cs +++ /dev/null @@ -1,209 +0,0 @@ -/* - * 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 reference to a fixed value. - /// - [DataContract(Name = "ValueReference")] - public partial class ValueReference : BaseReference, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected ValueReference() - { - // Set non-required readonly properties with defaultValue - this.Type = "ValueReference"; - } - - /// - /// Initializes a new instance of the class. - /// - /// A fixed value for this reference. (required). - /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. - public ValueReference - ( - object value, // Required parameters - Dictionary annotations= default // Optional parameters - ) : base(annotations: annotations)// BaseClass - { - // to ensure "value" is required (not null) - this.Value = value ?? throw new ArgumentNullException("value is a required property for ValueReference and cannot be null"); - - // Set non-required readonly properties with defaultValue - this.Type = "ValueReference"; - } - - //============================================== is ReadOnly - /// - /// Gets or Sets Type - /// - [DataMember(Name = "type", EmitDefaultValue = true)] - public string Type { get; protected internal set; } = "ValueReference"; - - /// - /// A fixed value for this reference. - /// - /// A fixed value for this reference. - [DataMember(Name = "value", IsRequired = true, EmitDefaultValue = true)] - public object Value { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - return "ValueReference"; - } - - /// - /// 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("ValueReference:\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" Annotations: ").Append(Annotations).Append("\n"); - sb.Append(" Value: ").Append(Value).Append("\n"); - return sb.ToString(); - } - - /// - /// Returns the object from JSON string - /// - /// ValueReference object - public static ValueReference 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. - /// - /// ValueReference object - public virtual ValueReference DuplicateValueReference() - { - return FromJson(this.ToJson()); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override OpenAPIGenBaseModel Duplicate() - { - return DuplicateValueReference(); - } - - /// - /// Creates a new instance with the same properties. - /// - /// OpenAPIGenBaseModel - public override BaseReference DuplicateBaseReference() - { - return DuplicateValueReference(); - } - - /// - /// 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 ValueReference); - } - - /// - /// Returns true if ValueReference instances are equal - /// - /// Instance of ValueReference to be compared - /// Boolean - public bool Equals(ValueReference input) - { - if (input == null) - return false; - return base.Equals(input) && - ( - this.Value == input.Value || - (this.Value != null && - this.Value.Equals(input.Value)) - ) && 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.Value != null) - hashCode = hashCode * 59 + this.Value.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(@"^ValueReference$", 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/PollinationSDK.csproj b/src/PollinationSDK/PollinationSDK.csproj index dd5cb4f64..b79233bd6 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.22.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.22.0.0 + 0.22.0.0 https://github.com/pollination/csharp-sdk true From 759d9c7a0055c949c692b9ae471e0c5efee2bd0b Mon Sep 17 00:00:00 2001 From: Antoine Dao Date: Thu, 6 Jan 2022 17:39:47 +0000 Subject: [PATCH 3/7] docs(sdk): delete SDK docs --- docs/APIToken.md | 16 - docs/APITokenCreate.md | 16 - docs/APITokenList.md | 19 - docs/APITokenPrivate.md | 14 - docs/APITokensApi.md | 346 -------- docs/AccessPolicy.md | 15 - docs/AccessPolicyList.md | 19 - docs/AccountPublic.md | 19 - docs/AccountsApi.md | 177 ---- docs/ArtifactSource.md | 14 - docs/ArtifactsApi.md | 363 -------- docs/BaseReference.md | 14 - docs/BaseStatus.md | 20 - docs/BodyPostPluginOwnerPluginsPost.md | 14 - docs/BodyPostRecipeOwnerRecipesPost.md | 14 - docs/CloudJob.md | 19 - docs/CloudJobList.md | 19 - docs/CreatedContent.md | 15 - docs/DAG.md | 19 - docs/DAGArrayInput.md | 21 - docs/DAGArrayInputAlias.md | 22 - docs/DAGArrayOutput.md | 20 - docs/DAGArrayOutputAlias.md | 15 - docs/DAGArtifactOutput.md | 15 - docs/DAGArtifactOutputAlias.md | 16 - docs/DAGBooleanInput.md | 20 - docs/DAGBooleanInputAlias.md | 21 - docs/DAGBooleanOutput.md | 19 - docs/DAGBooleanOutputAlias.md | 14 - docs/DAGFileInput.md | 21 - docs/DAGFileInputAlias.md | 22 - docs/DAGFileOutput.md | 19 - docs/DAGFileOutputAlias.md | 14 - docs/DAGFolderInput.md | 20 - docs/DAGFolderInputAlias.md | 21 - docs/DAGFolderOutput.md | 19 - docs/DAGFolderOutputAlias.md | 14 - docs/DAGGenericInput.md | 20 - docs/DAGGenericInputAlias.md | 21 - docs/DAGGenericOutput.md | 15 - docs/DAGGenericOutputAlias.md | 18 - docs/DAGIntegerInput.md | 20 - docs/DAGIntegerInputAlias.md | 21 - docs/DAGIntegerOutput.md | 19 - docs/DAGIntegerOutputAlias.md | 14 - docs/DAGJSONObjectInput.md | 20 - docs/DAGJSONObjectInputAlias.md | 21 - docs/DAGJSONObjectOutput.md | 19 - docs/DAGJSONObjectOutputAlias.md | 14 - docs/DAGLinkedInputAlias.md | 18 - docs/DAGLinkedOutputAlias.md | 15 - docs/DAGNumberInput.md | 20 - docs/DAGNumberInputAlias.md | 21 - docs/DAGNumberOutput.md | 19 - docs/DAGNumberOutputAlias.md | 14 - docs/DAGPathInput.md | 21 - docs/DAGPathInputAlias.md | 22 - docs/DAGPathOutput.md | 19 - docs/DAGPathOutputAlias.md | 14 - docs/DAGStringInput.md | 17 - docs/DAGStringInputAlias.md | 18 - docs/DAGStringOutput.md | 19 - docs/DAGStringOutputAlias.md | 14 - docs/DAGTask.md | 21 - docs/DAGTaskLoop.md | 15 - docs/DailyUsage.md | 18 - docs/Dependency.md | 20 - docs/DependencyKind.md | 12 - docs/DockerConfig.md | 17 - docs/FileMeta.md | 18 - docs/FileReference.md | 14 - docs/FolderReference.md | 14 - docs/FromOutput.md | 17 - docs/Function.md | 19 - docs/FunctionArrayInput.md | 21 - docs/FunctionArrayOutput.md | 14 - docs/FunctionBooleanInput.md | 20 - docs/FunctionBooleanOutput.md | 13 - docs/FunctionFileInput.md | 22 - docs/FunctionFileOutput.md | 15 - docs/FunctionFolderInput.md | 21 - docs/FunctionFolderOutput.md | 15 - docs/FunctionIntegerInput.md | 20 - docs/FunctionIntegerOutput.md | 13 - docs/FunctionJSONObjectInput.md | 20 - docs/FunctionJSONObjectOutput.md | 13 - docs/FunctionNumberInput.md | 20 - docs/FunctionNumberOutput.md | 13 - docs/FunctionPathInput.md | 22 - docs/FunctionPathOutput.md | 15 - docs/FunctionStringInput.md | 13 - docs/FunctionStringOutput.md | 13 - docs/GenericInput.md | 16 - docs/GenericOutput.md | 16 - docs/HTTP.md | 14 - docs/IOAliasHandler.md | 18 - docs/IOBase.md | 16 - docs/InputFileReference.md | 13 - docs/InputFolderReference.md | 13 - docs/InputPathReference.md | 13 - docs/InputReference.md | 13 - docs/InputReferenceBase.md | 14 - docs/ItemReference.md | 14 - docs/ItemType.md | 12 - docs/Job.md | 20 - docs/JobArgument.md | 16 - docs/JobPathArgument.md | 16 - docs/JobStatus.md | 26 - docs/JobStatusEnum.md | 12 - docs/JobsApi.md | 558 ------------ docs/KeyRequest.md | 14 - docs/License.md | 16 - docs/ListResponseMeta.md | 19 - docs/LocalConfig.md | 14 - docs/Maintainer.md | 16 - docs/MetaData.md | 25 - docs/NewPluginPackage.md | 15 - docs/NewRecipePackage.md | 15 - docs/OpenAPIGenBaseModel.md | 13 - docs/Organization.md | 23 - docs/OrganizationCreate.md | 18 - docs/OrganizationList.md | 19 - docs/OrganizationMember.md | 15 - docs/OrganizationMemberList.md | 19 - docs/OrganizationRoleEnum.md | 12 - docs/OrganizationUpdate.md | 18 - docs/OrgsApi.md | 709 --------------- docs/PackageVersion.md | 32 - docs/PathOutput.md | 18 - docs/Permission.md | 12 - docs/Plugin.md | 18 - docs/PluginConfig.md | 16 - docs/PluginPackage.md | 21 - docs/PluginPackageList.md | 19 - docs/PluginsApi.md | 1029 ---------------------- docs/PolicySubject.md | 15 - docs/Project.md | 21 - docs/ProjectAccessPolicy.md | 15 - docs/ProjectAccessPolicyList.md | 19 - docs/ProjectCreate.md | 16 - docs/ProjectFolder.md | 14 - docs/ProjectList.md | 19 - docs/ProjectPolicySubject.md | 15 - docs/ProjectRecipeFilter.md | 16 - docs/ProjectRecipeFilterList.md | 19 - docs/ProjectUpdate.md | 16 - docs/ProjectsApi.md | 1098 ------------------------ docs/PublicAccountList.md | 19 - docs/Recipe.md | 18 - docs/RecipeInterface.md | 19 - docs/RecipeInterfaceList.md | 19 - docs/RecipePackage.md | 21 - docs/RecipePackageList.md | 19 - docs/RecipesApi.md | 1029 ---------------------- docs/RegistriesApi.md | 438 ---------- docs/Repository.md | 19 - docs/RepositoryAccessPolicy.md | 15 - docs/RepositoryAccessPolicyList.md | 19 - docs/RepositoryCreate.md | 18 - docs/RepositoryIndex.md | 19 - docs/RepositoryList.md | 19 - docs/RepositoryMetadata.md | 19 - docs/RepositoryPackage.md | 20 - docs/RepositoryPolicySubject.md | 15 - docs/RepositoryUpdate.md | 17 - docs/RepositoryUserPermissions.md | 16 - docs/RoleEnum.md | 12 - docs/Run.md | 19 - docs/RunList.md | 19 - docs/RunResultList.md | 19 - docs/RunStatus.md | 26 - docs/RunStatusEnum.md | 12 - docs/RunsApi.md | 844 ------------------ docs/S3.md | 17 - docs/S3UploadRequest.md | 15 - docs/SortEnum.md | 12 - docs/StatusType.md | 12 - docs/StepArrayInput.md | 22 - docs/StepArrayOutput.md | 15 - docs/StepBooleanInput.md | 21 - docs/StepBooleanOutput.md | 14 - docs/StepFileInput.md | 23 - docs/StepFileOutput.md | 14 - docs/StepFolderInput.md | 22 - docs/StepFolderOutput.md | 14 - docs/StepIntegerInput.md | 21 - docs/StepIntegerOutput.md | 14 - docs/StepJSONObjectInput.md | 21 - docs/StepJSONObjectOutput.md | 14 - docs/StepList.md | 19 - docs/StepNumberInput.md | 21 - docs/StepNumberOutput.md | 14 - docs/StepPathInput.md | 23 - docs/StepPathOutput.md | 14 - docs/StepStatus.md | 29 - docs/StepStatusEnum.md | 12 - docs/StepStringInput.md | 14 - docs/StepStringOutput.md | 14 - docs/SubjectType.md | 12 - docs/TaskArgument.md | 16 - docs/TaskFileReference.md | 13 - docs/TaskFolderReference.md | 13 - docs/TaskPathArgument.md | 17 - docs/TaskPathReference.md | 13 - docs/TaskPathReturn.md | 15 - docs/TaskReference.md | 13 - docs/TaskReferenceBase.md | 15 - docs/TaskReturn.md | 16 - docs/Team.md | 16 - docs/TeamCreate.md | 15 - docs/TeamList.md | 19 - docs/TeamMember.md | 15 - docs/TeamMemberList.md | 19 - docs/TeamRoleEnum.md | 12 - docs/TeamUpdate.md | 15 - docs/TeamsApi.md | 711 --------------- docs/UpdateAccepted.md | 14 - docs/Usage.md | 20 - docs/UserApi.md | 336 -------- docs/UserCreate.md | 17 - docs/UserPermission.md | 16 - docs/UserPrivate.md | 19 - docs/UserPublic.md | 17 - docs/UserPublicList.md | 19 - docs/UserUpdate.md | 16 - docs/UsersApi.md | 241 ------ docs/ValueFileReference.md | 14 - docs/ValueFolderReference.md | 14 - docs/ValueListReference.md | 14 - docs/ValueReference.md | 14 - 230 files changed, 11590 deletions(-) delete mode 100644 docs/APIToken.md delete mode 100644 docs/APITokenCreate.md delete mode 100644 docs/APITokenList.md delete mode 100644 docs/APITokenPrivate.md delete mode 100644 docs/APITokensApi.md delete mode 100644 docs/AccessPolicy.md delete mode 100644 docs/AccessPolicyList.md delete mode 100644 docs/AccountPublic.md delete mode 100644 docs/AccountsApi.md delete mode 100644 docs/ArtifactSource.md delete mode 100644 docs/ArtifactsApi.md delete mode 100644 docs/BaseReference.md delete mode 100644 docs/BaseStatus.md delete mode 100644 docs/BodyPostPluginOwnerPluginsPost.md delete mode 100644 docs/BodyPostRecipeOwnerRecipesPost.md delete mode 100644 docs/CloudJob.md delete mode 100644 docs/CloudJobList.md delete mode 100644 docs/CreatedContent.md delete mode 100644 docs/DAG.md delete mode 100644 docs/DAGArrayInput.md delete mode 100644 docs/DAGArrayInputAlias.md delete mode 100644 docs/DAGArrayOutput.md delete mode 100644 docs/DAGArrayOutputAlias.md delete mode 100644 docs/DAGArtifactOutput.md delete mode 100644 docs/DAGArtifactOutputAlias.md delete mode 100644 docs/DAGBooleanInput.md delete mode 100644 docs/DAGBooleanInputAlias.md delete mode 100644 docs/DAGBooleanOutput.md delete mode 100644 docs/DAGBooleanOutputAlias.md delete mode 100644 docs/DAGFileInput.md delete mode 100644 docs/DAGFileInputAlias.md delete mode 100644 docs/DAGFileOutput.md delete mode 100644 docs/DAGFileOutputAlias.md delete mode 100644 docs/DAGFolderInput.md delete mode 100644 docs/DAGFolderInputAlias.md delete mode 100644 docs/DAGFolderOutput.md delete mode 100644 docs/DAGFolderOutputAlias.md delete mode 100644 docs/DAGGenericInput.md delete mode 100644 docs/DAGGenericInputAlias.md delete mode 100644 docs/DAGGenericOutput.md delete mode 100644 docs/DAGGenericOutputAlias.md delete mode 100644 docs/DAGIntegerInput.md delete mode 100644 docs/DAGIntegerInputAlias.md delete mode 100644 docs/DAGIntegerOutput.md delete mode 100644 docs/DAGIntegerOutputAlias.md delete mode 100644 docs/DAGJSONObjectInput.md delete mode 100644 docs/DAGJSONObjectInputAlias.md delete mode 100644 docs/DAGJSONObjectOutput.md delete mode 100644 docs/DAGJSONObjectOutputAlias.md delete mode 100644 docs/DAGLinkedInputAlias.md delete mode 100644 docs/DAGLinkedOutputAlias.md delete mode 100644 docs/DAGNumberInput.md delete mode 100644 docs/DAGNumberInputAlias.md delete mode 100644 docs/DAGNumberOutput.md delete mode 100644 docs/DAGNumberOutputAlias.md delete mode 100644 docs/DAGPathInput.md delete mode 100644 docs/DAGPathInputAlias.md delete mode 100644 docs/DAGPathOutput.md delete mode 100644 docs/DAGPathOutputAlias.md delete mode 100644 docs/DAGStringInput.md delete mode 100644 docs/DAGStringInputAlias.md delete mode 100644 docs/DAGStringOutput.md delete mode 100644 docs/DAGStringOutputAlias.md delete mode 100644 docs/DAGTask.md delete mode 100644 docs/DAGTaskLoop.md delete mode 100644 docs/DailyUsage.md delete mode 100644 docs/Dependency.md delete mode 100644 docs/DependencyKind.md delete mode 100644 docs/DockerConfig.md delete mode 100644 docs/FileMeta.md delete mode 100644 docs/FileReference.md delete mode 100644 docs/FolderReference.md delete mode 100644 docs/FromOutput.md delete mode 100644 docs/Function.md delete mode 100644 docs/FunctionArrayInput.md delete mode 100644 docs/FunctionArrayOutput.md delete mode 100644 docs/FunctionBooleanInput.md delete mode 100644 docs/FunctionBooleanOutput.md delete mode 100644 docs/FunctionFileInput.md delete mode 100644 docs/FunctionFileOutput.md delete mode 100644 docs/FunctionFolderInput.md delete mode 100644 docs/FunctionFolderOutput.md delete mode 100644 docs/FunctionIntegerInput.md delete mode 100644 docs/FunctionIntegerOutput.md delete mode 100644 docs/FunctionJSONObjectInput.md delete mode 100644 docs/FunctionJSONObjectOutput.md delete mode 100644 docs/FunctionNumberInput.md delete mode 100644 docs/FunctionNumberOutput.md delete mode 100644 docs/FunctionPathInput.md delete mode 100644 docs/FunctionPathOutput.md delete mode 100644 docs/FunctionStringInput.md delete mode 100644 docs/FunctionStringOutput.md delete mode 100644 docs/GenericInput.md delete mode 100644 docs/GenericOutput.md delete mode 100644 docs/HTTP.md delete mode 100644 docs/IOAliasHandler.md delete mode 100644 docs/IOBase.md delete mode 100644 docs/InputFileReference.md delete mode 100644 docs/InputFolderReference.md delete mode 100644 docs/InputPathReference.md delete mode 100644 docs/InputReference.md delete mode 100644 docs/InputReferenceBase.md delete mode 100644 docs/ItemReference.md delete mode 100644 docs/ItemType.md delete mode 100644 docs/Job.md delete mode 100644 docs/JobArgument.md delete mode 100644 docs/JobPathArgument.md delete mode 100644 docs/JobStatus.md delete mode 100644 docs/JobStatusEnum.md delete mode 100644 docs/JobsApi.md delete mode 100644 docs/KeyRequest.md delete mode 100644 docs/License.md delete mode 100644 docs/ListResponseMeta.md delete mode 100644 docs/LocalConfig.md delete mode 100644 docs/Maintainer.md delete mode 100644 docs/MetaData.md delete mode 100644 docs/NewPluginPackage.md delete mode 100644 docs/NewRecipePackage.md delete mode 100644 docs/OpenAPIGenBaseModel.md delete mode 100644 docs/Organization.md delete mode 100644 docs/OrganizationCreate.md delete mode 100644 docs/OrganizationList.md delete mode 100644 docs/OrganizationMember.md delete mode 100644 docs/OrganizationMemberList.md delete mode 100644 docs/OrganizationRoleEnum.md delete mode 100644 docs/OrganizationUpdate.md delete mode 100644 docs/OrgsApi.md delete mode 100644 docs/PackageVersion.md delete mode 100644 docs/PathOutput.md delete mode 100644 docs/Permission.md delete mode 100644 docs/Plugin.md delete mode 100644 docs/PluginConfig.md delete mode 100644 docs/PluginPackage.md delete mode 100644 docs/PluginPackageList.md delete mode 100644 docs/PluginsApi.md delete mode 100644 docs/PolicySubject.md delete mode 100644 docs/Project.md delete mode 100644 docs/ProjectAccessPolicy.md delete mode 100644 docs/ProjectAccessPolicyList.md delete mode 100644 docs/ProjectCreate.md delete mode 100644 docs/ProjectFolder.md delete mode 100644 docs/ProjectList.md delete mode 100644 docs/ProjectPolicySubject.md delete mode 100644 docs/ProjectRecipeFilter.md delete mode 100644 docs/ProjectRecipeFilterList.md delete mode 100644 docs/ProjectUpdate.md delete mode 100644 docs/ProjectsApi.md delete mode 100644 docs/PublicAccountList.md delete mode 100644 docs/Recipe.md delete mode 100644 docs/RecipeInterface.md delete mode 100644 docs/RecipeInterfaceList.md delete mode 100644 docs/RecipePackage.md delete mode 100644 docs/RecipePackageList.md delete mode 100644 docs/RecipesApi.md delete mode 100644 docs/RegistriesApi.md delete mode 100644 docs/Repository.md delete mode 100644 docs/RepositoryAccessPolicy.md delete mode 100644 docs/RepositoryAccessPolicyList.md delete mode 100644 docs/RepositoryCreate.md delete mode 100644 docs/RepositoryIndex.md delete mode 100644 docs/RepositoryList.md delete mode 100644 docs/RepositoryMetadata.md delete mode 100644 docs/RepositoryPackage.md delete mode 100644 docs/RepositoryPolicySubject.md delete mode 100644 docs/RepositoryUpdate.md delete mode 100644 docs/RepositoryUserPermissions.md delete mode 100644 docs/RoleEnum.md delete mode 100644 docs/Run.md delete mode 100644 docs/RunList.md delete mode 100644 docs/RunResultList.md delete mode 100644 docs/RunStatus.md delete mode 100644 docs/RunStatusEnum.md delete mode 100644 docs/RunsApi.md delete mode 100644 docs/S3.md delete mode 100644 docs/S3UploadRequest.md delete mode 100644 docs/SortEnum.md delete mode 100644 docs/StatusType.md delete mode 100644 docs/StepArrayInput.md delete mode 100644 docs/StepArrayOutput.md delete mode 100644 docs/StepBooleanInput.md delete mode 100644 docs/StepBooleanOutput.md delete mode 100644 docs/StepFileInput.md delete mode 100644 docs/StepFileOutput.md delete mode 100644 docs/StepFolderInput.md delete mode 100644 docs/StepFolderOutput.md delete mode 100644 docs/StepIntegerInput.md delete mode 100644 docs/StepIntegerOutput.md delete mode 100644 docs/StepJSONObjectInput.md delete mode 100644 docs/StepJSONObjectOutput.md delete mode 100644 docs/StepList.md delete mode 100644 docs/StepNumberInput.md delete mode 100644 docs/StepNumberOutput.md delete mode 100644 docs/StepPathInput.md delete mode 100644 docs/StepPathOutput.md delete mode 100644 docs/StepStatus.md delete mode 100644 docs/StepStatusEnum.md delete mode 100644 docs/StepStringInput.md delete mode 100644 docs/StepStringOutput.md delete mode 100644 docs/SubjectType.md delete mode 100644 docs/TaskArgument.md delete mode 100644 docs/TaskFileReference.md delete mode 100644 docs/TaskFolderReference.md delete mode 100644 docs/TaskPathArgument.md delete mode 100644 docs/TaskPathReference.md delete mode 100644 docs/TaskPathReturn.md delete mode 100644 docs/TaskReference.md delete mode 100644 docs/TaskReferenceBase.md delete mode 100644 docs/TaskReturn.md delete mode 100644 docs/Team.md delete mode 100644 docs/TeamCreate.md delete mode 100644 docs/TeamList.md delete mode 100644 docs/TeamMember.md delete mode 100644 docs/TeamMemberList.md delete mode 100644 docs/TeamRoleEnum.md delete mode 100644 docs/TeamUpdate.md delete mode 100644 docs/TeamsApi.md delete mode 100644 docs/UpdateAccepted.md delete mode 100644 docs/Usage.md delete mode 100644 docs/UserApi.md delete mode 100644 docs/UserCreate.md delete mode 100644 docs/UserPermission.md delete mode 100644 docs/UserPrivate.md delete mode 100644 docs/UserPublic.md delete mode 100644 docs/UserPublicList.md delete mode 100644 docs/UserUpdate.md delete mode 100644 docs/UsersApi.md delete mode 100644 docs/ValueFileReference.md delete mode 100644 docs/ValueFolderReference.md delete mode 100644 docs/ValueListReference.md delete mode 100644 docs/ValueReference.md diff --git a/docs/APIToken.md b/docs/APIToken.md deleted file mode 100644 index 17e3116cb..000000000 --- a/docs/APIToken.md +++ /dev/null @@ -1,16 +0,0 @@ - -# PollinationSDK.Model.APIToken - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**TokenId** | **string** | The unique ID of this API token | -**Name** | **string** | The user friendly name of the API token | -**Claims** | **Dictionary<string, string>** | Key value pairs of auth claims the API token is entitled to | [optional] -**Type** | **string** | | [optional] [readonly] [default to "APIToken"] - -[[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/APITokenCreate.md b/docs/APITokenCreate.md deleted file mode 100644 index 33cf59dae..000000000 --- a/docs/APITokenCreate.md +++ /dev/null @@ -1,16 +0,0 @@ - -# PollinationSDK.Model.APITokenCreate - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**TokenId** | **string** | The unique ID of this API token | -**Name** | **string** | The user friendly name of the API token | -**Claims** | **Dictionary<string, string>** | Key value pairs of auth claims the API token is entitled to | [optional] -**Type** | **string** | | [optional] [readonly] [default to "APITokenCreate"] - -[[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/APITokenList.md b/docs/APITokenList.md deleted file mode 100644 index f324aca90..000000000 --- a/docs/APITokenList.md +++ /dev/null @@ -1,19 +0,0 @@ - -# PollinationSDK.Model.APITokenList - -## 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<APIToken>**](APIToken.md) | | -**NextPage** | **int** | The next page, if this on is not the last | [optional] -**Type** | **string** | | [optional] [readonly] [default to "APITokenList"] - -[[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/APITokenPrivate.md b/docs/APITokenPrivate.md deleted file mode 100644 index 70c719cf7..000000000 --- a/docs/APITokenPrivate.md +++ /dev/null @@ -1,14 +0,0 @@ - -# PollinationSDK.Model.APITokenPrivate - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Token** | **string** | The decoded API token | -**Type** | **string** | | [optional] [readonly] [default to "APITokenPrivate"] - -[[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/APITokensApi.md b/docs/APITokensApi.md deleted file mode 100644 index 9bc7b3181..000000000 --- a/docs/APITokensApi.md +++ /dev/null @@ -1,346 +0,0 @@ -# PollinationSDK.Api.APITokensApi - -All URIs are relative to *http://localhost* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**CreateToken**](APITokensApi.md#createtoken) | **POST** /tokens | Create a new API token -[**DeleteToken**](APITokensApi.md#deletetoken) | **DELETE** /tokens/{token_id} | Delete an API Token -[**ListTokens**](APITokensApi.md#listtokens) | **GET** /tokens | List user API tokens -[**RegenerateToken**](APITokensApi.md#regeneratetoken) | **PUT** /tokens/{token_id} | Regenerate an API token - - - -## CreateToken - -> APITokenPrivate CreateToken (APITokenCreate aPITokenCreate) - -Create a new API token - -Create a new API token - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using PollinationSDK.Api; -using PollinationSDK.Client; -using PollinationSDK.Model; - -namespace Example -{ - public class CreateTokenExample - { - 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 APITokensApi(Configuration.Default); - var aPITokenCreate = new APITokenCreate(); // APITokenCreate | - - try - { - // Create a new API token - APITokenPrivate result = apiInstance.CreateToken(aPITokenCreate); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling APITokensApi.CreateToken: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **aPITokenCreate** | [**APITokenCreate**](APITokenCreate.md)| | - -### Return type - -[**APITokenPrivate**](APITokenPrivate.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 | -|-------------|-------------|------------------| -| **201** | 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) - - -## DeleteToken - -> AnyType DeleteToken (string tokenId) - -Delete an API Token - -Delete a token - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using PollinationSDK.Api; -using PollinationSDK.Client; -using PollinationSDK.Model; - -namespace Example -{ - public class DeleteTokenExample - { - 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 APITokensApi(Configuration.Default); - var tokenId = tokenId_example; // string | - - try - { - // Delete an API Token - AnyType result = apiInstance.DeleteToken(tokenId); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling APITokensApi.DeleteToken: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **tokenId** | **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** | 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) - - -## ListTokens - -> APITokenList ListTokens (int? page = null, int? perPage = null) - -List user API tokens - -List API tokens for the authenticated user - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using PollinationSDK.Api; -using PollinationSDK.Client; -using PollinationSDK.Model; - -namespace Example -{ - public class ListTokensExample - { - 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 APITokensApi(Configuration.Default); - 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 user API tokens - APITokenList result = apiInstance.ListTokens(page, perPage); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling APITokensApi.ListTokens: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **page** | **int?**| Page number starting from 1 | [optional] [default to 1] - **perPage** | **int?**| Number of items per page | [optional] [default to 25] - -### Return type - -[**APITokenList**](APITokenList.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) - - -## RegenerateToken - -> APITokenPrivate RegenerateToken (string tokenId) - -Regenerate an API token - -Regenerate a token - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using PollinationSDK.Api; -using PollinationSDK.Client; -using PollinationSDK.Model; - -namespace Example -{ - public class RegenerateTokenExample - { - 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 APITokensApi(Configuration.Default); - var tokenId = tokenId_example; // string | - - try - { - // Regenerate an API token - APITokenPrivate result = apiInstance.RegenerateToken(tokenId); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling APITokensApi.RegenerateToken: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **tokenId** | **string**| | - -### Return type - -[**APITokenPrivate**](APITokenPrivate.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 | -|-------------|-------------|------------------| -| **201** | 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/AccessPolicy.md b/docs/AccessPolicy.md deleted file mode 100644 index 759e89854..000000000 --- a/docs/AccessPolicy.md +++ /dev/null @@ -1,15 +0,0 @@ - -# PollinationSDK.Model.AccessPolicy - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Subject** | [**PolicySubject**](PolicySubject.md) | The subject of the access policy | -**Permission** | **Permission** | The permission given to the subject of the access policy | -**Type** | **string** | | [optional] [readonly] [default to "AccessPolicy"] - -[[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/AccessPolicyList.md b/docs/AccessPolicyList.md deleted file mode 100644 index 37fbd5f88..000000000 --- a/docs/AccessPolicyList.md +++ /dev/null @@ -1,19 +0,0 @@ - -# PollinationSDK.Model.AccessPolicyList - -## 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<AccessPolicy>**](AccessPolicy.md) | | -**NextPage** | **int** | The next page, if this on is not the last | [optional] -**Type** | **string** | | [optional] [readonly] [default to "AccessPolicyList"] - -[[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/AccountPublic.md b/docs/AccountPublic.md deleted file mode 100644 index 123db7a3c..000000000 --- a/docs/AccountPublic.md +++ /dev/null @@ -1,19 +0,0 @@ - -# PollinationSDK.Model.AccountPublic - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Id** | **string** | | -**AccountType** | **string** | | -**Name** | **string** | | -**DisplayName** | **string** | | [optional] -**Description** | **string** | | [optional] -**PictureUrl** | **string** | https://robohash.org/ladybugbot | [optional] -**Type** | **string** | | [optional] [readonly] [default to "AccountPublic"] - -[[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 deleted file mode 100644 index 1c5c0435c..000000000 --- a/docs/AccountsApi.md +++ /dev/null @@ -1,177 +0,0 @@ -# PollinationSDK.Api.AccountsApi - -All URIs are relative to *http://localhost* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**GetAccount**](AccountsApi.md#getaccount) | **GET** /accounts/{name} | Get an account by name -[**ListAccounts**](AccountsApi.md#listaccounts) | **GET** /accounts | List Accounts on the Pollination platform - - - -## GetAccount - -> AccountPublic GetAccount (string name) - -Get an account by name - -Retrieve an account by name - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using PollinationSDK.Api; -using PollinationSDK.Client; -using PollinationSDK.Model; - -namespace Example -{ - public class GetAccountExample - { - public static void Main() - { - Configuration.Default.BasePath = "http://localhost"; - var apiInstance = new AccountsApi(Configuration.Default); - var name = name_example; // string | - - try - { - // Get an account by name - AccountPublic result = apiInstance.GetAccount(name); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling AccountsApi.GetAccount: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **name** | **string**| | - -### Return type - -[**AccountPublic**](AccountPublic.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Retrieved | - | -| **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) - - -## ListAccounts - -> PublicAccountList ListAccounts (string search = null, string type = null, RoleEnum? role = null, int? page = null, int? perPage = null) - -List Accounts on the Pollination platform - -List accounts - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using PollinationSDK.Api; -using PollinationSDK.Client; -using PollinationSDK.Model; - -namespace Example -{ - public class ListAccountsExample - { - 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 search = search_example; // string | Search string to find accounts (optional) - var type = type_example; // string | Whether the account is for a user or an org (optional) - var role = ; // RoleEnum? | The role the user has in relation to this account (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 Accounts on the Pollination platform - PublicAccountList result = apiInstance.ListAccounts(search, type, role, page, perPage); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling AccountsApi.ListAccounts: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **search** | **string**| Search string to find accounts | [optional] - **type** | **string**| Whether the account is for a user or an org | [optional] - **role** | **RoleEnum?**| The role the user has in relation to this account | [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 - -[**PublicAccountList**](PublicAccountList.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 | - | -| **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/ArtifactSource.md b/docs/ArtifactSource.md deleted file mode 100644 index ec2495bb4..000000000 --- a/docs/ArtifactSource.md +++ /dev/null @@ -1,14 +0,0 @@ - -# PollinationSDK.Model.ArtifactSource - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Type** | **string** | | [optional] [readonly] [default to "_ArtifactSource"] -**Annotations** | **Dictionary<string, string>** | An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries. | [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/ArtifactsApi.md b/docs/ArtifactsApi.md deleted file mode 100644 index f7ed1a535..000000000 --- a/docs/ArtifactsApi.md +++ /dev/null @@ -1,363 +0,0 @@ -# PollinationSDK.Api.ArtifactsApi - -All URIs are relative to *http://localhost* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**CreateArtifact**](ArtifactsApi.md#createartifact) | **POST** /projects/{owner}/{name}/artifacts | Get an Artifact upload link. -[**DeleteArtifact**](ArtifactsApi.md#deleteartifact) | **DELETE** /projects/{owner}/{name}/artifacts | Delete one or many artifacts by key/prefix -[**DownloadArtifact**](ArtifactsApi.md#downloadartifact) | **GET** /projects/{owner}/{name}/artifacts/download | Download an artifact from the project folder -[**ListArtifacts**](ArtifactsApi.md#listartifacts) | **GET** /projects/{owner}/{name}/artifacts | List artifacts in a project folder - - - -## CreateArtifact - -> S3UploadRequest CreateArtifact (string owner, string name, KeyRequest keyRequest) - -Get an Artifact upload link. - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using PollinationSDK.Api; -using PollinationSDK.Client; -using PollinationSDK.Model; - -namespace Example -{ - public class CreateArtifactExample - { - 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 ArtifactsApi(Configuration.Default); - var owner = owner_example; // string | - var name = name_example; // string | - var keyRequest = new KeyRequest(); // KeyRequest | - - try - { - // Get an Artifact upload link. - S3UploadRequest result = apiInstance.CreateArtifact(owner, name, keyRequest); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling ArtifactsApi.CreateArtifact: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **owner** | **string**| | - **name** | **string**| | - **keyRequest** | [**KeyRequest**](KeyRequest.md)| | - -### Return type - -[**S3UploadRequest**](S3UploadRequest.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) - - -## DeleteArtifact - -> void DeleteArtifact (string owner, string name, List path = null, int? page = null, int? perPage = null) - -Delete one or many artifacts by key/prefix - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using PollinationSDK.Api; -using PollinationSDK.Client; -using PollinationSDK.Model; - -namespace Example -{ - public class DeleteArtifactExample - { - 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 ArtifactsApi(Configuration.Default); - var owner = owner_example; // string | - var name = name_example; // string | - var path = new List(); // List | The path to an file within a project folder (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 - { - // Delete one or many artifacts by key/prefix - apiInstance.DeleteArtifact(owner, name, path, page, perPage); - } - catch (ApiException e) - { - Debug.Print("Exception when calling ArtifactsApi.DeleteArtifact: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **owner** | **string**| | - **name** | **string**| | - **path** | [**List<string>**](string.md)| The path to an file within a project folder | [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 - -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) - - -## DownloadArtifact - -> AnyType DownloadArtifact (string owner, string name, string path = null) - -Download an artifact from the project folder - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using PollinationSDK.Api; -using PollinationSDK.Client; -using PollinationSDK.Model; - -namespace Example -{ - public class DownloadArtifactExample - { - 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 ArtifactsApi(Configuration.Default); - var owner = owner_example; // string | - var name = name_example; // string | - var path = path_example; // string | The path to an file within a project folder (optional) - - try - { - // Download an artifact from the project folder - AnyType result = apiInstance.DownloadArtifact(owner, name, path); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling ArtifactsApi.DownloadArtifact: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **owner** | **string**| | - **name** | **string**| | - **path** | **string**| The path to an file within a project folder | [optional] - -### 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** | Retrieved | - | -| **403** | Access forbidden | - | -| **500** | Server error | - | -| **400** | Invalid request | - | -| **404** | Not found | - | -| **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) - - -## ListArtifacts - -> List<FileMeta> ListArtifacts (string owner, string name, List path = null, int? page = null, int? perPage = null) - -List artifacts in a project folder - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using PollinationSDK.Api; -using PollinationSDK.Client; -using PollinationSDK.Model; - -namespace Example -{ - public class ListArtifactsExample - { - 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 ArtifactsApi(Configuration.Default); - var owner = owner_example; // string | - var name = name_example; // string | - var path = new List(); // List | The path to an file within a project folder (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 artifacts in a project folder - List result = apiInstance.ListArtifacts(owner, name, path, page, perPage); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling ArtifactsApi.ListArtifacts: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **owner** | **string**| | - **name** | **string**| | - **path** | [**List<string>**](string.md)| The path to an file within a project folder | [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 - -[**List<FileMeta>**](FileMeta.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 | - | -| **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/BaseReference.md b/docs/BaseReference.md deleted file mode 100644 index 0dfe2a4b3..000000000 --- a/docs/BaseReference.md +++ /dev/null @@ -1,14 +0,0 @@ - -# PollinationSDK.Model.BaseReference - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Type** | **string** | | [optional] [readonly] [default to "_BaseReference"] -**Annotations** | **Dictionary<string, string>** | An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries. | [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/BaseStatus.md b/docs/BaseStatus.md deleted file mode 100644 index d88a51243..000000000 --- a/docs/BaseStatus.md +++ /dev/null @@ -1,20 +0,0 @@ - -# PollinationSDK.Model.BaseStatus - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**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<AnyType>**](AnyType.md) | Place-holder. Overwrite this! | [optional] -**Outputs** | [**List<AnyType>**](AnyType.md) | Place-holder. Overwrite this! | [optional] -**StartedAt** | **DateTime** | The time at which the task was started | -**Message** | **string** | Any message produced by the task. Usually error/debugging hints. | [optional] -**FinishedAt** | **DateTime** | The time at which the task was completed | [optional] -**Source** | **string** | Source url for the status object. It can be a recipe or a function. | [optional] -**Type** | **string** | | [optional] [readonly] [default to "BaseStatus"] - -[[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/BodyPostPluginOwnerPluginsPost.md b/docs/BodyPostPluginOwnerPluginsPost.md deleted file mode 100644 index 83f4f208a..000000000 --- a/docs/BodyPostPluginOwnerPluginsPost.md +++ /dev/null @@ -1,14 +0,0 @@ - -# PollinationSDK.Model.BodyPostPluginOwnerPluginsPost - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Package** | **System.IO.Stream** | | -**Type** | **string** | | [optional] [readonly] [default to "Body_post_plugin__owner__plugins_post"] - -[[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/BodyPostRecipeOwnerRecipesPost.md b/docs/BodyPostRecipeOwnerRecipesPost.md deleted file mode 100644 index 51823c7b9..000000000 --- a/docs/BodyPostRecipeOwnerRecipesPost.md +++ /dev/null @@ -1,14 +0,0 @@ - -# PollinationSDK.Model.BodyPostRecipeOwnerRecipesPost - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Package** | **System.IO.Stream** | | -**Type** | **string** | | [optional] [readonly] [default to "Body_post_recipe__owner__recipes_post"] - -[[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/CloudJob.md b/docs/CloudJob.md deleted file mode 100644 index a7d3b422d..000000000 --- a/docs/CloudJob.md +++ /dev/null @@ -1,19 +0,0 @@ - -# PollinationSDK.Model.CloudJob - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Id** | **string** | The unique ID for this run | -**Spec** | [**Job**](Job.md) | The job specification | -**Author** | [**AccountPublic**](AccountPublic.md) | author | [optional] -**Owner** | [**AccountPublic**](AccountPublic.md) | owner | [optional] -**Recipe** | [**RecipeInterface**](RecipeInterface.md) | The recipe used to generate this | [optional] -**Status** | [**JobStatus**](JobStatus.md) | The status of the job | [optional] -**Type** | **string** | | [optional] [readonly] [default to "CloudJob"] - -[[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/CloudJobList.md b/docs/CloudJobList.md deleted file mode 100644 index a1380f6d8..000000000 --- a/docs/CloudJobList.md +++ /dev/null @@ -1,19 +0,0 @@ - -# PollinationSDK.Model.CloudJobList - -## 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<CloudJob>**](CloudJob.md) | | -**NextPage** | **int** | The next page, if this on is not the last | [optional] -**Type** | **string** | | [optional] [readonly] [default to "CloudJobList"] - -[[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/CreatedContent.md b/docs/CreatedContent.md deleted file mode 100644 index cb0f3f8f4..000000000 --- a/docs/CreatedContent.md +++ /dev/null @@ -1,15 +0,0 @@ - -# PollinationSDK.Model.CreatedContent - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Id** | **Guid** | Id for the newly created resource. | -**Message** | **string** | A human readable message | [optional] -**Type** | **string** | | [optional] [readonly] [default to "CreatedContent"] - -[[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/DAG.md b/docs/DAG.md deleted file mode 100644 index 5de5d74d7..000000000 --- a/docs/DAG.md +++ /dev/null @@ -1,19 +0,0 @@ - -# PollinationSDK.Model.DAG - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Name** | **string** | A unique name for this dag. | -**Tasks** | [**List<DAGTask>**](DAGTask.md) | Tasks are a list of DAG steps | -**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<AnyOfDAGGenericInputDAGStringInputDAGIntegerInputDAGNumberInputDAGBooleanInputDAGFolderInputDAGFileInputDAGPathInputDAGArrayInputDAGJSONObjectInput>**](AnyOfDAGGenericInputDAGStringInputDAGIntegerInputDAGNumberInputDAGBooleanInputDAGFolderInputDAGFileInputDAGPathInputDAGArrayInputDAGJSONObjectInput.md) | Inputs for the DAG. | [optional] -**Outputs** | [**List<AnyOfDAGGenericOutputDAGStringOutputDAGIntegerOutputDAGNumberOutputDAGBooleanOutputDAGFolderOutputDAGFileOutputDAGPathOutputDAGArrayOutputDAGJSONObjectOutput>**](AnyOfDAGGenericOutputDAGStringOutputDAGIntegerOutputDAGNumberOutputDAGBooleanOutputDAGFolderOutputDAGFileOutputDAGPathOutputDAGArrayOutputDAGJSONObjectOutput.md) | Outputs of the DAG that can be used by other DAGs. | [optional] -**FailFast** | **bool** | Stop scheduling new steps, as soon as it detects that one of the DAG nodes is failed. Default is True. | [optional] [default to true] -**Type** | **string** | | [optional] [readonly] [default to "DAG"] - -[[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/DAGArrayInput.md b/docs/DAGArrayInput.md deleted file mode 100644 index b5257b2e1..000000000 --- a/docs/DAGArrayInput.md +++ /dev/null @@ -1,21 +0,0 @@ - -# PollinationSDK.Model.DAGArrayInput - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Name** | **string** | Input name. | -**Annotations** | **Dictionary<string, string>** | An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries. | [optional] -**Description** | **string** | Optional description for input. | [optional] -**Default** | [**List<AnyType>**](AnyType.md) | Default value to use for an input if a value was not supplied. | [optional] -**Alias** | [**List<AnyOfDAGGenericInputAliasDAGStringInputAliasDAGIntegerInputAliasDAGNumberInputAliasDAGBooleanInputAliasDAGFolderInputAliasDAGFileInputAliasDAGPathInputAliasDAGArrayInputAliasDAGJSONObjectInputAliasDAGLinkedInputAlias>**](AnyOfDAGGenericInputAliasDAGStringInputAliasDAGIntegerInputAliasDAGNumberInputAliasDAGBooleanInputAliasDAGFolderInputAliasDAGFileInputAliasDAGPathInputAliasDAGArrayInputAliasDAGJSONObjectInputAliasDAGLinkedInputAlias.md) | A list of aliases for this input in different platforms. | [optional] -**Required** | **bool** | A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. | [optional] [default to false] -**Spec** | **Object** | An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec. | [optional] -**ItemsType** | **ItemType** | Type of items in an array. All the items in an array must be from the same type. | [optional] -**Type** | **string** | | [optional] [readonly] [default to "DAGArrayInput"] - -[[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/DAGArrayInputAlias.md b/docs/DAGArrayInputAlias.md deleted file mode 100644 index 876ed5a69..000000000 --- a/docs/DAGArrayInputAlias.md +++ /dev/null @@ -1,22 +0,0 @@ - -# PollinationSDK.Model.DAGArrayInputAlias - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Name** | **string** | Input name. | -**Annotations** | **Dictionary<string, string>** | An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries. | [optional] -**Description** | **string** | Optional description for input. | [optional] -**Platform** | **List<string>** | 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. | -**Handler** | [**List<IOAliasHandler>**](IOAliasHandler.md) | List of process actions to process the input or output value. | -**Default** | [**List<AnyType>**](AnyType.md) | Default value to use for an input if a value was not supplied. | [optional] -**Required** | **bool** | A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. | [optional] [default to false] -**Spec** | **Object** | An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec. | [optional] -**ItemsType** | **ItemType** | Type of items in an array. All the items in an array must be from the same type. | [optional] -**Type** | **string** | | [optional] [readonly] [default to "DAGArrayInputAlias"] - -[[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/DAGArrayOutput.md b/docs/DAGArrayOutput.md deleted file mode 100644 index 6c7781ea2..000000000 --- a/docs/DAGArrayOutput.md +++ /dev/null @@ -1,20 +0,0 @@ - -# PollinationSDK.Model.DAGArrayOutput - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Name** | **string** | Output name. | -**Annotations** | **Dictionary<string, string>** | An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries. | [optional] -**Description** | **string** | Optional description for output. | [optional] -**From** | [**AnyOfTaskReferenceFileReference**](AnyOfTaskReferenceFileReference.md) | Reference to a file or a task output. Task output must be file. | -**Alias** | [**List<AnyOfDAGGenericOutputAliasDAGStringOutputAliasDAGIntegerOutputAliasDAGNumberOutputAliasDAGBooleanOutputAliasDAGFolderOutputAliasDAGFileOutputAliasDAGPathOutputAliasDAGArrayOutputAliasDAGJSONObjectOutputAliasDAGLinkedOutputAlias>**](AnyOfDAGGenericOutputAliasDAGStringOutputAliasDAGIntegerOutputAliasDAGNumberOutputAliasDAGBooleanOutputAliasDAGFolderOutputAliasDAGFileOutputAliasDAGPathOutputAliasDAGArrayOutputAliasDAGJSONObjectOutputAliasDAGLinkedOutputAlias.md) | A list of additional processes for loading this output on different platforms. | [optional] -**Required** | **bool** | A boolean to indicate if an artifact output is required. A False value makes the artifact optional. | [optional] [default to true] -**ItemsType** | **ItemType** | Type of items in this array. All the items in an array must be from the same type. | [optional] -**Type** | **string** | | [optional] [readonly] [default to "DAGArrayOutput"] - -[[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/DAGArrayOutputAlias.md b/docs/DAGArrayOutputAlias.md deleted file mode 100644 index b77b4489b..000000000 --- a/docs/DAGArrayOutputAlias.md +++ /dev/null @@ -1,15 +0,0 @@ - -# PollinationSDK.Model.DAGArrayOutputAlias - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**From** | [**AnyOfTaskReferenceFileReference**](AnyOfTaskReferenceFileReference.md) | Reference to a file or a task output. Task output must be file. | -**ItemsType** | **ItemType** | Type of items in this array. All the items in an array must be from the same type. | [optional] -**Type** | **string** | | [optional] [readonly] [default to "DAGArrayOutputAlias"] - -[[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/DAGArtifactOutput.md b/docs/DAGArtifactOutput.md deleted file mode 100644 index 01bcc294e..000000000 --- a/docs/DAGArtifactOutput.md +++ /dev/null @@ -1,15 +0,0 @@ - -# PollinationSDK.Model.DAGArtifactOutput - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Alias** | [**List<AnyOfDAGGenericOutputAliasDAGStringOutputAliasDAGIntegerOutputAliasDAGNumberOutputAliasDAGBooleanOutputAliasDAGFolderOutputAliasDAGFileOutputAliasDAGPathOutputAliasDAGArrayOutputAliasDAGJSONObjectOutputAliasDAGLinkedOutputAlias>**](AnyOfDAGGenericOutputAliasDAGStringOutputAliasDAGIntegerOutputAliasDAGNumberOutputAliasDAGBooleanOutputAliasDAGFolderOutputAliasDAGFileOutputAliasDAGPathOutputAliasDAGArrayOutputAliasDAGJSONObjectOutputAliasDAGLinkedOutputAlias.md) | A list of additional processes for loading this output on different platforms. | [optional] -**Required** | **bool** | A boolean to indicate if an artifact output is required. A False value makes the artifact optional. | [optional] [default to true] -**Type** | **string** | | [optional] [readonly] [default to "DAGGenericOutput"] - -[[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/DAGArtifactOutputAlias.md b/docs/DAGArtifactOutputAlias.md deleted file mode 100644 index 2cf4d9406..000000000 --- a/docs/DAGArtifactOutputAlias.md +++ /dev/null @@ -1,16 +0,0 @@ - -# PollinationSDK.Model.DAGArtifactOutputAlias - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Platform** | **List<string>** | 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. | -**Handler** | [**List<IOAliasHandler>**](IOAliasHandler.md) | List of process actions to process the input or output value. | -**Required** | **bool** | A boolean to indicate if an artifact output is required. A False value makes the artifact optional. | [optional] [default to true] -**Type** | **string** | | [optional] [readonly] [default to "DAGGenericOutputAlias"] - -[[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/DAGBooleanInput.md b/docs/DAGBooleanInput.md deleted file mode 100644 index 3f5c8928f..000000000 --- a/docs/DAGBooleanInput.md +++ /dev/null @@ -1,20 +0,0 @@ - -# PollinationSDK.Model.DAGBooleanInput - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Name** | **string** | Input name. | -**Annotations** | **Dictionary<string, string>** | An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries. | [optional] -**Description** | **string** | Optional description for input. | [optional] -**Default** | **bool** | Default value to use for an input if a value was not supplied. | [optional] -**Alias** | [**List<AnyOfDAGGenericInputAliasDAGStringInputAliasDAGIntegerInputAliasDAGNumberInputAliasDAGBooleanInputAliasDAGFolderInputAliasDAGFileInputAliasDAGPathInputAliasDAGArrayInputAliasDAGJSONObjectInputAliasDAGLinkedInputAlias>**](AnyOfDAGGenericInputAliasDAGStringInputAliasDAGIntegerInputAliasDAGNumberInputAliasDAGBooleanInputAliasDAGFolderInputAliasDAGFileInputAliasDAGPathInputAliasDAGArrayInputAliasDAGJSONObjectInputAliasDAGLinkedInputAlias.md) | A list of aliases for this input in different platforms. | [optional] -**Required** | **bool** | A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. | [optional] [default to false] -**Spec** | **Object** | An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec. | [optional] -**Type** | **string** | | [optional] [readonly] [default to "DAGBooleanInput"] - -[[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/DAGBooleanInputAlias.md b/docs/DAGBooleanInputAlias.md deleted file mode 100644 index 0bc803eef..000000000 --- a/docs/DAGBooleanInputAlias.md +++ /dev/null @@ -1,21 +0,0 @@ - -# PollinationSDK.Model.DAGBooleanInputAlias - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Name** | **string** | Input name. | -**Annotations** | **Dictionary<string, string>** | An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries. | [optional] -**Description** | **string** | Optional description for input. | [optional] -**Platform** | **List<string>** | 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. | -**Handler** | [**List<IOAliasHandler>**](IOAliasHandler.md) | List of process actions to process the input or output value. | -**Default** | **bool** | Default value to use for an input if a value was not supplied. | [optional] -**Required** | **bool** | A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. | [optional] [default to false] -**Spec** | **Object** | An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec. | [optional] -**Type** | **string** | | [optional] [readonly] [default to "DAGBooleanInputAlias"] - -[[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/DAGBooleanOutput.md b/docs/DAGBooleanOutput.md deleted file mode 100644 index e754e5da6..000000000 --- a/docs/DAGBooleanOutput.md +++ /dev/null @@ -1,19 +0,0 @@ - -# PollinationSDK.Model.DAGBooleanOutput - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Name** | **string** | Output name. | -**Annotations** | **Dictionary<string, string>** | An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries. | [optional] -**Description** | **string** | Optional description for output. | [optional] -**From** | [**AnyOfTaskReferenceFileReference**](AnyOfTaskReferenceFileReference.md) | Reference to a file or a task output. Task output must be file. | -**Alias** | [**List<AnyOfDAGGenericOutputAliasDAGStringOutputAliasDAGIntegerOutputAliasDAGNumberOutputAliasDAGBooleanOutputAliasDAGFolderOutputAliasDAGFileOutputAliasDAGPathOutputAliasDAGArrayOutputAliasDAGJSONObjectOutputAliasDAGLinkedOutputAlias>**](AnyOfDAGGenericOutputAliasDAGStringOutputAliasDAGIntegerOutputAliasDAGNumberOutputAliasDAGBooleanOutputAliasDAGFolderOutputAliasDAGFileOutputAliasDAGPathOutputAliasDAGArrayOutputAliasDAGJSONObjectOutputAliasDAGLinkedOutputAlias.md) | A list of additional processes for loading this output on different platforms. | [optional] -**Required** | **bool** | A boolean to indicate if an artifact output is required. A False value makes the artifact optional. | [optional] [default to true] -**Type** | **string** | | [optional] [readonly] [default to "DAGBooleanOutput"] - -[[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/DAGBooleanOutputAlias.md b/docs/DAGBooleanOutputAlias.md deleted file mode 100644 index e3ed5e307..000000000 --- a/docs/DAGBooleanOutputAlias.md +++ /dev/null @@ -1,14 +0,0 @@ - -# PollinationSDK.Model.DAGBooleanOutputAlias - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**From** | [**AnyOfTaskReferenceFileReference**](AnyOfTaskReferenceFileReference.md) | Reference to a file or a task output. Task output must be file. | -**Type** | **string** | | [optional] [readonly] [default to "DAGBooleanOutputAlias"] - -[[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/DAGFileInput.md b/docs/DAGFileInput.md deleted file mode 100644 index 87eded457..000000000 --- a/docs/DAGFileInput.md +++ /dev/null @@ -1,21 +0,0 @@ - -# PollinationSDK.Model.DAGFileInput - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Name** | **string** | Input name. | -**Annotations** | **Dictionary<string, string>** | An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries. | [optional] -**Description** | **string** | Optional description for input. | [optional] -**Default** | [**AnyOfHTTPS3ProjectFolder**](AnyOfHTTPS3ProjectFolder.md) | The default source for file if the value is not provided. | [optional] -**Alias** | [**List<AnyOfDAGGenericInputAliasDAGStringInputAliasDAGIntegerInputAliasDAGNumberInputAliasDAGBooleanInputAliasDAGFolderInputAliasDAGFileInputAliasDAGPathInputAliasDAGArrayInputAliasDAGJSONObjectInputAliasDAGLinkedInputAlias>**](AnyOfDAGGenericInputAliasDAGStringInputAliasDAGIntegerInputAliasDAGNumberInputAliasDAGBooleanInputAliasDAGFolderInputAliasDAGFileInputAliasDAGPathInputAliasDAGArrayInputAliasDAGJSONObjectInputAliasDAGLinkedInputAlias.md) | A list of aliases for this input in different platforms. | [optional] -**Required** | **bool** | A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. | [optional] [default to false] -**Spec** | **Object** | An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec. | [optional] -**Extensions** | **List<string>** | Optional list of extensions for file. The check for extension is case-insensitive. | [optional] -**Type** | **string** | | [optional] [readonly] [default to "DAGFileInput"] - -[[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/DAGFileInputAlias.md b/docs/DAGFileInputAlias.md deleted file mode 100644 index 41e1a073b..000000000 --- a/docs/DAGFileInputAlias.md +++ /dev/null @@ -1,22 +0,0 @@ - -# PollinationSDK.Model.DAGFileInputAlias - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Name** | **string** | Input name. | -**Annotations** | **Dictionary<string, string>** | An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries. | [optional] -**Description** | **string** | Optional description for input. | [optional] -**Platform** | **List<string>** | 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. | -**Handler** | [**List<IOAliasHandler>**](IOAliasHandler.md) | List of process actions to process the input or output value. | -**Default** | [**AnyOfHTTPS3ProjectFolder**](AnyOfHTTPS3ProjectFolder.md) | The default source for file if the value is not provided. | [optional] -**Required** | **bool** | A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. | [optional] [default to false] -**Spec** | **Object** | An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec. | [optional] -**Extensions** | **List<string>** | Optional list of extensions for file. The check for extension is case-insensitive. | [optional] -**Type** | **string** | | [optional] [readonly] [default to "DAGFileInputAlias"] - -[[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/DAGFileOutput.md b/docs/DAGFileOutput.md deleted file mode 100644 index 61fddeba1..000000000 --- a/docs/DAGFileOutput.md +++ /dev/null @@ -1,19 +0,0 @@ - -# PollinationSDK.Model.DAGFileOutput - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Name** | **string** | Output name. | -**Annotations** | **Dictionary<string, string>** | An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries. | [optional] -**Description** | **string** | Optional description for output. | [optional] -**From** | [**AnyOfTaskReferenceFileReference**](AnyOfTaskReferenceFileReference.md) | Reference to a file or a task output. Task output must be file. | -**Alias** | [**List<AnyOfDAGGenericOutputAliasDAGStringOutputAliasDAGIntegerOutputAliasDAGNumberOutputAliasDAGBooleanOutputAliasDAGFolderOutputAliasDAGFileOutputAliasDAGPathOutputAliasDAGArrayOutputAliasDAGJSONObjectOutputAliasDAGLinkedOutputAlias>**](AnyOfDAGGenericOutputAliasDAGStringOutputAliasDAGIntegerOutputAliasDAGNumberOutputAliasDAGBooleanOutputAliasDAGFolderOutputAliasDAGFileOutputAliasDAGPathOutputAliasDAGArrayOutputAliasDAGJSONObjectOutputAliasDAGLinkedOutputAlias.md) | A list of additional processes for loading this output on different platforms. | [optional] -**Required** | **bool** | A boolean to indicate if an artifact output is required. A False value makes the artifact optional. | [optional] [default to true] -**Type** | **string** | | [optional] [readonly] [default to "DAGFileOutput"] - -[[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/DAGFileOutputAlias.md b/docs/DAGFileOutputAlias.md deleted file mode 100644 index 713915c91..000000000 --- a/docs/DAGFileOutputAlias.md +++ /dev/null @@ -1,14 +0,0 @@ - -# PollinationSDK.Model.DAGFileOutputAlias - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**From** | [**AnyOfTaskReferenceFileReference**](AnyOfTaskReferenceFileReference.md) | Reference to a file or a task output. Task output must be file. | -**Type** | **string** | | [optional] [readonly] [default to "DAGFileOutputAlias"] - -[[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/DAGFolderInput.md b/docs/DAGFolderInput.md deleted file mode 100644 index 3d2750c46..000000000 --- a/docs/DAGFolderInput.md +++ /dev/null @@ -1,20 +0,0 @@ - -# PollinationSDK.Model.DAGFolderInput - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Name** | **string** | Input name. | -**Annotations** | **Dictionary<string, string>** | An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries. | [optional] -**Description** | **string** | Optional description for input. | [optional] -**Default** | [**AnyOfHTTPS3ProjectFolder**](AnyOfHTTPS3ProjectFolder.md) | The default source for file if the value is not provided. | [optional] -**Alias** | [**List<AnyOfDAGGenericInputAliasDAGStringInputAliasDAGIntegerInputAliasDAGNumberInputAliasDAGBooleanInputAliasDAGFolderInputAliasDAGFileInputAliasDAGPathInputAliasDAGArrayInputAliasDAGJSONObjectInputAliasDAGLinkedInputAlias>**](AnyOfDAGGenericInputAliasDAGStringInputAliasDAGIntegerInputAliasDAGNumberInputAliasDAGBooleanInputAliasDAGFolderInputAliasDAGFileInputAliasDAGPathInputAliasDAGArrayInputAliasDAGJSONObjectInputAliasDAGLinkedInputAlias.md) | A list of aliases for this input in different platforms. | [optional] -**Required** | **bool** | A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. | [optional] [default to false] -**Spec** | **Object** | An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec. | [optional] -**Type** | **string** | | [optional] [readonly] [default to "DAGFolderInput"] - -[[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/DAGFolderInputAlias.md b/docs/DAGFolderInputAlias.md deleted file mode 100644 index 4a54da783..000000000 --- a/docs/DAGFolderInputAlias.md +++ /dev/null @@ -1,21 +0,0 @@ - -# PollinationSDK.Model.DAGFolderInputAlias - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Name** | **string** | Input name. | -**Annotations** | **Dictionary<string, string>** | An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries. | [optional] -**Description** | **string** | Optional description for input. | [optional] -**Platform** | **List<string>** | 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. | -**Handler** | [**List<IOAliasHandler>**](IOAliasHandler.md) | List of process actions to process the input or output value. | -**Default** | [**AnyOfHTTPS3ProjectFolder**](AnyOfHTTPS3ProjectFolder.md) | The default source for file if the value is not provided. | [optional] -**Required** | **bool** | A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. | [optional] [default to false] -**Spec** | **Object** | An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec. | [optional] -**Type** | **string** | | [optional] [readonly] [default to "DAGFolderInputAlias"] - -[[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/DAGFolderOutput.md b/docs/DAGFolderOutput.md deleted file mode 100644 index e3200c8f3..000000000 --- a/docs/DAGFolderOutput.md +++ /dev/null @@ -1,19 +0,0 @@ - -# PollinationSDK.Model.DAGFolderOutput - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Name** | **string** | Output name. | -**Annotations** | **Dictionary<string, string>** | An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries. | [optional] -**Description** | **string** | Optional description for output. | [optional] -**From** | [**AnyOfTaskReferenceFolderReference**](AnyOfTaskReferenceFolderReference.md) | Reference to a folder or a task output. Task output must be folder. | -**Alias** | [**List<AnyOfDAGGenericOutputAliasDAGStringOutputAliasDAGIntegerOutputAliasDAGNumberOutputAliasDAGBooleanOutputAliasDAGFolderOutputAliasDAGFileOutputAliasDAGPathOutputAliasDAGArrayOutputAliasDAGJSONObjectOutputAliasDAGLinkedOutputAlias>**](AnyOfDAGGenericOutputAliasDAGStringOutputAliasDAGIntegerOutputAliasDAGNumberOutputAliasDAGBooleanOutputAliasDAGFolderOutputAliasDAGFileOutputAliasDAGPathOutputAliasDAGArrayOutputAliasDAGJSONObjectOutputAliasDAGLinkedOutputAlias.md) | A list of additional processes for loading this output on different platforms. | [optional] -**Required** | **bool** | A boolean to indicate if an artifact output is required. A False value makes the artifact optional. | [optional] [default to true] -**Type** | **string** | | [optional] [readonly] [default to "DAGFolderOutput"] - -[[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/DAGFolderOutputAlias.md b/docs/DAGFolderOutputAlias.md deleted file mode 100644 index 14cc9050d..000000000 --- a/docs/DAGFolderOutputAlias.md +++ /dev/null @@ -1,14 +0,0 @@ - -# PollinationSDK.Model.DAGFolderOutputAlias - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**From** | [**AnyOfTaskReferenceFolderReference**](AnyOfTaskReferenceFolderReference.md) | Reference to a folder or a task output. Task output must be folder. | -**Type** | **string** | | [optional] [readonly] [default to "DAGFolderOutputAlias"] - -[[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/DAGGenericInput.md b/docs/DAGGenericInput.md deleted file mode 100644 index bc2beefe6..000000000 --- a/docs/DAGGenericInput.md +++ /dev/null @@ -1,20 +0,0 @@ - -# PollinationSDK.Model.DAGGenericInput - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Name** | **string** | Input name. | -**Annotations** | **Dictionary<string, string>** | An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries. | [optional] -**Description** | **string** | Optional description for input. | [optional] -**Default** | **string** | Default value for generic input. | [optional] -**Alias** | [**List<AnyOfDAGGenericInputAliasDAGStringInputAliasDAGIntegerInputAliasDAGNumberInputAliasDAGBooleanInputAliasDAGFolderInputAliasDAGFileInputAliasDAGPathInputAliasDAGArrayInputAliasDAGJSONObjectInputAliasDAGLinkedInputAlias>**](AnyOfDAGGenericInputAliasDAGStringInputAliasDAGIntegerInputAliasDAGNumberInputAliasDAGBooleanInputAliasDAGFolderInputAliasDAGFileInputAliasDAGPathInputAliasDAGArrayInputAliasDAGJSONObjectInputAliasDAGLinkedInputAlias.md) | A list of aliases for this input in different platforms. | [optional] -**Required** | **bool** | A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. | [optional] [default to false] -**Spec** | **Object** | An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec. | [optional] -**Type** | **string** | | [optional] [readonly] [default to "DAGGenericInput"] - -[[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/DAGGenericInputAlias.md b/docs/DAGGenericInputAlias.md deleted file mode 100644 index 1361606cd..000000000 --- a/docs/DAGGenericInputAlias.md +++ /dev/null @@ -1,21 +0,0 @@ - -# PollinationSDK.Model.DAGGenericInputAlias - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Name** | **string** | Input name. | -**Annotations** | **Dictionary<string, string>** | An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries. | [optional] -**Description** | **string** | Optional description for input. | [optional] -**Platform** | **List<string>** | 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. | -**Handler** | [**List<IOAliasHandler>**](IOAliasHandler.md) | List of process actions to process the input or output value. | -**Default** | **string** | Default value for generic input. | [optional] -**Required** | **bool** | A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. | [optional] [default to false] -**Spec** | **Object** | An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec. | [optional] -**Type** | **string** | | [optional] [readonly] [default to "DAGGenericInputAlias"] - -[[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/DAGGenericOutput.md b/docs/DAGGenericOutput.md deleted file mode 100644 index 55c48018c..000000000 --- a/docs/DAGGenericOutput.md +++ /dev/null @@ -1,15 +0,0 @@ - -# PollinationSDK.Model.DAGGenericOutput - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**From** | [**AnyType**](.md) | Reference to a file or a task output. Task output must be file. | -**Alias** | [**List<AnyOfDAGGenericOutputAliasDAGStringOutputAliasDAGIntegerOutputAliasDAGNumberOutputAliasDAGBooleanOutputAliasDAGFolderOutputAliasDAGFileOutputAliasDAGPathOutputAliasDAGArrayOutputAliasDAGJSONObjectOutputAliasDAGLinkedOutputAlias>**](AnyOfDAGGenericOutputAliasDAGStringOutputAliasDAGIntegerOutputAliasDAGNumberOutputAliasDAGBooleanOutputAliasDAGFolderOutputAliasDAGFileOutputAliasDAGPathOutputAliasDAGArrayOutputAliasDAGJSONObjectOutputAliasDAGLinkedOutputAlias.md) | A list of additional processes for loading this output on different platforms. | [optional] -**Type** | **string** | | [optional] [readonly] [default to "DAGGenericOutput"] - -[[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/DAGGenericOutputAlias.md b/docs/DAGGenericOutputAlias.md deleted file mode 100644 index e492efbe6..000000000 --- a/docs/DAGGenericOutputAlias.md +++ /dev/null @@ -1,18 +0,0 @@ - -# PollinationSDK.Model.DAGGenericOutputAlias - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Name** | **string** | Output name. | -**Annotations** | **Dictionary<string, string>** | An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries. | [optional] -**Description** | **string** | Optional description for output. | [optional] -**Platform** | **List<string>** | 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. | -**Handler** | [**List<IOAliasHandler>**](IOAliasHandler.md) | List of process actions to process the input or output value. | -**Type** | **string** | | [optional] [readonly] [default to "DAGGenericOutputAlias"] - -[[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/DAGIntegerInput.md b/docs/DAGIntegerInput.md deleted file mode 100644 index c5771b2c5..000000000 --- a/docs/DAGIntegerInput.md +++ /dev/null @@ -1,20 +0,0 @@ - -# PollinationSDK.Model.DAGIntegerInput - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Name** | **string** | Input name. | -**Annotations** | **Dictionary<string, string>** | An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries. | [optional] -**Description** | **string** | Optional description for input. | [optional] -**Default** | **int** | Default value to use for an input if a value was not supplied. | [optional] -**Alias** | [**List<AnyOfDAGGenericInputAliasDAGStringInputAliasDAGIntegerInputAliasDAGNumberInputAliasDAGBooleanInputAliasDAGFolderInputAliasDAGFileInputAliasDAGPathInputAliasDAGArrayInputAliasDAGJSONObjectInputAliasDAGLinkedInputAlias>**](AnyOfDAGGenericInputAliasDAGStringInputAliasDAGIntegerInputAliasDAGNumberInputAliasDAGBooleanInputAliasDAGFolderInputAliasDAGFileInputAliasDAGPathInputAliasDAGArrayInputAliasDAGJSONObjectInputAliasDAGLinkedInputAlias.md) | A list of aliases for this input in different platforms. | [optional] -**Required** | **bool** | A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. | [optional] [default to false] -**Spec** | **Object** | An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec. | [optional] -**Type** | **string** | | [optional] [readonly] [default to "DAGIntegerInput"] - -[[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/DAGIntegerInputAlias.md b/docs/DAGIntegerInputAlias.md deleted file mode 100644 index 2909a32e4..000000000 --- a/docs/DAGIntegerInputAlias.md +++ /dev/null @@ -1,21 +0,0 @@ - -# PollinationSDK.Model.DAGIntegerInputAlias - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Name** | **string** | Input name. | -**Annotations** | **Dictionary<string, string>** | An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries. | [optional] -**Description** | **string** | Optional description for input. | [optional] -**Platform** | **List<string>** | 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. | -**Handler** | [**List<IOAliasHandler>**](IOAliasHandler.md) | List of process actions to process the input or output value. | -**Default** | **int** | Default value to use for an input if a value was not supplied. | [optional] -**Required** | **bool** | A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. | [optional] [default to false] -**Spec** | **Object** | An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec. | [optional] -**Type** | **string** | | [optional] [readonly] [default to "DAGIntegerInputAlias"] - -[[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/DAGIntegerOutput.md b/docs/DAGIntegerOutput.md deleted file mode 100644 index c0e5a36d0..000000000 --- a/docs/DAGIntegerOutput.md +++ /dev/null @@ -1,19 +0,0 @@ - -# PollinationSDK.Model.DAGIntegerOutput - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Name** | **string** | Output name. | -**Annotations** | **Dictionary<string, string>** | An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries. | [optional] -**Description** | **string** | Optional description for output. | [optional] -**From** | [**AnyOfTaskReferenceFileReference**](AnyOfTaskReferenceFileReference.md) | Reference to a file or a task output. Task output must be file. | -**Alias** | [**List<AnyOfDAGGenericOutputAliasDAGStringOutputAliasDAGIntegerOutputAliasDAGNumberOutputAliasDAGBooleanOutputAliasDAGFolderOutputAliasDAGFileOutputAliasDAGPathOutputAliasDAGArrayOutputAliasDAGJSONObjectOutputAliasDAGLinkedOutputAlias>**](AnyOfDAGGenericOutputAliasDAGStringOutputAliasDAGIntegerOutputAliasDAGNumberOutputAliasDAGBooleanOutputAliasDAGFolderOutputAliasDAGFileOutputAliasDAGPathOutputAliasDAGArrayOutputAliasDAGJSONObjectOutputAliasDAGLinkedOutputAlias.md) | A list of additional processes for loading this output on different platforms. | [optional] -**Required** | **bool** | A boolean to indicate if an artifact output is required. A False value makes the artifact optional. | [optional] [default to true] -**Type** | **string** | | [optional] [readonly] [default to "DAGIntegerOutput"] - -[[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/DAGIntegerOutputAlias.md b/docs/DAGIntegerOutputAlias.md deleted file mode 100644 index d58902f92..000000000 --- a/docs/DAGIntegerOutputAlias.md +++ /dev/null @@ -1,14 +0,0 @@ - -# PollinationSDK.Model.DAGIntegerOutputAlias - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**From** | [**AnyOfTaskReferenceFileReference**](AnyOfTaskReferenceFileReference.md) | Reference to a file or a task output. Task output must be file. | -**Type** | **string** | | [optional] [readonly] [default to "DAGIntegerOutputAlias"] - -[[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/DAGJSONObjectInput.md b/docs/DAGJSONObjectInput.md deleted file mode 100644 index a3095cae4..000000000 --- a/docs/DAGJSONObjectInput.md +++ /dev/null @@ -1,20 +0,0 @@ - -# PollinationSDK.Model.DAGJSONObjectInput - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Name** | **string** | Input name. | -**Annotations** | **Dictionary<string, string>** | An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries. | [optional] -**Description** | **string** | Optional description for input. | [optional] -**Default** | **Object** | Default value to use for an input if a value was not supplied. | [optional] -**Alias** | [**List<AnyOfDAGGenericInputAliasDAGStringInputAliasDAGIntegerInputAliasDAGNumberInputAliasDAGBooleanInputAliasDAGFolderInputAliasDAGFileInputAliasDAGPathInputAliasDAGArrayInputAliasDAGJSONObjectInputAliasDAGLinkedInputAlias>**](AnyOfDAGGenericInputAliasDAGStringInputAliasDAGIntegerInputAliasDAGNumberInputAliasDAGBooleanInputAliasDAGFolderInputAliasDAGFileInputAliasDAGPathInputAliasDAGArrayInputAliasDAGJSONObjectInputAliasDAGLinkedInputAlias.md) | A list of aliases for this input in different platforms. | [optional] -**Required** | **bool** | A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. | [optional] [default to false] -**Spec** | **Object** | An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec. | [optional] -**Type** | **string** | | [optional] [readonly] [default to "DAGJSONObjectInput"] - -[[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/DAGJSONObjectInputAlias.md b/docs/DAGJSONObjectInputAlias.md deleted file mode 100644 index e2b8fb945..000000000 --- a/docs/DAGJSONObjectInputAlias.md +++ /dev/null @@ -1,21 +0,0 @@ - -# PollinationSDK.Model.DAGJSONObjectInputAlias - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Name** | **string** | Input name. | -**Annotations** | **Dictionary<string, string>** | An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries. | [optional] -**Description** | **string** | Optional description for input. | [optional] -**Platform** | **List<string>** | 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. | -**Handler** | [**List<IOAliasHandler>**](IOAliasHandler.md) | List of process actions to process the input or output value. | -**Default** | **Object** | Default value to use for an input if a value was not supplied. | [optional] -**Required** | **bool** | A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. | [optional] [default to false] -**Spec** | **Object** | An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec. | [optional] -**Type** | **string** | | [optional] [readonly] [default to "DAGJSONObjectInputAlias"] - -[[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/DAGJSONObjectOutput.md b/docs/DAGJSONObjectOutput.md deleted file mode 100644 index 997565396..000000000 --- a/docs/DAGJSONObjectOutput.md +++ /dev/null @@ -1,19 +0,0 @@ - -# PollinationSDK.Model.DAGJSONObjectOutput - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Name** | **string** | Output name. | -**Annotations** | **Dictionary<string, string>** | An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries. | [optional] -**Description** | **string** | Optional description for output. | [optional] -**From** | [**AnyOfTaskReferenceFileReference**](AnyOfTaskReferenceFileReference.md) | Reference to a file or a task output. Task output must be file. | -**Alias** | [**List<AnyOfDAGGenericOutputAliasDAGStringOutputAliasDAGIntegerOutputAliasDAGNumberOutputAliasDAGBooleanOutputAliasDAGFolderOutputAliasDAGFileOutputAliasDAGPathOutputAliasDAGArrayOutputAliasDAGJSONObjectOutputAliasDAGLinkedOutputAlias>**](AnyOfDAGGenericOutputAliasDAGStringOutputAliasDAGIntegerOutputAliasDAGNumberOutputAliasDAGBooleanOutputAliasDAGFolderOutputAliasDAGFileOutputAliasDAGPathOutputAliasDAGArrayOutputAliasDAGJSONObjectOutputAliasDAGLinkedOutputAlias.md) | A list of additional processes for loading this output on different platforms. | [optional] -**Required** | **bool** | A boolean to indicate if an artifact output is required. A False value makes the artifact optional. | [optional] [default to true] -**Type** | **string** | | [optional] [readonly] [default to "DAGJSONObjectOutput"] - -[[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/DAGJSONObjectOutputAlias.md b/docs/DAGJSONObjectOutputAlias.md deleted file mode 100644 index 4707af74e..000000000 --- a/docs/DAGJSONObjectOutputAlias.md +++ /dev/null @@ -1,14 +0,0 @@ - -# PollinationSDK.Model.DAGJSONObjectOutputAlias - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**From** | [**AnyOfTaskReferenceFileReference**](AnyOfTaskReferenceFileReference.md) | Reference to a file or a task output. Task output must be file. | -**Type** | **string** | | [optional] [readonly] [default to "DAGJSONObjectOutputAlias"] - -[[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/DAGLinkedInputAlias.md b/docs/DAGLinkedInputAlias.md deleted file mode 100644 index f5948ca6c..000000000 --- a/docs/DAGLinkedInputAlias.md +++ /dev/null @@ -1,18 +0,0 @@ - -# PollinationSDK.Model.DAGLinkedInputAlias - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Platform** | **List<string>** | 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. | -**Handler** | [**List<IOAliasHandler>**](IOAliasHandler.md) | List of process actions to process the input or output value. | -**Default** | **string** | Default value for generic input. | [optional] -**Required** | **bool** | A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. | [optional] [default to false] -**Spec** | **Object** | An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec. | [optional] -**Type** | **string** | | [optional] [readonly] [default to "DAGLinkedInputAlias"] - -[[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/DAGLinkedOutputAlias.md b/docs/DAGLinkedOutputAlias.md deleted file mode 100644 index f94300039..000000000 --- a/docs/DAGLinkedOutputAlias.md +++ /dev/null @@ -1,15 +0,0 @@ - -# PollinationSDK.Model.DAGLinkedOutputAlias - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Platform** | **List<string>** | 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. | -**Handler** | [**List<IOAliasHandler>**](IOAliasHandler.md) | List of process actions to process the input or output value. | -**Type** | **string** | | [optional] [readonly] [default to "DAGLinkedOutputAlias"] - -[[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/DAGNumberInput.md b/docs/DAGNumberInput.md deleted file mode 100644 index 5383f1f0b..000000000 --- a/docs/DAGNumberInput.md +++ /dev/null @@ -1,20 +0,0 @@ - -# PollinationSDK.Model.DAGNumberInput - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Name** | **string** | Input name. | -**Annotations** | **Dictionary<string, string>** | An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries. | [optional] -**Description** | **string** | Optional description for input. | [optional] -**Default** | **double** | Default value to use for an input if a value was not supplied. | [optional] -**Alias** | [**List<AnyOfDAGGenericInputAliasDAGStringInputAliasDAGIntegerInputAliasDAGNumberInputAliasDAGBooleanInputAliasDAGFolderInputAliasDAGFileInputAliasDAGPathInputAliasDAGArrayInputAliasDAGJSONObjectInputAliasDAGLinkedInputAlias>**](AnyOfDAGGenericInputAliasDAGStringInputAliasDAGIntegerInputAliasDAGNumberInputAliasDAGBooleanInputAliasDAGFolderInputAliasDAGFileInputAliasDAGPathInputAliasDAGArrayInputAliasDAGJSONObjectInputAliasDAGLinkedInputAlias.md) | A list of aliases for this input in different platforms. | [optional] -**Required** | **bool** | A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. | [optional] [default to false] -**Spec** | **Object** | An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec. | [optional] -**Type** | **string** | | [optional] [readonly] [default to "DAGNumberInput"] - -[[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/DAGNumberInputAlias.md b/docs/DAGNumberInputAlias.md deleted file mode 100644 index f0ffdb9b8..000000000 --- a/docs/DAGNumberInputAlias.md +++ /dev/null @@ -1,21 +0,0 @@ - -# PollinationSDK.Model.DAGNumberInputAlias - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Name** | **string** | Input name. | -**Annotations** | **Dictionary<string, string>** | An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries. | [optional] -**Description** | **string** | Optional description for input. | [optional] -**Platform** | **List<string>** | 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. | -**Handler** | [**List<IOAliasHandler>**](IOAliasHandler.md) | List of process actions to process the input or output value. | -**Default** | **double** | Default value to use for an input if a value was not supplied. | [optional] -**Required** | **bool** | A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. | [optional] [default to false] -**Spec** | **Object** | An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec. | [optional] -**Type** | **string** | | [optional] [readonly] [default to "DAGNumberInputAlias"] - -[[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/DAGNumberOutput.md b/docs/DAGNumberOutput.md deleted file mode 100644 index e8382824b..000000000 --- a/docs/DAGNumberOutput.md +++ /dev/null @@ -1,19 +0,0 @@ - -# PollinationSDK.Model.DAGNumberOutput - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Name** | **string** | Output name. | -**Annotations** | **Dictionary<string, string>** | An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries. | [optional] -**Description** | **string** | Optional description for output. | [optional] -**From** | [**AnyOfTaskReferenceFileReference**](AnyOfTaskReferenceFileReference.md) | Reference to a file or a task output. Task output must be file. | -**Alias** | [**List<AnyOfDAGGenericOutputAliasDAGStringOutputAliasDAGIntegerOutputAliasDAGNumberOutputAliasDAGBooleanOutputAliasDAGFolderOutputAliasDAGFileOutputAliasDAGPathOutputAliasDAGArrayOutputAliasDAGJSONObjectOutputAliasDAGLinkedOutputAlias>**](AnyOfDAGGenericOutputAliasDAGStringOutputAliasDAGIntegerOutputAliasDAGNumberOutputAliasDAGBooleanOutputAliasDAGFolderOutputAliasDAGFileOutputAliasDAGPathOutputAliasDAGArrayOutputAliasDAGJSONObjectOutputAliasDAGLinkedOutputAlias.md) | A list of additional processes for loading this output on different platforms. | [optional] -**Required** | **bool** | A boolean to indicate if an artifact output is required. A False value makes the artifact optional. | [optional] [default to true] -**Type** | **string** | | [optional] [readonly] [default to "DAGNumberOutput"] - -[[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/DAGNumberOutputAlias.md b/docs/DAGNumberOutputAlias.md deleted file mode 100644 index 30a6cb6f3..000000000 --- a/docs/DAGNumberOutputAlias.md +++ /dev/null @@ -1,14 +0,0 @@ - -# PollinationSDK.Model.DAGNumberOutputAlias - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**From** | [**AnyOfTaskReferenceFileReference**](AnyOfTaskReferenceFileReference.md) | Reference to a file or a task output. Task output must be file. | -**Type** | **string** | | [optional] [readonly] [default to "DAGNumberOutputAlias"] - -[[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/DAGPathInput.md b/docs/DAGPathInput.md deleted file mode 100644 index 33cae8798..000000000 --- a/docs/DAGPathInput.md +++ /dev/null @@ -1,21 +0,0 @@ - -# PollinationSDK.Model.DAGPathInput - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Name** | **string** | Input name. | -**Annotations** | **Dictionary<string, string>** | An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries. | [optional] -**Description** | **string** | Optional description for input. | [optional] -**Default** | [**AnyOfHTTPS3ProjectFolder**](AnyOfHTTPS3ProjectFolder.md) | The default source for file if the value is not provided. | [optional] -**Alias** | [**List<AnyOfDAGGenericInputAliasDAGStringInputAliasDAGIntegerInputAliasDAGNumberInputAliasDAGBooleanInputAliasDAGFolderInputAliasDAGFileInputAliasDAGPathInputAliasDAGArrayInputAliasDAGJSONObjectInputAliasDAGLinkedInputAlias>**](AnyOfDAGGenericInputAliasDAGStringInputAliasDAGIntegerInputAliasDAGNumberInputAliasDAGBooleanInputAliasDAGFolderInputAliasDAGFileInputAliasDAGPathInputAliasDAGArrayInputAliasDAGJSONObjectInputAliasDAGLinkedInputAlias.md) | A list of aliases for this input in different platforms. | [optional] -**Required** | **bool** | A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. | [optional] [default to false] -**Spec** | **Object** | An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec. | [optional] -**Extensions** | **List<string>** | Optional list of extensions for path. The check for extension is case-insensitive. The extension will only be validated for file inputs. | [optional] -**Type** | **string** | | [optional] [readonly] [default to "DAGPathInput"] - -[[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/DAGPathInputAlias.md b/docs/DAGPathInputAlias.md deleted file mode 100644 index aeb3b71ca..000000000 --- a/docs/DAGPathInputAlias.md +++ /dev/null @@ -1,22 +0,0 @@ - -# PollinationSDK.Model.DAGPathInputAlias - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Name** | **string** | Input name. | -**Annotations** | **Dictionary<string, string>** | An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries. | [optional] -**Description** | **string** | Optional description for input. | [optional] -**Platform** | **List<string>** | 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. | -**Handler** | [**List<IOAliasHandler>**](IOAliasHandler.md) | List of process actions to process the input or output value. | -**Default** | [**AnyOfHTTPS3ProjectFolder**](AnyOfHTTPS3ProjectFolder.md) | The default source for file if the value is not provided. | [optional] -**Required** | **bool** | A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. | [optional] [default to false] -**Spec** | **Object** | An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec. | [optional] -**Extensions** | **List<string>** | Optional list of extensions for path. The check for extension is case-insensitive. The extension will only be validated for file inputs. | [optional] -**Type** | **string** | | [optional] [readonly] [default to "DAGPathInputAlias"] - -[[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/DAGPathOutput.md b/docs/DAGPathOutput.md deleted file mode 100644 index 772875c9e..000000000 --- a/docs/DAGPathOutput.md +++ /dev/null @@ -1,19 +0,0 @@ - -# PollinationSDK.Model.DAGPathOutput - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Name** | **string** | Output name. | -**Annotations** | **Dictionary<string, string>** | An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries. | [optional] -**Description** | **string** | Optional description for output. | [optional] -**From** | [**AnyOfTaskReferenceFileReferenceFolderReference**](AnyOfTaskReferenceFileReferenceFolderReference.md) | Reference to a file, folder or a task output. Task output must either be a file or a folder. | -**Alias** | [**List<AnyOfDAGGenericOutputAliasDAGStringOutputAliasDAGIntegerOutputAliasDAGNumberOutputAliasDAGBooleanOutputAliasDAGFolderOutputAliasDAGFileOutputAliasDAGPathOutputAliasDAGArrayOutputAliasDAGJSONObjectOutputAliasDAGLinkedOutputAlias>**](AnyOfDAGGenericOutputAliasDAGStringOutputAliasDAGIntegerOutputAliasDAGNumberOutputAliasDAGBooleanOutputAliasDAGFolderOutputAliasDAGFileOutputAliasDAGPathOutputAliasDAGArrayOutputAliasDAGJSONObjectOutputAliasDAGLinkedOutputAlias.md) | A list of additional processes for loading this output on different platforms. | [optional] -**Required** | **bool** | A boolean to indicate if an artifact output is required. A False value makes the artifact optional. | [optional] [default to true] -**Type** | **string** | | [optional] [readonly] [default to "DAGPathOutput"] - -[[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/DAGPathOutputAlias.md b/docs/DAGPathOutputAlias.md deleted file mode 100644 index 737402951..000000000 --- a/docs/DAGPathOutputAlias.md +++ /dev/null @@ -1,14 +0,0 @@ - -# PollinationSDK.Model.DAGPathOutputAlias - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**From** | [**AnyOfTaskReferenceFileReferenceFolderReference**](AnyOfTaskReferenceFileReferenceFolderReference.md) | Reference to a file, folder or a task output. Task output must either be a file or a folder. | -**Type** | **string** | | [optional] [readonly] [default to "DAGPathOutputAlias"] - -[[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/DAGStringInput.md b/docs/DAGStringInput.md deleted file mode 100644 index fa21bce8c..000000000 --- a/docs/DAGStringInput.md +++ /dev/null @@ -1,17 +0,0 @@ - -# PollinationSDK.Model.DAGStringInput - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Default** | **string** | Default value for generic input. | [optional] -**Alias** | [**List<AnyOfDAGGenericInputAliasDAGStringInputAliasDAGIntegerInputAliasDAGNumberInputAliasDAGBooleanInputAliasDAGFolderInputAliasDAGFileInputAliasDAGPathInputAliasDAGArrayInputAliasDAGJSONObjectInputAliasDAGLinkedInputAlias>**](AnyOfDAGGenericInputAliasDAGStringInputAliasDAGIntegerInputAliasDAGNumberInputAliasDAGBooleanInputAliasDAGFolderInputAliasDAGFileInputAliasDAGPathInputAliasDAGArrayInputAliasDAGJSONObjectInputAliasDAGLinkedInputAlias.md) | A list of aliases for this input in different platforms. | [optional] -**Required** | **bool** | A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. | [optional] [default to false] -**Spec** | **Object** | An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec. | [optional] -**Type** | **string** | | [optional] [readonly] [default to "DAGStringInput"] - -[[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/DAGStringInputAlias.md b/docs/DAGStringInputAlias.md deleted file mode 100644 index 9b3daa8a0..000000000 --- a/docs/DAGStringInputAlias.md +++ /dev/null @@ -1,18 +0,0 @@ - -# PollinationSDK.Model.DAGStringInputAlias - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Platform** | **List<string>** | 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. | -**Handler** | [**List<IOAliasHandler>**](IOAliasHandler.md) | List of process actions to process the input or output value. | -**Default** | **string** | Default value for generic input. | [optional] -**Required** | **bool** | A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. | [optional] [default to false] -**Spec** | **Object** | An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec. | [optional] -**Type** | **string** | | [optional] [readonly] [default to "DAGStringInputAlias"] - -[[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/DAGStringOutput.md b/docs/DAGStringOutput.md deleted file mode 100644 index 85165d169..000000000 --- a/docs/DAGStringOutput.md +++ /dev/null @@ -1,19 +0,0 @@ - -# PollinationSDK.Model.DAGStringOutput - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Name** | **string** | Output name. | -**Annotations** | **Dictionary<string, string>** | An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries. | [optional] -**Description** | **string** | Optional description for output. | [optional] -**From** | [**AnyOfTaskReferenceFileReference**](AnyOfTaskReferenceFileReference.md) | Reference to a file or a task output. Task output must be file. | -**Alias** | [**List<AnyOfDAGGenericOutputAliasDAGStringOutputAliasDAGIntegerOutputAliasDAGNumberOutputAliasDAGBooleanOutputAliasDAGFolderOutputAliasDAGFileOutputAliasDAGPathOutputAliasDAGArrayOutputAliasDAGJSONObjectOutputAliasDAGLinkedOutputAlias>**](AnyOfDAGGenericOutputAliasDAGStringOutputAliasDAGIntegerOutputAliasDAGNumberOutputAliasDAGBooleanOutputAliasDAGFolderOutputAliasDAGFileOutputAliasDAGPathOutputAliasDAGArrayOutputAliasDAGJSONObjectOutputAliasDAGLinkedOutputAlias.md) | A list of additional processes for loading this output on different platforms. | [optional] -**Required** | **bool** | A boolean to indicate if an artifact output is required. A False value makes the artifact optional. | [optional] [default to true] -**Type** | **string** | | [optional] [readonly] [default to "DAGStringOutput"] - -[[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/DAGStringOutputAlias.md b/docs/DAGStringOutputAlias.md deleted file mode 100644 index 85dfe9655..000000000 --- a/docs/DAGStringOutputAlias.md +++ /dev/null @@ -1,14 +0,0 @@ - -# PollinationSDK.Model.DAGStringOutputAlias - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**From** | [**AnyOfTaskReferenceFileReference**](AnyOfTaskReferenceFileReference.md) | Reference to a file or a task output. Task output must be file. | -**Type** | **string** | | [optional] [readonly] [default to "DAGStringOutputAlias"] - -[[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/DAGTask.md b/docs/DAGTask.md deleted file mode 100644 index c23ac1adb..000000000 --- a/docs/DAGTask.md +++ /dev/null @@ -1,21 +0,0 @@ - -# PollinationSDK.Model.DAGTask - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Name** | **string** | Name for this task. It must be unique in a DAG. | -**Template** | **string** | Template name. A template is a Function or a DAG. This template must be available in the dependencies. | -**Type** | **string** | | [optional] [readonly] [default to "DAGTask"] -**Annotations** | **Dictionary<string, string>** | An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries. | [optional] -**Needs** | **List<string>** | List of DAG tasks that this task depends on and needs to be executed before this task. | [optional] -**Arguments** | [**List<AnyOfTaskArgumentTaskPathArgument>**](AnyOfTaskArgumentTaskPathArgument.md) | The input arguments for this task. | [optional] -**Loop** | [**DAGTaskLoop**](DAGTaskLoop.md) | Loop configuration for this task. | [optional] -**SubFolder** | **string** | 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. | [optional] -**Returns** | [**List<AnyOfTaskReturnTaskPathReturn>**](AnyOfTaskReturnTaskPathReturn.md) | List of task returns. | [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/DAGTaskLoop.md b/docs/DAGTaskLoop.md deleted file mode 100644 index 49296f5ab..000000000 --- a/docs/DAGTaskLoop.md +++ /dev/null @@ -1,15 +0,0 @@ - -# PollinationSDK.Model.DAGTaskLoop - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Type** | **string** | | [optional] [readonly] [default to "DAGTaskLoop"] -**Annotations** | **Dictionary<string, string>** | An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries. | [optional] -**From** | [**AnyOfInputReferenceTaskReferenceValueListReference**](AnyOfInputReferenceTaskReferenceValueListReference.md) | The task or DAG parameter to loop over (must be iterable). | [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/DailyUsage.md b/docs/DailyUsage.md deleted file mode 100644 index 6b7f75b39..000000000 --- a/docs/DailyUsage.md +++ /dev/null @@ -1,18 +0,0 @@ - -# PollinationSDK.Model.DailyUsage - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Date** | **DateTime** | The day this usage was aggregated for | -**Cpu** | **double** | cpu usage | [optional] [default to 0D] -**Memory** | **double** | memory usage | [optional] [default to 0D] -**Succeeded** | **int** | succeeded usage | [optional] [default to 0] -**Failed** | **int** | failed usage | [optional] [default to 0] -**Type** | **string** | | [optional] [readonly] [default to "DailyUsage"] - -[[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/Dependency.md b/docs/Dependency.md deleted file mode 100644 index f84e07068..000000000 --- a/docs/Dependency.md +++ /dev/null @@ -1,20 +0,0 @@ - -# PollinationSDK.Model.Dependency - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Kind** | **DependencyKind** | The kind of dependency. It can be a recipe or an plugin. | -**Name** | **string** | Workflow name. This name should be unique among all the resources in your resource. Use an alias if this is not the case. | -**Tag** | **string** | Tag of the resource. | -**Source** | **string** | URL to a repository where this resource can be found. | -**Type** | **string** | | [optional] [readonly] [default to "Dependency"] -**Annotations** | **Dictionary<string, string>** | An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries. | [optional] -**Hash** | **string** | The digest hash of the dependency when retrieved from its source. This is locked when the resource dependencies are downloaded. | [optional] -**Alias** | **string** | An optional alias to refer to this dependency. Useful if the name is already used somewhere else. | [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/DependencyKind.md b/docs/DependencyKind.md deleted file mode 100644 index 1b9ef55e6..000000000 --- a/docs/DependencyKind.md +++ /dev/null @@ -1,12 +0,0 @@ - -# PollinationSDK.Model.DependencyKind - -## 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/DockerConfig.md b/docs/DockerConfig.md deleted file mode 100644 index 77b1edc5f..000000000 --- a/docs/DockerConfig.md +++ /dev/null @@ -1,17 +0,0 @@ - -# PollinationSDK.Model.DockerConfig - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Image** | **string** | Docker image name. Must include tag. | -**Workdir** | **string** | 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** | | [optional] [readonly] [default to "DockerConfig"] -**Annotations** | **Dictionary<string, string>** | An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries. | [optional] -**Registry** | **string** | The container registry URLs that this container should be pulled from. Will default to Dockerhub if none is specified. | [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/FileMeta.md b/docs/FileMeta.md deleted file mode 100644 index 74b5b27bf..000000000 --- a/docs/FileMeta.md +++ /dev/null @@ -1,18 +0,0 @@ - -# PollinationSDK.Model.FileMeta - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Key** | **string** | | -**FileType** | **string** | | -**FileName** | **string** | | -**LastModified** | **DateTime** | | [optional] -**Size** | **int** | | [optional] -**Type** | **string** | | [optional] [readonly] [default to "FileMeta"] - -[[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/FileReference.md b/docs/FileReference.md deleted file mode 100644 index 1e9c0bee8..000000000 --- a/docs/FileReference.md +++ /dev/null @@ -1,14 +0,0 @@ - -# PollinationSDK.Model.FileReference - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Path** | **string** | Relative path to a file. | -**Type** | **string** | | [optional] [readonly] [default to "FileReference"] - -[[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/FolderReference.md b/docs/FolderReference.md deleted file mode 100644 index ad1a231b1..000000000 --- a/docs/FolderReference.md +++ /dev/null @@ -1,14 +0,0 @@ - -# PollinationSDK.Model.FolderReference - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Path** | **string** | Relative path to a folder. | -**Type** | **string** | | [optional] [readonly] [default to "FolderReference"] - -[[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/FromOutput.md b/docs/FromOutput.md deleted file mode 100644 index 2e1b2213a..000000000 --- a/docs/FromOutput.md +++ /dev/null @@ -1,17 +0,0 @@ - -# PollinationSDK.Model.FromOutput - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Name** | **string** | Output name. | -**Annotations** | **Dictionary<string, string>** | An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries. | [optional] -**Description** | **string** | Optional description for output. | [optional] -**From** | [**AnyType**](.md) | Reference to a file or a task output. Task output must be file. | -**Type** | **string** | | [optional] [readonly] [default to "FromOutput"] - -[[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/Function.md b/docs/Function.md deleted file mode 100644 index ab8ea7407..000000000 --- a/docs/Function.md +++ /dev/null @@ -1,19 +0,0 @@ - -# PollinationSDK.Model.Function - -## 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 | | -**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 "Function"] - -[[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/FunctionArrayInput.md b/docs/FunctionArrayInput.md deleted file mode 100644 index 120d3f4be..000000000 --- a/docs/FunctionArrayInput.md +++ /dev/null @@ -1,21 +0,0 @@ - -# PollinationSDK.Model.FunctionArrayInput - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Name** | **string** | Input name. | -**Annotations** | **Dictionary<string, string>** | An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries. | [optional] -**Description** | **string** | Optional description for input. | [optional] -**Default** | [**List<AnyType>**](AnyType.md) | Default value to use for an input if a value was not supplied. | [optional] -**Alias** | [**List<AnyOfDAGGenericInputAliasDAGStringInputAliasDAGIntegerInputAliasDAGNumberInputAliasDAGBooleanInputAliasDAGFolderInputAliasDAGFileInputAliasDAGPathInputAliasDAGArrayInputAliasDAGJSONObjectInputAliasDAGLinkedInputAlias>**](AnyOfDAGGenericInputAliasDAGStringInputAliasDAGIntegerInputAliasDAGNumberInputAliasDAGBooleanInputAliasDAGFolderInputAliasDAGFileInputAliasDAGPathInputAliasDAGArrayInputAliasDAGJSONObjectInputAliasDAGLinkedInputAlias.md) | A list of aliases for this input in different platforms. | [optional] -**Required** | **bool** | A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. | [optional] [default to false] -**Spec** | **Object** | An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec. | [optional] -**ItemsType** | **ItemType** | Type of items in an array. All the items in an array must be from the same type. | [optional] -**Type** | **string** | | [optional] [readonly] [default to "FunctionArrayInput"] - -[[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/FunctionArrayOutput.md b/docs/FunctionArrayOutput.md deleted file mode 100644 index abb075c89..000000000 --- a/docs/FunctionArrayOutput.md +++ /dev/null @@ -1,14 +0,0 @@ - -# PollinationSDK.Model.FunctionArrayOutput - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**ItemsType** | **ItemType** | Type of items in this array. All the items in an array must be from the same type. | [optional] -**Type** | **string** | | [optional] [readonly] [default to "FunctionArrayOutput"] - -[[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/FunctionBooleanInput.md b/docs/FunctionBooleanInput.md deleted file mode 100644 index 6514bdbb1..000000000 --- a/docs/FunctionBooleanInput.md +++ /dev/null @@ -1,20 +0,0 @@ - -# PollinationSDK.Model.FunctionBooleanInput - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Name** | **string** | Input name. | -**Annotations** | **Dictionary<string, string>** | An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries. | [optional] -**Description** | **string** | Optional description for input. | [optional] -**Default** | **bool** | Default value to use for an input if a value was not supplied. | [optional] -**Alias** | [**List<AnyOfDAGGenericInputAliasDAGStringInputAliasDAGIntegerInputAliasDAGNumberInputAliasDAGBooleanInputAliasDAGFolderInputAliasDAGFileInputAliasDAGPathInputAliasDAGArrayInputAliasDAGJSONObjectInputAliasDAGLinkedInputAlias>**](AnyOfDAGGenericInputAliasDAGStringInputAliasDAGIntegerInputAliasDAGNumberInputAliasDAGBooleanInputAliasDAGFolderInputAliasDAGFileInputAliasDAGPathInputAliasDAGArrayInputAliasDAGJSONObjectInputAliasDAGLinkedInputAlias.md) | A list of aliases for this input in different platforms. | [optional] -**Required** | **bool** | A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. | [optional] [default to false] -**Spec** | **Object** | An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec. | [optional] -**Type** | **string** | | [optional] [readonly] [default to "FunctionBooleanInput"] - -[[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/FunctionBooleanOutput.md b/docs/FunctionBooleanOutput.md deleted file mode 100644 index d8c2b5bb8..000000000 --- a/docs/FunctionBooleanOutput.md +++ /dev/null @@ -1,13 +0,0 @@ - -# PollinationSDK.Model.FunctionBooleanOutput - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Type** | **string** | | [optional] [readonly] [default to "FunctionBooleanOutput"] - -[[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/FunctionFileInput.md b/docs/FunctionFileInput.md deleted file mode 100644 index bebabf944..000000000 --- a/docs/FunctionFileInput.md +++ /dev/null @@ -1,22 +0,0 @@ - -# PollinationSDK.Model.FunctionFileInput - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Name** | **string** | Input name. | -**Annotations** | **Dictionary<string, string>** | An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries. | [optional] -**Description** | **string** | Optional description for input. | [optional] -**Path** | **string** | 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. | -**Default** | [**AnyOfHTTPS3ProjectFolder**](AnyOfHTTPS3ProjectFolder.md) | The default source for file if the value is not provided. | [optional] -**Alias** | [**List<AnyOfDAGGenericInputAliasDAGStringInputAliasDAGIntegerInputAliasDAGNumberInputAliasDAGBooleanInputAliasDAGFolderInputAliasDAGFileInputAliasDAGPathInputAliasDAGArrayInputAliasDAGJSONObjectInputAliasDAGLinkedInputAlias>**](AnyOfDAGGenericInputAliasDAGStringInputAliasDAGIntegerInputAliasDAGNumberInputAliasDAGBooleanInputAliasDAGFolderInputAliasDAGFileInputAliasDAGPathInputAliasDAGArrayInputAliasDAGJSONObjectInputAliasDAGLinkedInputAlias.md) | A list of aliases for this input in different platforms. | [optional] -**Required** | **bool** | A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. | [optional] [default to false] -**Spec** | **Object** | An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec. | [optional] -**Extensions** | **List<string>** | Optional list of extensions for file. The check for extension is case-insensitive. | [optional] -**Type** | **string** | | [optional] [readonly] [default to "FunctionFileInput"] - -[[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/FunctionFileOutput.md b/docs/FunctionFileOutput.md deleted file mode 100644 index 9a1d00d29..000000000 --- a/docs/FunctionFileOutput.md +++ /dev/null @@ -1,15 +0,0 @@ - -# PollinationSDK.Model.FunctionFileOutput - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Path** | **string** | Path to the output artifact relative to where the function command is executed. | -**Required** | **bool** | A boolean to indicate if an artifact output is required. A False value makes the artifact optional. | [optional] [default to true] -**Type** | **string** | | [optional] [readonly] [default to "FunctionFileOutput"] - -[[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/FunctionFolderInput.md b/docs/FunctionFolderInput.md deleted file mode 100644 index 7c23dc24e..000000000 --- a/docs/FunctionFolderInput.md +++ /dev/null @@ -1,21 +0,0 @@ - -# PollinationSDK.Model.FunctionFolderInput - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Name** | **string** | Input name. | -**Annotations** | **Dictionary<string, string>** | An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries. | [optional] -**Description** | **string** | Optional description for input. | [optional] -**Path** | **string** | 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. | -**Default** | [**AnyOfHTTPS3ProjectFolder**](AnyOfHTTPS3ProjectFolder.md) | The default source for file if the value is not provided. | [optional] -**Alias** | [**List<AnyOfDAGGenericInputAliasDAGStringInputAliasDAGIntegerInputAliasDAGNumberInputAliasDAGBooleanInputAliasDAGFolderInputAliasDAGFileInputAliasDAGPathInputAliasDAGArrayInputAliasDAGJSONObjectInputAliasDAGLinkedInputAlias>**](AnyOfDAGGenericInputAliasDAGStringInputAliasDAGIntegerInputAliasDAGNumberInputAliasDAGBooleanInputAliasDAGFolderInputAliasDAGFileInputAliasDAGPathInputAliasDAGArrayInputAliasDAGJSONObjectInputAliasDAGLinkedInputAlias.md) | A list of aliases for this input in different platforms. | [optional] -**Required** | **bool** | A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. | [optional] [default to false] -**Spec** | **Object** | An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec. | [optional] -**Type** | **string** | | [optional] [readonly] [default to "FunctionFolderInput"] - -[[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/FunctionFolderOutput.md b/docs/FunctionFolderOutput.md deleted file mode 100644 index c94bde236..000000000 --- a/docs/FunctionFolderOutput.md +++ /dev/null @@ -1,15 +0,0 @@ - -# PollinationSDK.Model.FunctionFolderOutput - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Path** | **string** | Path to the output artifact relative to where the function command is executed. | -**Required** | **bool** | A boolean to indicate if an artifact output is required. A False value makes the artifact optional. | [optional] [default to true] -**Type** | **string** | | [optional] [readonly] [default to "FunctionFolderOutput"] - -[[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/FunctionIntegerInput.md b/docs/FunctionIntegerInput.md deleted file mode 100644 index 7f026f3cf..000000000 --- a/docs/FunctionIntegerInput.md +++ /dev/null @@ -1,20 +0,0 @@ - -# PollinationSDK.Model.FunctionIntegerInput - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Name** | **string** | Input name. | -**Annotations** | **Dictionary<string, string>** | An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries. | [optional] -**Description** | **string** | Optional description for input. | [optional] -**Default** | **int** | Default value to use for an input if a value was not supplied. | [optional] -**Alias** | [**List<AnyOfDAGGenericInputAliasDAGStringInputAliasDAGIntegerInputAliasDAGNumberInputAliasDAGBooleanInputAliasDAGFolderInputAliasDAGFileInputAliasDAGPathInputAliasDAGArrayInputAliasDAGJSONObjectInputAliasDAGLinkedInputAlias>**](AnyOfDAGGenericInputAliasDAGStringInputAliasDAGIntegerInputAliasDAGNumberInputAliasDAGBooleanInputAliasDAGFolderInputAliasDAGFileInputAliasDAGPathInputAliasDAGArrayInputAliasDAGJSONObjectInputAliasDAGLinkedInputAlias.md) | A list of aliases for this input in different platforms. | [optional] -**Required** | **bool** | A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. | [optional] [default to false] -**Spec** | **Object** | An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec. | [optional] -**Type** | **string** | | [optional] [readonly] [default to "FunctionIntegerInput"] - -[[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/FunctionIntegerOutput.md b/docs/FunctionIntegerOutput.md deleted file mode 100644 index 096b0ccef..000000000 --- a/docs/FunctionIntegerOutput.md +++ /dev/null @@ -1,13 +0,0 @@ - -# PollinationSDK.Model.FunctionIntegerOutput - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Type** | **string** | | [optional] [readonly] [default to "FunctionIntegerOutput"] - -[[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/FunctionJSONObjectInput.md b/docs/FunctionJSONObjectInput.md deleted file mode 100644 index 485313e6f..000000000 --- a/docs/FunctionJSONObjectInput.md +++ /dev/null @@ -1,20 +0,0 @@ - -# PollinationSDK.Model.FunctionJSONObjectInput - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Name** | **string** | Input name. | -**Annotations** | **Dictionary<string, string>** | An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries. | [optional] -**Description** | **string** | Optional description for input. | [optional] -**Default** | **Object** | Default value to use for an input if a value was not supplied. | [optional] -**Alias** | [**List<AnyOfDAGGenericInputAliasDAGStringInputAliasDAGIntegerInputAliasDAGNumberInputAliasDAGBooleanInputAliasDAGFolderInputAliasDAGFileInputAliasDAGPathInputAliasDAGArrayInputAliasDAGJSONObjectInputAliasDAGLinkedInputAlias>**](AnyOfDAGGenericInputAliasDAGStringInputAliasDAGIntegerInputAliasDAGNumberInputAliasDAGBooleanInputAliasDAGFolderInputAliasDAGFileInputAliasDAGPathInputAliasDAGArrayInputAliasDAGJSONObjectInputAliasDAGLinkedInputAlias.md) | A list of aliases for this input in different platforms. | [optional] -**Required** | **bool** | A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. | [optional] [default to false] -**Spec** | **Object** | An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec. | [optional] -**Type** | **string** | | [optional] [readonly] [default to "FunctionJSONObjectInput"] - -[[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/FunctionJSONObjectOutput.md b/docs/FunctionJSONObjectOutput.md deleted file mode 100644 index 6d33529fa..000000000 --- a/docs/FunctionJSONObjectOutput.md +++ /dev/null @@ -1,13 +0,0 @@ - -# PollinationSDK.Model.FunctionJSONObjectOutput - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Type** | **string** | | [optional] [readonly] [default to "FunctionJSONObjectOutput"] - -[[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/FunctionNumberInput.md b/docs/FunctionNumberInput.md deleted file mode 100644 index 9e4085500..000000000 --- a/docs/FunctionNumberInput.md +++ /dev/null @@ -1,20 +0,0 @@ - -# PollinationSDK.Model.FunctionNumberInput - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Name** | **string** | Input name. | -**Annotations** | **Dictionary<string, string>** | An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries. | [optional] -**Description** | **string** | Optional description for input. | [optional] -**Default** | **double** | Default value to use for an input if a value was not supplied. | [optional] -**Alias** | [**List<AnyOfDAGGenericInputAliasDAGStringInputAliasDAGIntegerInputAliasDAGNumberInputAliasDAGBooleanInputAliasDAGFolderInputAliasDAGFileInputAliasDAGPathInputAliasDAGArrayInputAliasDAGJSONObjectInputAliasDAGLinkedInputAlias>**](AnyOfDAGGenericInputAliasDAGStringInputAliasDAGIntegerInputAliasDAGNumberInputAliasDAGBooleanInputAliasDAGFolderInputAliasDAGFileInputAliasDAGPathInputAliasDAGArrayInputAliasDAGJSONObjectInputAliasDAGLinkedInputAlias.md) | A list of aliases for this input in different platforms. | [optional] -**Required** | **bool** | A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. | [optional] [default to false] -**Spec** | **Object** | An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec. | [optional] -**Type** | **string** | | [optional] [readonly] [default to "FunctionNumberInput"] - -[[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/FunctionNumberOutput.md b/docs/FunctionNumberOutput.md deleted file mode 100644 index 464d69866..000000000 --- a/docs/FunctionNumberOutput.md +++ /dev/null @@ -1,13 +0,0 @@ - -# PollinationSDK.Model.FunctionNumberOutput - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Type** | **string** | | [optional] [readonly] [default to "FunctionNumberOutput"] - -[[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/FunctionPathInput.md b/docs/FunctionPathInput.md deleted file mode 100644 index 456943fde..000000000 --- a/docs/FunctionPathInput.md +++ /dev/null @@ -1,22 +0,0 @@ - -# PollinationSDK.Model.FunctionPathInput - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Name** | **string** | Input name. | -**Annotations** | **Dictionary<string, string>** | An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries. | [optional] -**Description** | **string** | Optional description for input. | [optional] -**Path** | **string** | 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. | -**Default** | [**AnyOfHTTPS3ProjectFolder**](AnyOfHTTPS3ProjectFolder.md) | The default source for file if the value is not provided. | [optional] -**Alias** | [**List<AnyOfDAGGenericInputAliasDAGStringInputAliasDAGIntegerInputAliasDAGNumberInputAliasDAGBooleanInputAliasDAGFolderInputAliasDAGFileInputAliasDAGPathInputAliasDAGArrayInputAliasDAGJSONObjectInputAliasDAGLinkedInputAlias>**](AnyOfDAGGenericInputAliasDAGStringInputAliasDAGIntegerInputAliasDAGNumberInputAliasDAGBooleanInputAliasDAGFolderInputAliasDAGFileInputAliasDAGPathInputAliasDAGArrayInputAliasDAGJSONObjectInputAliasDAGLinkedInputAlias.md) | A list of aliases for this input in different platforms. | [optional] -**Required** | **bool** | A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. | [optional] [default to false] -**Spec** | **Object** | An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec. | [optional] -**Extensions** | **List<string>** | Optional list of extensions for file. The check for extension is case-insensitive. | [optional] -**Type** | **string** | | [optional] [readonly] [default to "FunctionPathInput"] - -[[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/FunctionPathOutput.md b/docs/FunctionPathOutput.md deleted file mode 100644 index 97d7d192c..000000000 --- a/docs/FunctionPathOutput.md +++ /dev/null @@ -1,15 +0,0 @@ - -# PollinationSDK.Model.FunctionPathOutput - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Path** | **string** | Path to the output artifact relative to where the function command is executed. | -**Required** | **bool** | A boolean to indicate if an artifact output is required. A False value makes the artifact optional. | [optional] [default to true] -**Type** | **string** | | [optional] [readonly] [default to "FunctionPathOutput"] - -[[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/FunctionStringInput.md b/docs/FunctionStringInput.md deleted file mode 100644 index 309a5cf40..000000000 --- a/docs/FunctionStringInput.md +++ /dev/null @@ -1,13 +0,0 @@ - -# PollinationSDK.Model.FunctionStringInput - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Type** | **string** | | [optional] [readonly] [default to "FunctionStringInput"] - -[[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/FunctionStringOutput.md b/docs/FunctionStringOutput.md deleted file mode 100644 index 3c77b908f..000000000 --- a/docs/FunctionStringOutput.md +++ /dev/null @@ -1,13 +0,0 @@ - -# PollinationSDK.Model.FunctionStringOutput - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Type** | **string** | | [optional] [readonly] [default to "FunctionStringOutput"] - -[[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/GenericInput.md b/docs/GenericInput.md deleted file mode 100644 index 4abb2326e..000000000 --- a/docs/GenericInput.md +++ /dev/null @@ -1,16 +0,0 @@ - -# PollinationSDK.Model.GenericInput - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Name** | **string** | Input name. | -**Type** | **string** | | [optional] [readonly] [default to "GenericInput"] -**Annotations** | **Dictionary<string, string>** | An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries. | [optional] -**Description** | **string** | Optional description for input. | [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/GenericOutput.md b/docs/GenericOutput.md deleted file mode 100644 index 75dcbdd2d..000000000 --- a/docs/GenericOutput.md +++ /dev/null @@ -1,16 +0,0 @@ - -# PollinationSDK.Model.GenericOutput - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Name** | **string** | Output name. | -**Type** | **string** | | [optional] [readonly] [default to "GenericOutput"] -**Annotations** | **Dictionary<string, string>** | An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries. | [optional] -**Description** | **string** | Optional description for output. | [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/HTTP.md b/docs/HTTP.md deleted file mode 100644 index 5ccac28fe..000000000 --- a/docs/HTTP.md +++ /dev/null @@ -1,14 +0,0 @@ - -# PollinationSDK.Model.HTTP - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Url** | **string** | For a HTTP endpoint this can be http://climate.onebuilding.org. | -**Type** | **string** | | [optional] [readonly] [default to "HTTP"] - -[[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/IOAliasHandler.md b/docs/IOAliasHandler.md deleted file mode 100644 index 8ef5185b3..000000000 --- a/docs/IOAliasHandler.md +++ /dev/null @@ -1,18 +0,0 @@ - -# PollinationSDK.Model.IOAliasHandler - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Language** | **string** | Declare the language (e.g. python, csharp, etc.). This option allows the recipe to be flexible on handling different programming languages. | -**Module** | **string** | Target module or namespace to load the alias function. | -**Function** | **string** | Name of the function. The input value will be passed to this function as the first argument. | -**Type** | **string** | | [optional] [readonly] [default to "IOAliasHandler"] -**Annotations** | **Dictionary<string, string>** | An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries. | [optional] -**Index** | **int** | 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. | [optional] [default to 0] - -[[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/IOBase.md b/docs/IOBase.md deleted file mode 100644 index 2783e9da8..000000000 --- a/docs/IOBase.md +++ /dev/null @@ -1,16 +0,0 @@ - -# PollinationSDK.Model.IOBase - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Type** | **string** | | [optional] [readonly] [default to "IOBase"] -**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<AnyType>**](AnyType.md) | Place-holder. Overwrite this! | [optional] -**Outputs** | [**List<AnyType>**](AnyType.md) | Place-holder. Overwrite this! | [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/InputFileReference.md b/docs/InputFileReference.md deleted file mode 100644 index 5bb1f14eb..000000000 --- a/docs/InputFileReference.md +++ /dev/null @@ -1,13 +0,0 @@ - -# PollinationSDK.Model.InputFileReference - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Type** | **string** | | [optional] [readonly] [default to "InputFileReference"] - -[[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/InputFolderReference.md b/docs/InputFolderReference.md deleted file mode 100644 index 90d68d8c5..000000000 --- a/docs/InputFolderReference.md +++ /dev/null @@ -1,13 +0,0 @@ - -# PollinationSDK.Model.InputFolderReference - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Type** | **string** | | [optional] [readonly] [default to "InputFolderReference"] - -[[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/InputPathReference.md b/docs/InputPathReference.md deleted file mode 100644 index b1be30c97..000000000 --- a/docs/InputPathReference.md +++ /dev/null @@ -1,13 +0,0 @@ - -# PollinationSDK.Model.InputPathReference - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Type** | **string** | | [optional] [readonly] [default to "InputPathReference"] - -[[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/InputReference.md b/docs/InputReference.md deleted file mode 100644 index d82b17a09..000000000 --- a/docs/InputReference.md +++ /dev/null @@ -1,13 +0,0 @@ - -# PollinationSDK.Model.InputReference - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Type** | **string** | | [optional] [readonly] [default to "InputReference"] - -[[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/InputReferenceBase.md b/docs/InputReferenceBase.md deleted file mode 100644 index a3371b479..000000000 --- a/docs/InputReferenceBase.md +++ /dev/null @@ -1,14 +0,0 @@ - -# PollinationSDK.Model.InputReferenceBase - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Variable** | **string** | The name of the DAG input variable | -**Type** | **string** | | [optional] [readonly] [default to "_InputReferenceBase"] - -[[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/ItemReference.md b/docs/ItemReference.md deleted file mode 100644 index fb1e1afa0..000000000 --- a/docs/ItemReference.md +++ /dev/null @@ -1,14 +0,0 @@ - -# PollinationSDK.Model.ItemReference - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Variable** | **string** | The name of the looped item variable (use dot notation for nested json values) | [optional] -**Type** | **string** | | [optional] [readonly] [default to "ItemReference"] - -[[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/ItemType.md b/docs/ItemType.md deleted file mode 100644 index 774766e6c..000000000 --- a/docs/ItemType.md +++ /dev/null @@ -1,12 +0,0 @@ - -# PollinationSDK.Model.ItemType - -## 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/Job.md b/docs/Job.md deleted file mode 100644 index b6f92c8cb..000000000 --- a/docs/Job.md +++ /dev/null @@ -1,20 +0,0 @@ - -# PollinationSDK.Model.Job - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Source** | **string** | The source url for downloading the recipe. | -**Type** | **string** | | [optional] [readonly] [default to "Job"] -**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"] -**Arguments** | **List<List<AnyOfJobArgumentJobPathArgument>>** | Input arguments for this job. | [optional] -**Name** | **string** | An optional name for this job. This name will be used a the display name for the run. | [optional] -**Description** | **string** | Run description. | [optional] -**Labels** | **Dictionary<string, string>** | Optional user data as a dictionary. User data is for user reference only and will not be used in the execution of the job. | [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/JobArgument.md b/docs/JobArgument.md deleted file mode 100644 index e8cd92fa1..000000000 --- a/docs/JobArgument.md +++ /dev/null @@ -1,16 +0,0 @@ - -# PollinationSDK.Model.JobArgument - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Name** | **string** | Argument name. The name must match one of the input names from Job's DAG template. | -**Value** | [**AnyType**](.md) | The value of the job argument. | -**Type** | **string** | | [optional] [readonly] [default to "JobArgument"] -**Annotations** | **Dictionary<string, string>** | An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries. | [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/JobPathArgument.md b/docs/JobPathArgument.md deleted file mode 100644 index 06e8aee18..000000000 --- a/docs/JobPathArgument.md +++ /dev/null @@ -1,16 +0,0 @@ - -# PollinationSDK.Model.JobPathArgument - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Name** | **string** | Argument name. The name must match one of the input names from Job's template which can be a function or DAG. | -**Source** | [**AnyOfHTTPS3ProjectFolder**](AnyOfHTTPS3ProjectFolder.md) | The path to source the file from. | -**Type** | **string** | | [optional] [readonly] [default to "JobPathArgument"] -**Annotations** | **Dictionary<string, string>** | An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries. | [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/JobStatus.md b/docs/JobStatus.md deleted file mode 100644 index e12d8f7b2..000000000 --- a/docs/JobStatus.md +++ /dev/null @@ -1,26 +0,0 @@ - -# PollinationSDK.Model.JobStatus - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Id** | **string** | The ID of the individual job. | -**StartedAt** | **DateTime** | The time at which the job was started | -**Type** | **string** | | [optional] [readonly] [default to "JobStatus"] -**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"] -**Status** | **JobStatusEnum** | The status of this job. | [optional] -**Message** | **string** | Any message produced by the job. Usually error/debugging hints. | [optional] -**FinishedAt** | **DateTime** | The time at which the task was completed | [optional] -**Source** | **string** | Source url for the status object. It can be a recipe or a function. | [optional] -**RunsPending** | **int** | The count of runs that are pending | [optional] [default to 0] -**RunsRunning** | **int** | The count of runs that are running | [optional] [default to 0] -**RunsCompleted** | **int** | The count of runs that have completed | [optional] [default to 0] -**RunsFailed** | **int** | The count of runs that have failed | [optional] [default to 0] -**RunsCancelled** | **int** | The count of runs that have been cancelled | [optional] [default to 0] - -[[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/JobStatusEnum.md b/docs/JobStatusEnum.md deleted file mode 100644 index 78e160974..000000000 --- a/docs/JobStatusEnum.md +++ /dev/null @@ -1,12 +0,0 @@ - -# PollinationSDK.Model.JobStatusEnum - -## 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/JobsApi.md b/docs/JobsApi.md deleted file mode 100644 index 3b78b93b3..000000000 --- a/docs/JobsApi.md +++ /dev/null @@ -1,558 +0,0 @@ -# PollinationSDK.Api.JobsApi - -All URIs are relative to *http://localhost* - -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 -[**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 -[**SearchJobFolder**](JobsApi.md#searchjobfolder) | **GET** /projects/{owner}/{name}/jobs/{job_id}/artifacts | List files/folders in a job folder - - - -## CancelJob - -> AnyType CancelJob (string owner, string name, string jobId) - -Cancel a Job - -Retrieve a job. - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using PollinationSDK.Api; -using PollinationSDK.Client; -using PollinationSDK.Model; - -namespace Example -{ - public class CancelJobExample - { - 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 - { - // Cancel a Job - AnyType result = apiInstance.CancelJob(owner, name, jobId); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling JobsApi.CancelJob: " + 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) - - -## CreateJob - -> CreatedContent CreateJob (string owner, string name, Job job, string authorization = null, string xPollinationToken = null) - -Schedule a job - -Create a new job. - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using PollinationSDK.Api; -using PollinationSDK.Client; -using PollinationSDK.Model; - -namespace Example -{ - public class CreateJobExample - { - 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 job = new Job(); // Job | - var authorization = authorization_example; // string | (optional) - var xPollinationToken = xPollinationToken_example; // string | (optional) - - try - { - // Schedule a job - CreatedContent result = apiInstance.CreateJob(owner, name, job, authorization, xPollinationToken); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling JobsApi.CreateJob: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **owner** | **string**| | - **name** | **string**| | - **job** | [**Job**](Job.md)| | - **authorization** | **string**| | [optional] - **xPollinationToken** | **string**| | [optional] - -### 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 | -|-------------|-------------|------------------| -| **201** | 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) - - -## DownloadJobArtifact - -> AnyType DownloadJobArtifact (string owner, string name, string jobId, string path = null) - -Download an artifact from the job folder - -Get a download link for an artifact in a job folder - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using PollinationSDK.Api; -using PollinationSDK.Client; -using PollinationSDK.Model; - -namespace Example -{ - public class DownloadJobArtifactExample - { - 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 | - var path = path_example; // string | The path to an file within a project folder (optional) - - try - { - // Download an artifact from the job folder - AnyType result = apiInstance.DownloadJobArtifact(owner, name, jobId, path); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling JobsApi.DownloadJobArtifact: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **owner** | **string**| | - **name** | **string**| | - **jobId** | **string**| | - **path** | **string**| The path to an file within a project folder | [optional] - -### 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** | Retrieved | - | -| **403** | Access forbidden | - | -| **500** | Server error | - | -| **400** | Invalid request | - | -| **404** | Not found | - | -| **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) - - -## GetJob - -> CloudJob GetJob (string owner, string name, string jobId) - -Get a Job - -Retrieve a job. - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using PollinationSDK.Api; -using PollinationSDK.Client; -using PollinationSDK.Model; - -namespace Example -{ - public class GetJobExample - { - 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 - { - // Get a Job - CloudJob result = apiInstance.GetJob(owner, name, jobId); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling JobsApi.GetJob: " + 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 - -[**CloudJob**](CloudJob.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 | - | -| **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) - - -## ListJobs - -> CloudJobList ListJobs (string owner, string name, List ids = null, JobStatusEnum? status = null, int? page = null, int? perPage = null) - -List Jobs - -Retrieve a list of jobs. - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using PollinationSDK.Api; -using PollinationSDK.Client; -using PollinationSDK.Model; - -namespace Example -{ - public class ListJobsExample - { - 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 ids = new List(); // List | (optional) - var status = ; // JobStatusEnum? | (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 Jobs - CloudJobList result = apiInstance.ListJobs(owner, name, ids, status, page, perPage); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling JobsApi.ListJobs: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **owner** | **string**| | - **name** | **string**| | - **ids** | [**List<string>**](string.md)| | [optional] - **status** | **JobStatusEnum?**| | [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 - -[**CloudJobList**](CloudJobList.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 | - | -| **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) - - -## SearchJobFolder - -> List<FileMeta> SearchJobFolder (string owner, string name, string jobId, List path = null, int? page = null, int? perPage = null) - -List files/folders in a job folder - -Retrieve a list of artifacts in a job folder - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using PollinationSDK.Api; -using PollinationSDK.Client; -using PollinationSDK.Model; - -namespace Example -{ - public class SearchJobFolderExample - { - 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 | - var path = new List(); // List | The path to an file within a project folder (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 files/folders in a job folder - List result = apiInstance.SearchJobFolder(owner, name, jobId, path, page, perPage); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling JobsApi.SearchJobFolder: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **owner** | **string**| | - **name** | **string**| | - **jobId** | **string**| | - **path** | [**List<string>**](string.md)| The path to an file within a project folder | [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 - -[**List<FileMeta>**](FileMeta.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 | - | -| **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/KeyRequest.md b/docs/KeyRequest.md deleted file mode 100644 index b3daba3e5..000000000 --- a/docs/KeyRequest.md +++ /dev/null @@ -1,14 +0,0 @@ - -# PollinationSDK.Model.KeyRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Key** | **string** | | -**Type** | **string** | | [optional] [readonly] [default to "KeyRequest"] - -[[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/License.md b/docs/License.md deleted file mode 100644 index cb32cd31b..000000000 --- a/docs/License.md +++ /dev/null @@ -1,16 +0,0 @@ - -# PollinationSDK.Model.License - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Name** | **string** | The license name used for the package. | -**Type** | **string** | | [optional] [readonly] [default to "License"] -**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] - -[[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/ListResponseMeta.md b/docs/ListResponseMeta.md deleted file mode 100644 index 69b05e516..000000000 --- a/docs/ListResponseMeta.md +++ /dev/null @@ -1,19 +0,0 @@ - -# PollinationSDK.Model.ListResponseMeta - -## 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 | -**NextPage** | **int** | The next page, if this on is not the last | [optional] -**Resources** | [**List<AnyType>**](AnyType.md) | The list of resources returned from the list query | [optional] -**Type** | **string** | | [optional] [readonly] [default to "ListResponseMeta"] - -[[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/LocalConfig.md b/docs/LocalConfig.md deleted file mode 100644 index 41dc0f468..000000000 --- a/docs/LocalConfig.md +++ /dev/null @@ -1,14 +0,0 @@ - -# PollinationSDK.Model.LocalConfig - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Type** | **string** | | [optional] [readonly] [default to "LocalConfig"] -**Annotations** | **Dictionary<string, string>** | An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries. | [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/Maintainer.md b/docs/Maintainer.md deleted file mode 100644 index 50a3b436f..000000000 --- a/docs/Maintainer.md +++ /dev/null @@ -1,16 +0,0 @@ - -# PollinationSDK.Model.Maintainer - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Name** | **string** | The name of the author/maintainer person or organization. | -**Type** | **string** | | [optional] [readonly] [default to "Maintainer"] -**Annotations** | **Dictionary<string, string>** | An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries. | [optional] -**Email** | **string** | The email address of the author/maintainer person or organization. | [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/MetaData.md b/docs/MetaData.md deleted file mode 100644 index 7f2178e5a..000000000 --- a/docs/MetaData.md +++ /dev/null @@ -1,25 +0,0 @@ - -# PollinationSDK.Model.MetaData - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Name** | **string** | Package name. Make it descriptive and helpful ;) | -**Tag** | **string** | The tag of the package | -**Type** | **string** | | [optional] [readonly] [default to "MetaData"] -**Annotations** | **Dictionary<string, string>** | An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries. | [optional] -**AppVersion** | **string** | The version of the application code underlying the manifest | [optional] -**Keywords** | **List<string>** | A list of keywords to search the package by | [optional] -**Maintainers** | [**List<Maintainer>**](Maintainer.md) | A list of maintainers for the package | [optional] -**Home** | **string** | The URL of this package's home page | [optional] -**Sources** | **List<string>** | A list of URLs to source code for this project | [optional] -**Icon** | **string** | A URL to an SVG or PNG image to be used as an icon | [optional] -**Deprecated** | **bool** | Whether this package is deprecated | [optional] -**Description** | **string** | A description of what this package does | [optional] -**License** | [**License**](License.md) | The license information. | [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/NewPluginPackage.md b/docs/NewPluginPackage.md deleted file mode 100644 index f183728f8..000000000 --- a/docs/NewPluginPackage.md +++ /dev/null @@ -1,15 +0,0 @@ - -# PollinationSDK.Model.NewPluginPackage - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Manifest** | [**Plugin**](Plugin.md) | The Plugin manifest to be created | -**Readme** | **string** | The README file to attach to this package | [optional] [default to ""] -**Type** | **string** | | [optional] [readonly] [default to "NewPluginPackage"] - -[[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/NewRecipePackage.md b/docs/NewRecipePackage.md deleted file mode 100644 index 3b4926e98..000000000 --- a/docs/NewRecipePackage.md +++ /dev/null @@ -1,15 +0,0 @@ - -# PollinationSDK.Model.NewRecipePackage - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Manifest** | [**Recipe**](Recipe.md) | The Recipe manifest to be created | -**Readme** | **string** | The README file to attach to this package | [optional] [default to ""] -**Type** | **string** | | [optional] [readonly] [default to "NewRecipePackage"] - -[[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/OpenAPIGenBaseModel.md b/docs/OpenAPIGenBaseModel.md deleted file mode 100644 index bd3d2368e..000000000 --- a/docs/OpenAPIGenBaseModel.md +++ /dev/null @@ -1,13 +0,0 @@ - -# PollinationSDK.Model.OpenAPIGenBaseModel - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Type** | **string** | A base class to use when there is no baseclass available to fall on. | [optional] [readonly] [default to "InvalidType"] - -[[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/Organization.md b/docs/Organization.md deleted file mode 100644 index ef75bc0a2..000000000 --- a/docs/Organization.md +++ /dev/null @@ -1,23 +0,0 @@ - -# PollinationSDK.Model.Organization - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**AccountName** | **string** | The unique name of the org in small case without spaces | [optional] -**Name** | **string** | The display name for this org | [optional] -**PictureUrl** | **string** | URL to the picture associated with this org | [optional] -**ContactEmail** | **string** | The contact email for the Organization | [optional] -**Description** | **string** | A description of the org | [optional] -**Id** | **string** | The org ID | -**Owner** | [**AccountPublic**](AccountPublic.md) | The account the organization represents | -**Role** | **OrganizationRoleEnum** | The role the user has within the organization | [optional] -**MemberCount** | **int** | The number of members that are part of this org | [optional] [default to 0] -**TeamCount** | **int** | The number of teams that are part of this org | [optional] [default to 0] -**Type** | **string** | | [optional] [readonly] [default to "Organization"] - -[[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/OrganizationCreate.md b/docs/OrganizationCreate.md deleted file mode 100644 index 61803b14c..000000000 --- a/docs/OrganizationCreate.md +++ /dev/null @@ -1,18 +0,0 @@ - -# PollinationSDK.Model.OrganizationCreate - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**AccountName** | **string** | The unique name of the org in small case without spaces | [optional] -**Name** | **string** | The display name for this org | [optional] -**PictureUrl** | **string** | URL to the picture associated with this org | [optional] -**ContactEmail** | **string** | The contact email for the Organization | [optional] -**Description** | **string** | A description of the org | [optional] -**Type** | **string** | | [optional] [readonly] [default to "OrganizationCreate"] - -[[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/OrganizationList.md b/docs/OrganizationList.md deleted file mode 100644 index 94924f441..000000000 --- a/docs/OrganizationList.md +++ /dev/null @@ -1,19 +0,0 @@ - -# PollinationSDK.Model.OrganizationList - -## 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<Organization>**](Organization.md) | | -**NextPage** | **int** | The next page, if this on is not the last | [optional] -**Type** | **string** | | [optional] [readonly] [default to "OrganizationList"] - -[[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/OrganizationMember.md b/docs/OrganizationMember.md deleted file mode 100644 index 233f72e3e..000000000 --- a/docs/OrganizationMember.md +++ /dev/null @@ -1,15 +0,0 @@ - -# PollinationSDK.Model.OrganizationMember - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**User** | [**UserPublic**](UserPublic.md) | The organization member | -**Role** | **OrganizationRoleEnum** | The role the user has within the organization | -**Type** | **string** | | [optional] [readonly] [default to "OrganizationMember"] - -[[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/OrganizationMemberList.md b/docs/OrganizationMemberList.md deleted file mode 100644 index 2dff2048b..000000000 --- a/docs/OrganizationMemberList.md +++ /dev/null @@ -1,19 +0,0 @@ - -# PollinationSDK.Model.OrganizationMemberList - -## 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<OrganizationMember>**](OrganizationMember.md) | | -**NextPage** | **int** | The next page, if this on is not the last | [optional] -**Type** | **string** | | [optional] [readonly] [default to "OrganizationMemberList"] - -[[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/OrganizationRoleEnum.md b/docs/OrganizationRoleEnum.md deleted file mode 100644 index 46fa3630b..000000000 --- a/docs/OrganizationRoleEnum.md +++ /dev/null @@ -1,12 +0,0 @@ - -# PollinationSDK.Model.OrganizationRoleEnum - -## 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/OrganizationUpdate.md b/docs/OrganizationUpdate.md deleted file mode 100644 index 8cad82696..000000000 --- a/docs/OrganizationUpdate.md +++ /dev/null @@ -1,18 +0,0 @@ - -# PollinationSDK.Model.OrganizationUpdate - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**AccountName** | **string** | The unique name of the org in small case without spaces | [optional] -**Name** | **string** | The display name for this org | [optional] -**PictureUrl** | **string** | URL to the picture associated with this org | [optional] -**ContactEmail** | **string** | The contact email for the Organization | [optional] -**Description** | **string** | A description of the org | [optional] -**Type** | **string** | | [optional] [readonly] [default to "OrganizationUpdate"] - -[[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/OrgsApi.md b/docs/OrgsApi.md deleted file mode 100644 index c1529400d..000000000 --- a/docs/OrgsApi.md +++ /dev/null @@ -1,709 +0,0 @@ -# PollinationSDK.Api.OrgsApi - -All URIs are relative to *http://localhost* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**CreateOrg**](OrgsApi.md#createorg) | **POST** /orgs | Create an Org -[**DeleteOrg**](OrgsApi.md#deleteorg) | **DELETE** /orgs/{name} | Delete an Org -[**DeleteOrgMember**](OrgsApi.md#deleteorgmember) | **DELETE** /orgs/{name}/members/{username} | Remove an Org member -[**GetOrg**](OrgsApi.md#getorg) | **GET** /orgs/{name} | Get an Org -[**GetOrgMembers**](OrgsApi.md#getorgmembers) | **GET** /orgs/{name}/members | List organization members -[**ListOrgs**](OrgsApi.md#listorgs) | **GET** /orgs | List Orgs -[**UpdateOrg**](OrgsApi.md#updateorg) | **PUT** /orgs/{name} | Update an Org -[**UpsertOrgMember**](OrgsApi.md#upsertorgmember) | **PATCH** /orgs/{name}/members/{username}/{role} | Add or update the role of an Org Member - - - -## CreateOrg - -> CreatedContent CreateOrg (OrganizationCreate organizationCreate) - -Create an Org - -Create a new org. - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using PollinationSDK.Api; -using PollinationSDK.Client; -using PollinationSDK.Model; - -namespace Example -{ - public class CreateOrgExample - { - 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 OrgsApi(Configuration.Default); - var organizationCreate = new OrganizationCreate(); // OrganizationCreate | - - try - { - // Create an Org - CreatedContent result = apiInstance.CreateOrg(organizationCreate); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling OrgsApi.CreateOrg: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **organizationCreate** | [**OrganizationCreate**](OrganizationCreate.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 | -|-------------|-------------|------------------| -| **201** | Success | - | -| **403** | Access forbidden | - | -| **500** | Server error | - | -| **400** | Invalid request | - | -| **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) - - -## DeleteOrg - -> void DeleteOrg (string name) - -Delete an Org - -Delete a org (must have `admin` permission) - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using PollinationSDK.Api; -using PollinationSDK.Client; -using PollinationSDK.Model; - -namespace Example -{ - public class DeleteOrgExample - { - 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 OrgsApi(Configuration.Default); - var name = name_example; // string | - - try - { - // Delete an Org - apiInstance.DeleteOrg(name); - } - catch (ApiException e) - { - Debug.Print("Exception when calling OrgsApi.DeleteOrg: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **name** | **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** | Accepted | - | -| **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) - - -## DeleteOrgMember - -> void DeleteOrgMember (string name, string username) - -Remove an Org member - -Remove a member from the org (must have org `owner` role) - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using PollinationSDK.Api; -using PollinationSDK.Client; -using PollinationSDK.Model; - -namespace Example -{ - public class DeleteOrgMemberExample - { - 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 OrgsApi(Configuration.Default); - var name = name_example; // string | - var username = username_example; // string | - - try - { - // Remove an Org member - apiInstance.DeleteOrgMember(name, username); - } - catch (ApiException e) - { - Debug.Print("Exception when calling OrgsApi.DeleteOrgMember: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **name** | **string**| | - **username** | **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** | Accepted | - | -| **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) - - -## GetOrg - -> Organization GetOrg (string name) - -Get an Org - -Retrieve a org by name - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using PollinationSDK.Api; -using PollinationSDK.Client; -using PollinationSDK.Model; - -namespace Example -{ - public class GetOrgExample - { - 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 OrgsApi(Configuration.Default); - var name = name_example; // string | - - try - { - // Get an Org - Organization result = apiInstance.GetOrg(name); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling OrgsApi.GetOrg: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **name** | **string**| | - -### Return type - -[**Organization**](Organization.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 | - | -| **404** | Not found | - | -| **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) - - -## GetOrgMembers - -> OrganizationMemberList GetOrgMembers (string name) - -List organization members - -Retrieve a org's members - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using PollinationSDK.Api; -using PollinationSDK.Client; -using PollinationSDK.Model; - -namespace Example -{ - public class GetOrgMembersExample - { - public static void Main() - { - Configuration.Default.BasePath = "http://localhost"; - var apiInstance = new OrgsApi(Configuration.Default); - var name = name_example; // string | - - try - { - // List organization members - OrganizationMemberList result = apiInstance.GetOrgMembers(name); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling OrgsApi.GetOrgMembers: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **name** | **string**| | - -### Return type - -[**OrganizationMemberList**](OrganizationMemberList.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Retrieved | - | -| **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) - - -## ListOrgs - -> OrganizationList ListOrgs (List search = null, List name = null, List member = null, int? page = null, int? perPage = null) - -List Orgs - -search for orgs using query parameters - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using PollinationSDK.Api; -using PollinationSDK.Client; -using PollinationSDK.Model; - -namespace Example -{ - public class ListOrgsExample - { - 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 OrgsApi(Configuration.Default); - var search = new List(); // List | You know, for search (optional) - var name = new List(); // List | The account name (optional) - var member = new List(); // List | The username of a user (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 Orgs - OrganizationList result = apiInstance.ListOrgs(search, name, member, page, perPage); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling OrgsApi.ListOrgs: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **search** | [**List<string>**](string.md)| You know, for search | [optional] - **name** | [**List<string>**](string.md)| The account name | [optional] - **member** | [**List<string>**](string.md)| The username of a user | [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 - -[**OrganizationList**](OrganizationList.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 | - | -| **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) - - -## UpdateOrg - -> UpdateAccepted UpdateOrg (string name, OrganizationUpdate organizationUpdate) - -Update an Org - -Update a org (must have org `owner` role) - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using PollinationSDK.Api; -using PollinationSDK.Client; -using PollinationSDK.Model; - -namespace Example -{ - public class UpdateOrgExample - { - 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 OrgsApi(Configuration.Default); - var name = name_example; // string | - var organizationUpdate = new OrganizationUpdate(); // OrganizationUpdate | - - try - { - // Update an Org - UpdateAccepted result = apiInstance.UpdateOrg(name, organizationUpdate); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling OrgsApi.UpdateOrg: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **name** | **string**| | - **organizationUpdate** | [**OrganizationUpdate**](OrganizationUpdate.md)| | - -### Return type - -[**UpdateAccepted**](UpdateAccepted.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 | -|-------------|-------------|------------------| -| **202** | Accepted | - | -| **403** | Access forbidden | - | -| **500** | Server error | - | -| **400** | Invalid request | - | -| **404** | Not found | - | -| **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) - - -## UpsertOrgMember - -> UpdateAccepted UpsertOrgMember (string name, string username, OrganizationRoleEnum role) - -Add or update the role of an Org Member - -Upsert a member role to the org (must have org `owner` role) - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using PollinationSDK.Api; -using PollinationSDK.Client; -using PollinationSDK.Model; - -namespace Example -{ - public class UpsertOrgMemberExample - { - 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 OrgsApi(Configuration.Default); - var name = name_example; // string | - var username = username_example; // string | - var role = ; // OrganizationRoleEnum | - - try - { - // Add or update the role of an Org Member - UpdateAccepted result = apiInstance.UpsertOrgMember(name, username, role); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling OrgsApi.UpsertOrgMember: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **name** | **string**| | - **username** | **string**| | - **role** | **OrganizationRoleEnum**| | - -### Return type - -[**UpdateAccepted**](UpdateAccepted.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 | - | -| **403** | Access forbidden | - | -| **500** | Server error | - | -| **400** | Invalid request | - | -| **404** | Not found | - | -| **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/PackageVersion.md b/docs/PackageVersion.md deleted file mode 100644 index ff11002df..000000000 --- a/docs/PackageVersion.md +++ /dev/null @@ -1,32 +0,0 @@ - -# PollinationSDK.Model.PackageVersion - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Name** | **string** | Package name. Make it descriptive and helpful ;) | -**Tag** | **string** | The tag of the package | -**Url** | **string** | | -**Created** | **DateTime** | | -**Digest** | **string** | | -**Annotations** | **Dictionary<string, string>** | An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries. | [optional] -**AppVersion** | **string** | The version of the application code underlying the manifest | [optional] -**Keywords** | **List<string>** | A list of keywords to search the package by | [optional] -**Maintainers** | [**List<Maintainer>**](Maintainer.md) | A list of maintainers for the package | [optional] -**Home** | **string** | The URL of this package's home page | [optional] -**Sources** | **List<string>** | A list of URLs to source code for this project | [optional] -**Icon** | **string** | A URL to an SVG or PNG image to be used as an icon | [optional] -**Deprecated** | **bool** | Whether this package is deprecated | [optional] -**Description** | **string** | A description of what this package does | [optional] -**License** | [**License**](License.md) | The license information. | [optional] -**Slug** | **string** | A slug of the repository name and the package name. | [optional] -**Kind** | **string** | The type of Queenbee package (ie: recipe or plugin) | [optional] [default to ""] -**Readme** | **string** | The README file string for this package | [optional] -**Manifest** | [**AnyOfRecipePlugin**](AnyOfRecipePlugin.md) | The package Recipe or Plugin manifest | [optional] -**Type** | **string** | | [optional] [readonly] [default to "PackageVersion"] - -[[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/PathOutput.md b/docs/PathOutput.md deleted file mode 100644 index c9c64e84d..000000000 --- a/docs/PathOutput.md +++ /dev/null @@ -1,18 +0,0 @@ - -# PollinationSDK.Model.PathOutput - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Name** | **string** | Output name. | -**Annotations** | **Dictionary<string, string>** | An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries. | [optional] -**Description** | **string** | Optional description for output. | [optional] -**Path** | **string** | Path to the output artifact relative to where the function command is executed. | -**Required** | **bool** | A boolean to indicate if an artifact output is required. A False value makes the artifact optional. | [optional] [default to true] -**Type** | **string** | | [optional] [readonly] [default to "PathOutput"] - -[[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/Permission.md b/docs/Permission.md deleted file mode 100644 index 80252bb0f..000000000 --- a/docs/Permission.md +++ /dev/null @@ -1,12 +0,0 @@ - -# PollinationSDK.Model.Permission - -## 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/Plugin.md b/docs/Plugin.md deleted file mode 100644 index 20e3642ab..000000000 --- a/docs/Plugin.md +++ /dev/null @@ -1,18 +0,0 @@ - -# PollinationSDK.Model.Plugin - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Metadata** | [**MetaData**](MetaData.md) | The Plugin metadata information | -**Config** | [**PluginConfig**](PluginConfig.md) | The configuration information to run this plugin | -**Functions** | [**List<Function>**](Function.md) | List of Plugin functions | -**Type** | **string** | | [optional] [readonly] [default to "Plugin"] -**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"] - -[[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/PluginConfig.md b/docs/PluginConfig.md deleted file mode 100644 index 4a5aea1e6..000000000 --- a/docs/PluginConfig.md +++ /dev/null @@ -1,16 +0,0 @@ - -# PollinationSDK.Model.PluginConfig - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Docker** | [**DockerConfig**](DockerConfig.md) | The configuration to use this plugin in a docker container | -**Type** | **string** | | [optional] [readonly] [default to "PluginConfig"] -**Annotations** | **Dictionary<string, string>** | An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries. | [optional] -**Local** | [**LocalConfig**](LocalConfig.md) | The configuration to use this plugin locally | [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/PluginPackage.md b/docs/PluginPackage.md deleted file mode 100644 index 5ff1acba5..000000000 --- a/docs/PluginPackage.md +++ /dev/null @@ -1,21 +0,0 @@ - -# PollinationSDK.Model.PluginPackage - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Digest** | **string** | The new package digest | -**Tag** | **string** | The new package tag | -**Keywords** | **List<string>** | keywords | [optional] -**Description** | **string** | description | [optional] -**Icon** | **string** | icon | [optional] -**CreatedAt** | **DateTime** | Creation Timestamp | [optional] -**Readme** | **string** | The Repository Readme | [optional] -**Manifest** | [**Plugin**](Plugin.md) | | -**Type** | **string** | | [optional] [readonly] [default to "PluginPackage"] - -[[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/PluginPackageList.md b/docs/PluginPackageList.md deleted file mode 100644 index 865d76621..000000000 --- a/docs/PluginPackageList.md +++ /dev/null @@ -1,19 +0,0 @@ - -# PollinationSDK.Model.PluginPackageList - -## 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<PluginPackage>**](PluginPackage.md) | | -**NextPage** | **int** | The next page, if this on is not the last | [optional] -**Type** | **string** | | [optional] [readonly] [default to "PluginPackageList"] - -[[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 deleted file mode 100644 index 5079e7f83..000000000 --- a/docs/PluginsApi.md +++ /dev/null @@ -1,1029 +0,0 @@ -# PollinationSDK.Api.PluginsApi - -All URIs are relative to *http://localhost* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**CreatePlugin**](PluginsApi.md#createplugin) | **POST** /plugins/{owner} | Create a Plugin -[**CreatePluginPackage**](PluginsApi.md#createpluginpackage) | **POST** /plugins/{owner}/{name}/tags | Create a new Plugin package -[**DeletePlugin**](PluginsApi.md#deleteplugin) | **DELETE** /plugins/{owner}/{name} | Delete a Plugin -[**DeletePluginOrgPermission**](PluginsApi.md#deletepluginorgpermission) | **DELETE** /plugins/{owner}/{name}/permissions | Remove a Repository permissions -[**GetPlugin**](PluginsApi.md#getplugin) | **GET** /plugins/{owner}/{name} | Get a plugin -[**GetPluginAccessPermissions**](PluginsApi.md#getpluginaccesspermissions) | **GET** /plugins/{owner}/{name}/permissions | Get plugin access permissions -[**GetPluginByTag**](PluginsApi.md#getpluginbytag) | **GET** /plugins/{owner}/{name}/tags/{tag} | Get a plugin tag -[**ListPluginTags**](PluginsApi.md#listplugintags) | **GET** /plugins/{owner}/{name}/tags | Get a plugin tags -[**ListPlugins**](PluginsApi.md#listplugins) | **GET** /plugins | List plugins -[**UpdatePlugin**](PluginsApi.md#updateplugin) | **PUT** /plugins/{owner}/{name} | Update a Plugin -[**UpsertPluginPermission**](PluginsApi.md#upsertpluginpermission) | **PATCH** /plugins/{owner}/{name}/permissions | Upsert a new permission to a plugin - - - -## CreatePlugin - -> CreatedContent CreatePlugin (string owner, RepositoryCreate repositoryCreate) - -Create a Plugin - -Create a new plugin. - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using PollinationSDK.Api; -using PollinationSDK.Client; -using PollinationSDK.Model; - -namespace Example -{ - public class CreatePluginExample - { - 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 PluginsApi(Configuration.Default); - var owner = owner_example; // string | - var repositoryCreate = new RepositoryCreate(); // RepositoryCreate | - - try - { - // Create a Plugin - CreatedContent result = apiInstance.CreatePlugin(owner, repositoryCreate); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling PluginsApi.CreatePlugin: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **owner** | **string**| | - **repositoryCreate** | [**RepositoryCreate**](RepositoryCreate.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 | -|-------------|-------------|------------------| -| **201** | Success | - | -| **403** | Access forbidden | - | -| **500** | Server error | - | -| **400** | Invalid request | - | -| **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) - - -## CreatePluginPackage - -> CreatedContent CreatePluginPackage (string owner, string name, NewPluginPackage newPluginPackage) - -Create a new Plugin package - -Create a new plugin package version - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using PollinationSDK.Api; -using PollinationSDK.Client; -using PollinationSDK.Model; - -namespace Example -{ - public class CreatePluginPackageExample - { - 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 PluginsApi(Configuration.Default); - var owner = owner_example; // string | - var name = name_example; // string | - var newPluginPackage = new NewPluginPackage(); // NewPluginPackage | - - try - { - // Create a new Plugin package - CreatedContent result = apiInstance.CreatePluginPackage(owner, name, newPluginPackage); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling PluginsApi.CreatePluginPackage: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **owner** | **string**| | - **name** | **string**| | - **newPluginPackage** | [**NewPluginPackage**](NewPluginPackage.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** | Success | - | -| **403** | Access forbidden | - | -| **500** | Server error | - | -| **400** | Invalid request | - | -| **404** | Not found | - | -| **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) - - -## DeletePlugin - -> void DeletePlugin (string owner, string name) - -Delete a Plugin - -Delete a plugin (must have `admin` permission) - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using PollinationSDK.Api; -using PollinationSDK.Client; -using PollinationSDK.Model; - -namespace Example -{ - public class DeletePluginExample - { - 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 PluginsApi(Configuration.Default); - var owner = owner_example; // string | - var name = name_example; // string | - - try - { - // Delete a Plugin - apiInstance.DeletePlugin(owner, name); - } - catch (ApiException e) - { - Debug.Print("Exception when calling PluginsApi.DeletePlugin: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **owner** | **string**| | - **name** | **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** | Accepted | - | -| **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) - - -## DeletePluginOrgPermission - -> void DeletePluginOrgPermission (string owner, string name, RepositoryPolicySubject repositoryPolicySubject) - -Remove a Repository permissions - -Delete a plugin's access policy (must have `admin` permission) - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using PollinationSDK.Api; -using PollinationSDK.Client; -using PollinationSDK.Model; - -namespace Example -{ - public class DeletePluginOrgPermissionExample - { - 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 PluginsApi(Configuration.Default); - var owner = owner_example; // string | - var name = name_example; // string | - var repositoryPolicySubject = new RepositoryPolicySubject(); // RepositoryPolicySubject | - - try - { - // Remove a Repository permissions - apiInstance.DeletePluginOrgPermission(owner, name, repositoryPolicySubject); - } - catch (ApiException e) - { - Debug.Print("Exception when calling PluginsApi.DeletePluginOrgPermission: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **owner** | **string**| | - **name** | **string**| | - **repositoryPolicySubject** | [**RepositoryPolicySubject**](RepositoryPolicySubject.md)| | - -### Return type - -void (empty response body) - -### 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 | -|-------------|-------------|------------------| -| **204** | Accepted | - | -| **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) - - -## GetPlugin - -> Repository GetPlugin (string owner, string name) - -Get a plugin - -Retrieve a plugin by name - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using PollinationSDK.Api; -using PollinationSDK.Client; -using PollinationSDK.Model; - -namespace Example -{ - public class GetPluginExample - { - 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 PluginsApi(Configuration.Default); - var owner = owner_example; // string | - var name = name_example; // string | - - try - { - // Get a plugin - Repository result = apiInstance.GetPlugin(owner, name); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling PluginsApi.GetPlugin: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **owner** | **string**| | - **name** | **string**| | - -### Return type - -[**Repository**](Repository.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 | - | -| **404** | Not found | - | -| **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) - - -## GetPluginAccessPermissions - -> RepositoryAccessPolicyList GetPluginAccessPermissions (string owner, string name, int? page = null, int? perPage = null, List subjectType = null, List permission = null) - -Get plugin access permissions - -Retrieve a plugin's access permissions (must have `write` permission) - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using PollinationSDK.Api; -using PollinationSDK.Client; -using PollinationSDK.Model; - -namespace Example -{ - public class GetPluginAccessPermissionsExample - { - 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 PluginsApi(Configuration.Default); - var owner = owner_example; // string | - var name = name_example; // string | - 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) - var subjectType = new List(); // List | The type of access policy subject (optional) - var permission = new List(); // List | An access policy permission string (optional) - - try - { - // Get plugin access permissions - RepositoryAccessPolicyList result = apiInstance.GetPluginAccessPermissions(owner, name, page, perPage, subjectType, permission); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling PluginsApi.GetPluginAccessPermissions: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **owner** | **string**| | - **name** | **string**| | - **page** | **int?**| Page number starting from 1 | [optional] [default to 1] - **perPage** | **int?**| Number of items per page | [optional] [default to 25] - **subjectType** | [**List<string>**](string.md)| The type of access policy subject | [optional] - **permission** | [**List<string>**](string.md)| An access policy permission string | [optional] - -### Return type - -[**RepositoryAccessPolicyList**](RepositoryAccessPolicyList.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) - - -## GetPluginByTag - -> PluginPackage GetPluginByTag (string owner, string name, string tag) - -Get a plugin tag - -Retrieve a plugin tag by name and tag - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using PollinationSDK.Api; -using PollinationSDK.Client; -using PollinationSDK.Model; - -namespace Example -{ - public class GetPluginByTagExample - { - 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 PluginsApi(Configuration.Default); - var owner = owner_example; // string | - var name = name_example; // string | - var tag = tag_example; // string | - - try - { - // Get a plugin tag - PluginPackage result = apiInstance.GetPluginByTag(owner, name, tag); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling PluginsApi.GetPluginByTag: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **owner** | **string**| | - **name** | **string**| | - **tag** | **string**| | - -### Return type - -[**PluginPackage**](PluginPackage.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 | - | -| **404** | Not found | - | -| **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) - - -## ListPluginTags - -> PluginPackageList ListPluginTags (string owner, string name, PackageSortKey sortBy = null, SortEnum? sortOrder = null, int? page = null, int? perPage = null) - -Get a plugin tags - -Retrieve a plugin by name - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using PollinationSDK.Api; -using PollinationSDK.Client; -using PollinationSDK.Model; - -namespace Example -{ - public class ListPluginTagsExample - { - 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 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 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) - - try - { - // Get a plugin tags - PluginPackageList result = apiInstance.ListPluginTags(owner, name, sortBy, sortOrder, page, perPage); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling PluginsApi.ListPluginTags: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **owner** | **string**| | - **name** | **string**| | - **sortBy** | [**PackageSortKey**](PackageSortKey.md)| 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] - -### Return type - -[**PluginPackageList**](PluginPackageList.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 | - | -| **404** | Not found | - | -| **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) - - -## 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) - -List plugins - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using PollinationSDK.Api; -using PollinationSDK.Client; -using PollinationSDK.Model; - -namespace Example -{ - public class ListPluginsExample - { - 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 PluginsApi(Configuration.Default); - var search = new List(); // List | You know, for search (optional) - var name = new List(); // List | The account name (optional) - var owner = new List(); // List | Owner of the project (optional) - 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 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) - - try - { - // List plugins - RepositoryList result = apiInstance.ListPlugins(search, name, owner, _public, keyword, permission, sortBy, sortOrder, page, perPage); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling PluginsApi.ListPlugins: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **search** | [**List<string>**](string.md)| You know, for search | [optional] - **name** | [**List<string>**](string.md)| The account name | [optional] - **owner** | [**List<string>**](string.md)| Owner of the project | [optional] - **_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] - **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] - -### Return type - -[**RepositoryList**](RepositoryList.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 | - | -| **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) - - -## UpdatePlugin - -> UpdateAccepted UpdatePlugin (string owner, string name, RepositoryUpdate repositoryUpdate) - -Update a Plugin - -Update a plugin (must have `contribute` permission) - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using PollinationSDK.Api; -using PollinationSDK.Client; -using PollinationSDK.Model; - -namespace Example -{ - public class UpdatePluginExample - { - 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 PluginsApi(Configuration.Default); - var owner = owner_example; // string | - var name = name_example; // string | - var repositoryUpdate = new RepositoryUpdate(); // RepositoryUpdate | - - try - { - // Update a Plugin - UpdateAccepted result = apiInstance.UpdatePlugin(owner, name, repositoryUpdate); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling PluginsApi.UpdatePlugin: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **owner** | **string**| | - **name** | **string**| | - **repositoryUpdate** | [**RepositoryUpdate**](RepositoryUpdate.md)| | - -### Return type - -[**UpdateAccepted**](UpdateAccepted.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 | -|-------------|-------------|------------------| -| **202** | Accepted | - | -| **403** | Access forbidden | - | -| **500** | Server error | - | -| **400** | Invalid request | - | -| **404** | Not found | - | -| **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) - - -## UpsertPluginPermission - -> UpdateAccepted UpsertPluginPermission (string owner, string name, RepositoryAccessPolicy repositoryAccessPolicy) - -Upsert a new permission to a plugin - -Upsert a plugin's access policy (must have `admin` permission) - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using PollinationSDK.Api; -using PollinationSDK.Client; -using PollinationSDK.Model; - -namespace Example -{ - public class UpsertPluginPermissionExample - { - 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 PluginsApi(Configuration.Default); - var owner = owner_example; // string | - var name = name_example; // string | - var repositoryAccessPolicy = new RepositoryAccessPolicy(); // RepositoryAccessPolicy | - - try - { - // Upsert a new permission to a plugin - UpdateAccepted result = apiInstance.UpsertPluginPermission(owner, name, repositoryAccessPolicy); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling PluginsApi.UpsertPluginPermission: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **owner** | **string**| | - **name** | **string**| | - **repositoryAccessPolicy** | [**RepositoryAccessPolicy**](RepositoryAccessPolicy.md)| | - -### Return type - -[**UpdateAccepted**](UpdateAccepted.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 | -|-------------|-------------|------------------| -| **202** | Accepted | - | -| **403** | Access forbidden | - | -| **500** | Server error | - | -| **400** | Invalid request | - | -| **404** | Not found | - | -| **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/PolicySubject.md b/docs/PolicySubject.md deleted file mode 100644 index 9a898572c..000000000 --- a/docs/PolicySubject.md +++ /dev/null @@ -1,15 +0,0 @@ - -# PollinationSDK.Model.PolicySubject - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**SubjectType** | **SubjectType** | | -**Name** | **string** | The name of the policy subject | -**Type** | **string** | | [optional] [readonly] [default to "PolicySubject"] - -[[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/Project.md b/docs/Project.md deleted file mode 100644 index aecbba245..000000000 --- a/docs/Project.md +++ /dev/null @@ -1,21 +0,0 @@ - -# PollinationSDK.Model.Project - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Name** | **string** | The name of the project. Must be unique to a given owner | -**Description** | **string** | A description of the project | [optional] [default to ""] -**Public** | **bool** | Whether or not a project is publicly viewable | [optional] [default to true] -**Id** | **string** | The project ID | -**Owner** | [**AccountPublic**](AccountPublic.md) | The project owner | -**Permissions** | [**UserPermission**](UserPermission.md) | | -**Slug** | **string** | The project name in slug format | -**Usage** | [**Usage**](Usage.md) | The resource consumption of this project | [optional] -**Type** | **string** | | [optional] [readonly] [default to "Project"] - -[[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/ProjectAccessPolicy.md b/docs/ProjectAccessPolicy.md deleted file mode 100644 index 0f700b118..000000000 --- a/docs/ProjectAccessPolicy.md +++ /dev/null @@ -1,15 +0,0 @@ - -# PollinationSDK.Model.ProjectAccessPolicy - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Subject** | [**PolicySubject**](PolicySubject.md) | The subject of the access policy | -**Permission** | **Permission** | The permission given to the subject of the access policy | -**Type** | **string** | | [optional] [readonly] [default to "ProjectAccessPolicy"] - -[[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/ProjectAccessPolicyList.md b/docs/ProjectAccessPolicyList.md deleted file mode 100644 index a19ff38c4..000000000 --- a/docs/ProjectAccessPolicyList.md +++ /dev/null @@ -1,19 +0,0 @@ - -# PollinationSDK.Model.ProjectAccessPolicyList - -## 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<ProjectAccessPolicy>**](ProjectAccessPolicy.md) | | -**NextPage** | **int** | The next page, if this on is not the last | [optional] -**Type** | **string** | | [optional] [readonly] [default to "ProjectAccessPolicyList"] - -[[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/ProjectCreate.md b/docs/ProjectCreate.md deleted file mode 100644 index 2289660b3..000000000 --- a/docs/ProjectCreate.md +++ /dev/null @@ -1,16 +0,0 @@ - -# PollinationSDK.Model.ProjectCreate - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Name** | **string** | The name of the project. Must be unique to a given owner | -**Description** | **string** | A description of the project | [optional] [default to ""] -**Public** | **bool** | Whether or not a project is publicly viewable | [optional] [default to true] -**Type** | **string** | | [optional] [readonly] [default to "ProjectCreate"] - -[[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/ProjectFolder.md b/docs/ProjectFolder.md deleted file mode 100644 index c184d6316..000000000 --- a/docs/ProjectFolder.md +++ /dev/null @@ -1,14 +0,0 @@ - -# PollinationSDK.Model.ProjectFolder - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Path** | **string** | The path to a folder where files and folders can be sourced. For a local filesystem this can be \"C:\\Users\\me\\jobs\\test\". | [optional] -**Type** | **string** | | [optional] [readonly] [default to "ProjectFolder"] - -[[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/ProjectList.md b/docs/ProjectList.md deleted file mode 100644 index 2c5de3833..000000000 --- a/docs/ProjectList.md +++ /dev/null @@ -1,19 +0,0 @@ - -# PollinationSDK.Model.ProjectList - -## 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<Project>**](Project.md) | | -**NextPage** | **int** | The next page, if this on is not the last | [optional] -**Type** | **string** | | [optional] [readonly] [default to "ProjectList"] - -[[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/ProjectPolicySubject.md b/docs/ProjectPolicySubject.md deleted file mode 100644 index 30c88b6fd..000000000 --- a/docs/ProjectPolicySubject.md +++ /dev/null @@ -1,15 +0,0 @@ - -# PollinationSDK.Model.ProjectPolicySubject - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**SubjectType** | [**SubjectType**](SubjectType.md) | | -**Name** | **string** | The name of the policy subject | -**Type** | **string** | | [optional] [readonly] [default to "ProjectPolicySubject"] - -[[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/ProjectRecipeFilter.md b/docs/ProjectRecipeFilter.md deleted file mode 100644 index f77b54e76..000000000 --- a/docs/ProjectRecipeFilter.md +++ /dev/null @@ -1,16 +0,0 @@ - -# PollinationSDK.Model.ProjectRecipeFilter - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Owner** | **string** | The name of the account the recipe belongs to | -**Name** | **string** | The name of the recipe | -**Tag** | **string** | The specific recipe tag | [optional] -**Type** | **string** | | [optional] [readonly] [default to "ProjectRecipeFilter"] - -[[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/ProjectRecipeFilterList.md b/docs/ProjectRecipeFilterList.md deleted file mode 100644 index 71c3c12da..000000000 --- a/docs/ProjectRecipeFilterList.md +++ /dev/null @@ -1,19 +0,0 @@ - -# PollinationSDK.Model.ProjectRecipeFilterList - -## 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<ProjectRecipeFilter>**](ProjectRecipeFilter.md) | | -**NextPage** | **int** | The next page, if this on is not the last | [optional] -**Type** | **string** | | [optional] [readonly] [default to "ProjectRecipeFilterList"] - -[[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/ProjectUpdate.md b/docs/ProjectUpdate.md deleted file mode 100644 index 29f113b4b..000000000 --- a/docs/ProjectUpdate.md +++ /dev/null @@ -1,16 +0,0 @@ - -# PollinationSDK.Model.ProjectUpdate - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Name** | **string** | The name of the project. Must be unique to a given owner | [optional] -**Description** | **string** | A description of the project | [optional] -**Public** | **bool** | Whether or not a project is publicly viewable | [optional] -**Type** | **string** | | [optional] [readonly] [default to "ProjectUpdate"] - -[[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 deleted file mode 100644 index bac6d4790..000000000 --- a/docs/ProjectsApi.md +++ /dev/null @@ -1,1098 +0,0 @@ -# PollinationSDK.Api.ProjectsApi - -All URIs are relative to *http://localhost* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**CreateProject**](ProjectsApi.md#createproject) | **POST** /projects/{owner} | Create a Project -[**CreateProjectRecipeFilter**](ProjectsApi.md#createprojectrecipefilter) | **POST** /projects/{owner}/{name}/recipes/filters | Upsert a recipe filter to a project -[**DeleteProject**](ProjectsApi.md#deleteproject) | **DELETE** /projects/{owner}/{name} | Delete a Project -[**DeleteProjectOrgPermission**](ProjectsApi.md#deleteprojectorgpermission) | **DELETE** /projects/{owner}/{name}/permissions | Remove a Project permissions -[**DeleteProjectRecipeFilter**](ProjectsApi.md#deleteprojectrecipefilter) | **DELETE** /projects/{owner}/{name}/recipes/filters | Remove a Project recipe filter -[**GetProject**](ProjectsApi.md#getproject) | **GET** /projects/{owner}/{name} | Get a project -[**GetProjectAccessPermissions**](ProjectsApi.md#getprojectaccesspermissions) | **GET** /projects/{owner}/{name}/permissions | Get project access permissions -[**GetProjectRecipeFilters**](ProjectsApi.md#getprojectrecipefilters) | **GET** /projects/{owner}/{name}/recipes/filters | Get project recipe filters -[**GetProjectRecipes**](ProjectsApi.md#getprojectrecipes) | **GET** /projects/{owner}/{name}/recipes | Get project recipes -[**ListProjects**](ProjectsApi.md#listprojects) | **GET** /projects | List Projects -[**Update**](ProjectsApi.md#update) | **PUT** /projects/{owner}/{name} | Update a Project -[**UpsertProjectPermission**](ProjectsApi.md#upsertprojectpermission) | **PATCH** /projects/{owner}/{name}/permissions | Upsert a new permission to a project - - - -## CreateProject - -> CreatedContent CreateProject (string owner, ProjectCreate projectCreate) - -Create a Project - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using PollinationSDK.Api; -using PollinationSDK.Client; -using PollinationSDK.Model; - -namespace Example -{ - public class CreateProjectExample - { - 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 ProjectsApi(Configuration.Default); - var owner = owner_example; // string | - var projectCreate = new ProjectCreate(); // ProjectCreate | - - try - { - // Create a Project - CreatedContent result = apiInstance.CreateProject(owner, projectCreate); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling ProjectsApi.CreateProject: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **owner** | **string**| | - **projectCreate** | [**ProjectCreate**](ProjectCreate.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 | -|-------------|-------------|------------------| -| **201** | Success | - | -| **403** | Access forbidden | - | -| **500** | Server error | - | -| **400** | Invalid request | - | -| **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) - - -## CreateProjectRecipeFilter - -> ProjectRecipeFilter CreateProjectRecipeFilter (string owner, string name, ProjectRecipeFilter projectRecipeFilter) - -Upsert a recipe filter to a project - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using PollinationSDK.Api; -using PollinationSDK.Client; -using PollinationSDK.Model; - -namespace Example -{ - public class CreateProjectRecipeFilterExample - { - 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 ProjectsApi(Configuration.Default); - var owner = owner_example; // string | - var name = name_example; // string | - var projectRecipeFilter = new ProjectRecipeFilter(); // ProjectRecipeFilter | - - try - { - // Upsert a recipe filter to a project - ProjectRecipeFilter result = apiInstance.CreateProjectRecipeFilter(owner, name, projectRecipeFilter); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling ProjectsApi.CreateProjectRecipeFilter: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **owner** | **string**| | - **name** | **string**| | - **projectRecipeFilter** | [**ProjectRecipeFilter**](ProjectRecipeFilter.md)| | - -### Return type - -[**ProjectRecipeFilter**](ProjectRecipeFilter.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 | -|-------------|-------------|------------------| -| **202** | Accepted | - | -| **403** | Access forbidden | - | -| **500** | Server error | - | -| **400** | Invalid request | - | -| **404** | Not found | - | -| **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) - - -## DeleteProject - -> void DeleteProject (string owner, string name) - -Delete a Project - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using PollinationSDK.Api; -using PollinationSDK.Client; -using PollinationSDK.Model; - -namespace Example -{ - public class DeleteProjectExample - { - 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 ProjectsApi(Configuration.Default); - var owner = owner_example; // string | - var name = name_example; // string | - - try - { - // Delete a Project - apiInstance.DeleteProject(owner, name); - } - catch (ApiException e) - { - Debug.Print("Exception when calling ProjectsApi.DeleteProject: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **owner** | **string**| | - **name** | **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** | Accepted | - | -| **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) - - -## DeleteProjectOrgPermission - -> void DeleteProjectOrgPermission (string owner, string name, ProjectPolicySubject projectPolicySubject) - -Remove a Project permissions - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using PollinationSDK.Api; -using PollinationSDK.Client; -using PollinationSDK.Model; - -namespace Example -{ - public class DeleteProjectOrgPermissionExample - { - 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 ProjectsApi(Configuration.Default); - var owner = owner_example; // string | - var name = name_example; // string | - var projectPolicySubject = new ProjectPolicySubject(); // ProjectPolicySubject | - - try - { - // Remove a Project permissions - apiInstance.DeleteProjectOrgPermission(owner, name, projectPolicySubject); - } - catch (ApiException e) - { - Debug.Print("Exception when calling ProjectsApi.DeleteProjectOrgPermission: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **owner** | **string**| | - **name** | **string**| | - **projectPolicySubject** | [**ProjectPolicySubject**](ProjectPolicySubject.md)| | - -### Return type - -void (empty response body) - -### 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 | -|-------------|-------------|------------------| -| **204** | Accepted | - | -| **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) - - -## DeleteProjectRecipeFilter - -> void DeleteProjectRecipeFilter (string owner, string name, ProjectRecipeFilter projectRecipeFilter) - -Remove a Project recipe filter - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using PollinationSDK.Api; -using PollinationSDK.Client; -using PollinationSDK.Model; - -namespace Example -{ - public class DeleteProjectRecipeFilterExample - { - 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 ProjectsApi(Configuration.Default); - var owner = owner_example; // string | - var name = name_example; // string | - var projectRecipeFilter = new ProjectRecipeFilter(); // ProjectRecipeFilter | - - try - { - // Remove a Project recipe filter - apiInstance.DeleteProjectRecipeFilter(owner, name, projectRecipeFilter); - } - catch (ApiException e) - { - Debug.Print("Exception when calling ProjectsApi.DeleteProjectRecipeFilter: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **owner** | **string**| | - **name** | **string**| | - **projectRecipeFilter** | [**ProjectRecipeFilter**](ProjectRecipeFilter.md)| | - -### Return type - -void (empty response body) - -### 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 | -|-------------|-------------|------------------| -| **204** | Accepted | - | -| **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) - - -## GetProject - -> Project GetProject (string owner, string name) - -Get a project - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using PollinationSDK.Api; -using PollinationSDK.Client; -using PollinationSDK.Model; - -namespace Example -{ - public class GetProjectExample - { - 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 ProjectsApi(Configuration.Default); - var owner = owner_example; // string | - var name = name_example; // string | - - try - { - // Get a project - Project result = apiInstance.GetProject(owner, name); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling ProjectsApi.GetProject: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **owner** | **string**| | - **name** | **string**| | - -### Return type - -[**Project**](Project.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 | - | -| **404** | Not found | - | -| **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) - - -## GetProjectAccessPermissions - -> ProjectAccessPolicyList GetProjectAccessPermissions (string owner, string name, int? page = null, int? perPage = null, List subjectType = null, List permission = null) - -Get project access permissions - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using PollinationSDK.Api; -using PollinationSDK.Client; -using PollinationSDK.Model; - -namespace Example -{ - public class GetProjectAccessPermissionsExample - { - 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 ProjectsApi(Configuration.Default); - var owner = owner_example; // string | - var name = name_example; // string | - 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) - var subjectType = new List(); // List | The type of access policy subject (optional) - var permission = new List(); // List | An access policy permission string (optional) - - try - { - // Get project access permissions - ProjectAccessPolicyList result = apiInstance.GetProjectAccessPermissions(owner, name, page, perPage, subjectType, permission); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling ProjectsApi.GetProjectAccessPermissions: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **owner** | **string**| | - **name** | **string**| | - **page** | **int?**| Page number starting from 1 | [optional] [default to 1] - **perPage** | **int?**| Number of items per page | [optional] [default to 25] - **subjectType** | [**List<string>**](string.md)| The type of access policy subject | [optional] - **permission** | [**List<string>**](string.md)| An access policy permission string | [optional] - -### Return type - -[**ProjectAccessPolicyList**](ProjectAccessPolicyList.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) - - -## GetProjectRecipeFilters - -> ProjectRecipeFilterList GetProjectRecipeFilters (string owner, string name, int? page = null, int? perPage = null) - -Get project recipe filters - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using PollinationSDK.Api; -using PollinationSDK.Client; -using PollinationSDK.Model; - -namespace Example -{ - public class GetProjectRecipeFiltersExample - { - 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 ProjectsApi(Configuration.Default); - var owner = owner_example; // string | - var name = name_example; // string | - 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 - { - // Get project recipe filters - ProjectRecipeFilterList result = apiInstance.GetProjectRecipeFilters(owner, name, page, perPage); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling ProjectsApi.GetProjectRecipeFilters: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **owner** | **string**| | - **name** | **string**| | - **page** | **int?**| Page number starting from 1 | [optional] [default to 1] - **perPage** | **int?**| Number of items per page | [optional] [default to 25] - -### Return type - -[**ProjectRecipeFilterList**](ProjectRecipeFilterList.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) - - -## GetProjectRecipes - -> RecipeInterfaceList GetProjectRecipes (string owner, string name, string search = null, int? page = null, int? perPage = null) - -Get project recipes - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using PollinationSDK.Api; -using PollinationSDK.Client; -using PollinationSDK.Model; - -namespace Example -{ - public class GetProjectRecipesExample - { - 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 ProjectsApi(Configuration.Default); - var owner = owner_example; // string | - var name = name_example; // string | - var search = search_example; // string | Search string to find recipes (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 - { - // Get project recipes - RecipeInterfaceList result = apiInstance.GetProjectRecipes(owner, name, search, page, perPage); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling ProjectsApi.GetProjectRecipes: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **owner** | **string**| | - **name** | **string**| | - **search** | **string**| Search string to find recipes | [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 - -[**RecipeInterfaceList**](RecipeInterfaceList.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) - - -## 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) - -List Projects - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using PollinationSDK.Api; -using PollinationSDK.Client; -using PollinationSDK.Model; - -namespace Example -{ - public class ListProjectsExample - { - 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 ProjectsApi(Configuration.Default); - var search = search_example; // string | Search string to find projects (optional) - var ids = new List(); // List | The ID of a project to search for (optional) - var names = new List(); // List | The name of the project (optional) - 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 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) - - try - { - // List Projects - ProjectList result = apiInstance.ListProjects(search, ids, names, owner, _public, permissions, sortBy, sortOrder, page, perPage); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling ProjectsApi.ListProjects: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **search** | **string**| Search string to find projects | [optional] - **ids** | [**List<string>**](string.md)| The ID of a project to search for | [optional] - **names** | [**List<string>**](string.md)| The name of the project | [optional] - **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] - **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] - -### Return type - -[**ProjectList**](ProjectList.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) - - -## Update - -> UpdateAccepted Update (string owner, string name, ProjectUpdate projectUpdate) - -Update a Project - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using PollinationSDK.Api; -using PollinationSDK.Client; -using PollinationSDK.Model; - -namespace Example -{ - public class UpdateExample - { - 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 ProjectsApi(Configuration.Default); - var owner = owner_example; // string | - var name = name_example; // string | - var projectUpdate = new ProjectUpdate(); // ProjectUpdate | - - try - { - // Update a Project - UpdateAccepted result = apiInstance.Update(owner, name, projectUpdate); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling ProjectsApi.Update: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **owner** | **string**| | - **name** | **string**| | - **projectUpdate** | [**ProjectUpdate**](ProjectUpdate.md)| | - -### Return type - -[**UpdateAccepted**](UpdateAccepted.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 | -|-------------|-------------|------------------| -| **202** | Accepted | - | -| **403** | Access forbidden | - | -| **500** | Server error | - | -| **400** | Invalid request | - | -| **404** | Not found | - | -| **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) - - -## UpsertProjectPermission - -> UpdateAccepted UpsertProjectPermission (string owner, string name, ProjectAccessPolicy projectAccessPolicy) - -Upsert a new permission to a project - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using PollinationSDK.Api; -using PollinationSDK.Client; -using PollinationSDK.Model; - -namespace Example -{ - public class UpsertProjectPermissionExample - { - 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 ProjectsApi(Configuration.Default); - var owner = owner_example; // string | - var name = name_example; // string | - var projectAccessPolicy = new ProjectAccessPolicy(); // ProjectAccessPolicy | - - try - { - // Upsert a new permission to a project - UpdateAccepted result = apiInstance.UpsertProjectPermission(owner, name, projectAccessPolicy); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling ProjectsApi.UpsertProjectPermission: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **owner** | **string**| | - **name** | **string**| | - **projectAccessPolicy** | [**ProjectAccessPolicy**](ProjectAccessPolicy.md)| | - -### Return type - -[**UpdateAccepted**](UpdateAccepted.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 | -|-------------|-------------|------------------| -| **202** | Accepted | - | -| **403** | Access forbidden | - | -| **500** | Server error | - | -| **400** | Invalid request | - | -| **404** | Not found | - | -| **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/PublicAccountList.md b/docs/PublicAccountList.md deleted file mode 100644 index 164d3c8e8..000000000 --- a/docs/PublicAccountList.md +++ /dev/null @@ -1,19 +0,0 @@ - -# PollinationSDK.Model.PublicAccountList - -## 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<AccountPublic>**](AccountPublic.md) | | -**NextPage** | **int** | The next page, if this on is not the last | [optional] -**Type** | **string** | | [optional] [readonly] [default to "PublicAccountList"] - -[[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/Recipe.md b/docs/Recipe.md deleted file mode 100644 index 37aaef6ae..000000000 --- a/docs/Recipe.md +++ /dev/null @@ -1,18 +0,0 @@ - -# PollinationSDK.Model.Recipe - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Flow** | [**List<DAG>**](DAG.md) | A list of tasks to create a DAG recipe. | -**Type** | **string** | | [optional] [readonly] [default to "Recipe"] -**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] - -[[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/RecipeInterface.md b/docs/RecipeInterface.md deleted file mode 100644 index 991e341cb..000000000 --- a/docs/RecipeInterface.md +++ /dev/null @@ -1,19 +0,0 @@ - -# PollinationSDK.Model.RecipeInterface - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Metadata** | [**MetaData**](MetaData.md) | Recipe metadata information. | -**Type** | **string** | | [optional] [readonly] [default to "RecipeInterface"] -**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"] -**Source** | **string** | A URL to the source this recipe from a registry. | [optional] -**Inputs** | [**List<AnyOfDAGGenericInputDAGStringInputDAGIntegerInputDAGNumberInputDAGBooleanInputDAGFolderInputDAGFileInputDAGPathInputDAGArrayInputDAGJSONObjectInput>**](AnyOfDAGGenericInputDAGStringInputDAGIntegerInputDAGNumberInputDAGBooleanInputDAGFolderInputDAGFileInputDAGPathInputDAGArrayInputDAGJSONObjectInput.md) | A list of recipe inputs. | [optional] -**Outputs** | [**List<AnyOfDAGGenericOutputDAGStringOutputDAGIntegerOutputDAGNumberOutputDAGBooleanOutputDAGFolderOutputDAGFileOutputDAGPathOutputDAGArrayOutputDAGJSONObjectOutput>**](AnyOfDAGGenericOutputDAGStringOutputDAGIntegerOutputDAGNumberOutputDAGBooleanOutputDAGFolderOutputDAGFileOutputDAGPathOutputDAGArrayOutputDAGJSONObjectOutput.md) | A list of recipe outputs. | [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/RecipeInterfaceList.md b/docs/RecipeInterfaceList.md deleted file mode 100644 index f6a5e3ddf..000000000 --- a/docs/RecipeInterfaceList.md +++ /dev/null @@ -1,19 +0,0 @@ - -# PollinationSDK.Model.RecipeInterfaceList - -## 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<RecipeInterface>**](RecipeInterface.md) | | -**NextPage** | **int** | The next page, if this on is not the last | [optional] -**Type** | **string** | | [optional] [readonly] [default to "RecipeInterfaceList"] - -[[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/RecipePackage.md b/docs/RecipePackage.md deleted file mode 100644 index 99e1a5ecc..000000000 --- a/docs/RecipePackage.md +++ /dev/null @@ -1,21 +0,0 @@ - -# PollinationSDK.Model.RecipePackage - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Digest** | **string** | The new package digest | -**Tag** | **string** | The new package tag | -**Keywords** | **List<string>** | keywords | [optional] -**Description** | **string** | description | [optional] -**Icon** | **string** | icon | [optional] -**CreatedAt** | **DateTime** | Creation Timestamp | [optional] -**Readme** | **string** | The Repository Readme | [optional] -**Manifest** | [**RecipeInterface**](RecipeInterface.md) | | -**Type** | **string** | | [optional] [readonly] [default to "RecipePackage"] - -[[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/RecipePackageList.md b/docs/RecipePackageList.md deleted file mode 100644 index 1e98e05d7..000000000 --- a/docs/RecipePackageList.md +++ /dev/null @@ -1,19 +0,0 @@ - -# PollinationSDK.Model.RecipePackageList - -## 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<RecipePackage>**](RecipePackage.md) | | -**NextPage** | **int** | The next page, if this on is not the last | [optional] -**Type** | **string** | | [optional] [readonly] [default to "RecipePackageList"] - -[[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 deleted file mode 100644 index 74dfd5949..000000000 --- a/docs/RecipesApi.md +++ /dev/null @@ -1,1029 +0,0 @@ -# PollinationSDK.Api.RecipesApi - -All URIs are relative to *http://localhost* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**CreateRecipe**](RecipesApi.md#createrecipe) | **POST** /recipes/{owner} | Create a Recipe -[**CreateRecipePackage**](RecipesApi.md#createrecipepackage) | **POST** /recipes/{owner}/{name}/tags | Create a new Recipe package -[**DeleteRecipe**](RecipesApi.md#deleterecipe) | **DELETE** /recipes/{owner}/{name} | Delete a Recipe -[**DeleteRecipeOrgPermission**](RecipesApi.md#deleterecipeorgpermission) | **DELETE** /recipes/{owner}/{name}/permissions | Remove a Repository permissions -[**GetRecipe**](RecipesApi.md#getrecipe) | **GET** /recipes/{owner}/{name} | Get a recipe -[**GetRecipeAccessPermissions**](RecipesApi.md#getrecipeaccesspermissions) | **GET** /recipes/{owner}/{name}/permissions | Get recipe access permissions -[**GetRecipeByTag**](RecipesApi.md#getrecipebytag) | **GET** /recipes/{owner}/{name}/tags/{tag} | Get a recipe tag -[**ListRecipeTags**](RecipesApi.md#listrecipetags) | **GET** /recipes/{owner}/{name}/tags | Get a recipe tags -[**ListRecipes**](RecipesApi.md#listrecipes) | **GET** /recipes | List recipes -[**UpdateRecipe**](RecipesApi.md#updaterecipe) | **PUT** /recipes/{owner}/{name} | Update a Recipe -[**UpsertRecipePermission**](RecipesApi.md#upsertrecipepermission) | **PATCH** /recipes/{owner}/{name}/permissions | Upsert a new permission to a recipe - - - -## CreateRecipe - -> CreatedContent CreateRecipe (string owner, RepositoryCreate repositoryCreate) - -Create a Recipe - -Create a new recipe. - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using PollinationSDK.Api; -using PollinationSDK.Client; -using PollinationSDK.Model; - -namespace Example -{ - public class CreateRecipeExample - { - 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 RecipesApi(Configuration.Default); - var owner = owner_example; // string | - var repositoryCreate = new RepositoryCreate(); // RepositoryCreate | - - try - { - // Create a Recipe - CreatedContent result = apiInstance.CreateRecipe(owner, repositoryCreate); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling RecipesApi.CreateRecipe: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **owner** | **string**| | - **repositoryCreate** | [**RepositoryCreate**](RepositoryCreate.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 | -|-------------|-------------|------------------| -| **201** | Success | - | -| **403** | Access forbidden | - | -| **500** | Server error | - | -| **400** | Invalid request | - | -| **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) - - -## CreateRecipePackage - -> CreatedContent CreateRecipePackage (string owner, string name, NewRecipePackage newRecipePackage) - -Create a new Recipe package - -Create a new recipe package version - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using PollinationSDK.Api; -using PollinationSDK.Client; -using PollinationSDK.Model; - -namespace Example -{ - public class CreateRecipePackageExample - { - 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 RecipesApi(Configuration.Default); - var owner = owner_example; // string | - var name = name_example; // string | - var newRecipePackage = new NewRecipePackage(); // NewRecipePackage | - - try - { - // Create a new Recipe package - CreatedContent result = apiInstance.CreateRecipePackage(owner, name, newRecipePackage); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling RecipesApi.CreateRecipePackage: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **owner** | **string**| | - **name** | **string**| | - **newRecipePackage** | [**NewRecipePackage**](NewRecipePackage.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** | Success | - | -| **403** | Access forbidden | - | -| **500** | Server error | - | -| **400** | Invalid request | - | -| **404** | Not found | - | -| **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) - - -## DeleteRecipe - -> void DeleteRecipe (string owner, string name) - -Delete a Recipe - -Delete a recipe (must have `admin` permission) - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using PollinationSDK.Api; -using PollinationSDK.Client; -using PollinationSDK.Model; - -namespace Example -{ - public class DeleteRecipeExample - { - 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 RecipesApi(Configuration.Default); - var owner = owner_example; // string | - var name = name_example; // string | - - try - { - // Delete a Recipe - apiInstance.DeleteRecipe(owner, name); - } - catch (ApiException e) - { - Debug.Print("Exception when calling RecipesApi.DeleteRecipe: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **owner** | **string**| | - **name** | **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** | Accepted | - | -| **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) - - -## DeleteRecipeOrgPermission - -> void DeleteRecipeOrgPermission (string owner, string name, RepositoryPolicySubject repositoryPolicySubject) - -Remove a Repository permissions - -Delete a recipe's access policy (must have `admin` permission) - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using PollinationSDK.Api; -using PollinationSDK.Client; -using PollinationSDK.Model; - -namespace Example -{ - public class DeleteRecipeOrgPermissionExample - { - 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 RecipesApi(Configuration.Default); - var owner = owner_example; // string | - var name = name_example; // string | - var repositoryPolicySubject = new RepositoryPolicySubject(); // RepositoryPolicySubject | - - try - { - // Remove a Repository permissions - apiInstance.DeleteRecipeOrgPermission(owner, name, repositoryPolicySubject); - } - catch (ApiException e) - { - Debug.Print("Exception when calling RecipesApi.DeleteRecipeOrgPermission: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **owner** | **string**| | - **name** | **string**| | - **repositoryPolicySubject** | [**RepositoryPolicySubject**](RepositoryPolicySubject.md)| | - -### Return type - -void (empty response body) - -### 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 | -|-------------|-------------|------------------| -| **204** | Accepted | - | -| **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) - - -## GetRecipe - -> Repository GetRecipe (string owner, string name) - -Get a recipe - -Retrieve a recipe by name - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using PollinationSDK.Api; -using PollinationSDK.Client; -using PollinationSDK.Model; - -namespace Example -{ - public class GetRecipeExample - { - 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 RecipesApi(Configuration.Default); - var owner = owner_example; // string | - var name = name_example; // string | - - try - { - // Get a recipe - Repository result = apiInstance.GetRecipe(owner, name); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling RecipesApi.GetRecipe: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **owner** | **string**| | - **name** | **string**| | - -### Return type - -[**Repository**](Repository.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 | - | -| **404** | Not found | - | -| **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) - - -## GetRecipeAccessPermissions - -> RepositoryAccessPolicyList GetRecipeAccessPermissions (string owner, string name, int? page = null, int? perPage = null, List subjectType = null, List permission = null) - -Get recipe access permissions - -Retrieve a recipe's access permissions (must have `write` permission) - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using PollinationSDK.Api; -using PollinationSDK.Client; -using PollinationSDK.Model; - -namespace Example -{ - public class GetRecipeAccessPermissionsExample - { - 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 RecipesApi(Configuration.Default); - var owner = owner_example; // string | - var name = name_example; // string | - 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) - var subjectType = new List(); // List | The type of access policy subject (optional) - var permission = new List(); // List | An access policy permission string (optional) - - try - { - // Get recipe access permissions - RepositoryAccessPolicyList result = apiInstance.GetRecipeAccessPermissions(owner, name, page, perPage, subjectType, permission); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling RecipesApi.GetRecipeAccessPermissions: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **owner** | **string**| | - **name** | **string**| | - **page** | **int?**| Page number starting from 1 | [optional] [default to 1] - **perPage** | **int?**| Number of items per page | [optional] [default to 25] - **subjectType** | [**List<string>**](string.md)| The type of access policy subject | [optional] - **permission** | [**List<string>**](string.md)| An access policy permission string | [optional] - -### Return type - -[**RepositoryAccessPolicyList**](RepositoryAccessPolicyList.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) - - -## GetRecipeByTag - -> RecipePackage GetRecipeByTag (string owner, string name, string tag) - -Get a recipe tag - -Retrieve a recipe tag by name and tag - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using PollinationSDK.Api; -using PollinationSDK.Client; -using PollinationSDK.Model; - -namespace Example -{ - public class GetRecipeByTagExample - { - 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 RecipesApi(Configuration.Default); - var owner = owner_example; // string | - var name = name_example; // string | - var tag = tag_example; // string | - - try - { - // Get a recipe tag - RecipePackage result = apiInstance.GetRecipeByTag(owner, name, tag); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling RecipesApi.GetRecipeByTag: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **owner** | **string**| | - **name** | **string**| | - **tag** | **string**| | - -### Return type - -[**RecipePackage**](RecipePackage.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 | - | -| **404** | Not found | - | -| **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) - - -## ListRecipeTags - -> RecipePackageList ListRecipeTags (string owner, string name, PackageSortKey sortBy = null, SortEnum? sortOrder = null, int? page = null, int? perPage = null) - -Get a recipe tags - -Retrieve a recipe by name - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using PollinationSDK.Api; -using PollinationSDK.Client; -using PollinationSDK.Model; - -namespace Example -{ - public class ListRecipeTagsExample - { - 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 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 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) - - try - { - // Get a recipe tags - RecipePackageList result = apiInstance.ListRecipeTags(owner, name, sortBy, sortOrder, page, perPage); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling RecipesApi.ListRecipeTags: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **owner** | **string**| | - **name** | **string**| | - **sortBy** | [**PackageSortKey**](PackageSortKey.md)| 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] - -### Return type - -[**RecipePackageList**](RecipePackageList.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 | - | -| **404** | Not found | - | -| **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) - - -## 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) - -List recipes - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using PollinationSDK.Api; -using PollinationSDK.Client; -using PollinationSDK.Model; - -namespace Example -{ - public class ListRecipesExample - { - 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 RecipesApi(Configuration.Default); - var search = new List(); // List | You know, for search (optional) - var name = new List(); // List | The account name (optional) - var owner = new List(); // List | Owner of the project (optional) - 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 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) - - try - { - // List recipes - RepositoryList result = apiInstance.ListRecipes(search, name, owner, _public, keyword, permission, sortBy, sortOrder, page, perPage); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling RecipesApi.ListRecipes: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **search** | [**List<string>**](string.md)| You know, for search | [optional] - **name** | [**List<string>**](string.md)| The account name | [optional] - **owner** | [**List<string>**](string.md)| Owner of the project | [optional] - **_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] - **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] - -### Return type - -[**RepositoryList**](RepositoryList.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 | - | -| **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) - - -## UpdateRecipe - -> UpdateAccepted UpdateRecipe (string owner, string name, RepositoryUpdate repositoryUpdate) - -Update a Recipe - -Update a recipe (must have `contribute` permission) - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using PollinationSDK.Api; -using PollinationSDK.Client; -using PollinationSDK.Model; - -namespace Example -{ - public class UpdateRecipeExample - { - 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 RecipesApi(Configuration.Default); - var owner = owner_example; // string | - var name = name_example; // string | - var repositoryUpdate = new RepositoryUpdate(); // RepositoryUpdate | - - try - { - // Update a Recipe - UpdateAccepted result = apiInstance.UpdateRecipe(owner, name, repositoryUpdate); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling RecipesApi.UpdateRecipe: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **owner** | **string**| | - **name** | **string**| | - **repositoryUpdate** | [**RepositoryUpdate**](RepositoryUpdate.md)| | - -### Return type - -[**UpdateAccepted**](UpdateAccepted.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 | -|-------------|-------------|------------------| -| **202** | Accepted | - | -| **403** | Access forbidden | - | -| **500** | Server error | - | -| **400** | Invalid request | - | -| **404** | Not found | - | -| **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) - - -## UpsertRecipePermission - -> UpdateAccepted UpsertRecipePermission (string owner, string name, RepositoryAccessPolicy repositoryAccessPolicy) - -Upsert a new permission to a recipe - -Upsert a recipe's access policy (must have `admin` permission) - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using PollinationSDK.Api; -using PollinationSDK.Client; -using PollinationSDK.Model; - -namespace Example -{ - public class UpsertRecipePermissionExample - { - 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 RecipesApi(Configuration.Default); - var owner = owner_example; // string | - var name = name_example; // string | - var repositoryAccessPolicy = new RepositoryAccessPolicy(); // RepositoryAccessPolicy | - - try - { - // Upsert a new permission to a recipe - UpdateAccepted result = apiInstance.UpsertRecipePermission(owner, name, repositoryAccessPolicy); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling RecipesApi.UpsertRecipePermission: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **owner** | **string**| | - **name** | **string**| | - **repositoryAccessPolicy** | [**RepositoryAccessPolicy**](RepositoryAccessPolicy.md)| | - -### Return type - -[**UpdateAccepted**](UpdateAccepted.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 | -|-------------|-------------|------------------| -| **202** | Accepted | - | -| **403** | Access forbidden | - | -| **500** | Server error | - | -| **400** | Invalid request | - | -| **404** | Not found | - | -| **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/RegistriesApi.md b/docs/RegistriesApi.md deleted file mode 100644 index 9c0f3c08a..000000000 --- a/docs/RegistriesApi.md +++ /dev/null @@ -1,438 +0,0 @@ -# PollinationSDK.Api.RegistriesApi - -All URIs are relative to *http://localhost* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**GetPackage**](RegistriesApi.md#getpackage) | **GET** /registries/{owner}/{type}/{name}/{digest} | Get Package -[**GetPackageJson**](RegistriesApi.md#getpackagejson) | **GET** /registries/{owner}/{type}/{name}/{digest}/json | Get Package in JSON format -[**GetRegistryIndex**](RegistriesApi.md#getregistryindex) | **GET** /registries/{owner}/index.json | Get Registry Index -[**PostPlugin**](RegistriesApi.md#postplugin) | **POST** /registries/{owner}/plugins | Push a plugin to the registry -[**PostRecipe**](RegistriesApi.md#postrecipe) | **POST** /registries/{owner}/recipes | Push an Recipe to the registry - - - -## GetPackage - -> AnyType GetPackage (string owner, string type, string name, string digest) - -Get Package - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using PollinationSDK.Api; -using PollinationSDK.Client; -using PollinationSDK.Model; - -namespace Example -{ - public class GetPackageExample - { - 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 RegistriesApi(Configuration.Default); - var owner = owner_example; // string | - var type = type_example; // string | - var name = name_example; // string | - var digest = digest_example; // string | - - try - { - // Get Package - AnyType result = apiInstance.GetPackage(owner, type, name, digest); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling RegistriesApi.GetPackage: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **owner** | **string**| | - **type** | **string**| | - **name** | **string**| | - **digest** | **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, application/x-tar - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Retrieved | - | -| **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) - - -## GetPackageJson - -> AnyOfRecipePlugin GetPackageJson (string owner, string type, string name, string digest) - -Get Package in JSON format - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using PollinationSDK.Api; -using PollinationSDK.Client; -using PollinationSDK.Model; - -namespace Example -{ - public class GetPackageJsonExample - { - 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 RegistriesApi(Configuration.Default); - var owner = owner_example; // string | - var type = type_example; // string | - var name = name_example; // string | - var digest = digest_example; // string | - - try - { - // Get Package in JSON format - AnyOfRecipePlugin result = apiInstance.GetPackageJson(owner, type, name, digest); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling RegistriesApi.GetPackageJson: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **owner** | **string**| | - **type** | **string**| | - **name** | **string**| | - **digest** | **string**| | - -### Return type - -[**AnyOfRecipePlugin**](AnyOfRecipePlugin.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 | - | -| **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) - - -## GetRegistryIndex - -> RepositoryIndex GetRegistryIndex (string owner) - -Get Registry Index - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using PollinationSDK.Api; -using PollinationSDK.Client; -using PollinationSDK.Model; - -namespace Example -{ - public class GetRegistryIndexExample - { - 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 RegistriesApi(Configuration.Default); - var owner = owner_example; // string | - - try - { - // Get Registry Index - RepositoryIndex result = apiInstance.GetRegistryIndex(owner); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling RegistriesApi.GetRegistryIndex: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **owner** | **string**| | - -### Return type - -[**RepositoryIndex**](RepositoryIndex.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 | - | -| **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) - - -## PostPlugin - -> AnyType PostPlugin (string owner, string type = null, System.IO.Stream package = null) - -Push a plugin to the registry - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using PollinationSDK.Api; -using PollinationSDK.Client; -using PollinationSDK.Model; - -namespace Example -{ - public class PostPluginExample - { - 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 RegistriesApi(Configuration.Default); - var owner = owner_example; // string | - var type = type_example; // string | (optional) (default to "Body_post_plugin__owner__plugins_post") - var package = BINARY_DATA_HERE; // System.IO.Stream | (optional) - - try - { - // Push a plugin to the registry - AnyType result = apiInstance.PostPlugin(owner, type, package); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling RegistriesApi.PostPlugin: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **owner** | **string**| | - **type** | **string**| | [optional] [default to "Body_post_plugin__owner__plugins_post"] - **package** | **System.IO.Stream**| | [optional] - -### Return type - -[**AnyType**](AnyType.md) - -### Authorization - -[APIKeyAuth](../README.md#APIKeyAuth), [JWTAuth](../README.md#JWTAuth) - -### HTTP request headers - -- **Content-Type**: multipart/form-data -- **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **201** | Created | - | -| **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) - - -## PostRecipe - -> AnyType PostRecipe (string owner, string type = null, System.IO.Stream package = null) - -Push an Recipe to the registry - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using PollinationSDK.Api; -using PollinationSDK.Client; -using PollinationSDK.Model; - -namespace Example -{ - public class PostRecipeExample - { - 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 RegistriesApi(Configuration.Default); - var owner = owner_example; // string | - var type = type_example; // string | (optional) (default to "Body_post_recipe__owner__recipes_post") - var package = BINARY_DATA_HERE; // System.IO.Stream | (optional) - - try - { - // Push an Recipe to the registry - AnyType result = apiInstance.PostRecipe(owner, type, package); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling RegistriesApi.PostRecipe: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **owner** | **string**| | - **type** | **string**| | [optional] [default to "Body_post_recipe__owner__recipes_post"] - **package** | **System.IO.Stream**| | [optional] - -### Return type - -[**AnyType**](AnyType.md) - -### Authorization - -[APIKeyAuth](../README.md#APIKeyAuth), [JWTAuth](../README.md#JWTAuth) - -### HTTP request headers - -- **Content-Type**: multipart/form-data -- **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **201** | Created | - | -| **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/Repository.md b/docs/Repository.md deleted file mode 100644 index 11bcc6185..000000000 --- a/docs/Repository.md +++ /dev/null @@ -1,19 +0,0 @@ - -# PollinationSDK.Model.Repository - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Name** | **string** | The name of the repository | -**Id** | **string** | The recipe unique ID | -**LatestTag** | **string** | The latest package version to be indexed | -**Owner** | [**AccountPublic**](AccountPublic.md) | The owner of the repository | -**Permissions** | [**RepositoryUserPermissions**](RepositoryUserPermissions.md) | The permissions the user making the API call has on the resource | [optional] -**Slug** | **string** | The repository slug | [optional] -**Type** | **string** | | [optional] [readonly] [default to "Repository"] - -[[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/RepositoryAccessPolicy.md b/docs/RepositoryAccessPolicy.md deleted file mode 100644 index 714afa83c..000000000 --- a/docs/RepositoryAccessPolicy.md +++ /dev/null @@ -1,15 +0,0 @@ - -# PollinationSDK.Model.RepositoryAccessPolicy - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Subject** | [**PolicySubject**](PolicySubject.md) | The subject of the access policy | -**Permission** | **Permission** | The permission given to the subject of the access policy | -**Type** | **string** | | [optional] [readonly] [default to "RepositoryAccessPolicy"] - -[[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/RepositoryAccessPolicyList.md b/docs/RepositoryAccessPolicyList.md deleted file mode 100644 index 00639dcbf..000000000 --- a/docs/RepositoryAccessPolicyList.md +++ /dev/null @@ -1,19 +0,0 @@ - -# PollinationSDK.Model.RepositoryAccessPolicyList - -## 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<RepositoryAccessPolicy>**](RepositoryAccessPolicy.md) | | -**NextPage** | **int** | The next page, if this on is not the last | [optional] -**Type** | **string** | | [optional] [readonly] [default to "RepositoryAccessPolicyList"] - -[[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/RepositoryCreate.md b/docs/RepositoryCreate.md deleted file mode 100644 index 0e6aca8c2..000000000 --- a/docs/RepositoryCreate.md +++ /dev/null @@ -1,18 +0,0 @@ - -# PollinationSDK.Model.RepositoryCreate - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Public** | **bool** | Whether or not a repository is publicly viewable | [optional] -**Keywords** | **List<string>** | A list of keywords to index the repository by | [optional] -**Description** | **string** | A description of the repository | [optional] -**Icon** | **string** | An icon to represent this repository | [optional] -**Name** | **string** | The name of the repository | -**Type** | **string** | | [optional] [readonly] [default to "RepositoryCreate"] - -[[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/RepositoryIndex.md b/docs/RepositoryIndex.md deleted file mode 100644 index de7485efa..000000000 --- a/docs/RepositoryIndex.md +++ /dev/null @@ -1,19 +0,0 @@ - -# PollinationSDK.Model.RepositoryIndex - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Type** | **string** | | [optional] [readonly] [default to "RepositoryIndex"] -**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"] -**Generated** | **DateTime** | The timestamp at which the index was generated | [optional] -**Metadata** | [**RepositoryMetadata**](RepositoryMetadata.md) | Extra information about the repository | [optional] -**Plugin** | **Dictionary<string, List<PackageVersion>>** | A dict of plugins accessible by name. Each name key points to a list of plugin versions | [optional] -**Recipe** | **Dictionary<string, List<PackageVersion>>** | A dict of recipes accessible by name. Each name key points to a list of recipesversions | [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/RepositoryList.md b/docs/RepositoryList.md deleted file mode 100644 index aca82b5f6..000000000 --- a/docs/RepositoryList.md +++ /dev/null @@ -1,19 +0,0 @@ - -# PollinationSDK.Model.RepositoryList - -## 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<Repository>**](Repository.md) | | -**NextPage** | **int** | The next page, if this on is not the last | [optional] -**Type** | **string** | | [optional] [readonly] [default to "RepositoryList"] - -[[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/RepositoryMetadata.md b/docs/RepositoryMetadata.md deleted file mode 100644 index 4fb855528..000000000 --- a/docs/RepositoryMetadata.md +++ /dev/null @@ -1,19 +0,0 @@ - -# PollinationSDK.Model.RepositoryMetadata - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Type** | **string** | | [optional] [readonly] [default to "RepositoryMetadata"] -**Annotations** | **Dictionary<string, string>** | An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries. | [optional] -**Name** | **string** | The name of the repository | [optional] -**Description** | **string** | A short description of the repository | [optional] [default to "A Queenbee package repository"] -**Source** | **string** | The source path (url or local) to the repository | [optional] -**PluginCount** | **int** | The number of plugins hosted by the repository | [optional] [default to 0] -**RecipeCount** | **int** | The number of recipes hosted by the repository | [optional] [default to 0] - -[[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/RepositoryPackage.md b/docs/RepositoryPackage.md deleted file mode 100644 index d77731012..000000000 --- a/docs/RepositoryPackage.md +++ /dev/null @@ -1,20 +0,0 @@ - -# PollinationSDK.Model.RepositoryPackage - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Digest** | **string** | The new package digest | -**Tag** | **string** | The new package tag | -**Keywords** | **List<string>** | keywords | [optional] -**Description** | **string** | description | [optional] -**Icon** | **string** | icon | [optional] -**CreatedAt** | **DateTime** | Creation Timestamp | [optional] -**Readme** | **string** | The Repository Readme | [optional] -**Type** | **string** | | [optional] [readonly] [default to "RepositoryPackage"] - -[[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/RepositoryPolicySubject.md b/docs/RepositoryPolicySubject.md deleted file mode 100644 index a98a913c7..000000000 --- a/docs/RepositoryPolicySubject.md +++ /dev/null @@ -1,15 +0,0 @@ - -# PollinationSDK.Model.RepositoryPolicySubject - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**SubjectType** | [**SubjectType**](SubjectType.md) | | -**Name** | **string** | The name of the policy subject | -**Type** | **string** | | [optional] [readonly] [default to "RepositoryPolicySubject"] - -[[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/RepositoryUpdate.md b/docs/RepositoryUpdate.md deleted file mode 100644 index a9c067bd3..000000000 --- a/docs/RepositoryUpdate.md +++ /dev/null @@ -1,17 +0,0 @@ - -# PollinationSDK.Model.RepositoryUpdate - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Public** | **bool** | Whether or not a repository is publicly viewable | [optional] -**Keywords** | **List<string>** | A list of keywords to index the repository by | [optional] -**Description** | **string** | A description of the repository | [optional] -**Icon** | **string** | An icon to represent this repository | [optional] -**Type** | **string** | | [optional] [readonly] [default to "RepositoryUpdate"] - -[[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/RepositoryUserPermissions.md b/docs/RepositoryUserPermissions.md deleted file mode 100644 index 6b7a2b262..000000000 --- a/docs/RepositoryUserPermissions.md +++ /dev/null @@ -1,16 +0,0 @@ - -# PollinationSDK.Model.RepositoryUserPermissions - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Admin** | **bool** | The user has admin permission to this resource | [optional] [default to false] -**Write** | **bool** | The user has write permission on this resource | [optional] [default to false] -**Read** | **bool** | The user has read permission on this resource | [optional] [default to false] -**Type** | **string** | | [optional] [readonly] [default to "RepositoryUserPermissions"] - -[[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/RoleEnum.md b/docs/RoleEnum.md deleted file mode 100644 index afba4c339..000000000 --- a/docs/RoleEnum.md +++ /dev/null @@ -1,12 +0,0 @@ - -# PollinationSDK.Model.RoleEnum - -## 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/Run.md b/docs/Run.md deleted file mode 100644 index 457ef32f5..000000000 --- a/docs/Run.md +++ /dev/null @@ -1,19 +0,0 @@ - -# PollinationSDK.Model.Run - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Id** | **string** | The unique ID for this run | -**Author** | [**AccountPublic**](AccountPublic.md) | author | [optional] -**Owner** | [**AccountPublic**](AccountPublic.md) | owner | [optional] -**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] -**Type** | **string** | | [optional] [readonly] [default to "Run"] - -[[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/RunList.md b/docs/RunList.md deleted file mode 100644 index 75dfb029b..000000000 --- a/docs/RunList.md +++ /dev/null @@ -1,19 +0,0 @@ - -# PollinationSDK.Model.RunList - -## 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<Run>**](Run.md) | | -**NextPage** | **int** | The next page, if this on is not the last | [optional] -**Type** | **string** | | [optional] [readonly] [default to "RunList"] - -[[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/RunResultList.md b/docs/RunResultList.md deleted file mode 100644 index 396be0e34..000000000 --- a/docs/RunResultList.md +++ /dev/null @@ -1,19 +0,0 @@ - -# PollinationSDK.Model.RunResultList - -## 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<List<AnyOfStepStringInputStepIntegerInputStepNumberInputStepBooleanInputStepFolderInputStepFileInputStepPathInputStepArrayInputStepJSONObjectInputStepStringOutputStepIntegerOutputStepNumberOutputStepBooleanOutputStepFolderOutputStepFileOutputStepPathOutputStepArrayOutputStepJSONObjectOutput>>** | | -**NextPage** | **int** | The next page, if this on is not the last | [optional] -**Type** | **string** | | [optional] [readonly] [default to "RunResultList"] - -[[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/RunStatus.md b/docs/RunStatus.md deleted file mode 100644 index 76fd601bd..000000000 --- a/docs/RunStatus.md +++ /dev/null @@ -1,26 +0,0 @@ - -# PollinationSDK.Model.RunStatus - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Inputs** | [**List<AnyOfStepStringInputStepIntegerInputStepNumberInputStepBooleanInputStepFolderInputStepFileInputStepPathInputStepArrayInputStepJSONObjectInput>**](AnyOfStepStringInputStepIntegerInputStepNumberInputStepBooleanInputStepFolderInputStepFileInputStepPathInputStepArrayInputStepJSONObjectInput.md) | The inputs used for this run. | -**Outputs** | [**List<AnyOfStepStringOutputStepIntegerOutputStepNumberOutputStepBooleanOutputStepFolderOutputStepFileOutputStepPathOutputStepArrayOutputStepJSONObjectOutput>**](AnyOfStepStringOutputStepIntegerOutputStepNumberOutputStepBooleanOutputStepFolderOutputStepFileOutputStepPathOutputStepArrayOutputStepJSONObjectOutput.md) | The outputs produced by this run. | -**StartedAt** | **DateTime** | The time at which the task was started | -**Id** | **string** | The ID of the individual run. | -**JobId** | **string** | The ID of the job that generated this run. | -**Annotations** | **Dictionary<string, string>** | An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries. | [optional] -**Message** | **string** | Any message produced by the task. Usually error/debugging hints. | [optional] -**FinishedAt** | **DateTime** | The time at which the task was completed | [optional] -**Source** | **string** | Source url for the status object. It can be a recipe or a function. | [optional] -**ApiVersion** | **string** | | [optional] [readonly] [default to "v1beta1"] -**Entrypoint** | **string** | The ID of the first step in the run. | [optional] -**Status** | **RunStatusEnum** | The status of this run. | [optional] -**Steps** | [**Dictionary<string, StepStatus>**](StepStatus.md) | | [optional] -**Type** | **string** | | [optional] [readonly] [default to "RunStatus"] - -[[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/RunStatusEnum.md b/docs/RunStatusEnum.md deleted file mode 100644 index 194c946c9..000000000 --- a/docs/RunStatusEnum.md +++ /dev/null @@ -1,12 +0,0 @@ - -# PollinationSDK.Model.RunStatusEnum - -## 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/RunsApi.md b/docs/RunsApi.md deleted file mode 100644 index 30bcc1053..000000000 --- a/docs/RunsApi.md +++ /dev/null @@ -1,844 +0,0 @@ -# PollinationSDK.Api.RunsApi - -All URIs are relative to *http://localhost* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**CancelRun**](RunsApi.md#cancelrun) | **PUT** /projects/{owner}/{name}/runs/{run_id}/cancel | Cancel a run -[**DownloadRunArtifact**](RunsApi.md#downloadrunartifact) | **GET** /projects/{owner}/{name}/runs/{run_id}/artifacts/download | Download an artifact from the run folder -[**GetRun**](RunsApi.md#getrun) | **GET** /projects/{owner}/{name}/runs/{run_id} | Get a Run -[**GetRunOutput**](RunsApi.md#getrunoutput) | **GET** /projects/{owner}/{name}/runs/{run_id}/outputs/{output_name} | Get run output by name -[**GetRunStepLogs**](RunsApi.md#getrunsteplogs) | **GET** /projects/{owner}/{name}/runs/{run_id}/steps/{step_id}/logs | Get the logs of a specific step of the run -[**GetRunSteps**](RunsApi.md#getrunsteps) | **GET** /projects/{owner}/{name}/runs/{run_id}/steps | Query the steps of a run -[**ListRunArtifacts**](RunsApi.md#listrunartifacts) | **GET** /projects/{owner}/{name}/runs/{run_id}/artifacts | List artifacts in a run folder -[**ListRuns**](RunsApi.md#listruns) | **GET** /projects/{owner}/{name}/runs | List runs -[**QueryResults**](RunsApi.md#queryresults) | **GET** /projects/{owner}/{name}/results | Query run results - - - -## CancelRun - -> AnyType CancelRun (string owner, string name, string runId) - -Cancel a run - -Stop a run. - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using PollinationSDK.Api; -using PollinationSDK.Client; -using PollinationSDK.Model; - -namespace Example -{ - public class CancelRunExample - { - 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 RunsApi(Configuration.Default); - var owner = owner_example; // string | - var name = name_example; // string | - var runId = runId_example; // string | - - try - { - // Cancel a run - AnyType result = apiInstance.CancelRun(owner, name, runId); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling RunsApi.CancelRun: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **owner** | **string**| | - **name** | **string**| | - **runId** | **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) - - -## DownloadRunArtifact - -> AnyType DownloadRunArtifact (string owner, string name, string runId, string path = null) - -Download an artifact from the run folder - -Get a download link for an artifact in a run folder - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using PollinationSDK.Api; -using PollinationSDK.Client; -using PollinationSDK.Model; - -namespace Example -{ - public class DownloadRunArtifactExample - { - 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 RunsApi(Configuration.Default); - var owner = owner_example; // string | - var name = name_example; // string | - var runId = runId_example; // string | - var path = path_example; // string | The path to an file within a project folder (optional) - - try - { - // Download an artifact from the run folder - AnyType result = apiInstance.DownloadRunArtifact(owner, name, runId, path); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling RunsApi.DownloadRunArtifact: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **owner** | **string**| | - **name** | **string**| | - **runId** | **string**| | - **path** | **string**| The path to an file within a project folder | [optional] - -### 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** | Retrieved | - | -| **403** | Access forbidden | - | -| **500** | Server error | - | -| **400** | Invalid request | - | -| **404** | Not found | - | -| **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) - - -## GetRun - -> Run GetRun (string owner, string name, string runId) - -Get a Run - -Retrieve a run. - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using PollinationSDK.Api; -using PollinationSDK.Client; -using PollinationSDK.Model; - -namespace Example -{ - public class GetRunExample - { - 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 RunsApi(Configuration.Default); - var owner = owner_example; // string | - var name = name_example; // string | - var runId = runId_example; // string | - - try - { - // Get a Run - Run result = apiInstance.GetRun(owner, name, runId); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling RunsApi.GetRun: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **owner** | **string**| | - **name** | **string**| | - **runId** | **string**| | - -### Return type - -[**Run**](Run.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 | - | -| **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) - - -## GetRunOutput - -> AnyType GetRunOutput (string owner, string name, string runId, string outputName) - -Get run output by name - -get run output by name - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using PollinationSDK.Api; -using PollinationSDK.Client; -using PollinationSDK.Model; - -namespace Example -{ - public class GetRunOutputExample - { - 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 RunsApi(Configuration.Default); - var owner = owner_example; // string | - var name = name_example; // string | - var runId = runId_example; // string | - var outputName = outputName_example; // string | - - try - { - // Get run output by name - AnyType result = apiInstance.GetRunOutput(owner, name, runId, outputName); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling RunsApi.GetRunOutput: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **owner** | **string**| | - **name** | **string**| | - **runId** | **string**| | - **outputName** | **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** | Retrieved | - | -| **403** | Access forbidden | - | -| **500** | Server error | - | -| **400** | Invalid request | - | -| **404** | Not found | - | -| **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) - - -## GetRunStepLogs - -> string GetRunStepLogs (string owner, string name, string runId, string stepId) - -Get the logs of a specific step of the run - -get run step logs - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using PollinationSDK.Api; -using PollinationSDK.Client; -using PollinationSDK.Model; - -namespace Example -{ - public class GetRunStepLogsExample - { - 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 RunsApi(Configuration.Default); - var owner = owner_example; // string | - var name = name_example; // string | - var runId = runId_example; // string | - var stepId = stepId_example; // string | - - try - { - // Get the logs of a specific step of the run - string result = apiInstance.GetRunStepLogs(owner, name, runId, stepId); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling RunsApi.GetRunStepLogs: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **owner** | **string**| | - **name** | **string**| | - **runId** | **string**| | - **stepId** | **string**| | - -### Return type - -**string** - -### 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 | - | -| **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) - - -## GetRunSteps - -> StepList GetRunSteps (string owner, string name, string runId, StepStatusEnum? status = null, List stepId = null, string untilGeneration = null, string sinceGeneration = null, int? page = null, int? perPage = null) - -Query the steps of a run - -list run steps - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using PollinationSDK.Api; -using PollinationSDK.Client; -using PollinationSDK.Model; - -namespace Example -{ - public class GetRunStepsExample - { - 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 RunsApi(Configuration.Default); - var owner = owner_example; // string | - var name = name_example; // string | - var runId = runId_example; // string | - var status = ; // StepStatusEnum? | (optional) - var stepId = new List(); // List | (optional) - var untilGeneration = untilGeneration_example; // string | (optional) - var sinceGeneration = sinceGeneration_example; // string | (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 - { - // Query the steps of a run - StepList result = apiInstance.GetRunSteps(owner, name, runId, status, stepId, untilGeneration, sinceGeneration, page, perPage); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling RunsApi.GetRunSteps: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **owner** | **string**| | - **name** | **string**| | - **runId** | **string**| | - **status** | **StepStatusEnum?**| | [optional] - **stepId** | [**List<string>**](string.md)| | [optional] - **untilGeneration** | **string**| | [optional] - **sinceGeneration** | **string**| | [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 - -[**StepList**](StepList.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 | - | -| **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) - - -## ListRunArtifacts - -> List<FileMeta> ListRunArtifacts (string owner, string name, string runId, List path = null, int? page = null, int? perPage = null) - -List artifacts in a run folder - -Retrieve a list of artifacts in a run folder - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using PollinationSDK.Api; -using PollinationSDK.Client; -using PollinationSDK.Model; - -namespace Example -{ - public class ListRunArtifactsExample - { - 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 RunsApi(Configuration.Default); - var owner = owner_example; // string | - var name = name_example; // string | - var runId = runId_example; // string | - var path = new List(); // List | The path to an file within a project folder (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 artifacts in a run folder - List result = apiInstance.ListRunArtifacts(owner, name, runId, path, page, perPage); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling RunsApi.ListRunArtifacts: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **owner** | **string**| | - **name** | **string**| | - **runId** | **string**| | - **path** | [**List<string>**](string.md)| The path to an file within a project folder | [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 - -[**List<FileMeta>**](FileMeta.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 | - | -| **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) - - -## ListRuns - -> RunList ListRuns (string owner, string name, List jobId = null, RunStatusEnum? status = null, int? page = null, int? perPage = null) - -List runs - -Retrieve a list of runs. - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using PollinationSDK.Api; -using PollinationSDK.Client; -using PollinationSDK.Model; - -namespace Example -{ - public class ListRunsExample - { - 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 RunsApi(Configuration.Default); - var owner = owner_example; // string | - var name = name_example; // string | - var jobId = new List(); // List | (optional) - var status = ; // RunStatusEnum? | (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 runs - RunList result = apiInstance.ListRuns(owner, name, jobId, status, page, perPage); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling RunsApi.ListRuns: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **owner** | **string**| | - **name** | **string**| | - **jobId** | [**List<string>**](string.md)| | [optional] - **status** | **RunStatusEnum?**| | [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 - -[**RunList**](RunList.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 | - | -| **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) - - -## QueryResults - -> RunResultList QueryResults (string owner, string name, List jobId = null, RunStatusEnum? status = null, int? page = null, int? perPage = null) - -Query run results - -Retrieve a list of run results. - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using PollinationSDK.Api; -using PollinationSDK.Client; -using PollinationSDK.Model; - -namespace Example -{ - public class QueryResultsExample - { - 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 RunsApi(Configuration.Default); - var owner = owner_example; // string | - var name = name_example; // string | - var jobId = new List(); // List | (optional) - var status = ; // RunStatusEnum? | (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 - { - // Query run results - RunResultList result = apiInstance.QueryResults(owner, name, jobId, status, page, perPage); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling RunsApi.QueryResults: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **owner** | **string**| | - **name** | **string**| | - **jobId** | [**List<string>**](string.md)| | [optional] - **status** | **RunStatusEnum?**| | [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 - -[**RunResultList**](RunResultList.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 | - | -| **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/S3.md b/docs/S3.md deleted file mode 100644 index 57b898d51..000000000 --- a/docs/S3.md +++ /dev/null @@ -1,17 +0,0 @@ - -# PollinationSDK.Model.S3 - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Key** | **string** | The path inside the bucket to source artifacts from. | -**Endpoint** | **string** | The HTTP endpoint to reach the S3 bucket. | -**Bucket** | **string** | The name of the S3 bucket on the host server. | -**CredentialsPath** | **string** | Path to the file holding the AccessKey and SecretAccessKey to authenticate to the bucket. Assumes public bucket access if none are specified. | [optional] -**Type** | **string** | | [optional] [readonly] [default to "S3"] - -[[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/S3UploadRequest.md b/docs/S3UploadRequest.md deleted file mode 100644 index 80f3adba4..000000000 --- a/docs/S3UploadRequest.md +++ /dev/null @@ -1,15 +0,0 @@ - -# PollinationSDK.Model.S3UploadRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Url** | **string** | | -**Fields** | **Dictionary<string, string>** | | -**Type** | **string** | | [optional] [readonly] [default to "S3UploadRequest"] - -[[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/SortEnum.md b/docs/SortEnum.md deleted file mode 100644 index 2178e7574..000000000 --- a/docs/SortEnum.md +++ /dev/null @@ -1,12 +0,0 @@ - -# PollinationSDK.Model.SortEnum - -## 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/StatusType.md b/docs/StatusType.md deleted file mode 100644 index ce81cff1e..000000000 --- a/docs/StatusType.md +++ /dev/null @@ -1,12 +0,0 @@ - -# PollinationSDK.Model.StatusType - -## 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/StepArrayInput.md b/docs/StepArrayInput.md deleted file mode 100644 index 2fb630ac5..000000000 --- a/docs/StepArrayInput.md +++ /dev/null @@ -1,22 +0,0 @@ - -# PollinationSDK.Model.StepArrayInput - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Name** | **string** | Input name. | -**Annotations** | **Dictionary<string, string>** | An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries. | [optional] -**Description** | **string** | Optional description for input. | [optional] -**Value** | [**List<AnyType>**](AnyType.md) | | -**Default** | [**List<AnyType>**](AnyType.md) | Default value to use for an input if a value was not supplied. | [optional] -**Alias** | [**List<AnyOfDAGGenericInputAliasDAGStringInputAliasDAGIntegerInputAliasDAGNumberInputAliasDAGBooleanInputAliasDAGFolderInputAliasDAGFileInputAliasDAGPathInputAliasDAGArrayInputAliasDAGJSONObjectInputAliasDAGLinkedInputAlias>**](AnyOfDAGGenericInputAliasDAGStringInputAliasDAGIntegerInputAliasDAGNumberInputAliasDAGBooleanInputAliasDAGFolderInputAliasDAGFileInputAliasDAGPathInputAliasDAGArrayInputAliasDAGJSONObjectInputAliasDAGLinkedInputAlias.md) | A list of aliases for this input in different platforms. | [optional] -**Required** | **bool** | A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. | [optional] [default to false] -**Spec** | **Object** | An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec. | [optional] -**ItemsType** | **ItemType** | Type of items in an array. All the items in an array must be from the same type. | [optional] -**Type** | **string** | | [optional] [readonly] [default to "StepArrayInput"] - -[[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/StepArrayOutput.md b/docs/StepArrayOutput.md deleted file mode 100644 index 20f943dc4..000000000 --- a/docs/StepArrayOutput.md +++ /dev/null @@ -1,15 +0,0 @@ - -# PollinationSDK.Model.StepArrayOutput - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Value** | [**List<AnyType>**](AnyType.md) | | -**ItemsType** | **ItemType** | Type of items in this array. All the items in an array must be from the same type. | [optional] -**Type** | **string** | | [optional] [readonly] [default to "StepArrayOutput"] - -[[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/StepBooleanInput.md b/docs/StepBooleanInput.md deleted file mode 100644 index 78123c96c..000000000 --- a/docs/StepBooleanInput.md +++ /dev/null @@ -1,21 +0,0 @@ - -# PollinationSDK.Model.StepBooleanInput - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Name** | **string** | Input name. | -**Annotations** | **Dictionary<string, string>** | An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries. | [optional] -**Description** | **string** | Optional description for input. | [optional] -**Value** | **bool** | | -**Default** | **bool** | Default value to use for an input if a value was not supplied. | [optional] -**Alias** | [**List<AnyOfDAGGenericInputAliasDAGStringInputAliasDAGIntegerInputAliasDAGNumberInputAliasDAGBooleanInputAliasDAGFolderInputAliasDAGFileInputAliasDAGPathInputAliasDAGArrayInputAliasDAGJSONObjectInputAliasDAGLinkedInputAlias>**](AnyOfDAGGenericInputAliasDAGStringInputAliasDAGIntegerInputAliasDAGNumberInputAliasDAGBooleanInputAliasDAGFolderInputAliasDAGFileInputAliasDAGPathInputAliasDAGArrayInputAliasDAGJSONObjectInputAliasDAGLinkedInputAlias.md) | A list of aliases for this input in different platforms. | [optional] -**Required** | **bool** | A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. | [optional] [default to false] -**Spec** | **Object** | An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec. | [optional] -**Type** | **string** | | [optional] [readonly] [default to "StepBooleanInput"] - -[[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/StepBooleanOutput.md b/docs/StepBooleanOutput.md deleted file mode 100644 index 4c9ac52be..000000000 --- a/docs/StepBooleanOutput.md +++ /dev/null @@ -1,14 +0,0 @@ - -# PollinationSDK.Model.StepBooleanOutput - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Value** | **bool** | | -**Type** | **string** | | [optional] [readonly] [default to "StepBooleanOutput"] - -[[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/StepFileInput.md b/docs/StepFileInput.md deleted file mode 100644 index 17c269986..000000000 --- a/docs/StepFileInput.md +++ /dev/null @@ -1,23 +0,0 @@ - -# PollinationSDK.Model.StepFileInput - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Name** | **string** | Input name. | -**Annotations** | **Dictionary<string, string>** | An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries. | [optional] -**Description** | **string** | Optional description for input. | [optional] -**Source** | [**AnyOfHTTPS3ProjectFolder**](AnyOfHTTPS3ProjectFolder.md) | The path to source the file from. | -**Default** | [**AnyOfHTTPS3ProjectFolder**](AnyOfHTTPS3ProjectFolder.md) | The default source for file if the value is not provided. | [optional] -**Alias** | [**List<AnyOfDAGGenericInputAliasDAGStringInputAliasDAGIntegerInputAliasDAGNumberInputAliasDAGBooleanInputAliasDAGFolderInputAliasDAGFileInputAliasDAGPathInputAliasDAGArrayInputAliasDAGJSONObjectInputAliasDAGLinkedInputAlias>**](AnyOfDAGGenericInputAliasDAGStringInputAliasDAGIntegerInputAliasDAGNumberInputAliasDAGBooleanInputAliasDAGFolderInputAliasDAGFileInputAliasDAGPathInputAliasDAGArrayInputAliasDAGJSONObjectInputAliasDAGLinkedInputAlias.md) | A list of aliases for this input in different platforms. | [optional] -**Required** | **bool** | A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. | [optional] [default to false] -**Spec** | **Object** | An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec. | [optional] -**Path** | **string** | 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. | [optional] -**Extensions** | **List<string>** | Optional list of extensions for file. The check for extension is case-insensitive. | [optional] -**Type** | **string** | | [optional] [readonly] [default to "StepFileInput"] - -[[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/StepFileOutput.md b/docs/StepFileOutput.md deleted file mode 100644 index 3d3466289..000000000 --- a/docs/StepFileOutput.md +++ /dev/null @@ -1,14 +0,0 @@ - -# PollinationSDK.Model.StepFileOutput - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Source** | [**AnyOfHTTPS3ProjectFolder**](AnyOfHTTPS3ProjectFolder.md) | The path to source the file from. | -**Type** | **string** | | [optional] [readonly] [default to "StepFileOutput"] - -[[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/StepFolderInput.md b/docs/StepFolderInput.md deleted file mode 100644 index bd6d94570..000000000 --- a/docs/StepFolderInput.md +++ /dev/null @@ -1,22 +0,0 @@ - -# PollinationSDK.Model.StepFolderInput - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Name** | **string** | Input name. | -**Annotations** | **Dictionary<string, string>** | An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries. | [optional] -**Description** | **string** | Optional description for input. | [optional] -**Source** | [**AnyOfHTTPS3ProjectFolder**](AnyOfHTTPS3ProjectFolder.md) | The path to source the file from. | -**Default** | [**AnyOfHTTPS3ProjectFolder**](AnyOfHTTPS3ProjectFolder.md) | The default source for file if the value is not provided. | [optional] -**Alias** | [**List<AnyOfDAGGenericInputAliasDAGStringInputAliasDAGIntegerInputAliasDAGNumberInputAliasDAGBooleanInputAliasDAGFolderInputAliasDAGFileInputAliasDAGPathInputAliasDAGArrayInputAliasDAGJSONObjectInputAliasDAGLinkedInputAlias>**](AnyOfDAGGenericInputAliasDAGStringInputAliasDAGIntegerInputAliasDAGNumberInputAliasDAGBooleanInputAliasDAGFolderInputAliasDAGFileInputAliasDAGPathInputAliasDAGArrayInputAliasDAGJSONObjectInputAliasDAGLinkedInputAlias.md) | A list of aliases for this input in different platforms. | [optional] -**Required** | **bool** | A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. | [optional] [default to false] -**Spec** | **Object** | An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec. | [optional] -**Path** | **string** | 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. | [optional] -**Type** | **string** | | [optional] [readonly] [default to "StepFolderInput"] - -[[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/StepFolderOutput.md b/docs/StepFolderOutput.md deleted file mode 100644 index 4b03c62ca..000000000 --- a/docs/StepFolderOutput.md +++ /dev/null @@ -1,14 +0,0 @@ - -# PollinationSDK.Model.StepFolderOutput - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Source** | [**AnyOfHTTPS3ProjectFolder**](AnyOfHTTPS3ProjectFolder.md) | The path to source the file from. | -**Type** | **string** | | [optional] [readonly] [default to "StepFolderOutput"] - -[[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/StepIntegerInput.md b/docs/StepIntegerInput.md deleted file mode 100644 index 422f0f581..000000000 --- a/docs/StepIntegerInput.md +++ /dev/null @@ -1,21 +0,0 @@ - -# PollinationSDK.Model.StepIntegerInput - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Name** | **string** | Input name. | -**Annotations** | **Dictionary<string, string>** | An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries. | [optional] -**Description** | **string** | Optional description for input. | [optional] -**Value** | **int** | | -**Default** | **int** | Default value to use for an input if a value was not supplied. | [optional] -**Alias** | [**List<AnyOfDAGGenericInputAliasDAGStringInputAliasDAGIntegerInputAliasDAGNumberInputAliasDAGBooleanInputAliasDAGFolderInputAliasDAGFileInputAliasDAGPathInputAliasDAGArrayInputAliasDAGJSONObjectInputAliasDAGLinkedInputAlias>**](AnyOfDAGGenericInputAliasDAGStringInputAliasDAGIntegerInputAliasDAGNumberInputAliasDAGBooleanInputAliasDAGFolderInputAliasDAGFileInputAliasDAGPathInputAliasDAGArrayInputAliasDAGJSONObjectInputAliasDAGLinkedInputAlias.md) | A list of aliases for this input in different platforms. | [optional] -**Required** | **bool** | A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. | [optional] [default to false] -**Spec** | **Object** | An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec. | [optional] -**Type** | **string** | | [optional] [readonly] [default to "StepIntegerInput"] - -[[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/StepIntegerOutput.md b/docs/StepIntegerOutput.md deleted file mode 100644 index 83ae127a4..000000000 --- a/docs/StepIntegerOutput.md +++ /dev/null @@ -1,14 +0,0 @@ - -# PollinationSDK.Model.StepIntegerOutput - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Value** | **int** | | -**Type** | **string** | | [optional] [readonly] [default to "StepIntegerOutput"] - -[[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/StepJSONObjectInput.md b/docs/StepJSONObjectInput.md deleted file mode 100644 index 24cdd8e13..000000000 --- a/docs/StepJSONObjectInput.md +++ /dev/null @@ -1,21 +0,0 @@ - -# PollinationSDK.Model.StepJSONObjectInput - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Name** | **string** | Input name. | -**Annotations** | **Dictionary<string, string>** | An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries. | [optional] -**Description** | **string** | Optional description for input. | [optional] -**Value** | **Object** | | -**Default** | **Object** | Default value to use for an input if a value was not supplied. | [optional] -**Alias** | [**List<AnyOfDAGGenericInputAliasDAGStringInputAliasDAGIntegerInputAliasDAGNumberInputAliasDAGBooleanInputAliasDAGFolderInputAliasDAGFileInputAliasDAGPathInputAliasDAGArrayInputAliasDAGJSONObjectInputAliasDAGLinkedInputAlias>**](AnyOfDAGGenericInputAliasDAGStringInputAliasDAGIntegerInputAliasDAGNumberInputAliasDAGBooleanInputAliasDAGFolderInputAliasDAGFileInputAliasDAGPathInputAliasDAGArrayInputAliasDAGJSONObjectInputAliasDAGLinkedInputAlias.md) | A list of aliases for this input in different platforms. | [optional] -**Required** | **bool** | A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. | [optional] [default to false] -**Spec** | **Object** | An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec. | [optional] -**Type** | **string** | | [optional] [readonly] [default to "StepJSONObjectInput"] - -[[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/StepJSONObjectOutput.md b/docs/StepJSONObjectOutput.md deleted file mode 100644 index 916d908bd..000000000 --- a/docs/StepJSONObjectOutput.md +++ /dev/null @@ -1,14 +0,0 @@ - -# PollinationSDK.Model.StepJSONObjectOutput - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Value** | **Object** | | -**Type** | **string** | | [optional] [readonly] [default to "StepJSONObjectOutput"] - -[[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/StepList.md b/docs/StepList.md deleted file mode 100644 index 3ad0e9d1b..000000000 --- a/docs/StepList.md +++ /dev/null @@ -1,19 +0,0 @@ - -# PollinationSDK.Model.StepList - -## 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<StepStatus>**](StepStatus.md) | | -**NextPage** | **int** | The next page, if this on is not the last | [optional] -**Type** | **string** | | [optional] [readonly] [default to "StepList"] - -[[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/StepNumberInput.md b/docs/StepNumberInput.md deleted file mode 100644 index 8f2b6d3ec..000000000 --- a/docs/StepNumberInput.md +++ /dev/null @@ -1,21 +0,0 @@ - -# PollinationSDK.Model.StepNumberInput - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Name** | **string** | Input name. | -**Annotations** | **Dictionary<string, string>** | An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries. | [optional] -**Description** | **string** | Optional description for input. | [optional] -**Value** | **double** | | -**Default** | **double** | Default value to use for an input if a value was not supplied. | [optional] -**Alias** | [**List<AnyOfDAGGenericInputAliasDAGStringInputAliasDAGIntegerInputAliasDAGNumberInputAliasDAGBooleanInputAliasDAGFolderInputAliasDAGFileInputAliasDAGPathInputAliasDAGArrayInputAliasDAGJSONObjectInputAliasDAGLinkedInputAlias>**](AnyOfDAGGenericInputAliasDAGStringInputAliasDAGIntegerInputAliasDAGNumberInputAliasDAGBooleanInputAliasDAGFolderInputAliasDAGFileInputAliasDAGPathInputAliasDAGArrayInputAliasDAGJSONObjectInputAliasDAGLinkedInputAlias.md) | A list of aliases for this input in different platforms. | [optional] -**Required** | **bool** | A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. | [optional] [default to false] -**Spec** | **Object** | An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec. | [optional] -**Type** | **string** | | [optional] [readonly] [default to "StepNumberInput"] - -[[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/StepNumberOutput.md b/docs/StepNumberOutput.md deleted file mode 100644 index a9868b8d2..000000000 --- a/docs/StepNumberOutput.md +++ /dev/null @@ -1,14 +0,0 @@ - -# PollinationSDK.Model.StepNumberOutput - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Value** | **double** | | -**Type** | **string** | | [optional] [readonly] [default to "StepNumberOutput"] - -[[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/StepPathInput.md b/docs/StepPathInput.md deleted file mode 100644 index cccbe3709..000000000 --- a/docs/StepPathInput.md +++ /dev/null @@ -1,23 +0,0 @@ - -# PollinationSDK.Model.StepPathInput - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Name** | **string** | Input name. | -**Annotations** | **Dictionary<string, string>** | An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries. | [optional] -**Description** | **string** | Optional description for input. | [optional] -**Source** | [**AnyOfHTTPS3ProjectFolder**](AnyOfHTTPS3ProjectFolder.md) | The path to source the file from. | -**Default** | [**AnyOfHTTPS3ProjectFolder**](AnyOfHTTPS3ProjectFolder.md) | The default source for file if the value is not provided. | [optional] -**Alias** | [**List<AnyOfDAGGenericInputAliasDAGStringInputAliasDAGIntegerInputAliasDAGNumberInputAliasDAGBooleanInputAliasDAGFolderInputAliasDAGFileInputAliasDAGPathInputAliasDAGArrayInputAliasDAGJSONObjectInputAliasDAGLinkedInputAlias>**](AnyOfDAGGenericInputAliasDAGStringInputAliasDAGIntegerInputAliasDAGNumberInputAliasDAGBooleanInputAliasDAGFolderInputAliasDAGFileInputAliasDAGPathInputAliasDAGArrayInputAliasDAGJSONObjectInputAliasDAGLinkedInputAlias.md) | A list of aliases for this input in different platforms. | [optional] -**Required** | **bool** | A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. | [optional] [default to false] -**Spec** | **Object** | An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec. | [optional] -**Path** | **string** | 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. | [optional] -**Extensions** | **List<string>** | Optional list of extensions for file. The check for extension is case-insensitive. | [optional] -**Type** | **string** | | [optional] [readonly] [default to "StepPathInput"] - -[[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/StepPathOutput.md b/docs/StepPathOutput.md deleted file mode 100644 index 1390622c2..000000000 --- a/docs/StepPathOutput.md +++ /dev/null @@ -1,14 +0,0 @@ - -# PollinationSDK.Model.StepPathOutput - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Source** | [**AnyOfHTTPS3ProjectFolder**](AnyOfHTTPS3ProjectFolder.md) | The path to source the file from. | -**Type** | **string** | | [optional] [readonly] [default to "StepPathOutput"] - -[[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/StepStatus.md b/docs/StepStatus.md deleted file mode 100644 index 0ad014849..000000000 --- a/docs/StepStatus.md +++ /dev/null @@ -1,29 +0,0 @@ - -# PollinationSDK.Model.StepStatus - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Inputs** | [**List<AnyOfStepStringInputStepIntegerInputStepNumberInputStepBooleanInputStepFolderInputStepFileInputStepPathInputStepArrayInputStepJSONObjectInput>**](AnyOfStepStringInputStepIntegerInputStepNumberInputStepBooleanInputStepFolderInputStepFileInputStepPathInputStepArrayInputStepJSONObjectInput.md) | The inputs used by this step. | -**Outputs** | [**List<AnyOfStepStringOutputStepIntegerOutputStepNumberOutputStepBooleanOutputStepFolderOutputStepFileOutputStepPathOutputStepArrayOutputStepJSONObjectOutput>**](AnyOfStepStringOutputStepIntegerOutputStepNumberOutputStepBooleanOutputStepFolderOutputStepFileOutputStepPathOutputStepArrayOutputStepJSONObjectOutput.md) | The outputs produced by this step. | -**StartedAt** | **DateTime** | The time at which the task was started | -**Id** | **string** | The step unique ID | -**Name** | **string** | 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. | -**StatusType** | **StatusType** | The type of step this status is for. Can be \"Function\", \"DAG\" or \"Loop\" | -**TemplateRef** | **string** | The name of the template that spawned this step | -**ChildrenIds** | **List<string>** | A list of child step IDs | -**OutboundSteps** | **List<string>** | 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. | -**Annotations** | **Dictionary<string, string>** | An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries. | [optional] -**Message** | **string** | Any message produced by the task. Usually error/debugging hints. | [optional] -**FinishedAt** | **DateTime** | The time at which the task was completed | [optional] -**Source** | **string** | Source url for the status object. It can be a recipe or a function. | [optional] -**Status** | **StepStatusEnum** | The status of this step. | [optional] -**Command** | **string** | The command used to run this step. Only applies to Function steps. | [optional] -**BoundaryId** | **string** | 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. | [optional] -**Type** | **string** | | [optional] [readonly] [default to "StepStatus"] - -[[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/StepStatusEnum.md b/docs/StepStatusEnum.md deleted file mode 100644 index 938f02eb5..000000000 --- a/docs/StepStatusEnum.md +++ /dev/null @@ -1,12 +0,0 @@ - -# PollinationSDK.Model.StepStatusEnum - -## 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/StepStringInput.md b/docs/StepStringInput.md deleted file mode 100644 index 670a5ebb6..000000000 --- a/docs/StepStringInput.md +++ /dev/null @@ -1,14 +0,0 @@ - -# PollinationSDK.Model.StepStringInput - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Value** | **string** | | -**Type** | **string** | | [optional] [readonly] [default to "StepStringInput"] - -[[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/StepStringOutput.md b/docs/StepStringOutput.md deleted file mode 100644 index ac8d1afc7..000000000 --- a/docs/StepStringOutput.md +++ /dev/null @@ -1,14 +0,0 @@ - -# PollinationSDK.Model.StepStringOutput - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Value** | **string** | | -**Type** | **string** | | [optional] [readonly] [default to "StepStringOutput"] - -[[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/SubjectType.md b/docs/SubjectType.md deleted file mode 100644 index 8fc62f9d9..000000000 --- a/docs/SubjectType.md +++ /dev/null @@ -1,12 +0,0 @@ - -# PollinationSDK.Model.SubjectType - -## 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/TaskArgument.md b/docs/TaskArgument.md deleted file mode 100644 index 67c7f0c4f..000000000 --- a/docs/TaskArgument.md +++ /dev/null @@ -1,16 +0,0 @@ - -# PollinationSDK.Model.TaskArgument - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Name** | **string** | Argument name. The name must match one of the input names from Task's template which can be a function or DAG. | -**From** | [**AnyOfInputReferenceTaskReferenceItemReferenceValueReference**](AnyOfInputReferenceTaskReferenceItemReferenceValueReference.md) | 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. | -**Type** | **string** | | [optional] [readonly] [default to "TaskArgument"] -**Annotations** | **Dictionary<string, string>** | An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries. | [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/TaskFileReference.md b/docs/TaskFileReference.md deleted file mode 100644 index 72efbd3a3..000000000 --- a/docs/TaskFileReference.md +++ /dev/null @@ -1,13 +0,0 @@ - -# PollinationSDK.Model.TaskFileReference - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Type** | **string** | | [optional] [readonly] [default to "TaskFileReference"] - -[[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/TaskFolderReference.md b/docs/TaskFolderReference.md deleted file mode 100644 index 5053ed156..000000000 --- a/docs/TaskFolderReference.md +++ /dev/null @@ -1,13 +0,0 @@ - -# PollinationSDK.Model.TaskFolderReference - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Type** | **string** | | [optional] [readonly] [default to "TaskFolderReference"] - -[[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/TaskPathArgument.md b/docs/TaskPathArgument.md deleted file mode 100644 index 9efd5d477..000000000 --- a/docs/TaskPathArgument.md +++ /dev/null @@ -1,17 +0,0 @@ - -# PollinationSDK.Model.TaskPathArgument - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Name** | **string** | Argument name. The name must match one of the input names from Task's template which can be a function or DAG. | -**From** | [**AnyOfInputFileReferenceInputFolderReferenceInputPathReferenceTaskFileReferenceTaskFolderReferenceTaskPathReferenceValueFileReferenceValueFolderReference**](AnyOfInputFileReferenceInputFolderReferenceInputPathReferenceTaskFileReferenceTaskFolderReferenceTaskPathReferenceValueFileReferenceValueFolderReference.md) | 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. | -**Type** | **string** | | [optional] [readonly] [default to "TaskPathArgument"] -**Annotations** | **Dictionary<string, string>** | An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries. | [optional] -**SubPath** | **string** | 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. | [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/TaskPathReference.md b/docs/TaskPathReference.md deleted file mode 100644 index 56aa8c1e2..000000000 --- a/docs/TaskPathReference.md +++ /dev/null @@ -1,13 +0,0 @@ - -# PollinationSDK.Model.TaskPathReference - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Type** | **string** | | [optional] [readonly] [default to "TaskPathReference"] - -[[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/TaskPathReturn.md b/docs/TaskPathReturn.md deleted file mode 100644 index d396d90bf..000000000 --- a/docs/TaskPathReturn.md +++ /dev/null @@ -1,15 +0,0 @@ - -# PollinationSDK.Model.TaskPathReturn - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Path** | **string** | Path to the output artifact relative to where the function command is executed. | -**Required** | **bool** | A boolean to indicate if an artifact output is required. A False value makes the artifact optional. | [optional] [default to true] -**Type** | **string** | | [optional] [readonly] [default to "TaskPathReturn"] - -[[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/TaskReference.md b/docs/TaskReference.md deleted file mode 100644 index 36567c0b8..000000000 --- a/docs/TaskReference.md +++ /dev/null @@ -1,13 +0,0 @@ - -# PollinationSDK.Model.TaskReference - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Type** | **string** | | [optional] [readonly] [default to "TaskReference"] - -[[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/TaskReferenceBase.md b/docs/TaskReferenceBase.md deleted file mode 100644 index ac3443c0c..000000000 --- a/docs/TaskReferenceBase.md +++ /dev/null @@ -1,15 +0,0 @@ - -# PollinationSDK.Model.TaskReferenceBase - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Name** | **string** | The name of the task to pull output data from. | -**Variable** | **string** | The name of the variable. | -**Type** | **string** | | [optional] [readonly] [default to "_TaskReferenceBase"] - -[[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/TaskReturn.md b/docs/TaskReturn.md deleted file mode 100644 index e31d6038e..000000000 --- a/docs/TaskReturn.md +++ /dev/null @@ -1,16 +0,0 @@ - -# PollinationSDK.Model.TaskReturn - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Name** | **string** | Output name. | -**Annotations** | **Dictionary<string, string>** | An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries. | [optional] -**Description** | **string** | Optional description for output. | [optional] -**Type** | **string** | | [optional] [readonly] [default to "TaskReturn"] - -[[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/Team.md b/docs/Team.md deleted file mode 100644 index 63bf3700b..000000000 --- a/docs/Team.md +++ /dev/null @@ -1,16 +0,0 @@ - -# PollinationSDK.Model.Team - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Id** | **string** | The team ID | -**Slug** | **string** | The public slug of the team | -**MemberCount** | **int** | The number of members that are part of this team | [optional] [default to 0] -**Type** | **string** | | [optional] [readonly] [default to "Team"] - -[[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/TeamCreate.md b/docs/TeamCreate.md deleted file mode 100644 index e7ab24d49..000000000 --- a/docs/TeamCreate.md +++ /dev/null @@ -1,15 +0,0 @@ - -# PollinationSDK.Model.TeamCreate - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Name** | **string** | | -**Description** | **string** | | [optional] -**Type** | **string** | | [optional] [readonly] [default to "TeamCreate"] - -[[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/TeamList.md b/docs/TeamList.md deleted file mode 100644 index 1afdb4df1..000000000 --- a/docs/TeamList.md +++ /dev/null @@ -1,19 +0,0 @@ - -# PollinationSDK.Model.TeamList - -## 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<Team>**](Team.md) | | -**NextPage** | **int** | The next page, if this on is not the last | [optional] -**Type** | **string** | | [optional] [readonly] [default to "TeamList"] - -[[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/TeamMember.md b/docs/TeamMember.md deleted file mode 100644 index 8737b70a0..000000000 --- a/docs/TeamMember.md +++ /dev/null @@ -1,15 +0,0 @@ - -# PollinationSDK.Model.TeamMember - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**User** | [**UserPublic**](UserPublic.md) | The team member | -**Role** | **TeamRoleEnum** | The role the user has within the team | -**Type** | **string** | | [optional] [readonly] [default to "TeamMember"] - -[[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/TeamMemberList.md b/docs/TeamMemberList.md deleted file mode 100644 index 1b3e204d7..000000000 --- a/docs/TeamMemberList.md +++ /dev/null @@ -1,19 +0,0 @@ - -# PollinationSDK.Model.TeamMemberList - -## 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<TeamMember>**](TeamMember.md) | | -**NextPage** | **int** | The next page, if this on is not the last | [optional] -**Type** | **string** | | [optional] [readonly] [default to "TeamMemberList"] - -[[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/TeamRoleEnum.md b/docs/TeamRoleEnum.md deleted file mode 100644 index 3cf288557..000000000 --- a/docs/TeamRoleEnum.md +++ /dev/null @@ -1,12 +0,0 @@ - -# PollinationSDK.Model.TeamRoleEnum - -## 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/TeamUpdate.md b/docs/TeamUpdate.md deleted file mode 100644 index 10cfaa94d..000000000 --- a/docs/TeamUpdate.md +++ /dev/null @@ -1,15 +0,0 @@ - -# PollinationSDK.Model.TeamUpdate - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Name** | **string** | | -**Description** | **string** | | [optional] -**Type** | **string** | | [optional] [readonly] [default to "TeamUpdate"] - -[[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/TeamsApi.md b/docs/TeamsApi.md deleted file mode 100644 index 4f35dd93b..000000000 --- a/docs/TeamsApi.md +++ /dev/null @@ -1,711 +0,0 @@ -# PollinationSDK.Api.TeamsApi - -All URIs are relative to *http://localhost* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**CreateTeam**](TeamsApi.md#createteam) | **POST** /orgs/{org_name}/teams | Create a Team -[**DeleteOrgTeamMember**](TeamsApi.md#deleteorgteammember) | **DELETE** /orgs/{org_name}/teams/{team_slug}/members/{username} | Remove a team member -[**DeleteTeam**](TeamsApi.md#deleteteam) | **DELETE** /orgs/{org_name}/teams/{team_slug} | Delete a Team -[**GetOrgTeamMembers**](TeamsApi.md#getorgteammembers) | **GET** /orgs/{org_name}/teams/{team_slug}/members | List team members -[**GetTeam**](TeamsApi.md#getteam) | **GET** /orgs/{org_name}/teams/{team_slug} | Get a Team -[**ListOrgTeams**](TeamsApi.md#listorgteams) | **GET** /orgs/{org_name}/teams | List Teams -[**UpdateTeam**](TeamsApi.md#updateteam) | **PUT** /orgs/{org_name}/teams/{team_slug} | Update a Team -[**UpsertOrgTeamMember**](TeamsApi.md#upsertorgteammember) | **PATCH** /orgs/{org_name}/teams/{team_slug}/members/{username}/{role} | Add or update the role of an Team Member - - - -## CreateTeam - -> CreatedContent CreateTeam (string orgName, TeamCreate teamCreate) - -Create a Team - -Create a new team (must be parent org member) - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using PollinationSDK.Api; -using PollinationSDK.Client; -using PollinationSDK.Model; - -namespace Example -{ - public class CreateTeamExample - { - 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 TeamsApi(Configuration.Default); - var orgName = orgName_example; // string | - var teamCreate = new TeamCreate(); // TeamCreate | - - try - { - // Create a Team - CreatedContent result = apiInstance.CreateTeam(orgName, teamCreate); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling TeamsApi.CreateTeam: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **orgName** | **string**| | - **teamCreate** | [**TeamCreate**](TeamCreate.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 | -|-------------|-------------|------------------| -| **201** | Success | - | -| **403** | Access forbidden | - | -| **500** | Server error | - | -| **400** | Invalid request | - | -| **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) - - -## DeleteOrgTeamMember - -> void DeleteOrgTeamMember (string orgName, string teamSlug, string username) - -Remove a team member - -Remove a member from the org (must have org `owner` role) - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using PollinationSDK.Api; -using PollinationSDK.Client; -using PollinationSDK.Model; - -namespace Example -{ - public class DeleteOrgTeamMemberExample - { - 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 TeamsApi(Configuration.Default); - var orgName = orgName_example; // string | - var teamSlug = teamSlug_example; // string | - var username = username_example; // string | - - try - { - // Remove a team member - apiInstance.DeleteOrgTeamMember(orgName, teamSlug, username); - } - catch (ApiException e) - { - Debug.Print("Exception when calling TeamsApi.DeleteOrgTeamMember: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **orgName** | **string**| | - **teamSlug** | **string**| | - **username** | **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** | Accepted | - | -| **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) - - -## DeleteTeam - -> void DeleteTeam (string orgName, string teamSlug) - -Delete a Team - -Delete a team (must have team or org `owner` role) - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using PollinationSDK.Api; -using PollinationSDK.Client; -using PollinationSDK.Model; - -namespace Example -{ - public class DeleteTeamExample - { - 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 TeamsApi(Configuration.Default); - var orgName = orgName_example; // string | - var teamSlug = teamSlug_example; // string | - - try - { - // Delete a Team - apiInstance.DeleteTeam(orgName, teamSlug); - } - catch (ApiException e) - { - Debug.Print("Exception when calling TeamsApi.DeleteTeam: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **orgName** | **string**| | - **teamSlug** | **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** | Accepted | - | -| **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) - - -## GetOrgTeamMembers - -> TeamMemberList GetOrgTeamMembers (string orgName, string teamSlug) - -List team members - -Retrieve a tean's members - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using PollinationSDK.Api; -using PollinationSDK.Client; -using PollinationSDK.Model; - -namespace Example -{ - public class GetOrgTeamMembersExample - { - public static void Main() - { - Configuration.Default.BasePath = "http://localhost"; - var apiInstance = new TeamsApi(Configuration.Default); - var orgName = orgName_example; // string | - var teamSlug = teamSlug_example; // string | - - try - { - // List team members - TeamMemberList result = apiInstance.GetOrgTeamMembers(orgName, teamSlug); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling TeamsApi.GetOrgTeamMembers: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **orgName** | **string**| | - **teamSlug** | **string**| | - -### Return type - -[**TeamMemberList**](TeamMemberList.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Retrieved | - | -| **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) - - -## GetTeam - -> Team GetTeam (string orgName, string teamSlug) - -Get a Team - -Retrieve a team by name - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using PollinationSDK.Api; -using PollinationSDK.Client; -using PollinationSDK.Model; - -namespace Example -{ - public class GetTeamExample - { - public static void Main() - { - Configuration.Default.BasePath = "http://localhost"; - var apiInstance = new TeamsApi(Configuration.Default); - var orgName = orgName_example; // string | - var teamSlug = teamSlug_example; // string | - - try - { - // Get a Team - Team result = apiInstance.GetTeam(orgName, teamSlug); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling TeamsApi.GetTeam: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **orgName** | **string**| | - **teamSlug** | **string**| | - -### Return type - -[**Team**](Team.md) - -### Authorization - -No authorization required - -### 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 | - | -| **404** | Not found | - | -| **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) - - -## ListOrgTeams - -> TeamList ListOrgTeams (string orgName, List search = null, List name = null, List member = null, int? page = null, int? perPage = null) - -List Teams - -search for orgs using query parameters - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using PollinationSDK.Api; -using PollinationSDK.Client; -using PollinationSDK.Model; - -namespace Example -{ - public class ListOrgTeamsExample - { - public static void Main() - { - Configuration.Default.BasePath = "http://localhost"; - var apiInstance = new TeamsApi(Configuration.Default); - var orgName = orgName_example; // string | - var search = new List(); // List | You know, for search (optional) - var name = new List(); // List | The account name (optional) - var member = new List(); // List | The ID of a user (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 Teams - TeamList result = apiInstance.ListOrgTeams(orgName, search, name, member, page, perPage); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling TeamsApi.ListOrgTeams: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **orgName** | **string**| | - **search** | [**List<string>**](string.md)| You know, for search | [optional] - **name** | [**List<string>**](string.md)| The account name | [optional] - **member** | [**List<string>**](string.md)| The ID of a user | [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 - -[**TeamList**](TeamList.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Retrieved | - | -| **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) - - -## UpdateTeam - -> UpdateAccepted UpdateTeam (string orgName, string teamSlug, TeamUpdate teamUpdate) - -Update a Team - -Update a team (must have team or org `owner` role) - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using PollinationSDK.Api; -using PollinationSDK.Client; -using PollinationSDK.Model; - -namespace Example -{ - public class UpdateTeamExample - { - 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 TeamsApi(Configuration.Default); - var orgName = orgName_example; // string | - var teamSlug = teamSlug_example; // string | - var teamUpdate = new TeamUpdate(); // TeamUpdate | - - try - { - // Update a Team - UpdateAccepted result = apiInstance.UpdateTeam(orgName, teamSlug, teamUpdate); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling TeamsApi.UpdateTeam: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **orgName** | **string**| | - **teamSlug** | **string**| | - **teamUpdate** | [**TeamUpdate**](TeamUpdate.md)| | - -### Return type - -[**UpdateAccepted**](UpdateAccepted.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 | -|-------------|-------------|------------------| -| **202** | Accepted | - | -| **403** | Access forbidden | - | -| **500** | Server error | - | -| **400** | Invalid request | - | -| **404** | Not found | - | -| **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) - - -## UpsertOrgTeamMember - -> UpdateAccepted UpsertOrgTeamMember (string orgName, string teamSlug, string username, TeamRoleEnum role) - -Add or update the role of an Team Member - -Upsert a member role to the team (must have org or team `owner` role) - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using PollinationSDK.Api; -using PollinationSDK.Client; -using PollinationSDK.Model; - -namespace Example -{ - public class UpsertOrgTeamMemberExample - { - 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 TeamsApi(Configuration.Default); - var orgName = orgName_example; // string | - var teamSlug = teamSlug_example; // string | - var username = username_example; // string | - var role = ; // TeamRoleEnum | - - try - { - // Add or update the role of an Team Member - UpdateAccepted result = apiInstance.UpsertOrgTeamMember(orgName, teamSlug, username, role); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling TeamsApi.UpsertOrgTeamMember: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **orgName** | **string**| | - **teamSlug** | **string**| | - **username** | **string**| | - **role** | **TeamRoleEnum**| | - -### Return type - -[**UpdateAccepted**](UpdateAccepted.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 | - | -| **403** | Access forbidden | - | -| **500** | Server error | - | -| **400** | Invalid request | - | -| **404** | Not found | - | -| **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/UpdateAccepted.md b/docs/UpdateAccepted.md deleted file mode 100644 index 15446ffb0..000000000 --- a/docs/UpdateAccepted.md +++ /dev/null @@ -1,14 +0,0 @@ - -# PollinationSDK.Model.UpdateAccepted - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Status** | **string** | | [optional] [default to "accepted"] -**Type** | **string** | | [optional] [readonly] [default to "UpdateAccepted"] - -[[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/Usage.md b/docs/Usage.md deleted file mode 100644 index 352323f42..000000000 --- a/docs/Usage.md +++ /dev/null @@ -1,20 +0,0 @@ - -# PollinationSDK.Model.Usage - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Start** | **DateTime** | The start date for this usage aggregation | -**End** | **DateTime** | The end date for this usage aggregation | -**Cpu** | **double** | cpu usage | [optional] [default to 0D] -**Memory** | **double** | memory usage | [optional] [default to 0D] -**Succeeded** | **int** | succeeded usage | [optional] [default to 0] -**Failed** | **int** | failed usage | [optional] [default to 0] -**DailyUsage** | [**List<DailyUsage>**](DailyUsage.md) | daily breakdown of usage | [optional] -**Type** | **string** | | [optional] [readonly] [default to "Usage"] - -[[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/UserApi.md b/docs/UserApi.md deleted file mode 100644 index 449324e4f..000000000 --- a/docs/UserApi.md +++ /dev/null @@ -1,336 +0,0 @@ -# PollinationSDK.Api.UserApi - -All URIs are relative to *http://localhost* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**CreateUser**](UserApi.md#createuser) | **POST** /user | Register a new user -[**GetMe**](UserApi.md#getme) | **GET** /user | Get authenticated user profile. -[**GetRoles**](UserApi.md#getroles) | **GET** /user/roles | Get the authenticated user roles -[**UpdateUserProfile**](UserApi.md#updateuserprofile) | **PUT** /user | Update the authenticated user - - - -## CreateUser - -> CreatedContent CreateUser (UserCreate userCreate) - -Register a new user - -Create a new user. - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using PollinationSDK.Api; -using PollinationSDK.Client; -using PollinationSDK.Model; - -namespace Example -{ - public class CreateUserExample - { - public static void Main() - { - Configuration.Default.BasePath = "http://localhost"; - // Configure HTTP bearer authorization: JWTAuth - Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; - - var apiInstance = new UserApi(Configuration.Default); - var userCreate = new UserCreate(); // UserCreate | - - try - { - // Register a new user - CreatedContent result = apiInstance.CreateUser(userCreate); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling UserApi.CreateUser: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **userCreate** | [**UserCreate**](UserCreate.md)| | - -### Return type - -[**CreatedContent**](CreatedContent.md) - -### Authorization - -[JWTAuth](../README.md#JWTAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **201** | Success | - | -| **403** | Access forbidden | - | -| **500** | Server error | - | -| **400** | Invalid request | - | -| **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) - - -## GetMe - -> UserPrivate GetMe () - -Get authenticated user profile. - -Get authenticated user profile - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using PollinationSDK.Api; -using PollinationSDK.Client; -using PollinationSDK.Model; - -namespace Example -{ - public class GetMeExample - { - 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 UserApi(Configuration.Default); - - try - { - // Get authenticated user profile. - UserPrivate result = apiInstance.GetMe(); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling UserApi.GetMe: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - -This endpoint does not need any parameter. - -### Return type - -[**UserPrivate**](UserPrivate.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 | - | - -[[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) - - -## GetRoles - -> List<string> GetRoles () - -Get the authenticated user roles - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using PollinationSDK.Api; -using PollinationSDK.Client; -using PollinationSDK.Model; - -namespace Example -{ - public class GetRolesExample - { - 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 UserApi(Configuration.Default); - - try - { - // Get the authenticated user roles - List result = apiInstance.GetRoles(); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling UserApi.GetRoles: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - -This endpoint does not need any parameter. - -### Return type - -**List** - -### 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 | - | - -[[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) - - -## UpdateUserProfile - -> UpdateAccepted UpdateUserProfile (UserUpdate userUpdate) - -Update the authenticated user - -Update the authenticated user profile - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using PollinationSDK.Api; -using PollinationSDK.Client; -using PollinationSDK.Model; - -namespace Example -{ - public class UpdateUserProfileExample - { - 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 UserApi(Configuration.Default); - var userUpdate = new UserUpdate(); // UserUpdate | - - try - { - // Update the authenticated user - UpdateAccepted result = apiInstance.UpdateUserProfile(userUpdate); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling UserApi.UpdateUserProfile: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **userUpdate** | [**UserUpdate**](UserUpdate.md)| | - -### Return type - -[**UpdateAccepted**](UpdateAccepted.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 | -|-------------|-------------|------------------| -| **202** | Accepted | - | -| **403** | Access forbidden | - | -| **500** | Server error | - | -| **400** | Invalid request | - | -| **404** | Not found | - | -| **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/UserCreate.md b/docs/UserCreate.md deleted file mode 100644 index 6d3b95e6d..000000000 --- a/docs/UserCreate.md +++ /dev/null @@ -1,17 +0,0 @@ - -# PollinationSDK.Model.UserCreate - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Name** | **string** | The display name for this user | -**PictureUrl** | **string** | URL to the picture associated with this user | -**Description** | **string** | A description of the user | [optional] [default to ""] -**Username** | **string** | The unique name of the user in small case without spaces | -**Type** | **string** | | [optional] [readonly] [default to "UserCreate"] - -[[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/UserPermission.md b/docs/UserPermission.md deleted file mode 100644 index a99d341ee..000000000 --- a/docs/UserPermission.md +++ /dev/null @@ -1,16 +0,0 @@ - -# PollinationSDK.Model.UserPermission - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Admin** | **bool** | The user has admin permission to this resource | [optional] [default to false] -**Write** | **bool** | The user has write permission on this resource | [optional] [default to false] -**Read** | **bool** | The user has read permission on this resource | [optional] [default to false] -**Type** | **string** | | [optional] [readonly] [default to "UserPermission"] - -[[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/UserPrivate.md b/docs/UserPrivate.md deleted file mode 100644 index e34a7889f..000000000 --- a/docs/UserPrivate.md +++ /dev/null @@ -1,19 +0,0 @@ - -# PollinationSDK.Model.UserPrivate - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Id** | **string** | The unique ID for that user | -**Email** | **string** | The email associated with that user | -**Username** | **string** | The lowercase account name for this user | -**Name** | **string** | The display name for this user | [optional] -**Description** | **string** | A short description of the user | [optional] -**Picture** | **string** | URL to the picture associated with this user | [optional] -**Type** | **string** | | [optional] [readonly] [default to "UserPrivate"] - -[[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/UserPublic.md b/docs/UserPublic.md deleted file mode 100644 index 36dce1a74..000000000 --- a/docs/UserPublic.md +++ /dev/null @@ -1,17 +0,0 @@ - -# PollinationSDK.Model.UserPublic - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Username** | **string** | The lowercase account name for this user | -**Name** | **string** | The display name for this user | [optional] -**Description** | **string** | A short description of the user | [optional] -**Picture** | **string** | URL to the picture associated with this user | [optional] -**Type** | **string** | | [optional] [readonly] [default to "UserPublic"] - -[[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/UserPublicList.md b/docs/UserPublicList.md deleted file mode 100644 index 6410058f8..000000000 --- a/docs/UserPublicList.md +++ /dev/null @@ -1,19 +0,0 @@ - -# PollinationSDK.Model.UserPublicList - -## 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<UserPublic>**](UserPublic.md) | | -**NextPage** | **int** | The next page, if this on is not the last | [optional] -**Type** | **string** | | [optional] [readonly] [default to "UserPublicList"] - -[[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/UserUpdate.md b/docs/UserUpdate.md deleted file mode 100644 index da2cdd90b..000000000 --- a/docs/UserUpdate.md +++ /dev/null @@ -1,16 +0,0 @@ - -# PollinationSDK.Model.UserUpdate - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Name** | **string** | The display name for this user | -**PictureUrl** | **string** | URL to the picture associated with this user | -**Description** | **string** | A description of the user | [optional] [default to ""] -**Type** | **string** | | [optional] [readonly] [default to "UserUpdate"] - -[[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/UsersApi.md b/docs/UsersApi.md deleted file mode 100644 index 04232d257..000000000 --- a/docs/UsersApi.md +++ /dev/null @@ -1,241 +0,0 @@ -# PollinationSDK.Api.UsersApi - -All URIs are relative to *http://localhost* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**CheckUsername**](UsersApi.md#checkusername) | **GET** /users/check_username/{username} | Check if a username is already taken -[**GetOneUser**](UsersApi.md#getoneuser) | **GET** /users/{name} | Get a specific user profile -[**ListUsers**](UsersApi.md#listusers) | **GET** /users | List Users - - - -## CheckUsername - -> AnyType CheckUsername (string username) - -Check if a username is already taken - -Check if a username is already taken by a user or an org - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using PollinationSDK.Api; -using PollinationSDK.Client; -using PollinationSDK.Model; - -namespace Example -{ - public class CheckUsernameExample - { - public static void Main() - { - Configuration.Default.BasePath = "http://localhost"; - var apiInstance = new UsersApi(Configuration.Default); - var username = username_example; // string | - - try - { - // Check if a username is already taken - AnyType result = apiInstance.CheckUsername(username); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling UsersApi.CheckUsername: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **username** | **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** | Username not taken | - | -| **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) - - -## GetOneUser - -> UserPublic GetOneUser (string name) - -Get a specific user profile - -Get a specific user profile by name - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using PollinationSDK.Api; -using PollinationSDK.Client; -using PollinationSDK.Model; - -namespace Example -{ - public class GetOneUserExample - { - public static void Main() - { - Configuration.Default.BasePath = "http://localhost"; - var apiInstance = new UsersApi(Configuration.Default); - var name = name_example; // string | - - try - { - // Get a specific user profile - UserPublic result = apiInstance.GetOneUser(name); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling UsersApi.GetOneUser: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **name** | **string**| | - -### Return type - -[**UserPublic**](UserPublic.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) - - -## ListUsers - -> UserPublicList ListUsers (string search = null, int? page = null, int? perPage = null) - -List Users - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using PollinationSDK.Api; -using PollinationSDK.Client; -using PollinationSDK.Model; - -namespace Example -{ - public class ListUsersExample - { - public static void Main() - { - Configuration.Default.BasePath = "http://localhost"; - var apiInstance = new UsersApi(Configuration.Default); - var search = search_example; // string | Search string to find users (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 Users - UserPublicList result = apiInstance.ListUsers(search, page, perPage); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling UsersApi.ListUsers: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **search** | **string**| Search string to find users | [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 - -[**UserPublicList**](UserPublicList.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Retrieved | - | -| **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/ValueFileReference.md b/docs/ValueFileReference.md deleted file mode 100644 index f9e9b2001..000000000 --- a/docs/ValueFileReference.md +++ /dev/null @@ -1,14 +0,0 @@ - -# PollinationSDK.Model.ValueFileReference - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Path** | **string** | A fixed value for this reference. | -**Type** | **string** | | [optional] [readonly] [default to "ValueFileReference"] - -[[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/ValueFolderReference.md b/docs/ValueFolderReference.md deleted file mode 100644 index c0cf48f39..000000000 --- a/docs/ValueFolderReference.md +++ /dev/null @@ -1,14 +0,0 @@ - -# PollinationSDK.Model.ValueFolderReference - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Path** | **string** | A fixed value for this reference. | -**Type** | **string** | | [optional] [readonly] [default to "ValueFolderReference"] - -[[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/ValueListReference.md b/docs/ValueListReference.md deleted file mode 100644 index 098d9bfdc..000000000 --- a/docs/ValueListReference.md +++ /dev/null @@ -1,14 +0,0 @@ - -# PollinationSDK.Model.ValueListReference - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Value** | [**List<AnyType>**](AnyType.md) | A fixed value for this reference. | -**Type** | **string** | | [optional] [readonly] [default to "ValueListReference"] - -[[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/ValueReference.md b/docs/ValueReference.md deleted file mode 100644 index 1ceeab434..000000000 --- a/docs/ValueReference.md +++ /dev/null @@ -1,14 +0,0 @@ - -# PollinationSDK.Model.ValueReference - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Value** | [**AnyType**](.md) | A fixed value for this reference. | -**Type** | **string** | | [optional] [readonly] [default to "ValueReference"] - -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to README]](../README.md) - From c4f17e24b73a02d2c951b99c07571dc8bd61c112 Mon Sep 17 00:00:00 2001 From: Antoine Dao Date: Mon, 10 Jan 2022 17:21:59 +0000 Subject: [PATCH 4/7] build(sdk): add 'anyOf' types in responses to any types to replace --- .openapi-generator/post_gen_script.py | 11 +++++++++++ 1 file changed, 11 insertions(+) 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 From 8462ead5070de2c73abf7cdec331cea700401193 Mon Sep 17 00:00:00 2001 From: Antoine Dao Date: Mon, 10 Jan 2022 17:23:27 +0000 Subject: [PATCH 5/7] docs(openapi): generate valid openapi_inheritance.json this is thanks to the work in pollination/pollination-server#507 --- .openapi-docs/openapi_inheritance.json | 16875 ++++++++++++----------- .openapi-docs/openapi_mapper.json | 10 +- 2 files changed, 8559 insertions(+), 8326 deletions(-) diff --git a/.openapi-docs/openapi_inheritance.json b/.openapi-docs/openapi_inheritance.json index fc60824c3..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.22.0", + "version": "0.23.0", "contact": { "name": "PollinationSolutions", "url": "https://pollination.cloud", @@ -6782,6 +6782,56 @@ ] } }, + "/payments/{account_name}/subscription/upcoming": { + "get": { + "tags": [ + "Payments" + ], + "summary": "Get Upcoming Subscription", + "operationId": "get_upcoming_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/Subscription" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "JWTAuth": [] + }, + { + "APIKeyAuth": [] + } + ] + } + }, "/payments/{account_name}/subscription/preview": { "put": { "tags": [ @@ -7132,6 +7182,56 @@ ] } }, + "/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": [ @@ -8604,16 +8704,21 @@ }, "components": { "schemas": { - "SubjectType": { - "title": "SubjectType", - "description": "An enumeration.", + "JobStatusEnum": { + "title": "JobStatusEnum", + "description": "Enumaration of allowable status strings", "enum": [ - "user", - "team" + "Created", + "Pre-Processing", + "Running", + "Failed", + "Cancelled", + "Completed", + "Unknown" ], "type": "string" }, - "PolicySubject": { + "JobStatus": { "allOf": [ { "$ref": "#/components/schemas/_OpenAPIGenBaseModel" @@ -8621,252 +8726,260 @@ { "type": "object", "properties": { - "subject_type": { - "$ref": "#/components/schemas/SubjectType" - }, - "name": { - "title": "Name", - "description": "The name of the policy subject", - "example": "ladybugbot", + "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": "PolicySubject", + "default": "JobStatus", + "pattern": "^JobStatus$", "type": "string", - "pattern": "^PolicySubject$", "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": [ - "subject_type", - "name" + "id", + "started_at" ] } ], - "title": "PolicySubject", + "title": "JobStatus", + "description": "Parametric Job Status.", "discriminator": { "propertyName": "type" } }, - "Permission": { - "title": "Permission", - "description": "An enumeration.", - "enum": [ - "admin", - "write", - "read" - ], - "type": "string" - }, - "LicensePoolAccessPolicy": { + "HTTP": { "allOf": [ { - "$ref": "#/components/schemas/_OpenAPIGenBaseModel" + "$ref": "#/components/schemas/_ArtifactSource" }, { "type": "object", "required": [ - "subject" + "url" ], "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" - } - ] + "url": { + "title": "Url", + "description": "For a HTTP endpoint this can be http://climate.onebuilding.org.", + "type": "string" }, "type": { "title": "Type", - "default": "LicensePoolAccessPolicy", + "default": "HTTP", + "pattern": "^HTTP$", "type": "string", - "pattern": "^LicensePoolAccessPolicy$", "readOnly": true } } } ], - "title": "LicensePoolAccessPolicy", + "title": "HTTP", + "description": "HTTP Source\n\nA web HTTP to an FTP server or an API for example.", "discriminator": { "propertyName": "type" } }, - "LicensePoolAccessPolicyList": { + "S3": { "allOf": [ { - "$ref": "#/components/schemas/_OpenAPIGenBaseModel" + "$ref": "#/components/schemas/_ArtifactSource" }, { "type": "object", + "required": [ + "key", + "endpoint", + "bucket" + ], "properties": { - "resources": { - "title": "Resources", - "description": "The list of policies granting access to the pool", - "default": [], - "type": "array", - "items": { - "$ref": "#/components/schemas/LicensePoolAccessPolicy" - } + "key": { + "title": "Key", + "description": "The path inside the bucket to source artifacts from.", + "type": "string" }, - "type": { - "title": "Type", - "default": "LicensePoolAccessPolicyList", - "type": "string", - "pattern": "^LicensePoolAccessPolicyList$", - "readOnly": true - } - } - } - ], - "title": "LicensePoolAccessPolicyList", - "discriminator": { - "propertyName": "type" - } - }, - "Status": { - "allOf": [ - { - "$ref": "#/components/schemas/_OpenAPIGenBaseModel" - }, - { - "type": "object", - "properties": { - "frozen": { - "title": "Frozen", - "description": "Whether account actions are currently blocked by a payment failure", - "default": false, - "type": "boolean" + "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": "Status", + "default": "S3", + "pattern": "^S3$", "type": "string", - "pattern": "^Status$", "readOnly": true } } } ], - "title": "Status", + "title": "S3", + "description": "S3 Source\n\nAn S3 bucket artifact Source.", "discriminator": { "propertyName": "type" } }, - "CouponDuration": { - "title": "CouponDuration", - "description": "An enumeration.", - "enum": [ - "forever", - "once", - "repeating" - ], - "type": "string" - }, - "Coupon": { + "ProjectFolder": { "allOf": [ { - "$ref": "#/components/schemas/ExternalResource" + "$ref": "#/components/schemas/_ArtifactSource" }, { "type": "object", - "required": [ - "name", - "valid", - "duration" - ], "properties": { - "name": { - "title": "Name", + "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" }, - "valid": { - "title": "Valid", - "type": "boolean" - }, - "duration": { - "$ref": "#/components/schemas/CouponDuration" - }, - "amount_off": { - "title": "Amount Off", - "type": "number", - "format": "double" - }, - "percent_off": { - "title": "Percent Off", - "type": "number", - "format": "double" - }, - "duration_in_months": { - "title": "Duration In Months", - "type": "integer", - "format": "int32" - }, "type": { "title": "Type", - "default": "Coupon", + "default": "ProjectFolder", + "pattern": "^ProjectFolder$", "type": "string", - "pattern": "^Coupon$", "readOnly": true } } } ], - "title": "Coupon", + "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" } }, - "Discount": { + "StepPathOutput": { "allOf": [ { - "$ref": "#/components/schemas/ExternalResource" + "$ref": "#/components/schemas/FunctionPathOutput" }, { "type": "object", "required": [ - "start", - "coupon" + "source" ], "properties": { - "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" + "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": "Discount", + "default": "StepPathOutput", + "pattern": "^StepPathOutput$", "type": "string", - "pattern": "^Discount$", "readOnly": true } } } ], - "title": "Discount", + "title": "StepPathOutput", + "description": "A file or a folder output.", "discriminator": { "propertyName": "type" } @@ -8931,386 +9044,321 @@ "propertyName": "type" } }, - "DAGGenericInputAlias": { + "TaskReference": { "allOf": [ { - "$ref": "#/components/schemas/GenericInput" + "$ref": "#/components/schemas/_TaskReferenceBase" }, { "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$", + "default": "TaskReference", + "pattern": "^TaskReference$", "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.", + "title": "TaskReference", + "description": "A Task reference for parameters other than files or folders.", "discriminator": { "propertyName": "type" } }, - "DAGStringInputAlias": { + "FileReference": { "allOf": [ { - "$ref": "#/components/schemas/DAGGenericInputAlias" + "$ref": "#/components/schemas/_BaseReference" }, { "type": "object", + "required": [ + "path" + ], "properties": { + "path": { + "title": "Path", + "description": "Relative path to a file.", + "type": "string" + }, "type": { "title": "Type", - "default": "DAGStringInputAlias", - "pattern": "^DAGStringInputAlias$", + "default": "FileReference", + "pattern": "^FileReference$", "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": "FileReference", + "description": "Reference to a file.", "discriminator": { "propertyName": "type" } }, - "DAGIntegerInputAlias": { + "DAGJSONObjectOutputAlias": { "allOf": [ { - "$ref": "#/components/schemas/GenericInput" + "$ref": "#/components/schemas/_DAGArtifactOutputAlias" }, { "type": "object", "required": [ - "platform", - "handler" + "from" ], "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" + "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": "DAGIntegerInputAlias", - "pattern": "^DAGIntegerInputAlias$", + "default": "DAGJSONObjectOutputAlias", + "pattern": "^DAGJSONObjectOutputAlias$", "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": "DAGJSONObjectOutputAlias", + "description": "DAG alias object output.\n\nThis output loads the content from a file as a JSON object.", "discriminator": { "propertyName": "type" } }, - "DAGNumberInputAlias": { + "RepositoryUpdate": { "allOf": [ { - "$ref": "#/components/schemas/GenericInput" + "$ref": "#/components/schemas/_OpenAPIGenBaseModel" }, { "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" - } + "public": { + "title": "Public", + "description": "Whether or not a repository is publicly viewable", + "type": "boolean" }, - "handler": { - "title": "Handler", - "description": "List of process actions to process the input or output value.", + "keywords": { + "title": "Keywords", + "description": "A list of keywords to index the repository by", + "example": [ + "daylight", + "radiance" + ], "type": "array", "items": { - "$ref": "#/components/schemas/IOAliasHandler" + "type": "string" } }, - "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" + "description": { + "title": "Description", + "description": "A description of the repository", + "example": "Run daylight simulations the easy way!", + "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" + "icon": { + "title": "Icon", + "description": "An icon to represent this repository", + "example": "https://avatars1.githubusercontent.com/u/38131342", + "type": "string" }, "type": { "title": "Type", - "default": "DAGNumberInputAlias", - "pattern": "^DAGNumberInputAlias$", + "default": "RepositoryUpdate", "type": "string", + "pattern": "^RepositoryUpdate$", "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": "RepositoryUpdate", "discriminator": { "propertyName": "type" } }, - "DAGBooleanInputAlias": { + "APITokenPrivate": { "allOf": [ { - "$ref": "#/components/schemas/GenericInput" + "$ref": "#/components/schemas/APITokenCreate" }, { "type": "object", "required": [ - "platform", - "handler" + "token" ], "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" + "token": { + "title": "Token", + "description": "The decoded API token", + "type": "string" }, "type": { "title": "Type", - "default": "DAGBooleanInputAlias", - "pattern": "^DAGBooleanInputAlias$", + "default": "APITokenPrivate", "type": "string", + "pattern": "^APITokenPrivate$", "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": "APITokenPrivate", "discriminator": { "propertyName": "type" } }, - "HTTP": { + "SubjectType": { + "title": "SubjectType", + "description": "An enumeration.", + "enum": [ + "user", + "team" + ], + "type": "string" + }, + "PolicySubject": { "allOf": [ { - "$ref": "#/components/schemas/_ArtifactSource" + "$ref": "#/components/schemas/_OpenAPIGenBaseModel" }, { "type": "object", - "required": [ - "url" - ], "properties": { - "url": { - "title": "Url", - "description": "For a HTTP endpoint this can be http://climate.onebuilding.org.", + "subject_type": { + "$ref": "#/components/schemas/SubjectType" + }, + "name": { + "title": "Name", + "description": "The name of the policy subject", + "example": "ladybugbot", "type": "string" }, "type": { "title": "Type", - "default": "HTTP", - "pattern": "^HTTP$", + "default": "PolicySubject", "type": "string", + "pattern": "^PolicySubject$", "readOnly": true } - } + }, + "required": [ + "subject_type", + "name" + ] } ], - "title": "HTTP", - "description": "HTTP Source\n\nA web HTTP to an FTP server or an API for example.", + "title": "PolicySubject", "discriminator": { "propertyName": "type" } }, - "S3": { + "Permission": { + "title": "Permission", + "description": "An enumeration.", + "enum": [ + "admin", + "write", + "read" + ], + "type": "string" + }, + "ProjectAccessPolicy": { "allOf": [ { - "$ref": "#/components/schemas/_ArtifactSource" + "$ref": "#/components/schemas/_OpenAPIGenBaseModel" }, { "type": "object", "required": [ - "key", - "endpoint", - "bucket" + "subject", + "permission" ], "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" + "subject": { + "title": "Subject", + "description": "The subject of the access policy", + "allOf": [ + { + "$ref": "#/components/schemas/PolicySubject" + } + ] }, - "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" + "permission": { + "description": "The permission given to the subject of the access policy", + "example": "write", + "allOf": [ + { + "$ref": "#/components/schemas/Permission" + } + ] }, "type": { "title": "Type", - "default": "S3", - "pattern": "^S3$", + "default": "ProjectAccessPolicy", "type": "string", + "pattern": "^ProjectAccessPolicy$", "readOnly": true } } } ], - "title": "S3", - "description": "S3 Source\n\nAn S3 bucket artifact Source.", + "title": "ProjectAccessPolicy", "discriminator": { "propertyName": "type" } }, - "ProjectFolder": { + "ValueListReference": { "allOf": [ { - "$ref": "#/components/schemas/_ArtifactSource" + "$ref": "#/components/schemas/_BaseReference" }, { "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", + "description": "A fixed value for this reference.", + "type": "array", + "items": {} }, "type": { "title": "Type", - "default": "ProjectFolder", - "pattern": "^ProjectFolder$", + "default": "ValueListReference", + "pattern": "^ValueListReference$", "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": "ValueListReference", + "description": "A reference to a fixed value.", "discriminator": { "propertyName": "type" } }, - "DAGFolderInputAlias": { + "DAGGenericOutputAlias": { "allOf": [ { - "$ref": "#/components/schemas/GenericInput" + "$ref": "#/components/schemas/GenericOutput" }, { "type": "object", @@ -9335,661 +9383,504 @@ "$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$", + "default": "DAGGenericOutputAlias", + "pattern": "^DAGGenericOutputAlias$", "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": "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" } }, - "DAGFileInputAlias": { + "DAGStringOutputAlias": { "allOf": [ { - "$ref": "#/components/schemas/GenericInput" + "$ref": "#/components/schemas/_DAGArtifactOutputAlias" }, { "type": "object", "required": [ - "platform", - "handler" + "from" ], "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.", + "from": { + "title": "From", + "description": "Reference to a file or a task output. Task output must be file.", "anyOf": [ { - "$ref": "#/components/schemas/HTTP" - }, - { - "$ref": "#/components/schemas/S3" + "$ref": "#/components/schemas/TaskReference" }, { - "$ref": "#/components/schemas/ProjectFolder" + "$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" - }, - "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": "DAGStringOutputAlias", + "pattern": "^DAGStringOutputAlias$", "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": "DAGStringOutputAlias", + "description": "DAG alias string output.\n\nThis output loads the content from a file as a string.", "discriminator": { "propertyName": "type" } }, - "DAGPathInputAlias": { + "DAGIntegerOutputAlias": { "allOf": [ { - "$ref": "#/components/schemas/GenericInput" + "$ref": "#/components/schemas/_DAGArtifactOutputAlias" }, { "type": "object", "required": [ - "platform", - "handler" + "from" ], "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.", + "from": { + "title": "From", + "description": "Reference to a file or a task output. Task output must be file.", "anyOf": [ { - "$ref": "#/components/schemas/HTTP" - }, - { - "$ref": "#/components/schemas/S3" + "$ref": "#/components/schemas/TaskReference" }, { - "$ref": "#/components/schemas/ProjectFolder" + "$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" - }, - "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": "DAGIntegerOutputAlias", + "pattern": "^DAGIntegerOutputAlias$", "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": "DAGIntegerOutputAlias", + "description": "DAG alias integer output.\n\nThis output loads the content from a file as an integer.", "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": { + "DAGNumberOutputAlias": { "allOf": [ { - "$ref": "#/components/schemas/GenericInput" + "$ref": "#/components/schemas/_DAGArtifactOutputAlias" }, { "type": "object", "required": [ - "platform", - "handler" + "from" ], "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": [ + "from": { + "title": "From", + "description": "Reference to a file or a task output. Task output must be file.", + "anyOf": [ { - "$ref": "#/components/schemas/ItemType" + "$ref": "#/components/schemas/TaskReference" + }, + { + "$ref": "#/components/schemas/FileReference" } ] }, "type": { "title": "Type", - "default": "DAGArrayInputAlias", - "pattern": "^DAGArrayInputAlias$", + "default": "DAGNumberOutputAlias", + "pattern": "^DAGNumberOutputAlias$", "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": "DAGNumberOutputAlias", + "description": "DAG alias number output.\n\nThis output loads the content from a file as a floating number.", "discriminator": { "propertyName": "type" } }, - "DAGJSONObjectInputAlias": { + "DAGBooleanOutputAlias": { "allOf": [ { - "$ref": "#/components/schemas/GenericInput" + "$ref": "#/components/schemas/_DAGArtifactOutputAlias" }, { "type": "object", "required": [ - "platform", - "handler" + "from" ], "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" + "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": "DAGJSONObjectInputAlias", - "pattern": "^DAGJSONObjectInputAlias$", + "default": "DAGBooleanOutputAlias", + "pattern": "^DAGBooleanOutputAlias$", "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.", + "title": "DAGBooleanOutputAlias", + "description": "DAG alias boolean output.\n\nThis output loads the content from a file as a boolean.", "discriminator": { "propertyName": "type" } }, - "DAGLinkedInputAlias": { + "FolderReference": { "allOf": [ { - "$ref": "#/components/schemas/DAGGenericInputAlias" + "$ref": "#/components/schemas/_BaseReference" }, { "type": "object", + "required": [ + "path" + ], "properties": { + "path": { + "title": "Path", + "description": "Relative path to a folder.", + "type": "string" + }, "type": { "title": "Type", - "default": "DAGLinkedInputAlias", - "pattern": "^DAGLinkedInputAlias$", + "default": "FolderReference", + "pattern": "^FolderReference$", "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.", + "title": "FolderReference", + "description": "Reference to a folder.", "discriminator": { "propertyName": "type" } }, - "StepBooleanInput": { + "DAGFolderOutputAlias": { "allOf": [ { - "$ref": "#/components/schemas/GenericInput" + "$ref": "#/components/schemas/_DAGArtifactOutputAlias" }, { "type": "object", "required": [ - "value" + "from" ], "properties": { - "value": { - "title": "Value", - "type": "boolean" - }, - "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" + "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": "StepBooleanInput", - "pattern": "^StepBooleanInput$", + "default": "DAGFolderOutputAlias", + "pattern": "^DAGFolderOutputAlias$", "type": "string", "readOnly": true } } } ], - "title": "StepBooleanInput", - "description": "The boolean type matches only two special values: True and False.", + "title": "DAGFolderOutputAlias", + "description": "DAG alias folder output.", "discriminator": { "propertyName": "type" } }, - "TaskPathReturn": { + "DAGFileOutputAlias": { "allOf": [ { - "$ref": "#/components/schemas/PathOutput" + "$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": "TaskPathReturn", - "pattern": "^TaskPathReturn$", + "default": "DAGFileOutputAlias", + "pattern": "^DAGFileOutputAlias$", "type": "string", "readOnly": true } } } ], - "title": "TaskPathReturn", - "description": "A Task output that returns a file or a folder output from a function or a DAG.", + "title": "DAGFileOutputAlias", + "description": "DAG alias file output.", "discriminator": { "propertyName": "type" } }, - "Team": { + "DAGPathOutputAlias": { "allOf": [ { - "$ref": "#/components/schemas/TeamUpdate" + "$ref": "#/components/schemas/_DAGArtifactOutputAlias" }, { "type": "object", "required": [ - "id", - "slug" + "from" ], "properties": { - "id": { - "title": "Id", - "description": "The team ID", - "example": "142ee933-6110-4186-92ab-92df359aa108", - "type": "string" - }, - "slug": { - "title": "Slug", - "description": "The public slug of the team", - "example": "ladybug-tools/honeybee-contributors", - "type": "string" - }, - "member_count": { - "title": "Member Count", - "description": "The number of members that are part of this team", - "default": 0, - "example": 5, - "type": "integer", - "format": "int32" + "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": "Team", + "default": "DAGPathOutputAlias", + "pattern": "^DAGPathOutputAlias$", "type": "string", - "pattern": "^Team$", "readOnly": true } } } ], - "title": "Team", + "title": "DAGPathOutputAlias", + "description": "DAG alias path output.", "discriminator": { "propertyName": "type" } }, - "RunProgress": { + "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/_OpenAPIGenBaseModel" + "$ref": "#/components/schemas/_DAGArtifactOutputAlias" }, { "type": "object", - "properties": { - "completed": { - "title": "Completed", - "default": 0, - "type": "integer", - "format": "int32" - }, - "running": { - "title": "Running", - "default": 0, - "type": "integer", - "format": "int32" + "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" + } + ] }, - "total": { - "title": "Total", - "default": 0, - "type": "integer", - "format": "int32" + "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": "RunProgress", + "default": "DAGArrayOutputAlias", + "pattern": "^DAGArrayOutputAlias$", "type": "string", - "pattern": "^RunProgress$", "readOnly": true } } } ], - "title": "RunProgress", + "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" } }, - "Period": { + "DAGLinkedOutputAlias": { "allOf": [ { - "$ref": "#/components/schemas/_OpenAPIGenBaseModel" + "$ref": "#/components/schemas/DAGGenericOutputAlias" }, { "type": "object", "properties": { - "start": { - "title": "Start", - "type": "string", - "format": "date-time" - }, - "end": { - "title": "End", - "type": "string", - "format": "date-time" - }, "type": { "title": "Type", - "default": "Period", + "default": "DAGLinkedOutputAlias", + "pattern": "^DAGLinkedOutputAlias$", "type": "string", - "pattern": "^Period$", "readOnly": true } - }, - "required": [ - "start", - "end" - ] + } } ], - "title": "Period", + "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" } }, - "PriceType": { - "title": "PriceType", - "description": "An enumeration.", - "enum": [ - "recurring", - "one_time" - ], - "type": "string" - }, - "PriceRecurrence": { + "DAGFileOutput": { "allOf": [ { - "$ref": "#/components/schemas/_OpenAPIGenBaseModel" + "$ref": "#/components/schemas/GenericOutput" }, { "type": "object", + "required": [ + "from" + ], "properties": { - "interval": { - "title": "Interval", - "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" + } + ] }, - "interval_count": { - "title": "Interval Count", - "type": "integer", - "format": "int32" + "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" + } + ] + } }, - "usage_type": { - "title": "Usage Type", - "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" }, "type": { "title": "Type", - "default": "PriceRecurrence", + "default": "DAGFileOutput", + "pattern": "^DAGFileOutput$", "type": "string", - "pattern": "^PriceRecurrence$", "readOnly": true } - }, - "required": [ - "interval", - "interval_count", - "usage_type" - ] + } } ], - "title": "PriceRecurrence", + "title": "DAGFileOutput", + "description": "DAG file output.", "discriminator": { "propertyName": "type" } }, - "PriceTier": { + "QuotaPlan": { "allOf": [ { "$ref": "#/components/schemas/_OpenAPIGenBaseModel" @@ -9997,1011 +9888,902 @@ { "type": "object", "properties": { - "unit_amount": { - "title": "Unit Amount", - "type": "integer", - "format": "int32" - }, - "unit_amount_decimal": { - "title": "Unit Amount Decimal", + "name": { + "title": "Name", + "description": "The name of the quota", "type": "string" }, - "flat_amount": { - "title": "Flat Amount", - "type": "integer", - "format": "int32" + "resets": { + "title": "Resets", + "description": "Whether consumption is reset to 0 every month", + "default": false, + "type": "boolean" }, - "flat_amount_decimal": { - "title": "Flat Amount Decimal", - "type": "string" + "limit": { + "title": "Limit", + "description": "The maximum amount of a resource that a subscription allows", + "type": "number", + "format": "double" }, - "up_to": { - "title": "Up To", - "type": "integer", - "format": "int32" + "enforced": { + "title": "Enforced", + "description": "Whether the limit is triggers a blocking response from the server", + "default": false, + "type": "boolean" }, "type": { "title": "Type", - "default": "PriceTier", + "default": "QuotaPlan", "type": "string", - "pattern": "^PriceTier$", + "pattern": "^QuotaPlan$", "readOnly": true } }, "required": [ - "unit_amount", - "unit_amount_decimal" + "name" ] } ], - "title": "PriceTier", + "title": "QuotaPlan", + "description": "A quota plan", "discriminator": { "propertyName": "type" } }, - "Price": { + "AccountType": { + "title": "AccountType", + "description": "The type of account.", + "enum": [ + "org", + "user" + ], + "type": "string" + }, + "SubscriptionPlan": { "allOf": [ { - "$ref": "#/components/schemas/ExternalResource" + "$ref": "#/components/schemas/_OpenAPIGenBaseModel" }, { "type": "object", - "required": [ - "product", - "active", - "currency", - "type" - ], "properties": { - "product": { - "title": "Product", + "slug": { + "title": "Slug", + "description": "A slug of the config plan used to create this subscription", "type": "string" }, - "active": { - "title": "Active", - "type": "boolean" - }, - "currency": { - "title": "Currency", + "name": { + "title": "Name", + "description": "A name of the config plan used to create this subscription", "type": "string" }, - "type": { - "$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" + "account_types": { + "description": "The types of account to which the plan can be applied", + "type": "array", + "items": { + "$ref": "#/components/schemas/AccountType" + }, + "uniqueItems": true }, - "tiers": { - "title": "Tiers", + "quotas": { + "title": "Quotas", + "description": "A list of quota plans for a given subscription", + "default": [], "type": "array", "items": { - "$ref": "#/components/schemas/PriceTier" + "$ref": "#/components/schemas/QuotaPlan" } + }, + "type": { + "title": "Type", + "default": "SubscriptionPlan", + "type": "string", + "pattern": "^SubscriptionPlan$", + "readOnly": true } - } + }, + "required": [ + "slug", + "name", + "account_types" + ] } ], - "title": "Price", + "title": "SubscriptionPlan", + "description": "A Subscription plan", "discriminator": { "propertyName": "type" } }, - "LineItem": { + "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/ExternalResource" + "$ref": "#/components/schemas/_OpenAPIGenBaseModel" }, { "type": "object", - "required": [ - "amount", - "currency", - "description", - "period", - "price", - "proration", - "quantity", - "type" - ], "properties": { - "amount": { - "title": "Amount", - "type": "integer", - "format": "int32" - }, - "currency": { - "title": "Currency", + "id": { + "title": "Id", + "description": "The ID of the quota extension", "type": "string" }, - "description": { - "title": "Description", + "name": { + "title": "Name", + "description": "Name of the quota extension plan", "type": "string" }, - "period": { - "$ref": "#/components/schemas/Period" - }, - "price": { - "$ref": "#/components/schemas/Price" + "type": { + "description": "The type of quota this applies to", + "allOf": [ + { + "$ref": "#/components/schemas/QuotaType" + } + ], + "readOnly": true }, - "proration": { - "title": "Proration", - "type": "boolean" + "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" - }, - "type": { - "title": "Type", - "type": "string", - "readOnly": true } - } + }, + "required": [ + "id", + "name", + "type", + "unit_amount", + "quantity" + ] } ], - "title": "LineItem", + "title": "QuotaExtension", + "description": "A quota extension", "discriminator": { "propertyName": "type" } }, - "LineItemList": { + "PollinationSubscription": { "allOf": [ { - "$ref": "#/components/schemas/_OpenAPIGenBaseModel" + "$ref": "#/components/schemas/Subscription" }, { "type": "object", "required": [ - "has_more", - "data" + "account_id", + "subscription_plan" ], "properties": { - "has_more": { - "title": "Has More", - "type": "boolean" + "account_id": { + "title": "Account Id", + "description": "The ID of the account this subscription applies to", + "type": "string", + "format": "uuid" }, - "data": { - "title": "Data", + "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/LineItem" + "$ref": "#/components/schemas/QuotaExtension" } }, "type": { "title": "Type", - "default": "LineItemList", + "default": "PollinationSubscription", "type": "string", - "pattern": "^LineItemList$", + "pattern": "^PollinationSubscription$", "readOnly": true } } } ], - "title": "LineItemList", + "title": "PollinationSubscription", "discriminator": { "propertyName": "type" } }, - "InvoiceStatus": { - "title": "InvoiceStatus", - "description": "An enumeration.", - "enum": [ - "draft", - "open", - "paid", - "uncollectable", - "void" - ], - "type": "string" - }, - "InvoiceStatusTransitions": { + "DAGGenericInputAlias": { "allOf": [ { - "$ref": "#/components/schemas/_OpenAPIGenBaseModel" + "$ref": "#/components/schemas/GenericInput" }, { "type": "object", + "required": [ + "platform", + "handler" + ], "properties": { - "finalized_at": { - "title": "Finalized At", - "type": "string", - "format": "date-time" + "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" + } }, - "marked_uncollectible_at": { - "title": "Marked Uncollectible At", - "type": "string", - "format": "date-time" + "handler": { + "title": "Handler", + "description": "List of process actions to process the input or output value.", + "type": "array", + "items": { + "$ref": "#/components/schemas/IOAliasHandler" + } }, - "paid_at": { - "title": "Paid At", - "type": "string", - "format": "date-time" + "default": { + "title": "Default", + "description": "Default value for generic input.", + "type": "string" }, - "voided_at": { - "title": "Voided At", - "type": "string", - "format": "date-time" + "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": "InvoiceStatusTransitions", + "default": "DAGGenericInputAlias", + "pattern": "^DAGGenericInputAlias$", "type": "string", - "pattern": "^InvoiceStatusTransitions$", "readOnly": true } } } ], - "title": "InvoiceStatusTransitions", + "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" } }, - "DiscountAmount": { + "DAGStringInputAlias": { "allOf": [ { - "$ref": "#/components/schemas/_OpenAPIGenBaseModel" + "$ref": "#/components/schemas/DAGGenericInputAlias" }, { "type": "object", "properties": { - "discount": { - "title": "Discount", - "type": "string" - }, - "amount": { - "title": "Amount", - "type": "integer", - "format": "int32" - }, "type": { "title": "Type", - "default": "DiscountAmount", + "default": "DAGStringInputAlias", + "pattern": "^DAGStringInputAlias$", "type": "string", - "pattern": "^DiscountAmount$", "readOnly": true } - }, - "required": [ - "discount", - "amount" - ] + } } ], - "title": "DiscountAmount", + "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" } }, - "CardPublic": { + "DAGIntegerInputAlias": { "allOf": [ { - "$ref": "#/components/schemas/_OpenAPIGenBaseModel" + "$ref": "#/components/schemas/GenericInput" }, { "type": "object", + "required": [ + "platform", + "handler" + ], "properties": { - "last4": { - "title": "Last4", - "description": "The last four digits of the card", - "type": "string" + "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" + } }, - "exp_month": { - "title": "Exp Month", - "description": "The month the card expires", - "type": "integer", - "format": "int32" + "handler": { + "title": "Handler", + "description": "List of process actions to process the input or output value.", + "type": "array", + "items": { + "$ref": "#/components/schemas/IOAliasHandler" + } }, - "exp_year": { - "title": "Exp Year", - "description": "The year the card expires", + "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": "CardPublic", + "default": "DAGIntegerInputAlias", + "pattern": "^DAGIntegerInputAlias$", "type": "string", - "pattern": "^CardPublic$", "readOnly": true } - }, - "required": [ - "last4", - "exp_month", - "exp_year" - ] + } } ], - "title": "CardPublic", + "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" } }, - "InvoicePreview": { + "DAGNumberInputAlias": { "allOf": [ { - "$ref": "#/components/schemas/_OpenAPIGenBaseModel" + "$ref": "#/components/schemas/GenericInput" }, { "type": "object", "required": [ - "collection_method", - "currency", - "customer", - "lines", - "period_start", - "period_end", - "status", - "status_transitions", - "subtotal", - "total" + "platform", + "handler" ], "properties": { - "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", - "type": "string" - }, - "hosted_invoice_url": { - "title": "Hosted Invoice Url", - "type": "string" - }, - "subscription": { - "title": "Subscription", - "type": "string" - }, - "discount": { - "$ref": "#/components/schemas/Discount" + "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" + } }, - "total_discount_amounts": { - "title": "Total Discount Amounts", - "default": [], + "handler": { + "title": "Handler", + "description": "List of process actions to process the input or output value.", "type": "array", "items": { - "$ref": "#/components/schemas/DiscountAmount" + "$ref": "#/components/schemas/IOAliasHandler" } }, - "payment_method": { - "title": "Payment Method", - "description": "The payment method that will be billed when this invoice is due.", - "allOf": [ - { - "$ref": "#/components/schemas/CardPublic" - } - ] + "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": "InvoicePreview", + "default": "DAGNumberInputAlias", + "pattern": "^DAGNumberInputAlias$", "type": "string", - "pattern": "^InvoicePreview$", "readOnly": true } } } ], - "title": "InvoicePreview", + "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" } }, - "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": { + "DAGBooleanInputAlias": { "allOf": [ { - "$ref": "#/components/schemas/_OpenAPIGenBaseModel" + "$ref": "#/components/schemas/GenericInput" }, { "type": "object", + "required": [ + "platform", + "handler" + ], "properties": { - "id": { - "title": "Id", - "description": "The ID of the quota extension", - "type": "string" + "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" + } }, - "name": { - "title": "Name", - "description": "Name of the quota extension plan", - "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": { - "description": "The type of quota this applies to", - "allOf": [ - { - "$ref": "#/components/schemas/QuotaType" - } - ], - "readOnly": true + "default": { + "title": "Default", + "description": "Default value to use for an input if a value was not supplied.", + "type": "boolean" }, - "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" - } - }, - "DockerConfig": { - "allOf": [ - { - "$ref": "#/components/schemas/_OpenAPIGenBaseModel" - }, - { - "type": "object", - "properties": { - "image": { - "title": "Image", - "description": "Docker image name. Must include tag.", - "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" }, - "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" + "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": "DockerConfig", - "pattern": "^DockerConfig", + "default": "DAGBooleanInputAlias", + "pattern": "^DAGBooleanInputAlias$", "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", + "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" } }, - "LocalConfig": { + "DAGFolderInputAlias": { "allOf": [ { - "$ref": "#/components/schemas/_OpenAPIGenBaseModel" + "$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": "LocalConfig", - "pattern": "^LocalConfig", + "default": "DAGFolderInputAlias", + "pattern": "^DAGFolderInputAlias$", "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": "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" } }, - "PluginConfig": { + "DAGFileInputAlias": { "allOf": [ { - "$ref": "#/components/schemas/_OpenAPIGenBaseModel" + "$ref": "#/components/schemas/GenericInput" }, { "type": "object", + "required": [ + "platform", + "handler" + ], "properties": { - "docker": { - "title": "Docker", - "description": "The configuration to use this plugin in a docker container", - "allOf": [ + "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/DockerConfig" + "$ref": "#/components/schemas/HTTP" + }, + { + "$ref": "#/components/schemas/S3" + }, + { + "$ref": "#/components/schemas/ProjectFolder" } ] }, - "type": { - "title": "Type", - "default": "PluginConfig", - "pattern": "^PluginConfig", - "type": "string", - "readOnly": true + "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" }, - "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": { + "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" } }, - "local": { - "title": "Local", - "description": "The configuration to use this plugin locally", - "allOf": [ - { - "$ref": "#/components/schemas/LocalConfig" - } - ] + "type": { + "title": "Type", + "default": "DAGFileInputAlias", + "pattern": "^DAGFileInputAlias$", + "type": "string", + "readOnly": true } - }, - "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).", + "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" } }, - "UserPublic": { + "DAGPathInputAlias": { "allOf": [ { - "$ref": "#/components/schemas/_OpenAPIGenBaseModel" + "$ref": "#/components/schemas/GenericInput" }, { "type": "object", + "required": [ + "platform", + "handler" + ], "properties": { - "username": { - "title": "Username", - "description": "The lowercase account name for this user", - "example": "ladybugbot", - "type": "string" + "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" + } }, - "name": { - "title": "Name", - "description": "The display name for this user", - "example": "Ladybug Bot", - "type": "string" + "handler": { + "title": "Handler", + "description": "List of process actions to process the input or output value.", + "type": "array", + "items": { + "$ref": "#/components/schemas/IOAliasHandler" + } }, - "description": { - "title": "Description", - "description": "A short description of the user", - "example": "Beep Boop!", - "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" + } + ] }, - "picture": { - "title": "Picture", - "description": "URL to the picture associated with this user", - "example": "https://avatars1.githubusercontent.com/u/38131342", - "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" + }, + "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": "UserPublic", + "default": "DAGPathInputAlias", + "pattern": "^DAGPathInputAlias$", "type": "string", - "pattern": "^UserPublic$", "readOnly": true } - }, - "required": [ - "username" - ] + } } ], - "title": "UserPublic", + "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" } }, - "UserUpdate": { + "DAGArrayInputAlias": { "allOf": [ { - "$ref": "#/components/schemas/_OpenAPIGenBaseModel" + "$ref": "#/components/schemas/GenericInput" }, { "type": "object", + "required": [ + "platform", + "handler" + ], "properties": { - "name": { - "title": "Name", - "description": "The display name for this user", - "example": "Ladybug Tools", - "type": "string" + "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" + } }, - "picture_url": { - "title": "Picture Url", - "description": "URL to the picture associated with this user", - "example": "https://avatars1.githubusercontent.com/u/38131342", - "type": "string" + "handler": { + "title": "Handler", + "description": "List of process actions to process the input or output value.", + "type": "array", + "items": { + "$ref": "#/components/schemas/IOAliasHandler" + } }, - "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" + "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": "UserUpdate", + "default": "DAGArrayInputAlias", + "pattern": "^DAGArrayInputAlias$", "type": "string", - "pattern": "^UserUpdate$", "readOnly": true } - }, - "required": [ - "name", - "picture_url" - ] + } } ], - "title": "UserUpdate", + "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" } }, - "APIToken": { + "DAGJSONObjectInputAlias": { "allOf": [ { - "$ref": "#/components/schemas/_OpenAPIGenBaseModel" + "$ref": "#/components/schemas/GenericInput" }, { "type": "object", + "required": [ + "platform", + "handler" + ], "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": { + "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": "APIToken", + "default": "DAGJSONObjectInputAlias", + "pattern": "^DAGJSONObjectInputAlias$", "type": "string", - "pattern": "^APIToken$", "readOnly": true } - }, - "required": [ - "token_id", - "name" - ] + } } ], - "title": "APIToken", + "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" } }, - "Maintainer": { + "DAGLinkedInputAlias": { "allOf": [ { - "$ref": "#/components/schemas/_OpenAPIGenBaseModel" + "$ref": "#/components/schemas/DAGGenericInputAlias" }, { "type": "object", "properties": { - "name": { - "title": "Name", - "description": "The name of the author/maintainer person or organization.", - "type": "string" - }, "type": { "title": "Type", - "default": "Maintainer", - "pattern": "^Maintainer$", + "default": "DAGLinkedInputAlias", + "pattern": "^DAGLinkedInputAlias$", "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": "Maintainer", - "description": "Maintainer information", + "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" } }, - "License": { + "FunctionIntegerInput": { "allOf": [ { - "$ref": "#/components/schemas/_OpenAPIGenBaseModel" + "$ref": "#/components/schemas/GenericInput" }, { "type": "object", "properties": { - "name": { - "title": "Name", - "description": "The license name used for the package.", - "type": "string" - }, - "type": { - "title": "Type", - "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": "License", - "description": "License information for the Package", - "discriminator": { - "propertyName": "type" - } - }, - "MetaData": { - "allOf": [ - { - "$ref": "#/components/schemas/_OpenAPIGenBaseModel" - }, - { - "type": "object", - "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" - }, - "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": { - "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" - } - ] - } - }, - "required": [ - "name", - "tag" - ] - } - ], - "title": "MetaData", - "description": "Package metadata information.", - "discriminator": { - "propertyName": "type" - } - }, - "DAGGenericInput": { - "allOf": [ - { - "$ref": "#/components/schemas/GenericInput" - }, - { - "type": "object", - "properties": { - "default": { - "title": "Default", - "description": "Default value for generic input.", - "type": "string" + "default": { + "title": "Default", + "description": "Default value to use for an input if a value was not supplied.", + "type": "integer", + "format": "int32" }, "alias": { "title": "Alias", @@ -11058,140 +10840,322 @@ }, "type": { "title": "Type", - "default": "DAGGenericInput", - "pattern": "^DAGGenericInput$", + "default": "FunctionIntegerInput", + "pattern": "^FunctionIntegerInput$", "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": "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" } }, - "DAGStringInput": { + "UserUpdate": { "allOf": [ { - "$ref": "#/components/schemas/DAGGenericInput" + "$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": "DAGStringInput", - "pattern": "^DAGStringInput$", + "default": "UserUpdate", "type": "string", + "pattern": "^UserUpdate$", "readOnly": true } - } + }, + "required": [ + "name", + "picture_url" + ] } ], - "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": "UserUpdate", "discriminator": { "propertyName": "type" } }, - "DAGIntegerInput": { + "DockerConfig": { "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": "integer", - "format": "int32" + "image": { + "title": "Image", + "description": "Docker image name. Must include tag.", + "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" - } - ] - } + "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" }, - "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": "DockerConfig", + "pattern": "^DockerConfig", + "type": "string", + "readOnly": true }, - "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" + "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": "DAGIntegerInput", - "pattern": "^DAGIntegerInput$", + "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": "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": "LocalConfig", + "description": "Plugin Configuration to run on a desktop.", "discriminator": { "propertyName": "type" } }, - "DAGNumberInput": { + "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": "number", - "format": "double" + "type": "array", + "items": {} }, "alias": { "title": "Alias", @@ -11246,222 +11210,305 @@ "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": "DAGNumberInput", - "pattern": "^DAGNumberInput$", + "default": "StepArrayInput", + "pattern": "^StepArrayInput$", "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.", + "title": "StepArrayInput", + "description": "A JSON array input.", "discriminator": { "propertyName": "type" } }, - "DAGBooleanInput": { + "AccountPublic": { "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" - }, - "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" - } - ] - } + "id": { + "title": "Id", + "example": "0ad77f99-8043-46e4-8220-7221487c3ee5", + "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" + "account_type": { + "title": "Account Type", + "example": "user", + "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" + "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": "DAGBooleanInput", - "pattern": "^DAGBooleanInput$", + "default": "AccountPublic", + "type": "string", + "pattern": "^AccountPublic$", + "readOnly": true + } + }, + "required": [ + "id", + "account_type", + "name" + ] + } + ], + "title": "AccountPublic", + "discriminator": { + "propertyName": "type" + } + }, + "RepositoryUserPermissions": { + "allOf": [ + { + "$ref": "#/components/schemas/UserPermission" + }, + { + "type": "object", + "properties": { + "type": { + "title": "Type", + "default": "RepositoryUserPermissions", "type": "string", + "pattern": "^RepositoryUserPermissions$", "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.", + "title": "RepositoryUserPermissions", "discriminator": { "propertyName": "type" } }, - "DAGFolderInput": { + "Repository": { "allOf": [ { - "$ref": "#/components/schemas/GenericInput" + "$ref": "#/components/schemas/RepositoryCreate" }, { "type": "object", + "required": [ + "id", + "latest_tag", + "owner" + ], "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" - }, + "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/ProjectFolder" + "$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" - } - ] - } - }, - "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" + "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" + } + ] }, - "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" + "slug": { + "title": "Slug", + "description": "The repository slug", + "example": "ladybug-tools/daylight-factor", + "type": "string" }, "type": { "title": "Type", - "default": "DAGFolderInput", - "pattern": "^DAGFolderInput$", + "default": "Repository", "type": "string", + "pattern": "^Repository$", "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": "Repository", "discriminator": { "propertyName": "type" } }, - "DAGFileInput": { + "RepositoryList": { "allOf": [ { - "$ref": "#/components/schemas/GenericInput" + "$ref": "#/components/schemas/_OpenAPIGenBaseModel" }, { "type": "object", + "required": [ + "page", + "per_page", + "page_count", + "total_count", + "resources" + ], "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" - } - ] + "page": { + "title": "Page", + "description": "The current page the pagination request is on", + "type": "integer", + "format": "int32" }, - "alias": { - "title": "Alias", - "description": "A list of aliases for this input in 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": { + "$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", + "required": [ + "value" + ], + "properties": { + "value": { + "title": "Value", + "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": { "anyOf": [ @@ -11512,52 +11559,43 @@ "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": "StepIntegerInput", + "pattern": "^StepIntegerInput$", "type": "string", "readOnly": true } } } ], - "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": "StepIntegerInput", + "description": "An integer input.", "discriminator": { "propertyName": "type" } }, - "DAGPathInput": { + "StepNumberInput": { "allOf": [ { "$ref": "#/components/schemas/GenericInput" }, { "type": "object", + "required": [ + "value" + ], "properties": { + "value": { + "title": "Value", + "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" - } - ] + "description": "Default value to use for an input if a value was not supplied.", + "type": "number", + "format": "double" }, "alias": { "title": "Alias", @@ -11612,43 +11650,41 @@ "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": "DAGPathInput", - "pattern": "^DAGPathInput$", + "default": "StepNumberInput", + "pattern": "^StepNumberInput$", "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": "StepNumberInput", + "description": "A number input.", "discriminator": { "propertyName": "type" } }, - "DAGArrayInput": { + "StepBooleanInput": { "allOf": [ { "$ref": "#/components/schemas/GenericInput" }, { "type": "object", + "required": [ + "value" + ], "properties": { + "value": { + "title": "Value", + "type": "boolean" + }, "default": { "title": "Default", "description": "Default value to use for an input if a value was not supplied.", - "type": "array", - "items": {} + "type": "boolean" }, "alias": { "title": "Alias", @@ -11703,43 +11739,62 @@ "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": "StepBooleanInput", + "pattern": "^StepBooleanInput$", "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": "StepBooleanInput", + "description": "The boolean type matches only two special values: True and False.", "discriminator": { "propertyName": "type" } }, - "DAGJSONObjectInput": { + "StepFolderInput": { "allOf": [ { "$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 to use for an input if a value was not supplied.", - "type": "object" + "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", @@ -11794,1777 +11849,1624 @@ "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": "DAGJSONObjectInput", - "pattern": "^DAGJSONObjectInput$", + "default": "StepFolderInput", + "pattern": "^StepFolderInput$", "type": "string", "readOnly": true } } } ], - "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": "StepFolderInput", + "description": "A folder input.", "discriminator": { "propertyName": "type" } }, - "DAGGenericOutputAlias": { + "StepFileInput": { "allOf": [ { - "$ref": "#/components/schemas/GenericOutput" + "$ref": "#/components/schemas/GenericInput" }, { "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" + "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.", + "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": "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" - } - }, - "TaskReference": { - "allOf": [ - { - "$ref": "#/components/schemas/_TaskReferenceBase" - }, - { - "type": "object", - "properties": { - "type": { - "title": "Type", - "default": "TaskReference", - "pattern": "^TaskReference$", + "default": "StepFileInput", + "pattern": "^StepFileInput$", "type": "string", "readOnly": true } } } ], - "title": "TaskReference", - "description": "A Task reference for parameters other than files or folders.", + "title": "StepFileInput", + "description": "A file input.", "discriminator": { "propertyName": "type" } }, - "FileReference": { + "StepPathInput": { "allOf": [ { - "$ref": "#/components/schemas/_BaseReference" + "$ref": "#/components/schemas/GenericInput" }, { "type": "object", "required": [ - "path" + "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": "Relative path to a file.", + "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": "FileReference", - "pattern": "^FileReference$", + "default": "StepPathInput", + "pattern": "^StepPathInput$", "type": "string", "readOnly": true } } } ], - "title": "FileReference", - "description": "Reference to a file.", + "title": "StepPathInput", + "description": "A file or a folder input.", "discriminator": { "propertyName": "type" } }, - "DAGStringOutputAlias": { + "StepJSONObjectInput": { "allOf": [ { - "$ref": "#/components/schemas/_DAGArtifactOutputAlias" + "$ref": "#/components/schemas/GenericInput" }, { "type": "object", "required": [ - "from" + "value" ], "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" - } - ] + "value": { + "title": "Value", + "type": "object" }, - "type": { - "title": "Type", - "default": "DAGStringOutputAlias", - "pattern": "^DAGStringOutputAlias$", + "default": { + "title": "Default", + "description": "Default value to use for an input if a value was not supplied.", + "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", + "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": "StepJSONObjectInput", + "pattern": "^StepJSONObjectInput$", "type": "string", "readOnly": true } } } ], - "title": "DAGStringOutputAlias", - "description": "DAG alias string output.\n\nThis output loads the content from a file as a string.", + "title": "StepJSONObjectInput", + "description": "A JSON object input.", "discriminator": { "propertyName": "type" } }, - "DAGIntegerOutputAlias": { + "StepStringOutput": { "allOf": [ { - "$ref": "#/components/schemas/_DAGArtifactOutputAlias" + "$ref": "#/components/schemas/FunctionStringOutput" }, { "type": "object", "required": [ - "from" + "value" ], "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" - } - ] + "value": { + "title": "Value", + "type": "string" }, "type": { "title": "Type", - "default": "DAGIntegerOutputAlias", - "pattern": "^DAGIntegerOutputAlias$", + "default": "StepStringOutput", + "pattern": "^StepStringOutput$", "type": "string", "readOnly": true } } } ], - "title": "DAGIntegerOutputAlias", - "description": "DAG alias integer output.\n\nThis output loads the content from a file as an integer.", + "title": "StepStringOutput", + "description": "A String output.", "discriminator": { "propertyName": "type" } }, - "DAGNumberOutputAlias": { + "StepIntegerOutput": { "allOf": [ { - "$ref": "#/components/schemas/_DAGArtifactOutputAlias" + "$ref": "#/components/schemas/FunctionIntegerOutput" }, { "type": "object", "required": [ - "from" + "value" ], "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" - } - ] + "value": { + "title": "Value", + "type": "integer", + "format": "int32" }, "type": { "title": "Type", - "default": "DAGNumberOutputAlias", - "pattern": "^DAGNumberOutputAlias$", + "default": "StepIntegerOutput", + "pattern": "^StepIntegerOutput$", "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": "StepIntegerOutput", + "description": "An integer output.", "discriminator": { "propertyName": "type" } }, - "DAGBooleanOutputAlias": { + "StepNumberOutput": { "allOf": [ { - "$ref": "#/components/schemas/_DAGArtifactOutputAlias" + "$ref": "#/components/schemas/FunctionNumberOutput" }, { "type": "object", "required": [ - "from" + "value" ], "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" - } - ] + "value": { + "title": "Value", + "type": "number", + "format": "double" }, "type": { "title": "Type", - "default": "DAGBooleanOutputAlias", - "pattern": "^DAGBooleanOutputAlias$", + "default": "StepNumberOutput", + "pattern": "^StepNumberOutput$", "type": "string", "readOnly": true } } } ], - "title": "DAGBooleanOutputAlias", - "description": "DAG alias boolean output.\n\nThis output loads the content from a file as a boolean.", + "title": "StepNumberOutput", + "description": "A number output.", "discriminator": { "propertyName": "type" } }, - "FolderReference": { + "StepBooleanOutput": { "allOf": [ { - "$ref": "#/components/schemas/_BaseReference" + "$ref": "#/components/schemas/FunctionBooleanOutput" }, { "type": "object", "required": [ - "path" + "value" ], "properties": { - "path": { - "title": "Path", - "description": "Relative path to a folder.", - "type": "string" + "value": { + "title": "Value", + "type": "boolean" }, "type": { "title": "Type", - "default": "FolderReference", - "pattern": "^FolderReference$", + "default": "StepBooleanOutput", + "pattern": "^StepBooleanOutput$", "type": "string", "readOnly": true } } } ], - "title": "FolderReference", - "description": "Reference to a folder.", + "title": "StepBooleanOutput", + "description": "The boolean type matches only two special values: True and False.", "discriminator": { "propertyName": "type" } }, - "DAGFolderOutputAlias": { + "StepFolderOutput": { "allOf": [ { - "$ref": "#/components/schemas/_DAGArtifactOutputAlias" + "$ref": "#/components/schemas/FunctionFolderOutput" }, { "type": "object", "required": [ - "from" + "source" ], "properties": { - "from": { - "title": "From", - "description": "Reference to a folder or a task output. Task output must be folder.", + "source": { + "title": "Source", + "description": "The path to source the file from.", "anyOf": [ { - "$ref": "#/components/schemas/TaskReference" + "$ref": "#/components/schemas/HTTP" }, { - "$ref": "#/components/schemas/FolderReference" + "$ref": "#/components/schemas/S3" + }, + { + "$ref": "#/components/schemas/ProjectFolder" } ] }, "type": { "title": "Type", - "default": "DAGFolderOutputAlias", - "pattern": "^DAGFolderOutputAlias$", + "default": "StepFolderOutput", + "pattern": "^StepFolderOutput$", "type": "string", "readOnly": true } } } ], - "title": "DAGFolderOutputAlias", - "description": "DAG alias folder output.", + "title": "StepFolderOutput", + "description": "A folder output.", "discriminator": { "propertyName": "type" } }, - "DAGFileOutputAlias": { + "StepFileOutput": { "allOf": [ { - "$ref": "#/components/schemas/_DAGArtifactOutputAlias" + "$ref": "#/components/schemas/FunctionFileOutput" }, { "type": "object", "required": [ - "from" + "source" ], "properties": { - "from": { - "title": "From", - "description": "Reference to a file or a task output. Task output must be file.", + "source": { + "title": "Source", + "description": "The path to source the file from.", "anyOf": [ { - "$ref": "#/components/schemas/TaskReference" + "$ref": "#/components/schemas/HTTP" }, { - "$ref": "#/components/schemas/FileReference" + "$ref": "#/components/schemas/S3" + }, + { + "$ref": "#/components/schemas/ProjectFolder" } ] }, "type": { "title": "Type", - "default": "DAGFileOutputAlias", - "pattern": "^DAGFileOutputAlias$", + "default": "StepFileOutput", + "pattern": "^StepFileOutput$", "type": "string", "readOnly": true } } } ], - "title": "DAGFileOutputAlias", - "description": "DAG alias file output.", + "title": "StepFileOutput", + "description": "A file output.", "discriminator": { "propertyName": "type" } }, - "DAGPathOutputAlias": { + "StepArrayOutput": { "allOf": [ { - "$ref": "#/components/schemas/_DAGArtifactOutputAlias" + "$ref": "#/components/schemas/FunctionStringOutput" }, { "type": "object", "required": [ - "from" + "value" ], "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" - }, + "value": { + "title": "Value", + "type": "array", + "items": {} + }, + "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/FolderReference" + "$ref": "#/components/schemas/ItemType" } ] }, "type": { "title": "Type", - "default": "DAGPathOutputAlias", - "pattern": "^DAGPathOutputAlias$", + "default": "StepArrayOutput", + "pattern": "^StepArrayOutput$", "type": "string", "readOnly": true } } } ], - "title": "DAGPathOutputAlias", - "description": "DAG alias path output.", + "title": "StepArrayOutput", + "description": "A JSON array output.", "discriminator": { "propertyName": "type" } }, - "DAGArrayOutputAlias": { + "StepJSONObjectOutput": { "allOf": [ { - "$ref": "#/components/schemas/_DAGArtifactOutputAlias" + "$ref": "#/components/schemas/FunctionJSONObjectOutput" }, { "type": "object", "required": [ - "from" + "value" ], "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" - } - ] + "value": { + "title": "Value", + "type": "object" }, "type": { "title": "Type", - "default": "DAGArrayOutputAlias", - "pattern": "^DAGArrayOutputAlias$", + "default": "StepJSONObjectOutput", + "pattern": "^StepJSONObjectOutput$", "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.", + "title": "StepJSONObjectOutput", + "description": "A JSON object output.", "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 - } - } - } + "RunStatusEnum": { + "title": "RunStatusEnum", + "description": "Enumaration of allowable status strings", + "enum": [ + "Created", + "Scheduled", + "Running", + "Post-Processing", + "Failed", + "Cancelled", + "Succeeded", + "Unknown" ], - "title": "DAGJSONObjectOutputAlias", - "description": "DAG alias object output.\n\nThis output loads the content from a file as a JSON object.", - "discriminator": { - "propertyName": "type" - } + "type": "string" }, - "DAGLinkedOutputAlias": { - "allOf": [ - { - "$ref": "#/components/schemas/DAGGenericOutputAlias" - }, - { - "type": "object", - "properties": { - "type": { - "title": "Type", - "default": "DAGLinkedOutputAlias", - "pattern": "^DAGLinkedOutputAlias$", - "type": "string", - "readOnly": true - } - } - } + "StepStatusEnum": { + "title": "StepStatusEnum", + "description": "Enumaration of allowable status strings", + "enum": [ + "Scheduled", + "Running", + "Failed", + "Succeeded", + "Skipped", + "Unknown" ], - "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" - } + "type": "string" }, - "DAGGenericOutput": { + "StatusType": { + "title": "StatusType", + "description": "Type enum for status type.", + "enum": [ + "Function", + "DAG", + "Loop", + "Unknown" + ], + "type": "string" + }, + "StepStatus": { "allOf": [ { - "$ref": "#/components/schemas/FromOutput" + "$ref": "#/components/schemas/_OpenAPIGenBaseModel" }, { "type": "object", + "required": [ + "inputs", + "outputs", + "started_at", + "id", + "name", + "status_type", + "template_ref", + "children_ids", + "outbound_steps" + ], "properties": { - "alias": { - "title": "Alias", - "description": "A list of additional processes for loading this output on different platforms.", + "inputs": { + "title": "Inputs", + "description": "The inputs used by this step.", "type": "array", "items": { "anyOf": [ { - "$ref": "#/components/schemas/DAGGenericOutputAlias" - }, - { - "$ref": "#/components/schemas/DAGStringOutputAlias" - }, - { - "$ref": "#/components/schemas/DAGIntegerOutputAlias" + "$ref": "#/components/schemas/StepStringInput" }, { - "$ref": "#/components/schemas/DAGNumberOutputAlias" + "$ref": "#/components/schemas/StepIntegerInput" }, { - "$ref": "#/components/schemas/DAGBooleanOutputAlias" + "$ref": "#/components/schemas/StepNumberInput" }, { - "$ref": "#/components/schemas/DAGFolderOutputAlias" + "$ref": "#/components/schemas/StepBooleanInput" }, { - "$ref": "#/components/schemas/DAGFileOutputAlias" + "$ref": "#/components/schemas/StepFolderInput" }, { - "$ref": "#/components/schemas/DAGPathOutputAlias" + "$ref": "#/components/schemas/StepFileInput" }, { - "$ref": "#/components/schemas/DAGArrayOutputAlias" + "$ref": "#/components/schemas/StepPathInput" }, { - "$ref": "#/components/schemas/DAGJSONObjectOutputAlias" + "$ref": "#/components/schemas/StepArrayInput" }, { - "$ref": "#/components/schemas/DAGLinkedOutputAlias" + "$ref": "#/components/schemas/StepJSONObjectInput" } ] } }, - "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": "The outputs produced by this step.", "type": "array", "items": { "anyOf": [ { - "$ref": "#/components/schemas/DAGGenericOutputAlias" - }, - { - "$ref": "#/components/schemas/DAGStringOutputAlias" - }, - { - "$ref": "#/components/schemas/DAGIntegerOutputAlias" + "$ref": "#/components/schemas/StepStringOutput" }, { - "$ref": "#/components/schemas/DAGNumberOutputAlias" + "$ref": "#/components/schemas/StepIntegerOutput" }, { - "$ref": "#/components/schemas/DAGBooleanOutputAlias" + "$ref": "#/components/schemas/StepNumberOutput" }, { - "$ref": "#/components/schemas/DAGFolderOutputAlias" + "$ref": "#/components/schemas/StepBooleanOutput" }, { - "$ref": "#/components/schemas/DAGFileOutputAlias" + "$ref": "#/components/schemas/StepFolderOutput" }, { - "$ref": "#/components/schemas/DAGPathOutputAlias" + "$ref": "#/components/schemas/StepFileOutput" }, { - "$ref": "#/components/schemas/DAGArrayOutputAlias" + "$ref": "#/components/schemas/StepPathOutput" }, { - "$ref": "#/components/schemas/DAGJSONObjectOutputAlias" + "$ref": "#/components/schemas/StepArrayOutput" }, { - "$ref": "#/components/schemas/DAGLinkedOutputAlias" + "$ref": "#/components/schemas/StepJSONObjectOutput" } ] } }, - "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" + "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" + }, + "status_type": { + "description": "The type of step this status is for. Can be \"Function\", \"DAG\" or \"Loop\"", + "allOf": [ + { + "$ref": "#/components/schemas/StatusType" + } + ] + }, + "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", + "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": "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": "DAGStringOutput", - "pattern": "^DAGStringOutput$", + "default": "StepStatus", + "pattern": "^StepStatus$", "type": "string", "readOnly": true } } } ], - "title": "DAGStringOutput", - "description": "DAG string output.\n\nThis output loads the content from a file as a string.", + "title": "StepStatus", + "description": "The Status of a Job Step", "discriminator": { "propertyName": "type" } }, - "DAGIntegerOutput": { + "RunStatus": { "allOf": [ { - "$ref": "#/components/schemas/GenericOutput" + "$ref": "#/components/schemas/_OpenAPIGenBaseModel" }, { "type": "object", "required": [ - "from" + "inputs", + "outputs", + "started_at", + "id", + "job_id" ], "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.", + "inputs": { + "title": "Inputs", + "description": "The inputs used for this run.", "type": "array", "items": { "anyOf": [ { - "$ref": "#/components/schemas/DAGGenericOutputAlias" - }, - { - "$ref": "#/components/schemas/DAGStringOutputAlias" - }, - { - "$ref": "#/components/schemas/DAGIntegerOutputAlias" + "$ref": "#/components/schemas/StepStringInput" }, { - "$ref": "#/components/schemas/DAGNumberOutputAlias" + "$ref": "#/components/schemas/StepIntegerInput" }, { - "$ref": "#/components/schemas/DAGBooleanOutputAlias" + "$ref": "#/components/schemas/StepNumberInput" }, { - "$ref": "#/components/schemas/DAGFolderOutputAlias" + "$ref": "#/components/schemas/StepBooleanInput" }, { - "$ref": "#/components/schemas/DAGFileOutputAlias" + "$ref": "#/components/schemas/StepFolderInput" }, { - "$ref": "#/components/schemas/DAGPathOutputAlias" + "$ref": "#/components/schemas/StepFileInput" }, { - "$ref": "#/components/schemas/DAGArrayOutputAlias" + "$ref": "#/components/schemas/StepPathInput" }, { - "$ref": "#/components/schemas/DAGJSONObjectOutputAlias" + "$ref": "#/components/schemas/StepArrayInput" }, { - "$ref": "#/components/schemas/DAGLinkedOutputAlias" + "$ref": "#/components/schemas/StepJSONObjectInput" } ] } }, - "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": "DAGIntegerOutput", - "pattern": "^DAGIntegerOutput$", - "type": "string", - "readOnly": true - } - } - } - ], - "title": "DAGIntegerOutput", - "description": "DAG integer output.\n\nThis output loads the content from a file as an integer.", - "discriminator": { - "propertyName": "type" - } - }, - "DAGNumberOutput": { - "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": "The outputs produced by this run.", "type": "array", "items": { "anyOf": [ { - "$ref": "#/components/schemas/DAGGenericOutputAlias" - }, - { - "$ref": "#/components/schemas/DAGStringOutputAlias" - }, - { - "$ref": "#/components/schemas/DAGIntegerOutputAlias" + "$ref": "#/components/schemas/StepStringOutput" }, { - "$ref": "#/components/schemas/DAGNumberOutputAlias" + "$ref": "#/components/schemas/StepIntegerOutput" }, { - "$ref": "#/components/schemas/DAGBooleanOutputAlias" + "$ref": "#/components/schemas/StepNumberOutput" }, { - "$ref": "#/components/schemas/DAGFolderOutputAlias" + "$ref": "#/components/schemas/StepBooleanOutput" }, { - "$ref": "#/components/schemas/DAGFileOutputAlias" + "$ref": "#/components/schemas/StepFolderOutput" }, { - "$ref": "#/components/schemas/DAGPathOutputAlias" + "$ref": "#/components/schemas/StepFileOutput" }, { - "$ref": "#/components/schemas/DAGArrayOutputAlias" + "$ref": "#/components/schemas/StepPathOutput" }, { - "$ref": "#/components/schemas/DAGJSONObjectOutputAlias" + "$ref": "#/components/schemas/StepArrayOutput" }, { - "$ref": "#/components/schemas/DAGLinkedOutputAlias" + "$ref": "#/components/schemas/StepJSONObjectOutput" } ] } }, - "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": "DAGNumberOutput", - "pattern": "^DAGNumberOutput$", + "started_at": { + "title": "Started At", + "description": "The time at which the task was started", "type": "string", - "readOnly": true - } - } - } - ], - "title": "DAGNumberOutput", - "description": "DAG number output.\n\nThis output loads the content from a file as a floating number.", - "discriminator": { - "propertyName": "type" - } - }, - "DAGBooleanOutput": { - "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" - }, + "format": "date-time" + }, + "id": { + "title": "Id", + "description": "The ID of the individual run.", + "type": "string" + }, + "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": "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/FileReference" + "$ref": "#/components/schemas/RunStatusEnum" } ] }, - "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" - } - ] + "steps": { + "title": "Steps", + "default": {}, + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/StepStatus" } }, - "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": "DAGBooleanOutput", - "pattern": "^DAGBooleanOutput$", + "default": "RunStatus", + "pattern": "^RunStatus$", "type": "string", "readOnly": true } } } ], - "title": "DAGBooleanOutput", - "description": "DAG boolean output.\n\nThis output loads the content from a file as a boolean.", + "title": "RunStatus", + "description": "Job Status.", "discriminator": { "propertyName": "type" } }, - "DAGFolderOutput": { + "TeamUpdate": { "allOf": [ { - "$ref": "#/components/schemas/GenericOutput" + "$ref": "#/components/schemas/TeamCreate" }, { "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" - } - ] - }, - "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": "DAGFolderOutput", - "pattern": "^DAGFolderOutput$", + "default": "TeamUpdate", "type": "string", + "pattern": "^TeamUpdate$", "readOnly": true } } } ], - "title": "DAGFolderOutput", - "description": "DAG folder output.", + "title": "TeamUpdate", "discriminator": { "propertyName": "type" } }, - "DAGFileOutput": { + "DAGBooleanInput": { "allOf": [ { - "$ref": "#/components/schemas/GenericOutput" + "$ref": "#/components/schemas/GenericInput" }, { "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" - } - ] + "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 additional processes for loading this output on different platforms.", + "description": "A list of aliases for this input in different platforms.", "type": "array", "items": { "anyOf": [ { - "$ref": "#/components/schemas/DAGGenericOutputAlias" + "$ref": "#/components/schemas/DAGGenericInputAlias" }, { - "$ref": "#/components/schemas/DAGStringOutputAlias" + "$ref": "#/components/schemas/DAGStringInputAlias" }, { - "$ref": "#/components/schemas/DAGIntegerOutputAlias" + "$ref": "#/components/schemas/DAGIntegerInputAlias" }, { - "$ref": "#/components/schemas/DAGNumberOutputAlias" + "$ref": "#/components/schemas/DAGNumberInputAlias" }, { - "$ref": "#/components/schemas/DAGBooleanOutputAlias" + "$ref": "#/components/schemas/DAGBooleanInputAlias" }, { - "$ref": "#/components/schemas/DAGFolderOutputAlias" + "$ref": "#/components/schemas/DAGFolderInputAlias" }, { - "$ref": "#/components/schemas/DAGFileOutputAlias" + "$ref": "#/components/schemas/DAGFileInputAlias" }, { - "$ref": "#/components/schemas/DAGPathOutputAlias" + "$ref": "#/components/schemas/DAGPathInputAlias" }, { - "$ref": "#/components/schemas/DAGArrayOutputAlias" + "$ref": "#/components/schemas/DAGArrayInputAlias" }, { - "$ref": "#/components/schemas/DAGJSONObjectOutputAlias" + "$ref": "#/components/schemas/DAGJSONObjectInputAlias" }, { - "$ref": "#/components/schemas/DAGLinkedOutputAlias" + "$ref": "#/components/schemas/DAGLinkedInputAlias" } ] } }, "required": { "title": "Required", - "description": "A boolean to indicate if an artifact output is required. A False value makes the artifact optional.", - "default": true, + "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": "DAGFileOutput", - "pattern": "^DAGFileOutput$", - "type": "string", + "default": "DAGBooleanInput", + "pattern": "^DAGBooleanInput$", + "type": "string", "readOnly": true } } } ], - "title": "DAGFileOutput", - "description": "DAG file output.", + "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" } }, - "DAGPathOutput": { + "PriceType": { + "title": "PriceType", + "description": "An enumeration.", + "enum": [ + "recurring", + "one_time" + ], + "type": "string" + }, + "PriceRecurrence": { "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" - } - ] + "interval": { + "title": "Interval", + "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" - } - ] - } + "interval_count": { + "title": "Interval Count", + "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" + "usage_type": { + "title": "Usage Type", + "type": "string" }, "type": { "title": "Type", - "default": "DAGPathOutput", - "pattern": "^DAGPathOutput$", + "default": "PriceRecurrence", "type": "string", + "pattern": "^PriceRecurrence$", "readOnly": true } - } + }, + "required": [ + "interval", + "interval_count", + "usage_type" + ] } ], - "title": "DAGPathOutput", - "description": "DAG path output.", + "title": "PriceRecurrence", "discriminator": { "propertyName": "type" } }, - "DAGArrayOutput": { + "PriceTier": { "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" - } - ] + "unit_amount": { + "title": "Unit Amount", + "type": "integer", + "format": "int32" }, - "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" - } - ] - } + "unit_amount_decimal": { + "title": "Unit Amount Decimal", + "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" + "flat_amount": { + "title": "Flat Amount", + "type": "integer", + "format": "int32" }, - "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" - } - ] + "flat_amount_decimal": { + "title": "Flat Amount Decimal", + "type": "string" + }, + "up_to": { + "title": "Up To", + "type": "integer", + "format": "int32" }, "type": { "title": "Type", - "default": "DAGArrayOutput", - "pattern": "^DAGArrayOutput$", + "default": "PriceTier", "type": "string", + "pattern": "^PriceTier$", "readOnly": true } - } + }, + "required": [ + "unit_amount", + "unit_amount_decimal" + ] } ], - "title": "DAGArrayOutput", - "description": "DAG array output.\n\nThis output loads the content from a JSON file which must be a JSON Array.", + "title": "PriceTier", "discriminator": { "propertyName": "type" } }, - "DAGJSONObjectOutput": { + "Price": { "allOf": [ { - "$ref": "#/components/schemas/GenericOutput" + "$ref": "#/components/schemas/ExternalResource" }, { "type": "object", "required": [ - "from" + "product", + "active", + "currency", + "type" ], "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" - } - ] + "product": { + "title": "Product", + "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" - } - ] - } - }, - "required": { - "title": "Required", - "description": "A boolean to indicate if an artifact output is required. A False value makes the artifact optional.", - "default": true, + "active": { + "title": "Active", "type": "boolean" }, + "currency": { + "title": "Currency", + "type": "string" + }, "type": { - "title": "Type", - "default": "DAGJSONObjectOutput", - "pattern": "^DAGJSONObjectOutput$", - "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": "DAGJSONObjectOutput", - "description": "DAG object output.\n\nThis output loads the content from a file as a JSON object.", + "title": "Price", "discriminator": { "propertyName": "type" } }, - "RecipeInterface": { + "SubscriptionItem": { "allOf": [ { - "$ref": "#/components/schemas/_OpenAPIGenBaseModel" + "$ref": "#/components/schemas/ExternalResource" }, { "type": "object", "properties": { - "metadata": { - "title": "Metadata", - "description": "Recipe metadata information.", - "allOf": [ - { - "$ref": "#/components/schemas/MetaData" - } - ] - }, "type": { "title": "Type", - "default": "RecipeInterface", - "pattern": "^RecipeInterface$", + "default": "SubscriptionItem", "type": "string", + "pattern": "^SubscriptionItem$", "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/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" - } - ] - } - }, - "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" - } - ] - } } - }, - "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.", + "title": "SubscriptionItem", "discriminator": { "propertyName": "type" } }, - "RecipePackage": { + "CouponDuration": { + "title": "CouponDuration", + "description": "An enumeration.", + "enum": [ + "forever", + "once", + "repeating" + ], + "type": "string" + }, + "Coupon": { "allOf": [ { - "$ref": "#/components/schemas/RepositoryPackage" + "$ref": "#/components/schemas/ExternalResource" }, { "type": "object", "required": [ - "manifest" + "name", + "valid", + "duration" ], "properties": { - "manifest": { - "$ref": "#/components/schemas/RecipeInterface" + "name": { + "title": "Name", + "type": "string" + }, + "valid": { + "title": "Valid", + "type": "boolean" + }, + "duration": { + "$ref": "#/components/schemas/CouponDuration" + }, + "amount_off": { + "title": "Amount Off", + "type": "number", + "format": "double" + }, + "percent_off": { + "title": "Percent Off", + "type": "number", + "format": "double" + }, + "duration_in_months": { + "title": "Duration In Months", + "type": "integer", + "format": "int32" }, "type": { "title": "Type", - "default": "RecipePackage", + "default": "Coupon", "type": "string", - "pattern": "^RecipePackage$", + "pattern": "^Coupon$", "readOnly": true } } } ], - "title": "RecipePackage", + "title": "Coupon", "discriminator": { "propertyName": "type" } }, - "RecipePackageList": { + "Discount": { "allOf": [ { - "$ref": "#/components/schemas/_OpenAPIGenBaseModel" + "$ref": "#/components/schemas/ExternalResource" }, { "type": "object", "required": [ - "page", - "per_page", - "page_count", - "total_count", - "resources" + "start", + "coupon" ], "properties": { - "page": { - "title": "Page", - "description": "The current page the pagination request is on", - "type": "integer", - "format": "int32" + "start": { + "title": "Start", + "type": "string", + "format": "date-time" }, - "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" + "coupon": { + "$ref": "#/components/schemas/Coupon" }, - "resources": { - "title": "Resources", - "type": "array", - "items": { - "$ref": "#/components/schemas/RecipePackage" - } + "end": { + "title": "End", + "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" + "promotion_code": { + "title": "Promotion Code", + "type": "string" }, "type": { "title": "Type", - "default": "RecipePackageList", + "default": "Discount", "type": "string", - "pattern": "^RecipePackageList$", + "pattern": "^Discount$", "readOnly": true } } } ], - "title": "RecipePackageList", - "description": "A list response from a pagination request", + "title": "Discount", "discriminator": { "propertyName": "type" } }, - "InputReference": { + "KeyRequest": { "allOf": [ { - "$ref": "#/components/schemas/_InputReferenceBase" + "$ref": "#/components/schemas/_OpenAPIGenBaseModel" }, { "type": "object", "properties": { + "key": { + "title": "Key", + "type": "string" + }, "type": { "title": "Type", - "default": "InputReference", - "pattern": "^InputReference$", + "default": "KeyRequest", "type": "string", + "pattern": "^KeyRequest$", "readOnly": true } - } + }, + "required": [ + "key" + ] } ], - "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": "KeyRequest", "discriminator": { "propertyName": "type" } }, - "ItemReference": { + "UserPublic": { "allOf": [ { - "$ref": "#/components/schemas/_BaseReference" + "$ref": "#/components/schemas/_OpenAPIGenBaseModel" }, { "type": "object", "properties": { - "variable": { - "title": "Variable", - "description": "The name of the looped item variable (use dot notation for nested json values)", + "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", "type": "string" }, "type": { "title": "Type", - "default": "ItemReference", - "pattern": "^ItemReference$", + "default": "UserPublic", "type": "string", + "pattern": "^UserPublic$", "readOnly": true } - } + }, + "required": [ + "username" + ] } ], - "title": "ItemReference", - "description": "An Item Reference.", + "title": "UserPublic", "discriminator": { "propertyName": "type" } }, - "ValueReference": { + "UserPublicList": { "allOf": [ { - "$ref": "#/components/schemas/_BaseReference" + "$ref": "#/components/schemas/_OpenAPIGenBaseModel" }, { "type": "object", "required": [ - "value" + "page", + "per_page", + "page_count", + "total_count", + "resources" ], "properties": { - "value": { - "title": "Value", - "description": "A fixed value for this reference." + "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/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": "ValueReference", - "pattern": "^ValueReference$", + "default": "UserPublicList", "type": "string", + "pattern": "^UserPublicList$", "readOnly": true } } } ], - "title": "ValueReference", - "description": "A reference to a fixed value.", + "title": "UserPublicList", + "description": "A list response from a pagination request", "discriminator": { "propertyName": "type" } }, - "TaskArgument": { + "RepositoryCreate": { "allOf": [ { - "$ref": "#/components/schemas/_OpenAPIGenBaseModel" + "$ref": "#/components/schemas/RepositoryUpdate" }, { "type": "object", + "required": [ + "name" + ], "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.", + "description": "The name of the repository", + "example": "daylight-factor", "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": "TaskArgument", - "pattern": "^TaskArgument$", + "default": "RepositoryCreate", "type": "string", + "pattern": "^RepositoryCreate$", "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", - "from" - ] + } } ], - "title": "TaskArgument", - "description": "Task argument for receiving inputs that are not files or folders.", + "title": "RepositoryCreate", "discriminator": { "propertyName": "type" } }, - "NewSubscriptionItem": { + "Maintainer": { "allOf": [ { "$ref": "#/components/schemas/_OpenAPIGenBaseModel" @@ -13572,34 +13474,44 @@ { "type": "object", "properties": { - "price": { - "$ref": "#/components/schemas/Price" - }, - "quantity": { - "title": "Quantity", - "type": "integer", - "format": "int32" + "name": { + "title": "Name", + "description": "The name of the author/maintainer person or organization.", + "type": "string" }, "type": { "title": "Type", - "default": "NewSubscriptionItem", + "default": "Maintainer", + "pattern": "^Maintainer$", "type": "string", - "pattern": "^NewSubscriptionItem$", "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": [ - "price", - "quantity" + "name" ] } ], - "title": "NewSubscriptionItem", + "title": "Maintainer", + "description": "Maintainer information", "discriminator": { "propertyName": "type" } }, - "AccountPublic": { + "License": { "allOf": [ { "$ref": "#/components/schemas/_OpenAPIGenBaseModel" @@ -13607,57 +13519,47 @@ { "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", + "description": "The license name used for the package.", "type": "string" }, "type": { "title": "Type", - "default": "AccountPublic", + "default": "License", + "pattern": "^License$", "type": "string", - "pattern": "^AccountPublic$", "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": [ - "id", - "account_type", "name" ] } ], - "title": "AccountPublic", + "title": "License", + "description": "License information for the Package", "discriminator": { "propertyName": "type" } }, - "Accessor": { + "MetaData": { "allOf": [ { "$ref": "#/components/schemas/_OpenAPIGenBaseModel" @@ -13665,84 +13567,190 @@ { "type": "object", "properties": { - "subject": { - "title": "Subject", - "anyOf": [ - { - "$ref": "#/components/schemas/AccountPublic" - }, - { - "$ref": "#/components/schemas/Team" - } - ] + "name": { + "title": "Name", + "description": "Package name. Make it descriptive and helpful ;)", + "type": "string" }, - "permission": { - "$ref": "#/components/schemas/Permission" + "tag": { + "title": "Tag", + "description": "The tag of the package", + "type": "string" }, "type": { "title": "Type", - "default": "Accessor", + "default": "MetaData", + "pattern": "^MetaData$", "type": "string", - "pattern": "^Accessor$", "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": { + "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" + } + ] } }, "required": [ - "subject", - "permission" + "name", + "tag" ] } ], - "title": "Accessor", + "title": "MetaData", + "description": "Package metadata information.", "discriminator": { "propertyName": "type" } }, - "UserPermission": { + "DAGIntegerOutput": { "allOf": [ { - "$ref": "#/components/schemas/_OpenAPIGenBaseModel" + "$ref": "#/components/schemas/GenericOutput" }, { "type": "object", + "required": [ + "from" + ], "properties": { - "admin": { - "title": "Admin", - "description": "The user has admin permission to this resource", - "default": false, - "example": false, - "type": "boolean" + "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" + } + ] }, - "write": { - "title": "Write", - "description": "The user has write permission on this resource", - "default": false, - "example": false, - "type": "boolean" + "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" + } + ] + } }, - "read": { - "title": "Read", - "description": "The user has read permission on this resource", - "default": false, - "example": true, + "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": "UserPermission", + "default": "DAGIntegerOutput", + "pattern": "^DAGIntegerOutput$", "type": "string", - "pattern": "^UserPermission$", "readOnly": true } } } ], - "title": "UserPermission", + "title": "DAGIntegerOutput", + "description": "DAG integer output.\n\nThis output loads the content from a file as an integer.", "discriminator": { "propertyName": "type" } }, - "LicensePoolPublic": { + "DailyUsage": { "allOf": [ { "$ref": "#/components/schemas/_OpenAPIGenBaseModel" @@ -13750,1045 +13758,1506 @@ { "type": "object", "properties": { - "id": { - "title": "Id", - "description": "The ID of the pool", + "date": { + "title": "Date", + "description": "The day this usage was aggregated for", "type": "string", - "format": "uuid" - }, - "license_id": { - "title": "License Id", - "description": "The ID of the license to which the pool provides access", - "type": "string" + "format": "date-time" }, - "owner": { - "title": "Owner", - "description": "The account that owns the license", - "allOf": [ - { - "$ref": "#/components/schemas/AccountPublic" - } - ] + "cpu": { + "title": "Cpu", + "description": "cpu usage", + "default": 0, + "type": "number", + "format": "double" }, - "permissions": { - "$ref": "#/components/schemas/UserPermission" - }, - "product": { - "title": "Product", - "description": "The pollination product to which this pool provides access", - "type": "string" + "memory": { + "title": "Memory", + "description": "memory usage", + "default": 0, + "type": "number", + "format": "double" }, - "accessors": { - "title": "Accessors", - "description": "The entities that can access the license though the pool", - "default": [], - "type": "array", - "items": { - "$ref": "#/components/schemas/Accessor" - } + "succeeded": { + "title": "Succeeded", + "description": "succeeded usage", + "default": 0, + "type": "integer", + "format": "int32" }, - "description": { - "title": "Description", - "description": "The description of the pool", - "type": "string" + "failed": { + "title": "Failed", + "description": "failed usage", + "default": 0, + "type": "integer", + "format": "int32" }, "type": { "title": "Type", - "default": "LicensePoolPublic", + "default": "DailyUsage", "type": "string", - "pattern": "^LicensePoolPublic$", + "pattern": "^DailyUsage$", "readOnly": true } }, "required": [ - "id", - "license_id", - "owner", - "permissions", - "product" + "date" ] } ], - "title": "LicensePoolPublic", + "title": "DailyUsage", "discriminator": { "propertyName": "type" } }, - "LicensePoolList": { + "DAGFileInput": { "allOf": [ { - "$ref": "#/components/schemas/_OpenAPIGenBaseModel" + "$ref": "#/components/schemas/GenericInput" }, { "type": "object", "properties": { - "resources": { - "title": "Resources", + "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/LicensePoolPublic" + "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": "LicensePoolList", + "default": "DAGFileInput", + "pattern": "^DAGFileInput$", "type": "string", - "pattern": "^LicensePoolList$", "readOnly": true } - }, - "required": [ - "resources" - ] + } } ], - "title": "LicensePoolList", + "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" } }, - "ProjectAccessPolicy": { + "DAGGenericInput": { "allOf": [ { - "$ref": "#/components/schemas/_OpenAPIGenBaseModel" + "$ref": "#/components/schemas/GenericInput" }, { "type": "object", - "required": [ - "subject", - "permission" - ], "properties": { - "subject": { - "title": "Subject", - "description": "The subject of the access policy", - "allOf": [ - { - "$ref": "#/components/schemas/PolicySubject" - } - ] + "default": { + "title": "Default", + "description": "Default value for generic input.", + "type": "string" }, - "permission": { - "description": "The permission given to the subject of the access policy", - "example": "write", - "allOf": [ - { - "$ref": "#/components/schemas/Permission" - } - ] + "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": "ProjectAccessPolicy", + "default": "DAGGenericInput", + "pattern": "^DAGGenericInput$", "type": "string", - "pattern": "^ProjectAccessPolicy$", "readOnly": true } } } ], - "title": "ProjectAccessPolicy", + "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" } }, - "FunctionStringInput": { + "DAGStringInput": { "allOf": [ { - "$ref": "#/components/schemas/DAGStringInput" + "$ref": "#/components/schemas/DAGGenericInput" }, { "type": "object", "properties": { "type": { "title": "Type", - "default": "FunctionStringInput", - "pattern": "^FunctionStringInput$", + "default": "DAGStringInput", + "pattern": "^DAGStringInput$", "type": "string", "readOnly": true } } } ], - "title": "FunctionStringInput", + "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" } }, - "FunctionPathOutput": { + "DAGIntegerInput": { "allOf": [ { - "$ref": "#/components/schemas/PathOutput" + "$ref": "#/components/schemas/GenericInput" }, { "type": "object", "properties": { - "type": { - "title": "Type", - "default": "FunctionPathOutput", - "pattern": "^FunctionPathOutput$", - "type": "string", - "readOnly": true - } - } - } - ], - "title": "FunctionPathOutput", - "description": "Function Path output.", - "discriminator": { - "propertyName": "type" - } - }, - "DependencyKind": { - "title": "DependencyKind", - "description": "Dependency kind.", - "enum": [ - "recipe", - "plugin" - ], - "type": "string" - }, - "Dependency": { - "allOf": [ - { - "$ref": "#/components/schemas/_OpenAPIGenBaseModel" - }, - { - "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", - "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" - }, - "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": "Dependency", - "pattern": "^Dependency$", - "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" - } - }, - "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" + "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": "An optional alias to refer to this dependency. Useful if the name is already used somewhere else.", - "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" - } - }, - "ProductFamily": { - "allOf": [ - { - "$ref": "#/components/schemas/Product" - }, - { - "type": "object", - "required": [ - "prices" - ], - "properties": { - "prices": { - "title": "Prices", + "description": "A list of aliases for this input in different platforms.", "type": "array", "items": { - "$ref": "#/components/schemas/Price" + "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": "ProductFamily", + "default": "DAGIntegerInput", + "pattern": "^DAGIntegerInput$", "type": "string", - "pattern": "^ProductFamily$", "readOnly": true } } } ], - "title": "ProductFamily", + "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" } }, - "DailyUsage": { + "DAGNumberInput": { "allOf": [ { - "$ref": "#/components/schemas/_OpenAPIGenBaseModel" + "$ref": "#/components/schemas/GenericInput" }, { "type": "object", "properties": { - "date": { - "title": "Date", - "description": "The day this usage was aggregated for", - "type": "string", - "format": "date-time" - }, - "cpu": { - "title": "Cpu", - "description": "cpu usage", - "default": 0, + "default": { + "title": "Default", + "description": "Default value to use for an input if a value was not supplied.", "type": "number", "format": "double" }, - "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" }, "type": { "title": "Type", - "default": "DailyUsage", + "default": "DAGNumberInput", + "pattern": "^DAGNumberInput$", "type": "string", - "pattern": "^DailyUsage$", "readOnly": true } - }, - "required": [ - "date" - ] + } } ], - "title": "DailyUsage", + "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" } }, - "Usage": { + "DAGFolderInput": { "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" - }, - "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" + "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" + } + ] }, - "daily_usage": { - "title": "Daily Usage", - "description": "daily breakdown of usage", - "default": [], + "alias": { + "title": "Alias", + "description": "A list of aliases for this input in different platforms.", "type": "array", "items": { - "$ref": "#/components/schemas/DailyUsage" + "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": "Usage", - "type": "string", - "pattern": "^Usage$", - "readOnly": true - } - }, - "required": [ - "start", - "end" - ] - } - ], - "title": "Usage", - "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": {} + "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": "DAGFolderInput", + "pattern": "^DAGFolderInput$", "type": "string", "readOnly": true } } } ], - "title": "ValueListReference", - "description": "A reference to a fixed value.", + "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" } }, - "UserCreate": { + "DAGPathInput": { "allOf": [ { - "$ref": "#/components/schemas/UserUpdate" + "$ref": "#/components/schemas/GenericInput" }, { "type": "object", - "required": [ - "username" - ], "properties": { - "username": { - "title": "Username", - "description": "The unique name of the user in small case without spaces", - "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" + } + ] + }, + "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" + } }, "type": { "title": "Type", - "default": "UserCreate", + "default": "DAGPathInput", + "pattern": "^DAGPathInput$", "type": "string", - "pattern": "^UserCreate$", "readOnly": true } } } ], - "title": "UserCreate", + "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" } }, - "FunctionIntegerOutput": { + "DAGArrayInput": { "allOf": [ { - "$ref": "#/components/schemas/FunctionStringOutput" + "$ref": "#/components/schemas/GenericInput" }, { "type": "object", "properties": { - "type": { - "title": "Type", - "default": "FunctionIntegerOutput", - "pattern": "^FunctionIntegerOutput$", - "type": "string", - "readOnly": true - } - } - } - ], - "title": "FunctionIntegerOutput", - "description": "Function integer output.\n\nThis output loads the content from a file as an integer.", - "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" - }, + "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/ProjectFolder" + "$ref": "#/components/schemas/ItemType" } ] }, "type": { "title": "Type", - "default": "StepPathOutput", - "pattern": "^StepPathOutput$", - "type": "string", - "readOnly": true - } - } - } - ], - "title": "StepPathOutput", - "description": "A file or a folder output.", - "discriminator": { - "propertyName": "type" - } - }, - "InputFileReference": { - "allOf": [ - { - "$ref": "#/components/schemas/_InputReferenceBase" - }, - { - "type": "object", - "properties": { - "type": { - "title": "Type", - "default": "InputFileReference", - "pattern": "^InputFileReference$", + "default": "DAGArrayInput", + "pattern": "^DAGArrayInput$", "type": "string", "readOnly": true } } } ], - "title": "InputFileReference", - "description": "An input file reference", + "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" } }, - "InputFolderReference": { + "DAGJSONObjectInput": { "allOf": [ { - "$ref": "#/components/schemas/_InputReferenceBase" + "$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": "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", + "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": "InputFolderReference", - "pattern": "^InputFolderReference$", + "default": "DAGJSONObjectInput", + "pattern": "^DAGJSONObjectInput$", "type": "string", "readOnly": true } } } ], - "title": "InputFolderReference", - "description": "An input folder reference", + "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" } }, - "InputPathReference": { + "DAGGenericOutput": { "allOf": [ { - "$ref": "#/components/schemas/_InputReferenceBase" + "$ref": "#/components/schemas/FromOutput" }, { "type": "object", "properties": { + "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": "InputPathReference", - "pattern": "^InputPathReference$", + "default": "DAGGenericOutput", + "pattern": "^DAGGenericOutput$", "type": "string", "readOnly": true } } } ], - "title": "InputPathReference", - "description": "An input file or folder reference", + "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" } }, - "TaskFileReference": { + "DAGStringOutput": { "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.", - "discriminator": { - "propertyName": "type" - } - }, - "TaskFolderReference": { - "allOf": [ - { - "$ref": "#/components/schemas/_TaskReferenceBase" + "$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": "TaskFolderReference", - "pattern": "^TaskFolderReference$", + "default": "DAGStringOutput", + "pattern": "^DAGStringOutput$", "type": "string", "readOnly": true } } } ], - "title": "TaskFolderReference", - "description": "A reference to a folder that is generated in a task.", + "title": "DAGStringOutput", + "description": "DAG string output.\n\nThis output loads the content from a file as a string.", "discriminator": { "propertyName": "type" } }, - "TaskPathReference": { + "DAGNumberOutput": { "allOf": [ { - "$ref": "#/components/schemas/_TaskReferenceBase" + "$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": "TaskPathReference", - "pattern": "^TaskPathReference$", + "default": "DAGNumberOutput", + "pattern": "^DAGNumberOutput$", "type": "string", "readOnly": true } } } ], - "title": "TaskPathReference", - "description": "A reference to a file or folder that is generated in a task.", + "title": "DAGNumberOutput", + "description": "DAG number output.\n\nThis output loads the content from a file as a floating number.", "discriminator": { "propertyName": "type" } }, - "ValueFileReference": { + "DAGBooleanOutput": { "allOf": [ { - "$ref": "#/components/schemas/_BaseReference" + "$ref": "#/components/schemas/GenericOutput" }, { "type": "object", "required": [ - "path" + "from" ], "properties": { - "path": { - "title": "Path", - "description": "A fixed value for this reference.", - "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": "ValueFileReference", - "pattern": "^ValueFileReference$", + "default": "DAGBooleanOutput", + "pattern": "^DAGBooleanOutput$", "type": "string", "readOnly": true } } } ], - "title": "ValueFileReference", - "description": "A reference to a fixed file.", + "title": "DAGBooleanOutput", + "description": "DAG boolean output.\n\nThis output loads the content from a file as a boolean.", "discriminator": { "propertyName": "type" } }, - "ValueFolderReference": { + "DAGFolderOutput": { "allOf": [ { - "$ref": "#/components/schemas/ValueFileReference" + "$ref": "#/components/schemas/GenericOutput" }, { "type": "object", + "required": [ + "from" + ], "properties": { - "type": { - "title": "Type", - "default": "ValueFolderReference", - "pattern": "^ValueFolderReference$", - "type": "string", - "readOnly": true - } - } - } - ], - "title": "ValueFolderReference", - "description": "A reference to a fixed folder.", - "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" - }, "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.", + "description": "Reference to a folder or a task output. Task output must be folder.", "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/TaskReference" }, { - "$ref": "#/components/schemas/ValueFolderReference" + "$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": "TaskPathArgument", - "pattern": "^TaskPathArgument$", + "default": "DAGFolderOutput", + "pattern": "^DAGFolderOutput$", "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": "TaskPathArgument", - "description": "BaseModel with functionality to return the object as a yaml string.", + "title": "DAGFolderOutput", + "description": "DAG folder output.", "discriminator": { "propertyName": "type" } }, - "DAGTaskLoop": { + "DAGPathOutput": { "allOf": [ { - "$ref": "#/components/schemas/_OpenAPIGenBaseModel" + "$ref": "#/components/schemas/GenericOutput" }, { "type": "object", + "required": [ + "from" + ], "properties": { - "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).", + "description": "Reference to a file, folder or a task output. Task output must either be a file or a folder.", "anyOf": [ { - "$ref": "#/components/schemas/InputReference" + "$ref": "#/components/schemas/TaskReference" }, { - "$ref": "#/components/schemas/TaskReference" + "$ref": "#/components/schemas/FileReference" }, { - "$ref": "#/components/schemas/ValueListReference" + "$ref": "#/components/schemas/FolderReference" } ] - } - } - } - ], - "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": { + }, + "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": "TaskReturn", - "pattern": "^TaskReturn$", + "default": "DAGPathOutput", + "pattern": "^DAGPathOutput$", "type": "string", "readOnly": true } } } ], - "title": "TaskReturn", - "description": "A Task return output that exposes the values from a function or a DAG.", + "title": "DAGPathOutput", + "description": "DAG path output.", "discriminator": { "propertyName": "type" } }, - "DAGTask": { + "DAGArrayOutput": { "allOf": [ { - "$ref": "#/components/schemas/_OpenAPIGenBaseModel" + "$ref": "#/components/schemas/GenericOutput" }, { "type": "object", + "required": [ + "from" + ], "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" + "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": "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.", + "alias": { + "title": "Alias", + "description": "A list of additional processes for loading this output on different platforms.", "type": "array", "items": { "anyOf": [ { - "$ref": "#/components/schemas/TaskArgument" + "$ref": "#/components/schemas/DAGGenericOutputAlias" }, { - "$ref": "#/components/schemas/TaskPathArgument" + "$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" } ] } }, - "loop": { - "title": "Loop", - "description": "Loop configuration for this task.", + "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", "allOf": [ { - "$ref": "#/components/schemas/DAGTaskLoop" + "$ref": "#/components/schemas/ItemType" } ] }, - "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": "DAGArrayOutput", + "pattern": "^DAGArrayOutput$", + "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.", + "discriminator": { + "propertyName": "type" + } + }, + "DAGJSONObjectOutput": { + "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" + } + ] }, - "returns": { - "title": "Returns", - "description": "List of task returns.", + "alias": { + "title": "Alias", + "description": "A list of additional processes for loading this output on different platforms.", "type": "array", "items": { "anyOf": [ { - "$ref": "#/components/schemas/TaskReturn" + "$ref": "#/components/schemas/DAGGenericOutputAlias" }, { - "$ref": "#/components/schemas/TaskPathReturn" + "$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": "DAGJSONObjectOutput", + "pattern": "^DAGJSONObjectOutput$", + "type": "string", + "readOnly": true } - }, - "required": [ - "name", - "template" - ] + } } ], - "title": "DAGTask", - "description": "A single task in a DAG flow.", + "title": "DAGJSONObjectOutput", + "description": "DAG object output.\n\nThis output loads the content from a file as a JSON object.", "discriminator": { "propertyName": "type" } }, - "DAG": { + "RecipeInterface": { "allOf": [ { "$ref": "#/components/schemas/_OpenAPIGenBaseModel" }, { "type": "object", - "required": [ - "name", - "tasks" - ], "properties": { - "name": { - "title": "Name", - "description": "A unique name for this dag.", - "type": "string" + "metadata": { + "title": "Metadata", + "description": "Recipe metadata information.", + "allOf": [ + { + "$ref": "#/components/schemas/MetaData" + } + ] }, - "tasks": { - "title": "Tasks", - "description": "Tasks are a list of DAG steps", - "type": "array", - "items": { - "$ref": "#/components/schemas/DAGTask" - } + "type": { + "title": "Type", + "default": "RecipeInterface", + "pattern": "^RecipeInterface$", + "type": "string", + "readOnly": true }, "annotations": { "title": "Annotations", @@ -14798,9 +15267,21 @@ "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": "Inputs for the DAG.", + "description": "A list of recipe inputs.", "type": "array", "items": { "anyOf": [ @@ -14839,7 +15320,7 @@ }, "outputs": { "title": "Outputs", - "description": "Outputs of the DAG that can be used by other DAGs.", + "description": "A list of recipe outputs.", "type": "array", "items": { "anyOf": [ @@ -14875,594 +15356,485 @@ } ] } - }, - "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": "DAG", - "pattern": "^DAG$", - "type": "string", - "readOnly": true } - } + }, + "required": [ + "metadata" + ] } ], - "title": "DAG", - "description": "A Directed Acyclic Graph containing a list of tasks.", + "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" } }, - "FunctionIntegerInput": { + "RecipePackage": { "allOf": [ { - "$ref": "#/components/schemas/GenericInput" + "$ref": "#/components/schemas/RepositoryPackage" }, { "type": "object", + "required": [ + "manifest" + ], "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" + "manifest": { + "$ref": "#/components/schemas/RecipeInterface" }, "type": { "title": "Type", - "default": "FunctionIntegerInput", - "pattern": "^FunctionIntegerInput$", + "default": "RecipePackage", "type": "string", + "pattern": "^RecipePackage$", "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": "RecipePackage", "discriminator": { "propertyName": "type" } }, - "FunctionNumberInput": { + "PaymentCreate": { "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": "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" + "description": { + "title": "Description", + "description": "The description of this payment method", + "type": "string" }, "type": { "title": "Type", - "default": "FunctionNumberInput", - "pattern": "^FunctionNumberInput$", + "default": "PaymentCreate", "type": "string", + "pattern": "^PaymentCreate$", "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": "PaymentCreate", "discriminator": { "propertyName": "type" } }, - "FunctionBooleanInput": { + "ValueFolderReference": { "allOf": [ { - "$ref": "#/components/schemas/GenericInput" + "$ref": "#/components/schemas/ValueFileReference" }, { "type": "object", "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.", - "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": "FunctionBooleanInput", - "pattern": "^FunctionBooleanInput$", + "default": "ValueFolderReference", + "pattern": "^ValueFolderReference$", "type": "string", "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": "ValueFolderReference", + "description": "A reference to a fixed folder.", "discriminator": { "propertyName": "type" } }, - "FunctionFolderInput": { + "Team": { "allOf": [ { - "$ref": "#/components/schemas/GenericInput" + "$ref": "#/components/schemas/TeamUpdate" }, { "type": "object", "required": [ - "path" + "id", + "slug" ], "properties": { - "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.", + "id": { + "title": "Id", + "description": "The team ID", + "example": "142ee933-6110-4186-92ab-92df359aa108", "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" - } - ] + "slug": { + "title": "Slug", + "description": "The public slug of the team", + "example": "ladybug-tools/honeybee-contributors", + "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" + "member_count": { + "title": "Member Count", + "description": "The number of members that are part of this team", + "default": 0, + "example": 5, + "type": "integer", + "format": "int32" }, "type": { "title": "Type", - "default": "FunctionFolderInput", - "pattern": "^FunctionFolderInput$", + "default": "Team", "type": "string", + "pattern": "^Team$", "readOnly": true } } } ], - "title": "FunctionFolderInput", - "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": "Team", "discriminator": { "propertyName": "type" } }, - "FunctionFileInput": { + "TeamList": { "allOf": [ { - "$ref": "#/components/schemas/GenericInput" + "$ref": "#/components/schemas/_OpenAPIGenBaseModel" }, { "type": "object", "required": [ - "path" + "page", + "per_page", + "page_count", + "total_count", + "resources" ], "properties": { - "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" + "page": { + "title": "Page", + "description": "The current page the pagination request is on", + "type": "integer", + "format": "int32" }, - "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" - } - ] + "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.", + "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/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" - } - ] + "$ref": "#/components/schemas/Team" } }, - "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" + "next_page": { + "title": "Next Page", + "description": "The next page, if this on is not the last", + "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" + "type": { + "title": "Type", + "default": "TeamList", + "type": "string", + "pattern": "^TeamList$", + "readOnly": true + } + } + } + ], + "title": "TeamList", + "description": "A list response from a pagination request", + "discriminator": { + "propertyName": "type" + } + }, + "ResourcesDuration": { + "allOf": [ + { + "$ref": "#/components/schemas/_OpenAPIGenBaseModel" + }, + { + "type": "object", + "properties": { + "cpu": { + "title": "Cpu", + "default": 0, + "type": "integer", + "format": "int32" }, - "extensions": { - "title": "Extensions", - "description": "Optional list of extensions for file. The check for extension is case-insensitive.", - "type": "array", - "items": { - "type": "string" - } + "memory": { + "title": "Memory", + "default": 0, + "type": "integer", + "format": "int32" }, "type": { "title": "Type", - "default": "FunctionFileInput", - "pattern": "^FunctionFileInput$", + "default": "ResourcesDuration", "type": "string", + "pattern": "^ResourcesDuration$", "readOnly": true } } } ], - "title": "FunctionFileInput", - "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": "ResourcesDuration", "discriminator": { "propertyName": "type" } }, - "FunctionPathInput": { + "RunProgress": { "allOf": [ { - "$ref": "#/components/schemas/GenericInput" + "$ref": "#/components/schemas/_OpenAPIGenBaseModel" }, { "type": "object", - "required": [ - "path" - ], "properties": { - "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" + "completed": { + "title": "Completed", + "default": 0, + "type": "integer", + "format": "int32" }, - "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" - } - ] + "running": { + "title": "Running", + "default": 0, + "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" - } - ] - } + "total": { + "title": "Total", + "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" + "type": { + "title": "Type", + "default": "RunProgress", + "type": "string", + "pattern": "^RunProgress$", + "readOnly": true + } + } + } + ], + "title": "RunProgress", + "discriminator": { + "propertyName": "type" + } + }, + "RunMeta": { + "allOf": [ + { + "$ref": "#/components/schemas/_OpenAPIGenBaseModel" + }, + { + "type": "object", + "properties": { + "resources_duration": { + "title": "Resources Duration", + "description": "resource usage", + "default": { + "cpu": 0, + "memory": 0 + }, + "allOf": [ + { + "$ref": "#/components/schemas/ResourcesDuration" + } + ] }, - "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" + "progress": { + "title": "Progress", + "description": "progress of the run", + "default": { + "completed": 0, + "running": 0, + "total": 0 + }, + "allOf": [ + { + "$ref": "#/components/schemas/RunProgress" + } + ] }, - "extensions": { - "title": "Extensions", - "description": "Optional list of extensions for file. The check for extension is case-insensitive.", - "type": "array", - "items": { + "type": { + "title": "Type", + "default": "RunMeta", + "type": "string", + "pattern": "^RunMeta$", + "readOnly": true + } + } + } + ], + "title": "RunMeta", + "discriminator": { + "propertyName": "type" + } + }, + "InputFolderReference": { + "allOf": [ + { + "$ref": "#/components/schemas/_InputReferenceBase" + }, + { + "type": "object", + "properties": { + "type": { + "title": "Type", + "default": "InputFolderReference", + "pattern": "^InputFolderReference$", + "type": "string", + "readOnly": true + } + } + } + ], + "title": "InputFolderReference", + "description": "An input folder reference", + "discriminator": { + "propertyName": "type" + } + }, + "Location": { + "allOf": [ + { + "$ref": "#/components/schemas/CryptlexBase" + }, + { + "type": "object", + "properties": { + "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": "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" + }, + "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": "FunctionPathInput", - "pattern": "^FunctionPathInput$", + "default": "APIToken", + "type": "string", + "pattern": "^APIToken$", + "readOnly": true + } + }, + "required": [ + "token_id", + "name" + ] + } + ], + "title": "APIToken", + "discriminator": { + "propertyName": "type" + } + }, + "FunctionStringInput": { + "allOf": [ + { + "$ref": "#/components/schemas/DAGStringInput" + }, + { + "type": "object", + "properties": { + "type": { + "title": "Type", + "default": "FunctionStringInput", + "pattern": "^FunctionStringInput$", "type": "string", "readOnly": true } } } ], - "title": "FunctionPathInput", - "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": "FunctionStringInput", + "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" } }, - "FunctionArrayInput": { + "FunctionNumberInput": { "allOf": [ { "$ref": "#/components/schemas/GenericInput" @@ -15473,8 +15845,8 @@ "default": { "title": "Default", "description": "Default value to use for an input if a value was not supplied.", - "type": "array", - "items": {} + "type": "number", + "format": "double" }, "alias": { "title": "Alias", @@ -15529,32 +15901,23 @@ "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": "FunctionArrayInput", - "pattern": "^FunctionArrayInput$", + "default": "FunctionNumberInput", + "pattern": "^FunctionNumberInput$", "type": "string", "readOnly": true } } } ], - "title": "FunctionArrayInput", - "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": "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" } }, - "FunctionJSONObjectInput": { + "FunctionBooleanInput": { "allOf": [ { "$ref": "#/components/schemas/GenericInput" @@ -15565,7 +15928,7 @@ "default": { "title": "Default", "description": "Default value to use for an input if a value was not supplied.", - "type": "object" + "type": "boolean" }, "alias": { "title": "Alias", @@ -15622,439 +15985,440 @@ }, "type": { "title": "Type", - "default": "FunctionJSONObjectInput", - "pattern": "^FunctionJSONObjectInput$", - "type": "string", - "readOnly": true - } - } - } - ], - "title": "FunctionJSONObjectInput", - "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" - } - }, - "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" - } - }, - "FunctionNumberOutput": { - "allOf": [ - { - "$ref": "#/components/schemas/FunctionStringOutput" - }, - { - "type": "object", - "properties": { - "type": { - "title": "Type", - "default": "FunctionNumberOutput", - "pattern": "^FunctionNumberOutput$", + "default": "FunctionBooleanInput", + "pattern": "^FunctionBooleanInput$", "type": "string", "readOnly": true } } } ], - "title": "FunctionNumberOutput", - "description": "Function number output.\n\nThis output loads the content from a file as a floating number.", + "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" } }, - "FunctionBooleanOutput": { + "FunctionFolderInput": { "allOf": [ { - "$ref": "#/components/schemas/FunctionStringOutput" + "$ref": "#/components/schemas/GenericInput" }, { "type": "object", + "required": [ + "path" + ], "properties": { + "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" + }, + "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" + }, "type": { "title": "Type", - "default": "FunctionBooleanOutput", - "pattern": "^FunctionBooleanOutput$", + "default": "FunctionFolderInput", + "pattern": "^FunctionFolderInput$", "type": "string", "readOnly": true } } } ], - "title": "FunctionBooleanOutput", - "description": "Function boolean output.\n\nThis output loads the content from a file as a boolean.", + "title": "FunctionFolderInput", + "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" } }, - "FunctionFolderOutput": { + "FunctionFileInput": { "allOf": [ { - "$ref": "#/components/schemas/PathOutput" + "$ref": "#/components/schemas/GenericInput" }, { "type": "object", + "required": [ + "path" + ], "properties": { + "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" + }, + "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" + }, + "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": "FunctionFolderOutput", - "pattern": "^FunctionFolderOutput$", + "default": "FunctionFileInput", + "pattern": "^FunctionFileInput$", "type": "string", "readOnly": true } } } ], - "title": "FunctionFolderOutput", - "description": "Function Folder output.", + "title": "FunctionFileInput", + "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" } }, - "FunctionFileOutput": { + "FunctionPathInput": { "allOf": [ { - "$ref": "#/components/schemas/PathOutput" + "$ref": "#/components/schemas/GenericInput" }, { "type": "object", + "required": [ + "path" + ], "properties": { - "type": { - "title": "Type", - "default": "FunctionFileOutput", - "pattern": "^FunctionFileOutput$", - "type": "string", - "readOnly": true - } - } - } - ], - "title": "FunctionFileOutput", - "description": "Function File output.", - "discriminator": { - "propertyName": "type" - } - }, - "FunctionArrayOutput": { - "allOf": [ - { - "$ref": "#/components/schemas/FunctionStringOutput" - }, - { - "type": "object", - "properties": { - "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": "FunctionArrayOutput", - "pattern": "^FunctionArrayOutput$", - "type": "string", - "readOnly": true - } - } - } - ], - "title": "FunctionArrayOutput", - "description": "Function array output.\n\nThis output loads the content from a JSON file which must be a JSON Array.", - "discriminator": { - "propertyName": "type" - } - }, - "FunctionJSONObjectOutput": { - "allOf": [ - { - "$ref": "#/components/schemas/FunctionStringOutput" - }, - { - "type": "object", - "properties": { - "type": { - "title": "Type", - "default": "FunctionJSONObjectOutput", - "pattern": "^FunctionJSONObjectOutput$", - "type": "string", - "readOnly": true - } - } - } - ], - "title": "FunctionJSONObjectOutput", - "description": "Function object output.\n\nThis output loads the content from a file as a JSON object.", - "discriminator": { - "propertyName": "type" - } - }, - "TemplateFunction": { - "allOf": [ - { - "$ref": "#/components/schemas/_OpenAPIGenBaseModel" - }, - { - "type": "object", - "required": [ - "name", - "command", - "config" - ], - "properties": { - "name": { - "title": "Name", - "description": "Function name. Must be unique within a plugin.", - "type": "string" - }, - "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 |", + "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" }, - "config": { - "title": "Config", - "description": "The plugin config to use for this function", - "allOf": [ + "default": { + "title": "Default", + "description": "The default source for file if the value is not provided.", + "anyOf": [ { - "$ref": "#/components/schemas/PluginConfig" + "$ref": "#/components/schemas/HTTP" + }, + { + "$ref": "#/components/schemas/S3" + }, + { + "$ref": "#/components/schemas/ProjectFolder" } ] }, - "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": "Input arguments for this function.", + "alias": { + "title": "Alias", + "description": "A list of aliases for this input in different platforms.", "type": "array", "items": { "anyOf": [ { - "$ref": "#/components/schemas/FunctionStringInput" + "$ref": "#/components/schemas/DAGGenericInputAlias" }, { - "$ref": "#/components/schemas/FunctionIntegerInput" + "$ref": "#/components/schemas/DAGStringInputAlias" }, { - "$ref": "#/components/schemas/FunctionNumberInput" + "$ref": "#/components/schemas/DAGIntegerInputAlias" }, { - "$ref": "#/components/schemas/FunctionBooleanInput" + "$ref": "#/components/schemas/DAGNumberInputAlias" }, { - "$ref": "#/components/schemas/FunctionFolderInput" + "$ref": "#/components/schemas/DAGBooleanInputAlias" }, { - "$ref": "#/components/schemas/FunctionFileInput" + "$ref": "#/components/schemas/DAGFolderInputAlias" }, { - "$ref": "#/components/schemas/FunctionPathInput" + "$ref": "#/components/schemas/DAGFileInputAlias" }, { - "$ref": "#/components/schemas/FunctionArrayInput" + "$ref": "#/components/schemas/DAGPathInputAlias" }, { - "$ref": "#/components/schemas/FunctionJSONObjectInput" + "$ref": "#/components/schemas/DAGArrayInputAlias" + }, + { + "$ref": "#/components/schemas/DAGJSONObjectInputAlias" + }, + { + "$ref": "#/components/schemas/DAGLinkedInputAlias" } ] } }, - "outputs": { - "title": "Outputs", - "description": "List of output arguments.", + "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": "FunctionPathInput", + "pattern": "^FunctionPathInput$", + "type": "string", + "readOnly": true + } + } + } + ], + "title": "FunctionPathInput", + "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" + } + }, + "FunctionArrayInput": { + "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": "array", + "items": {} + }, + "alias": { + "title": "Alias", + "description": "A list of aliases for this input in different platforms.", "type": "array", "items": { "anyOf": [ { - "$ref": "#/components/schemas/FunctionStringOutput" + "$ref": "#/components/schemas/DAGGenericInputAlias" }, { - "$ref": "#/components/schemas/FunctionIntegerOutput" + "$ref": "#/components/schemas/DAGStringInputAlias" }, { - "$ref": "#/components/schemas/FunctionNumberOutput" + "$ref": "#/components/schemas/DAGIntegerInputAlias" }, { - "$ref": "#/components/schemas/FunctionBooleanOutput" + "$ref": "#/components/schemas/DAGNumberInputAlias" }, { - "$ref": "#/components/schemas/FunctionFolderOutput" + "$ref": "#/components/schemas/DAGBooleanInputAlias" }, { - "$ref": "#/components/schemas/FunctionFileOutput" + "$ref": "#/components/schemas/DAGFolderInputAlias" }, { - "$ref": "#/components/schemas/FunctionPathOutput" + "$ref": "#/components/schemas/DAGFileInputAlias" }, { - "$ref": "#/components/schemas/FunctionArrayOutput" + "$ref": "#/components/schemas/DAGPathInputAlias" }, { - "$ref": "#/components/schemas/FunctionJSONObjectOutput" + "$ref": "#/components/schemas/DAGArrayInputAlias" + }, + { + "$ref": "#/components/schemas/DAGJSONObjectInputAlias" + }, + { + "$ref": "#/components/schemas/DAGLinkedInputAlias" } ] } }, - "description": { - "title": "Description", - "description": "Function description. A short human readable description for this function.", - "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" + }, + "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": "TemplateFunction", - "pattern": "^TemplateFunction$", + "default": "FunctionArrayInput", + "pattern": "^FunctionArrayInput$", "type": "string", "readOnly": true } } } ], - "title": "TemplateFunction", - "description": "Function template.", + "title": "FunctionArrayInput", + "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" } }, - "BakedRecipe": { - "allOf": [ - { - "$ref": "#/components/schemas/_OpenAPIGenBaseModel" - }, - { - "type": "object", - "required": [ - "flow", - "digest", - "templates" - ], - "properties": { - "flow": { - "title": "Flow", - "description": "A list of tasks to create a DAG recipe.", - "type": "array", - "items": { - "$ref": "#/components/schemas/DAG" - } - }, - "digest": { - "title": "Digest", - "type": "string" - }, - "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" - }, - "metadata": { - "title": "Metadata", - "description": "Recipe metadata information.", - "allOf": [ - { - "$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" - } - }, - "type": { - "title": "Type", - "default": "BakedRecipe", - "pattern": "^BakedRecipe$", - "type": "string", - "readOnly": true - } - } - } - ], - "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" - } - }, - "StepArrayInput": { + "FunctionJSONObjectInput": { "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": {} + "type": "object" }, "alias": { "title": "Alias", @@ -16109,538 +16473,347 @@ "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$", + "default": "FunctionJSONObjectInput", + "pattern": "^FunctionJSONObjectInput$", "type": "string", "readOnly": true } } } ], - "title": "StepArrayInput", - "description": "A JSON array input.", + "title": "FunctionJSONObjectInput", + "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" } }, - "SubscriptionItemPublic": { + "FunctionStringOutput": { "allOf": [ { - "$ref": "#/components/schemas/SubscriptionItem" + "$ref": "#/components/schemas/FunctionFileOutput" }, { "type": "object", "properties": { "type": { "title": "Type", - "default": "SubscriptionItemPublic", + "default": "FunctionStringOutput", + "pattern": "^FunctionStringOutput$", "type": "string", - "pattern": "^SubscriptionItemPublic$", "readOnly": true } } } ], - "title": "SubscriptionItemPublic", + "title": "FunctionStringOutput", + "description": "Function string output.\n\nThis output loads the content from a file as a string.", "discriminator": { "propertyName": "type" } }, - "SubscriptionItemPublicList": { + "FunctionIntegerOutput": { "allOf": [ { - "$ref": "#/components/schemas/_OpenAPIGenBaseModel" + "$ref": "#/components/schemas/FunctionStringOutput" }, { "type": "object", - "required": [ - "has_more", - "data" - ], "properties": { - "has_more": { - "title": "Has More", - "type": "boolean" - }, - "data": { - "title": "Data", - "type": "array", - "items": { - "$ref": "#/components/schemas/SubscriptionItemPublic" - } - }, "type": { "title": "Type", - "default": "SubscriptionItemPublicList", + "default": "FunctionIntegerOutput", + "pattern": "^FunctionIntegerOutput$", "type": "string", - "pattern": "^SubscriptionItemPublicList$", "readOnly": true } } } ], - "title": "SubscriptionItemPublicList", + "title": "FunctionIntegerOutput", + "description": "Function integer output.\n\nThis output loads the content from a file as an integer.", "discriminator": { "propertyName": "type" } }, - "Invoice": { + "FunctionNumberOutput": { "allOf": [ { - "$ref": "#/components/schemas/InvoicePreview" + "$ref": "#/components/schemas/FunctionStringOutput" }, { "type": "object", "properties": { "type": { "title": "Type", - "default": "Invoice", + "default": "FunctionNumberOutput", + "pattern": "^FunctionNumberOutput$", "type": "string", - "pattern": "^Invoice$", "readOnly": true } } } ], - "title": "Invoice", + "title": "FunctionNumberOutput", + "description": "Function number output.\n\nThis output loads the content from a file as a floating number.", "discriminator": { "propertyName": "type" } }, - "TeamRoleEnum": { - "title": "TeamRoleEnum", - "description": "An enumeration.", - "enum": [ - "owner", - "member" - ], - "type": "string" - }, - "TeamMember": { + "FunctionBooleanOutput": { "allOf": [ { - "$ref": "#/components/schemas/_OpenAPIGenBaseModel" + "$ref": "#/components/schemas/FunctionStringOutput" }, { "type": "object", "properties": { - "user": { - "title": "User", - "description": "The team member", - "allOf": [ - { - "$ref": "#/components/schemas/UserPublic" - } - ] - }, - "role": { - "description": "The role the user has within the team", - "example": "member", - "allOf": [ - { - "$ref": "#/components/schemas/TeamRoleEnum" - } - ] - }, "type": { "title": "Type", - "default": "TeamMember", + "default": "FunctionBooleanOutput", + "pattern": "^FunctionBooleanOutput$", "type": "string", - "pattern": "^TeamMember$", "readOnly": true } - }, - "required": [ - "user", - "role" - ] + } } ], - "title": "TeamMember", + "title": "FunctionBooleanOutput", + "description": "Function boolean output.\n\nThis output loads the content from a file as a boolean.", "discriminator": { "propertyName": "type" } }, - "LicenseType": { - "title": "LicenseType", - "description": "An enumeration.", - "enum": [ - "node-locked", - "hosted-floating", - "on-premise-floating" - ], - "type": "string" - }, - "Metadata": { + "FunctionFileOutput": { "allOf": [ { - "$ref": "#/components/schemas/CryptlexBase" + "$ref": "#/components/schemas/PathOutput" }, { "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": "Metadata", + "default": "FunctionFileOutput", + "pattern": "^FunctionFileOutput$", "type": "string", - "pattern": "^Metadata$", "readOnly": true } } } ], - "title": "Metadata", + "title": "FunctionFileOutput", + "description": "Function File output.", "discriminator": { "propertyName": "type" } }, - "LicensePublic": { + "FunctionPathOutput": { "allOf": [ { - "$ref": "#/components/schemas/License" + "$ref": "#/components/schemas/PathOutput" }, { "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": { - "id": { - "title": "Id", - "type": "string" - }, - "created_at": { - "title": "Created At", - "type": "string", - "format": "date-time" - }, - "updated_at": { - "title": "Updated At", - "type": "string", - "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", + "title": "Type", + "default": "FunctionPathOutput", + "pattern": "^FunctionPathOutput$", + "type": "string", "readOnly": true - }, - "notes": { - "title": "Notes", - "type": "string" } } } ], - "title": "LicensePublic", + "title": "FunctionPathOutput", + "description": "Function Path output.", "discriminator": { "propertyName": "type" } }, - "Project": { + "FunctionArrayOutput": { "allOf": [ { - "$ref": "#/components/schemas/ProjectCreate" + "$ref": "#/components/schemas/FunctionStringOutput" }, { "type": "object", - "required": [ - "id", - "owner", - "permissions", - "slug" - ], "properties": { - "id": { - "title": "Id", - "description": "The project ID", - "example": "50bb7fe0-8f19-499e-972e-1ebec8af2c71", - "type": "string" - }, - "owner": { - "title": "Owner", - "description": "The project owner", - "allOf": [ - { - "$ref": "#/components/schemas/AccountPublic" - } - ] - }, - "permissions": { - "$ref": "#/components/schemas/UserPermission" - }, - "slug": { - "title": "Slug", - "description": "The project name in slug format", - "example": "project-falcon", - "type": "string" - }, - "usage": { - "title": "Usage", - "description": "The resource consumption of this project", + "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/Usage" + "$ref": "#/components/schemas/ItemType" } ] }, "type": { "title": "Type", - "default": "Project", - "type": "string", - "pattern": "^Project$", - "readOnly": true - } - } - } - ], - "title": "Project", - "discriminator": { - "propertyName": "type" - } - }, - "ProjectList": { - "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/Project" - } - }, - "next_page": { - "title": "Next Page", - "description": "The next page, if this on is not the last", - "type": "integer", - "format": "int32" - }, - "type": { - "title": "Type", - "default": "ProjectList", + "default": "FunctionArrayOutput", + "pattern": "^FunctionArrayOutput$", "type": "string", - "pattern": "^ProjectList$", "readOnly": true } } } ], - "title": "ProjectList", - "description": "A list response from a pagination request", + "title": "FunctionArrayOutput", + "description": "Function array output.\n\nThis output loads the content from a JSON file which must be a JSON Array.", "discriminator": { "propertyName": "type" } }, - "OrganizationCreate": { + "FunctionJSONObjectOutput": { "allOf": [ { - "$ref": "#/components/schemas/OrganizationUpdate" + "$ref": "#/components/schemas/FunctionStringOutput" }, { "type": "object", "properties": { "type": { "title": "Type", - "default": "OrganizationCreate", + "default": "FunctionJSONObjectOutput", + "pattern": "^FunctionJSONObjectOutput$", "type": "string", - "pattern": "^OrganizationCreate$", "readOnly": true } } } ], - "title": "OrganizationCreate", + "title": "FunctionJSONObjectOutput", + "description": "Function object output.\n\nThis output loads the content from a file as a JSON object.", "discriminator": { "propertyName": "type" } }, - "SubscriptionCreate": { + "Function": { "allOf": [ { "$ref": "#/components/schemas/_OpenAPIGenBaseModel" }, { "type": "object", + "required": [ + "name", + "command" + ], "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" + "name": { + "title": "Name", + "description": "Function name. Must be unique within a plugin.", + "type": "string" + }, + "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" + }, + "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" } }, - "type": { - "title": "Type", - "default": "SubscriptionCreate", - "type": "string", - "pattern": "^SubscriptionCreate$", - "readOnly": true - } - } + "inputs": { + "title": "Inputs", + "description": "Input arguments for this function.", + "type": "array", + "items": { + "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" + } + ] + } + }, + "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": "Function", + "pattern": "^Function$", + "type": "string", + "readOnly": true + } + } } ], - "title": "SubscriptionCreate", + "title": "Function", + "description": "A Function with a single command", "discriminator": { "propertyName": "type" } }, - "JobStatusEnum": { - "title": "JobStatusEnum", - "description": "Enumaration of allowable status strings", - "enum": [ - "Created", - "Pre-Processing", - "Running", - "Failed", - "Cancelled", - "Completed", - "Unknown" - ], - "type": "string" - }, - "JobStatus": { + "Plugin": { "allOf": [ { "$ref": "#/components/schemas/_OpenAPIGenBaseModel" @@ -16648,21 +16821,36 @@ { "type": "object", "properties": { - "id": { - "title": "Id", - "description": "The ID of the individual job.", - "type": "string" + "metadata": { + "title": "Metadata", + "description": "The Plugin metadata information", + "allOf": [ + { + "$ref": "#/components/schemas/MetaData" + } + ] }, - "started_at": { - "title": "Started At", - "description": "The time at which the job was started", - "type": "string", - "format": "date-time" + "config": { + "title": "Config", + "description": "The configuration information to run this plugin", + "allOf": [ + { + "$ref": "#/components/schemas/PluginConfig" + } + ] + }, + "functions": { + "title": "Functions", + "description": "List of Plugin functions", + "type": "array", + "items": { + "$ref": "#/components/schemas/Function" + } }, "type": { "title": "Type", - "default": "JobStatus", - "pattern": "^JobStatus$", + "default": "Plugin", + "pattern": "^Plugin", "type": "string", "readOnly": true }, @@ -16680,81 +16868,22 @@ "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" + "metadata", + "config", + "functions" ] } ], - "title": "JobStatus", - "description": "Parametric Job Status.", + "title": "Plugin", + "description": "A Queenbee Plugin.\n\nA plugin contains runtime configuration for a Command Line Interface (CLI) and\na list of functions that can be executed using this CLI tool.", "discriminator": { "propertyName": "type" } }, - "JobArgument": { + "NewPluginPackage": { "allOf": [ { "$ref": "#/components/schemas/_OpenAPIGenBaseModel" @@ -16762,44 +16891,40 @@ { "type": "object", "properties": { - "name": { - "title": "Name", - "description": "Argument name. The name must match one of the input names from Job's DAG template.", - "type": "string" + "manifest": { + "title": "Manifest", + "description": "The Plugin manifest to be created", + "allOf": [ + { + "$ref": "#/components/schemas/Plugin" + } + ] }, - "value": { - "title": "Value", - "description": "The value of the job argument." + "readme": { + "title": "Readme", + "description": "The README file to attach to this package", + "default": "", + "type": "string" }, "type": { "title": "Type", - "default": "JobArgument", - "pattern": "^JobArgument$", + "default": "NewPluginPackage", "type": "string", + "pattern": "^NewPluginPackage$", "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" + "manifest" ] } ], - "title": "JobArgument", - "description": "Job argument is an argument input for arguments which are not files or folders.", + "title": "NewPluginPackage", "discriminator": { "propertyName": "type" } }, - "JobPathArgument": { + "NewSubscriptionItem": { "allOf": [ { "$ref": "#/components/schemas/_OpenAPIGenBaseModel" @@ -16807,55 +16932,34 @@ { "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.", - "type": "string" + "price": { + "$ref": "#/components/schemas/Price" }, - "source": { - "title": "Source", - "description": "The path to source the file from.", - "anyOf": [ - { - "$ref": "#/components/schemas/HTTP" - }, - { - "$ref": "#/components/schemas/S3" - }, - { - "$ref": "#/components/schemas/ProjectFolder" - } - ] + "quantity": { + "title": "Quantity", + "type": "integer", + "format": "int32" }, "type": { "title": "Type", - "default": "JobPathArgument", - "pattern": "^JobPathArgument$", + "default": "NewSubscriptionItem", "type": "string", + "pattern": "^NewSubscriptionItem$", "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" + "price", + "quantity" ] } ], - "title": "JobPathArgument", - "description": "BaseModel with functionality to return the object as a yaml string.", + "title": "NewSubscriptionItem", "discriminator": { "propertyName": "type" } }, - "Job": { + "SubscriptionCreate": { "allOf": [ { "$ref": "#/components/schemas/_OpenAPIGenBaseModel" @@ -16863,159 +16967,31 @@ { "type": "object", "properties": { - "source": { - "title": "Source", - "description": "The source url for downloading the recipe.", - "type": "string" - }, - "type": { - "title": "Type", - "default": "Job", - "pattern": "^Job$", - "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" - }, - "arguments": { - "title": "Arguments", - "description": "Input arguments for this job.", + "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": { - "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" + "$ref": "#/components/schemas/NewSubscriptionItem" } - } - }, - "required": [ - "source" - ] - } - ], - "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" - } - }, - "CloudJob": { - "allOf": [ - { - "$ref": "#/components/schemas/_OpenAPIGenBaseModel" - }, - { - "type": "object", - "properties": { - "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": "CloudJob", + "default": "SubscriptionCreate", "type": "string", - "pattern": "^CloudJob$", + "pattern": "^SubscriptionCreate$", "readOnly": true } - }, - "required": [ - "id", - "spec" - ] + } } ], - "title": "CloudJob", + "title": "SubscriptionCreate", "discriminator": { "propertyName": "type" } }, - "CloudJobList": { + "APITokenList": { "allOf": [ { "$ref": "#/components/schemas/_OpenAPIGenBaseModel" @@ -17058,7 +17034,7 @@ "title": "Resources", "type": "array", "items": { - "$ref": "#/components/schemas/CloudJob" + "$ref": "#/components/schemas/APIToken" } }, "next_page": { @@ -17069,604 +17045,562 @@ }, "type": { "title": "Type", - "default": "CloudJobList", + "default": "APITokenList", "type": "string", - "pattern": "^CloudJobList$", + "pattern": "^APITokenList$", "readOnly": true } } } ], - "title": "CloudJobList", + "title": "APITokenList", "description": "A list response from a pagination request", "discriminator": { "propertyName": "type" } }, - "Function": { + "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": [ - "name", - "command" + "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": { - "name": { - "title": "Name", - "description": "Function name. Must be unique within a plugin.", + "amount": { + "title": "Amount", + "type": "integer", + "format": "int32" + }, + "currency": { + "title": "Currency", "type": "string" }, - "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 |", + "description": { + "title": "Description", "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" - } + "period": { + "$ref": "#/components/schemas/Period" }, - "inputs": { - "title": "Inputs", - "description": "Input arguments for this function.", - "type": "array", - "items": { - "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" - } - ] - } + "price": { + "$ref": "#/components/schemas/Price" }, - "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" - } - ] - } + "proration": { + "title": "Proration", + "type": "boolean" }, - "description": { - "title": "Description", - "description": "Function description. A short human readable description for this function.", - "type": "string" + "quantity": { + "title": "Quantity", + "type": "integer", + "format": "int32" }, "type": { "title": "Type", - "default": "Function", - "pattern": "^Function$", "type": "string", "readOnly": true } } } ], - "title": "Function", - "description": "A Function with a single command", + "title": "LineItem", "discriminator": { "propertyName": "type" } }, - "Plugin": { + "LineItemList": { "allOf": [ { "$ref": "#/components/schemas/_OpenAPIGenBaseModel" }, { "type": "object", + "required": [ + "has_more", + "data" + ], "properties": { - "metadata": { - "title": "Metadata", - "description": "The Plugin metadata information", - "allOf": [ - { - "$ref": "#/components/schemas/MetaData" - } - ] - }, - "config": { - "title": "Config", - "description": "The configuration information to run this plugin", - "allOf": [ - { - "$ref": "#/components/schemas/PluginConfig" - } - ] + "has_more": { + "title": "Has More", + "type": "boolean" }, - "functions": { - "title": "Functions", - "description": "List of Plugin functions", + "data": { + "title": "Data", "type": "array", "items": { - "$ref": "#/components/schemas/Function" + "$ref": "#/components/schemas/LineItem" } }, "type": { "title": "Type", - "default": "Plugin", - "pattern": "^Plugin", + "default": "LineItemList", "type": "string", + "pattern": "^LineItemList$", "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" } - }, - "required": [ - "metadata", - "config", - "functions" - ] + } } ], - "title": "Plugin", - "description": "A Queenbee Plugin.\n\nA plugin contains runtime configuration for a Command Line Interface (CLI) and\na list of functions that can be executed using this CLI tool.", + "title": "LineItemList", "discriminator": { "propertyName": "type" } }, - "StepStringInput": { + "CardPublic": { "allOf": [ { - "$ref": "#/components/schemas/FunctionStringInput" + "$ref": "#/components/schemas/_OpenAPIGenBaseModel" }, { "type": "object", - "required": [ - "value" - ], "properties": { - "value": { - "title": "Value", + "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": "StepStringInput", - "pattern": "^StepStringInput$", + "default": "CardPublic", "type": "string", + "pattern": "^CardPublic$", "readOnly": true } - } + }, + "required": [ + "last4", + "exp_month", + "exp_year" + ] } ], - "title": "StepStringInput", - "description": "A String input.", + "title": "CardPublic", "discriminator": { "propertyName": "type" } }, - "RepositoryAccessPolicy": { + "InvoiceStatus": { + "title": "InvoiceStatus", + "description": "An enumeration.", + "enum": [ + "draft", + "open", + "paid", + "uncollectable", + "void" + ], + "type": "string" + }, + "InvoiceStatusTransitions": { "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" - } - ] + "finalized_at": { + "title": "Finalized At", + "type": "string", + "format": "date-time" }, - "permission": { - "description": "The permission given to the subject of the access policy", - "example": "write", - "allOf": [ - { - "$ref": "#/components/schemas/Permission" - } - ] + "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": "RepositoryAccessPolicy", + "default": "InvoiceStatusTransitions", "type": "string", - "pattern": "^RepositoryAccessPolicy$", + "pattern": "^InvoiceStatusTransitions$", "readOnly": true } } } ], - "title": "RepositoryAccessPolicy", + "title": "InvoiceStatusTransitions", "discriminator": { "propertyName": "type" } }, - "RepositoryAccessPolicyList": { + "DiscountAmount": { "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/RepositoryAccessPolicy" - } + "discount": { + "title": "Discount", + "type": "string" }, - "next_page": { - "title": "Next Page", - "description": "The next page, if this on is not the last", + "amount": { + "title": "Amount", "type": "integer", "format": "int32" }, "type": { "title": "Type", - "default": "RepositoryAccessPolicyList", - "type": "string", - "pattern": "^RepositoryAccessPolicyList$", - "readOnly": true - } - } - } - ], - "title": "RepositoryAccessPolicyList", - "description": "A list response from a pagination request", - "discriminator": { - "propertyName": "type" - } - }, - "LicensePoolPolicySubject": { - "allOf": [ - { - "$ref": "#/components/schemas/PolicySubject" - }, - { - "type": "object", - "properties": { - "type": { - "title": "Type", - "default": "LicensePoolPolicySubject", + "default": "DiscountAmount", "type": "string", - "pattern": "^LicensePoolPolicySubject$", + "pattern": "^DiscountAmount$", "readOnly": true } - } + }, + "required": [ + "discount", + "amount" + ] } ], - "title": "LicensePoolPolicySubject", + "title": "DiscountAmount", "discriminator": { "propertyName": "type" } }, - "LicensePoolPolicySubjectList": { + "InvoicePreview": { "allOf": [ { "$ref": "#/components/schemas/_OpenAPIGenBaseModel" }, { "type": "object", + "required": [ + "collection_method", + "currency", + "customer", + "lines", + "period_start", + "period_end", + "status", + "status_transitions", + "subtotal", + "total" + ], "properties": { - "resources": { - "title": "Resources", - "description": "The list of subjects which currently have access to the pool", + "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", + "type": "string" + }, + "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/LicensePoolPolicySubject" + "$ref": "#/components/schemas/DiscountAmount" } }, - "type": { - "title": "Type", - "default": "LicensePoolPolicySubjectList", - "type": "string", - "pattern": "^LicensePoolPolicySubjectList$", - "readOnly": true - } - } - } - ], - "title": "LicensePoolPolicySubjectList", - "discriminator": { - "propertyName": "type" - } - }, - "StepJSONObjectOutput": { - "allOf": [ - { - "$ref": "#/components/schemas/FunctionJSONObjectOutput" - }, - { - "type": "object", - "required": [ - "value" - ], - "properties": { - "value": { - "title": "Value", - "type": "object" + "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": "StepJSONObjectOutput", - "pattern": "^StepJSONObjectOutput$", + "default": "InvoicePreview", "type": "string", + "pattern": "^InvoicePreview$", "readOnly": true } } } ], - "title": "StepJSONObjectOutput", - "description": "A JSON object output.", + "title": "InvoicePreview", "discriminator": { "propertyName": "type" } }, - "APITokenList": { + "Quota": { "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" + "type": { + "description": "The type of resource", + "allOf": [ + { + "$ref": "#/components/schemas/QuotaType" + } + ], + "readOnly": true }, - "page_count": { - "title": "Page Count", - "description": "The total number of pages", - "type": "integer", - "format": "int32" + "owner": { + "title": "Owner", + "description": "The quota owner", + "allOf": [ + { + "$ref": "#/components/schemas/AccountPublic" + } + ] }, - "total_count": { - "title": "Total Count", - "description": "The total number of resources matching the list request", - "type": "integer", - "format": "int32" + "id": { + "title": "Id", + "description": "The unique ID for this Quota", + "type": "string", + "format": "uuid" }, - "resources": { - "title": "Resources", - "type": "array", - "items": { - "$ref": "#/components/schemas/APIToken" - } + "period_start": { + "title": "Period Start", + "description": "The start of the quota usage tracking period", + "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" + "limit": { + "title": "Limit", + "description": "The maximum amount of a resource the account can consume", + "type": "number", + "format": "double" }, - "type": { - "title": "Type", - "default": "APITokenList", - "type": "string", - "pattern": "^APITokenList$", - "readOnly": true - } - } - } - ], - "title": "APITokenList", - "description": "A list response from a pagination request", - "discriminator": { - "propertyName": "type" - } - }, - "RepositoryUserPermissions": { - "allOf": [ - { - "$ref": "#/components/schemas/UserPermission" - }, - { - "type": "object", - "properties": { - "type": { - "title": "Type", - "default": "RepositoryUserPermissions", - "type": "string", - "pattern": "^RepositoryUserPermissions$", - "readOnly": true + "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": [ + "type", + "owner" + ] } ], - "title": "RepositoryUserPermissions", + "title": "Quota", "discriminator": { "propertyName": "type" } }, - "Repository": { + "UpdateInvoicePreview": { "allOf": [ { - "$ref": "#/components/schemas/RepositoryCreate" + "$ref": "#/components/schemas/_OpenAPIGenBaseModel" }, { "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" + "immediate": { + "title": "Immediate", + "description": "The invoice that will be finalized right after changes are applied", + "allOf": [ + { + "$ref": "#/components/schemas/InvoicePreview" + } + ] }, - "owner": { - "title": "Owner", - "description": "The owner of the repository", + "upcoming": { + "title": "Upcoming", + "description": "The invoice that will be finalized at the end of the current billing cycle", "allOf": [ { - "$ref": "#/components/schemas/AccountPublic" + "$ref": "#/components/schemas/InvoicePreview" } ] }, - "permissions": { - "title": "Permissions", - "description": "The permissions the user making the API call has on the resource", - "default": { - "admin": false, - "write": false, - "read": false - }, + "payment_method": { + "title": "Payment Method", + "description": "The payment method that will be billed when this invoice is due.", "allOf": [ { - "$ref": "#/components/schemas/RepositoryUserPermissions" + "$ref": "#/components/schemas/CardPublic" } ] }, - "slug": { - "title": "Slug", - "description": "The repository slug", - "example": "ladybug-tools/daylight-factor", - "type": "string" + "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": "Repository", + "default": "UpdateInvoicePreview", "type": "string", - "pattern": "^Repository$", + "pattern": "^UpdateInvoicePreview$", "readOnly": true } - } + }, + "required": [ + "immediate", + "upcoming" + ] } ], - "title": "Repository", + "title": "UpdateInvoicePreview", "discriminator": { "propertyName": "type" } }, - "ResourcesDuration": { + "ProjectRecipeFilter": { "allOf": [ { "$ref": "#/components/schemas/_OpenAPIGenBaseModel" @@ -17674,34 +17608,53 @@ { "type": "object", "properties": { - "cpu": { - "title": "Cpu", - "default": 0, - "type": "integer", - "format": "int32" + "owner": { + "title": "Owner", + "description": "The name of the account the recipe belongs to", + "example": "ladybug-tools", + "type": "string" }, - "memory": { - "title": "Memory", - "default": 0, - "type": "integer", - "format": "int32" + "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": "ResourcesDuration", + "default": "ProjectRecipeFilter", "type": "string", - "pattern": "^ResourcesDuration$", + "pattern": "^ProjectRecipeFilter$", "readOnly": true } - } + }, + "required": [ + "owner", + "name" + ] } ], - "title": "ResourcesDuration", + "title": "ProjectRecipeFilter", "discriminator": { "propertyName": "type" } }, - "RunMeta": { + "DependencyKind": { + "title": "DependencyKind", + "description": "Dependency kind.", + "enum": [ + "recipe", + "plugin" + ], + "type": "string" + }, + "Dependency": { "allOf": [ { "$ref": "#/components/schemas/_OpenAPIGenBaseModel" @@ -17709,1194 +17662,956 @@ { "type": "object", "properties": { - "resources_duration": { - "title": "Resources Duration", - "description": "resource usage", - "default": { - "cpu": 0, - "memory": 0 - }, - "allOf": [ - { - "$ref": "#/components/schemas/ResourcesDuration" - } - ] - }, - "progress": { - "title": "Progress", - "description": "progress of the run", - "default": { - "completed": 0, - "running": 0, - "total": 0 - }, + "kind": { + "description": "The kind of dependency. It can be a recipe or an plugin.", "allOf": [ { - "$ref": "#/components/schemas/RunProgress" + "$ref": "#/components/schemas/DependencyKind" } ] }, - "type": { + "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.", + "type": "string" + }, + "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": "RunMeta", + "default": "Dependency", + "pattern": "^Dependency$", "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" + } + }, + "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": [ + "kind", + "name", + "tag", + "source" + ] } ], - "title": "RunMeta", + "title": "Dependency", + "description": "Configuration to fetch a Recipe or Plugin that another Recipe depends on.", "discriminator": { "propertyName": "type" } }, - "QuotaPlan": { + "InputReference": { "allOf": [ { - "$ref": "#/components/schemas/_OpenAPIGenBaseModel" + "$ref": "#/components/schemas/_InputReferenceBase" }, { "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", + "default": "InputReference", + "pattern": "^InputReference$", "type": "string", - "pattern": "^QuotaPlan$", "readOnly": true } - }, - "required": [ - "name" - ] + } } ], - "title": "QuotaPlan", - "description": "A quota plan", + "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" } }, - "StepFileInput": { + "ItemReference": { "allOf": [ { - "$ref": "#/components/schemas/GenericInput" + "$ref": "#/components/schemas/_BaseReference" }, { "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.", + "variable": { + "title": "Variable", + "description": "The name of the looped item variable (use dot notation for nested json values)", "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": "ItemReference", + "pattern": "^ItemReference$", "type": "string", "readOnly": true } } } ], - "title": "StepFileInput", - "description": "A file input.", + "title": "ItemReference", + "description": "An Item Reference.", "discriminator": { "propertyName": "type" } }, - "StepFileOutput": { + "ValueReference": { "allOf": [ { - "$ref": "#/components/schemas/FunctionFileOutput" + "$ref": "#/components/schemas/_BaseReference" }, { "type": "object", "required": [ - "source" + "value" ], "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" - } - ] + "value": { + "title": "Value", + "description": "A fixed value for this reference." }, "type": { "title": "Type", - "default": "StepFileOutput", - "pattern": "^StepFileOutput$", + "default": "ValueReference", + "pattern": "^ValueReference$", "type": "string", "readOnly": true } } } ], - "title": "StepFileOutput", - "description": "A file output.", + "title": "ValueReference", + "description": "A reference to a fixed value.", "discriminator": { "propertyName": "type" } }, - "Location": { + "TaskArgument": { "allOf": [ { - "$ref": "#/components/schemas/CryptlexBase" + "$ref": "#/components/schemas/_OpenAPIGenBaseModel" }, { "type": "object", "properties": { - "ip_address": { - "title": "Ip Address", - "type": "string" - }, - "country_code": { - "title": "Country Code", - "type": "string" - }, - "country_name": { - "title": "Country Name", - "type": "string" - }, - "city": { - "title": "City", + "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" }, - "latitude": { - "title": "Latitude", - "type": "number", - "format": "double" + "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" + } + ] }, - "longitude": { - "title": "Longitude", - "type": "number", - "format": "double" + "type": { + "title": "Type", + "default": "TaskArgument", + "pattern": "^TaskArgument$", + "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", + "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": "Location", + "default": "InputFileReference", + "pattern": "^InputFileReference$", "type": "string", - "pattern": "^Location$", "readOnly": true } } } ], - "title": "Location", + "title": "InputFileReference", + "description": "An input file reference", "discriminator": { "propertyName": "type" } }, - "Activation": { + "InputPathReference": { "allOf": [ { - "$ref": "#/components/schemas/Activation" + "$ref": "#/components/schemas/_InputReferenceBase" }, { "type": "object", "properties": { "type": { "title": "Type", - "default": "Activation", + "default": "InputPathReference", + "pattern": "^InputPathReference$", "type": "string", - "pattern": "^Activation$", "readOnly": true } } } ], - "title": "Activation", + "title": "InputPathReference", + "description": "An input file or folder reference", "discriminator": { "propertyName": "type" } }, - "ActivationList": { + "TaskFileReference": { "allOf": [ { - "$ref": "#/components/schemas/_OpenAPIGenBaseModel" + "$ref": "#/components/schemas/_TaskReferenceBase" }, { "type": "object", "properties": { - "resources": { - "title": "Resources", - "type": "array", - "items": { - "$ref": "#/components/schemas/Activation" - } - }, "type": { "title": "Type", - "default": "ActivationList", + "default": "TaskFileReference", + "pattern": "^TaskFileReference$", "type": "string", - "pattern": "^ActivationList$", "readOnly": true } - }, - "required": [ - "resources" - ] + } } ], - "title": "ActivationList", + "title": "TaskFileReference", + "description": "A reference to a file that is generated in a task.", "discriminator": { "propertyName": "type" } }, - "ProjectAccessPolicyList": { + "TaskFolderReference": { "allOf": [ { - "$ref": "#/components/schemas/_OpenAPIGenBaseModel" + "$ref": "#/components/schemas/_TaskReferenceBase" }, { "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/ProjectAccessPolicy" - } - }, - "next_page": { - "title": "Next Page", - "description": "The next page, if this on is not the last", - "type": "integer", - "format": "int32" - }, "type": { "title": "Type", - "default": "ProjectAccessPolicyList", + "default": "TaskFolderReference", + "pattern": "^TaskFolderReference$", "type": "string", - "pattern": "^ProjectAccessPolicyList$", "readOnly": true } } } ], - "title": "ProjectAccessPolicyList", - "description": "A list response from a pagination request", + "title": "TaskFolderReference", + "description": "A reference to a folder that is generated in a task.", "discriminator": { "propertyName": "type" } }, - "StepIntegerInput": { + "TaskPathReference": { "allOf": [ { - "$ref": "#/components/schemas/GenericInput" + "$ref": "#/components/schemas/_TaskReferenceBase" }, { "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" - }, "type": { "title": "Type", - "default": "StepIntegerInput", - "pattern": "^StepIntegerInput$", + "default": "TaskPathReference", + "pattern": "^TaskPathReference$", "type": "string", "readOnly": true } } } ], - "title": "StepIntegerInput", - "description": "An integer input.", + "title": "TaskPathReference", + "description": "A reference to a file or folder that is generated in a task.", "discriminator": { "propertyName": "type" } }, - "StepNumberInput": { + "ValueFileReference": { "allOf": [ { - "$ref": "#/components/schemas/GenericInput" + "$ref": "#/components/schemas/_BaseReference" }, { "type": "object", "required": [ - "value" + "path" ], "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" + "path": { + "title": "Path", + "description": "A fixed value for this reference.", + "type": "string" }, "type": { "title": "Type", - "default": "StepNumberInput", - "pattern": "^StepNumberInput$", + "default": "ValueFileReference", + "pattern": "^ValueFileReference$", "type": "string", "readOnly": true } } } ], - "title": "StepNumberInput", - "description": "A number input.", + "title": "ValueFileReference", + "description": "A reference to a fixed file.", "discriminator": { "propertyName": "type" } }, - "StepFolderInput": { + "TaskPathArgument": { "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.", + "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" - } - ] - }, - "default": { - "title": "Default", - "description": "The default source for file if the value is not provided.", - "anyOf": [ + "$ref": "#/components/schemas/InputPathReference" + }, { - "$ref": "#/components/schemas/HTTP" + "$ref": "#/components/schemas/TaskFileReference" }, { - "$ref": "#/components/schemas/S3" + "$ref": "#/components/schemas/TaskFolderReference" }, { - "$ref": "#/components/schemas/ProjectFolder" + "$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" - }, - "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": "StepFolderInput", - "pattern": "^StepFolderInput$", + "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": "StepFolderInput", - "description": "A folder input.", + "title": "TaskPathArgument", + "description": "BaseModel with functionality to return the object as a yaml string.", "discriminator": { "propertyName": "type" } }, - "StepPathInput": { + "DAGTaskLoop": { "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" - } - ] + "type": { + "title": "Type", + "default": "DAGTaskLoop", + "pattern": "^DAGTaskLoop$", + "type": "string", + "readOnly": true }, - "default": { - "title": "Default", - "description": "The default source for file if the value is not provided.", + "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" - }, - "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": "StepPathInput", - "pattern": "^StepPathInput$", - "type": "string", - "readOnly": true } } } ], - "title": "StepPathInput", - "description": "A file or a folder input.", + "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" } }, - "StepJSONObjectInput": { + "TaskReturn": { "allOf": [ { - "$ref": "#/components/schemas/GenericInput" + "$ref": "#/components/schemas/GenericOutput" }, { "type": "object", - "required": [ - "value" - ], "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" - }, - "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": "StepJSONObjectInput", - "pattern": "^StepJSONObjectInput$", + "default": "TaskReturn", + "pattern": "^TaskReturn$", "type": "string", "readOnly": true } } } ], - "title": "StepJSONObjectInput", - "description": "A JSON object input.", + "title": "TaskReturn", + "description": "A Task return output that exposes the values from a function or a DAG.", "discriminator": { "propertyName": "type" } }, - "StepStringOutput": { + "TaskPathReturn": { "allOf": [ { - "$ref": "#/components/schemas/FunctionStringOutput" + "$ref": "#/components/schemas/PathOutput" }, { "type": "object", - "required": [ - "value" - ], "properties": { - "value": { - "title": "Value", - "type": "string" - }, "type": { "title": "Type", - "default": "StepStringOutput", - "pattern": "^StepStringOutput$", + "default": "TaskPathReturn", + "pattern": "^TaskPathReturn$", "type": "string", "readOnly": true } } } ], - "title": "StepStringOutput", - "description": "A String output.", + "title": "TaskPathReturn", + "description": "A Task output that returns a file or a folder output from a function or a DAG.", "discriminator": { "propertyName": "type" } }, - "StepIntegerOutput": { + "DAGTask": { "allOf": [ { - "$ref": "#/components/schemas/FunctionIntegerOutput" + "$ref": "#/components/schemas/_OpenAPIGenBaseModel" }, { "type": "object", - "required": [ - "value" - ], "properties": { - "value": { - "title": "Value", - "type": "integer", - "format": "int32" + "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" }, "type": { "title": "Type", - "default": "StepIntegerOutput", - "pattern": "^StepIntegerOutput$", + "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/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" + ] } ], - "title": "StepIntegerOutput", - "description": "An integer output.", + "title": "DAGTask", + "description": "A single task in a DAG flow.", "discriminator": { "propertyName": "type" } }, - "StepNumberOutput": { + "DAG": { "allOf": [ { - "$ref": "#/components/schemas/FunctionNumberOutput" + "$ref": "#/components/schemas/_OpenAPIGenBaseModel" }, { "type": "object", "required": [ - "value" + "name", + "tasks" ], "properties": { - "value": { - "title": "Value", - "type": "number", - "format": "double" - }, + "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/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" + } + ] + } + }, + "outputs": { + "title": "Outputs", + "description": "Outputs of the DAG that can be used by other DAGs.", + "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" + } + ] + } + }, + "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": "StepNumberOutput", - "pattern": "^StepNumberOutput$", + "default": "DAG", + "pattern": "^DAG$", "type": "string", "readOnly": true } } } ], - "title": "StepNumberOutput", - "description": "A number output.", + "title": "DAG", + "description": "A Directed Acyclic Graph containing a list of tasks.", "discriminator": { "propertyName": "type" } }, - "StepBooleanOutput": { + "TeamRoleEnum": { + "title": "TeamRoleEnum", + "description": "An enumeration.", + "enum": [ + "owner", + "member" + ], + "type": "string" + }, + "TeamMember": { "allOf": [ { - "$ref": "#/components/schemas/FunctionBooleanOutput" + "$ref": "#/components/schemas/_OpenAPIGenBaseModel" }, { "type": "object", - "required": [ - "value" - ], "properties": { - "value": { - "title": "Value", - "type": "boolean" + "user": { + "title": "User", + "description": "The team member", + "allOf": [ + { + "$ref": "#/components/schemas/UserPublic" + } + ] + }, + "role": { + "description": "The role the user has within the team", + "example": "member", + "allOf": [ + { + "$ref": "#/components/schemas/TeamRoleEnum" + } + ] }, "type": { "title": "Type", - "default": "StepBooleanOutput", - "pattern": "^StepBooleanOutput$", + "default": "TeamMember", "type": "string", + "pattern": "^TeamMember$", "readOnly": true } - } + }, + "required": [ + "user", + "role" + ] } ], - "title": "StepBooleanOutput", - "description": "The boolean type matches only two special values: True and False.", + "title": "TeamMember", "discriminator": { "propertyName": "type" } }, - "StepFolderOutput": { + "RecipeInterfaceList": { "allOf": [ { - "$ref": "#/components/schemas/FunctionFolderOutput" + "$ref": "#/components/schemas/_OpenAPIGenBaseModel" }, { "type": "object", "required": [ - "source" + "page", + "per_page", + "page_count", + "total_count", + "resources" ], "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" - } - ] + "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/RecipeInterface" + } + }, + "next_page": { + "title": "Next Page", + "description": "The next page, if this on is not the last", + "type": "integer", + "format": "int32" }, "type": { "title": "Type", - "default": "StepFolderOutput", - "pattern": "^StepFolderOutput$", + "default": "RecipeInterfaceList", "type": "string", + "pattern": "^RecipeInterfaceList$", "readOnly": true } } } ], - "title": "StepFolderOutput", - "description": "A folder output.", + "title": "RecipeInterfaceList", + "description": "A list response from a pagination request", "discriminator": { "propertyName": "type" } }, - "StepArrayOutput": { + "Metadata": { "allOf": [ { - "$ref": "#/components/schemas/FunctionStringOutput" + "$ref": "#/components/schemas/CryptlexBase" }, { "type": "object", "required": [ + "key", "value" ], "properties": { + "key": { + "title": "Key", + "type": "string" + }, "value": { "title": "Value", - "type": "array", - "items": {} + "type": "string" }, - "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" - } - ] + "id": { + "title": "Id", + "type": "string" }, - "type": { - "title": "Type", - "default": "StepArrayOutput", - "pattern": "^StepArrayOutput$", + "visible": { + "title": "Visible", + "default": false, + "type": "boolean" + }, + "type": { + "title": "Type", + "default": "Metadata", "type": "string", + "pattern": "^Metadata$", "readOnly": true } } } ], - "title": "StepArrayOutput", - "description": "A JSON array output.", + "title": "Metadata", "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" + "PaymentIntent": { + "allOf": [ + { + "$ref": "#/components/schemas/_SecureResourcePublic" + }, + { + "type": "object", + "properties": { + "type": { + "title": "Type", + "default": "PaymentIntent", + "type": "string", + "pattern": "^PaymentIntent$", + "readOnly": true + } + } + } ], - "type": "string" + "title": "PaymentIntent", + "discriminator": { + "propertyName": "type" + } }, - "StepStatus": { + "ProjectRecipeFilterList": { "allOf": [ { "$ref": "#/components/schemas/_OpenAPIGenBaseModel" @@ -18904,133 +18619,210 @@ { "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.", + "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/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/ProjectRecipeFilter" } }, - "outputs": { - "title": "Outputs", - "description": "The outputs produced by this step.", + "next_page": { + "title": "Next Page", + "description": "The next page, if this on is not the last", + "type": "integer", + "format": "int32" + }, + "type": { + "title": "Type", + "default": "ProjectRecipeFilterList", + "type": "string", + "pattern": "^ProjectRecipeFilterList$", + "readOnly": true + } + } + } + ], + "title": "ProjectRecipeFilterList", + "description": "A list response from a pagination request", + "discriminator": { + "propertyName": "type" + } + }, + "RecipePackageList": { + "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/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/RecipePackage" } }, - "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" }, - "id": { - "title": "Id", - "description": "The step unique ID", + "type": { + "title": "Type", + "default": "RecipePackageList", + "type": "string", + "pattern": "^RecipePackageList$", + "readOnly": true + } + } + } + ], + "title": "RecipePackageList", + "description": "A list response from a pagination request", + "discriminator": { + "propertyName": "type" + } + }, + "OrganizationUpdate": { + "allOf": [ + { + "$ref": "#/components/schemas/_OpenAPIGenBaseModel" + }, + { + "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": "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.", + "description": "The display name for this org", + "example": "Ladybug Tools", "type": "string" }, - "status_type": { - "description": "The type of step this status is for. Can be \"Function\", \"DAG\" or \"Loop\"", - "allOf": [ - { - "$ref": "#/components/schemas/StatusType" - } - ] + "picture_url": { + "title": "Picture Url", + "description": "URL to the picture associated with this org", + "example": "https://avatars1.githubusercontent.com/u/38131342", + "type": "string" }, - "template_ref": { - "title": "Template Ref", - "description": "The name of the template that spawned this step", + "contact_email": { + "title": "Contact Email", + "description": "The contact email for the Organization", + "example": "info@ladybug.tools", "type": "string" }, - "children_ids": { - "title": "Children Ids", - "description": "A list of child step IDs", - "type": "array", - "items": { - "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" }, - "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" - } + "type": { + "title": "Type", + "default": "OrganizationUpdate", + "type": "string", + "pattern": "^OrganizationUpdate$", + "readOnly": true + } + } + } + ], + "title": "OrganizationUpdate", + "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.", + "type": "string" + }, + "value": { + "title": "Value", + "description": "The value of the job argument." + }, + "type": { + "title": "Type", + "default": "JobArgument", + "pattern": "^JobArgument$", + "type": "string", + "readOnly": true }, "annotations": { "title": "Annotations", @@ -19039,160 +18831,95 @@ "additionalProperties": { "type": "string" } - }, - "message": { - "title": "Message", - "description": "Any message produced by the task. Usually error/debugging hints.", + } + }, + "required": [ + "name", + "value" + ] + } + ], + "title": "JobArgument", + "description": "Job argument is an argument input for arguments which are not files or folders.", + "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.", "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": [ + "description": "The path to source the file from.", + "anyOf": [ { - "$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" + "$ref": "#/components/schemas/HTTP" + }, + { + "$ref": "#/components/schemas/S3" + }, + { + "$ref": "#/components/schemas/ProjectFolder" + } + ] }, "type": { "title": "Type", - "default": "StepStatus", - "pattern": "^StepStatus$", + "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": "StepStatus", - "description": "The Status of a Job Step", + "title": "JobPathArgument", + "description": "BaseModel with functionality to return the object as a yaml string.", "discriminator": { "propertyName": "type" } }, - "RunStatus": { + "Job": { "allOf": [ { "$ref": "#/components/schemas/_OpenAPIGenBaseModel" }, { "type": "object", - "required": [ - "inputs", - "outputs", - "started_at", - "id", - "job_id" - ], "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" - } - ] - } - }, - "outputs": { - "title": "Outputs", - "description": "The outputs produced by this run.", - "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 ID of the individual run.", + "source": { + "title": "Source", + "description": "The source url for downloading the recipe.", "type": "string" }, - "job_id": { - "title": "Job Id", - "description": "The ID of the job that generated this run.", - "type": "string" + "type": { + "title": "Type", + "default": "Job", + "pattern": "^Job$", + "type": "string", + "readOnly": true }, "annotations": { "title": "Annotations", @@ -19202,22 +18929,6 @@ "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" - }, "api_version": { "title": "Api Version", "default": "v1beta1", @@ -19225,45 +18936,55 @@ "pattern": "^v1beta1$", "type": "string" }, - "entrypoint": { - "title": "Entrypoint", - "description": "The ID of the first step in the run.", + "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" }, - "status": { - "description": "The status of this run.", - "default": "Unknown", - "allOf": [ - { - "$ref": "#/components/schemas/RunStatusEnum" - } - ] + "description": { + "title": "Description", + "description": "Run description.", + "type": "string" }, - "steps": { - "title": "Steps", - "default": {}, + "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": { - "$ref": "#/components/schemas/StepStatus" + "type": "string" } - }, - "type": { - "title": "Type", - "default": "RunStatus", - "pattern": "^RunStatus$", - "type": "string", - "readOnly": true } - } + }, + "required": [ + "source" + ] } ], - "title": "RunStatus", - "description": "Job Status.", + "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" } }, - "Run": { + "CloudJob": { "allOf": [ { "$ref": "#/components/schemas/_OpenAPIGenBaseModel" @@ -19276,6 +18997,15 @@ "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", @@ -19293,70 +19023,45 @@ "$ref": "#/components/schemas/AccountPublic" } ] - }, - "recipe": { - "title": "Recipe", - "description": "The recipe used to generate this ", - "allOf": [ - { - "$ref": "#/components/schemas/RecipeInterface" - } - ] - }, - "generation": { - "title": "Generation", - "description": "The generation of this run", - "type": "number", - "format": "double" - }, - "status": { - "title": "Status", - "description": "The status of the run", - "allOf": [ - { - "$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 + }, + "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/RunMeta" + "$ref": "#/components/schemas/JobStatus" } ] }, "type": { "title": "Type", - "default": "Run", + "default": "CloudJob", "type": "string", - "pattern": "^Run$", + "pattern": "^CloudJob$", "readOnly": true } }, "required": [ - "id" + "id", + "spec" ] } ], - "title": "Run", + "title": "CloudJob", "discriminator": { "propertyName": "type" } }, - "RunList": { + "CloudJobList": { "allOf": [ { "$ref": "#/components/schemas/_OpenAPIGenBaseModel" @@ -19399,7 +19104,7 @@ "title": "Resources", "type": "array", "items": { - "$ref": "#/components/schemas/Run" + "$ref": "#/components/schemas/CloudJob" } }, "next_page": { @@ -19410,20 +19115,43 @@ }, "type": { "title": "Type", - "default": "RunList", + "default": "CloudJobList", "type": "string", - "pattern": "^RunList$", + "pattern": "^CloudJobList$", "readOnly": true } } } ], - "title": "RunList", + "title": "CloudJobList", "description": "A list response from a pagination request", "discriminator": { "propertyName": "type" } }, + "RepositoryPolicySubject": { + "allOf": [ + { + "$ref": "#/components/schemas/PolicySubject" + }, + { + "type": "object", + "properties": { + "type": { + "title": "Type", + "default": "RepositoryPolicySubject", + "type": "string", + "pattern": "^RepositoryPolicySubject$", + "readOnly": true + } + } + } + ], + "title": "RepositoryPolicySubject", + "discriminator": { + "propertyName": "type" + } + }, "OrganizationRoleEnum": { "title": "OrganizationRoleEnum", "description": "An enumeration.", @@ -19433,20 +19161,35 @@ ], "type": "string" }, - "OrganizationMember": { + "Organization": { "allOf": [ { - "$ref": "#/components/schemas/_OpenAPIGenBaseModel" + "$ref": "#/components/schemas/OrganizationUpdate" }, { "type": "object", + "required": [ + "id", + "owner" + ], "properties": { - "user": { - "title": "User", - "description": "The organization member", + "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/UserPublic" + "$ref": "#/components/schemas/AccountPublic" } ] }, @@ -19459,26 +19202,38 @@ } ] }, + "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": "OrganizationMember", + "default": "Organization", "type": "string", - "pattern": "^OrganizationMember$", + "pattern": "^Organization$", "readOnly": true } - }, - "required": [ - "user", - "role" - ] + } } ], - "title": "OrganizationMember", + "title": "Organization", "discriminator": { "propertyName": "type" } }, - "OrganizationMemberList": { + "OrganizationList": { "allOf": [ { "$ref": "#/components/schemas/_OpenAPIGenBaseModel" @@ -19521,7 +19276,7 @@ "title": "Resources", "type": "array", "items": { - "$ref": "#/components/schemas/OrganizationMember" + "$ref": "#/components/schemas/Organization" } }, "next_page": { @@ -19532,352 +19287,323 @@ }, "type": { "title": "Type", - "default": "OrganizationMemberList", + "default": "OrganizationList", "type": "string", - "pattern": "^OrganizationMemberList$", + "pattern": "^OrganizationList$", "readOnly": true } } } ], - "title": "OrganizationMemberList", + "title": "OrganizationList", "description": "A list response from a pagination request", "discriminator": { "propertyName": "type" } }, - "PublicAccountList": { + "Accessor": { "allOf": [ { "$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": "Accessor", + "type": "string", + "pattern": "^Accessor$", + "readOnly": true + } + }, "required": [ - "page", - "per_page", - "page_count", - "total_count", - "resources" - ], + "subject", + "permission" + ] + } + ], + "title": "Accessor", + "discriminator": { + "propertyName": "type" + } + }, + "UserPermission": { + "allOf": [ + { + "$ref": "#/components/schemas/_OpenAPIGenBaseModel" + }, + { + "type": "object", "properties": { - "page": { - "title": "Page", - "description": "The current page the pagination request is on", - "type": "integer", - "format": "int32" + "admin": { + "title": "Admin", + "description": "The user has admin permission to this resource", + "default": false, + "example": false, + "type": "boolean" }, - "per_page": { - "title": "Per Page", - "description": "The number of pages per pagination request", - "type": "integer", - "format": "int32" + "write": { + "title": "Write", + "description": "The user has write permission on this resource", + "default": false, + "example": false, + "type": "boolean" }, - "page_count": { - "title": "Page Count", - "description": "The total number of pages", - "type": "integer", - "format": "int32" + "read": { + "title": "Read", + "description": "The user has read permission on this resource", + "default": false, + "example": true, + "type": "boolean" }, - "total_count": { - "title": "Total Count", - "description": "The total number of resources matching the list request", - "type": "integer", - "format": "int32" + "type": { + "title": "Type", + "default": "UserPermission", + "type": "string", + "pattern": "^UserPermission$", + "readOnly": true + } + } + } + ], + "title": "UserPermission", + "discriminator": { + "propertyName": "type" + } + }, + "LicensePoolPublic": { + "allOf": [ + { + "$ref": "#/components/schemas/_OpenAPIGenBaseModel" + }, + { + "type": "object", + "properties": { + "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" + }, + "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" }, - "resources": { - "title": "Resources", + "accessors": { + "title": "Accessors", + "description": "The entities that can access the license though the pool", + "default": [], "type": "array", "items": { - "$ref": "#/components/schemas/AccountPublic" + "$ref": "#/components/schemas/Accessor" } }, - "next_page": { - "title": "Next Page", - "description": "The next page, if this on is not the last", - "type": "integer", - "format": "int32" + "description": { + "title": "Description", + "description": "The description of the pool", + "type": "string" }, "type": { "title": "Type", - "default": "PublicAccountList", + "default": "LicensePoolPublic", "type": "string", - "pattern": "^PublicAccountList$", + "pattern": "^LicensePoolPublic$", "readOnly": true } - } + }, + "required": [ + "id", + "license_id", + "owner", + "permissions", + "product" + ] } ], - "title": "PublicAccountList", - "description": "A list response from a pagination request", + "title": "LicensePoolPublic", "discriminator": { "propertyName": "type" } }, - "RecipeInterfaceList": { + "LicensePoolList": { "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/RecipeInterface" + "$ref": "#/components/schemas/LicensePoolPublic" } }, - "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", + "default": "LicensePoolList", "type": "string", - "pattern": "^RecipeInterfaceList$", + "pattern": "^LicensePoolList$", "readOnly": true } - } + }, + "required": [ + "resources" + ] } ], - "title": "RecipeInterfaceList", - "description": "A list response from a pagination request", + "title": "LicensePoolList", "discriminator": { "propertyName": "type" } }, - "UserPrivate": { + "LicensePoolPolicySubject": { "allOf": [ { - "$ref": "#/components/schemas/_OpenAPIGenBaseModel" + "$ref": "#/components/schemas/PolicySubject" }, { "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", - "type": "string" - }, "type": { "title": "Type", - "default": "UserPrivate", + "default": "LicensePoolPolicySubject", "type": "string", - "pattern": "^UserPrivate$", + "pattern": "^LicensePoolPolicySubject$", "readOnly": true } - }, - "required": [ - "id", - "email", - "username" - ] + } } ], - "title": "UserPrivate", + "title": "LicensePoolPolicySubject", "discriminator": { "propertyName": "type" } }, - "StepList": { + "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/StepStatus" + "$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": "StepList", + "default": "LicensePoolPolicySubjectList", "type": "string", - "pattern": "^StepList$", + "pattern": "^LicensePoolPolicySubjectList$", "readOnly": true } } } ], - "title": "StepList", - "description": "A list response from a pagination request", + "title": "LicensePoolPolicySubjectList", "discriminator": { "propertyName": "type" } }, - "TeamMemberList": { + "RepositoryMetadata": { "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" + "type": { + "title": "Type", + "default": "RepositoryMetadata", + "pattern": "^RepositoryMetadata$", + "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" + "name": { + "title": "Name", + "description": "The name of the repository", + "type": "string" }, - "total_count": { - "title": "Total Count", - "description": "The total number of resources matching the list request", - "type": "integer", - "format": "int32" + "description": { + "title": "Description", + "description": "A short description of the repository", + "default": "A Queenbee package repository", + "type": "string" }, - "resources": { - "title": "Resources", - "type": "array", - "items": { - "$ref": "#/components/schemas/TeamMember" - } + "source": { + "title": "Source", + "description": "The source path (url or local) to the repository", + "type": "string" }, - "next_page": { - "title": "Next Page", - "description": "The next page, if this on is not the last", + "plugin_count": { + "title": "Plugin Count", + "description": "The number of plugins hosted by the repository", + "default": 0, "type": "integer", "format": "int32" }, - "type": { - "title": "Type", - "default": "TeamMemberList", - "type": "string", - "pattern": "^TeamMemberList$", - "readOnly": true + "recipe_count": { + "title": "Recipe Count", + "description": "The number of recipes hosted by the repository", + "default": 0, + "type": "integer", + "format": "int32" } } } ], - "title": "TeamMemberList", - "description": "A list response from a pagination request", + "title": "RepositoryMetadata", + "description": "BaseModel with functionality to return the object as a yaml string.", "discriminator": { "propertyName": "type" } @@ -19949,52 +19675,155 @@ "propertyName": "type" } }, - "TeamCreate": { + "PackageVersion": { "allOf": [ { "$ref": "#/components/schemas/_OpenAPIGenBaseModel" }, { "type": "object", + "required": [ + "name", + "tag", + "url", + "created", + "digest" + ], "properties": { "name": { "title": "Name", - "example": "Honeybee Contributors", + "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", - "example": "The Honeybee team works on all things energy modelling", + "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", "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": "TeamCreate", + "default": "PackageVersion", + "pattern": "^PackageVersion$", "type": "string", - "pattern": "^TeamCreate$", "readOnly": true } - }, - "required": [ - "name" - ] + } } ], - "title": "TeamCreate", + "title": "PackageVersion", + "description": "Package Version\n\nA MetaData object to distinguish a specific package version within a repository\nindex.", "discriminator": { "propertyName": "type" } }, - "AccountType": { - "title": "AccountType", - "description": "The type of account.", - "enum": [ - "org", - "user" - ], - "type": "string" - }, - "SubscriptionPlan": { + "RepositoryIndex": { "allOf": [ { "$ref": "#/components/schemas/_OpenAPIGenBaseModel" @@ -20002,308 +19831,429 @@ { "type": "object", "properties": { - "slug": { - "title": "Slug", - "description": "A slug of the config plan used to create this subscription", - "type": "string" + "type": { + "title": "Type", + "default": "RepositoryIndex", + "pattern": "^RepositoryIndex$", + "type": "string", + "readOnly": true }, - "name": { - "title": "Name", - "description": "A name of the config plan used to create this subscription", + "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" }, - "account_types": { - "description": "The types of account to which the plan can be applied", - "type": "array", - "items": { - "$ref": "#/components/schemas/AccountType" + "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 }, - "uniqueItems": true + "allOf": [ + { + "$ref": "#/components/schemas/RepositoryMetadata" + } + ] }, - "quotas": { - "title": "Quotas", - "description": "A list of quota plans for a given subscription", - "default": [], - "type": "array", - "items": { - "$ref": "#/components/schemas/QuotaPlan" + "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" + } } }, - "type": { - "title": "Type", - "default": "SubscriptionPlan", - "type": "string", - "pattern": "^SubscriptionPlan$", - "readOnly": true - } - }, - "required": [ - "slug", - "name", - "account_types" - ] + "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": "SubscriptionPlan", - "description": "A Subscription plan", + "title": "RepositoryIndex", + "description": "A searchable index for a Queenbee Plugin and Recipe repository", "discriminator": { "propertyName": "type" } }, - "PollinationSubscription": { + "RunResultList": { "allOf": [ { - "$ref": "#/components/schemas/Subscription" + "$ref": "#/components/schemas/_OpenAPIGenBaseModel" }, { "type": "object", "required": [ - "account_id", - "subscription_plan" + "page", + "per_page", + "page_count", + "total_count", + "resources" ], "properties": { - "account_id": { - "title": "Account Id", - "description": "The ID of the account this subscription applies to", - "type": "string", - "format": "uuid" + "page": { + "title": "Page", + "description": "The current page the pagination request is on", + "type": "integer", + "format": "int32" }, - "subscription_plan": { - "title": "Subscription Plan", - "description": "A subscription plan", - "allOf": [ - { - "$ref": "#/components/schemas/SubscriptionPlan" - } - ] + "per_page": { + "title": "Per Page", + "description": "The number of pages per pagination request", + "type": "integer", + "format": "int32" }, - "external_id": { - "title": "External Id", - "description": "The ID of this subscription", - "type": "string" + "page_count": { + "title": "Page Count", + "description": "The total number of pages", + "type": "integer", + "format": "int32" }, - "quota_extensions": { - "title": "Quota Extensions", - "description": "A list of quota extension plans for a given subscription", - "default": [], + "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/QuotaExtension" + "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" + } + ] + } } }, + "next_page": { + "title": "Next Page", + "description": "The next page, if this on is not the last", + "type": "integer", + "format": "int32" + }, "type": { "title": "Type", - "default": "PollinationSubscription", + "default": "RunResultList", "type": "string", - "pattern": "^PollinationSubscription$", + "pattern": "^RunResultList$", "readOnly": true } } } ], - "title": "PollinationSubscription", + "title": "RunResultList", + "description": "A list response from a pagination request", "discriminator": { "propertyName": "type" } }, - "UpdateAccepted": { + "TeamMemberList": { "allOf": [ { "$ref": "#/components/schemas/_OpenAPIGenBaseModel" }, { "type": "object", + "required": [ + "page", + "per_page", + "page_count", + "total_count", + "resources" + ], "properties": { - "status": { - "title": "Status", - "default": "accepted", - "type": "string" + "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": "UpdateAccepted", + "default": "TeamMemberList", "type": "string", - "pattern": "^UpdateAccepted$", + "pattern": "^TeamMemberList$", "readOnly": true } } } ], - "title": "UpdateAccepted", - "description": "Accepted request response for existing resource", + "title": "TeamMemberList", + "description": "A list response from a pagination request", "discriminator": { "propertyName": "type" } }, - "ProjectRecipeFilter": { + "DeleteSubscriptionItem": { "allOf": [ { - "$ref": "#/components/schemas/_OpenAPIGenBaseModel" + "$ref": "#/components/schemas/SubscriptionItem" }, { "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" + "deleted": { + "title": "Deleted", + "default": true, + "type": "boolean" }, "type": { "title": "Type", - "default": "ProjectRecipeFilter", + "default": "DeleteSubscriptionItem", "type": "string", - "pattern": "^ProjectRecipeFilter$", + "pattern": "^DeleteSubscriptionItem$", "readOnly": true } - }, - "required": [ - "owner", - "name" - ] + } } ], - "title": "ProjectRecipeFilter", + "title": "DeleteSubscriptionItem", "discriminator": { "propertyName": "type" } }, - "PaymentSetup": { + "Activation": { "allOf": [ { - "$ref": "#/components/schemas/_SecureResourcePublic" + "$ref": "#/components/schemas/CryptlexBase" }, { "type": "object", + "required": [ + "id", + "created_at", + "updated_at", + "offline", + "last_synced_at", + "location" + ], "properties": { - "type": { - "title": "Type", - "default": "PaymentSetup", + "id": { + "title": "Id", + "type": "string" + }, + "created_at": { + "title": "Created At", + "type": "string", + "format": "date-time" + }, + "updated_at": { + "title": "Updated At", + "type": "string", + "format": "date-time" + }, + "offline": { + "title": "Offline", + "type": "boolean" + }, + "last_synced_at": { + "title": "Last Synced At", + "type": "string", + "format": "date-time" + }, + "location": { + "$ref": "#/components/schemas/Location" + }, + "os": { + "title": "Os", + "type": "string" + }, + "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", - "pattern": "^PaymentSetup$", - "readOnly": true - } - } - } - ], - "title": "PaymentSetup", - "discriminator": { - "propertyName": "type" - } - }, - "LicensePoolUpdate": { - "allOf": [ - { - "$ref": "#/components/schemas/_OpenAPIGenBaseModel" - }, - { - "type": "object", - "properties": { - "description": { - "title": "Description", - "description": "The description of the license pool", + "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": "LicensePoolUpdate", + "default": "Activation", "type": "string", - "pattern": "^LicensePoolUpdate$", + "pattern": "^Activation$", "readOnly": true } } } ], - "title": "LicensePoolUpdate", + "title": "Activation", "discriminator": { "propertyName": "type" } }, - "Organization": { + "Body_post_recipe__owner__recipes_post": { "allOf": [ { - "$ref": "#/components/schemas/OrganizationUpdate" + "$ref": "#/components/schemas/_OpenAPIGenBaseModel" }, { "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" + "package": { + "title": "Recipe Package", + "type": "string", + "format": "binary" }, "type": { "title": "Type", - "default": "Organization", + "default": "Body_post_recipe__owner__recipes_post", "type": "string", - "pattern": "^Organization$", + "pattern": "^Body_post_recipe__owner__recipes_post$", "readOnly": true } - } + }, + "required": [ + "package" + ] } ], - "title": "Organization", + "title": "Body_post_recipe__owner__recipes_post", "discriminator": { "propertyName": "type" } }, - "OrganizationList": { + "QuotaList": { "allOf": [ { "$ref": "#/components/schemas/_OpenAPIGenBaseModel" @@ -20346,7 +20296,7 @@ "title": "Resources", "type": "array", "items": { - "$ref": "#/components/schemas/Organization" + "$ref": "#/components/schemas/Quota" } }, "next_page": { @@ -20357,39 +20307,123 @@ }, "type": { "title": "Type", - "default": "OrganizationList", + "default": "QuotaList", "type": "string", - "pattern": "^OrganizationList$", + "pattern": "^QuotaList$", "readOnly": true } } } ], - "title": "OrganizationList", + "title": "QuotaList", "description": "A list response from a pagination request", "discriminator": { "propertyName": "type" } }, - "SubscriptionItem": { + "Subscribe": { "allOf": [ { - "$ref": "#/components/schemas/ExternalResource" + "$ref": "#/components/schemas/_OpenAPIGenBaseModel" }, { "type": "object", "properties": { + "plan": { + "title": "Plan", + "description": "The initial plan with which to create the subscription", + "allOf": [ + { + "$ref": "#/components/schemas/Price" + } + ] + }, "type": { "title": "Type", - "default": "SubscriptionItem", + "default": "Subscribe", "type": "string", - "pattern": "^SubscriptionItem$", + "pattern": "^Subscribe$", + "readOnly": true + } + }, + "required": [ + "plan" + ] + } + ], + "title": "Subscribe", + "discriminator": { + "propertyName": "type" + } + }, + "UserCreate": { + "allOf": [ + { + "$ref": "#/components/schemas/UserUpdate" + }, + { + "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", + "type": "string", + "pattern": "^UserCreate$", "readOnly": true } } } ], - "title": "SubscriptionItem", + "title": "UserCreate", + "discriminator": { + "propertyName": "type" + } + }, + "CreatedContent": { + "allOf": [ + { + "$ref": "#/components/schemas/_OpenAPIGenBaseModel" + }, + { + "type": "object", + "properties": { + "id": { + "title": "Id", + "description": "Id for the newly created resource.", + "example": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "type": "string", + "format": "uuid" + }, + "message": { + "title": "Message", + "description": " A human readable message", + "example": "Use Location in headers to access the new object.", + "type": "string" + }, + "type": { + "title": "Type", + "default": "CreatedContent", + "type": "string", + "pattern": "^CreatedContent$", + "readOnly": true + } + }, + "required": [ + "id" + ] + } + ], + "title": "CreatedContent", + "description": "Content for created response.", "discriminator": { "propertyName": "type" } @@ -20458,94 +20492,76 @@ "propertyName": "type" } }, - "TeamUpdate": { - "allOf": [ - { - "$ref": "#/components/schemas/TeamCreate" - }, - { - "type": "object", - "properties": { - "type": { - "title": "Type", - "default": "TeamUpdate", - "type": "string", - "pattern": "^TeamUpdate$", - "readOnly": true - } - } - } - ], - "title": "TeamUpdate", - "discriminator": { - "propertyName": "type" - } - }, - "Subscribe": { + "Body_post_plugin__owner__plugins_post": { "allOf": [ { "$ref": "#/components/schemas/_OpenAPIGenBaseModel" }, - { - "type": "object", - "properties": { - "plan": { - "title": "Plan", - "description": "The initial plan with which to create the subscription", - "allOf": [ - { - "$ref": "#/components/schemas/Price" - } - ] + { + "type": "object", + "properties": { + "package": { + "title": "Plugin Package", + "type": "string", + "format": "binary" }, "type": { "title": "Type", - "default": "Subscribe", + "default": "Body_post_plugin__owner__plugins_post", "type": "string", - "pattern": "^Subscribe$", + "pattern": "^Body_post_plugin__owner__plugins_post$", "readOnly": true } }, "required": [ - "plan" + "package" ] } ], - "title": "Subscribe", + "title": "Body_post_plugin__owner__plugins_post", "discriminator": { "propertyName": "type" } }, - "PluginPackage": { + "S3UploadRequest": { "allOf": [ { - "$ref": "#/components/schemas/RepositoryPackage" + "$ref": "#/components/schemas/_OpenAPIGenBaseModel" }, { "type": "object", - "required": [ - "manifest" - ], "properties": { - "manifest": { - "$ref": "#/components/schemas/Plugin" + "url": { + "title": "Url", + "type": "string" + }, + "fields": { + "title": "Fields", + "type": "object", + "additionalProperties": { + "type": "string" + } }, "type": { "title": "Type", - "default": "PluginPackage", + "default": "S3UploadRequest", "type": "string", - "pattern": "^PluginPackage$", + "pattern": "^S3UploadRequest$", "readOnly": true } - } + }, + "required": [ + "url", + "fields" + ] } ], - "title": "PluginPackage", + "title": "S3UploadRequest", "discriminator": { "propertyName": "type" } }, - "RepositoryMetadata": { + "Run": { "allOf": [ { "$ref": "#/components/schemas/_OpenAPIGenBaseModel" @@ -20553,61 +20569,92 @@ { "type": "object", "properties": { - "type": { - "title": "Type", - "default": "RepositoryMetadata", - "pattern": "^RepositoryMetadata$", - "type": "string", - "readOnly": true + "id": { + "title": "Id", + "description": "The unique ID for 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" - } + "author": { + "title": "Author", + "description": "author", + "allOf": [ + { + "$ref": "#/components/schemas/AccountPublic" + } + ] }, - "name": { - "title": "Name", - "description": "The name of the repository", - "type": "string" + "owner": { + "title": "Owner", + "description": "owner", + "allOf": [ + { + "$ref": "#/components/schemas/AccountPublic" + } + ] }, - "description": { - "title": "Description", - "description": "A short description of the repository", - "default": "A Queenbee package repository", - "type": "string" + "recipe": { + "title": "Recipe", + "description": "The recipe used to generate this ", + "allOf": [ + { + "$ref": "#/components/schemas/RecipeInterface" + } + ] }, - "source": { - "title": "Source", - "description": "The source path (url or local) to the repository", - "type": "string" + "generation": { + "title": "Generation", + "description": "The generation of this run", + "type": "number", + "format": "double" }, - "plugin_count": { - "title": "Plugin Count", - "description": "The number of plugins hosted by the repository", - "default": 0, - "type": "integer", - "format": "int32" + "status": { + "title": "Status", + "description": "The status of the run", + "allOf": [ + { + "$ref": "#/components/schemas/RunStatus" + } + ] }, - "recipe_count": { - "title": "Recipe Count", - "description": "The number of recipes hosted by the repository", - "default": 0, - "type": "integer", - "format": "int32" + "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": "Run", + "type": "string", + "pattern": "^Run$", + "readOnly": true } - } + }, + "required": [ + "id" + ] } ], - "title": "RepositoryMetadata", - "description": "BaseModel with functionality to return the object as a yaml string.", + "title": "Run", "discriminator": { "propertyName": "type" } }, - "PluginPackageList": { + "TemplateFunction": { "allOf": [ { "$ref": "#/components/schemas/_OpenAPIGenBaseModel" @@ -20615,137 +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/PluginPackage" + "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" + } + ] + } + }, + "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" + } + ] } }, - "next_page": { - "title": "Next Page", - "description": "The next page, if this on is not the last", - "type": "integer", - "format": "int32" + "description": { + "title": "Description", + "description": "Function description. A short human readable description for this function.", + "type": "string" }, "type": { "title": "Type", - "default": "PluginPackageList", + "default": "TemplateFunction", + "pattern": "^TemplateFunction$", "type": "string", - "pattern": "^PluginPackageList$", "readOnly": true } } } ], - "title": "PluginPackageList", - "description": "A list response from a pagination request", + "title": "TemplateFunction", + "description": "Function template.", "discriminator": { "propertyName": "type" } }, - "ProjectUpdate": { + "BakedRecipe": { "allOf": [ { "$ref": "#/components/schemas/_OpenAPIGenBaseModel" }, { "type": "object", + "required": [ + "flow", + "digest", + "templates" + ], "properties": { - "name": { - "title": "Name", - "description": "The name of the project. Must be unique to a given owner", - "example": "Project Falcon", + "flow": { + "title": "Flow", + "description": "A list of tasks to create a DAG recipe.", + "type": "array", + "items": { + "$ref": "#/components/schemas/DAG" + } + }, + "digest": { + "title": "Digest", "type": "string" }, - "description": { - "title": "Description", - "description": "A description of the project", - "example": "I always wanted to have a project called project Falcon", + "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" }, - "public": { - "title": "Public", - "description": "Whether or not a project is publicly viewable", - "type": "boolean" + "metadata": { + "title": "Metadata", + "description": "Recipe metadata information.", + "allOf": [ + { + "$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" + } }, "type": { "title": "Type", - "default": "ProjectUpdate", + "default": "BakedRecipe", + "pattern": "^BakedRecipe$", "type": "string", - "pattern": "^ProjectUpdate$", "readOnly": true } } } ], - "title": "ProjectUpdate", + "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" } }, - "KeyRequest": { + "ProductFamily": { "allOf": [ { - "$ref": "#/components/schemas/_OpenAPIGenBaseModel" + "$ref": "#/components/schemas/Product" }, { "type": "object", + "required": [ + "prices" + ], "properties": { - "key": { - "title": "Key", - "type": "string" + "prices": { + "title": "Prices", + "type": "array", + "items": { + "$ref": "#/components/schemas/Price" + } }, "type": { "title": "Type", - "default": "KeyRequest", + "default": "ProductFamily", "type": "string", - "pattern": "^KeyRequest$", + "pattern": "^ProductFamily$", "readOnly": true } - }, - "required": [ - "key" - ] + } } ], - "title": "KeyRequest", + "title": "ProductFamily", "discriminator": { "propertyName": "type" } }, - "NewRecipePackage": { + "Inventory": { "allOf": [ { "$ref": "#/components/schemas/_OpenAPIGenBaseModel" @@ -20753,40 +20916,32 @@ { "type": "object", "properties": { - "manifest": { - "title": "Manifest", - "description": "The Recipe manifest to be created", - "allOf": [ - { - "$ref": "#/components/schemas/Recipe" - } - ] - }, - "readme": { - "title": "Readme", - "description": "The README file to attach to this package", - "default": "", - "type": "string" + "families": { + "title": "Families", + "type": "array", + "items": { + "$ref": "#/components/schemas/ProductFamily" + } }, "type": { "title": "Type", - "default": "NewRecipePackage", + "default": "Inventory", "type": "string", - "pattern": "^NewRecipePackage$", + "pattern": "^Inventory$", "readOnly": true } }, "required": [ - "manifest" + "families" ] } ], - "title": "NewRecipePackage", + "title": "Inventory", "discriminator": { "propertyName": "type" } }, - "Quota": { + "ProjectCreate": { "allOf": [ { "$ref": "#/components/schemas/_OpenAPIGenBaseModel" @@ -20794,243 +20949,120 @@ { "type": "object", "properties": { - "type": { - "description": "The type of resource", - "allOf": [ - { - "$ref": "#/components/schemas/QuotaType" - } - ], - "readOnly": true - }, - "owner": { - "title": "Owner", - "description": "The quota owner", - "allOf": [ - { - "$ref": "#/components/schemas/AccountPublic" - } - ] - }, - "id": { - "title": "Id", - "description": "The unique ID for this Quota", - "type": "string", - "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", + "name": { + "title": "Name", + "description": "The name of the project. Must be unique to a given owner", + "example": "Project Falcon", "type": "string" }, "description": { "title": "Description", - "description": "The description", - "type": "string" - }, - "unit": { - "title": "Unit", - "description": "The unit in which the usage and limit are measured", + "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" + }, + "type": { + "title": "Type", + "default": "ProjectCreate", + "type": "string", + "pattern": "^ProjectCreate$", + "readOnly": true } }, "required": [ - "type", - "owner" + "name" ] } ], - "title": "Quota", + "title": "ProjectCreate", "discriminator": { "propertyName": "type" } }, - "PackageVersion": { + "Usage": { "allOf": [ { "$ref": "#/components/schemas/_OpenAPIGenBaseModel" }, { "type": "object", - "required": [ - "name", - "tag", - "url", - "created", - "digest" - ], "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", + "start": { + "title": "Start", + "description": "The start date for this usage aggregation", "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" - } + "end": { + "title": "End", + "description": "The end date for this usage aggregation", + "type": "string", + "format": "date-time" }, - "app_version": { - "title": "App Version", - "description": "The version of the application code underlying the manifest", - "type": "string" + "cpu": { + "title": "Cpu", + "description": "cpu usage", + "default": 0, + "type": "number", + "format": "double" }, - "keywords": { - "title": "Keywords", - "description": "A list of keywords to search the package by", - "type": "array", - "items": { - "type": "string" - } + "memory": { + "title": "Memory", + "description": "memory usage", + "default": 0, + "type": "number", + "format": "double" }, - "maintainers": { - "title": "Maintainers", - "description": "A list of maintainers for the package", - "type": "array", - "items": { - "$ref": "#/components/schemas/Maintainer" - } + "succeeded": { + "title": "Succeeded", + "description": "succeeded usage", + "default": 0, + "type": "integer", + "format": "int32" }, - "home": { - "title": "Home", - "description": "The URL of this package's home page", - "type": "string" + "failed": { + "title": "Failed", + "description": "failed usage", + "default": 0, + "type": "integer", + "format": "int32" }, - "sources": { - "title": "Sources", - "description": "A list of URLs to source code for this project", + "daily_usage": { + "title": "Daily Usage", + "description": "daily breakdown of usage", + "default": [], "type": "array", "items": { - "type": "string" + "$ref": "#/components/schemas/DailyUsage" } }, - "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", - "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": "Usage", "type": "string", + "pattern": "^Usage$", "readOnly": true } - } + }, + "required": [ + "start", + "end" + ] } ], - "title": "PackageVersion", - "description": "Package Version\n\nA MetaData object to distinguish a specific package version within a repository\nindex.", + "title": "Usage", "discriminator": { "propertyName": "type" } }, - "RepositoryIndex": { + "LicensePoolUpdate": { "allOf": [ { "$ref": "#/components/schemas/_OpenAPIGenBaseModel" @@ -21038,109 +21070,50 @@ { "type": "object", "properties": { - "type": { - "title": "Type", - "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" - } - } + "description": { + "title": "Description", + "description": "The description of the license pool", + "type": "string" + }, + "type": { + "title": "Type", + "default": "LicensePoolUpdate", + "type": "string", + "pattern": "^LicensePoolUpdate$", + "readOnly": true } } } ], - "title": "RepositoryIndex", - "description": "A searchable index for a Queenbee Plugin and Recipe repository", + "title": "LicensePoolUpdate", "discriminator": { "propertyName": "type" } }, - "APITokenCreate": { + "Invoice": { "allOf": [ { - "$ref": "#/components/schemas/APIToken" + "$ref": "#/components/schemas/InvoicePreview" }, { "type": "object", "properties": { "type": { "title": "Type", - "default": "APITokenCreate", + "default": "Invoice", "type": "string", - "pattern": "^APITokenCreate$", + "pattern": "^Invoice$", "readOnly": true } } } ], - "title": "APITokenCreate", + "title": "Invoice", "discriminator": { "propertyName": "type" } }, - "UpdateInvoicePreview": { + "InvoiceList": { "allOf": [ { "$ref": "#/components/schemas/_OpenAPIGenBaseModel" @@ -21148,62 +21121,66 @@ { "type": "object", "properties": { - "immediate": { - "title": "Immediate", - "description": "The invoice that will be finalized right after changes are applied", - "allOf": [ - { - "$ref": "#/components/schemas/InvoicePreview" - } - ] - }, - "upcoming": { - "title": "Upcoming", - "description": "The invoice that will be finalized at the end of the current billing cycle", - "allOf": [ - { - "$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": [], + "resources": { + "title": "Resources", "type": "array", "items": { - "$ref": "#/components/schemas/Quota" + "$ref": "#/components/schemas/Invoice" } }, + "has_more": { + "title": "Has More", + "type": "boolean" + }, "type": { "title": "Type", - "default": "UpdateInvoicePreview", + "default": "InvoiceList", "type": "string", - "pattern": "^UpdateInvoicePreview$", + "pattern": "^InvoiceList$", "readOnly": true } }, "required": [ - "immediate", - "upcoming" + "resources", + "has_more" ] } ], - "title": "UpdateInvoicePreview", + "title": "InvoiceList", "discriminator": { "propertyName": "type" } }, - "TeamList": { + "PluginPackage": { + "allOf": [ + { + "$ref": "#/components/schemas/RepositoryPackage" + }, + { + "type": "object", + "required": [ + "manifest" + ], + "properties": { + "manifest": { + "$ref": "#/components/schemas/Plugin" + }, + "type": { + "title": "Type", + "default": "PluginPackage", + "type": "string", + "pattern": "^PluginPackage$", + "readOnly": true + } + } + } + ], + "title": "PluginPackage", + "discriminator": { + "propertyName": "type" + } + }, + "PluginPackageList": { "allOf": [ { "$ref": "#/components/schemas/_OpenAPIGenBaseModel" @@ -21246,7 +21223,7 @@ "title": "Resources", "type": "array", "items": { - "$ref": "#/components/schemas/Team" + "$ref": "#/components/schemas/PluginPackage" } }, "next_page": { @@ -21257,74 +21234,112 @@ }, "type": { "title": "Type", - "default": "TeamList", + "default": "PluginPackageList", "type": "string", - "pattern": "^TeamList$", + "pattern": "^PluginPackageList$", "readOnly": true } } } ], - "title": "TeamList", + "title": "PluginPackageList", "description": "A list response from a pagination request", "discriminator": { "propertyName": "type" } }, - "OrganizationUpdate": { + "APITokenCreate": { + "allOf": [ + { + "$ref": "#/components/schemas/APIToken" + }, + { + "type": "object", + "properties": { + "type": { + "title": "Type", + "default": "APITokenCreate", + "type": "string", + "pattern": "^APITokenCreate$", + "readOnly": true + } + } + } + ], + "title": "APITokenCreate", + "discriminator": { + "propertyName": "type" + } + }, + "PublicAccountList": { "allOf": [ { "$ref": "#/components/schemas/_OpenAPIGenBaseModel" }, { "type": "object", + "required": [ + "page", + "per_page", + "page_count", + "total_count", + "resources" + ], "properties": { - "account_name": { - "title": "Account Name", - "description": "The unique name of the org in small case without spaces", - "example": "ladybug-tools", - "type": "string" + "page": { + "title": "Page", + "description": "The current page the pagination request is on", + "type": "integer", + "format": "int32" }, - "name": { - "title": "Name", - "description": "The display name for this org", - "example": "Ladybug Tools", - "type": "string" + "per_page": { + "title": "Per Page", + "description": "The number of pages per pagination request", + "type": "integer", + "format": "int32" }, - "picture_url": { - "title": "Picture Url", - "description": "URL to the picture associated with this org", - "example": "https://avatars1.githubusercontent.com/u/38131342", - "type": "string" + "page_count": { + "title": "Page Count", + "description": "The total number of pages", + "type": "integer", + "format": "int32" }, - "contact_email": { - "title": "Contact Email", - "description": "The contact email for the Organization", - "example": "info@ladybug.tools", - "type": "string" + "total_count": { + "title": "Total Count", + "description": "The total number of resources matching the list request", + "type": "integer", + "format": "int32" }, - "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" + "resources": { + "title": "Resources", + "type": "array", + "items": { + "$ref": "#/components/schemas/AccountPublic" + } + }, + "next_page": { + "title": "Next Page", + "description": "The next page, if this on is not the last", + "type": "integer", + "format": "int32" }, "type": { "title": "Type", - "default": "OrganizationUpdate", + "default": "PublicAccountList", "type": "string", - "pattern": "^OrganizationUpdate$", + "pattern": "^PublicAccountList$", "readOnly": true } } } ], - "title": "OrganizationUpdate", + "title": "PublicAccountList", + "description": "A list response from a pagination request", "discriminator": { "propertyName": "type" } }, - "Body_post_recipe__owner__recipes_post": { + "UserPrivate": { "allOf": [ { "$ref": "#/components/schemas/_OpenAPIGenBaseModel" @@ -21332,25 +21347,58 @@ { "type": "object", "properties": { - "package": { - "title": "Recipe Package", - "type": "string", - "format": "binary" + "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", + "type": "string" }, "type": { "title": "Type", - "default": "Body_post_recipe__owner__recipes_post", + "default": "UserPrivate", "type": "string", - "pattern": "^Body_post_recipe__owner__recipes_post$", + "pattern": "^UserPrivate$", "readOnly": true } }, "required": [ - "package" + "id", + "email", + "username" ] } ], - "title": "Body_post_recipe__owner__recipes_post", + "title": "UserPrivate", "discriminator": { "propertyName": "type" } @@ -21378,224 +21426,235 @@ "propertyName": "type" } }, - "PaymentCreate": { + "Project": { "allOf": [ { - "$ref": "#/components/schemas/_OpenAPIGenBaseModel" + "$ref": "#/components/schemas/ProjectCreate" }, { "type": "object", + "required": [ + "id", + "owner", + "permissions", + "slug" + ], "properties": { - "description": { - "title": "Description", - "description": "The description of this payment method", + "id": { + "title": "Id", + "description": "The project ID", + "example": "50bb7fe0-8f19-499e-972e-1ebec8af2c71", + "type": "string" + }, + "owner": { + "title": "Owner", + "description": "The project owner", + "allOf": [ + { + "$ref": "#/components/schemas/AccountPublic" + } + ] + }, + "permissions": { + "$ref": "#/components/schemas/UserPermission" + }, + "slug": { + "title": "Slug", + "description": "The project name in slug format", + "example": "project-falcon", "type": "string" }, + "usage": { + "title": "Usage", + "description": "The resource consumption of this project", + "allOf": [ + { + "$ref": "#/components/schemas/Usage" + } + ] + }, "type": { "title": "Type", - "default": "PaymentCreate", + "default": "Project", "type": "string", - "pattern": "^PaymentCreate$", + "pattern": "^Project$", "readOnly": true } } } ], - "title": "PaymentCreate", + "title": "Project", "discriminator": { "propertyName": "type" } }, - "QuotaList": { + "NewRecipePackage": { "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/Quota" - } + "manifest": { + "title": "Manifest", + "description": "The Recipe manifest to be created", + "allOf": [ + { + "$ref": "#/components/schemas/Recipe" + } + ] }, - "next_page": { - "title": "Next Page", - "description": "The next page, if this on is not the last", - "type": "integer", - "format": "int32" + "readme": { + "title": "Readme", + "description": "The README file to attach to this package", + "default": "", + "type": "string" }, "type": { "title": "Type", - "default": "QuotaList", + "default": "NewRecipePackage", "type": "string", - "pattern": "^QuotaList$", + "pattern": "^NewRecipePackage$", "readOnly": true } - } + }, + "required": [ + "manifest" + ] } ], - "title": "QuotaList", - "description": "A list response from a pagination request", + "title": "NewRecipePackage", "discriminator": { "propertyName": "type" } }, - "APITokenPrivate": { + "LicenseType": { + "title": "LicenseType", + "description": "An enumeration.", + "enum": [ + "node-locked", + "hosted-floating", + "on-premise-floating" + ], + "type": "string" + }, + "LicensePublic": { "allOf": [ { - "$ref": "#/components/schemas/APITokenCreate" + "$ref": "#/components/schemas/License" }, { "type": "object", "required": [ - "token" + "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": { - "token": { - "title": "Token", - "description": "The decoded API token", + "id": { + "title": "Id", "type": "string" }, - "type": { - "title": "Type", - "default": "APITokenPrivate", + "created_at": { + "title": "Created At", "type": "string", - "pattern": "^APITokenPrivate$", - "readOnly": true - } - } - } - ], - "title": "APITokenPrivate", - "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" + "format": "date-time" }, - "keywords": { - "title": "Keywords", - "description": "A list of keywords to index the repository by", - "example": [ - "daylight", - "radiance" - ], - "type": "array", - "items": { - "type": "string" - } + "updated_at": { + "title": "Updated At", + "type": "string", + "format": "date-time" }, - "description": { - "title": "Description", - "description": "A description of the repository", - "example": "Run daylight simulations the easy way!", + "key": { + "title": "Key", + "description": "The key used to activate this license. Treat this like a password.", "type": "string" }, - "icon": { - "title": "Icon", - "description": "An icon to represent this repository", - "example": "https://avatars1.githubusercontent.com/u/38131342", + "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" }, - "type": { - "title": "Type", - "default": "RepositoryUpdate", - "type": "string", - "pattern": "^RepositoryUpdate$", - "readOnly": true - } - } - } - ], - "title": "RepositoryUpdate", - "discriminator": { - "propertyName": "type" - } - }, - "InvoiceList": { - "allOf": [ - { - "$ref": "#/components/schemas/_OpenAPIGenBaseModel" - }, - { - "type": "object", - "properties": { - "resources": { - "title": "Resources", + "metadata": { + "title": "Metadata", "type": "array", "items": { - "$ref": "#/components/schemas/Invoice" + "$ref": "#/components/schemas/Metadata" } }, - "has_more": { - "title": "Has More", - "type": "boolean" - }, "type": { - "title": "Type", - "default": "InvoiceList", - "type": "string", - "pattern": "^InvoiceList$", + "$ref": "#/components/schemas/LicenseType", "readOnly": true + }, + "notes": { + "title": "Notes", + "type": "string" } - }, - "required": [ - "resources", - "has_more" - ] + } } ], - "title": "InvoiceList", + "title": "LicensePublic", "discriminator": { "propertyName": "type" } }, - "RunResultList": { + "PaymentMethodList": { "allOf": [ { "$ref": "#/components/schemas/_OpenAPIGenBaseModel" @@ -21638,65 +21697,7 @@ "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" - } - ] - } + "$ref": "#/components/schemas/CardPublic" } }, "next_page": { @@ -21707,108 +21708,134 @@ }, "type": { "title": "Type", - "default": "RunResultList", + "default": "PaymentMethodList", "type": "string", - "pattern": "^RunResultList$", + "pattern": "^PaymentMethodList$", "readOnly": true } } } ], - "title": "RunResultList", + "title": "PaymentMethodList", "description": "A list response from a pagination request", "discriminator": { "propertyName": "type" } }, - "PaymentIntent": { + "FileMeta": { "allOf": [ { - "$ref": "#/components/schemas/_SecureResourcePublic" + "$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": "PaymentIntent", + "default": "FileMeta", "type": "string", - "pattern": "^PaymentIntent$", + "pattern": "^FileMeta$", "readOnly": true } - } + }, + "required": [ + "key", + "file_type", + "file_name" + ] } ], - "title": "PaymentIntent", + "title": "FileMeta", "discriminator": { "propertyName": "type" } }, - "NewPluginPackage": { + "OrganizationCreate": { "allOf": [ { - "$ref": "#/components/schemas/_OpenAPIGenBaseModel" + "$ref": "#/components/schemas/OrganizationUpdate" }, { "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", + "default": "OrganizationCreate", "type": "string", - "pattern": "^NewPluginPackage$", + "pattern": "^OrganizationCreate$", "readOnly": true } - }, - "required": [ - "manifest" - ] + } } ], - "title": "NewPluginPackage", + "title": "OrganizationCreate", "discriminator": { "propertyName": "type" } }, - "Subscription": { + "ProjectUpdate": { "allOf": [ { - "$ref": "#/components/schemas/Subscription" + "$ref": "#/components/schemas/_OpenAPIGenBaseModel" }, { "type": "object", "properties": { + "name": { + "title": "Name", + "description": "The name of the project. Must be unique to a given owner", + "example": "Project Falcon", + "type": "string" + }, + "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": "Subscription", + "default": "ProjectUpdate", "type": "string", - "pattern": "^Subscription$", + "pattern": "^ProjectUpdate$", "readOnly": true } } } ], - "title": "Subscription", + "title": "ProjectUpdate", "discriminator": { "propertyName": "type" } }, - "Body_post_plugin__owner__plugins_post": { + "Status": { "allOf": [ { "$ref": "#/components/schemas/_OpenAPIGenBaseModel" @@ -21816,80 +21843,96 @@ { "type": "object", "properties": { - "package": { - "title": "Plugin Package", - "type": "string", - "format": "binary" + "frozen": { + "title": "Frozen", + "description": "Whether account actions are currently blocked by a payment failure", + "default": false, + "type": "boolean" }, "type": { "title": "Type", - "default": "Body_post_plugin__owner__plugins_post", + "default": "Status", "type": "string", - "pattern": "^Body_post_plugin__owner__plugins_post$", + "pattern": "^Status$", "readOnly": true } - }, - "required": [ - "package" - ] + } } ], - "title": "Body_post_plugin__owner__plugins_post", + "title": "Status", "discriminator": { "propertyName": "type" } }, - "FileMeta": { + "ProjectAccessPolicyList": { "allOf": [ { "$ref": "#/components/schemas/_OpenAPIGenBaseModel" }, { "type": "object", + "required": [ + "page", + "per_page", + "page_count", + "total_count", + "resources" + ], "properties": { - "key": { - "title": "Key", - "type": "string" + "page": { + "title": "Page", + "description": "The current page the pagination request is on", + "type": "integer", + "format": "int32" }, - "file_type": { - "title": "File Type", - "type": "string" + "per_page": { + "title": "Per Page", + "description": "The number of pages per pagination request", + "type": "integer", + "format": "int32" }, - "file_name": { - "title": "File Name", - "type": "string" + "page_count": { + "title": "Page Count", + "description": "The total number of pages", + "type": "integer", + "format": "int32" }, - "last_modified": { - "title": "Last Modified", - "type": "string", - "format": "date-time" + "total_count": { + "title": "Total Count", + "description": "The total number of resources matching the list request", + "type": "integer", + "format": "int32" }, - "size": { - "title": "Size", + "resources": { + "title": "Resources", + "type": "array", + "items": { + "$ref": "#/components/schemas/ProjectAccessPolicy" + } + }, + "next_page": { + "title": "Next Page", + "description": "The next page, if this on is not the last", "type": "integer", "format": "int32" }, "type": { "title": "Type", - "default": "FileMeta", + "default": "ProjectAccessPolicyList", "type": "string", - "pattern": "^FileMeta$", + "pattern": "^ProjectAccessPolicyList$", "readOnly": true } - }, - "required": [ - "key", - "file_type", - "file_name" - ] + } } ], - "title": "FileMeta", + "title": "ProjectAccessPolicyList", + "description": "A list response from a pagination request", "discriminator": { "propertyName": "type" } }, - "ProjectCreate": { + "OrganizationMember": { "allOf": [ { "$ref": "#/components/schemas/_OpenAPIGenBaseModel" @@ -21897,76 +21940,112 @@ { "type": "object", "properties": { - "name": { - "title": "Name", - "description": "The name of the project. Must be unique to a given owner", - "example": "Project Falcon", - "type": "string" - }, - "description": { - "title": "Description", - "description": "A description of the project", - "default": "", - "example": "I always wanted to have a project called project Falcon", - "type": "string" + "user": { + "title": "User", + "description": "The organization member", + "allOf": [ + { + "$ref": "#/components/schemas/UserPublic" + } + ] }, - "public": { - "title": "Public", - "description": "Whether or not a project is publicly viewable", - "default": true, - "type": "boolean" + "role": { + "description": "The role the user has within the organization", + "example": "member", + "allOf": [ + { + "$ref": "#/components/schemas/OrganizationRoleEnum" + } + ] }, "type": { "title": "Type", - "default": "ProjectCreate", + "default": "OrganizationMember", "type": "string", - "pattern": "^ProjectCreate$", + "pattern": "^OrganizationMember$", "readOnly": true } }, "required": [ - "name" + "user", + "role" ] } ], - "title": "ProjectCreate", + "title": "OrganizationMember", "discriminator": { "propertyName": "type" } }, - "RepositoryCreate": { + "StepList": { "allOf": [ { - "$ref": "#/components/schemas/RepositoryUpdate" + "$ref": "#/components/schemas/_OpenAPIGenBaseModel" }, { "type": "object", "required": [ - "name" + "page", + "per_page", + "page_count", + "total_count", + "resources" ], "properties": { - "name": { - "title": "Name", - "description": "The name of the repository", - "example": "daylight-factor", - "type": "string" + "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/StepStatus" + } + }, + "next_page": { + "title": "Next Page", + "description": "The next page, if this on is not the last", + "type": "integer", + "format": "int32" }, "type": { "title": "Type", - "default": "RepositoryCreate", + "default": "StepList", "type": "string", - "pattern": "^RepositoryCreate$", + "pattern": "^StepList$", "readOnly": true } } } ], - "title": "RepositoryCreate", + "title": "StepList", + "description": "A list response from a pagination request", "discriminator": { "propertyName": "type" } }, - "PaymentMethodList": { + "RunList": { "allOf": [ { "$ref": "#/components/schemas/_OpenAPIGenBaseModel" @@ -22009,7 +22088,7 @@ "title": "Resources", "type": "array", "items": { - "$ref": "#/components/schemas/CardPublic" + "$ref": "#/components/schemas/Run" } }, "next_page": { @@ -22020,21 +22099,118 @@ }, "type": { "title": "Type", - "default": "PaymentMethodList", + "default": "RunList", + "type": "string", + "pattern": "^RunList$", + "readOnly": true + } + } + } + ], + "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": [ + { + "$ref": "#/components/schemas/_OpenAPIGenBaseModel" + }, + { + "type": "object", + "properties": { + "status": { + "title": "Status", + "default": "accepted", + "type": "string" + }, + "type": { + "title": "Type", + "default": "UpdateAccepted", "type": "string", - "pattern": "^PaymentMethodList$", + "pattern": "^UpdateAccepted$", "readOnly": true } } } ], - "title": "PaymentMethodList", - "description": "A list response from a pagination request", + "title": "UpdateAccepted", + "description": "Accepted request response for existing resource", "discriminator": { "propertyName": "type" } }, - "ProjectRecipeFilterList": { + "OrganizationMemberList": { "allOf": [ { "$ref": "#/components/schemas/_OpenAPIGenBaseModel" @@ -22077,7 +22253,7 @@ "title": "Resources", "type": "array", "items": { - "$ref": "#/components/schemas/ProjectRecipeFilter" + "$ref": "#/components/schemas/OrganizationMember" } }, "next_page": { @@ -22088,21 +22264,57 @@ }, "type": { "title": "Type", - "default": "ProjectRecipeFilterList", + "default": "OrganizationMemberList", "type": "string", - "pattern": "^ProjectRecipeFilterList$", + "pattern": "^OrganizationMemberList$", "readOnly": true } } } ], - "title": "ProjectRecipeFilterList", + "title": "OrganizationMemberList", "description": "A list response from a pagination request", "discriminator": { "propertyName": "type" } }, - "UserPublicList": { + "TeamCreate": { + "allOf": [ + { + "$ref": "#/components/schemas/_OpenAPIGenBaseModel" + }, + { + "type": "object", + "properties": { + "name": { + "title": "Name", + "example": "Honeybee Contributors", + "type": "string" + }, + "description": { + "title": "Description", + "example": "The Honeybee team works on all things energy modelling", + "type": "string" + }, + "type": { + "title": "Type", + "default": "TeamCreate", + "type": "string", + "pattern": "^TeamCreate$", + "readOnly": true + } + }, + "required": [ + "name" + ] + } + ], + "title": "TeamCreate", + "discriminator": { + "propertyName": "type" + } + }, + "ProjectList": { "allOf": [ { "$ref": "#/components/schemas/_OpenAPIGenBaseModel" @@ -22145,7 +22357,7 @@ "title": "Resources", "type": "array", "items": { - "$ref": "#/components/schemas/UserPublic" + "$ref": "#/components/schemas/Project" } }, "next_page": { @@ -22156,21 +22368,21 @@ }, "type": { "title": "Type", - "default": "UserPublicList", + "default": "ProjectList", "type": "string", - "pattern": "^UserPublicList$", + "pattern": "^ProjectList$", "readOnly": true } } } ], - "title": "UserPublicList", + "title": "ProjectList", "description": "A list response from a pagination request", "discriminator": { "propertyName": "type" } }, - "S3UploadRequest": { + "ActivationList": { "allOf": [ { "$ref": "#/components/schemas/_OpenAPIGenBaseModel" @@ -22178,266 +22390,207 @@ { "type": "object", "properties": { - "url": { - "title": "Url", - "type": "string" - }, - "fields": { - "title": "Fields", - "type": "object", - "additionalProperties": { - "type": "string" + "resources": { + "title": "Resources", + "type": "array", + "items": { + "$ref": "#/components/schemas/Activation" } }, "type": { "title": "Type", - "default": "S3UploadRequest", + "default": "ActivationList", "type": "string", - "pattern": "^S3UploadRequest$", + "pattern": "^ActivationList$", "readOnly": true } }, "required": [ - "url", - "fields" + "resources" ] } ], - "title": "S3UploadRequest", + "title": "ActivationList", "discriminator": { "propertyName": "type" } }, - "CreatedContent": { + "SubscriptionItemList": { "allOf": [ { "$ref": "#/components/schemas/_OpenAPIGenBaseModel" }, { "type": "object", + "required": [ + "has_more", + "data" + ], "properties": { - "id": { - "title": "Id", - "description": "Id for the newly created resource.", - "example": "3fa85f64-5717-4562-b3fc-2c963f66afa6", - "type": "string", - "format": "uuid" + "has_more": { + "title": "Has More", + "type": "boolean" }, - "message": { - "title": "Message", - "description": " A human readable message", - "example": "Use Location in headers to access the new object.", - "type": "string" + "data": { + "title": "Data", + "type": "array", + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/SubscriptionItem" + }, + { + "$ref": "#/components/schemas/DeleteSubscriptionItem" + } + ] + } }, "type": { "title": "Type", - "default": "CreatedContent", - "type": "string", - "pattern": "^CreatedContent$", - "readOnly": true - } - }, - "required": [ - "id" - ] - } - ], - "title": "CreatedContent", - "description": "Content for created response.", - "discriminator": { - "propertyName": "type" - } - }, - "Inventory": { - "allOf": [ - { - "$ref": "#/components/schemas/Inventory" - }, - { - "type": "object", - "properties": { - "type": { - "title": "Type", - "default": "Inventory", - "type": "string", - "pattern": "^Inventory$", - "readOnly": true - } - } - } - ], - "title": "Inventory", - "discriminator": { - "propertyName": "type" - } - }, - "RepositoryPolicySubject": { - "allOf": [ - { - "$ref": "#/components/schemas/PolicySubject" - }, - { - "type": "object", - "properties": { - "type": { - "title": "Type", - "default": "RepositoryPolicySubject", + "default": "SubscriptionItemList", "type": "string", - "pattern": "^RepositoryPolicySubject$", + "pattern": "^SubscriptionItemList$", "readOnly": true } } } ], - "title": "RepositoryPolicySubject", + "title": "SubscriptionItemList", "discriminator": { "propertyName": "type" } }, - "RepositoryList": { + "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/Repository" - } + "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" }, - "type": { - "title": "Type", - "default": "RepositoryList", - "type": "string", - "pattern": "^RepositoryList$", - "readOnly": true - } - } - } - ], - "title": "RepositoryList", - "description": "A list response from a pagination request", - "discriminator": { - "propertyName": "type" - } - }, - "ExternalResource": { - "allOf": [ - { - "$ref": "#/components/schemas/_OpenAPIGenBaseModel" - }, - { - "type": "object", - "properties": { - "id": { - "title": "Id", + "default_payment_method": { + "title": "Default Payment Method", "type": "string" }, - "metadata": { - "title": "Metadata", - "default": {}, - "type": "object" + "schedule": { + "title": "Schedule", + "type": "string" + }, + "discount": { + "$ref": "#/components/schemas/Discount" }, "type": { "title": "Type", - "default": "ExternalResource", + "default": "Subscription", "type": "string", - "pattern": "^ExternalResource$", + "pattern": "^Subscription$", "readOnly": true } - }, - "required": [ - "id" - ] + } } ], - "title": "ExternalResource", + "title": "Subscription", "discriminator": { "propertyName": "type" } }, - "GenericInput": { + "RepositoryAccessPolicyList": { "allOf": [ { "$ref": "#/components/schemas/_OpenAPIGenBaseModel" }, { "type": "object", + "required": [ + "page", + "per_page", + "page_count", + "total_count", + "resources" + ], "properties": { - "name": { - "title": "Name", - "description": "Input name.", - "type": "string" + "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/RepositoryAccessPolicy" + } + }, + "next_page": { + "title": "Next Page", + "description": "The next page, if this on is not the last", + "type": "integer", + "format": "int32" }, "type": { "title": "Type", - "default": "GenericInput", - "pattern": "^GenericInput$", + "default": "RepositoryAccessPolicyList", "type": "string", + "pattern": "^RepositoryAccessPolicyList$", "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" - } - }, - "description": { - "title": "Description", - "description": "Optional description for input.", - "type": "string" } - }, - "required": [ - "name" - ] + } } ], - "title": "GenericInput", - "description": "Base class for all input types.", + "title": "RepositoryAccessPolicyList", + "description": "A list response from a pagination request", "discriminator": { "propertyName": "type" } @@ -22525,6 +22678,36 @@ "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": "DAGGenericOutputAlias", + "pattern": "^DAGGenericOutputAlias$", + "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.", + "discriminator": { + "propertyName": "type" + } + }, "AccessPolicy": { "allOf": [ { @@ -22570,7 +22753,7 @@ "propertyName": "type" } }, - "ListResponseMeta": { + "_BaseReference": { "allOf": [ { "$ref": "#/components/schemas/_OpenAPIGenBaseModel" @@ -22578,99 +22761,26 @@ { "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", + "default": "_BaseReference", + "pattern": "^_BaseReference$", "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" - } - }, - "BaseList": { - "allOf": [ - { - "$ref": "#/components/schemas/_OpenAPIGenBaseModel" - }, - { - "type": "object", - "properties": { - "has_more": { - "title": "Has More", - "type": "boolean" }, - "data": { - "title": "Data", - "type": "array", - "items": { - "type": "object" + "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" } - }, - "type": { - "title": "Type", - "default": "BaseList", - "type": "string", - "pattern": "^BaseList$", - "readOnly": true } - }, - "required": [ - "has_more", - "data" - ] + } } ], - "title": "BaseList", + "title": "_BaseReference", + "description": "A Base reference model.", "discriminator": { "propertyName": "type" } @@ -22736,76 +22846,168 @@ "propertyName": "type" } }, - "_DAGArtifactOutputAlias": { + "GenericInput": { + "allOf": [ + { + "$ref": "#/components/schemas/_OpenAPIGenBaseModel" + }, + { + "type": "object", + "properties": { + "name": { + "title": "Name", + "description": "Input name.", + "type": "string" + }, + "type": { + "title": "Type", + "default": "GenericInput", + "pattern": "^GenericInput$", + "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" + } + }, + "description": { + "title": "Description", + "description": "Optional description for input.", + "type": "string" + } + }, + "required": [ + "name" + ] + } + ], + "title": "GenericInput", + "description": "Base class for all input types.", + "discriminator": { + "propertyName": "type" + } + }, + "ListResponseMeta": { "allOf": [ { - "$ref": "#/components/schemas/DAGGenericOutputAlias" + "$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" + "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": "DAGGenericOutputAlias", - "pattern": "^DAGGenericOutputAlias$", + "default": "ListResponseMeta", "type": "string", + "pattern": "^ListResponseMeta$", "readOnly": true } - } + }, + "required": [ + "page", + "per_page", + "page_count", + "total_count" + ] } ], - "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": "ListResponseMeta", + "description": "A list response from a pagination request", "discriminator": { "propertyName": "type" } }, - "Product": { + "BaseStatus": { "allOf": [ { - "$ref": "#/components/schemas/ExternalResource" + "$ref": "#/components/schemas/IOBase" }, { "type": "object", "required": [ - "active", - "name" + "started_at" ], "properties": { - "active": { - "title": "Active", - "type": "boolean" + "started_at": { + "title": "Started At", + "description": "The time at which the task was started", + "type": "string", + "format": "date-time" }, - "name": { - "title": "Name", + "message": { + "title": "Message", + "description": "Any message produced by the task. Usually error/debugging hints.", "type": "string" }, - "description": { - "title": "Description", + "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": "Product", + "default": "BaseStatus", + "pattern": "^BaseStatus$", "type": "string", - "pattern": "^Product$", "readOnly": true } } } ], - "title": "Product", + "title": "BaseStatus", + "description": "Base Status model", "discriminator": { "propertyName": "type" } }, - "_BaseReference": { + "IOBase": { "allOf": [ { "$ref": "#/components/schemas/_OpenAPIGenBaseModel" @@ -22815,8 +23017,8 @@ "properties": { "type": { "title": "Type", - "default": "_BaseReference", - "pattern": "^_BaseReference$", + "default": "IOBase", + "pattern": "^IOBase$", "type": "string", "readOnly": true }, @@ -22827,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": "_BaseReference", - "description": "A Base reference model.", + "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" } }, - "CryptlexBase": { + "ExternalResource": { "allOf": [ { "$ref": "#/components/schemas/_OpenAPIGenBaseModel" @@ -22845,122 +23059,133 @@ { "type": "object", "properties": { - "type": { - "title": "Type", - "default": "CryptlexBase", - "type": "string", - "pattern": "^CryptlexBase$", - "readOnly": true - } - } - } - ], - "title": "CryptlexBase", - "discriminator": { - "propertyName": "type" - } - }, - "_InputReferenceBase": { - "allOf": [ - { - "$ref": "#/components/schemas/_BaseReference" - }, - { - "type": "object", - "required": [ - "variable" - ], - "properties": { - "variable": { - "title": "Variable", - "description": "The name of the DAG input variable", + "id": { + "title": "Id", "type": "string" }, + "metadata": { + "title": "Metadata", + "default": {}, + "type": "object" + }, "type": { "title": "Type", - "default": "_InputReferenceBase", - "pattern": "^_InputReferenceBase$", + "default": "ExternalResource", "type": "string", + "pattern": "^ExternalResource$", "readOnly": true } - } + }, + "required": [ + "id" + ] } ], - "title": "_InputReferenceBase", - "description": "An input reference.", + "title": "ExternalResource", "discriminator": { "propertyName": "type" } }, - "AccessPolicyList": { + "RepositoryPackage": { "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" + "digest": { + "title": "Digest", + "description": "The new package digest", + "type": "string" }, - "total_count": { - "title": "Total Count", - "description": "The total number of resources matching the list request", - "type": "integer", - "format": "int32" + "tag": { + "title": "Tag", + "description": "The new package tag", + "type": "string" }, - "resources": { - "title": "Resources", + "keywords": { + "title": "Keywords", + "description": "keywords", "type": "array", "items": { - "$ref": "#/components/schemas/AccessPolicy" + "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": "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" + ] + } + ], + "title": "RepositoryPackage", + "discriminator": { + "propertyName": "type" + } + }, + "_InputReferenceBase": { + "allOf": [ + { + "$ref": "#/components/schemas/_BaseReference" + }, + { + "type": "object", + "required": [ + "variable" + ], + "properties": { + "variable": { + "title": "Variable", + "description": "The name of the DAG input variable", + "type": "string" }, "type": { "title": "Type", - "default": "AccessPolicyList", + "default": "_InputReferenceBase", + "pattern": "^_InputReferenceBase$", "type": "string", - "pattern": "^AccessPolicyList$", "readOnly": true } } } ], - "title": "AccessPolicyList", - "description": "A list response from a pagination request", + "title": "_InputReferenceBase", + "description": "An input reference.", "discriminator": { "propertyName": "type" } }, - "IOBase": { + "CryptlexBase": { "allOf": [ { "$ref": "#/components/schemas/_OpenAPIGenBaseModel" @@ -22970,36 +23195,15 @@ "properties": { "type": { "title": "Type", - "default": "IOBase", - "pattern": "^IOBase$", + "default": "CryptlexBase", "type": "string", + "pattern": "^CryptlexBase$", "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": "CryptlexBase", "discriminator": { "propertyName": "type" } @@ -23036,6 +23240,44 @@ "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": "BaseList", + "type": "string", + "pattern": "^BaseList$", + "readOnly": true + } + }, + "required": [ + "has_more", + "data" + ] + } + ], + "title": "BaseList", + "discriminator": { + "propertyName": "type" + } + }, "_SecureResourcePublic": { "allOf": [ { @@ -23067,156 +23309,147 @@ "propertyName": "type" } }, - "BaseStatus": { + "_TaskReferenceBase": { "allOf": [ { - "$ref": "#/components/schemas/IOBase" + "$ref": "#/components/schemas/_BaseReference" }, { "type": "object", "required": [ - "started_at" + "name", + "variable" ], "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.", + "name": { + "title": "Name", + "description": "The name of the task to pull output data from.", "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.", + "variable": { + "title": "Variable", + "description": "The name of the variable.", "type": "string" }, "type": { "title": "Type", - "default": "BaseStatus", - "pattern": "^BaseStatus$", + "default": "_TaskReferenceBase", + "pattern": "^_TaskReferenceBase$", "type": "string", "readOnly": true } } } ], - "title": "BaseStatus", - "description": "Base Status model", + "title": "_TaskReferenceBase", + "description": "A Task Reference", "discriminator": { "propertyName": "type" } }, - "RepositoryPackage": { + "Product": { "allOf": [ { - "$ref": "#/components/schemas/_OpenAPIGenBaseModel" + "$ref": "#/components/schemas/ExternalResource" }, { "type": "object", + "required": [ + "active", + "name" + ], "properties": { - "digest": { - "title": "Digest", - "description": "The new package digest", - "type": "string" + "active": { + "title": "Active", + "type": "boolean" }, - "tag": { - "title": "Tag", - "description": "The new package tag", + "name": { + "title": "Name", "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", + "default": "Product", "type": "string", - "pattern": "^RepositoryPackage$", + "pattern": "^Product$", "readOnly": true } - }, - "required": [ - "digest", - "tag" - ] + } } ], - "title": "RepositoryPackage", + "title": "Product", "discriminator": { "propertyName": "type" } }, - "_TaskReferenceBase": { + "AccessPolicyList": { "allOf": [ { - "$ref": "#/components/schemas/_BaseReference" + "$ref": "#/components/schemas/_OpenAPIGenBaseModel" }, { "type": "object", "required": [ - "name", - "variable" + "page", + "per_page", + "page_count", + "total_count", + "resources" ], "properties": { - "name": { - "title": "Name", - "description": "The name of the task to pull output data from.", - "type": "string" + "page": { + "title": "Page", + "description": "The current page the pagination request is on", + "type": "integer", + "format": "int32" }, - "variable": { - "title": "Variable", - "description": "The name of the variable.", - "type": "string" + "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/AccessPolicy" + } + }, + "next_page": { + "title": "Next Page", + "description": "The next page, if this on is not the last", + "type": "integer", + "format": "int32" }, "type": { "title": "Type", - "default": "_TaskReferenceBase", - "pattern": "^_TaskReferenceBase$", + "default": "AccessPolicyList", "type": "string", + "pattern": "^AccessPolicyList$", "readOnly": true } } } ], - "title": "_TaskReferenceBase", - "description": "A Task Reference", + "title": "AccessPolicyList", + "description": "A list response from a pagination request", "discriminator": { "propertyName": "type" } diff --git a/.openapi-docs/openapi_mapper.json b/.openapi-docs/openapi_mapper.json index 8953fd67a..2f817a0ed 100644 --- a/.openapi-docs/openapi_mapper.json +++ b/.openapi-docs/openapi_mapper.json @@ -8,7 +8,7 @@ "AccessPolicyList": "app.server.rest.access_policies.dto", "Accessor": "app.server.rest.access_policies.dto", "AccountPublic": "app.server.rest.accounts.dto", - "Activation": "app.server.rest.licenses.dto", + "Activation": "app.domains.licenses.entities", "ActivationList": "app.server.rest.licenses.dto", "BakedRecipe": "queenbee.recipe.recipe", "BaseList": "app.domains.payments.entities", @@ -67,6 +67,7 @@ "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", @@ -104,7 +105,7 @@ "InputFolderReference": "queenbee.io.reference", "InputPathReference": "queenbee.io.reference", "InputReference": "queenbee.io.reference", - "Inventory": "app.server.rest.payments.dto", + "Inventory": "app.domains.payments.entities", "Invoice": "app.domains.payments.entities", "InvoiceList": "app.server.rest.payments.dto", "InvoicePreview": "app.server.rest.payments.dto", @@ -226,11 +227,10 @@ "StepStringInput": "queenbee.io.inputs.step", "StepStringOutput": "queenbee.io.outputs.step", "Subscribe": "app.server.rest.payments.dto", - "Subscription": "app.server.rest.payments.dto", + "Subscription": "app.domains.payments.entities", "SubscriptionCreate": "app.server.rest.payments.dto", "SubscriptionItem": "app.domains.payments.entities", - "SubscriptionItemPublic": "app.server.rest.payments.dto", - "SubscriptionItemPublicList": "app.server.rest.payments.dto", + "SubscriptionItemList": "app.domains.payments.entities", "SubscriptionPlan": "app.domains.subscriptions.entities", "SubscriptionUpdate": "app.server.rest.payments.dto", "TaskArgument": "queenbee.io.inputs.task", From 20dc19037d3552f9b124bfb05bb66a819f1be9cf Mon Sep 17 00:00:00 2001 From: Antoine Dao Date: Mon, 10 Jan 2022 17:24:31 +0000 Subject: [PATCH 6/7] build(sdk): regenerate SDK code --- .openapi-generator/.openapi-config.json | 2 +- .openapi-generator/FILES | 396 ++ README.md | 162 +- docs/APIToken.md | 16 + docs/APITokenCreate.md | 16 + docs/APITokenList.md | 19 + docs/APITokenPrivate.md | 14 + docs/APITokensApi.md | 346 ++ docs/AccessPolicy.md | 15 + docs/AccessPolicyList.md | 19 + docs/Accessor.md | 15 + docs/AccountPublic.md | 19 + docs/AccountType.md | 12 + docs/AccountsApi.md | 349 ++ docs/Activation.md | 26 + docs/ActivationList.md | 14 + docs/ArtifactSource.md | 14 + docs/ArtifactsApi.md | 363 ++ docs/BakedRecipe.md | 20 + docs/BaseList.md | 15 + docs/BaseReference.md | 14 + docs/BaseStatus.md | 20 + docs/BodyPostPluginOwnerPluginsPost.md | 14 + docs/BodyPostRecipeOwnerRecipesPost.md | 14 + docs/CardPublic.md | 16 + docs/CloudJob.md | 19 + docs/CloudJobList.md | 19 + docs/Coupon.md | 21 + docs/CouponDuration.md | 12 + docs/CreatedContent.md | 15 + docs/CryptlexBase.md | 13 + docs/DAG.md | 19 + docs/DAGArrayInput.md | 21 + docs/DAGArrayInputAlias.md | 22 + docs/DAGArrayOutput.md | 20 + docs/DAGArrayOutputAlias.md | 15 + docs/DAGArtifactOutput.md | 15 + docs/DAGArtifactOutputAlias.md | 16 + docs/DAGBooleanInput.md | 20 + docs/DAGBooleanInputAlias.md | 21 + docs/DAGBooleanOutput.md | 19 + docs/DAGBooleanOutputAlias.md | 14 + docs/DAGFileInput.md | 21 + docs/DAGFileInputAlias.md | 22 + docs/DAGFileOutput.md | 19 + docs/DAGFileOutputAlias.md | 14 + docs/DAGFolderInput.md | 20 + docs/DAGFolderInputAlias.md | 21 + docs/DAGFolderOutput.md | 19 + docs/DAGFolderOutputAlias.md | 14 + docs/DAGGenericInput.md | 20 + docs/DAGGenericInputAlias.md | 21 + docs/DAGGenericOutput.md | 15 + docs/DAGGenericOutputAlias.md | 18 + docs/DAGIntegerInput.md | 20 + docs/DAGIntegerInputAlias.md | 21 + docs/DAGIntegerOutput.md | 19 + docs/DAGIntegerOutputAlias.md | 14 + docs/DAGJSONObjectInput.md | 20 + docs/DAGJSONObjectInputAlias.md | 21 + docs/DAGJSONObjectOutput.md | 19 + docs/DAGJSONObjectOutputAlias.md | 14 + docs/DAGLinkedInputAlias.md | 18 + docs/DAGLinkedOutputAlias.md | 15 + docs/DAGNumberInput.md | 20 + docs/DAGNumberInputAlias.md | 21 + docs/DAGNumberOutput.md | 19 + docs/DAGNumberOutputAlias.md | 14 + docs/DAGPathInput.md | 21 + docs/DAGPathInputAlias.md | 22 + docs/DAGPathOutput.md | 19 + docs/DAGPathOutputAlias.md | 14 + docs/DAGStringInput.md | 17 + docs/DAGStringInputAlias.md | 18 + docs/DAGStringOutput.md | 19 + docs/DAGStringOutputAlias.md | 14 + docs/DAGTask.md | 21 + docs/DAGTaskLoop.md | 15 + docs/DailyUsage.md | 18 + docs/DeleteSubscriptionItem.md | 14 + docs/Dependency.md | 20 + docs/DependencyKind.md | 12 + docs/Discount.md | 19 + docs/DiscountAmount.md | 15 + docs/DockerConfig.md | 17 + docs/ExternalResource.md | 15 + docs/FileMeta.md | 18 + docs/FileReference.md | 14 + docs/FolderReference.md | 14 + docs/FromOutput.md | 17 + docs/Function.md | 19 + docs/FunctionArrayInput.md | 21 + docs/FunctionArrayOutput.md | 14 + docs/FunctionBooleanInput.md | 20 + docs/FunctionBooleanOutput.md | 13 + docs/FunctionFileInput.md | 22 + docs/FunctionFileOutput.md | 15 + docs/FunctionFolderInput.md | 21 + docs/FunctionFolderOutput.md | 15 + docs/FunctionIntegerInput.md | 20 + docs/FunctionIntegerOutput.md | 13 + docs/FunctionJSONObjectInput.md | 20 + docs/FunctionJSONObjectOutput.md | 13 + docs/FunctionNumberInput.md | 20 + docs/FunctionNumberOutput.md | 13 + docs/FunctionPathInput.md | 22 + docs/FunctionPathOutput.md | 15 + docs/FunctionStringInput.md | 13 + docs/FunctionStringOutput.md | 13 + docs/GenericInput.md | 16 + docs/GenericOutput.md | 16 + docs/HTTP.md | 14 + docs/HTTPValidationError.md | 13 + docs/IOAliasHandler.md | 18 + docs/IOBase.md | 16 + docs/InputFileReference.md | 13 + docs/InputFolderReference.md | 13 + docs/InputPathReference.md | 13 + docs/InputReference.md | 13 + docs/InputReferenceBase.md | 14 + docs/Inventory.md | 14 + docs/Invoice.md | 30 + docs/InvoiceList.md | 15 + docs/InvoicePreview.md | 30 + docs/InvoiceStatus.md | 12 + docs/InvoiceStatusTransitions.md | 17 + docs/ItemReference.md | 14 + docs/ItemType.md | 12 + docs/Job.md | 20 + docs/JobArgument.md | 16 + docs/JobPathArgument.md | 16 + docs/JobStatus.md | 26 + docs/JobStatusEnum.md | 12 + docs/JobsApi.md | 646 +++ docs/KeyRequest.md | 14 + docs/License.md | 16 + docs/LicensePoolAccessPolicy.md | 15 + docs/LicensePoolAccessPolicyList.md | 14 + docs/LicensePoolList.md | 14 + docs/LicensePoolPolicySubject.md | 15 + docs/LicensePoolPolicySubjectList.md | 14 + docs/LicensePoolPublic.md | 20 + docs/LicensePoolUpdate.md | 14 + docs/LicensePublic.md | 32 + docs/LicenseType.md | 12 + docs/LicensesApi.md | 687 ++++ docs/LineItem.md | 22 + docs/LineItemList.md | 15 + docs/ListResponseMeta.md | 19 + docs/LocalConfig.md | 14 + docs/Location.md | 19 + docs/Maintainer.md | 16 + docs/MetaData.md | 25 + docs/Metadata.md | 17 + docs/NewPluginPackage.md | 15 + docs/NewRecipePackage.md | 15 + docs/NewSubscriptionItem.md | 15 + docs/OpenAPIGenBaseModel.md | 13 + docs/Organization.md | 23 + docs/OrganizationCreate.md | 18 + docs/OrganizationList.md | 19 + docs/OrganizationMember.md | 15 + docs/OrganizationMemberList.md | 19 + docs/OrganizationRoleEnum.md | 12 + docs/OrganizationUpdate.md | 18 + docs/OrgsApi.md | 709 ++++ docs/PackageSortKey.md | 12 + docs/PackageVersion.md | 32 + docs/PathOutput.md | 18 + docs/PaymentCreate.md | 14 + docs/PaymentIntent.md | 13 + docs/PaymentMethodList.md | 19 + docs/PaymentSetup.md | 13 + docs/PaymentsApi.md | 1326 +++++++ docs/Period.md | 15 + docs/Permission.md | 12 + docs/Plugin.md | 18 + docs/PluginConfig.md | 16 + docs/PluginPackage.md | 21 + docs/PluginPackageList.md | 19 + docs/PluginsApi.md | 1029 +++++ docs/PolicySubject.md | 15 + docs/PollinationSubscription.md | 26 + docs/Price.md | 22 + docs/PriceRecurrence.md | 16 + docs/PriceTier.md | 18 + docs/PriceType.md | 12 + docs/Product.md | 18 + docs/ProductFamily.md | 17 + docs/Project.md | 21 + docs/ProjectAccessPolicy.md | 15 + docs/ProjectAccessPolicyList.md | 19 + docs/ProjectCreate.md | 16 + docs/ProjectFolder.md | 14 + docs/ProjectList.md | 19 + docs/ProjectPolicySubject.md | 15 + docs/ProjectRecipeFilter.md | 16 + docs/ProjectRecipeFilterList.md | 19 + docs/ProjectSortKey.md | 12 + docs/ProjectUpdate.md | 16 + docs/ProjectsApi.md | 1098 ++++++ docs/PublicAccountList.md | 19 + docs/Quota.md | 24 + docs/QuotaExtension.md | 17 + docs/QuotaList.md | 19 + docs/QuotaPlan.md | 17 + docs/QuotaType.md | 12 + docs/Recipe.md | 18 + docs/RecipeInterface.md | 19 + docs/RecipeInterfaceList.md | 19 + docs/RecipePackage.md | 21 + docs/RecipePackageList.md | 19 + docs/RecipesApi.md | 1029 +++++ docs/RegistriesApi.md | 440 +++ docs/Repository.md | 19 + docs/RepositoryAccessPolicy.md | 15 + docs/RepositoryAccessPolicyList.md | 19 + docs/RepositoryCreate.md | 18 + docs/RepositoryIndex.md | 19 + docs/RepositoryList.md | 19 + docs/RepositoryMetadata.md | 19 + docs/RepositoryPackage.md | 20 + docs/RepositoryPolicySubject.md | 15 + docs/RepositorySortKey.md | 12 + docs/RepositoryUpdate.md | 17 + docs/RepositoryUserPermissions.md | 16 + docs/ResourcesDuration.md | 15 + docs/RoleEnum.md | 12 + docs/Run.md | 20 + docs/RunList.md | 19 + docs/RunMeta.md | 15 + docs/RunProgress.md | 16 + docs/RunResultList.md | 19 + docs/RunStatus.md | 26 + docs/RunStatusEnum.md | 12 + docs/RunsApi.md | 844 ++++ docs/S3.md | 17 + docs/S3UploadRequest.md | 15 + docs/SecureResourcePublic.md | 14 + docs/SortEnum.md | 12 + docs/Status.md | 14 + docs/StatusType.md | 12 + docs/StepArrayInput.md | 22 + docs/StepArrayOutput.md | 15 + docs/StepBooleanInput.md | 21 + docs/StepBooleanOutput.md | 14 + docs/StepFileInput.md | 23 + docs/StepFileOutput.md | 14 + docs/StepFolderInput.md | 22 + docs/StepFolderOutput.md | 14 + docs/StepIntegerInput.md | 21 + docs/StepIntegerOutput.md | 14 + docs/StepJSONObjectInput.md | 21 + docs/StepJSONObjectOutput.md | 14 + docs/StepList.md | 19 + docs/StepNumberInput.md | 21 + docs/StepNumberOutput.md | 14 + docs/StepPathInput.md | 23 + docs/StepPathOutput.md | 14 + docs/StepStatus.md | 29 + docs/StepStatusEnum.md | 12 + docs/StepStringInput.md | 14 + docs/StepStringOutput.md | 14 + docs/SubjectType.md | 12 + docs/Subscribe.md | 14 + docs/Subscription.md | 24 + docs/SubscriptionCreate.md | 14 + docs/SubscriptionItem.md | 15 + docs/SubscriptionItemList.md | 15 + docs/SubscriptionPlan.md | 17 + docs/SubscriptionUpdate.md | 18 + docs/SubscriptionsApi.md | 172 + docs/TaskArgument.md | 16 + docs/TaskFileReference.md | 13 + docs/TaskFolderReference.md | 13 + docs/TaskPathArgument.md | 17 + docs/TaskPathReference.md | 13 + docs/TaskPathReturn.md | 15 + docs/TaskReference.md | 13 + docs/TaskReferenceBase.md | 15 + docs/TaskReturn.md | 16 + docs/Team.md | 16 + docs/TeamCreate.md | 15 + docs/TeamList.md | 19 + docs/TeamMember.md | 15 + docs/TeamMemberList.md | 19 + docs/TeamRoleEnum.md | 12 + docs/TeamUpdate.md | 15 + docs/TeamsApi.md | 711 ++++ docs/TemplateFunction.md | 20 + docs/UpdateAccepted.md | 14 + docs/UpdateInvoicePreview.md | 17 + docs/Usage.md | 20 + docs/UserApi.md | 336 ++ docs/UserCreate.md | 17 + docs/UserPermission.md | 16 + docs/UserPrivate.md | 19 + docs/UserPublic.md | 17 + docs/UserPublicList.md | 19 + docs/UserUpdate.md | 16 + docs/UsersApi.md | 241 ++ docs/ValidationError.md | 15 + docs/ValueFileReference.md | 14 + docs/ValueFolderReference.md | 14 + docs/ValueListReference.md | 14 + docs/ValueReference.md | 14 + src/PollinationSDK/Api/APITokensApi.cs | 933 +++++ src/PollinationSDK/Api/AccountsApi.cs | 953 +++++ src/PollinationSDK/Api/ArtifactsApi.cs | 1077 +++++ src/PollinationSDK/Api/JobsApi.cs | 1840 +++++++++ src/PollinationSDK/Api/LicensesApi.cs | 1821 +++++++++ src/PollinationSDK/Api/OrgsApi.cs | 1821 +++++++++ src/PollinationSDK/Api/PaymentsApi.cs | 3487 +++++++++++++++++ src/PollinationSDK/Api/PluginsApi.cs | 2800 +++++++++++++ src/PollinationSDK/Api/ProjectsApi.cs | 3041 ++++++++++++++ src/PollinationSDK/Api/RecipesApi.cs | 2800 +++++++++++++ src/PollinationSDK/Api/RegistriesApi.cs | 1266 ++++++ src/PollinationSDK/Api/RunsApi.cs | 2386 +++++++++++ src/PollinationSDK/Api/SubscriptionsApi.cs | 511 +++ src/PollinationSDK/Api/TeamsApi.cs | 1905 +++++++++ src/PollinationSDK/Api/UserApi.cs | 903 +++++ src/PollinationSDK/Api/UsersApi.cs | 660 ++++ src/PollinationSDK/Client/ApiClient.cs | 553 +++ src/PollinationSDK/Client/ApiException.cs | 59 + src/PollinationSDK/Client/ApiResponse.cs | 53 + src/PollinationSDK/Client/Configuration.cs | 538 +++ src/PollinationSDK/Client/ExceptionFactory.cs | 23 + .../Client/GlobalConfiguration.cs | 33 + src/PollinationSDK/Client/IApiAccessor.cs | 41 + .../Client/IReadableConfiguration.cs | 93 + .../Client/OpenAPIDateConverter.cs | 29 + .../Interface/Domains/Licenses/Entities.cs | 1 + .../Interface/Domains/Payments/Entities.cs | 4 + .../Interface/Server/Rest/Licenses/Dto.cs | 1 - .../Interface/Server/Rest/Payments/Dto.cs | 4 - src/PollinationSDK/Model/APIToken.cs | 251 ++ src/PollinationSDK/Model/APITokenCreate.cs | 206 + src/PollinationSDK/Model/APITokenList.cs | 287 ++ src/PollinationSDK/Model/APITokenPrivate.cs | 213 + src/PollinationSDK/Model/AccessPolicy.cs | 223 ++ src/PollinationSDK/Model/AccessPolicyList.cs | 287 ++ src/PollinationSDK/Model/Accessor.cs | 221 ++ src/PollinationSDK/Model/AccountPublic.cs | 284 ++ src/PollinationSDK/Model/AccountType.cs | 49 + src/PollinationSDK/Model/Activation.cs | 388 ++ src/PollinationSDK/Model/ActivationList.cs | 207 + src/PollinationSDK/Model/ArtifactSource.cs | 207 + src/PollinationSDK/Model/BakedRecipe.cs | 317 ++ src/PollinationSDK/Model/BaseList.cs | 222 ++ src/PollinationSDK/Model/BaseReference.cs | 207 + src/PollinationSDK/Model/BaseStatus.cs | 260 ++ .../Model/BodyPostPluginOwnerPluginsPost.cs | 206 + .../Model/BodyPostRecipeOwnerRecipesPost.cs | 206 + src/PollinationSDK/Model/CardPublic.cs | 239 ++ src/PollinationSDK/Model/CloudJob.cs | 283 ++ src/PollinationSDK/Model/CloudJobList.cs | 287 ++ src/PollinationSDK/Model/Coupon.cs | 285 ++ src/PollinationSDK/Model/CouponDuration.cs | 55 + src/PollinationSDK/Model/CreatedContent.cs | 222 ++ src/PollinationSDK/Model/CryptlexBase.cs | 191 + src/PollinationSDK/Model/DAG.cs | 292 ++ src/PollinationSDK/Model/DAGArrayInput.cs | 273 ++ .../Model/DAGArrayInputAlias.cs | 292 ++ src/PollinationSDK/Model/DAGArrayOutput.cs | 262 ++ .../Model/DAGArrayOutputAlias.cs | 235 ++ src/PollinationSDK/Model/DAGArtifactOutput.cs | 216 + .../Model/DAGArtifactOutputAlias.cs | 226 ++ src/PollinationSDK/Model/DAGBooleanInput.cs | 256 ++ .../Model/DAGBooleanInputAlias.cs | 275 ++ src/PollinationSDK/Model/DAGBooleanOutput.cs | 246 ++ .../Model/DAGBooleanOutputAlias.cs | 219 ++ src/PollinationSDK/Model/DAGFileInput.cs | 273 ++ src/PollinationSDK/Model/DAGFileInputAlias.cs | 292 ++ src/PollinationSDK/Model/DAGFileOutput.cs | 246 ++ .../Model/DAGFileOutputAlias.cs | 219 ++ src/PollinationSDK/Model/DAGFolderInput.cs | 256 ++ .../Model/DAGFolderInputAlias.cs | 275 ++ src/PollinationSDK/Model/DAGFolderOutput.cs | 246 ++ .../Model/DAGFolderOutputAlias.cs | 219 ++ src/PollinationSDK/Model/DAGGenericInput.cs | 266 ++ .../Model/DAGGenericInputAlias.cs | 285 ++ src/PollinationSDK/Model/DAGGenericOutput.cs | 225 ++ .../Model/DAGGenericOutputAlias.cs | 242 ++ src/PollinationSDK/Model/DAGIntegerInput.cs | 256 ++ .../Model/DAGIntegerInputAlias.cs | 275 ++ src/PollinationSDK/Model/DAGIntegerOutput.cs | 246 ++ .../Model/DAGIntegerOutputAlias.cs | 219 ++ .../Model/DAGJSONObjectInput.cs | 256 ++ .../Model/DAGJSONObjectInputAlias.cs | 275 ++ .../Model/DAGJSONObjectOutput.cs | 246 ++ .../Model/DAGJSONObjectOutputAlias.cs | 219 ++ .../Model/DAGLinkedInputAlias.cs | 206 + .../Model/DAGLinkedOutputAlias.cs | 200 + src/PollinationSDK/Model/DAGNumberInput.cs | 256 ++ .../Model/DAGNumberInputAlias.cs | 275 ++ src/PollinationSDK/Model/DAGNumberOutput.cs | 246 ++ .../Model/DAGNumberOutputAlias.cs | 219 ++ src/PollinationSDK/Model/DAGPathInput.cs | 273 ++ src/PollinationSDK/Model/DAGPathInputAlias.cs | 292 ++ src/PollinationSDK/Model/DAGPathOutput.cs | 246 ++ .../Model/DAGPathOutputAlias.cs | 219 ++ src/PollinationSDK/Model/DAGStringInput.cs | 214 + .../Model/DAGStringInputAlias.cs | 206 + src/PollinationSDK/Model/DAGStringOutput.cs | 246 ++ .../Model/DAGStringOutputAlias.cs | 219 ++ src/PollinationSDK/Model/DAGTask.cs | 324 ++ src/PollinationSDK/Model/DAGTaskLoop.cs | 213 + src/PollinationSDK/Model/DailyUsage.cs | 270 ++ .../Model/DeleteSubscriptionItem.cs | 209 + src/PollinationSDK/Model/Dependency.cs | 306 ++ src/PollinationSDK/Model/DependencyKind.cs | 49 + src/PollinationSDK/Model/Discount.cs | 255 ++ src/PollinationSDK/Model/DiscountAmount.cs | 221 ++ src/PollinationSDK/Model/DockerConfig.cs | 257 ++ src/PollinationSDK/Model/ExternalResource.cs | 231 ++ src/PollinationSDK/Model/FileMeta.cs | 268 ++ src/PollinationSDK/Model/FileReference.cs | 209 + src/PollinationSDK/Model/FolderReference.cs | 209 + src/PollinationSDK/Model/FromOutput.cs | 223 ++ src/PollinationSDK/Model/Function.cs | 291 ++ .../Model/FunctionArrayInput.cs | 273 ++ .../Model/FunctionArrayOutput.cs | 216 + .../Model/FunctionBooleanInput.cs | 256 ++ .../Model/FunctionBooleanOutput.cs | 210 + src/PollinationSDK/Model/FunctionFileInput.cs | 290 ++ .../Model/FunctionFileOutput.cs | 210 + .../Model/FunctionFolderInput.cs | 273 ++ .../Model/FunctionFolderOutput.cs | 210 + .../Model/FunctionIntegerInput.cs | 256 ++ .../Model/FunctionIntegerOutput.cs | 210 + .../Model/FunctionJSONObjectInput.cs | 256 ++ .../Model/FunctionJSONObjectOutput.cs | 210 + .../Model/FunctionNumberInput.cs | 256 ++ .../Model/FunctionNumberOutput.cs | 210 + src/PollinationSDK/Model/FunctionPathInput.cs | 290 ++ .../Model/FunctionPathOutput.cs | 210 + .../Model/FunctionStringInput.cs | 214 + .../Model/FunctionStringOutput.cs | 210 + src/PollinationSDK/Model/GenericInput.cs | 250 ++ src/PollinationSDK/Model/GenericOutput.cs | 250 ++ src/PollinationSDK/Model/HTTP.cs | 209 + .../Model/HTTPValidationError.cs | 163 + src/PollinationSDK/Model/IOAliasHandler.cs | 274 ++ src/PollinationSDK/Model/IOBase.cs | 241 ++ .../Model/InputFileReference.cs | 194 + .../Model/InputFolderReference.cs | 194 + .../Model/InputPathReference.cs | 194 + src/PollinationSDK/Model/InputReference.cs | 194 + .../Model/InputReferenceBase.cs | 219 ++ src/PollinationSDK/Model/Inventory.cs | 207 + src/PollinationSDK/Model/Invoice.cs | 224 ++ src/PollinationSDK/Model/InvoiceList.cs | 222 ++ src/PollinationSDK/Model/InvoicePreview.cs | 462 +++ src/PollinationSDK/Model/InvoiceStatus.cs | 67 + .../Model/InvoiceStatusTransitions.cs | 240 ++ src/PollinationSDK/Model/ItemReference.cs | 198 + src/PollinationSDK/Model/ItemType.cs | 79 + src/PollinationSDK/Model/Job.cs | 315 ++ src/PollinationSDK/Model/JobArgument.cs | 241 ++ src/PollinationSDK/Model/JobPathArgument.cs | 241 ++ src/PollinationSDK/Model/JobStatus.cs | 409 ++ src/PollinationSDK/Model/JobStatusEnum.cs | 79 + src/PollinationSDK/Model/KeyRequest.cs | 206 + src/PollinationSDK/Model/License.cs | 262 ++ .../Model/LicensePoolAccessPolicy.cs | 223 ++ .../Model/LicensePoolAccessPolicyList.cs | 197 + src/PollinationSDK/Model/LicensePoolList.cs | 207 + .../Model/LicensePoolPolicySubject.cs | 194 + .../Model/LicensePoolPolicySubjectList.cs | 197 + src/PollinationSDK/Model/LicensePoolPublic.cs | 306 ++ src/PollinationSDK/Model/LicensePoolUpdate.cs | 196 + src/PollinationSDK/Model/LicensePublic.cs | 432 ++ src/PollinationSDK/Model/LicenseType.cs | 55 + src/PollinationSDK/Model/LineItem.cs | 292 ++ src/PollinationSDK/Model/LineItemList.cs | 222 ++ src/PollinationSDK/Model/ListResponseMeta.cs | 287 ++ src/PollinationSDK/Model/LocalConfig.cs | 197 + src/PollinationSDK/Model/Location.cs | 270 ++ src/PollinationSDK/Model/Maintainer.cs | 240 ++ src/PollinationSDK/Model/MetaData.cs | 388 ++ src/PollinationSDK/Model/Metadata.cs | 252 ++ src/PollinationSDK/Model/NewPluginPackage.cs | 224 ++ src/PollinationSDK/Model/NewRecipePackage.cs | 224 ++ .../Model/NewSubscriptionItem.cs | 221 ++ .../Model/OpenAPIGenBaseModel.cs | 174 + src/PollinationSDK/Model/Organization.cs | 282 ++ .../Model/OrganizationCreate.cs | 190 + src/PollinationSDK/Model/OrganizationList.cs | 287 ++ .../Model/OrganizationMember.cs | 223 ++ .../Model/OrganizationMemberList.cs | 287 ++ .../Model/OrganizationRoleEnum.cs | 49 + .../Model/OrganizationUpdate.cs | 270 ++ src/PollinationSDK/Model/PackageSortKey.cs | 55 + src/PollinationSDK/Model/PackageVersion.cs | 500 +++ src/PollinationSDK/Model/PathOutput.cs | 239 ++ src/PollinationSDK/Model/PaymentCreate.cs | 196 + src/PollinationSDK/Model/PaymentIntent.cs | 192 + src/PollinationSDK/Model/PaymentMethodList.cs | 287 ++ src/PollinationSDK/Model/PaymentSetup.cs | 192 + src/PollinationSDK/Model/Period.cs | 220 ++ src/PollinationSDK/Model/Permission.cs | 55 + src/PollinationSDK/Model/Plugin.cs | 284 ++ src/PollinationSDK/Model/PluginConfig.cs | 240 ++ src/PollinationSDK/Model/PluginPackage.cs | 220 ++ src/PollinationSDK/Model/PluginPackageList.cs | 287 ++ src/PollinationSDK/Model/PolicySubject.cs | 232 ++ .../Model/PollinationSubscription.cs | 278 ++ src/PollinationSDK/Model/Price.cs | 292 ++ src/PollinationSDK/Model/PriceRecurrence.cs | 237 ++ src/PollinationSDK/Model/PriceTier.cs | 266 ++ src/PollinationSDK/Model/PriceType.cs | 49 + src/PollinationSDK/Model/Product.cs | 250 ++ src/PollinationSDK/Model/ProductFamily.cs | 217 + src/PollinationSDK/Model/Project.cs | 279 ++ .../Model/ProjectAccessPolicy.cs | 223 ++ .../Model/ProjectAccessPolicyList.cs | 287 ++ src/PollinationSDK/Model/ProjectCreate.cs | 250 ++ src/PollinationSDK/Model/ProjectFolder.cs | 198 + src/PollinationSDK/Model/ProjectList.cs | 287 ++ .../Model/ProjectPolicySubject.cs | 194 + .../Model/ProjectRecipeFilter.cs | 240 ++ .../Model/ProjectRecipeFilterList.cs | 287 ++ src/PollinationSDK/Model/ProjectSortKey.cs | 55 + src/PollinationSDK/Model/ProjectUpdate.cs | 228 ++ src/PollinationSDK/Model/PublicAccountList.cs | 287 ++ src/PollinationSDK/Model/Quota.cs | 364 ++ src/PollinationSDK/Model/QuotaExtension.cs | 253 ++ src/PollinationSDK/Model/QuotaList.cs | 287 ++ src/PollinationSDK/Model/QuotaPlan.cs | 255 ++ src/PollinationSDK/Model/QuotaType.cs | 103 + src/PollinationSDK/Model/Recipe.cs | 283 ++ src/PollinationSDK/Model/RecipeInterface.cs | 299 ++ .../Model/RecipeInterfaceList.cs | 287 ++ src/PollinationSDK/Model/RecipePackage.cs | 220 ++ src/PollinationSDK/Model/RecipePackageList.cs | 287 ++ src/PollinationSDK/Model/Repository.cs | 283 ++ .../Model/RepositoryAccessPolicy.cs | 223 ++ .../Model/RepositoryAccessPolicyList.cs | 287 ++ src/PollinationSDK/Model/RepositoryCreate.cs | 225 ++ src/PollinationSDK/Model/RepositoryIndex.cs | 287 ++ src/PollinationSDK/Model/RepositoryList.cs | 287 ++ .../Model/RepositoryMetadata.cs | 278 ++ src/PollinationSDK/Model/RepositoryPackage.cs | 315 ++ .../Model/RepositoryPolicySubject.cs | 194 + src/PollinationSDK/Model/RepositorySortKey.cs | 61 + src/PollinationSDK/Model/RepositoryUpdate.cs | 255 ++ .../Model/RepositoryUserPermissions.cs | 186 + src/PollinationSDK/Model/ResourcesDuration.cs | 210 + src/PollinationSDK/Model/RoleEnum.cs | 49 + src/PollinationSDK/Model/Run.cs | 303 ++ src/PollinationSDK/Model/RunList.cs | 287 ++ src/PollinationSDK/Model/RunMeta.cs | 212 + src/PollinationSDK/Model/RunProgress.cs | 225 ++ src/PollinationSDK/Model/RunResultList.cs | 287 ++ src/PollinationSDK/Model/RunStatus.cs | 414 ++ src/PollinationSDK/Model/RunStatusEnum.cs | 85 + src/PollinationSDK/Model/S3.cs | 259 ++ src/PollinationSDK/Model/S3UploadRequest.cs | 223 ++ .../Model/SecureResourcePublic.cs | 217 + src/PollinationSDK/Model/SortEnum.cs | 49 + src/PollinationSDK/Model/Status.cs | 196 + src/PollinationSDK/Model/StatusType.cs | 61 + src/PollinationSDK/Model/StepArrayInput.cs | 290 ++ src/PollinationSDK/Model/StepArrayOutput.cs | 233 ++ src/PollinationSDK/Model/StepBooleanInput.cs | 271 ++ src/PollinationSDK/Model/StepBooleanOutput.cs | 215 + src/PollinationSDK/Model/StepFileInput.cs | 306 ++ src/PollinationSDK/Model/StepFileOutput.cs | 217 + src/PollinationSDK/Model/StepFolderInput.cs | 289 ++ src/PollinationSDK/Model/StepFolderOutput.cs | 217 + src/PollinationSDK/Model/StepIntegerInput.cs | 271 ++ src/PollinationSDK/Model/StepIntegerOutput.cs | 215 + .../Model/StepJSONObjectInput.cs | 272 ++ .../Model/StepJSONObjectOutput.cs | 216 + src/PollinationSDK/Model/StepList.cs | 287 ++ src/PollinationSDK/Model/StepNumberInput.cs | 271 ++ src/PollinationSDK/Model/StepNumberOutput.cs | 215 + src/PollinationSDK/Model/StepPathInput.cs | 306 ++ src/PollinationSDK/Model/StepPathOutput.cs | 217 + src/PollinationSDK/Model/StepStatus.cs | 458 +++ src/PollinationSDK/Model/StepStatusEnum.cs | 73 + src/PollinationSDK/Model/StepStringInput.cs | 220 ++ src/PollinationSDK/Model/StepStringOutput.cs | 216 + src/PollinationSDK/Model/SubjectType.cs | 49 + src/PollinationSDK/Model/Subscribe.cs | 207 + src/PollinationSDK/Model/Subscription.cs | 342 ++ .../Model/SubscriptionCreate.cs | 197 + src/PollinationSDK/Model/SubscriptionItem.cs | 204 + .../Model/SubscriptionItemList.cs | 222 ++ src/PollinationSDK/Model/SubscriptionPlan.cs | 259 ++ .../Model/SubscriptionUpdate.cs | 263 ++ src/PollinationSDK/Model/TaskArgument.cs | 241 ++ src/PollinationSDK/Model/TaskFileReference.cs | 196 + .../Model/TaskFolderReference.cs | 196 + src/PollinationSDK/Model/TaskPathArgument.cs | 257 ++ src/PollinationSDK/Model/TaskPathReference.cs | 196 + src/PollinationSDK/Model/TaskPathReturn.cs | 200 + src/PollinationSDK/Model/TaskReference.cs | 196 + src/PollinationSDK/Model/TaskReferenceBase.cs | 236 ++ src/PollinationSDK/Model/TaskReturn.cs | 196 + src/PollinationSDK/Model/Team.cs | 244 ++ src/PollinationSDK/Model/TeamCreate.cs | 231 ++ src/PollinationSDK/Model/TeamList.cs | 287 ++ src/PollinationSDK/Model/TeamMember.cs | 223 ++ src/PollinationSDK/Model/TeamMemberList.cs | 287 ++ src/PollinationSDK/Model/TeamRoleEnum.cs | 49 + src/PollinationSDK/Model/TeamUpdate.cs | 204 + src/PollinationSDK/Model/TemplateFunction.cs | 308 ++ src/PollinationSDK/Model/UpdateAccepted.cs | 196 + .../Model/UpdateInvoicePreview.cs | 257 ++ src/PollinationSDK/Model/Usage.cs | 303 ++ src/PollinationSDK/Model/UserCreate.cs | 213 + src/PollinationSDK/Model/UserPermission.cs | 238 ++ src/PollinationSDK/Model/UserPrivate.cs | 289 ++ src/PollinationSDK/Model/UserPublic.cs | 255 ++ src/PollinationSDK/Model/UserPublicList.cs | 287 ++ src/PollinationSDK/Model/UserUpdate.cs | 251 ++ src/PollinationSDK/Model/ValidationError.cs | 203 + .../Model/ValueFileReference.cs | 219 ++ .../Model/ValueFolderReference.cs | 194 + .../Model/ValueListReference.cs | 210 + src/PollinationSDK/Model/ValueReference.cs | 209 + src/PollinationSDK/PollinationSDK.csproj | 6 +- 623 files changed, 112847 insertions(+), 11 deletions(-) create mode 100644 docs/APIToken.md create mode 100644 docs/APITokenCreate.md create mode 100644 docs/APITokenList.md create mode 100644 docs/APITokenPrivate.md create mode 100644 docs/APITokensApi.md create mode 100644 docs/AccessPolicy.md create mode 100644 docs/AccessPolicyList.md create mode 100644 docs/Accessor.md create mode 100644 docs/AccountPublic.md create mode 100644 docs/AccountType.md create mode 100644 docs/AccountsApi.md create mode 100644 docs/Activation.md create mode 100644 docs/ActivationList.md create mode 100644 docs/ArtifactSource.md create mode 100644 docs/ArtifactsApi.md create mode 100644 docs/BakedRecipe.md create mode 100644 docs/BaseList.md create mode 100644 docs/BaseReference.md create mode 100644 docs/BaseStatus.md create mode 100644 docs/BodyPostPluginOwnerPluginsPost.md create mode 100644 docs/BodyPostRecipeOwnerRecipesPost.md create mode 100644 docs/CardPublic.md create mode 100644 docs/CloudJob.md create mode 100644 docs/CloudJobList.md create mode 100644 docs/Coupon.md create mode 100644 docs/CouponDuration.md create mode 100644 docs/CreatedContent.md create mode 100644 docs/CryptlexBase.md create mode 100644 docs/DAG.md create mode 100644 docs/DAGArrayInput.md create mode 100644 docs/DAGArrayInputAlias.md create mode 100644 docs/DAGArrayOutput.md create mode 100644 docs/DAGArrayOutputAlias.md create mode 100644 docs/DAGArtifactOutput.md create mode 100644 docs/DAGArtifactOutputAlias.md create mode 100644 docs/DAGBooleanInput.md create mode 100644 docs/DAGBooleanInputAlias.md create mode 100644 docs/DAGBooleanOutput.md create mode 100644 docs/DAGBooleanOutputAlias.md create mode 100644 docs/DAGFileInput.md create mode 100644 docs/DAGFileInputAlias.md create mode 100644 docs/DAGFileOutput.md create mode 100644 docs/DAGFileOutputAlias.md create mode 100644 docs/DAGFolderInput.md create mode 100644 docs/DAGFolderInputAlias.md create mode 100644 docs/DAGFolderOutput.md create mode 100644 docs/DAGFolderOutputAlias.md create mode 100644 docs/DAGGenericInput.md create mode 100644 docs/DAGGenericInputAlias.md create mode 100644 docs/DAGGenericOutput.md create mode 100644 docs/DAGGenericOutputAlias.md create mode 100644 docs/DAGIntegerInput.md create mode 100644 docs/DAGIntegerInputAlias.md create mode 100644 docs/DAGIntegerOutput.md create mode 100644 docs/DAGIntegerOutputAlias.md create mode 100644 docs/DAGJSONObjectInput.md create mode 100644 docs/DAGJSONObjectInputAlias.md create mode 100644 docs/DAGJSONObjectOutput.md create mode 100644 docs/DAGJSONObjectOutputAlias.md create mode 100644 docs/DAGLinkedInputAlias.md create mode 100644 docs/DAGLinkedOutputAlias.md create mode 100644 docs/DAGNumberInput.md create mode 100644 docs/DAGNumberInputAlias.md create mode 100644 docs/DAGNumberOutput.md create mode 100644 docs/DAGNumberOutputAlias.md create mode 100644 docs/DAGPathInput.md create mode 100644 docs/DAGPathInputAlias.md create mode 100644 docs/DAGPathOutput.md create mode 100644 docs/DAGPathOutputAlias.md create mode 100644 docs/DAGStringInput.md create mode 100644 docs/DAGStringInputAlias.md create mode 100644 docs/DAGStringOutput.md create mode 100644 docs/DAGStringOutputAlias.md create mode 100644 docs/DAGTask.md create mode 100644 docs/DAGTaskLoop.md create mode 100644 docs/DailyUsage.md create mode 100644 docs/DeleteSubscriptionItem.md create mode 100644 docs/Dependency.md create mode 100644 docs/DependencyKind.md create mode 100644 docs/Discount.md create mode 100644 docs/DiscountAmount.md create mode 100644 docs/DockerConfig.md create mode 100644 docs/ExternalResource.md create mode 100644 docs/FileMeta.md create mode 100644 docs/FileReference.md create mode 100644 docs/FolderReference.md create mode 100644 docs/FromOutput.md create mode 100644 docs/Function.md create mode 100644 docs/FunctionArrayInput.md create mode 100644 docs/FunctionArrayOutput.md create mode 100644 docs/FunctionBooleanInput.md create mode 100644 docs/FunctionBooleanOutput.md create mode 100644 docs/FunctionFileInput.md create mode 100644 docs/FunctionFileOutput.md create mode 100644 docs/FunctionFolderInput.md create mode 100644 docs/FunctionFolderOutput.md create mode 100644 docs/FunctionIntegerInput.md create mode 100644 docs/FunctionIntegerOutput.md create mode 100644 docs/FunctionJSONObjectInput.md create mode 100644 docs/FunctionJSONObjectOutput.md create mode 100644 docs/FunctionNumberInput.md create mode 100644 docs/FunctionNumberOutput.md create mode 100644 docs/FunctionPathInput.md create mode 100644 docs/FunctionPathOutput.md create mode 100644 docs/FunctionStringInput.md create mode 100644 docs/FunctionStringOutput.md create mode 100644 docs/GenericInput.md create mode 100644 docs/GenericOutput.md create mode 100644 docs/HTTP.md create mode 100644 docs/HTTPValidationError.md create mode 100644 docs/IOAliasHandler.md create mode 100644 docs/IOBase.md create mode 100644 docs/InputFileReference.md create mode 100644 docs/InputFolderReference.md create mode 100644 docs/InputPathReference.md create mode 100644 docs/InputReference.md create mode 100644 docs/InputReferenceBase.md create mode 100644 docs/Inventory.md create mode 100644 docs/Invoice.md create mode 100644 docs/InvoiceList.md create mode 100644 docs/InvoicePreview.md create mode 100644 docs/InvoiceStatus.md create mode 100644 docs/InvoiceStatusTransitions.md create mode 100644 docs/ItemReference.md create mode 100644 docs/ItemType.md create mode 100644 docs/Job.md create mode 100644 docs/JobArgument.md create mode 100644 docs/JobPathArgument.md create mode 100644 docs/JobStatus.md create mode 100644 docs/JobStatusEnum.md create mode 100644 docs/JobsApi.md create mode 100644 docs/KeyRequest.md create mode 100644 docs/License.md create mode 100644 docs/LicensePoolAccessPolicy.md create mode 100644 docs/LicensePoolAccessPolicyList.md create mode 100644 docs/LicensePoolList.md create mode 100644 docs/LicensePoolPolicySubject.md create mode 100644 docs/LicensePoolPolicySubjectList.md create mode 100644 docs/LicensePoolPublic.md create mode 100644 docs/LicensePoolUpdate.md create mode 100644 docs/LicensePublic.md create mode 100644 docs/LicenseType.md create mode 100644 docs/LicensesApi.md create mode 100644 docs/LineItem.md create mode 100644 docs/LineItemList.md create mode 100644 docs/ListResponseMeta.md create mode 100644 docs/LocalConfig.md create mode 100644 docs/Location.md create mode 100644 docs/Maintainer.md create mode 100644 docs/MetaData.md create mode 100644 docs/Metadata.md create mode 100644 docs/NewPluginPackage.md create mode 100644 docs/NewRecipePackage.md create mode 100644 docs/NewSubscriptionItem.md create mode 100644 docs/OpenAPIGenBaseModel.md create mode 100644 docs/Organization.md create mode 100644 docs/OrganizationCreate.md create mode 100644 docs/OrganizationList.md create mode 100644 docs/OrganizationMember.md create mode 100644 docs/OrganizationMemberList.md create mode 100644 docs/OrganizationRoleEnum.md create mode 100644 docs/OrganizationUpdate.md create mode 100644 docs/OrgsApi.md create mode 100644 docs/PackageSortKey.md create mode 100644 docs/PackageVersion.md create mode 100644 docs/PathOutput.md create mode 100644 docs/PaymentCreate.md create mode 100644 docs/PaymentIntent.md create mode 100644 docs/PaymentMethodList.md create mode 100644 docs/PaymentSetup.md create mode 100644 docs/PaymentsApi.md create mode 100644 docs/Period.md create mode 100644 docs/Permission.md create mode 100644 docs/Plugin.md create mode 100644 docs/PluginConfig.md create mode 100644 docs/PluginPackage.md create mode 100644 docs/PluginPackageList.md create mode 100644 docs/PluginsApi.md create mode 100644 docs/PolicySubject.md create mode 100644 docs/PollinationSubscription.md create mode 100644 docs/Price.md create mode 100644 docs/PriceRecurrence.md create mode 100644 docs/PriceTier.md create mode 100644 docs/PriceType.md create mode 100644 docs/Product.md create mode 100644 docs/ProductFamily.md create mode 100644 docs/Project.md create mode 100644 docs/ProjectAccessPolicy.md create mode 100644 docs/ProjectAccessPolicyList.md create mode 100644 docs/ProjectCreate.md create mode 100644 docs/ProjectFolder.md create mode 100644 docs/ProjectList.md create mode 100644 docs/ProjectPolicySubject.md create mode 100644 docs/ProjectRecipeFilter.md create mode 100644 docs/ProjectRecipeFilterList.md create mode 100644 docs/ProjectSortKey.md create mode 100644 docs/ProjectUpdate.md create mode 100644 docs/ProjectsApi.md create mode 100644 docs/PublicAccountList.md create mode 100644 docs/Quota.md create mode 100644 docs/QuotaExtension.md create mode 100644 docs/QuotaList.md create mode 100644 docs/QuotaPlan.md create mode 100644 docs/QuotaType.md create mode 100644 docs/Recipe.md create mode 100644 docs/RecipeInterface.md create mode 100644 docs/RecipeInterfaceList.md create mode 100644 docs/RecipePackage.md create mode 100644 docs/RecipePackageList.md create mode 100644 docs/RecipesApi.md create mode 100644 docs/RegistriesApi.md create mode 100644 docs/Repository.md create mode 100644 docs/RepositoryAccessPolicy.md create mode 100644 docs/RepositoryAccessPolicyList.md create mode 100644 docs/RepositoryCreate.md create mode 100644 docs/RepositoryIndex.md create mode 100644 docs/RepositoryList.md create mode 100644 docs/RepositoryMetadata.md create mode 100644 docs/RepositoryPackage.md create mode 100644 docs/RepositoryPolicySubject.md create mode 100644 docs/RepositorySortKey.md create mode 100644 docs/RepositoryUpdate.md create mode 100644 docs/RepositoryUserPermissions.md create mode 100644 docs/ResourcesDuration.md create mode 100644 docs/RoleEnum.md create mode 100644 docs/Run.md create mode 100644 docs/RunList.md create mode 100644 docs/RunMeta.md create mode 100644 docs/RunProgress.md create mode 100644 docs/RunResultList.md create mode 100644 docs/RunStatus.md create mode 100644 docs/RunStatusEnum.md create mode 100644 docs/RunsApi.md create mode 100644 docs/S3.md create mode 100644 docs/S3UploadRequest.md create mode 100644 docs/SecureResourcePublic.md create mode 100644 docs/SortEnum.md create mode 100644 docs/Status.md create mode 100644 docs/StatusType.md create mode 100644 docs/StepArrayInput.md create mode 100644 docs/StepArrayOutput.md create mode 100644 docs/StepBooleanInput.md create mode 100644 docs/StepBooleanOutput.md create mode 100644 docs/StepFileInput.md create mode 100644 docs/StepFileOutput.md create mode 100644 docs/StepFolderInput.md create mode 100644 docs/StepFolderOutput.md create mode 100644 docs/StepIntegerInput.md create mode 100644 docs/StepIntegerOutput.md create mode 100644 docs/StepJSONObjectInput.md create mode 100644 docs/StepJSONObjectOutput.md create mode 100644 docs/StepList.md create mode 100644 docs/StepNumberInput.md create mode 100644 docs/StepNumberOutput.md create mode 100644 docs/StepPathInput.md create mode 100644 docs/StepPathOutput.md create mode 100644 docs/StepStatus.md create mode 100644 docs/StepStatusEnum.md create mode 100644 docs/StepStringInput.md create mode 100644 docs/StepStringOutput.md create mode 100644 docs/SubjectType.md create mode 100644 docs/Subscribe.md create mode 100644 docs/Subscription.md create mode 100644 docs/SubscriptionCreate.md create mode 100644 docs/SubscriptionItem.md create mode 100644 docs/SubscriptionItemList.md create mode 100644 docs/SubscriptionPlan.md create mode 100644 docs/SubscriptionUpdate.md create mode 100644 docs/SubscriptionsApi.md create mode 100644 docs/TaskArgument.md create mode 100644 docs/TaskFileReference.md create mode 100644 docs/TaskFolderReference.md create mode 100644 docs/TaskPathArgument.md create mode 100644 docs/TaskPathReference.md create mode 100644 docs/TaskPathReturn.md create mode 100644 docs/TaskReference.md create mode 100644 docs/TaskReferenceBase.md create mode 100644 docs/TaskReturn.md create mode 100644 docs/Team.md create mode 100644 docs/TeamCreate.md create mode 100644 docs/TeamList.md create mode 100644 docs/TeamMember.md create mode 100644 docs/TeamMemberList.md create mode 100644 docs/TeamRoleEnum.md create mode 100644 docs/TeamUpdate.md create mode 100644 docs/TeamsApi.md create mode 100644 docs/TemplateFunction.md create mode 100644 docs/UpdateAccepted.md create mode 100644 docs/UpdateInvoicePreview.md create mode 100644 docs/Usage.md create mode 100644 docs/UserApi.md create mode 100644 docs/UserCreate.md create mode 100644 docs/UserPermission.md create mode 100644 docs/UserPrivate.md create mode 100644 docs/UserPublic.md create mode 100644 docs/UserPublicList.md create mode 100644 docs/UserUpdate.md create mode 100644 docs/UsersApi.md create mode 100644 docs/ValidationError.md create mode 100644 docs/ValueFileReference.md create mode 100644 docs/ValueFolderReference.md create mode 100644 docs/ValueListReference.md create mode 100644 docs/ValueReference.md create mode 100644 src/PollinationSDK/Api/APITokensApi.cs create mode 100644 src/PollinationSDK/Api/AccountsApi.cs create mode 100644 src/PollinationSDK/Api/ArtifactsApi.cs create mode 100644 src/PollinationSDK/Api/JobsApi.cs create mode 100644 src/PollinationSDK/Api/LicensesApi.cs create mode 100644 src/PollinationSDK/Api/OrgsApi.cs create mode 100644 src/PollinationSDK/Api/PaymentsApi.cs create mode 100644 src/PollinationSDK/Api/PluginsApi.cs create mode 100644 src/PollinationSDK/Api/ProjectsApi.cs create mode 100644 src/PollinationSDK/Api/RecipesApi.cs create mode 100644 src/PollinationSDK/Api/RegistriesApi.cs create mode 100644 src/PollinationSDK/Api/RunsApi.cs create mode 100644 src/PollinationSDK/Api/SubscriptionsApi.cs create mode 100644 src/PollinationSDK/Api/TeamsApi.cs create mode 100644 src/PollinationSDK/Api/UserApi.cs create mode 100644 src/PollinationSDK/Api/UsersApi.cs create mode 100644 src/PollinationSDK/Client/ApiClient.cs create mode 100644 src/PollinationSDK/Client/ApiException.cs create mode 100644 src/PollinationSDK/Client/ApiResponse.cs create mode 100644 src/PollinationSDK/Client/Configuration.cs create mode 100644 src/PollinationSDK/Client/ExceptionFactory.cs create mode 100644 src/PollinationSDK/Client/GlobalConfiguration.cs create mode 100644 src/PollinationSDK/Client/IApiAccessor.cs create mode 100644 src/PollinationSDK/Client/IReadableConfiguration.cs create mode 100644 src/PollinationSDK/Client/OpenAPIDateConverter.cs create mode 100644 src/PollinationSDK/Model/APIToken.cs create mode 100644 src/PollinationSDK/Model/APITokenCreate.cs create mode 100644 src/PollinationSDK/Model/APITokenList.cs create mode 100644 src/PollinationSDK/Model/APITokenPrivate.cs create mode 100644 src/PollinationSDK/Model/AccessPolicy.cs create mode 100644 src/PollinationSDK/Model/AccessPolicyList.cs create mode 100644 src/PollinationSDK/Model/Accessor.cs create mode 100644 src/PollinationSDK/Model/AccountPublic.cs create mode 100644 src/PollinationSDK/Model/AccountType.cs create mode 100644 src/PollinationSDK/Model/Activation.cs create mode 100644 src/PollinationSDK/Model/ActivationList.cs create mode 100644 src/PollinationSDK/Model/ArtifactSource.cs create mode 100644 src/PollinationSDK/Model/BakedRecipe.cs create mode 100644 src/PollinationSDK/Model/BaseList.cs create mode 100644 src/PollinationSDK/Model/BaseReference.cs create mode 100644 src/PollinationSDK/Model/BaseStatus.cs create mode 100644 src/PollinationSDK/Model/BodyPostPluginOwnerPluginsPost.cs create mode 100644 src/PollinationSDK/Model/BodyPostRecipeOwnerRecipesPost.cs create mode 100644 src/PollinationSDK/Model/CardPublic.cs create mode 100644 src/PollinationSDK/Model/CloudJob.cs create mode 100644 src/PollinationSDK/Model/CloudJobList.cs create mode 100644 src/PollinationSDK/Model/Coupon.cs create mode 100644 src/PollinationSDK/Model/CouponDuration.cs create mode 100644 src/PollinationSDK/Model/CreatedContent.cs create mode 100644 src/PollinationSDK/Model/CryptlexBase.cs create mode 100644 src/PollinationSDK/Model/DAG.cs create mode 100644 src/PollinationSDK/Model/DAGArrayInput.cs create mode 100644 src/PollinationSDK/Model/DAGArrayInputAlias.cs create mode 100644 src/PollinationSDK/Model/DAGArrayOutput.cs create mode 100644 src/PollinationSDK/Model/DAGArrayOutputAlias.cs create mode 100644 src/PollinationSDK/Model/DAGArtifactOutput.cs create mode 100644 src/PollinationSDK/Model/DAGArtifactOutputAlias.cs create mode 100644 src/PollinationSDK/Model/DAGBooleanInput.cs create mode 100644 src/PollinationSDK/Model/DAGBooleanInputAlias.cs create mode 100644 src/PollinationSDK/Model/DAGBooleanOutput.cs create mode 100644 src/PollinationSDK/Model/DAGBooleanOutputAlias.cs create mode 100644 src/PollinationSDK/Model/DAGFileInput.cs create mode 100644 src/PollinationSDK/Model/DAGFileInputAlias.cs create mode 100644 src/PollinationSDK/Model/DAGFileOutput.cs create mode 100644 src/PollinationSDK/Model/DAGFileOutputAlias.cs create mode 100644 src/PollinationSDK/Model/DAGFolderInput.cs create mode 100644 src/PollinationSDK/Model/DAGFolderInputAlias.cs create mode 100644 src/PollinationSDK/Model/DAGFolderOutput.cs create mode 100644 src/PollinationSDK/Model/DAGFolderOutputAlias.cs create mode 100644 src/PollinationSDK/Model/DAGGenericInput.cs create mode 100644 src/PollinationSDK/Model/DAGGenericInputAlias.cs create mode 100644 src/PollinationSDK/Model/DAGGenericOutput.cs create mode 100644 src/PollinationSDK/Model/DAGGenericOutputAlias.cs create mode 100644 src/PollinationSDK/Model/DAGIntegerInput.cs create mode 100644 src/PollinationSDK/Model/DAGIntegerInputAlias.cs create mode 100644 src/PollinationSDK/Model/DAGIntegerOutput.cs create mode 100644 src/PollinationSDK/Model/DAGIntegerOutputAlias.cs create mode 100644 src/PollinationSDK/Model/DAGJSONObjectInput.cs create mode 100644 src/PollinationSDK/Model/DAGJSONObjectInputAlias.cs create mode 100644 src/PollinationSDK/Model/DAGJSONObjectOutput.cs create mode 100644 src/PollinationSDK/Model/DAGJSONObjectOutputAlias.cs create mode 100644 src/PollinationSDK/Model/DAGLinkedInputAlias.cs create mode 100644 src/PollinationSDK/Model/DAGLinkedOutputAlias.cs create mode 100644 src/PollinationSDK/Model/DAGNumberInput.cs create mode 100644 src/PollinationSDK/Model/DAGNumberInputAlias.cs create mode 100644 src/PollinationSDK/Model/DAGNumberOutput.cs create mode 100644 src/PollinationSDK/Model/DAGNumberOutputAlias.cs create mode 100644 src/PollinationSDK/Model/DAGPathInput.cs create mode 100644 src/PollinationSDK/Model/DAGPathInputAlias.cs create mode 100644 src/PollinationSDK/Model/DAGPathOutput.cs create mode 100644 src/PollinationSDK/Model/DAGPathOutputAlias.cs create mode 100644 src/PollinationSDK/Model/DAGStringInput.cs create mode 100644 src/PollinationSDK/Model/DAGStringInputAlias.cs create mode 100644 src/PollinationSDK/Model/DAGStringOutput.cs create mode 100644 src/PollinationSDK/Model/DAGStringOutputAlias.cs create mode 100644 src/PollinationSDK/Model/DAGTask.cs create mode 100644 src/PollinationSDK/Model/DAGTaskLoop.cs create mode 100644 src/PollinationSDK/Model/DailyUsage.cs create mode 100644 src/PollinationSDK/Model/DeleteSubscriptionItem.cs create mode 100644 src/PollinationSDK/Model/Dependency.cs create mode 100644 src/PollinationSDK/Model/DependencyKind.cs create mode 100644 src/PollinationSDK/Model/Discount.cs create mode 100644 src/PollinationSDK/Model/DiscountAmount.cs create mode 100644 src/PollinationSDK/Model/DockerConfig.cs create mode 100644 src/PollinationSDK/Model/ExternalResource.cs create mode 100644 src/PollinationSDK/Model/FileMeta.cs create mode 100644 src/PollinationSDK/Model/FileReference.cs create mode 100644 src/PollinationSDK/Model/FolderReference.cs create mode 100644 src/PollinationSDK/Model/FromOutput.cs create mode 100644 src/PollinationSDK/Model/Function.cs create mode 100644 src/PollinationSDK/Model/FunctionArrayInput.cs create mode 100644 src/PollinationSDK/Model/FunctionArrayOutput.cs create mode 100644 src/PollinationSDK/Model/FunctionBooleanInput.cs create mode 100644 src/PollinationSDK/Model/FunctionBooleanOutput.cs create mode 100644 src/PollinationSDK/Model/FunctionFileInput.cs create mode 100644 src/PollinationSDK/Model/FunctionFileOutput.cs create mode 100644 src/PollinationSDK/Model/FunctionFolderInput.cs create mode 100644 src/PollinationSDK/Model/FunctionFolderOutput.cs create mode 100644 src/PollinationSDK/Model/FunctionIntegerInput.cs create mode 100644 src/PollinationSDK/Model/FunctionIntegerOutput.cs create mode 100644 src/PollinationSDK/Model/FunctionJSONObjectInput.cs create mode 100644 src/PollinationSDK/Model/FunctionJSONObjectOutput.cs create mode 100644 src/PollinationSDK/Model/FunctionNumberInput.cs create mode 100644 src/PollinationSDK/Model/FunctionNumberOutput.cs create mode 100644 src/PollinationSDK/Model/FunctionPathInput.cs create mode 100644 src/PollinationSDK/Model/FunctionPathOutput.cs create mode 100644 src/PollinationSDK/Model/FunctionStringInput.cs create mode 100644 src/PollinationSDK/Model/FunctionStringOutput.cs create mode 100644 src/PollinationSDK/Model/GenericInput.cs create mode 100644 src/PollinationSDK/Model/GenericOutput.cs create mode 100644 src/PollinationSDK/Model/HTTP.cs create mode 100644 src/PollinationSDK/Model/HTTPValidationError.cs create mode 100644 src/PollinationSDK/Model/IOAliasHandler.cs create mode 100644 src/PollinationSDK/Model/IOBase.cs create mode 100644 src/PollinationSDK/Model/InputFileReference.cs create mode 100644 src/PollinationSDK/Model/InputFolderReference.cs create mode 100644 src/PollinationSDK/Model/InputPathReference.cs create mode 100644 src/PollinationSDK/Model/InputReference.cs create mode 100644 src/PollinationSDK/Model/InputReferenceBase.cs create mode 100644 src/PollinationSDK/Model/Inventory.cs create mode 100644 src/PollinationSDK/Model/Invoice.cs create mode 100644 src/PollinationSDK/Model/InvoiceList.cs create mode 100644 src/PollinationSDK/Model/InvoicePreview.cs create mode 100644 src/PollinationSDK/Model/InvoiceStatus.cs create mode 100644 src/PollinationSDK/Model/InvoiceStatusTransitions.cs create mode 100644 src/PollinationSDK/Model/ItemReference.cs create mode 100644 src/PollinationSDK/Model/ItemType.cs create mode 100644 src/PollinationSDK/Model/Job.cs create mode 100644 src/PollinationSDK/Model/JobArgument.cs create mode 100644 src/PollinationSDK/Model/JobPathArgument.cs create mode 100644 src/PollinationSDK/Model/JobStatus.cs create mode 100644 src/PollinationSDK/Model/JobStatusEnum.cs create mode 100644 src/PollinationSDK/Model/KeyRequest.cs create mode 100644 src/PollinationSDK/Model/License.cs create mode 100644 src/PollinationSDK/Model/LicensePoolAccessPolicy.cs create mode 100644 src/PollinationSDK/Model/LicensePoolAccessPolicyList.cs create mode 100644 src/PollinationSDK/Model/LicensePoolList.cs create mode 100644 src/PollinationSDK/Model/LicensePoolPolicySubject.cs create mode 100644 src/PollinationSDK/Model/LicensePoolPolicySubjectList.cs create mode 100644 src/PollinationSDK/Model/LicensePoolPublic.cs create mode 100644 src/PollinationSDK/Model/LicensePoolUpdate.cs create mode 100644 src/PollinationSDK/Model/LicensePublic.cs create mode 100644 src/PollinationSDK/Model/LicenseType.cs create mode 100644 src/PollinationSDK/Model/LineItem.cs create mode 100644 src/PollinationSDK/Model/LineItemList.cs create mode 100644 src/PollinationSDK/Model/ListResponseMeta.cs create mode 100644 src/PollinationSDK/Model/LocalConfig.cs create mode 100644 src/PollinationSDK/Model/Location.cs create mode 100644 src/PollinationSDK/Model/Maintainer.cs create mode 100644 src/PollinationSDK/Model/MetaData.cs create mode 100644 src/PollinationSDK/Model/Metadata.cs create mode 100644 src/PollinationSDK/Model/NewPluginPackage.cs create mode 100644 src/PollinationSDK/Model/NewRecipePackage.cs create mode 100644 src/PollinationSDK/Model/NewSubscriptionItem.cs create mode 100644 src/PollinationSDK/Model/OpenAPIGenBaseModel.cs create mode 100644 src/PollinationSDK/Model/Organization.cs create mode 100644 src/PollinationSDK/Model/OrganizationCreate.cs create mode 100644 src/PollinationSDK/Model/OrganizationList.cs create mode 100644 src/PollinationSDK/Model/OrganizationMember.cs create mode 100644 src/PollinationSDK/Model/OrganizationMemberList.cs create mode 100644 src/PollinationSDK/Model/OrganizationRoleEnum.cs create mode 100644 src/PollinationSDK/Model/OrganizationUpdate.cs create mode 100644 src/PollinationSDK/Model/PackageSortKey.cs create mode 100644 src/PollinationSDK/Model/PackageVersion.cs create mode 100644 src/PollinationSDK/Model/PathOutput.cs create mode 100644 src/PollinationSDK/Model/PaymentCreate.cs create mode 100644 src/PollinationSDK/Model/PaymentIntent.cs create mode 100644 src/PollinationSDK/Model/PaymentMethodList.cs create mode 100644 src/PollinationSDK/Model/PaymentSetup.cs create mode 100644 src/PollinationSDK/Model/Period.cs create mode 100644 src/PollinationSDK/Model/Permission.cs create mode 100644 src/PollinationSDK/Model/Plugin.cs create mode 100644 src/PollinationSDK/Model/PluginConfig.cs create mode 100644 src/PollinationSDK/Model/PluginPackage.cs create mode 100644 src/PollinationSDK/Model/PluginPackageList.cs create mode 100644 src/PollinationSDK/Model/PolicySubject.cs create mode 100644 src/PollinationSDK/Model/PollinationSubscription.cs create mode 100644 src/PollinationSDK/Model/Price.cs create mode 100644 src/PollinationSDK/Model/PriceRecurrence.cs create mode 100644 src/PollinationSDK/Model/PriceTier.cs create mode 100644 src/PollinationSDK/Model/PriceType.cs create mode 100644 src/PollinationSDK/Model/Product.cs create mode 100644 src/PollinationSDK/Model/ProductFamily.cs create mode 100644 src/PollinationSDK/Model/Project.cs create mode 100644 src/PollinationSDK/Model/ProjectAccessPolicy.cs create mode 100644 src/PollinationSDK/Model/ProjectAccessPolicyList.cs create mode 100644 src/PollinationSDK/Model/ProjectCreate.cs create mode 100644 src/PollinationSDK/Model/ProjectFolder.cs create mode 100644 src/PollinationSDK/Model/ProjectList.cs create mode 100644 src/PollinationSDK/Model/ProjectPolicySubject.cs create mode 100644 src/PollinationSDK/Model/ProjectRecipeFilter.cs create mode 100644 src/PollinationSDK/Model/ProjectRecipeFilterList.cs create mode 100644 src/PollinationSDK/Model/ProjectSortKey.cs create mode 100644 src/PollinationSDK/Model/ProjectUpdate.cs create mode 100644 src/PollinationSDK/Model/PublicAccountList.cs create mode 100644 src/PollinationSDK/Model/Quota.cs create mode 100644 src/PollinationSDK/Model/QuotaExtension.cs create mode 100644 src/PollinationSDK/Model/QuotaList.cs create mode 100644 src/PollinationSDK/Model/QuotaPlan.cs create mode 100644 src/PollinationSDK/Model/QuotaType.cs create mode 100644 src/PollinationSDK/Model/Recipe.cs create mode 100644 src/PollinationSDK/Model/RecipeInterface.cs create mode 100644 src/PollinationSDK/Model/RecipeInterfaceList.cs create mode 100644 src/PollinationSDK/Model/RecipePackage.cs create mode 100644 src/PollinationSDK/Model/RecipePackageList.cs create mode 100644 src/PollinationSDK/Model/Repository.cs create mode 100644 src/PollinationSDK/Model/RepositoryAccessPolicy.cs create mode 100644 src/PollinationSDK/Model/RepositoryAccessPolicyList.cs create mode 100644 src/PollinationSDK/Model/RepositoryCreate.cs create mode 100644 src/PollinationSDK/Model/RepositoryIndex.cs create mode 100644 src/PollinationSDK/Model/RepositoryList.cs create mode 100644 src/PollinationSDK/Model/RepositoryMetadata.cs create mode 100644 src/PollinationSDK/Model/RepositoryPackage.cs create mode 100644 src/PollinationSDK/Model/RepositoryPolicySubject.cs create mode 100644 src/PollinationSDK/Model/RepositorySortKey.cs create mode 100644 src/PollinationSDK/Model/RepositoryUpdate.cs create mode 100644 src/PollinationSDK/Model/RepositoryUserPermissions.cs create mode 100644 src/PollinationSDK/Model/ResourcesDuration.cs create mode 100644 src/PollinationSDK/Model/RoleEnum.cs create mode 100644 src/PollinationSDK/Model/Run.cs create mode 100644 src/PollinationSDK/Model/RunList.cs create mode 100644 src/PollinationSDK/Model/RunMeta.cs create mode 100644 src/PollinationSDK/Model/RunProgress.cs create mode 100644 src/PollinationSDK/Model/RunResultList.cs create mode 100644 src/PollinationSDK/Model/RunStatus.cs create mode 100644 src/PollinationSDK/Model/RunStatusEnum.cs create mode 100644 src/PollinationSDK/Model/S3.cs create mode 100644 src/PollinationSDK/Model/S3UploadRequest.cs create mode 100644 src/PollinationSDK/Model/SecureResourcePublic.cs create mode 100644 src/PollinationSDK/Model/SortEnum.cs create mode 100644 src/PollinationSDK/Model/Status.cs create mode 100644 src/PollinationSDK/Model/StatusType.cs create mode 100644 src/PollinationSDK/Model/StepArrayInput.cs create mode 100644 src/PollinationSDK/Model/StepArrayOutput.cs create mode 100644 src/PollinationSDK/Model/StepBooleanInput.cs create mode 100644 src/PollinationSDK/Model/StepBooleanOutput.cs create mode 100644 src/PollinationSDK/Model/StepFileInput.cs create mode 100644 src/PollinationSDK/Model/StepFileOutput.cs create mode 100644 src/PollinationSDK/Model/StepFolderInput.cs create mode 100644 src/PollinationSDK/Model/StepFolderOutput.cs create mode 100644 src/PollinationSDK/Model/StepIntegerInput.cs create mode 100644 src/PollinationSDK/Model/StepIntegerOutput.cs create mode 100644 src/PollinationSDK/Model/StepJSONObjectInput.cs create mode 100644 src/PollinationSDK/Model/StepJSONObjectOutput.cs create mode 100644 src/PollinationSDK/Model/StepList.cs create mode 100644 src/PollinationSDK/Model/StepNumberInput.cs create mode 100644 src/PollinationSDK/Model/StepNumberOutput.cs create mode 100644 src/PollinationSDK/Model/StepPathInput.cs create mode 100644 src/PollinationSDK/Model/StepPathOutput.cs create mode 100644 src/PollinationSDK/Model/StepStatus.cs create mode 100644 src/PollinationSDK/Model/StepStatusEnum.cs create mode 100644 src/PollinationSDK/Model/StepStringInput.cs create mode 100644 src/PollinationSDK/Model/StepStringOutput.cs create mode 100644 src/PollinationSDK/Model/SubjectType.cs create mode 100644 src/PollinationSDK/Model/Subscribe.cs create mode 100644 src/PollinationSDK/Model/Subscription.cs create mode 100644 src/PollinationSDK/Model/SubscriptionCreate.cs create mode 100644 src/PollinationSDK/Model/SubscriptionItem.cs create mode 100644 src/PollinationSDK/Model/SubscriptionItemList.cs create mode 100644 src/PollinationSDK/Model/SubscriptionPlan.cs create mode 100644 src/PollinationSDK/Model/SubscriptionUpdate.cs create mode 100644 src/PollinationSDK/Model/TaskArgument.cs create mode 100644 src/PollinationSDK/Model/TaskFileReference.cs create mode 100644 src/PollinationSDK/Model/TaskFolderReference.cs create mode 100644 src/PollinationSDK/Model/TaskPathArgument.cs create mode 100644 src/PollinationSDK/Model/TaskPathReference.cs create mode 100644 src/PollinationSDK/Model/TaskPathReturn.cs create mode 100644 src/PollinationSDK/Model/TaskReference.cs create mode 100644 src/PollinationSDK/Model/TaskReferenceBase.cs create mode 100644 src/PollinationSDK/Model/TaskReturn.cs create mode 100644 src/PollinationSDK/Model/Team.cs create mode 100644 src/PollinationSDK/Model/TeamCreate.cs create mode 100644 src/PollinationSDK/Model/TeamList.cs create mode 100644 src/PollinationSDK/Model/TeamMember.cs create mode 100644 src/PollinationSDK/Model/TeamMemberList.cs create mode 100644 src/PollinationSDK/Model/TeamRoleEnum.cs create mode 100644 src/PollinationSDK/Model/TeamUpdate.cs create mode 100644 src/PollinationSDK/Model/TemplateFunction.cs create mode 100644 src/PollinationSDK/Model/UpdateAccepted.cs create mode 100644 src/PollinationSDK/Model/UpdateInvoicePreview.cs create mode 100644 src/PollinationSDK/Model/Usage.cs create mode 100644 src/PollinationSDK/Model/UserCreate.cs create mode 100644 src/PollinationSDK/Model/UserPermission.cs create mode 100644 src/PollinationSDK/Model/UserPrivate.cs create mode 100644 src/PollinationSDK/Model/UserPublic.cs create mode 100644 src/PollinationSDK/Model/UserPublicList.cs create mode 100644 src/PollinationSDK/Model/UserUpdate.cs create mode 100644 src/PollinationSDK/Model/ValidationError.cs create mode 100644 src/PollinationSDK/Model/ValueFileReference.cs create mode 100644 src/PollinationSDK/Model/ValueFolderReference.cs create mode 100644 src/PollinationSDK/Model/ValueListReference.cs create mode 100644 src/PollinationSDK/Model/ValueReference.cs 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/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/APIToken.md b/docs/APIToken.md new file mode 100644 index 000000000..17e3116cb --- /dev/null +++ b/docs/APIToken.md @@ -0,0 +1,16 @@ + +# PollinationSDK.Model.APIToken + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**TokenId** | **string** | The unique ID of this API token | +**Name** | **string** | The user friendly name of the API token | +**Claims** | **Dictionary<string, string>** | Key value pairs of auth claims the API token is entitled to | [optional] +**Type** | **string** | | [optional] [readonly] [default to "APIToken"] + +[[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/APITokenCreate.md b/docs/APITokenCreate.md new file mode 100644 index 000000000..33cf59dae --- /dev/null +++ b/docs/APITokenCreate.md @@ -0,0 +1,16 @@ + +# PollinationSDK.Model.APITokenCreate + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**TokenId** | **string** | The unique ID of this API token | +**Name** | **string** | The user friendly name of the API token | +**Claims** | **Dictionary<string, string>** | Key value pairs of auth claims the API token is entitled to | [optional] +**Type** | **string** | | [optional] [readonly] [default to "APITokenCreate"] + +[[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/APITokenList.md b/docs/APITokenList.md new file mode 100644 index 000000000..f324aca90 --- /dev/null +++ b/docs/APITokenList.md @@ -0,0 +1,19 @@ + +# PollinationSDK.Model.APITokenList + +## 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<APIToken>**](APIToken.md) | | +**NextPage** | **int** | The next page, if this on is not the last | [optional] +**Type** | **string** | | [optional] [readonly] [default to "APITokenList"] + +[[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/APITokenPrivate.md b/docs/APITokenPrivate.md new file mode 100644 index 000000000..70c719cf7 --- /dev/null +++ b/docs/APITokenPrivate.md @@ -0,0 +1,14 @@ + +# PollinationSDK.Model.APITokenPrivate + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Token** | **string** | The decoded API token | +**Type** | **string** | | [optional] [readonly] [default to "APITokenPrivate"] + +[[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/APITokensApi.md b/docs/APITokensApi.md new file mode 100644 index 000000000..9bc7b3181 --- /dev/null +++ b/docs/APITokensApi.md @@ -0,0 +1,346 @@ +# PollinationSDK.Api.APITokensApi + +All URIs are relative to *http://localhost* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**CreateToken**](APITokensApi.md#createtoken) | **POST** /tokens | Create a new API token +[**DeleteToken**](APITokensApi.md#deletetoken) | **DELETE** /tokens/{token_id} | Delete an API Token +[**ListTokens**](APITokensApi.md#listtokens) | **GET** /tokens | List user API tokens +[**RegenerateToken**](APITokensApi.md#regeneratetoken) | **PUT** /tokens/{token_id} | Regenerate an API token + + + +## CreateToken + +> APITokenPrivate CreateToken (APITokenCreate aPITokenCreate) + +Create a new API token + +Create a new API token + +### Example + +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using PollinationSDK.Api; +using PollinationSDK.Client; +using PollinationSDK.Model; + +namespace Example +{ + public class CreateTokenExample + { + 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 APITokensApi(Configuration.Default); + var aPITokenCreate = new APITokenCreate(); // APITokenCreate | + + try + { + // Create a new API token + APITokenPrivate result = apiInstance.CreateToken(aPITokenCreate); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling APITokensApi.CreateToken: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **aPITokenCreate** | [**APITokenCreate**](APITokenCreate.md)| | + +### Return type + +[**APITokenPrivate**](APITokenPrivate.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 | +|-------------|-------------|------------------| +| **201** | 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) + + +## DeleteToken + +> AnyType DeleteToken (string tokenId) + +Delete an API Token + +Delete a token + +### Example + +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using PollinationSDK.Api; +using PollinationSDK.Client; +using PollinationSDK.Model; + +namespace Example +{ + public class DeleteTokenExample + { + 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 APITokensApi(Configuration.Default); + var tokenId = tokenId_example; // string | + + try + { + // Delete an API Token + AnyType result = apiInstance.DeleteToken(tokenId); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling APITokensApi.DeleteToken: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tokenId** | **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** | 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) + + +## ListTokens + +> APITokenList ListTokens (int? page = null, int? perPage = null) + +List user API tokens + +List API tokens for the authenticated user + +### Example + +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using PollinationSDK.Api; +using PollinationSDK.Client; +using PollinationSDK.Model; + +namespace Example +{ + public class ListTokensExample + { + 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 APITokensApi(Configuration.Default); + 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 user API tokens + APITokenList result = apiInstance.ListTokens(page, perPage); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling APITokensApi.ListTokens: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **page** | **int?**| Page number starting from 1 | [optional] [default to 1] + **perPage** | **int?**| Number of items per page | [optional] [default to 25] + +### Return type + +[**APITokenList**](APITokenList.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) + + +## RegenerateToken + +> APITokenPrivate RegenerateToken (string tokenId) + +Regenerate an API token + +Regenerate a token + +### Example + +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using PollinationSDK.Api; +using PollinationSDK.Client; +using PollinationSDK.Model; + +namespace Example +{ + public class RegenerateTokenExample + { + 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 APITokensApi(Configuration.Default); + var tokenId = tokenId_example; // string | + + try + { + // Regenerate an API token + APITokenPrivate result = apiInstance.RegenerateToken(tokenId); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling APITokensApi.RegenerateToken: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tokenId** | **string**| | + +### Return type + +[**APITokenPrivate**](APITokenPrivate.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 | +|-------------|-------------|------------------| +| **201** | 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/AccessPolicy.md b/docs/AccessPolicy.md new file mode 100644 index 000000000..759e89854 --- /dev/null +++ b/docs/AccessPolicy.md @@ -0,0 +1,15 @@ + +# PollinationSDK.Model.AccessPolicy + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Subject** | [**PolicySubject**](PolicySubject.md) | The subject of the access policy | +**Permission** | **Permission** | The permission given to the subject of the access policy | +**Type** | **string** | | [optional] [readonly] [default to "AccessPolicy"] + +[[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/AccessPolicyList.md b/docs/AccessPolicyList.md new file mode 100644 index 000000000..37fbd5f88 --- /dev/null +++ b/docs/AccessPolicyList.md @@ -0,0 +1,19 @@ + +# PollinationSDK.Model.AccessPolicyList + +## 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<AccessPolicy>**](AccessPolicy.md) | | +**NextPage** | **int** | The next page, if this on is not the last | [optional] +**Type** | **string** | | [optional] [readonly] [default to "AccessPolicyList"] + +[[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/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/AccountPublic.md b/docs/AccountPublic.md new file mode 100644 index 000000000..123db7a3c --- /dev/null +++ b/docs/AccountPublic.md @@ -0,0 +1,19 @@ + +# PollinationSDK.Model.AccountPublic + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **string** | | +**AccountType** | **string** | | +**Name** | **string** | | +**DisplayName** | **string** | | [optional] +**Description** | **string** | | [optional] +**PictureUrl** | **string** | https://robohash.org/ladybugbot | [optional] +**Type** | **string** | | [optional] [readonly] [default to "AccountPublic"] + +[[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 new file mode 100644 index 000000000..9c30f1a49 --- /dev/null +++ b/docs/AccountsApi.md @@ -0,0 +1,349 @@ +# PollinationSDK.Api.AccountsApi + +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) + +Get an account by name + +Retrieve an account by name + +### Example + +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using PollinationSDK.Api; +using PollinationSDK.Client; +using PollinationSDK.Model; + +namespace Example +{ + public class GetAccountExample + { + public static void Main() + { + Configuration.Default.BasePath = "http://localhost"; + var apiInstance = new AccountsApi(Configuration.Default); + var name = name_example; // string | + + try + { + // Get an account by name + AccountPublic result = apiInstance.GetAccount(name); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling AccountsApi.GetAccount: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **name** | **string**| | + +### Return type + +[**AccountPublic**](AccountPublic.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Retrieved | - | +| **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) + + +## ListAccounts + +> PublicAccountList ListAccounts (string search = null, string type = null, RoleEnum? role = null, int? page = null, int? perPage = null) + +List Accounts on the Pollination platform + +List accounts + +### Example + +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using PollinationSDK.Api; +using PollinationSDK.Client; +using PollinationSDK.Model; + +namespace Example +{ + public class ListAccountsExample + { + 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 search = search_example; // string | Search string to find accounts (optional) + var type = type_example; // string | Whether the account is for a user or an org (optional) + var role = ; // RoleEnum? | The role the user has in relation to this account (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 Accounts on the Pollination platform + PublicAccountList result = apiInstance.ListAccounts(search, type, role, page, perPage); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling AccountsApi.ListAccounts: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **search** | **string**| Search string to find accounts | [optional] + **type** | **string**| Whether the account is for a user or an org | [optional] + **role** | **RoleEnum?**| The role the user has in relation to this account | [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 + +[**PublicAccountList**](PublicAccountList.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 | - | +| **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) + + +## 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/ArtifactSource.md b/docs/ArtifactSource.md new file mode 100644 index 000000000..ec2495bb4 --- /dev/null +++ b/docs/ArtifactSource.md @@ -0,0 +1,14 @@ + +# PollinationSDK.Model.ArtifactSource + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Type** | **string** | | [optional] [readonly] [default to "_ArtifactSource"] +**Annotations** | **Dictionary<string, string>** | An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries. | [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/ArtifactsApi.md b/docs/ArtifactsApi.md new file mode 100644 index 000000000..f7ed1a535 --- /dev/null +++ b/docs/ArtifactsApi.md @@ -0,0 +1,363 @@ +# PollinationSDK.Api.ArtifactsApi + +All URIs are relative to *http://localhost* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**CreateArtifact**](ArtifactsApi.md#createartifact) | **POST** /projects/{owner}/{name}/artifacts | Get an Artifact upload link. +[**DeleteArtifact**](ArtifactsApi.md#deleteartifact) | **DELETE** /projects/{owner}/{name}/artifacts | Delete one or many artifacts by key/prefix +[**DownloadArtifact**](ArtifactsApi.md#downloadartifact) | **GET** /projects/{owner}/{name}/artifacts/download | Download an artifact from the project folder +[**ListArtifacts**](ArtifactsApi.md#listartifacts) | **GET** /projects/{owner}/{name}/artifacts | List artifacts in a project folder + + + +## CreateArtifact + +> S3UploadRequest CreateArtifact (string owner, string name, KeyRequest keyRequest) + +Get an Artifact upload link. + +### Example + +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using PollinationSDK.Api; +using PollinationSDK.Client; +using PollinationSDK.Model; + +namespace Example +{ + public class CreateArtifactExample + { + 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 ArtifactsApi(Configuration.Default); + var owner = owner_example; // string | + var name = name_example; // string | + var keyRequest = new KeyRequest(); // KeyRequest | + + try + { + // Get an Artifact upload link. + S3UploadRequest result = apiInstance.CreateArtifact(owner, name, keyRequest); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling ArtifactsApi.CreateArtifact: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **string**| | + **name** | **string**| | + **keyRequest** | [**KeyRequest**](KeyRequest.md)| | + +### Return type + +[**S3UploadRequest**](S3UploadRequest.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) + + +## DeleteArtifact + +> void DeleteArtifact (string owner, string name, List path = null, int? page = null, int? perPage = null) + +Delete one or many artifacts by key/prefix + +### Example + +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using PollinationSDK.Api; +using PollinationSDK.Client; +using PollinationSDK.Model; + +namespace Example +{ + public class DeleteArtifactExample + { + 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 ArtifactsApi(Configuration.Default); + var owner = owner_example; // string | + var name = name_example; // string | + var path = new List(); // List | The path to an file within a project folder (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 + { + // Delete one or many artifacts by key/prefix + apiInstance.DeleteArtifact(owner, name, path, page, perPage); + } + catch (ApiException e) + { + Debug.Print("Exception when calling ArtifactsApi.DeleteArtifact: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **string**| | + **name** | **string**| | + **path** | [**List<string>**](string.md)| The path to an file within a project folder | [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 + +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) + + +## DownloadArtifact + +> AnyType DownloadArtifact (string owner, string name, string path = null) + +Download an artifact from the project folder + +### Example + +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using PollinationSDK.Api; +using PollinationSDK.Client; +using PollinationSDK.Model; + +namespace Example +{ + public class DownloadArtifactExample + { + 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 ArtifactsApi(Configuration.Default); + var owner = owner_example; // string | + var name = name_example; // string | + var path = path_example; // string | The path to an file within a project folder (optional) + + try + { + // Download an artifact from the project folder + AnyType result = apiInstance.DownloadArtifact(owner, name, path); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling ArtifactsApi.DownloadArtifact: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **string**| | + **name** | **string**| | + **path** | **string**| The path to an file within a project folder | [optional] + +### 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** | Retrieved | - | +| **403** | Access forbidden | - | +| **500** | Server error | - | +| **400** | Invalid request | - | +| **404** | Not found | - | +| **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) + + +## ListArtifacts + +> List<FileMeta> ListArtifacts (string owner, string name, List path = null, int? page = null, int? perPage = null) + +List artifacts in a project folder + +### Example + +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using PollinationSDK.Api; +using PollinationSDK.Client; +using PollinationSDK.Model; + +namespace Example +{ + public class ListArtifactsExample + { + 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 ArtifactsApi(Configuration.Default); + var owner = owner_example; // string | + var name = name_example; // string | + var path = new List(); // List | The path to an file within a project folder (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 artifacts in a project folder + List result = apiInstance.ListArtifacts(owner, name, path, page, perPage); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling ArtifactsApi.ListArtifacts: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **string**| | + **name** | **string**| | + **path** | [**List<string>**](string.md)| The path to an file within a project folder | [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 + +[**List<FileMeta>**](FileMeta.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 | - | +| **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/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/BaseReference.md b/docs/BaseReference.md new file mode 100644 index 000000000..0dfe2a4b3 --- /dev/null +++ b/docs/BaseReference.md @@ -0,0 +1,14 @@ + +# PollinationSDK.Model.BaseReference + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Type** | **string** | | [optional] [readonly] [default to "_BaseReference"] +**Annotations** | **Dictionary<string, string>** | An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries. | [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/BaseStatus.md b/docs/BaseStatus.md new file mode 100644 index 000000000..d88a51243 --- /dev/null +++ b/docs/BaseStatus.md @@ -0,0 +1,20 @@ + +# PollinationSDK.Model.BaseStatus + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**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<AnyType>**](AnyType.md) | Place-holder. Overwrite this! | [optional] +**Outputs** | [**List<AnyType>**](AnyType.md) | Place-holder. Overwrite this! | [optional] +**StartedAt** | **DateTime** | The time at which the task was started | +**Message** | **string** | Any message produced by the task. Usually error/debugging hints. | [optional] +**FinishedAt** | **DateTime** | The time at which the task was completed | [optional] +**Source** | **string** | Source url for the status object. It can be a recipe or a function. | [optional] +**Type** | **string** | | [optional] [readonly] [default to "BaseStatus"] + +[[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/BodyPostPluginOwnerPluginsPost.md b/docs/BodyPostPluginOwnerPluginsPost.md new file mode 100644 index 000000000..83f4f208a --- /dev/null +++ b/docs/BodyPostPluginOwnerPluginsPost.md @@ -0,0 +1,14 @@ + +# PollinationSDK.Model.BodyPostPluginOwnerPluginsPost + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Package** | **System.IO.Stream** | | +**Type** | **string** | | [optional] [readonly] [default to "Body_post_plugin__owner__plugins_post"] + +[[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/BodyPostRecipeOwnerRecipesPost.md b/docs/BodyPostRecipeOwnerRecipesPost.md new file mode 100644 index 000000000..51823c7b9 --- /dev/null +++ b/docs/BodyPostRecipeOwnerRecipesPost.md @@ -0,0 +1,14 @@ + +# PollinationSDK.Model.BodyPostRecipeOwnerRecipesPost + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Package** | **System.IO.Stream** | | +**Type** | **string** | | [optional] [readonly] [default to "Body_post_recipe__owner__recipes_post"] + +[[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/CloudJob.md b/docs/CloudJob.md new file mode 100644 index 000000000..a7d3b422d --- /dev/null +++ b/docs/CloudJob.md @@ -0,0 +1,19 @@ + +# PollinationSDK.Model.CloudJob + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **string** | The unique ID for this run | +**Spec** | [**Job**](Job.md) | The job specification | +**Author** | [**AccountPublic**](AccountPublic.md) | author | [optional] +**Owner** | [**AccountPublic**](AccountPublic.md) | owner | [optional] +**Recipe** | [**RecipeInterface**](RecipeInterface.md) | The recipe used to generate this | [optional] +**Status** | [**JobStatus**](JobStatus.md) | The status of the job | [optional] +**Type** | **string** | | [optional] [readonly] [default to "CloudJob"] + +[[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/CloudJobList.md b/docs/CloudJobList.md new file mode 100644 index 000000000..a1380f6d8 --- /dev/null +++ b/docs/CloudJobList.md @@ -0,0 +1,19 @@ + +# PollinationSDK.Model.CloudJobList + +## 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<CloudJob>**](CloudJob.md) | | +**NextPage** | **int** | The next page, if this on is not the last | [optional] +**Type** | **string** | | [optional] [readonly] [default to "CloudJobList"] + +[[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/CreatedContent.md b/docs/CreatedContent.md new file mode 100644 index 000000000..cb0f3f8f4 --- /dev/null +++ b/docs/CreatedContent.md @@ -0,0 +1,15 @@ + +# PollinationSDK.Model.CreatedContent + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **Guid** | Id for the newly created resource. | +**Message** | **string** | A human readable message | [optional] +**Type** | **string** | | [optional] [readonly] [default to "CreatedContent"] + +[[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/DAG.md b/docs/DAG.md new file mode 100644 index 000000000..5de5d74d7 --- /dev/null +++ b/docs/DAG.md @@ -0,0 +1,19 @@ + +# PollinationSDK.Model.DAG + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | A unique name for this dag. | +**Tasks** | [**List<DAGTask>**](DAGTask.md) | Tasks are a list of DAG steps | +**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<AnyOfDAGGenericInputDAGStringInputDAGIntegerInputDAGNumberInputDAGBooleanInputDAGFolderInputDAGFileInputDAGPathInputDAGArrayInputDAGJSONObjectInput>**](AnyOfDAGGenericInputDAGStringInputDAGIntegerInputDAGNumberInputDAGBooleanInputDAGFolderInputDAGFileInputDAGPathInputDAGArrayInputDAGJSONObjectInput.md) | Inputs for the DAG. | [optional] +**Outputs** | [**List<AnyOfDAGGenericOutputDAGStringOutputDAGIntegerOutputDAGNumberOutputDAGBooleanOutputDAGFolderOutputDAGFileOutputDAGPathOutputDAGArrayOutputDAGJSONObjectOutput>**](AnyOfDAGGenericOutputDAGStringOutputDAGIntegerOutputDAGNumberOutputDAGBooleanOutputDAGFolderOutputDAGFileOutputDAGPathOutputDAGArrayOutputDAGJSONObjectOutput.md) | Outputs of the DAG that can be used by other DAGs. | [optional] +**FailFast** | **bool** | Stop scheduling new steps, as soon as it detects that one of the DAG nodes is failed. Default is True. | [optional] [default to true] +**Type** | **string** | | [optional] [readonly] [default to "DAG"] + +[[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/DAGArrayInput.md b/docs/DAGArrayInput.md new file mode 100644 index 000000000..b5257b2e1 --- /dev/null +++ b/docs/DAGArrayInput.md @@ -0,0 +1,21 @@ + +# PollinationSDK.Model.DAGArrayInput + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | Input name. | +**Annotations** | **Dictionary<string, string>** | An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries. | [optional] +**Description** | **string** | Optional description for input. | [optional] +**Default** | [**List<AnyType>**](AnyType.md) | Default value to use for an input if a value was not supplied. | [optional] +**Alias** | [**List<AnyOfDAGGenericInputAliasDAGStringInputAliasDAGIntegerInputAliasDAGNumberInputAliasDAGBooleanInputAliasDAGFolderInputAliasDAGFileInputAliasDAGPathInputAliasDAGArrayInputAliasDAGJSONObjectInputAliasDAGLinkedInputAlias>**](AnyOfDAGGenericInputAliasDAGStringInputAliasDAGIntegerInputAliasDAGNumberInputAliasDAGBooleanInputAliasDAGFolderInputAliasDAGFileInputAliasDAGPathInputAliasDAGArrayInputAliasDAGJSONObjectInputAliasDAGLinkedInputAlias.md) | A list of aliases for this input in different platforms. | [optional] +**Required** | **bool** | A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. | [optional] [default to false] +**Spec** | **Object** | An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec. | [optional] +**ItemsType** | **ItemType** | Type of items in an array. All the items in an array must be from the same type. | [optional] +**Type** | **string** | | [optional] [readonly] [default to "DAGArrayInput"] + +[[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/DAGArrayInputAlias.md b/docs/DAGArrayInputAlias.md new file mode 100644 index 000000000..876ed5a69 --- /dev/null +++ b/docs/DAGArrayInputAlias.md @@ -0,0 +1,22 @@ + +# PollinationSDK.Model.DAGArrayInputAlias + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | Input name. | +**Annotations** | **Dictionary<string, string>** | An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries. | [optional] +**Description** | **string** | Optional description for input. | [optional] +**Platform** | **List<string>** | 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. | +**Handler** | [**List<IOAliasHandler>**](IOAliasHandler.md) | List of process actions to process the input or output value. | +**Default** | [**List<AnyType>**](AnyType.md) | Default value to use for an input if a value was not supplied. | [optional] +**Required** | **bool** | A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. | [optional] [default to false] +**Spec** | **Object** | An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec. | [optional] +**ItemsType** | **ItemType** | Type of items in an array. All the items in an array must be from the same type. | [optional] +**Type** | **string** | | [optional] [readonly] [default to "DAGArrayInputAlias"] + +[[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/DAGArrayOutput.md b/docs/DAGArrayOutput.md new file mode 100644 index 000000000..6c7781ea2 --- /dev/null +++ b/docs/DAGArrayOutput.md @@ -0,0 +1,20 @@ + +# PollinationSDK.Model.DAGArrayOutput + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | Output name. | +**Annotations** | **Dictionary<string, string>** | An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries. | [optional] +**Description** | **string** | Optional description for output. | [optional] +**From** | [**AnyOfTaskReferenceFileReference**](AnyOfTaskReferenceFileReference.md) | Reference to a file or a task output. Task output must be file. | +**Alias** | [**List<AnyOfDAGGenericOutputAliasDAGStringOutputAliasDAGIntegerOutputAliasDAGNumberOutputAliasDAGBooleanOutputAliasDAGFolderOutputAliasDAGFileOutputAliasDAGPathOutputAliasDAGArrayOutputAliasDAGJSONObjectOutputAliasDAGLinkedOutputAlias>**](AnyOfDAGGenericOutputAliasDAGStringOutputAliasDAGIntegerOutputAliasDAGNumberOutputAliasDAGBooleanOutputAliasDAGFolderOutputAliasDAGFileOutputAliasDAGPathOutputAliasDAGArrayOutputAliasDAGJSONObjectOutputAliasDAGLinkedOutputAlias.md) | A list of additional processes for loading this output on different platforms. | [optional] +**Required** | **bool** | A boolean to indicate if an artifact output is required. A False value makes the artifact optional. | [optional] [default to true] +**ItemsType** | **ItemType** | Type of items in this array. All the items in an array must be from the same type. | [optional] +**Type** | **string** | | [optional] [readonly] [default to "DAGArrayOutput"] + +[[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/DAGArrayOutputAlias.md b/docs/DAGArrayOutputAlias.md new file mode 100644 index 000000000..b77b4489b --- /dev/null +++ b/docs/DAGArrayOutputAlias.md @@ -0,0 +1,15 @@ + +# PollinationSDK.Model.DAGArrayOutputAlias + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**From** | [**AnyOfTaskReferenceFileReference**](AnyOfTaskReferenceFileReference.md) | Reference to a file or a task output. Task output must be file. | +**ItemsType** | **ItemType** | Type of items in this array. All the items in an array must be from the same type. | [optional] +**Type** | **string** | | [optional] [readonly] [default to "DAGArrayOutputAlias"] + +[[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/DAGArtifactOutput.md b/docs/DAGArtifactOutput.md new file mode 100644 index 000000000..01bcc294e --- /dev/null +++ b/docs/DAGArtifactOutput.md @@ -0,0 +1,15 @@ + +# PollinationSDK.Model.DAGArtifactOutput + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Alias** | [**List<AnyOfDAGGenericOutputAliasDAGStringOutputAliasDAGIntegerOutputAliasDAGNumberOutputAliasDAGBooleanOutputAliasDAGFolderOutputAliasDAGFileOutputAliasDAGPathOutputAliasDAGArrayOutputAliasDAGJSONObjectOutputAliasDAGLinkedOutputAlias>**](AnyOfDAGGenericOutputAliasDAGStringOutputAliasDAGIntegerOutputAliasDAGNumberOutputAliasDAGBooleanOutputAliasDAGFolderOutputAliasDAGFileOutputAliasDAGPathOutputAliasDAGArrayOutputAliasDAGJSONObjectOutputAliasDAGLinkedOutputAlias.md) | A list of additional processes for loading this output on different platforms. | [optional] +**Required** | **bool** | A boolean to indicate if an artifact output is required. A False value makes the artifact optional. | [optional] [default to true] +**Type** | **string** | | [optional] [readonly] [default to "DAGGenericOutput"] + +[[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/DAGArtifactOutputAlias.md b/docs/DAGArtifactOutputAlias.md new file mode 100644 index 000000000..2cf4d9406 --- /dev/null +++ b/docs/DAGArtifactOutputAlias.md @@ -0,0 +1,16 @@ + +# PollinationSDK.Model.DAGArtifactOutputAlias + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Platform** | **List<string>** | 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. | +**Handler** | [**List<IOAliasHandler>**](IOAliasHandler.md) | List of process actions to process the input or output value. | +**Required** | **bool** | A boolean to indicate if an artifact output is required. A False value makes the artifact optional. | [optional] [default to true] +**Type** | **string** | | [optional] [readonly] [default to "DAGGenericOutputAlias"] + +[[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/DAGBooleanInput.md b/docs/DAGBooleanInput.md new file mode 100644 index 000000000..3f5c8928f --- /dev/null +++ b/docs/DAGBooleanInput.md @@ -0,0 +1,20 @@ + +# PollinationSDK.Model.DAGBooleanInput + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | Input name. | +**Annotations** | **Dictionary<string, string>** | An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries. | [optional] +**Description** | **string** | Optional description for input. | [optional] +**Default** | **bool** | Default value to use for an input if a value was not supplied. | [optional] +**Alias** | [**List<AnyOfDAGGenericInputAliasDAGStringInputAliasDAGIntegerInputAliasDAGNumberInputAliasDAGBooleanInputAliasDAGFolderInputAliasDAGFileInputAliasDAGPathInputAliasDAGArrayInputAliasDAGJSONObjectInputAliasDAGLinkedInputAlias>**](AnyOfDAGGenericInputAliasDAGStringInputAliasDAGIntegerInputAliasDAGNumberInputAliasDAGBooleanInputAliasDAGFolderInputAliasDAGFileInputAliasDAGPathInputAliasDAGArrayInputAliasDAGJSONObjectInputAliasDAGLinkedInputAlias.md) | A list of aliases for this input in different platforms. | [optional] +**Required** | **bool** | A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. | [optional] [default to false] +**Spec** | **Object** | An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec. | [optional] +**Type** | **string** | | [optional] [readonly] [default to "DAGBooleanInput"] + +[[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/DAGBooleanInputAlias.md b/docs/DAGBooleanInputAlias.md new file mode 100644 index 000000000..0bc803eef --- /dev/null +++ b/docs/DAGBooleanInputAlias.md @@ -0,0 +1,21 @@ + +# PollinationSDK.Model.DAGBooleanInputAlias + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | Input name. | +**Annotations** | **Dictionary<string, string>** | An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries. | [optional] +**Description** | **string** | Optional description for input. | [optional] +**Platform** | **List<string>** | 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. | +**Handler** | [**List<IOAliasHandler>**](IOAliasHandler.md) | List of process actions to process the input or output value. | +**Default** | **bool** | Default value to use for an input if a value was not supplied. | [optional] +**Required** | **bool** | A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. | [optional] [default to false] +**Spec** | **Object** | An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec. | [optional] +**Type** | **string** | | [optional] [readonly] [default to "DAGBooleanInputAlias"] + +[[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/DAGBooleanOutput.md b/docs/DAGBooleanOutput.md new file mode 100644 index 000000000..e754e5da6 --- /dev/null +++ b/docs/DAGBooleanOutput.md @@ -0,0 +1,19 @@ + +# PollinationSDK.Model.DAGBooleanOutput + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | Output name. | +**Annotations** | **Dictionary<string, string>** | An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries. | [optional] +**Description** | **string** | Optional description for output. | [optional] +**From** | [**AnyOfTaskReferenceFileReference**](AnyOfTaskReferenceFileReference.md) | Reference to a file or a task output. Task output must be file. | +**Alias** | [**List<AnyOfDAGGenericOutputAliasDAGStringOutputAliasDAGIntegerOutputAliasDAGNumberOutputAliasDAGBooleanOutputAliasDAGFolderOutputAliasDAGFileOutputAliasDAGPathOutputAliasDAGArrayOutputAliasDAGJSONObjectOutputAliasDAGLinkedOutputAlias>**](AnyOfDAGGenericOutputAliasDAGStringOutputAliasDAGIntegerOutputAliasDAGNumberOutputAliasDAGBooleanOutputAliasDAGFolderOutputAliasDAGFileOutputAliasDAGPathOutputAliasDAGArrayOutputAliasDAGJSONObjectOutputAliasDAGLinkedOutputAlias.md) | A list of additional processes for loading this output on different platforms. | [optional] +**Required** | **bool** | A boolean to indicate if an artifact output is required. A False value makes the artifact optional. | [optional] [default to true] +**Type** | **string** | | [optional] [readonly] [default to "DAGBooleanOutput"] + +[[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/DAGBooleanOutputAlias.md b/docs/DAGBooleanOutputAlias.md new file mode 100644 index 000000000..e3ed5e307 --- /dev/null +++ b/docs/DAGBooleanOutputAlias.md @@ -0,0 +1,14 @@ + +# PollinationSDK.Model.DAGBooleanOutputAlias + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**From** | [**AnyOfTaskReferenceFileReference**](AnyOfTaskReferenceFileReference.md) | Reference to a file or a task output. Task output must be file. | +**Type** | **string** | | [optional] [readonly] [default to "DAGBooleanOutputAlias"] + +[[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/DAGFileInput.md b/docs/DAGFileInput.md new file mode 100644 index 000000000..87eded457 --- /dev/null +++ b/docs/DAGFileInput.md @@ -0,0 +1,21 @@ + +# PollinationSDK.Model.DAGFileInput + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | Input name. | +**Annotations** | **Dictionary<string, string>** | An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries. | [optional] +**Description** | **string** | Optional description for input. | [optional] +**Default** | [**AnyOfHTTPS3ProjectFolder**](AnyOfHTTPS3ProjectFolder.md) | The default source for file if the value is not provided. | [optional] +**Alias** | [**List<AnyOfDAGGenericInputAliasDAGStringInputAliasDAGIntegerInputAliasDAGNumberInputAliasDAGBooleanInputAliasDAGFolderInputAliasDAGFileInputAliasDAGPathInputAliasDAGArrayInputAliasDAGJSONObjectInputAliasDAGLinkedInputAlias>**](AnyOfDAGGenericInputAliasDAGStringInputAliasDAGIntegerInputAliasDAGNumberInputAliasDAGBooleanInputAliasDAGFolderInputAliasDAGFileInputAliasDAGPathInputAliasDAGArrayInputAliasDAGJSONObjectInputAliasDAGLinkedInputAlias.md) | A list of aliases for this input in different platforms. | [optional] +**Required** | **bool** | A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. | [optional] [default to false] +**Spec** | **Object** | An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec. | [optional] +**Extensions** | **List<string>** | Optional list of extensions for file. The check for extension is case-insensitive. | [optional] +**Type** | **string** | | [optional] [readonly] [default to "DAGFileInput"] + +[[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/DAGFileInputAlias.md b/docs/DAGFileInputAlias.md new file mode 100644 index 000000000..41e1a073b --- /dev/null +++ b/docs/DAGFileInputAlias.md @@ -0,0 +1,22 @@ + +# PollinationSDK.Model.DAGFileInputAlias + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | Input name. | +**Annotations** | **Dictionary<string, string>** | An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries. | [optional] +**Description** | **string** | Optional description for input. | [optional] +**Platform** | **List<string>** | 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. | +**Handler** | [**List<IOAliasHandler>**](IOAliasHandler.md) | List of process actions to process the input or output value. | +**Default** | [**AnyOfHTTPS3ProjectFolder**](AnyOfHTTPS3ProjectFolder.md) | The default source for file if the value is not provided. | [optional] +**Required** | **bool** | A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. | [optional] [default to false] +**Spec** | **Object** | An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec. | [optional] +**Extensions** | **List<string>** | Optional list of extensions for file. The check for extension is case-insensitive. | [optional] +**Type** | **string** | | [optional] [readonly] [default to "DAGFileInputAlias"] + +[[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/DAGFileOutput.md b/docs/DAGFileOutput.md new file mode 100644 index 000000000..61fddeba1 --- /dev/null +++ b/docs/DAGFileOutput.md @@ -0,0 +1,19 @@ + +# PollinationSDK.Model.DAGFileOutput + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | Output name. | +**Annotations** | **Dictionary<string, string>** | An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries. | [optional] +**Description** | **string** | Optional description for output. | [optional] +**From** | [**AnyOfTaskReferenceFileReference**](AnyOfTaskReferenceFileReference.md) | Reference to a file or a task output. Task output must be file. | +**Alias** | [**List<AnyOfDAGGenericOutputAliasDAGStringOutputAliasDAGIntegerOutputAliasDAGNumberOutputAliasDAGBooleanOutputAliasDAGFolderOutputAliasDAGFileOutputAliasDAGPathOutputAliasDAGArrayOutputAliasDAGJSONObjectOutputAliasDAGLinkedOutputAlias>**](AnyOfDAGGenericOutputAliasDAGStringOutputAliasDAGIntegerOutputAliasDAGNumberOutputAliasDAGBooleanOutputAliasDAGFolderOutputAliasDAGFileOutputAliasDAGPathOutputAliasDAGArrayOutputAliasDAGJSONObjectOutputAliasDAGLinkedOutputAlias.md) | A list of additional processes for loading this output on different platforms. | [optional] +**Required** | **bool** | A boolean to indicate if an artifact output is required. A False value makes the artifact optional. | [optional] [default to true] +**Type** | **string** | | [optional] [readonly] [default to "DAGFileOutput"] + +[[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/DAGFileOutputAlias.md b/docs/DAGFileOutputAlias.md new file mode 100644 index 000000000..713915c91 --- /dev/null +++ b/docs/DAGFileOutputAlias.md @@ -0,0 +1,14 @@ + +# PollinationSDK.Model.DAGFileOutputAlias + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**From** | [**AnyOfTaskReferenceFileReference**](AnyOfTaskReferenceFileReference.md) | Reference to a file or a task output. Task output must be file. | +**Type** | **string** | | [optional] [readonly] [default to "DAGFileOutputAlias"] + +[[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/DAGFolderInput.md b/docs/DAGFolderInput.md new file mode 100644 index 000000000..3d2750c46 --- /dev/null +++ b/docs/DAGFolderInput.md @@ -0,0 +1,20 @@ + +# PollinationSDK.Model.DAGFolderInput + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | Input name. | +**Annotations** | **Dictionary<string, string>** | An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries. | [optional] +**Description** | **string** | Optional description for input. | [optional] +**Default** | [**AnyOfHTTPS3ProjectFolder**](AnyOfHTTPS3ProjectFolder.md) | The default source for file if the value is not provided. | [optional] +**Alias** | [**List<AnyOfDAGGenericInputAliasDAGStringInputAliasDAGIntegerInputAliasDAGNumberInputAliasDAGBooleanInputAliasDAGFolderInputAliasDAGFileInputAliasDAGPathInputAliasDAGArrayInputAliasDAGJSONObjectInputAliasDAGLinkedInputAlias>**](AnyOfDAGGenericInputAliasDAGStringInputAliasDAGIntegerInputAliasDAGNumberInputAliasDAGBooleanInputAliasDAGFolderInputAliasDAGFileInputAliasDAGPathInputAliasDAGArrayInputAliasDAGJSONObjectInputAliasDAGLinkedInputAlias.md) | A list of aliases for this input in different platforms. | [optional] +**Required** | **bool** | A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. | [optional] [default to false] +**Spec** | **Object** | An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec. | [optional] +**Type** | **string** | | [optional] [readonly] [default to "DAGFolderInput"] + +[[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/DAGFolderInputAlias.md b/docs/DAGFolderInputAlias.md new file mode 100644 index 000000000..4a54da783 --- /dev/null +++ b/docs/DAGFolderInputAlias.md @@ -0,0 +1,21 @@ + +# PollinationSDK.Model.DAGFolderInputAlias + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | Input name. | +**Annotations** | **Dictionary<string, string>** | An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries. | [optional] +**Description** | **string** | Optional description for input. | [optional] +**Platform** | **List<string>** | 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. | +**Handler** | [**List<IOAliasHandler>**](IOAliasHandler.md) | List of process actions to process the input or output value. | +**Default** | [**AnyOfHTTPS3ProjectFolder**](AnyOfHTTPS3ProjectFolder.md) | The default source for file if the value is not provided. | [optional] +**Required** | **bool** | A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. | [optional] [default to false] +**Spec** | **Object** | An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec. | [optional] +**Type** | **string** | | [optional] [readonly] [default to "DAGFolderInputAlias"] + +[[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/DAGFolderOutput.md b/docs/DAGFolderOutput.md new file mode 100644 index 000000000..e3200c8f3 --- /dev/null +++ b/docs/DAGFolderOutput.md @@ -0,0 +1,19 @@ + +# PollinationSDK.Model.DAGFolderOutput + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | Output name. | +**Annotations** | **Dictionary<string, string>** | An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries. | [optional] +**Description** | **string** | Optional description for output. | [optional] +**From** | [**AnyOfTaskReferenceFolderReference**](AnyOfTaskReferenceFolderReference.md) | Reference to a folder or a task output. Task output must be folder. | +**Alias** | [**List<AnyOfDAGGenericOutputAliasDAGStringOutputAliasDAGIntegerOutputAliasDAGNumberOutputAliasDAGBooleanOutputAliasDAGFolderOutputAliasDAGFileOutputAliasDAGPathOutputAliasDAGArrayOutputAliasDAGJSONObjectOutputAliasDAGLinkedOutputAlias>**](AnyOfDAGGenericOutputAliasDAGStringOutputAliasDAGIntegerOutputAliasDAGNumberOutputAliasDAGBooleanOutputAliasDAGFolderOutputAliasDAGFileOutputAliasDAGPathOutputAliasDAGArrayOutputAliasDAGJSONObjectOutputAliasDAGLinkedOutputAlias.md) | A list of additional processes for loading this output on different platforms. | [optional] +**Required** | **bool** | A boolean to indicate if an artifact output is required. A False value makes the artifact optional. | [optional] [default to true] +**Type** | **string** | | [optional] [readonly] [default to "DAGFolderOutput"] + +[[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/DAGFolderOutputAlias.md b/docs/DAGFolderOutputAlias.md new file mode 100644 index 000000000..14cc9050d --- /dev/null +++ b/docs/DAGFolderOutputAlias.md @@ -0,0 +1,14 @@ + +# PollinationSDK.Model.DAGFolderOutputAlias + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**From** | [**AnyOfTaskReferenceFolderReference**](AnyOfTaskReferenceFolderReference.md) | Reference to a folder or a task output. Task output must be folder. | +**Type** | **string** | | [optional] [readonly] [default to "DAGFolderOutputAlias"] + +[[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/DAGGenericInput.md b/docs/DAGGenericInput.md new file mode 100644 index 000000000..bc2beefe6 --- /dev/null +++ b/docs/DAGGenericInput.md @@ -0,0 +1,20 @@ + +# PollinationSDK.Model.DAGGenericInput + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | Input name. | +**Annotations** | **Dictionary<string, string>** | An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries. | [optional] +**Description** | **string** | Optional description for input. | [optional] +**Default** | **string** | Default value for generic input. | [optional] +**Alias** | [**List<AnyOfDAGGenericInputAliasDAGStringInputAliasDAGIntegerInputAliasDAGNumberInputAliasDAGBooleanInputAliasDAGFolderInputAliasDAGFileInputAliasDAGPathInputAliasDAGArrayInputAliasDAGJSONObjectInputAliasDAGLinkedInputAlias>**](AnyOfDAGGenericInputAliasDAGStringInputAliasDAGIntegerInputAliasDAGNumberInputAliasDAGBooleanInputAliasDAGFolderInputAliasDAGFileInputAliasDAGPathInputAliasDAGArrayInputAliasDAGJSONObjectInputAliasDAGLinkedInputAlias.md) | A list of aliases for this input in different platforms. | [optional] +**Required** | **bool** | A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. | [optional] [default to false] +**Spec** | **Object** | An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec. | [optional] +**Type** | **string** | | [optional] [readonly] [default to "DAGGenericInput"] + +[[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/DAGGenericInputAlias.md b/docs/DAGGenericInputAlias.md new file mode 100644 index 000000000..1361606cd --- /dev/null +++ b/docs/DAGGenericInputAlias.md @@ -0,0 +1,21 @@ + +# PollinationSDK.Model.DAGGenericInputAlias + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | Input name. | +**Annotations** | **Dictionary<string, string>** | An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries. | [optional] +**Description** | **string** | Optional description for input. | [optional] +**Platform** | **List<string>** | 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. | +**Handler** | [**List<IOAliasHandler>**](IOAliasHandler.md) | List of process actions to process the input or output value. | +**Default** | **string** | Default value for generic input. | [optional] +**Required** | **bool** | A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. | [optional] [default to false] +**Spec** | **Object** | An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec. | [optional] +**Type** | **string** | | [optional] [readonly] [default to "DAGGenericInputAlias"] + +[[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/DAGGenericOutput.md b/docs/DAGGenericOutput.md new file mode 100644 index 000000000..55c48018c --- /dev/null +++ b/docs/DAGGenericOutput.md @@ -0,0 +1,15 @@ + +# PollinationSDK.Model.DAGGenericOutput + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**From** | [**AnyType**](.md) | Reference to a file or a task output. Task output must be file. | +**Alias** | [**List<AnyOfDAGGenericOutputAliasDAGStringOutputAliasDAGIntegerOutputAliasDAGNumberOutputAliasDAGBooleanOutputAliasDAGFolderOutputAliasDAGFileOutputAliasDAGPathOutputAliasDAGArrayOutputAliasDAGJSONObjectOutputAliasDAGLinkedOutputAlias>**](AnyOfDAGGenericOutputAliasDAGStringOutputAliasDAGIntegerOutputAliasDAGNumberOutputAliasDAGBooleanOutputAliasDAGFolderOutputAliasDAGFileOutputAliasDAGPathOutputAliasDAGArrayOutputAliasDAGJSONObjectOutputAliasDAGLinkedOutputAlias.md) | A list of additional processes for loading this output on different platforms. | [optional] +**Type** | **string** | | [optional] [readonly] [default to "DAGGenericOutput"] + +[[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/DAGGenericOutputAlias.md b/docs/DAGGenericOutputAlias.md new file mode 100644 index 000000000..e492efbe6 --- /dev/null +++ b/docs/DAGGenericOutputAlias.md @@ -0,0 +1,18 @@ + +# PollinationSDK.Model.DAGGenericOutputAlias + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | Output name. | +**Annotations** | **Dictionary<string, string>** | An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries. | [optional] +**Description** | **string** | Optional description for output. | [optional] +**Platform** | **List<string>** | 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. | +**Handler** | [**List<IOAliasHandler>**](IOAliasHandler.md) | List of process actions to process the input or output value. | +**Type** | **string** | | [optional] [readonly] [default to "DAGGenericOutputAlias"] + +[[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/DAGIntegerInput.md b/docs/DAGIntegerInput.md new file mode 100644 index 000000000..c5771b2c5 --- /dev/null +++ b/docs/DAGIntegerInput.md @@ -0,0 +1,20 @@ + +# PollinationSDK.Model.DAGIntegerInput + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | Input name. | +**Annotations** | **Dictionary<string, string>** | An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries. | [optional] +**Description** | **string** | Optional description for input. | [optional] +**Default** | **int** | Default value to use for an input if a value was not supplied. | [optional] +**Alias** | [**List<AnyOfDAGGenericInputAliasDAGStringInputAliasDAGIntegerInputAliasDAGNumberInputAliasDAGBooleanInputAliasDAGFolderInputAliasDAGFileInputAliasDAGPathInputAliasDAGArrayInputAliasDAGJSONObjectInputAliasDAGLinkedInputAlias>**](AnyOfDAGGenericInputAliasDAGStringInputAliasDAGIntegerInputAliasDAGNumberInputAliasDAGBooleanInputAliasDAGFolderInputAliasDAGFileInputAliasDAGPathInputAliasDAGArrayInputAliasDAGJSONObjectInputAliasDAGLinkedInputAlias.md) | A list of aliases for this input in different platforms. | [optional] +**Required** | **bool** | A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. | [optional] [default to false] +**Spec** | **Object** | An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec. | [optional] +**Type** | **string** | | [optional] [readonly] [default to "DAGIntegerInput"] + +[[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/DAGIntegerInputAlias.md b/docs/DAGIntegerInputAlias.md new file mode 100644 index 000000000..2909a32e4 --- /dev/null +++ b/docs/DAGIntegerInputAlias.md @@ -0,0 +1,21 @@ + +# PollinationSDK.Model.DAGIntegerInputAlias + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | Input name. | +**Annotations** | **Dictionary<string, string>** | An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries. | [optional] +**Description** | **string** | Optional description for input. | [optional] +**Platform** | **List<string>** | 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. | +**Handler** | [**List<IOAliasHandler>**](IOAliasHandler.md) | List of process actions to process the input or output value. | +**Default** | **int** | Default value to use for an input if a value was not supplied. | [optional] +**Required** | **bool** | A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. | [optional] [default to false] +**Spec** | **Object** | An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec. | [optional] +**Type** | **string** | | [optional] [readonly] [default to "DAGIntegerInputAlias"] + +[[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/DAGIntegerOutput.md b/docs/DAGIntegerOutput.md new file mode 100644 index 000000000..c0e5a36d0 --- /dev/null +++ b/docs/DAGIntegerOutput.md @@ -0,0 +1,19 @@ + +# PollinationSDK.Model.DAGIntegerOutput + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | Output name. | +**Annotations** | **Dictionary<string, string>** | An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries. | [optional] +**Description** | **string** | Optional description for output. | [optional] +**From** | [**AnyOfTaskReferenceFileReference**](AnyOfTaskReferenceFileReference.md) | Reference to a file or a task output. Task output must be file. | +**Alias** | [**List<AnyOfDAGGenericOutputAliasDAGStringOutputAliasDAGIntegerOutputAliasDAGNumberOutputAliasDAGBooleanOutputAliasDAGFolderOutputAliasDAGFileOutputAliasDAGPathOutputAliasDAGArrayOutputAliasDAGJSONObjectOutputAliasDAGLinkedOutputAlias>**](AnyOfDAGGenericOutputAliasDAGStringOutputAliasDAGIntegerOutputAliasDAGNumberOutputAliasDAGBooleanOutputAliasDAGFolderOutputAliasDAGFileOutputAliasDAGPathOutputAliasDAGArrayOutputAliasDAGJSONObjectOutputAliasDAGLinkedOutputAlias.md) | A list of additional processes for loading this output on different platforms. | [optional] +**Required** | **bool** | A boolean to indicate if an artifact output is required. A False value makes the artifact optional. | [optional] [default to true] +**Type** | **string** | | [optional] [readonly] [default to "DAGIntegerOutput"] + +[[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/DAGIntegerOutputAlias.md b/docs/DAGIntegerOutputAlias.md new file mode 100644 index 000000000..d58902f92 --- /dev/null +++ b/docs/DAGIntegerOutputAlias.md @@ -0,0 +1,14 @@ + +# PollinationSDK.Model.DAGIntegerOutputAlias + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**From** | [**AnyOfTaskReferenceFileReference**](AnyOfTaskReferenceFileReference.md) | Reference to a file or a task output. Task output must be file. | +**Type** | **string** | | [optional] [readonly] [default to "DAGIntegerOutputAlias"] + +[[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/DAGJSONObjectInput.md b/docs/DAGJSONObjectInput.md new file mode 100644 index 000000000..a3095cae4 --- /dev/null +++ b/docs/DAGJSONObjectInput.md @@ -0,0 +1,20 @@ + +# PollinationSDK.Model.DAGJSONObjectInput + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | Input name. | +**Annotations** | **Dictionary<string, string>** | An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries. | [optional] +**Description** | **string** | Optional description for input. | [optional] +**Default** | **Object** | Default value to use for an input if a value was not supplied. | [optional] +**Alias** | [**List<AnyOfDAGGenericInputAliasDAGStringInputAliasDAGIntegerInputAliasDAGNumberInputAliasDAGBooleanInputAliasDAGFolderInputAliasDAGFileInputAliasDAGPathInputAliasDAGArrayInputAliasDAGJSONObjectInputAliasDAGLinkedInputAlias>**](AnyOfDAGGenericInputAliasDAGStringInputAliasDAGIntegerInputAliasDAGNumberInputAliasDAGBooleanInputAliasDAGFolderInputAliasDAGFileInputAliasDAGPathInputAliasDAGArrayInputAliasDAGJSONObjectInputAliasDAGLinkedInputAlias.md) | A list of aliases for this input in different platforms. | [optional] +**Required** | **bool** | A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. | [optional] [default to false] +**Spec** | **Object** | An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec. | [optional] +**Type** | **string** | | [optional] [readonly] [default to "DAGJSONObjectInput"] + +[[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/DAGJSONObjectInputAlias.md b/docs/DAGJSONObjectInputAlias.md new file mode 100644 index 000000000..e2b8fb945 --- /dev/null +++ b/docs/DAGJSONObjectInputAlias.md @@ -0,0 +1,21 @@ + +# PollinationSDK.Model.DAGJSONObjectInputAlias + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | Input name. | +**Annotations** | **Dictionary<string, string>** | An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries. | [optional] +**Description** | **string** | Optional description for input. | [optional] +**Platform** | **List<string>** | 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. | +**Handler** | [**List<IOAliasHandler>**](IOAliasHandler.md) | List of process actions to process the input or output value. | +**Default** | **Object** | Default value to use for an input if a value was not supplied. | [optional] +**Required** | **bool** | A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. | [optional] [default to false] +**Spec** | **Object** | An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec. | [optional] +**Type** | **string** | | [optional] [readonly] [default to "DAGJSONObjectInputAlias"] + +[[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/DAGJSONObjectOutput.md b/docs/DAGJSONObjectOutput.md new file mode 100644 index 000000000..997565396 --- /dev/null +++ b/docs/DAGJSONObjectOutput.md @@ -0,0 +1,19 @@ + +# PollinationSDK.Model.DAGJSONObjectOutput + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | Output name. | +**Annotations** | **Dictionary<string, string>** | An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries. | [optional] +**Description** | **string** | Optional description for output. | [optional] +**From** | [**AnyOfTaskReferenceFileReference**](AnyOfTaskReferenceFileReference.md) | Reference to a file or a task output. Task output must be file. | +**Alias** | [**List<AnyOfDAGGenericOutputAliasDAGStringOutputAliasDAGIntegerOutputAliasDAGNumberOutputAliasDAGBooleanOutputAliasDAGFolderOutputAliasDAGFileOutputAliasDAGPathOutputAliasDAGArrayOutputAliasDAGJSONObjectOutputAliasDAGLinkedOutputAlias>**](AnyOfDAGGenericOutputAliasDAGStringOutputAliasDAGIntegerOutputAliasDAGNumberOutputAliasDAGBooleanOutputAliasDAGFolderOutputAliasDAGFileOutputAliasDAGPathOutputAliasDAGArrayOutputAliasDAGJSONObjectOutputAliasDAGLinkedOutputAlias.md) | A list of additional processes for loading this output on different platforms. | [optional] +**Required** | **bool** | A boolean to indicate if an artifact output is required. A False value makes the artifact optional. | [optional] [default to true] +**Type** | **string** | | [optional] [readonly] [default to "DAGJSONObjectOutput"] + +[[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/DAGJSONObjectOutputAlias.md b/docs/DAGJSONObjectOutputAlias.md new file mode 100644 index 000000000..4707af74e --- /dev/null +++ b/docs/DAGJSONObjectOutputAlias.md @@ -0,0 +1,14 @@ + +# PollinationSDK.Model.DAGJSONObjectOutputAlias + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**From** | [**AnyOfTaskReferenceFileReference**](AnyOfTaskReferenceFileReference.md) | Reference to a file or a task output. Task output must be file. | +**Type** | **string** | | [optional] [readonly] [default to "DAGJSONObjectOutputAlias"] + +[[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/DAGLinkedInputAlias.md b/docs/DAGLinkedInputAlias.md new file mode 100644 index 000000000..f5948ca6c --- /dev/null +++ b/docs/DAGLinkedInputAlias.md @@ -0,0 +1,18 @@ + +# PollinationSDK.Model.DAGLinkedInputAlias + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Platform** | **List<string>** | 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. | +**Handler** | [**List<IOAliasHandler>**](IOAliasHandler.md) | List of process actions to process the input or output value. | +**Default** | **string** | Default value for generic input. | [optional] +**Required** | **bool** | A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. | [optional] [default to false] +**Spec** | **Object** | An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec. | [optional] +**Type** | **string** | | [optional] [readonly] [default to "DAGLinkedInputAlias"] + +[[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/DAGLinkedOutputAlias.md b/docs/DAGLinkedOutputAlias.md new file mode 100644 index 000000000..f94300039 --- /dev/null +++ b/docs/DAGLinkedOutputAlias.md @@ -0,0 +1,15 @@ + +# PollinationSDK.Model.DAGLinkedOutputAlias + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Platform** | **List<string>** | 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. | +**Handler** | [**List<IOAliasHandler>**](IOAliasHandler.md) | List of process actions to process the input or output value. | +**Type** | **string** | | [optional] [readonly] [default to "DAGLinkedOutputAlias"] + +[[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/DAGNumberInput.md b/docs/DAGNumberInput.md new file mode 100644 index 000000000..5383f1f0b --- /dev/null +++ b/docs/DAGNumberInput.md @@ -0,0 +1,20 @@ + +# PollinationSDK.Model.DAGNumberInput + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | Input name. | +**Annotations** | **Dictionary<string, string>** | An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries. | [optional] +**Description** | **string** | Optional description for input. | [optional] +**Default** | **double** | Default value to use for an input if a value was not supplied. | [optional] +**Alias** | [**List<AnyOfDAGGenericInputAliasDAGStringInputAliasDAGIntegerInputAliasDAGNumberInputAliasDAGBooleanInputAliasDAGFolderInputAliasDAGFileInputAliasDAGPathInputAliasDAGArrayInputAliasDAGJSONObjectInputAliasDAGLinkedInputAlias>**](AnyOfDAGGenericInputAliasDAGStringInputAliasDAGIntegerInputAliasDAGNumberInputAliasDAGBooleanInputAliasDAGFolderInputAliasDAGFileInputAliasDAGPathInputAliasDAGArrayInputAliasDAGJSONObjectInputAliasDAGLinkedInputAlias.md) | A list of aliases for this input in different platforms. | [optional] +**Required** | **bool** | A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. | [optional] [default to false] +**Spec** | **Object** | An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec. | [optional] +**Type** | **string** | | [optional] [readonly] [default to "DAGNumberInput"] + +[[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/DAGNumberInputAlias.md b/docs/DAGNumberInputAlias.md new file mode 100644 index 000000000..f0ffdb9b8 --- /dev/null +++ b/docs/DAGNumberInputAlias.md @@ -0,0 +1,21 @@ + +# PollinationSDK.Model.DAGNumberInputAlias + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | Input name. | +**Annotations** | **Dictionary<string, string>** | An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries. | [optional] +**Description** | **string** | Optional description for input. | [optional] +**Platform** | **List<string>** | 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. | +**Handler** | [**List<IOAliasHandler>**](IOAliasHandler.md) | List of process actions to process the input or output value. | +**Default** | **double** | Default value to use for an input if a value was not supplied. | [optional] +**Required** | **bool** | A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. | [optional] [default to false] +**Spec** | **Object** | An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec. | [optional] +**Type** | **string** | | [optional] [readonly] [default to "DAGNumberInputAlias"] + +[[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/DAGNumberOutput.md b/docs/DAGNumberOutput.md new file mode 100644 index 000000000..e8382824b --- /dev/null +++ b/docs/DAGNumberOutput.md @@ -0,0 +1,19 @@ + +# PollinationSDK.Model.DAGNumberOutput + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | Output name. | +**Annotations** | **Dictionary<string, string>** | An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries. | [optional] +**Description** | **string** | Optional description for output. | [optional] +**From** | [**AnyOfTaskReferenceFileReference**](AnyOfTaskReferenceFileReference.md) | Reference to a file or a task output. Task output must be file. | +**Alias** | [**List<AnyOfDAGGenericOutputAliasDAGStringOutputAliasDAGIntegerOutputAliasDAGNumberOutputAliasDAGBooleanOutputAliasDAGFolderOutputAliasDAGFileOutputAliasDAGPathOutputAliasDAGArrayOutputAliasDAGJSONObjectOutputAliasDAGLinkedOutputAlias>**](AnyOfDAGGenericOutputAliasDAGStringOutputAliasDAGIntegerOutputAliasDAGNumberOutputAliasDAGBooleanOutputAliasDAGFolderOutputAliasDAGFileOutputAliasDAGPathOutputAliasDAGArrayOutputAliasDAGJSONObjectOutputAliasDAGLinkedOutputAlias.md) | A list of additional processes for loading this output on different platforms. | [optional] +**Required** | **bool** | A boolean to indicate if an artifact output is required. A False value makes the artifact optional. | [optional] [default to true] +**Type** | **string** | | [optional] [readonly] [default to "DAGNumberOutput"] + +[[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/DAGNumberOutputAlias.md b/docs/DAGNumberOutputAlias.md new file mode 100644 index 000000000..30a6cb6f3 --- /dev/null +++ b/docs/DAGNumberOutputAlias.md @@ -0,0 +1,14 @@ + +# PollinationSDK.Model.DAGNumberOutputAlias + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**From** | [**AnyOfTaskReferenceFileReference**](AnyOfTaskReferenceFileReference.md) | Reference to a file or a task output. Task output must be file. | +**Type** | **string** | | [optional] [readonly] [default to "DAGNumberOutputAlias"] + +[[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/DAGPathInput.md b/docs/DAGPathInput.md new file mode 100644 index 000000000..33cae8798 --- /dev/null +++ b/docs/DAGPathInput.md @@ -0,0 +1,21 @@ + +# PollinationSDK.Model.DAGPathInput + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | Input name. | +**Annotations** | **Dictionary<string, string>** | An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries. | [optional] +**Description** | **string** | Optional description for input. | [optional] +**Default** | [**AnyOfHTTPS3ProjectFolder**](AnyOfHTTPS3ProjectFolder.md) | The default source for file if the value is not provided. | [optional] +**Alias** | [**List<AnyOfDAGGenericInputAliasDAGStringInputAliasDAGIntegerInputAliasDAGNumberInputAliasDAGBooleanInputAliasDAGFolderInputAliasDAGFileInputAliasDAGPathInputAliasDAGArrayInputAliasDAGJSONObjectInputAliasDAGLinkedInputAlias>**](AnyOfDAGGenericInputAliasDAGStringInputAliasDAGIntegerInputAliasDAGNumberInputAliasDAGBooleanInputAliasDAGFolderInputAliasDAGFileInputAliasDAGPathInputAliasDAGArrayInputAliasDAGJSONObjectInputAliasDAGLinkedInputAlias.md) | A list of aliases for this input in different platforms. | [optional] +**Required** | **bool** | A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. | [optional] [default to false] +**Spec** | **Object** | An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec. | [optional] +**Extensions** | **List<string>** | Optional list of extensions for path. The check for extension is case-insensitive. The extension will only be validated for file inputs. | [optional] +**Type** | **string** | | [optional] [readonly] [default to "DAGPathInput"] + +[[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/DAGPathInputAlias.md b/docs/DAGPathInputAlias.md new file mode 100644 index 000000000..aeb3b71ca --- /dev/null +++ b/docs/DAGPathInputAlias.md @@ -0,0 +1,22 @@ + +# PollinationSDK.Model.DAGPathInputAlias + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | Input name. | +**Annotations** | **Dictionary<string, string>** | An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries. | [optional] +**Description** | **string** | Optional description for input. | [optional] +**Platform** | **List<string>** | 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. | +**Handler** | [**List<IOAliasHandler>**](IOAliasHandler.md) | List of process actions to process the input or output value. | +**Default** | [**AnyOfHTTPS3ProjectFolder**](AnyOfHTTPS3ProjectFolder.md) | The default source for file if the value is not provided. | [optional] +**Required** | **bool** | A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. | [optional] [default to false] +**Spec** | **Object** | An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec. | [optional] +**Extensions** | **List<string>** | Optional list of extensions for path. The check for extension is case-insensitive. The extension will only be validated for file inputs. | [optional] +**Type** | **string** | | [optional] [readonly] [default to "DAGPathInputAlias"] + +[[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/DAGPathOutput.md b/docs/DAGPathOutput.md new file mode 100644 index 000000000..772875c9e --- /dev/null +++ b/docs/DAGPathOutput.md @@ -0,0 +1,19 @@ + +# PollinationSDK.Model.DAGPathOutput + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | Output name. | +**Annotations** | **Dictionary<string, string>** | An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries. | [optional] +**Description** | **string** | Optional description for output. | [optional] +**From** | [**AnyOfTaskReferenceFileReferenceFolderReference**](AnyOfTaskReferenceFileReferenceFolderReference.md) | Reference to a file, folder or a task output. Task output must either be a file or a folder. | +**Alias** | [**List<AnyOfDAGGenericOutputAliasDAGStringOutputAliasDAGIntegerOutputAliasDAGNumberOutputAliasDAGBooleanOutputAliasDAGFolderOutputAliasDAGFileOutputAliasDAGPathOutputAliasDAGArrayOutputAliasDAGJSONObjectOutputAliasDAGLinkedOutputAlias>**](AnyOfDAGGenericOutputAliasDAGStringOutputAliasDAGIntegerOutputAliasDAGNumberOutputAliasDAGBooleanOutputAliasDAGFolderOutputAliasDAGFileOutputAliasDAGPathOutputAliasDAGArrayOutputAliasDAGJSONObjectOutputAliasDAGLinkedOutputAlias.md) | A list of additional processes for loading this output on different platforms. | [optional] +**Required** | **bool** | A boolean to indicate if an artifact output is required. A False value makes the artifact optional. | [optional] [default to true] +**Type** | **string** | | [optional] [readonly] [default to "DAGPathOutput"] + +[[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/DAGPathOutputAlias.md b/docs/DAGPathOutputAlias.md new file mode 100644 index 000000000..737402951 --- /dev/null +++ b/docs/DAGPathOutputAlias.md @@ -0,0 +1,14 @@ + +# PollinationSDK.Model.DAGPathOutputAlias + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**From** | [**AnyOfTaskReferenceFileReferenceFolderReference**](AnyOfTaskReferenceFileReferenceFolderReference.md) | Reference to a file, folder or a task output. Task output must either be a file or a folder. | +**Type** | **string** | | [optional] [readonly] [default to "DAGPathOutputAlias"] + +[[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/DAGStringInput.md b/docs/DAGStringInput.md new file mode 100644 index 000000000..fa21bce8c --- /dev/null +++ b/docs/DAGStringInput.md @@ -0,0 +1,17 @@ + +# PollinationSDK.Model.DAGStringInput + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Default** | **string** | Default value for generic input. | [optional] +**Alias** | [**List<AnyOfDAGGenericInputAliasDAGStringInputAliasDAGIntegerInputAliasDAGNumberInputAliasDAGBooleanInputAliasDAGFolderInputAliasDAGFileInputAliasDAGPathInputAliasDAGArrayInputAliasDAGJSONObjectInputAliasDAGLinkedInputAlias>**](AnyOfDAGGenericInputAliasDAGStringInputAliasDAGIntegerInputAliasDAGNumberInputAliasDAGBooleanInputAliasDAGFolderInputAliasDAGFileInputAliasDAGPathInputAliasDAGArrayInputAliasDAGJSONObjectInputAliasDAGLinkedInputAlias.md) | A list of aliases for this input in different platforms. | [optional] +**Required** | **bool** | A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. | [optional] [default to false] +**Spec** | **Object** | An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec. | [optional] +**Type** | **string** | | [optional] [readonly] [default to "DAGStringInput"] + +[[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/DAGStringInputAlias.md b/docs/DAGStringInputAlias.md new file mode 100644 index 000000000..9b3daa8a0 --- /dev/null +++ b/docs/DAGStringInputAlias.md @@ -0,0 +1,18 @@ + +# PollinationSDK.Model.DAGStringInputAlias + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Platform** | **List<string>** | 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. | +**Handler** | [**List<IOAliasHandler>**](IOAliasHandler.md) | List of process actions to process the input or output value. | +**Default** | **string** | Default value for generic input. | [optional] +**Required** | **bool** | A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. | [optional] [default to false] +**Spec** | **Object** | An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec. | [optional] +**Type** | **string** | | [optional] [readonly] [default to "DAGStringInputAlias"] + +[[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/DAGStringOutput.md b/docs/DAGStringOutput.md new file mode 100644 index 000000000..85165d169 --- /dev/null +++ b/docs/DAGStringOutput.md @@ -0,0 +1,19 @@ + +# PollinationSDK.Model.DAGStringOutput + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | Output name. | +**Annotations** | **Dictionary<string, string>** | An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries. | [optional] +**Description** | **string** | Optional description for output. | [optional] +**From** | [**AnyOfTaskReferenceFileReference**](AnyOfTaskReferenceFileReference.md) | Reference to a file or a task output. Task output must be file. | +**Alias** | [**List<AnyOfDAGGenericOutputAliasDAGStringOutputAliasDAGIntegerOutputAliasDAGNumberOutputAliasDAGBooleanOutputAliasDAGFolderOutputAliasDAGFileOutputAliasDAGPathOutputAliasDAGArrayOutputAliasDAGJSONObjectOutputAliasDAGLinkedOutputAlias>**](AnyOfDAGGenericOutputAliasDAGStringOutputAliasDAGIntegerOutputAliasDAGNumberOutputAliasDAGBooleanOutputAliasDAGFolderOutputAliasDAGFileOutputAliasDAGPathOutputAliasDAGArrayOutputAliasDAGJSONObjectOutputAliasDAGLinkedOutputAlias.md) | A list of additional processes for loading this output on different platforms. | [optional] +**Required** | **bool** | A boolean to indicate if an artifact output is required. A False value makes the artifact optional. | [optional] [default to true] +**Type** | **string** | | [optional] [readonly] [default to "DAGStringOutput"] + +[[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/DAGStringOutputAlias.md b/docs/DAGStringOutputAlias.md new file mode 100644 index 000000000..85dfe9655 --- /dev/null +++ b/docs/DAGStringOutputAlias.md @@ -0,0 +1,14 @@ + +# PollinationSDK.Model.DAGStringOutputAlias + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**From** | [**AnyOfTaskReferenceFileReference**](AnyOfTaskReferenceFileReference.md) | Reference to a file or a task output. Task output must be file. | +**Type** | **string** | | [optional] [readonly] [default to "DAGStringOutputAlias"] + +[[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/DAGTask.md b/docs/DAGTask.md new file mode 100644 index 000000000..c23ac1adb --- /dev/null +++ b/docs/DAGTask.md @@ -0,0 +1,21 @@ + +# PollinationSDK.Model.DAGTask + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | Name for this task. It must be unique in a DAG. | +**Template** | **string** | Template name. A template is a Function or a DAG. This template must be available in the dependencies. | +**Type** | **string** | | [optional] [readonly] [default to "DAGTask"] +**Annotations** | **Dictionary<string, string>** | An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries. | [optional] +**Needs** | **List<string>** | List of DAG tasks that this task depends on and needs to be executed before this task. | [optional] +**Arguments** | [**List<AnyOfTaskArgumentTaskPathArgument>**](AnyOfTaskArgumentTaskPathArgument.md) | The input arguments for this task. | [optional] +**Loop** | [**DAGTaskLoop**](DAGTaskLoop.md) | Loop configuration for this task. | [optional] +**SubFolder** | **string** | 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. | [optional] +**Returns** | [**List<AnyOfTaskReturnTaskPathReturn>**](AnyOfTaskReturnTaskPathReturn.md) | List of task returns. | [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/DAGTaskLoop.md b/docs/DAGTaskLoop.md new file mode 100644 index 000000000..49296f5ab --- /dev/null +++ b/docs/DAGTaskLoop.md @@ -0,0 +1,15 @@ + +# PollinationSDK.Model.DAGTaskLoop + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Type** | **string** | | [optional] [readonly] [default to "DAGTaskLoop"] +**Annotations** | **Dictionary<string, string>** | An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries. | [optional] +**From** | [**AnyOfInputReferenceTaskReferenceValueListReference**](AnyOfInputReferenceTaskReferenceValueListReference.md) | The task or DAG parameter to loop over (must be iterable). | [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/DailyUsage.md b/docs/DailyUsage.md new file mode 100644 index 000000000..6b7f75b39 --- /dev/null +++ b/docs/DailyUsage.md @@ -0,0 +1,18 @@ + +# PollinationSDK.Model.DailyUsage + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Date** | **DateTime** | The day this usage was aggregated for | +**Cpu** | **double** | cpu usage | [optional] [default to 0D] +**Memory** | **double** | memory usage | [optional] [default to 0D] +**Succeeded** | **int** | succeeded usage | [optional] [default to 0] +**Failed** | **int** | failed usage | [optional] [default to 0] +**Type** | **string** | | [optional] [readonly] [default to "DailyUsage"] + +[[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/Dependency.md b/docs/Dependency.md new file mode 100644 index 000000000..f84e07068 --- /dev/null +++ b/docs/Dependency.md @@ -0,0 +1,20 @@ + +# PollinationSDK.Model.Dependency + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Kind** | **DependencyKind** | The kind of dependency. It can be a recipe or an plugin. | +**Name** | **string** | Workflow name. This name should be unique among all the resources in your resource. Use an alias if this is not the case. | +**Tag** | **string** | Tag of the resource. | +**Source** | **string** | URL to a repository where this resource can be found. | +**Type** | **string** | | [optional] [readonly] [default to "Dependency"] +**Annotations** | **Dictionary<string, string>** | An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries. | [optional] +**Hash** | **string** | The digest hash of the dependency when retrieved from its source. This is locked when the resource dependencies are downloaded. | [optional] +**Alias** | **string** | An optional alias to refer to this dependency. Useful if the name is already used somewhere else. | [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/DependencyKind.md b/docs/DependencyKind.md new file mode 100644 index 000000000..1b9ef55e6 --- /dev/null +++ b/docs/DependencyKind.md @@ -0,0 +1,12 @@ + +# PollinationSDK.Model.DependencyKind + +## 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/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/DockerConfig.md b/docs/DockerConfig.md new file mode 100644 index 000000000..77b1edc5f --- /dev/null +++ b/docs/DockerConfig.md @@ -0,0 +1,17 @@ + +# PollinationSDK.Model.DockerConfig + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Image** | **string** | Docker image name. Must include tag. | +**Workdir** | **string** | 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** | | [optional] [readonly] [default to "DockerConfig"] +**Annotations** | **Dictionary<string, string>** | An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries. | [optional] +**Registry** | **string** | The container registry URLs that this container should be pulled from. Will default to Dockerhub if none is specified. | [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/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/FileMeta.md b/docs/FileMeta.md new file mode 100644 index 000000000..74b5b27bf --- /dev/null +++ b/docs/FileMeta.md @@ -0,0 +1,18 @@ + +# PollinationSDK.Model.FileMeta + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Key** | **string** | | +**FileType** | **string** | | +**FileName** | **string** | | +**LastModified** | **DateTime** | | [optional] +**Size** | **int** | | [optional] +**Type** | **string** | | [optional] [readonly] [default to "FileMeta"] + +[[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/FileReference.md b/docs/FileReference.md new file mode 100644 index 000000000..1e9c0bee8 --- /dev/null +++ b/docs/FileReference.md @@ -0,0 +1,14 @@ + +# PollinationSDK.Model.FileReference + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Path** | **string** | Relative path to a file. | +**Type** | **string** | | [optional] [readonly] [default to "FileReference"] + +[[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/FolderReference.md b/docs/FolderReference.md new file mode 100644 index 000000000..ad1a231b1 --- /dev/null +++ b/docs/FolderReference.md @@ -0,0 +1,14 @@ + +# PollinationSDK.Model.FolderReference + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Path** | **string** | Relative path to a folder. | +**Type** | **string** | | [optional] [readonly] [default to "FolderReference"] + +[[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/FromOutput.md b/docs/FromOutput.md new file mode 100644 index 000000000..2e1b2213a --- /dev/null +++ b/docs/FromOutput.md @@ -0,0 +1,17 @@ + +# PollinationSDK.Model.FromOutput + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | Output name. | +**Annotations** | **Dictionary<string, string>** | An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries. | [optional] +**Description** | **string** | Optional description for output. | [optional] +**From** | [**AnyType**](.md) | Reference to a file or a task output. Task output must be file. | +**Type** | **string** | | [optional] [readonly] [default to "FromOutput"] + +[[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/Function.md b/docs/Function.md new file mode 100644 index 000000000..ab8ea7407 --- /dev/null +++ b/docs/Function.md @@ -0,0 +1,19 @@ + +# PollinationSDK.Model.Function + +## 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 | | +**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 "Function"] + +[[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/FunctionArrayInput.md b/docs/FunctionArrayInput.md new file mode 100644 index 000000000..120d3f4be --- /dev/null +++ b/docs/FunctionArrayInput.md @@ -0,0 +1,21 @@ + +# PollinationSDK.Model.FunctionArrayInput + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | Input name. | +**Annotations** | **Dictionary<string, string>** | An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries. | [optional] +**Description** | **string** | Optional description for input. | [optional] +**Default** | [**List<AnyType>**](AnyType.md) | Default value to use for an input if a value was not supplied. | [optional] +**Alias** | [**List<AnyOfDAGGenericInputAliasDAGStringInputAliasDAGIntegerInputAliasDAGNumberInputAliasDAGBooleanInputAliasDAGFolderInputAliasDAGFileInputAliasDAGPathInputAliasDAGArrayInputAliasDAGJSONObjectInputAliasDAGLinkedInputAlias>**](AnyOfDAGGenericInputAliasDAGStringInputAliasDAGIntegerInputAliasDAGNumberInputAliasDAGBooleanInputAliasDAGFolderInputAliasDAGFileInputAliasDAGPathInputAliasDAGArrayInputAliasDAGJSONObjectInputAliasDAGLinkedInputAlias.md) | A list of aliases for this input in different platforms. | [optional] +**Required** | **bool** | A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. | [optional] [default to false] +**Spec** | **Object** | An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec. | [optional] +**ItemsType** | **ItemType** | Type of items in an array. All the items in an array must be from the same type. | [optional] +**Type** | **string** | | [optional] [readonly] [default to "FunctionArrayInput"] + +[[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/FunctionArrayOutput.md b/docs/FunctionArrayOutput.md new file mode 100644 index 000000000..abb075c89 --- /dev/null +++ b/docs/FunctionArrayOutput.md @@ -0,0 +1,14 @@ + +# PollinationSDK.Model.FunctionArrayOutput + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ItemsType** | **ItemType** | Type of items in this array. All the items in an array must be from the same type. | [optional] +**Type** | **string** | | [optional] [readonly] [default to "FunctionArrayOutput"] + +[[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/FunctionBooleanInput.md b/docs/FunctionBooleanInput.md new file mode 100644 index 000000000..6514bdbb1 --- /dev/null +++ b/docs/FunctionBooleanInput.md @@ -0,0 +1,20 @@ + +# PollinationSDK.Model.FunctionBooleanInput + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | Input name. | +**Annotations** | **Dictionary<string, string>** | An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries. | [optional] +**Description** | **string** | Optional description for input. | [optional] +**Default** | **bool** | Default value to use for an input if a value was not supplied. | [optional] +**Alias** | [**List<AnyOfDAGGenericInputAliasDAGStringInputAliasDAGIntegerInputAliasDAGNumberInputAliasDAGBooleanInputAliasDAGFolderInputAliasDAGFileInputAliasDAGPathInputAliasDAGArrayInputAliasDAGJSONObjectInputAliasDAGLinkedInputAlias>**](AnyOfDAGGenericInputAliasDAGStringInputAliasDAGIntegerInputAliasDAGNumberInputAliasDAGBooleanInputAliasDAGFolderInputAliasDAGFileInputAliasDAGPathInputAliasDAGArrayInputAliasDAGJSONObjectInputAliasDAGLinkedInputAlias.md) | A list of aliases for this input in different platforms. | [optional] +**Required** | **bool** | A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. | [optional] [default to false] +**Spec** | **Object** | An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec. | [optional] +**Type** | **string** | | [optional] [readonly] [default to "FunctionBooleanInput"] + +[[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/FunctionBooleanOutput.md b/docs/FunctionBooleanOutput.md new file mode 100644 index 000000000..d8c2b5bb8 --- /dev/null +++ b/docs/FunctionBooleanOutput.md @@ -0,0 +1,13 @@ + +# PollinationSDK.Model.FunctionBooleanOutput + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Type** | **string** | | [optional] [readonly] [default to "FunctionBooleanOutput"] + +[[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/FunctionFileInput.md b/docs/FunctionFileInput.md new file mode 100644 index 000000000..bebabf944 --- /dev/null +++ b/docs/FunctionFileInput.md @@ -0,0 +1,22 @@ + +# PollinationSDK.Model.FunctionFileInput + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | Input name. | +**Annotations** | **Dictionary<string, string>** | An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries. | [optional] +**Description** | **string** | Optional description for input. | [optional] +**Path** | **string** | 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. | +**Default** | [**AnyOfHTTPS3ProjectFolder**](AnyOfHTTPS3ProjectFolder.md) | The default source for file if the value is not provided. | [optional] +**Alias** | [**List<AnyOfDAGGenericInputAliasDAGStringInputAliasDAGIntegerInputAliasDAGNumberInputAliasDAGBooleanInputAliasDAGFolderInputAliasDAGFileInputAliasDAGPathInputAliasDAGArrayInputAliasDAGJSONObjectInputAliasDAGLinkedInputAlias>**](AnyOfDAGGenericInputAliasDAGStringInputAliasDAGIntegerInputAliasDAGNumberInputAliasDAGBooleanInputAliasDAGFolderInputAliasDAGFileInputAliasDAGPathInputAliasDAGArrayInputAliasDAGJSONObjectInputAliasDAGLinkedInputAlias.md) | A list of aliases for this input in different platforms. | [optional] +**Required** | **bool** | A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. | [optional] [default to false] +**Spec** | **Object** | An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec. | [optional] +**Extensions** | **List<string>** | Optional list of extensions for file. The check for extension is case-insensitive. | [optional] +**Type** | **string** | | [optional] [readonly] [default to "FunctionFileInput"] + +[[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/FunctionFileOutput.md b/docs/FunctionFileOutput.md new file mode 100644 index 000000000..9a1d00d29 --- /dev/null +++ b/docs/FunctionFileOutput.md @@ -0,0 +1,15 @@ + +# PollinationSDK.Model.FunctionFileOutput + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Path** | **string** | Path to the output artifact relative to where the function command is executed. | +**Required** | **bool** | A boolean to indicate if an artifact output is required. A False value makes the artifact optional. | [optional] [default to true] +**Type** | **string** | | [optional] [readonly] [default to "FunctionFileOutput"] + +[[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/FunctionFolderInput.md b/docs/FunctionFolderInput.md new file mode 100644 index 000000000..7c23dc24e --- /dev/null +++ b/docs/FunctionFolderInput.md @@ -0,0 +1,21 @@ + +# PollinationSDK.Model.FunctionFolderInput + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | Input name. | +**Annotations** | **Dictionary<string, string>** | An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries. | [optional] +**Description** | **string** | Optional description for input. | [optional] +**Path** | **string** | 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. | +**Default** | [**AnyOfHTTPS3ProjectFolder**](AnyOfHTTPS3ProjectFolder.md) | The default source for file if the value is not provided. | [optional] +**Alias** | [**List<AnyOfDAGGenericInputAliasDAGStringInputAliasDAGIntegerInputAliasDAGNumberInputAliasDAGBooleanInputAliasDAGFolderInputAliasDAGFileInputAliasDAGPathInputAliasDAGArrayInputAliasDAGJSONObjectInputAliasDAGLinkedInputAlias>**](AnyOfDAGGenericInputAliasDAGStringInputAliasDAGIntegerInputAliasDAGNumberInputAliasDAGBooleanInputAliasDAGFolderInputAliasDAGFileInputAliasDAGPathInputAliasDAGArrayInputAliasDAGJSONObjectInputAliasDAGLinkedInputAlias.md) | A list of aliases for this input in different platforms. | [optional] +**Required** | **bool** | A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. | [optional] [default to false] +**Spec** | **Object** | An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec. | [optional] +**Type** | **string** | | [optional] [readonly] [default to "FunctionFolderInput"] + +[[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/FunctionFolderOutput.md b/docs/FunctionFolderOutput.md new file mode 100644 index 000000000..c94bde236 --- /dev/null +++ b/docs/FunctionFolderOutput.md @@ -0,0 +1,15 @@ + +# PollinationSDK.Model.FunctionFolderOutput + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Path** | **string** | Path to the output artifact relative to where the function command is executed. | +**Required** | **bool** | A boolean to indicate if an artifact output is required. A False value makes the artifact optional. | [optional] [default to true] +**Type** | **string** | | [optional] [readonly] [default to "FunctionFolderOutput"] + +[[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/FunctionIntegerInput.md b/docs/FunctionIntegerInput.md new file mode 100644 index 000000000..7f026f3cf --- /dev/null +++ b/docs/FunctionIntegerInput.md @@ -0,0 +1,20 @@ + +# PollinationSDK.Model.FunctionIntegerInput + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | Input name. | +**Annotations** | **Dictionary<string, string>** | An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries. | [optional] +**Description** | **string** | Optional description for input. | [optional] +**Default** | **int** | Default value to use for an input if a value was not supplied. | [optional] +**Alias** | [**List<AnyOfDAGGenericInputAliasDAGStringInputAliasDAGIntegerInputAliasDAGNumberInputAliasDAGBooleanInputAliasDAGFolderInputAliasDAGFileInputAliasDAGPathInputAliasDAGArrayInputAliasDAGJSONObjectInputAliasDAGLinkedInputAlias>**](AnyOfDAGGenericInputAliasDAGStringInputAliasDAGIntegerInputAliasDAGNumberInputAliasDAGBooleanInputAliasDAGFolderInputAliasDAGFileInputAliasDAGPathInputAliasDAGArrayInputAliasDAGJSONObjectInputAliasDAGLinkedInputAlias.md) | A list of aliases for this input in different platforms. | [optional] +**Required** | **bool** | A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. | [optional] [default to false] +**Spec** | **Object** | An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec. | [optional] +**Type** | **string** | | [optional] [readonly] [default to "FunctionIntegerInput"] + +[[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/FunctionIntegerOutput.md b/docs/FunctionIntegerOutput.md new file mode 100644 index 000000000..096b0ccef --- /dev/null +++ b/docs/FunctionIntegerOutput.md @@ -0,0 +1,13 @@ + +# PollinationSDK.Model.FunctionIntegerOutput + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Type** | **string** | | [optional] [readonly] [default to "FunctionIntegerOutput"] + +[[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/FunctionJSONObjectInput.md b/docs/FunctionJSONObjectInput.md new file mode 100644 index 000000000..485313e6f --- /dev/null +++ b/docs/FunctionJSONObjectInput.md @@ -0,0 +1,20 @@ + +# PollinationSDK.Model.FunctionJSONObjectInput + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | Input name. | +**Annotations** | **Dictionary<string, string>** | An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries. | [optional] +**Description** | **string** | Optional description for input. | [optional] +**Default** | **Object** | Default value to use for an input if a value was not supplied. | [optional] +**Alias** | [**List<AnyOfDAGGenericInputAliasDAGStringInputAliasDAGIntegerInputAliasDAGNumberInputAliasDAGBooleanInputAliasDAGFolderInputAliasDAGFileInputAliasDAGPathInputAliasDAGArrayInputAliasDAGJSONObjectInputAliasDAGLinkedInputAlias>**](AnyOfDAGGenericInputAliasDAGStringInputAliasDAGIntegerInputAliasDAGNumberInputAliasDAGBooleanInputAliasDAGFolderInputAliasDAGFileInputAliasDAGPathInputAliasDAGArrayInputAliasDAGJSONObjectInputAliasDAGLinkedInputAlias.md) | A list of aliases for this input in different platforms. | [optional] +**Required** | **bool** | A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. | [optional] [default to false] +**Spec** | **Object** | An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec. | [optional] +**Type** | **string** | | [optional] [readonly] [default to "FunctionJSONObjectInput"] + +[[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/FunctionJSONObjectOutput.md b/docs/FunctionJSONObjectOutput.md new file mode 100644 index 000000000..6d33529fa --- /dev/null +++ b/docs/FunctionJSONObjectOutput.md @@ -0,0 +1,13 @@ + +# PollinationSDK.Model.FunctionJSONObjectOutput + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Type** | **string** | | [optional] [readonly] [default to "FunctionJSONObjectOutput"] + +[[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/FunctionNumberInput.md b/docs/FunctionNumberInput.md new file mode 100644 index 000000000..9e4085500 --- /dev/null +++ b/docs/FunctionNumberInput.md @@ -0,0 +1,20 @@ + +# PollinationSDK.Model.FunctionNumberInput + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | Input name. | +**Annotations** | **Dictionary<string, string>** | An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries. | [optional] +**Description** | **string** | Optional description for input. | [optional] +**Default** | **double** | Default value to use for an input if a value was not supplied. | [optional] +**Alias** | [**List<AnyOfDAGGenericInputAliasDAGStringInputAliasDAGIntegerInputAliasDAGNumberInputAliasDAGBooleanInputAliasDAGFolderInputAliasDAGFileInputAliasDAGPathInputAliasDAGArrayInputAliasDAGJSONObjectInputAliasDAGLinkedInputAlias>**](AnyOfDAGGenericInputAliasDAGStringInputAliasDAGIntegerInputAliasDAGNumberInputAliasDAGBooleanInputAliasDAGFolderInputAliasDAGFileInputAliasDAGPathInputAliasDAGArrayInputAliasDAGJSONObjectInputAliasDAGLinkedInputAlias.md) | A list of aliases for this input in different platforms. | [optional] +**Required** | **bool** | A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. | [optional] [default to false] +**Spec** | **Object** | An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec. | [optional] +**Type** | **string** | | [optional] [readonly] [default to "FunctionNumberInput"] + +[[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/FunctionNumberOutput.md b/docs/FunctionNumberOutput.md new file mode 100644 index 000000000..464d69866 --- /dev/null +++ b/docs/FunctionNumberOutput.md @@ -0,0 +1,13 @@ + +# PollinationSDK.Model.FunctionNumberOutput + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Type** | **string** | | [optional] [readonly] [default to "FunctionNumberOutput"] + +[[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/FunctionPathInput.md b/docs/FunctionPathInput.md new file mode 100644 index 000000000..456943fde --- /dev/null +++ b/docs/FunctionPathInput.md @@ -0,0 +1,22 @@ + +# PollinationSDK.Model.FunctionPathInput + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | Input name. | +**Annotations** | **Dictionary<string, string>** | An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries. | [optional] +**Description** | **string** | Optional description for input. | [optional] +**Path** | **string** | 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. | +**Default** | [**AnyOfHTTPS3ProjectFolder**](AnyOfHTTPS3ProjectFolder.md) | The default source for file if the value is not provided. | [optional] +**Alias** | [**List<AnyOfDAGGenericInputAliasDAGStringInputAliasDAGIntegerInputAliasDAGNumberInputAliasDAGBooleanInputAliasDAGFolderInputAliasDAGFileInputAliasDAGPathInputAliasDAGArrayInputAliasDAGJSONObjectInputAliasDAGLinkedInputAlias>**](AnyOfDAGGenericInputAliasDAGStringInputAliasDAGIntegerInputAliasDAGNumberInputAliasDAGBooleanInputAliasDAGFolderInputAliasDAGFileInputAliasDAGPathInputAliasDAGArrayInputAliasDAGJSONObjectInputAliasDAGLinkedInputAlias.md) | A list of aliases for this input in different platforms. | [optional] +**Required** | **bool** | A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. | [optional] [default to false] +**Spec** | **Object** | An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec. | [optional] +**Extensions** | **List<string>** | Optional list of extensions for file. The check for extension is case-insensitive. | [optional] +**Type** | **string** | | [optional] [readonly] [default to "FunctionPathInput"] + +[[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/FunctionPathOutput.md b/docs/FunctionPathOutput.md new file mode 100644 index 000000000..97d7d192c --- /dev/null +++ b/docs/FunctionPathOutput.md @@ -0,0 +1,15 @@ + +# PollinationSDK.Model.FunctionPathOutput + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Path** | **string** | Path to the output artifact relative to where the function command is executed. | +**Required** | **bool** | A boolean to indicate if an artifact output is required. A False value makes the artifact optional. | [optional] [default to true] +**Type** | **string** | | [optional] [readonly] [default to "FunctionPathOutput"] + +[[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/FunctionStringInput.md b/docs/FunctionStringInput.md new file mode 100644 index 000000000..309a5cf40 --- /dev/null +++ b/docs/FunctionStringInput.md @@ -0,0 +1,13 @@ + +# PollinationSDK.Model.FunctionStringInput + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Type** | **string** | | [optional] [readonly] [default to "FunctionStringInput"] + +[[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/FunctionStringOutput.md b/docs/FunctionStringOutput.md new file mode 100644 index 000000000..3c77b908f --- /dev/null +++ b/docs/FunctionStringOutput.md @@ -0,0 +1,13 @@ + +# PollinationSDK.Model.FunctionStringOutput + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Type** | **string** | | [optional] [readonly] [default to "FunctionStringOutput"] + +[[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/GenericInput.md b/docs/GenericInput.md new file mode 100644 index 000000000..4abb2326e --- /dev/null +++ b/docs/GenericInput.md @@ -0,0 +1,16 @@ + +# PollinationSDK.Model.GenericInput + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | Input name. | +**Type** | **string** | | [optional] [readonly] [default to "GenericInput"] +**Annotations** | **Dictionary<string, string>** | An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries. | [optional] +**Description** | **string** | Optional description for input. | [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/GenericOutput.md b/docs/GenericOutput.md new file mode 100644 index 000000000..75dcbdd2d --- /dev/null +++ b/docs/GenericOutput.md @@ -0,0 +1,16 @@ + +# PollinationSDK.Model.GenericOutput + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | Output name. | +**Type** | **string** | | [optional] [readonly] [default to "GenericOutput"] +**Annotations** | **Dictionary<string, string>** | An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries. | [optional] +**Description** | **string** | Optional description for output. | [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/HTTP.md b/docs/HTTP.md new file mode 100644 index 000000000..5ccac28fe --- /dev/null +++ b/docs/HTTP.md @@ -0,0 +1,14 @@ + +# PollinationSDK.Model.HTTP + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Url** | **string** | For a HTTP endpoint this can be http://climate.onebuilding.org. | +**Type** | **string** | | [optional] [readonly] [default to "HTTP"] + +[[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/IOAliasHandler.md b/docs/IOAliasHandler.md new file mode 100644 index 000000000..8ef5185b3 --- /dev/null +++ b/docs/IOAliasHandler.md @@ -0,0 +1,18 @@ + +# PollinationSDK.Model.IOAliasHandler + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Language** | **string** | Declare the language (e.g. python, csharp, etc.). This option allows the recipe to be flexible on handling different programming languages. | +**Module** | **string** | Target module or namespace to load the alias function. | +**Function** | **string** | Name of the function. The input value will be passed to this function as the first argument. | +**Type** | **string** | | [optional] [readonly] [default to "IOAliasHandler"] +**Annotations** | **Dictionary<string, string>** | An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries. | [optional] +**Index** | **int** | 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. | [optional] [default to 0] + +[[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/IOBase.md b/docs/IOBase.md new file mode 100644 index 000000000..2783e9da8 --- /dev/null +++ b/docs/IOBase.md @@ -0,0 +1,16 @@ + +# PollinationSDK.Model.IOBase + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Type** | **string** | | [optional] [readonly] [default to "IOBase"] +**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<AnyType>**](AnyType.md) | Place-holder. Overwrite this! | [optional] +**Outputs** | [**List<AnyType>**](AnyType.md) | Place-holder. Overwrite this! | [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/InputFileReference.md b/docs/InputFileReference.md new file mode 100644 index 000000000..5bb1f14eb --- /dev/null +++ b/docs/InputFileReference.md @@ -0,0 +1,13 @@ + +# PollinationSDK.Model.InputFileReference + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Type** | **string** | | [optional] [readonly] [default to "InputFileReference"] + +[[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/InputFolderReference.md b/docs/InputFolderReference.md new file mode 100644 index 000000000..90d68d8c5 --- /dev/null +++ b/docs/InputFolderReference.md @@ -0,0 +1,13 @@ + +# PollinationSDK.Model.InputFolderReference + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Type** | **string** | | [optional] [readonly] [default to "InputFolderReference"] + +[[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/InputPathReference.md b/docs/InputPathReference.md new file mode 100644 index 000000000..b1be30c97 --- /dev/null +++ b/docs/InputPathReference.md @@ -0,0 +1,13 @@ + +# PollinationSDK.Model.InputPathReference + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Type** | **string** | | [optional] [readonly] [default to "InputPathReference"] + +[[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/InputReference.md b/docs/InputReference.md new file mode 100644 index 000000000..d82b17a09 --- /dev/null +++ b/docs/InputReference.md @@ -0,0 +1,13 @@ + +# PollinationSDK.Model.InputReference + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Type** | **string** | | [optional] [readonly] [default to "InputReference"] + +[[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/InputReferenceBase.md b/docs/InputReferenceBase.md new file mode 100644 index 000000000..a3371b479 --- /dev/null +++ b/docs/InputReferenceBase.md @@ -0,0 +1,14 @@ + +# PollinationSDK.Model.InputReferenceBase + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Variable** | **string** | The name of the DAG input variable | +**Type** | **string** | | [optional] [readonly] [default to "_InputReferenceBase"] + +[[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/ItemReference.md b/docs/ItemReference.md new file mode 100644 index 000000000..fb1e1afa0 --- /dev/null +++ b/docs/ItemReference.md @@ -0,0 +1,14 @@ + +# PollinationSDK.Model.ItemReference + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Variable** | **string** | The name of the looped item variable (use dot notation for nested json values) | [optional] +**Type** | **string** | | [optional] [readonly] [default to "ItemReference"] + +[[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/ItemType.md b/docs/ItemType.md new file mode 100644 index 000000000..774766e6c --- /dev/null +++ b/docs/ItemType.md @@ -0,0 +1,12 @@ + +# PollinationSDK.Model.ItemType + +## 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/Job.md b/docs/Job.md new file mode 100644 index 000000000..b6f92c8cb --- /dev/null +++ b/docs/Job.md @@ -0,0 +1,20 @@ + +# PollinationSDK.Model.Job + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Source** | **string** | The source url for downloading the recipe. | +**Type** | **string** | | [optional] [readonly] [default to "Job"] +**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"] +**Arguments** | **List<List<AnyOfJobArgumentJobPathArgument>>** | Input arguments for this job. | [optional] +**Name** | **string** | An optional name for this job. This name will be used a the display name for the run. | [optional] +**Description** | **string** | Run description. | [optional] +**Labels** | **Dictionary<string, string>** | Optional user data as a dictionary. User data is for user reference only and will not be used in the execution of the job. | [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/JobArgument.md b/docs/JobArgument.md new file mode 100644 index 000000000..e8cd92fa1 --- /dev/null +++ b/docs/JobArgument.md @@ -0,0 +1,16 @@ + +# PollinationSDK.Model.JobArgument + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | Argument name. The name must match one of the input names from Job's DAG template. | +**Value** | [**AnyType**](.md) | The value of the job argument. | +**Type** | **string** | | [optional] [readonly] [default to "JobArgument"] +**Annotations** | **Dictionary<string, string>** | An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries. | [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/JobPathArgument.md b/docs/JobPathArgument.md new file mode 100644 index 000000000..06e8aee18 --- /dev/null +++ b/docs/JobPathArgument.md @@ -0,0 +1,16 @@ + +# PollinationSDK.Model.JobPathArgument + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | Argument name. The name must match one of the input names from Job's template which can be a function or DAG. | +**Source** | [**AnyOfHTTPS3ProjectFolder**](AnyOfHTTPS3ProjectFolder.md) | The path to source the file from. | +**Type** | **string** | | [optional] [readonly] [default to "JobPathArgument"] +**Annotations** | **Dictionary<string, string>** | An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries. | [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/JobStatus.md b/docs/JobStatus.md new file mode 100644 index 000000000..e12d8f7b2 --- /dev/null +++ b/docs/JobStatus.md @@ -0,0 +1,26 @@ + +# PollinationSDK.Model.JobStatus + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **string** | The ID of the individual job. | +**StartedAt** | **DateTime** | The time at which the job was started | +**Type** | **string** | | [optional] [readonly] [default to "JobStatus"] +**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"] +**Status** | **JobStatusEnum** | The status of this job. | [optional] +**Message** | **string** | Any message produced by the job. Usually error/debugging hints. | [optional] +**FinishedAt** | **DateTime** | The time at which the task was completed | [optional] +**Source** | **string** | Source url for the status object. It can be a recipe or a function. | [optional] +**RunsPending** | **int** | The count of runs that are pending | [optional] [default to 0] +**RunsRunning** | **int** | The count of runs that are running | [optional] [default to 0] +**RunsCompleted** | **int** | The count of runs that have completed | [optional] [default to 0] +**RunsFailed** | **int** | The count of runs that have failed | [optional] [default to 0] +**RunsCancelled** | **int** | The count of runs that have been cancelled | [optional] [default to 0] + +[[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/JobStatusEnum.md b/docs/JobStatusEnum.md new file mode 100644 index 000000000..78e160974 --- /dev/null +++ b/docs/JobStatusEnum.md @@ -0,0 +1,12 @@ + +# PollinationSDK.Model.JobStatusEnum + +## 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/JobsApi.md b/docs/JobsApi.md new file mode 100644 index 000000000..a6df8a6f9 --- /dev/null +++ b/docs/JobsApi.md @@ -0,0 +1,646 @@ +# PollinationSDK.Api.JobsApi + +All URIs are relative to *http://localhost* + +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 +[**SearchJobFolder**](JobsApi.md#searchjobfolder) | **GET** /projects/{owner}/{name}/jobs/{job_id}/artifacts | List files/folders in a job folder + + + +## CancelJob + +> AnyType CancelJob (string owner, string name, string jobId) + +Cancel a Job + +Retrieve a job. + +### Example + +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using PollinationSDK.Api; +using PollinationSDK.Client; +using PollinationSDK.Model; + +namespace Example +{ + public class CancelJobExample + { + 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 + { + // Cancel a Job + AnyType result = apiInstance.CancelJob(owner, name, jobId); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling JobsApi.CancelJob: " + 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) + + +## CreateJob + +> CreatedContent CreateJob (string owner, string name, Job job, string authorization = null, string xPollinationToken = null) + +Schedule a job + +Create a new job. + +### Example + +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using PollinationSDK.Api; +using PollinationSDK.Client; +using PollinationSDK.Model; + +namespace Example +{ + public class CreateJobExample + { + 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 job = new Job(); // Job | + var authorization = authorization_example; // string | (optional) + var xPollinationToken = xPollinationToken_example; // string | (optional) + + try + { + // Schedule a job + CreatedContent result = apiInstance.CreateJob(owner, name, job, authorization, xPollinationToken); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling JobsApi.CreateJob: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **string**| | + **name** | **string**| | + **job** | [**Job**](Job.md)| | + **authorization** | **string**| | [optional] + **xPollinationToken** | **string**| | [optional] + +### 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 | +|-------------|-------------|------------------| +| **201** | 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) + + +## 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) + +Download an artifact from the job folder + +Get a download link for an artifact in a job folder + +### Example + +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using PollinationSDK.Api; +using PollinationSDK.Client; +using PollinationSDK.Model; + +namespace Example +{ + public class DownloadJobArtifactExample + { + 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 | + var path = path_example; // string | The path to an file within a project folder (optional) + + try + { + // Download an artifact from the job folder + AnyType result = apiInstance.DownloadJobArtifact(owner, name, jobId, path); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling JobsApi.DownloadJobArtifact: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **string**| | + **name** | **string**| | + **jobId** | **string**| | + **path** | **string**| The path to an file within a project folder | [optional] + +### 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** | Retrieved | - | +| **403** | Access forbidden | - | +| **500** | Server error | - | +| **400** | Invalid request | - | +| **404** | Not found | - | +| **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) + + +## GetJob + +> CloudJob GetJob (string owner, string name, string jobId) + +Get a Job + +Retrieve a job. + +### Example + +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using PollinationSDK.Api; +using PollinationSDK.Client; +using PollinationSDK.Model; + +namespace Example +{ + public class GetJobExample + { + 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 + { + // Get a Job + CloudJob result = apiInstance.GetJob(owner, name, jobId); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling JobsApi.GetJob: " + 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 + +[**CloudJob**](CloudJob.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 | - | +| **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) + + +## ListJobs + +> CloudJobList ListJobs (string owner, string name, List ids = null, JobStatusEnum? status = null, int? page = null, int? perPage = null) + +List Jobs + +Retrieve a list of jobs. + +### Example + +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using PollinationSDK.Api; +using PollinationSDK.Client; +using PollinationSDK.Model; + +namespace Example +{ + public class ListJobsExample + { + 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 ids = new List(); // List | (optional) + var status = ; // JobStatusEnum? | (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 Jobs + CloudJobList result = apiInstance.ListJobs(owner, name, ids, status, page, perPage); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling JobsApi.ListJobs: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **string**| | + **name** | **string**| | + **ids** | [**List<string>**](string.md)| | [optional] + **status** | **JobStatusEnum?**| | [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 + +[**CloudJobList**](CloudJobList.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 | - | +| **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) + + +## SearchJobFolder + +> List<FileMeta> SearchJobFolder (string owner, string name, string jobId, List path = null, int? page = null, int? perPage = null) + +List files/folders in a job folder + +Retrieve a list of artifacts in a job folder + +### Example + +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using PollinationSDK.Api; +using PollinationSDK.Client; +using PollinationSDK.Model; + +namespace Example +{ + public class SearchJobFolderExample + { + 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 | + var path = new List(); // List | The path to an file within a project folder (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 files/folders in a job folder + List result = apiInstance.SearchJobFolder(owner, name, jobId, path, page, perPage); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling JobsApi.SearchJobFolder: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **string**| | + **name** | **string**| | + **jobId** | **string**| | + **path** | [**List<string>**](string.md)| The path to an file within a project folder | [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 + +[**List<FileMeta>**](FileMeta.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 | - | +| **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/KeyRequest.md b/docs/KeyRequest.md new file mode 100644 index 000000000..b3daba3e5 --- /dev/null +++ b/docs/KeyRequest.md @@ -0,0 +1,14 @@ + +# PollinationSDK.Model.KeyRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Key** | **string** | | +**Type** | **string** | | [optional] [readonly] [default to "KeyRequest"] + +[[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/License.md b/docs/License.md new file mode 100644 index 000000000..cb32cd31b --- /dev/null +++ b/docs/License.md @@ -0,0 +1,16 @@ + +# PollinationSDK.Model.License + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | The license name used for the package. | +**Type** | **string** | | [optional] [readonly] [default to "License"] +**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] + +[[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/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/ListResponseMeta.md b/docs/ListResponseMeta.md new file mode 100644 index 000000000..69b05e516 --- /dev/null +++ b/docs/ListResponseMeta.md @@ -0,0 +1,19 @@ + +# PollinationSDK.Model.ListResponseMeta + +## 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 | +**NextPage** | **int** | The next page, if this on is not the last | [optional] +**Resources** | [**List<AnyType>**](AnyType.md) | The list of resources returned from the list query | [optional] +**Type** | **string** | | [optional] [readonly] [default to "ListResponseMeta"] + +[[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/LocalConfig.md b/docs/LocalConfig.md new file mode 100644 index 000000000..41dc0f468 --- /dev/null +++ b/docs/LocalConfig.md @@ -0,0 +1,14 @@ + +# PollinationSDK.Model.LocalConfig + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Type** | **string** | | [optional] [readonly] [default to "LocalConfig"] +**Annotations** | **Dictionary<string, string>** | An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries. | [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/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/Maintainer.md b/docs/Maintainer.md new file mode 100644 index 000000000..50a3b436f --- /dev/null +++ b/docs/Maintainer.md @@ -0,0 +1,16 @@ + +# PollinationSDK.Model.Maintainer + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | The name of the author/maintainer person or organization. | +**Type** | **string** | | [optional] [readonly] [default to "Maintainer"] +**Annotations** | **Dictionary<string, string>** | An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries. | [optional] +**Email** | **string** | The email address of the author/maintainer person or organization. | [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/MetaData.md b/docs/MetaData.md new file mode 100644 index 000000000..7f2178e5a --- /dev/null +++ b/docs/MetaData.md @@ -0,0 +1,25 @@ + +# PollinationSDK.Model.MetaData + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | Package name. Make it descriptive and helpful ;) | +**Tag** | **string** | The tag of the package | +**Type** | **string** | | [optional] [readonly] [default to "MetaData"] +**Annotations** | **Dictionary<string, string>** | An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries. | [optional] +**AppVersion** | **string** | The version of the application code underlying the manifest | [optional] +**Keywords** | **List<string>** | A list of keywords to search the package by | [optional] +**Maintainers** | [**List<Maintainer>**](Maintainer.md) | A list of maintainers for the package | [optional] +**Home** | **string** | The URL of this package's home page | [optional] +**Sources** | **List<string>** | A list of URLs to source code for this project | [optional] +**Icon** | **string** | A URL to an SVG or PNG image to be used as an icon | [optional] +**Deprecated** | **bool** | Whether this package is deprecated | [optional] +**Description** | **string** | A description of what this package does | [optional] +**License** | [**License**](License.md) | The license information. | [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/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/NewPluginPackage.md b/docs/NewPluginPackage.md new file mode 100644 index 000000000..f183728f8 --- /dev/null +++ b/docs/NewPluginPackage.md @@ -0,0 +1,15 @@ + +# PollinationSDK.Model.NewPluginPackage + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Manifest** | [**Plugin**](Plugin.md) | The Plugin manifest to be created | +**Readme** | **string** | The README file to attach to this package | [optional] [default to ""] +**Type** | **string** | | [optional] [readonly] [default to "NewPluginPackage"] + +[[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/NewRecipePackage.md b/docs/NewRecipePackage.md new file mode 100644 index 000000000..3b4926e98 --- /dev/null +++ b/docs/NewRecipePackage.md @@ -0,0 +1,15 @@ + +# PollinationSDK.Model.NewRecipePackage + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Manifest** | [**Recipe**](Recipe.md) | The Recipe manifest to be created | +**Readme** | **string** | The README file to attach to this package | [optional] [default to ""] +**Type** | **string** | | [optional] [readonly] [default to "NewRecipePackage"] + +[[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/OpenAPIGenBaseModel.md b/docs/OpenAPIGenBaseModel.md new file mode 100644 index 000000000..bd3d2368e --- /dev/null +++ b/docs/OpenAPIGenBaseModel.md @@ -0,0 +1,13 @@ + +# PollinationSDK.Model.OpenAPIGenBaseModel + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Type** | **string** | A base class to use when there is no baseclass available to fall on. | [optional] [readonly] [default to "InvalidType"] + +[[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/Organization.md b/docs/Organization.md new file mode 100644 index 000000000..ef75bc0a2 --- /dev/null +++ b/docs/Organization.md @@ -0,0 +1,23 @@ + +# PollinationSDK.Model.Organization + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountName** | **string** | The unique name of the org in small case without spaces | [optional] +**Name** | **string** | The display name for this org | [optional] +**PictureUrl** | **string** | URL to the picture associated with this org | [optional] +**ContactEmail** | **string** | The contact email for the Organization | [optional] +**Description** | **string** | A description of the org | [optional] +**Id** | **string** | The org ID | +**Owner** | [**AccountPublic**](AccountPublic.md) | The account the organization represents | +**Role** | **OrganizationRoleEnum** | The role the user has within the organization | [optional] +**MemberCount** | **int** | The number of members that are part of this org | [optional] [default to 0] +**TeamCount** | **int** | The number of teams that are part of this org | [optional] [default to 0] +**Type** | **string** | | [optional] [readonly] [default to "Organization"] + +[[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/OrganizationCreate.md b/docs/OrganizationCreate.md new file mode 100644 index 000000000..61803b14c --- /dev/null +++ b/docs/OrganizationCreate.md @@ -0,0 +1,18 @@ + +# PollinationSDK.Model.OrganizationCreate + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountName** | **string** | The unique name of the org in small case without spaces | [optional] +**Name** | **string** | The display name for this org | [optional] +**PictureUrl** | **string** | URL to the picture associated with this org | [optional] +**ContactEmail** | **string** | The contact email for the Organization | [optional] +**Description** | **string** | A description of the org | [optional] +**Type** | **string** | | [optional] [readonly] [default to "OrganizationCreate"] + +[[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/OrganizationList.md b/docs/OrganizationList.md new file mode 100644 index 000000000..94924f441 --- /dev/null +++ b/docs/OrganizationList.md @@ -0,0 +1,19 @@ + +# PollinationSDK.Model.OrganizationList + +## 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<Organization>**](Organization.md) | | +**NextPage** | **int** | The next page, if this on is not the last | [optional] +**Type** | **string** | | [optional] [readonly] [default to "OrganizationList"] + +[[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/OrganizationMember.md b/docs/OrganizationMember.md new file mode 100644 index 000000000..233f72e3e --- /dev/null +++ b/docs/OrganizationMember.md @@ -0,0 +1,15 @@ + +# PollinationSDK.Model.OrganizationMember + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**User** | [**UserPublic**](UserPublic.md) | The organization member | +**Role** | **OrganizationRoleEnum** | The role the user has within the organization | +**Type** | **string** | | [optional] [readonly] [default to "OrganizationMember"] + +[[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/OrganizationMemberList.md b/docs/OrganizationMemberList.md new file mode 100644 index 000000000..2dff2048b --- /dev/null +++ b/docs/OrganizationMemberList.md @@ -0,0 +1,19 @@ + +# PollinationSDK.Model.OrganizationMemberList + +## 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<OrganizationMember>**](OrganizationMember.md) | | +**NextPage** | **int** | The next page, if this on is not the last | [optional] +**Type** | **string** | | [optional] [readonly] [default to "OrganizationMemberList"] + +[[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/OrganizationRoleEnum.md b/docs/OrganizationRoleEnum.md new file mode 100644 index 000000000..46fa3630b --- /dev/null +++ b/docs/OrganizationRoleEnum.md @@ -0,0 +1,12 @@ + +# PollinationSDK.Model.OrganizationRoleEnum + +## 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/OrganizationUpdate.md b/docs/OrganizationUpdate.md new file mode 100644 index 000000000..8cad82696 --- /dev/null +++ b/docs/OrganizationUpdate.md @@ -0,0 +1,18 @@ + +# PollinationSDK.Model.OrganizationUpdate + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountName** | **string** | The unique name of the org in small case without spaces | [optional] +**Name** | **string** | The display name for this org | [optional] +**PictureUrl** | **string** | URL to the picture associated with this org | [optional] +**ContactEmail** | **string** | The contact email for the Organization | [optional] +**Description** | **string** | A description of the org | [optional] +**Type** | **string** | | [optional] [readonly] [default to "OrganizationUpdate"] + +[[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/OrgsApi.md b/docs/OrgsApi.md new file mode 100644 index 000000000..c1529400d --- /dev/null +++ b/docs/OrgsApi.md @@ -0,0 +1,709 @@ +# PollinationSDK.Api.OrgsApi + +All URIs are relative to *http://localhost* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**CreateOrg**](OrgsApi.md#createorg) | **POST** /orgs | Create an Org +[**DeleteOrg**](OrgsApi.md#deleteorg) | **DELETE** /orgs/{name} | Delete an Org +[**DeleteOrgMember**](OrgsApi.md#deleteorgmember) | **DELETE** /orgs/{name}/members/{username} | Remove an Org member +[**GetOrg**](OrgsApi.md#getorg) | **GET** /orgs/{name} | Get an Org +[**GetOrgMembers**](OrgsApi.md#getorgmembers) | **GET** /orgs/{name}/members | List organization members +[**ListOrgs**](OrgsApi.md#listorgs) | **GET** /orgs | List Orgs +[**UpdateOrg**](OrgsApi.md#updateorg) | **PUT** /orgs/{name} | Update an Org +[**UpsertOrgMember**](OrgsApi.md#upsertorgmember) | **PATCH** /orgs/{name}/members/{username}/{role} | Add or update the role of an Org Member + + + +## CreateOrg + +> CreatedContent CreateOrg (OrganizationCreate organizationCreate) + +Create an Org + +Create a new org. + +### Example + +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using PollinationSDK.Api; +using PollinationSDK.Client; +using PollinationSDK.Model; + +namespace Example +{ + public class CreateOrgExample + { + 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 OrgsApi(Configuration.Default); + var organizationCreate = new OrganizationCreate(); // OrganizationCreate | + + try + { + // Create an Org + CreatedContent result = apiInstance.CreateOrg(organizationCreate); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling OrgsApi.CreateOrg: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **organizationCreate** | [**OrganizationCreate**](OrganizationCreate.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 | +|-------------|-------------|------------------| +| **201** | Success | - | +| **403** | Access forbidden | - | +| **500** | Server error | - | +| **400** | Invalid request | - | +| **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) + + +## DeleteOrg + +> void DeleteOrg (string name) + +Delete an Org + +Delete a org (must have `admin` permission) + +### Example + +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using PollinationSDK.Api; +using PollinationSDK.Client; +using PollinationSDK.Model; + +namespace Example +{ + public class DeleteOrgExample + { + 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 OrgsApi(Configuration.Default); + var name = name_example; // string | + + try + { + // Delete an Org + apiInstance.DeleteOrg(name); + } + catch (ApiException e) + { + Debug.Print("Exception when calling OrgsApi.DeleteOrg: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **name** | **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** | Accepted | - | +| **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) + + +## DeleteOrgMember + +> void DeleteOrgMember (string name, string username) + +Remove an Org member + +Remove a member from the org (must have org `owner` role) + +### Example + +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using PollinationSDK.Api; +using PollinationSDK.Client; +using PollinationSDK.Model; + +namespace Example +{ + public class DeleteOrgMemberExample + { + 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 OrgsApi(Configuration.Default); + var name = name_example; // string | + var username = username_example; // string | + + try + { + // Remove an Org member + apiInstance.DeleteOrgMember(name, username); + } + catch (ApiException e) + { + Debug.Print("Exception when calling OrgsApi.DeleteOrgMember: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **name** | **string**| | + **username** | **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** | Accepted | - | +| **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) + + +## GetOrg + +> Organization GetOrg (string name) + +Get an Org + +Retrieve a org by name + +### Example + +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using PollinationSDK.Api; +using PollinationSDK.Client; +using PollinationSDK.Model; + +namespace Example +{ + public class GetOrgExample + { + 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 OrgsApi(Configuration.Default); + var name = name_example; // string | + + try + { + // Get an Org + Organization result = apiInstance.GetOrg(name); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling OrgsApi.GetOrg: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **name** | **string**| | + +### Return type + +[**Organization**](Organization.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 | - | +| **404** | Not found | - | +| **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) + + +## GetOrgMembers + +> OrganizationMemberList GetOrgMembers (string name) + +List organization members + +Retrieve a org's members + +### Example + +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using PollinationSDK.Api; +using PollinationSDK.Client; +using PollinationSDK.Model; + +namespace Example +{ + public class GetOrgMembersExample + { + public static void Main() + { + Configuration.Default.BasePath = "http://localhost"; + var apiInstance = new OrgsApi(Configuration.Default); + var name = name_example; // string | + + try + { + // List organization members + OrganizationMemberList result = apiInstance.GetOrgMembers(name); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling OrgsApi.GetOrgMembers: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **name** | **string**| | + +### Return type + +[**OrganizationMemberList**](OrganizationMemberList.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Retrieved | - | +| **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) + + +## ListOrgs + +> OrganizationList ListOrgs (List search = null, List name = null, List member = null, int? page = null, int? perPage = null) + +List Orgs + +search for orgs using query parameters + +### Example + +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using PollinationSDK.Api; +using PollinationSDK.Client; +using PollinationSDK.Model; + +namespace Example +{ + public class ListOrgsExample + { + 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 OrgsApi(Configuration.Default); + var search = new List(); // List | You know, for search (optional) + var name = new List(); // List | The account name (optional) + var member = new List(); // List | The username of a user (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 Orgs + OrganizationList result = apiInstance.ListOrgs(search, name, member, page, perPage); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling OrgsApi.ListOrgs: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **search** | [**List<string>**](string.md)| You know, for search | [optional] + **name** | [**List<string>**](string.md)| The account name | [optional] + **member** | [**List<string>**](string.md)| The username of a user | [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 + +[**OrganizationList**](OrganizationList.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 | - | +| **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) + + +## UpdateOrg + +> UpdateAccepted UpdateOrg (string name, OrganizationUpdate organizationUpdate) + +Update an Org + +Update a org (must have org `owner` role) + +### Example + +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using PollinationSDK.Api; +using PollinationSDK.Client; +using PollinationSDK.Model; + +namespace Example +{ + public class UpdateOrgExample + { + 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 OrgsApi(Configuration.Default); + var name = name_example; // string | + var organizationUpdate = new OrganizationUpdate(); // OrganizationUpdate | + + try + { + // Update an Org + UpdateAccepted result = apiInstance.UpdateOrg(name, organizationUpdate); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling OrgsApi.UpdateOrg: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **name** | **string**| | + **organizationUpdate** | [**OrganizationUpdate**](OrganizationUpdate.md)| | + +### Return type + +[**UpdateAccepted**](UpdateAccepted.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 | +|-------------|-------------|------------------| +| **202** | Accepted | - | +| **403** | Access forbidden | - | +| **500** | Server error | - | +| **400** | Invalid request | - | +| **404** | Not found | - | +| **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) + + +## UpsertOrgMember + +> UpdateAccepted UpsertOrgMember (string name, string username, OrganizationRoleEnum role) + +Add or update the role of an Org Member + +Upsert a member role to the org (must have org `owner` role) + +### Example + +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using PollinationSDK.Api; +using PollinationSDK.Client; +using PollinationSDK.Model; + +namespace Example +{ + public class UpsertOrgMemberExample + { + 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 OrgsApi(Configuration.Default); + var name = name_example; // string | + var username = username_example; // string | + var role = ; // OrganizationRoleEnum | + + try + { + // Add or update the role of an Org Member + UpdateAccepted result = apiInstance.UpsertOrgMember(name, username, role); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling OrgsApi.UpsertOrgMember: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **name** | **string**| | + **username** | **string**| | + **role** | **OrganizationRoleEnum**| | + +### Return type + +[**UpdateAccepted**](UpdateAccepted.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 | - | +| **403** | Access forbidden | - | +| **500** | Server error | - | +| **400** | Invalid request | - | +| **404** | Not found | - | +| **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/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/PackageVersion.md b/docs/PackageVersion.md new file mode 100644 index 000000000..ff11002df --- /dev/null +++ b/docs/PackageVersion.md @@ -0,0 +1,32 @@ + +# PollinationSDK.Model.PackageVersion + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | Package name. Make it descriptive and helpful ;) | +**Tag** | **string** | The tag of the package | +**Url** | **string** | | +**Created** | **DateTime** | | +**Digest** | **string** | | +**Annotations** | **Dictionary<string, string>** | An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries. | [optional] +**AppVersion** | **string** | The version of the application code underlying the manifest | [optional] +**Keywords** | **List<string>** | A list of keywords to search the package by | [optional] +**Maintainers** | [**List<Maintainer>**](Maintainer.md) | A list of maintainers for the package | [optional] +**Home** | **string** | The URL of this package's home page | [optional] +**Sources** | **List<string>** | A list of URLs to source code for this project | [optional] +**Icon** | **string** | A URL to an SVG or PNG image to be used as an icon | [optional] +**Deprecated** | **bool** | Whether this package is deprecated | [optional] +**Description** | **string** | A description of what this package does | [optional] +**License** | [**License**](License.md) | The license information. | [optional] +**Slug** | **string** | A slug of the repository name and the package name. | [optional] +**Kind** | **string** | The type of Queenbee package (ie: recipe or plugin) | [optional] [default to ""] +**Readme** | **string** | The README file string for this package | [optional] +**Manifest** | [**AnyOfRecipePlugin**](AnyOfRecipePlugin.md) | The package Recipe or Plugin manifest | [optional] +**Type** | **string** | | [optional] [readonly] [default to "PackageVersion"] + +[[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/PathOutput.md b/docs/PathOutput.md new file mode 100644 index 000000000..c9c64e84d --- /dev/null +++ b/docs/PathOutput.md @@ -0,0 +1,18 @@ + +# PollinationSDK.Model.PathOutput + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | Output name. | +**Annotations** | **Dictionary<string, string>** | An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries. | [optional] +**Description** | **string** | Optional description for output. | [optional] +**Path** | **string** | Path to the output artifact relative to where the function command is executed. | +**Required** | **bool** | A boolean to indicate if an artifact output is required. A False value makes the artifact optional. | [optional] [default to true] +**Type** | **string** | | [optional] [readonly] [default to "PathOutput"] + +[[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/Permission.md b/docs/Permission.md new file mode 100644 index 000000000..80252bb0f --- /dev/null +++ b/docs/Permission.md @@ -0,0 +1,12 @@ + +# PollinationSDK.Model.Permission + +## 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/Plugin.md b/docs/Plugin.md new file mode 100644 index 000000000..20e3642ab --- /dev/null +++ b/docs/Plugin.md @@ -0,0 +1,18 @@ + +# PollinationSDK.Model.Plugin + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Metadata** | [**MetaData**](MetaData.md) | The Plugin metadata information | +**Config** | [**PluginConfig**](PluginConfig.md) | The configuration information to run this plugin | +**Functions** | [**List<Function>**](Function.md) | List of Plugin functions | +**Type** | **string** | | [optional] [readonly] [default to "Plugin"] +**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"] + +[[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/PluginConfig.md b/docs/PluginConfig.md new file mode 100644 index 000000000..4a5aea1e6 --- /dev/null +++ b/docs/PluginConfig.md @@ -0,0 +1,16 @@ + +# PollinationSDK.Model.PluginConfig + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Docker** | [**DockerConfig**](DockerConfig.md) | The configuration to use this plugin in a docker container | +**Type** | **string** | | [optional] [readonly] [default to "PluginConfig"] +**Annotations** | **Dictionary<string, string>** | An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries. | [optional] +**Local** | [**LocalConfig**](LocalConfig.md) | The configuration to use this plugin locally | [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/PluginPackage.md b/docs/PluginPackage.md new file mode 100644 index 000000000..5ff1acba5 --- /dev/null +++ b/docs/PluginPackage.md @@ -0,0 +1,21 @@ + +# PollinationSDK.Model.PluginPackage + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Digest** | **string** | The new package digest | +**Tag** | **string** | The new package tag | +**Keywords** | **List<string>** | keywords | [optional] +**Description** | **string** | description | [optional] +**Icon** | **string** | icon | [optional] +**CreatedAt** | **DateTime** | Creation Timestamp | [optional] +**Readme** | **string** | The Repository Readme | [optional] +**Manifest** | [**Plugin**](Plugin.md) | | +**Type** | **string** | | [optional] [readonly] [default to "PluginPackage"] + +[[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/PluginPackageList.md b/docs/PluginPackageList.md new file mode 100644 index 000000000..865d76621 --- /dev/null +++ b/docs/PluginPackageList.md @@ -0,0 +1,19 @@ + +# PollinationSDK.Model.PluginPackageList + +## 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<PluginPackage>**](PluginPackage.md) | | +**NextPage** | **int** | The next page, if this on is not the last | [optional] +**Type** | **string** | | [optional] [readonly] [default to "PluginPackageList"] + +[[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 new file mode 100644 index 000000000..f30e50a96 --- /dev/null +++ b/docs/PluginsApi.md @@ -0,0 +1,1029 @@ +# PollinationSDK.Api.PluginsApi + +All URIs are relative to *http://localhost* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**CreatePlugin**](PluginsApi.md#createplugin) | **POST** /plugins/{owner} | Create a Plugin +[**CreatePluginPackage**](PluginsApi.md#createpluginpackage) | **POST** /plugins/{owner}/{name}/tags | Create a new Plugin package +[**DeletePlugin**](PluginsApi.md#deleteplugin) | **DELETE** /plugins/{owner}/{name} | Delete a Plugin +[**DeletePluginOrgPermission**](PluginsApi.md#deletepluginorgpermission) | **DELETE** /plugins/{owner}/{name}/permissions | Remove a Repository permissions +[**GetPlugin**](PluginsApi.md#getplugin) | **GET** /plugins/{owner}/{name} | Get a plugin +[**GetPluginAccessPermissions**](PluginsApi.md#getpluginaccesspermissions) | **GET** /plugins/{owner}/{name}/permissions | Get plugin access permissions +[**GetPluginByTag**](PluginsApi.md#getpluginbytag) | **GET** /plugins/{owner}/{name}/tags/{tag} | Get a plugin tag +[**ListPluginTags**](PluginsApi.md#listplugintags) | **GET** /plugins/{owner}/{name}/tags | Get a plugin tags +[**ListPlugins**](PluginsApi.md#listplugins) | **GET** /plugins | List plugins +[**UpdatePlugin**](PluginsApi.md#updateplugin) | **PUT** /plugins/{owner}/{name} | Update a Plugin +[**UpsertPluginPermission**](PluginsApi.md#upsertpluginpermission) | **PATCH** /plugins/{owner}/{name}/permissions | Upsert a new permission to a plugin + + + +## CreatePlugin + +> CreatedContent CreatePlugin (string owner, RepositoryCreate repositoryCreate) + +Create a Plugin + +Create a new plugin. + +### Example + +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using PollinationSDK.Api; +using PollinationSDK.Client; +using PollinationSDK.Model; + +namespace Example +{ + public class CreatePluginExample + { + 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 PluginsApi(Configuration.Default); + var owner = owner_example; // string | + var repositoryCreate = new RepositoryCreate(); // RepositoryCreate | + + try + { + // Create a Plugin + CreatedContent result = apiInstance.CreatePlugin(owner, repositoryCreate); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling PluginsApi.CreatePlugin: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **string**| | + **repositoryCreate** | [**RepositoryCreate**](RepositoryCreate.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 | +|-------------|-------------|------------------| +| **201** | Success | - | +| **403** | Access forbidden | - | +| **500** | Server error | - | +| **400** | Invalid request | - | +| **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) + + +## CreatePluginPackage + +> CreatedContent CreatePluginPackage (string owner, string name, NewPluginPackage newPluginPackage) + +Create a new Plugin package + +Create a new plugin package version + +### Example + +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using PollinationSDK.Api; +using PollinationSDK.Client; +using PollinationSDK.Model; + +namespace Example +{ + public class CreatePluginPackageExample + { + 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 PluginsApi(Configuration.Default); + var owner = owner_example; // string | + var name = name_example; // string | + var newPluginPackage = new NewPluginPackage(); // NewPluginPackage | + + try + { + // Create a new Plugin package + CreatedContent result = apiInstance.CreatePluginPackage(owner, name, newPluginPackage); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling PluginsApi.CreatePluginPackage: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **string**| | + **name** | **string**| | + **newPluginPackage** | [**NewPluginPackage**](NewPluginPackage.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** | Success | - | +| **403** | Access forbidden | - | +| **500** | Server error | - | +| **400** | Invalid request | - | +| **404** | Not found | - | +| **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) + + +## DeletePlugin + +> void DeletePlugin (string owner, string name) + +Delete a Plugin + +Delete a plugin (must have `admin` permission) + +### Example + +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using PollinationSDK.Api; +using PollinationSDK.Client; +using PollinationSDK.Model; + +namespace Example +{ + public class DeletePluginExample + { + 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 PluginsApi(Configuration.Default); + var owner = owner_example; // string | + var name = name_example; // string | + + try + { + // Delete a Plugin + apiInstance.DeletePlugin(owner, name); + } + catch (ApiException e) + { + Debug.Print("Exception when calling PluginsApi.DeletePlugin: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **string**| | + **name** | **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** | Accepted | - | +| **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) + + +## DeletePluginOrgPermission + +> void DeletePluginOrgPermission (string owner, string name, RepositoryPolicySubject repositoryPolicySubject) + +Remove a Repository permissions + +Delete a plugin's access policy (must have `admin` permission) + +### Example + +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using PollinationSDK.Api; +using PollinationSDK.Client; +using PollinationSDK.Model; + +namespace Example +{ + public class DeletePluginOrgPermissionExample + { + 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 PluginsApi(Configuration.Default); + var owner = owner_example; // string | + var name = name_example; // string | + var repositoryPolicySubject = new RepositoryPolicySubject(); // RepositoryPolicySubject | + + try + { + // Remove a Repository permissions + apiInstance.DeletePluginOrgPermission(owner, name, repositoryPolicySubject); + } + catch (ApiException e) + { + Debug.Print("Exception when calling PluginsApi.DeletePluginOrgPermission: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **string**| | + **name** | **string**| | + **repositoryPolicySubject** | [**RepositoryPolicySubject**](RepositoryPolicySubject.md)| | + +### Return type + +void (empty response body) + +### 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 | +|-------------|-------------|------------------| +| **204** | Accepted | - | +| **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) + + +## GetPlugin + +> Repository GetPlugin (string owner, string name) + +Get a plugin + +Retrieve a plugin by name + +### Example + +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using PollinationSDK.Api; +using PollinationSDK.Client; +using PollinationSDK.Model; + +namespace Example +{ + public class GetPluginExample + { + 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 PluginsApi(Configuration.Default); + var owner = owner_example; // string | + var name = name_example; // string | + + try + { + // Get a plugin + Repository result = apiInstance.GetPlugin(owner, name); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling PluginsApi.GetPlugin: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **string**| | + **name** | **string**| | + +### Return type + +[**Repository**](Repository.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 | - | +| **404** | Not found | - | +| **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) + + +## GetPluginAccessPermissions + +> RepositoryAccessPolicyList GetPluginAccessPermissions (string owner, string name, int? page = null, int? perPage = null, List subjectType = null, List permission = null) + +Get plugin access permissions + +Retrieve a plugin's access permissions (must have `write` permission) + +### Example + +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using PollinationSDK.Api; +using PollinationSDK.Client; +using PollinationSDK.Model; + +namespace Example +{ + public class GetPluginAccessPermissionsExample + { + 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 PluginsApi(Configuration.Default); + var owner = owner_example; // string | + var name = name_example; // string | + 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) + var subjectType = new List(); // List | The type of access policy subject (optional) + var permission = new List(); // List | An access policy permission string (optional) + + try + { + // Get plugin access permissions + RepositoryAccessPolicyList result = apiInstance.GetPluginAccessPermissions(owner, name, page, perPage, subjectType, permission); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling PluginsApi.GetPluginAccessPermissions: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **string**| | + **name** | **string**| | + **page** | **int?**| Page number starting from 1 | [optional] [default to 1] + **perPage** | **int?**| Number of items per page | [optional] [default to 25] + **subjectType** | [**List<string>**](string.md)| The type of access policy subject | [optional] + **permission** | [**List<string>**](string.md)| An access policy permission string | [optional] + +### Return type + +[**RepositoryAccessPolicyList**](RepositoryAccessPolicyList.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) + + +## GetPluginByTag + +> PluginPackage GetPluginByTag (string owner, string name, string tag) + +Get a plugin tag + +Retrieve a plugin tag by name and tag + +### Example + +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using PollinationSDK.Api; +using PollinationSDK.Client; +using PollinationSDK.Model; + +namespace Example +{ + public class GetPluginByTagExample + { + 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 PluginsApi(Configuration.Default); + var owner = owner_example; // string | + var name = name_example; // string | + var tag = tag_example; // string | + + try + { + // Get a plugin tag + PluginPackage result = apiInstance.GetPluginByTag(owner, name, tag); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling PluginsApi.GetPluginByTag: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **string**| | + **name** | **string**| | + **tag** | **string**| | + +### Return type + +[**PluginPackage**](PluginPackage.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 | - | +| **404** | Not found | - | +| **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) + + +## ListPluginTags + +> PluginPackageList ListPluginTags (string owner, string name, PackageSortKey? sortBy = null, SortEnum? sortOrder = null, int? page = null, int? perPage = null) + +Get a plugin tags + +Retrieve a plugin by name + +### Example + +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using PollinationSDK.Api; +using PollinationSDK.Client; +using PollinationSDK.Model; + +namespace Example +{ + public class ListPluginTagsExample + { + 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 PluginsApi(Configuration.Default); + var owner = owner_example; // string | + var name = name_example; // string | + 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) + + try + { + // Get a plugin tags + PluginPackageList result = apiInstance.ListPluginTags(owner, name, sortBy, sortOrder, page, perPage); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling PluginsApi.ListPluginTags: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **string**| | + **name** | **string**| | + **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] + +### Return type + +[**PluginPackageList**](PluginPackageList.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 | - | +| **404** | Not found | - | +| **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) + + +## 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) + +List plugins + +### Example + +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using PollinationSDK.Api; +using PollinationSDK.Client; +using PollinationSDK.Model; + +namespace Example +{ + public class ListPluginsExample + { + 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 PluginsApi(Configuration.Default); + var search = new List(); // List | You know, for search (optional) + var name = new List(); // List | The account name (optional) + var owner = new List(); // List | Owner of the project (optional) + 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 = ; // 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) + + try + { + // List plugins + RepositoryList result = apiInstance.ListPlugins(search, name, owner, _public, keyword, permission, sortBy, sortOrder, page, perPage); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling PluginsApi.ListPlugins: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **search** | [**List<string>**](string.md)| You know, for search | [optional] + **name** | [**List<string>**](string.md)| The account name | [optional] + **owner** | [**List<string>**](string.md)| Owner of the project | [optional] + **_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?**| 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] + +### Return type + +[**RepositoryList**](RepositoryList.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 | - | +| **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) + + +## UpdatePlugin + +> UpdateAccepted UpdatePlugin (string owner, string name, RepositoryUpdate repositoryUpdate) + +Update a Plugin + +Update a plugin (must have `contribute` permission) + +### Example + +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using PollinationSDK.Api; +using PollinationSDK.Client; +using PollinationSDK.Model; + +namespace Example +{ + public class UpdatePluginExample + { + 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 PluginsApi(Configuration.Default); + var owner = owner_example; // string | + var name = name_example; // string | + var repositoryUpdate = new RepositoryUpdate(); // RepositoryUpdate | + + try + { + // Update a Plugin + UpdateAccepted result = apiInstance.UpdatePlugin(owner, name, repositoryUpdate); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling PluginsApi.UpdatePlugin: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **string**| | + **name** | **string**| | + **repositoryUpdate** | [**RepositoryUpdate**](RepositoryUpdate.md)| | + +### Return type + +[**UpdateAccepted**](UpdateAccepted.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 | +|-------------|-------------|------------------| +| **202** | Accepted | - | +| **403** | Access forbidden | - | +| **500** | Server error | - | +| **400** | Invalid request | - | +| **404** | Not found | - | +| **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) + + +## UpsertPluginPermission + +> UpdateAccepted UpsertPluginPermission (string owner, string name, RepositoryAccessPolicy repositoryAccessPolicy) + +Upsert a new permission to a plugin + +Upsert a plugin's access policy (must have `admin` permission) + +### Example + +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using PollinationSDK.Api; +using PollinationSDK.Client; +using PollinationSDK.Model; + +namespace Example +{ + public class UpsertPluginPermissionExample + { + 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 PluginsApi(Configuration.Default); + var owner = owner_example; // string | + var name = name_example; // string | + var repositoryAccessPolicy = new RepositoryAccessPolicy(); // RepositoryAccessPolicy | + + try + { + // Upsert a new permission to a plugin + UpdateAccepted result = apiInstance.UpsertPluginPermission(owner, name, repositoryAccessPolicy); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling PluginsApi.UpsertPluginPermission: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **string**| | + **name** | **string**| | + **repositoryAccessPolicy** | [**RepositoryAccessPolicy**](RepositoryAccessPolicy.md)| | + +### Return type + +[**UpdateAccepted**](UpdateAccepted.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 | +|-------------|-------------|------------------| +| **202** | Accepted | - | +| **403** | Access forbidden | - | +| **500** | Server error | - | +| **400** | Invalid request | - | +| **404** | Not found | - | +| **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/PolicySubject.md b/docs/PolicySubject.md new file mode 100644 index 000000000..9a898572c --- /dev/null +++ b/docs/PolicySubject.md @@ -0,0 +1,15 @@ + +# PollinationSDK.Model.PolicySubject + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**SubjectType** | **SubjectType** | | +**Name** | **string** | The name of the policy subject | +**Type** | **string** | | [optional] [readonly] [default to "PolicySubject"] + +[[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/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/Project.md b/docs/Project.md new file mode 100644 index 000000000..aecbba245 --- /dev/null +++ b/docs/Project.md @@ -0,0 +1,21 @@ + +# PollinationSDK.Model.Project + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | The name of the project. Must be unique to a given owner | +**Description** | **string** | A description of the project | [optional] [default to ""] +**Public** | **bool** | Whether or not a project is publicly viewable | [optional] [default to true] +**Id** | **string** | The project ID | +**Owner** | [**AccountPublic**](AccountPublic.md) | The project owner | +**Permissions** | [**UserPermission**](UserPermission.md) | | +**Slug** | **string** | The project name in slug format | +**Usage** | [**Usage**](Usage.md) | The resource consumption of this project | [optional] +**Type** | **string** | | [optional] [readonly] [default to "Project"] + +[[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/ProjectAccessPolicy.md b/docs/ProjectAccessPolicy.md new file mode 100644 index 000000000..0f700b118 --- /dev/null +++ b/docs/ProjectAccessPolicy.md @@ -0,0 +1,15 @@ + +# PollinationSDK.Model.ProjectAccessPolicy + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Subject** | [**PolicySubject**](PolicySubject.md) | The subject of the access policy | +**Permission** | **Permission** | The permission given to the subject of the access policy | +**Type** | **string** | | [optional] [readonly] [default to "ProjectAccessPolicy"] + +[[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/ProjectAccessPolicyList.md b/docs/ProjectAccessPolicyList.md new file mode 100644 index 000000000..a19ff38c4 --- /dev/null +++ b/docs/ProjectAccessPolicyList.md @@ -0,0 +1,19 @@ + +# PollinationSDK.Model.ProjectAccessPolicyList + +## 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<ProjectAccessPolicy>**](ProjectAccessPolicy.md) | | +**NextPage** | **int** | The next page, if this on is not the last | [optional] +**Type** | **string** | | [optional] [readonly] [default to "ProjectAccessPolicyList"] + +[[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/ProjectCreate.md b/docs/ProjectCreate.md new file mode 100644 index 000000000..2289660b3 --- /dev/null +++ b/docs/ProjectCreate.md @@ -0,0 +1,16 @@ + +# PollinationSDK.Model.ProjectCreate + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | The name of the project. Must be unique to a given owner | +**Description** | **string** | A description of the project | [optional] [default to ""] +**Public** | **bool** | Whether or not a project is publicly viewable | [optional] [default to true] +**Type** | **string** | | [optional] [readonly] [default to "ProjectCreate"] + +[[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/ProjectFolder.md b/docs/ProjectFolder.md new file mode 100644 index 000000000..c184d6316 --- /dev/null +++ b/docs/ProjectFolder.md @@ -0,0 +1,14 @@ + +# PollinationSDK.Model.ProjectFolder + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Path** | **string** | The path to a folder where files and folders can be sourced. For a local filesystem this can be \"C:\\Users\\me\\jobs\\test\". | [optional] +**Type** | **string** | | [optional] [readonly] [default to "ProjectFolder"] + +[[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/ProjectList.md b/docs/ProjectList.md new file mode 100644 index 000000000..2c5de3833 --- /dev/null +++ b/docs/ProjectList.md @@ -0,0 +1,19 @@ + +# PollinationSDK.Model.ProjectList + +## 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<Project>**](Project.md) | | +**NextPage** | **int** | The next page, if this on is not the last | [optional] +**Type** | **string** | | [optional] [readonly] [default to "ProjectList"] + +[[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/ProjectPolicySubject.md b/docs/ProjectPolicySubject.md new file mode 100644 index 000000000..30c88b6fd --- /dev/null +++ b/docs/ProjectPolicySubject.md @@ -0,0 +1,15 @@ + +# PollinationSDK.Model.ProjectPolicySubject + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**SubjectType** | [**SubjectType**](SubjectType.md) | | +**Name** | **string** | The name of the policy subject | +**Type** | **string** | | [optional] [readonly] [default to "ProjectPolicySubject"] + +[[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/ProjectRecipeFilter.md b/docs/ProjectRecipeFilter.md new file mode 100644 index 000000000..f77b54e76 --- /dev/null +++ b/docs/ProjectRecipeFilter.md @@ -0,0 +1,16 @@ + +# PollinationSDK.Model.ProjectRecipeFilter + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Owner** | **string** | The name of the account the recipe belongs to | +**Name** | **string** | The name of the recipe | +**Tag** | **string** | The specific recipe tag | [optional] +**Type** | **string** | | [optional] [readonly] [default to "ProjectRecipeFilter"] + +[[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/ProjectRecipeFilterList.md b/docs/ProjectRecipeFilterList.md new file mode 100644 index 000000000..71c3c12da --- /dev/null +++ b/docs/ProjectRecipeFilterList.md @@ -0,0 +1,19 @@ + +# PollinationSDK.Model.ProjectRecipeFilterList + +## 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<ProjectRecipeFilter>**](ProjectRecipeFilter.md) | | +**NextPage** | **int** | The next page, if this on is not the last | [optional] +**Type** | **string** | | [optional] [readonly] [default to "ProjectRecipeFilterList"] + +[[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/ProjectUpdate.md b/docs/ProjectUpdate.md new file mode 100644 index 000000000..29f113b4b --- /dev/null +++ b/docs/ProjectUpdate.md @@ -0,0 +1,16 @@ + +# PollinationSDK.Model.ProjectUpdate + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | The name of the project. Must be unique to a given owner | [optional] +**Description** | **string** | A description of the project | [optional] +**Public** | **bool** | Whether or not a project is publicly viewable | [optional] +**Type** | **string** | | [optional] [readonly] [default to "ProjectUpdate"] + +[[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 new file mode 100644 index 000000000..d8109985d --- /dev/null +++ b/docs/ProjectsApi.md @@ -0,0 +1,1098 @@ +# PollinationSDK.Api.ProjectsApi + +All URIs are relative to *http://localhost* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**CreateProject**](ProjectsApi.md#createproject) | **POST** /projects/{owner} | Create a Project +[**CreateProjectRecipeFilter**](ProjectsApi.md#createprojectrecipefilter) | **POST** /projects/{owner}/{name}/recipes/filters | Upsert a recipe filter to a project +[**DeleteProject**](ProjectsApi.md#deleteproject) | **DELETE** /projects/{owner}/{name} | Delete a Project +[**DeleteProjectOrgPermission**](ProjectsApi.md#deleteprojectorgpermission) | **DELETE** /projects/{owner}/{name}/permissions | Remove a Project permissions +[**DeleteProjectRecipeFilter**](ProjectsApi.md#deleteprojectrecipefilter) | **DELETE** /projects/{owner}/{name}/recipes/filters | Remove a Project recipe filter +[**GetProject**](ProjectsApi.md#getproject) | **GET** /projects/{owner}/{name} | Get a project +[**GetProjectAccessPermissions**](ProjectsApi.md#getprojectaccesspermissions) | **GET** /projects/{owner}/{name}/permissions | Get project access permissions +[**GetProjectRecipeFilters**](ProjectsApi.md#getprojectrecipefilters) | **GET** /projects/{owner}/{name}/recipes/filters | Get project recipe filters +[**GetProjectRecipes**](ProjectsApi.md#getprojectrecipes) | **GET** /projects/{owner}/{name}/recipes | Get project recipes +[**ListProjects**](ProjectsApi.md#listprojects) | **GET** /projects | List Projects +[**Update**](ProjectsApi.md#update) | **PUT** /projects/{owner}/{name} | Update a Project +[**UpsertProjectPermission**](ProjectsApi.md#upsertprojectpermission) | **PATCH** /projects/{owner}/{name}/permissions | Upsert a new permission to a project + + + +## CreateProject + +> CreatedContent CreateProject (string owner, ProjectCreate projectCreate) + +Create a Project + +### Example + +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using PollinationSDK.Api; +using PollinationSDK.Client; +using PollinationSDK.Model; + +namespace Example +{ + public class CreateProjectExample + { + 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 ProjectsApi(Configuration.Default); + var owner = owner_example; // string | + var projectCreate = new ProjectCreate(); // ProjectCreate | + + try + { + // Create a Project + CreatedContent result = apiInstance.CreateProject(owner, projectCreate); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling ProjectsApi.CreateProject: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **string**| | + **projectCreate** | [**ProjectCreate**](ProjectCreate.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 | +|-------------|-------------|------------------| +| **201** | Success | - | +| **403** | Access forbidden | - | +| **500** | Server error | - | +| **400** | Invalid request | - | +| **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) + + +## CreateProjectRecipeFilter + +> ProjectRecipeFilter CreateProjectRecipeFilter (string owner, string name, ProjectRecipeFilter projectRecipeFilter) + +Upsert a recipe filter to a project + +### Example + +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using PollinationSDK.Api; +using PollinationSDK.Client; +using PollinationSDK.Model; + +namespace Example +{ + public class CreateProjectRecipeFilterExample + { + 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 ProjectsApi(Configuration.Default); + var owner = owner_example; // string | + var name = name_example; // string | + var projectRecipeFilter = new ProjectRecipeFilter(); // ProjectRecipeFilter | + + try + { + // Upsert a recipe filter to a project + ProjectRecipeFilter result = apiInstance.CreateProjectRecipeFilter(owner, name, projectRecipeFilter); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling ProjectsApi.CreateProjectRecipeFilter: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **string**| | + **name** | **string**| | + **projectRecipeFilter** | [**ProjectRecipeFilter**](ProjectRecipeFilter.md)| | + +### Return type + +[**ProjectRecipeFilter**](ProjectRecipeFilter.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 | +|-------------|-------------|------------------| +| **202** | Accepted | - | +| **403** | Access forbidden | - | +| **500** | Server error | - | +| **400** | Invalid request | - | +| **404** | Not found | - | +| **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) + + +## DeleteProject + +> void DeleteProject (string owner, string name) + +Delete a Project + +### Example + +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using PollinationSDK.Api; +using PollinationSDK.Client; +using PollinationSDK.Model; + +namespace Example +{ + public class DeleteProjectExample + { + 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 ProjectsApi(Configuration.Default); + var owner = owner_example; // string | + var name = name_example; // string | + + try + { + // Delete a Project + apiInstance.DeleteProject(owner, name); + } + catch (ApiException e) + { + Debug.Print("Exception when calling ProjectsApi.DeleteProject: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **string**| | + **name** | **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** | Accepted | - | +| **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) + + +## DeleteProjectOrgPermission + +> void DeleteProjectOrgPermission (string owner, string name, ProjectPolicySubject projectPolicySubject) + +Remove a Project permissions + +### Example + +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using PollinationSDK.Api; +using PollinationSDK.Client; +using PollinationSDK.Model; + +namespace Example +{ + public class DeleteProjectOrgPermissionExample + { + 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 ProjectsApi(Configuration.Default); + var owner = owner_example; // string | + var name = name_example; // string | + var projectPolicySubject = new ProjectPolicySubject(); // ProjectPolicySubject | + + try + { + // Remove a Project permissions + apiInstance.DeleteProjectOrgPermission(owner, name, projectPolicySubject); + } + catch (ApiException e) + { + Debug.Print("Exception when calling ProjectsApi.DeleteProjectOrgPermission: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **string**| | + **name** | **string**| | + **projectPolicySubject** | [**ProjectPolicySubject**](ProjectPolicySubject.md)| | + +### Return type + +void (empty response body) + +### 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 | +|-------------|-------------|------------------| +| **204** | Accepted | - | +| **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) + + +## DeleteProjectRecipeFilter + +> void DeleteProjectRecipeFilter (string owner, string name, ProjectRecipeFilter projectRecipeFilter) + +Remove a Project recipe filter + +### Example + +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using PollinationSDK.Api; +using PollinationSDK.Client; +using PollinationSDK.Model; + +namespace Example +{ + public class DeleteProjectRecipeFilterExample + { + 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 ProjectsApi(Configuration.Default); + var owner = owner_example; // string | + var name = name_example; // string | + var projectRecipeFilter = new ProjectRecipeFilter(); // ProjectRecipeFilter | + + try + { + // Remove a Project recipe filter + apiInstance.DeleteProjectRecipeFilter(owner, name, projectRecipeFilter); + } + catch (ApiException e) + { + Debug.Print("Exception when calling ProjectsApi.DeleteProjectRecipeFilter: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **string**| | + **name** | **string**| | + **projectRecipeFilter** | [**ProjectRecipeFilter**](ProjectRecipeFilter.md)| | + +### Return type + +void (empty response body) + +### 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 | +|-------------|-------------|------------------| +| **204** | Accepted | - | +| **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) + + +## GetProject + +> Project GetProject (string owner, string name) + +Get a project + +### Example + +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using PollinationSDK.Api; +using PollinationSDK.Client; +using PollinationSDK.Model; + +namespace Example +{ + public class GetProjectExample + { + 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 ProjectsApi(Configuration.Default); + var owner = owner_example; // string | + var name = name_example; // string | + + try + { + // Get a project + Project result = apiInstance.GetProject(owner, name); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling ProjectsApi.GetProject: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **string**| | + **name** | **string**| | + +### Return type + +[**Project**](Project.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 | - | +| **404** | Not found | - | +| **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) + + +## GetProjectAccessPermissions + +> ProjectAccessPolicyList GetProjectAccessPermissions (string owner, string name, int? page = null, int? perPage = null, List subjectType = null, List permission = null) + +Get project access permissions + +### Example + +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using PollinationSDK.Api; +using PollinationSDK.Client; +using PollinationSDK.Model; + +namespace Example +{ + public class GetProjectAccessPermissionsExample + { + 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 ProjectsApi(Configuration.Default); + var owner = owner_example; // string | + var name = name_example; // string | + 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) + var subjectType = new List(); // List | The type of access policy subject (optional) + var permission = new List(); // List | An access policy permission string (optional) + + try + { + // Get project access permissions + ProjectAccessPolicyList result = apiInstance.GetProjectAccessPermissions(owner, name, page, perPage, subjectType, permission); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling ProjectsApi.GetProjectAccessPermissions: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **string**| | + **name** | **string**| | + **page** | **int?**| Page number starting from 1 | [optional] [default to 1] + **perPage** | **int?**| Number of items per page | [optional] [default to 25] + **subjectType** | [**List<string>**](string.md)| The type of access policy subject | [optional] + **permission** | [**List<string>**](string.md)| An access policy permission string | [optional] + +### Return type + +[**ProjectAccessPolicyList**](ProjectAccessPolicyList.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) + + +## GetProjectRecipeFilters + +> ProjectRecipeFilterList GetProjectRecipeFilters (string owner, string name, int? page = null, int? perPage = null) + +Get project recipe filters + +### Example + +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using PollinationSDK.Api; +using PollinationSDK.Client; +using PollinationSDK.Model; + +namespace Example +{ + public class GetProjectRecipeFiltersExample + { + 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 ProjectsApi(Configuration.Default); + var owner = owner_example; // string | + var name = name_example; // string | + 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 + { + // Get project recipe filters + ProjectRecipeFilterList result = apiInstance.GetProjectRecipeFilters(owner, name, page, perPage); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling ProjectsApi.GetProjectRecipeFilters: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **string**| | + **name** | **string**| | + **page** | **int?**| Page number starting from 1 | [optional] [default to 1] + **perPage** | **int?**| Number of items per page | [optional] [default to 25] + +### Return type + +[**ProjectRecipeFilterList**](ProjectRecipeFilterList.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) + + +## GetProjectRecipes + +> RecipeInterfaceList GetProjectRecipes (string owner, string name, string search = null, int? page = null, int? perPage = null) + +Get project recipes + +### Example + +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using PollinationSDK.Api; +using PollinationSDK.Client; +using PollinationSDK.Model; + +namespace Example +{ + public class GetProjectRecipesExample + { + 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 ProjectsApi(Configuration.Default); + var owner = owner_example; // string | + var name = name_example; // string | + var search = search_example; // string | Search string to find recipes (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 + { + // Get project recipes + RecipeInterfaceList result = apiInstance.GetProjectRecipes(owner, name, search, page, perPage); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling ProjectsApi.GetProjectRecipes: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **string**| | + **name** | **string**| | + **search** | **string**| Search string to find recipes | [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 + +[**RecipeInterfaceList**](RecipeInterfaceList.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) + + +## 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) + +List Projects + +### Example + +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using PollinationSDK.Api; +using PollinationSDK.Client; +using PollinationSDK.Model; + +namespace Example +{ + public class ListProjectsExample + { + 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 ProjectsApi(Configuration.Default); + var search = search_example; // string | Search string to find projects (optional) + var ids = new List(); // List | The ID of a project to search for (optional) + var names = new List(); // List | The name of the project (optional) + 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 = ; // 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) + + try + { + // List Projects + ProjectList result = apiInstance.ListProjects(search, ids, names, owner, _public, permissions, sortBy, sortOrder, page, perPage); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling ProjectsApi.ListProjects: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **search** | **string**| Search string to find projects | [optional] + **ids** | [**List<string>**](string.md)| The ID of a project to search for | [optional] + **names** | [**List<string>**](string.md)| The name of the project | [optional] + **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?**| 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] + +### Return type + +[**ProjectList**](ProjectList.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) + + +## Update + +> UpdateAccepted Update (string owner, string name, ProjectUpdate projectUpdate) + +Update a Project + +### Example + +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using PollinationSDK.Api; +using PollinationSDK.Client; +using PollinationSDK.Model; + +namespace Example +{ + public class UpdateExample + { + 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 ProjectsApi(Configuration.Default); + var owner = owner_example; // string | + var name = name_example; // string | + var projectUpdate = new ProjectUpdate(); // ProjectUpdate | + + try + { + // Update a Project + UpdateAccepted result = apiInstance.Update(owner, name, projectUpdate); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling ProjectsApi.Update: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **string**| | + **name** | **string**| | + **projectUpdate** | [**ProjectUpdate**](ProjectUpdate.md)| | + +### Return type + +[**UpdateAccepted**](UpdateAccepted.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 | +|-------------|-------------|------------------| +| **202** | Accepted | - | +| **403** | Access forbidden | - | +| **500** | Server error | - | +| **400** | Invalid request | - | +| **404** | Not found | - | +| **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) + + +## UpsertProjectPermission + +> UpdateAccepted UpsertProjectPermission (string owner, string name, ProjectAccessPolicy projectAccessPolicy) + +Upsert a new permission to a project + +### Example + +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using PollinationSDK.Api; +using PollinationSDK.Client; +using PollinationSDK.Model; + +namespace Example +{ + public class UpsertProjectPermissionExample + { + 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 ProjectsApi(Configuration.Default); + var owner = owner_example; // string | + var name = name_example; // string | + var projectAccessPolicy = new ProjectAccessPolicy(); // ProjectAccessPolicy | + + try + { + // Upsert a new permission to a project + UpdateAccepted result = apiInstance.UpsertProjectPermission(owner, name, projectAccessPolicy); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling ProjectsApi.UpsertProjectPermission: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **string**| | + **name** | **string**| | + **projectAccessPolicy** | [**ProjectAccessPolicy**](ProjectAccessPolicy.md)| | + +### Return type + +[**UpdateAccepted**](UpdateAccepted.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 | +|-------------|-------------|------------------| +| **202** | Accepted | - | +| **403** | Access forbidden | - | +| **500** | Server error | - | +| **400** | Invalid request | - | +| **404** | Not found | - | +| **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/PublicAccountList.md b/docs/PublicAccountList.md new file mode 100644 index 000000000..164d3c8e8 --- /dev/null +++ b/docs/PublicAccountList.md @@ -0,0 +1,19 @@ + +# PollinationSDK.Model.PublicAccountList + +## 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<AccountPublic>**](AccountPublic.md) | | +**NextPage** | **int** | The next page, if this on is not the last | [optional] +**Type** | **string** | | [optional] [readonly] [default to "PublicAccountList"] + +[[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/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/Recipe.md b/docs/Recipe.md new file mode 100644 index 000000000..37aaef6ae --- /dev/null +++ b/docs/Recipe.md @@ -0,0 +1,18 @@ + +# PollinationSDK.Model.Recipe + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Flow** | [**List<DAG>**](DAG.md) | A list of tasks to create a DAG recipe. | +**Type** | **string** | | [optional] [readonly] [default to "Recipe"] +**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] + +[[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/RecipeInterface.md b/docs/RecipeInterface.md new file mode 100644 index 000000000..991e341cb --- /dev/null +++ b/docs/RecipeInterface.md @@ -0,0 +1,19 @@ + +# PollinationSDK.Model.RecipeInterface + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Metadata** | [**MetaData**](MetaData.md) | Recipe metadata information. | +**Type** | **string** | | [optional] [readonly] [default to "RecipeInterface"] +**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"] +**Source** | **string** | A URL to the source this recipe from a registry. | [optional] +**Inputs** | [**List<AnyOfDAGGenericInputDAGStringInputDAGIntegerInputDAGNumberInputDAGBooleanInputDAGFolderInputDAGFileInputDAGPathInputDAGArrayInputDAGJSONObjectInput>**](AnyOfDAGGenericInputDAGStringInputDAGIntegerInputDAGNumberInputDAGBooleanInputDAGFolderInputDAGFileInputDAGPathInputDAGArrayInputDAGJSONObjectInput.md) | A list of recipe inputs. | [optional] +**Outputs** | [**List<AnyOfDAGGenericOutputDAGStringOutputDAGIntegerOutputDAGNumberOutputDAGBooleanOutputDAGFolderOutputDAGFileOutputDAGPathOutputDAGArrayOutputDAGJSONObjectOutput>**](AnyOfDAGGenericOutputDAGStringOutputDAGIntegerOutputDAGNumberOutputDAGBooleanOutputDAGFolderOutputDAGFileOutputDAGPathOutputDAGArrayOutputDAGJSONObjectOutput.md) | A list of recipe outputs. | [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/RecipeInterfaceList.md b/docs/RecipeInterfaceList.md new file mode 100644 index 000000000..f6a5e3ddf --- /dev/null +++ b/docs/RecipeInterfaceList.md @@ -0,0 +1,19 @@ + +# PollinationSDK.Model.RecipeInterfaceList + +## 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<RecipeInterface>**](RecipeInterface.md) | | +**NextPage** | **int** | The next page, if this on is not the last | [optional] +**Type** | **string** | | [optional] [readonly] [default to "RecipeInterfaceList"] + +[[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/RecipePackage.md b/docs/RecipePackage.md new file mode 100644 index 000000000..99e1a5ecc --- /dev/null +++ b/docs/RecipePackage.md @@ -0,0 +1,21 @@ + +# PollinationSDK.Model.RecipePackage + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Digest** | **string** | The new package digest | +**Tag** | **string** | The new package tag | +**Keywords** | **List<string>** | keywords | [optional] +**Description** | **string** | description | [optional] +**Icon** | **string** | icon | [optional] +**CreatedAt** | **DateTime** | Creation Timestamp | [optional] +**Readme** | **string** | The Repository Readme | [optional] +**Manifest** | [**RecipeInterface**](RecipeInterface.md) | | +**Type** | **string** | | [optional] [readonly] [default to "RecipePackage"] + +[[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/RecipePackageList.md b/docs/RecipePackageList.md new file mode 100644 index 000000000..1e98e05d7 --- /dev/null +++ b/docs/RecipePackageList.md @@ -0,0 +1,19 @@ + +# PollinationSDK.Model.RecipePackageList + +## 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<RecipePackage>**](RecipePackage.md) | | +**NextPage** | **int** | The next page, if this on is not the last | [optional] +**Type** | **string** | | [optional] [readonly] [default to "RecipePackageList"] + +[[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 new file mode 100644 index 000000000..d8dc9a7f8 --- /dev/null +++ b/docs/RecipesApi.md @@ -0,0 +1,1029 @@ +# PollinationSDK.Api.RecipesApi + +All URIs are relative to *http://localhost* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**CreateRecipe**](RecipesApi.md#createrecipe) | **POST** /recipes/{owner} | Create a Recipe +[**CreateRecipePackage**](RecipesApi.md#createrecipepackage) | **POST** /recipes/{owner}/{name}/tags | Create a new Recipe package +[**DeleteRecipe**](RecipesApi.md#deleterecipe) | **DELETE** /recipes/{owner}/{name} | Delete a Recipe +[**DeleteRecipeOrgPermission**](RecipesApi.md#deleterecipeorgpermission) | **DELETE** /recipes/{owner}/{name}/permissions | Remove a Repository permissions +[**GetRecipe**](RecipesApi.md#getrecipe) | **GET** /recipes/{owner}/{name} | Get a recipe +[**GetRecipeAccessPermissions**](RecipesApi.md#getrecipeaccesspermissions) | **GET** /recipes/{owner}/{name}/permissions | Get recipe access permissions +[**GetRecipeByTag**](RecipesApi.md#getrecipebytag) | **GET** /recipes/{owner}/{name}/tags/{tag} | Get a recipe tag +[**ListRecipeTags**](RecipesApi.md#listrecipetags) | **GET** /recipes/{owner}/{name}/tags | Get a recipe tags +[**ListRecipes**](RecipesApi.md#listrecipes) | **GET** /recipes | List recipes +[**UpdateRecipe**](RecipesApi.md#updaterecipe) | **PUT** /recipes/{owner}/{name} | Update a Recipe +[**UpsertRecipePermission**](RecipesApi.md#upsertrecipepermission) | **PATCH** /recipes/{owner}/{name}/permissions | Upsert a new permission to a recipe + + + +## CreateRecipe + +> CreatedContent CreateRecipe (string owner, RepositoryCreate repositoryCreate) + +Create a Recipe + +Create a new recipe. + +### Example + +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using PollinationSDK.Api; +using PollinationSDK.Client; +using PollinationSDK.Model; + +namespace Example +{ + public class CreateRecipeExample + { + 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 RecipesApi(Configuration.Default); + var owner = owner_example; // string | + var repositoryCreate = new RepositoryCreate(); // RepositoryCreate | + + try + { + // Create a Recipe + CreatedContent result = apiInstance.CreateRecipe(owner, repositoryCreate); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling RecipesApi.CreateRecipe: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **string**| | + **repositoryCreate** | [**RepositoryCreate**](RepositoryCreate.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 | +|-------------|-------------|------------------| +| **201** | Success | - | +| **403** | Access forbidden | - | +| **500** | Server error | - | +| **400** | Invalid request | - | +| **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) + + +## CreateRecipePackage + +> CreatedContent CreateRecipePackage (string owner, string name, NewRecipePackage newRecipePackage) + +Create a new Recipe package + +Create a new recipe package version + +### Example + +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using PollinationSDK.Api; +using PollinationSDK.Client; +using PollinationSDK.Model; + +namespace Example +{ + public class CreateRecipePackageExample + { + 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 RecipesApi(Configuration.Default); + var owner = owner_example; // string | + var name = name_example; // string | + var newRecipePackage = new NewRecipePackage(); // NewRecipePackage | + + try + { + // Create a new Recipe package + CreatedContent result = apiInstance.CreateRecipePackage(owner, name, newRecipePackage); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling RecipesApi.CreateRecipePackage: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **string**| | + **name** | **string**| | + **newRecipePackage** | [**NewRecipePackage**](NewRecipePackage.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** | Success | - | +| **403** | Access forbidden | - | +| **500** | Server error | - | +| **400** | Invalid request | - | +| **404** | Not found | - | +| **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) + + +## DeleteRecipe + +> void DeleteRecipe (string owner, string name) + +Delete a Recipe + +Delete a recipe (must have `admin` permission) + +### Example + +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using PollinationSDK.Api; +using PollinationSDK.Client; +using PollinationSDK.Model; + +namespace Example +{ + public class DeleteRecipeExample + { + 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 RecipesApi(Configuration.Default); + var owner = owner_example; // string | + var name = name_example; // string | + + try + { + // Delete a Recipe + apiInstance.DeleteRecipe(owner, name); + } + catch (ApiException e) + { + Debug.Print("Exception when calling RecipesApi.DeleteRecipe: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **string**| | + **name** | **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** | Accepted | - | +| **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) + + +## DeleteRecipeOrgPermission + +> void DeleteRecipeOrgPermission (string owner, string name, RepositoryPolicySubject repositoryPolicySubject) + +Remove a Repository permissions + +Delete a recipe's access policy (must have `admin` permission) + +### Example + +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using PollinationSDK.Api; +using PollinationSDK.Client; +using PollinationSDK.Model; + +namespace Example +{ + public class DeleteRecipeOrgPermissionExample + { + 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 RecipesApi(Configuration.Default); + var owner = owner_example; // string | + var name = name_example; // string | + var repositoryPolicySubject = new RepositoryPolicySubject(); // RepositoryPolicySubject | + + try + { + // Remove a Repository permissions + apiInstance.DeleteRecipeOrgPermission(owner, name, repositoryPolicySubject); + } + catch (ApiException e) + { + Debug.Print("Exception when calling RecipesApi.DeleteRecipeOrgPermission: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **string**| | + **name** | **string**| | + **repositoryPolicySubject** | [**RepositoryPolicySubject**](RepositoryPolicySubject.md)| | + +### Return type + +void (empty response body) + +### 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 | +|-------------|-------------|------------------| +| **204** | Accepted | - | +| **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) + + +## GetRecipe + +> Repository GetRecipe (string owner, string name) + +Get a recipe + +Retrieve a recipe by name + +### Example + +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using PollinationSDK.Api; +using PollinationSDK.Client; +using PollinationSDK.Model; + +namespace Example +{ + public class GetRecipeExample + { + 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 RecipesApi(Configuration.Default); + var owner = owner_example; // string | + var name = name_example; // string | + + try + { + // Get a recipe + Repository result = apiInstance.GetRecipe(owner, name); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling RecipesApi.GetRecipe: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **string**| | + **name** | **string**| | + +### Return type + +[**Repository**](Repository.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 | - | +| **404** | Not found | - | +| **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) + + +## GetRecipeAccessPermissions + +> RepositoryAccessPolicyList GetRecipeAccessPermissions (string owner, string name, int? page = null, int? perPage = null, List subjectType = null, List permission = null) + +Get recipe access permissions + +Retrieve a recipe's access permissions (must have `write` permission) + +### Example + +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using PollinationSDK.Api; +using PollinationSDK.Client; +using PollinationSDK.Model; + +namespace Example +{ + public class GetRecipeAccessPermissionsExample + { + 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 RecipesApi(Configuration.Default); + var owner = owner_example; // string | + var name = name_example; // string | + 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) + var subjectType = new List(); // List | The type of access policy subject (optional) + var permission = new List(); // List | An access policy permission string (optional) + + try + { + // Get recipe access permissions + RepositoryAccessPolicyList result = apiInstance.GetRecipeAccessPermissions(owner, name, page, perPage, subjectType, permission); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling RecipesApi.GetRecipeAccessPermissions: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **string**| | + **name** | **string**| | + **page** | **int?**| Page number starting from 1 | [optional] [default to 1] + **perPage** | **int?**| Number of items per page | [optional] [default to 25] + **subjectType** | [**List<string>**](string.md)| The type of access policy subject | [optional] + **permission** | [**List<string>**](string.md)| An access policy permission string | [optional] + +### Return type + +[**RepositoryAccessPolicyList**](RepositoryAccessPolicyList.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) + + +## GetRecipeByTag + +> RecipePackage GetRecipeByTag (string owner, string name, string tag) + +Get a recipe tag + +Retrieve a recipe tag by name and tag + +### Example + +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using PollinationSDK.Api; +using PollinationSDK.Client; +using PollinationSDK.Model; + +namespace Example +{ + public class GetRecipeByTagExample + { + 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 RecipesApi(Configuration.Default); + var owner = owner_example; // string | + var name = name_example; // string | + var tag = tag_example; // string | + + try + { + // Get a recipe tag + RecipePackage result = apiInstance.GetRecipeByTag(owner, name, tag); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling RecipesApi.GetRecipeByTag: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **string**| | + **name** | **string**| | + **tag** | **string**| | + +### Return type + +[**RecipePackage**](RecipePackage.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 | - | +| **404** | Not found | - | +| **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) + + +## ListRecipeTags + +> RecipePackageList ListRecipeTags (string owner, string name, PackageSortKey? sortBy = null, SortEnum? sortOrder = null, int? page = null, int? perPage = null) + +Get a recipe tags + +Retrieve a recipe by name + +### Example + +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using PollinationSDK.Api; +using PollinationSDK.Client; +using PollinationSDK.Model; + +namespace Example +{ + public class ListRecipeTagsExample + { + 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 RecipesApi(Configuration.Default); + var owner = owner_example; // string | + var name = name_example; // string | + 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) + + try + { + // Get a recipe tags + RecipePackageList result = apiInstance.ListRecipeTags(owner, name, sortBy, sortOrder, page, perPage); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling RecipesApi.ListRecipeTags: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **string**| | + **name** | **string**| | + **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] + +### Return type + +[**RecipePackageList**](RecipePackageList.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 | - | +| **404** | Not found | - | +| **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) + + +## 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) + +List recipes + +### Example + +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using PollinationSDK.Api; +using PollinationSDK.Client; +using PollinationSDK.Model; + +namespace Example +{ + public class ListRecipesExample + { + 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 RecipesApi(Configuration.Default); + var search = new List(); // List | You know, for search (optional) + var name = new List(); // List | The account name (optional) + var owner = new List(); // List | Owner of the project (optional) + 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 = ; // 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) + + try + { + // List recipes + RepositoryList result = apiInstance.ListRecipes(search, name, owner, _public, keyword, permission, sortBy, sortOrder, page, perPage); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling RecipesApi.ListRecipes: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **search** | [**List<string>**](string.md)| You know, for search | [optional] + **name** | [**List<string>**](string.md)| The account name | [optional] + **owner** | [**List<string>**](string.md)| Owner of the project | [optional] + **_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?**| 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] + +### Return type + +[**RepositoryList**](RepositoryList.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 | - | +| **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) + + +## UpdateRecipe + +> UpdateAccepted UpdateRecipe (string owner, string name, RepositoryUpdate repositoryUpdate) + +Update a Recipe + +Update a recipe (must have `contribute` permission) + +### Example + +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using PollinationSDK.Api; +using PollinationSDK.Client; +using PollinationSDK.Model; + +namespace Example +{ + public class UpdateRecipeExample + { + 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 RecipesApi(Configuration.Default); + var owner = owner_example; // string | + var name = name_example; // string | + var repositoryUpdate = new RepositoryUpdate(); // RepositoryUpdate | + + try + { + // Update a Recipe + UpdateAccepted result = apiInstance.UpdateRecipe(owner, name, repositoryUpdate); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling RecipesApi.UpdateRecipe: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **string**| | + **name** | **string**| | + **repositoryUpdate** | [**RepositoryUpdate**](RepositoryUpdate.md)| | + +### Return type + +[**UpdateAccepted**](UpdateAccepted.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 | +|-------------|-------------|------------------| +| **202** | Accepted | - | +| **403** | Access forbidden | - | +| **500** | Server error | - | +| **400** | Invalid request | - | +| **404** | Not found | - | +| **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) + + +## UpsertRecipePermission + +> UpdateAccepted UpsertRecipePermission (string owner, string name, RepositoryAccessPolicy repositoryAccessPolicy) + +Upsert a new permission to a recipe + +Upsert a recipe's access policy (must have `admin` permission) + +### Example + +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using PollinationSDK.Api; +using PollinationSDK.Client; +using PollinationSDK.Model; + +namespace Example +{ + public class UpsertRecipePermissionExample + { + 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 RecipesApi(Configuration.Default); + var owner = owner_example; // string | + var name = name_example; // string | + var repositoryAccessPolicy = new RepositoryAccessPolicy(); // RepositoryAccessPolicy | + + try + { + // Upsert a new permission to a recipe + UpdateAccepted result = apiInstance.UpsertRecipePermission(owner, name, repositoryAccessPolicy); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling RecipesApi.UpsertRecipePermission: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **string**| | + **name** | **string**| | + **repositoryAccessPolicy** | [**RepositoryAccessPolicy**](RepositoryAccessPolicy.md)| | + +### Return type + +[**UpdateAccepted**](UpdateAccepted.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 | +|-------------|-------------|------------------| +| **202** | Accepted | - | +| **403** | Access forbidden | - | +| **500** | Server error | - | +| **400** | Invalid request | - | +| **404** | Not found | - | +| **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/RegistriesApi.md b/docs/RegistriesApi.md new file mode 100644 index 000000000..26fc78bb0 --- /dev/null +++ b/docs/RegistriesApi.md @@ -0,0 +1,440 @@ +# PollinationSDK.Api.RegistriesApi + +All URIs are relative to *http://localhost* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**GetPackage**](RegistriesApi.md#getpackage) | **GET** /registries/{owner}/{type}/{name}/{digest} | Get Package +[**GetPackageJson**](RegistriesApi.md#getpackagejson) | **GET** /registries/{owner}/{type}/{name}/{digest}/json | Get Package in JSON format +[**GetRegistryIndex**](RegistriesApi.md#getregistryindex) | **GET** /registries/{owner}/index.json | Get Registry Index +[**PostPlugin**](RegistriesApi.md#postplugin) | **POST** /registries/{owner}/plugins | Push a plugin to the registry +[**PostRecipe**](RegistriesApi.md#postrecipe) | **POST** /registries/{owner}/recipes | Push an Recipe to the registry + + + +## GetPackage + +> AnyType GetPackage (string owner, string type, string name, string digest) + +Get Package + +### Example + +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using PollinationSDK.Api; +using PollinationSDK.Client; +using PollinationSDK.Model; + +namespace Example +{ + public class GetPackageExample + { + 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 RegistriesApi(Configuration.Default); + var owner = owner_example; // string | + var type = type_example; // string | + var name = name_example; // string | + var digest = digest_example; // string | + + try + { + // Get Package + AnyType result = apiInstance.GetPackage(owner, type, name, digest); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling RegistriesApi.GetPackage: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **string**| | + **type** | **string**| | + **name** | **string**| | + **digest** | **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, application/x-tar + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Retrieved | - | +| **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) + + +## GetPackageJson + +> AnyOfRecipePluginBakedRecipe GetPackageJson (string owner, string type, string name, string digest, bool? baked = null) + +Get Package in JSON format + +### Example + +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using PollinationSDK.Api; +using PollinationSDK.Client; +using PollinationSDK.Model; + +namespace Example +{ + public class GetPackageJsonExample + { + 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 RegistriesApi(Configuration.Default); + var owner = owner_example; // string | + 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 + AnyOfRecipePluginBakedRecipe result = apiInstance.GetPackageJson(owner, type, name, digest, baked); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling RegistriesApi.GetPackageJson: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **string**| | + **type** | **string**| | + **name** | **string**| | + **digest** | **string**| | + **baked** | **bool?**| | [optional] [default to false] + +### Return type + +[**AnyOfRecipePluginBakedRecipe**](AnyOfRecipePluginBakedRecipe.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 | - | +| **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) + + +## GetRegistryIndex + +> RepositoryIndex GetRegistryIndex (string owner) + +Get Registry Index + +### Example + +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using PollinationSDK.Api; +using PollinationSDK.Client; +using PollinationSDK.Model; + +namespace Example +{ + public class GetRegistryIndexExample + { + 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 RegistriesApi(Configuration.Default); + var owner = owner_example; // string | + + try + { + // Get Registry Index + RepositoryIndex result = apiInstance.GetRegistryIndex(owner); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling RegistriesApi.GetRegistryIndex: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **string**| | + +### Return type + +[**RepositoryIndex**](RepositoryIndex.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 | - | +| **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) + + +## PostPlugin + +> AnyType PostPlugin (string owner, string type = null, System.IO.Stream package = null) + +Push a plugin to the registry + +### Example + +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using PollinationSDK.Api; +using PollinationSDK.Client; +using PollinationSDK.Model; + +namespace Example +{ + public class PostPluginExample + { + 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 RegistriesApi(Configuration.Default); + var owner = owner_example; // string | + var type = type_example; // string | (optional) (default to "Body_post_plugin__owner__plugins_post") + var package = BINARY_DATA_HERE; // System.IO.Stream | (optional) + + try + { + // Push a plugin to the registry + AnyType result = apiInstance.PostPlugin(owner, type, package); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling RegistriesApi.PostPlugin: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **string**| | + **type** | **string**| | [optional] [default to "Body_post_plugin__owner__plugins_post"] + **package** | **System.IO.Stream**| | [optional] + +### Return type + +[**AnyType**](AnyType.md) + +### Authorization + +[APIKeyAuth](../README.md#APIKeyAuth), [JWTAuth](../README.md#JWTAuth) + +### HTTP request headers + +- **Content-Type**: multipart/form-data +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **201** | Created | - | +| **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) + + +## PostRecipe + +> AnyType PostRecipe (string owner, string type = null, System.IO.Stream package = null) + +Push an Recipe to the registry + +### Example + +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using PollinationSDK.Api; +using PollinationSDK.Client; +using PollinationSDK.Model; + +namespace Example +{ + public class PostRecipeExample + { + 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 RegistriesApi(Configuration.Default); + var owner = owner_example; // string | + var type = type_example; // string | (optional) (default to "Body_post_recipe__owner__recipes_post") + var package = BINARY_DATA_HERE; // System.IO.Stream | (optional) + + try + { + // Push an Recipe to the registry + AnyType result = apiInstance.PostRecipe(owner, type, package); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling RegistriesApi.PostRecipe: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **string**| | + **type** | **string**| | [optional] [default to "Body_post_recipe__owner__recipes_post"] + **package** | **System.IO.Stream**| | [optional] + +### Return type + +[**AnyType**](AnyType.md) + +### Authorization + +[APIKeyAuth](../README.md#APIKeyAuth), [JWTAuth](../README.md#JWTAuth) + +### HTTP request headers + +- **Content-Type**: multipart/form-data +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **201** | Created | - | +| **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/Repository.md b/docs/Repository.md new file mode 100644 index 000000000..11bcc6185 --- /dev/null +++ b/docs/Repository.md @@ -0,0 +1,19 @@ + +# PollinationSDK.Model.Repository + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | The name of the repository | +**Id** | **string** | The recipe unique ID | +**LatestTag** | **string** | The latest package version to be indexed | +**Owner** | [**AccountPublic**](AccountPublic.md) | The owner of the repository | +**Permissions** | [**RepositoryUserPermissions**](RepositoryUserPermissions.md) | The permissions the user making the API call has on the resource | [optional] +**Slug** | **string** | The repository slug | [optional] +**Type** | **string** | | [optional] [readonly] [default to "Repository"] + +[[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/RepositoryAccessPolicy.md b/docs/RepositoryAccessPolicy.md new file mode 100644 index 000000000..714afa83c --- /dev/null +++ b/docs/RepositoryAccessPolicy.md @@ -0,0 +1,15 @@ + +# PollinationSDK.Model.RepositoryAccessPolicy + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Subject** | [**PolicySubject**](PolicySubject.md) | The subject of the access policy | +**Permission** | **Permission** | The permission given to the subject of the access policy | +**Type** | **string** | | [optional] [readonly] [default to "RepositoryAccessPolicy"] + +[[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/RepositoryAccessPolicyList.md b/docs/RepositoryAccessPolicyList.md new file mode 100644 index 000000000..00639dcbf --- /dev/null +++ b/docs/RepositoryAccessPolicyList.md @@ -0,0 +1,19 @@ + +# PollinationSDK.Model.RepositoryAccessPolicyList + +## 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<RepositoryAccessPolicy>**](RepositoryAccessPolicy.md) | | +**NextPage** | **int** | The next page, if this on is not the last | [optional] +**Type** | **string** | | [optional] [readonly] [default to "RepositoryAccessPolicyList"] + +[[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/RepositoryCreate.md b/docs/RepositoryCreate.md new file mode 100644 index 000000000..0e6aca8c2 --- /dev/null +++ b/docs/RepositoryCreate.md @@ -0,0 +1,18 @@ + +# PollinationSDK.Model.RepositoryCreate + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Public** | **bool** | Whether or not a repository is publicly viewable | [optional] +**Keywords** | **List<string>** | A list of keywords to index the repository by | [optional] +**Description** | **string** | A description of the repository | [optional] +**Icon** | **string** | An icon to represent this repository | [optional] +**Name** | **string** | The name of the repository | +**Type** | **string** | | [optional] [readonly] [default to "RepositoryCreate"] + +[[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/RepositoryIndex.md b/docs/RepositoryIndex.md new file mode 100644 index 000000000..de7485efa --- /dev/null +++ b/docs/RepositoryIndex.md @@ -0,0 +1,19 @@ + +# PollinationSDK.Model.RepositoryIndex + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Type** | **string** | | [optional] [readonly] [default to "RepositoryIndex"] +**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"] +**Generated** | **DateTime** | The timestamp at which the index was generated | [optional] +**Metadata** | [**RepositoryMetadata**](RepositoryMetadata.md) | Extra information about the repository | [optional] +**Plugin** | **Dictionary<string, List<PackageVersion>>** | A dict of plugins accessible by name. Each name key points to a list of plugin versions | [optional] +**Recipe** | **Dictionary<string, List<PackageVersion>>** | A dict of recipes accessible by name. Each name key points to a list of recipesversions | [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/RepositoryList.md b/docs/RepositoryList.md new file mode 100644 index 000000000..aca82b5f6 --- /dev/null +++ b/docs/RepositoryList.md @@ -0,0 +1,19 @@ + +# PollinationSDK.Model.RepositoryList + +## 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<Repository>**](Repository.md) | | +**NextPage** | **int** | The next page, if this on is not the last | [optional] +**Type** | **string** | | [optional] [readonly] [default to "RepositoryList"] + +[[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/RepositoryMetadata.md b/docs/RepositoryMetadata.md new file mode 100644 index 000000000..4fb855528 --- /dev/null +++ b/docs/RepositoryMetadata.md @@ -0,0 +1,19 @@ + +# PollinationSDK.Model.RepositoryMetadata + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Type** | **string** | | [optional] [readonly] [default to "RepositoryMetadata"] +**Annotations** | **Dictionary<string, string>** | An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries. | [optional] +**Name** | **string** | The name of the repository | [optional] +**Description** | **string** | A short description of the repository | [optional] [default to "A Queenbee package repository"] +**Source** | **string** | The source path (url or local) to the repository | [optional] +**PluginCount** | **int** | The number of plugins hosted by the repository | [optional] [default to 0] +**RecipeCount** | **int** | The number of recipes hosted by the repository | [optional] [default to 0] + +[[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/RepositoryPackage.md b/docs/RepositoryPackage.md new file mode 100644 index 000000000..d77731012 --- /dev/null +++ b/docs/RepositoryPackage.md @@ -0,0 +1,20 @@ + +# PollinationSDK.Model.RepositoryPackage + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Digest** | **string** | The new package digest | +**Tag** | **string** | The new package tag | +**Keywords** | **List<string>** | keywords | [optional] +**Description** | **string** | description | [optional] +**Icon** | **string** | icon | [optional] +**CreatedAt** | **DateTime** | Creation Timestamp | [optional] +**Readme** | **string** | The Repository Readme | [optional] +**Type** | **string** | | [optional] [readonly] [default to "RepositoryPackage"] + +[[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/RepositoryPolicySubject.md b/docs/RepositoryPolicySubject.md new file mode 100644 index 000000000..a98a913c7 --- /dev/null +++ b/docs/RepositoryPolicySubject.md @@ -0,0 +1,15 @@ + +# PollinationSDK.Model.RepositoryPolicySubject + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**SubjectType** | [**SubjectType**](SubjectType.md) | | +**Name** | **string** | The name of the policy subject | +**Type** | **string** | | [optional] [readonly] [default to "RepositoryPolicySubject"] + +[[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/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/RepositoryUpdate.md b/docs/RepositoryUpdate.md new file mode 100644 index 000000000..a9c067bd3 --- /dev/null +++ b/docs/RepositoryUpdate.md @@ -0,0 +1,17 @@ + +# PollinationSDK.Model.RepositoryUpdate + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Public** | **bool** | Whether or not a repository is publicly viewable | [optional] +**Keywords** | **List<string>** | A list of keywords to index the repository by | [optional] +**Description** | **string** | A description of the repository | [optional] +**Icon** | **string** | An icon to represent this repository | [optional] +**Type** | **string** | | [optional] [readonly] [default to "RepositoryUpdate"] + +[[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/RepositoryUserPermissions.md b/docs/RepositoryUserPermissions.md new file mode 100644 index 000000000..6b7a2b262 --- /dev/null +++ b/docs/RepositoryUserPermissions.md @@ -0,0 +1,16 @@ + +# PollinationSDK.Model.RepositoryUserPermissions + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Admin** | **bool** | The user has admin permission to this resource | [optional] [default to false] +**Write** | **bool** | The user has write permission on this resource | [optional] [default to false] +**Read** | **bool** | The user has read permission on this resource | [optional] [default to false] +**Type** | **string** | | [optional] [readonly] [default to "RepositoryUserPermissions"] + +[[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/RoleEnum.md b/docs/RoleEnum.md new file mode 100644 index 000000000..afba4c339 --- /dev/null +++ b/docs/RoleEnum.md @@ -0,0 +1,12 @@ + +# PollinationSDK.Model.RoleEnum + +## 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/Run.md b/docs/Run.md new file mode 100644 index 000000000..88808da92 --- /dev/null +++ b/docs/Run.md @@ -0,0 +1,20 @@ + +# PollinationSDK.Model.Run + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **string** | The unique ID for this run | +**Author** | [**AccountPublic**](AccountPublic.md) | author | [optional] +**Owner** | [**AccountPublic**](AccountPublic.md) | owner | [optional] +**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) +[[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to README]](../README.md) + diff --git a/docs/RunList.md b/docs/RunList.md new file mode 100644 index 000000000..75dfb029b --- /dev/null +++ b/docs/RunList.md @@ -0,0 +1,19 @@ + +# PollinationSDK.Model.RunList + +## 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<Run>**](Run.md) | | +**NextPage** | **int** | The next page, if this on is not the last | [optional] +**Type** | **string** | | [optional] [readonly] [default to "RunList"] + +[[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/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/RunResultList.md b/docs/RunResultList.md new file mode 100644 index 000000000..396be0e34 --- /dev/null +++ b/docs/RunResultList.md @@ -0,0 +1,19 @@ + +# PollinationSDK.Model.RunResultList + +## 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<List<AnyOfStepStringInputStepIntegerInputStepNumberInputStepBooleanInputStepFolderInputStepFileInputStepPathInputStepArrayInputStepJSONObjectInputStepStringOutputStepIntegerOutputStepNumberOutputStepBooleanOutputStepFolderOutputStepFileOutputStepPathOutputStepArrayOutputStepJSONObjectOutput>>** | | +**NextPage** | **int** | The next page, if this on is not the last | [optional] +**Type** | **string** | | [optional] [readonly] [default to "RunResultList"] + +[[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/RunStatus.md b/docs/RunStatus.md new file mode 100644 index 000000000..76fd601bd --- /dev/null +++ b/docs/RunStatus.md @@ -0,0 +1,26 @@ + +# PollinationSDK.Model.RunStatus + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Inputs** | [**List<AnyOfStepStringInputStepIntegerInputStepNumberInputStepBooleanInputStepFolderInputStepFileInputStepPathInputStepArrayInputStepJSONObjectInput>**](AnyOfStepStringInputStepIntegerInputStepNumberInputStepBooleanInputStepFolderInputStepFileInputStepPathInputStepArrayInputStepJSONObjectInput.md) | The inputs used for this run. | +**Outputs** | [**List<AnyOfStepStringOutputStepIntegerOutputStepNumberOutputStepBooleanOutputStepFolderOutputStepFileOutputStepPathOutputStepArrayOutputStepJSONObjectOutput>**](AnyOfStepStringOutputStepIntegerOutputStepNumberOutputStepBooleanOutputStepFolderOutputStepFileOutputStepPathOutputStepArrayOutputStepJSONObjectOutput.md) | The outputs produced by this run. | +**StartedAt** | **DateTime** | The time at which the task was started | +**Id** | **string** | The ID of the individual run. | +**JobId** | **string** | The ID of the job that generated this run. | +**Annotations** | **Dictionary<string, string>** | An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries. | [optional] +**Message** | **string** | Any message produced by the task. Usually error/debugging hints. | [optional] +**FinishedAt** | **DateTime** | The time at which the task was completed | [optional] +**Source** | **string** | Source url for the status object. It can be a recipe or a function. | [optional] +**ApiVersion** | **string** | | [optional] [readonly] [default to "v1beta1"] +**Entrypoint** | **string** | The ID of the first step in the run. | [optional] +**Status** | **RunStatusEnum** | The status of this run. | [optional] +**Steps** | [**Dictionary<string, StepStatus>**](StepStatus.md) | | [optional] +**Type** | **string** | | [optional] [readonly] [default to "RunStatus"] + +[[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/RunStatusEnum.md b/docs/RunStatusEnum.md new file mode 100644 index 000000000..194c946c9 --- /dev/null +++ b/docs/RunStatusEnum.md @@ -0,0 +1,12 @@ + +# PollinationSDK.Model.RunStatusEnum + +## 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/RunsApi.md b/docs/RunsApi.md new file mode 100644 index 000000000..30bcc1053 --- /dev/null +++ b/docs/RunsApi.md @@ -0,0 +1,844 @@ +# PollinationSDK.Api.RunsApi + +All URIs are relative to *http://localhost* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**CancelRun**](RunsApi.md#cancelrun) | **PUT** /projects/{owner}/{name}/runs/{run_id}/cancel | Cancel a run +[**DownloadRunArtifact**](RunsApi.md#downloadrunartifact) | **GET** /projects/{owner}/{name}/runs/{run_id}/artifacts/download | Download an artifact from the run folder +[**GetRun**](RunsApi.md#getrun) | **GET** /projects/{owner}/{name}/runs/{run_id} | Get a Run +[**GetRunOutput**](RunsApi.md#getrunoutput) | **GET** /projects/{owner}/{name}/runs/{run_id}/outputs/{output_name} | Get run output by name +[**GetRunStepLogs**](RunsApi.md#getrunsteplogs) | **GET** /projects/{owner}/{name}/runs/{run_id}/steps/{step_id}/logs | Get the logs of a specific step of the run +[**GetRunSteps**](RunsApi.md#getrunsteps) | **GET** /projects/{owner}/{name}/runs/{run_id}/steps | Query the steps of a run +[**ListRunArtifacts**](RunsApi.md#listrunartifacts) | **GET** /projects/{owner}/{name}/runs/{run_id}/artifacts | List artifacts in a run folder +[**ListRuns**](RunsApi.md#listruns) | **GET** /projects/{owner}/{name}/runs | List runs +[**QueryResults**](RunsApi.md#queryresults) | **GET** /projects/{owner}/{name}/results | Query run results + + + +## CancelRun + +> AnyType CancelRun (string owner, string name, string runId) + +Cancel a run + +Stop a run. + +### Example + +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using PollinationSDK.Api; +using PollinationSDK.Client; +using PollinationSDK.Model; + +namespace Example +{ + public class CancelRunExample + { + 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 RunsApi(Configuration.Default); + var owner = owner_example; // string | + var name = name_example; // string | + var runId = runId_example; // string | + + try + { + // Cancel a run + AnyType result = apiInstance.CancelRun(owner, name, runId); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling RunsApi.CancelRun: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **string**| | + **name** | **string**| | + **runId** | **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) + + +## DownloadRunArtifact + +> AnyType DownloadRunArtifact (string owner, string name, string runId, string path = null) + +Download an artifact from the run folder + +Get a download link for an artifact in a run folder + +### Example + +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using PollinationSDK.Api; +using PollinationSDK.Client; +using PollinationSDK.Model; + +namespace Example +{ + public class DownloadRunArtifactExample + { + 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 RunsApi(Configuration.Default); + var owner = owner_example; // string | + var name = name_example; // string | + var runId = runId_example; // string | + var path = path_example; // string | The path to an file within a project folder (optional) + + try + { + // Download an artifact from the run folder + AnyType result = apiInstance.DownloadRunArtifact(owner, name, runId, path); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling RunsApi.DownloadRunArtifact: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **string**| | + **name** | **string**| | + **runId** | **string**| | + **path** | **string**| The path to an file within a project folder | [optional] + +### 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** | Retrieved | - | +| **403** | Access forbidden | - | +| **500** | Server error | - | +| **400** | Invalid request | - | +| **404** | Not found | - | +| **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) + + +## GetRun + +> Run GetRun (string owner, string name, string runId) + +Get a Run + +Retrieve a run. + +### Example + +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using PollinationSDK.Api; +using PollinationSDK.Client; +using PollinationSDK.Model; + +namespace Example +{ + public class GetRunExample + { + 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 RunsApi(Configuration.Default); + var owner = owner_example; // string | + var name = name_example; // string | + var runId = runId_example; // string | + + try + { + // Get a Run + Run result = apiInstance.GetRun(owner, name, runId); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling RunsApi.GetRun: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **string**| | + **name** | **string**| | + **runId** | **string**| | + +### Return type + +[**Run**](Run.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 | - | +| **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) + + +## GetRunOutput + +> AnyType GetRunOutput (string owner, string name, string runId, string outputName) + +Get run output by name + +get run output by name + +### Example + +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using PollinationSDK.Api; +using PollinationSDK.Client; +using PollinationSDK.Model; + +namespace Example +{ + public class GetRunOutputExample + { + 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 RunsApi(Configuration.Default); + var owner = owner_example; // string | + var name = name_example; // string | + var runId = runId_example; // string | + var outputName = outputName_example; // string | + + try + { + // Get run output by name + AnyType result = apiInstance.GetRunOutput(owner, name, runId, outputName); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling RunsApi.GetRunOutput: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **string**| | + **name** | **string**| | + **runId** | **string**| | + **outputName** | **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** | Retrieved | - | +| **403** | Access forbidden | - | +| **500** | Server error | - | +| **400** | Invalid request | - | +| **404** | Not found | - | +| **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) + + +## GetRunStepLogs + +> string GetRunStepLogs (string owner, string name, string runId, string stepId) + +Get the logs of a specific step of the run + +get run step logs + +### Example + +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using PollinationSDK.Api; +using PollinationSDK.Client; +using PollinationSDK.Model; + +namespace Example +{ + public class GetRunStepLogsExample + { + 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 RunsApi(Configuration.Default); + var owner = owner_example; // string | + var name = name_example; // string | + var runId = runId_example; // string | + var stepId = stepId_example; // string | + + try + { + // Get the logs of a specific step of the run + string result = apiInstance.GetRunStepLogs(owner, name, runId, stepId); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling RunsApi.GetRunStepLogs: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **string**| | + **name** | **string**| | + **runId** | **string**| | + **stepId** | **string**| | + +### Return type + +**string** + +### 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 | - | +| **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) + + +## GetRunSteps + +> StepList GetRunSteps (string owner, string name, string runId, StepStatusEnum? status = null, List stepId = null, string untilGeneration = null, string sinceGeneration = null, int? page = null, int? perPage = null) + +Query the steps of a run + +list run steps + +### Example + +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using PollinationSDK.Api; +using PollinationSDK.Client; +using PollinationSDK.Model; + +namespace Example +{ + public class GetRunStepsExample + { + 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 RunsApi(Configuration.Default); + var owner = owner_example; // string | + var name = name_example; // string | + var runId = runId_example; // string | + var status = ; // StepStatusEnum? | (optional) + var stepId = new List(); // List | (optional) + var untilGeneration = untilGeneration_example; // string | (optional) + var sinceGeneration = sinceGeneration_example; // string | (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 + { + // Query the steps of a run + StepList result = apiInstance.GetRunSteps(owner, name, runId, status, stepId, untilGeneration, sinceGeneration, page, perPage); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling RunsApi.GetRunSteps: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **string**| | + **name** | **string**| | + **runId** | **string**| | + **status** | **StepStatusEnum?**| | [optional] + **stepId** | [**List<string>**](string.md)| | [optional] + **untilGeneration** | **string**| | [optional] + **sinceGeneration** | **string**| | [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 + +[**StepList**](StepList.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 | - | +| **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) + + +## ListRunArtifacts + +> List<FileMeta> ListRunArtifacts (string owner, string name, string runId, List path = null, int? page = null, int? perPage = null) + +List artifacts in a run folder + +Retrieve a list of artifacts in a run folder + +### Example + +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using PollinationSDK.Api; +using PollinationSDK.Client; +using PollinationSDK.Model; + +namespace Example +{ + public class ListRunArtifactsExample + { + 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 RunsApi(Configuration.Default); + var owner = owner_example; // string | + var name = name_example; // string | + var runId = runId_example; // string | + var path = new List(); // List | The path to an file within a project folder (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 artifacts in a run folder + List result = apiInstance.ListRunArtifacts(owner, name, runId, path, page, perPage); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling RunsApi.ListRunArtifacts: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **string**| | + **name** | **string**| | + **runId** | **string**| | + **path** | [**List<string>**](string.md)| The path to an file within a project folder | [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 + +[**List<FileMeta>**](FileMeta.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 | - | +| **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) + + +## ListRuns + +> RunList ListRuns (string owner, string name, List jobId = null, RunStatusEnum? status = null, int? page = null, int? perPage = null) + +List runs + +Retrieve a list of runs. + +### Example + +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using PollinationSDK.Api; +using PollinationSDK.Client; +using PollinationSDK.Model; + +namespace Example +{ + public class ListRunsExample + { + 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 RunsApi(Configuration.Default); + var owner = owner_example; // string | + var name = name_example; // string | + var jobId = new List(); // List | (optional) + var status = ; // RunStatusEnum? | (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 runs + RunList result = apiInstance.ListRuns(owner, name, jobId, status, page, perPage); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling RunsApi.ListRuns: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **string**| | + **name** | **string**| | + **jobId** | [**List<string>**](string.md)| | [optional] + **status** | **RunStatusEnum?**| | [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 + +[**RunList**](RunList.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 | - | +| **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) + + +## QueryResults + +> RunResultList QueryResults (string owner, string name, List jobId = null, RunStatusEnum? status = null, int? page = null, int? perPage = null) + +Query run results + +Retrieve a list of run results. + +### Example + +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using PollinationSDK.Api; +using PollinationSDK.Client; +using PollinationSDK.Model; + +namespace Example +{ + public class QueryResultsExample + { + 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 RunsApi(Configuration.Default); + var owner = owner_example; // string | + var name = name_example; // string | + var jobId = new List(); // List | (optional) + var status = ; // RunStatusEnum? | (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 + { + // Query run results + RunResultList result = apiInstance.QueryResults(owner, name, jobId, status, page, perPage); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling RunsApi.QueryResults: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **string**| | + **name** | **string**| | + **jobId** | [**List<string>**](string.md)| | [optional] + **status** | **RunStatusEnum?**| | [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 + +[**RunResultList**](RunResultList.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 | - | +| **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/S3.md b/docs/S3.md new file mode 100644 index 000000000..57b898d51 --- /dev/null +++ b/docs/S3.md @@ -0,0 +1,17 @@ + +# PollinationSDK.Model.S3 + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Key** | **string** | The path inside the bucket to source artifacts from. | +**Endpoint** | **string** | The HTTP endpoint to reach the S3 bucket. | +**Bucket** | **string** | The name of the S3 bucket on the host server. | +**CredentialsPath** | **string** | Path to the file holding the AccessKey and SecretAccessKey to authenticate to the bucket. Assumes public bucket access if none are specified. | [optional] +**Type** | **string** | | [optional] [readonly] [default to "S3"] + +[[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/S3UploadRequest.md b/docs/S3UploadRequest.md new file mode 100644 index 000000000..80f3adba4 --- /dev/null +++ b/docs/S3UploadRequest.md @@ -0,0 +1,15 @@ + +# PollinationSDK.Model.S3UploadRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Url** | **string** | | +**Fields** | **Dictionary<string, string>** | | +**Type** | **string** | | [optional] [readonly] [default to "S3UploadRequest"] + +[[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/SortEnum.md b/docs/SortEnum.md new file mode 100644 index 000000000..2178e7574 --- /dev/null +++ b/docs/SortEnum.md @@ -0,0 +1,12 @@ + +# PollinationSDK.Model.SortEnum + +## 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/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/StatusType.md b/docs/StatusType.md new file mode 100644 index 000000000..ce81cff1e --- /dev/null +++ b/docs/StatusType.md @@ -0,0 +1,12 @@ + +# PollinationSDK.Model.StatusType + +## 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/StepArrayInput.md b/docs/StepArrayInput.md new file mode 100644 index 000000000..2fb630ac5 --- /dev/null +++ b/docs/StepArrayInput.md @@ -0,0 +1,22 @@ + +# PollinationSDK.Model.StepArrayInput + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | Input name. | +**Annotations** | **Dictionary<string, string>** | An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries. | [optional] +**Description** | **string** | Optional description for input. | [optional] +**Value** | [**List<AnyType>**](AnyType.md) | | +**Default** | [**List<AnyType>**](AnyType.md) | Default value to use for an input if a value was not supplied. | [optional] +**Alias** | [**List<AnyOfDAGGenericInputAliasDAGStringInputAliasDAGIntegerInputAliasDAGNumberInputAliasDAGBooleanInputAliasDAGFolderInputAliasDAGFileInputAliasDAGPathInputAliasDAGArrayInputAliasDAGJSONObjectInputAliasDAGLinkedInputAlias>**](AnyOfDAGGenericInputAliasDAGStringInputAliasDAGIntegerInputAliasDAGNumberInputAliasDAGBooleanInputAliasDAGFolderInputAliasDAGFileInputAliasDAGPathInputAliasDAGArrayInputAliasDAGJSONObjectInputAliasDAGLinkedInputAlias.md) | A list of aliases for this input in different platforms. | [optional] +**Required** | **bool** | A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. | [optional] [default to false] +**Spec** | **Object** | An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec. | [optional] +**ItemsType** | **ItemType** | Type of items in an array. All the items in an array must be from the same type. | [optional] +**Type** | **string** | | [optional] [readonly] [default to "StepArrayInput"] + +[[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/StepArrayOutput.md b/docs/StepArrayOutput.md new file mode 100644 index 000000000..20f943dc4 --- /dev/null +++ b/docs/StepArrayOutput.md @@ -0,0 +1,15 @@ + +# PollinationSDK.Model.StepArrayOutput + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Value** | [**List<AnyType>**](AnyType.md) | | +**ItemsType** | **ItemType** | Type of items in this array. All the items in an array must be from the same type. | [optional] +**Type** | **string** | | [optional] [readonly] [default to "StepArrayOutput"] + +[[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/StepBooleanInput.md b/docs/StepBooleanInput.md new file mode 100644 index 000000000..78123c96c --- /dev/null +++ b/docs/StepBooleanInput.md @@ -0,0 +1,21 @@ + +# PollinationSDK.Model.StepBooleanInput + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | Input name. | +**Annotations** | **Dictionary<string, string>** | An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries. | [optional] +**Description** | **string** | Optional description for input. | [optional] +**Value** | **bool** | | +**Default** | **bool** | Default value to use for an input if a value was not supplied. | [optional] +**Alias** | [**List<AnyOfDAGGenericInputAliasDAGStringInputAliasDAGIntegerInputAliasDAGNumberInputAliasDAGBooleanInputAliasDAGFolderInputAliasDAGFileInputAliasDAGPathInputAliasDAGArrayInputAliasDAGJSONObjectInputAliasDAGLinkedInputAlias>**](AnyOfDAGGenericInputAliasDAGStringInputAliasDAGIntegerInputAliasDAGNumberInputAliasDAGBooleanInputAliasDAGFolderInputAliasDAGFileInputAliasDAGPathInputAliasDAGArrayInputAliasDAGJSONObjectInputAliasDAGLinkedInputAlias.md) | A list of aliases for this input in different platforms. | [optional] +**Required** | **bool** | A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. | [optional] [default to false] +**Spec** | **Object** | An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec. | [optional] +**Type** | **string** | | [optional] [readonly] [default to "StepBooleanInput"] + +[[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/StepBooleanOutput.md b/docs/StepBooleanOutput.md new file mode 100644 index 000000000..4c9ac52be --- /dev/null +++ b/docs/StepBooleanOutput.md @@ -0,0 +1,14 @@ + +# PollinationSDK.Model.StepBooleanOutput + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Value** | **bool** | | +**Type** | **string** | | [optional] [readonly] [default to "StepBooleanOutput"] + +[[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/StepFileInput.md b/docs/StepFileInput.md new file mode 100644 index 000000000..17c269986 --- /dev/null +++ b/docs/StepFileInput.md @@ -0,0 +1,23 @@ + +# PollinationSDK.Model.StepFileInput + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | Input name. | +**Annotations** | **Dictionary<string, string>** | An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries. | [optional] +**Description** | **string** | Optional description for input. | [optional] +**Source** | [**AnyOfHTTPS3ProjectFolder**](AnyOfHTTPS3ProjectFolder.md) | The path to source the file from. | +**Default** | [**AnyOfHTTPS3ProjectFolder**](AnyOfHTTPS3ProjectFolder.md) | The default source for file if the value is not provided. | [optional] +**Alias** | [**List<AnyOfDAGGenericInputAliasDAGStringInputAliasDAGIntegerInputAliasDAGNumberInputAliasDAGBooleanInputAliasDAGFolderInputAliasDAGFileInputAliasDAGPathInputAliasDAGArrayInputAliasDAGJSONObjectInputAliasDAGLinkedInputAlias>**](AnyOfDAGGenericInputAliasDAGStringInputAliasDAGIntegerInputAliasDAGNumberInputAliasDAGBooleanInputAliasDAGFolderInputAliasDAGFileInputAliasDAGPathInputAliasDAGArrayInputAliasDAGJSONObjectInputAliasDAGLinkedInputAlias.md) | A list of aliases for this input in different platforms. | [optional] +**Required** | **bool** | A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. | [optional] [default to false] +**Spec** | **Object** | An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec. | [optional] +**Path** | **string** | 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. | [optional] +**Extensions** | **List<string>** | Optional list of extensions for file. The check for extension is case-insensitive. | [optional] +**Type** | **string** | | [optional] [readonly] [default to "StepFileInput"] + +[[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/StepFileOutput.md b/docs/StepFileOutput.md new file mode 100644 index 000000000..3d3466289 --- /dev/null +++ b/docs/StepFileOutput.md @@ -0,0 +1,14 @@ + +# PollinationSDK.Model.StepFileOutput + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Source** | [**AnyOfHTTPS3ProjectFolder**](AnyOfHTTPS3ProjectFolder.md) | The path to source the file from. | +**Type** | **string** | | [optional] [readonly] [default to "StepFileOutput"] + +[[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/StepFolderInput.md b/docs/StepFolderInput.md new file mode 100644 index 000000000..bd6d94570 --- /dev/null +++ b/docs/StepFolderInput.md @@ -0,0 +1,22 @@ + +# PollinationSDK.Model.StepFolderInput + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | Input name. | +**Annotations** | **Dictionary<string, string>** | An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries. | [optional] +**Description** | **string** | Optional description for input. | [optional] +**Source** | [**AnyOfHTTPS3ProjectFolder**](AnyOfHTTPS3ProjectFolder.md) | The path to source the file from. | +**Default** | [**AnyOfHTTPS3ProjectFolder**](AnyOfHTTPS3ProjectFolder.md) | The default source for file if the value is not provided. | [optional] +**Alias** | [**List<AnyOfDAGGenericInputAliasDAGStringInputAliasDAGIntegerInputAliasDAGNumberInputAliasDAGBooleanInputAliasDAGFolderInputAliasDAGFileInputAliasDAGPathInputAliasDAGArrayInputAliasDAGJSONObjectInputAliasDAGLinkedInputAlias>**](AnyOfDAGGenericInputAliasDAGStringInputAliasDAGIntegerInputAliasDAGNumberInputAliasDAGBooleanInputAliasDAGFolderInputAliasDAGFileInputAliasDAGPathInputAliasDAGArrayInputAliasDAGJSONObjectInputAliasDAGLinkedInputAlias.md) | A list of aliases for this input in different platforms. | [optional] +**Required** | **bool** | A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. | [optional] [default to false] +**Spec** | **Object** | An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec. | [optional] +**Path** | **string** | 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. | [optional] +**Type** | **string** | | [optional] [readonly] [default to "StepFolderInput"] + +[[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/StepFolderOutput.md b/docs/StepFolderOutput.md new file mode 100644 index 000000000..4b03c62ca --- /dev/null +++ b/docs/StepFolderOutput.md @@ -0,0 +1,14 @@ + +# PollinationSDK.Model.StepFolderOutput + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Source** | [**AnyOfHTTPS3ProjectFolder**](AnyOfHTTPS3ProjectFolder.md) | The path to source the file from. | +**Type** | **string** | | [optional] [readonly] [default to "StepFolderOutput"] + +[[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/StepIntegerInput.md b/docs/StepIntegerInput.md new file mode 100644 index 000000000..422f0f581 --- /dev/null +++ b/docs/StepIntegerInput.md @@ -0,0 +1,21 @@ + +# PollinationSDK.Model.StepIntegerInput + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | Input name. | +**Annotations** | **Dictionary<string, string>** | An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries. | [optional] +**Description** | **string** | Optional description for input. | [optional] +**Value** | **int** | | +**Default** | **int** | Default value to use for an input if a value was not supplied. | [optional] +**Alias** | [**List<AnyOfDAGGenericInputAliasDAGStringInputAliasDAGIntegerInputAliasDAGNumberInputAliasDAGBooleanInputAliasDAGFolderInputAliasDAGFileInputAliasDAGPathInputAliasDAGArrayInputAliasDAGJSONObjectInputAliasDAGLinkedInputAlias>**](AnyOfDAGGenericInputAliasDAGStringInputAliasDAGIntegerInputAliasDAGNumberInputAliasDAGBooleanInputAliasDAGFolderInputAliasDAGFileInputAliasDAGPathInputAliasDAGArrayInputAliasDAGJSONObjectInputAliasDAGLinkedInputAlias.md) | A list of aliases for this input in different platforms. | [optional] +**Required** | **bool** | A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. | [optional] [default to false] +**Spec** | **Object** | An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec. | [optional] +**Type** | **string** | | [optional] [readonly] [default to "StepIntegerInput"] + +[[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/StepIntegerOutput.md b/docs/StepIntegerOutput.md new file mode 100644 index 000000000..83ae127a4 --- /dev/null +++ b/docs/StepIntegerOutput.md @@ -0,0 +1,14 @@ + +# PollinationSDK.Model.StepIntegerOutput + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Value** | **int** | | +**Type** | **string** | | [optional] [readonly] [default to "StepIntegerOutput"] + +[[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/StepJSONObjectInput.md b/docs/StepJSONObjectInput.md new file mode 100644 index 000000000..24cdd8e13 --- /dev/null +++ b/docs/StepJSONObjectInput.md @@ -0,0 +1,21 @@ + +# PollinationSDK.Model.StepJSONObjectInput + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | Input name. | +**Annotations** | **Dictionary<string, string>** | An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries. | [optional] +**Description** | **string** | Optional description for input. | [optional] +**Value** | **Object** | | +**Default** | **Object** | Default value to use for an input if a value was not supplied. | [optional] +**Alias** | [**List<AnyOfDAGGenericInputAliasDAGStringInputAliasDAGIntegerInputAliasDAGNumberInputAliasDAGBooleanInputAliasDAGFolderInputAliasDAGFileInputAliasDAGPathInputAliasDAGArrayInputAliasDAGJSONObjectInputAliasDAGLinkedInputAlias>**](AnyOfDAGGenericInputAliasDAGStringInputAliasDAGIntegerInputAliasDAGNumberInputAliasDAGBooleanInputAliasDAGFolderInputAliasDAGFileInputAliasDAGPathInputAliasDAGArrayInputAliasDAGJSONObjectInputAliasDAGLinkedInputAlias.md) | A list of aliases for this input in different platforms. | [optional] +**Required** | **bool** | A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. | [optional] [default to false] +**Spec** | **Object** | An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec. | [optional] +**Type** | **string** | | [optional] [readonly] [default to "StepJSONObjectInput"] + +[[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/StepJSONObjectOutput.md b/docs/StepJSONObjectOutput.md new file mode 100644 index 000000000..916d908bd --- /dev/null +++ b/docs/StepJSONObjectOutput.md @@ -0,0 +1,14 @@ + +# PollinationSDK.Model.StepJSONObjectOutput + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Value** | **Object** | | +**Type** | **string** | | [optional] [readonly] [default to "StepJSONObjectOutput"] + +[[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/StepList.md b/docs/StepList.md new file mode 100644 index 000000000..3ad0e9d1b --- /dev/null +++ b/docs/StepList.md @@ -0,0 +1,19 @@ + +# PollinationSDK.Model.StepList + +## 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<StepStatus>**](StepStatus.md) | | +**NextPage** | **int** | The next page, if this on is not the last | [optional] +**Type** | **string** | | [optional] [readonly] [default to "StepList"] + +[[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/StepNumberInput.md b/docs/StepNumberInput.md new file mode 100644 index 000000000..8f2b6d3ec --- /dev/null +++ b/docs/StepNumberInput.md @@ -0,0 +1,21 @@ + +# PollinationSDK.Model.StepNumberInput + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | Input name. | +**Annotations** | **Dictionary<string, string>** | An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries. | [optional] +**Description** | **string** | Optional description for input. | [optional] +**Value** | **double** | | +**Default** | **double** | Default value to use for an input if a value was not supplied. | [optional] +**Alias** | [**List<AnyOfDAGGenericInputAliasDAGStringInputAliasDAGIntegerInputAliasDAGNumberInputAliasDAGBooleanInputAliasDAGFolderInputAliasDAGFileInputAliasDAGPathInputAliasDAGArrayInputAliasDAGJSONObjectInputAliasDAGLinkedInputAlias>**](AnyOfDAGGenericInputAliasDAGStringInputAliasDAGIntegerInputAliasDAGNumberInputAliasDAGBooleanInputAliasDAGFolderInputAliasDAGFileInputAliasDAGPathInputAliasDAGArrayInputAliasDAGJSONObjectInputAliasDAGLinkedInputAlias.md) | A list of aliases for this input in different platforms. | [optional] +**Required** | **bool** | A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. | [optional] [default to false] +**Spec** | **Object** | An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec. | [optional] +**Type** | **string** | | [optional] [readonly] [default to "StepNumberInput"] + +[[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/StepNumberOutput.md b/docs/StepNumberOutput.md new file mode 100644 index 000000000..a9868b8d2 --- /dev/null +++ b/docs/StepNumberOutput.md @@ -0,0 +1,14 @@ + +# PollinationSDK.Model.StepNumberOutput + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Value** | **double** | | +**Type** | **string** | | [optional] [readonly] [default to "StepNumberOutput"] + +[[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/StepPathInput.md b/docs/StepPathInput.md new file mode 100644 index 000000000..cccbe3709 --- /dev/null +++ b/docs/StepPathInput.md @@ -0,0 +1,23 @@ + +# PollinationSDK.Model.StepPathInput + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | Input name. | +**Annotations** | **Dictionary<string, string>** | An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries. | [optional] +**Description** | **string** | Optional description for input. | [optional] +**Source** | [**AnyOfHTTPS3ProjectFolder**](AnyOfHTTPS3ProjectFolder.md) | The path to source the file from. | +**Default** | [**AnyOfHTTPS3ProjectFolder**](AnyOfHTTPS3ProjectFolder.md) | The default source for file if the value is not provided. | [optional] +**Alias** | [**List<AnyOfDAGGenericInputAliasDAGStringInputAliasDAGIntegerInputAliasDAGNumberInputAliasDAGBooleanInputAliasDAGFolderInputAliasDAGFileInputAliasDAGPathInputAliasDAGArrayInputAliasDAGJSONObjectInputAliasDAGLinkedInputAlias>**](AnyOfDAGGenericInputAliasDAGStringInputAliasDAGIntegerInputAliasDAGNumberInputAliasDAGBooleanInputAliasDAGFolderInputAliasDAGFileInputAliasDAGPathInputAliasDAGArrayInputAliasDAGJSONObjectInputAliasDAGLinkedInputAlias.md) | A list of aliases for this input in different platforms. | [optional] +**Required** | **bool** | A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. | [optional] [default to false] +**Spec** | **Object** | An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec. | [optional] +**Path** | **string** | 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. | [optional] +**Extensions** | **List<string>** | Optional list of extensions for file. The check for extension is case-insensitive. | [optional] +**Type** | **string** | | [optional] [readonly] [default to "StepPathInput"] + +[[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/StepPathOutput.md b/docs/StepPathOutput.md new file mode 100644 index 000000000..1390622c2 --- /dev/null +++ b/docs/StepPathOutput.md @@ -0,0 +1,14 @@ + +# PollinationSDK.Model.StepPathOutput + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Source** | [**AnyOfHTTPS3ProjectFolder**](AnyOfHTTPS3ProjectFolder.md) | The path to source the file from. | +**Type** | **string** | | [optional] [readonly] [default to "StepPathOutput"] + +[[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/StepStatus.md b/docs/StepStatus.md new file mode 100644 index 000000000..0ad014849 --- /dev/null +++ b/docs/StepStatus.md @@ -0,0 +1,29 @@ + +# PollinationSDK.Model.StepStatus + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Inputs** | [**List<AnyOfStepStringInputStepIntegerInputStepNumberInputStepBooleanInputStepFolderInputStepFileInputStepPathInputStepArrayInputStepJSONObjectInput>**](AnyOfStepStringInputStepIntegerInputStepNumberInputStepBooleanInputStepFolderInputStepFileInputStepPathInputStepArrayInputStepJSONObjectInput.md) | The inputs used by this step. | +**Outputs** | [**List<AnyOfStepStringOutputStepIntegerOutputStepNumberOutputStepBooleanOutputStepFolderOutputStepFileOutputStepPathOutputStepArrayOutputStepJSONObjectOutput>**](AnyOfStepStringOutputStepIntegerOutputStepNumberOutputStepBooleanOutputStepFolderOutputStepFileOutputStepPathOutputStepArrayOutputStepJSONObjectOutput.md) | The outputs produced by this step. | +**StartedAt** | **DateTime** | The time at which the task was started | +**Id** | **string** | The step unique ID | +**Name** | **string** | 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. | +**StatusType** | **StatusType** | The type of step this status is for. Can be \"Function\", \"DAG\" or \"Loop\" | +**TemplateRef** | **string** | The name of the template that spawned this step | +**ChildrenIds** | **List<string>** | A list of child step IDs | +**OutboundSteps** | **List<string>** | 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. | +**Annotations** | **Dictionary<string, string>** | An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries. | [optional] +**Message** | **string** | Any message produced by the task. Usually error/debugging hints. | [optional] +**FinishedAt** | **DateTime** | The time at which the task was completed | [optional] +**Source** | **string** | Source url for the status object. It can be a recipe or a function. | [optional] +**Status** | **StepStatusEnum** | The status of this step. | [optional] +**Command** | **string** | The command used to run this step. Only applies to Function steps. | [optional] +**BoundaryId** | **string** | 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. | [optional] +**Type** | **string** | | [optional] [readonly] [default to "StepStatus"] + +[[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/StepStatusEnum.md b/docs/StepStatusEnum.md new file mode 100644 index 000000000..938f02eb5 --- /dev/null +++ b/docs/StepStatusEnum.md @@ -0,0 +1,12 @@ + +# PollinationSDK.Model.StepStatusEnum + +## 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/StepStringInput.md b/docs/StepStringInput.md new file mode 100644 index 000000000..670a5ebb6 --- /dev/null +++ b/docs/StepStringInput.md @@ -0,0 +1,14 @@ + +# PollinationSDK.Model.StepStringInput + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Value** | **string** | | +**Type** | **string** | | [optional] [readonly] [default to "StepStringInput"] + +[[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/StepStringOutput.md b/docs/StepStringOutput.md new file mode 100644 index 000000000..ac8d1afc7 --- /dev/null +++ b/docs/StepStringOutput.md @@ -0,0 +1,14 @@ + +# PollinationSDK.Model.StepStringOutput + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Value** | **string** | | +**Type** | **string** | | [optional] [readonly] [default to "StepStringOutput"] + +[[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/SubjectType.md b/docs/SubjectType.md new file mode 100644 index 000000000..8fc62f9d9 --- /dev/null +++ b/docs/SubjectType.md @@ -0,0 +1,12 @@ + +# PollinationSDK.Model.SubjectType + +## 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/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/TaskArgument.md b/docs/TaskArgument.md new file mode 100644 index 000000000..67c7f0c4f --- /dev/null +++ b/docs/TaskArgument.md @@ -0,0 +1,16 @@ + +# PollinationSDK.Model.TaskArgument + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | Argument name. The name must match one of the input names from Task's template which can be a function or DAG. | +**From** | [**AnyOfInputReferenceTaskReferenceItemReferenceValueReference**](AnyOfInputReferenceTaskReferenceItemReferenceValueReference.md) | 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. | +**Type** | **string** | | [optional] [readonly] [default to "TaskArgument"] +**Annotations** | **Dictionary<string, string>** | An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries. | [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/TaskFileReference.md b/docs/TaskFileReference.md new file mode 100644 index 000000000..72efbd3a3 --- /dev/null +++ b/docs/TaskFileReference.md @@ -0,0 +1,13 @@ + +# PollinationSDK.Model.TaskFileReference + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Type** | **string** | | [optional] [readonly] [default to "TaskFileReference"] + +[[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/TaskFolderReference.md b/docs/TaskFolderReference.md new file mode 100644 index 000000000..5053ed156 --- /dev/null +++ b/docs/TaskFolderReference.md @@ -0,0 +1,13 @@ + +# PollinationSDK.Model.TaskFolderReference + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Type** | **string** | | [optional] [readonly] [default to "TaskFolderReference"] + +[[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/TaskPathArgument.md b/docs/TaskPathArgument.md new file mode 100644 index 000000000..9efd5d477 --- /dev/null +++ b/docs/TaskPathArgument.md @@ -0,0 +1,17 @@ + +# PollinationSDK.Model.TaskPathArgument + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | Argument name. The name must match one of the input names from Task's template which can be a function or DAG. | +**From** | [**AnyOfInputFileReferenceInputFolderReferenceInputPathReferenceTaskFileReferenceTaskFolderReferenceTaskPathReferenceValueFileReferenceValueFolderReference**](AnyOfInputFileReferenceInputFolderReferenceInputPathReferenceTaskFileReferenceTaskFolderReferenceTaskPathReferenceValueFileReferenceValueFolderReference.md) | 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. | +**Type** | **string** | | [optional] [readonly] [default to "TaskPathArgument"] +**Annotations** | **Dictionary<string, string>** | An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries. | [optional] +**SubPath** | **string** | 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. | [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/TaskPathReference.md b/docs/TaskPathReference.md new file mode 100644 index 000000000..56aa8c1e2 --- /dev/null +++ b/docs/TaskPathReference.md @@ -0,0 +1,13 @@ + +# PollinationSDK.Model.TaskPathReference + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Type** | **string** | | [optional] [readonly] [default to "TaskPathReference"] + +[[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/TaskPathReturn.md b/docs/TaskPathReturn.md new file mode 100644 index 000000000..d396d90bf --- /dev/null +++ b/docs/TaskPathReturn.md @@ -0,0 +1,15 @@ + +# PollinationSDK.Model.TaskPathReturn + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Path** | **string** | Path to the output artifact relative to where the function command is executed. | +**Required** | **bool** | A boolean to indicate if an artifact output is required. A False value makes the artifact optional. | [optional] [default to true] +**Type** | **string** | | [optional] [readonly] [default to "TaskPathReturn"] + +[[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/TaskReference.md b/docs/TaskReference.md new file mode 100644 index 000000000..36567c0b8 --- /dev/null +++ b/docs/TaskReference.md @@ -0,0 +1,13 @@ + +# PollinationSDK.Model.TaskReference + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Type** | **string** | | [optional] [readonly] [default to "TaskReference"] + +[[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/TaskReferenceBase.md b/docs/TaskReferenceBase.md new file mode 100644 index 000000000..ac3443c0c --- /dev/null +++ b/docs/TaskReferenceBase.md @@ -0,0 +1,15 @@ + +# PollinationSDK.Model.TaskReferenceBase + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | The name of the task to pull output data from. | +**Variable** | **string** | The name of the variable. | +**Type** | **string** | | [optional] [readonly] [default to "_TaskReferenceBase"] + +[[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/TaskReturn.md b/docs/TaskReturn.md new file mode 100644 index 000000000..e31d6038e --- /dev/null +++ b/docs/TaskReturn.md @@ -0,0 +1,16 @@ + +# PollinationSDK.Model.TaskReturn + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | Output name. | +**Annotations** | **Dictionary<string, string>** | An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries. | [optional] +**Description** | **string** | Optional description for output. | [optional] +**Type** | **string** | | [optional] [readonly] [default to "TaskReturn"] + +[[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/Team.md b/docs/Team.md new file mode 100644 index 000000000..63bf3700b --- /dev/null +++ b/docs/Team.md @@ -0,0 +1,16 @@ + +# PollinationSDK.Model.Team + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **string** | The team ID | +**Slug** | **string** | The public slug of the team | +**MemberCount** | **int** | The number of members that are part of this team | [optional] [default to 0] +**Type** | **string** | | [optional] [readonly] [default to "Team"] + +[[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/TeamCreate.md b/docs/TeamCreate.md new file mode 100644 index 000000000..e7ab24d49 --- /dev/null +++ b/docs/TeamCreate.md @@ -0,0 +1,15 @@ + +# PollinationSDK.Model.TeamCreate + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | | +**Description** | **string** | | [optional] +**Type** | **string** | | [optional] [readonly] [default to "TeamCreate"] + +[[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/TeamList.md b/docs/TeamList.md new file mode 100644 index 000000000..1afdb4df1 --- /dev/null +++ b/docs/TeamList.md @@ -0,0 +1,19 @@ + +# PollinationSDK.Model.TeamList + +## 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<Team>**](Team.md) | | +**NextPage** | **int** | The next page, if this on is not the last | [optional] +**Type** | **string** | | [optional] [readonly] [default to "TeamList"] + +[[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/TeamMember.md b/docs/TeamMember.md new file mode 100644 index 000000000..8737b70a0 --- /dev/null +++ b/docs/TeamMember.md @@ -0,0 +1,15 @@ + +# PollinationSDK.Model.TeamMember + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**User** | [**UserPublic**](UserPublic.md) | The team member | +**Role** | **TeamRoleEnum** | The role the user has within the team | +**Type** | **string** | | [optional] [readonly] [default to "TeamMember"] + +[[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/TeamMemberList.md b/docs/TeamMemberList.md new file mode 100644 index 000000000..1b3e204d7 --- /dev/null +++ b/docs/TeamMemberList.md @@ -0,0 +1,19 @@ + +# PollinationSDK.Model.TeamMemberList + +## 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<TeamMember>**](TeamMember.md) | | +**NextPage** | **int** | The next page, if this on is not the last | [optional] +**Type** | **string** | | [optional] [readonly] [default to "TeamMemberList"] + +[[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/TeamRoleEnum.md b/docs/TeamRoleEnum.md new file mode 100644 index 000000000..3cf288557 --- /dev/null +++ b/docs/TeamRoleEnum.md @@ -0,0 +1,12 @@ + +# PollinationSDK.Model.TeamRoleEnum + +## 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/TeamUpdate.md b/docs/TeamUpdate.md new file mode 100644 index 000000000..10cfaa94d --- /dev/null +++ b/docs/TeamUpdate.md @@ -0,0 +1,15 @@ + +# PollinationSDK.Model.TeamUpdate + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | | +**Description** | **string** | | [optional] +**Type** | **string** | | [optional] [readonly] [default to "TeamUpdate"] + +[[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/TeamsApi.md b/docs/TeamsApi.md new file mode 100644 index 000000000..4f35dd93b --- /dev/null +++ b/docs/TeamsApi.md @@ -0,0 +1,711 @@ +# PollinationSDK.Api.TeamsApi + +All URIs are relative to *http://localhost* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**CreateTeam**](TeamsApi.md#createteam) | **POST** /orgs/{org_name}/teams | Create a Team +[**DeleteOrgTeamMember**](TeamsApi.md#deleteorgteammember) | **DELETE** /orgs/{org_name}/teams/{team_slug}/members/{username} | Remove a team member +[**DeleteTeam**](TeamsApi.md#deleteteam) | **DELETE** /orgs/{org_name}/teams/{team_slug} | Delete a Team +[**GetOrgTeamMembers**](TeamsApi.md#getorgteammembers) | **GET** /orgs/{org_name}/teams/{team_slug}/members | List team members +[**GetTeam**](TeamsApi.md#getteam) | **GET** /orgs/{org_name}/teams/{team_slug} | Get a Team +[**ListOrgTeams**](TeamsApi.md#listorgteams) | **GET** /orgs/{org_name}/teams | List Teams +[**UpdateTeam**](TeamsApi.md#updateteam) | **PUT** /orgs/{org_name}/teams/{team_slug} | Update a Team +[**UpsertOrgTeamMember**](TeamsApi.md#upsertorgteammember) | **PATCH** /orgs/{org_name}/teams/{team_slug}/members/{username}/{role} | Add or update the role of an Team Member + + + +## CreateTeam + +> CreatedContent CreateTeam (string orgName, TeamCreate teamCreate) + +Create a Team + +Create a new team (must be parent org member) + +### Example + +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using PollinationSDK.Api; +using PollinationSDK.Client; +using PollinationSDK.Model; + +namespace Example +{ + public class CreateTeamExample + { + 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 TeamsApi(Configuration.Default); + var orgName = orgName_example; // string | + var teamCreate = new TeamCreate(); // TeamCreate | + + try + { + // Create a Team + CreatedContent result = apiInstance.CreateTeam(orgName, teamCreate); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling TeamsApi.CreateTeam: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **orgName** | **string**| | + **teamCreate** | [**TeamCreate**](TeamCreate.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 | +|-------------|-------------|------------------| +| **201** | Success | - | +| **403** | Access forbidden | - | +| **500** | Server error | - | +| **400** | Invalid request | - | +| **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) + + +## DeleteOrgTeamMember + +> void DeleteOrgTeamMember (string orgName, string teamSlug, string username) + +Remove a team member + +Remove a member from the org (must have org `owner` role) + +### Example + +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using PollinationSDK.Api; +using PollinationSDK.Client; +using PollinationSDK.Model; + +namespace Example +{ + public class DeleteOrgTeamMemberExample + { + 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 TeamsApi(Configuration.Default); + var orgName = orgName_example; // string | + var teamSlug = teamSlug_example; // string | + var username = username_example; // string | + + try + { + // Remove a team member + apiInstance.DeleteOrgTeamMember(orgName, teamSlug, username); + } + catch (ApiException e) + { + Debug.Print("Exception when calling TeamsApi.DeleteOrgTeamMember: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **orgName** | **string**| | + **teamSlug** | **string**| | + **username** | **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** | Accepted | - | +| **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) + + +## DeleteTeam + +> void DeleteTeam (string orgName, string teamSlug) + +Delete a Team + +Delete a team (must have team or org `owner` role) + +### Example + +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using PollinationSDK.Api; +using PollinationSDK.Client; +using PollinationSDK.Model; + +namespace Example +{ + public class DeleteTeamExample + { + 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 TeamsApi(Configuration.Default); + var orgName = orgName_example; // string | + var teamSlug = teamSlug_example; // string | + + try + { + // Delete a Team + apiInstance.DeleteTeam(orgName, teamSlug); + } + catch (ApiException e) + { + Debug.Print("Exception when calling TeamsApi.DeleteTeam: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **orgName** | **string**| | + **teamSlug** | **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** | Accepted | - | +| **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) + + +## GetOrgTeamMembers + +> TeamMemberList GetOrgTeamMembers (string orgName, string teamSlug) + +List team members + +Retrieve a tean's members + +### Example + +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using PollinationSDK.Api; +using PollinationSDK.Client; +using PollinationSDK.Model; + +namespace Example +{ + public class GetOrgTeamMembersExample + { + public static void Main() + { + Configuration.Default.BasePath = "http://localhost"; + var apiInstance = new TeamsApi(Configuration.Default); + var orgName = orgName_example; // string | + var teamSlug = teamSlug_example; // string | + + try + { + // List team members + TeamMemberList result = apiInstance.GetOrgTeamMembers(orgName, teamSlug); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling TeamsApi.GetOrgTeamMembers: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **orgName** | **string**| | + **teamSlug** | **string**| | + +### Return type + +[**TeamMemberList**](TeamMemberList.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Retrieved | - | +| **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) + + +## GetTeam + +> Team GetTeam (string orgName, string teamSlug) + +Get a Team + +Retrieve a team by name + +### Example + +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using PollinationSDK.Api; +using PollinationSDK.Client; +using PollinationSDK.Model; + +namespace Example +{ + public class GetTeamExample + { + public static void Main() + { + Configuration.Default.BasePath = "http://localhost"; + var apiInstance = new TeamsApi(Configuration.Default); + var orgName = orgName_example; // string | + var teamSlug = teamSlug_example; // string | + + try + { + // Get a Team + Team result = apiInstance.GetTeam(orgName, teamSlug); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling TeamsApi.GetTeam: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **orgName** | **string**| | + **teamSlug** | **string**| | + +### Return type + +[**Team**](Team.md) + +### Authorization + +No authorization required + +### 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 | - | +| **404** | Not found | - | +| **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) + + +## ListOrgTeams + +> TeamList ListOrgTeams (string orgName, List search = null, List name = null, List member = null, int? page = null, int? perPage = null) + +List Teams + +search for orgs using query parameters + +### Example + +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using PollinationSDK.Api; +using PollinationSDK.Client; +using PollinationSDK.Model; + +namespace Example +{ + public class ListOrgTeamsExample + { + public static void Main() + { + Configuration.Default.BasePath = "http://localhost"; + var apiInstance = new TeamsApi(Configuration.Default); + var orgName = orgName_example; // string | + var search = new List(); // List | You know, for search (optional) + var name = new List(); // List | The account name (optional) + var member = new List(); // List | The ID of a user (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 Teams + TeamList result = apiInstance.ListOrgTeams(orgName, search, name, member, page, perPage); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling TeamsApi.ListOrgTeams: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **orgName** | **string**| | + **search** | [**List<string>**](string.md)| You know, for search | [optional] + **name** | [**List<string>**](string.md)| The account name | [optional] + **member** | [**List<string>**](string.md)| The ID of a user | [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 + +[**TeamList**](TeamList.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Retrieved | - | +| **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) + + +## UpdateTeam + +> UpdateAccepted UpdateTeam (string orgName, string teamSlug, TeamUpdate teamUpdate) + +Update a Team + +Update a team (must have team or org `owner` role) + +### Example + +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using PollinationSDK.Api; +using PollinationSDK.Client; +using PollinationSDK.Model; + +namespace Example +{ + public class UpdateTeamExample + { + 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 TeamsApi(Configuration.Default); + var orgName = orgName_example; // string | + var teamSlug = teamSlug_example; // string | + var teamUpdate = new TeamUpdate(); // TeamUpdate | + + try + { + // Update a Team + UpdateAccepted result = apiInstance.UpdateTeam(orgName, teamSlug, teamUpdate); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling TeamsApi.UpdateTeam: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **orgName** | **string**| | + **teamSlug** | **string**| | + **teamUpdate** | [**TeamUpdate**](TeamUpdate.md)| | + +### Return type + +[**UpdateAccepted**](UpdateAccepted.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 | +|-------------|-------------|------------------| +| **202** | Accepted | - | +| **403** | Access forbidden | - | +| **500** | Server error | - | +| **400** | Invalid request | - | +| **404** | Not found | - | +| **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) + + +## UpsertOrgTeamMember + +> UpdateAccepted UpsertOrgTeamMember (string orgName, string teamSlug, string username, TeamRoleEnum role) + +Add or update the role of an Team Member + +Upsert a member role to the team (must have org or team `owner` role) + +### Example + +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using PollinationSDK.Api; +using PollinationSDK.Client; +using PollinationSDK.Model; + +namespace Example +{ + public class UpsertOrgTeamMemberExample + { + 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 TeamsApi(Configuration.Default); + var orgName = orgName_example; // string | + var teamSlug = teamSlug_example; // string | + var username = username_example; // string | + var role = ; // TeamRoleEnum | + + try + { + // Add or update the role of an Team Member + UpdateAccepted result = apiInstance.UpsertOrgTeamMember(orgName, teamSlug, username, role); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling TeamsApi.UpsertOrgTeamMember: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **orgName** | **string**| | + **teamSlug** | **string**| | + **username** | **string**| | + **role** | **TeamRoleEnum**| | + +### Return type + +[**UpdateAccepted**](UpdateAccepted.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 | - | +| **403** | Access forbidden | - | +| **500** | Server error | - | +| **400** | Invalid request | - | +| **404** | Not found | - | +| **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/UpdateAccepted.md b/docs/UpdateAccepted.md new file mode 100644 index 000000000..15446ffb0 --- /dev/null +++ b/docs/UpdateAccepted.md @@ -0,0 +1,14 @@ + +# PollinationSDK.Model.UpdateAccepted + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Status** | **string** | | [optional] [default to "accepted"] +**Type** | **string** | | [optional] [readonly] [default to "UpdateAccepted"] + +[[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/Usage.md b/docs/Usage.md new file mode 100644 index 000000000..352323f42 --- /dev/null +++ b/docs/Usage.md @@ -0,0 +1,20 @@ + +# PollinationSDK.Model.Usage + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Start** | **DateTime** | The start date for this usage aggregation | +**End** | **DateTime** | The end date for this usage aggregation | +**Cpu** | **double** | cpu usage | [optional] [default to 0D] +**Memory** | **double** | memory usage | [optional] [default to 0D] +**Succeeded** | **int** | succeeded usage | [optional] [default to 0] +**Failed** | **int** | failed usage | [optional] [default to 0] +**DailyUsage** | [**List<DailyUsage>**](DailyUsage.md) | daily breakdown of usage | [optional] +**Type** | **string** | | [optional] [readonly] [default to "Usage"] + +[[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/UserApi.md b/docs/UserApi.md new file mode 100644 index 000000000..449324e4f --- /dev/null +++ b/docs/UserApi.md @@ -0,0 +1,336 @@ +# PollinationSDK.Api.UserApi + +All URIs are relative to *http://localhost* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**CreateUser**](UserApi.md#createuser) | **POST** /user | Register a new user +[**GetMe**](UserApi.md#getme) | **GET** /user | Get authenticated user profile. +[**GetRoles**](UserApi.md#getroles) | **GET** /user/roles | Get the authenticated user roles +[**UpdateUserProfile**](UserApi.md#updateuserprofile) | **PUT** /user | Update the authenticated user + + + +## CreateUser + +> CreatedContent CreateUser (UserCreate userCreate) + +Register a new user + +Create a new user. + +### Example + +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using PollinationSDK.Api; +using PollinationSDK.Client; +using PollinationSDK.Model; + +namespace Example +{ + public class CreateUserExample + { + public static void Main() + { + Configuration.Default.BasePath = "http://localhost"; + // Configure HTTP bearer authorization: JWTAuth + Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; + + var apiInstance = new UserApi(Configuration.Default); + var userCreate = new UserCreate(); // UserCreate | + + try + { + // Register a new user + CreatedContent result = apiInstance.CreateUser(userCreate); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling UserApi.CreateUser: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **userCreate** | [**UserCreate**](UserCreate.md)| | + +### Return type + +[**CreatedContent**](CreatedContent.md) + +### Authorization + +[JWTAuth](../README.md#JWTAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **201** | Success | - | +| **403** | Access forbidden | - | +| **500** | Server error | - | +| **400** | Invalid request | - | +| **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) + + +## GetMe + +> UserPrivate GetMe () + +Get authenticated user profile. + +Get authenticated user profile + +### Example + +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using PollinationSDK.Api; +using PollinationSDK.Client; +using PollinationSDK.Model; + +namespace Example +{ + public class GetMeExample + { + 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 UserApi(Configuration.Default); + + try + { + // Get authenticated user profile. + UserPrivate result = apiInstance.GetMe(); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling UserApi.GetMe: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**UserPrivate**](UserPrivate.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 | - | + +[[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) + + +## GetRoles + +> List<string> GetRoles () + +Get the authenticated user roles + +### Example + +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using PollinationSDK.Api; +using PollinationSDK.Client; +using PollinationSDK.Model; + +namespace Example +{ + public class GetRolesExample + { + 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 UserApi(Configuration.Default); + + try + { + // Get the authenticated user roles + List result = apiInstance.GetRoles(); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling UserApi.GetRoles: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +**List** + +### 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 | - | + +[[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) + + +## UpdateUserProfile + +> UpdateAccepted UpdateUserProfile (UserUpdate userUpdate) + +Update the authenticated user + +Update the authenticated user profile + +### Example + +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using PollinationSDK.Api; +using PollinationSDK.Client; +using PollinationSDK.Model; + +namespace Example +{ + public class UpdateUserProfileExample + { + 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 UserApi(Configuration.Default); + var userUpdate = new UserUpdate(); // UserUpdate | + + try + { + // Update the authenticated user + UpdateAccepted result = apiInstance.UpdateUserProfile(userUpdate); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling UserApi.UpdateUserProfile: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **userUpdate** | [**UserUpdate**](UserUpdate.md)| | + +### Return type + +[**UpdateAccepted**](UpdateAccepted.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 | +|-------------|-------------|------------------| +| **202** | Accepted | - | +| **403** | Access forbidden | - | +| **500** | Server error | - | +| **400** | Invalid request | - | +| **404** | Not found | - | +| **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/UserCreate.md b/docs/UserCreate.md new file mode 100644 index 000000000..6d3b95e6d --- /dev/null +++ b/docs/UserCreate.md @@ -0,0 +1,17 @@ + +# PollinationSDK.Model.UserCreate + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | The display name for this user | +**PictureUrl** | **string** | URL to the picture associated with this user | +**Description** | **string** | A description of the user | [optional] [default to ""] +**Username** | **string** | The unique name of the user in small case without spaces | +**Type** | **string** | | [optional] [readonly] [default to "UserCreate"] + +[[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/UserPermission.md b/docs/UserPermission.md new file mode 100644 index 000000000..a99d341ee --- /dev/null +++ b/docs/UserPermission.md @@ -0,0 +1,16 @@ + +# PollinationSDK.Model.UserPermission + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Admin** | **bool** | The user has admin permission to this resource | [optional] [default to false] +**Write** | **bool** | The user has write permission on this resource | [optional] [default to false] +**Read** | **bool** | The user has read permission on this resource | [optional] [default to false] +**Type** | **string** | | [optional] [readonly] [default to "UserPermission"] + +[[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/UserPrivate.md b/docs/UserPrivate.md new file mode 100644 index 000000000..e34a7889f --- /dev/null +++ b/docs/UserPrivate.md @@ -0,0 +1,19 @@ + +# PollinationSDK.Model.UserPrivate + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **string** | The unique ID for that user | +**Email** | **string** | The email associated with that user | +**Username** | **string** | The lowercase account name for this user | +**Name** | **string** | The display name for this user | [optional] +**Description** | **string** | A short description of the user | [optional] +**Picture** | **string** | URL to the picture associated with this user | [optional] +**Type** | **string** | | [optional] [readonly] [default to "UserPrivate"] + +[[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/UserPublic.md b/docs/UserPublic.md new file mode 100644 index 000000000..36dce1a74 --- /dev/null +++ b/docs/UserPublic.md @@ -0,0 +1,17 @@ + +# PollinationSDK.Model.UserPublic + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Username** | **string** | The lowercase account name for this user | +**Name** | **string** | The display name for this user | [optional] +**Description** | **string** | A short description of the user | [optional] +**Picture** | **string** | URL to the picture associated with this user | [optional] +**Type** | **string** | | [optional] [readonly] [default to "UserPublic"] + +[[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/UserPublicList.md b/docs/UserPublicList.md new file mode 100644 index 000000000..6410058f8 --- /dev/null +++ b/docs/UserPublicList.md @@ -0,0 +1,19 @@ + +# PollinationSDK.Model.UserPublicList + +## 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<UserPublic>**](UserPublic.md) | | +**NextPage** | **int** | The next page, if this on is not the last | [optional] +**Type** | **string** | | [optional] [readonly] [default to "UserPublicList"] + +[[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/UserUpdate.md b/docs/UserUpdate.md new file mode 100644 index 000000000..da2cdd90b --- /dev/null +++ b/docs/UserUpdate.md @@ -0,0 +1,16 @@ + +# PollinationSDK.Model.UserUpdate + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | The display name for this user | +**PictureUrl** | **string** | URL to the picture associated with this user | +**Description** | **string** | A description of the user | [optional] [default to ""] +**Type** | **string** | | [optional] [readonly] [default to "UserUpdate"] + +[[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/UsersApi.md b/docs/UsersApi.md new file mode 100644 index 000000000..04232d257 --- /dev/null +++ b/docs/UsersApi.md @@ -0,0 +1,241 @@ +# PollinationSDK.Api.UsersApi + +All URIs are relative to *http://localhost* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**CheckUsername**](UsersApi.md#checkusername) | **GET** /users/check_username/{username} | Check if a username is already taken +[**GetOneUser**](UsersApi.md#getoneuser) | **GET** /users/{name} | Get a specific user profile +[**ListUsers**](UsersApi.md#listusers) | **GET** /users | List Users + + + +## CheckUsername + +> AnyType CheckUsername (string username) + +Check if a username is already taken + +Check if a username is already taken by a user or an org + +### Example + +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using PollinationSDK.Api; +using PollinationSDK.Client; +using PollinationSDK.Model; + +namespace Example +{ + public class CheckUsernameExample + { + public static void Main() + { + Configuration.Default.BasePath = "http://localhost"; + var apiInstance = new UsersApi(Configuration.Default); + var username = username_example; // string | + + try + { + // Check if a username is already taken + AnyType result = apiInstance.CheckUsername(username); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling UsersApi.CheckUsername: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **username** | **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** | Username not taken | - | +| **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) + + +## GetOneUser + +> UserPublic GetOneUser (string name) + +Get a specific user profile + +Get a specific user profile by name + +### Example + +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using PollinationSDK.Api; +using PollinationSDK.Client; +using PollinationSDK.Model; + +namespace Example +{ + public class GetOneUserExample + { + public static void Main() + { + Configuration.Default.BasePath = "http://localhost"; + var apiInstance = new UsersApi(Configuration.Default); + var name = name_example; // string | + + try + { + // Get a specific user profile + UserPublic result = apiInstance.GetOneUser(name); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling UsersApi.GetOneUser: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **name** | **string**| | + +### Return type + +[**UserPublic**](UserPublic.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) + + +## ListUsers + +> UserPublicList ListUsers (string search = null, int? page = null, int? perPage = null) + +List Users + +### Example + +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using PollinationSDK.Api; +using PollinationSDK.Client; +using PollinationSDK.Model; + +namespace Example +{ + public class ListUsersExample + { + public static void Main() + { + Configuration.Default.BasePath = "http://localhost"; + var apiInstance = new UsersApi(Configuration.Default); + var search = search_example; // string | Search string to find users (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 Users + UserPublicList result = apiInstance.ListUsers(search, page, perPage); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling UsersApi.ListUsers: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **search** | **string**| Search string to find users | [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 + +[**UserPublicList**](UserPublicList.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Retrieved | - | +| **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/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/docs/ValueFileReference.md b/docs/ValueFileReference.md new file mode 100644 index 000000000..f9e9b2001 --- /dev/null +++ b/docs/ValueFileReference.md @@ -0,0 +1,14 @@ + +# PollinationSDK.Model.ValueFileReference + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Path** | **string** | A fixed value for this reference. | +**Type** | **string** | | [optional] [readonly] [default to "ValueFileReference"] + +[[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/ValueFolderReference.md b/docs/ValueFolderReference.md new file mode 100644 index 000000000..c0cf48f39 --- /dev/null +++ b/docs/ValueFolderReference.md @@ -0,0 +1,14 @@ + +# PollinationSDK.Model.ValueFolderReference + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Path** | **string** | A fixed value for this reference. | +**Type** | **string** | | [optional] [readonly] [default to "ValueFolderReference"] + +[[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/ValueListReference.md b/docs/ValueListReference.md new file mode 100644 index 000000000..098d9bfdc --- /dev/null +++ b/docs/ValueListReference.md @@ -0,0 +1,14 @@ + +# PollinationSDK.Model.ValueListReference + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Value** | [**List<AnyType>**](AnyType.md) | A fixed value for this reference. | +**Type** | **string** | | [optional] [readonly] [default to "ValueListReference"] + +[[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/ValueReference.md b/docs/ValueReference.md new file mode 100644 index 000000000..1ceeab434 --- /dev/null +++ b/docs/ValueReference.md @@ -0,0 +1,14 @@ + +# PollinationSDK.Model.ValueReference + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Value** | [**AnyType**](.md) | A fixed value for this reference. | +**Type** | **string** | | [optional] [readonly] [default to "ValueReference"] + +[[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/APITokensApi.cs b/src/PollinationSDK/Api/APITokensApi.cs new file mode 100644 index 000000000..91950404f --- /dev/null +++ b/src/PollinationSDK/Api/APITokensApi.cs @@ -0,0 +1,933 @@ +/* + * 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 IAPITokensApi : IApiAccessor + { + #region Synchronous Operations + /// + /// Create a new API token + /// + /// + /// Create a new API token + /// + /// Thrown when fails to make API call + /// + /// APITokenPrivate + APITokenPrivate CreateToken (APITokenCreate aPITokenCreate); + + /// + /// Create a new API token + /// + /// + /// Create a new API token + /// + /// Thrown when fails to make API call + /// + /// ApiResponse of APITokenPrivate + ApiResponse CreateTokenWithHttpInfo (APITokenCreate aPITokenCreate); + /// + /// Delete an API Token + /// + /// + /// Delete a token + /// + /// Thrown when fails to make API call + /// + /// object + object DeleteToken (string tokenId); + + /// + /// Delete an API Token + /// + /// + /// Delete a token + /// + /// Thrown when fails to make API call + /// + /// ApiResponse of object + ApiResponse DeleteTokenWithHttpInfo (string tokenId); + /// + /// List user API tokens + /// + /// + /// List API tokens for the authenticated user + /// + /// Thrown when fails to make API call + /// Page number starting from 1 (optional, default to 1) + /// Number of items per page (optional, default to 25) + /// APITokenList + APITokenList ListTokens (int? page = default, int? perPage = default); + + /// + /// List user API tokens + /// + /// + /// List API tokens for the authenticated user + /// + /// Thrown when fails to make API call + /// Page number starting from 1 (optional, default to 1) + /// Number of items per page (optional, default to 25) + /// ApiResponse of APITokenList + ApiResponse ListTokensWithHttpInfo (int? page = default, int? perPage = default); + /// + /// Regenerate an API token + /// + /// + /// Regenerate a token + /// + /// Thrown when fails to make API call + /// + /// APITokenPrivate + APITokenPrivate RegenerateToken (string tokenId); + + /// + /// Regenerate an API token + /// + /// + /// Regenerate a token + /// + /// Thrown when fails to make API call + /// + /// ApiResponse of APITokenPrivate + ApiResponse RegenerateTokenWithHttpInfo (string tokenId); + #endregion Synchronous Operations + #region Asynchronous Operations + /// + /// Create a new API token + /// + /// + /// Create a new API token + /// + /// Thrown when fails to make API call + /// + /// Cancellation Token to cancel request (optional) + /// Task of APITokenPrivate + System.Threading.Tasks.Task CreateTokenAsync (APITokenCreate aPITokenCreate, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// Create a new API token + /// + /// + /// Create a new API token + /// + /// Thrown when fails to make API call + /// + /// Cancellation Token to cancel request (optional) + /// Task of ApiResponse (APITokenPrivate) + System.Threading.Tasks.Task> CreateTokenWithHttpInfoAsync (APITokenCreate aPITokenCreate, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Delete an API Token + /// + /// + /// Delete a token + /// + /// Thrown when fails to make API call + /// + /// Cancellation Token to cancel request (optional) + /// Task of object + System.Threading.Tasks.Task DeleteTokenAsync (string tokenId, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// Delete an API Token + /// + /// + /// Delete a token + /// + /// Thrown when fails to make API call + /// + /// Cancellation Token to cancel request (optional) + /// Task of ApiResponse (object) + System.Threading.Tasks.Task> DeleteTokenWithHttpInfoAsync (string tokenId, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// List user API tokens + /// + /// + /// List API tokens for the authenticated user + /// + /// Thrown when fails to make API call + /// 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 APITokenList + System.Threading.Tasks.Task ListTokensAsync (int? page = default, int? perPage = default, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// List user API tokens + /// + /// + /// List API tokens for the authenticated user + /// + /// Thrown when fails to make API call + /// 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 (APITokenList) + System.Threading.Tasks.Task> ListTokensWithHttpInfoAsync (int? page = default, int? perPage = default, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Regenerate an API token + /// + /// + /// Regenerate a token + /// + /// Thrown when fails to make API call + /// + /// Cancellation Token to cancel request (optional) + /// Task of APITokenPrivate + System.Threading.Tasks.Task RegenerateTokenAsync (string tokenId, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// Regenerate an API token + /// + /// + /// Regenerate a token + /// + /// Thrown when fails to make API call + /// + /// Cancellation Token to cancel request (optional) + /// Task of ApiResponse (APITokenPrivate) + System.Threading.Tasks.Task> RegenerateTokenWithHttpInfoAsync (string tokenId, CancellationToken cancellationToken = default(CancellationToken)); + #endregion Asynchronous Operations + } + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public partial class APITokensApi : IAPITokensApi + { + private PollinationSDK.Client.ExceptionFactory _exceptionFactory = (name, response) => null; + + /// + /// Initializes a new instance of the class. + /// + /// + public APITokensApi(String basePath) + { + this.Configuration = new PollinationSDK.Client.Configuration { BasePath = basePath }; + + ExceptionFactory = PollinationSDK.Client.Configuration.DefaultExceptionFactory; + } + + /// + /// Initializes a new instance of the class + /// + /// + public APITokensApi() + { + 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 APITokensApi(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; } + } + + /// + /// Create a new API token Create a new API token + /// + /// Thrown when fails to make API call + /// + /// APITokenPrivate + public APITokenPrivate CreateToken (APITokenCreate aPITokenCreate) + { + ApiResponse localVarResponse = CreateTokenWithHttpInfo(aPITokenCreate); + return localVarResponse.Data; + } + + /// + /// Create a new API token Create a new API token + /// + /// Thrown when fails to make API call + /// + /// ApiResponse of APITokenPrivate + public ApiResponse CreateTokenWithHttpInfo (APITokenCreate aPITokenCreate) + { + // verify the required parameter 'aPITokenCreate' is set + if (aPITokenCreate == null) + throw new ApiException(400, "Missing required parameter 'aPITokenCreate' when calling APITokensApi->CreateToken"); + + var localVarPath = "/tokens"; + 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 (aPITokenCreate != null && aPITokenCreate.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(aPITokenCreate); // http body (model) parameter + } + else + { + localVarPostBody = aPITokenCreate; // 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("CreateToken", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (APITokenPrivate) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(APITokenPrivate))); + } + + /// + /// Create a new API token Create a new API token + /// + /// Thrown when fails to make API call + /// + /// Cancellation Token to cancel request (optional) + /// Task of APITokenPrivate + public async System.Threading.Tasks.Task CreateTokenAsync (APITokenCreate aPITokenCreate, CancellationToken cancellationToken = default(CancellationToken)) + { + ApiResponse localVarResponse = await CreateTokenWithHttpInfoAsync(aPITokenCreate, cancellationToken); + return localVarResponse.Data; + + } + + /// + /// Create a new API token Create a new API token + /// + /// Thrown when fails to make API call + /// + /// Cancellation Token to cancel request (optional) + /// Task of ApiResponse (APITokenPrivate) + public async System.Threading.Tasks.Task> CreateTokenWithHttpInfoAsync (APITokenCreate aPITokenCreate, CancellationToken cancellationToken = default(CancellationToken)) + { + // verify the required parameter 'aPITokenCreate' is set + if (aPITokenCreate == null) + throw new ApiException(400, "Missing required parameter 'aPITokenCreate' when calling APITokensApi->CreateToken"); + + var localVarPath = "/tokens"; + 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 (aPITokenCreate != null && aPITokenCreate.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(aPITokenCreate); // http body (model) parameter + } + else + { + localVarPostBody = aPITokenCreate; // 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("CreateToken", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (APITokenPrivate) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(APITokenPrivate))); + } + + /// + /// Delete an API Token Delete a token + /// + /// Thrown when fails to make API call + /// + /// object + public object DeleteToken (string tokenId) + { + ApiResponse localVarResponse = DeleteTokenWithHttpInfo(tokenId); + return localVarResponse.Data; + } + + /// + /// Delete an API Token Delete a token + /// + /// Thrown when fails to make API call + /// + /// ApiResponse of object + public ApiResponse DeleteTokenWithHttpInfo (string tokenId) + { + // verify the required parameter 'tokenId' is set + if (tokenId == null) + throw new ApiException(400, "Missing required parameter 'tokenId' when calling APITokensApi->DeleteToken"); + + var localVarPath = "/tokens/{token_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 (tokenId != null) localVarPathParams.Add("token_id", this.Configuration.ApiClient.ParameterToString(tokenId)); // 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("DeleteToken", 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 an API Token Delete a token + /// + /// Thrown when fails to make API call + /// + /// Cancellation Token to cancel request (optional) + /// Task of object + public async System.Threading.Tasks.Task DeleteTokenAsync (string tokenId, CancellationToken cancellationToken = default(CancellationToken)) + { + ApiResponse localVarResponse = await DeleteTokenWithHttpInfoAsync(tokenId, cancellationToken); + return localVarResponse.Data; + + } + + /// + /// Delete an API Token Delete a token + /// + /// Thrown when fails to make API call + /// + /// Cancellation Token to cancel request (optional) + /// Task of ApiResponse (object) + public async System.Threading.Tasks.Task> DeleteTokenWithHttpInfoAsync (string tokenId, CancellationToken cancellationToken = default(CancellationToken)) + { + // verify the required parameter 'tokenId' is set + if (tokenId == null) + throw new ApiException(400, "Missing required parameter 'tokenId' when calling APITokensApi->DeleteToken"); + + var localVarPath = "/tokens/{token_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 (tokenId != null) localVarPathParams.Add("token_id", this.Configuration.ApiClient.ParameterToString(tokenId)); // 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("DeleteToken", 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))); + } + + /// + /// List user API tokens List API tokens for the authenticated user + /// + /// Thrown when fails to make API call + /// Page number starting from 1 (optional, default to 1) + /// Number of items per page (optional, default to 25) + /// APITokenList + public APITokenList ListTokens (int? page = default, int? perPage = default) + { + ApiResponse localVarResponse = ListTokensWithHttpInfo(page, perPage); + return localVarResponse.Data; + } + + /// + /// List user API tokens List API tokens for the authenticated user + /// + /// Thrown when fails to make API call + /// Page number starting from 1 (optional, default to 1) + /// Number of items per page (optional, default to 25) + /// ApiResponse of APITokenList + public ApiResponse ListTokensWithHttpInfo (int? page = default, int? perPage = default) + { + + var localVarPath = "/tokens"; + 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 (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("ListTokens", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (APITokenList) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(APITokenList))); + } + + /// + /// List user API tokens List API tokens for the authenticated user + /// + /// Thrown when fails to make API call + /// 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 APITokenList + public async System.Threading.Tasks.Task ListTokensAsync (int? page = default, int? perPage = default, CancellationToken cancellationToken = default(CancellationToken)) + { + ApiResponse localVarResponse = await ListTokensWithHttpInfoAsync(page, perPage, cancellationToken); + return localVarResponse.Data; + + } + + /// + /// List user API tokens List API tokens for the authenticated user + /// + /// Thrown when fails to make API call + /// 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 (APITokenList) + public async System.Threading.Tasks.Task> ListTokensWithHttpInfoAsync (int? page = default, int? perPage = default, CancellationToken cancellationToken = default(CancellationToken)) + { + + var localVarPath = "/tokens"; + 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 (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("ListTokens", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (APITokenList) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(APITokenList))); + } + + /// + /// Regenerate an API token Regenerate a token + /// + /// Thrown when fails to make API call + /// + /// APITokenPrivate + public APITokenPrivate RegenerateToken (string tokenId) + { + ApiResponse localVarResponse = RegenerateTokenWithHttpInfo(tokenId); + return localVarResponse.Data; + } + + /// + /// Regenerate an API token Regenerate a token + /// + /// Thrown when fails to make API call + /// + /// ApiResponse of APITokenPrivate + public ApiResponse RegenerateTokenWithHttpInfo (string tokenId) + { + // verify the required parameter 'tokenId' is set + if (tokenId == null) + throw new ApiException(400, "Missing required parameter 'tokenId' when calling APITokensApi->RegenerateToken"); + + var localVarPath = "/tokens/{token_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 (tokenId != null) localVarPathParams.Add("token_id", this.Configuration.ApiClient.ParameterToString(tokenId)); // 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.PUT, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("RegenerateToken", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (APITokenPrivate) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(APITokenPrivate))); + } + + /// + /// Regenerate an API token Regenerate a token + /// + /// Thrown when fails to make API call + /// + /// Cancellation Token to cancel request (optional) + /// Task of APITokenPrivate + public async System.Threading.Tasks.Task RegenerateTokenAsync (string tokenId, CancellationToken cancellationToken = default(CancellationToken)) + { + ApiResponse localVarResponse = await RegenerateTokenWithHttpInfoAsync(tokenId, cancellationToken); + return localVarResponse.Data; + + } + + /// + /// Regenerate an API token Regenerate a token + /// + /// Thrown when fails to make API call + /// + /// Cancellation Token to cancel request (optional) + /// Task of ApiResponse (APITokenPrivate) + public async System.Threading.Tasks.Task> RegenerateTokenWithHttpInfoAsync (string tokenId, CancellationToken cancellationToken = default(CancellationToken)) + { + // verify the required parameter 'tokenId' is set + if (tokenId == null) + throw new ApiException(400, "Missing required parameter 'tokenId' when calling APITokensApi->RegenerateToken"); + + var localVarPath = "/tokens/{token_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 (tokenId != null) localVarPathParams.Add("token_id", this.Configuration.ApiClient.ParameterToString(tokenId)); // 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.PUT, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType, cancellationToken); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("RegenerateToken", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (APITokenPrivate) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(APITokenPrivate))); + } + + } +} diff --git a/src/PollinationSDK/Api/AccountsApi.cs b/src/PollinationSDK/Api/AccountsApi.cs new file mode 100644 index 000000000..2cc547d1f --- /dev/null +++ b/src/PollinationSDK/Api/AccountsApi.cs @@ -0,0 +1,953 @@ +/* + * 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 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 + /// + /// + /// Retrieve an account by name + /// + /// Thrown when fails to make API call + /// + /// AccountPublic + AccountPublic GetAccount (string name); + + /// + /// Get an account by name + /// + /// + /// Retrieve an account by name + /// + /// Thrown when fails to make API call + /// + /// ApiResponse of AccountPublic + ApiResponse GetAccountWithHttpInfo (string name); + /// + /// List Accounts on the Pollination platform + /// + /// + /// List accounts + /// + /// Thrown when fails to make API call + /// Search string to find accounts (optional) + /// Whether the account is for a user or an org (optional) + /// The role the user has in relation to this account (optional) + /// Page number starting from 1 (optional, default to 1) + /// Number of items per page (optional, default to 25) + /// PublicAccountList + PublicAccountList ListAccounts (string search = default, string type = default, RoleEnum? role = default, int? page = default, int? perPage = default); + + /// + /// List Accounts on the Pollination platform + /// + /// + /// List accounts + /// + /// Thrown when fails to make API call + /// Search string to find accounts (optional) + /// Whether the account is for a user or an org (optional) + /// The role the user has in relation to this account (optional) + /// Page number starting from 1 (optional, default to 1) + /// 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 + /// + /// + /// Retrieve an account by name + /// + /// Thrown when fails to make API call + /// + /// Cancellation Token to cancel request (optional) + /// Task of AccountPublic + System.Threading.Tasks.Task GetAccountAsync (string name, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// Get an account by name + /// + /// + /// Retrieve an account by name + /// + /// Thrown when fails to make API call + /// + /// Cancellation Token to cancel request (optional) + /// Task of ApiResponse (AccountPublic) + System.Threading.Tasks.Task> GetAccountWithHttpInfoAsync (string name, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// List Accounts on the Pollination platform + /// + /// + /// List accounts + /// + /// Thrown when fails to make API call + /// Search string to find accounts (optional) + /// Whether the account is for a user or an org (optional) + /// The role the user has in relation to this account (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 PublicAccountList + System.Threading.Tasks.Task ListAccountsAsync (string search = default, string type = default, RoleEnum? role = default, int? page = default, int? perPage = default, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// List Accounts on the Pollination platform + /// + /// + /// List accounts + /// + /// Thrown when fails to make API call + /// Search string to find accounts (optional) + /// Whether the account is for a user or an org (optional) + /// The role the user has in relation to this account (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 (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 + } + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public partial class AccountsApi : IAccountsApi + { + private PollinationSDK.Client.ExceptionFactory _exceptionFactory = (name, response) => null; + + /// + /// Initializes a new instance of the class. + /// + /// + public AccountsApi(String basePath) + { + this.Configuration = new PollinationSDK.Client.Configuration { BasePath = basePath }; + + ExceptionFactory = PollinationSDK.Client.Configuration.DefaultExceptionFactory; + } + + /// + /// Initializes a new instance of the class + /// + /// + public AccountsApi() + { + 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 AccountsApi(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; } + } + + /// + /// 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 + /// + /// Thrown when fails to make API call + /// + /// AccountPublic + public AccountPublic GetAccount (string name) + { + ApiResponse localVarResponse = GetAccountWithHttpInfo(name); + return localVarResponse.Data; + } + + /// + /// Get an account by name Retrieve an account by name + /// + /// Thrown when fails to make API call + /// + /// ApiResponse of AccountPublic + public ApiResponse GetAccountWithHttpInfo (string name) + { + // verify the required parameter 'name' is set + if (name == null) + throw new ApiException(400, "Missing required parameter 'name' when calling AccountsApi->GetAccount"); + + var localVarPath = "/accounts/{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("GetAccount", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (AccountPublic) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(AccountPublic))); + } + + /// + /// Get an account by name Retrieve an account by name + /// + /// Thrown when fails to make API call + /// + /// Cancellation Token to cancel request (optional) + /// Task of AccountPublic + public async System.Threading.Tasks.Task GetAccountAsync (string name, CancellationToken cancellationToken = default(CancellationToken)) + { + ApiResponse localVarResponse = await GetAccountWithHttpInfoAsync(name, cancellationToken); + return localVarResponse.Data; + + } + + /// + /// Get an account by name Retrieve an account by name + /// + /// Thrown when fails to make API call + /// + /// Cancellation Token to cancel request (optional) + /// Task of ApiResponse (AccountPublic) + public async System.Threading.Tasks.Task> GetAccountWithHttpInfoAsync (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->GetAccount"); + + var localVarPath = "/accounts/{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("GetAccount", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (AccountPublic) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(AccountPublic))); + } + + /// + /// List Accounts on the Pollination platform List accounts + /// + /// Thrown when fails to make API call + /// Search string to find accounts (optional) + /// Whether the account is for a user or an org (optional) + /// The role the user has in relation to this account (optional) + /// Page number starting from 1 (optional, default to 1) + /// Number of items per page (optional, default to 25) + /// PublicAccountList + public PublicAccountList ListAccounts (string search = default, string type = default, RoleEnum? role = default, int? page = default, int? perPage = default) + { + ApiResponse localVarResponse = ListAccountsWithHttpInfo(search, type, role, page, perPage); + return localVarResponse.Data; + } + + /// + /// List Accounts on the Pollination platform List accounts + /// + /// Thrown when fails to make API call + /// Search string to find accounts (optional) + /// Whether the account is for a user or an org (optional) + /// The role the user has in relation to this account (optional) + /// Page number starting from 1 (optional, default to 1) + /// Number of items per page (optional, default to 25) + /// ApiResponse of PublicAccountList + public ApiResponse ListAccountsWithHttpInfo (string search = default, string type = default, RoleEnum? role = default, int? page = default, int? perPage = default) + { + + var localVarPath = "/accounts"; + 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 (search != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "search", search)); // query parameter + if (type != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "type", type)); // query parameter + if (role != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "role", role)); // 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("ListAccounts", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (PublicAccountList) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(PublicAccountList))); + } + + /// + /// List Accounts on the Pollination platform List accounts + /// + /// Thrown when fails to make API call + /// Search string to find accounts (optional) + /// Whether the account is for a user or an org (optional) + /// The role the user has in relation to this account (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 PublicAccountList + public async System.Threading.Tasks.Task ListAccountsAsync (string search = default, string type = default, RoleEnum? role = default, int? page = default, int? perPage = default, CancellationToken cancellationToken = default(CancellationToken)) + { + ApiResponse localVarResponse = await ListAccountsWithHttpInfoAsync(search, type, role, page, perPage, cancellationToken); + return localVarResponse.Data; + + } + + /// + /// List Accounts on the Pollination platform List accounts + /// + /// Thrown when fails to make API call + /// Search string to find accounts (optional) + /// Whether the account is for a user or an org (optional) + /// The role the user has in relation to this account (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 (PublicAccountList) + public async System.Threading.Tasks.Task> ListAccountsWithHttpInfoAsync (string search = default, string type = default, RoleEnum? role = default, int? page = default, int? perPage = default, CancellationToken cancellationToken = default(CancellationToken)) + { + + var localVarPath = "/accounts"; + 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 (search != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "search", search)); // query parameter + if (type != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "type", type)); // query parameter + if (role != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "role", role)); // 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("ListAccounts", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (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/ArtifactsApi.cs b/src/PollinationSDK/Api/ArtifactsApi.cs new file mode 100644 index 000000000..3b09fd36b --- /dev/null +++ b/src/PollinationSDK/Api/ArtifactsApi.cs @@ -0,0 +1,1077 @@ +/* + * 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 IArtifactsApi : IApiAccessor + { + #region Synchronous Operations + /// + /// Get an Artifact upload link. + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + /// + /// S3UploadRequest + S3UploadRequest CreateArtifact (string owner, string name, KeyRequest keyRequest); + + /// + /// Get an Artifact upload link. + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + /// + /// ApiResponse of S3UploadRequest + ApiResponse CreateArtifactWithHttpInfo (string owner, string name, KeyRequest keyRequest); + /// + /// Delete one or many artifacts by key/prefix + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + /// The path to an file within a project folder (optional) + /// Page number starting from 1 (optional, default to 1) + /// Number of items per page (optional, default to 25) + /// + void DeleteArtifact (string owner, string name, List path = default, int? page = default, int? perPage = default); + + /// + /// Delete one or many artifacts by key/prefix + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + /// The path to an file within a project folder (optional) + /// Page number starting from 1 (optional, default to 1) + /// Number of items per page (optional, default to 25) + /// ApiResponse of Object(void) + ApiResponse DeleteArtifactWithHttpInfo (string owner, string name, List path = default, int? page = default, int? perPage = default); + /// + /// Download an artifact from the project folder + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + /// The path to an file within a project folder (optional) + /// object + object DownloadArtifact (string owner, string name, string path = default); + + /// + /// Download an artifact from the project folder + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + /// The path to an file within a project folder (optional) + /// ApiResponse of object + ApiResponse DownloadArtifactWithHttpInfo (string owner, string name, string path = default); + /// + /// List artifacts in a project folder + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + /// The path to an file within a project folder (optional) + /// Page number starting from 1 (optional, default to 1) + /// Number of items per page (optional, default to 25) + /// List<FileMeta> + List ListArtifacts (string owner, string name, List path = default, int? page = default, int? perPage = default); + + /// + /// List artifacts in a project folder + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + /// The path to an file within a project folder (optional) + /// Page number starting from 1 (optional, default to 1) + /// Number of items per page (optional, default to 25) + /// ApiResponse of List<FileMeta> + ApiResponse> ListArtifactsWithHttpInfo (string owner, string name, List path = default, int? page = default, int? perPage = default); + #endregion Synchronous Operations + #region Asynchronous Operations + /// + /// Get an Artifact upload link. + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + /// + /// Cancellation Token to cancel request (optional) + /// Task of S3UploadRequest + System.Threading.Tasks.Task CreateArtifactAsync (string owner, string name, KeyRequest keyRequest, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// Get an Artifact upload link. + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + /// + /// Cancellation Token to cancel request (optional) + /// Task of ApiResponse (S3UploadRequest) + System.Threading.Tasks.Task> CreateArtifactWithHttpInfoAsync (string owner, string name, KeyRequest keyRequest, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Delete one or many artifacts by key/prefix + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + /// The path to an file within a project folder (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 void + System.Threading.Tasks.Task DeleteArtifactAsync (string owner, string name, List path = default, int? page = default, int? perPage = default, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// Delete one or many artifacts by key/prefix + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + /// The path to an file within a project folder (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 + System.Threading.Tasks.Task> DeleteArtifactWithHttpInfoAsync (string owner, string name, List path = default, int? page = default, int? perPage = default, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Download an artifact from the project folder + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + /// The path to an file within a project folder (optional) + /// Cancellation Token to cancel request (optional) + /// Task of object + System.Threading.Tasks.Task DownloadArtifactAsync (string owner, string name, string path = default, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// Download an artifact from the project folder + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + /// The path to an file within a project folder (optional) + /// Cancellation Token to cancel request (optional) + /// Task of ApiResponse (object) + System.Threading.Tasks.Task> DownloadArtifactWithHttpInfoAsync (string owner, string name, string path = default, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// List artifacts in a project folder + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + /// The path to an file within a project folder (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 List<FileMeta> + System.Threading.Tasks.Task> ListArtifactsAsync (string owner, string name, List path = default, int? page = default, int? perPage = default, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// List artifacts in a project folder + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + /// The path to an file within a project folder (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 (List<FileMeta>) + System.Threading.Tasks.Task>> ListArtifactsWithHttpInfoAsync (string owner, string name, List path = default, int? page = default, int? perPage = default, CancellationToken cancellationToken = default(CancellationToken)); + #endregion Asynchronous Operations + } + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public partial class ArtifactsApi : IArtifactsApi + { + private PollinationSDK.Client.ExceptionFactory _exceptionFactory = (name, response) => null; + + /// + /// Initializes a new instance of the class. + /// + /// + public ArtifactsApi(String basePath) + { + this.Configuration = new PollinationSDK.Client.Configuration { BasePath = basePath }; + + ExceptionFactory = PollinationSDK.Client.Configuration.DefaultExceptionFactory; + } + + /// + /// Initializes a new instance of the class + /// + /// + public ArtifactsApi() + { + 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 ArtifactsApi(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 an Artifact upload link. + /// + /// Thrown when fails to make API call + /// + /// + /// + /// S3UploadRequest + public S3UploadRequest CreateArtifact (string owner, string name, KeyRequest keyRequest) + { + ApiResponse localVarResponse = CreateArtifactWithHttpInfo(owner, name, keyRequest); + return localVarResponse.Data; + } + + /// + /// Get an Artifact upload link. + /// + /// Thrown when fails to make API call + /// + /// + /// + /// ApiResponse of S3UploadRequest + public ApiResponse CreateArtifactWithHttpInfo (string owner, string name, KeyRequest keyRequest) + { + // verify the required parameter 'owner' is set + if (owner == null) + throw new ApiException(400, "Missing required parameter 'owner' when calling ArtifactsApi->CreateArtifact"); + // verify the required parameter 'name' is set + if (name == null) + throw new ApiException(400, "Missing required parameter 'name' when calling ArtifactsApi->CreateArtifact"); + // verify the required parameter 'keyRequest' is set + if (keyRequest == null) + throw new ApiException(400, "Missing required parameter 'keyRequest' when calling ArtifactsApi->CreateArtifact"); + + var localVarPath = "/projects/{owner}/{name}/artifacts"; + 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 (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 (keyRequest != null && keyRequest.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(keyRequest); // http body (model) parameter + } + else + { + localVarPostBody = keyRequest; // 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("CreateArtifact", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (S3UploadRequest) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(S3UploadRequest))); + } + + /// + /// Get an Artifact upload link. + /// + /// Thrown when fails to make API call + /// + /// + /// + /// Cancellation Token to cancel request (optional) + /// Task of S3UploadRequest + public async System.Threading.Tasks.Task CreateArtifactAsync (string owner, string name, KeyRequest keyRequest, CancellationToken cancellationToken = default(CancellationToken)) + { + ApiResponse localVarResponse = await CreateArtifactWithHttpInfoAsync(owner, name, keyRequest, cancellationToken); + return localVarResponse.Data; + + } + + /// + /// Get an Artifact upload link. + /// + /// Thrown when fails to make API call + /// + /// + /// + /// Cancellation Token to cancel request (optional) + /// Task of ApiResponse (S3UploadRequest) + public async System.Threading.Tasks.Task> CreateArtifactWithHttpInfoAsync (string owner, string name, KeyRequest keyRequest, CancellationToken cancellationToken = default(CancellationToken)) + { + // verify the required parameter 'owner' is set + if (owner == null) + throw new ApiException(400, "Missing required parameter 'owner' when calling ArtifactsApi->CreateArtifact"); + // verify the required parameter 'name' is set + if (name == null) + throw new ApiException(400, "Missing required parameter 'name' when calling ArtifactsApi->CreateArtifact"); + // verify the required parameter 'keyRequest' is set + if (keyRequest == null) + throw new ApiException(400, "Missing required parameter 'keyRequest' when calling ArtifactsApi->CreateArtifact"); + + var localVarPath = "/projects/{owner}/{name}/artifacts"; + 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 (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 (keyRequest != null && keyRequest.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(keyRequest); // http body (model) parameter + } + else + { + localVarPostBody = keyRequest; // 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("CreateArtifact", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (S3UploadRequest) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(S3UploadRequest))); + } + + /// + /// Delete one or many artifacts by key/prefix + /// + /// Thrown when fails to make API call + /// + /// + /// The path to an file within a project folder (optional) + /// Page number starting from 1 (optional, default to 1) + /// Number of items per page (optional, default to 25) + /// + public void DeleteArtifact (string owner, string name, List path = default, int? page = default, int? perPage = default) + { + DeleteArtifactWithHttpInfo(owner, name, path, page, perPage); + } + + /// + /// Delete one or many artifacts by key/prefix + /// + /// Thrown when fails to make API call + /// + /// + /// The path to an file within a project folder (optional) + /// Page number starting from 1 (optional, default to 1) + /// Number of items per page (optional, default to 25) + /// ApiResponse of Object(void) + public ApiResponse DeleteArtifactWithHttpInfo (string owner, string name, List path = default, int? page = default, int? perPage = default) + { + // verify the required parameter 'owner' is set + if (owner == null) + throw new ApiException(400, "Missing required parameter 'owner' when calling ArtifactsApi->DeleteArtifact"); + // verify the required parameter 'name' is set + if (name == null) + throw new ApiException(400, "Missing required parameter 'name' when calling ArtifactsApi->DeleteArtifact"); + + var localVarPath = "/projects/{owner}/{name}/artifacts"; + 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 (path != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("multi", "path", path)); // 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.DELETE, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("DeleteArtifact", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + null); + } + + /// + /// Delete one or many artifacts by key/prefix + /// + /// Thrown when fails to make API call + /// + /// + /// The path to an file within a project folder (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 void + public async System.Threading.Tasks.Task DeleteArtifactAsync (string owner, string name, List path = default, int? page = default, int? perPage = default, CancellationToken cancellationToken = default(CancellationToken)) + { + await DeleteArtifactWithHttpInfoAsync(owner, name, path, page, perPage, cancellationToken); + + } + + /// + /// Delete one or many artifacts by key/prefix + /// + /// Thrown when fails to make API call + /// + /// + /// The path to an file within a project folder (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 + public async System.Threading.Tasks.Task> DeleteArtifactWithHttpInfoAsync (string owner, string name, List path = default, int? page = default, int? perPage = default, CancellationToken cancellationToken = default(CancellationToken)) + { + // verify the required parameter 'owner' is set + if (owner == null) + throw new ApiException(400, "Missing required parameter 'owner' when calling ArtifactsApi->DeleteArtifact"); + // verify the required parameter 'name' is set + if (name == null) + throw new ApiException(400, "Missing required parameter 'name' when calling ArtifactsApi->DeleteArtifact"); + + var localVarPath = "/projects/{owner}/{name}/artifacts"; + 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 (path != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("multi", "path", path)); // 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.DELETE, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType, cancellationToken); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("DeleteArtifact", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + null); + } + + /// + /// Download an artifact from the project folder + /// + /// Thrown when fails to make API call + /// + /// + /// The path to an file within a project folder (optional) + /// object + public object DownloadArtifact (string owner, string name, string path = default) + { + ApiResponse localVarResponse = DownloadArtifactWithHttpInfo(owner, name, path); + return localVarResponse.Data; + } + + /// + /// Download an artifact from the project folder + /// + /// Thrown when fails to make API call + /// + /// + /// The path to an file within a project folder (optional) + /// ApiResponse of object + public ApiResponse DownloadArtifactWithHttpInfo (string owner, string name, string path = default) + { + // verify the required parameter 'owner' is set + if (owner == null) + throw new ApiException(400, "Missing required parameter 'owner' when calling ArtifactsApi->DownloadArtifact"); + // verify the required parameter 'name' is set + if (name == null) + throw new ApiException(400, "Missing required parameter 'name' when calling ArtifactsApi->DownloadArtifact"); + + var localVarPath = "/projects/{owner}/{name}/artifacts/download"; + 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 (path != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "path", path)); // 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("DownloadArtifact", 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 project folder + /// + /// Thrown when fails to make API call + /// + /// + /// The path to an file within a project folder (optional) + /// Cancellation Token to cancel request (optional) + /// Task of object + public async System.Threading.Tasks.Task DownloadArtifactAsync (string owner, string name, string path = default, CancellationToken cancellationToken = default(CancellationToken)) + { + ApiResponse localVarResponse = await DownloadArtifactWithHttpInfoAsync(owner, name, path, cancellationToken); + return localVarResponse.Data; + + } + + /// + /// Download an artifact from the project folder + /// + /// Thrown when fails to make API call + /// + /// + /// The path to an file within a project folder (optional) + /// Cancellation Token to cancel request (optional) + /// Task of ApiResponse (object) + public async System.Threading.Tasks.Task> DownloadArtifactWithHttpInfoAsync (string owner, string name, string path = default, CancellationToken cancellationToken = default(CancellationToken)) + { + // verify the required parameter 'owner' is set + if (owner == null) + throw new ApiException(400, "Missing required parameter 'owner' when calling ArtifactsApi->DownloadArtifact"); + // verify the required parameter 'name' is set + if (name == null) + throw new ApiException(400, "Missing required parameter 'name' when calling ArtifactsApi->DownloadArtifact"); + + var localVarPath = "/projects/{owner}/{name}/artifacts/download"; + 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 (path != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "path", path)); // 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("DownloadArtifact", 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))); + } + + /// + /// List artifacts in a project folder + /// + /// Thrown when fails to make API call + /// + /// + /// The path to an file within a project folder (optional) + /// Page number starting from 1 (optional, default to 1) + /// Number of items per page (optional, default to 25) + /// List<FileMeta> + public List ListArtifacts (string owner, string name, List path = default, int? page = default, int? perPage = default) + { + ApiResponse> localVarResponse = ListArtifactsWithHttpInfo(owner, name, path, page, perPage); + return localVarResponse.Data; + } + + /// + /// List artifacts in a project folder + /// + /// Thrown when fails to make API call + /// + /// + /// The path to an file within a project folder (optional) + /// Page number starting from 1 (optional, default to 1) + /// Number of items per page (optional, default to 25) + /// ApiResponse of List<FileMeta> + public ApiResponse> ListArtifactsWithHttpInfo (string owner, string name, List path = default, int? page = default, int? perPage = default) + { + // verify the required parameter 'owner' is set + if (owner == null) + throw new ApiException(400, "Missing required parameter 'owner' when calling ArtifactsApi->ListArtifacts"); + // verify the required parameter 'name' is set + if (name == null) + throw new ApiException(400, "Missing required parameter 'name' when calling ArtifactsApi->ListArtifacts"); + + var localVarPath = "/projects/{owner}/{name}/artifacts"; + 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 (path != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("multi", "path", path)); // 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("ListArtifacts", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse>(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (List) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(List))); + } + + /// + /// List artifacts in a project folder + /// + /// Thrown when fails to make API call + /// + /// + /// The path to an file within a project folder (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 List<FileMeta> + public async System.Threading.Tasks.Task> ListArtifactsAsync (string owner, string name, List path = default, int? page = default, int? perPage = default, CancellationToken cancellationToken = default(CancellationToken)) + { + ApiResponse> localVarResponse = await ListArtifactsWithHttpInfoAsync(owner, name, path, page, perPage, cancellationToken); + return localVarResponse.Data; + + } + + /// + /// List artifacts in a project folder + /// + /// Thrown when fails to make API call + /// + /// + /// The path to an file within a project folder (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 (List<FileMeta>) + public async System.Threading.Tasks.Task>> ListArtifactsWithHttpInfoAsync (string owner, string name, List path = default, int? page = default, int? perPage = default, CancellationToken cancellationToken = default(CancellationToken)) + { + // verify the required parameter 'owner' is set + if (owner == null) + throw new ApiException(400, "Missing required parameter 'owner' when calling ArtifactsApi->ListArtifacts"); + // verify the required parameter 'name' is set + if (name == null) + throw new ApiException(400, "Missing required parameter 'name' when calling ArtifactsApi->ListArtifacts"); + + var localVarPath = "/projects/{owner}/{name}/artifacts"; + 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 (path != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("multi", "path", path)); // 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("ListArtifacts", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse>(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (List) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(List))); + } + + } +} diff --git a/src/PollinationSDK/Api/JobsApi.cs b/src/PollinationSDK/Api/JobsApi.cs new file mode 100644 index 000000000..816c6a286 --- /dev/null +++ b/src/PollinationSDK/Api/JobsApi.cs @@ -0,0 +1,1840 @@ +/* + * 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 IJobsApi : IApiAccessor + { + #region Synchronous Operations + /// + /// Cancel a Job + /// + /// + /// Retrieve a job. + /// + /// Thrown when fails to make API call + /// + /// + /// + /// object + object CancelJob (string owner, string name, string jobId); + + /// + /// Cancel a Job + /// + /// + /// Retrieve a job. + /// + /// Thrown when fails to make API call + /// + /// + /// + /// ApiResponse of object + ApiResponse CancelJobWithHttpInfo (string owner, string name, string jobId); + /// + /// Schedule a job + /// + /// + /// Create a new job. + /// + /// Thrown when fails to make API call + /// + /// + /// + /// (optional) + /// (optional) + /// CreatedContent + CreatedContent CreateJob (string owner, string name, Job job, string authorization = default, string xPollinationToken = default); + + /// + /// Schedule a job + /// + /// + /// Create a new job. + /// + /// Thrown when fails to make API call + /// + /// + /// + /// (optional) + /// (optional) + /// 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 + /// + /// + /// Get a download link for an artifact in a job folder + /// + /// Thrown when fails to make API call + /// + /// + /// + /// The path to an file within a project folder (optional) + /// object + object DownloadJobArtifact (string owner, string name, string jobId, string path = default); + + /// + /// Download an artifact from the job folder + /// + /// + /// Get a download link for an artifact in a job folder + /// + /// Thrown when fails to make API call + /// + /// + /// + /// The path to an file within a project folder (optional) + /// ApiResponse of object + ApiResponse DownloadJobArtifactWithHttpInfo (string owner, string name, string jobId, string path = default); + /// + /// Get a Job + /// + /// + /// Retrieve a job. + /// + /// Thrown when fails to make API call + /// + /// + /// + /// CloudJob + CloudJob GetJob (string owner, string name, string jobId); + + /// + /// Get a Job + /// + /// + /// Retrieve a job. + /// + /// Thrown when fails to make API call + /// + /// + /// + /// ApiResponse of CloudJob + ApiResponse GetJobWithHttpInfo (string owner, string name, string jobId); + /// + /// List Jobs + /// + /// + /// Retrieve a list of jobs. + /// + /// Thrown when fails to make API call + /// + /// + /// (optional) + /// (optional) + /// Page number starting from 1 (optional, default to 1) + /// Number of items per page (optional, default to 25) + /// CloudJobList + CloudJobList ListJobs (string owner, string name, List ids = default, JobStatusEnum? status = default, int? page = default, int? perPage = default); + + /// + /// List Jobs + /// + /// + /// Retrieve a list of jobs. + /// + /// Thrown when fails to make API call + /// + /// + /// (optional) + /// (optional) + /// Page number starting from 1 (optional, default to 1) + /// Number of items per page (optional, default to 25) + /// ApiResponse of CloudJobList + ApiResponse ListJobsWithHttpInfo (string owner, string name, List ids = default, JobStatusEnum? status = default, int? page = default, int? perPage = default); + /// + /// List files/folders in a job folder + /// + /// + /// Retrieve a list of artifacts in a job folder + /// + /// Thrown when fails to make API call + /// + /// + /// + /// The path to an file within a project folder (optional) + /// Page number starting from 1 (optional, default to 1) + /// Number of items per page (optional, default to 25) + /// List<FileMeta> + List SearchJobFolder (string owner, string name, string jobId, List path = default, int? page = default, int? perPage = default); + + /// + /// List files/folders in a job folder + /// + /// + /// Retrieve a list of artifacts in a job folder + /// + /// Thrown when fails to make API call + /// + /// + /// + /// The path to an file within a project folder (optional) + /// Page number starting from 1 (optional, default to 1) + /// Number of items per page (optional, default to 25) + /// ApiResponse of List<FileMeta> + ApiResponse> SearchJobFolderWithHttpInfo (string owner, string name, string jobId, List path = default, int? page = default, int? perPage = default); + #endregion Synchronous Operations + #region Asynchronous Operations + /// + /// Cancel a Job + /// + /// + /// Retrieve a job. + /// + /// Thrown when fails to make API call + /// + /// + /// + /// Cancellation Token to cancel request (optional) + /// Task of object + System.Threading.Tasks.Task CancelJobAsync (string owner, string name, string jobId, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// Cancel a Job + /// + /// + /// Retrieve a job. + /// + /// Thrown when fails to make API call + /// + /// + /// + /// Cancellation Token to cancel request (optional) + /// Task of ApiResponse (object) + System.Threading.Tasks.Task> CancelJobWithHttpInfoAsync (string owner, string name, string jobId, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Schedule a job + /// + /// + /// Create a new job. + /// + /// Thrown when fails to make API call + /// + /// + /// + /// (optional) + /// (optional) + /// Cancellation Token to cancel request (optional) + /// Task of CreatedContent + System.Threading.Tasks.Task CreateJobAsync (string owner, string name, Job job, string authorization = default, string xPollinationToken = default, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// Schedule a job + /// + /// + /// Create a new job. + /// + /// Thrown when fails to make API call + /// + /// + /// + /// (optional) + /// (optional) + /// Cancellation Token to cancel request (optional) + /// 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 + /// + /// + /// Get a download link for an artifact in a job folder + /// + /// Thrown when fails to make API call + /// + /// + /// + /// The path to an file within a project folder (optional) + /// Cancellation Token to cancel request (optional) + /// Task of object + System.Threading.Tasks.Task DownloadJobArtifactAsync (string owner, string name, string jobId, string path = default, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// Download an artifact from the job folder + /// + /// + /// Get a download link for an artifact in a job folder + /// + /// Thrown when fails to make API call + /// + /// + /// + /// The path to an file within a project folder (optional) + /// Cancellation Token to cancel request (optional) + /// Task of ApiResponse (object) + System.Threading.Tasks.Task> DownloadJobArtifactWithHttpInfoAsync (string owner, string name, string jobId, string path = default, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Get a Job + /// + /// + /// Retrieve a job. + /// + /// Thrown when fails to make API call + /// + /// + /// + /// Cancellation Token to cancel request (optional) + /// Task of CloudJob + System.Threading.Tasks.Task GetJobAsync (string owner, string name, string jobId, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// Get a Job + /// + /// + /// Retrieve a job. + /// + /// Thrown when fails to make API call + /// + /// + /// + /// Cancellation Token to cancel request (optional) + /// Task of ApiResponse (CloudJob) + System.Threading.Tasks.Task> GetJobWithHttpInfoAsync (string owner, string name, string jobId, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// List Jobs + /// + /// + /// Retrieve a list of jobs. + /// + /// Thrown when fails to make API call + /// + /// + /// (optional) + /// (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 CloudJobList + System.Threading.Tasks.Task ListJobsAsync (string owner, string name, List ids = default, JobStatusEnum? status = default, int? page = default, int? perPage = default, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// List Jobs + /// + /// + /// Retrieve a list of jobs. + /// + /// Thrown when fails to make API call + /// + /// + /// (optional) + /// (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 (CloudJobList) + System.Threading.Tasks.Task> ListJobsWithHttpInfoAsync (string owner, string name, List ids = default, JobStatusEnum? status = default, int? page = default, int? perPage = default, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// List files/folders in a job folder + /// + /// + /// Retrieve a list of artifacts in a job folder + /// + /// Thrown when fails to make API call + /// + /// + /// + /// The path to an file within a project folder (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 List<FileMeta> + System.Threading.Tasks.Task> SearchJobFolderAsync (string owner, string name, string jobId, List path = default, int? page = default, int? perPage = default, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// List files/folders in a job folder + /// + /// + /// Retrieve a list of artifacts in a job folder + /// + /// Thrown when fails to make API call + /// + /// + /// + /// The path to an file within a project folder (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 (List<FileMeta>) + System.Threading.Tasks.Task>> SearchJobFolderWithHttpInfoAsync (string owner, string name, string jobId, List path = default, int? page = default, int? perPage = default, CancellationToken cancellationToken = default(CancellationToken)); + #endregion Asynchronous Operations + } + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public partial class JobsApi : IJobsApi + { + private PollinationSDK.Client.ExceptionFactory _exceptionFactory = (name, response) => null; + + /// + /// Initializes a new instance of the class. + /// + /// + public JobsApi(String basePath) + { + this.Configuration = new PollinationSDK.Client.Configuration { BasePath = basePath }; + + ExceptionFactory = PollinationSDK.Client.Configuration.DefaultExceptionFactory; + } + + /// + /// Initializes a new instance of the class + /// + /// + public JobsApi() + { + 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 JobsApi(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 a Job Retrieve a job. + /// + /// Thrown when fails to make API call + /// + /// + /// + /// object + public object CancelJob (string owner, string name, string jobId) + { + ApiResponse localVarResponse = CancelJobWithHttpInfo(owner, name, jobId); + return localVarResponse.Data; + } + + /// + /// Cancel a Job Retrieve a job. + /// + /// Thrown when fails to make API call + /// + /// + /// + /// ApiResponse of object + public ApiResponse CancelJobWithHttpInfo (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->CancelJob"); + // verify the required parameter 'name' is set + if (name == null) + throw new ApiException(400, "Missing required parameter 'name' when calling JobsApi->CancelJob"); + // verify the required parameter 'jobId' is set + if (jobId == null) + throw new ApiException(400, "Missing required parameter 'jobId' when calling JobsApi->CancelJob"); + + var localVarPath = "/projects/{owner}/{name}/jobs/{job_id}/cancel"; + 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.PUT, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("CancelJob", 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 a Job Retrieve a job. + /// + /// Thrown when fails to make API call + /// + /// + /// + /// Cancellation Token to cancel request (optional) + /// Task of object + public async System.Threading.Tasks.Task CancelJobAsync (string owner, string name, string jobId, CancellationToken cancellationToken = default(CancellationToken)) + { + ApiResponse localVarResponse = await CancelJobWithHttpInfoAsync(owner, name, jobId, cancellationToken); + return localVarResponse.Data; + + } + + /// + /// Cancel a Job Retrieve 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> CancelJobWithHttpInfoAsync (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->CancelJob"); + // verify the required parameter 'name' is set + if (name == null) + throw new ApiException(400, "Missing required parameter 'name' when calling JobsApi->CancelJob"); + // verify the required parameter 'jobId' is set + if (jobId == null) + throw new ApiException(400, "Missing required parameter 'jobId' when calling JobsApi->CancelJob"); + + var localVarPath = "/projects/{owner}/{name}/jobs/{job_id}/cancel"; + 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.PUT, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType, cancellationToken); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("CancelJob", 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))); + } + + /// + /// Schedule a job Create a new job. + /// + /// Thrown when fails to make API call + /// + /// + /// + /// (optional) + /// (optional) + /// CreatedContent + public CreatedContent CreateJob (string owner, string name, Job job, string authorization = default, string xPollinationToken = default) + { + ApiResponse localVarResponse = CreateJobWithHttpInfo(owner, name, job, authorization, xPollinationToken); + return localVarResponse.Data; + } + + /// + /// Schedule a job Create a new job. + /// + /// Thrown when fails to make API call + /// + /// + /// + /// (optional) + /// (optional) + /// ApiResponse of CreatedContent + public ApiResponse CreateJobWithHttpInfo (string owner, string name, Job job, string authorization = default, string xPollinationToken = default) + { + // verify the required parameter 'owner' is set + if (owner == null) + throw new ApiException(400, "Missing required parameter 'owner' when calling JobsApi->CreateJob"); + // verify the required parameter 'name' is set + if (name == null) + throw new ApiException(400, "Missing required parameter 'name' when calling JobsApi->CreateJob"); + // verify the required parameter 'job' is set + if (job == null) + throw new ApiException(400, "Missing required parameter 'job' when calling JobsApi->CreateJob"); + + var localVarPath = "/projects/{owner}/{name}/jobs"; + 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 (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 (authorization != null) localVarHeaderParams.Add("authorization", this.Configuration.ApiClient.ParameterToString(authorization)); // header parameter + if (xPollinationToken != null) localVarHeaderParams.Add("x-pollination-token", this.Configuration.ApiClient.ParameterToString(xPollinationToken)); // header parameter + if (job != null && job.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(job); // http body (model) parameter + } + else + { + localVarPostBody = job; // 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("CreateJob", 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))); + } + + /// + /// Schedule a job Create a new job. + /// + /// Thrown when fails to make API call + /// + /// + /// + /// (optional) + /// (optional) + /// Cancellation Token to cancel request (optional) + /// Task of CreatedContent + public async System.Threading.Tasks.Task CreateJobAsync (string owner, string name, Job job, string authorization = default, string xPollinationToken = default, CancellationToken cancellationToken = default(CancellationToken)) + { + ApiResponse localVarResponse = await CreateJobWithHttpInfoAsync(owner, name, job, authorization, xPollinationToken, cancellationToken); + return localVarResponse.Data; + + } + + /// + /// Schedule a job Create a new job. + /// + /// Thrown when fails to make API call + /// + /// + /// + /// (optional) + /// (optional) + /// Cancellation Token to cancel request (optional) + /// Task of ApiResponse (CreatedContent) + public async System.Threading.Tasks.Task> CreateJobWithHttpInfoAsync (string owner, string name, Job job, string authorization = default, string xPollinationToken = default, 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->CreateJob"); + // verify the required parameter 'name' is set + if (name == null) + throw new ApiException(400, "Missing required parameter 'name' when calling JobsApi->CreateJob"); + // verify the required parameter 'job' is set + if (job == null) + throw new ApiException(400, "Missing required parameter 'job' when calling JobsApi->CreateJob"); + + var localVarPath = "/projects/{owner}/{name}/jobs"; + 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 (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 (authorization != null) localVarHeaderParams.Add("authorization", this.Configuration.ApiClient.ParameterToString(authorization)); // header parameter + if (xPollinationToken != null) localVarHeaderParams.Add("x-pollination-token", this.Configuration.ApiClient.ParameterToString(xPollinationToken)); // header parameter + if (job != null && job.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(job); // http body (model) parameter + } + else + { + localVarPostBody = job; // 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("CreateJob", 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))); + } + + /// + /// 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 + /// + /// Thrown when fails to make API call + /// + /// + /// + /// The path to an file within a project folder (optional) + /// object + public object DownloadJobArtifact (string owner, string name, string jobId, string path = default) + { + ApiResponse localVarResponse = DownloadJobArtifactWithHttpInfo(owner, name, jobId, path); + return localVarResponse.Data; + } + + /// + /// Download an artifact from the job folder Get a download link for an artifact in a job folder + /// + /// Thrown when fails to make API call + /// + /// + /// + /// The path to an file within a project folder (optional) + /// ApiResponse of object + public ApiResponse DownloadJobArtifactWithHttpInfo (string owner, string name, string jobId, string path = default) + { + // verify the required parameter 'owner' is set + if (owner == null) + throw new ApiException(400, "Missing required parameter 'owner' when calling JobsApi->DownloadJobArtifact"); + // verify the required parameter 'name' is set + if (name == null) + throw new ApiException(400, "Missing required parameter 'name' when calling JobsApi->DownloadJobArtifact"); + // verify the required parameter 'jobId' is set + if (jobId == null) + throw new ApiException(400, "Missing required parameter 'jobId' when calling JobsApi->DownloadJobArtifact"); + + var localVarPath = "/projects/{owner}/{name}/jobs/{job_id}/artifacts/download"; + 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 + if (path != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "path", path)); // 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("DownloadJobArtifact", 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 + /// + /// Thrown when fails to make API call + /// + /// + /// + /// The path to an file within a project folder (optional) + /// Cancellation Token to cancel request (optional) + /// Task of object + public async System.Threading.Tasks.Task DownloadJobArtifactAsync (string owner, string name, string jobId, string path = default, CancellationToken cancellationToken = default(CancellationToken)) + { + ApiResponse localVarResponse = await DownloadJobArtifactWithHttpInfoAsync(owner, name, jobId, path, cancellationToken); + return localVarResponse.Data; + + } + + /// + /// Download an artifact from the job folder Get a download link for an artifact in a job folder + /// + /// Thrown when fails to make API call + /// + /// + /// + /// The path to an file within a project folder (optional) + /// Cancellation Token to cancel request (optional) + /// Task of ApiResponse (object) + public async System.Threading.Tasks.Task> DownloadJobArtifactWithHttpInfoAsync (string owner, string name, string jobId, string path = default, 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->DownloadJobArtifact"); + // verify the required parameter 'name' is set + if (name == null) + throw new ApiException(400, "Missing required parameter 'name' when calling JobsApi->DownloadJobArtifact"); + // verify the required parameter 'jobId' is set + if (jobId == null) + throw new ApiException(400, "Missing required parameter 'jobId' when calling JobsApi->DownloadJobArtifact"); + + var localVarPath = "/projects/{owner}/{name}/jobs/{job_id}/artifacts/download"; + 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 + if (path != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "path", path)); // 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("DownloadJobArtifact", 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 a Job Retrieve a job. + /// + /// Thrown when fails to make API call + /// + /// + /// + /// CloudJob + public CloudJob GetJob (string owner, string name, string jobId) + { + ApiResponse localVarResponse = GetJobWithHttpInfo(owner, name, jobId); + return localVarResponse.Data; + } + + /// + /// Get a Job Retrieve a job. + /// + /// Thrown when fails to make API call + /// + /// + /// + /// ApiResponse of CloudJob + public ApiResponse GetJobWithHttpInfo (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->GetJob"); + // verify the required parameter 'name' is set + if (name == null) + throw new ApiException(400, "Missing required parameter 'name' when calling JobsApi->GetJob"); + // verify the required parameter 'jobId' is set + if (jobId == null) + throw new ApiException(400, "Missing required parameter 'jobId' when calling JobsApi->GetJob"); + + 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.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("GetJob", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (CloudJob) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(CloudJob))); + } + + /// + /// Get a Job Retrieve a job. + /// + /// Thrown when fails to make API call + /// + /// + /// + /// Cancellation Token to cancel request (optional) + /// Task of CloudJob + public async System.Threading.Tasks.Task GetJobAsync (string owner, string name, string jobId, CancellationToken cancellationToken = default(CancellationToken)) + { + ApiResponse localVarResponse = await GetJobWithHttpInfoAsync(owner, name, jobId, cancellationToken); + return localVarResponse.Data; + + } + + /// + /// Get a Job Retrieve a job. + /// + /// Thrown when fails to make API call + /// + /// + /// + /// Cancellation Token to cancel request (optional) + /// Task of ApiResponse (CloudJob) + public async System.Threading.Tasks.Task> GetJobWithHttpInfoAsync (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->GetJob"); + // verify the required parameter 'name' is set + if (name == null) + throw new ApiException(400, "Missing required parameter 'name' when calling JobsApi->GetJob"); + // verify the required parameter 'jobId' is set + if (jobId == null) + throw new ApiException(400, "Missing required parameter 'jobId' when calling JobsApi->GetJob"); + + 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.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType, cancellationToken); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("GetJob", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (CloudJob) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(CloudJob))); + } + + /// + /// List Jobs Retrieve a list of jobs. + /// + /// Thrown when fails to make API call + /// + /// + /// (optional) + /// (optional) + /// Page number starting from 1 (optional, default to 1) + /// Number of items per page (optional, default to 25) + /// CloudJobList + public CloudJobList ListJobs (string owner, string name, List ids = default, JobStatusEnum? status = default, int? page = default, int? perPage = default) + { + ApiResponse localVarResponse = ListJobsWithHttpInfo(owner, name, ids, status, page, perPage); + return localVarResponse.Data; + } + + /// + /// List Jobs Retrieve a list of jobs. + /// + /// Thrown when fails to make API call + /// + /// + /// (optional) + /// (optional) + /// Page number starting from 1 (optional, default to 1) + /// Number of items per page (optional, default to 25) + /// ApiResponse of CloudJobList + public ApiResponse ListJobsWithHttpInfo (string owner, string name, List ids = default, JobStatusEnum? status = default, int? page = default, int? perPage = default) + { + // verify the required parameter 'owner' is set + if (owner == null) + throw new ApiException(400, "Missing required parameter 'owner' when calling JobsApi->ListJobs"); + // verify the required parameter 'name' is set + if (name == null) + throw new ApiException(400, "Missing required parameter 'name' when calling JobsApi->ListJobs"); + + var localVarPath = "/projects/{owner}/{name}/jobs"; + 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 (ids != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("multi", "ids", ids)); // query parameter + if (status != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "status", status)); // 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("ListJobs", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (CloudJobList) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(CloudJobList))); + } + + /// + /// List Jobs Retrieve a list of jobs. + /// + /// Thrown when fails to make API call + /// + /// + /// (optional) + /// (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 CloudJobList + public async System.Threading.Tasks.Task ListJobsAsync (string owner, string name, List ids = default, JobStatusEnum? status = default, int? page = default, int? perPage = default, CancellationToken cancellationToken = default(CancellationToken)) + { + ApiResponse localVarResponse = await ListJobsWithHttpInfoAsync(owner, name, ids, status, page, perPage, cancellationToken); + return localVarResponse.Data; + + } + + /// + /// List Jobs Retrieve a list of jobs. + /// + /// Thrown when fails to make API call + /// + /// + /// (optional) + /// (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 (CloudJobList) + public async System.Threading.Tasks.Task> ListJobsWithHttpInfoAsync (string owner, string name, List ids = default, JobStatusEnum? status = default, int? page = default, int? perPage = default, 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->ListJobs"); + // verify the required parameter 'name' is set + if (name == null) + throw new ApiException(400, "Missing required parameter 'name' when calling JobsApi->ListJobs"); + + var localVarPath = "/projects/{owner}/{name}/jobs"; + 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 (ids != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("multi", "ids", ids)); // query parameter + if (status != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "status", status)); // 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("ListJobs", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (CloudJobList) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(CloudJobList))); + } + + /// + /// List files/folders in a job folder Retrieve a list of artifacts in a job folder + /// + /// Thrown when fails to make API call + /// + /// + /// + /// The path to an file within a project folder (optional) + /// Page number starting from 1 (optional, default to 1) + /// Number of items per page (optional, default to 25) + /// List<FileMeta> + public List SearchJobFolder (string owner, string name, string jobId, List path = default, int? page = default, int? perPage = default) + { + ApiResponse> localVarResponse = SearchJobFolderWithHttpInfo(owner, name, jobId, path, page, perPage); + return localVarResponse.Data; + } + + /// + /// List files/folders in a job folder Retrieve a list of artifacts in a job folder + /// + /// Thrown when fails to make API call + /// + /// + /// + /// The path to an file within a project folder (optional) + /// Page number starting from 1 (optional, default to 1) + /// Number of items per page (optional, default to 25) + /// ApiResponse of List<FileMeta> + public ApiResponse> SearchJobFolderWithHttpInfo (string owner, string name, string jobId, List path = default, int? page = default, int? perPage = default) + { + // verify the required parameter 'owner' is set + if (owner == null) + throw new ApiException(400, "Missing required parameter 'owner' when calling JobsApi->SearchJobFolder"); + // verify the required parameter 'name' is set + if (name == null) + throw new ApiException(400, "Missing required parameter 'name' when calling JobsApi->SearchJobFolder"); + // verify the required parameter 'jobId' is set + if (jobId == null) + throw new ApiException(400, "Missing required parameter 'jobId' when calling JobsApi->SearchJobFolder"); + + var localVarPath = "/projects/{owner}/{name}/jobs/{job_id}/artifacts"; + 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 + if (path != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("multi", "path", path)); // 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("SearchJobFolder", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse>(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (List) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(List))); + } + + /// + /// List files/folders in a job folder Retrieve a list of artifacts in a job folder + /// + /// Thrown when fails to make API call + /// + /// + /// + /// The path to an file within a project folder (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 List<FileMeta> + public async System.Threading.Tasks.Task> SearchJobFolderAsync (string owner, string name, string jobId, List path = default, int? page = default, int? perPage = default, CancellationToken cancellationToken = default(CancellationToken)) + { + ApiResponse> localVarResponse = await SearchJobFolderWithHttpInfoAsync(owner, name, jobId, path, page, perPage, cancellationToken); + return localVarResponse.Data; + + } + + /// + /// List files/folders in a job folder Retrieve a list of artifacts in a job folder + /// + /// Thrown when fails to make API call + /// + /// + /// + /// The path to an file within a project folder (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 (List<FileMeta>) + public async System.Threading.Tasks.Task>> SearchJobFolderWithHttpInfoAsync (string owner, string name, string jobId, List path = default, int? page = default, int? perPage = default, 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->SearchJobFolder"); + // verify the required parameter 'name' is set + if (name == null) + throw new ApiException(400, "Missing required parameter 'name' when calling JobsApi->SearchJobFolder"); + // verify the required parameter 'jobId' is set + if (jobId == null) + throw new ApiException(400, "Missing required parameter 'jobId' when calling JobsApi->SearchJobFolder"); + + var localVarPath = "/projects/{owner}/{name}/jobs/{job_id}/artifacts"; + 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 + if (path != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("multi", "path", path)); // 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("SearchJobFolder", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse>(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (List) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(List))); + } + + } +} 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/OrgsApi.cs b/src/PollinationSDK/Api/OrgsApi.cs new file mode 100644 index 000000000..18295bc96 --- /dev/null +++ b/src/PollinationSDK/Api/OrgsApi.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 IOrgsApi : IApiAccessor + { + #region Synchronous Operations + /// + /// Create an Org + /// + /// + /// Create a new org. + /// + /// Thrown when fails to make API call + /// + /// CreatedContent + CreatedContent CreateOrg (OrganizationCreate organizationCreate); + + /// + /// Create an Org + /// + /// + /// Create a new org. + /// + /// Thrown when fails to make API call + /// + /// ApiResponse of CreatedContent + ApiResponse CreateOrgWithHttpInfo (OrganizationCreate organizationCreate); + /// + /// Delete an Org + /// + /// + /// Delete a org (must have `admin` permission) + /// + /// Thrown when fails to make API call + /// + /// + void DeleteOrg (string name); + + /// + /// Delete an Org + /// + /// + /// Delete a org (must have `admin` permission) + /// + /// Thrown when fails to make API call + /// + /// ApiResponse of Object(void) + ApiResponse DeleteOrgWithHttpInfo (string name); + /// + /// Remove an Org member + /// + /// + /// Remove a member from the org (must have org `owner` role) + /// + /// Thrown when fails to make API call + /// + /// + /// + void DeleteOrgMember (string name, string username); + + /// + /// Remove an Org member + /// + /// + /// Remove a member from the org (must have org `owner` role) + /// + /// Thrown when fails to make API call + /// + /// + /// ApiResponse of Object(void) + ApiResponse DeleteOrgMemberWithHttpInfo (string name, string username); + /// + /// Get an Org + /// + /// + /// Retrieve a org by name + /// + /// Thrown when fails to make API call + /// + /// Organization + Organization GetOrg (string name); + + /// + /// Get an Org + /// + /// + /// Retrieve a org by name + /// + /// Thrown when fails to make API call + /// + /// ApiResponse of Organization + ApiResponse GetOrgWithHttpInfo (string name); + /// + /// List organization members + /// + /// + /// Retrieve a org's members + /// + /// Thrown when fails to make API call + /// + /// OrganizationMemberList + OrganizationMemberList GetOrgMembers (string name); + + /// + /// List organization members + /// + /// + /// Retrieve a org's members + /// + /// Thrown when fails to make API call + /// + /// ApiResponse of OrganizationMemberList + ApiResponse GetOrgMembersWithHttpInfo (string name); + /// + /// List Orgs + /// + /// + /// search for orgs using query parameters + /// + /// Thrown when fails to make API call + /// You know, for search (optional) + /// The account name (optional) + /// The username of a user (optional) + /// Page number starting from 1 (optional, default to 1) + /// Number of items per page (optional, default to 25) + /// OrganizationList + OrganizationList ListOrgs (List search = default, List name = default, List member = default, int? page = default, int? perPage = default); + + /// + /// List Orgs + /// + /// + /// search for orgs using query parameters + /// + /// Thrown when fails to make API call + /// You know, for search (optional) + /// The account name (optional) + /// The username of a user (optional) + /// Page number starting from 1 (optional, default to 1) + /// Number of items per page (optional, default to 25) + /// ApiResponse of OrganizationList + ApiResponse ListOrgsWithHttpInfo (List search = default, List name = default, List member = default, int? page = default, int? perPage = default); + /// + /// Update an Org + /// + /// + /// Update a org (must have org `owner` role) + /// + /// Thrown when fails to make API call + /// + /// + /// UpdateAccepted + UpdateAccepted UpdateOrg (string name, OrganizationUpdate organizationUpdate); + + /// + /// Update an Org + /// + /// + /// Update a org (must have org `owner` role) + /// + /// Thrown when fails to make API call + /// + /// + /// ApiResponse of UpdateAccepted + ApiResponse UpdateOrgWithHttpInfo (string name, OrganizationUpdate organizationUpdate); + /// + /// Add or update the role of an Org Member + /// + /// + /// Upsert a member role to the org (must have org `owner` role) + /// + /// Thrown when fails to make API call + /// + /// + /// + /// UpdateAccepted + UpdateAccepted UpsertOrgMember (string name, string username, OrganizationRoleEnum role); + + /// + /// Add or update the role of an Org Member + /// + /// + /// Upsert a member role to the org (must have org `owner` role) + /// + /// Thrown when fails to make API call + /// + /// + /// + /// ApiResponse of UpdateAccepted + ApiResponse UpsertOrgMemberWithHttpInfo (string name, string username, OrganizationRoleEnum role); + #endregion Synchronous Operations + #region Asynchronous Operations + /// + /// Create an Org + /// + /// + /// Create a new org. + /// + /// Thrown when fails to make API call + /// + /// Cancellation Token to cancel request (optional) + /// Task of CreatedContent + System.Threading.Tasks.Task CreateOrgAsync (OrganizationCreate organizationCreate, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// Create an Org + /// + /// + /// Create a new org. + /// + /// Thrown when fails to make API call + /// + /// Cancellation Token to cancel request (optional) + /// Task of ApiResponse (CreatedContent) + System.Threading.Tasks.Task> CreateOrgWithHttpInfoAsync (OrganizationCreate organizationCreate, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Delete an Org + /// + /// + /// Delete a org (must have `admin` permission) + /// + /// Thrown when fails to make API call + /// + /// Cancellation Token to cancel request (optional) + /// Task of void + System.Threading.Tasks.Task DeleteOrgAsync (string name, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// Delete an Org + /// + /// + /// Delete a org (must have `admin` permission) + /// + /// Thrown when fails to make API call + /// + /// Cancellation Token to cancel request (optional) + /// Task of ApiResponse + System.Threading.Tasks.Task> DeleteOrgWithHttpInfoAsync (string name, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Remove an Org member + /// + /// + /// Remove a member from the org (must have org `owner` role) + /// + /// Thrown when fails to make API call + /// + /// + /// Cancellation Token to cancel request (optional) + /// Task of void + System.Threading.Tasks.Task DeleteOrgMemberAsync (string name, string username, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// Remove an Org member + /// + /// + /// Remove a member from the org (must have org `owner` role) + /// + /// Thrown when fails to make API call + /// + /// + /// Cancellation Token to cancel request (optional) + /// Task of ApiResponse + System.Threading.Tasks.Task> DeleteOrgMemberWithHttpInfoAsync (string name, string username, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Get an Org + /// + /// + /// Retrieve a org by name + /// + /// Thrown when fails to make API call + /// + /// Cancellation Token to cancel request (optional) + /// Task of Organization + System.Threading.Tasks.Task GetOrgAsync (string name, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// Get an Org + /// + /// + /// Retrieve a org by name + /// + /// Thrown when fails to make API call + /// + /// Cancellation Token to cancel request (optional) + /// Task of ApiResponse (Organization) + System.Threading.Tasks.Task> GetOrgWithHttpInfoAsync (string name, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// List organization members + /// + /// + /// Retrieve a org's members + /// + /// Thrown when fails to make API call + /// + /// Cancellation Token to cancel request (optional) + /// Task of OrganizationMemberList + System.Threading.Tasks.Task GetOrgMembersAsync (string name, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// List organization members + /// + /// + /// Retrieve a org's members + /// + /// Thrown when fails to make API call + /// + /// Cancellation Token to cancel request (optional) + /// Task of ApiResponse (OrganizationMemberList) + System.Threading.Tasks.Task> GetOrgMembersWithHttpInfoAsync (string name, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// List Orgs + /// + /// + /// search for orgs using query parameters + /// + /// Thrown when fails to make API call + /// You know, for search (optional) + /// The account name (optional) + /// The username of a user (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 OrganizationList + System.Threading.Tasks.Task ListOrgsAsync (List search = default, List name = default, List member = default, int? page = default, int? perPage = default, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// List Orgs + /// + /// + /// search for orgs using query parameters + /// + /// Thrown when fails to make API call + /// You know, for search (optional) + /// The account name (optional) + /// The username of a user (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 (OrganizationList) + System.Threading.Tasks.Task> ListOrgsWithHttpInfoAsync (List search = default, List name = default, List member = default, int? page = default, int? perPage = default, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Update an Org + /// + /// + /// Update a org (must have org `owner` role) + /// + /// Thrown when fails to make API call + /// + /// + /// Cancellation Token to cancel request (optional) + /// Task of UpdateAccepted + System.Threading.Tasks.Task UpdateOrgAsync (string name, OrganizationUpdate organizationUpdate, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// Update an Org + /// + /// + /// Update a org (must have org `owner` role) + /// + /// Thrown when fails to make API call + /// + /// + /// Cancellation Token to cancel request (optional) + /// Task of ApiResponse (UpdateAccepted) + System.Threading.Tasks.Task> UpdateOrgWithHttpInfoAsync (string name, OrganizationUpdate organizationUpdate, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Add or update the role of an Org Member + /// + /// + /// Upsert a member role to the org (must have org `owner` role) + /// + /// Thrown when fails to make API call + /// + /// + /// + /// Cancellation Token to cancel request (optional) + /// Task of UpdateAccepted + System.Threading.Tasks.Task UpsertOrgMemberAsync (string name, string username, OrganizationRoleEnum role, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// Add or update the role of an Org Member + /// + /// + /// Upsert a member role to the org (must have org `owner` role) + /// + /// Thrown when fails to make API call + /// + /// + /// + /// Cancellation Token to cancel request (optional) + /// Task of ApiResponse (UpdateAccepted) + System.Threading.Tasks.Task> UpsertOrgMemberWithHttpInfoAsync (string name, string username, OrganizationRoleEnum role, CancellationToken cancellationToken = default(CancellationToken)); + #endregion Asynchronous Operations + } + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public partial class OrgsApi : IOrgsApi + { + private PollinationSDK.Client.ExceptionFactory _exceptionFactory = (name, response) => null; + + /// + /// Initializes a new instance of the class. + /// + /// + public OrgsApi(String basePath) + { + this.Configuration = new PollinationSDK.Client.Configuration { BasePath = basePath }; + + ExceptionFactory = PollinationSDK.Client.Configuration.DefaultExceptionFactory; + } + + /// + /// Initializes a new instance of the class + /// + /// + public OrgsApi() + { + 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 OrgsApi(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; } + } + + /// + /// Create an Org Create a new org. + /// + /// Thrown when fails to make API call + /// + /// CreatedContent + public CreatedContent CreateOrg (OrganizationCreate organizationCreate) + { + ApiResponse localVarResponse = CreateOrgWithHttpInfo(organizationCreate); + return localVarResponse.Data; + } + + /// + /// Create an Org Create a new org. + /// + /// Thrown when fails to make API call + /// + /// ApiResponse of CreatedContent + public ApiResponse CreateOrgWithHttpInfo (OrganizationCreate organizationCreate) + { + // verify the required parameter 'organizationCreate' is set + if (organizationCreate == null) + throw new ApiException(400, "Missing required parameter 'organizationCreate' when calling OrgsApi->CreateOrg"); + + var localVarPath = "/orgs"; + 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 (organizationCreate != null && organizationCreate.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(organizationCreate); // http body (model) parameter + } + else + { + localVarPostBody = organizationCreate; // 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("CreateOrg", 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 an Org Create a new org. + /// + /// Thrown when fails to make API call + /// + /// Cancellation Token to cancel request (optional) + /// Task of CreatedContent + public async System.Threading.Tasks.Task CreateOrgAsync (OrganizationCreate organizationCreate, CancellationToken cancellationToken = default(CancellationToken)) + { + ApiResponse localVarResponse = await CreateOrgWithHttpInfoAsync(organizationCreate, cancellationToken); + return localVarResponse.Data; + + } + + /// + /// Create an Org Create a new org. + /// + /// Thrown when fails to make API call + /// + /// Cancellation Token to cancel request (optional) + /// Task of ApiResponse (CreatedContent) + public async System.Threading.Tasks.Task> CreateOrgWithHttpInfoAsync (OrganizationCreate organizationCreate, CancellationToken cancellationToken = default(CancellationToken)) + { + // verify the required parameter 'organizationCreate' is set + if (organizationCreate == null) + throw new ApiException(400, "Missing required parameter 'organizationCreate' when calling OrgsApi->CreateOrg"); + + var localVarPath = "/orgs"; + 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 (organizationCreate != null && organizationCreate.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(organizationCreate); // http body (model) parameter + } + else + { + localVarPostBody = organizationCreate; // 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("CreateOrg", 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))); + } + + /// + /// Delete an Org Delete a org (must have `admin` permission) + /// + /// Thrown when fails to make API call + /// + /// + public void DeleteOrg (string name) + { + DeleteOrgWithHttpInfo(name); + } + + /// + /// Delete an Org Delete a org (must have `admin` permission) + /// + /// Thrown when fails to make API call + /// + /// ApiResponse of Object(void) + public ApiResponse DeleteOrgWithHttpInfo (string name) + { + // verify the required parameter 'name' is set + if (name == null) + throw new ApiException(400, "Missing required parameter 'name' when calling OrgsApi->DeleteOrg"); + + var localVarPath = "/orgs/{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 + + // 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("DeleteOrg", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + null); + } + + /// + /// Delete an Org Delete a org (must have `admin` permission) + /// + /// Thrown when fails to make API call + /// + /// Cancellation Token to cancel request (optional) + /// Task of void + public async System.Threading.Tasks.Task DeleteOrgAsync (string name, CancellationToken cancellationToken = default(CancellationToken)) + { + await DeleteOrgWithHttpInfoAsync(name, cancellationToken); + + } + + /// + /// Delete an Org Delete a org (must have `admin` permission) + /// + /// Thrown when fails to make API call + /// + /// Cancellation Token to cancel request (optional) + /// Task of ApiResponse + public async System.Threading.Tasks.Task> DeleteOrgWithHttpInfoAsync (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 OrgsApi->DeleteOrg"); + + var localVarPath = "/orgs/{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 + + // 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("DeleteOrg", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + null); + } + + /// + /// Remove an Org member Remove a member from the org (must have org `owner` role) + /// + /// Thrown when fails to make API call + /// + /// + /// + public void DeleteOrgMember (string name, string username) + { + DeleteOrgMemberWithHttpInfo(name, username); + } + + /// + /// Remove an Org member Remove a member from the org (must have org `owner` role) + /// + /// Thrown when fails to make API call + /// + /// + /// ApiResponse of Object(void) + public ApiResponse DeleteOrgMemberWithHttpInfo (string name, string username) + { + // verify the required parameter 'name' is set + if (name == null) + throw new ApiException(400, "Missing required parameter 'name' when calling OrgsApi->DeleteOrgMember"); + // verify the required parameter 'username' is set + if (username == null) + throw new ApiException(400, "Missing required parameter 'username' when calling OrgsApi->DeleteOrgMember"); + + var localVarPath = "/orgs/{name}/members/{username}"; + 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 (username != null) localVarPathParams.Add("username", this.Configuration.ApiClient.ParameterToString(username)); // 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("DeleteOrgMember", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + null); + } + + /// + /// Remove an Org member Remove a member from the org (must have org `owner` role) + /// + /// Thrown when fails to make API call + /// + /// + /// Cancellation Token to cancel request (optional) + /// Task of void + public async System.Threading.Tasks.Task DeleteOrgMemberAsync (string name, string username, CancellationToken cancellationToken = default(CancellationToken)) + { + await DeleteOrgMemberWithHttpInfoAsync(name, username, cancellationToken); + + } + + /// + /// Remove an Org member Remove a member from the org (must have org `owner` role) + /// + /// Thrown when fails to make API call + /// + /// + /// Cancellation Token to cancel request (optional) + /// Task of ApiResponse + public async System.Threading.Tasks.Task> DeleteOrgMemberWithHttpInfoAsync (string name, string username, CancellationToken cancellationToken = default(CancellationToken)) + { + // verify the required parameter 'name' is set + if (name == null) + throw new ApiException(400, "Missing required parameter 'name' when calling OrgsApi->DeleteOrgMember"); + // verify the required parameter 'username' is set + if (username == null) + throw new ApiException(400, "Missing required parameter 'username' when calling OrgsApi->DeleteOrgMember"); + + var localVarPath = "/orgs/{name}/members/{username}"; + 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 (username != null) localVarPathParams.Add("username", this.Configuration.ApiClient.ParameterToString(username)); // 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("DeleteOrgMember", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + null); + } + + /// + /// Get an Org Retrieve a org by name + /// + /// Thrown when fails to make API call + /// + /// Organization + public Organization GetOrg (string name) + { + ApiResponse localVarResponse = GetOrgWithHttpInfo(name); + return localVarResponse.Data; + } + + /// + /// Get an Org Retrieve a org by name + /// + /// Thrown when fails to make API call + /// + /// ApiResponse of Organization + public ApiResponse GetOrgWithHttpInfo (string name) + { + // verify the required parameter 'name' is set + if (name == null) + throw new ApiException(400, "Missing required parameter 'name' when calling OrgsApi->GetOrg"); + + var localVarPath = "/orgs/{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 + + // 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("GetOrg", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (Organization) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Organization))); + } + + /// + /// Get an Org Retrieve a org by name + /// + /// Thrown when fails to make API call + /// + /// Cancellation Token to cancel request (optional) + /// Task of Organization + public async System.Threading.Tasks.Task GetOrgAsync (string name, CancellationToken cancellationToken = default(CancellationToken)) + { + ApiResponse localVarResponse = await GetOrgWithHttpInfoAsync(name, cancellationToken); + return localVarResponse.Data; + + } + + /// + /// Get an Org Retrieve a org by name + /// + /// Thrown when fails to make API call + /// + /// Cancellation Token to cancel request (optional) + /// Task of ApiResponse (Organization) + public async System.Threading.Tasks.Task> GetOrgWithHttpInfoAsync (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 OrgsApi->GetOrg"); + + var localVarPath = "/orgs/{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 + + // 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("GetOrg", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (Organization) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Organization))); + } + + /// + /// List organization members Retrieve a org's members + /// + /// Thrown when fails to make API call + /// + /// OrganizationMemberList + public OrganizationMemberList GetOrgMembers (string name) + { + ApiResponse localVarResponse = GetOrgMembersWithHttpInfo(name); + return localVarResponse.Data; + } + + /// + /// List organization members Retrieve a org's members + /// + /// Thrown when fails to make API call + /// + /// ApiResponse of OrganizationMemberList + public ApiResponse GetOrgMembersWithHttpInfo (string name) + { + // verify the required parameter 'name' is set + if (name == null) + throw new ApiException(400, "Missing required parameter 'name' when calling OrgsApi->GetOrgMembers"); + + var localVarPath = "/orgs/{name}/members"; + 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("GetOrgMembers", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (OrganizationMemberList) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(OrganizationMemberList))); + } + + /// + /// List organization members Retrieve a org's members + /// + /// Thrown when fails to make API call + /// + /// Cancellation Token to cancel request (optional) + /// Task of OrganizationMemberList + public async System.Threading.Tasks.Task GetOrgMembersAsync (string name, CancellationToken cancellationToken = default(CancellationToken)) + { + ApiResponse localVarResponse = await GetOrgMembersWithHttpInfoAsync(name, cancellationToken); + return localVarResponse.Data; + + } + + /// + /// List organization members Retrieve a org's members + /// + /// Thrown when fails to make API call + /// + /// Cancellation Token to cancel request (optional) + /// Task of ApiResponse (OrganizationMemberList) + public async System.Threading.Tasks.Task> GetOrgMembersWithHttpInfoAsync (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 OrgsApi->GetOrgMembers"); + + var localVarPath = "/orgs/{name}/members"; + 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("GetOrgMembers", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (OrganizationMemberList) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(OrganizationMemberList))); + } + + /// + /// List Orgs search for orgs using query parameters + /// + /// Thrown when fails to make API call + /// You know, for search (optional) + /// The account name (optional) + /// The username of a user (optional) + /// Page number starting from 1 (optional, default to 1) + /// Number of items per page (optional, default to 25) + /// OrganizationList + public OrganizationList ListOrgs (List search = default, List name = default, List member = default, int? page = default, int? perPage = default) + { + ApiResponse localVarResponse = ListOrgsWithHttpInfo(search, name, member, page, perPage); + return localVarResponse.Data; + } + + /// + /// List Orgs search for orgs using query parameters + /// + /// Thrown when fails to make API call + /// You know, for search (optional) + /// The account name (optional) + /// The username of a user (optional) + /// Page number starting from 1 (optional, default to 1) + /// Number of items per page (optional, default to 25) + /// ApiResponse of OrganizationList + public ApiResponse ListOrgsWithHttpInfo (List search = default, List name = default, List member = default, int? page = default, int? perPage = default) + { + + var localVarPath = "/orgs"; + 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 (search != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("multi", "search", search)); // query parameter + if (name != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("multi", "name", name)); // query parameter + if (member != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("multi", "member", member)); // 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("ListOrgs", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (OrganizationList) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(OrganizationList))); + } + + /// + /// List Orgs search for orgs using query parameters + /// + /// Thrown when fails to make API call + /// You know, for search (optional) + /// The account name (optional) + /// The username of a user (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 OrganizationList + public async System.Threading.Tasks.Task ListOrgsAsync (List search = default, List name = default, List member = default, int? page = default, int? perPage = default, CancellationToken cancellationToken = default(CancellationToken)) + { + ApiResponse localVarResponse = await ListOrgsWithHttpInfoAsync(search, name, member, page, perPage, cancellationToken); + return localVarResponse.Data; + + } + + /// + /// List Orgs search for orgs using query parameters + /// + /// Thrown when fails to make API call + /// You know, for search (optional) + /// The account name (optional) + /// The username of a user (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 (OrganizationList) + public async System.Threading.Tasks.Task> ListOrgsWithHttpInfoAsync (List search = default, List name = default, List member = default, int? page = default, int? perPage = default, CancellationToken cancellationToken = default(CancellationToken)) + { + + var localVarPath = "/orgs"; + 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 (search != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("multi", "search", search)); // query parameter + if (name != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("multi", "name", name)); // query parameter + if (member != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("multi", "member", member)); // 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("ListOrgs", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (OrganizationList) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(OrganizationList))); + } + + /// + /// Update an Org Update a org (must have org `owner` role) + /// + /// Thrown when fails to make API call + /// + /// + /// UpdateAccepted + public UpdateAccepted UpdateOrg (string name, OrganizationUpdate organizationUpdate) + { + ApiResponse localVarResponse = UpdateOrgWithHttpInfo(name, organizationUpdate); + return localVarResponse.Data; + } + + /// + /// Update an Org Update a org (must have org `owner` role) + /// + /// Thrown when fails to make API call + /// + /// + /// ApiResponse of UpdateAccepted + public ApiResponse UpdateOrgWithHttpInfo (string name, OrganizationUpdate organizationUpdate) + { + // verify the required parameter 'name' is set + if (name == null) + throw new ApiException(400, "Missing required parameter 'name' when calling OrgsApi->UpdateOrg"); + // verify the required parameter 'organizationUpdate' is set + if (organizationUpdate == null) + throw new ApiException(400, "Missing required parameter 'organizationUpdate' when calling OrgsApi->UpdateOrg"); + + var localVarPath = "/orgs/{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[] { + "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 (name != null) localVarPathParams.Add("name", this.Configuration.ApiClient.ParameterToString(name)); // path parameter + if (organizationUpdate != null && organizationUpdate.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(organizationUpdate); // http body (model) parameter + } + else + { + localVarPostBody = organizationUpdate; // 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("UpdateOrg", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (UpdateAccepted) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(UpdateAccepted))); + } + + /// + /// Update an Org Update a org (must have org `owner` role) + /// + /// Thrown when fails to make API call + /// + /// + /// Cancellation Token to cancel request (optional) + /// Task of UpdateAccepted + public async System.Threading.Tasks.Task UpdateOrgAsync (string name, OrganizationUpdate organizationUpdate, CancellationToken cancellationToken = default(CancellationToken)) + { + ApiResponse localVarResponse = await UpdateOrgWithHttpInfoAsync(name, organizationUpdate, cancellationToken); + return localVarResponse.Data; + + } + + /// + /// Update an Org Update a org (must have org `owner` role) + /// + /// Thrown when fails to make API call + /// + /// + /// Cancellation Token to cancel request (optional) + /// Task of ApiResponse (UpdateAccepted) + public async System.Threading.Tasks.Task> UpdateOrgWithHttpInfoAsync (string name, OrganizationUpdate organizationUpdate, CancellationToken cancellationToken = default(CancellationToken)) + { + // verify the required parameter 'name' is set + if (name == null) + throw new ApiException(400, "Missing required parameter 'name' when calling OrgsApi->UpdateOrg"); + // verify the required parameter 'organizationUpdate' is set + if (organizationUpdate == null) + throw new ApiException(400, "Missing required parameter 'organizationUpdate' when calling OrgsApi->UpdateOrg"); + + var localVarPath = "/orgs/{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[] { + "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 (name != null) localVarPathParams.Add("name", this.Configuration.ApiClient.ParameterToString(name)); // path parameter + if (organizationUpdate != null && organizationUpdate.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(organizationUpdate); // http body (model) parameter + } + else + { + localVarPostBody = organizationUpdate; // 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("UpdateOrg", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (UpdateAccepted) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(UpdateAccepted))); + } + + /// + /// Add or update the role of an Org Member Upsert a member role to the org (must have org `owner` role) + /// + /// Thrown when fails to make API call + /// + /// + /// + /// UpdateAccepted + public UpdateAccepted UpsertOrgMember (string name, string username, OrganizationRoleEnum role) + { + ApiResponse localVarResponse = UpsertOrgMemberWithHttpInfo(name, username, role); + return localVarResponse.Data; + } + + /// + /// Add or update the role of an Org Member Upsert a member role to the org (must have org `owner` role) + /// + /// Thrown when fails to make API call + /// + /// + /// + /// ApiResponse of UpdateAccepted + public ApiResponse UpsertOrgMemberWithHttpInfo (string name, string username, OrganizationRoleEnum role) + { + // verify the required parameter 'name' is set + if (name == null) + throw new ApiException(400, "Missing required parameter 'name' when calling OrgsApi->UpsertOrgMember"); + // verify the required parameter 'username' is set + if (username == null) + throw new ApiException(400, "Missing required parameter 'username' when calling OrgsApi->UpsertOrgMember"); + // verify the required parameter 'role' is set + if (role == null) + throw new ApiException(400, "Missing required parameter 'role' when calling OrgsApi->UpsertOrgMember"); + + var localVarPath = "/orgs/{name}/members/{username}/{role}"; + 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 (username != null) localVarPathParams.Add("username", this.Configuration.ApiClient.ParameterToString(username)); // path parameter + if (role != null) localVarPathParams.Add("role", this.Configuration.ApiClient.ParameterToString(role)); // 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.PATCH, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("UpsertOrgMember", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (UpdateAccepted) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(UpdateAccepted))); + } + + /// + /// Add or update the role of an Org Member Upsert a member role to the org (must have org `owner` role) + /// + /// Thrown when fails to make API call + /// + /// + /// + /// Cancellation Token to cancel request (optional) + /// Task of UpdateAccepted + public async System.Threading.Tasks.Task UpsertOrgMemberAsync (string name, string username, OrganizationRoleEnum role, CancellationToken cancellationToken = default(CancellationToken)) + { + ApiResponse localVarResponse = await UpsertOrgMemberWithHttpInfoAsync(name, username, role, cancellationToken); + return localVarResponse.Data; + + } + + /// + /// Add or update the role of an Org Member Upsert a member role to the org (must have org `owner` role) + /// + /// Thrown when fails to make API call + /// + /// + /// + /// Cancellation Token to cancel request (optional) + /// Task of ApiResponse (UpdateAccepted) + public async System.Threading.Tasks.Task> UpsertOrgMemberWithHttpInfoAsync (string name, string username, OrganizationRoleEnum role, CancellationToken cancellationToken = default(CancellationToken)) + { + // verify the required parameter 'name' is set + if (name == null) + throw new ApiException(400, "Missing required parameter 'name' when calling OrgsApi->UpsertOrgMember"); + // verify the required parameter 'username' is set + if (username == null) + throw new ApiException(400, "Missing required parameter 'username' when calling OrgsApi->UpsertOrgMember"); + // verify the required parameter 'role' is set + if (role == null) + throw new ApiException(400, "Missing required parameter 'role' when calling OrgsApi->UpsertOrgMember"); + + var localVarPath = "/orgs/{name}/members/{username}/{role}"; + 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 (username != null) localVarPathParams.Add("username", this.Configuration.ApiClient.ParameterToString(username)); // path parameter + if (role != null) localVarPathParams.Add("role", this.Configuration.ApiClient.ParameterToString(role)); // 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.PATCH, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType, cancellationToken); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("UpsertOrgMember", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (UpdateAccepted) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(UpdateAccepted))); + } + + } +} 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 new file mode 100644 index 000000000..b20d1d89e --- /dev/null +++ b/src/PollinationSDK/Api/PluginsApi.cs @@ -0,0 +1,2800 @@ +/* + * 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 IPluginsApi : IApiAccessor + { + #region Synchronous Operations + /// + /// Create a Plugin + /// + /// + /// Create a new plugin. + /// + /// Thrown when fails to make API call + /// + /// + /// CreatedContent + CreatedContent CreatePlugin (string owner, RepositoryCreate repositoryCreate); + + /// + /// Create a Plugin + /// + /// + /// Create a new plugin. + /// + /// Thrown when fails to make API call + /// + /// + /// ApiResponse of CreatedContent + ApiResponse CreatePluginWithHttpInfo (string owner, RepositoryCreate repositoryCreate); + /// + /// Create a new Plugin package + /// + /// + /// Create a new plugin package version + /// + /// Thrown when fails to make API call + /// + /// + /// + /// CreatedContent + CreatedContent CreatePluginPackage (string owner, string name, NewPluginPackage newPluginPackage); + + /// + /// Create a new Plugin package + /// + /// + /// Create a new plugin package version + /// + /// Thrown when fails to make API call + /// + /// + /// + /// ApiResponse of CreatedContent + ApiResponse CreatePluginPackageWithHttpInfo (string owner, string name, NewPluginPackage newPluginPackage); + /// + /// Delete a Plugin + /// + /// + /// Delete a plugin (must have `admin` permission) + /// + /// Thrown when fails to make API call + /// + /// + /// + void DeletePlugin (string owner, string name); + + /// + /// Delete a Plugin + /// + /// + /// Delete a plugin (must have `admin` permission) + /// + /// Thrown when fails to make API call + /// + /// + /// ApiResponse of Object(void) + ApiResponse DeletePluginWithHttpInfo (string owner, string name); + /// + /// Remove a Repository permissions + /// + /// + /// Delete a plugin's access policy (must have `admin` permission) + /// + /// Thrown when fails to make API call + /// + /// + /// + /// + void DeletePluginOrgPermission (string owner, string name, RepositoryPolicySubject repositoryPolicySubject); + + /// + /// Remove a Repository permissions + /// + /// + /// Delete a plugin's access policy (must have `admin` permission) + /// + /// Thrown when fails to make API call + /// + /// + /// + /// ApiResponse of Object(void) + ApiResponse DeletePluginOrgPermissionWithHttpInfo (string owner, string name, RepositoryPolicySubject repositoryPolicySubject); + /// + /// Get a plugin + /// + /// + /// Retrieve a plugin by name + /// + /// Thrown when fails to make API call + /// + /// + /// Repository + Repository GetPlugin (string owner, string name); + + /// + /// Get a plugin + /// + /// + /// Retrieve a plugin by name + /// + /// Thrown when fails to make API call + /// + /// + /// ApiResponse of Repository + ApiResponse GetPluginWithHttpInfo (string owner, string name); + /// + /// Get plugin access permissions + /// + /// + /// Retrieve a plugin's access permissions (must have `write` permission) + /// + /// Thrown when fails to make API call + /// + /// + /// Page number starting from 1 (optional, default to 1) + /// Number of items per page (optional, default to 25) + /// The type of access policy subject (optional) + /// An access policy permission string (optional) + /// RepositoryAccessPolicyList + RepositoryAccessPolicyList GetPluginAccessPermissions (string owner, string name, int? page = default, int? perPage = default, List subjectType = default, List permission = default); + + /// + /// Get plugin access permissions + /// + /// + /// Retrieve a plugin's access permissions (must have `write` permission) + /// + /// Thrown when fails to make API call + /// + /// + /// Page number starting from 1 (optional, default to 1) + /// Number of items per page (optional, default to 25) + /// The type of access policy subject (optional) + /// An access policy permission string (optional) + /// ApiResponse of RepositoryAccessPolicyList + ApiResponse GetPluginAccessPermissionsWithHttpInfo (string owner, string name, int? page = default, int? perPage = default, List subjectType = default, List permission = default); + /// + /// Get a plugin tag + /// + /// + /// Retrieve a plugin tag by name and tag + /// + /// Thrown when fails to make API call + /// + /// + /// + /// PluginPackage + PluginPackage GetPluginByTag (string owner, string name, string tag); + + /// + /// Get a plugin tag + /// + /// + /// Retrieve a plugin tag by name and tag + /// + /// Thrown when fails to make API call + /// + /// + /// + /// ApiResponse of PluginPackage + ApiResponse GetPluginByTagWithHttpInfo (string owner, string name, string tag); + /// + /// Get a plugin tags + /// + /// + /// Retrieve a plugin by name + /// + /// Thrown when fails to make API call + /// + /// + /// Key to sort the list by (optional) + /// The order to sort the list (optional) + /// 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); + + /// + /// Get a plugin tags + /// + /// + /// Retrieve a plugin by name + /// + /// Thrown when fails to make API call + /// + /// + /// Key to sort the list by (optional) + /// The order to sort the list (optional) + /// 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); + /// + /// List plugins + /// + /// + /// + /// + /// Thrown when fails to make API call + /// You know, for search (optional) + /// The account name (optional) + /// Owner of the project (optional) + /// Boolean check for public/private projects (optional) + /// A keyword to index the repository by (optional) + /// Filter by permission on given resource (optional) + /// Key to sort the list by (optional) + /// The order to sort the list (optional) + /// 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); + + /// + /// List plugins + /// + /// + /// + /// + /// Thrown when fails to make API call + /// You know, for search (optional) + /// The account name (optional) + /// Owner of the project (optional) + /// Boolean check for public/private projects (optional) + /// A keyword to index the repository by (optional) + /// Filter by permission on given resource (optional) + /// Key to sort the list by (optional) + /// The order to sort the list (optional) + /// 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); + /// + /// Update a Plugin + /// + /// + /// Update a plugin (must have `contribute` permission) + /// + /// Thrown when fails to make API call + /// + /// + /// + /// UpdateAccepted + UpdateAccepted UpdatePlugin (string owner, string name, RepositoryUpdate repositoryUpdate); + + /// + /// Update a Plugin + /// + /// + /// Update a plugin (must have `contribute` permission) + /// + /// Thrown when fails to make API call + /// + /// + /// + /// ApiResponse of UpdateAccepted + ApiResponse UpdatePluginWithHttpInfo (string owner, string name, RepositoryUpdate repositoryUpdate); + /// + /// Upsert a new permission to a plugin + /// + /// + /// Upsert a plugin's access policy (must have `admin` permission) + /// + /// Thrown when fails to make API call + /// + /// + /// + /// UpdateAccepted + UpdateAccepted UpsertPluginPermission (string owner, string name, RepositoryAccessPolicy repositoryAccessPolicy); + + /// + /// Upsert a new permission to a plugin + /// + /// + /// Upsert a plugin's access policy (must have `admin` permission) + /// + /// Thrown when fails to make API call + /// + /// + /// + /// ApiResponse of UpdateAccepted + ApiResponse UpsertPluginPermissionWithHttpInfo (string owner, string name, RepositoryAccessPolicy repositoryAccessPolicy); + #endregion Synchronous Operations + #region Asynchronous Operations + /// + /// Create a Plugin + /// + /// + /// Create a new plugin. + /// + /// Thrown when fails to make API call + /// + /// + /// Cancellation Token to cancel request (optional) + /// Task of CreatedContent + System.Threading.Tasks.Task CreatePluginAsync (string owner, RepositoryCreate repositoryCreate, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// Create a Plugin + /// + /// + /// Create a new plugin. + /// + /// Thrown when fails to make API call + /// + /// + /// Cancellation Token to cancel request (optional) + /// Task of ApiResponse (CreatedContent) + System.Threading.Tasks.Task> CreatePluginWithHttpInfoAsync (string owner, RepositoryCreate repositoryCreate, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Create a new Plugin package + /// + /// + /// Create a new plugin package version + /// + /// Thrown when fails to make API call + /// + /// + /// + /// Cancellation Token to cancel request (optional) + /// Task of CreatedContent + System.Threading.Tasks.Task CreatePluginPackageAsync (string owner, string name, NewPluginPackage newPluginPackage, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// Create a new Plugin package + /// + /// + /// Create a new plugin package version + /// + /// Thrown when fails to make API call + /// + /// + /// + /// Cancellation Token to cancel request (optional) + /// Task of ApiResponse (CreatedContent) + System.Threading.Tasks.Task> CreatePluginPackageWithHttpInfoAsync (string owner, string name, NewPluginPackage newPluginPackage, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Delete a Plugin + /// + /// + /// Delete a plugin (must have `admin` permission) + /// + /// Thrown when fails to make API call + /// + /// + /// Cancellation Token to cancel request (optional) + /// Task of void + System.Threading.Tasks.Task DeletePluginAsync (string owner, string name, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// Delete a Plugin + /// + /// + /// Delete a plugin (must have `admin` permission) + /// + /// Thrown when fails to make API call + /// + /// + /// Cancellation Token to cancel request (optional) + /// Task of ApiResponse + System.Threading.Tasks.Task> DeletePluginWithHttpInfoAsync (string owner, string name, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Remove a Repository permissions + /// + /// + /// Delete a plugin's access policy (must have `admin` permission) + /// + /// Thrown when fails to make API call + /// + /// + /// + /// Cancellation Token to cancel request (optional) + /// Task of void + System.Threading.Tasks.Task DeletePluginOrgPermissionAsync (string owner, string name, RepositoryPolicySubject repositoryPolicySubject, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// Remove a Repository permissions + /// + /// + /// Delete a plugin's access policy (must have `admin` permission) + /// + /// Thrown when fails to make API call + /// + /// + /// + /// Cancellation Token to cancel request (optional) + /// Task of ApiResponse + System.Threading.Tasks.Task> DeletePluginOrgPermissionWithHttpInfoAsync (string owner, string name, RepositoryPolicySubject repositoryPolicySubject, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Get a plugin + /// + /// + /// Retrieve a plugin by name + /// + /// Thrown when fails to make API call + /// + /// + /// Cancellation Token to cancel request (optional) + /// Task of Repository + System.Threading.Tasks.Task GetPluginAsync (string owner, string name, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// Get a plugin + /// + /// + /// Retrieve a plugin by name + /// + /// Thrown when fails to make API call + /// + /// + /// Cancellation Token to cancel request (optional) + /// Task of ApiResponse (Repository) + System.Threading.Tasks.Task> GetPluginWithHttpInfoAsync (string owner, string name, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Get plugin access permissions + /// + /// + /// Retrieve a plugin's access permissions (must have `write` permission) + /// + /// Thrown when fails to make API call + /// + /// + /// Page number starting from 1 (optional, default to 1) + /// Number of items per page (optional, default to 25) + /// The type of access policy subject (optional) + /// An access policy permission string (optional) + /// Cancellation Token to cancel request (optional) + /// Task of RepositoryAccessPolicyList + System.Threading.Tasks.Task GetPluginAccessPermissionsAsync (string owner, string name, int? page = default, int? perPage = default, List subjectType = default, List permission = default, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// Get plugin access permissions + /// + /// + /// Retrieve a plugin's access permissions (must have `write` permission) + /// + /// Thrown when fails to make API call + /// + /// + /// Page number starting from 1 (optional, default to 1) + /// Number of items per page (optional, default to 25) + /// The type of access policy subject (optional) + /// An access policy permission string (optional) + /// Cancellation Token to cancel request (optional) + /// Task of ApiResponse (RepositoryAccessPolicyList) + System.Threading.Tasks.Task> GetPluginAccessPermissionsWithHttpInfoAsync (string owner, string name, int? page = default, int? perPage = default, List subjectType = default, List permission = default, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Get a plugin tag + /// + /// + /// Retrieve a plugin tag by name and tag + /// + /// Thrown when fails to make API call + /// + /// + /// + /// Cancellation Token to cancel request (optional) + /// Task of PluginPackage + System.Threading.Tasks.Task GetPluginByTagAsync (string owner, string name, string tag, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// Get a plugin tag + /// + /// + /// Retrieve a plugin tag by name and tag + /// + /// Thrown when fails to make API call + /// + /// + /// + /// Cancellation Token to cancel request (optional) + /// Task of ApiResponse (PluginPackage) + System.Threading.Tasks.Task> GetPluginByTagWithHttpInfoAsync (string owner, string name, string tag, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Get a plugin tags + /// + /// + /// Retrieve a plugin by name + /// + /// Thrown when fails to make API call + /// + /// + /// Key to sort the list by (optional) + /// The order to sort the list (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 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)); + + /// + /// Get a plugin tags + /// + /// + /// Retrieve a plugin by name + /// + /// Thrown when fails to make API call + /// + /// + /// Key to sort the list by (optional) + /// The order to sort the list (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 (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)); + /// + /// List plugins + /// + /// + /// + /// + /// Thrown when fails to make API call + /// You know, for search (optional) + /// The account name (optional) + /// Owner of the project (optional) + /// Boolean check for public/private projects (optional) + /// A keyword to index the repository by (optional) + /// Filter by permission on given resource (optional) + /// Key to sort the list by (optional) + /// The order to sort the list (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 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)); + + /// + /// List plugins + /// + /// + /// + /// + /// Thrown when fails to make API call + /// You know, for search (optional) + /// The account name (optional) + /// Owner of the project (optional) + /// Boolean check for public/private projects (optional) + /// A keyword to index the repository by (optional) + /// Filter by permission on given resource (optional) + /// Key to sort the list by (optional) + /// The order to sort the list (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 (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)); + /// + /// Update a Plugin + /// + /// + /// Update a plugin (must have `contribute` permission) + /// + /// Thrown when fails to make API call + /// + /// + /// + /// Cancellation Token to cancel request (optional) + /// Task of UpdateAccepted + System.Threading.Tasks.Task UpdatePluginAsync (string owner, string name, RepositoryUpdate repositoryUpdate, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// Update a Plugin + /// + /// + /// Update a plugin (must have `contribute` permission) + /// + /// Thrown when fails to make API call + /// + /// + /// + /// Cancellation Token to cancel request (optional) + /// Task of ApiResponse (UpdateAccepted) + System.Threading.Tasks.Task> UpdatePluginWithHttpInfoAsync (string owner, string name, RepositoryUpdate repositoryUpdate, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Upsert a new permission to a plugin + /// + /// + /// Upsert a plugin's access policy (must have `admin` permission) + /// + /// Thrown when fails to make API call + /// + /// + /// + /// Cancellation Token to cancel request (optional) + /// Task of UpdateAccepted + System.Threading.Tasks.Task UpsertPluginPermissionAsync (string owner, string name, RepositoryAccessPolicy repositoryAccessPolicy, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// Upsert a new permission to a plugin + /// + /// + /// Upsert a plugin's access policy (must have `admin` permission) + /// + /// Thrown when fails to make API call + /// + /// + /// + /// Cancellation Token to cancel request (optional) + /// Task of ApiResponse (UpdateAccepted) + System.Threading.Tasks.Task> UpsertPluginPermissionWithHttpInfoAsync (string owner, string name, RepositoryAccessPolicy repositoryAccessPolicy, CancellationToken cancellationToken = default(CancellationToken)); + #endregion Asynchronous Operations + } + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public partial class PluginsApi : IPluginsApi + { + private PollinationSDK.Client.ExceptionFactory _exceptionFactory = (name, response) => null; + + /// + /// Initializes a new instance of the class. + /// + /// + public PluginsApi(String basePath) + { + this.Configuration = new PollinationSDK.Client.Configuration { BasePath = basePath }; + + ExceptionFactory = PollinationSDK.Client.Configuration.DefaultExceptionFactory; + } + + /// + /// Initializes a new instance of the class + /// + /// + public PluginsApi() + { + 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 PluginsApi(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; } + } + + /// + /// Create a Plugin Create a new plugin. + /// + /// Thrown when fails to make API call + /// + /// + /// CreatedContent + public CreatedContent CreatePlugin (string owner, RepositoryCreate repositoryCreate) + { + ApiResponse localVarResponse = CreatePluginWithHttpInfo(owner, repositoryCreate); + return localVarResponse.Data; + } + + /// + /// Create a Plugin Create a new plugin. + /// + /// Thrown when fails to make API call + /// + /// + /// ApiResponse of CreatedContent + public ApiResponse CreatePluginWithHttpInfo (string owner, RepositoryCreate repositoryCreate) + { + // verify the required parameter 'owner' is set + if (owner == null) + throw new ApiException(400, "Missing required parameter 'owner' when calling PluginsApi->CreatePlugin"); + // verify the required parameter 'repositoryCreate' is set + if (repositoryCreate == null) + throw new ApiException(400, "Missing required parameter 'repositoryCreate' when calling PluginsApi->CreatePlugin"); + + var localVarPath = "/plugins/{owner}"; + 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 (owner != null) localVarPathParams.Add("owner", this.Configuration.ApiClient.ParameterToString(owner)); // path parameter + if (repositoryCreate != null && repositoryCreate.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(repositoryCreate); // http body (model) parameter + } + else + { + localVarPostBody = repositoryCreate; // 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("CreatePlugin", 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 a Plugin Create a new plugin. + /// + /// Thrown when fails to make API call + /// + /// + /// Cancellation Token to cancel request (optional) + /// Task of CreatedContent + public async System.Threading.Tasks.Task CreatePluginAsync (string owner, RepositoryCreate repositoryCreate, CancellationToken cancellationToken = default(CancellationToken)) + { + ApiResponse localVarResponse = await CreatePluginWithHttpInfoAsync(owner, repositoryCreate, cancellationToken); + return localVarResponse.Data; + + } + + /// + /// Create a Plugin Create a new plugin. + /// + /// Thrown when fails to make API call + /// + /// + /// Cancellation Token to cancel request (optional) + /// Task of ApiResponse (CreatedContent) + public async System.Threading.Tasks.Task> CreatePluginWithHttpInfoAsync (string owner, RepositoryCreate repositoryCreate, CancellationToken cancellationToken = default(CancellationToken)) + { + // verify the required parameter 'owner' is set + if (owner == null) + throw new ApiException(400, "Missing required parameter 'owner' when calling PluginsApi->CreatePlugin"); + // verify the required parameter 'repositoryCreate' is set + if (repositoryCreate == null) + throw new ApiException(400, "Missing required parameter 'repositoryCreate' when calling PluginsApi->CreatePlugin"); + + var localVarPath = "/plugins/{owner}"; + 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 (owner != null) localVarPathParams.Add("owner", this.Configuration.ApiClient.ParameterToString(owner)); // path parameter + if (repositoryCreate != null && repositoryCreate.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(repositoryCreate); // http body (model) parameter + } + else + { + localVarPostBody = repositoryCreate; // 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("CreatePlugin", 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 a new Plugin package Create a new plugin package version + /// + /// Thrown when fails to make API call + /// + /// + /// + /// CreatedContent + public CreatedContent CreatePluginPackage (string owner, string name, NewPluginPackage newPluginPackage) + { + ApiResponse localVarResponse = CreatePluginPackageWithHttpInfo(owner, name, newPluginPackage); + return localVarResponse.Data; + } + + /// + /// Create a new Plugin package Create a new plugin package version + /// + /// Thrown when fails to make API call + /// + /// + /// + /// ApiResponse of CreatedContent + public ApiResponse CreatePluginPackageWithHttpInfo (string owner, string name, NewPluginPackage newPluginPackage) + { + // verify the required parameter 'owner' is set + if (owner == null) + throw new ApiException(400, "Missing required parameter 'owner' when calling PluginsApi->CreatePluginPackage"); + // verify the required parameter 'name' is set + if (name == null) + throw new ApiException(400, "Missing required parameter 'name' when calling PluginsApi->CreatePluginPackage"); + // verify the required parameter 'newPluginPackage' is set + if (newPluginPackage == null) + throw new ApiException(400, "Missing required parameter 'newPluginPackage' when calling PluginsApi->CreatePluginPackage"); + + var localVarPath = "/plugins/{owner}/{name}/tags"; + 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 (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 (newPluginPackage != null && newPluginPackage.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(newPluginPackage); // http body (model) parameter + } + else + { + localVarPostBody = newPluginPackage; // 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("CreatePluginPackage", 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 a new Plugin package Create a new plugin package version + /// + /// Thrown when fails to make API call + /// + /// + /// + /// Cancellation Token to cancel request (optional) + /// Task of CreatedContent + public async System.Threading.Tasks.Task CreatePluginPackageAsync (string owner, string name, NewPluginPackage newPluginPackage, CancellationToken cancellationToken = default(CancellationToken)) + { + ApiResponse localVarResponse = await CreatePluginPackageWithHttpInfoAsync(owner, name, newPluginPackage, cancellationToken); + return localVarResponse.Data; + + } + + /// + /// Create a new Plugin package Create a new plugin package version + /// + /// Thrown when fails to make API call + /// + /// + /// + /// Cancellation Token to cancel request (optional) + /// Task of ApiResponse (CreatedContent) + public async System.Threading.Tasks.Task> CreatePluginPackageWithHttpInfoAsync (string owner, string name, NewPluginPackage newPluginPackage, CancellationToken cancellationToken = default(CancellationToken)) + { + // verify the required parameter 'owner' is set + if (owner == null) + throw new ApiException(400, "Missing required parameter 'owner' when calling PluginsApi->CreatePluginPackage"); + // verify the required parameter 'name' is set + if (name == null) + throw new ApiException(400, "Missing required parameter 'name' when calling PluginsApi->CreatePluginPackage"); + // verify the required parameter 'newPluginPackage' is set + if (newPluginPackage == null) + throw new ApiException(400, "Missing required parameter 'newPluginPackage' when calling PluginsApi->CreatePluginPackage"); + + var localVarPath = "/plugins/{owner}/{name}/tags"; + 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 (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 (newPluginPackage != null && newPluginPackage.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(newPluginPackage); // http body (model) parameter + } + else + { + localVarPostBody = newPluginPackage; // 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("CreatePluginPackage", 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))); + } + + /// + /// Delete a Plugin Delete a plugin (must have `admin` permission) + /// + /// Thrown when fails to make API call + /// + /// + /// + public void DeletePlugin (string owner, string name) + { + DeletePluginWithHttpInfo(owner, name); + } + + /// + /// Delete a Plugin Delete a plugin (must have `admin` permission) + /// + /// Thrown when fails to make API call + /// + /// + /// ApiResponse of Object(void) + public ApiResponse DeletePluginWithHttpInfo (string owner, string name) + { + // verify the required parameter 'owner' is set + if (owner == null) + throw new ApiException(400, "Missing required parameter 'owner' when calling PluginsApi->DeletePlugin"); + // verify the required parameter 'name' is set + if (name == null) + throw new ApiException(400, "Missing required parameter 'name' when calling PluginsApi->DeletePlugin"); + + var localVarPath = "/plugins/{owner}/{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 (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 + + // 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("DeletePlugin", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + null); + } + + /// + /// Delete a Plugin Delete a plugin (must have `admin` permission) + /// + /// Thrown when fails to make API call + /// + /// + /// Cancellation Token to cancel request (optional) + /// Task of void + public async System.Threading.Tasks.Task DeletePluginAsync (string owner, string name, CancellationToken cancellationToken = default(CancellationToken)) + { + await DeletePluginWithHttpInfoAsync(owner, name, cancellationToken); + + } + + /// + /// Delete a Plugin Delete a plugin (must have `admin` permission) + /// + /// Thrown when fails to make API call + /// + /// + /// Cancellation Token to cancel request (optional) + /// Task of ApiResponse + public async System.Threading.Tasks.Task> DeletePluginWithHttpInfoAsync (string owner, string name, CancellationToken cancellationToken = default(CancellationToken)) + { + // verify the required parameter 'owner' is set + if (owner == null) + throw new ApiException(400, "Missing required parameter 'owner' when calling PluginsApi->DeletePlugin"); + // verify the required parameter 'name' is set + if (name == null) + throw new ApiException(400, "Missing required parameter 'name' when calling PluginsApi->DeletePlugin"); + + var localVarPath = "/plugins/{owner}/{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 (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 + + // 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("DeletePlugin", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + null); + } + + /// + /// Remove a Repository permissions Delete a plugin's access policy (must have `admin` permission) + /// + /// Thrown when fails to make API call + /// + /// + /// + /// + public void DeletePluginOrgPermission (string owner, string name, RepositoryPolicySubject repositoryPolicySubject) + { + DeletePluginOrgPermissionWithHttpInfo(owner, name, repositoryPolicySubject); + } + + /// + /// Remove a Repository permissions Delete a plugin's access policy (must have `admin` permission) + /// + /// Thrown when fails to make API call + /// + /// + /// + /// ApiResponse of Object(void) + public ApiResponse DeletePluginOrgPermissionWithHttpInfo (string owner, string name, RepositoryPolicySubject repositoryPolicySubject) + { + // verify the required parameter 'owner' is set + if (owner == null) + throw new ApiException(400, "Missing required parameter 'owner' when calling PluginsApi->DeletePluginOrgPermission"); + // verify the required parameter 'name' is set + if (name == null) + throw new ApiException(400, "Missing required parameter 'name' when calling PluginsApi->DeletePluginOrgPermission"); + // verify the required parameter 'repositoryPolicySubject' is set + if (repositoryPolicySubject == null) + throw new ApiException(400, "Missing required parameter 'repositoryPolicySubject' when calling PluginsApi->DeletePluginOrgPermission"); + + var localVarPath = "/plugins/{owner}/{name}/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 (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 (repositoryPolicySubject != null && repositoryPolicySubject.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(repositoryPolicySubject); // http body (model) parameter + } + else + { + localVarPostBody = repositoryPolicySubject; // 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("DeletePluginOrgPermission", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + null); + } + + /// + /// Remove a Repository permissions Delete a plugin's access policy (must have `admin` permission) + /// + /// Thrown when fails to make API call + /// + /// + /// + /// Cancellation Token to cancel request (optional) + /// Task of void + public async System.Threading.Tasks.Task DeletePluginOrgPermissionAsync (string owner, string name, RepositoryPolicySubject repositoryPolicySubject, CancellationToken cancellationToken = default(CancellationToken)) + { + await DeletePluginOrgPermissionWithHttpInfoAsync(owner, name, repositoryPolicySubject, cancellationToken); + + } + + /// + /// Remove a Repository permissions Delete a plugin's access policy (must have `admin` permission) + /// + /// Thrown when fails to make API call + /// + /// + /// + /// Cancellation Token to cancel request (optional) + /// Task of ApiResponse + public async System.Threading.Tasks.Task> DeletePluginOrgPermissionWithHttpInfoAsync (string owner, string name, RepositoryPolicySubject repositoryPolicySubject, CancellationToken cancellationToken = default(CancellationToken)) + { + // verify the required parameter 'owner' is set + if (owner == null) + throw new ApiException(400, "Missing required parameter 'owner' when calling PluginsApi->DeletePluginOrgPermission"); + // verify the required parameter 'name' is set + if (name == null) + throw new ApiException(400, "Missing required parameter 'name' when calling PluginsApi->DeletePluginOrgPermission"); + // verify the required parameter 'repositoryPolicySubject' is set + if (repositoryPolicySubject == null) + throw new ApiException(400, "Missing required parameter 'repositoryPolicySubject' when calling PluginsApi->DeletePluginOrgPermission"); + + var localVarPath = "/plugins/{owner}/{name}/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 (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 (repositoryPolicySubject != null && repositoryPolicySubject.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(repositoryPolicySubject); // http body (model) parameter + } + else + { + localVarPostBody = repositoryPolicySubject; // 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("DeletePluginOrgPermission", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + null); + } + + /// + /// Get a plugin Retrieve a plugin by name + /// + /// Thrown when fails to make API call + /// + /// + /// Repository + public Repository GetPlugin (string owner, string name) + { + ApiResponse localVarResponse = GetPluginWithHttpInfo(owner, name); + return localVarResponse.Data; + } + + /// + /// Get a plugin Retrieve a plugin by name + /// + /// Thrown when fails to make API call + /// + /// + /// ApiResponse of Repository + public ApiResponse GetPluginWithHttpInfo (string owner, string name) + { + // verify the required parameter 'owner' is set + if (owner == null) + throw new ApiException(400, "Missing required parameter 'owner' when calling PluginsApi->GetPlugin"); + // verify the required parameter 'name' is set + if (name == null) + throw new ApiException(400, "Missing required parameter 'name' when calling PluginsApi->GetPlugin"); + + var localVarPath = "/plugins/{owner}/{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 (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 + + // 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("GetPlugin", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (Repository) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Repository))); + } + + /// + /// Get a plugin Retrieve a plugin by name + /// + /// Thrown when fails to make API call + /// + /// + /// Cancellation Token to cancel request (optional) + /// Task of Repository + public async System.Threading.Tasks.Task GetPluginAsync (string owner, string name, CancellationToken cancellationToken = default(CancellationToken)) + { + ApiResponse localVarResponse = await GetPluginWithHttpInfoAsync(owner, name, cancellationToken); + return localVarResponse.Data; + + } + + /// + /// Get a plugin Retrieve a plugin by name + /// + /// Thrown when fails to make API call + /// + /// + /// Cancellation Token to cancel request (optional) + /// Task of ApiResponse (Repository) + public async System.Threading.Tasks.Task> GetPluginWithHttpInfoAsync (string owner, string name, CancellationToken cancellationToken = default(CancellationToken)) + { + // verify the required parameter 'owner' is set + if (owner == null) + throw new ApiException(400, "Missing required parameter 'owner' when calling PluginsApi->GetPlugin"); + // verify the required parameter 'name' is set + if (name == null) + throw new ApiException(400, "Missing required parameter 'name' when calling PluginsApi->GetPlugin"); + + var localVarPath = "/plugins/{owner}/{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 (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 + + // 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("GetPlugin", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (Repository) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Repository))); + } + + /// + /// Get plugin access permissions Retrieve a plugin's access permissions (must have `write` permission) + /// + /// Thrown when fails to make API call + /// + /// + /// Page number starting from 1 (optional, default to 1) + /// Number of items per page (optional, default to 25) + /// The type of access policy subject (optional) + /// An access policy permission string (optional) + /// RepositoryAccessPolicyList + public RepositoryAccessPolicyList GetPluginAccessPermissions (string owner, string name, int? page = default, int? perPage = default, List subjectType = default, List permission = default) + { + ApiResponse localVarResponse = GetPluginAccessPermissionsWithHttpInfo(owner, name, page, perPage, subjectType, permission); + return localVarResponse.Data; + } + + /// + /// Get plugin access permissions Retrieve a plugin's access permissions (must have `write` permission) + /// + /// Thrown when fails to make API call + /// + /// + /// Page number starting from 1 (optional, default to 1) + /// Number of items per page (optional, default to 25) + /// The type of access policy subject (optional) + /// An access policy permission string (optional) + /// ApiResponse of RepositoryAccessPolicyList + public ApiResponse GetPluginAccessPermissionsWithHttpInfo (string owner, string name, int? page = default, int? perPage = default, List subjectType = default, List permission = default) + { + // verify the required parameter 'owner' is set + if (owner == null) + throw new ApiException(400, "Missing required parameter 'owner' when calling PluginsApi->GetPluginAccessPermissions"); + // verify the required parameter 'name' is set + if (name == null) + throw new ApiException(400, "Missing required parameter 'name' when calling PluginsApi->GetPluginAccessPermissions"); + + var localVarPath = "/plugins/{owner}/{name}/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[] { + }; + 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 (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 + if (subjectType != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("multi", "subject_type", subjectType)); // query parameter + if (permission != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("multi", "permission", permission)); // 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("GetPluginAccessPermissions", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (RepositoryAccessPolicyList) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(RepositoryAccessPolicyList))); + } + + /// + /// Get plugin access permissions Retrieve a plugin's access permissions (must have `write` permission) + /// + /// Thrown when fails to make API call + /// + /// + /// Page number starting from 1 (optional, default to 1) + /// Number of items per page (optional, default to 25) + /// The type of access policy subject (optional) + /// An access policy permission string (optional) + /// Cancellation Token to cancel request (optional) + /// Task of RepositoryAccessPolicyList + public async System.Threading.Tasks.Task GetPluginAccessPermissionsAsync (string owner, string name, int? page = default, int? perPage = default, List subjectType = default, List permission = default, CancellationToken cancellationToken = default(CancellationToken)) + { + ApiResponse localVarResponse = await GetPluginAccessPermissionsWithHttpInfoAsync(owner, name, page, perPage, subjectType, permission, cancellationToken); + return localVarResponse.Data; + + } + + /// + /// Get plugin access permissions Retrieve a plugin's access permissions (must have `write` permission) + /// + /// Thrown when fails to make API call + /// + /// + /// Page number starting from 1 (optional, default to 1) + /// Number of items per page (optional, default to 25) + /// The type of access policy subject (optional) + /// An access policy permission string (optional) + /// Cancellation Token to cancel request (optional) + /// Task of ApiResponse (RepositoryAccessPolicyList) + public async System.Threading.Tasks.Task> GetPluginAccessPermissionsWithHttpInfoAsync (string owner, string name, int? page = default, int? perPage = default, List subjectType = default, List permission = default, CancellationToken cancellationToken = default(CancellationToken)) + { + // verify the required parameter 'owner' is set + if (owner == null) + throw new ApiException(400, "Missing required parameter 'owner' when calling PluginsApi->GetPluginAccessPermissions"); + // verify the required parameter 'name' is set + if (name == null) + throw new ApiException(400, "Missing required parameter 'name' when calling PluginsApi->GetPluginAccessPermissions"); + + var localVarPath = "/plugins/{owner}/{name}/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[] { + }; + 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 (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 + if (subjectType != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("multi", "subject_type", subjectType)); // query parameter + if (permission != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("multi", "permission", permission)); // 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("GetPluginAccessPermissions", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (RepositoryAccessPolicyList) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(RepositoryAccessPolicyList))); + } + + /// + /// Get a plugin tag Retrieve a plugin tag by name and tag + /// + /// Thrown when fails to make API call + /// + /// + /// + /// PluginPackage + public PluginPackage GetPluginByTag (string owner, string name, string tag) + { + ApiResponse localVarResponse = GetPluginByTagWithHttpInfo(owner, name, tag); + return localVarResponse.Data; + } + + /// + /// Get a plugin tag Retrieve a plugin tag by name and tag + /// + /// Thrown when fails to make API call + /// + /// + /// + /// ApiResponse of PluginPackage + public ApiResponse GetPluginByTagWithHttpInfo (string owner, string name, string tag) + { + // verify the required parameter 'owner' is set + if (owner == null) + throw new ApiException(400, "Missing required parameter 'owner' when calling PluginsApi->GetPluginByTag"); + // verify the required parameter 'name' is set + if (name == null) + throw new ApiException(400, "Missing required parameter 'name' when calling PluginsApi->GetPluginByTag"); + // verify the required parameter 'tag' is set + if (tag == null) + throw new ApiException(400, "Missing required parameter 'tag' when calling PluginsApi->GetPluginByTag"); + + var localVarPath = "/plugins/{owner}/{name}/tags/{tag}"; + 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 (tag != null) localVarPathParams.Add("tag", this.Configuration.ApiClient.ParameterToString(tag)); // 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("GetPluginByTag", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (PluginPackage) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(PluginPackage))); + } + + /// + /// Get a plugin tag Retrieve a plugin tag by name and tag + /// + /// Thrown when fails to make API call + /// + /// + /// + /// Cancellation Token to cancel request (optional) + /// Task of PluginPackage + public async System.Threading.Tasks.Task GetPluginByTagAsync (string owner, string name, string tag, CancellationToken cancellationToken = default(CancellationToken)) + { + ApiResponse localVarResponse = await GetPluginByTagWithHttpInfoAsync(owner, name, tag, cancellationToken); + return localVarResponse.Data; + + } + + /// + /// Get a plugin tag Retrieve a plugin tag by name and tag + /// + /// Thrown when fails to make API call + /// + /// + /// + /// Cancellation Token to cancel request (optional) + /// Task of ApiResponse (PluginPackage) + public async System.Threading.Tasks.Task> GetPluginByTagWithHttpInfoAsync (string owner, string name, string tag, CancellationToken cancellationToken = default(CancellationToken)) + { + // verify the required parameter 'owner' is set + if (owner == null) + throw new ApiException(400, "Missing required parameter 'owner' when calling PluginsApi->GetPluginByTag"); + // verify the required parameter 'name' is set + if (name == null) + throw new ApiException(400, "Missing required parameter 'name' when calling PluginsApi->GetPluginByTag"); + // verify the required parameter 'tag' is set + if (tag == null) + throw new ApiException(400, "Missing required parameter 'tag' when calling PluginsApi->GetPluginByTag"); + + var localVarPath = "/plugins/{owner}/{name}/tags/{tag}"; + 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 (tag != null) localVarPathParams.Add("tag", this.Configuration.ApiClient.ParameterToString(tag)); // 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("GetPluginByTag", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (PluginPackage) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(PluginPackage))); + } + + /// + /// Get a plugin tags Retrieve a plugin by name + /// + /// Thrown when fails to make API call + /// + /// + /// Key to sort the list by (optional) + /// The order to sort the list (optional) + /// 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) + { + ApiResponse localVarResponse = ListPluginTagsWithHttpInfo(owner, name, sortBy, sortOrder, page, perPage); + return localVarResponse.Data; + } + + /// + /// Get a plugin tags Retrieve a plugin by name + /// + /// Thrown when fails to make API call + /// + /// + /// Key to sort the list by (optional) + /// The order to sort the list (optional) + /// 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) + { + // verify the required parameter 'owner' is set + if (owner == null) + throw new ApiException(400, "Missing required parameter 'owner' when calling PluginsApi->ListPluginTags"); + // verify the required parameter 'name' is set + if (name == null) + throw new ApiException(400, "Missing required parameter 'name' when calling PluginsApi->ListPluginTags"); + + var localVarPath = "/plugins/{owner}/{name}/tags"; + 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 (sortBy != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "sort_by", sortBy)); // query parameter + if (sortOrder != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "sort_order", sortOrder)); // 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("ListPluginTags", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (PluginPackageList) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(PluginPackageList))); + } + + /// + /// Get a plugin tags Retrieve a plugin by name + /// + /// Thrown when fails to make API call + /// + /// + /// Key to sort the list by (optional) + /// The order to sort the list (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 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)) + { + ApiResponse localVarResponse = await ListPluginTagsWithHttpInfoAsync(owner, name, sortBy, sortOrder, page, perPage, cancellationToken); + return localVarResponse.Data; + + } + + /// + /// Get a plugin tags Retrieve a plugin by name + /// + /// Thrown when fails to make API call + /// + /// + /// Key to sort the list by (optional) + /// The order to sort the list (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 (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)) + { + // verify the required parameter 'owner' is set + if (owner == null) + throw new ApiException(400, "Missing required parameter 'owner' when calling PluginsApi->ListPluginTags"); + // verify the required parameter 'name' is set + if (name == null) + throw new ApiException(400, "Missing required parameter 'name' when calling PluginsApi->ListPluginTags"); + + var localVarPath = "/plugins/{owner}/{name}/tags"; + 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 (sortBy != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "sort_by", sortBy)); // query parameter + if (sortOrder != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "sort_order", sortOrder)); // 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("ListPluginTags", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (PluginPackageList) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(PluginPackageList))); + } + + /// + /// List plugins + /// + /// Thrown when fails to make API call + /// You know, for search (optional) + /// The account name (optional) + /// Owner of the project (optional) + /// Boolean check for public/private projects (optional) + /// A keyword to index the repository by (optional) + /// Filter by permission on given resource (optional) + /// Key to sort the list by (optional) + /// The order to sort the list (optional) + /// 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) + { + ApiResponse localVarResponse = ListPluginsWithHttpInfo(search, name, owner, _public, keyword, permission, sortBy, sortOrder, page, perPage); + return localVarResponse.Data; + } + + /// + /// List plugins + /// + /// Thrown when fails to make API call + /// You know, for search (optional) + /// The account name (optional) + /// Owner of the project (optional) + /// Boolean check for public/private projects (optional) + /// A keyword to index the repository by (optional) + /// Filter by permission on given resource (optional) + /// Key to sort the list by (optional) + /// The order to sort the list (optional) + /// 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) + { + + var localVarPath = "/plugins"; + 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 (search != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("multi", "search", search)); // query parameter + if (name != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("multi", "name", name)); // query parameter + if (owner != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("multi", "owner", owner)); // query parameter + if (_public != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "public", _public)); // query parameter + if (keyword != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("multi", "keyword", keyword)); // query parameter + if (permission != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("multi", "permission", permission)); // query parameter + if (sortBy != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "sort_by", sortBy)); // query parameter + if (sortOrder != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "sort_order", sortOrder)); // 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("ListPlugins", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (RepositoryList) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(RepositoryList))); + } + + /// + /// List plugins + /// + /// Thrown when fails to make API call + /// You know, for search (optional) + /// The account name (optional) + /// Owner of the project (optional) + /// Boolean check for public/private projects (optional) + /// A keyword to index the repository by (optional) + /// Filter by permission on given resource (optional) + /// Key to sort the list by (optional) + /// The order to sort the list (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 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)) + { + ApiResponse localVarResponse = await ListPluginsWithHttpInfoAsync(search, name, owner, _public, keyword, permission, sortBy, sortOrder, page, perPage, cancellationToken); + return localVarResponse.Data; + + } + + /// + /// List plugins + /// + /// Thrown when fails to make API call + /// You know, for search (optional) + /// The account name (optional) + /// Owner of the project (optional) + /// Boolean check for public/private projects (optional) + /// A keyword to index the repository by (optional) + /// Filter by permission on given resource (optional) + /// Key to sort the list by (optional) + /// The order to sort the list (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 (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)) + { + + var localVarPath = "/plugins"; + 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 (search != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("multi", "search", search)); // query parameter + if (name != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("multi", "name", name)); // query parameter + if (owner != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("multi", "owner", owner)); // query parameter + if (_public != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "public", _public)); // query parameter + if (keyword != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("multi", "keyword", keyword)); // query parameter + if (permission != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("multi", "permission", permission)); // query parameter + if (sortBy != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "sort_by", sortBy)); // query parameter + if (sortOrder != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "sort_order", sortOrder)); // 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("ListPlugins", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (RepositoryList) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(RepositoryList))); + } + + /// + /// Update a Plugin Update a plugin (must have `contribute` permission) + /// + /// Thrown when fails to make API call + /// + /// + /// + /// UpdateAccepted + public UpdateAccepted UpdatePlugin (string owner, string name, RepositoryUpdate repositoryUpdate) + { + ApiResponse localVarResponse = UpdatePluginWithHttpInfo(owner, name, repositoryUpdate); + return localVarResponse.Data; + } + + /// + /// Update a Plugin Update a plugin (must have `contribute` permission) + /// + /// Thrown when fails to make API call + /// + /// + /// + /// ApiResponse of UpdateAccepted + public ApiResponse UpdatePluginWithHttpInfo (string owner, string name, RepositoryUpdate repositoryUpdate) + { + // verify the required parameter 'owner' is set + if (owner == null) + throw new ApiException(400, "Missing required parameter 'owner' when calling PluginsApi->UpdatePlugin"); + // verify the required parameter 'name' is set + if (name == null) + throw new ApiException(400, "Missing required parameter 'name' when calling PluginsApi->UpdatePlugin"); + // verify the required parameter 'repositoryUpdate' is set + if (repositoryUpdate == null) + throw new ApiException(400, "Missing required parameter 'repositoryUpdate' when calling PluginsApi->UpdatePlugin"); + + var localVarPath = "/plugins/{owner}/{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[] { + "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 (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 (repositoryUpdate != null && repositoryUpdate.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(repositoryUpdate); // http body (model) parameter + } + else + { + localVarPostBody = repositoryUpdate; // 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("UpdatePlugin", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (UpdateAccepted) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(UpdateAccepted))); + } + + /// + /// Update a Plugin Update a plugin (must have `contribute` permission) + /// + /// Thrown when fails to make API call + /// + /// + /// + /// Cancellation Token to cancel request (optional) + /// Task of UpdateAccepted + public async System.Threading.Tasks.Task UpdatePluginAsync (string owner, string name, RepositoryUpdate repositoryUpdate, CancellationToken cancellationToken = default(CancellationToken)) + { + ApiResponse localVarResponse = await UpdatePluginWithHttpInfoAsync(owner, name, repositoryUpdate, cancellationToken); + return localVarResponse.Data; + + } + + /// + /// Update a Plugin Update a plugin (must have `contribute` permission) + /// + /// Thrown when fails to make API call + /// + /// + /// + /// Cancellation Token to cancel request (optional) + /// Task of ApiResponse (UpdateAccepted) + public async System.Threading.Tasks.Task> UpdatePluginWithHttpInfoAsync (string owner, string name, RepositoryUpdate repositoryUpdate, CancellationToken cancellationToken = default(CancellationToken)) + { + // verify the required parameter 'owner' is set + if (owner == null) + throw new ApiException(400, "Missing required parameter 'owner' when calling PluginsApi->UpdatePlugin"); + // verify the required parameter 'name' is set + if (name == null) + throw new ApiException(400, "Missing required parameter 'name' when calling PluginsApi->UpdatePlugin"); + // verify the required parameter 'repositoryUpdate' is set + if (repositoryUpdate == null) + throw new ApiException(400, "Missing required parameter 'repositoryUpdate' when calling PluginsApi->UpdatePlugin"); + + var localVarPath = "/plugins/{owner}/{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[] { + "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 (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 (repositoryUpdate != null && repositoryUpdate.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(repositoryUpdate); // http body (model) parameter + } + else + { + localVarPostBody = repositoryUpdate; // 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("UpdatePlugin", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (UpdateAccepted) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(UpdateAccepted))); + } + + /// + /// Upsert a new permission to a plugin Upsert a plugin's access policy (must have `admin` permission) + /// + /// Thrown when fails to make API call + /// + /// + /// + /// UpdateAccepted + public UpdateAccepted UpsertPluginPermission (string owner, string name, RepositoryAccessPolicy repositoryAccessPolicy) + { + ApiResponse localVarResponse = UpsertPluginPermissionWithHttpInfo(owner, name, repositoryAccessPolicy); + return localVarResponse.Data; + } + + /// + /// Upsert a new permission to a plugin Upsert a plugin's access policy (must have `admin` permission) + /// + /// Thrown when fails to make API call + /// + /// + /// + /// ApiResponse of UpdateAccepted + public ApiResponse UpsertPluginPermissionWithHttpInfo (string owner, string name, RepositoryAccessPolicy repositoryAccessPolicy) + { + // verify the required parameter 'owner' is set + if (owner == null) + throw new ApiException(400, "Missing required parameter 'owner' when calling PluginsApi->UpsertPluginPermission"); + // verify the required parameter 'name' is set + if (name == null) + throw new ApiException(400, "Missing required parameter 'name' when calling PluginsApi->UpsertPluginPermission"); + // verify the required parameter 'repositoryAccessPolicy' is set + if (repositoryAccessPolicy == null) + throw new ApiException(400, "Missing required parameter 'repositoryAccessPolicy' when calling PluginsApi->UpsertPluginPermission"); + + var localVarPath = "/plugins/{owner}/{name}/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 (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 (repositoryAccessPolicy != null && repositoryAccessPolicy.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(repositoryAccessPolicy); // http body (model) parameter + } + else + { + localVarPostBody = repositoryAccessPolicy; // 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("UpsertPluginPermission", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (UpdateAccepted) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(UpdateAccepted))); + } + + /// + /// Upsert a new permission to a plugin Upsert a plugin's access policy (must have `admin` permission) + /// + /// Thrown when fails to make API call + /// + /// + /// + /// Cancellation Token to cancel request (optional) + /// Task of UpdateAccepted + public async System.Threading.Tasks.Task UpsertPluginPermissionAsync (string owner, string name, RepositoryAccessPolicy repositoryAccessPolicy, CancellationToken cancellationToken = default(CancellationToken)) + { + ApiResponse localVarResponse = await UpsertPluginPermissionWithHttpInfoAsync(owner, name, repositoryAccessPolicy, cancellationToken); + return localVarResponse.Data; + + } + + /// + /// Upsert a new permission to a plugin Upsert a plugin's access policy (must have `admin` permission) + /// + /// Thrown when fails to make API call + /// + /// + /// + /// Cancellation Token to cancel request (optional) + /// Task of ApiResponse (UpdateAccepted) + public async System.Threading.Tasks.Task> UpsertPluginPermissionWithHttpInfoAsync (string owner, string name, RepositoryAccessPolicy repositoryAccessPolicy, CancellationToken cancellationToken = default(CancellationToken)) + { + // verify the required parameter 'owner' is set + if (owner == null) + throw new ApiException(400, "Missing required parameter 'owner' when calling PluginsApi->UpsertPluginPermission"); + // verify the required parameter 'name' is set + if (name == null) + throw new ApiException(400, "Missing required parameter 'name' when calling PluginsApi->UpsertPluginPermission"); + // verify the required parameter 'repositoryAccessPolicy' is set + if (repositoryAccessPolicy == null) + throw new ApiException(400, "Missing required parameter 'repositoryAccessPolicy' when calling PluginsApi->UpsertPluginPermission"); + + var localVarPath = "/plugins/{owner}/{name}/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 (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 (repositoryAccessPolicy != null && repositoryAccessPolicy.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(repositoryAccessPolicy); // http body (model) parameter + } + else + { + localVarPostBody = repositoryAccessPolicy; // 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("UpsertPluginPermission", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (UpdateAccepted) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(UpdateAccepted))); + } + + } +} diff --git a/src/PollinationSDK/Api/ProjectsApi.cs b/src/PollinationSDK/Api/ProjectsApi.cs new file mode 100644 index 000000000..083d2e945 --- /dev/null +++ b/src/PollinationSDK/Api/ProjectsApi.cs @@ -0,0 +1,3041 @@ +/* + * 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 IProjectsApi : IApiAccessor + { + #region Synchronous Operations + /// + /// Create a Project + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + /// CreatedContent + CreatedContent CreateProject (string owner, ProjectCreate projectCreate); + + /// + /// Create a Project + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + /// ApiResponse of CreatedContent + ApiResponse CreateProjectWithHttpInfo (string owner, ProjectCreate projectCreate); + /// + /// Upsert a recipe filter to a project + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + /// + /// ProjectRecipeFilter + ProjectRecipeFilter CreateProjectRecipeFilter (string owner, string name, ProjectRecipeFilter projectRecipeFilter); + + /// + /// Upsert a recipe filter to a project + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + /// + /// ApiResponse of ProjectRecipeFilter + ApiResponse CreateProjectRecipeFilterWithHttpInfo (string owner, string name, ProjectRecipeFilter projectRecipeFilter); + /// + /// Delete a Project + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + /// + void DeleteProject (string owner, string name); + + /// + /// Delete a Project + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + /// ApiResponse of Object(void) + ApiResponse DeleteProjectWithHttpInfo (string owner, string name); + /// + /// Remove a Project permissions + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + /// + /// + void DeleteProjectOrgPermission (string owner, string name, ProjectPolicySubject projectPolicySubject); + + /// + /// Remove a Project permissions + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + /// + /// ApiResponse of Object(void) + ApiResponse DeleteProjectOrgPermissionWithHttpInfo (string owner, string name, ProjectPolicySubject projectPolicySubject); + /// + /// Remove a Project recipe filter + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + /// + /// + void DeleteProjectRecipeFilter (string owner, string name, ProjectRecipeFilter projectRecipeFilter); + + /// + /// Remove a Project recipe filter + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + /// + /// ApiResponse of Object(void) + ApiResponse DeleteProjectRecipeFilterWithHttpInfo (string owner, string name, ProjectRecipeFilter projectRecipeFilter); + /// + /// Get a project + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + /// Project + Project GetProject (string owner, string name); + + /// + /// Get a project + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + /// ApiResponse of Project + ApiResponse GetProjectWithHttpInfo (string owner, string name); + /// + /// Get project access permissions + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + /// Page number starting from 1 (optional, default to 1) + /// Number of items per page (optional, default to 25) + /// The type of access policy subject (optional) + /// An access policy permission string (optional) + /// ProjectAccessPolicyList + ProjectAccessPolicyList GetProjectAccessPermissions (string owner, string name, int? page = default, int? perPage = default, List subjectType = default, List permission = default); + + /// + /// Get project access permissions + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + /// Page number starting from 1 (optional, default to 1) + /// Number of items per page (optional, default to 25) + /// The type of access policy subject (optional) + /// An access policy permission string (optional) + /// ApiResponse of ProjectAccessPolicyList + ApiResponse GetProjectAccessPermissionsWithHttpInfo (string owner, string name, int? page = default, int? perPage = default, List subjectType = default, List permission = default); + /// + /// Get project recipe filters + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + /// Page number starting from 1 (optional, default to 1) + /// Number of items per page (optional, default to 25) + /// ProjectRecipeFilterList + ProjectRecipeFilterList GetProjectRecipeFilters (string owner, string name, int? page = default, int? perPage = default); + + /// + /// Get project recipe filters + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + /// Page number starting from 1 (optional, default to 1) + /// Number of items per page (optional, default to 25) + /// ApiResponse of ProjectRecipeFilterList + ApiResponse GetProjectRecipeFiltersWithHttpInfo (string owner, string name, int? page = default, int? perPage = default); + /// + /// Get project recipes + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + /// Search string to find recipes (optional) + /// Page number starting from 1 (optional, default to 1) + /// Number of items per page (optional, default to 25) + /// RecipeInterfaceList + RecipeInterfaceList GetProjectRecipes (string owner, string name, string search = default, int? page = default, int? perPage = default); + + /// + /// Get project recipes + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + /// Search string to find recipes (optional) + /// Page number starting from 1 (optional, default to 1) + /// Number of items per page (optional, default to 25) + /// ApiResponse of RecipeInterfaceList + ApiResponse GetProjectRecipesWithHttpInfo (string owner, string name, string search = default, int? page = default, int? perPage = default); + /// + /// List Projects + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Search string to find projects (optional) + /// The ID of a project to search for (optional) + /// The name of the project (optional) + /// Owner of the project (optional) + /// Boolean check for public/private projects (optional) + /// Filter by permission on given resource (optional) + /// Key to sort the list by (optional) + /// The order to sort the list (optional) + /// 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); + + /// + /// List Projects + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Search string to find projects (optional) + /// The ID of a project to search for (optional) + /// The name of the project (optional) + /// Owner of the project (optional) + /// Boolean check for public/private projects (optional) + /// Filter by permission on given resource (optional) + /// Key to sort the list by (optional) + /// The order to sort the list (optional) + /// 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); + /// + /// Update a Project + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + /// + /// UpdateAccepted + UpdateAccepted Update (string owner, string name, ProjectUpdate projectUpdate); + + /// + /// Update a Project + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + /// + /// ApiResponse of UpdateAccepted + ApiResponse UpdateWithHttpInfo (string owner, string name, ProjectUpdate projectUpdate); + /// + /// Upsert a new permission to a project + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + /// + /// UpdateAccepted + UpdateAccepted UpsertProjectPermission (string owner, string name, ProjectAccessPolicy projectAccessPolicy); + + /// + /// Upsert a new permission to a project + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + /// + /// ApiResponse of UpdateAccepted + ApiResponse UpsertProjectPermissionWithHttpInfo (string owner, string name, ProjectAccessPolicy projectAccessPolicy); + #endregion Synchronous Operations + #region Asynchronous Operations + /// + /// Create a Project + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + /// Cancellation Token to cancel request (optional) + /// Task of CreatedContent + System.Threading.Tasks.Task CreateProjectAsync (string owner, ProjectCreate projectCreate, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// Create a Project + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + /// Cancellation Token to cancel request (optional) + /// Task of ApiResponse (CreatedContent) + System.Threading.Tasks.Task> CreateProjectWithHttpInfoAsync (string owner, ProjectCreate projectCreate, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Upsert a recipe filter to a project + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + /// + /// Cancellation Token to cancel request (optional) + /// Task of ProjectRecipeFilter + System.Threading.Tasks.Task CreateProjectRecipeFilterAsync (string owner, string name, ProjectRecipeFilter projectRecipeFilter, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// Upsert a recipe filter to a project + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + /// + /// Cancellation Token to cancel request (optional) + /// Task of ApiResponse (ProjectRecipeFilter) + System.Threading.Tasks.Task> CreateProjectRecipeFilterWithHttpInfoAsync (string owner, string name, ProjectRecipeFilter projectRecipeFilter, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Delete a Project + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + /// Cancellation Token to cancel request (optional) + /// Task of void + System.Threading.Tasks.Task DeleteProjectAsync (string owner, string name, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// Delete a Project + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + /// Cancellation Token to cancel request (optional) + /// Task of ApiResponse + System.Threading.Tasks.Task> DeleteProjectWithHttpInfoAsync (string owner, string name, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Remove a Project permissions + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + /// + /// Cancellation Token to cancel request (optional) + /// Task of void + System.Threading.Tasks.Task DeleteProjectOrgPermissionAsync (string owner, string name, ProjectPolicySubject projectPolicySubject, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// Remove a Project permissions + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + /// + /// Cancellation Token to cancel request (optional) + /// Task of ApiResponse + System.Threading.Tasks.Task> DeleteProjectOrgPermissionWithHttpInfoAsync (string owner, string name, ProjectPolicySubject projectPolicySubject, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Remove a Project recipe filter + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + /// + /// Cancellation Token to cancel request (optional) + /// Task of void + System.Threading.Tasks.Task DeleteProjectRecipeFilterAsync (string owner, string name, ProjectRecipeFilter projectRecipeFilter, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// Remove a Project recipe filter + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + /// + /// Cancellation Token to cancel request (optional) + /// Task of ApiResponse + System.Threading.Tasks.Task> DeleteProjectRecipeFilterWithHttpInfoAsync (string owner, string name, ProjectRecipeFilter projectRecipeFilter, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Get a project + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + /// Cancellation Token to cancel request (optional) + /// Task of Project + System.Threading.Tasks.Task GetProjectAsync (string owner, string name, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// Get a project + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + /// Cancellation Token to cancel request (optional) + /// Task of ApiResponse (Project) + System.Threading.Tasks.Task> GetProjectWithHttpInfoAsync (string owner, string name, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Get project access permissions + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + /// Page number starting from 1 (optional, default to 1) + /// Number of items per page (optional, default to 25) + /// The type of access policy subject (optional) + /// An access policy permission string (optional) + /// Cancellation Token to cancel request (optional) + /// Task of ProjectAccessPolicyList + System.Threading.Tasks.Task GetProjectAccessPermissionsAsync (string owner, string name, int? page = default, int? perPage = default, List subjectType = default, List permission = default, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// Get project access permissions + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + /// Page number starting from 1 (optional, default to 1) + /// Number of items per page (optional, default to 25) + /// The type of access policy subject (optional) + /// An access policy permission string (optional) + /// Cancellation Token to cancel request (optional) + /// Task of ApiResponse (ProjectAccessPolicyList) + System.Threading.Tasks.Task> GetProjectAccessPermissionsWithHttpInfoAsync (string owner, string name, int? page = default, int? perPage = default, List subjectType = default, List permission = default, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Get project recipe filters + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + /// 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 ProjectRecipeFilterList + System.Threading.Tasks.Task GetProjectRecipeFiltersAsync (string owner, string name, int? page = default, int? perPage = default, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// Get project recipe filters + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + /// 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 (ProjectRecipeFilterList) + System.Threading.Tasks.Task> GetProjectRecipeFiltersWithHttpInfoAsync (string owner, string name, int? page = default, int? perPage = default, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Get project recipes + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + /// Search string to find recipes (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 RecipeInterfaceList + System.Threading.Tasks.Task GetProjectRecipesAsync (string owner, string name, string search = default, int? page = default, int? perPage = default, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// Get project recipes + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + /// Search string to find recipes (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 (RecipeInterfaceList) + System.Threading.Tasks.Task> GetProjectRecipesWithHttpInfoAsync (string owner, string name, string search = default, int? page = default, int? perPage = default, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// List Projects + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Search string to find projects (optional) + /// The ID of a project to search for (optional) + /// The name of the project (optional) + /// Owner of the project (optional) + /// Boolean check for public/private projects (optional) + /// Filter by permission on given resource (optional) + /// Key to sort the list by (optional) + /// The order to sort the list (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 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)); + + /// + /// List Projects + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Search string to find projects (optional) + /// The ID of a project to search for (optional) + /// The name of the project (optional) + /// Owner of the project (optional) + /// Boolean check for public/private projects (optional) + /// Filter by permission on given resource (optional) + /// Key to sort the list by (optional) + /// The order to sort the list (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 (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)); + /// + /// Update a Project + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + /// + /// Cancellation Token to cancel request (optional) + /// Task of UpdateAccepted + System.Threading.Tasks.Task UpdateAsync (string owner, string name, ProjectUpdate projectUpdate, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// Update a Project + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + /// + /// Cancellation Token to cancel request (optional) + /// Task of ApiResponse (UpdateAccepted) + System.Threading.Tasks.Task> UpdateWithHttpInfoAsync (string owner, string name, ProjectUpdate projectUpdate, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Upsert a new permission to a project + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + /// + /// Cancellation Token to cancel request (optional) + /// Task of UpdateAccepted + System.Threading.Tasks.Task UpsertProjectPermissionAsync (string owner, string name, ProjectAccessPolicy projectAccessPolicy, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// Upsert a new permission to a project + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + /// + /// Cancellation Token to cancel request (optional) + /// Task of ApiResponse (UpdateAccepted) + System.Threading.Tasks.Task> UpsertProjectPermissionWithHttpInfoAsync (string owner, string name, ProjectAccessPolicy projectAccessPolicy, CancellationToken cancellationToken = default(CancellationToken)); + #endregion Asynchronous Operations + } + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public partial class ProjectsApi : IProjectsApi + { + private PollinationSDK.Client.ExceptionFactory _exceptionFactory = (name, response) => null; + + /// + /// Initializes a new instance of the class. + /// + /// + public ProjectsApi(String basePath) + { + this.Configuration = new PollinationSDK.Client.Configuration { BasePath = basePath }; + + ExceptionFactory = PollinationSDK.Client.Configuration.DefaultExceptionFactory; + } + + /// + /// Initializes a new instance of the class + /// + /// + public ProjectsApi() + { + 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 ProjectsApi(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; } + } + + /// + /// Create a Project + /// + /// Thrown when fails to make API call + /// + /// + /// CreatedContent + public CreatedContent CreateProject (string owner, ProjectCreate projectCreate) + { + ApiResponse localVarResponse = CreateProjectWithHttpInfo(owner, projectCreate); + return localVarResponse.Data; + } + + /// + /// Create a Project + /// + /// Thrown when fails to make API call + /// + /// + /// ApiResponse of CreatedContent + public ApiResponse CreateProjectWithHttpInfo (string owner, ProjectCreate projectCreate) + { + // verify the required parameter 'owner' is set + if (owner == null) + throw new ApiException(400, "Missing required parameter 'owner' when calling ProjectsApi->CreateProject"); + // verify the required parameter 'projectCreate' is set + if (projectCreate == null) + throw new ApiException(400, "Missing required parameter 'projectCreate' when calling ProjectsApi->CreateProject"); + + var localVarPath = "/projects/{owner}"; + 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 (owner != null) localVarPathParams.Add("owner", this.Configuration.ApiClient.ParameterToString(owner)); // path parameter + if (projectCreate != null && projectCreate.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(projectCreate); // http body (model) parameter + } + else + { + localVarPostBody = projectCreate; // 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("CreateProject", 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 a Project + /// + /// Thrown when fails to make API call + /// + /// + /// Cancellation Token to cancel request (optional) + /// Task of CreatedContent + public async System.Threading.Tasks.Task CreateProjectAsync (string owner, ProjectCreate projectCreate, CancellationToken cancellationToken = default(CancellationToken)) + { + ApiResponse localVarResponse = await CreateProjectWithHttpInfoAsync(owner, projectCreate, cancellationToken); + return localVarResponse.Data; + + } + + /// + /// Create a Project + /// + /// Thrown when fails to make API call + /// + /// + /// Cancellation Token to cancel request (optional) + /// Task of ApiResponse (CreatedContent) + public async System.Threading.Tasks.Task> CreateProjectWithHttpInfoAsync (string owner, ProjectCreate projectCreate, CancellationToken cancellationToken = default(CancellationToken)) + { + // verify the required parameter 'owner' is set + if (owner == null) + throw new ApiException(400, "Missing required parameter 'owner' when calling ProjectsApi->CreateProject"); + // verify the required parameter 'projectCreate' is set + if (projectCreate == null) + throw new ApiException(400, "Missing required parameter 'projectCreate' when calling ProjectsApi->CreateProject"); + + var localVarPath = "/projects/{owner}"; + 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 (owner != null) localVarPathParams.Add("owner", this.Configuration.ApiClient.ParameterToString(owner)); // path parameter + if (projectCreate != null && projectCreate.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(projectCreate); // http body (model) parameter + } + else + { + localVarPostBody = projectCreate; // 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("CreateProject", 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))); + } + + /// + /// Upsert a recipe filter to a project + /// + /// Thrown when fails to make API call + /// + /// + /// + /// ProjectRecipeFilter + public ProjectRecipeFilter CreateProjectRecipeFilter (string owner, string name, ProjectRecipeFilter projectRecipeFilter) + { + ApiResponse localVarResponse = CreateProjectRecipeFilterWithHttpInfo(owner, name, projectRecipeFilter); + return localVarResponse.Data; + } + + /// + /// Upsert a recipe filter to a project + /// + /// Thrown when fails to make API call + /// + /// + /// + /// ApiResponse of ProjectRecipeFilter + public ApiResponse CreateProjectRecipeFilterWithHttpInfo (string owner, string name, ProjectRecipeFilter projectRecipeFilter) + { + // verify the required parameter 'owner' is set + if (owner == null) + throw new ApiException(400, "Missing required parameter 'owner' when calling ProjectsApi->CreateProjectRecipeFilter"); + // verify the required parameter 'name' is set + if (name == null) + throw new ApiException(400, "Missing required parameter 'name' when calling ProjectsApi->CreateProjectRecipeFilter"); + // verify the required parameter 'projectRecipeFilter' is set + if (projectRecipeFilter == null) + throw new ApiException(400, "Missing required parameter 'projectRecipeFilter' when calling ProjectsApi->CreateProjectRecipeFilter"); + + var localVarPath = "/projects/{owner}/{name}/recipes/filters"; + 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 (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 (projectRecipeFilter != null && projectRecipeFilter.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(projectRecipeFilter); // http body (model) parameter + } + else + { + localVarPostBody = projectRecipeFilter; // 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("CreateProjectRecipeFilter", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (ProjectRecipeFilter) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(ProjectRecipeFilter))); + } + + /// + /// Upsert a recipe filter to a project + /// + /// Thrown when fails to make API call + /// + /// + /// + /// Cancellation Token to cancel request (optional) + /// Task of ProjectRecipeFilter + public async System.Threading.Tasks.Task CreateProjectRecipeFilterAsync (string owner, string name, ProjectRecipeFilter projectRecipeFilter, CancellationToken cancellationToken = default(CancellationToken)) + { + ApiResponse localVarResponse = await CreateProjectRecipeFilterWithHttpInfoAsync(owner, name, projectRecipeFilter, cancellationToken); + return localVarResponse.Data; + + } + + /// + /// Upsert a recipe filter to a project + /// + /// Thrown when fails to make API call + /// + /// + /// + /// Cancellation Token to cancel request (optional) + /// Task of ApiResponse (ProjectRecipeFilter) + public async System.Threading.Tasks.Task> CreateProjectRecipeFilterWithHttpInfoAsync (string owner, string name, ProjectRecipeFilter projectRecipeFilter, CancellationToken cancellationToken = default(CancellationToken)) + { + // verify the required parameter 'owner' is set + if (owner == null) + throw new ApiException(400, "Missing required parameter 'owner' when calling ProjectsApi->CreateProjectRecipeFilter"); + // verify the required parameter 'name' is set + if (name == null) + throw new ApiException(400, "Missing required parameter 'name' when calling ProjectsApi->CreateProjectRecipeFilter"); + // verify the required parameter 'projectRecipeFilter' is set + if (projectRecipeFilter == null) + throw new ApiException(400, "Missing required parameter 'projectRecipeFilter' when calling ProjectsApi->CreateProjectRecipeFilter"); + + var localVarPath = "/projects/{owner}/{name}/recipes/filters"; + 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 (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 (projectRecipeFilter != null && projectRecipeFilter.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(projectRecipeFilter); // http body (model) parameter + } + else + { + localVarPostBody = projectRecipeFilter; // 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("CreateProjectRecipeFilter", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (ProjectRecipeFilter) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(ProjectRecipeFilter))); + } + + /// + /// Delete a Project + /// + /// Thrown when fails to make API call + /// + /// + /// + public void DeleteProject (string owner, string name) + { + DeleteProjectWithHttpInfo(owner, name); + } + + /// + /// Delete a Project + /// + /// Thrown when fails to make API call + /// + /// + /// ApiResponse of Object(void) + public ApiResponse DeleteProjectWithHttpInfo (string owner, string name) + { + // verify the required parameter 'owner' is set + if (owner == null) + throw new ApiException(400, "Missing required parameter 'owner' when calling ProjectsApi->DeleteProject"); + // verify the required parameter 'name' is set + if (name == null) + throw new ApiException(400, "Missing required parameter 'name' when calling ProjectsApi->DeleteProject"); + + var localVarPath = "/projects/{owner}/{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 (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 + + // 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("DeleteProject", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + null); + } + + /// + /// Delete a Project + /// + /// Thrown when fails to make API call + /// + /// + /// Cancellation Token to cancel request (optional) + /// Task of void + public async System.Threading.Tasks.Task DeleteProjectAsync (string owner, string name, CancellationToken cancellationToken = default(CancellationToken)) + { + await DeleteProjectWithHttpInfoAsync(owner, name, cancellationToken); + + } + + /// + /// Delete a Project + /// + /// Thrown when fails to make API call + /// + /// + /// Cancellation Token to cancel request (optional) + /// Task of ApiResponse + public async System.Threading.Tasks.Task> DeleteProjectWithHttpInfoAsync (string owner, string name, CancellationToken cancellationToken = default(CancellationToken)) + { + // verify the required parameter 'owner' is set + if (owner == null) + throw new ApiException(400, "Missing required parameter 'owner' when calling ProjectsApi->DeleteProject"); + // verify the required parameter 'name' is set + if (name == null) + throw new ApiException(400, "Missing required parameter 'name' when calling ProjectsApi->DeleteProject"); + + var localVarPath = "/projects/{owner}/{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 (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 + + // 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("DeleteProject", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + null); + } + + /// + /// Remove a Project permissions + /// + /// Thrown when fails to make API call + /// + /// + /// + /// + public void DeleteProjectOrgPermission (string owner, string name, ProjectPolicySubject projectPolicySubject) + { + DeleteProjectOrgPermissionWithHttpInfo(owner, name, projectPolicySubject); + } + + /// + /// Remove a Project permissions + /// + /// Thrown when fails to make API call + /// + /// + /// + /// ApiResponse of Object(void) + public ApiResponse DeleteProjectOrgPermissionWithHttpInfo (string owner, string name, ProjectPolicySubject projectPolicySubject) + { + // verify the required parameter 'owner' is set + if (owner == null) + throw new ApiException(400, "Missing required parameter 'owner' when calling ProjectsApi->DeleteProjectOrgPermission"); + // verify the required parameter 'name' is set + if (name == null) + throw new ApiException(400, "Missing required parameter 'name' when calling ProjectsApi->DeleteProjectOrgPermission"); + // verify the required parameter 'projectPolicySubject' is set + if (projectPolicySubject == null) + throw new ApiException(400, "Missing required parameter 'projectPolicySubject' when calling ProjectsApi->DeleteProjectOrgPermission"); + + var localVarPath = "/projects/{owner}/{name}/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 (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 (projectPolicySubject != null && projectPolicySubject.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(projectPolicySubject); // http body (model) parameter + } + else + { + localVarPostBody = projectPolicySubject; // 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("DeleteProjectOrgPermission", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + null); + } + + /// + /// Remove a Project permissions + /// + /// Thrown when fails to make API call + /// + /// + /// + /// Cancellation Token to cancel request (optional) + /// Task of void + public async System.Threading.Tasks.Task DeleteProjectOrgPermissionAsync (string owner, string name, ProjectPolicySubject projectPolicySubject, CancellationToken cancellationToken = default(CancellationToken)) + { + await DeleteProjectOrgPermissionWithHttpInfoAsync(owner, name, projectPolicySubject, cancellationToken); + + } + + /// + /// Remove a Project permissions + /// + /// Thrown when fails to make API call + /// + /// + /// + /// Cancellation Token to cancel request (optional) + /// Task of ApiResponse + public async System.Threading.Tasks.Task> DeleteProjectOrgPermissionWithHttpInfoAsync (string owner, string name, ProjectPolicySubject projectPolicySubject, CancellationToken cancellationToken = default(CancellationToken)) + { + // verify the required parameter 'owner' is set + if (owner == null) + throw new ApiException(400, "Missing required parameter 'owner' when calling ProjectsApi->DeleteProjectOrgPermission"); + // verify the required parameter 'name' is set + if (name == null) + throw new ApiException(400, "Missing required parameter 'name' when calling ProjectsApi->DeleteProjectOrgPermission"); + // verify the required parameter 'projectPolicySubject' is set + if (projectPolicySubject == null) + throw new ApiException(400, "Missing required parameter 'projectPolicySubject' when calling ProjectsApi->DeleteProjectOrgPermission"); + + var localVarPath = "/projects/{owner}/{name}/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 (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 (projectPolicySubject != null && projectPolicySubject.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(projectPolicySubject); // http body (model) parameter + } + else + { + localVarPostBody = projectPolicySubject; // 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("DeleteProjectOrgPermission", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + null); + } + + /// + /// Remove a Project recipe filter + /// + /// Thrown when fails to make API call + /// + /// + /// + /// + public void DeleteProjectRecipeFilter (string owner, string name, ProjectRecipeFilter projectRecipeFilter) + { + DeleteProjectRecipeFilterWithHttpInfo(owner, name, projectRecipeFilter); + } + + /// + /// Remove a Project recipe filter + /// + /// Thrown when fails to make API call + /// + /// + /// + /// ApiResponse of Object(void) + public ApiResponse DeleteProjectRecipeFilterWithHttpInfo (string owner, string name, ProjectRecipeFilter projectRecipeFilter) + { + // verify the required parameter 'owner' is set + if (owner == null) + throw new ApiException(400, "Missing required parameter 'owner' when calling ProjectsApi->DeleteProjectRecipeFilter"); + // verify the required parameter 'name' is set + if (name == null) + throw new ApiException(400, "Missing required parameter 'name' when calling ProjectsApi->DeleteProjectRecipeFilter"); + // verify the required parameter 'projectRecipeFilter' is set + if (projectRecipeFilter == null) + throw new ApiException(400, "Missing required parameter 'projectRecipeFilter' when calling ProjectsApi->DeleteProjectRecipeFilter"); + + var localVarPath = "/projects/{owner}/{name}/recipes/filters"; + 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 (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 (projectRecipeFilter != null && projectRecipeFilter.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(projectRecipeFilter); // http body (model) parameter + } + else + { + localVarPostBody = projectRecipeFilter; // 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("DeleteProjectRecipeFilter", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + null); + } + + /// + /// Remove a Project recipe filter + /// + /// Thrown when fails to make API call + /// + /// + /// + /// Cancellation Token to cancel request (optional) + /// Task of void + public async System.Threading.Tasks.Task DeleteProjectRecipeFilterAsync (string owner, string name, ProjectRecipeFilter projectRecipeFilter, CancellationToken cancellationToken = default(CancellationToken)) + { + await DeleteProjectRecipeFilterWithHttpInfoAsync(owner, name, projectRecipeFilter, cancellationToken); + + } + + /// + /// Remove a Project recipe filter + /// + /// Thrown when fails to make API call + /// + /// + /// + /// Cancellation Token to cancel request (optional) + /// Task of ApiResponse + public async System.Threading.Tasks.Task> DeleteProjectRecipeFilterWithHttpInfoAsync (string owner, string name, ProjectRecipeFilter projectRecipeFilter, CancellationToken cancellationToken = default(CancellationToken)) + { + // verify the required parameter 'owner' is set + if (owner == null) + throw new ApiException(400, "Missing required parameter 'owner' when calling ProjectsApi->DeleteProjectRecipeFilter"); + // verify the required parameter 'name' is set + if (name == null) + throw new ApiException(400, "Missing required parameter 'name' when calling ProjectsApi->DeleteProjectRecipeFilter"); + // verify the required parameter 'projectRecipeFilter' is set + if (projectRecipeFilter == null) + throw new ApiException(400, "Missing required parameter 'projectRecipeFilter' when calling ProjectsApi->DeleteProjectRecipeFilter"); + + var localVarPath = "/projects/{owner}/{name}/recipes/filters"; + 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 (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 (projectRecipeFilter != null && projectRecipeFilter.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(projectRecipeFilter); // http body (model) parameter + } + else + { + localVarPostBody = projectRecipeFilter; // 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("DeleteProjectRecipeFilter", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + null); + } + + /// + /// Get a project + /// + /// Thrown when fails to make API call + /// + /// + /// Project + public Project GetProject (string owner, string name) + { + ApiResponse localVarResponse = GetProjectWithHttpInfo(owner, name); + return localVarResponse.Data; + } + + /// + /// Get a project + /// + /// Thrown when fails to make API call + /// + /// + /// ApiResponse of Project + public ApiResponse GetProjectWithHttpInfo (string owner, string name) + { + // verify the required parameter 'owner' is set + if (owner == null) + throw new ApiException(400, "Missing required parameter 'owner' when calling ProjectsApi->GetProject"); + // verify the required parameter 'name' is set + if (name == null) + throw new ApiException(400, "Missing required parameter 'name' when calling ProjectsApi->GetProject"); + + var localVarPath = "/projects/{owner}/{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 (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 + + // 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("GetProject", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (Project) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Project))); + } + + /// + /// Get a project + /// + /// Thrown when fails to make API call + /// + /// + /// Cancellation Token to cancel request (optional) + /// Task of Project + public async System.Threading.Tasks.Task GetProjectAsync (string owner, string name, CancellationToken cancellationToken = default(CancellationToken)) + { + ApiResponse localVarResponse = await GetProjectWithHttpInfoAsync(owner, name, cancellationToken); + return localVarResponse.Data; + + } + + /// + /// Get a project + /// + /// Thrown when fails to make API call + /// + /// + /// Cancellation Token to cancel request (optional) + /// Task of ApiResponse (Project) + public async System.Threading.Tasks.Task> GetProjectWithHttpInfoAsync (string owner, string name, CancellationToken cancellationToken = default(CancellationToken)) + { + // verify the required parameter 'owner' is set + if (owner == null) + throw new ApiException(400, "Missing required parameter 'owner' when calling ProjectsApi->GetProject"); + // verify the required parameter 'name' is set + if (name == null) + throw new ApiException(400, "Missing required parameter 'name' when calling ProjectsApi->GetProject"); + + var localVarPath = "/projects/{owner}/{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 (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 + + // 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("GetProject", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (Project) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Project))); + } + + /// + /// Get project access permissions + /// + /// Thrown when fails to make API call + /// + /// + /// Page number starting from 1 (optional, default to 1) + /// Number of items per page (optional, default to 25) + /// The type of access policy subject (optional) + /// An access policy permission string (optional) + /// ProjectAccessPolicyList + public ProjectAccessPolicyList GetProjectAccessPermissions (string owner, string name, int? page = default, int? perPage = default, List subjectType = default, List permission = default) + { + ApiResponse localVarResponse = GetProjectAccessPermissionsWithHttpInfo(owner, name, page, perPage, subjectType, permission); + return localVarResponse.Data; + } + + /// + /// Get project access permissions + /// + /// Thrown when fails to make API call + /// + /// + /// Page number starting from 1 (optional, default to 1) + /// Number of items per page (optional, default to 25) + /// The type of access policy subject (optional) + /// An access policy permission string (optional) + /// ApiResponse of ProjectAccessPolicyList + public ApiResponse GetProjectAccessPermissionsWithHttpInfo (string owner, string name, int? page = default, int? perPage = default, List subjectType = default, List permission = default) + { + // verify the required parameter 'owner' is set + if (owner == null) + throw new ApiException(400, "Missing required parameter 'owner' when calling ProjectsApi->GetProjectAccessPermissions"); + // verify the required parameter 'name' is set + if (name == null) + throw new ApiException(400, "Missing required parameter 'name' when calling ProjectsApi->GetProjectAccessPermissions"); + + var localVarPath = "/projects/{owner}/{name}/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[] { + }; + 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 (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 + if (subjectType != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("multi", "subject_type", subjectType)); // query parameter + if (permission != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("multi", "permission", permission)); // 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("GetProjectAccessPermissions", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (ProjectAccessPolicyList) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(ProjectAccessPolicyList))); + } + + /// + /// Get project access permissions + /// + /// Thrown when fails to make API call + /// + /// + /// Page number starting from 1 (optional, default to 1) + /// Number of items per page (optional, default to 25) + /// The type of access policy subject (optional) + /// An access policy permission string (optional) + /// Cancellation Token to cancel request (optional) + /// Task of ProjectAccessPolicyList + public async System.Threading.Tasks.Task GetProjectAccessPermissionsAsync (string owner, string name, int? page = default, int? perPage = default, List subjectType = default, List permission = default, CancellationToken cancellationToken = default(CancellationToken)) + { + ApiResponse localVarResponse = await GetProjectAccessPermissionsWithHttpInfoAsync(owner, name, page, perPage, subjectType, permission, cancellationToken); + return localVarResponse.Data; + + } + + /// + /// Get project access permissions + /// + /// Thrown when fails to make API call + /// + /// + /// Page number starting from 1 (optional, default to 1) + /// Number of items per page (optional, default to 25) + /// The type of access policy subject (optional) + /// An access policy permission string (optional) + /// Cancellation Token to cancel request (optional) + /// Task of ApiResponse (ProjectAccessPolicyList) + public async System.Threading.Tasks.Task> GetProjectAccessPermissionsWithHttpInfoAsync (string owner, string name, int? page = default, int? perPage = default, List subjectType = default, List permission = default, CancellationToken cancellationToken = default(CancellationToken)) + { + // verify the required parameter 'owner' is set + if (owner == null) + throw new ApiException(400, "Missing required parameter 'owner' when calling ProjectsApi->GetProjectAccessPermissions"); + // verify the required parameter 'name' is set + if (name == null) + throw new ApiException(400, "Missing required parameter 'name' when calling ProjectsApi->GetProjectAccessPermissions"); + + var localVarPath = "/projects/{owner}/{name}/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[] { + }; + 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 (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 + if (subjectType != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("multi", "subject_type", subjectType)); // query parameter + if (permission != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("multi", "permission", permission)); // 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("GetProjectAccessPermissions", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (ProjectAccessPolicyList) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(ProjectAccessPolicyList))); + } + + /// + /// Get project recipe filters + /// + /// Thrown when fails to make API call + /// + /// + /// Page number starting from 1 (optional, default to 1) + /// Number of items per page (optional, default to 25) + /// ProjectRecipeFilterList + public ProjectRecipeFilterList GetProjectRecipeFilters (string owner, string name, int? page = default, int? perPage = default) + { + ApiResponse localVarResponse = GetProjectRecipeFiltersWithHttpInfo(owner, name, page, perPage); + return localVarResponse.Data; + } + + /// + /// Get project recipe filters + /// + /// Thrown when fails to make API call + /// + /// + /// Page number starting from 1 (optional, default to 1) + /// Number of items per page (optional, default to 25) + /// ApiResponse of ProjectRecipeFilterList + public ApiResponse GetProjectRecipeFiltersWithHttpInfo (string owner, string name, int? page = default, int? perPage = default) + { + // verify the required parameter 'owner' is set + if (owner == null) + throw new ApiException(400, "Missing required parameter 'owner' when calling ProjectsApi->GetProjectRecipeFilters"); + // verify the required parameter 'name' is set + if (name == null) + throw new ApiException(400, "Missing required parameter 'name' when calling ProjectsApi->GetProjectRecipeFilters"); + + var localVarPath = "/projects/{owner}/{name}/recipes/filters"; + 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 (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("GetProjectRecipeFilters", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (ProjectRecipeFilterList) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(ProjectRecipeFilterList))); + } + + /// + /// Get project recipe filters + /// + /// Thrown when fails to make API call + /// + /// + /// 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 ProjectRecipeFilterList + public async System.Threading.Tasks.Task GetProjectRecipeFiltersAsync (string owner, string name, int? page = default, int? perPage = default, CancellationToken cancellationToken = default(CancellationToken)) + { + ApiResponse localVarResponse = await GetProjectRecipeFiltersWithHttpInfoAsync(owner, name, page, perPage, cancellationToken); + return localVarResponse.Data; + + } + + /// + /// Get project recipe filters + /// + /// Thrown when fails to make API call + /// + /// + /// 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 (ProjectRecipeFilterList) + public async System.Threading.Tasks.Task> GetProjectRecipeFiltersWithHttpInfoAsync (string owner, string name, int? page = default, int? perPage = default, CancellationToken cancellationToken = default(CancellationToken)) + { + // verify the required parameter 'owner' is set + if (owner == null) + throw new ApiException(400, "Missing required parameter 'owner' when calling ProjectsApi->GetProjectRecipeFilters"); + // verify the required parameter 'name' is set + if (name == null) + throw new ApiException(400, "Missing required parameter 'name' when calling ProjectsApi->GetProjectRecipeFilters"); + + var localVarPath = "/projects/{owner}/{name}/recipes/filters"; + 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 (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("GetProjectRecipeFilters", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (ProjectRecipeFilterList) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(ProjectRecipeFilterList))); + } + + /// + /// Get project recipes + /// + /// Thrown when fails to make API call + /// + /// + /// Search string to find recipes (optional) + /// Page number starting from 1 (optional, default to 1) + /// Number of items per page (optional, default to 25) + /// RecipeInterfaceList + public RecipeInterfaceList GetProjectRecipes (string owner, string name, string search = default, int? page = default, int? perPage = default) + { + ApiResponse localVarResponse = GetProjectRecipesWithHttpInfo(owner, name, search, page, perPage); + return localVarResponse.Data; + } + + /// + /// Get project recipes + /// + /// Thrown when fails to make API call + /// + /// + /// Search string to find recipes (optional) + /// Page number starting from 1 (optional, default to 1) + /// Number of items per page (optional, default to 25) + /// ApiResponse of RecipeInterfaceList + public ApiResponse GetProjectRecipesWithHttpInfo (string owner, string name, string search = default, int? page = default, int? perPage = default) + { + // verify the required parameter 'owner' is set + if (owner == null) + throw new ApiException(400, "Missing required parameter 'owner' when calling ProjectsApi->GetProjectRecipes"); + // verify the required parameter 'name' is set + if (name == null) + throw new ApiException(400, "Missing required parameter 'name' when calling ProjectsApi->GetProjectRecipes"); + + var localVarPath = "/projects/{owner}/{name}/recipes"; + 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 (search != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "search", search)); // 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("GetProjectRecipes", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (RecipeInterfaceList) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(RecipeInterfaceList))); + } + + /// + /// Get project recipes + /// + /// Thrown when fails to make API call + /// + /// + /// Search string to find recipes (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 RecipeInterfaceList + public async System.Threading.Tasks.Task GetProjectRecipesAsync (string owner, string name, string search = default, int? page = default, int? perPage = default, CancellationToken cancellationToken = default(CancellationToken)) + { + ApiResponse localVarResponse = await GetProjectRecipesWithHttpInfoAsync(owner, name, search, page, perPage, cancellationToken); + return localVarResponse.Data; + + } + + /// + /// Get project recipes + /// + /// Thrown when fails to make API call + /// + /// + /// Search string to find recipes (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 (RecipeInterfaceList) + public async System.Threading.Tasks.Task> GetProjectRecipesWithHttpInfoAsync (string owner, string name, string search = default, int? page = default, int? perPage = default, CancellationToken cancellationToken = default(CancellationToken)) + { + // verify the required parameter 'owner' is set + if (owner == null) + throw new ApiException(400, "Missing required parameter 'owner' when calling ProjectsApi->GetProjectRecipes"); + // verify the required parameter 'name' is set + if (name == null) + throw new ApiException(400, "Missing required parameter 'name' when calling ProjectsApi->GetProjectRecipes"); + + var localVarPath = "/projects/{owner}/{name}/recipes"; + 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 (search != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "search", search)); // 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("GetProjectRecipes", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (RecipeInterfaceList) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(RecipeInterfaceList))); + } + + /// + /// List Projects + /// + /// Thrown when fails to make API call + /// Search string to find projects (optional) + /// The ID of a project to search for (optional) + /// The name of the project (optional) + /// Owner of the project (optional) + /// Boolean check for public/private projects (optional) + /// Filter by permission on given resource (optional) + /// Key to sort the list by (optional) + /// The order to sort the list (optional) + /// 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) + { + ApiResponse localVarResponse = ListProjectsWithHttpInfo(search, ids, names, owner, _public, permissions, sortBy, sortOrder, page, perPage); + return localVarResponse.Data; + } + + /// + /// List Projects + /// + /// Thrown when fails to make API call + /// Search string to find projects (optional) + /// The ID of a project to search for (optional) + /// The name of the project (optional) + /// Owner of the project (optional) + /// Boolean check for public/private projects (optional) + /// Filter by permission on given resource (optional) + /// Key to sort the list by (optional) + /// The order to sort the list (optional) + /// 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) + { + + var localVarPath = "/projects"; + 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 (search != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "search", search)); // query parameter + if (ids != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("multi", "ids", ids)); // query parameter + if (names != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("multi", "names", names)); // query parameter + if (owner != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("multi", "owner", owner)); // query parameter + if (_public != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "public", _public)); // query parameter + if (permissions != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("multi", "permissions", permissions)); // query parameter + if (sortBy != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "sort_by", sortBy)); // query parameter + if (sortOrder != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "sort_order", sortOrder)); // 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("ListProjects", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (ProjectList) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(ProjectList))); + } + + /// + /// List Projects + /// + /// Thrown when fails to make API call + /// Search string to find projects (optional) + /// The ID of a project to search for (optional) + /// The name of the project (optional) + /// Owner of the project (optional) + /// Boolean check for public/private projects (optional) + /// Filter by permission on given resource (optional) + /// Key to sort the list by (optional) + /// The order to sort the list (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 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)) + { + ApiResponse localVarResponse = await ListProjectsWithHttpInfoAsync(search, ids, names, owner, _public, permissions, sortBy, sortOrder, page, perPage, cancellationToken); + return localVarResponse.Data; + + } + + /// + /// List Projects + /// + /// Thrown when fails to make API call + /// Search string to find projects (optional) + /// The ID of a project to search for (optional) + /// The name of the project (optional) + /// Owner of the project (optional) + /// Boolean check for public/private projects (optional) + /// Filter by permission on given resource (optional) + /// Key to sort the list by (optional) + /// The order to sort the list (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 (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)) + { + + var localVarPath = "/projects"; + 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 (search != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "search", search)); // query parameter + if (ids != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("multi", "ids", ids)); // query parameter + if (names != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("multi", "names", names)); // query parameter + if (owner != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("multi", "owner", owner)); // query parameter + if (_public != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "public", _public)); // query parameter + if (permissions != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("multi", "permissions", permissions)); // query parameter + if (sortBy != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "sort_by", sortBy)); // query parameter + if (sortOrder != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "sort_order", sortOrder)); // 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("ListProjects", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (ProjectList) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(ProjectList))); + } + + /// + /// Update a Project + /// + /// Thrown when fails to make API call + /// + /// + /// + /// UpdateAccepted + public UpdateAccepted Update (string owner, string name, ProjectUpdate projectUpdate) + { + ApiResponse localVarResponse = UpdateWithHttpInfo(owner, name, projectUpdate); + return localVarResponse.Data; + } + + /// + /// Update a Project + /// + /// Thrown when fails to make API call + /// + /// + /// + /// ApiResponse of UpdateAccepted + public ApiResponse UpdateWithHttpInfo (string owner, string name, ProjectUpdate projectUpdate) + { + // verify the required parameter 'owner' is set + if (owner == null) + throw new ApiException(400, "Missing required parameter 'owner' when calling ProjectsApi->Update"); + // verify the required parameter 'name' is set + if (name == null) + throw new ApiException(400, "Missing required parameter 'name' when calling ProjectsApi->Update"); + // verify the required parameter 'projectUpdate' is set + if (projectUpdate == null) + throw new ApiException(400, "Missing required parameter 'projectUpdate' when calling ProjectsApi->Update"); + + var localVarPath = "/projects/{owner}/{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[] { + "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 (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 (projectUpdate != null && projectUpdate.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(projectUpdate); // http body (model) parameter + } + else + { + localVarPostBody = projectUpdate; // 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("Update", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (UpdateAccepted) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(UpdateAccepted))); + } + + /// + /// Update a Project + /// + /// Thrown when fails to make API call + /// + /// + /// + /// Cancellation Token to cancel request (optional) + /// Task of UpdateAccepted + public async System.Threading.Tasks.Task UpdateAsync (string owner, string name, ProjectUpdate projectUpdate, CancellationToken cancellationToken = default(CancellationToken)) + { + ApiResponse localVarResponse = await UpdateWithHttpInfoAsync(owner, name, projectUpdate, cancellationToken); + return localVarResponse.Data; + + } + + /// + /// Update a Project + /// + /// Thrown when fails to make API call + /// + /// + /// + /// Cancellation Token to cancel request (optional) + /// Task of ApiResponse (UpdateAccepted) + public async System.Threading.Tasks.Task> UpdateWithHttpInfoAsync (string owner, string name, ProjectUpdate projectUpdate, CancellationToken cancellationToken = default(CancellationToken)) + { + // verify the required parameter 'owner' is set + if (owner == null) + throw new ApiException(400, "Missing required parameter 'owner' when calling ProjectsApi->Update"); + // verify the required parameter 'name' is set + if (name == null) + throw new ApiException(400, "Missing required parameter 'name' when calling ProjectsApi->Update"); + // verify the required parameter 'projectUpdate' is set + if (projectUpdate == null) + throw new ApiException(400, "Missing required parameter 'projectUpdate' when calling ProjectsApi->Update"); + + var localVarPath = "/projects/{owner}/{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[] { + "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 (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 (projectUpdate != null && projectUpdate.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(projectUpdate); // http body (model) parameter + } + else + { + localVarPostBody = projectUpdate; // 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("Update", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (UpdateAccepted) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(UpdateAccepted))); + } + + /// + /// Upsert a new permission to a project + /// + /// Thrown when fails to make API call + /// + /// + /// + /// UpdateAccepted + public UpdateAccepted UpsertProjectPermission (string owner, string name, ProjectAccessPolicy projectAccessPolicy) + { + ApiResponse localVarResponse = UpsertProjectPermissionWithHttpInfo(owner, name, projectAccessPolicy); + return localVarResponse.Data; + } + + /// + /// Upsert a new permission to a project + /// + /// Thrown when fails to make API call + /// + /// + /// + /// ApiResponse of UpdateAccepted + public ApiResponse UpsertProjectPermissionWithHttpInfo (string owner, string name, ProjectAccessPolicy projectAccessPolicy) + { + // verify the required parameter 'owner' is set + if (owner == null) + throw new ApiException(400, "Missing required parameter 'owner' when calling ProjectsApi->UpsertProjectPermission"); + // verify the required parameter 'name' is set + if (name == null) + throw new ApiException(400, "Missing required parameter 'name' when calling ProjectsApi->UpsertProjectPermission"); + // verify the required parameter 'projectAccessPolicy' is set + if (projectAccessPolicy == null) + throw new ApiException(400, "Missing required parameter 'projectAccessPolicy' when calling ProjectsApi->UpsertProjectPermission"); + + var localVarPath = "/projects/{owner}/{name}/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 (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 (projectAccessPolicy != null && projectAccessPolicy.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(projectAccessPolicy); // http body (model) parameter + } + else + { + localVarPostBody = projectAccessPolicy; // 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("UpsertProjectPermission", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (UpdateAccepted) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(UpdateAccepted))); + } + + /// + /// Upsert a new permission to a project + /// + /// Thrown when fails to make API call + /// + /// + /// + /// Cancellation Token to cancel request (optional) + /// Task of UpdateAccepted + public async System.Threading.Tasks.Task UpsertProjectPermissionAsync (string owner, string name, ProjectAccessPolicy projectAccessPolicy, CancellationToken cancellationToken = default(CancellationToken)) + { + ApiResponse localVarResponse = await UpsertProjectPermissionWithHttpInfoAsync(owner, name, projectAccessPolicy, cancellationToken); + return localVarResponse.Data; + + } + + /// + /// Upsert a new permission to a project + /// + /// Thrown when fails to make API call + /// + /// + /// + /// Cancellation Token to cancel request (optional) + /// Task of ApiResponse (UpdateAccepted) + public async System.Threading.Tasks.Task> UpsertProjectPermissionWithHttpInfoAsync (string owner, string name, ProjectAccessPolicy projectAccessPolicy, CancellationToken cancellationToken = default(CancellationToken)) + { + // verify the required parameter 'owner' is set + if (owner == null) + throw new ApiException(400, "Missing required parameter 'owner' when calling ProjectsApi->UpsertProjectPermission"); + // verify the required parameter 'name' is set + if (name == null) + throw new ApiException(400, "Missing required parameter 'name' when calling ProjectsApi->UpsertProjectPermission"); + // verify the required parameter 'projectAccessPolicy' is set + if (projectAccessPolicy == null) + throw new ApiException(400, "Missing required parameter 'projectAccessPolicy' when calling ProjectsApi->UpsertProjectPermission"); + + var localVarPath = "/projects/{owner}/{name}/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 (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 (projectAccessPolicy != null && projectAccessPolicy.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(projectAccessPolicy); // http body (model) parameter + } + else + { + localVarPostBody = projectAccessPolicy; // 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("UpsertProjectPermission", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (UpdateAccepted) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(UpdateAccepted))); + } + + } +} diff --git a/src/PollinationSDK/Api/RecipesApi.cs b/src/PollinationSDK/Api/RecipesApi.cs new file mode 100644 index 000000000..1db96f52c --- /dev/null +++ b/src/PollinationSDK/Api/RecipesApi.cs @@ -0,0 +1,2800 @@ +/* + * 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 IRecipesApi : IApiAccessor + { + #region Synchronous Operations + /// + /// Create a Recipe + /// + /// + /// Create a new recipe. + /// + /// Thrown when fails to make API call + /// + /// + /// CreatedContent + CreatedContent CreateRecipe (string owner, RepositoryCreate repositoryCreate); + + /// + /// Create a Recipe + /// + /// + /// Create a new recipe. + /// + /// Thrown when fails to make API call + /// + /// + /// ApiResponse of CreatedContent + ApiResponse CreateRecipeWithHttpInfo (string owner, RepositoryCreate repositoryCreate); + /// + /// Create a new Recipe package + /// + /// + /// Create a new recipe package version + /// + /// Thrown when fails to make API call + /// + /// + /// + /// CreatedContent + CreatedContent CreateRecipePackage (string owner, string name, NewRecipePackage newRecipePackage); + + /// + /// Create a new Recipe package + /// + /// + /// Create a new recipe package version + /// + /// Thrown when fails to make API call + /// + /// + /// + /// ApiResponse of CreatedContent + ApiResponse CreateRecipePackageWithHttpInfo (string owner, string name, NewRecipePackage newRecipePackage); + /// + /// Delete a Recipe + /// + /// + /// Delete a recipe (must have `admin` permission) + /// + /// Thrown when fails to make API call + /// + /// + /// + void DeleteRecipe (string owner, string name); + + /// + /// Delete a Recipe + /// + /// + /// Delete a recipe (must have `admin` permission) + /// + /// Thrown when fails to make API call + /// + /// + /// ApiResponse of Object(void) + ApiResponse DeleteRecipeWithHttpInfo (string owner, string name); + /// + /// Remove a Repository permissions + /// + /// + /// Delete a recipe's access policy (must have `admin` permission) + /// + /// Thrown when fails to make API call + /// + /// + /// + /// + void DeleteRecipeOrgPermission (string owner, string name, RepositoryPolicySubject repositoryPolicySubject); + + /// + /// Remove a Repository permissions + /// + /// + /// Delete a recipe's access policy (must have `admin` permission) + /// + /// Thrown when fails to make API call + /// + /// + /// + /// ApiResponse of Object(void) + ApiResponse DeleteRecipeOrgPermissionWithHttpInfo (string owner, string name, RepositoryPolicySubject repositoryPolicySubject); + /// + /// Get a recipe + /// + /// + /// Retrieve a recipe by name + /// + /// Thrown when fails to make API call + /// + /// + /// Repository + Repository GetRecipe (string owner, string name); + + /// + /// Get a recipe + /// + /// + /// Retrieve a recipe by name + /// + /// Thrown when fails to make API call + /// + /// + /// ApiResponse of Repository + ApiResponse GetRecipeWithHttpInfo (string owner, string name); + /// + /// Get recipe access permissions + /// + /// + /// Retrieve a recipe's access permissions (must have `write` permission) + /// + /// Thrown when fails to make API call + /// + /// + /// Page number starting from 1 (optional, default to 1) + /// Number of items per page (optional, default to 25) + /// The type of access policy subject (optional) + /// An access policy permission string (optional) + /// RepositoryAccessPolicyList + RepositoryAccessPolicyList GetRecipeAccessPermissions (string owner, string name, int? page = default, int? perPage = default, List subjectType = default, List permission = default); + + /// + /// Get recipe access permissions + /// + /// + /// Retrieve a recipe's access permissions (must have `write` permission) + /// + /// Thrown when fails to make API call + /// + /// + /// Page number starting from 1 (optional, default to 1) + /// Number of items per page (optional, default to 25) + /// The type of access policy subject (optional) + /// An access policy permission string (optional) + /// ApiResponse of RepositoryAccessPolicyList + ApiResponse GetRecipeAccessPermissionsWithHttpInfo (string owner, string name, int? page = default, int? perPage = default, List subjectType = default, List permission = default); + /// + /// Get a recipe tag + /// + /// + /// Retrieve a recipe tag by name and tag + /// + /// Thrown when fails to make API call + /// + /// + /// + /// RecipePackage + RecipePackage GetRecipeByTag (string owner, string name, string tag); + + /// + /// Get a recipe tag + /// + /// + /// Retrieve a recipe tag by name and tag + /// + /// Thrown when fails to make API call + /// + /// + /// + /// ApiResponse of RecipePackage + ApiResponse GetRecipeByTagWithHttpInfo (string owner, string name, string tag); + /// + /// Get a recipe tags + /// + /// + /// Retrieve a recipe by name + /// + /// Thrown when fails to make API call + /// + /// + /// Key to sort the list by (optional) + /// The order to sort the list (optional) + /// 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); + + /// + /// Get a recipe tags + /// + /// + /// Retrieve a recipe by name + /// + /// Thrown when fails to make API call + /// + /// + /// Key to sort the list by (optional) + /// The order to sort the list (optional) + /// 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); + /// + /// List recipes + /// + /// + /// + /// + /// Thrown when fails to make API call + /// You know, for search (optional) + /// The account name (optional) + /// Owner of the project (optional) + /// Boolean check for public/private projects (optional) + /// A keyword to index the repository by (optional) + /// Filter by permission on given resource (optional) + /// Key to sort the list by (optional) + /// The order to sort the list (optional) + /// 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); + + /// + /// List recipes + /// + /// + /// + /// + /// Thrown when fails to make API call + /// You know, for search (optional) + /// The account name (optional) + /// Owner of the project (optional) + /// Boolean check for public/private projects (optional) + /// A keyword to index the repository by (optional) + /// Filter by permission on given resource (optional) + /// Key to sort the list by (optional) + /// The order to sort the list (optional) + /// 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); + /// + /// Update a Recipe + /// + /// + /// Update a recipe (must have `contribute` permission) + /// + /// Thrown when fails to make API call + /// + /// + /// + /// UpdateAccepted + UpdateAccepted UpdateRecipe (string owner, string name, RepositoryUpdate repositoryUpdate); + + /// + /// Update a Recipe + /// + /// + /// Update a recipe (must have `contribute` permission) + /// + /// Thrown when fails to make API call + /// + /// + /// + /// ApiResponse of UpdateAccepted + ApiResponse UpdateRecipeWithHttpInfo (string owner, string name, RepositoryUpdate repositoryUpdate); + /// + /// Upsert a new permission to a recipe + /// + /// + /// Upsert a recipe's access policy (must have `admin` permission) + /// + /// Thrown when fails to make API call + /// + /// + /// + /// UpdateAccepted + UpdateAccepted UpsertRecipePermission (string owner, string name, RepositoryAccessPolicy repositoryAccessPolicy); + + /// + /// Upsert a new permission to a recipe + /// + /// + /// Upsert a recipe's access policy (must have `admin` permission) + /// + /// Thrown when fails to make API call + /// + /// + /// + /// ApiResponse of UpdateAccepted + ApiResponse UpsertRecipePermissionWithHttpInfo (string owner, string name, RepositoryAccessPolicy repositoryAccessPolicy); + #endregion Synchronous Operations + #region Asynchronous Operations + /// + /// Create a Recipe + /// + /// + /// Create a new recipe. + /// + /// Thrown when fails to make API call + /// + /// + /// Cancellation Token to cancel request (optional) + /// Task of CreatedContent + System.Threading.Tasks.Task CreateRecipeAsync (string owner, RepositoryCreate repositoryCreate, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// Create a Recipe + /// + /// + /// Create a new recipe. + /// + /// Thrown when fails to make API call + /// + /// + /// Cancellation Token to cancel request (optional) + /// Task of ApiResponse (CreatedContent) + System.Threading.Tasks.Task> CreateRecipeWithHttpInfoAsync (string owner, RepositoryCreate repositoryCreate, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Create a new Recipe package + /// + /// + /// Create a new recipe package version + /// + /// Thrown when fails to make API call + /// + /// + /// + /// Cancellation Token to cancel request (optional) + /// Task of CreatedContent + System.Threading.Tasks.Task CreateRecipePackageAsync (string owner, string name, NewRecipePackage newRecipePackage, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// Create a new Recipe package + /// + /// + /// Create a new recipe package version + /// + /// Thrown when fails to make API call + /// + /// + /// + /// Cancellation Token to cancel request (optional) + /// Task of ApiResponse (CreatedContent) + System.Threading.Tasks.Task> CreateRecipePackageWithHttpInfoAsync (string owner, string name, NewRecipePackage newRecipePackage, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Delete a Recipe + /// + /// + /// Delete a recipe (must have `admin` permission) + /// + /// Thrown when fails to make API call + /// + /// + /// Cancellation Token to cancel request (optional) + /// Task of void + System.Threading.Tasks.Task DeleteRecipeAsync (string owner, string name, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// Delete a Recipe + /// + /// + /// Delete a recipe (must have `admin` permission) + /// + /// Thrown when fails to make API call + /// + /// + /// Cancellation Token to cancel request (optional) + /// Task of ApiResponse + System.Threading.Tasks.Task> DeleteRecipeWithHttpInfoAsync (string owner, string name, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Remove a Repository permissions + /// + /// + /// Delete a recipe's access policy (must have `admin` permission) + /// + /// Thrown when fails to make API call + /// + /// + /// + /// Cancellation Token to cancel request (optional) + /// Task of void + System.Threading.Tasks.Task DeleteRecipeOrgPermissionAsync (string owner, string name, RepositoryPolicySubject repositoryPolicySubject, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// Remove a Repository permissions + /// + /// + /// Delete a recipe's access policy (must have `admin` permission) + /// + /// Thrown when fails to make API call + /// + /// + /// + /// Cancellation Token to cancel request (optional) + /// Task of ApiResponse + System.Threading.Tasks.Task> DeleteRecipeOrgPermissionWithHttpInfoAsync (string owner, string name, RepositoryPolicySubject repositoryPolicySubject, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Get a recipe + /// + /// + /// Retrieve a recipe by name + /// + /// Thrown when fails to make API call + /// + /// + /// Cancellation Token to cancel request (optional) + /// Task of Repository + System.Threading.Tasks.Task GetRecipeAsync (string owner, string name, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// Get a recipe + /// + /// + /// Retrieve a recipe by name + /// + /// Thrown when fails to make API call + /// + /// + /// Cancellation Token to cancel request (optional) + /// Task of ApiResponse (Repository) + System.Threading.Tasks.Task> GetRecipeWithHttpInfoAsync (string owner, string name, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Get recipe access permissions + /// + /// + /// Retrieve a recipe's access permissions (must have `write` permission) + /// + /// Thrown when fails to make API call + /// + /// + /// Page number starting from 1 (optional, default to 1) + /// Number of items per page (optional, default to 25) + /// The type of access policy subject (optional) + /// An access policy permission string (optional) + /// Cancellation Token to cancel request (optional) + /// Task of RepositoryAccessPolicyList + System.Threading.Tasks.Task GetRecipeAccessPermissionsAsync (string owner, string name, int? page = default, int? perPage = default, List subjectType = default, List permission = default, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// Get recipe access permissions + /// + /// + /// Retrieve a recipe's access permissions (must have `write` permission) + /// + /// Thrown when fails to make API call + /// + /// + /// Page number starting from 1 (optional, default to 1) + /// Number of items per page (optional, default to 25) + /// The type of access policy subject (optional) + /// An access policy permission string (optional) + /// Cancellation Token to cancel request (optional) + /// Task of ApiResponse (RepositoryAccessPolicyList) + System.Threading.Tasks.Task> GetRecipeAccessPermissionsWithHttpInfoAsync (string owner, string name, int? page = default, int? perPage = default, List subjectType = default, List permission = default, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Get a recipe tag + /// + /// + /// Retrieve a recipe tag by name and tag + /// + /// Thrown when fails to make API call + /// + /// + /// + /// Cancellation Token to cancel request (optional) + /// Task of RecipePackage + System.Threading.Tasks.Task GetRecipeByTagAsync (string owner, string name, string tag, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// Get a recipe tag + /// + /// + /// Retrieve a recipe tag by name and tag + /// + /// Thrown when fails to make API call + /// + /// + /// + /// Cancellation Token to cancel request (optional) + /// Task of ApiResponse (RecipePackage) + System.Threading.Tasks.Task> GetRecipeByTagWithHttpInfoAsync (string owner, string name, string tag, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Get a recipe tags + /// + /// + /// Retrieve a recipe by name + /// + /// Thrown when fails to make API call + /// + /// + /// Key to sort the list by (optional) + /// The order to sort the list (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 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)); + + /// + /// Get a recipe tags + /// + /// + /// Retrieve a recipe by name + /// + /// Thrown when fails to make API call + /// + /// + /// Key to sort the list by (optional) + /// The order to sort the list (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 (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)); + /// + /// List recipes + /// + /// + /// + /// + /// Thrown when fails to make API call + /// You know, for search (optional) + /// The account name (optional) + /// Owner of the project (optional) + /// Boolean check for public/private projects (optional) + /// A keyword to index the repository by (optional) + /// Filter by permission on given resource (optional) + /// Key to sort the list by (optional) + /// The order to sort the list (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 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)); + + /// + /// List recipes + /// + /// + /// + /// + /// Thrown when fails to make API call + /// You know, for search (optional) + /// The account name (optional) + /// Owner of the project (optional) + /// Boolean check for public/private projects (optional) + /// A keyword to index the repository by (optional) + /// Filter by permission on given resource (optional) + /// Key to sort the list by (optional) + /// The order to sort the list (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 (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)); + /// + /// Update a Recipe + /// + /// + /// Update a recipe (must have `contribute` permission) + /// + /// Thrown when fails to make API call + /// + /// + /// + /// Cancellation Token to cancel request (optional) + /// Task of UpdateAccepted + System.Threading.Tasks.Task UpdateRecipeAsync (string owner, string name, RepositoryUpdate repositoryUpdate, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// Update a Recipe + /// + /// + /// Update a recipe (must have `contribute` permission) + /// + /// Thrown when fails to make API call + /// + /// + /// + /// Cancellation Token to cancel request (optional) + /// Task of ApiResponse (UpdateAccepted) + System.Threading.Tasks.Task> UpdateRecipeWithHttpInfoAsync (string owner, string name, RepositoryUpdate repositoryUpdate, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Upsert a new permission to a recipe + /// + /// + /// Upsert a recipe's access policy (must have `admin` permission) + /// + /// Thrown when fails to make API call + /// + /// + /// + /// Cancellation Token to cancel request (optional) + /// Task of UpdateAccepted + System.Threading.Tasks.Task UpsertRecipePermissionAsync (string owner, string name, RepositoryAccessPolicy repositoryAccessPolicy, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// Upsert a new permission to a recipe + /// + /// + /// Upsert a recipe's access policy (must have `admin` permission) + /// + /// Thrown when fails to make API call + /// + /// + /// + /// Cancellation Token to cancel request (optional) + /// Task of ApiResponse (UpdateAccepted) + System.Threading.Tasks.Task> UpsertRecipePermissionWithHttpInfoAsync (string owner, string name, RepositoryAccessPolicy repositoryAccessPolicy, CancellationToken cancellationToken = default(CancellationToken)); + #endregion Asynchronous Operations + } + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public partial class RecipesApi : IRecipesApi + { + private PollinationSDK.Client.ExceptionFactory _exceptionFactory = (name, response) => null; + + /// + /// Initializes a new instance of the class. + /// + /// + public RecipesApi(String basePath) + { + this.Configuration = new PollinationSDK.Client.Configuration { BasePath = basePath }; + + ExceptionFactory = PollinationSDK.Client.Configuration.DefaultExceptionFactory; + } + + /// + /// Initializes a new instance of the class + /// + /// + public RecipesApi() + { + 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 RecipesApi(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; } + } + + /// + /// Create a Recipe Create a new recipe. + /// + /// Thrown when fails to make API call + /// + /// + /// CreatedContent + public CreatedContent CreateRecipe (string owner, RepositoryCreate repositoryCreate) + { + ApiResponse localVarResponse = CreateRecipeWithHttpInfo(owner, repositoryCreate); + return localVarResponse.Data; + } + + /// + /// Create a Recipe Create a new recipe. + /// + /// Thrown when fails to make API call + /// + /// + /// ApiResponse of CreatedContent + public ApiResponse CreateRecipeWithHttpInfo (string owner, RepositoryCreate repositoryCreate) + { + // verify the required parameter 'owner' is set + if (owner == null) + throw new ApiException(400, "Missing required parameter 'owner' when calling RecipesApi->CreateRecipe"); + // verify the required parameter 'repositoryCreate' is set + if (repositoryCreate == null) + throw new ApiException(400, "Missing required parameter 'repositoryCreate' when calling RecipesApi->CreateRecipe"); + + var localVarPath = "/recipes/{owner}"; + 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 (owner != null) localVarPathParams.Add("owner", this.Configuration.ApiClient.ParameterToString(owner)); // path parameter + if (repositoryCreate != null && repositoryCreate.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(repositoryCreate); // http body (model) parameter + } + else + { + localVarPostBody = repositoryCreate; // 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("CreateRecipe", 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 a Recipe Create a new recipe. + /// + /// Thrown when fails to make API call + /// + /// + /// Cancellation Token to cancel request (optional) + /// Task of CreatedContent + public async System.Threading.Tasks.Task CreateRecipeAsync (string owner, RepositoryCreate repositoryCreate, CancellationToken cancellationToken = default(CancellationToken)) + { + ApiResponse localVarResponse = await CreateRecipeWithHttpInfoAsync(owner, repositoryCreate, cancellationToken); + return localVarResponse.Data; + + } + + /// + /// Create a Recipe Create a new recipe. + /// + /// Thrown when fails to make API call + /// + /// + /// Cancellation Token to cancel request (optional) + /// Task of ApiResponse (CreatedContent) + public async System.Threading.Tasks.Task> CreateRecipeWithHttpInfoAsync (string owner, RepositoryCreate repositoryCreate, CancellationToken cancellationToken = default(CancellationToken)) + { + // verify the required parameter 'owner' is set + if (owner == null) + throw new ApiException(400, "Missing required parameter 'owner' when calling RecipesApi->CreateRecipe"); + // verify the required parameter 'repositoryCreate' is set + if (repositoryCreate == null) + throw new ApiException(400, "Missing required parameter 'repositoryCreate' when calling RecipesApi->CreateRecipe"); + + var localVarPath = "/recipes/{owner}"; + 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 (owner != null) localVarPathParams.Add("owner", this.Configuration.ApiClient.ParameterToString(owner)); // path parameter + if (repositoryCreate != null && repositoryCreate.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(repositoryCreate); // http body (model) parameter + } + else + { + localVarPostBody = repositoryCreate; // 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("CreateRecipe", 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 a new Recipe package Create a new recipe package version + /// + /// Thrown when fails to make API call + /// + /// + /// + /// CreatedContent + public CreatedContent CreateRecipePackage (string owner, string name, NewRecipePackage newRecipePackage) + { + ApiResponse localVarResponse = CreateRecipePackageWithHttpInfo(owner, name, newRecipePackage); + return localVarResponse.Data; + } + + /// + /// Create a new Recipe package Create a new recipe package version + /// + /// Thrown when fails to make API call + /// + /// + /// + /// ApiResponse of CreatedContent + public ApiResponse CreateRecipePackageWithHttpInfo (string owner, string name, NewRecipePackage newRecipePackage) + { + // verify the required parameter 'owner' is set + if (owner == null) + throw new ApiException(400, "Missing required parameter 'owner' when calling RecipesApi->CreateRecipePackage"); + // verify the required parameter 'name' is set + if (name == null) + throw new ApiException(400, "Missing required parameter 'name' when calling RecipesApi->CreateRecipePackage"); + // verify the required parameter 'newRecipePackage' is set + if (newRecipePackage == null) + throw new ApiException(400, "Missing required parameter 'newRecipePackage' when calling RecipesApi->CreateRecipePackage"); + + var localVarPath = "/recipes/{owner}/{name}/tags"; + 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 (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 (newRecipePackage != null && newRecipePackage.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(newRecipePackage); // http body (model) parameter + } + else + { + localVarPostBody = newRecipePackage; // 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("CreateRecipePackage", 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 a new Recipe package Create a new recipe package version + /// + /// Thrown when fails to make API call + /// + /// + /// + /// Cancellation Token to cancel request (optional) + /// Task of CreatedContent + public async System.Threading.Tasks.Task CreateRecipePackageAsync (string owner, string name, NewRecipePackage newRecipePackage, CancellationToken cancellationToken = default(CancellationToken)) + { + ApiResponse localVarResponse = await CreateRecipePackageWithHttpInfoAsync(owner, name, newRecipePackage, cancellationToken); + return localVarResponse.Data; + + } + + /// + /// Create a new Recipe package Create a new recipe package version + /// + /// Thrown when fails to make API call + /// + /// + /// + /// Cancellation Token to cancel request (optional) + /// Task of ApiResponse (CreatedContent) + public async System.Threading.Tasks.Task> CreateRecipePackageWithHttpInfoAsync (string owner, string name, NewRecipePackage newRecipePackage, CancellationToken cancellationToken = default(CancellationToken)) + { + // verify the required parameter 'owner' is set + if (owner == null) + throw new ApiException(400, "Missing required parameter 'owner' when calling RecipesApi->CreateRecipePackage"); + // verify the required parameter 'name' is set + if (name == null) + throw new ApiException(400, "Missing required parameter 'name' when calling RecipesApi->CreateRecipePackage"); + // verify the required parameter 'newRecipePackage' is set + if (newRecipePackage == null) + throw new ApiException(400, "Missing required parameter 'newRecipePackage' when calling RecipesApi->CreateRecipePackage"); + + var localVarPath = "/recipes/{owner}/{name}/tags"; + 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 (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 (newRecipePackage != null && newRecipePackage.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(newRecipePackage); // http body (model) parameter + } + else + { + localVarPostBody = newRecipePackage; // 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("CreateRecipePackage", 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))); + } + + /// + /// Delete a Recipe Delete a recipe (must have `admin` permission) + /// + /// Thrown when fails to make API call + /// + /// + /// + public void DeleteRecipe (string owner, string name) + { + DeleteRecipeWithHttpInfo(owner, name); + } + + /// + /// Delete a Recipe Delete a recipe (must have `admin` permission) + /// + /// Thrown when fails to make API call + /// + /// + /// ApiResponse of Object(void) + public ApiResponse DeleteRecipeWithHttpInfo (string owner, string name) + { + // verify the required parameter 'owner' is set + if (owner == null) + throw new ApiException(400, "Missing required parameter 'owner' when calling RecipesApi->DeleteRecipe"); + // verify the required parameter 'name' is set + if (name == null) + throw new ApiException(400, "Missing required parameter 'name' when calling RecipesApi->DeleteRecipe"); + + var localVarPath = "/recipes/{owner}/{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 (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 + + // 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("DeleteRecipe", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + null); + } + + /// + /// Delete a Recipe Delete a recipe (must have `admin` permission) + /// + /// Thrown when fails to make API call + /// + /// + /// Cancellation Token to cancel request (optional) + /// Task of void + public async System.Threading.Tasks.Task DeleteRecipeAsync (string owner, string name, CancellationToken cancellationToken = default(CancellationToken)) + { + await DeleteRecipeWithHttpInfoAsync(owner, name, cancellationToken); + + } + + /// + /// Delete a Recipe Delete a recipe (must have `admin` permission) + /// + /// Thrown when fails to make API call + /// + /// + /// Cancellation Token to cancel request (optional) + /// Task of ApiResponse + public async System.Threading.Tasks.Task> DeleteRecipeWithHttpInfoAsync (string owner, string name, CancellationToken cancellationToken = default(CancellationToken)) + { + // verify the required parameter 'owner' is set + if (owner == null) + throw new ApiException(400, "Missing required parameter 'owner' when calling RecipesApi->DeleteRecipe"); + // verify the required parameter 'name' is set + if (name == null) + throw new ApiException(400, "Missing required parameter 'name' when calling RecipesApi->DeleteRecipe"); + + var localVarPath = "/recipes/{owner}/{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 (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 + + // 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("DeleteRecipe", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + null); + } + + /// + /// Remove a Repository permissions Delete a recipe's access policy (must have `admin` permission) + /// + /// Thrown when fails to make API call + /// + /// + /// + /// + public void DeleteRecipeOrgPermission (string owner, string name, RepositoryPolicySubject repositoryPolicySubject) + { + DeleteRecipeOrgPermissionWithHttpInfo(owner, name, repositoryPolicySubject); + } + + /// + /// Remove a Repository permissions Delete a recipe's access policy (must have `admin` permission) + /// + /// Thrown when fails to make API call + /// + /// + /// + /// ApiResponse of Object(void) + public ApiResponse DeleteRecipeOrgPermissionWithHttpInfo (string owner, string name, RepositoryPolicySubject repositoryPolicySubject) + { + // verify the required parameter 'owner' is set + if (owner == null) + throw new ApiException(400, "Missing required parameter 'owner' when calling RecipesApi->DeleteRecipeOrgPermission"); + // verify the required parameter 'name' is set + if (name == null) + throw new ApiException(400, "Missing required parameter 'name' when calling RecipesApi->DeleteRecipeOrgPermission"); + // verify the required parameter 'repositoryPolicySubject' is set + if (repositoryPolicySubject == null) + throw new ApiException(400, "Missing required parameter 'repositoryPolicySubject' when calling RecipesApi->DeleteRecipeOrgPermission"); + + var localVarPath = "/recipes/{owner}/{name}/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 (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 (repositoryPolicySubject != null && repositoryPolicySubject.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(repositoryPolicySubject); // http body (model) parameter + } + else + { + localVarPostBody = repositoryPolicySubject; // 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("DeleteRecipeOrgPermission", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + null); + } + + /// + /// Remove a Repository permissions Delete a recipe's access policy (must have `admin` permission) + /// + /// Thrown when fails to make API call + /// + /// + /// + /// Cancellation Token to cancel request (optional) + /// Task of void + public async System.Threading.Tasks.Task DeleteRecipeOrgPermissionAsync (string owner, string name, RepositoryPolicySubject repositoryPolicySubject, CancellationToken cancellationToken = default(CancellationToken)) + { + await DeleteRecipeOrgPermissionWithHttpInfoAsync(owner, name, repositoryPolicySubject, cancellationToken); + + } + + /// + /// Remove a Repository permissions Delete a recipe's access policy (must have `admin` permission) + /// + /// Thrown when fails to make API call + /// + /// + /// + /// Cancellation Token to cancel request (optional) + /// Task of ApiResponse + public async System.Threading.Tasks.Task> DeleteRecipeOrgPermissionWithHttpInfoAsync (string owner, string name, RepositoryPolicySubject repositoryPolicySubject, CancellationToken cancellationToken = default(CancellationToken)) + { + // verify the required parameter 'owner' is set + if (owner == null) + throw new ApiException(400, "Missing required parameter 'owner' when calling RecipesApi->DeleteRecipeOrgPermission"); + // verify the required parameter 'name' is set + if (name == null) + throw new ApiException(400, "Missing required parameter 'name' when calling RecipesApi->DeleteRecipeOrgPermission"); + // verify the required parameter 'repositoryPolicySubject' is set + if (repositoryPolicySubject == null) + throw new ApiException(400, "Missing required parameter 'repositoryPolicySubject' when calling RecipesApi->DeleteRecipeOrgPermission"); + + var localVarPath = "/recipes/{owner}/{name}/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 (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 (repositoryPolicySubject != null && repositoryPolicySubject.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(repositoryPolicySubject); // http body (model) parameter + } + else + { + localVarPostBody = repositoryPolicySubject; // 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("DeleteRecipeOrgPermission", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + null); + } + + /// + /// Get a recipe Retrieve a recipe by name + /// + /// Thrown when fails to make API call + /// + /// + /// Repository + public Repository GetRecipe (string owner, string name) + { + ApiResponse localVarResponse = GetRecipeWithHttpInfo(owner, name); + return localVarResponse.Data; + } + + /// + /// Get a recipe Retrieve a recipe by name + /// + /// Thrown when fails to make API call + /// + /// + /// ApiResponse of Repository + public ApiResponse GetRecipeWithHttpInfo (string owner, string name) + { + // verify the required parameter 'owner' is set + if (owner == null) + throw new ApiException(400, "Missing required parameter 'owner' when calling RecipesApi->GetRecipe"); + // verify the required parameter 'name' is set + if (name == null) + throw new ApiException(400, "Missing required parameter 'name' when calling RecipesApi->GetRecipe"); + + var localVarPath = "/recipes/{owner}/{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 (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 + + // 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("GetRecipe", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (Repository) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Repository))); + } + + /// + /// Get a recipe Retrieve a recipe by name + /// + /// Thrown when fails to make API call + /// + /// + /// Cancellation Token to cancel request (optional) + /// Task of Repository + public async System.Threading.Tasks.Task GetRecipeAsync (string owner, string name, CancellationToken cancellationToken = default(CancellationToken)) + { + ApiResponse localVarResponse = await GetRecipeWithHttpInfoAsync(owner, name, cancellationToken); + return localVarResponse.Data; + + } + + /// + /// Get a recipe Retrieve a recipe by name + /// + /// Thrown when fails to make API call + /// + /// + /// Cancellation Token to cancel request (optional) + /// Task of ApiResponse (Repository) + public async System.Threading.Tasks.Task> GetRecipeWithHttpInfoAsync (string owner, string name, CancellationToken cancellationToken = default(CancellationToken)) + { + // verify the required parameter 'owner' is set + if (owner == null) + throw new ApiException(400, "Missing required parameter 'owner' when calling RecipesApi->GetRecipe"); + // verify the required parameter 'name' is set + if (name == null) + throw new ApiException(400, "Missing required parameter 'name' when calling RecipesApi->GetRecipe"); + + var localVarPath = "/recipes/{owner}/{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 (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 + + // 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("GetRecipe", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (Repository) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Repository))); + } + + /// + /// Get recipe access permissions Retrieve a recipe's access permissions (must have `write` permission) + /// + /// Thrown when fails to make API call + /// + /// + /// Page number starting from 1 (optional, default to 1) + /// Number of items per page (optional, default to 25) + /// The type of access policy subject (optional) + /// An access policy permission string (optional) + /// RepositoryAccessPolicyList + public RepositoryAccessPolicyList GetRecipeAccessPermissions (string owner, string name, int? page = default, int? perPage = default, List subjectType = default, List permission = default) + { + ApiResponse localVarResponse = GetRecipeAccessPermissionsWithHttpInfo(owner, name, page, perPage, subjectType, permission); + return localVarResponse.Data; + } + + /// + /// Get recipe access permissions Retrieve a recipe's access permissions (must have `write` permission) + /// + /// Thrown when fails to make API call + /// + /// + /// Page number starting from 1 (optional, default to 1) + /// Number of items per page (optional, default to 25) + /// The type of access policy subject (optional) + /// An access policy permission string (optional) + /// ApiResponse of RepositoryAccessPolicyList + public ApiResponse GetRecipeAccessPermissionsWithHttpInfo (string owner, string name, int? page = default, int? perPage = default, List subjectType = default, List permission = default) + { + // verify the required parameter 'owner' is set + if (owner == null) + throw new ApiException(400, "Missing required parameter 'owner' when calling RecipesApi->GetRecipeAccessPermissions"); + // verify the required parameter 'name' is set + if (name == null) + throw new ApiException(400, "Missing required parameter 'name' when calling RecipesApi->GetRecipeAccessPermissions"); + + var localVarPath = "/recipes/{owner}/{name}/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[] { + }; + 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 (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 + if (subjectType != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("multi", "subject_type", subjectType)); // query parameter + if (permission != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("multi", "permission", permission)); // 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("GetRecipeAccessPermissions", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (RepositoryAccessPolicyList) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(RepositoryAccessPolicyList))); + } + + /// + /// Get recipe access permissions Retrieve a recipe's access permissions (must have `write` permission) + /// + /// Thrown when fails to make API call + /// + /// + /// Page number starting from 1 (optional, default to 1) + /// Number of items per page (optional, default to 25) + /// The type of access policy subject (optional) + /// An access policy permission string (optional) + /// Cancellation Token to cancel request (optional) + /// Task of RepositoryAccessPolicyList + public async System.Threading.Tasks.Task GetRecipeAccessPermissionsAsync (string owner, string name, int? page = default, int? perPage = default, List subjectType = default, List permission = default, CancellationToken cancellationToken = default(CancellationToken)) + { + ApiResponse localVarResponse = await GetRecipeAccessPermissionsWithHttpInfoAsync(owner, name, page, perPage, subjectType, permission, cancellationToken); + return localVarResponse.Data; + + } + + /// + /// Get recipe access permissions Retrieve a recipe's access permissions (must have `write` permission) + /// + /// Thrown when fails to make API call + /// + /// + /// Page number starting from 1 (optional, default to 1) + /// Number of items per page (optional, default to 25) + /// The type of access policy subject (optional) + /// An access policy permission string (optional) + /// Cancellation Token to cancel request (optional) + /// Task of ApiResponse (RepositoryAccessPolicyList) + public async System.Threading.Tasks.Task> GetRecipeAccessPermissionsWithHttpInfoAsync (string owner, string name, int? page = default, int? perPage = default, List subjectType = default, List permission = default, CancellationToken cancellationToken = default(CancellationToken)) + { + // verify the required parameter 'owner' is set + if (owner == null) + throw new ApiException(400, "Missing required parameter 'owner' when calling RecipesApi->GetRecipeAccessPermissions"); + // verify the required parameter 'name' is set + if (name == null) + throw new ApiException(400, "Missing required parameter 'name' when calling RecipesApi->GetRecipeAccessPermissions"); + + var localVarPath = "/recipes/{owner}/{name}/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[] { + }; + 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 (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 + if (subjectType != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("multi", "subject_type", subjectType)); // query parameter + if (permission != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("multi", "permission", permission)); // 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("GetRecipeAccessPermissions", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (RepositoryAccessPolicyList) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(RepositoryAccessPolicyList))); + } + + /// + /// Get a recipe tag Retrieve a recipe tag by name and tag + /// + /// Thrown when fails to make API call + /// + /// + /// + /// RecipePackage + public RecipePackage GetRecipeByTag (string owner, string name, string tag) + { + ApiResponse localVarResponse = GetRecipeByTagWithHttpInfo(owner, name, tag); + return localVarResponse.Data; + } + + /// + /// Get a recipe tag Retrieve a recipe tag by name and tag + /// + /// Thrown when fails to make API call + /// + /// + /// + /// ApiResponse of RecipePackage + public ApiResponse GetRecipeByTagWithHttpInfo (string owner, string name, string tag) + { + // verify the required parameter 'owner' is set + if (owner == null) + throw new ApiException(400, "Missing required parameter 'owner' when calling RecipesApi->GetRecipeByTag"); + // verify the required parameter 'name' is set + if (name == null) + throw new ApiException(400, "Missing required parameter 'name' when calling RecipesApi->GetRecipeByTag"); + // verify the required parameter 'tag' is set + if (tag == null) + throw new ApiException(400, "Missing required parameter 'tag' when calling RecipesApi->GetRecipeByTag"); + + var localVarPath = "/recipes/{owner}/{name}/tags/{tag}"; + 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 (tag != null) localVarPathParams.Add("tag", this.Configuration.ApiClient.ParameterToString(tag)); // 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("GetRecipeByTag", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (RecipePackage) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(RecipePackage))); + } + + /// + /// Get a recipe tag Retrieve a recipe tag by name and tag + /// + /// Thrown when fails to make API call + /// + /// + /// + /// Cancellation Token to cancel request (optional) + /// Task of RecipePackage + public async System.Threading.Tasks.Task GetRecipeByTagAsync (string owner, string name, string tag, CancellationToken cancellationToken = default(CancellationToken)) + { + ApiResponse localVarResponse = await GetRecipeByTagWithHttpInfoAsync(owner, name, tag, cancellationToken); + return localVarResponse.Data; + + } + + /// + /// Get a recipe tag Retrieve a recipe tag by name and tag + /// + /// Thrown when fails to make API call + /// + /// + /// + /// Cancellation Token to cancel request (optional) + /// Task of ApiResponse (RecipePackage) + public async System.Threading.Tasks.Task> GetRecipeByTagWithHttpInfoAsync (string owner, string name, string tag, CancellationToken cancellationToken = default(CancellationToken)) + { + // verify the required parameter 'owner' is set + if (owner == null) + throw new ApiException(400, "Missing required parameter 'owner' when calling RecipesApi->GetRecipeByTag"); + // verify the required parameter 'name' is set + if (name == null) + throw new ApiException(400, "Missing required parameter 'name' when calling RecipesApi->GetRecipeByTag"); + // verify the required parameter 'tag' is set + if (tag == null) + throw new ApiException(400, "Missing required parameter 'tag' when calling RecipesApi->GetRecipeByTag"); + + var localVarPath = "/recipes/{owner}/{name}/tags/{tag}"; + 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 (tag != null) localVarPathParams.Add("tag", this.Configuration.ApiClient.ParameterToString(tag)); // 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("GetRecipeByTag", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (RecipePackage) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(RecipePackage))); + } + + /// + /// Get a recipe tags Retrieve a recipe by name + /// + /// Thrown when fails to make API call + /// + /// + /// Key to sort the list by (optional) + /// The order to sort the list (optional) + /// 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) + { + ApiResponse localVarResponse = ListRecipeTagsWithHttpInfo(owner, name, sortBy, sortOrder, page, perPage); + return localVarResponse.Data; + } + + /// + /// Get a recipe tags Retrieve a recipe by name + /// + /// Thrown when fails to make API call + /// + /// + /// Key to sort the list by (optional) + /// The order to sort the list (optional) + /// 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) + { + // verify the required parameter 'owner' is set + if (owner == null) + throw new ApiException(400, "Missing required parameter 'owner' when calling RecipesApi->ListRecipeTags"); + // verify the required parameter 'name' is set + if (name == null) + throw new ApiException(400, "Missing required parameter 'name' when calling RecipesApi->ListRecipeTags"); + + var localVarPath = "/recipes/{owner}/{name}/tags"; + 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 (sortBy != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "sort_by", sortBy)); // query parameter + if (sortOrder != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "sort_order", sortOrder)); // 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("ListRecipeTags", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (RecipePackageList) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(RecipePackageList))); + } + + /// + /// Get a recipe tags Retrieve a recipe by name + /// + /// Thrown when fails to make API call + /// + /// + /// Key to sort the list by (optional) + /// The order to sort the list (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 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)) + { + ApiResponse localVarResponse = await ListRecipeTagsWithHttpInfoAsync(owner, name, sortBy, sortOrder, page, perPage, cancellationToken); + return localVarResponse.Data; + + } + + /// + /// Get a recipe tags Retrieve a recipe by name + /// + /// Thrown when fails to make API call + /// + /// + /// Key to sort the list by (optional) + /// The order to sort the list (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 (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)) + { + // verify the required parameter 'owner' is set + if (owner == null) + throw new ApiException(400, "Missing required parameter 'owner' when calling RecipesApi->ListRecipeTags"); + // verify the required parameter 'name' is set + if (name == null) + throw new ApiException(400, "Missing required parameter 'name' when calling RecipesApi->ListRecipeTags"); + + var localVarPath = "/recipes/{owner}/{name}/tags"; + 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 (sortBy != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "sort_by", sortBy)); // query parameter + if (sortOrder != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "sort_order", sortOrder)); // 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("ListRecipeTags", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (RecipePackageList) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(RecipePackageList))); + } + + /// + /// List recipes + /// + /// Thrown when fails to make API call + /// You know, for search (optional) + /// The account name (optional) + /// Owner of the project (optional) + /// Boolean check for public/private projects (optional) + /// A keyword to index the repository by (optional) + /// Filter by permission on given resource (optional) + /// Key to sort the list by (optional) + /// The order to sort the list (optional) + /// 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) + { + ApiResponse localVarResponse = ListRecipesWithHttpInfo(search, name, owner, _public, keyword, permission, sortBy, sortOrder, page, perPage); + return localVarResponse.Data; + } + + /// + /// List recipes + /// + /// Thrown when fails to make API call + /// You know, for search (optional) + /// The account name (optional) + /// Owner of the project (optional) + /// Boolean check for public/private projects (optional) + /// A keyword to index the repository by (optional) + /// Filter by permission on given resource (optional) + /// Key to sort the list by (optional) + /// The order to sort the list (optional) + /// 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) + { + + var localVarPath = "/recipes"; + 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 (search != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("multi", "search", search)); // query parameter + if (name != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("multi", "name", name)); // query parameter + if (owner != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("multi", "owner", owner)); // query parameter + if (_public != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "public", _public)); // query parameter + if (keyword != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("multi", "keyword", keyword)); // query parameter + if (permission != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("multi", "permission", permission)); // query parameter + if (sortBy != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "sort_by", sortBy)); // query parameter + if (sortOrder != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "sort_order", sortOrder)); // 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("ListRecipes", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (RepositoryList) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(RepositoryList))); + } + + /// + /// List recipes + /// + /// Thrown when fails to make API call + /// You know, for search (optional) + /// The account name (optional) + /// Owner of the project (optional) + /// Boolean check for public/private projects (optional) + /// A keyword to index the repository by (optional) + /// Filter by permission on given resource (optional) + /// Key to sort the list by (optional) + /// The order to sort the list (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 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)) + { + ApiResponse localVarResponse = await ListRecipesWithHttpInfoAsync(search, name, owner, _public, keyword, permission, sortBy, sortOrder, page, perPage, cancellationToken); + return localVarResponse.Data; + + } + + /// + /// List recipes + /// + /// Thrown when fails to make API call + /// You know, for search (optional) + /// The account name (optional) + /// Owner of the project (optional) + /// Boolean check for public/private projects (optional) + /// A keyword to index the repository by (optional) + /// Filter by permission on given resource (optional) + /// Key to sort the list by (optional) + /// The order to sort the list (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 (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)) + { + + var localVarPath = "/recipes"; + 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 (search != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("multi", "search", search)); // query parameter + if (name != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("multi", "name", name)); // query parameter + if (owner != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("multi", "owner", owner)); // query parameter + if (_public != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "public", _public)); // query parameter + if (keyword != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("multi", "keyword", keyword)); // query parameter + if (permission != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("multi", "permission", permission)); // query parameter + if (sortBy != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "sort_by", sortBy)); // query parameter + if (sortOrder != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "sort_order", sortOrder)); // 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("ListRecipes", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (RepositoryList) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(RepositoryList))); + } + + /// + /// Update a Recipe Update a recipe (must have `contribute` permission) + /// + /// Thrown when fails to make API call + /// + /// + /// + /// UpdateAccepted + public UpdateAccepted UpdateRecipe (string owner, string name, RepositoryUpdate repositoryUpdate) + { + ApiResponse localVarResponse = UpdateRecipeWithHttpInfo(owner, name, repositoryUpdate); + return localVarResponse.Data; + } + + /// + /// Update a Recipe Update a recipe (must have `contribute` permission) + /// + /// Thrown when fails to make API call + /// + /// + /// + /// ApiResponse of UpdateAccepted + public ApiResponse UpdateRecipeWithHttpInfo (string owner, string name, RepositoryUpdate repositoryUpdate) + { + // verify the required parameter 'owner' is set + if (owner == null) + throw new ApiException(400, "Missing required parameter 'owner' when calling RecipesApi->UpdateRecipe"); + // verify the required parameter 'name' is set + if (name == null) + throw new ApiException(400, "Missing required parameter 'name' when calling RecipesApi->UpdateRecipe"); + // verify the required parameter 'repositoryUpdate' is set + if (repositoryUpdate == null) + throw new ApiException(400, "Missing required parameter 'repositoryUpdate' when calling RecipesApi->UpdateRecipe"); + + var localVarPath = "/recipes/{owner}/{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[] { + "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 (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 (repositoryUpdate != null && repositoryUpdate.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(repositoryUpdate); // http body (model) parameter + } + else + { + localVarPostBody = repositoryUpdate; // 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("UpdateRecipe", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (UpdateAccepted) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(UpdateAccepted))); + } + + /// + /// Update a Recipe Update a recipe (must have `contribute` permission) + /// + /// Thrown when fails to make API call + /// + /// + /// + /// Cancellation Token to cancel request (optional) + /// Task of UpdateAccepted + public async System.Threading.Tasks.Task UpdateRecipeAsync (string owner, string name, RepositoryUpdate repositoryUpdate, CancellationToken cancellationToken = default(CancellationToken)) + { + ApiResponse localVarResponse = await UpdateRecipeWithHttpInfoAsync(owner, name, repositoryUpdate, cancellationToken); + return localVarResponse.Data; + + } + + /// + /// Update a Recipe Update a recipe (must have `contribute` permission) + /// + /// Thrown when fails to make API call + /// + /// + /// + /// Cancellation Token to cancel request (optional) + /// Task of ApiResponse (UpdateAccepted) + public async System.Threading.Tasks.Task> UpdateRecipeWithHttpInfoAsync (string owner, string name, RepositoryUpdate repositoryUpdate, CancellationToken cancellationToken = default(CancellationToken)) + { + // verify the required parameter 'owner' is set + if (owner == null) + throw new ApiException(400, "Missing required parameter 'owner' when calling RecipesApi->UpdateRecipe"); + // verify the required parameter 'name' is set + if (name == null) + throw new ApiException(400, "Missing required parameter 'name' when calling RecipesApi->UpdateRecipe"); + // verify the required parameter 'repositoryUpdate' is set + if (repositoryUpdate == null) + throw new ApiException(400, "Missing required parameter 'repositoryUpdate' when calling RecipesApi->UpdateRecipe"); + + var localVarPath = "/recipes/{owner}/{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[] { + "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 (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 (repositoryUpdate != null && repositoryUpdate.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(repositoryUpdate); // http body (model) parameter + } + else + { + localVarPostBody = repositoryUpdate; // 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("UpdateRecipe", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (UpdateAccepted) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(UpdateAccepted))); + } + + /// + /// Upsert a new permission to a recipe Upsert a recipe's access policy (must have `admin` permission) + /// + /// Thrown when fails to make API call + /// + /// + /// + /// UpdateAccepted + public UpdateAccepted UpsertRecipePermission (string owner, string name, RepositoryAccessPolicy repositoryAccessPolicy) + { + ApiResponse localVarResponse = UpsertRecipePermissionWithHttpInfo(owner, name, repositoryAccessPolicy); + return localVarResponse.Data; + } + + /// + /// Upsert a new permission to a recipe Upsert a recipe's access policy (must have `admin` permission) + /// + /// Thrown when fails to make API call + /// + /// + /// + /// ApiResponse of UpdateAccepted + public ApiResponse UpsertRecipePermissionWithHttpInfo (string owner, string name, RepositoryAccessPolicy repositoryAccessPolicy) + { + // verify the required parameter 'owner' is set + if (owner == null) + throw new ApiException(400, "Missing required parameter 'owner' when calling RecipesApi->UpsertRecipePermission"); + // verify the required parameter 'name' is set + if (name == null) + throw new ApiException(400, "Missing required parameter 'name' when calling RecipesApi->UpsertRecipePermission"); + // verify the required parameter 'repositoryAccessPolicy' is set + if (repositoryAccessPolicy == null) + throw new ApiException(400, "Missing required parameter 'repositoryAccessPolicy' when calling RecipesApi->UpsertRecipePermission"); + + var localVarPath = "/recipes/{owner}/{name}/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 (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 (repositoryAccessPolicy != null && repositoryAccessPolicy.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(repositoryAccessPolicy); // http body (model) parameter + } + else + { + localVarPostBody = repositoryAccessPolicy; // 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("UpsertRecipePermission", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (UpdateAccepted) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(UpdateAccepted))); + } + + /// + /// Upsert a new permission to a recipe Upsert a recipe's access policy (must have `admin` permission) + /// + /// Thrown when fails to make API call + /// + /// + /// + /// Cancellation Token to cancel request (optional) + /// Task of UpdateAccepted + public async System.Threading.Tasks.Task UpsertRecipePermissionAsync (string owner, string name, RepositoryAccessPolicy repositoryAccessPolicy, CancellationToken cancellationToken = default(CancellationToken)) + { + ApiResponse localVarResponse = await UpsertRecipePermissionWithHttpInfoAsync(owner, name, repositoryAccessPolicy, cancellationToken); + return localVarResponse.Data; + + } + + /// + /// Upsert a new permission to a recipe Upsert a recipe's access policy (must have `admin` permission) + /// + /// Thrown when fails to make API call + /// + /// + /// + /// Cancellation Token to cancel request (optional) + /// Task of ApiResponse (UpdateAccepted) + public async System.Threading.Tasks.Task> UpsertRecipePermissionWithHttpInfoAsync (string owner, string name, RepositoryAccessPolicy repositoryAccessPolicy, CancellationToken cancellationToken = default(CancellationToken)) + { + // verify the required parameter 'owner' is set + if (owner == null) + throw new ApiException(400, "Missing required parameter 'owner' when calling RecipesApi->UpsertRecipePermission"); + // verify the required parameter 'name' is set + if (name == null) + throw new ApiException(400, "Missing required parameter 'name' when calling RecipesApi->UpsertRecipePermission"); + // verify the required parameter 'repositoryAccessPolicy' is set + if (repositoryAccessPolicy == null) + throw new ApiException(400, "Missing required parameter 'repositoryAccessPolicy' when calling RecipesApi->UpsertRecipePermission"); + + var localVarPath = "/recipes/{owner}/{name}/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 (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 (repositoryAccessPolicy != null && repositoryAccessPolicy.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(repositoryAccessPolicy); // http body (model) parameter + } + else + { + localVarPostBody = repositoryAccessPolicy; // 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("UpsertRecipePermission", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (UpdateAccepted) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(UpdateAccepted))); + } + + } +} diff --git a/src/PollinationSDK/Api/RegistriesApi.cs b/src/PollinationSDK/Api/RegistriesApi.cs new file mode 100644 index 000000000..f319bd72c --- /dev/null +++ b/src/PollinationSDK/Api/RegistriesApi.cs @@ -0,0 +1,1266 @@ +/* + * 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 IRegistriesApi : IApiAccessor + { + #region Synchronous Operations + /// + /// Get Package + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + /// + /// + /// object + object GetPackage (string owner, string type, string name, string digest); + + /// + /// Get Package + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + /// + /// + /// ApiResponse of object + ApiResponse GetPackageWithHttpInfo (string owner, string type, string name, string digest); + /// + /// Get Package in JSON format + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + /// + /// + /// (optional, default to false) + /// AnyOfRecipePluginBakedRecipe + AnyOf GetPackageJson (string owner, string type, string name, string digest, bool? baked = default); + + /// + /// Get Package in JSON format + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + /// + /// + /// (optional, default to false) + /// ApiResponse of AnyOfRecipePluginBakedRecipe + ApiResponse> GetPackageJsonWithHttpInfo (string owner, string type, string name, string digest, bool? baked = default); + /// + /// Get Registry Index + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// RepositoryIndex + RepositoryIndex GetRegistryIndex (string owner); + + /// + /// Get Registry Index + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// ApiResponse of RepositoryIndex + ApiResponse GetRegistryIndexWithHttpInfo (string owner); + /// + /// Push a plugin to the registry + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// (optional, default to "Body_post_plugin__owner__plugins_post") + /// (optional) + /// object + object PostPlugin (string owner, string type = default, System.IO.Stream package = default); + + /// + /// Push a plugin to the registry + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// (optional, default to "Body_post_plugin__owner__plugins_post") + /// (optional) + /// ApiResponse of object + ApiResponse PostPluginWithHttpInfo (string owner, string type = default, System.IO.Stream package = default); + /// + /// Push an Recipe to the registry + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// (optional, default to "Body_post_recipe__owner__recipes_post") + /// (optional) + /// object + object PostRecipe (string owner, string type = default, System.IO.Stream package = default); + + /// + /// Push an Recipe to the registry + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// (optional, default to "Body_post_recipe__owner__recipes_post") + /// (optional) + /// ApiResponse of object + ApiResponse PostRecipeWithHttpInfo (string owner, string type = default, System.IO.Stream package = default); + #endregion Synchronous Operations + #region Asynchronous Operations + /// + /// Get Package + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + /// + /// + /// Cancellation Token to cancel request (optional) + /// Task of object + System.Threading.Tasks.Task GetPackageAsync (string owner, string type, string name, string digest, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// Get Package + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + /// + /// + /// Cancellation Token to cancel request (optional) + /// Task of ApiResponse (object) + System.Threading.Tasks.Task> GetPackageWithHttpInfoAsync (string owner, string type, string name, string digest, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Get Package in JSON format + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + /// + /// + /// (optional, default to false) + /// Cancellation Token to cancel request (optional) + /// 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 + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + /// + /// + /// (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, bool? baked = default, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Get Registry Index + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// Cancellation Token to cancel request (optional) + /// Task of RepositoryIndex + System.Threading.Tasks.Task GetRegistryIndexAsync (string owner, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// Get Registry Index + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// Cancellation Token to cancel request (optional) + /// Task of ApiResponse (RepositoryIndex) + System.Threading.Tasks.Task> GetRegistryIndexWithHttpInfoAsync (string owner, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Push a plugin to the registry + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// (optional, default to "Body_post_plugin__owner__plugins_post") + /// (optional) + /// Cancellation Token to cancel request (optional) + /// Task of object + System.Threading.Tasks.Task PostPluginAsync (string owner, string type = default, System.IO.Stream package = default, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// Push a plugin to the registry + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// (optional, default to "Body_post_plugin__owner__plugins_post") + /// (optional) + /// Cancellation Token to cancel request (optional) + /// Task of ApiResponse (object) + System.Threading.Tasks.Task> PostPluginWithHttpInfoAsync (string owner, string type = default, System.IO.Stream package = default, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Push an Recipe to the registry + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// (optional, default to "Body_post_recipe__owner__recipes_post") + /// (optional) + /// Cancellation Token to cancel request (optional) + /// Task of object + System.Threading.Tasks.Task PostRecipeAsync (string owner, string type = default, System.IO.Stream package = default, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// Push an Recipe to the registry + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// (optional, default to "Body_post_recipe__owner__recipes_post") + /// (optional) + /// Cancellation Token to cancel request (optional) + /// Task of ApiResponse (object) + System.Threading.Tasks.Task> PostRecipeWithHttpInfoAsync (string owner, string type = default, System.IO.Stream package = default, CancellationToken cancellationToken = default(CancellationToken)); + #endregion Asynchronous Operations + } + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public partial class RegistriesApi : IRegistriesApi + { + private PollinationSDK.Client.ExceptionFactory _exceptionFactory = (name, response) => null; + + /// + /// Initializes a new instance of the class. + /// + /// + public RegistriesApi(String basePath) + { + this.Configuration = new PollinationSDK.Client.Configuration { BasePath = basePath }; + + ExceptionFactory = PollinationSDK.Client.Configuration.DefaultExceptionFactory; + } + + /// + /// Initializes a new instance of the class + /// + /// + public RegistriesApi() + { + 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 RegistriesApi(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 Package + /// + /// Thrown when fails to make API call + /// + /// + /// + /// + /// object + public object GetPackage (string owner, string type, string name, string digest) + { + ApiResponse localVarResponse = GetPackageWithHttpInfo(owner, type, name, digest); + return localVarResponse.Data; + } + + /// + /// Get Package + /// + /// Thrown when fails to make API call + /// + /// + /// + /// + /// ApiResponse of object + public ApiResponse GetPackageWithHttpInfo (string owner, string type, string name, string digest) + { + // verify the required parameter 'owner' is set + if (owner == null) + throw new ApiException(400, "Missing required parameter 'owner' when calling RegistriesApi->GetPackage"); + // verify the required parameter 'type' is set + if (type == null) + throw new ApiException(400, "Missing required parameter 'type' when calling RegistriesApi->GetPackage"); + // verify the required parameter 'name' is set + if (name == null) + throw new ApiException(400, "Missing required parameter 'name' when calling RegistriesApi->GetPackage"); + // verify the required parameter 'digest' is set + if (digest == null) + throw new ApiException(400, "Missing required parameter 'digest' when calling RegistriesApi->GetPackage"); + + var localVarPath = "/registries/{owner}/{type}/{name}/{digest}"; + 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", + "application/x-tar" + }; + 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 (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 + + // 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("GetPackage", 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 Package + /// + /// Thrown when fails to make API call + /// + /// + /// + /// + /// Cancellation Token to cancel request (optional) + /// Task of object + public async System.Threading.Tasks.Task GetPackageAsync (string owner, string type, string name, string digest, CancellationToken cancellationToken = default(CancellationToken)) + { + ApiResponse localVarResponse = await GetPackageWithHttpInfoAsync(owner, type, name, digest, cancellationToken); + return localVarResponse.Data; + + } + + /// + /// Get Package + /// + /// Thrown when fails to make API call + /// + /// + /// + /// + /// Cancellation Token to cancel request (optional) + /// Task of ApiResponse (object) + public async System.Threading.Tasks.Task> GetPackageWithHttpInfoAsync (string owner, string type, string name, string digest, CancellationToken cancellationToken = default(CancellationToken)) + { + // verify the required parameter 'owner' is set + if (owner == null) + throw new ApiException(400, "Missing required parameter 'owner' when calling RegistriesApi->GetPackage"); + // verify the required parameter 'type' is set + if (type == null) + throw new ApiException(400, "Missing required parameter 'type' when calling RegistriesApi->GetPackage"); + // verify the required parameter 'name' is set + if (name == null) + throw new ApiException(400, "Missing required parameter 'name' when calling RegistriesApi->GetPackage"); + // verify the required parameter 'digest' is set + if (digest == null) + throw new ApiException(400, "Missing required parameter 'digest' when calling RegistriesApi->GetPackage"); + + var localVarPath = "/registries/{owner}/{type}/{name}/{digest}"; + 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", + "application/x-tar" + }; + 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 (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 + + // 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("GetPackage", 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 Package in JSON format + /// + /// Thrown when fails to make API call + /// + /// + /// + /// + /// (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, baked); + return localVarResponse.Data; + } + + /// + /// Get Package in JSON format + /// + /// Thrown when fails to make API call + /// + /// + /// + /// + /// (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) + throw new ApiException(400, "Missing required parameter 'owner' when calling RegistriesApi->GetPackageJson"); + // verify the required parameter 'type' is set + if (type == null) + throw new ApiException(400, "Missing required parameter 'type' when calling RegistriesApi->GetPackageJson"); + // verify the required parameter 'name' is set + if (name == null) + throw new ApiException(400, "Missing required parameter 'name' when calling RegistriesApi->GetPackageJson"); + // verify the required parameter 'digest' is set + if (digest == null) + throw new ApiException(400, "Missing required parameter 'digest' when calling RegistriesApi->GetPackageJson"); + + var localVarPath = "/registries/{owner}/{type}/{name}/{digest}/json"; + 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 (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"))) + { + 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("GetPackageJson", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse>(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (AnyOf) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(AnyOf))); + } + + /// + /// Get Package in JSON format + /// + /// Thrown when fails to make API call + /// + /// + /// + /// + /// (optional, default to false) + /// Cancellation Token to cancel request (optional) + /// 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, baked, cancellationToken); + return localVarResponse.Data; + + } + + /// + /// Get Package in JSON format + /// + /// Thrown when fails to make API call + /// + /// + /// + /// + /// (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, bool? baked = default, CancellationToken cancellationToken = default(CancellationToken)) + { + // verify the required parameter 'owner' is set + if (owner == null) + throw new ApiException(400, "Missing required parameter 'owner' when calling RegistriesApi->GetPackageJson"); + // verify the required parameter 'type' is set + if (type == null) + throw new ApiException(400, "Missing required parameter 'type' when calling RegistriesApi->GetPackageJson"); + // verify the required parameter 'name' is set + if (name == null) + throw new ApiException(400, "Missing required parameter 'name' when calling RegistriesApi->GetPackageJson"); + // verify the required parameter 'digest' is set + if (digest == null) + throw new ApiException(400, "Missing required parameter 'digest' when calling RegistriesApi->GetPackageJson"); + + var localVarPath = "/registries/{owner}/{type}/{name}/{digest}/json"; + 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 (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"))) + { + 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("GetPackageJson", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse>(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (AnyOf) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(AnyOf))); + } + + /// + /// Get Registry Index + /// + /// Thrown when fails to make API call + /// + /// RepositoryIndex + public RepositoryIndex GetRegistryIndex (string owner) + { + ApiResponse localVarResponse = GetRegistryIndexWithHttpInfo(owner); + return localVarResponse.Data; + } + + /// + /// Get Registry Index + /// + /// Thrown when fails to make API call + /// + /// ApiResponse of RepositoryIndex + public ApiResponse GetRegistryIndexWithHttpInfo (string owner) + { + // verify the required parameter 'owner' is set + if (owner == null) + throw new ApiException(400, "Missing required parameter 'owner' when calling RegistriesApi->GetRegistryIndex"); + + var localVarPath = "/registries/{owner}/index.json"; + 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 + + // 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("GetRegistryIndex", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (RepositoryIndex) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(RepositoryIndex))); + } + + /// + /// Get Registry Index + /// + /// Thrown when fails to make API call + /// + /// Cancellation Token to cancel request (optional) + /// Task of RepositoryIndex + public async System.Threading.Tasks.Task GetRegistryIndexAsync (string owner, CancellationToken cancellationToken = default(CancellationToken)) + { + ApiResponse localVarResponse = await GetRegistryIndexWithHttpInfoAsync(owner, cancellationToken); + return localVarResponse.Data; + + } + + /// + /// Get Registry Index + /// + /// Thrown when fails to make API call + /// + /// Cancellation Token to cancel request (optional) + /// Task of ApiResponse (RepositoryIndex) + public async System.Threading.Tasks.Task> GetRegistryIndexWithHttpInfoAsync (string owner, CancellationToken cancellationToken = default(CancellationToken)) + { + // verify the required parameter 'owner' is set + if (owner == null) + throw new ApiException(400, "Missing required parameter 'owner' when calling RegistriesApi->GetRegistryIndex"); + + var localVarPath = "/registries/{owner}/index.json"; + 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 + + // 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("GetRegistryIndex", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (RepositoryIndex) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(RepositoryIndex))); + } + + /// + /// Push a plugin to the registry + /// + /// Thrown when fails to make API call + /// + /// (optional, default to "Body_post_plugin__owner__plugins_post") + /// (optional) + /// object + public object PostPlugin (string owner, string type = default, System.IO.Stream package = default) + { + ApiResponse localVarResponse = PostPluginWithHttpInfo(owner, type, package); + return localVarResponse.Data; + } + + /// + /// Push a plugin to the registry + /// + /// Thrown when fails to make API call + /// + /// (optional, default to "Body_post_plugin__owner__plugins_post") + /// (optional) + /// ApiResponse of object + public ApiResponse PostPluginWithHttpInfo (string owner, string type = default, System.IO.Stream package = default) + { + // verify the required parameter 'owner' is set + if (owner == null) + throw new ApiException(400, "Missing required parameter 'owner' when calling RegistriesApi->PostPlugin"); + + var localVarPath = "/registries/{owner}/plugins"; + 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[] { + "multipart/form-data" + }; + 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 (type != null) localVarFormParams.Add("type", this.Configuration.ApiClient.ParameterToString(type)); // form parameter + if (package != null) localVarFileParams.Add("package", this.Configuration.ApiClient.ParameterToFile("package", package)); + + // 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("PostPlugin", 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))); + } + + /// + /// Push a plugin to the registry + /// + /// Thrown when fails to make API call + /// + /// (optional, default to "Body_post_plugin__owner__plugins_post") + /// (optional) + /// Cancellation Token to cancel request (optional) + /// Task of object + public async System.Threading.Tasks.Task PostPluginAsync (string owner, string type = default, System.IO.Stream package = default, CancellationToken cancellationToken = default(CancellationToken)) + { + ApiResponse localVarResponse = await PostPluginWithHttpInfoAsync(owner, type, package, cancellationToken); + return localVarResponse.Data; + + } + + /// + /// Push a plugin to the registry + /// + /// Thrown when fails to make API call + /// + /// (optional, default to "Body_post_plugin__owner__plugins_post") + /// (optional) + /// Cancellation Token to cancel request (optional) + /// Task of ApiResponse (object) + public async System.Threading.Tasks.Task> PostPluginWithHttpInfoAsync (string owner, string type = default, System.IO.Stream package = default, CancellationToken cancellationToken = default(CancellationToken)) + { + // verify the required parameter 'owner' is set + if (owner == null) + throw new ApiException(400, "Missing required parameter 'owner' when calling RegistriesApi->PostPlugin"); + + var localVarPath = "/registries/{owner}/plugins"; + 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[] { + "multipart/form-data" + }; + 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 (type != null) localVarFormParams.Add("type", this.Configuration.ApiClient.ParameterToString(type)); // form parameter + if (package != null) localVarFileParams.Add("package", this.Configuration.ApiClient.ParameterToFile("package", package)); + + // 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("PostPlugin", 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))); + } + + /// + /// Push an Recipe to the registry + /// + /// Thrown when fails to make API call + /// + /// (optional, default to "Body_post_recipe__owner__recipes_post") + /// (optional) + /// object + public object PostRecipe (string owner, string type = default, System.IO.Stream package = default) + { + ApiResponse localVarResponse = PostRecipeWithHttpInfo(owner, type, package); + return localVarResponse.Data; + } + + /// + /// Push an Recipe to the registry + /// + /// Thrown when fails to make API call + /// + /// (optional, default to "Body_post_recipe__owner__recipes_post") + /// (optional) + /// ApiResponse of object + public ApiResponse PostRecipeWithHttpInfo (string owner, string type = default, System.IO.Stream package = default) + { + // verify the required parameter 'owner' is set + if (owner == null) + throw new ApiException(400, "Missing required parameter 'owner' when calling RegistriesApi->PostRecipe"); + + var localVarPath = "/registries/{owner}/recipes"; + 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[] { + "multipart/form-data" + }; + 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 (type != null) localVarFormParams.Add("type", this.Configuration.ApiClient.ParameterToString(type)); // form parameter + if (package != null) localVarFileParams.Add("package", this.Configuration.ApiClient.ParameterToFile("package", package)); + + // 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("PostRecipe", 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))); + } + + /// + /// Push an Recipe to the registry + /// + /// Thrown when fails to make API call + /// + /// (optional, default to "Body_post_recipe__owner__recipes_post") + /// (optional) + /// Cancellation Token to cancel request (optional) + /// Task of object + public async System.Threading.Tasks.Task PostRecipeAsync (string owner, string type = default, System.IO.Stream package = default, CancellationToken cancellationToken = default(CancellationToken)) + { + ApiResponse localVarResponse = await PostRecipeWithHttpInfoAsync(owner, type, package, cancellationToken); + return localVarResponse.Data; + + } + + /// + /// Push an Recipe to the registry + /// + /// Thrown when fails to make API call + /// + /// (optional, default to "Body_post_recipe__owner__recipes_post") + /// (optional) + /// Cancellation Token to cancel request (optional) + /// Task of ApiResponse (object) + public async System.Threading.Tasks.Task> PostRecipeWithHttpInfoAsync (string owner, string type = default, System.IO.Stream package = default, CancellationToken cancellationToken = default(CancellationToken)) + { + // verify the required parameter 'owner' is set + if (owner == null) + throw new ApiException(400, "Missing required parameter 'owner' when calling RegistriesApi->PostRecipe"); + + var localVarPath = "/registries/{owner}/recipes"; + 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[] { + "multipart/form-data" + }; + 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 (type != null) localVarFormParams.Add("type", this.Configuration.ApiClient.ParameterToString(type)); // form parameter + if (package != null) localVarFileParams.Add("package", this.Configuration.ApiClient.ParameterToFile("package", package)); + + // 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("PostRecipe", 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/RunsApi.cs b/src/PollinationSDK/Api/RunsApi.cs new file mode 100644 index 000000000..09f6b2096 --- /dev/null +++ b/src/PollinationSDK/Api/RunsApi.cs @@ -0,0 +1,2386 @@ +/* + * 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 IRunsApi : IApiAccessor + { + #region Synchronous Operations + /// + /// Cancel a run + /// + /// + /// Stop a run. + /// + /// Thrown when fails to make API call + /// + /// + /// + /// object + object CancelRun (string owner, string name, string runId); + + /// + /// Cancel a run + /// + /// + /// Stop a run. + /// + /// Thrown when fails to make API call + /// + /// + /// + /// ApiResponse of object + ApiResponse CancelRunWithHttpInfo (string owner, string name, string runId); + /// + /// Download an artifact from the run folder + /// + /// + /// Get a download link for an artifact in a run folder + /// + /// Thrown when fails to make API call + /// + /// + /// + /// The path to an file within a project folder (optional) + /// object + object DownloadRunArtifact (string owner, string name, string runId, string path = default); + + /// + /// Download an artifact from the run folder + /// + /// + /// Get a download link for an artifact in a run folder + /// + /// Thrown when fails to make API call + /// + /// + /// + /// The path to an file within a project folder (optional) + /// ApiResponse of object + ApiResponse DownloadRunArtifactWithHttpInfo (string owner, string name, string runId, string path = default); + /// + /// Get a Run + /// + /// + /// Retrieve a run. + /// + /// Thrown when fails to make API call + /// + /// + /// + /// Run + Run GetRun (string owner, string name, string runId); + + /// + /// Get a Run + /// + /// + /// Retrieve a run. + /// + /// Thrown when fails to make API call + /// + /// + /// + /// ApiResponse of Run + ApiResponse GetRunWithHttpInfo (string owner, string name, string runId); + /// + /// Get run output by name + /// + /// + /// get run output by name + /// + /// Thrown when fails to make API call + /// + /// + /// + /// + /// object + object GetRunOutput (string owner, string name, string runId, string outputName); + + /// + /// Get run output by name + /// + /// + /// get run output by name + /// + /// Thrown when fails to make API call + /// + /// + /// + /// + /// ApiResponse of object + ApiResponse GetRunOutputWithHttpInfo (string owner, string name, string runId, string outputName); + /// + /// Get the logs of a specific step of the run + /// + /// + /// get run step logs + /// + /// Thrown when fails to make API call + /// + /// + /// + /// + /// string + string GetRunStepLogs (string owner, string name, string runId, string stepId); + + /// + /// Get the logs of a specific step of the run + /// + /// + /// get run step logs + /// + /// Thrown when fails to make API call + /// + /// + /// + /// + /// ApiResponse of string + ApiResponse GetRunStepLogsWithHttpInfo (string owner, string name, string runId, string stepId); + /// + /// Query the steps of a run + /// + /// + /// list run steps + /// + /// Thrown when fails to make API call + /// + /// + /// + /// (optional) + /// (optional) + /// (optional) + /// (optional) + /// Page number starting from 1 (optional, default to 1) + /// Number of items per page (optional, default to 25) + /// StepList + StepList GetRunSteps (string owner, string name, string runId, StepStatusEnum? status = default, List stepId = default, string untilGeneration = default, string sinceGeneration = default, int? page = default, int? perPage = default); + + /// + /// Query the steps of a run + /// + /// + /// list run steps + /// + /// Thrown when fails to make API call + /// + /// + /// + /// (optional) + /// (optional) + /// (optional) + /// (optional) + /// Page number starting from 1 (optional, default to 1) + /// Number of items per page (optional, default to 25) + /// ApiResponse of StepList + ApiResponse GetRunStepsWithHttpInfo (string owner, string name, string runId, StepStatusEnum? status = default, List stepId = default, string untilGeneration = default, string sinceGeneration = default, int? page = default, int? perPage = default); + /// + /// List artifacts in a run folder + /// + /// + /// Retrieve a list of artifacts in a run folder + /// + /// Thrown when fails to make API call + /// + /// + /// + /// The path to an file within a project folder (optional) + /// Page number starting from 1 (optional, default to 1) + /// Number of items per page (optional, default to 25) + /// List<FileMeta> + List ListRunArtifacts (string owner, string name, string runId, List path = default, int? page = default, int? perPage = default); + + /// + /// List artifacts in a run folder + /// + /// + /// Retrieve a list of artifacts in a run folder + /// + /// Thrown when fails to make API call + /// + /// + /// + /// The path to an file within a project folder (optional) + /// Page number starting from 1 (optional, default to 1) + /// Number of items per page (optional, default to 25) + /// ApiResponse of List<FileMeta> + ApiResponse> ListRunArtifactsWithHttpInfo (string owner, string name, string runId, List path = default, int? page = default, int? perPage = default); + /// + /// List runs + /// + /// + /// Retrieve a list of runs. + /// + /// Thrown when fails to make API call + /// + /// + /// (optional) + /// (optional) + /// Page number starting from 1 (optional, default to 1) + /// Number of items per page (optional, default to 25) + /// RunList + RunList ListRuns (string owner, string name, List jobId = default, RunStatusEnum? status = default, int? page = default, int? perPage = default); + + /// + /// List runs + /// + /// + /// Retrieve a list of runs. + /// + /// Thrown when fails to make API call + /// + /// + /// (optional) + /// (optional) + /// Page number starting from 1 (optional, default to 1) + /// Number of items per page (optional, default to 25) + /// ApiResponse of RunList + ApiResponse ListRunsWithHttpInfo (string owner, string name, List jobId = default, RunStatusEnum? status = default, int? page = default, int? perPage = default); + /// + /// Query run results + /// + /// + /// Retrieve a list of run results. + /// + /// Thrown when fails to make API call + /// + /// + /// (optional) + /// (optional) + /// Page number starting from 1 (optional, default to 1) + /// Number of items per page (optional, default to 25) + /// RunResultList + RunResultList QueryResults (string owner, string name, List jobId = default, RunStatusEnum? status = default, int? page = default, int? perPage = default); + + /// + /// Query run results + /// + /// + /// Retrieve a list of run results. + /// + /// Thrown when fails to make API call + /// + /// + /// (optional) + /// (optional) + /// Page number starting from 1 (optional, default to 1) + /// Number of items per page (optional, default to 25) + /// ApiResponse of RunResultList + ApiResponse QueryResultsWithHttpInfo (string owner, string name, List jobId = default, RunStatusEnum? status = default, int? page = default, int? perPage = default); + #endregion Synchronous Operations + #region Asynchronous Operations + /// + /// Cancel a run + /// + /// + /// Stop a run. + /// + /// Thrown when fails to make API call + /// + /// + /// + /// Cancellation Token to cancel request (optional) + /// Task of object + System.Threading.Tasks.Task CancelRunAsync (string owner, string name, string runId, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// Cancel a run + /// + /// + /// Stop a run. + /// + /// Thrown when fails to make API call + /// + /// + /// + /// Cancellation Token to cancel request (optional) + /// Task of ApiResponse (object) + System.Threading.Tasks.Task> CancelRunWithHttpInfoAsync (string owner, string name, string runId, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Download an artifact from the run folder + /// + /// + /// Get a download link for an artifact in a run folder + /// + /// Thrown when fails to make API call + /// + /// + /// + /// The path to an file within a project folder (optional) + /// Cancellation Token to cancel request (optional) + /// Task of object + System.Threading.Tasks.Task DownloadRunArtifactAsync (string owner, string name, string runId, string path = default, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// Download an artifact from the run folder + /// + /// + /// Get a download link for an artifact in a run folder + /// + /// Thrown when fails to make API call + /// + /// + /// + /// The path to an file within a project folder (optional) + /// Cancellation Token to cancel request (optional) + /// Task of ApiResponse (object) + System.Threading.Tasks.Task> DownloadRunArtifactWithHttpInfoAsync (string owner, string name, string runId, string path = default, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Get a Run + /// + /// + /// Retrieve a run. + /// + /// Thrown when fails to make API call + /// + /// + /// + /// Cancellation Token to cancel request (optional) + /// Task of Run + System.Threading.Tasks.Task GetRunAsync (string owner, string name, string runId, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// Get a Run + /// + /// + /// Retrieve a run. + /// + /// Thrown when fails to make API call + /// + /// + /// + /// Cancellation Token to cancel request (optional) + /// Task of ApiResponse (Run) + System.Threading.Tasks.Task> GetRunWithHttpInfoAsync (string owner, string name, string runId, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Get run output by name + /// + /// + /// get run output by name + /// + /// Thrown when fails to make API call + /// + /// + /// + /// + /// Cancellation Token to cancel request (optional) + /// Task of object + System.Threading.Tasks.Task GetRunOutputAsync (string owner, string name, string runId, string outputName, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// Get run output by name + /// + /// + /// get run output by name + /// + /// Thrown when fails to make API call + /// + /// + /// + /// + /// Cancellation Token to cancel request (optional) + /// Task of ApiResponse (object) + System.Threading.Tasks.Task> GetRunOutputWithHttpInfoAsync (string owner, string name, string runId, string outputName, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Get the logs of a specific step of the run + /// + /// + /// get run step logs + /// + /// Thrown when fails to make API call + /// + /// + /// + /// + /// Cancellation Token to cancel request (optional) + /// Task of string + System.Threading.Tasks.Task GetRunStepLogsAsync (string owner, string name, string runId, string stepId, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// Get the logs of a specific step of the run + /// + /// + /// get run step logs + /// + /// Thrown when fails to make API call + /// + /// + /// + /// + /// Cancellation Token to cancel request (optional) + /// Task of ApiResponse (string) + System.Threading.Tasks.Task> GetRunStepLogsWithHttpInfoAsync (string owner, string name, string runId, string stepId, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Query the steps of a run + /// + /// + /// list run steps + /// + /// Thrown when fails to make API call + /// + /// + /// + /// (optional) + /// (optional) + /// (optional) + /// (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 StepList + System.Threading.Tasks.Task GetRunStepsAsync (string owner, string name, string runId, StepStatusEnum? status = default, List stepId = default, string untilGeneration = default, string sinceGeneration = default, int? page = default, int? perPage = default, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// Query the steps of a run + /// + /// + /// list run steps + /// + /// Thrown when fails to make API call + /// + /// + /// + /// (optional) + /// (optional) + /// (optional) + /// (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 (StepList) + System.Threading.Tasks.Task> GetRunStepsWithHttpInfoAsync (string owner, string name, string runId, StepStatusEnum? status = default, List stepId = default, string untilGeneration = default, string sinceGeneration = default, int? page = default, int? perPage = default, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// List artifacts in a run folder + /// + /// + /// Retrieve a list of artifacts in a run folder + /// + /// Thrown when fails to make API call + /// + /// + /// + /// The path to an file within a project folder (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 List<FileMeta> + System.Threading.Tasks.Task> ListRunArtifactsAsync (string owner, string name, string runId, List path = default, int? page = default, int? perPage = default, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// List artifacts in a run folder + /// + /// + /// Retrieve a list of artifacts in a run folder + /// + /// Thrown when fails to make API call + /// + /// + /// + /// The path to an file within a project folder (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 (List<FileMeta>) + System.Threading.Tasks.Task>> ListRunArtifactsWithHttpInfoAsync (string owner, string name, string runId, List path = default, int? page = default, int? perPage = default, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// List runs + /// + /// + /// Retrieve a list of runs. + /// + /// Thrown when fails to make API call + /// + /// + /// (optional) + /// (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 RunList + System.Threading.Tasks.Task ListRunsAsync (string owner, string name, List jobId = default, RunStatusEnum? status = default, int? page = default, int? perPage = default, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// List runs + /// + /// + /// Retrieve a list of runs. + /// + /// Thrown when fails to make API call + /// + /// + /// (optional) + /// (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 (RunList) + System.Threading.Tasks.Task> ListRunsWithHttpInfoAsync (string owner, string name, List jobId = default, RunStatusEnum? status = default, int? page = default, int? perPage = default, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Query run results + /// + /// + /// Retrieve a list of run results. + /// + /// Thrown when fails to make API call + /// + /// + /// (optional) + /// (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 RunResultList + System.Threading.Tasks.Task QueryResultsAsync (string owner, string name, List jobId = default, RunStatusEnum? status = default, int? page = default, int? perPage = default, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// Query run results + /// + /// + /// Retrieve a list of run results. + /// + /// Thrown when fails to make API call + /// + /// + /// (optional) + /// (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 (RunResultList) + System.Threading.Tasks.Task> QueryResultsWithHttpInfoAsync (string owner, string name, List jobId = default, RunStatusEnum? status = default, int? page = default, int? perPage = default, CancellationToken cancellationToken = default(CancellationToken)); + #endregion Asynchronous Operations + } + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public partial class RunsApi : IRunsApi + { + private PollinationSDK.Client.ExceptionFactory _exceptionFactory = (name, response) => null; + + /// + /// Initializes a new instance of the class. + /// + /// + public RunsApi(String basePath) + { + this.Configuration = new PollinationSDK.Client.Configuration { BasePath = basePath }; + + ExceptionFactory = PollinationSDK.Client.Configuration.DefaultExceptionFactory; + } + + /// + /// Initializes a new instance of the class + /// + /// + public RunsApi() + { + 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 RunsApi(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 a run Stop a run. + /// + /// Thrown when fails to make API call + /// + /// + /// + /// object + public object CancelRun (string owner, string name, string runId) + { + ApiResponse localVarResponse = CancelRunWithHttpInfo(owner, name, runId); + return localVarResponse.Data; + } + + /// + /// Cancel a run Stop a run. + /// + /// Thrown when fails to make API call + /// + /// + /// + /// ApiResponse of object + public ApiResponse CancelRunWithHttpInfo (string owner, string name, string runId) + { + // verify the required parameter 'owner' is set + if (owner == null) + throw new ApiException(400, "Missing required parameter 'owner' when calling RunsApi->CancelRun"); + // verify the required parameter 'name' is set + if (name == null) + throw new ApiException(400, "Missing required parameter 'name' when calling RunsApi->CancelRun"); + // verify the required parameter 'runId' is set + if (runId == null) + throw new ApiException(400, "Missing required parameter 'runId' when calling RunsApi->CancelRun"); + + var localVarPath = "/projects/{owner}/{name}/runs/{run_id}/cancel"; + 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 (runId != null) localVarPathParams.Add("run_id", this.Configuration.ApiClient.ParameterToString(runId)); // 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.PUT, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("CancelRun", 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 a run Stop a run. + /// + /// Thrown when fails to make API call + /// + /// + /// + /// Cancellation Token to cancel request (optional) + /// Task of object + public async System.Threading.Tasks.Task CancelRunAsync (string owner, string name, string runId, CancellationToken cancellationToken = default(CancellationToken)) + { + ApiResponse localVarResponse = await CancelRunWithHttpInfoAsync(owner, name, runId, cancellationToken); + return localVarResponse.Data; + + } + + /// + /// Cancel a run Stop a run. + /// + /// Thrown when fails to make API call + /// + /// + /// + /// Cancellation Token to cancel request (optional) + /// Task of ApiResponse (object) + public async System.Threading.Tasks.Task> CancelRunWithHttpInfoAsync (string owner, string name, string runId, CancellationToken cancellationToken = default(CancellationToken)) + { + // verify the required parameter 'owner' is set + if (owner == null) + throw new ApiException(400, "Missing required parameter 'owner' when calling RunsApi->CancelRun"); + // verify the required parameter 'name' is set + if (name == null) + throw new ApiException(400, "Missing required parameter 'name' when calling RunsApi->CancelRun"); + // verify the required parameter 'runId' is set + if (runId == null) + throw new ApiException(400, "Missing required parameter 'runId' when calling RunsApi->CancelRun"); + + var localVarPath = "/projects/{owner}/{name}/runs/{run_id}/cancel"; + 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 (runId != null) localVarPathParams.Add("run_id", this.Configuration.ApiClient.ParameterToString(runId)); // 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.PUT, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType, cancellationToken); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("CancelRun", 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 run folder Get a download link for an artifact in a run folder + /// + /// Thrown when fails to make API call + /// + /// + /// + /// The path to an file within a project folder (optional) + /// object + public object DownloadRunArtifact (string owner, string name, string runId, string path = default) + { + ApiResponse localVarResponse = DownloadRunArtifactWithHttpInfo(owner, name, runId, path); + return localVarResponse.Data; + } + + /// + /// Download an artifact from the run folder Get a download link for an artifact in a run folder + /// + /// Thrown when fails to make API call + /// + /// + /// + /// The path to an file within a project folder (optional) + /// ApiResponse of object + public ApiResponse DownloadRunArtifactWithHttpInfo (string owner, string name, string runId, string path = default) + { + // verify the required parameter 'owner' is set + if (owner == null) + throw new ApiException(400, "Missing required parameter 'owner' when calling RunsApi->DownloadRunArtifact"); + // verify the required parameter 'name' is set + if (name == null) + throw new ApiException(400, "Missing required parameter 'name' when calling RunsApi->DownloadRunArtifact"); + // verify the required parameter 'runId' is set + if (runId == null) + throw new ApiException(400, "Missing required parameter 'runId' when calling RunsApi->DownloadRunArtifact"); + + var localVarPath = "/projects/{owner}/{name}/runs/{run_id}/artifacts/download"; + 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 (runId != null) localVarPathParams.Add("run_id", this.Configuration.ApiClient.ParameterToString(runId)); // path parameter + if (path != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "path", path)); // 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("DownloadRunArtifact", 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 run folder Get a download link for an artifact in a run folder + /// + /// Thrown when fails to make API call + /// + /// + /// + /// The path to an file within a project folder (optional) + /// Cancellation Token to cancel request (optional) + /// Task of object + public async System.Threading.Tasks.Task DownloadRunArtifactAsync (string owner, string name, string runId, string path = default, CancellationToken cancellationToken = default(CancellationToken)) + { + ApiResponse localVarResponse = await DownloadRunArtifactWithHttpInfoAsync(owner, name, runId, path, cancellationToken); + return localVarResponse.Data; + + } + + /// + /// Download an artifact from the run folder Get a download link for an artifact in a run folder + /// + /// Thrown when fails to make API call + /// + /// + /// + /// The path to an file within a project folder (optional) + /// Cancellation Token to cancel request (optional) + /// Task of ApiResponse (object) + public async System.Threading.Tasks.Task> DownloadRunArtifactWithHttpInfoAsync (string owner, string name, string runId, string path = default, CancellationToken cancellationToken = default(CancellationToken)) + { + // verify the required parameter 'owner' is set + if (owner == null) + throw new ApiException(400, "Missing required parameter 'owner' when calling RunsApi->DownloadRunArtifact"); + // verify the required parameter 'name' is set + if (name == null) + throw new ApiException(400, "Missing required parameter 'name' when calling RunsApi->DownloadRunArtifact"); + // verify the required parameter 'runId' is set + if (runId == null) + throw new ApiException(400, "Missing required parameter 'runId' when calling RunsApi->DownloadRunArtifact"); + + var localVarPath = "/projects/{owner}/{name}/runs/{run_id}/artifacts/download"; + 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 (runId != null) localVarPathParams.Add("run_id", this.Configuration.ApiClient.ParameterToString(runId)); // path parameter + if (path != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "path", path)); // 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("DownloadRunArtifact", 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 a Run Retrieve a run. + /// + /// Thrown when fails to make API call + /// + /// + /// + /// Run + public Run GetRun (string owner, string name, string runId) + { + ApiResponse localVarResponse = GetRunWithHttpInfo(owner, name, runId); + return localVarResponse.Data; + } + + /// + /// Get a Run Retrieve a run. + /// + /// Thrown when fails to make API call + /// + /// + /// + /// ApiResponse of Run + public ApiResponse GetRunWithHttpInfo (string owner, string name, string runId) + { + // verify the required parameter 'owner' is set + if (owner == null) + throw new ApiException(400, "Missing required parameter 'owner' when calling RunsApi->GetRun"); + // verify the required parameter 'name' is set + if (name == null) + throw new ApiException(400, "Missing required parameter 'name' when calling RunsApi->GetRun"); + // verify the required parameter 'runId' is set + if (runId == null) + throw new ApiException(400, "Missing required parameter 'runId' when calling RunsApi->GetRun"); + + var localVarPath = "/projects/{owner}/{name}/runs/{run_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 (runId != null) localVarPathParams.Add("run_id", this.Configuration.ApiClient.ParameterToString(runId)); // 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("GetRun", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (Run) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Run))); + } + + /// + /// Get a Run Retrieve a run. + /// + /// Thrown when fails to make API call + /// + /// + /// + /// Cancellation Token to cancel request (optional) + /// Task of Run + public async System.Threading.Tasks.Task GetRunAsync (string owner, string name, string runId, CancellationToken cancellationToken = default(CancellationToken)) + { + ApiResponse localVarResponse = await GetRunWithHttpInfoAsync(owner, name, runId, cancellationToken); + return localVarResponse.Data; + + } + + /// + /// Get a Run Retrieve a run. + /// + /// Thrown when fails to make API call + /// + /// + /// + /// Cancellation Token to cancel request (optional) + /// Task of ApiResponse (Run) + public async System.Threading.Tasks.Task> GetRunWithHttpInfoAsync (string owner, string name, string runId, CancellationToken cancellationToken = default(CancellationToken)) + { + // verify the required parameter 'owner' is set + if (owner == null) + throw new ApiException(400, "Missing required parameter 'owner' when calling RunsApi->GetRun"); + // verify the required parameter 'name' is set + if (name == null) + throw new ApiException(400, "Missing required parameter 'name' when calling RunsApi->GetRun"); + // verify the required parameter 'runId' is set + if (runId == null) + throw new ApiException(400, "Missing required parameter 'runId' when calling RunsApi->GetRun"); + + var localVarPath = "/projects/{owner}/{name}/runs/{run_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 (runId != null) localVarPathParams.Add("run_id", this.Configuration.ApiClient.ParameterToString(runId)); // 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("GetRun", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (Run) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Run))); + } + + /// + /// Get run output by name get run output by name + /// + /// Thrown when fails to make API call + /// + /// + /// + /// + /// object + public object GetRunOutput (string owner, string name, string runId, string outputName) + { + ApiResponse localVarResponse = GetRunOutputWithHttpInfo(owner, name, runId, outputName); + return localVarResponse.Data; + } + + /// + /// Get run output by name get run output by name + /// + /// Thrown when fails to make API call + /// + /// + /// + /// + /// ApiResponse of object + public ApiResponse GetRunOutputWithHttpInfo (string owner, string name, string runId, string outputName) + { + // verify the required parameter 'owner' is set + if (owner == null) + throw new ApiException(400, "Missing required parameter 'owner' when calling RunsApi->GetRunOutput"); + // verify the required parameter 'name' is set + if (name == null) + throw new ApiException(400, "Missing required parameter 'name' when calling RunsApi->GetRunOutput"); + // verify the required parameter 'runId' is set + if (runId == null) + throw new ApiException(400, "Missing required parameter 'runId' when calling RunsApi->GetRunOutput"); + // verify the required parameter 'outputName' is set + if (outputName == null) + throw new ApiException(400, "Missing required parameter 'outputName' when calling RunsApi->GetRunOutput"); + + var localVarPath = "/projects/{owner}/{name}/runs/{run_id}/outputs/{output_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 (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 (runId != null) localVarPathParams.Add("run_id", this.Configuration.ApiClient.ParameterToString(runId)); // path parameter + if (outputName != null) localVarPathParams.Add("output_name", this.Configuration.ApiClient.ParameterToString(outputName)); // 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("GetRunOutput", 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 run output by name get run output by name + /// + /// Thrown when fails to make API call + /// + /// + /// + /// + /// Cancellation Token to cancel request (optional) + /// Task of object + public async System.Threading.Tasks.Task GetRunOutputAsync (string owner, string name, string runId, string outputName, CancellationToken cancellationToken = default(CancellationToken)) + { + ApiResponse localVarResponse = await GetRunOutputWithHttpInfoAsync(owner, name, runId, outputName, cancellationToken); + return localVarResponse.Data; + + } + + /// + /// Get run output by name get run output by name + /// + /// Thrown when fails to make API call + /// + /// + /// + /// + /// Cancellation Token to cancel request (optional) + /// Task of ApiResponse (object) + public async System.Threading.Tasks.Task> GetRunOutputWithHttpInfoAsync (string owner, string name, string runId, string outputName, CancellationToken cancellationToken = default(CancellationToken)) + { + // verify the required parameter 'owner' is set + if (owner == null) + throw new ApiException(400, "Missing required parameter 'owner' when calling RunsApi->GetRunOutput"); + // verify the required parameter 'name' is set + if (name == null) + throw new ApiException(400, "Missing required parameter 'name' when calling RunsApi->GetRunOutput"); + // verify the required parameter 'runId' is set + if (runId == null) + throw new ApiException(400, "Missing required parameter 'runId' when calling RunsApi->GetRunOutput"); + // verify the required parameter 'outputName' is set + if (outputName == null) + throw new ApiException(400, "Missing required parameter 'outputName' when calling RunsApi->GetRunOutput"); + + var localVarPath = "/projects/{owner}/{name}/runs/{run_id}/outputs/{output_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 (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 (runId != null) localVarPathParams.Add("run_id", this.Configuration.ApiClient.ParameterToString(runId)); // path parameter + if (outputName != null) localVarPathParams.Add("output_name", this.Configuration.ApiClient.ParameterToString(outputName)); // 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("GetRunOutput", 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 the logs of a specific step of the run get run step logs + /// + /// Thrown when fails to make API call + /// + /// + /// + /// + /// string + public string GetRunStepLogs (string owner, string name, string runId, string stepId) + { + ApiResponse localVarResponse = GetRunStepLogsWithHttpInfo(owner, name, runId, stepId); + return localVarResponse.Data; + } + + /// + /// Get the logs of a specific step of the run get run step logs + /// + /// Thrown when fails to make API call + /// + /// + /// + /// + /// ApiResponse of string + public ApiResponse GetRunStepLogsWithHttpInfo (string owner, string name, string runId, string stepId) + { + // verify the required parameter 'owner' is set + if (owner == null) + throw new ApiException(400, "Missing required parameter 'owner' when calling RunsApi->GetRunStepLogs"); + // verify the required parameter 'name' is set + if (name == null) + throw new ApiException(400, "Missing required parameter 'name' when calling RunsApi->GetRunStepLogs"); + // verify the required parameter 'runId' is set + if (runId == null) + throw new ApiException(400, "Missing required parameter 'runId' when calling RunsApi->GetRunStepLogs"); + // verify the required parameter 'stepId' is set + if (stepId == null) + throw new ApiException(400, "Missing required parameter 'stepId' when calling RunsApi->GetRunStepLogs"); + + var localVarPath = "/projects/{owner}/{name}/runs/{run_id}/steps/{step_id}/logs"; + 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 (runId != null) localVarPathParams.Add("run_id", this.Configuration.ApiClient.ParameterToString(runId)); // path parameter + if (stepId != null) localVarPathParams.Add("step_id", this.Configuration.ApiClient.ParameterToString(stepId)); // 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("GetRunStepLogs", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (string) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(string))); + } + + /// + /// Get the logs of a specific step of the run get run step logs + /// + /// Thrown when fails to make API call + /// + /// + /// + /// + /// Cancellation Token to cancel request (optional) + /// Task of string + public async System.Threading.Tasks.Task GetRunStepLogsAsync (string owner, string name, string runId, string stepId, CancellationToken cancellationToken = default(CancellationToken)) + { + ApiResponse localVarResponse = await GetRunStepLogsWithHttpInfoAsync(owner, name, runId, stepId, cancellationToken); + return localVarResponse.Data; + + } + + /// + /// Get the logs of a specific step of the run get run step logs + /// + /// Thrown when fails to make API call + /// + /// + /// + /// + /// Cancellation Token to cancel request (optional) + /// Task of ApiResponse (string) + public async System.Threading.Tasks.Task> GetRunStepLogsWithHttpInfoAsync (string owner, string name, string runId, string stepId, CancellationToken cancellationToken = default(CancellationToken)) + { + // verify the required parameter 'owner' is set + if (owner == null) + throw new ApiException(400, "Missing required parameter 'owner' when calling RunsApi->GetRunStepLogs"); + // verify the required parameter 'name' is set + if (name == null) + throw new ApiException(400, "Missing required parameter 'name' when calling RunsApi->GetRunStepLogs"); + // verify the required parameter 'runId' is set + if (runId == null) + throw new ApiException(400, "Missing required parameter 'runId' when calling RunsApi->GetRunStepLogs"); + // verify the required parameter 'stepId' is set + if (stepId == null) + throw new ApiException(400, "Missing required parameter 'stepId' when calling RunsApi->GetRunStepLogs"); + + var localVarPath = "/projects/{owner}/{name}/runs/{run_id}/steps/{step_id}/logs"; + 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 (runId != null) localVarPathParams.Add("run_id", this.Configuration.ApiClient.ParameterToString(runId)); // path parameter + if (stepId != null) localVarPathParams.Add("step_id", this.Configuration.ApiClient.ParameterToString(stepId)); // 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("GetRunStepLogs", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (string) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(string))); + } + + /// + /// Query the steps of a run list run steps + /// + /// Thrown when fails to make API call + /// + /// + /// + /// (optional) + /// (optional) + /// (optional) + /// (optional) + /// Page number starting from 1 (optional, default to 1) + /// Number of items per page (optional, default to 25) + /// StepList + public StepList GetRunSteps (string owner, string name, string runId, StepStatusEnum? status = default, List stepId = default, string untilGeneration = default, string sinceGeneration = default, int? page = default, int? perPage = default) + { + ApiResponse localVarResponse = GetRunStepsWithHttpInfo(owner, name, runId, status, stepId, untilGeneration, sinceGeneration, page, perPage); + return localVarResponse.Data; + } + + /// + /// Query the steps of a run list run steps + /// + /// Thrown when fails to make API call + /// + /// + /// + /// (optional) + /// (optional) + /// (optional) + /// (optional) + /// Page number starting from 1 (optional, default to 1) + /// Number of items per page (optional, default to 25) + /// ApiResponse of StepList + public ApiResponse GetRunStepsWithHttpInfo (string owner, string name, string runId, StepStatusEnum? status = default, List stepId = default, string untilGeneration = default, string sinceGeneration = default, int? page = default, int? perPage = default) + { + // verify the required parameter 'owner' is set + if (owner == null) + throw new ApiException(400, "Missing required parameter 'owner' when calling RunsApi->GetRunSteps"); + // verify the required parameter 'name' is set + if (name == null) + throw new ApiException(400, "Missing required parameter 'name' when calling RunsApi->GetRunSteps"); + // verify the required parameter 'runId' is set + if (runId == null) + throw new ApiException(400, "Missing required parameter 'runId' when calling RunsApi->GetRunSteps"); + + var localVarPath = "/projects/{owner}/{name}/runs/{run_id}/steps"; + 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 (runId != null) localVarPathParams.Add("run_id", this.Configuration.ApiClient.ParameterToString(runId)); // path parameter + if (status != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "status", status)); // query parameter + if (stepId != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("multi", "step_id", stepId)); // query parameter + if (untilGeneration != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "until_generation", untilGeneration)); // query parameter + if (sinceGeneration != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "since_generation", sinceGeneration)); // 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("GetRunSteps", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (StepList) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(StepList))); + } + + /// + /// Query the steps of a run list run steps + /// + /// Thrown when fails to make API call + /// + /// + /// + /// (optional) + /// (optional) + /// (optional) + /// (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 StepList + public async System.Threading.Tasks.Task GetRunStepsAsync (string owner, string name, string runId, StepStatusEnum? status = default, List stepId = default, string untilGeneration = default, string sinceGeneration = default, int? page = default, int? perPage = default, CancellationToken cancellationToken = default(CancellationToken)) + { + ApiResponse localVarResponse = await GetRunStepsWithHttpInfoAsync(owner, name, runId, status, stepId, untilGeneration, sinceGeneration, page, perPage, cancellationToken); + return localVarResponse.Data; + + } + + /// + /// Query the steps of a run list run steps + /// + /// Thrown when fails to make API call + /// + /// + /// + /// (optional) + /// (optional) + /// (optional) + /// (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 (StepList) + public async System.Threading.Tasks.Task> GetRunStepsWithHttpInfoAsync (string owner, string name, string runId, StepStatusEnum? status = default, List stepId = default, string untilGeneration = default, string sinceGeneration = default, int? page = default, int? perPage = default, CancellationToken cancellationToken = default(CancellationToken)) + { + // verify the required parameter 'owner' is set + if (owner == null) + throw new ApiException(400, "Missing required parameter 'owner' when calling RunsApi->GetRunSteps"); + // verify the required parameter 'name' is set + if (name == null) + throw new ApiException(400, "Missing required parameter 'name' when calling RunsApi->GetRunSteps"); + // verify the required parameter 'runId' is set + if (runId == null) + throw new ApiException(400, "Missing required parameter 'runId' when calling RunsApi->GetRunSteps"); + + var localVarPath = "/projects/{owner}/{name}/runs/{run_id}/steps"; + 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 (runId != null) localVarPathParams.Add("run_id", this.Configuration.ApiClient.ParameterToString(runId)); // path parameter + if (status != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "status", status)); // query parameter + if (stepId != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("multi", "step_id", stepId)); // query parameter + if (untilGeneration != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "until_generation", untilGeneration)); // query parameter + if (sinceGeneration != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "since_generation", sinceGeneration)); // 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("GetRunSteps", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (StepList) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(StepList))); + } + + /// + /// List artifacts in a run folder Retrieve a list of artifacts in a run folder + /// + /// Thrown when fails to make API call + /// + /// + /// + /// The path to an file within a project folder (optional) + /// Page number starting from 1 (optional, default to 1) + /// Number of items per page (optional, default to 25) + /// List<FileMeta> + public List ListRunArtifacts (string owner, string name, string runId, List path = default, int? page = default, int? perPage = default) + { + ApiResponse> localVarResponse = ListRunArtifactsWithHttpInfo(owner, name, runId, path, page, perPage); + return localVarResponse.Data; + } + + /// + /// List artifacts in a run folder Retrieve a list of artifacts in a run folder + /// + /// Thrown when fails to make API call + /// + /// + /// + /// The path to an file within a project folder (optional) + /// Page number starting from 1 (optional, default to 1) + /// Number of items per page (optional, default to 25) + /// ApiResponse of List<FileMeta> + public ApiResponse> ListRunArtifactsWithHttpInfo (string owner, string name, string runId, List path = default, int? page = default, int? perPage = default) + { + // verify the required parameter 'owner' is set + if (owner == null) + throw new ApiException(400, "Missing required parameter 'owner' when calling RunsApi->ListRunArtifacts"); + // verify the required parameter 'name' is set + if (name == null) + throw new ApiException(400, "Missing required parameter 'name' when calling RunsApi->ListRunArtifacts"); + // verify the required parameter 'runId' is set + if (runId == null) + throw new ApiException(400, "Missing required parameter 'runId' when calling RunsApi->ListRunArtifacts"); + + var localVarPath = "/projects/{owner}/{name}/runs/{run_id}/artifacts"; + 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 (runId != null) localVarPathParams.Add("run_id", this.Configuration.ApiClient.ParameterToString(runId)); // path parameter + if (path != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("multi", "path", path)); // 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("ListRunArtifacts", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse>(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (List) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(List))); + } + + /// + /// List artifacts in a run folder Retrieve a list of artifacts in a run folder + /// + /// Thrown when fails to make API call + /// + /// + /// + /// The path to an file within a project folder (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 List<FileMeta> + public async System.Threading.Tasks.Task> ListRunArtifactsAsync (string owner, string name, string runId, List path = default, int? page = default, int? perPage = default, CancellationToken cancellationToken = default(CancellationToken)) + { + ApiResponse> localVarResponse = await ListRunArtifactsWithHttpInfoAsync(owner, name, runId, path, page, perPage, cancellationToken); + return localVarResponse.Data; + + } + + /// + /// List artifacts in a run folder Retrieve a list of artifacts in a run folder + /// + /// Thrown when fails to make API call + /// + /// + /// + /// The path to an file within a project folder (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 (List<FileMeta>) + public async System.Threading.Tasks.Task>> ListRunArtifactsWithHttpInfoAsync (string owner, string name, string runId, List path = default, int? page = default, int? perPage = default, CancellationToken cancellationToken = default(CancellationToken)) + { + // verify the required parameter 'owner' is set + if (owner == null) + throw new ApiException(400, "Missing required parameter 'owner' when calling RunsApi->ListRunArtifacts"); + // verify the required parameter 'name' is set + if (name == null) + throw new ApiException(400, "Missing required parameter 'name' when calling RunsApi->ListRunArtifacts"); + // verify the required parameter 'runId' is set + if (runId == null) + throw new ApiException(400, "Missing required parameter 'runId' when calling RunsApi->ListRunArtifacts"); + + var localVarPath = "/projects/{owner}/{name}/runs/{run_id}/artifacts"; + 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 (runId != null) localVarPathParams.Add("run_id", this.Configuration.ApiClient.ParameterToString(runId)); // path parameter + if (path != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("multi", "path", path)); // 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("ListRunArtifacts", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse>(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (List) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(List))); + } + + /// + /// List runs Retrieve a list of runs. + /// + /// Thrown when fails to make API call + /// + /// + /// (optional) + /// (optional) + /// Page number starting from 1 (optional, default to 1) + /// Number of items per page (optional, default to 25) + /// RunList + public RunList ListRuns (string owner, string name, List jobId = default, RunStatusEnum? status = default, int? page = default, int? perPage = default) + { + ApiResponse localVarResponse = ListRunsWithHttpInfo(owner, name, jobId, status, page, perPage); + return localVarResponse.Data; + } + + /// + /// List runs Retrieve a list of runs. + /// + /// Thrown when fails to make API call + /// + /// + /// (optional) + /// (optional) + /// Page number starting from 1 (optional, default to 1) + /// Number of items per page (optional, default to 25) + /// ApiResponse of RunList + public ApiResponse ListRunsWithHttpInfo (string owner, string name, List jobId = default, RunStatusEnum? status = default, int? page = default, int? perPage = default) + { + // verify the required parameter 'owner' is set + if (owner == null) + throw new ApiException(400, "Missing required parameter 'owner' when calling RunsApi->ListRuns"); + // verify the required parameter 'name' is set + if (name == null) + throw new ApiException(400, "Missing required parameter 'name' when calling RunsApi->ListRuns"); + + var localVarPath = "/projects/{owner}/{name}/runs"; + 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) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("multi", "job_id", jobId)); // query parameter + if (status != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "status", status)); // 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("ListRuns", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (RunList) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(RunList))); + } + + /// + /// List runs Retrieve a list of runs. + /// + /// Thrown when fails to make API call + /// + /// + /// (optional) + /// (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 RunList + public async System.Threading.Tasks.Task ListRunsAsync (string owner, string name, List jobId = default, RunStatusEnum? status = default, int? page = default, int? perPage = default, CancellationToken cancellationToken = default(CancellationToken)) + { + ApiResponse localVarResponse = await ListRunsWithHttpInfoAsync(owner, name, jobId, status, page, perPage, cancellationToken); + return localVarResponse.Data; + + } + + /// + /// List runs Retrieve a list of runs. + /// + /// Thrown when fails to make API call + /// + /// + /// (optional) + /// (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 (RunList) + public async System.Threading.Tasks.Task> ListRunsWithHttpInfoAsync (string owner, string name, List jobId = default, RunStatusEnum? status = default, int? page = default, int? perPage = default, CancellationToken cancellationToken = default(CancellationToken)) + { + // verify the required parameter 'owner' is set + if (owner == null) + throw new ApiException(400, "Missing required parameter 'owner' when calling RunsApi->ListRuns"); + // verify the required parameter 'name' is set + if (name == null) + throw new ApiException(400, "Missing required parameter 'name' when calling RunsApi->ListRuns"); + + var localVarPath = "/projects/{owner}/{name}/runs"; + 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) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("multi", "job_id", jobId)); // query parameter + if (status != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "status", status)); // 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("ListRuns", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (RunList) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(RunList))); + } + + /// + /// Query run results Retrieve a list of run results. + /// + /// Thrown when fails to make API call + /// + /// + /// (optional) + /// (optional) + /// Page number starting from 1 (optional, default to 1) + /// Number of items per page (optional, default to 25) + /// RunResultList + public RunResultList QueryResults (string owner, string name, List jobId = default, RunStatusEnum? status = default, int? page = default, int? perPage = default) + { + ApiResponse localVarResponse = QueryResultsWithHttpInfo(owner, name, jobId, status, page, perPage); + return localVarResponse.Data; + } + + /// + /// Query run results Retrieve a list of run results. + /// + /// Thrown when fails to make API call + /// + /// + /// (optional) + /// (optional) + /// Page number starting from 1 (optional, default to 1) + /// Number of items per page (optional, default to 25) + /// ApiResponse of RunResultList + public ApiResponse QueryResultsWithHttpInfo (string owner, string name, List jobId = default, RunStatusEnum? status = default, int? page = default, int? perPage = default) + { + // verify the required parameter 'owner' is set + if (owner == null) + throw new ApiException(400, "Missing required parameter 'owner' when calling RunsApi->QueryResults"); + // verify the required parameter 'name' is set + if (name == null) + throw new ApiException(400, "Missing required parameter 'name' when calling RunsApi->QueryResults"); + + var localVarPath = "/projects/{owner}/{name}/results"; + 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) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("multi", "job_id", jobId)); // query parameter + if (status != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "status", status)); // 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("QueryResults", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (RunResultList) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(RunResultList))); + } + + /// + /// Query run results Retrieve a list of run results. + /// + /// Thrown when fails to make API call + /// + /// + /// (optional) + /// (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 RunResultList + public async System.Threading.Tasks.Task QueryResultsAsync (string owner, string name, List jobId = default, RunStatusEnum? status = default, int? page = default, int? perPage = default, CancellationToken cancellationToken = default(CancellationToken)) + { + ApiResponse localVarResponse = await QueryResultsWithHttpInfoAsync(owner, name, jobId, status, page, perPage, cancellationToken); + return localVarResponse.Data; + + } + + /// + /// Query run results Retrieve a list of run results. + /// + /// Thrown when fails to make API call + /// + /// + /// (optional) + /// (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 (RunResultList) + public async System.Threading.Tasks.Task> QueryResultsWithHttpInfoAsync (string owner, string name, List jobId = default, RunStatusEnum? status = default, int? page = default, int? perPage = default, CancellationToken cancellationToken = default(CancellationToken)) + { + // verify the required parameter 'owner' is set + if (owner == null) + throw new ApiException(400, "Missing required parameter 'owner' when calling RunsApi->QueryResults"); + // verify the required parameter 'name' is set + if (name == null) + throw new ApiException(400, "Missing required parameter 'name' when calling RunsApi->QueryResults"); + + var localVarPath = "/projects/{owner}/{name}/results"; + 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) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("multi", "job_id", jobId)); // query parameter + if (status != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "status", status)); // 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("QueryResults", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (RunResultList) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(RunResultList))); + } + + } +} 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/Api/TeamsApi.cs b/src/PollinationSDK/Api/TeamsApi.cs new file mode 100644 index 000000000..0cec7fafb --- /dev/null +++ b/src/PollinationSDK/Api/TeamsApi.cs @@ -0,0 +1,1905 @@ +/* + * 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 ITeamsApi : IApiAccessor + { + #region Synchronous Operations + /// + /// Create a Team + /// + /// + /// Create a new team (must be parent org member) + /// + /// Thrown when fails to make API call + /// + /// + /// CreatedContent + CreatedContent CreateTeam (string orgName, TeamCreate teamCreate); + + /// + /// Create a Team + /// + /// + /// Create a new team (must be parent org member) + /// + /// Thrown when fails to make API call + /// + /// + /// ApiResponse of CreatedContent + ApiResponse CreateTeamWithHttpInfo (string orgName, TeamCreate teamCreate); + /// + /// Remove a team member + /// + /// + /// Remove a member from the org (must have org `owner` role) + /// + /// Thrown when fails to make API call + /// + /// + /// + /// + void DeleteOrgTeamMember (string orgName, string teamSlug, string username); + + /// + /// Remove a team member + /// + /// + /// Remove a member from the org (must have org `owner` role) + /// + /// Thrown when fails to make API call + /// + /// + /// + /// ApiResponse of Object(void) + ApiResponse DeleteOrgTeamMemberWithHttpInfo (string orgName, string teamSlug, string username); + /// + /// Delete a Team + /// + /// + /// Delete a team (must have team or org `owner` role) + /// + /// Thrown when fails to make API call + /// + /// + /// + void DeleteTeam (string orgName, string teamSlug); + + /// + /// Delete a Team + /// + /// + /// Delete a team (must have team or org `owner` role) + /// + /// Thrown when fails to make API call + /// + /// + /// ApiResponse of Object(void) + ApiResponse DeleteTeamWithHttpInfo (string orgName, string teamSlug); + /// + /// List team members + /// + /// + /// Retrieve a tean's members + /// + /// Thrown when fails to make API call + /// + /// + /// TeamMemberList + TeamMemberList GetOrgTeamMembers (string orgName, string teamSlug); + + /// + /// List team members + /// + /// + /// Retrieve a tean's members + /// + /// Thrown when fails to make API call + /// + /// + /// ApiResponse of TeamMemberList + ApiResponse GetOrgTeamMembersWithHttpInfo (string orgName, string teamSlug); + /// + /// Get a Team + /// + /// + /// Retrieve a team by name + /// + /// Thrown when fails to make API call + /// + /// + /// Team + Team GetTeam (string orgName, string teamSlug); + + /// + /// Get a Team + /// + /// + /// Retrieve a team by name + /// + /// Thrown when fails to make API call + /// + /// + /// ApiResponse of Team + ApiResponse GetTeamWithHttpInfo (string orgName, string teamSlug); + /// + /// List Teams + /// + /// + /// search for orgs using query parameters + /// + /// Thrown when fails to make API call + /// + /// You know, for search (optional) + /// The account name (optional) + /// The ID of a user (optional) + /// Page number starting from 1 (optional, default to 1) + /// Number of items per page (optional, default to 25) + /// TeamList + TeamList ListOrgTeams (string orgName, List search = default, List name = default, List member = default, int? page = default, int? perPage = default); + + /// + /// List Teams + /// + /// + /// search for orgs using query parameters + /// + /// Thrown when fails to make API call + /// + /// You know, for search (optional) + /// The account name (optional) + /// The ID of a user (optional) + /// Page number starting from 1 (optional, default to 1) + /// Number of items per page (optional, default to 25) + /// ApiResponse of TeamList + ApiResponse ListOrgTeamsWithHttpInfo (string orgName, List search = default, List name = default, List member = default, int? page = default, int? perPage = default); + /// + /// Update a Team + /// + /// + /// Update a team (must have team or org `owner` role) + /// + /// Thrown when fails to make API call + /// + /// + /// + /// UpdateAccepted + UpdateAccepted UpdateTeam (string orgName, string teamSlug, TeamUpdate teamUpdate); + + /// + /// Update a Team + /// + /// + /// Update a team (must have team or org `owner` role) + /// + /// Thrown when fails to make API call + /// + /// + /// + /// ApiResponse of UpdateAccepted + ApiResponse UpdateTeamWithHttpInfo (string orgName, string teamSlug, TeamUpdate teamUpdate); + /// + /// Add or update the role of an Team Member + /// + /// + /// Upsert a member role to the team (must have org or team `owner` role) + /// + /// Thrown when fails to make API call + /// + /// + /// + /// + /// UpdateAccepted + UpdateAccepted UpsertOrgTeamMember (string orgName, string teamSlug, string username, TeamRoleEnum role); + + /// + /// Add or update the role of an Team Member + /// + /// + /// Upsert a member role to the team (must have org or team `owner` role) + /// + /// Thrown when fails to make API call + /// + /// + /// + /// + /// ApiResponse of UpdateAccepted + ApiResponse UpsertOrgTeamMemberWithHttpInfo (string orgName, string teamSlug, string username, TeamRoleEnum role); + #endregion Synchronous Operations + #region Asynchronous Operations + /// + /// Create a Team + /// + /// + /// Create a new team (must be parent org member) + /// + /// Thrown when fails to make API call + /// + /// + /// Cancellation Token to cancel request (optional) + /// Task of CreatedContent + System.Threading.Tasks.Task CreateTeamAsync (string orgName, TeamCreate teamCreate, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// Create a Team + /// + /// + /// Create a new team (must be parent org member) + /// + /// Thrown when fails to make API call + /// + /// + /// Cancellation Token to cancel request (optional) + /// Task of ApiResponse (CreatedContent) + System.Threading.Tasks.Task> CreateTeamWithHttpInfoAsync (string orgName, TeamCreate teamCreate, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Remove a team member + /// + /// + /// Remove a member from the org (must have org `owner` role) + /// + /// Thrown when fails to make API call + /// + /// + /// + /// Cancellation Token to cancel request (optional) + /// Task of void + System.Threading.Tasks.Task DeleteOrgTeamMemberAsync (string orgName, string teamSlug, string username, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// Remove a team member + /// + /// + /// Remove a member from the org (must have org `owner` role) + /// + /// Thrown when fails to make API call + /// + /// + /// + /// Cancellation Token to cancel request (optional) + /// Task of ApiResponse + System.Threading.Tasks.Task> DeleteOrgTeamMemberWithHttpInfoAsync (string orgName, string teamSlug, string username, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Delete a Team + /// + /// + /// Delete a team (must have team or org `owner` role) + /// + /// Thrown when fails to make API call + /// + /// + /// Cancellation Token to cancel request (optional) + /// Task of void + System.Threading.Tasks.Task DeleteTeamAsync (string orgName, string teamSlug, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// Delete a Team + /// + /// + /// Delete a team (must have team or org `owner` role) + /// + /// Thrown when fails to make API call + /// + /// + /// Cancellation Token to cancel request (optional) + /// Task of ApiResponse + System.Threading.Tasks.Task> DeleteTeamWithHttpInfoAsync (string orgName, string teamSlug, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// List team members + /// + /// + /// Retrieve a tean's members + /// + /// Thrown when fails to make API call + /// + /// + /// Cancellation Token to cancel request (optional) + /// Task of TeamMemberList + System.Threading.Tasks.Task GetOrgTeamMembersAsync (string orgName, string teamSlug, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// List team members + /// + /// + /// Retrieve a tean's members + /// + /// Thrown when fails to make API call + /// + /// + /// Cancellation Token to cancel request (optional) + /// Task of ApiResponse (TeamMemberList) + System.Threading.Tasks.Task> GetOrgTeamMembersWithHttpInfoAsync (string orgName, string teamSlug, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Get a Team + /// + /// + /// Retrieve a team by name + /// + /// Thrown when fails to make API call + /// + /// + /// Cancellation Token to cancel request (optional) + /// Task of Team + System.Threading.Tasks.Task GetTeamAsync (string orgName, string teamSlug, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// Get a Team + /// + /// + /// Retrieve a team by name + /// + /// Thrown when fails to make API call + /// + /// + /// Cancellation Token to cancel request (optional) + /// Task of ApiResponse (Team) + System.Threading.Tasks.Task> GetTeamWithHttpInfoAsync (string orgName, string teamSlug, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// List Teams + /// + /// + /// search for orgs using query parameters + /// + /// Thrown when fails to make API call + /// + /// You know, for search (optional) + /// The account name (optional) + /// The ID of a user (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 TeamList + System.Threading.Tasks.Task ListOrgTeamsAsync (string orgName, List search = default, List name = default, List member = default, int? page = default, int? perPage = default, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// List Teams + /// + /// + /// search for orgs using query parameters + /// + /// Thrown when fails to make API call + /// + /// You know, for search (optional) + /// The account name (optional) + /// The ID of a user (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 (TeamList) + System.Threading.Tasks.Task> ListOrgTeamsWithHttpInfoAsync (string orgName, List search = default, List name = default, List member = default, int? page = default, int? perPage = default, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Update a Team + /// + /// + /// Update a team (must have team or org `owner` role) + /// + /// Thrown when fails to make API call + /// + /// + /// + /// Cancellation Token to cancel request (optional) + /// Task of UpdateAccepted + System.Threading.Tasks.Task UpdateTeamAsync (string orgName, string teamSlug, TeamUpdate teamUpdate, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// Update a Team + /// + /// + /// Update a team (must have team or org `owner` role) + /// + /// Thrown when fails to make API call + /// + /// + /// + /// Cancellation Token to cancel request (optional) + /// Task of ApiResponse (UpdateAccepted) + System.Threading.Tasks.Task> UpdateTeamWithHttpInfoAsync (string orgName, string teamSlug, TeamUpdate teamUpdate, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Add or update the role of an Team Member + /// + /// + /// Upsert a member role to the team (must have org or team `owner` role) + /// + /// Thrown when fails to make API call + /// + /// + /// + /// + /// Cancellation Token to cancel request (optional) + /// Task of UpdateAccepted + System.Threading.Tasks.Task UpsertOrgTeamMemberAsync (string orgName, string teamSlug, string username, TeamRoleEnum role, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// Add or update the role of an Team Member + /// + /// + /// Upsert a member role to the team (must have org or team `owner` role) + /// + /// Thrown when fails to make API call + /// + /// + /// + /// + /// Cancellation Token to cancel request (optional) + /// Task of ApiResponse (UpdateAccepted) + System.Threading.Tasks.Task> UpsertOrgTeamMemberWithHttpInfoAsync (string orgName, string teamSlug, string username, TeamRoleEnum role, CancellationToken cancellationToken = default(CancellationToken)); + #endregion Asynchronous Operations + } + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public partial class TeamsApi : ITeamsApi + { + private PollinationSDK.Client.ExceptionFactory _exceptionFactory = (name, response) => null; + + /// + /// Initializes a new instance of the class. + /// + /// + public TeamsApi(String basePath) + { + this.Configuration = new PollinationSDK.Client.Configuration { BasePath = basePath }; + + ExceptionFactory = PollinationSDK.Client.Configuration.DefaultExceptionFactory; + } + + /// + /// Initializes a new instance of the class + /// + /// + public TeamsApi() + { + 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 TeamsApi(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; } + } + + /// + /// Create a Team Create a new team (must be parent org member) + /// + /// Thrown when fails to make API call + /// + /// + /// CreatedContent + public CreatedContent CreateTeam (string orgName, TeamCreate teamCreate) + { + ApiResponse localVarResponse = CreateTeamWithHttpInfo(orgName, teamCreate); + return localVarResponse.Data; + } + + /// + /// Create a Team Create a new team (must be parent org member) + /// + /// Thrown when fails to make API call + /// + /// + /// ApiResponse of CreatedContent + public ApiResponse CreateTeamWithHttpInfo (string orgName, TeamCreate teamCreate) + { + // verify the required parameter 'orgName' is set + if (orgName == null) + throw new ApiException(400, "Missing required parameter 'orgName' when calling TeamsApi->CreateTeam"); + // verify the required parameter 'teamCreate' is set + if (teamCreate == null) + throw new ApiException(400, "Missing required parameter 'teamCreate' when calling TeamsApi->CreateTeam"); + + var localVarPath = "/orgs/{org_name}/teams"; + 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 (orgName != null) localVarPathParams.Add("org_name", this.Configuration.ApiClient.ParameterToString(orgName)); // path parameter + if (teamCreate != null && teamCreate.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(teamCreate); // http body (model) parameter + } + else + { + localVarPostBody = teamCreate; // 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("CreateTeam", 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 a Team Create a new team (must be parent org member) + /// + /// Thrown when fails to make API call + /// + /// + /// Cancellation Token to cancel request (optional) + /// Task of CreatedContent + public async System.Threading.Tasks.Task CreateTeamAsync (string orgName, TeamCreate teamCreate, CancellationToken cancellationToken = default(CancellationToken)) + { + ApiResponse localVarResponse = await CreateTeamWithHttpInfoAsync(orgName, teamCreate, cancellationToken); + return localVarResponse.Data; + + } + + /// + /// Create a Team Create a new team (must be parent org member) + /// + /// Thrown when fails to make API call + /// + /// + /// Cancellation Token to cancel request (optional) + /// Task of ApiResponse (CreatedContent) + public async System.Threading.Tasks.Task> CreateTeamWithHttpInfoAsync (string orgName, TeamCreate teamCreate, CancellationToken cancellationToken = default(CancellationToken)) + { + // verify the required parameter 'orgName' is set + if (orgName == null) + throw new ApiException(400, "Missing required parameter 'orgName' when calling TeamsApi->CreateTeam"); + // verify the required parameter 'teamCreate' is set + if (teamCreate == null) + throw new ApiException(400, "Missing required parameter 'teamCreate' when calling TeamsApi->CreateTeam"); + + var localVarPath = "/orgs/{org_name}/teams"; + 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 (orgName != null) localVarPathParams.Add("org_name", this.Configuration.ApiClient.ParameterToString(orgName)); // path parameter + if (teamCreate != null && teamCreate.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(teamCreate); // http body (model) parameter + } + else + { + localVarPostBody = teamCreate; // 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("CreateTeam", 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))); + } + + /// + /// Remove a team member Remove a member from the org (must have org `owner` role) + /// + /// Thrown when fails to make API call + /// + /// + /// + /// + public void DeleteOrgTeamMember (string orgName, string teamSlug, string username) + { + DeleteOrgTeamMemberWithHttpInfo(orgName, teamSlug, username); + } + + /// + /// Remove a team member Remove a member from the org (must have org `owner` role) + /// + /// Thrown when fails to make API call + /// + /// + /// + /// ApiResponse of Object(void) + public ApiResponse DeleteOrgTeamMemberWithHttpInfo (string orgName, string teamSlug, string username) + { + // verify the required parameter 'orgName' is set + if (orgName == null) + throw new ApiException(400, "Missing required parameter 'orgName' when calling TeamsApi->DeleteOrgTeamMember"); + // verify the required parameter 'teamSlug' is set + if (teamSlug == null) + throw new ApiException(400, "Missing required parameter 'teamSlug' when calling TeamsApi->DeleteOrgTeamMember"); + // verify the required parameter 'username' is set + if (username == null) + throw new ApiException(400, "Missing required parameter 'username' when calling TeamsApi->DeleteOrgTeamMember"); + + var localVarPath = "/orgs/{org_name}/teams/{team_slug}/members/{username}"; + 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 (orgName != null) localVarPathParams.Add("org_name", this.Configuration.ApiClient.ParameterToString(orgName)); // path parameter + if (teamSlug != null) localVarPathParams.Add("team_slug", this.Configuration.ApiClient.ParameterToString(teamSlug)); // path parameter + if (username != null) localVarPathParams.Add("username", this.Configuration.ApiClient.ParameterToString(username)); // 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("DeleteOrgTeamMember", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + null); + } + + /// + /// Remove a team member Remove a member from the org (must have org `owner` role) + /// + /// Thrown when fails to make API call + /// + /// + /// + /// Cancellation Token to cancel request (optional) + /// Task of void + public async System.Threading.Tasks.Task DeleteOrgTeamMemberAsync (string orgName, string teamSlug, string username, CancellationToken cancellationToken = default(CancellationToken)) + { + await DeleteOrgTeamMemberWithHttpInfoAsync(orgName, teamSlug, username, cancellationToken); + + } + + /// + /// Remove a team member Remove a member from the org (must have org `owner` role) + /// + /// Thrown when fails to make API call + /// + /// + /// + /// Cancellation Token to cancel request (optional) + /// Task of ApiResponse + public async System.Threading.Tasks.Task> DeleteOrgTeamMemberWithHttpInfoAsync (string orgName, string teamSlug, string username, CancellationToken cancellationToken = default(CancellationToken)) + { + // verify the required parameter 'orgName' is set + if (orgName == null) + throw new ApiException(400, "Missing required parameter 'orgName' when calling TeamsApi->DeleteOrgTeamMember"); + // verify the required parameter 'teamSlug' is set + if (teamSlug == null) + throw new ApiException(400, "Missing required parameter 'teamSlug' when calling TeamsApi->DeleteOrgTeamMember"); + // verify the required parameter 'username' is set + if (username == null) + throw new ApiException(400, "Missing required parameter 'username' when calling TeamsApi->DeleteOrgTeamMember"); + + var localVarPath = "/orgs/{org_name}/teams/{team_slug}/members/{username}"; + 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 (orgName != null) localVarPathParams.Add("org_name", this.Configuration.ApiClient.ParameterToString(orgName)); // path parameter + if (teamSlug != null) localVarPathParams.Add("team_slug", this.Configuration.ApiClient.ParameterToString(teamSlug)); // path parameter + if (username != null) localVarPathParams.Add("username", this.Configuration.ApiClient.ParameterToString(username)); // 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("DeleteOrgTeamMember", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + null); + } + + /// + /// Delete a Team Delete a team (must have team or org `owner` role) + /// + /// Thrown when fails to make API call + /// + /// + /// + public void DeleteTeam (string orgName, string teamSlug) + { + DeleteTeamWithHttpInfo(orgName, teamSlug); + } + + /// + /// Delete a Team Delete a team (must have team or org `owner` role) + /// + /// Thrown when fails to make API call + /// + /// + /// ApiResponse of Object(void) + public ApiResponse DeleteTeamWithHttpInfo (string orgName, string teamSlug) + { + // verify the required parameter 'orgName' is set + if (orgName == null) + throw new ApiException(400, "Missing required parameter 'orgName' when calling TeamsApi->DeleteTeam"); + // verify the required parameter 'teamSlug' is set + if (teamSlug == null) + throw new ApiException(400, "Missing required parameter 'teamSlug' when calling TeamsApi->DeleteTeam"); + + var localVarPath = "/orgs/{org_name}/teams/{team_slug}"; + 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 (orgName != null) localVarPathParams.Add("org_name", this.Configuration.ApiClient.ParameterToString(orgName)); // path parameter + if (teamSlug != null) localVarPathParams.Add("team_slug", this.Configuration.ApiClient.ParameterToString(teamSlug)); // 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("DeleteTeam", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + null); + } + + /// + /// Delete a Team Delete a team (must have team or org `owner` role) + /// + /// Thrown when fails to make API call + /// + /// + /// Cancellation Token to cancel request (optional) + /// Task of void + public async System.Threading.Tasks.Task DeleteTeamAsync (string orgName, string teamSlug, CancellationToken cancellationToken = default(CancellationToken)) + { + await DeleteTeamWithHttpInfoAsync(orgName, teamSlug, cancellationToken); + + } + + /// + /// Delete a Team Delete a team (must have team or org `owner` role) + /// + /// Thrown when fails to make API call + /// + /// + /// Cancellation Token to cancel request (optional) + /// Task of ApiResponse + public async System.Threading.Tasks.Task> DeleteTeamWithHttpInfoAsync (string orgName, string teamSlug, CancellationToken cancellationToken = default(CancellationToken)) + { + // verify the required parameter 'orgName' is set + if (orgName == null) + throw new ApiException(400, "Missing required parameter 'orgName' when calling TeamsApi->DeleteTeam"); + // verify the required parameter 'teamSlug' is set + if (teamSlug == null) + throw new ApiException(400, "Missing required parameter 'teamSlug' when calling TeamsApi->DeleteTeam"); + + var localVarPath = "/orgs/{org_name}/teams/{team_slug}"; + 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 (orgName != null) localVarPathParams.Add("org_name", this.Configuration.ApiClient.ParameterToString(orgName)); // path parameter + if (teamSlug != null) localVarPathParams.Add("team_slug", this.Configuration.ApiClient.ParameterToString(teamSlug)); // 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("DeleteTeam", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + null); + } + + /// + /// List team members Retrieve a tean's members + /// + /// Thrown when fails to make API call + /// + /// + /// TeamMemberList + public TeamMemberList GetOrgTeamMembers (string orgName, string teamSlug) + { + ApiResponse localVarResponse = GetOrgTeamMembersWithHttpInfo(orgName, teamSlug); + return localVarResponse.Data; + } + + /// + /// List team members Retrieve a tean's members + /// + /// Thrown when fails to make API call + /// + /// + /// ApiResponse of TeamMemberList + public ApiResponse GetOrgTeamMembersWithHttpInfo (string orgName, string teamSlug) + { + // verify the required parameter 'orgName' is set + if (orgName == null) + throw new ApiException(400, "Missing required parameter 'orgName' when calling TeamsApi->GetOrgTeamMembers"); + // verify the required parameter 'teamSlug' is set + if (teamSlug == null) + throw new ApiException(400, "Missing required parameter 'teamSlug' when calling TeamsApi->GetOrgTeamMembers"); + + var localVarPath = "/orgs/{org_name}/teams/{team_slug}/members"; + 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 (orgName != null) localVarPathParams.Add("org_name", this.Configuration.ApiClient.ParameterToString(orgName)); // path parameter + if (teamSlug != null) localVarPathParams.Add("team_slug", this.Configuration.ApiClient.ParameterToString(teamSlug)); // 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("GetOrgTeamMembers", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (TeamMemberList) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(TeamMemberList))); + } + + /// + /// List team members Retrieve a tean's members + /// + /// Thrown when fails to make API call + /// + /// + /// Cancellation Token to cancel request (optional) + /// Task of TeamMemberList + public async System.Threading.Tasks.Task GetOrgTeamMembersAsync (string orgName, string teamSlug, CancellationToken cancellationToken = default(CancellationToken)) + { + ApiResponse localVarResponse = await GetOrgTeamMembersWithHttpInfoAsync(orgName, teamSlug, cancellationToken); + return localVarResponse.Data; + + } + + /// + /// List team members Retrieve a tean's members + /// + /// Thrown when fails to make API call + /// + /// + /// Cancellation Token to cancel request (optional) + /// Task of ApiResponse (TeamMemberList) + public async System.Threading.Tasks.Task> GetOrgTeamMembersWithHttpInfoAsync (string orgName, string teamSlug, CancellationToken cancellationToken = default(CancellationToken)) + { + // verify the required parameter 'orgName' is set + if (orgName == null) + throw new ApiException(400, "Missing required parameter 'orgName' when calling TeamsApi->GetOrgTeamMembers"); + // verify the required parameter 'teamSlug' is set + if (teamSlug == null) + throw new ApiException(400, "Missing required parameter 'teamSlug' when calling TeamsApi->GetOrgTeamMembers"); + + var localVarPath = "/orgs/{org_name}/teams/{team_slug}/members"; + 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 (orgName != null) localVarPathParams.Add("org_name", this.Configuration.ApiClient.ParameterToString(orgName)); // path parameter + if (teamSlug != null) localVarPathParams.Add("team_slug", this.Configuration.ApiClient.ParameterToString(teamSlug)); // 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("GetOrgTeamMembers", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (TeamMemberList) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(TeamMemberList))); + } + + /// + /// Get a Team Retrieve a team by name + /// + /// Thrown when fails to make API call + /// + /// + /// Team + public Team GetTeam (string orgName, string teamSlug) + { + ApiResponse localVarResponse = GetTeamWithHttpInfo(orgName, teamSlug); + return localVarResponse.Data; + } + + /// + /// Get a Team Retrieve a team by name + /// + /// Thrown when fails to make API call + /// + /// + /// ApiResponse of Team + public ApiResponse GetTeamWithHttpInfo (string orgName, string teamSlug) + { + // verify the required parameter 'orgName' is set + if (orgName == null) + throw new ApiException(400, "Missing required parameter 'orgName' when calling TeamsApi->GetTeam"); + // verify the required parameter 'teamSlug' is set + if (teamSlug == null) + throw new ApiException(400, "Missing required parameter 'teamSlug' when calling TeamsApi->GetTeam"); + + var localVarPath = "/orgs/{org_name}/teams/{team_slug}"; + 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 (orgName != null) localVarPathParams.Add("org_name", this.Configuration.ApiClient.ParameterToString(orgName)); // path parameter + if (teamSlug != null) localVarPathParams.Add("team_slug", this.Configuration.ApiClient.ParameterToString(teamSlug)); // 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("GetTeam", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (Team) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Team))); + } + + /// + /// Get a Team Retrieve a team by name + /// + /// Thrown when fails to make API call + /// + /// + /// Cancellation Token to cancel request (optional) + /// Task of Team + public async System.Threading.Tasks.Task GetTeamAsync (string orgName, string teamSlug, CancellationToken cancellationToken = default(CancellationToken)) + { + ApiResponse localVarResponse = await GetTeamWithHttpInfoAsync(orgName, teamSlug, cancellationToken); + return localVarResponse.Data; + + } + + /// + /// Get a Team Retrieve a team by name + /// + /// Thrown when fails to make API call + /// + /// + /// Cancellation Token to cancel request (optional) + /// Task of ApiResponse (Team) + public async System.Threading.Tasks.Task> GetTeamWithHttpInfoAsync (string orgName, string teamSlug, CancellationToken cancellationToken = default(CancellationToken)) + { + // verify the required parameter 'orgName' is set + if (orgName == null) + throw new ApiException(400, "Missing required parameter 'orgName' when calling TeamsApi->GetTeam"); + // verify the required parameter 'teamSlug' is set + if (teamSlug == null) + throw new ApiException(400, "Missing required parameter 'teamSlug' when calling TeamsApi->GetTeam"); + + var localVarPath = "/orgs/{org_name}/teams/{team_slug}"; + 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 (orgName != null) localVarPathParams.Add("org_name", this.Configuration.ApiClient.ParameterToString(orgName)); // path parameter + if (teamSlug != null) localVarPathParams.Add("team_slug", this.Configuration.ApiClient.ParameterToString(teamSlug)); // 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("GetTeam", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (Team) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Team))); + } + + /// + /// List Teams search for orgs using query parameters + /// + /// Thrown when fails to make API call + /// + /// You know, for search (optional) + /// The account name (optional) + /// The ID of a user (optional) + /// Page number starting from 1 (optional, default to 1) + /// Number of items per page (optional, default to 25) + /// TeamList + public TeamList ListOrgTeams (string orgName, List search = default, List name = default, List member = default, int? page = default, int? perPage = default) + { + ApiResponse localVarResponse = ListOrgTeamsWithHttpInfo(orgName, search, name, member, page, perPage); + return localVarResponse.Data; + } + + /// + /// List Teams search for orgs using query parameters + /// + /// Thrown when fails to make API call + /// + /// You know, for search (optional) + /// The account name (optional) + /// The ID of a user (optional) + /// Page number starting from 1 (optional, default to 1) + /// Number of items per page (optional, default to 25) + /// ApiResponse of TeamList + public ApiResponse ListOrgTeamsWithHttpInfo (string orgName, List search = default, List name = default, List member = default, int? page = default, int? perPage = default) + { + // verify the required parameter 'orgName' is set + if (orgName == null) + throw new ApiException(400, "Missing required parameter 'orgName' when calling TeamsApi->ListOrgTeams"); + + var localVarPath = "/orgs/{org_name}/teams"; + 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 (orgName != null) localVarPathParams.Add("org_name", this.Configuration.ApiClient.ParameterToString(orgName)); // path parameter + if (search != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("multi", "search", search)); // query parameter + if (name != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("multi", "name", name)); // query parameter + if (member != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("multi", "member", member)); // 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 + + + // 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("ListOrgTeams", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (TeamList) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(TeamList))); + } + + /// + /// List Teams search for orgs using query parameters + /// + /// Thrown when fails to make API call + /// + /// You know, for search (optional) + /// The account name (optional) + /// The ID of a user (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 TeamList + public async System.Threading.Tasks.Task ListOrgTeamsAsync (string orgName, List search = default, List name = default, List member = default, int? page = default, int? perPage = default, CancellationToken cancellationToken = default(CancellationToken)) + { + ApiResponse localVarResponse = await ListOrgTeamsWithHttpInfoAsync(orgName, search, name, member, page, perPage, cancellationToken); + return localVarResponse.Data; + + } + + /// + /// List Teams search for orgs using query parameters + /// + /// Thrown when fails to make API call + /// + /// You know, for search (optional) + /// The account name (optional) + /// The ID of a user (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 (TeamList) + public async System.Threading.Tasks.Task> ListOrgTeamsWithHttpInfoAsync (string orgName, List search = default, List name = default, List member = default, int? page = default, int? perPage = default, CancellationToken cancellationToken = default(CancellationToken)) + { + // verify the required parameter 'orgName' is set + if (orgName == null) + throw new ApiException(400, "Missing required parameter 'orgName' when calling TeamsApi->ListOrgTeams"); + + var localVarPath = "/orgs/{org_name}/teams"; + 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 (orgName != null) localVarPathParams.Add("org_name", this.Configuration.ApiClient.ParameterToString(orgName)); // path parameter + if (search != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("multi", "search", search)); // query parameter + if (name != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("multi", "name", name)); // query parameter + if (member != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("multi", "member", member)); // 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 + + + // 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("ListOrgTeams", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (TeamList) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(TeamList))); + } + + /// + /// Update a Team Update a team (must have team or org `owner` role) + /// + /// Thrown when fails to make API call + /// + /// + /// + /// UpdateAccepted + public UpdateAccepted UpdateTeam (string orgName, string teamSlug, TeamUpdate teamUpdate) + { + ApiResponse localVarResponse = UpdateTeamWithHttpInfo(orgName, teamSlug, teamUpdate); + return localVarResponse.Data; + } + + /// + /// Update a Team Update a team (must have team or org `owner` role) + /// + /// Thrown when fails to make API call + /// + /// + /// + /// ApiResponse of UpdateAccepted + public ApiResponse UpdateTeamWithHttpInfo (string orgName, string teamSlug, TeamUpdate teamUpdate) + { + // verify the required parameter 'orgName' is set + if (orgName == null) + throw new ApiException(400, "Missing required parameter 'orgName' when calling TeamsApi->UpdateTeam"); + // verify the required parameter 'teamSlug' is set + if (teamSlug == null) + throw new ApiException(400, "Missing required parameter 'teamSlug' when calling TeamsApi->UpdateTeam"); + // verify the required parameter 'teamUpdate' is set + if (teamUpdate == null) + throw new ApiException(400, "Missing required parameter 'teamUpdate' when calling TeamsApi->UpdateTeam"); + + var localVarPath = "/orgs/{org_name}/teams/{team_slug}"; + 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 (orgName != null) localVarPathParams.Add("org_name", this.Configuration.ApiClient.ParameterToString(orgName)); // path parameter + if (teamSlug != null) localVarPathParams.Add("team_slug", this.Configuration.ApiClient.ParameterToString(teamSlug)); // path parameter + if (teamUpdate != null && teamUpdate.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(teamUpdate); // http body (model) parameter + } + else + { + localVarPostBody = teamUpdate; // 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("UpdateTeam", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (UpdateAccepted) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(UpdateAccepted))); + } + + /// + /// Update a Team Update a team (must have team or org `owner` role) + /// + /// Thrown when fails to make API call + /// + /// + /// + /// Cancellation Token to cancel request (optional) + /// Task of UpdateAccepted + public async System.Threading.Tasks.Task UpdateTeamAsync (string orgName, string teamSlug, TeamUpdate teamUpdate, CancellationToken cancellationToken = default(CancellationToken)) + { + ApiResponse localVarResponse = await UpdateTeamWithHttpInfoAsync(orgName, teamSlug, teamUpdate, cancellationToken); + return localVarResponse.Data; + + } + + /// + /// Update a Team Update a team (must have team or org `owner` role) + /// + /// Thrown when fails to make API call + /// + /// + /// + /// Cancellation Token to cancel request (optional) + /// Task of ApiResponse (UpdateAccepted) + public async System.Threading.Tasks.Task> UpdateTeamWithHttpInfoAsync (string orgName, string teamSlug, TeamUpdate teamUpdate, CancellationToken cancellationToken = default(CancellationToken)) + { + // verify the required parameter 'orgName' is set + if (orgName == null) + throw new ApiException(400, "Missing required parameter 'orgName' when calling TeamsApi->UpdateTeam"); + // verify the required parameter 'teamSlug' is set + if (teamSlug == null) + throw new ApiException(400, "Missing required parameter 'teamSlug' when calling TeamsApi->UpdateTeam"); + // verify the required parameter 'teamUpdate' is set + if (teamUpdate == null) + throw new ApiException(400, "Missing required parameter 'teamUpdate' when calling TeamsApi->UpdateTeam"); + + var localVarPath = "/orgs/{org_name}/teams/{team_slug}"; + 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 (orgName != null) localVarPathParams.Add("org_name", this.Configuration.ApiClient.ParameterToString(orgName)); // path parameter + if (teamSlug != null) localVarPathParams.Add("team_slug", this.Configuration.ApiClient.ParameterToString(teamSlug)); // path parameter + if (teamUpdate != null && teamUpdate.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(teamUpdate); // http body (model) parameter + } + else + { + localVarPostBody = teamUpdate; // 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("UpdateTeam", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (UpdateAccepted) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(UpdateAccepted))); + } + + /// + /// Add or update the role of an Team Member Upsert a member role to the team (must have org or team `owner` role) + /// + /// Thrown when fails to make API call + /// + /// + /// + /// + /// UpdateAccepted + public UpdateAccepted UpsertOrgTeamMember (string orgName, string teamSlug, string username, TeamRoleEnum role) + { + ApiResponse localVarResponse = UpsertOrgTeamMemberWithHttpInfo(orgName, teamSlug, username, role); + return localVarResponse.Data; + } + + /// + /// Add or update the role of an Team Member Upsert a member role to the team (must have org or team `owner` role) + /// + /// Thrown when fails to make API call + /// + /// + /// + /// + /// ApiResponse of UpdateAccepted + public ApiResponse UpsertOrgTeamMemberWithHttpInfo (string orgName, string teamSlug, string username, TeamRoleEnum role) + { + // verify the required parameter 'orgName' is set + if (orgName == null) + throw new ApiException(400, "Missing required parameter 'orgName' when calling TeamsApi->UpsertOrgTeamMember"); + // verify the required parameter 'teamSlug' is set + if (teamSlug == null) + throw new ApiException(400, "Missing required parameter 'teamSlug' when calling TeamsApi->UpsertOrgTeamMember"); + // verify the required parameter 'username' is set + if (username == null) + throw new ApiException(400, "Missing required parameter 'username' when calling TeamsApi->UpsertOrgTeamMember"); + // verify the required parameter 'role' is set + if (role == null) + throw new ApiException(400, "Missing required parameter 'role' when calling TeamsApi->UpsertOrgTeamMember"); + + var localVarPath = "/orgs/{org_name}/teams/{team_slug}/members/{username}/{role}"; + 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 (orgName != null) localVarPathParams.Add("org_name", this.Configuration.ApiClient.ParameterToString(orgName)); // path parameter + if (teamSlug != null) localVarPathParams.Add("team_slug", this.Configuration.ApiClient.ParameterToString(teamSlug)); // path parameter + if (username != null) localVarPathParams.Add("username", this.Configuration.ApiClient.ParameterToString(username)); // path parameter + if (role != null) localVarPathParams.Add("role", this.Configuration.ApiClient.ParameterToString(role)); // 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.PATCH, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("UpsertOrgTeamMember", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (UpdateAccepted) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(UpdateAccepted))); + } + + /// + /// Add or update the role of an Team Member Upsert a member role to the team (must have org or team `owner` role) + /// + /// Thrown when fails to make API call + /// + /// + /// + /// + /// Cancellation Token to cancel request (optional) + /// Task of UpdateAccepted + public async System.Threading.Tasks.Task UpsertOrgTeamMemberAsync (string orgName, string teamSlug, string username, TeamRoleEnum role, CancellationToken cancellationToken = default(CancellationToken)) + { + ApiResponse localVarResponse = await UpsertOrgTeamMemberWithHttpInfoAsync(orgName, teamSlug, username, role, cancellationToken); + return localVarResponse.Data; + + } + + /// + /// Add or update the role of an Team Member Upsert a member role to the team (must have org or team `owner` role) + /// + /// Thrown when fails to make API call + /// + /// + /// + /// + /// Cancellation Token to cancel request (optional) + /// Task of ApiResponse (UpdateAccepted) + public async System.Threading.Tasks.Task> UpsertOrgTeamMemberWithHttpInfoAsync (string orgName, string teamSlug, string username, TeamRoleEnum role, CancellationToken cancellationToken = default(CancellationToken)) + { + // verify the required parameter 'orgName' is set + if (orgName == null) + throw new ApiException(400, "Missing required parameter 'orgName' when calling TeamsApi->UpsertOrgTeamMember"); + // verify the required parameter 'teamSlug' is set + if (teamSlug == null) + throw new ApiException(400, "Missing required parameter 'teamSlug' when calling TeamsApi->UpsertOrgTeamMember"); + // verify the required parameter 'username' is set + if (username == null) + throw new ApiException(400, "Missing required parameter 'username' when calling TeamsApi->UpsertOrgTeamMember"); + // verify the required parameter 'role' is set + if (role == null) + throw new ApiException(400, "Missing required parameter 'role' when calling TeamsApi->UpsertOrgTeamMember"); + + var localVarPath = "/orgs/{org_name}/teams/{team_slug}/members/{username}/{role}"; + 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 (orgName != null) localVarPathParams.Add("org_name", this.Configuration.ApiClient.ParameterToString(orgName)); // path parameter + if (teamSlug != null) localVarPathParams.Add("team_slug", this.Configuration.ApiClient.ParameterToString(teamSlug)); // path parameter + if (username != null) localVarPathParams.Add("username", this.Configuration.ApiClient.ParameterToString(username)); // path parameter + if (role != null) localVarPathParams.Add("role", this.Configuration.ApiClient.ParameterToString(role)); // 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.PATCH, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType, cancellationToken); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("UpsertOrgTeamMember", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (UpdateAccepted) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(UpdateAccepted))); + } + + } +} diff --git a/src/PollinationSDK/Api/UserApi.cs b/src/PollinationSDK/Api/UserApi.cs new file mode 100644 index 000000000..581543311 --- /dev/null +++ b/src/PollinationSDK/Api/UserApi.cs @@ -0,0 +1,903 @@ +/* + * 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 IUserApi : IApiAccessor + { + #region Synchronous Operations + /// + /// Register a new user + /// + /// + /// Create a new user. + /// + /// Thrown when fails to make API call + /// + /// CreatedContent + CreatedContent CreateUser (UserCreate userCreate); + + /// + /// Register a new user + /// + /// + /// Create a new user. + /// + /// Thrown when fails to make API call + /// + /// ApiResponse of CreatedContent + ApiResponse CreateUserWithHttpInfo (UserCreate userCreate); + /// + /// Get authenticated user profile. + /// + /// + /// Get authenticated user profile + /// + /// Thrown when fails to make API call + /// UserPrivate + UserPrivate GetMe (); + + /// + /// Get authenticated user profile. + /// + /// + /// Get authenticated user profile + /// + /// Thrown when fails to make API call + /// ApiResponse of UserPrivate + ApiResponse GetMeWithHttpInfo (); + /// + /// Get the authenticated user roles + /// + /// + /// + /// + /// Thrown when fails to make API call + /// List<string> + List GetRoles (); + + /// + /// Get the authenticated user roles + /// + /// + /// + /// + /// Thrown when fails to make API call + /// ApiResponse of List<string> + ApiResponse> GetRolesWithHttpInfo (); + /// + /// Update the authenticated user + /// + /// + /// Update the authenticated user profile + /// + /// Thrown when fails to make API call + /// + /// UpdateAccepted + UpdateAccepted UpdateUserProfile (UserUpdate userUpdate); + + /// + /// Update the authenticated user + /// + /// + /// Update the authenticated user profile + /// + /// Thrown when fails to make API call + /// + /// ApiResponse of UpdateAccepted + ApiResponse UpdateUserProfileWithHttpInfo (UserUpdate userUpdate); + #endregion Synchronous Operations + #region Asynchronous Operations + /// + /// Register a new user + /// + /// + /// Create a new user. + /// + /// Thrown when fails to make API call + /// + /// Cancellation Token to cancel request (optional) + /// Task of CreatedContent + System.Threading.Tasks.Task CreateUserAsync (UserCreate userCreate, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// Register a new user + /// + /// + /// Create a new user. + /// + /// Thrown when fails to make API call + /// + /// Cancellation Token to cancel request (optional) + /// Task of ApiResponse (CreatedContent) + System.Threading.Tasks.Task> CreateUserWithHttpInfoAsync (UserCreate userCreate, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Get authenticated user profile. + /// + /// + /// Get authenticated user profile + /// + /// Thrown when fails to make API call + /// Cancellation Token to cancel request (optional) + /// Task of UserPrivate + System.Threading.Tasks.Task GetMeAsync (CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// Get authenticated user profile. + /// + /// + /// Get authenticated user profile + /// + /// Thrown when fails to make API call + /// Cancellation Token to cancel request (optional) + /// Task of ApiResponse (UserPrivate) + System.Threading.Tasks.Task> GetMeWithHttpInfoAsync (CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Get the authenticated user roles + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Cancellation Token to cancel request (optional) + /// Task of List<string> + System.Threading.Tasks.Task> GetRolesAsync (CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// Get the authenticated user roles + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Cancellation Token to cancel request (optional) + /// Task of ApiResponse (List<string>) + System.Threading.Tasks.Task>> GetRolesWithHttpInfoAsync (CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Update the authenticated user + /// + /// + /// Update the authenticated user profile + /// + /// Thrown when fails to make API call + /// + /// Cancellation Token to cancel request (optional) + /// Task of UpdateAccepted + System.Threading.Tasks.Task UpdateUserProfileAsync (UserUpdate userUpdate, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// Update the authenticated user + /// + /// + /// Update the authenticated user profile + /// + /// Thrown when fails to make API call + /// + /// Cancellation Token to cancel request (optional) + /// Task of ApiResponse (UpdateAccepted) + System.Threading.Tasks.Task> UpdateUserProfileWithHttpInfoAsync (UserUpdate userUpdate, CancellationToken cancellationToken = default(CancellationToken)); + #endregion Asynchronous Operations + } + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public partial class UserApi : IUserApi + { + private PollinationSDK.Client.ExceptionFactory _exceptionFactory = (name, response) => null; + + /// + /// Initializes a new instance of the class. + /// + /// + public UserApi(String basePath) + { + this.Configuration = new PollinationSDK.Client.Configuration { BasePath = basePath }; + + ExceptionFactory = PollinationSDK.Client.Configuration.DefaultExceptionFactory; + } + + /// + /// Initializes a new instance of the class + /// + /// + public UserApi() + { + 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 UserApi(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; } + } + + /// + /// Register a new user Create a new user. + /// + /// Thrown when fails to make API call + /// + /// CreatedContent + public CreatedContent CreateUser (UserCreate userCreate) + { + ApiResponse localVarResponse = CreateUserWithHttpInfo(userCreate); + return localVarResponse.Data; + } + + /// + /// Register a new user Create a new user. + /// + /// Thrown when fails to make API call + /// + /// ApiResponse of CreatedContent + public ApiResponse CreateUserWithHttpInfo (UserCreate userCreate) + { + // verify the required parameter 'userCreate' is set + if (userCreate == null) + throw new ApiException(400, "Missing required parameter 'userCreate' when calling UserApi->CreateUser"); + + var localVarPath = "/user"; + 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 (userCreate != null && userCreate.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(userCreate); // http body (model) parameter + } + else + { + localVarPostBody = userCreate; // byte array + } + + // 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("CreateUser", 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))); + } + + /// + /// Register a new user Create a new user. + /// + /// Thrown when fails to make API call + /// + /// Cancellation Token to cancel request (optional) + /// Task of CreatedContent + public async System.Threading.Tasks.Task CreateUserAsync (UserCreate userCreate, CancellationToken cancellationToken = default(CancellationToken)) + { + ApiResponse localVarResponse = await CreateUserWithHttpInfoAsync(userCreate, cancellationToken); + return localVarResponse.Data; + + } + + /// + /// Register a new user Create a new user. + /// + /// Thrown when fails to make API call + /// + /// Cancellation Token to cancel request (optional) + /// Task of ApiResponse (CreatedContent) + public async System.Threading.Tasks.Task> CreateUserWithHttpInfoAsync (UserCreate userCreate, CancellationToken cancellationToken = default(CancellationToken)) + { + // verify the required parameter 'userCreate' is set + if (userCreate == null) + throw new ApiException(400, "Missing required parameter 'userCreate' when calling UserApi->CreateUser"); + + var localVarPath = "/user"; + 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 (userCreate != null && userCreate.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(userCreate); // http body (model) parameter + } + else + { + localVarPostBody = userCreate; // byte array + } + + // 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("CreateUser", 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 authenticated user profile. Get authenticated user profile + /// + /// Thrown when fails to make API call + /// UserPrivate + public UserPrivate GetMe () + { + ApiResponse localVarResponse = GetMeWithHttpInfo(); + return localVarResponse.Data; + } + + /// + /// Get authenticated user profile. Get authenticated user profile + /// + /// Thrown when fails to make API call + /// ApiResponse of UserPrivate + public ApiResponse GetMeWithHttpInfo () + { + + var localVarPath = "/user"; + 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); + + + // 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("GetMe", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (UserPrivate) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(UserPrivate))); + } + + /// + /// Get authenticated user profile. Get authenticated user profile + /// + /// Thrown when fails to make API call + /// Cancellation Token to cancel request (optional) + /// Task of UserPrivate + public async System.Threading.Tasks.Task GetMeAsync (CancellationToken cancellationToken = default(CancellationToken)) + { + ApiResponse localVarResponse = await GetMeWithHttpInfoAsync(cancellationToken); + return localVarResponse.Data; + + } + + /// + /// Get authenticated user profile. Get authenticated user profile + /// + /// Thrown when fails to make API call + /// Cancellation Token to cancel request (optional) + /// Task of ApiResponse (UserPrivate) + public async System.Threading.Tasks.Task> GetMeWithHttpInfoAsync (CancellationToken cancellationToken = default(CancellationToken)) + { + + var localVarPath = "/user"; + 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); + + + // 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("GetMe", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (UserPrivate) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(UserPrivate))); + } + + /// + /// Get the authenticated user roles + /// + /// Thrown when fails to make API call + /// List<string> + public List GetRoles () + { + ApiResponse> localVarResponse = GetRolesWithHttpInfo(); + return localVarResponse.Data; + } + + /// + /// Get the authenticated user roles + /// + /// Thrown when fails to make API call + /// ApiResponse of List<string> + public ApiResponse> GetRolesWithHttpInfo () + { + + var localVarPath = "/user/roles"; + 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); + + + // 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("GetRoles", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse>(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (List) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(List))); + } + + /// + /// Get the authenticated user roles + /// + /// Thrown when fails to make API call + /// Cancellation Token to cancel request (optional) + /// Task of List<string> + public async System.Threading.Tasks.Task> GetRolesAsync (CancellationToken cancellationToken = default(CancellationToken)) + { + ApiResponse> localVarResponse = await GetRolesWithHttpInfoAsync(cancellationToken); + return localVarResponse.Data; + + } + + /// + /// Get the authenticated user roles + /// + /// Thrown when fails to make API call + /// Cancellation Token to cancel request (optional) + /// Task of ApiResponse (List<string>) + public async System.Threading.Tasks.Task>> GetRolesWithHttpInfoAsync (CancellationToken cancellationToken = default(CancellationToken)) + { + + var localVarPath = "/user/roles"; + 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); + + + // 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("GetRoles", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse>(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (List) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(List))); + } + + /// + /// Update the authenticated user Update the authenticated user profile + /// + /// Thrown when fails to make API call + /// + /// UpdateAccepted + public UpdateAccepted UpdateUserProfile (UserUpdate userUpdate) + { + ApiResponse localVarResponse = UpdateUserProfileWithHttpInfo(userUpdate); + return localVarResponse.Data; + } + + /// + /// Update the authenticated user Update the authenticated user profile + /// + /// Thrown when fails to make API call + /// + /// ApiResponse of UpdateAccepted + public ApiResponse UpdateUserProfileWithHttpInfo (UserUpdate userUpdate) + { + // verify the required parameter 'userUpdate' is set + if (userUpdate == null) + throw new ApiException(400, "Missing required parameter 'userUpdate' when calling UserApi->UpdateUserProfile"); + + var localVarPath = "/user"; + 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 (userUpdate != null && userUpdate.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(userUpdate); // http body (model) parameter + } + else + { + localVarPostBody = userUpdate; // 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("UpdateUserProfile", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (UpdateAccepted) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(UpdateAccepted))); + } + + /// + /// Update the authenticated user Update the authenticated user profile + /// + /// Thrown when fails to make API call + /// + /// Cancellation Token to cancel request (optional) + /// Task of UpdateAccepted + public async System.Threading.Tasks.Task UpdateUserProfileAsync (UserUpdate userUpdate, CancellationToken cancellationToken = default(CancellationToken)) + { + ApiResponse localVarResponse = await UpdateUserProfileWithHttpInfoAsync(userUpdate, cancellationToken); + return localVarResponse.Data; + + } + + /// + /// Update the authenticated user Update the authenticated user profile + /// + /// Thrown when fails to make API call + /// + /// Cancellation Token to cancel request (optional) + /// Task of ApiResponse (UpdateAccepted) + public async System.Threading.Tasks.Task> UpdateUserProfileWithHttpInfoAsync (UserUpdate userUpdate, CancellationToken cancellationToken = default(CancellationToken)) + { + // verify the required parameter 'userUpdate' is set + if (userUpdate == null) + throw new ApiException(400, "Missing required parameter 'userUpdate' when calling UserApi->UpdateUserProfile"); + + var localVarPath = "/user"; + 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 (userUpdate != null && userUpdate.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(userUpdate); // http body (model) parameter + } + else + { + localVarPostBody = userUpdate; // 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("UpdateUserProfile", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (UpdateAccepted) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(UpdateAccepted))); + } + + } +} diff --git a/src/PollinationSDK/Api/UsersApi.cs b/src/PollinationSDK/Api/UsersApi.cs new file mode 100644 index 000000000..fdfa23b20 --- /dev/null +++ b/src/PollinationSDK/Api/UsersApi.cs @@ -0,0 +1,660 @@ +/* + * 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 IUsersApi : IApiAccessor + { + #region Synchronous Operations + /// + /// Check if a username is already taken + /// + /// + /// Check if a username is already taken by a user or an org + /// + /// Thrown when fails to make API call + /// + /// object + object CheckUsername (string username); + + /// + /// Check if a username is already taken + /// + /// + /// Check if a username is already taken by a user or an org + /// + /// Thrown when fails to make API call + /// + /// ApiResponse of object + ApiResponse CheckUsernameWithHttpInfo (string username); + /// + /// Get a specific user profile + /// + /// + /// Get a specific user profile by name + /// + /// Thrown when fails to make API call + /// + /// UserPublic + UserPublic GetOneUser (string name); + + /// + /// Get a specific user profile + /// + /// + /// Get a specific user profile by name + /// + /// Thrown when fails to make API call + /// + /// ApiResponse of UserPublic + ApiResponse GetOneUserWithHttpInfo (string name); + /// + /// List Users + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Search string to find users (optional) + /// Page number starting from 1 (optional, default to 1) + /// Number of items per page (optional, default to 25) + /// UserPublicList + UserPublicList ListUsers (string search = default, int? page = default, int? perPage = default); + + /// + /// List Users + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Search string to find users (optional) + /// Page number starting from 1 (optional, default to 1) + /// Number of items per page (optional, default to 25) + /// ApiResponse of UserPublicList + ApiResponse ListUsersWithHttpInfo (string search = default, int? page = default, int? perPage = default); + #endregion Synchronous Operations + #region Asynchronous Operations + /// + /// Check if a username is already taken + /// + /// + /// Check if a username is already taken by a user or an org + /// + /// Thrown when fails to make API call + /// + /// Cancellation Token to cancel request (optional) + /// Task of object + System.Threading.Tasks.Task CheckUsernameAsync (string username, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// Check if a username is already taken + /// + /// + /// Check if a username is already taken by a user or an org + /// + /// Thrown when fails to make API call + /// + /// Cancellation Token to cancel request (optional) + /// Task of ApiResponse (object) + System.Threading.Tasks.Task> CheckUsernameWithHttpInfoAsync (string username, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Get a specific user profile + /// + /// + /// Get a specific user profile by name + /// + /// Thrown when fails to make API call + /// + /// Cancellation Token to cancel request (optional) + /// Task of UserPublic + System.Threading.Tasks.Task GetOneUserAsync (string name, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// Get a specific user profile + /// + /// + /// Get a specific user profile by name + /// + /// Thrown when fails to make API call + /// + /// Cancellation Token to cancel request (optional) + /// Task of ApiResponse (UserPublic) + System.Threading.Tasks.Task> GetOneUserWithHttpInfoAsync (string name, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// List Users + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Search string to find users (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 UserPublicList + System.Threading.Tasks.Task ListUsersAsync (string search = default, int? page = default, int? perPage = default, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// List Users + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Search string to find users (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 (UserPublicList) + System.Threading.Tasks.Task> ListUsersWithHttpInfoAsync (string search = default, int? page = default, int? perPage = default, CancellationToken cancellationToken = default(CancellationToken)); + #endregion Asynchronous Operations + } + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public partial class UsersApi : IUsersApi + { + private PollinationSDK.Client.ExceptionFactory _exceptionFactory = (name, response) => null; + + /// + /// Initializes a new instance of the class. + /// + /// + public UsersApi(String basePath) + { + this.Configuration = new PollinationSDK.Client.Configuration { BasePath = basePath }; + + ExceptionFactory = PollinationSDK.Client.Configuration.DefaultExceptionFactory; + } + + /// + /// Initializes a new instance of the class + /// + /// + public UsersApi() + { + 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 UsersApi(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; } + } + + /// + /// Check if a username is already taken Check if a username is already taken by a user or an org + /// + /// Thrown when fails to make API call + /// + /// object + public object CheckUsername (string username) + { + ApiResponse localVarResponse = CheckUsernameWithHttpInfo(username); + return localVarResponse.Data; + } + + /// + /// Check if a username is already taken Check if a username is already taken by a user or an org + /// + /// Thrown when fails to make API call + /// + /// ApiResponse of object + public ApiResponse CheckUsernameWithHttpInfo (string username) + { + // verify the required parameter 'username' is set + if (username == null) + throw new ApiException(400, "Missing required parameter 'username' when calling UsersApi->CheckUsername"); + + var localVarPath = "/users/check_username/{username}"; + 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 (username != null) localVarPathParams.Add("username", this.Configuration.ApiClient.ParameterToString(username)); // 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("CheckUsername", 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 a username is already taken Check if a username is already taken by a user or an org + /// + /// Thrown when fails to make API call + /// + /// Cancellation Token to cancel request (optional) + /// Task of object + public async System.Threading.Tasks.Task CheckUsernameAsync (string username, CancellationToken cancellationToken = default(CancellationToken)) + { + ApiResponse localVarResponse = await CheckUsernameWithHttpInfoAsync(username, cancellationToken); + return localVarResponse.Data; + + } + + /// + /// Check if a username is already taken Check if a username is already taken by a user or an org + /// + /// Thrown when fails to make API call + /// + /// Cancellation Token to cancel request (optional) + /// Task of ApiResponse (object) + public async System.Threading.Tasks.Task> CheckUsernameWithHttpInfoAsync (string username, CancellationToken cancellationToken = default(CancellationToken)) + { + // verify the required parameter 'username' is set + if (username == null) + throw new ApiException(400, "Missing required parameter 'username' when calling UsersApi->CheckUsername"); + + var localVarPath = "/users/check_username/{username}"; + 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 (username != null) localVarPathParams.Add("username", this.Configuration.ApiClient.ParameterToString(username)); // 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("CheckUsername", 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 a specific user profile Get a specific user profile by name + /// + /// Thrown when fails to make API call + /// + /// UserPublic + public UserPublic GetOneUser (string name) + { + ApiResponse localVarResponse = GetOneUserWithHttpInfo(name); + return localVarResponse.Data; + } + + /// + /// Get a specific user profile Get a specific user profile by name + /// + /// Thrown when fails to make API call + /// + /// ApiResponse of UserPublic + public ApiResponse GetOneUserWithHttpInfo (string name) + { + // verify the required parameter 'name' is set + if (name == null) + throw new ApiException(400, "Missing required parameter 'name' when calling UsersApi->GetOneUser"); + + var localVarPath = "/users/{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("GetOneUser", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (UserPublic) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(UserPublic))); + } + + /// + /// Get a specific user profile Get a specific user profile by name + /// + /// Thrown when fails to make API call + /// + /// Cancellation Token to cancel request (optional) + /// Task of UserPublic + public async System.Threading.Tasks.Task GetOneUserAsync (string name, CancellationToken cancellationToken = default(CancellationToken)) + { + ApiResponse localVarResponse = await GetOneUserWithHttpInfoAsync(name, cancellationToken); + return localVarResponse.Data; + + } + + /// + /// Get a specific user profile Get a specific user profile by name + /// + /// Thrown when fails to make API call + /// + /// Cancellation Token to cancel request (optional) + /// Task of ApiResponse (UserPublic) + public async System.Threading.Tasks.Task> GetOneUserWithHttpInfoAsync (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 UsersApi->GetOneUser"); + + var localVarPath = "/users/{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("GetOneUser", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (UserPublic) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(UserPublic))); + } + + /// + /// List Users + /// + /// Thrown when fails to make API call + /// Search string to find users (optional) + /// Page number starting from 1 (optional, default to 1) + /// Number of items per page (optional, default to 25) + /// UserPublicList + public UserPublicList ListUsers (string search = default, int? page = default, int? perPage = default) + { + ApiResponse localVarResponse = ListUsersWithHttpInfo(search, page, perPage); + return localVarResponse.Data; + } + + /// + /// List Users + /// + /// Thrown when fails to make API call + /// Search string to find users (optional) + /// Page number starting from 1 (optional, default to 1) + /// Number of items per page (optional, default to 25) + /// ApiResponse of UserPublicList + public ApiResponse ListUsersWithHttpInfo (string search = default, int? page = default, int? perPage = default) + { + + var localVarPath = "/users"; + 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 (search != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "search", search)); // 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 + + + // 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("ListUsers", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (UserPublicList) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(UserPublicList))); + } + + /// + /// List Users + /// + /// Thrown when fails to make API call + /// Search string to find users (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 UserPublicList + public async System.Threading.Tasks.Task ListUsersAsync (string search = default, int? page = default, int? perPage = default, CancellationToken cancellationToken = default(CancellationToken)) + { + ApiResponse localVarResponse = await ListUsersWithHttpInfoAsync(search, page, perPage, cancellationToken); + return localVarResponse.Data; + + } + + /// + /// List Users + /// + /// Thrown when fails to make API call + /// Search string to find users (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 (UserPublicList) + public async System.Threading.Tasks.Task> ListUsersWithHttpInfoAsync (string search = default, int? page = default, int? perPage = default, CancellationToken cancellationToken = default(CancellationToken)) + { + + var localVarPath = "/users"; + 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 (search != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "search", search)); // 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 + + + // 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("ListUsers", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (UserPublicList) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(UserPublicList))); + } + + } +} diff --git a/src/PollinationSDK/Client/ApiClient.cs b/src/PollinationSDK/Client/ApiClient.cs new file mode 100644 index 000000000..6943771ef --- /dev/null +++ b/src/PollinationSDK/Client/ApiClient.cs @@ -0,0 +1,553 @@ +/* + * pollination-server + * + * Pollination Server OpenAPI Definition + * + * Contact: info@pollination.cloud + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Text.RegularExpressions; +using System.IO; +using System.Threading; +using System.Runtime.Serialization; +using System.Web; +using System.Linq; +using System.Net; +using System.Text; +using Newtonsoft.Json; +using RestSharp; + +namespace PollinationSDK.Client +{ + /// + /// API client is mainly responsible for making the HTTP call to the API backend. + /// + public partial class ApiClient + { + private JsonSerializerSettings serializerSettings = new JsonSerializerSettings + { + ConstructorHandling = ConstructorHandling.AllowNonPublicDefaultConstructor, + MissingMemberHandling = MissingMemberHandling.Ignore, + NullValueHandling = NullValueHandling.Ignore, + Converters = new List() { new AnyOfJsonConverter() } + }; + + /// + /// Allows for extending request processing for generated code. + /// + /// The RestSharp request object + partial void InterceptRequest(IRestRequest request); + + /// + /// Allows for extending response processing for generated code. + /// + /// The RestSharp request object + /// The RestSharp response object + partial void InterceptResponse(IRestRequest request, IRestResponse response); + + /// + /// Initializes a new instance of the class + /// with default configuration. + /// + public ApiClient() + { + Configuration = PollinationSDK.Client.Configuration.Default; + RestClient = new RestClient("http://localhost"); + } + + /// + /// Initializes a new instance of the class + /// with default base path (http://localhost). + /// + /// An instance of Configuration. + public ApiClient(Configuration config) + { + Configuration = config ?? PollinationSDK.Client.Configuration.Default; + + RestClient = new RestClient(Configuration.BasePath); + } + + /// + /// Initializes a new instance of the class + /// with default configuration. + /// + /// The base path. + public ApiClient(String basePath = "http://localhost") + { + if (String.IsNullOrEmpty(basePath)) + throw new ArgumentException("basePath cannot be empty"); + + RestClient = new RestClient(basePath); + Configuration = Client.Configuration.Default; + } + + /// + /// Gets or sets the default API client for making HTTP calls. + /// + /// The default API client. + [Obsolete("ApiClient.Default is deprecated, please use 'Configuration.Default.ApiClient' instead.")] + public static ApiClient Default; + + /// + /// Gets or sets an instance of the IReadableConfiguration. + /// + /// An instance of the IReadableConfiguration. + /// + /// helps us to avoid modifying possibly global + /// configuration values from within a given client. It does not guarantee thread-safety + /// of the instance in any way. + /// + public IReadableConfiguration Configuration { get; set; } + + /// + /// Gets or sets the RestClient. + /// + /// An instance of the RestClient + public RestClient RestClient { get; set; } + + // Creates and sets up a RestRequest prior to a call. + private RestRequest PrepareRequest( + String path, RestSharp.Method method, List> queryParams, Object postBody, + Dictionary headerParams, Dictionary formParams, + Dictionary fileParams, Dictionary pathParams, + String contentType) + { + var request = new RestRequest(path, method); + + // add path parameter, if any + foreach(var param in pathParams) + request.AddParameter(param.Key, param.Value, ParameterType.UrlSegment); + + // add header parameter, if any + foreach(var param in headerParams) + request.AddHeader(param.Key, param.Value); + + // add query parameter, if any + foreach(var param in queryParams) + request.AddQueryParameter(param.Key, param.Value); + + // add form parameter, if any + foreach(var param in formParams) + request.AddParameter(param.Key, param.Value); + + // add file parameter, if any + foreach(var param in fileParams) + { + request.AddFile(param.Value.Name, param.Value.Writer, param.Value.FileName, param.Value.ContentLength, param.Value.ContentType); + } + + if (postBody != null) // http body (model or byte[]) parameter + { + request.AddParameter(contentType, postBody, ParameterType.RequestBody); + } + + return request; + } + + /// + /// Makes the HTTP request (Sync). + /// + /// URL path. + /// HTTP method. + /// Query parameters. + /// HTTP body (POST request). + /// Header parameters. + /// Form parameters. + /// File parameters. + /// Path parameters. + /// Content Type of the request + /// Object + public Object CallApi( + String path, RestSharp.Method method, List> queryParams, Object postBody, + Dictionary headerParams, Dictionary formParams, + Dictionary fileParams, Dictionary pathParams, + String contentType) + { + var request = PrepareRequest( + path, method, queryParams, postBody, headerParams, formParams, fileParams, + pathParams, contentType); + // set timeout + + RestClient.Timeout = Configuration.Timeout; + // set user agent + RestClient.UserAgent = Configuration.UserAgent; + + InterceptRequest(request); + var response = RestClient.Execute(request); + InterceptResponse(request, response); + + return (Object) response; + } + /// + /// Makes the asynchronous HTTP request. + /// + /// URL path. + /// HTTP method. + /// Query parameters. + /// HTTP body (POST request). + /// Header parameters. + /// Form parameters. + /// File parameters. + /// Path parameters. + /// Content type. + /// Cancellation Token. + /// The Task instance. + public async System.Threading.Tasks.Task CallApiAsync( + String path, RestSharp.Method method, List> queryParams, Object postBody, + Dictionary headerParams, Dictionary formParams, + Dictionary fileParams, Dictionary pathParams, + String contentType, CancellationToken cancellationToken) + { + var request = PrepareRequest( + path, method, queryParams, postBody, headerParams, formParams, fileParams, + pathParams, contentType); + RestClient.UserAgent = Configuration.UserAgent; + InterceptRequest(request); + var response = await RestClient.ExecuteTaskAsync(request, cancellationToken); + InterceptResponse(request, response); + return (Object)response; + } + + /// + /// Escape string (url-encoded). + /// + /// String to be escaped. + /// Escaped string. + public string EscapeString(string str) + { + return UrlEncode(str); + } + + /// + /// Create FileParameter based on Stream. + /// + /// Parameter name. + /// Input stream. + /// FileParameter. + public FileParameter ParameterToFile(string name, Stream stream) + { + if (stream is FileStream) + return FileParameter.Create(name, ReadAsBytes(stream), Path.GetFileName(((FileStream)stream).Name)); + else + return FileParameter.Create(name, ReadAsBytes(stream), "no_file_name_provided"); + } + + /// + /// If parameter is DateTime, output in a formatted string (default ISO 8601), customizable with Configuration.DateTime. + /// If parameter is a list, join the list with ",". + /// Otherwise just return the string. + /// + /// The parameter (header, path, query, form). + /// Formatted string. + public string ParameterToString(object obj) + { + if (obj is DateTime) + // Return a formatted date string - Can be customized with Configuration.DateTimeFormat + // Defaults to an ISO 8601, using the known as a Round-trip date/time pattern ("o") + // https://msdn.microsoft.com/en-us/library/az4se3k1(v=vs.110).aspx#Anchor_8 + // For example: 2009-06-15T13:45:30.0000000 + return ((DateTime)obj).ToString (Configuration.DateTimeFormat); + else if (obj is DateTimeOffset) + // Return a formatted date string - Can be customized with Configuration.DateTimeFormat + // Defaults to an ISO 8601, using the known as a Round-trip date/time pattern ("o") + // https://msdn.microsoft.com/en-us/library/az4se3k1(v=vs.110).aspx#Anchor_8 + // For example: 2009-06-15T13:45:30.0000000 + return ((DateTimeOffset)obj).ToString (Configuration.DateTimeFormat); + else if (obj is bool) + return (bool)obj ? "true" : "false"; + else if (obj is IList) + { + var flattenedString = new StringBuilder(); + foreach (var param in (IList)obj) + { + if (flattenedString.Length > 0) + flattenedString.Append(","); + flattenedString.Append(param); + } + return flattenedString.ToString(); + } + else if (obj is Enum) + { + return GetEnumMemberAttrValue(obj.GetType(), obj); + } + else + return Convert.ToString (obj); + } + + public string GetEnumMemberAttrValue(Type enumType, object enumVal) + { + var memInfo = enumType.GetMember(enumVal.ToString()); + var attr = memInfo[0].GetCustomAttributes(false).OfType().FirstOrDefault(); + if (attr != null) + { + return attr.Value; + } + return null; + } + + /// + /// Deserialize the JSON string into a proper object. + /// + /// The HTTP response. + /// Object type. + /// Object representation of the JSON string. + public object Deserialize(IRestResponse response, Type type) + { + IList headers = response.Headers; + if (type == typeof(byte[])) // return byte array + { + return response.RawBytes; + } + + // TODO: ? if (type.IsAssignableFrom(typeof(Stream))) + if (type == typeof(Stream)) + { + if (headers != null) + { + var filePath = String.IsNullOrEmpty(Configuration.TempFolderPath) + ? Path.GetTempPath() + : Configuration.TempFolderPath; + var regex = new Regex(@"Content-Disposition=.*filename=['""]?([^'""\s]+)['""]?$"); + foreach (var header in headers) + { + var match = regex.Match(header.ToString()); + if (match.Success) + { + string fileName = filePath + SanitizeFilename(match.Groups[1].Value.Replace("\"", "").Replace("'", "")); + File.WriteAllBytes(fileName, response.RawBytes); + return new FileStream(fileName, FileMode.Open); + } + } + } + var stream = new MemoryStream(response.RawBytes); + return stream; + } + + if (type.Name.StartsWith("System.Nullable`1[[System.DateTime")) // return a datetime object + { + return DateTime.Parse(response.Content, null, System.Globalization.DateTimeStyles.RoundtripKind); + } + + if (type == typeof(String) || type.Name.StartsWith("System.Nullable")) // return primitive type + { + return ConvertType(response.Content, type); + } + + // at this point, it must be a model (json) + try + { + return JsonConvert.DeserializeObject(response.Content, type, serializerSettings); + } + catch (Exception e) + { + throw new ApiException(500, e.Message); + } + } + + /// + /// Serialize an input (model) into JSON string + /// + /// Object. + /// JSON string. + public String Serialize(object obj) + { + try + { + return obj != null ? JsonConvert.SerializeObject(obj, serializerSettings) : null; + } + catch (Exception e) + { + throw new ApiException(500, e.Message); + } + } + + /// + ///Check if the given MIME is a JSON MIME. + ///JSON MIME examples: + /// application/json + /// application/json; charset=UTF8 + /// APPLICATION/JSON + /// application/vnd.company+json + /// + /// MIME + /// Returns True if MIME type is json. + public bool IsJsonMime(String mime) + { + var jsonRegex = new Regex("(?i)^(application/json|[^;/ \t]+/[^;/ \t]+[+]json)[ \t]*(;.*)?$"); + return mime != null && (jsonRegex.IsMatch(mime) || mime.Equals("application/json-patch+json")); + } + + /// + /// Select the Content-Type header's value from the given content-type array: + /// if JSON type exists in the given array, use it; + /// otherwise use the first one defined in 'consumes' + /// + /// The Content-Type array to select from. + /// The Content-Type header to use. + public String SelectHeaderContentType(String[] contentTypes) + { + if (contentTypes.Length == 0) + return "application/json"; + + foreach (var contentType in contentTypes) + { + if (IsJsonMime(contentType.ToLower())) + return contentType; + } + + return contentTypes[0]; // use the first content type specified in 'consumes' + } + + /// + /// Select the Accept header's value from the given accepts array: + /// if JSON exists in the given array, use it; + /// otherwise use all of them (joining into a string) + /// + /// The accepts array to select from. + /// The Accept header to use. + public String SelectHeaderAccept(String[] accepts) + { + if (accepts.Length == 0) + return null; + + if (accepts.Contains("application/json", StringComparer.OrdinalIgnoreCase)) + return "application/json"; + + return String.Join(",", accepts); + } + + /// + /// Encode string in base64 format. + /// + /// String to be encoded. + /// Encoded string. + public static string Base64Encode(string text) + { + return System.Convert.ToBase64String(System.Text.Encoding.UTF8.GetBytes(text)); + } + + /// + /// Dynamically cast the object into target type. + /// + /// Object to be casted + /// Target type + /// Casted object + public static dynamic ConvertType(dynamic fromObject, Type toObject) + { + return Convert.ChangeType(fromObject, toObject); + } + + /// + /// Convert stream to byte array + /// + /// Input stream to be converted + /// Byte array + public static byte[] ReadAsBytes(Stream inputStream) + { + byte[] buf = new byte[16*1024]; + using (MemoryStream ms = new MemoryStream()) + { + int count; + while ((count = inputStream.Read(buf, 0, buf.Length)) > 0) + { + ms.Write(buf, 0, count); + } + return ms.ToArray(); + } + } + + /// + /// URL encode a string + /// Credit/Ref: https://github.com/restsharp/RestSharp/blob/master/RestSharp/Extensions/StringExtensions.cs#L50 + /// + /// String to be URL encoded + /// Byte array + public static string UrlEncode(string input) + { + const int maxLength = 32766; + + if (input == null) + { + throw new ArgumentNullException("input"); + } + + if (input.Length <= maxLength) + { + return Uri.EscapeDataString(input); + } + + StringBuilder sb = new StringBuilder(input.Length * 2); + int index = 0; + + while (index < input.Length) + { + int length = Math.Min(input.Length - index, maxLength); + string subString = input.Substring(index, length); + + sb.Append(Uri.EscapeDataString(subString)); + index += subString.Length; + } + + return sb.ToString(); + } + + /// + /// Sanitize filename by removing the path + /// + /// Filename + /// Filename + public static string SanitizeFilename(string filename) + { + Match match = Regex.Match(filename, @".*[/\\](.*)$"); + + if (match.Success) + { + return match.Groups[1].Value; + } + else + { + return filename; + } + } + + /// + /// Convert params to key/value pairs. + /// Use collectionFormat to properly format lists and collections. + /// + /// Collection format. + /// Key name. + /// Value object. + /// A list of KeyValuePairs + public IEnumerable> ParameterToKeyValuePairs(string collectionFormat, string name, object value) + { + var parameters = new List>(); + + if (IsCollection(value) && collectionFormat == "multi") + { + var valueCollection = value as IEnumerable; + parameters.AddRange(from object item in valueCollection select new KeyValuePair(name, ParameterToString(item))); + } + else + { + parameters.Add(new KeyValuePair(name, ParameterToString(value))); + } + + return parameters; + } + + /// + /// Check if generic object is a collection. + /// + /// + /// True if object is a collection type + private static bool IsCollection(object value) + { + return value is IList || value is ICollection; + } + } +} diff --git a/src/PollinationSDK/Client/ApiException.cs b/src/PollinationSDK/Client/ApiException.cs new file mode 100644 index 000000000..a770b4940 --- /dev/null +++ b/src/PollinationSDK/Client/ApiException.cs @@ -0,0 +1,59 @@ +/* + * pollination-server + * + * Pollination Server OpenAPI Definition + * + * Contact: info@pollination.cloud + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +using System; + +namespace PollinationSDK.Client +{ + /// + /// API Exception + /// + public class ApiException : Exception + { + /// + /// Gets or sets the error code (HTTP status code) + /// + /// The error code (HTTP status code). + public int ErrorCode { get; set; } + + /// + /// Gets or sets the error content (body json object) + /// + /// The error content (Http response body). + public dynamic ErrorContent { get; private set; } + + /// + /// Initializes a new instance of the class. + /// + public ApiException() {} + + /// + /// Initializes a new instance of the class. + /// + /// HTTP status code. + /// Error message. + public ApiException(int errorCode, string message) : base(message) + { + this.ErrorCode = errorCode; + } + + /// + /// Initializes a new instance of the class. + /// + /// HTTP status code. + /// Error message. + /// Error content. + public ApiException(int errorCode, string message, dynamic errorContent = null) : base(message) + { + this.ErrorCode = errorCode; + this.ErrorContent = errorContent; + } + } + +} diff --git a/src/PollinationSDK/Client/ApiResponse.cs b/src/PollinationSDK/Client/ApiResponse.cs new file mode 100644 index 000000000..b54fc0500 --- /dev/null +++ b/src/PollinationSDK/Client/ApiResponse.cs @@ -0,0 +1,53 @@ +/* + * 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; + +namespace PollinationSDK.Client +{ + /// + /// API Response + /// + public class ApiResponse + { + /// + /// Gets or sets the status code (HTTP status code) + /// + /// The status code. + public int StatusCode { get; private set; } + + /// + /// Gets or sets the HTTP headers + /// + /// HTTP headers + public IDictionary Headers { get; private set; } + + /// + /// Gets or sets the data (parsed HTTP body) + /// + /// The data. + public T Data { get; private set; } + + /// + /// Initializes a new instance of the class. + /// + /// HTTP status code. + /// HTTP headers. + /// Data (parsed HTTP body) + public ApiResponse(int statusCode, IDictionary headers, T data) + { + this.StatusCode= statusCode; + this.Headers = headers; + this.Data = data; + } + + } + +} diff --git a/src/PollinationSDK/Client/Configuration.cs b/src/PollinationSDK/Client/Configuration.cs new file mode 100644 index 000000000..49184864a --- /dev/null +++ b/src/PollinationSDK/Client/Configuration.cs @@ -0,0 +1,538 @@ +/* + * pollination-server + * + * Pollination Server OpenAPI Definition + * + * Contact: info@pollination.cloud + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +using System; +using System.Reflection; +using System.Collections.Concurrent; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using RestSharp; + +namespace PollinationSDK.Client +{ + /// + /// TokenRepo is responsible for holding and acquiring auth tokens + /// + public class TokenRepo + { + public string RefreshURL; + private string IDToken; + public DateTime ExpiresAt; + public string RefreshToken; + + public TokenRepo(string refreshURL, string idToken, int expiresInSeconds, string refreshToken) + { + RefreshURL = refreshURL; + IDToken = idToken; + ExpiresAt = DateTime.Now.AddSeconds(expiresInSeconds); + RefreshToken = refreshToken; + this.LogTokenExpiration(); + } + + private void LogTokenExpiration() + { + Helper.Logger.Information($"Token expires at: {ExpiresAt}"); + } + + private void DoTokenRefresh() + { + var client = new RestClient(this.RefreshURL); + + var req = new RestRequest().AddJsonBody( + new Dictionary + { + {"token", this.RefreshToken} + } + ); + + var res = client.Post>(req); + + string detail = null; + + res.Data.TryGetValue("detail", out detail); + res.Data.TryGetValue("message", out detail); + + if (detail != null) + { + throw new Exception(detail); + } + + this.IDToken = res.Data["id_token"]; + this.ExpiresAt = DateTime.Now.AddSeconds(int.Parse(res.Data["expires_in"])); + this.RefreshToken = res.Data["refresh_token"]; + } + + private void DoTokenRefreshLogged() + { + Helper.Logger.Information("Refreshing token"); + this.DoTokenRefresh(); + Helper.Logger.Information("Token refresh finished"); + this.LogTokenExpiration(); + } + public string GetToken() + { + if (DateTime.Now >= this.ExpiresAt) + { + this.DoTokenRefreshLogged(); + } + + return this.IDToken; + } + } + + /// + /// Represents a set of configuration settings + /// + public class Configuration : IReadableConfiguration + { + #region Constants + + /// + /// Version of the package. + /// + /// Version of the package. + public const string Version = "0.23.0"; + + /// + /// Identifier for ISO 8601 DateTime Format + /// + /// See https://msdn.microsoft.com/en-us/library/az4se3k1(v=vs.110).aspx#Anchor_8 for more information. + // ReSharper disable once InconsistentNaming + public const string ISO8601_DATETIME_FORMAT = "o"; + + #endregion Constants + + #region Static Members + + private static readonly object GlobalConfigSync = new { }; + private static Configuration _globalConfiguration; + + /// + /// Default creation of exceptions for a given method name and response object + /// + public static readonly ExceptionFactory DefaultExceptionFactory = (methodName, response) => + { + var status = (int)response.StatusCode; + if (status >= 400) + { + return new ApiException(status, + string.Format("Error calling {0}: {1}", methodName, response.Content), + response.Content); + } + if (status == 0) + { + return new ApiException(status, + string.Format("Error calling {0}: {1}", methodName, response.ErrorMessage), response.ErrorMessage); + } + return null; + }; + + /// + /// Gets or sets the default Configuration. + /// + /// Configuration. + public static Configuration Default + { + get { return _globalConfiguration; } + set + { + lock (GlobalConfigSync) + { + _globalConfiguration = value; + } + } + } + + #endregion Static Members + + #region Private Members + + /// + /// Gets or sets the API key based on the authentication name. + /// + /// The API key. + private IDictionary _apiKey = null; + + /// + /// Gets or sets the prefix (e.g. Token) of the API key based on the authentication name. + /// + /// The prefix of the API key. + private IDictionary _apiKeyPrefix = null; + + private string _dateTimeFormat = ISO8601_DATETIME_FORMAT; + private string _tempFolderPath = Path.GetTempPath(); + + #endregion Private Members + + #region Public Members + + public TokenRepo TokenRepo; + + #endregion + + #region Constructors + + static Configuration() + { + _globalConfiguration = new GlobalConfiguration(); + } + + /// + /// Initializes a new instance of the class + /// + public Configuration() + { + UserAgent = "OpenAPI-Generator/0.23.0/csharp"; + BasePath = "http://localhost"; + DefaultHeader = new ConcurrentDictionary(); + ApiKey = new ConcurrentDictionary(); + ApiKeyPrefix = new ConcurrentDictionary(); + + // Setting Timeout has side effects (forces ApiClient creation). + Timeout = Env.HTTPTimeout; + } + + /// + /// Initializes a new instance of the class + /// + public Configuration( + IDictionary defaultHeader, + IDictionary apiKey, + IDictionary apiKeyPrefix, + string basePath = "http://localhost") : this() + { + if (string.IsNullOrWhiteSpace(basePath)) + throw new ArgumentException("The provided basePath is invalid.", "basePath"); + if (defaultHeader == null) + throw new ArgumentNullException("defaultHeader"); + if (apiKey == null) + throw new ArgumentNullException("apiKey"); + if (apiKeyPrefix == null) + throw new ArgumentNullException("apiKeyPrefix"); + + BasePath = basePath; + + foreach (var keyValuePair in defaultHeader) + { + DefaultHeader.Add(keyValuePair); + } + + foreach (var keyValuePair in apiKey) + { + ApiKey.Add(keyValuePair); + } + + foreach (var keyValuePair in apiKeyPrefix) + { + ApiKeyPrefix.Add(keyValuePair); + } + } + + /// + /// Initializes a new instance of the class with different settings + /// + /// Api client + /// Dictionary of default HTTP header + /// Username + /// Password + /// accessToken + /// Dictionary of API key + /// Dictionary of API key prefix + /// Temp folder path + /// DateTime format string + /// HTTP connection timeout (in milliseconds) + /// HTTP user agent + [Obsolete("Use explicit object construction and setting of properties.", true)] + public Configuration( + // ReSharper disable UnusedParameter.Local + ApiClient apiClient = null, + IDictionary defaultHeader = null, + string username = null, + string password = null, + string accessToken = null, + IDictionary apiKey = null, + IDictionary apiKeyPrefix = null, + string tempFolderPath = null, + string dateTimeFormat = null, + int timeout = 100000, + string userAgent = "OpenAPI-Generator/0.23.0/csharp" + // ReSharper restore UnusedParameter.Local + ) + { + + } + + /// + /// Initializes a new instance of the Configuration class. + /// + /// Api client. + [Obsolete("This constructor caused unexpected sharing of static data. It is no longer supported.", true)] + // ReSharper disable once UnusedParameter.Local + public Configuration(ApiClient apiClient) + { + + } + + #endregion Constructors + + + #region Properties + + private ApiClient _apiClient = null; + /// + /// Gets an instance of an ApiClient for this configuration + /// + public virtual ApiClient ApiClient + { + get + { + if (_apiClient == null) _apiClient = CreateApiClient(); + return _apiClient; + } + } + + private String _basePath = null; + /// + /// Gets or sets the base path for API access. + /// + public virtual string BasePath { + get { return _basePath; } + set { + _basePath = value; + // pass-through to ApiClient if it's set. + if(_apiClient != null) { + _apiClient.RestClient.BaseUrl = new Uri(_basePath); + } + } + } + + /// + /// Gets or sets the default header. + /// + public virtual IDictionary DefaultHeader { get; set; } + + /// + /// Gets or sets the HTTP timeout (milliseconds) of ApiClient. Default to 100000 milliseconds. + /// + public virtual int Timeout + { + + get { return ApiClient.RestClient.Timeout; } + set { ApiClient.RestClient.Timeout = value; } + } + + /// + /// Gets or sets the HTTP user agent. + /// + /// Http user agent. + public virtual string UserAgent { get; set; } + + /// + /// Gets or sets the username (HTTP basic authentication). + /// + /// The username. + public virtual string Username { get; set; } + + /// + /// Gets or sets the password (HTTP basic authentication). + /// + /// The password. + public virtual string Password { get; set; } + + /// + /// Gets the API key with prefix. + /// + /// API key identifier (authentication scheme). + /// API key with prefix. + public string GetApiKeyWithPrefix(string apiKeyIdentifier) + { + var apiKeyValue = ""; + ApiKey.TryGetValue (apiKeyIdentifier, out apiKeyValue); + var apiKeyPrefix = ""; + if (ApiKeyPrefix.TryGetValue (apiKeyIdentifier, out apiKeyPrefix)) + return apiKeyPrefix + " " + apiKeyValue; + else + return apiKeyValue; + } + + /// + /// Gets or sets the access token for OAuth2 authentication. + /// + /// The access token. + public virtual string AccessToken + { + get + { + if (TokenRepo != null) + { + return TokenRepo.GetToken(); + } + return ""; + } + } + + /// + /// Gets or sets the temporary folder path to store the files downloaded from the server. + /// + /// Folder path. + public virtual string TempFolderPath + { + get { return _tempFolderPath; } + + set + { + if (string.IsNullOrEmpty(value)) + { + _tempFolderPath = Path.GetTempPath(); + return; + } + + // create the directory if it does not exist + if (!Directory.Exists(value)) + { + Directory.CreateDirectory(value); + } + + // check if the path contains directory separator at the end + if (value[value.Length - 1] == Path.DirectorySeparatorChar) + { + _tempFolderPath = value; + } + else + { + _tempFolderPath = value + Path.DirectorySeparatorChar; + } + } + } + + /// + /// Gets or sets the date time format used when serializing in the ApiClient + /// By default, it's set to ISO 8601 - "o", for others see: + /// https://msdn.microsoft.com/en-us/library/az4se3k1(v=vs.110).aspx + /// and https://msdn.microsoft.com/en-us/library/8kb3ddd4(v=vs.110).aspx + /// No validation is done to ensure that the string you're providing is valid + /// + /// The DateTimeFormat string + public virtual string DateTimeFormat + { + get { return _dateTimeFormat; } + set + { + if (string.IsNullOrEmpty(value)) + { + // Never allow a blank or null string, go back to the default + _dateTimeFormat = ISO8601_DATETIME_FORMAT; + return; + } + + // Caution, no validation when you choose date time format other than ISO 8601 + // Take a look at the above links + _dateTimeFormat = value; + } + } + + /// + /// Gets or sets the prefix (e.g. Token) of the API key based on the authentication name. + /// + /// The prefix of the API key. + public virtual IDictionary ApiKeyPrefix + { + get { return _apiKeyPrefix; } + set + { + if (value == null) + { + throw new InvalidOperationException("ApiKeyPrefix collection may not be null."); + } + _apiKeyPrefix = value; + } + } + + /// + /// Gets or sets the API key based on the authentication name. + /// + /// The API key. + public virtual IDictionary ApiKey + { + get { return _apiKey; } + set + { + if (value == null) + { + throw new InvalidOperationException("ApiKey collection may not be null."); + } + _apiKey = value; + } + } + + #endregion Properties + + #region Methods + + /// + /// Add default header. + /// + /// Header field name. + /// Header field value. + /// + public void AddDefaultHeader(string key, string value) + { + DefaultHeader[key] = value; + } + + /// + /// Creates a new based on this instance. + /// + /// + public ApiClient CreateApiClient() + { + return new ApiClient(BasePath) { Configuration = this }; + } + + + /// + /// Returns a string with essential information for debugging. + /// + 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.23.0\n"; + report += " SDK Package Version: 0.23.0\n"; + + return report; + } + + /// + /// Add Api Key Header. + /// + /// Api Key name. + /// Api Key value. + /// + public void AddApiKey(string key, string value) + { + ApiKey[key] = value; + } + + /// + /// Sets the API key prefix. + /// + /// Api Key name. + /// Api Key value. + public void AddApiKeyPrefix(string key, string value) + { + ApiKeyPrefix[key] = value; + } + + #endregion Methods + } +} diff --git a/src/PollinationSDK/Client/ExceptionFactory.cs b/src/PollinationSDK/Client/ExceptionFactory.cs new file mode 100644 index 000000000..d16363491 --- /dev/null +++ b/src/PollinationSDK/Client/ExceptionFactory.cs @@ -0,0 +1,23 @@ +/* + * pollination-server + * + * Pollination Server OpenAPI Definition + * + * Contact: info@pollination.cloud + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using RestSharp; + +namespace PollinationSDK.Client +{ + /// + /// A delegate to ExceptionFactory method + /// + /// Method name + /// Response + /// Exceptions + public delegate Exception ExceptionFactory(string methodName, IRestResponse response); +} diff --git a/src/PollinationSDK/Client/GlobalConfiguration.cs b/src/PollinationSDK/Client/GlobalConfiguration.cs new file mode 100644 index 000000000..e9158f333 --- /dev/null +++ b/src/PollinationSDK/Client/GlobalConfiguration.cs @@ -0,0 +1,33 @@ +/* + * pollination-server + * + * Pollination Server OpenAPI Definition + * + * Contact: info@pollination.cloud + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Reflection; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading; + +namespace PollinationSDK.Client +{ + /// + /// provides a compile-time extension point for globally configuring + /// API Clients. + /// + /// + /// A customized implementation via partial class may reside in another file and may + /// be excluded from automatic generation via a .openapi-generator-ignore file. + /// + public partial class GlobalConfiguration : Configuration + { + + } +} \ No newline at end of file diff --git a/src/PollinationSDK/Client/IApiAccessor.cs b/src/PollinationSDK/Client/IApiAccessor.cs new file mode 100644 index 000000000..0a47e256f --- /dev/null +++ b/src/PollinationSDK/Client/IApiAccessor.cs @@ -0,0 +1,41 @@ +/* + * 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 RestSharp; + +namespace PollinationSDK.Client +{ + /// + /// Represents configuration aspects required to interact with the API endpoints. + /// + public interface IApiAccessor + { + /// + /// Gets or sets the configuration object + /// + /// An instance of the Configuration + Configuration Configuration {get; set;} + + /// + /// Gets the base path of the API client. + /// + /// The base path + String GetBasePath(); + + /// + /// Provides a factory method hook for the creation of exceptions. + /// + ExceptionFactory ExceptionFactory { get; set; } + } +} diff --git a/src/PollinationSDK/Client/IReadableConfiguration.cs b/src/PollinationSDK/Client/IReadableConfiguration.cs new file mode 100644 index 000000000..5405b9ffe --- /dev/null +++ b/src/PollinationSDK/Client/IReadableConfiguration.cs @@ -0,0 +1,93 @@ +/* + * pollination-server + * + * Pollination Server OpenAPI Definition + * + * Contact: info@pollination.cloud + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System.Collections.Generic; + +namespace PollinationSDK.Client +{ + /// + /// Represents a readable-only configuration contract. + /// + public interface IReadableConfiguration + { + /// + /// Gets the access token. + /// + /// Access token. + string AccessToken { get; } + + /// + /// Gets the API key. + /// + /// API key. + IDictionary ApiKey { get; } + + /// + /// Gets the API key prefix. + /// + /// API key prefix. + IDictionary ApiKeyPrefix { get; } + + /// + /// Gets the base path. + /// + /// Base path. + string BasePath { get; } + + /// + /// Gets the date time format. + /// + /// Date time foramt. + string DateTimeFormat { get; } + + /// + /// Gets the default header. + /// + /// Default header. + IDictionary DefaultHeader { get; } + + /// + /// Gets the temp folder path. + /// + /// Temp folder path. + string TempFolderPath { get; } + + /// + /// Gets the HTTP connection timeout (in milliseconds) + /// + /// HTTP connection timeout. + int Timeout { get; } + + /// + /// Gets the user agent. + /// + /// User agent. + string UserAgent { get; } + + /// + /// Gets the username. + /// + /// Username. + string Username { get; } + + /// + /// Gets the password. + /// + /// Password. + string Password { get; } + + /// + /// Gets the API key with prefix. + /// + /// API key identifier (authentication scheme). + /// API key with prefix. + string GetApiKeyWithPrefix(string apiKeyIdentifier); + } +} diff --git a/src/PollinationSDK/Client/OpenAPIDateConverter.cs b/src/PollinationSDK/Client/OpenAPIDateConverter.cs new file mode 100644 index 000000000..64c38bba0 --- /dev/null +++ b/src/PollinationSDK/Client/OpenAPIDateConverter.cs @@ -0,0 +1,29 @@ +/* + * pollination-server + * + * Pollination Server OpenAPI Definition + * + * Contact: info@pollination.cloud + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +using Newtonsoft.Json.Converters; + +namespace PollinationSDK.Client +{ + /// + /// Formatter for 'date' openapi formats ss defined by full-date - RFC3339 + /// see https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.0.md#data-types + /// + public class OpenAPIDateConverter : IsoDateTimeConverter + { + /// + /// Initializes a new instance of the class. + /// + public OpenAPIDateConverter() + { + // full-date = date-fullyear "-" date-month "-" date-mday + DateTimeFormat = "yyyy-MM-dd"; + } + } +} diff --git a/src/PollinationSDK/Interface/Domains/Licenses/Entities.cs b/src/PollinationSDK/Interface/Domains/Licenses/Entities.cs index 0fdb8b761..4f824c57a 100644 --- a/src/PollinationSDK/Interface/Domains/Licenses/Entities.cs +++ b/src/PollinationSDK/Interface/Domains/Licenses/Entities.cs @@ -8,6 +8,7 @@ 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 index 4efc1bfe6..3b6c0ce68 100644 --- a/src/PollinationSDK/Interface/Domains/Payments/Entities.cs +++ b/src/PollinationSDK/Interface/Domains/Payments/Entities.cs @@ -10,9 +10,11 @@ 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 {} @@ -24,5 +26,7 @@ public partial class PriceRecurrence: PollinationSDK.Interface.Domains.Payments. 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/Server/Rest/Licenses/Dto.cs b/src/PollinationSDK/Interface/Server/Rest/Licenses/Dto.cs index 777ec9847..ff144e289 100644 --- a/src/PollinationSDK/Interface/Server/Rest/Licenses/Dto.cs +++ b/src/PollinationSDK/Interface/Server/Rest/Licenses/Dto.cs @@ -8,7 +8,6 @@ public partial interface IDto {} //Classes implemented this interface: namespace PollinationSDK { - public partial class Activation: PollinationSDK.Interface.Server.Rest.Licenses.IDto {} 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 {} diff --git a/src/PollinationSDK/Interface/Server/Rest/Payments/Dto.cs b/src/PollinationSDK/Interface/Server/Rest/Payments/Dto.cs index 310ac0c28..f9a0be95f 100644 --- a/src/PollinationSDK/Interface/Server/Rest/Payments/Dto.cs +++ b/src/PollinationSDK/Interface/Server/Rest/Payments/Dto.cs @@ -9,7 +9,6 @@ public partial interface IDto {} namespace PollinationSDK { public partial class CardPublic: PollinationSDK.Interface.Server.Rest.Payments.IDto {} - public partial class Inventory: 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 {} @@ -18,10 +17,7 @@ public partial class PaymentMethodList: PollinationSDK.Interface.Server.Rest.Pay 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 Subscription: PollinationSDK.Interface.Server.Rest.Payments.IDto {} public partial class SubscriptionCreate: PollinationSDK.Interface.Server.Rest.Payments.IDto {} - public partial class SubscriptionItemPublic: PollinationSDK.Interface.Server.Rest.Payments.IDto {} - public partial class SubscriptionItemPublicList: 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/Model/APIToken.cs b/src/PollinationSDK/Model/APIToken.cs new file mode 100644 index 000000000..05801f55d --- /dev/null +++ b/src/PollinationSDK/Model/APIToken.cs @@ -0,0 +1,251 @@ +/* + * 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 +{ + /// + /// APIToken + /// + [DataContract(Name = "APIToken")] + public partial class APIToken : OpenAPIGenBaseModel, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected APIToken() + { + // Set non-required readonly properties with defaultValue + this.Type = "APIToken"; + } + + /// + /// Initializes a new instance of the class. + /// + /// The unique ID of this API token (required). + /// The user friendly name of the API token (required). + /// Key value pairs of auth claims the API token is entitled to. + public APIToken + ( + string tokenId, string name, // Required parameters + Dictionary claims= default // Optional parameters + ) : base()// BaseClass + { + // to ensure "tokenId" is required (not null) + this.TokenId = tokenId ?? throw new ArgumentNullException("tokenId is a required property for APIToken and cannot be null"); + // to ensure "name" is required (not null) + this.Name = name ?? throw new ArgumentNullException("name is a required property for APIToken and cannot be null"); + this.Claims = claims; + + // Set non-required readonly properties with defaultValue + this.Type = "APIToken"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "APIToken"; + + /// + /// The unique ID of this API token + /// + /// The unique ID of this API token + [DataMember(Name = "token_id", IsRequired = true, EmitDefaultValue = false)] + public string TokenId { get; set; } + /// + /// The user friendly name of the API token + /// + /// The user friendly name of the API token + [DataMember(Name = "name", IsRequired = true, EmitDefaultValue = false)] + public string Name { get; set; } + /// + /// Key value pairs of auth claims the API token is entitled to + /// + /// Key value pairs of auth claims the API token is entitled to + [DataMember(Name = "claims", EmitDefaultValue = false)] + public Dictionary Claims { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + return "APIToken"; + } + + /// + /// 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("APIToken:\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" TokenId: ").Append(TokenId).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Claims: ").Append(Claims).Append("\n"); + return sb.ToString(); + } + + /// + /// Returns the object from JSON string + /// + /// APIToken object + public static APIToken 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. + /// + /// APIToken object + public virtual APIToken DuplicateAPIToken() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateAPIToken(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel DuplicateOpenAPIGenBaseModel() + { + return DuplicateAPIToken(); + } + + /// + /// 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 APIToken); + } + + /// + /// Returns true if APIToken instances are equal + /// + /// Instance of APIToken to be compared + /// Boolean + public bool Equals(APIToken input) + { + if (input == null) + return false; + return base.Equals(input) && + ( + this.TokenId == input.TokenId || + (this.TokenId != null && + this.TokenId.Equals(input.TokenId)) + ) && base.Equals(input) && + ( + this.Name == input.Name || + (this.Name != null && + this.Name.Equals(input.Name)) + ) && base.Equals(input) && + ( + this.Claims == input.Claims || + this.Claims != null && + input.Claims != null && + this.Claims.SequenceEqual(input.Claims) + ) && 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.TokenId != null) + hashCode = hashCode * 59 + this.TokenId.GetHashCode(); + if (this.Name != null) + hashCode = hashCode * 59 + this.Name.GetHashCode(); + if (this.Claims != null) + hashCode = hashCode * 59 + this.Claims.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(@"^APIToken$", 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/APITokenCreate.cs b/src/PollinationSDK/Model/APITokenCreate.cs new file mode 100644 index 000000000..ac14d3778 --- /dev/null +++ b/src/PollinationSDK/Model/APITokenCreate.cs @@ -0,0 +1,206 @@ +/* + * 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 +{ + /// + /// APITokenCreate + /// + [DataContract(Name = "APITokenCreate")] + public partial class APITokenCreate : APIToken, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected APITokenCreate() + { + // Set non-required readonly properties with defaultValue + this.Type = "APITokenCreate"; + } + + /// + /// Initializes a new instance of the class. + /// + /// The unique ID of this API token (required). + /// The user friendly name of the API token (required). + /// Key value pairs of auth claims the API token is entitled to. + public APITokenCreate + ( + string tokenId, string name, // Required parameters + Dictionary claims= default // Optional parameters + ) : base(tokenId: tokenId, name: name, claims: claims)// BaseClass + { + + // Set non-required readonly properties with defaultValue + this.Type = "APITokenCreate"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "APITokenCreate"; + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + return "APITokenCreate"; + } + + /// + /// 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("APITokenCreate:\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" TokenId: ").Append(TokenId).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Claims: ").Append(Claims).Append("\n"); + return sb.ToString(); + } + + /// + /// Returns the object from JSON string + /// + /// APITokenCreate object + public static APITokenCreate 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. + /// + /// APITokenCreate object + public virtual APITokenCreate DuplicateAPITokenCreate() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateAPITokenCreate(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override APIToken DuplicateAPIToken() + { + return DuplicateAPITokenCreate(); + } + + /// + /// 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 APITokenCreate); + } + + /// + /// Returns true if APITokenCreate instances are equal + /// + /// Instance of APITokenCreate to be compared + /// Boolean + public bool Equals(APITokenCreate 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(@"^APITokenCreate$", 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/APITokenList.cs b/src/PollinationSDK/Model/APITokenList.cs new file mode 100644 index 000000000..6018120c8 --- /dev/null +++ b/src/PollinationSDK/Model/APITokenList.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 = "APITokenList")] + public partial class APITokenList : OpenAPIGenBaseModel, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected APITokenList() + { + // Set non-required readonly properties with defaultValue + this.Type = "APITokenList"; + } + + /// + /// 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 APITokenList + ( + 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 APITokenList and cannot be null"); + this.NextPage = nextPage; + + // Set non-required readonly properties with defaultValue + this.Type = "APITokenList"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "APITokenList"; + + /// + /// 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 "APITokenList"; + } + + /// + /// 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("APITokenList:\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 + /// + /// APITokenList object + public static APITokenList 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. + /// + /// APITokenList object + public virtual APITokenList DuplicateAPITokenList() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateAPITokenList(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel DuplicateOpenAPIGenBaseModel() + { + return DuplicateAPITokenList(); + } + + /// + /// 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 APITokenList); + } + + /// + /// Returns true if APITokenList instances are equal + /// + /// Instance of APITokenList to be compared + /// Boolean + public bool Equals(APITokenList 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(@"^APITokenList$", 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/APITokenPrivate.cs b/src/PollinationSDK/Model/APITokenPrivate.cs new file mode 100644 index 000000000..5cd6642dd --- /dev/null +++ b/src/PollinationSDK/Model/APITokenPrivate.cs @@ -0,0 +1,213 @@ +/* + * 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 +{ + /// + /// APITokenPrivate + /// + [DataContract(Name = "APITokenPrivate")] + public partial class APITokenPrivate : APITokenCreate, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected APITokenPrivate() + { + // Set non-required readonly properties with defaultValue + this.Type = "APITokenPrivate"; + } + + /// + /// Initializes a new instance of the class. + /// + /// The decoded API token (required). + /// The unique ID of this API token (required). + /// The user friendly name of the API token (required). + /// Key value pairs of auth claims the API token is entitled to. + public APITokenPrivate + ( + string tokenId, string name, string token, // Required parameters + Dictionary claims= default // Optional parameters + ) : base(tokenId: tokenId, name: name, claims: claims)// BaseClass + { + // to ensure "token" is required (not null) + this.Token = token ?? throw new ArgumentNullException("token is a required property for APITokenPrivate and cannot be null"); + + // Set non-required readonly properties with defaultValue + this.Type = "APITokenPrivate"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "APITokenPrivate"; + + /// + /// The decoded API token + /// + /// The decoded API token + [DataMember(Name = "token", IsRequired = true, EmitDefaultValue = false)] + public string Token { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + return "APITokenPrivate"; + } + + /// + /// 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("APITokenPrivate:\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" TokenId: ").Append(TokenId).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Claims: ").Append(Claims).Append("\n"); + sb.Append(" Token: ").Append(Token).Append("\n"); + return sb.ToString(); + } + + /// + /// Returns the object from JSON string + /// + /// APITokenPrivate object + public static APITokenPrivate 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. + /// + /// APITokenPrivate object + public virtual APITokenPrivate DuplicateAPITokenPrivate() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateAPITokenPrivate(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override APITokenCreate DuplicateAPITokenCreate() + { + return DuplicateAPITokenPrivate(); + } + + /// + /// 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 APITokenPrivate); + } + + /// + /// Returns true if APITokenPrivate instances are equal + /// + /// Instance of APITokenPrivate to be compared + /// Boolean + public bool Equals(APITokenPrivate input) + { + if (input == null) + return false; + return base.Equals(input) && + ( + this.Token == input.Token || + (this.Token != null && + this.Token.Equals(input.Token)) + ) && 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.Token != null) + hashCode = hashCode * 59 + this.Token.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(@"^APITokenPrivate$", 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/AccessPolicy.cs b/src/PollinationSDK/Model/AccessPolicy.cs new file mode 100644 index 000000000..bbecbed94 --- /dev/null +++ b/src/PollinationSDK/Model/AccessPolicy.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 +{ + /// + /// AccessPolicy + /// + [DataContract(Name = "AccessPolicy")] + public partial class AccessPolicy : OpenAPIGenBaseModel, IEquatable, IValidatableObject + { + /// + /// The permission given to the subject of the access policy + /// + /// The permission given to the subject of the access policy + [DataMember(Name="permission", EmitDefaultValue=false)] + public Permission Permission { get; set; } + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected AccessPolicy() + { + // Set non-required readonly properties with defaultValue + this.Type = "AccessPolicy"; + } + + /// + /// Initializes a new instance of the class. + /// + /// The subject of the access policy (required). + /// The permission given to the subject of the access policy (required). + public AccessPolicy + ( + PolicySubject 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 AccessPolicy and cannot be null"); + this.Permission = permission; + + // Set non-required readonly properties with defaultValue + this.Type = "AccessPolicy"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "AccessPolicy"; + + /// + /// 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 "AccessPolicy"; + } + + /// + /// 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("AccessPolicy:\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 + /// + /// AccessPolicy object + public static AccessPolicy 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. + /// + /// AccessPolicy object + public virtual AccessPolicy DuplicateAccessPolicy() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateAccessPolicy(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel DuplicateOpenAPIGenBaseModel() + { + return DuplicateAccessPolicy(); + } + + /// + /// 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 AccessPolicy); + } + + /// + /// Returns true if AccessPolicy instances are equal + /// + /// Instance of AccessPolicy to be compared + /// Boolean + public bool Equals(AccessPolicy 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(@"^AccessPolicy$", 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/AccessPolicyList.cs b/src/PollinationSDK/Model/AccessPolicyList.cs new file mode 100644 index 000000000..831757abc --- /dev/null +++ b/src/PollinationSDK/Model/AccessPolicyList.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 = "AccessPolicyList")] + public partial class AccessPolicyList : OpenAPIGenBaseModel, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected AccessPolicyList() + { + // Set non-required readonly properties with defaultValue + this.Type = "AccessPolicyList"; + } + + /// + /// 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 AccessPolicyList + ( + 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 AccessPolicyList and cannot be null"); + this.NextPage = nextPage; + + // Set non-required readonly properties with defaultValue + this.Type = "AccessPolicyList"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "AccessPolicyList"; + + /// + /// 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 "AccessPolicyList"; + } + + /// + /// 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("AccessPolicyList:\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 + /// + /// AccessPolicyList object + public static AccessPolicyList 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. + /// + /// AccessPolicyList object + public virtual AccessPolicyList DuplicateAccessPolicyList() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateAccessPolicyList(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel DuplicateOpenAPIGenBaseModel() + { + return DuplicateAccessPolicyList(); + } + + /// + /// 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 AccessPolicyList); + } + + /// + /// Returns true if AccessPolicyList instances are equal + /// + /// Instance of AccessPolicyList to be compared + /// Boolean + public bool Equals(AccessPolicyList 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(@"^AccessPolicyList$", 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/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/AccountPublic.cs b/src/PollinationSDK/Model/AccountPublic.cs new file mode 100644 index 000000000..cf93a7246 --- /dev/null +++ b/src/PollinationSDK/Model/AccountPublic.cs @@ -0,0 +1,284 @@ +/* + * 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 +{ + /// + /// AccountPublic + /// + [DataContract(Name = "AccountPublic")] + public partial class AccountPublic : OpenAPIGenBaseModel, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected AccountPublic() + { + // Set non-required readonly properties with defaultValue + this.Type = "AccountPublic"; + } + + /// + /// Initializes a new instance of the class. + /// + /// id (required). + /// accountType (required). + /// name (required). + /// displayName. + /// description. + /// https://robohash.org/ladybugbot. + public AccountPublic + ( + string id, string accountType, string name, // Required parameters + string displayName= default, string description= default, string pictureUrl= default // Optional parameters + ) : base()// BaseClass + { + // to ensure "id" is required (not null) + this.Id = id ?? throw new ArgumentNullException("id is a required property for AccountPublic and cannot be null"); + // to ensure "accountType" is required (not null) + this.AccountType = accountType ?? throw new ArgumentNullException("accountType is a required property for AccountPublic and cannot be null"); + // to ensure "name" is required (not null) + this.Name = name ?? throw new ArgumentNullException("name is a required property for AccountPublic and cannot be null"); + this.DisplayName = displayName; + this.Description = description; + this.PictureUrl = pictureUrl; + + // Set non-required readonly properties with defaultValue + this.Type = "AccountPublic"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "AccountPublic"; + + /// + /// Gets or Sets Id + /// + [DataMember(Name = "id", IsRequired = true, EmitDefaultValue = false)] + public string Id { get; set; } + /// + /// Gets or Sets AccountType + /// + [DataMember(Name = "account_type", IsRequired = true, EmitDefaultValue = false)] + public string AccountType { get; set; } + /// + /// Gets or Sets Name + /// + [DataMember(Name = "name", IsRequired = true, EmitDefaultValue = false)] + public string Name { get; set; } + /// + /// Gets or Sets DisplayName + /// + [DataMember(Name = "display_name", EmitDefaultValue = false)] + public string DisplayName { get; set; } + /// + /// Gets or Sets Description + /// + [DataMember(Name = "description", EmitDefaultValue = false)] + public string Description { get; set; } + /// + /// https://robohash.org/ladybugbot + /// + /// https://robohash.org/ladybugbot + [DataMember(Name = "picture_url", EmitDefaultValue = false)] + public string PictureUrl { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + return "AccountPublic"; + } + + /// + /// 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("AccountPublic:\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Id: ").Append(Id).Append("\n"); + sb.Append(" AccountType: ").Append(AccountType).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" DisplayName: ").Append(DisplayName).Append("\n"); + sb.Append(" Description: ").Append(Description).Append("\n"); + sb.Append(" PictureUrl: ").Append(PictureUrl).Append("\n"); + return sb.ToString(); + } + + /// + /// Returns the object from JSON string + /// + /// AccountPublic object + public static AccountPublic 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. + /// + /// AccountPublic object + public virtual AccountPublic DuplicateAccountPublic() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateAccountPublic(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel DuplicateOpenAPIGenBaseModel() + { + return DuplicateAccountPublic(); + } + + /// + /// 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 AccountPublic); + } + + /// + /// Returns true if AccountPublic instances are equal + /// + /// Instance of AccountPublic to be compared + /// Boolean + public bool Equals(AccountPublic 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.AccountType == input.AccountType || + (this.AccountType != null && + this.AccountType.Equals(input.AccountType)) + ) && base.Equals(input) && + ( + this.Name == input.Name || + (this.Name != null && + this.Name.Equals(input.Name)) + ) && 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.PictureUrl == input.PictureUrl || + (this.PictureUrl != null && + this.PictureUrl.Equals(input.PictureUrl)) + ) && 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.AccountType != null) + hashCode = hashCode * 59 + this.AccountType.GetHashCode(); + if (this.Name != null) + hashCode = hashCode * 59 + this.Name.GetHashCode(); + if (this.DisplayName != null) + hashCode = hashCode * 59 + this.DisplayName.GetHashCode(); + if (this.Description != null) + hashCode = hashCode * 59 + this.Description.GetHashCode(); + if (this.PictureUrl != null) + hashCode = hashCode * 59 + this.PictureUrl.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(@"^AccountPublic$", 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/ArtifactSource.cs b/src/PollinationSDK/Model/ArtifactSource.cs new file mode 100644 index 000000000..96d0bc8b7 --- /dev/null +++ b/src/PollinationSDK/Model/ArtifactSource.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 +{ + /// + /// ArtifactSource. An Artifact Source System. + /// + [DataContract(Name = "_ArtifactSource")] + public partial class ArtifactSource : OpenAPIGenBaseModel, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. + public ArtifactSource + ( + // Required parameters + Dictionary annotations= default// Optional parameters + ) : base()// BaseClass + { + this.Annotations = annotations; + + // Set non-required readonly properties with defaultValue + this.Type = "_ArtifactSource"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "_ArtifactSource"; + + /// + /// 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; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + return "ArtifactSource"; + } + + /// + /// 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("ArtifactSource:\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Annotations: ").Append(Annotations).Append("\n"); + return sb.ToString(); + } + + /// + /// Returns the object from JSON string + /// + /// ArtifactSource object + public static ArtifactSource 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. + /// + /// ArtifactSource object + public virtual ArtifactSource DuplicateArtifactSource() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateArtifactSource(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel DuplicateOpenAPIGenBaseModel() + { + return DuplicateArtifactSource(); + } + + /// + /// 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 ArtifactSource); + } + + /// + /// Returns true if ArtifactSource instances are equal + /// + /// Instance of ArtifactSource to be compared + /// Boolean + public bool Equals(ArtifactSource 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.Annotations == input.Annotations || + this.Annotations != null && + input.Annotations != null && + this.Annotations.SequenceEqual(input.Annotations) + ); + } + + /// + /// 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.Annotations != null) + hashCode = hashCode * 59 + this.Annotations.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(@"^_ArtifactSource$", 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/BaseReference.cs b/src/PollinationSDK/Model/BaseReference.cs new file mode 100644 index 000000000..b9ef20003 --- /dev/null +++ b/src/PollinationSDK/Model/BaseReference.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 +{ + /// + /// A Base reference model. + /// + [DataContract(Name = "_BaseReference")] + public partial class BaseReference : OpenAPIGenBaseModel, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. + public BaseReference + ( + // Required parameters + Dictionary annotations= default// Optional parameters + ) : base()// BaseClass + { + this.Annotations = annotations; + + // Set non-required readonly properties with defaultValue + this.Type = "_BaseReference"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "_BaseReference"; + + /// + /// 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; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + return "BaseReference"; + } + + /// + /// 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("BaseReference:\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Annotations: ").Append(Annotations).Append("\n"); + return sb.ToString(); + } + + /// + /// Returns the object from JSON string + /// + /// BaseReference object + public static BaseReference 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. + /// + /// BaseReference object + public virtual BaseReference DuplicateBaseReference() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateBaseReference(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel DuplicateOpenAPIGenBaseModel() + { + return DuplicateBaseReference(); + } + + /// + /// 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 BaseReference); + } + + /// + /// Returns true if BaseReference instances are equal + /// + /// Instance of BaseReference to be compared + /// Boolean + public bool Equals(BaseReference 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.Annotations == input.Annotations || + this.Annotations != null && + input.Annotations != null && + this.Annotations.SequenceEqual(input.Annotations) + ); + } + + /// + /// 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.Annotations != null) + hashCode = hashCode * 59 + this.Annotations.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(@"^_BaseReference$", 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/BaseStatus.cs b/src/PollinationSDK/Model/BaseStatus.cs new file mode 100644 index 000000000..26fc823b0 --- /dev/null +++ b/src/PollinationSDK/Model/BaseStatus.cs @@ -0,0 +1,260 @@ +/* + * 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 +{ + /// + /// Base Status model + /// + [DataContract(Name = "BaseStatus")] + public partial class BaseStatus : IOBase, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected BaseStatus() + { + // Set non-required readonly properties with defaultValue + this.Type = "BaseStatus"; + } + + /// + /// Initializes a new instance of the class. + /// + /// The time at which the task was started (required). + /// Any message produced by the task. Usually error/debugging hints.. + /// The time at which the task was completed. + /// Source url for the status object. It can be a recipe or a function.. + /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. + /// Place-holder. Overwrite this!. + /// Place-holder. Overwrite this!. + public BaseStatus + ( + DateTime startedAt, // Required parameters + Dictionary annotations= default, List inputs= default, List outputs= default, string message= default, DateTime finishedAt= default, string source= default // Optional parameters + ) : base(annotations: annotations, inputs: inputs, outputs: outputs)// BaseClass + { + this.StartedAt = startedAt; + this.Message = message; + this.FinishedAt = finishedAt; + this.Source = source; + + // Set non-required readonly properties with defaultValue + this.Type = "BaseStatus"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "BaseStatus"; + + /// + /// The time at which the task was started + /// + /// The time at which the task was started + [DataMember(Name = "started_at", IsRequired = true, EmitDefaultValue = false)] + public DateTime StartedAt { get; set; } + /// + /// Any message produced by the task. Usually error/debugging hints. + /// + /// Any message produced by the task. Usually error/debugging hints. + [DataMember(Name = "message", EmitDefaultValue = false)] + public string Message { get; set; } + /// + /// The time at which the task was completed + /// + /// The time at which the task was completed + [DataMember(Name = "finished_at", EmitDefaultValue = false)] + public DateTime FinishedAt { get; set; } + /// + /// Source url for the status object. It can be a recipe or a function. + /// + /// Source url for the status object. It can be a recipe or a function. + [DataMember(Name = "source", EmitDefaultValue = false)] + public string Source { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + return "BaseStatus"; + } + + /// + /// 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("BaseStatus:\n"); + sb.Append(" Type: ").Append(Type).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(" StartedAt: ").Append(StartedAt).Append("\n"); + sb.Append(" Message: ").Append(Message).Append("\n"); + sb.Append(" FinishedAt: ").Append(FinishedAt).Append("\n"); + sb.Append(" Source: ").Append(Source).Append("\n"); + return sb.ToString(); + } + + /// + /// Returns the object from JSON string + /// + /// BaseStatus object + public static BaseStatus 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. + /// + /// BaseStatus object + public virtual BaseStatus DuplicateBaseStatus() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateBaseStatus(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override IOBase DuplicateIOBase() + { + return DuplicateBaseStatus(); + } + + /// + /// 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 BaseStatus); + } + + /// + /// Returns true if BaseStatus instances are equal + /// + /// Instance of BaseStatus to be compared + /// Boolean + public bool Equals(BaseStatus input) + { + if (input == null) + return false; + return base.Equals(input) && + ( + this.StartedAt == input.StartedAt || + (this.StartedAt != null && + this.StartedAt.Equals(input.StartedAt)) + ) && base.Equals(input) && + ( + this.Message == input.Message || + (this.Message != null && + this.Message.Equals(input.Message)) + ) && base.Equals(input) && + ( + this.FinishedAt == input.FinishedAt || + (this.FinishedAt != null && + this.FinishedAt.Equals(input.FinishedAt)) + ) && base.Equals(input) && + ( + this.Source == input.Source || + (this.Source != null && + this.Source.Equals(input.Source)) + ) && 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.StartedAt != null) + hashCode = hashCode * 59 + this.StartedAt.GetHashCode(); + if (this.Message != null) + hashCode = hashCode * 59 + this.Message.GetHashCode(); + if (this.FinishedAt != null) + hashCode = hashCode * 59 + this.FinishedAt.GetHashCode(); + if (this.Source != null) + hashCode = hashCode * 59 + this.Source.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(@"^BaseStatus$", 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/BodyPostPluginOwnerPluginsPost.cs b/src/PollinationSDK/Model/BodyPostPluginOwnerPluginsPost.cs new file mode 100644 index 000000000..a8ddca988 --- /dev/null +++ b/src/PollinationSDK/Model/BodyPostPluginOwnerPluginsPost.cs @@ -0,0 +1,206 @@ +/* + * 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 +{ + /// + /// BodyPostPluginOwnerPluginsPost + /// + [DataContract(Name = "Body_post_plugin__owner__plugins_post")] + public partial class BodyPostPluginOwnerPluginsPost : OpenAPIGenBaseModel, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected BodyPostPluginOwnerPluginsPost() + { + // Set non-required readonly properties with defaultValue + this.Type = "Body_post_plugin__owner__plugins_post"; + } + + /// + /// Initializes a new instance of the class. + /// + /// package (required). + public BodyPostPluginOwnerPluginsPost + ( + System.IO.Stream package// Required parameters + // Optional parameters + ) : base()// BaseClass + { + // to ensure "package" is required (not null) + this.Package = package ?? throw new ArgumentNullException("package is a required property for BodyPostPluginOwnerPluginsPost and cannot be null"); + + // Set non-required readonly properties with defaultValue + this.Type = "Body_post_plugin__owner__plugins_post"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "Body_post_plugin__owner__plugins_post"; + + /// + /// Gets or Sets Package + /// + [DataMember(Name = "package", IsRequired = true, EmitDefaultValue = false)] + public System.IO.Stream Package { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + return "BodyPostPluginOwnerPluginsPost"; + } + + /// + /// 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("BodyPostPluginOwnerPluginsPost:\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Package: ").Append(Package).Append("\n"); + return sb.ToString(); + } + + /// + /// Returns the object from JSON string + /// + /// BodyPostPluginOwnerPluginsPost object + public static BodyPostPluginOwnerPluginsPost 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. + /// + /// BodyPostPluginOwnerPluginsPost object + public virtual BodyPostPluginOwnerPluginsPost DuplicateBodyPostPluginOwnerPluginsPost() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateBodyPostPluginOwnerPluginsPost(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel DuplicateOpenAPIGenBaseModel() + { + return DuplicateBodyPostPluginOwnerPluginsPost(); + } + + /// + /// 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 BodyPostPluginOwnerPluginsPost); + } + + /// + /// Returns true if BodyPostPluginOwnerPluginsPost instances are equal + /// + /// Instance of BodyPostPluginOwnerPluginsPost to be compared + /// Boolean + public bool Equals(BodyPostPluginOwnerPluginsPost input) + { + if (input == null) + return false; + return base.Equals(input) && + ( + this.Package == input.Package || + (this.Package != null && + this.Package.Equals(input.Package)) + ) && 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.Package != null) + hashCode = hashCode * 59 + this.Package.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(@"^Body_post_plugin__owner__plugins_post$", 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/BodyPostRecipeOwnerRecipesPost.cs b/src/PollinationSDK/Model/BodyPostRecipeOwnerRecipesPost.cs new file mode 100644 index 000000000..7f821b29c --- /dev/null +++ b/src/PollinationSDK/Model/BodyPostRecipeOwnerRecipesPost.cs @@ -0,0 +1,206 @@ +/* + * 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 +{ + /// + /// BodyPostRecipeOwnerRecipesPost + /// + [DataContract(Name = "Body_post_recipe__owner__recipes_post")] + public partial class BodyPostRecipeOwnerRecipesPost : OpenAPIGenBaseModel, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected BodyPostRecipeOwnerRecipesPost() + { + // Set non-required readonly properties with defaultValue + this.Type = "Body_post_recipe__owner__recipes_post"; + } + + /// + /// Initializes a new instance of the class. + /// + /// package (required). + public BodyPostRecipeOwnerRecipesPost + ( + System.IO.Stream package// Required parameters + // Optional parameters + ) : base()// BaseClass + { + // to ensure "package" is required (not null) + this.Package = package ?? throw new ArgumentNullException("package is a required property for BodyPostRecipeOwnerRecipesPost and cannot be null"); + + // Set non-required readonly properties with defaultValue + this.Type = "Body_post_recipe__owner__recipes_post"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "Body_post_recipe__owner__recipes_post"; + + /// + /// Gets or Sets Package + /// + [DataMember(Name = "package", IsRequired = true, EmitDefaultValue = false)] + public System.IO.Stream Package { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + return "BodyPostRecipeOwnerRecipesPost"; + } + + /// + /// 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("BodyPostRecipeOwnerRecipesPost:\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Package: ").Append(Package).Append("\n"); + return sb.ToString(); + } + + /// + /// Returns the object from JSON string + /// + /// BodyPostRecipeOwnerRecipesPost object + public static BodyPostRecipeOwnerRecipesPost 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. + /// + /// BodyPostRecipeOwnerRecipesPost object + public virtual BodyPostRecipeOwnerRecipesPost DuplicateBodyPostRecipeOwnerRecipesPost() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateBodyPostRecipeOwnerRecipesPost(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel DuplicateOpenAPIGenBaseModel() + { + return DuplicateBodyPostRecipeOwnerRecipesPost(); + } + + /// + /// 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 BodyPostRecipeOwnerRecipesPost); + } + + /// + /// Returns true if BodyPostRecipeOwnerRecipesPost instances are equal + /// + /// Instance of BodyPostRecipeOwnerRecipesPost to be compared + /// Boolean + public bool Equals(BodyPostRecipeOwnerRecipesPost input) + { + if (input == null) + return false; + return base.Equals(input) && + ( + this.Package == input.Package || + (this.Package != null && + this.Package.Equals(input.Package)) + ) && 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.Package != null) + hashCode = hashCode * 59 + this.Package.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(@"^Body_post_recipe__owner__recipes_post$", 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/CloudJob.cs b/src/PollinationSDK/Model/CloudJob.cs new file mode 100644 index 000000000..8a287f883 --- /dev/null +++ b/src/PollinationSDK/Model/CloudJob.cs @@ -0,0 +1,283 @@ +/* + * 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 +{ + /// + /// CloudJob + /// + [DataContract(Name = "CloudJob")] + public partial class CloudJob : OpenAPIGenBaseModel, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected CloudJob() + { + // Set non-required readonly properties with defaultValue + this.Type = "CloudJob"; + } + + /// + /// Initializes a new instance of the class. + /// + /// The unique ID for this run (required). + /// The job specification (required). + /// author. + /// owner. + /// The recipe used to generate this . + /// The status of the job. + public CloudJob + ( + string id, Job spec, // Required parameters + AccountPublic author= default, AccountPublic owner= default, RecipeInterface recipe= default, JobStatus status= default // Optional parameters + ) : base()// BaseClass + { + // to ensure "id" is required (not null) + this.Id = id ?? throw new ArgumentNullException("id is a required property for CloudJob and cannot be null"); + // to ensure "spec" is required (not null) + this.Spec = spec ?? throw new ArgumentNullException("spec is a required property for CloudJob and cannot be null"); + this.Author = author; + this.Owner = owner; + this.Recipe = recipe; + this.Status = status; + + // Set non-required readonly properties with defaultValue + this.Type = "CloudJob"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "CloudJob"; + + /// + /// The unique ID for this run + /// + /// The unique ID for this run + [DataMember(Name = "id", IsRequired = true, EmitDefaultValue = false)] + public string Id { get; set; } + /// + /// The job specification + /// + /// The job specification + [DataMember(Name = "spec", IsRequired = true, EmitDefaultValue = false)] + public Job Spec { get; set; } + /// + /// author + /// + /// author + [DataMember(Name = "author", EmitDefaultValue = false)] + public AccountPublic Author { get; set; } + /// + /// owner + /// + /// owner + [DataMember(Name = "owner", EmitDefaultValue = false)] + public AccountPublic Owner { get; set; } + /// + /// The recipe used to generate this + /// + /// The recipe used to generate this + [DataMember(Name = "recipe", EmitDefaultValue = false)] + public RecipeInterface Recipe { get; set; } + /// + /// The status of the job + /// + /// The status of the job + [DataMember(Name = "status", EmitDefaultValue = false)] + public JobStatus Status { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + return "CloudJob"; + } + + /// + /// 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("CloudJob:\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Id: ").Append(Id).Append("\n"); + sb.Append(" Spec: ").Append(Spec).Append("\n"); + sb.Append(" Author: ").Append(Author).Append("\n"); + sb.Append(" Owner: ").Append(Owner).Append("\n"); + sb.Append(" Recipe: ").Append(Recipe).Append("\n"); + sb.Append(" Status: ").Append(Status).Append("\n"); + return sb.ToString(); + } + + /// + /// Returns the object from JSON string + /// + /// CloudJob object + public static CloudJob 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. + /// + /// CloudJob object + public virtual CloudJob DuplicateCloudJob() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateCloudJob(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel DuplicateOpenAPIGenBaseModel() + { + return DuplicateCloudJob(); + } + + /// + /// 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 CloudJob); + } + + /// + /// Returns true if CloudJob instances are equal + /// + /// Instance of CloudJob to be compared + /// Boolean + public bool Equals(CloudJob 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.Author == input.Author || + (this.Author != null && + this.Author.Equals(input.Author)) + ) && base.Equals(input) && + ( + this.Owner == input.Owner || + (this.Owner != null && + this.Owner.Equals(input.Owner)) + ) && base.Equals(input) && + ( + this.Recipe == input.Recipe || + (this.Recipe != null && + this.Recipe.Equals(input.Recipe)) + ) && base.Equals(input) && + ( + this.Status == input.Status || + (this.Status != null && + this.Status.Equals(input.Status)) + ) && 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.Spec != null) + hashCode = hashCode * 59 + this.Spec.GetHashCode(); + if (this.Author != null) + hashCode = hashCode * 59 + this.Author.GetHashCode(); + if (this.Owner != null) + hashCode = hashCode * 59 + this.Owner.GetHashCode(); + if (this.Recipe != null) + hashCode = hashCode * 59 + this.Recipe.GetHashCode(); + if (this.Status != null) + hashCode = hashCode * 59 + this.Status.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(@"^CloudJob$", 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/CloudJobList.cs b/src/PollinationSDK/Model/CloudJobList.cs new file mode 100644 index 000000000..765f40708 --- /dev/null +++ b/src/PollinationSDK/Model/CloudJobList.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 = "CloudJobList")] + public partial class CloudJobList : OpenAPIGenBaseModel, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected CloudJobList() + { + // Set non-required readonly properties with defaultValue + this.Type = "CloudJobList"; + } + + /// + /// 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 CloudJobList + ( + 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 CloudJobList and cannot be null"); + this.NextPage = nextPage; + + // Set non-required readonly properties with defaultValue + this.Type = "CloudJobList"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "CloudJobList"; + + /// + /// 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 "CloudJobList"; + } + + /// + /// 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("CloudJobList:\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 + /// + /// CloudJobList object + public static CloudJobList 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. + /// + /// CloudJobList object + public virtual CloudJobList DuplicateCloudJobList() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateCloudJobList(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel DuplicateOpenAPIGenBaseModel() + { + return DuplicateCloudJobList(); + } + + /// + /// 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 CloudJobList); + } + + /// + /// Returns true if CloudJobList instances are equal + /// + /// Instance of CloudJobList to be compared + /// Boolean + public bool Equals(CloudJobList 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(@"^CloudJobList$", 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/CreatedContent.cs b/src/PollinationSDK/Model/CreatedContent.cs new file mode 100644 index 000000000..3169197f7 --- /dev/null +++ b/src/PollinationSDK/Model/CreatedContent.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 +{ + /// + /// Content for created response. + /// + [DataContract(Name = "CreatedContent")] + public partial class CreatedContent : OpenAPIGenBaseModel, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected CreatedContent() + { + // Set non-required readonly properties with defaultValue + this.Type = "CreatedContent"; + } + + /// + /// Initializes a new instance of the class. + /// + /// Id for the newly created resource. (required). + /// A human readable message. + public CreatedContent + ( + Guid id, // Required parameters + string message= default // Optional parameters + ) : base()// BaseClass + { + this.Id = id; + this.Message = message; + + // Set non-required readonly properties with defaultValue + this.Type = "CreatedContent"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "CreatedContent"; + + /// + /// Id for the newly created resource. + /// + /// Id for the newly created resource. + [DataMember(Name = "id", IsRequired = true, EmitDefaultValue = false)] + public Guid Id { get; set; } + /// + /// A human readable message + /// + /// A human readable message + [DataMember(Name = "message", EmitDefaultValue = false)] + public string Message { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + return "CreatedContent"; + } + + /// + /// 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("CreatedContent:\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Id: ").Append(Id).Append("\n"); + sb.Append(" Message: ").Append(Message).Append("\n"); + return sb.ToString(); + } + + /// + /// Returns the object from JSON string + /// + /// CreatedContent object + public static CreatedContent 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. + /// + /// CreatedContent object + public virtual CreatedContent DuplicateCreatedContent() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateCreatedContent(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel DuplicateOpenAPIGenBaseModel() + { + return DuplicateCreatedContent(); + } + + /// + /// 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 CreatedContent); + } + + /// + /// Returns true if CreatedContent instances are equal + /// + /// Instance of CreatedContent to be compared + /// Boolean + public bool Equals(CreatedContent 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.Message == input.Message || + (this.Message != null && + this.Message.Equals(input.Message)) + ) && 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.Message != null) + hashCode = hashCode * 59 + this.Message.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(@"^CreatedContent$", 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/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/DAG.cs b/src/PollinationSDK/Model/DAG.cs new file mode 100644 index 000000000..99e4e6cb9 --- /dev/null +++ b/src/PollinationSDK/Model/DAG.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 +{ + /// + /// A Directed Acyclic Graph containing a list of tasks. + /// + [DataContract(Name = "DAG")] + public partial class DAG : OpenAPIGenBaseModel, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected DAG() + { + // Set non-required readonly properties with defaultValue + this.Type = "DAG"; + } + + /// + /// Initializes a new instance of the class. + /// + /// A unique name for this dag. (required). + /// Tasks are a list of DAG steps (required). + /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. + /// Inputs for the DAG.. + /// Outputs of the DAG that can be used by other DAGs.. + /// Stop scheduling new steps, as soon as it detects that one of the DAG nodes is failed. Default is True. (default to true). + public DAG + ( + string name, List tasks, // Required parameters + Dictionary annotations= default, List> inputs= default, List> outputs= default, bool failFast = true // Optional parameters + ) : base()// BaseClass + { + // to ensure "name" is required (not null) + this.Name = name ?? throw new ArgumentNullException("name is a required property for DAG and cannot be null"); + // to ensure "tasks" is required (not null) + this.Tasks = tasks ?? throw new ArgumentNullException("tasks is a required property for DAG and cannot be null"); + this.Annotations = annotations; + this.Inputs = inputs; + this.Outputs = outputs; + this.FailFast = failFast; + + // Set non-required readonly properties with defaultValue + this.Type = "DAG"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "DAG"; + + /// + /// A unique name for this dag. + /// + /// A unique name for this dag. + [DataMember(Name = "name", IsRequired = true, EmitDefaultValue = false)] + public string Name { get; set; } + /// + /// Tasks are a list of DAG steps + /// + /// Tasks are a list of DAG steps + [DataMember(Name = "tasks", IsRequired = true, EmitDefaultValue = false)] + public List Tasks { 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; } + /// + /// Inputs for the DAG. + /// + /// Inputs for the DAG. + [DataMember(Name = "inputs", EmitDefaultValue = false)] + public List> Inputs { get; set; } + /// + /// Outputs of the DAG that can be used by other DAGs. + /// + /// Outputs of the DAG that can be used by other DAGs. + [DataMember(Name = "outputs", EmitDefaultValue = false)] + public List> Outputs { get; set; } + /// + /// Stop scheduling new steps, as soon as it detects that one of the DAG nodes is failed. Default is True. + /// + /// Stop scheduling new steps, as soon as it detects that one of the DAG nodes is failed. Default is True. + [DataMember(Name = "fail_fast", EmitDefaultValue = true)] + public bool FailFast { get; set; } = true; + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + return "DAG"; + } + + /// + /// 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("DAG:\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Tasks: ").Append(Tasks).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(" FailFast: ").Append(FailFast).Append("\n"); + return sb.ToString(); + } + + /// + /// Returns the object from JSON string + /// + /// DAG object + public static DAG 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. + /// + /// DAG object + public virtual DAG DuplicateDAG() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateDAG(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel DuplicateOpenAPIGenBaseModel() + { + return DuplicateDAG(); + } + + /// + /// 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 DAG); + } + + /// + /// Returns true if DAG instances are equal + /// + /// Instance of DAG to be compared + /// Boolean + public bool Equals(DAG 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.Tasks == input.Tasks || + this.Tasks != null && + input.Tasks != null && + this.Tasks.SequenceEqual(input.Tasks) + ) && 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.FailFast == input.FailFast || + (this.FailFast != null && + this.FailFast.Equals(input.FailFast)) + ) && 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.Tasks != null) + hashCode = hashCode * 59 + this.Tasks.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.FailFast != null) + hashCode = hashCode * 59 + this.FailFast.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(@"^DAG$", 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/DAGArrayInput.cs b/src/PollinationSDK/Model/DAGArrayInput.cs new file mode 100644 index 000000000..cd5f65003 --- /dev/null +++ b/src/PollinationSDK/Model/DAGArrayInput.cs @@ -0,0 +1,273 @@ +/* + * 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 JSON array input. You can add additional validation by defining a JSONSchema specification. See http://json-schema.org/understanding-json-schema/reference/array.html for more information. + /// + [DataContract(Name = "DAGArrayInput")] + public partial class DAGArrayInput : GenericInput, IEquatable, IValidatableObject + { + /// + /// Type of items in an array. All the items in an array must be from the same type. + /// + /// Type of items in an array. All the items in an array must be from the same type. + [DataMember(Name="items_type", EmitDefaultValue=false)] + public ItemType ItemsType { get; set; } = ItemType.String; + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected DAGArrayInput() + { + // Set non-required readonly properties with defaultValue + this.Type = "DAGArrayInput"; + } + + /// + /// Initializes a new instance of the class. + /// + /// Default value to use for an input if a value was not supplied.. + /// A list of aliases for this input in different platforms.. + /// A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. (default to false). + /// An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec.. + /// Type of items in an array. All the items in an array must be from the same type.. + /// Input name. (required). + /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. + /// Optional description for input.. + public DAGArrayInput + ( + string name, // Required parameters + Dictionary annotations= default, string description= default, List _default= default, List> alias= default, bool required = false, Object spec= default, ItemType itemsType= ItemType.String // Optional parameters + ) : base(name: name, annotations: annotations, description: description)// BaseClass + { + this.Default = _default; + this.Alias = alias; + this.Required = required; + this.Spec = spec; + this.ItemsType = itemsType; + + // Set non-required readonly properties with defaultValue + this.Type = "DAGArrayInput"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "DAGArrayInput"; + + /// + /// Default value to use for an input if a value was not supplied. + /// + /// Default value to use for an input if a value was not supplied. + [DataMember(Name = "default", EmitDefaultValue = false)] + public List Default { get; set; } + /// + /// A list of aliases for this input in different platforms. + /// + /// A list of aliases for this input in different platforms. + [DataMember(Name = "alias", EmitDefaultValue = false)] + public List> Alias { get; set; } + /// + /// A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. + /// + /// A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. + [DataMember(Name = "required", EmitDefaultValue = true)] + public bool Required { get; set; } = false; + /// + /// An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec. + /// + /// An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec. + [DataMember(Name = "spec", EmitDefaultValue = false)] + public Object Spec { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + return "DAGArrayInput"; + } + + /// + /// 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("DAGArrayInput:\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Annotations: ").Append(Annotations).Append("\n"); + sb.Append(" Description: ").Append(Description).Append("\n"); + sb.Append(" Default: ").Append(Default).Append("\n"); + sb.Append(" Alias: ").Append(Alias).Append("\n"); + sb.Append(" Required: ").Append(Required).Append("\n"); + sb.Append(" Spec: ").Append(Spec).Append("\n"); + sb.Append(" ItemsType: ").Append(ItemsType).Append("\n"); + return sb.ToString(); + } + + /// + /// Returns the object from JSON string + /// + /// DAGArrayInput object + public static DAGArrayInput 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. + /// + /// DAGArrayInput object + public virtual DAGArrayInput DuplicateDAGArrayInput() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateDAGArrayInput(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override GenericInput DuplicateGenericInput() + { + return DuplicateDAGArrayInput(); + } + + /// + /// 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 DAGArrayInput); + } + + /// + /// Returns true if DAGArrayInput instances are equal + /// + /// Instance of DAGArrayInput to be compared + /// Boolean + public bool Equals(DAGArrayInput input) + { + if (input == null) + return false; + return base.Equals(input) && + ( + this.Default == input.Default || + this.Default != null && + input.Default != null && + this.Default.SequenceEqual(input.Default) + ) && base.Equals(input) && + ( + this.Alias == input.Alias || + this.Alias != null && + input.Alias != null && + this.Alias.SequenceEqual(input.Alias) + ) && base.Equals(input) && + ( + this.Required == input.Required || + (this.Required != null && + this.Required.Equals(input.Required)) + ) && base.Equals(input) && + ( + this.ItemsType == input.ItemsType || + (this.ItemsType != null && + this.ItemsType.Equals(input.ItemsType)) + ) && 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.Default != null) + hashCode = hashCode * 59 + this.Default.GetHashCode(); + if (this.Alias != null) + hashCode = hashCode * 59 + this.Alias.GetHashCode(); + if (this.Required != null) + hashCode = hashCode * 59 + this.Required.GetHashCode(); + if (this.Spec != null) + hashCode = hashCode * 59 + this.Spec.GetHashCode(); + if (this.ItemsType != null) + hashCode = hashCode * 59 + this.ItemsType.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(@"^DAGArrayInput$", 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/DAGArrayInputAlias.cs b/src/PollinationSDK/Model/DAGArrayInputAlias.cs new file mode 100644 index 000000000..96c158a31 --- /dev/null +++ b/src/PollinationSDK/Model/DAGArrayInputAlias.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 +{ + /// + /// A JSON array input. You can add additional validation by defining a JSONSchema specification. See http://json-schema.org/understanding-json-schema/reference/array.html for more information. + /// + [DataContract(Name = "DAGArrayInputAlias")] + public partial class DAGArrayInputAlias : GenericInput, IEquatable, IValidatableObject + { + /// + /// Type of items in an array. All the items in an array must be from the same type. + /// + /// Type of items in an array. All the items in an array must be from the same type. + [DataMember(Name="items_type", EmitDefaultValue=false)] + public ItemType ItemsType { get; set; } = ItemType.String; + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected DAGArrayInputAlias() + { + // Set non-required readonly properties with defaultValue + this.Type = "DAGArrayInputAlias"; + } + + /// + /// Initializes a new instance of the class. + /// + /// 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. (required). + /// List of process actions to process the input or output value. (required). + /// Default value to use for an input if a value was not supplied.. + /// A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. (default to false). + /// An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec.. + /// Type of items in an array. All the items in an array must be from the same type.. + /// Input name. (required). + /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. + /// Optional description for input.. + public DAGArrayInputAlias + ( + string name, List platform, List handler, // Required parameters + Dictionary annotations= default, string description= default, List _default= default, bool required = false, Object spec= default, ItemType itemsType= ItemType.String // Optional parameters + ) : base(name: name, annotations: annotations, description: description)// BaseClass + { + // to ensure "platform" is required (not null) + this.Platform = platform ?? throw new ArgumentNullException("platform is a required property for DAGArrayInputAlias and cannot be null"); + // to ensure "handler" is required (not null) + this.Handler = handler ?? throw new ArgumentNullException("handler is a required property for DAGArrayInputAlias and cannot be null"); + this.Default = _default; + this.Required = required; + this.Spec = spec; + this.ItemsType = itemsType; + + // Set non-required readonly properties with defaultValue + this.Type = "DAGArrayInputAlias"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "DAGArrayInputAlias"; + + /// + /// 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. + /// + /// 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. + [DataMember(Name = "platform", IsRequired = true, EmitDefaultValue = false)] + public List Platform { get; set; } + /// + /// List of process actions to process the input or output value. + /// + /// List of process actions to process the input or output value. + [DataMember(Name = "handler", IsRequired = true, EmitDefaultValue = false)] + public List Handler { get; set; } + /// + /// Default value to use for an input if a value was not supplied. + /// + /// Default value to use for an input if a value was not supplied. + [DataMember(Name = "default", EmitDefaultValue = false)] + public List Default { get; set; } + /// + /// A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. + /// + /// A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. + [DataMember(Name = "required", EmitDefaultValue = true)] + public bool Required { get; set; } = false; + /// + /// An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec. + /// + /// An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec. + [DataMember(Name = "spec", EmitDefaultValue = false)] + public Object Spec { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + return "DAGArrayInputAlias"; + } + + /// + /// 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("DAGArrayInputAlias:\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Annotations: ").Append(Annotations).Append("\n"); + sb.Append(" Description: ").Append(Description).Append("\n"); + sb.Append(" Platform: ").Append(Platform).Append("\n"); + sb.Append(" Handler: ").Append(Handler).Append("\n"); + sb.Append(" Default: ").Append(Default).Append("\n"); + sb.Append(" Required: ").Append(Required).Append("\n"); + sb.Append(" Spec: ").Append(Spec).Append("\n"); + sb.Append(" ItemsType: ").Append(ItemsType).Append("\n"); + return sb.ToString(); + } + + /// + /// Returns the object from JSON string + /// + /// DAGArrayInputAlias object + public static DAGArrayInputAlias 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. + /// + /// DAGArrayInputAlias object + public virtual DAGArrayInputAlias DuplicateDAGArrayInputAlias() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateDAGArrayInputAlias(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override GenericInput DuplicateGenericInput() + { + return DuplicateDAGArrayInputAlias(); + } + + /// + /// 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 DAGArrayInputAlias); + } + + /// + /// Returns true if DAGArrayInputAlias instances are equal + /// + /// Instance of DAGArrayInputAlias to be compared + /// Boolean + public bool Equals(DAGArrayInputAlias input) + { + if (input == null) + return false; + return base.Equals(input) && + ( + this.Platform == input.Platform || + this.Platform != null && + input.Platform != null && + this.Platform.SequenceEqual(input.Platform) + ) && base.Equals(input) && + ( + this.Handler == input.Handler || + this.Handler != null && + input.Handler != null && + this.Handler.SequenceEqual(input.Handler) + ) && base.Equals(input) && + ( + this.Default == input.Default || + this.Default != null && + input.Default != null && + this.Default.SequenceEqual(input.Default) + ) && base.Equals(input) && + ( + this.Required == input.Required || + (this.Required != null && + this.Required.Equals(input.Required)) + ) && base.Equals(input) && + ( + this.ItemsType == input.ItemsType || + (this.ItemsType != null && + this.ItemsType.Equals(input.ItemsType)) + ) && 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.Platform != null) + hashCode = hashCode * 59 + this.Platform.GetHashCode(); + if (this.Handler != null) + hashCode = hashCode * 59 + this.Handler.GetHashCode(); + if (this.Default != null) + hashCode = hashCode * 59 + this.Default.GetHashCode(); + if (this.Required != null) + hashCode = hashCode * 59 + this.Required.GetHashCode(); + if (this.Spec != null) + hashCode = hashCode * 59 + this.Spec.GetHashCode(); + if (this.ItemsType != null) + hashCode = hashCode * 59 + this.ItemsType.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(@"^DAGArrayInputAlias$", 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/DAGArrayOutput.cs b/src/PollinationSDK/Model/DAGArrayOutput.cs new file mode 100644 index 000000000..8c93af786 --- /dev/null +++ b/src/PollinationSDK/Model/DAGArrayOutput.cs @@ -0,0 +1,262 @@ +/* + * 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 +{ + /// + /// DAG array output. This output loads the content from a JSON file which must be a JSON Array. + /// + [DataContract(Name = "DAGArrayOutput")] + public partial class DAGArrayOutput : GenericOutput, IEquatable, IValidatableObject + { + /// + /// Type of items in this array. All the items in an array must be from the same type. + /// + /// Type of items in this array. All the items in an array must be from the same type. + [DataMember(Name="items_type", EmitDefaultValue=false)] + public ItemType ItemsType { get; set; } = ItemType.String; + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected DAGArrayOutput() + { + // Set non-required readonly properties with defaultValue + this.Type = "DAGArrayOutput"; + } + + /// + /// Initializes a new instance of the class. + /// + /// Reference to a file or a task output. Task output must be file. (required). + /// A list of additional processes for loading this output on different platforms.. + /// A boolean to indicate if an artifact output is required. A False value makes the artifact optional. (default to true). + /// Type of items in this array. All the items in an array must be from the same type.. + /// Output name. (required). + /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. + /// Optional description for output.. + public DAGArrayOutput + ( + string name, AnyOf from, // Required parameters + Dictionary annotations= default, string description= default, List> alias= default, bool required = true, ItemType itemsType= ItemType.String // Optional parameters + ) : base(name: name, annotations: annotations, description: description)// BaseClass + { + // to ensure "from" is required (not null) + this.From = from ?? throw new ArgumentNullException("from is a required property for DAGArrayOutput and cannot be null"); + this.Alias = alias; + this.Required = required; + this.ItemsType = itemsType; + + // Set non-required readonly properties with defaultValue + this.Type = "DAGArrayOutput"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "DAGArrayOutput"; + + /// + /// Reference to a file or a task output. Task output must be file. + /// + /// Reference to a file or a task output. Task output must be file. + [DataMember(Name = "from", IsRequired = true, EmitDefaultValue = false)] + public AnyOf From { get; set; } + /// + /// A list of additional processes for loading this output on different platforms. + /// + /// A list of additional processes for loading this output on different platforms. + [DataMember(Name = "alias", EmitDefaultValue = false)] + public List> Alias { get; set; } + /// + /// A boolean to indicate if an artifact output is required. A False value makes the artifact optional. + /// + /// A boolean to indicate if an artifact output is required. A False value makes the artifact optional. + [DataMember(Name = "required", EmitDefaultValue = true)] + public bool Required { get; set; } = true; + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + return "DAGArrayOutput"; + } + + /// + /// 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("DAGArrayOutput:\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Annotations: ").Append(Annotations).Append("\n"); + sb.Append(" Description: ").Append(Description).Append("\n"); + sb.Append(" From: ").Append(From).Append("\n"); + sb.Append(" Alias: ").Append(Alias).Append("\n"); + sb.Append(" Required: ").Append(Required).Append("\n"); + sb.Append(" ItemsType: ").Append(ItemsType).Append("\n"); + return sb.ToString(); + } + + /// + /// Returns the object from JSON string + /// + /// DAGArrayOutput object + public static DAGArrayOutput 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. + /// + /// DAGArrayOutput object + public virtual DAGArrayOutput DuplicateDAGArrayOutput() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateDAGArrayOutput(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override GenericOutput DuplicateGenericOutput() + { + return DuplicateDAGArrayOutput(); + } + + /// + /// 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 DAGArrayOutput); + } + + /// + /// Returns true if DAGArrayOutput instances are equal + /// + /// Instance of DAGArrayOutput to be compared + /// Boolean + public bool Equals(DAGArrayOutput input) + { + if (input == null) + return false; + return base.Equals(input) && + ( + this.From == input.From || + (this.From != null && + this.From.Equals(input.From)) + ) && base.Equals(input) && + ( + this.Alias == input.Alias || + this.Alias != null && + input.Alias != null && + this.Alias.SequenceEqual(input.Alias) + ) && base.Equals(input) && + ( + this.Required == input.Required || + (this.Required != null && + this.Required.Equals(input.Required)) + ) && base.Equals(input) && + ( + this.ItemsType == input.ItemsType || + (this.ItemsType != null && + this.ItemsType.Equals(input.ItemsType)) + ) && 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.From != null) + hashCode = hashCode * 59 + this.From.GetHashCode(); + if (this.Alias != null) + hashCode = hashCode * 59 + this.Alias.GetHashCode(); + if (this.Required != null) + hashCode = hashCode * 59 + this.Required.GetHashCode(); + if (this.ItemsType != null) + hashCode = hashCode * 59 + this.ItemsType.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(@"^DAGArrayOutput$", 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/DAGArrayOutputAlias.cs b/src/PollinationSDK/Model/DAGArrayOutputAlias.cs new file mode 100644 index 000000000..a969e1dfa --- /dev/null +++ b/src/PollinationSDK/Model/DAGArrayOutputAlias.cs @@ -0,0 +1,235 @@ +/* + * 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 +{ + /// + /// DAG alias array output. This output loads the content from a JSON file which must be a JSON Array. + /// + [DataContract(Name = "DAGArrayOutputAlias")] + public partial class DAGArrayOutputAlias : DAGArtifactOutputAlias, IEquatable, IValidatableObject + { + /// + /// Type of items in this array. All the items in an array must be from the same type. + /// + /// Type of items in this array. All the items in an array must be from the same type. + [DataMember(Name="items_type", EmitDefaultValue=false)] + public ItemType ItemsType { get; set; } = ItemType.String; + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected DAGArrayOutputAlias() + { + // Set non-required readonly properties with defaultValue + this.Type = "DAGArrayOutputAlias"; + } + + /// + /// Initializes a new instance of the class. + /// + /// Reference to a file or a task output. Task output must be file. (required). + /// Type of items in this array. All the items in an array must be from the same type.. + /// Output name. (required). + /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. + /// Optional description for output.. + /// 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. (required). + /// List of process actions to process the input or output value. (required). + /// A boolean to indicate if an artifact output is required. A False value makes the artifact optional. (default to true). + public DAGArrayOutputAlias + ( + string name, List platform, List handler, AnyOf from, // Required parameters + Dictionary annotations= default, string description= default, bool required = true, ItemType itemsType= ItemType.String // Optional parameters + ) : base(name: name, annotations: annotations, description: description, platform: platform, handler: handler, required: required)// BaseClass + { + // to ensure "from" is required (not null) + this.From = from ?? throw new ArgumentNullException("from is a required property for DAGArrayOutputAlias and cannot be null"); + this.ItemsType = itemsType; + + // Set non-required readonly properties with defaultValue + this.Type = "DAGArrayOutputAlias"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "DAGArrayOutputAlias"; + + /// + /// Reference to a file or a task output. Task output must be file. + /// + /// Reference to a file or a task output. Task output must be file. + [DataMember(Name = "from", IsRequired = true, EmitDefaultValue = false)] + public AnyOf From { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + return "DAGArrayOutputAlias"; + } + + /// + /// 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("DAGArrayOutputAlias:\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Annotations: ").Append(Annotations).Append("\n"); + sb.Append(" Description: ").Append(Description).Append("\n"); + sb.Append(" Platform: ").Append(Platform).Append("\n"); + sb.Append(" Handler: ").Append(Handler).Append("\n"); + sb.Append(" Required: ").Append(Required).Append("\n"); + sb.Append(" From: ").Append(From).Append("\n"); + sb.Append(" ItemsType: ").Append(ItemsType).Append("\n"); + return sb.ToString(); + } + + /// + /// Returns the object from JSON string + /// + /// DAGArrayOutputAlias object + public static DAGArrayOutputAlias 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. + /// + /// DAGArrayOutputAlias object + public virtual DAGArrayOutputAlias DuplicateDAGArrayOutputAlias() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateDAGArrayOutputAlias(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override DAGArtifactOutputAlias DuplicateDAGArtifactOutputAlias() + { + return DuplicateDAGArrayOutputAlias(); + } + + /// + /// 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 DAGArrayOutputAlias); + } + + /// + /// Returns true if DAGArrayOutputAlias instances are equal + /// + /// Instance of DAGArrayOutputAlias to be compared + /// Boolean + public bool Equals(DAGArrayOutputAlias input) + { + if (input == null) + return false; + return base.Equals(input) && + ( + this.From == input.From || + (this.From != null && + this.From.Equals(input.From)) + ) && base.Equals(input) && + ( + this.ItemsType == input.ItemsType || + (this.ItemsType != null && + this.ItemsType.Equals(input.ItemsType)) + ) && 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.From != null) + hashCode = hashCode * 59 + this.From.GetHashCode(); + if (this.ItemsType != null) + hashCode = hashCode * 59 + this.ItemsType.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(@"^DAGArrayOutputAlias$", 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/DAGArtifactOutput.cs b/src/PollinationSDK/Model/DAGArtifactOutput.cs new file mode 100644 index 000000000..2e9e87004 --- /dev/null +++ b/src/PollinationSDK/Model/DAGArtifactOutput.cs @@ -0,0 +1,216 @@ +/* + * 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 +{ + /// + /// Base class for DAG artifact outputs. This class add a required input. By default all artifact outputs are required. + /// + [DataContract(Name = "_DAGArtifactOutput")] + public partial class DAGArtifactOutput : DAGGenericOutput, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected DAGArtifactOutput() + { + // Set non-required readonly properties with defaultValue + this.Type = "DAGGenericOutput"; + } + + /// + /// Initializes a new instance of the class. + /// + /// A boolean to indicate if an artifact output is required. A False value makes the artifact optional. (default to true). + /// Output name. (required). + /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. + /// Optional description for output.. + /// Reference to a file or a task output. Task output must be file. (required). + /// A list of additional processes for loading this output on different platforms.. + public DAGArtifactOutput + ( + string name, object from, // Required parameters + Dictionary annotations= default, string description= default, List> alias= default, bool required = true // Optional parameters + ) : base(name: name, annotations: annotations, description: description, from: from, alias: alias)// BaseClass + { + this.Required = required; + + // Set non-required readonly properties with defaultValue + this.Type = "DAGGenericOutput"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "DAGGenericOutput"; + + /// + /// A boolean to indicate if an artifact output is required. A False value makes the artifact optional. + /// + /// A boolean to indicate if an artifact output is required. A False value makes the artifact optional. + [DataMember(Name = "required", EmitDefaultValue = true)] + public bool Required { get; set; } = true; + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + return "DAGArtifactOutput"; + } + + /// + /// 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("DAGArtifactOutput:\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Annotations: ").Append(Annotations).Append("\n"); + sb.Append(" Description: ").Append(Description).Append("\n"); + sb.Append(" From: ").Append(From).Append("\n"); + sb.Append(" Alias: ").Append(Alias).Append("\n"); + sb.Append(" Required: ").Append(Required).Append("\n"); + return sb.ToString(); + } + + /// + /// Returns the object from JSON string + /// + /// DAGArtifactOutput object + public static DAGArtifactOutput 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. + /// + /// DAGArtifactOutput object + public virtual DAGArtifactOutput DuplicateDAGArtifactOutput() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateDAGArtifactOutput(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override DAGGenericOutput DuplicateDAGGenericOutput() + { + return DuplicateDAGArtifactOutput(); + } + + /// + /// 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 DAGArtifactOutput); + } + + /// + /// Returns true if DAGArtifactOutput instances are equal + /// + /// Instance of DAGArtifactOutput to be compared + /// Boolean + public bool Equals(DAGArtifactOutput input) + { + if (input == null) + return false; + return base.Equals(input) && + ( + this.Required == input.Required || + (this.Required != null && + this.Required.Equals(input.Required)) + ) && 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.Required != null) + hashCode = hashCode * 59 + this.Required.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(@"^DAGGenericOutput$", 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/DAGArtifactOutputAlias.cs b/src/PollinationSDK/Model/DAGArtifactOutputAlias.cs new file mode 100644 index 000000000..cd44c810e --- /dev/null +++ b/src/PollinationSDK/Model/DAGArtifactOutputAlias.cs @@ -0,0 +1,226 @@ +/* + * 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 +{ + /// + /// Base class for DAG artifact output aliases. This class add a required input. By default all artifact outputs are required. + /// + [DataContract(Name = "_DAGArtifactOutputAlias")] + public partial class DAGArtifactOutputAlias : DAGGenericOutputAlias, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected DAGArtifactOutputAlias() + { + // Set non-required readonly properties with defaultValue + this.Type = "DAGGenericOutputAlias"; + } + + /// + /// Initializes a new instance of the class. + /// + /// A boolean to indicate if an artifact output is required. A False value makes the artifact optional. (default to true). + /// Output name. (required). + /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. + /// Optional description for output.. + /// 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. (required). + /// List of process actions to process the input or output value. (required). + public DAGArtifactOutputAlias + ( + string name, List platform, List handler, // Required parameters + Dictionary annotations= default, string description= default, bool required = true // Optional parameters + ) : base(name: name, annotations: annotations, description: description, platform: platform, handler: handler)// BaseClass + { + this.Required = required; + + // Set non-required readonly properties with defaultValue + this.Type = "DAGGenericOutputAlias"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "DAGGenericOutputAlias"; + + /// + /// A boolean to indicate if an artifact output is required. A False value makes the artifact optional. + /// + /// A boolean to indicate if an artifact output is required. A False value makes the artifact optional. + [DataMember(Name = "required", EmitDefaultValue = true)] + public bool Required { get; set; } = true; + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + return "DAGArtifactOutputAlias"; + } + + /// + /// 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("DAGArtifactOutputAlias:\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Annotations: ").Append(Annotations).Append("\n"); + sb.Append(" Description: ").Append(Description).Append("\n"); + sb.Append(" Platform: ").Append(Platform).Append("\n"); + sb.Append(" Handler: ").Append(Handler).Append("\n"); + sb.Append(" Required: ").Append(Required).Append("\n"); + return sb.ToString(); + } + + /// + /// Returns the object from JSON string + /// + /// DAGArtifactOutputAlias object + public static DAGArtifactOutputAlias 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. + /// + /// DAGArtifactOutputAlias object + public virtual DAGArtifactOutputAlias DuplicateDAGArtifactOutputAlias() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateDAGArtifactOutputAlias(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override DAGGenericOutputAlias DuplicateDAGGenericOutputAlias() + { + return DuplicateDAGArtifactOutputAlias(); + } + + /// + /// 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 DAGArtifactOutputAlias); + } + + /// + /// Returns true if DAGArtifactOutputAlias instances are equal + /// + /// Instance of DAGArtifactOutputAlias to be compared + /// Boolean + public bool Equals(DAGArtifactOutputAlias input) + { + if (input == null) + return false; + return base.Equals(input) && + ( + this.Required == input.Required || + (this.Required != null && + this.Required.Equals(input.Required)) + ) && 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.Required != null) + hashCode = hashCode * 59 + this.Required.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(@"^DAGGenericOutputAlias$", 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/DAGBooleanInput.cs b/src/PollinationSDK/Model/DAGBooleanInput.cs new file mode 100644 index 000000000..284964b0e --- /dev/null +++ b/src/PollinationSDK/Model/DAGBooleanInput.cs @@ -0,0 +1,256 @@ +/* + * 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 boolean type matches only two special values: True and False. Note that values that evaluate to true or false, such as 1 and 0, are not accepted. You can add additional validation by defining a JSONSchema specification. See http://json-schema.org/understanding-json-schema/reference/boolean.html for more information. + /// + [DataContract(Name = "DAGBooleanInput")] + public partial class DAGBooleanInput : GenericInput, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected DAGBooleanInput() + { + // Set non-required readonly properties with defaultValue + this.Type = "DAGBooleanInput"; + } + + /// + /// Initializes a new instance of the class. + /// + /// Default value to use for an input if a value was not supplied.. + /// A list of aliases for this input in different platforms.. + /// A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. (default to false). + /// An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec.. + /// Input name. (required). + /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. + /// Optional description for input.. + public DAGBooleanInput + ( + string name, // Required parameters + Dictionary annotations= default, string description= default, bool _default= default, List> alias= default, bool required = false, Object spec= default // Optional parameters + ) : base(name: name, annotations: annotations, description: description)// BaseClass + { + this.Default = _default; + this.Alias = alias; + this.Required = required; + this.Spec = spec; + + // Set non-required readonly properties with defaultValue + this.Type = "DAGBooleanInput"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "DAGBooleanInput"; + + /// + /// Default value to use for an input if a value was not supplied. + /// + /// Default value to use for an input if a value was not supplied. + [DataMember(Name = "default", EmitDefaultValue = false)] + public bool Default { get; set; } + /// + /// A list of aliases for this input in different platforms. + /// + /// A list of aliases for this input in different platforms. + [DataMember(Name = "alias", EmitDefaultValue = false)] + public List> Alias { get; set; } + /// + /// A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. + /// + /// A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. + [DataMember(Name = "required", EmitDefaultValue = true)] + public bool Required { get; set; } = false; + /// + /// An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec. + /// + /// An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec. + [DataMember(Name = "spec", EmitDefaultValue = false)] + public Object Spec { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + return "DAGBooleanInput"; + } + + /// + /// 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("DAGBooleanInput:\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Annotations: ").Append(Annotations).Append("\n"); + sb.Append(" Description: ").Append(Description).Append("\n"); + sb.Append(" Default: ").Append(Default).Append("\n"); + sb.Append(" Alias: ").Append(Alias).Append("\n"); + sb.Append(" Required: ").Append(Required).Append("\n"); + sb.Append(" Spec: ").Append(Spec).Append("\n"); + return sb.ToString(); + } + + /// + /// Returns the object from JSON string + /// + /// DAGBooleanInput object + public static DAGBooleanInput 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. + /// + /// DAGBooleanInput object + public virtual DAGBooleanInput DuplicateDAGBooleanInput() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateDAGBooleanInput(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override GenericInput DuplicateGenericInput() + { + return DuplicateDAGBooleanInput(); + } + + /// + /// 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 DAGBooleanInput); + } + + /// + /// Returns true if DAGBooleanInput instances are equal + /// + /// Instance of DAGBooleanInput to be compared + /// Boolean + public bool Equals(DAGBooleanInput input) + { + if (input == null) + return false; + return base.Equals(input) && + ( + this.Default == input.Default || + (this.Default != null && + this.Default.Equals(input.Default)) + ) && base.Equals(input) && + ( + this.Alias == input.Alias || + this.Alias != null && + input.Alias != null && + this.Alias.SequenceEqual(input.Alias) + ) && base.Equals(input) && + ( + this.Required == input.Required || + (this.Required != null && + this.Required.Equals(input.Required)) + ) && 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.Default != null) + hashCode = hashCode * 59 + this.Default.GetHashCode(); + if (this.Alias != null) + hashCode = hashCode * 59 + this.Alias.GetHashCode(); + if (this.Required != null) + hashCode = hashCode * 59 + this.Required.GetHashCode(); + if (this.Spec != null) + hashCode = hashCode * 59 + this.Spec.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(@"^DAGBooleanInput$", 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/DAGBooleanInputAlias.cs b/src/PollinationSDK/Model/DAGBooleanInputAlias.cs new file mode 100644 index 000000000..660746da6 --- /dev/null +++ b/src/PollinationSDK/Model/DAGBooleanInputAlias.cs @@ -0,0 +1,275 @@ +/* + * 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 boolean type matches only two special values: True and False. Note that values that evaluate to true or false, such as 1 and 0, are not accepted. You can add additional validation by defining a JSONSchema specification. See http://json-schema.org/understanding-json-schema/reference/boolean.html for more information. + /// + [DataContract(Name = "DAGBooleanInputAlias")] + public partial class DAGBooleanInputAlias : GenericInput, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected DAGBooleanInputAlias() + { + // Set non-required readonly properties with defaultValue + this.Type = "DAGBooleanInputAlias"; + } + + /// + /// Initializes a new instance of the class. + /// + /// 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. (required). + /// List of process actions to process the input or output value. (required). + /// Default value to use for an input if a value was not supplied.. + /// A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. (default to false). + /// An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec.. + /// Input name. (required). + /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. + /// Optional description for input.. + public DAGBooleanInputAlias + ( + string name, List platform, List handler, // Required parameters + Dictionary annotations= default, string description= default, bool _default= default, bool required = false, Object spec= default // Optional parameters + ) : base(name: name, annotations: annotations, description: description)// BaseClass + { + // to ensure "platform" is required (not null) + this.Platform = platform ?? throw new ArgumentNullException("platform is a required property for DAGBooleanInputAlias and cannot be null"); + // to ensure "handler" is required (not null) + this.Handler = handler ?? throw new ArgumentNullException("handler is a required property for DAGBooleanInputAlias and cannot be null"); + this.Default = _default; + this.Required = required; + this.Spec = spec; + + // Set non-required readonly properties with defaultValue + this.Type = "DAGBooleanInputAlias"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "DAGBooleanInputAlias"; + + /// + /// 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. + /// + /// 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. + [DataMember(Name = "platform", IsRequired = true, EmitDefaultValue = false)] + public List Platform { get; set; } + /// + /// List of process actions to process the input or output value. + /// + /// List of process actions to process the input or output value. + [DataMember(Name = "handler", IsRequired = true, EmitDefaultValue = false)] + public List Handler { get; set; } + /// + /// Default value to use for an input if a value was not supplied. + /// + /// Default value to use for an input if a value was not supplied. + [DataMember(Name = "default", EmitDefaultValue = false)] + public bool Default { get; set; } + /// + /// A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. + /// + /// A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. + [DataMember(Name = "required", EmitDefaultValue = true)] + public bool Required { get; set; } = false; + /// + /// An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec. + /// + /// An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec. + [DataMember(Name = "spec", EmitDefaultValue = false)] + public Object Spec { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + return "DAGBooleanInputAlias"; + } + + /// + /// 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("DAGBooleanInputAlias:\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Annotations: ").Append(Annotations).Append("\n"); + sb.Append(" Description: ").Append(Description).Append("\n"); + sb.Append(" Platform: ").Append(Platform).Append("\n"); + sb.Append(" Handler: ").Append(Handler).Append("\n"); + sb.Append(" Default: ").Append(Default).Append("\n"); + sb.Append(" Required: ").Append(Required).Append("\n"); + sb.Append(" Spec: ").Append(Spec).Append("\n"); + return sb.ToString(); + } + + /// + /// Returns the object from JSON string + /// + /// DAGBooleanInputAlias object + public static DAGBooleanInputAlias 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. + /// + /// DAGBooleanInputAlias object + public virtual DAGBooleanInputAlias DuplicateDAGBooleanInputAlias() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateDAGBooleanInputAlias(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override GenericInput DuplicateGenericInput() + { + return DuplicateDAGBooleanInputAlias(); + } + + /// + /// 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 DAGBooleanInputAlias); + } + + /// + /// Returns true if DAGBooleanInputAlias instances are equal + /// + /// Instance of DAGBooleanInputAlias to be compared + /// Boolean + public bool Equals(DAGBooleanInputAlias input) + { + if (input == null) + return false; + return base.Equals(input) && + ( + this.Platform == input.Platform || + this.Platform != null && + input.Platform != null && + this.Platform.SequenceEqual(input.Platform) + ) && base.Equals(input) && + ( + this.Handler == input.Handler || + this.Handler != null && + input.Handler != null && + this.Handler.SequenceEqual(input.Handler) + ) && base.Equals(input) && + ( + this.Default == input.Default || + (this.Default != null && + this.Default.Equals(input.Default)) + ) && base.Equals(input) && + ( + this.Required == input.Required || + (this.Required != null && + this.Required.Equals(input.Required)) + ) && 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.Platform != null) + hashCode = hashCode * 59 + this.Platform.GetHashCode(); + if (this.Handler != null) + hashCode = hashCode * 59 + this.Handler.GetHashCode(); + if (this.Default != null) + hashCode = hashCode * 59 + this.Default.GetHashCode(); + if (this.Required != null) + hashCode = hashCode * 59 + this.Required.GetHashCode(); + if (this.Spec != null) + hashCode = hashCode * 59 + this.Spec.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(@"^DAGBooleanInputAlias$", 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/DAGBooleanOutput.cs b/src/PollinationSDK/Model/DAGBooleanOutput.cs new file mode 100644 index 000000000..6c0ac5e36 --- /dev/null +++ b/src/PollinationSDK/Model/DAGBooleanOutput.cs @@ -0,0 +1,246 @@ +/* + * 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 +{ + /// + /// DAG boolean output. This output loads the content from a file as a boolean. + /// + [DataContract(Name = "DAGBooleanOutput")] + public partial class DAGBooleanOutput : GenericOutput, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected DAGBooleanOutput() + { + // Set non-required readonly properties with defaultValue + this.Type = "DAGBooleanOutput"; + } + + /// + /// Initializes a new instance of the class. + /// + /// Reference to a file or a task output. Task output must be file. (required). + /// A list of additional processes for loading this output on different platforms.. + /// A boolean to indicate if an artifact output is required. A False value makes the artifact optional. (default to true). + /// Output name. (required). + /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. + /// Optional description for output.. + public DAGBooleanOutput + ( + string name, AnyOf from, // Required parameters + Dictionary annotations= default, string description= default, List> alias= default, bool required = true // Optional parameters + ) : base(name: name, annotations: annotations, description: description)// BaseClass + { + // to ensure "from" is required (not null) + this.From = from ?? throw new ArgumentNullException("from is a required property for DAGBooleanOutput and cannot be null"); + this.Alias = alias; + this.Required = required; + + // Set non-required readonly properties with defaultValue + this.Type = "DAGBooleanOutput"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "DAGBooleanOutput"; + + /// + /// Reference to a file or a task output. Task output must be file. + /// + /// Reference to a file or a task output. Task output must be file. + [DataMember(Name = "from", IsRequired = true, EmitDefaultValue = false)] + public AnyOf From { get; set; } + /// + /// A list of additional processes for loading this output on different platforms. + /// + /// A list of additional processes for loading this output on different platforms. + [DataMember(Name = "alias", EmitDefaultValue = false)] + public List> Alias { get; set; } + /// + /// A boolean to indicate if an artifact output is required. A False value makes the artifact optional. + /// + /// A boolean to indicate if an artifact output is required. A False value makes the artifact optional. + [DataMember(Name = "required", EmitDefaultValue = true)] + public bool Required { get; set; } = true; + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + return "DAGBooleanOutput"; + } + + /// + /// 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("DAGBooleanOutput:\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Annotations: ").Append(Annotations).Append("\n"); + sb.Append(" Description: ").Append(Description).Append("\n"); + sb.Append(" From: ").Append(From).Append("\n"); + sb.Append(" Alias: ").Append(Alias).Append("\n"); + sb.Append(" Required: ").Append(Required).Append("\n"); + return sb.ToString(); + } + + /// + /// Returns the object from JSON string + /// + /// DAGBooleanOutput object + public static DAGBooleanOutput 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. + /// + /// DAGBooleanOutput object + public virtual DAGBooleanOutput DuplicateDAGBooleanOutput() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateDAGBooleanOutput(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override GenericOutput DuplicateGenericOutput() + { + return DuplicateDAGBooleanOutput(); + } + + /// + /// 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 DAGBooleanOutput); + } + + /// + /// Returns true if DAGBooleanOutput instances are equal + /// + /// Instance of DAGBooleanOutput to be compared + /// Boolean + public bool Equals(DAGBooleanOutput input) + { + if (input == null) + return false; + return base.Equals(input) && + ( + this.From == input.From || + (this.From != null && + this.From.Equals(input.From)) + ) && base.Equals(input) && + ( + this.Alias == input.Alias || + this.Alias != null && + input.Alias != null && + this.Alias.SequenceEqual(input.Alias) + ) && base.Equals(input) && + ( + this.Required == input.Required || + (this.Required != null && + this.Required.Equals(input.Required)) + ) && 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.From != null) + hashCode = hashCode * 59 + this.From.GetHashCode(); + if (this.Alias != null) + hashCode = hashCode * 59 + this.Alias.GetHashCode(); + if (this.Required != null) + hashCode = hashCode * 59 + this.Required.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(@"^DAGBooleanOutput$", 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/DAGBooleanOutputAlias.cs b/src/PollinationSDK/Model/DAGBooleanOutputAlias.cs new file mode 100644 index 000000000..548df0bae --- /dev/null +++ b/src/PollinationSDK/Model/DAGBooleanOutputAlias.cs @@ -0,0 +1,219 @@ +/* + * 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 +{ + /// + /// DAG alias boolean output. This output loads the content from a file as a boolean. + /// + [DataContract(Name = "DAGBooleanOutputAlias")] + public partial class DAGBooleanOutputAlias : DAGArtifactOutputAlias, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected DAGBooleanOutputAlias() + { + // Set non-required readonly properties with defaultValue + this.Type = "DAGBooleanOutputAlias"; + } + + /// + /// Initializes a new instance of the class. + /// + /// Reference to a file or a task output. Task output must be file. (required). + /// Output name. (required). + /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. + /// Optional description for output.. + /// 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. (required). + /// List of process actions to process the input or output value. (required). + /// A boolean to indicate if an artifact output is required. A False value makes the artifact optional. (default to true). + public DAGBooleanOutputAlias + ( + string name, List platform, List handler, AnyOf from, // Required parameters + Dictionary annotations= default, string description= default, bool required = true // Optional parameters + ) : base(name: name, annotations: annotations, description: description, platform: platform, handler: handler, required: required)// BaseClass + { + // to ensure "from" is required (not null) + this.From = from ?? throw new ArgumentNullException("from is a required property for DAGBooleanOutputAlias and cannot be null"); + + // Set non-required readonly properties with defaultValue + this.Type = "DAGBooleanOutputAlias"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "DAGBooleanOutputAlias"; + + /// + /// Reference to a file or a task output. Task output must be file. + /// + /// Reference to a file or a task output. Task output must be file. + [DataMember(Name = "from", IsRequired = true, EmitDefaultValue = false)] + public AnyOf From { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + return "DAGBooleanOutputAlias"; + } + + /// + /// 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("DAGBooleanOutputAlias:\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Annotations: ").Append(Annotations).Append("\n"); + sb.Append(" Description: ").Append(Description).Append("\n"); + sb.Append(" Platform: ").Append(Platform).Append("\n"); + sb.Append(" Handler: ").Append(Handler).Append("\n"); + sb.Append(" Required: ").Append(Required).Append("\n"); + sb.Append(" From: ").Append(From).Append("\n"); + return sb.ToString(); + } + + /// + /// Returns the object from JSON string + /// + /// DAGBooleanOutputAlias object + public static DAGBooleanOutputAlias 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. + /// + /// DAGBooleanOutputAlias object + public virtual DAGBooleanOutputAlias DuplicateDAGBooleanOutputAlias() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateDAGBooleanOutputAlias(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override DAGArtifactOutputAlias DuplicateDAGArtifactOutputAlias() + { + return DuplicateDAGBooleanOutputAlias(); + } + + /// + /// 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 DAGBooleanOutputAlias); + } + + /// + /// Returns true if DAGBooleanOutputAlias instances are equal + /// + /// Instance of DAGBooleanOutputAlias to be compared + /// Boolean + public bool Equals(DAGBooleanOutputAlias input) + { + if (input == null) + return false; + return base.Equals(input) && + ( + this.From == input.From || + (this.From != null && + this.From.Equals(input.From)) + ) && 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.From != null) + hashCode = hashCode * 59 + this.From.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(@"^DAGBooleanOutputAlias$", 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/DAGFileInput.cs b/src/PollinationSDK/Model/DAGFileInput.cs new file mode 100644 index 000000000..0bd55e651 --- /dev/null +++ b/src/PollinationSDK/Model/DAGFileInput.cs @@ -0,0 +1,273 @@ +/* + * 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 file input. File is a special string input. Unlike other string inputs, a file will be copied from its location to execution folder when a workflow is executed. You can add additional validation by defining a JSONSchema specification. See http://json-schema.org/understanding-json-schema/reference/string.html#string for more information. .. code-block:: python # a file with maximum 50 characters with an ``epw`` extension. \"schema\": { \"type\": \"string\", \"maxLength\": 50, \"pattern\": \"(?i)(^.*\\.epw$)\" } + /// + [DataContract(Name = "DAGFileInput")] + public partial class DAGFileInput : GenericInput, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected DAGFileInput() + { + // Set non-required readonly properties with defaultValue + this.Type = "DAGFileInput"; + } + + /// + /// Initializes a new instance of the class. + /// + /// The default source for file if the value is not provided.. + /// A list of aliases for this input in different platforms.. + /// A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. (default to false). + /// An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec.. + /// Optional list of extensions for file. The check for extension is case-insensitive.. + /// Input name. (required). + /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. + /// Optional description for input.. + public DAGFileInput + ( + string name, // Required parameters + Dictionary annotations= default, string description= default, AnyOf _default= default, List> alias= default, bool required = false, Object spec= default, List extensions= default // Optional parameters + ) : base(name: name, annotations: annotations, description: description)// BaseClass + { + this.Default = _default; + this.Alias = alias; + this.Required = required; + this.Spec = spec; + this.Extensions = extensions; + + // Set non-required readonly properties with defaultValue + this.Type = "DAGFileInput"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "DAGFileInput"; + + /// + /// The default source for file if the value is not provided. + /// + /// The default source for file if the value is not provided. + [DataMember(Name = "default", EmitDefaultValue = false)] + public AnyOf Default { get; set; } + /// + /// A list of aliases for this input in different platforms. + /// + /// A list of aliases for this input in different platforms. + [DataMember(Name = "alias", EmitDefaultValue = false)] + public List> Alias { get; set; } + /// + /// A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. + /// + /// A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. + [DataMember(Name = "required", EmitDefaultValue = true)] + public bool Required { get; set; } = false; + /// + /// An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec. + /// + /// An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec. + [DataMember(Name = "spec", EmitDefaultValue = false)] + public Object Spec { get; set; } + /// + /// Optional list of extensions for file. The check for extension is case-insensitive. + /// + /// Optional list of extensions for file. The check for extension is case-insensitive. + [DataMember(Name = "extensions", EmitDefaultValue = false)] + public List Extensions { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + return "DAGFileInput"; + } + + /// + /// 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("DAGFileInput:\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Annotations: ").Append(Annotations).Append("\n"); + sb.Append(" Description: ").Append(Description).Append("\n"); + sb.Append(" Default: ").Append(Default).Append("\n"); + sb.Append(" Alias: ").Append(Alias).Append("\n"); + sb.Append(" Required: ").Append(Required).Append("\n"); + sb.Append(" Spec: ").Append(Spec).Append("\n"); + sb.Append(" Extensions: ").Append(Extensions).Append("\n"); + return sb.ToString(); + } + + /// + /// Returns the object from JSON string + /// + /// DAGFileInput object + public static DAGFileInput 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. + /// + /// DAGFileInput object + public virtual DAGFileInput DuplicateDAGFileInput() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateDAGFileInput(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override GenericInput DuplicateGenericInput() + { + return DuplicateDAGFileInput(); + } + + /// + /// 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 DAGFileInput); + } + + /// + /// Returns true if DAGFileInput instances are equal + /// + /// Instance of DAGFileInput to be compared + /// Boolean + public bool Equals(DAGFileInput input) + { + if (input == null) + return false; + return base.Equals(input) && + ( + this.Default == input.Default || + (this.Default != null && + this.Default.Equals(input.Default)) + ) && base.Equals(input) && + ( + this.Alias == input.Alias || + this.Alias != null && + input.Alias != null && + this.Alias.SequenceEqual(input.Alias) + ) && base.Equals(input) && + ( + this.Required == input.Required || + (this.Required != null && + this.Required.Equals(input.Required)) + ) && base.Equals(input) && + ( + this.Extensions == input.Extensions || + this.Extensions != null && + input.Extensions != null && + this.Extensions.SequenceEqual(input.Extensions) + ) && 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.Default != null) + hashCode = hashCode * 59 + this.Default.GetHashCode(); + if (this.Alias != null) + hashCode = hashCode * 59 + this.Alias.GetHashCode(); + if (this.Required != null) + hashCode = hashCode * 59 + this.Required.GetHashCode(); + if (this.Spec != null) + hashCode = hashCode * 59 + this.Spec.GetHashCode(); + if (this.Extensions != null) + hashCode = hashCode * 59 + this.Extensions.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(@"^DAGFileInput$", 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/DAGFileInputAlias.cs b/src/PollinationSDK/Model/DAGFileInputAlias.cs new file mode 100644 index 000000000..5441a73b8 --- /dev/null +++ b/src/PollinationSDK/Model/DAGFileInputAlias.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 +{ + /// + /// An alias file input. File is a special string input. Unlike other string inputs, a file will be copied from its location to execution folder when a workflow is executed. You can add additional validation by defining a JSONSchema specification. See http://json-schema.org/understanding-json-schema/reference/string.html#string for more information. .. code-block:: python # a file with maximum 50 characters with an ``epw`` extension. \"schema\": { \"type\": \"string\", \"maxLength\": 50, \"pattern\": \"(?i)(^.*\\.epw$)\" } + /// + [DataContract(Name = "DAGFileInputAlias")] + public partial class DAGFileInputAlias : GenericInput, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected DAGFileInputAlias() + { + // Set non-required readonly properties with defaultValue + this.Type = "DAGFileInputAlias"; + } + + /// + /// Initializes a new instance of the class. + /// + /// 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. (required). + /// List of process actions to process the input or output value. (required). + /// The default source for file if the value is not provided.. + /// A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. (default to false). + /// An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec.. + /// Optional list of extensions for file. The check for extension is case-insensitive.. + /// Input name. (required). + /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. + /// Optional description for input.. + public DAGFileInputAlias + ( + string name, List platform, List handler, // Required parameters + Dictionary annotations= default, string description= default, AnyOf _default= default, bool required = false, Object spec= default, List extensions= default // Optional parameters + ) : base(name: name, annotations: annotations, description: description)// BaseClass + { + // to ensure "platform" is required (not null) + this.Platform = platform ?? throw new ArgumentNullException("platform is a required property for DAGFileInputAlias and cannot be null"); + // to ensure "handler" is required (not null) + this.Handler = handler ?? throw new ArgumentNullException("handler is a required property for DAGFileInputAlias and cannot be null"); + this.Default = _default; + this.Required = required; + this.Spec = spec; + this.Extensions = extensions; + + // Set non-required readonly properties with defaultValue + this.Type = "DAGFileInputAlias"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "DAGFileInputAlias"; + + /// + /// 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. + /// + /// 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. + [DataMember(Name = "platform", IsRequired = true, EmitDefaultValue = false)] + public List Platform { get; set; } + /// + /// List of process actions to process the input or output value. + /// + /// List of process actions to process the input or output value. + [DataMember(Name = "handler", IsRequired = true, EmitDefaultValue = false)] + public List Handler { get; set; } + /// + /// The default source for file if the value is not provided. + /// + /// The default source for file if the value is not provided. + [DataMember(Name = "default", EmitDefaultValue = false)] + public AnyOf Default { get; set; } + /// + /// A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. + /// + /// A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. + [DataMember(Name = "required", EmitDefaultValue = true)] + public bool Required { get; set; } = false; + /// + /// An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec. + /// + /// An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec. + [DataMember(Name = "spec", EmitDefaultValue = false)] + public Object Spec { get; set; } + /// + /// Optional list of extensions for file. The check for extension is case-insensitive. + /// + /// Optional list of extensions for file. The check for extension is case-insensitive. + [DataMember(Name = "extensions", EmitDefaultValue = false)] + public List Extensions { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + return "DAGFileInputAlias"; + } + + /// + /// 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("DAGFileInputAlias:\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Annotations: ").Append(Annotations).Append("\n"); + sb.Append(" Description: ").Append(Description).Append("\n"); + sb.Append(" Platform: ").Append(Platform).Append("\n"); + sb.Append(" Handler: ").Append(Handler).Append("\n"); + sb.Append(" Default: ").Append(Default).Append("\n"); + sb.Append(" Required: ").Append(Required).Append("\n"); + sb.Append(" Spec: ").Append(Spec).Append("\n"); + sb.Append(" Extensions: ").Append(Extensions).Append("\n"); + return sb.ToString(); + } + + /// + /// Returns the object from JSON string + /// + /// DAGFileInputAlias object + public static DAGFileInputAlias 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. + /// + /// DAGFileInputAlias object + public virtual DAGFileInputAlias DuplicateDAGFileInputAlias() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateDAGFileInputAlias(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override GenericInput DuplicateGenericInput() + { + return DuplicateDAGFileInputAlias(); + } + + /// + /// 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 DAGFileInputAlias); + } + + /// + /// Returns true if DAGFileInputAlias instances are equal + /// + /// Instance of DAGFileInputAlias to be compared + /// Boolean + public bool Equals(DAGFileInputAlias input) + { + if (input == null) + return false; + return base.Equals(input) && + ( + this.Platform == input.Platform || + this.Platform != null && + input.Platform != null && + this.Platform.SequenceEqual(input.Platform) + ) && base.Equals(input) && + ( + this.Handler == input.Handler || + this.Handler != null && + input.Handler != null && + this.Handler.SequenceEqual(input.Handler) + ) && base.Equals(input) && + ( + this.Default == input.Default || + (this.Default != null && + this.Default.Equals(input.Default)) + ) && base.Equals(input) && + ( + this.Required == input.Required || + (this.Required != null && + this.Required.Equals(input.Required)) + ) && base.Equals(input) && + ( + this.Extensions == input.Extensions || + this.Extensions != null && + input.Extensions != null && + this.Extensions.SequenceEqual(input.Extensions) + ) && 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.Platform != null) + hashCode = hashCode * 59 + this.Platform.GetHashCode(); + if (this.Handler != null) + hashCode = hashCode * 59 + this.Handler.GetHashCode(); + if (this.Default != null) + hashCode = hashCode * 59 + this.Default.GetHashCode(); + if (this.Required != null) + hashCode = hashCode * 59 + this.Required.GetHashCode(); + if (this.Spec != null) + hashCode = hashCode * 59 + this.Spec.GetHashCode(); + if (this.Extensions != null) + hashCode = hashCode * 59 + this.Extensions.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(@"^DAGFileInputAlias$", 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/DAGFileOutput.cs b/src/PollinationSDK/Model/DAGFileOutput.cs new file mode 100644 index 000000000..992989a5d --- /dev/null +++ b/src/PollinationSDK/Model/DAGFileOutput.cs @@ -0,0 +1,246 @@ +/* + * 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 +{ + /// + /// DAG file output. + /// + [DataContract(Name = "DAGFileOutput")] + public partial class DAGFileOutput : GenericOutput, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected DAGFileOutput() + { + // Set non-required readonly properties with defaultValue + this.Type = "DAGFileOutput"; + } + + /// + /// Initializes a new instance of the class. + /// + /// Reference to a file or a task output. Task output must be file. (required). + /// A list of additional processes for loading this output on different platforms.. + /// A boolean to indicate if an artifact output is required. A False value makes the artifact optional. (default to true). + /// Output name. (required). + /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. + /// Optional description for output.. + public DAGFileOutput + ( + string name, AnyOf from, // Required parameters + Dictionary annotations= default, string description= default, List> alias= default, bool required = true // Optional parameters + ) : base(name: name, annotations: annotations, description: description)// BaseClass + { + // to ensure "from" is required (not null) + this.From = from ?? throw new ArgumentNullException("from is a required property for DAGFileOutput and cannot be null"); + this.Alias = alias; + this.Required = required; + + // Set non-required readonly properties with defaultValue + this.Type = "DAGFileOutput"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "DAGFileOutput"; + + /// + /// Reference to a file or a task output. Task output must be file. + /// + /// Reference to a file or a task output. Task output must be file. + [DataMember(Name = "from", IsRequired = true, EmitDefaultValue = false)] + public AnyOf From { get; set; } + /// + /// A list of additional processes for loading this output on different platforms. + /// + /// A list of additional processes for loading this output on different platforms. + [DataMember(Name = "alias", EmitDefaultValue = false)] + public List> Alias { get; set; } + /// + /// A boolean to indicate if an artifact output is required. A False value makes the artifact optional. + /// + /// A boolean to indicate if an artifact output is required. A False value makes the artifact optional. + [DataMember(Name = "required", EmitDefaultValue = true)] + public bool Required { get; set; } = true; + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + return "DAGFileOutput"; + } + + /// + /// 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("DAGFileOutput:\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Annotations: ").Append(Annotations).Append("\n"); + sb.Append(" Description: ").Append(Description).Append("\n"); + sb.Append(" From: ").Append(From).Append("\n"); + sb.Append(" Alias: ").Append(Alias).Append("\n"); + sb.Append(" Required: ").Append(Required).Append("\n"); + return sb.ToString(); + } + + /// + /// Returns the object from JSON string + /// + /// DAGFileOutput object + public static DAGFileOutput 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. + /// + /// DAGFileOutput object + public virtual DAGFileOutput DuplicateDAGFileOutput() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateDAGFileOutput(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override GenericOutput DuplicateGenericOutput() + { + return DuplicateDAGFileOutput(); + } + + /// + /// 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 DAGFileOutput); + } + + /// + /// Returns true if DAGFileOutput instances are equal + /// + /// Instance of DAGFileOutput to be compared + /// Boolean + public bool Equals(DAGFileOutput input) + { + if (input == null) + return false; + return base.Equals(input) && + ( + this.From == input.From || + (this.From != null && + this.From.Equals(input.From)) + ) && base.Equals(input) && + ( + this.Alias == input.Alias || + this.Alias != null && + input.Alias != null && + this.Alias.SequenceEqual(input.Alias) + ) && base.Equals(input) && + ( + this.Required == input.Required || + (this.Required != null && + this.Required.Equals(input.Required)) + ) && 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.From != null) + hashCode = hashCode * 59 + this.From.GetHashCode(); + if (this.Alias != null) + hashCode = hashCode * 59 + this.Alias.GetHashCode(); + if (this.Required != null) + hashCode = hashCode * 59 + this.Required.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(@"^DAGFileOutput$", 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/DAGFileOutputAlias.cs b/src/PollinationSDK/Model/DAGFileOutputAlias.cs new file mode 100644 index 000000000..ed3217e4e --- /dev/null +++ b/src/PollinationSDK/Model/DAGFileOutputAlias.cs @@ -0,0 +1,219 @@ +/* + * 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 +{ + /// + /// DAG alias file output. + /// + [DataContract(Name = "DAGFileOutputAlias")] + public partial class DAGFileOutputAlias : DAGArtifactOutputAlias, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected DAGFileOutputAlias() + { + // Set non-required readonly properties with defaultValue + this.Type = "DAGFileOutputAlias"; + } + + /// + /// Initializes a new instance of the class. + /// + /// Reference to a file or a task output. Task output must be file. (required). + /// Output name. (required). + /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. + /// Optional description for output.. + /// 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. (required). + /// List of process actions to process the input or output value. (required). + /// A boolean to indicate if an artifact output is required. A False value makes the artifact optional. (default to true). + public DAGFileOutputAlias + ( + string name, List platform, List handler, AnyOf from, // Required parameters + Dictionary annotations= default, string description= default, bool required = true // Optional parameters + ) : base(name: name, annotations: annotations, description: description, platform: platform, handler: handler, required: required)// BaseClass + { + // to ensure "from" is required (not null) + this.From = from ?? throw new ArgumentNullException("from is a required property for DAGFileOutputAlias and cannot be null"); + + // Set non-required readonly properties with defaultValue + this.Type = "DAGFileOutputAlias"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "DAGFileOutputAlias"; + + /// + /// Reference to a file or a task output. Task output must be file. + /// + /// Reference to a file or a task output. Task output must be file. + [DataMember(Name = "from", IsRequired = true, EmitDefaultValue = false)] + public AnyOf From { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + return "DAGFileOutputAlias"; + } + + /// + /// 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("DAGFileOutputAlias:\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Annotations: ").Append(Annotations).Append("\n"); + sb.Append(" Description: ").Append(Description).Append("\n"); + sb.Append(" Platform: ").Append(Platform).Append("\n"); + sb.Append(" Handler: ").Append(Handler).Append("\n"); + sb.Append(" Required: ").Append(Required).Append("\n"); + sb.Append(" From: ").Append(From).Append("\n"); + return sb.ToString(); + } + + /// + /// Returns the object from JSON string + /// + /// DAGFileOutputAlias object + public static DAGFileOutputAlias 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. + /// + /// DAGFileOutputAlias object + public virtual DAGFileOutputAlias DuplicateDAGFileOutputAlias() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateDAGFileOutputAlias(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override DAGArtifactOutputAlias DuplicateDAGArtifactOutputAlias() + { + return DuplicateDAGFileOutputAlias(); + } + + /// + /// 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 DAGFileOutputAlias); + } + + /// + /// Returns true if DAGFileOutputAlias instances are equal + /// + /// Instance of DAGFileOutputAlias to be compared + /// Boolean + public bool Equals(DAGFileOutputAlias input) + { + if (input == null) + return false; + return base.Equals(input) && + ( + this.From == input.From || + (this.From != null && + this.From.Equals(input.From)) + ) && 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.From != null) + hashCode = hashCode * 59 + this.From.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(@"^DAGFileOutputAlias$", 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/DAGFolderInput.cs b/src/PollinationSDK/Model/DAGFolderInput.cs new file mode 100644 index 000000000..6de36587a --- /dev/null +++ b/src/PollinationSDK/Model/DAGFolderInput.cs @@ -0,0 +1,256 @@ +/* + * 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 folder input. Folder is a special string input. Unlike other string inputs, a folder will be copied from its location to execution folder when a workflow is executed. You can add additional validation by defining a JSONSchema specification. See http://json-schema.org/understanding-json-schema/reference/string.html#string for more information. .. code-block:: python \"schema\": { \"type\": \"string\", \"maxLength\": 50, } + /// + [DataContract(Name = "DAGFolderInput")] + public partial class DAGFolderInput : GenericInput, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected DAGFolderInput() + { + // Set non-required readonly properties with defaultValue + this.Type = "DAGFolderInput"; + } + + /// + /// Initializes a new instance of the class. + /// + /// The default source for file if the value is not provided.. + /// A list of aliases for this input in different platforms.. + /// A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. (default to false). + /// An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec.. + /// Input name. (required). + /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. + /// Optional description for input.. + public DAGFolderInput + ( + string name, // Required parameters + Dictionary annotations= default, string description= default, AnyOf _default= default, List> alias= default, bool required = false, Object spec= default // Optional parameters + ) : base(name: name, annotations: annotations, description: description)// BaseClass + { + this.Default = _default; + this.Alias = alias; + this.Required = required; + this.Spec = spec; + + // Set non-required readonly properties with defaultValue + this.Type = "DAGFolderInput"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "DAGFolderInput"; + + /// + /// The default source for file if the value is not provided. + /// + /// The default source for file if the value is not provided. + [DataMember(Name = "default", EmitDefaultValue = false)] + public AnyOf Default { get; set; } + /// + /// A list of aliases for this input in different platforms. + /// + /// A list of aliases for this input in different platforms. + [DataMember(Name = "alias", EmitDefaultValue = false)] + public List> Alias { get; set; } + /// + /// A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. + /// + /// A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. + [DataMember(Name = "required", EmitDefaultValue = true)] + public bool Required { get; set; } = false; + /// + /// An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec. + /// + /// An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec. + [DataMember(Name = "spec", EmitDefaultValue = false)] + public Object Spec { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + return "DAGFolderInput"; + } + + /// + /// 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("DAGFolderInput:\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Annotations: ").Append(Annotations).Append("\n"); + sb.Append(" Description: ").Append(Description).Append("\n"); + sb.Append(" Default: ").Append(Default).Append("\n"); + sb.Append(" Alias: ").Append(Alias).Append("\n"); + sb.Append(" Required: ").Append(Required).Append("\n"); + sb.Append(" Spec: ").Append(Spec).Append("\n"); + return sb.ToString(); + } + + /// + /// Returns the object from JSON string + /// + /// DAGFolderInput object + public static DAGFolderInput 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. + /// + /// DAGFolderInput object + public virtual DAGFolderInput DuplicateDAGFolderInput() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateDAGFolderInput(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override GenericInput DuplicateGenericInput() + { + return DuplicateDAGFolderInput(); + } + + /// + /// 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 DAGFolderInput); + } + + /// + /// Returns true if DAGFolderInput instances are equal + /// + /// Instance of DAGFolderInput to be compared + /// Boolean + public bool Equals(DAGFolderInput input) + { + if (input == null) + return false; + return base.Equals(input) && + ( + this.Default == input.Default || + (this.Default != null && + this.Default.Equals(input.Default)) + ) && base.Equals(input) && + ( + this.Alias == input.Alias || + this.Alias != null && + input.Alias != null && + this.Alias.SequenceEqual(input.Alias) + ) && base.Equals(input) && + ( + this.Required == input.Required || + (this.Required != null && + this.Required.Equals(input.Required)) + ) && 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.Default != null) + hashCode = hashCode * 59 + this.Default.GetHashCode(); + if (this.Alias != null) + hashCode = hashCode * 59 + this.Alias.GetHashCode(); + if (this.Required != null) + hashCode = hashCode * 59 + this.Required.GetHashCode(); + if (this.Spec != null) + hashCode = hashCode * 59 + this.Spec.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(@"^DAGFolderInput$", 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/DAGFolderInputAlias.cs b/src/PollinationSDK/Model/DAGFolderInputAlias.cs new file mode 100644 index 000000000..3034e3d12 --- /dev/null +++ b/src/PollinationSDK/Model/DAGFolderInputAlias.cs @@ -0,0 +1,275 @@ +/* + * 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 alias folder input. Folder is a special string input. Unlike other string inputs, a folder will be copied from its location to execution folder when a workflow is executed. You can add additional validation by defining a JSONSchema specification. See http://json-schema.org/understanding-json-schema/reference/string.html#string for more information. .. code-block:: python \"schema\": { \"type\": \"string\", \"maxLength\": 50, } + /// + [DataContract(Name = "DAGFolderInputAlias")] + public partial class DAGFolderInputAlias : GenericInput, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected DAGFolderInputAlias() + { + // Set non-required readonly properties with defaultValue + this.Type = "DAGFolderInputAlias"; + } + + /// + /// Initializes a new instance of the class. + /// + /// 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. (required). + /// List of process actions to process the input or output value. (required). + /// The default source for file if the value is not provided.. + /// A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. (default to false). + /// An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec.. + /// Input name. (required). + /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. + /// Optional description for input.. + public DAGFolderInputAlias + ( + string name, List platform, List handler, // Required parameters + Dictionary annotations= default, string description= default, AnyOf _default= default, bool required = false, Object spec= default // Optional parameters + ) : base(name: name, annotations: annotations, description: description)// BaseClass + { + // to ensure "platform" is required (not null) + this.Platform = platform ?? throw new ArgumentNullException("platform is a required property for DAGFolderInputAlias and cannot be null"); + // to ensure "handler" is required (not null) + this.Handler = handler ?? throw new ArgumentNullException("handler is a required property for DAGFolderInputAlias and cannot be null"); + this.Default = _default; + this.Required = required; + this.Spec = spec; + + // Set non-required readonly properties with defaultValue + this.Type = "DAGFolderInputAlias"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "DAGFolderInputAlias"; + + /// + /// 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. + /// + /// 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. + [DataMember(Name = "platform", IsRequired = true, EmitDefaultValue = false)] + public List Platform { get; set; } + /// + /// List of process actions to process the input or output value. + /// + /// List of process actions to process the input or output value. + [DataMember(Name = "handler", IsRequired = true, EmitDefaultValue = false)] + public List Handler { get; set; } + /// + /// The default source for file if the value is not provided. + /// + /// The default source for file if the value is not provided. + [DataMember(Name = "default", EmitDefaultValue = false)] + public AnyOf Default { get; set; } + /// + /// A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. + /// + /// A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. + [DataMember(Name = "required", EmitDefaultValue = true)] + public bool Required { get; set; } = false; + /// + /// An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec. + /// + /// An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec. + [DataMember(Name = "spec", EmitDefaultValue = false)] + public Object Spec { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + return "DAGFolderInputAlias"; + } + + /// + /// 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("DAGFolderInputAlias:\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Annotations: ").Append(Annotations).Append("\n"); + sb.Append(" Description: ").Append(Description).Append("\n"); + sb.Append(" Platform: ").Append(Platform).Append("\n"); + sb.Append(" Handler: ").Append(Handler).Append("\n"); + sb.Append(" Default: ").Append(Default).Append("\n"); + sb.Append(" Required: ").Append(Required).Append("\n"); + sb.Append(" Spec: ").Append(Spec).Append("\n"); + return sb.ToString(); + } + + /// + /// Returns the object from JSON string + /// + /// DAGFolderInputAlias object + public static DAGFolderInputAlias 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. + /// + /// DAGFolderInputAlias object + public virtual DAGFolderInputAlias DuplicateDAGFolderInputAlias() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateDAGFolderInputAlias(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override GenericInput DuplicateGenericInput() + { + return DuplicateDAGFolderInputAlias(); + } + + /// + /// 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 DAGFolderInputAlias); + } + + /// + /// Returns true if DAGFolderInputAlias instances are equal + /// + /// Instance of DAGFolderInputAlias to be compared + /// Boolean + public bool Equals(DAGFolderInputAlias input) + { + if (input == null) + return false; + return base.Equals(input) && + ( + this.Platform == input.Platform || + this.Platform != null && + input.Platform != null && + this.Platform.SequenceEqual(input.Platform) + ) && base.Equals(input) && + ( + this.Handler == input.Handler || + this.Handler != null && + input.Handler != null && + this.Handler.SequenceEqual(input.Handler) + ) && base.Equals(input) && + ( + this.Default == input.Default || + (this.Default != null && + this.Default.Equals(input.Default)) + ) && base.Equals(input) && + ( + this.Required == input.Required || + (this.Required != null && + this.Required.Equals(input.Required)) + ) && 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.Platform != null) + hashCode = hashCode * 59 + this.Platform.GetHashCode(); + if (this.Handler != null) + hashCode = hashCode * 59 + this.Handler.GetHashCode(); + if (this.Default != null) + hashCode = hashCode * 59 + this.Default.GetHashCode(); + if (this.Required != null) + hashCode = hashCode * 59 + this.Required.GetHashCode(); + if (this.Spec != null) + hashCode = hashCode * 59 + this.Spec.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(@"^DAGFolderInputAlias$", 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/DAGFolderOutput.cs b/src/PollinationSDK/Model/DAGFolderOutput.cs new file mode 100644 index 000000000..685ebfa5c --- /dev/null +++ b/src/PollinationSDK/Model/DAGFolderOutput.cs @@ -0,0 +1,246 @@ +/* + * 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 +{ + /// + /// DAG folder output. + /// + [DataContract(Name = "DAGFolderOutput")] + public partial class DAGFolderOutput : GenericOutput, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected DAGFolderOutput() + { + // Set non-required readonly properties with defaultValue + this.Type = "DAGFolderOutput"; + } + + /// + /// Initializes a new instance of the class. + /// + /// Reference to a folder or a task output. Task output must be folder. (required). + /// A list of additional processes for loading this output on different platforms.. + /// A boolean to indicate if an artifact output is required. A False value makes the artifact optional. (default to true). + /// Output name. (required). + /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. + /// Optional description for output.. + public DAGFolderOutput + ( + string name, AnyOf from, // Required parameters + Dictionary annotations= default, string description= default, List> alias= default, bool required = true // Optional parameters + ) : base(name: name, annotations: annotations, description: description)// BaseClass + { + // to ensure "from" is required (not null) + this.From = from ?? throw new ArgumentNullException("from is a required property for DAGFolderOutput and cannot be null"); + this.Alias = alias; + this.Required = required; + + // Set non-required readonly properties with defaultValue + this.Type = "DAGFolderOutput"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "DAGFolderOutput"; + + /// + /// Reference to a folder or a task output. Task output must be folder. + /// + /// Reference to a folder or a task output. Task output must be folder. + [DataMember(Name = "from", IsRequired = true, EmitDefaultValue = false)] + public AnyOf From { get; set; } + /// + /// A list of additional processes for loading this output on different platforms. + /// + /// A list of additional processes for loading this output on different platforms. + [DataMember(Name = "alias", EmitDefaultValue = false)] + public List> Alias { get; set; } + /// + /// A boolean to indicate if an artifact output is required. A False value makes the artifact optional. + /// + /// A boolean to indicate if an artifact output is required. A False value makes the artifact optional. + [DataMember(Name = "required", EmitDefaultValue = true)] + public bool Required { get; set; } = true; + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + return "DAGFolderOutput"; + } + + /// + /// 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("DAGFolderOutput:\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Annotations: ").Append(Annotations).Append("\n"); + sb.Append(" Description: ").Append(Description).Append("\n"); + sb.Append(" From: ").Append(From).Append("\n"); + sb.Append(" Alias: ").Append(Alias).Append("\n"); + sb.Append(" Required: ").Append(Required).Append("\n"); + return sb.ToString(); + } + + /// + /// Returns the object from JSON string + /// + /// DAGFolderOutput object + public static DAGFolderOutput 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. + /// + /// DAGFolderOutput object + public virtual DAGFolderOutput DuplicateDAGFolderOutput() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateDAGFolderOutput(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override GenericOutput DuplicateGenericOutput() + { + return DuplicateDAGFolderOutput(); + } + + /// + /// 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 DAGFolderOutput); + } + + /// + /// Returns true if DAGFolderOutput instances are equal + /// + /// Instance of DAGFolderOutput to be compared + /// Boolean + public bool Equals(DAGFolderOutput input) + { + if (input == null) + return false; + return base.Equals(input) && + ( + this.From == input.From || + (this.From != null && + this.From.Equals(input.From)) + ) && base.Equals(input) && + ( + this.Alias == input.Alias || + this.Alias != null && + input.Alias != null && + this.Alias.SequenceEqual(input.Alias) + ) && base.Equals(input) && + ( + this.Required == input.Required || + (this.Required != null && + this.Required.Equals(input.Required)) + ) && 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.From != null) + hashCode = hashCode * 59 + this.From.GetHashCode(); + if (this.Alias != null) + hashCode = hashCode * 59 + this.Alias.GetHashCode(); + if (this.Required != null) + hashCode = hashCode * 59 + this.Required.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(@"^DAGFolderOutput$", 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/DAGFolderOutputAlias.cs b/src/PollinationSDK/Model/DAGFolderOutputAlias.cs new file mode 100644 index 000000000..47f2e67f3 --- /dev/null +++ b/src/PollinationSDK/Model/DAGFolderOutputAlias.cs @@ -0,0 +1,219 @@ +/* + * 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 +{ + /// + /// DAG alias folder output. + /// + [DataContract(Name = "DAGFolderOutputAlias")] + public partial class DAGFolderOutputAlias : DAGArtifactOutputAlias, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected DAGFolderOutputAlias() + { + // Set non-required readonly properties with defaultValue + this.Type = "DAGFolderOutputAlias"; + } + + /// + /// Initializes a new instance of the class. + /// + /// Reference to a folder or a task output. Task output must be folder. (required). + /// Output name. (required). + /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. + /// Optional description for output.. + /// 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. (required). + /// List of process actions to process the input or output value. (required). + /// A boolean to indicate if an artifact output is required. A False value makes the artifact optional. (default to true). + public DAGFolderOutputAlias + ( + string name, List platform, List handler, AnyOf from, // Required parameters + Dictionary annotations= default, string description= default, bool required = true // Optional parameters + ) : base(name: name, annotations: annotations, description: description, platform: platform, handler: handler, required: required)// BaseClass + { + // to ensure "from" is required (not null) + this.From = from ?? throw new ArgumentNullException("from is a required property for DAGFolderOutputAlias and cannot be null"); + + // Set non-required readonly properties with defaultValue + this.Type = "DAGFolderOutputAlias"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "DAGFolderOutputAlias"; + + /// + /// Reference to a folder or a task output. Task output must be folder. + /// + /// Reference to a folder or a task output. Task output must be folder. + [DataMember(Name = "from", IsRequired = true, EmitDefaultValue = false)] + public AnyOf From { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + return "DAGFolderOutputAlias"; + } + + /// + /// 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("DAGFolderOutputAlias:\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Annotations: ").Append(Annotations).Append("\n"); + sb.Append(" Description: ").Append(Description).Append("\n"); + sb.Append(" Platform: ").Append(Platform).Append("\n"); + sb.Append(" Handler: ").Append(Handler).Append("\n"); + sb.Append(" Required: ").Append(Required).Append("\n"); + sb.Append(" From: ").Append(From).Append("\n"); + return sb.ToString(); + } + + /// + /// Returns the object from JSON string + /// + /// DAGFolderOutputAlias object + public static DAGFolderOutputAlias 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. + /// + /// DAGFolderOutputAlias object + public virtual DAGFolderOutputAlias DuplicateDAGFolderOutputAlias() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateDAGFolderOutputAlias(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override DAGArtifactOutputAlias DuplicateDAGArtifactOutputAlias() + { + return DuplicateDAGFolderOutputAlias(); + } + + /// + /// 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 DAGFolderOutputAlias); + } + + /// + /// Returns true if DAGFolderOutputAlias instances are equal + /// + /// Instance of DAGFolderOutputAlias to be compared + /// Boolean + public bool Equals(DAGFolderOutputAlias input) + { + if (input == null) + return false; + return base.Equals(input) && + ( + this.From == input.From || + (this.From != null && + this.From.Equals(input.From)) + ) && 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.From != null) + hashCode = hashCode * 59 + this.From.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(@"^DAGFolderOutputAlias$", 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/DAGGenericInput.cs b/src/PollinationSDK/Model/DAGGenericInput.cs new file mode 100644 index 000000000..04a679c3a --- /dev/null +++ b/src/PollinationSDK/Model/DAGGenericInput.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 +{ + /// + /// Base class for DAG inputs. This class adds a handler to input to handle the process of loading the input from different graphical interfaces. + /// + [DataContract(Name = "DAGGenericInput")] + public partial class DAGGenericInput : GenericInput, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected DAGGenericInput() + { + // Set non-required readonly properties with defaultValue + this.Type = "DAGGenericInput"; + } + + /// + /// Initializes a new instance of the class. + /// + /// Default value for generic input.. + /// A list of aliases for this input in different platforms.. + /// A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. (default to false). + /// An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec.. + /// Input name. (required). + /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. + /// Optional description for input.. + public DAGGenericInput + ( + string name, // Required parameters + Dictionary annotations= default, string description= default, string _default= default, List> alias= default, bool required = false, Object spec= default // Optional parameters + ) : base(name: name, annotations: annotations, description: description)// BaseClass + { + this.Default = _default; + this.Alias = alias; + this.Required = required; + this.Spec = spec; + + // Set non-required readonly properties with defaultValue + this.Type = "DAGGenericInput"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "DAGGenericInput"; + + /// + /// Default value for generic input. + /// + /// Default value for generic input. + [DataMember(Name = "default", EmitDefaultValue = false)] + public string Default { get; set; } + /// + /// A list of aliases for this input in different platforms. + /// + /// A list of aliases for this input in different platforms. + [DataMember(Name = "alias", EmitDefaultValue = false)] + public List> Alias { get; set; } + /// + /// A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. + /// + /// A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. + [DataMember(Name = "required", EmitDefaultValue = true)] + public bool Required { get; set; } = false; + /// + /// An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec. + /// + /// An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec. + [DataMember(Name = "spec", EmitDefaultValue = false)] + public Object Spec { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + return "DAGGenericInput"; + } + + /// + /// 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("DAGGenericInput:\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Annotations: ").Append(Annotations).Append("\n"); + sb.Append(" Description: ").Append(Description).Append("\n"); + sb.Append(" Default: ").Append(Default).Append("\n"); + sb.Append(" Alias: ").Append(Alias).Append("\n"); + sb.Append(" Required: ").Append(Required).Append("\n"); + sb.Append(" Spec: ").Append(Spec).Append("\n"); + return sb.ToString(); + } + + /// + /// Returns the object from JSON string + /// + /// DAGGenericInput object + public static DAGGenericInput 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. + /// + /// DAGGenericInput object + public virtual DAGGenericInput DuplicateDAGGenericInput() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateDAGGenericInput(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override GenericInput DuplicateGenericInput() + { + return DuplicateDAGGenericInput(); + } + + /// + /// 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 DAGGenericInput); + } + + /// + /// Returns true if DAGGenericInput instances are equal + /// + /// Instance of DAGGenericInput to be compared + /// Boolean + public bool Equals(DAGGenericInput input) + { + if (input == null) + return false; + return base.Equals(input) && + ( + this.Default == input.Default || + (this.Default != null && + this.Default.Equals(input.Default)) + ) && base.Equals(input) && + ( + this.Alias == input.Alias || + this.Alias != null && + input.Alias != null && + this.Alias.SequenceEqual(input.Alias) + ) && base.Equals(input) && + ( + this.Required == input.Required || + (this.Required != null && + this.Required.Equals(input.Required)) + ) && 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.Default != null) + hashCode = hashCode * 59 + this.Default.GetHashCode(); + if (this.Alias != null) + hashCode = hashCode * 59 + this.Alias.GetHashCode(); + if (this.Required != null) + hashCode = hashCode * 59 + this.Required.GetHashCode(); + if (this.Spec != null) + hashCode = hashCode * 59 + this.Spec.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(@"^DAGGenericInput$", 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/DAGGenericInputAlias.cs b/src/PollinationSDK/Model/DAGGenericInputAlias.cs new file mode 100644 index 000000000..869b99c10 --- /dev/null +++ b/src/PollinationSDK/Model/DAGGenericInputAlias.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 +{ + /// + /// Base class for DAG Alias inputs. This class adds a handler to input to handle the process of loading the input from different graphical interfaces. + /// + [DataContract(Name = "DAGGenericInputAlias")] + public partial class DAGGenericInputAlias : GenericInput, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected DAGGenericInputAlias() + { + // Set non-required readonly properties with defaultValue + this.Type = "DAGGenericInputAlias"; + } + + /// + /// Initializes a new instance of the class. + /// + /// 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. (required). + /// List of process actions to process the input or output value. (required). + /// Default value for generic input.. + /// A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. (default to false). + /// An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec.. + /// Input name. (required). + /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. + /// Optional description for input.. + public DAGGenericInputAlias + ( + string name, List platform, List handler, // Required parameters + Dictionary annotations= default, string description= default, string _default= default, bool required = false, Object spec= default // Optional parameters + ) : base(name: name, annotations: annotations, description: description)// BaseClass + { + // to ensure "platform" is required (not null) + this.Platform = platform ?? throw new ArgumentNullException("platform is a required property for DAGGenericInputAlias and cannot be null"); + // to ensure "handler" is required (not null) + this.Handler = handler ?? throw new ArgumentNullException("handler is a required property for DAGGenericInputAlias and cannot be null"); + this.Default = _default; + this.Required = required; + this.Spec = spec; + + // Set non-required readonly properties with defaultValue + this.Type = "DAGGenericInputAlias"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "DAGGenericInputAlias"; + + /// + /// 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. + /// + /// 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. + [DataMember(Name = "platform", IsRequired = true, EmitDefaultValue = false)] + public List Platform { get; set; } + /// + /// List of process actions to process the input or output value. + /// + /// List of process actions to process the input or output value. + [DataMember(Name = "handler", IsRequired = true, EmitDefaultValue = false)] + public List Handler { get; set; } + /// + /// Default value for generic input. + /// + /// Default value for generic input. + [DataMember(Name = "default", EmitDefaultValue = false)] + public string Default { get; set; } + /// + /// A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. + /// + /// A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. + [DataMember(Name = "required", EmitDefaultValue = true)] + public bool Required { get; set; } = false; + /// + /// An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec. + /// + /// An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec. + [DataMember(Name = "spec", EmitDefaultValue = false)] + public Object Spec { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + return "DAGGenericInputAlias"; + } + + /// + /// 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("DAGGenericInputAlias:\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Annotations: ").Append(Annotations).Append("\n"); + sb.Append(" Description: ").Append(Description).Append("\n"); + sb.Append(" Platform: ").Append(Platform).Append("\n"); + sb.Append(" Handler: ").Append(Handler).Append("\n"); + sb.Append(" Default: ").Append(Default).Append("\n"); + sb.Append(" Required: ").Append(Required).Append("\n"); + sb.Append(" Spec: ").Append(Spec).Append("\n"); + return sb.ToString(); + } + + /// + /// Returns the object from JSON string + /// + /// DAGGenericInputAlias object + public static DAGGenericInputAlias 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. + /// + /// DAGGenericInputAlias object + public virtual DAGGenericInputAlias DuplicateDAGGenericInputAlias() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateDAGGenericInputAlias(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override GenericInput DuplicateGenericInput() + { + return DuplicateDAGGenericInputAlias(); + } + + /// + /// 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 DAGGenericInputAlias); + } + + /// + /// Returns true if DAGGenericInputAlias instances are equal + /// + /// Instance of DAGGenericInputAlias to be compared + /// Boolean + public bool Equals(DAGGenericInputAlias input) + { + if (input == null) + return false; + return base.Equals(input) && + ( + this.Platform == input.Platform || + this.Platform != null && + input.Platform != null && + this.Platform.SequenceEqual(input.Platform) + ) && base.Equals(input) && + ( + this.Handler == input.Handler || + this.Handler != null && + input.Handler != null && + this.Handler.SequenceEqual(input.Handler) + ) && base.Equals(input) && + ( + this.Default == input.Default || + (this.Default != null && + this.Default.Equals(input.Default)) + ) && base.Equals(input) && + ( + this.Required == input.Required || + (this.Required != null && + this.Required.Equals(input.Required)) + ) && 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.Platform != null) + hashCode = hashCode * 59 + this.Platform.GetHashCode(); + if (this.Handler != null) + hashCode = hashCode * 59 + this.Handler.GetHashCode(); + if (this.Default != null) + hashCode = hashCode * 59 + this.Default.GetHashCode(); + if (this.Required != null) + hashCode = hashCode * 59 + this.Required.GetHashCode(); + if (this.Spec != null) + hashCode = hashCode * 59 + this.Spec.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(@"^DAGGenericInputAlias$", 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/DAGGenericOutput.cs b/src/PollinationSDK/Model/DAGGenericOutput.cs new file mode 100644 index 000000000..907c133cb --- /dev/null +++ b/src/PollinationSDK/Model/DAGGenericOutput.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 +{ + /// + /// DAG generic output. In most cases, you should not be using the generic output unless you need a dynamic output that changes its type in different platforms because of returning different objects in handler. + /// + [DataContract(Name = "DAGGenericOutput")] + public partial class DAGGenericOutput : FromOutput, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected DAGGenericOutput() + { + // Set non-required readonly properties with defaultValue + this.Type = "DAGGenericOutput"; + } + + /// + /// Initializes a new instance of the class. + /// + /// A list of additional processes for loading this output on different platforms.. + /// Output name. (required). + /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. + /// Optional description for output.. + /// Reference to a file or a task output. Task output must be file. (required). + public DAGGenericOutput + ( + string name, object from, // Required parameters + Dictionary annotations= default, string description= default, List> alias= default // Optional parameters + ) : base(name: name, annotations: annotations, description: description, from: from)// BaseClass + { + this.Alias = alias; + + // Set non-required readonly properties with defaultValue + this.Type = "DAGGenericOutput"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "DAGGenericOutput"; + + /// + /// A list of additional processes for loading this output on different platforms. + /// + /// A list of additional processes for loading this output on different platforms. + [DataMember(Name = "alias", EmitDefaultValue = false)] + public List> Alias { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + return "DAGGenericOutput"; + } + + /// + /// 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("DAGGenericOutput:\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Annotations: ").Append(Annotations).Append("\n"); + sb.Append(" Description: ").Append(Description).Append("\n"); + sb.Append(" From: ").Append(From).Append("\n"); + sb.Append(" Alias: ").Append(Alias).Append("\n"); + return sb.ToString(); + } + + /// + /// Returns the object from JSON string + /// + /// DAGGenericOutput object + public static DAGGenericOutput 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. + /// + /// DAGGenericOutput object + public virtual DAGGenericOutput DuplicateDAGGenericOutput() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateDAGGenericOutput(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override FromOutput DuplicateFromOutput() + { + return DuplicateDAGGenericOutput(); + } + + /// + /// 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 DAGGenericOutput); + } + + /// + /// Returns true if DAGGenericOutput instances are equal + /// + /// Instance of DAGGenericOutput to be compared + /// Boolean + public bool Equals(DAGGenericOutput input) + { + if (input == null) + return false; + return base.Equals(input) && + ( + this.Alias == input.Alias || + this.Alias != null && + input.Alias != null && + this.Alias.SequenceEqual(input.Alias) + ) && 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.Alias != null) + hashCode = hashCode * 59 + this.Alias.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(@"^DAGGenericOutput$", 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/DAGGenericOutputAlias.cs b/src/PollinationSDK/Model/DAGGenericOutputAlias.cs new file mode 100644 index 000000000..a1c5f141f --- /dev/null +++ b/src/PollinationSDK/Model/DAGGenericOutputAlias.cs @@ -0,0 +1,242 @@ +/* + * 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 +{ + /// + /// DAG generic alias output. In most cases, you should not be using the generic output unless you need a dynamic output that changes its type in different platforms because of returning different objects in handler. + /// + [DataContract(Name = "DAGGenericOutputAlias")] + public partial class DAGGenericOutputAlias : GenericOutput, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected DAGGenericOutputAlias() + { + // Set non-required readonly properties with defaultValue + this.Type = "DAGGenericOutputAlias"; + } + + /// + /// Initializes a new instance of the class. + /// + /// 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. (required). + /// List of process actions to process the input or output value. (required). + /// Output name. (required). + /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. + /// Optional description for output.. + public DAGGenericOutputAlias + ( + string name, List platform, List handler, // Required parameters + Dictionary annotations= default, string description= default // Optional parameters + ) : base(name: name, annotations: annotations, description: description)// BaseClass + { + // to ensure "platform" is required (not null) + this.Platform = platform ?? throw new ArgumentNullException("platform is a required property for DAGGenericOutputAlias and cannot be null"); + // to ensure "handler" is required (not null) + this.Handler = handler ?? throw new ArgumentNullException("handler is a required property for DAGGenericOutputAlias and cannot be null"); + + // Set non-required readonly properties with defaultValue + this.Type = "DAGGenericOutputAlias"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "DAGGenericOutputAlias"; + + /// + /// 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. + /// + /// 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. + [DataMember(Name = "platform", IsRequired = true, EmitDefaultValue = false)] + public List Platform { get; set; } + /// + /// List of process actions to process the input or output value. + /// + /// List of process actions to process the input or output value. + [DataMember(Name = "handler", IsRequired = true, EmitDefaultValue = false)] + public List Handler { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + return "DAGGenericOutputAlias"; + } + + /// + /// 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("DAGGenericOutputAlias:\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Annotations: ").Append(Annotations).Append("\n"); + sb.Append(" Description: ").Append(Description).Append("\n"); + sb.Append(" Platform: ").Append(Platform).Append("\n"); + sb.Append(" Handler: ").Append(Handler).Append("\n"); + return sb.ToString(); + } + + /// + /// Returns the object from JSON string + /// + /// DAGGenericOutputAlias object + public static DAGGenericOutputAlias 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. + /// + /// DAGGenericOutputAlias object + public virtual DAGGenericOutputAlias DuplicateDAGGenericOutputAlias() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateDAGGenericOutputAlias(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override GenericOutput DuplicateGenericOutput() + { + return DuplicateDAGGenericOutputAlias(); + } + + /// + /// 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 DAGGenericOutputAlias); + } + + /// + /// Returns true if DAGGenericOutputAlias instances are equal + /// + /// Instance of DAGGenericOutputAlias to be compared + /// Boolean + public bool Equals(DAGGenericOutputAlias input) + { + if (input == null) + return false; + return base.Equals(input) && + ( + this.Platform == input.Platform || + this.Platform != null && + input.Platform != null && + this.Platform.SequenceEqual(input.Platform) + ) && base.Equals(input) && + ( + this.Handler == input.Handler || + this.Handler != null && + input.Handler != null && + this.Handler.SequenceEqual(input.Handler) + ) && 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.Platform != null) + hashCode = hashCode * 59 + this.Platform.GetHashCode(); + if (this.Handler != null) + hashCode = hashCode * 59 + this.Handler.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(@"^DAGGenericOutputAlias$", 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/DAGIntegerInput.cs b/src/PollinationSDK/Model/DAGIntegerInput.cs new file mode 100644 index 000000000..0840d1e41 --- /dev/null +++ b/src/PollinationSDK/Model/DAGIntegerInput.cs @@ -0,0 +1,256 @@ +/* + * 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 integer input. You can add additional validation by defining a JSONSchema specification. See http://json-schema.org/understanding-json-schema/reference/numeric.html#numeric for more information. + /// + [DataContract(Name = "DAGIntegerInput")] + public partial class DAGIntegerInput : GenericInput, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected DAGIntegerInput() + { + // Set non-required readonly properties with defaultValue + this.Type = "DAGIntegerInput"; + } + + /// + /// Initializes a new instance of the class. + /// + /// Default value to use for an input if a value was not supplied.. + /// A list of aliases for this input in different platforms.. + /// A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. (default to false). + /// An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec.. + /// Input name. (required). + /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. + /// Optional description for input.. + public DAGIntegerInput + ( + string name, // Required parameters + Dictionary annotations= default, string description= default, int _default= default, List> alias= default, bool required = false, Object spec= default // Optional parameters + ) : base(name: name, annotations: annotations, description: description)// BaseClass + { + this.Default = _default; + this.Alias = alias; + this.Required = required; + this.Spec = spec; + + // Set non-required readonly properties with defaultValue + this.Type = "DAGIntegerInput"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "DAGIntegerInput"; + + /// + /// Default value to use for an input if a value was not supplied. + /// + /// Default value to use for an input if a value was not supplied. + [DataMember(Name = "default", EmitDefaultValue = false)] + public int Default { get; set; } + /// + /// A list of aliases for this input in different platforms. + /// + /// A list of aliases for this input in different platforms. + [DataMember(Name = "alias", EmitDefaultValue = false)] + public List> Alias { get; set; } + /// + /// A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. + /// + /// A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. + [DataMember(Name = "required", EmitDefaultValue = true)] + public bool Required { get; set; } = false; + /// + /// An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec. + /// + /// An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec. + [DataMember(Name = "spec", EmitDefaultValue = false)] + public Object Spec { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + return "DAGIntegerInput"; + } + + /// + /// 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("DAGIntegerInput:\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Annotations: ").Append(Annotations).Append("\n"); + sb.Append(" Description: ").Append(Description).Append("\n"); + sb.Append(" Default: ").Append(Default).Append("\n"); + sb.Append(" Alias: ").Append(Alias).Append("\n"); + sb.Append(" Required: ").Append(Required).Append("\n"); + sb.Append(" Spec: ").Append(Spec).Append("\n"); + return sb.ToString(); + } + + /// + /// Returns the object from JSON string + /// + /// DAGIntegerInput object + public static DAGIntegerInput 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. + /// + /// DAGIntegerInput object + public virtual DAGIntegerInput DuplicateDAGIntegerInput() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateDAGIntegerInput(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override GenericInput DuplicateGenericInput() + { + return DuplicateDAGIntegerInput(); + } + + /// + /// 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 DAGIntegerInput); + } + + /// + /// Returns true if DAGIntegerInput instances are equal + /// + /// Instance of DAGIntegerInput to be compared + /// Boolean + public bool Equals(DAGIntegerInput input) + { + if (input == null) + return false; + return base.Equals(input) && + ( + this.Default == input.Default || + (this.Default != null && + this.Default.Equals(input.Default)) + ) && base.Equals(input) && + ( + this.Alias == input.Alias || + this.Alias != null && + input.Alias != null && + this.Alias.SequenceEqual(input.Alias) + ) && base.Equals(input) && + ( + this.Required == input.Required || + (this.Required != null && + this.Required.Equals(input.Required)) + ) && 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.Default != null) + hashCode = hashCode * 59 + this.Default.GetHashCode(); + if (this.Alias != null) + hashCode = hashCode * 59 + this.Alias.GetHashCode(); + if (this.Required != null) + hashCode = hashCode * 59 + this.Required.GetHashCode(); + if (this.Spec != null) + hashCode = hashCode * 59 + this.Spec.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(@"^DAGIntegerInput$", 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/DAGIntegerInputAlias.cs b/src/PollinationSDK/Model/DAGIntegerInputAlias.cs new file mode 100644 index 000000000..130d2d6c7 --- /dev/null +++ b/src/PollinationSDK/Model/DAGIntegerInputAlias.cs @@ -0,0 +1,275 @@ +/* + * 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 alias integer input. You can add additional validation by defining a JSONSchema specification. See http://json-schema.org/understanding-json-schema/reference/numeric.html#numeric for more information. + /// + [DataContract(Name = "DAGIntegerInputAlias")] + public partial class DAGIntegerInputAlias : GenericInput, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected DAGIntegerInputAlias() + { + // Set non-required readonly properties with defaultValue + this.Type = "DAGIntegerInputAlias"; + } + + /// + /// Initializes a new instance of the class. + /// + /// 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. (required). + /// List of process actions to process the input or output value. (required). + /// Default value to use for an input if a value was not supplied.. + /// A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. (default to false). + /// An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec.. + /// Input name. (required). + /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. + /// Optional description for input.. + public DAGIntegerInputAlias + ( + string name, List platform, List handler, // Required parameters + Dictionary annotations= default, string description= default, int _default= default, bool required = false, Object spec= default // Optional parameters + ) : base(name: name, annotations: annotations, description: description)// BaseClass + { + // to ensure "platform" is required (not null) + this.Platform = platform ?? throw new ArgumentNullException("platform is a required property for DAGIntegerInputAlias and cannot be null"); + // to ensure "handler" is required (not null) + this.Handler = handler ?? throw new ArgumentNullException("handler is a required property for DAGIntegerInputAlias and cannot be null"); + this.Default = _default; + this.Required = required; + this.Spec = spec; + + // Set non-required readonly properties with defaultValue + this.Type = "DAGIntegerInputAlias"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "DAGIntegerInputAlias"; + + /// + /// 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. + /// + /// 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. + [DataMember(Name = "platform", IsRequired = true, EmitDefaultValue = false)] + public List Platform { get; set; } + /// + /// List of process actions to process the input or output value. + /// + /// List of process actions to process the input or output value. + [DataMember(Name = "handler", IsRequired = true, EmitDefaultValue = false)] + public List Handler { get; set; } + /// + /// Default value to use for an input if a value was not supplied. + /// + /// Default value to use for an input if a value was not supplied. + [DataMember(Name = "default", EmitDefaultValue = false)] + public int Default { get; set; } + /// + /// A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. + /// + /// A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. + [DataMember(Name = "required", EmitDefaultValue = true)] + public bool Required { get; set; } = false; + /// + /// An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec. + /// + /// An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec. + [DataMember(Name = "spec", EmitDefaultValue = false)] + public Object Spec { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + return "DAGIntegerInputAlias"; + } + + /// + /// 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("DAGIntegerInputAlias:\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Annotations: ").Append(Annotations).Append("\n"); + sb.Append(" Description: ").Append(Description).Append("\n"); + sb.Append(" Platform: ").Append(Platform).Append("\n"); + sb.Append(" Handler: ").Append(Handler).Append("\n"); + sb.Append(" Default: ").Append(Default).Append("\n"); + sb.Append(" Required: ").Append(Required).Append("\n"); + sb.Append(" Spec: ").Append(Spec).Append("\n"); + return sb.ToString(); + } + + /// + /// Returns the object from JSON string + /// + /// DAGIntegerInputAlias object + public static DAGIntegerInputAlias 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. + /// + /// DAGIntegerInputAlias object + public virtual DAGIntegerInputAlias DuplicateDAGIntegerInputAlias() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateDAGIntegerInputAlias(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override GenericInput DuplicateGenericInput() + { + return DuplicateDAGIntegerInputAlias(); + } + + /// + /// 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 DAGIntegerInputAlias); + } + + /// + /// Returns true if DAGIntegerInputAlias instances are equal + /// + /// Instance of DAGIntegerInputAlias to be compared + /// Boolean + public bool Equals(DAGIntegerInputAlias input) + { + if (input == null) + return false; + return base.Equals(input) && + ( + this.Platform == input.Platform || + this.Platform != null && + input.Platform != null && + this.Platform.SequenceEqual(input.Platform) + ) && base.Equals(input) && + ( + this.Handler == input.Handler || + this.Handler != null && + input.Handler != null && + this.Handler.SequenceEqual(input.Handler) + ) && base.Equals(input) && + ( + this.Default == input.Default || + (this.Default != null && + this.Default.Equals(input.Default)) + ) && base.Equals(input) && + ( + this.Required == input.Required || + (this.Required != null && + this.Required.Equals(input.Required)) + ) && 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.Platform != null) + hashCode = hashCode * 59 + this.Platform.GetHashCode(); + if (this.Handler != null) + hashCode = hashCode * 59 + this.Handler.GetHashCode(); + if (this.Default != null) + hashCode = hashCode * 59 + this.Default.GetHashCode(); + if (this.Required != null) + hashCode = hashCode * 59 + this.Required.GetHashCode(); + if (this.Spec != null) + hashCode = hashCode * 59 + this.Spec.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(@"^DAGIntegerInputAlias$", 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/DAGIntegerOutput.cs b/src/PollinationSDK/Model/DAGIntegerOutput.cs new file mode 100644 index 000000000..3b93edeb3 --- /dev/null +++ b/src/PollinationSDK/Model/DAGIntegerOutput.cs @@ -0,0 +1,246 @@ +/* + * 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 +{ + /// + /// DAG integer output. This output loads the content from a file as an integer. + /// + [DataContract(Name = "DAGIntegerOutput")] + public partial class DAGIntegerOutput : GenericOutput, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected DAGIntegerOutput() + { + // Set non-required readonly properties with defaultValue + this.Type = "DAGIntegerOutput"; + } + + /// + /// Initializes a new instance of the class. + /// + /// Reference to a file or a task output. Task output must be file. (required). + /// A list of additional processes for loading this output on different platforms.. + /// A boolean to indicate if an artifact output is required. A False value makes the artifact optional. (default to true). + /// Output name. (required). + /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. + /// Optional description for output.. + public DAGIntegerOutput + ( + string name, AnyOf from, // Required parameters + Dictionary annotations= default, string description= default, List> alias= default, bool required = true // Optional parameters + ) : base(name: name, annotations: annotations, description: description)// BaseClass + { + // to ensure "from" is required (not null) + this.From = from ?? throw new ArgumentNullException("from is a required property for DAGIntegerOutput and cannot be null"); + this.Alias = alias; + this.Required = required; + + // Set non-required readonly properties with defaultValue + this.Type = "DAGIntegerOutput"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "DAGIntegerOutput"; + + /// + /// Reference to a file or a task output. Task output must be file. + /// + /// Reference to a file or a task output. Task output must be file. + [DataMember(Name = "from", IsRequired = true, EmitDefaultValue = false)] + public AnyOf From { get; set; } + /// + /// A list of additional processes for loading this output on different platforms. + /// + /// A list of additional processes for loading this output on different platforms. + [DataMember(Name = "alias", EmitDefaultValue = false)] + public List> Alias { get; set; } + /// + /// A boolean to indicate if an artifact output is required. A False value makes the artifact optional. + /// + /// A boolean to indicate if an artifact output is required. A False value makes the artifact optional. + [DataMember(Name = "required", EmitDefaultValue = true)] + public bool Required { get; set; } = true; + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + return "DAGIntegerOutput"; + } + + /// + /// 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("DAGIntegerOutput:\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Annotations: ").Append(Annotations).Append("\n"); + sb.Append(" Description: ").Append(Description).Append("\n"); + sb.Append(" From: ").Append(From).Append("\n"); + sb.Append(" Alias: ").Append(Alias).Append("\n"); + sb.Append(" Required: ").Append(Required).Append("\n"); + return sb.ToString(); + } + + /// + /// Returns the object from JSON string + /// + /// DAGIntegerOutput object + public static DAGIntegerOutput 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. + /// + /// DAGIntegerOutput object + public virtual DAGIntegerOutput DuplicateDAGIntegerOutput() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateDAGIntegerOutput(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override GenericOutput DuplicateGenericOutput() + { + return DuplicateDAGIntegerOutput(); + } + + /// + /// 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 DAGIntegerOutput); + } + + /// + /// Returns true if DAGIntegerOutput instances are equal + /// + /// Instance of DAGIntegerOutput to be compared + /// Boolean + public bool Equals(DAGIntegerOutput input) + { + if (input == null) + return false; + return base.Equals(input) && + ( + this.From == input.From || + (this.From != null && + this.From.Equals(input.From)) + ) && base.Equals(input) && + ( + this.Alias == input.Alias || + this.Alias != null && + input.Alias != null && + this.Alias.SequenceEqual(input.Alias) + ) && base.Equals(input) && + ( + this.Required == input.Required || + (this.Required != null && + this.Required.Equals(input.Required)) + ) && 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.From != null) + hashCode = hashCode * 59 + this.From.GetHashCode(); + if (this.Alias != null) + hashCode = hashCode * 59 + this.Alias.GetHashCode(); + if (this.Required != null) + hashCode = hashCode * 59 + this.Required.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(@"^DAGIntegerOutput$", 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/DAGIntegerOutputAlias.cs b/src/PollinationSDK/Model/DAGIntegerOutputAlias.cs new file mode 100644 index 000000000..605cc592f --- /dev/null +++ b/src/PollinationSDK/Model/DAGIntegerOutputAlias.cs @@ -0,0 +1,219 @@ +/* + * 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 +{ + /// + /// DAG alias integer output. This output loads the content from a file as an integer. + /// + [DataContract(Name = "DAGIntegerOutputAlias")] + public partial class DAGIntegerOutputAlias : DAGArtifactOutputAlias, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected DAGIntegerOutputAlias() + { + // Set non-required readonly properties with defaultValue + this.Type = "DAGIntegerOutputAlias"; + } + + /// + /// Initializes a new instance of the class. + /// + /// Reference to a file or a task output. Task output must be file. (required). + /// Output name. (required). + /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. + /// Optional description for output.. + /// 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. (required). + /// List of process actions to process the input or output value. (required). + /// A boolean to indicate if an artifact output is required. A False value makes the artifact optional. (default to true). + public DAGIntegerOutputAlias + ( + string name, List platform, List handler, AnyOf from, // Required parameters + Dictionary annotations= default, string description= default, bool required = true // Optional parameters + ) : base(name: name, annotations: annotations, description: description, platform: platform, handler: handler, required: required)// BaseClass + { + // to ensure "from" is required (not null) + this.From = from ?? throw new ArgumentNullException("from is a required property for DAGIntegerOutputAlias and cannot be null"); + + // Set non-required readonly properties with defaultValue + this.Type = "DAGIntegerOutputAlias"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "DAGIntegerOutputAlias"; + + /// + /// Reference to a file or a task output. Task output must be file. + /// + /// Reference to a file or a task output. Task output must be file. + [DataMember(Name = "from", IsRequired = true, EmitDefaultValue = false)] + public AnyOf From { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + return "DAGIntegerOutputAlias"; + } + + /// + /// 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("DAGIntegerOutputAlias:\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Annotations: ").Append(Annotations).Append("\n"); + sb.Append(" Description: ").Append(Description).Append("\n"); + sb.Append(" Platform: ").Append(Platform).Append("\n"); + sb.Append(" Handler: ").Append(Handler).Append("\n"); + sb.Append(" Required: ").Append(Required).Append("\n"); + sb.Append(" From: ").Append(From).Append("\n"); + return sb.ToString(); + } + + /// + /// Returns the object from JSON string + /// + /// DAGIntegerOutputAlias object + public static DAGIntegerOutputAlias 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. + /// + /// DAGIntegerOutputAlias object + public virtual DAGIntegerOutputAlias DuplicateDAGIntegerOutputAlias() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateDAGIntegerOutputAlias(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override DAGArtifactOutputAlias DuplicateDAGArtifactOutputAlias() + { + return DuplicateDAGIntegerOutputAlias(); + } + + /// + /// 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 DAGIntegerOutputAlias); + } + + /// + /// Returns true if DAGIntegerOutputAlias instances are equal + /// + /// Instance of DAGIntegerOutputAlias to be compared + /// Boolean + public bool Equals(DAGIntegerOutputAlias input) + { + if (input == null) + return false; + return base.Equals(input) && + ( + this.From == input.From || + (this.From != null && + this.From.Equals(input.From)) + ) && 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.From != null) + hashCode = hashCode * 59 + this.From.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(@"^DAGIntegerOutputAlias$", 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/DAGJSONObjectInput.cs b/src/PollinationSDK/Model/DAGJSONObjectInput.cs new file mode 100644 index 000000000..56308a317 --- /dev/null +++ b/src/PollinationSDK/Model/DAGJSONObjectInput.cs @@ -0,0 +1,256 @@ +/* + * 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 JSON object input. JSON objects are similar to Python dictionaries. You can add additional validation by defining a JSONSchema specification. See http://json-schema.org/understanding-json-schema/reference/object.html for more information. + /// + [DataContract(Name = "DAGJSONObjectInput")] + public partial class DAGJSONObjectInput : GenericInput, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected DAGJSONObjectInput() + { + // Set non-required readonly properties with defaultValue + this.Type = "DAGJSONObjectInput"; + } + + /// + /// Initializes a new instance of the class. + /// + /// Default value to use for an input if a value was not supplied.. + /// A list of aliases for this input in different platforms.. + /// A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. (default to false). + /// An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec.. + /// Input name. (required). + /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. + /// Optional description for input.. + public DAGJSONObjectInput + ( + string name, // Required parameters + Dictionary annotations= default, string description= default, Object _default= default, List> alias= default, bool required = false, Object spec= default // Optional parameters + ) : base(name: name, annotations: annotations, description: description)// BaseClass + { + this.Default = _default; + this.Alias = alias; + this.Required = required; + this.Spec = spec; + + // Set non-required readonly properties with defaultValue + this.Type = "DAGJSONObjectInput"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "DAGJSONObjectInput"; + + /// + /// Default value to use for an input if a value was not supplied. + /// + /// Default value to use for an input if a value was not supplied. + [DataMember(Name = "default", EmitDefaultValue = false)] + public Object Default { get; set; } + /// + /// A list of aliases for this input in different platforms. + /// + /// A list of aliases for this input in different platforms. + [DataMember(Name = "alias", EmitDefaultValue = false)] + public List> Alias { get; set; } + /// + /// A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. + /// + /// A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. + [DataMember(Name = "required", EmitDefaultValue = true)] + public bool Required { get; set; } = false; + /// + /// An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec. + /// + /// An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec. + [DataMember(Name = "spec", EmitDefaultValue = false)] + public Object Spec { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + return "DAGJSONObjectInput"; + } + + /// + /// 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("DAGJSONObjectInput:\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Annotations: ").Append(Annotations).Append("\n"); + sb.Append(" Description: ").Append(Description).Append("\n"); + sb.Append(" Default: ").Append(Default).Append("\n"); + sb.Append(" Alias: ").Append(Alias).Append("\n"); + sb.Append(" Required: ").Append(Required).Append("\n"); + sb.Append(" Spec: ").Append(Spec).Append("\n"); + return sb.ToString(); + } + + /// + /// Returns the object from JSON string + /// + /// DAGJSONObjectInput object + public static DAGJSONObjectInput 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. + /// + /// DAGJSONObjectInput object + public virtual DAGJSONObjectInput DuplicateDAGJSONObjectInput() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateDAGJSONObjectInput(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override GenericInput DuplicateGenericInput() + { + return DuplicateDAGJSONObjectInput(); + } + + /// + /// 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 DAGJSONObjectInput); + } + + /// + /// Returns true if DAGJSONObjectInput instances are equal + /// + /// Instance of DAGJSONObjectInput to be compared + /// Boolean + public bool Equals(DAGJSONObjectInput input) + { + if (input == null) + return false; + return base.Equals(input) && + ( + this.Default == input.Default || + (this.Default != null && + this.Default.Equals(input.Default)) + ) && base.Equals(input) && + ( + this.Alias == input.Alias || + this.Alias != null && + input.Alias != null && + this.Alias.SequenceEqual(input.Alias) + ) && base.Equals(input) && + ( + this.Required == input.Required || + (this.Required != null && + this.Required.Equals(input.Required)) + ) && 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.Default != null) + hashCode = hashCode * 59 + this.Default.GetHashCode(); + if (this.Alias != null) + hashCode = hashCode * 59 + this.Alias.GetHashCode(); + if (this.Required != null) + hashCode = hashCode * 59 + this.Required.GetHashCode(); + if (this.Spec != null) + hashCode = hashCode * 59 + this.Spec.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(@"^DAGJSONObjectInput$", 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/DAGJSONObjectInputAlias.cs b/src/PollinationSDK/Model/DAGJSONObjectInputAlias.cs new file mode 100644 index 000000000..b4f3114b3 --- /dev/null +++ b/src/PollinationSDK/Model/DAGJSONObjectInputAlias.cs @@ -0,0 +1,275 @@ +/* + * 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 alias JSON object input. JSON objects are similar to Python dictionaries. You can add additional validation by defining a JSONSchema specification. See http://json-schema.org/understanding-json-schema/reference/object.html for more information. + /// + [DataContract(Name = "DAGJSONObjectInputAlias")] + public partial class DAGJSONObjectInputAlias : GenericInput, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected DAGJSONObjectInputAlias() + { + // Set non-required readonly properties with defaultValue + this.Type = "DAGJSONObjectInputAlias"; + } + + /// + /// Initializes a new instance of the class. + /// + /// 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. (required). + /// List of process actions to process the input or output value. (required). + /// Default value to use for an input if a value was not supplied.. + /// A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. (default to false). + /// An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec.. + /// Input name. (required). + /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. + /// Optional description for input.. + public DAGJSONObjectInputAlias + ( + string name, List platform, List handler, // Required parameters + Dictionary annotations= default, string description= default, Object _default= default, bool required = false, Object spec= default // Optional parameters + ) : base(name: name, annotations: annotations, description: description)// BaseClass + { + // to ensure "platform" is required (not null) + this.Platform = platform ?? throw new ArgumentNullException("platform is a required property for DAGJSONObjectInputAlias and cannot be null"); + // to ensure "handler" is required (not null) + this.Handler = handler ?? throw new ArgumentNullException("handler is a required property for DAGJSONObjectInputAlias and cannot be null"); + this.Default = _default; + this.Required = required; + this.Spec = spec; + + // Set non-required readonly properties with defaultValue + this.Type = "DAGJSONObjectInputAlias"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "DAGJSONObjectInputAlias"; + + /// + /// 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. + /// + /// 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. + [DataMember(Name = "platform", IsRequired = true, EmitDefaultValue = false)] + public List Platform { get; set; } + /// + /// List of process actions to process the input or output value. + /// + /// List of process actions to process the input or output value. + [DataMember(Name = "handler", IsRequired = true, EmitDefaultValue = false)] + public List Handler { get; set; } + /// + /// Default value to use for an input if a value was not supplied. + /// + /// Default value to use for an input if a value was not supplied. + [DataMember(Name = "default", EmitDefaultValue = false)] + public Object Default { get; set; } + /// + /// A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. + /// + /// A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. + [DataMember(Name = "required", EmitDefaultValue = true)] + public bool Required { get; set; } = false; + /// + /// An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec. + /// + /// An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec. + [DataMember(Name = "spec", EmitDefaultValue = false)] + public Object Spec { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + return "DAGJSONObjectInputAlias"; + } + + /// + /// 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("DAGJSONObjectInputAlias:\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Annotations: ").Append(Annotations).Append("\n"); + sb.Append(" Description: ").Append(Description).Append("\n"); + sb.Append(" Platform: ").Append(Platform).Append("\n"); + sb.Append(" Handler: ").Append(Handler).Append("\n"); + sb.Append(" Default: ").Append(Default).Append("\n"); + sb.Append(" Required: ").Append(Required).Append("\n"); + sb.Append(" Spec: ").Append(Spec).Append("\n"); + return sb.ToString(); + } + + /// + /// Returns the object from JSON string + /// + /// DAGJSONObjectInputAlias object + public static DAGJSONObjectInputAlias 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. + /// + /// DAGJSONObjectInputAlias object + public virtual DAGJSONObjectInputAlias DuplicateDAGJSONObjectInputAlias() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateDAGJSONObjectInputAlias(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override GenericInput DuplicateGenericInput() + { + return DuplicateDAGJSONObjectInputAlias(); + } + + /// + /// 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 DAGJSONObjectInputAlias); + } + + /// + /// Returns true if DAGJSONObjectInputAlias instances are equal + /// + /// Instance of DAGJSONObjectInputAlias to be compared + /// Boolean + public bool Equals(DAGJSONObjectInputAlias input) + { + if (input == null) + return false; + return base.Equals(input) && + ( + this.Platform == input.Platform || + this.Platform != null && + input.Platform != null && + this.Platform.SequenceEqual(input.Platform) + ) && base.Equals(input) && + ( + this.Handler == input.Handler || + this.Handler != null && + input.Handler != null && + this.Handler.SequenceEqual(input.Handler) + ) && base.Equals(input) && + ( + this.Default == input.Default || + (this.Default != null && + this.Default.Equals(input.Default)) + ) && base.Equals(input) && + ( + this.Required == input.Required || + (this.Required != null && + this.Required.Equals(input.Required)) + ) && 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.Platform != null) + hashCode = hashCode * 59 + this.Platform.GetHashCode(); + if (this.Handler != null) + hashCode = hashCode * 59 + this.Handler.GetHashCode(); + if (this.Default != null) + hashCode = hashCode * 59 + this.Default.GetHashCode(); + if (this.Required != null) + hashCode = hashCode * 59 + this.Required.GetHashCode(); + if (this.Spec != null) + hashCode = hashCode * 59 + this.Spec.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(@"^DAGJSONObjectInputAlias$", 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/DAGJSONObjectOutput.cs b/src/PollinationSDK/Model/DAGJSONObjectOutput.cs new file mode 100644 index 000000000..6a955d889 --- /dev/null +++ b/src/PollinationSDK/Model/DAGJSONObjectOutput.cs @@ -0,0 +1,246 @@ +/* + * 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 +{ + /// + /// DAG object output. This output loads the content from a file as a JSON object. + /// + [DataContract(Name = "DAGJSONObjectOutput")] + public partial class DAGJSONObjectOutput : GenericOutput, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected DAGJSONObjectOutput() + { + // Set non-required readonly properties with defaultValue + this.Type = "DAGJSONObjectOutput"; + } + + /// + /// Initializes a new instance of the class. + /// + /// Reference to a file or a task output. Task output must be file. (required). + /// A list of additional processes for loading this output on different platforms.. + /// A boolean to indicate if an artifact output is required. A False value makes the artifact optional. (default to true). + /// Output name. (required). + /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. + /// Optional description for output.. + public DAGJSONObjectOutput + ( + string name, AnyOf from, // Required parameters + Dictionary annotations= default, string description= default, List> alias= default, bool required = true // Optional parameters + ) : base(name: name, annotations: annotations, description: description)// BaseClass + { + // to ensure "from" is required (not null) + this.From = from ?? throw new ArgumentNullException("from is a required property for DAGJSONObjectOutput and cannot be null"); + this.Alias = alias; + this.Required = required; + + // Set non-required readonly properties with defaultValue + this.Type = "DAGJSONObjectOutput"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "DAGJSONObjectOutput"; + + /// + /// Reference to a file or a task output. Task output must be file. + /// + /// Reference to a file or a task output. Task output must be file. + [DataMember(Name = "from", IsRequired = true, EmitDefaultValue = false)] + public AnyOf From { get; set; } + /// + /// A list of additional processes for loading this output on different platforms. + /// + /// A list of additional processes for loading this output on different platforms. + [DataMember(Name = "alias", EmitDefaultValue = false)] + public List> Alias { get; set; } + /// + /// A boolean to indicate if an artifact output is required. A False value makes the artifact optional. + /// + /// A boolean to indicate if an artifact output is required. A False value makes the artifact optional. + [DataMember(Name = "required", EmitDefaultValue = true)] + public bool Required { get; set; } = true; + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + return "DAGJSONObjectOutput"; + } + + /// + /// 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("DAGJSONObjectOutput:\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Annotations: ").Append(Annotations).Append("\n"); + sb.Append(" Description: ").Append(Description).Append("\n"); + sb.Append(" From: ").Append(From).Append("\n"); + sb.Append(" Alias: ").Append(Alias).Append("\n"); + sb.Append(" Required: ").Append(Required).Append("\n"); + return sb.ToString(); + } + + /// + /// Returns the object from JSON string + /// + /// DAGJSONObjectOutput object + public static DAGJSONObjectOutput 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. + /// + /// DAGJSONObjectOutput object + public virtual DAGJSONObjectOutput DuplicateDAGJSONObjectOutput() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateDAGJSONObjectOutput(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override GenericOutput DuplicateGenericOutput() + { + return DuplicateDAGJSONObjectOutput(); + } + + /// + /// 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 DAGJSONObjectOutput); + } + + /// + /// Returns true if DAGJSONObjectOutput instances are equal + /// + /// Instance of DAGJSONObjectOutput to be compared + /// Boolean + public bool Equals(DAGJSONObjectOutput input) + { + if (input == null) + return false; + return base.Equals(input) && + ( + this.From == input.From || + (this.From != null && + this.From.Equals(input.From)) + ) && base.Equals(input) && + ( + this.Alias == input.Alias || + this.Alias != null && + input.Alias != null && + this.Alias.SequenceEqual(input.Alias) + ) && base.Equals(input) && + ( + this.Required == input.Required || + (this.Required != null && + this.Required.Equals(input.Required)) + ) && 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.From != null) + hashCode = hashCode * 59 + this.From.GetHashCode(); + if (this.Alias != null) + hashCode = hashCode * 59 + this.Alias.GetHashCode(); + if (this.Required != null) + hashCode = hashCode * 59 + this.Required.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(@"^DAGJSONObjectOutput$", 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/DAGJSONObjectOutputAlias.cs b/src/PollinationSDK/Model/DAGJSONObjectOutputAlias.cs new file mode 100644 index 000000000..a26b09da7 --- /dev/null +++ b/src/PollinationSDK/Model/DAGJSONObjectOutputAlias.cs @@ -0,0 +1,219 @@ +/* + * 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 +{ + /// + /// DAG alias object output. This output loads the content from a file as a JSON object. + /// + [DataContract(Name = "DAGJSONObjectOutputAlias")] + public partial class DAGJSONObjectOutputAlias : DAGArtifactOutputAlias, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected DAGJSONObjectOutputAlias() + { + // Set non-required readonly properties with defaultValue + this.Type = "DAGJSONObjectOutputAlias"; + } + + /// + /// Initializes a new instance of the class. + /// + /// Reference to a file or a task output. Task output must be file. (required). + /// Output name. (required). + /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. + /// Optional description for output.. + /// 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. (required). + /// List of process actions to process the input or output value. (required). + /// A boolean to indicate if an artifact output is required. A False value makes the artifact optional. (default to true). + public DAGJSONObjectOutputAlias + ( + string name, List platform, List handler, AnyOf from, // Required parameters + Dictionary annotations= default, string description= default, bool required = true // Optional parameters + ) : base(name: name, annotations: annotations, description: description, platform: platform, handler: handler, required: required)// BaseClass + { + // to ensure "from" is required (not null) + this.From = from ?? throw new ArgumentNullException("from is a required property for DAGJSONObjectOutputAlias and cannot be null"); + + // Set non-required readonly properties with defaultValue + this.Type = "DAGJSONObjectOutputAlias"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "DAGJSONObjectOutputAlias"; + + /// + /// Reference to a file or a task output. Task output must be file. + /// + /// Reference to a file or a task output. Task output must be file. + [DataMember(Name = "from", IsRequired = true, EmitDefaultValue = false)] + public AnyOf From { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + return "DAGJSONObjectOutputAlias"; + } + + /// + /// 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("DAGJSONObjectOutputAlias:\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Annotations: ").Append(Annotations).Append("\n"); + sb.Append(" Description: ").Append(Description).Append("\n"); + sb.Append(" Platform: ").Append(Platform).Append("\n"); + sb.Append(" Handler: ").Append(Handler).Append("\n"); + sb.Append(" Required: ").Append(Required).Append("\n"); + sb.Append(" From: ").Append(From).Append("\n"); + return sb.ToString(); + } + + /// + /// Returns the object from JSON string + /// + /// DAGJSONObjectOutputAlias object + public static DAGJSONObjectOutputAlias 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. + /// + /// DAGJSONObjectOutputAlias object + public virtual DAGJSONObjectOutputAlias DuplicateDAGJSONObjectOutputAlias() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateDAGJSONObjectOutputAlias(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override DAGArtifactOutputAlias DuplicateDAGArtifactOutputAlias() + { + return DuplicateDAGJSONObjectOutputAlias(); + } + + /// + /// 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 DAGJSONObjectOutputAlias); + } + + /// + /// Returns true if DAGJSONObjectOutputAlias instances are equal + /// + /// Instance of DAGJSONObjectOutputAlias to be compared + /// Boolean + public bool Equals(DAGJSONObjectOutputAlias input) + { + if (input == null) + return false; + return base.Equals(input) && + ( + this.From == input.From || + (this.From != null && + this.From.Equals(input.From)) + ) && 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.From != null) + hashCode = hashCode * 59 + this.From.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(@"^DAGJSONObjectOutputAlias$", 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/DAGLinkedInputAlias.cs b/src/PollinationSDK/Model/DAGLinkedInputAlias.cs new file mode 100644 index 000000000..af6c5a571 --- /dev/null +++ b/src/PollinationSDK/Model/DAGLinkedInputAlias.cs @@ -0,0 +1,206 @@ +/* + * 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 Alias for Linked Inputs. A linked input alias will be hidden in the UI and will be linked to an object in the UI using the input handler. + /// + [DataContract(Name = "DAGLinkedInputAlias")] + public partial class DAGLinkedInputAlias : DAGGenericInputAlias, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected DAGLinkedInputAlias() + { + // Set non-required readonly properties with defaultValue + this.Type = "DAGLinkedInputAlias"; + } + + /// + /// Initializes a new instance of the class. + /// + /// Input name. (required). + /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. + /// Optional description for input.. + /// 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. (required). + /// List of process actions to process the input or output value. (required). + /// Default value for generic input.. + /// A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. (default to false). + /// An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec.. + public DAGLinkedInputAlias + ( + string name, List platform, List handler, // Required parameters + Dictionary annotations= default, string description= default, string _default= default, bool required = false, Object spec= default // Optional parameters + ) : base(name: name, annotations: annotations, description: description, platform: platform, handler: handler, _default: _default, required: required, spec: spec)// BaseClass + { + + // Set non-required readonly properties with defaultValue + this.Type = "DAGLinkedInputAlias"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "DAGLinkedInputAlias"; + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + return "DAGLinkedInputAlias"; + } + + /// + /// 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("DAGLinkedInputAlias:\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Annotations: ").Append(Annotations).Append("\n"); + sb.Append(" Description: ").Append(Description).Append("\n"); + sb.Append(" Platform: ").Append(Platform).Append("\n"); + sb.Append(" Handler: ").Append(Handler).Append("\n"); + sb.Append(" Default: ").Append(Default).Append("\n"); + sb.Append(" Required: ").Append(Required).Append("\n"); + sb.Append(" Spec: ").Append(Spec).Append("\n"); + return sb.ToString(); + } + + /// + /// Returns the object from JSON string + /// + /// DAGLinkedInputAlias object + public static DAGLinkedInputAlias 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. + /// + /// DAGLinkedInputAlias object + public virtual DAGLinkedInputAlias DuplicateDAGLinkedInputAlias() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateDAGLinkedInputAlias(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override DAGGenericInputAlias DuplicateDAGGenericInputAlias() + { + return DuplicateDAGLinkedInputAlias(); + } + + /// + /// 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 DAGLinkedInputAlias); + } + + /// + /// Returns true if DAGLinkedInputAlias instances are equal + /// + /// Instance of DAGLinkedInputAlias to be compared + /// Boolean + public bool Equals(DAGLinkedInputAlias 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(@"^DAGLinkedInputAlias$", 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/DAGLinkedOutputAlias.cs b/src/PollinationSDK/Model/DAGLinkedOutputAlias.cs new file mode 100644 index 000000000..7a658749d --- /dev/null +++ b/src/PollinationSDK/Model/DAGLinkedOutputAlias.cs @@ -0,0 +1,200 @@ +/* + * 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 Alias for Linked Outputs. A linked output alias will be translated to an object in the UI and stay linked to it. + /// + [DataContract(Name = "DAGLinkedOutputAlias")] + public partial class DAGLinkedOutputAlias : DAGGenericOutputAlias, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected DAGLinkedOutputAlias() + { + // Set non-required readonly properties with defaultValue + this.Type = "DAGLinkedOutputAlias"; + } + + /// + /// Initializes a new instance of the class. + /// + /// Output name. (required). + /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. + /// Optional description for output.. + /// 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. (required). + /// List of process actions to process the input or output value. (required). + public DAGLinkedOutputAlias + ( + string name, List platform, List handler, // Required parameters + Dictionary annotations= default, string description= default // Optional parameters + ) : base(name: name, annotations: annotations, description: description, platform: platform, handler: handler)// BaseClass + { + + // Set non-required readonly properties with defaultValue + this.Type = "DAGLinkedOutputAlias"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "DAGLinkedOutputAlias"; + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + return "DAGLinkedOutputAlias"; + } + + /// + /// 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("DAGLinkedOutputAlias:\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Annotations: ").Append(Annotations).Append("\n"); + sb.Append(" Description: ").Append(Description).Append("\n"); + sb.Append(" Platform: ").Append(Platform).Append("\n"); + sb.Append(" Handler: ").Append(Handler).Append("\n"); + return sb.ToString(); + } + + /// + /// Returns the object from JSON string + /// + /// DAGLinkedOutputAlias object + public static DAGLinkedOutputAlias 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. + /// + /// DAGLinkedOutputAlias object + public virtual DAGLinkedOutputAlias DuplicateDAGLinkedOutputAlias() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateDAGLinkedOutputAlias(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override DAGGenericOutputAlias DuplicateDAGGenericOutputAlias() + { + return DuplicateDAGLinkedOutputAlias(); + } + + /// + /// 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 DAGLinkedOutputAlias); + } + + /// + /// Returns true if DAGLinkedOutputAlias instances are equal + /// + /// Instance of DAGLinkedOutputAlias to be compared + /// Boolean + public bool Equals(DAGLinkedOutputAlias 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(@"^DAGLinkedOutputAlias$", 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/DAGNumberInput.cs b/src/PollinationSDK/Model/DAGNumberInput.cs new file mode 100644 index 000000000..3bd81bc0e --- /dev/null +++ b/src/PollinationSDK/Model/DAGNumberInput.cs @@ -0,0 +1,256 @@ +/* + * 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 number input. You can add additional validation by defining a JSONSchema specification. See http://json-schema.org/understanding-json-schema/reference/numeric.html#numeric for more information. + /// + [DataContract(Name = "DAGNumberInput")] + public partial class DAGNumberInput : GenericInput, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected DAGNumberInput() + { + // Set non-required readonly properties with defaultValue + this.Type = "DAGNumberInput"; + } + + /// + /// Initializes a new instance of the class. + /// + /// Default value to use for an input if a value was not supplied.. + /// A list of aliases for this input in different platforms.. + /// A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. (default to false). + /// An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec.. + /// Input name. (required). + /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. + /// Optional description for input.. + public DAGNumberInput + ( + string name, // Required parameters + Dictionary annotations= default, string description= default, double _default= default, List> alias= default, bool required = false, Object spec= default // Optional parameters + ) : base(name: name, annotations: annotations, description: description)// BaseClass + { + this.Default = _default; + this.Alias = alias; + this.Required = required; + this.Spec = spec; + + // Set non-required readonly properties with defaultValue + this.Type = "DAGNumberInput"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "DAGNumberInput"; + + /// + /// Default value to use for an input if a value was not supplied. + /// + /// Default value to use for an input if a value was not supplied. + [DataMember(Name = "default", EmitDefaultValue = false)] + public double Default { get; set; } + /// + /// A list of aliases for this input in different platforms. + /// + /// A list of aliases for this input in different platforms. + [DataMember(Name = "alias", EmitDefaultValue = false)] + public List> Alias { get; set; } + /// + /// A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. + /// + /// A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. + [DataMember(Name = "required", EmitDefaultValue = true)] + public bool Required { get; set; } = false; + /// + /// An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec. + /// + /// An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec. + [DataMember(Name = "spec", EmitDefaultValue = false)] + public Object Spec { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + return "DAGNumberInput"; + } + + /// + /// 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("DAGNumberInput:\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Annotations: ").Append(Annotations).Append("\n"); + sb.Append(" Description: ").Append(Description).Append("\n"); + sb.Append(" Default: ").Append(Default).Append("\n"); + sb.Append(" Alias: ").Append(Alias).Append("\n"); + sb.Append(" Required: ").Append(Required).Append("\n"); + sb.Append(" Spec: ").Append(Spec).Append("\n"); + return sb.ToString(); + } + + /// + /// Returns the object from JSON string + /// + /// DAGNumberInput object + public static DAGNumberInput 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. + /// + /// DAGNumberInput object + public virtual DAGNumberInput DuplicateDAGNumberInput() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateDAGNumberInput(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override GenericInput DuplicateGenericInput() + { + return DuplicateDAGNumberInput(); + } + + /// + /// 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 DAGNumberInput); + } + + /// + /// Returns true if DAGNumberInput instances are equal + /// + /// Instance of DAGNumberInput to be compared + /// Boolean + public bool Equals(DAGNumberInput input) + { + if (input == null) + return false; + return base.Equals(input) && + ( + this.Default == input.Default || + (this.Default != null && + this.Default.Equals(input.Default)) + ) && base.Equals(input) && + ( + this.Alias == input.Alias || + this.Alias != null && + input.Alias != null && + this.Alias.SequenceEqual(input.Alias) + ) && base.Equals(input) && + ( + this.Required == input.Required || + (this.Required != null && + this.Required.Equals(input.Required)) + ) && 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.Default != null) + hashCode = hashCode * 59 + this.Default.GetHashCode(); + if (this.Alias != null) + hashCode = hashCode * 59 + this.Alias.GetHashCode(); + if (this.Required != null) + hashCode = hashCode * 59 + this.Required.GetHashCode(); + if (this.Spec != null) + hashCode = hashCode * 59 + this.Spec.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(@"^DAGNumberInput$", 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/DAGNumberInputAlias.cs b/src/PollinationSDK/Model/DAGNumberInputAlias.cs new file mode 100644 index 000000000..a1fd61bfa --- /dev/null +++ b/src/PollinationSDK/Model/DAGNumberInputAlias.cs @@ -0,0 +1,275 @@ +/* + * 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 alias number input. You can add additional validation by defining a JSONSchema specification. See http://json-schema.org/understanding-json-schema/reference/numeric.html#numeric for more information. + /// + [DataContract(Name = "DAGNumberInputAlias")] + public partial class DAGNumberInputAlias : GenericInput, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected DAGNumberInputAlias() + { + // Set non-required readonly properties with defaultValue + this.Type = "DAGNumberInputAlias"; + } + + /// + /// Initializes a new instance of the class. + /// + /// 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. (required). + /// List of process actions to process the input or output value. (required). + /// Default value to use for an input if a value was not supplied.. + /// A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. (default to false). + /// An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec.. + /// Input name. (required). + /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. + /// Optional description for input.. + public DAGNumberInputAlias + ( + string name, List platform, List handler, // Required parameters + Dictionary annotations= default, string description= default, double _default= default, bool required = false, Object spec= default // Optional parameters + ) : base(name: name, annotations: annotations, description: description)// BaseClass + { + // to ensure "platform" is required (not null) + this.Platform = platform ?? throw new ArgumentNullException("platform is a required property for DAGNumberInputAlias and cannot be null"); + // to ensure "handler" is required (not null) + this.Handler = handler ?? throw new ArgumentNullException("handler is a required property for DAGNumberInputAlias and cannot be null"); + this.Default = _default; + this.Required = required; + this.Spec = spec; + + // Set non-required readonly properties with defaultValue + this.Type = "DAGNumberInputAlias"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "DAGNumberInputAlias"; + + /// + /// 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. + /// + /// 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. + [DataMember(Name = "platform", IsRequired = true, EmitDefaultValue = false)] + public List Platform { get; set; } + /// + /// List of process actions to process the input or output value. + /// + /// List of process actions to process the input or output value. + [DataMember(Name = "handler", IsRequired = true, EmitDefaultValue = false)] + public List Handler { get; set; } + /// + /// Default value to use for an input if a value was not supplied. + /// + /// Default value to use for an input if a value was not supplied. + [DataMember(Name = "default", EmitDefaultValue = false)] + public double Default { get; set; } + /// + /// A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. + /// + /// A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. + [DataMember(Name = "required", EmitDefaultValue = true)] + public bool Required { get; set; } = false; + /// + /// An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec. + /// + /// An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec. + [DataMember(Name = "spec", EmitDefaultValue = false)] + public Object Spec { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + return "DAGNumberInputAlias"; + } + + /// + /// 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("DAGNumberInputAlias:\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Annotations: ").Append(Annotations).Append("\n"); + sb.Append(" Description: ").Append(Description).Append("\n"); + sb.Append(" Platform: ").Append(Platform).Append("\n"); + sb.Append(" Handler: ").Append(Handler).Append("\n"); + sb.Append(" Default: ").Append(Default).Append("\n"); + sb.Append(" Required: ").Append(Required).Append("\n"); + sb.Append(" Spec: ").Append(Spec).Append("\n"); + return sb.ToString(); + } + + /// + /// Returns the object from JSON string + /// + /// DAGNumberInputAlias object + public static DAGNumberInputAlias 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. + /// + /// DAGNumberInputAlias object + public virtual DAGNumberInputAlias DuplicateDAGNumberInputAlias() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateDAGNumberInputAlias(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override GenericInput DuplicateGenericInput() + { + return DuplicateDAGNumberInputAlias(); + } + + /// + /// 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 DAGNumberInputAlias); + } + + /// + /// Returns true if DAGNumberInputAlias instances are equal + /// + /// Instance of DAGNumberInputAlias to be compared + /// Boolean + public bool Equals(DAGNumberInputAlias input) + { + if (input == null) + return false; + return base.Equals(input) && + ( + this.Platform == input.Platform || + this.Platform != null && + input.Platform != null && + this.Platform.SequenceEqual(input.Platform) + ) && base.Equals(input) && + ( + this.Handler == input.Handler || + this.Handler != null && + input.Handler != null && + this.Handler.SequenceEqual(input.Handler) + ) && base.Equals(input) && + ( + this.Default == input.Default || + (this.Default != null && + this.Default.Equals(input.Default)) + ) && base.Equals(input) && + ( + this.Required == input.Required || + (this.Required != null && + this.Required.Equals(input.Required)) + ) && 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.Platform != null) + hashCode = hashCode * 59 + this.Platform.GetHashCode(); + if (this.Handler != null) + hashCode = hashCode * 59 + this.Handler.GetHashCode(); + if (this.Default != null) + hashCode = hashCode * 59 + this.Default.GetHashCode(); + if (this.Required != null) + hashCode = hashCode * 59 + this.Required.GetHashCode(); + if (this.Spec != null) + hashCode = hashCode * 59 + this.Spec.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(@"^DAGNumberInputAlias$", 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/DAGNumberOutput.cs b/src/PollinationSDK/Model/DAGNumberOutput.cs new file mode 100644 index 000000000..af6f6e404 --- /dev/null +++ b/src/PollinationSDK/Model/DAGNumberOutput.cs @@ -0,0 +1,246 @@ +/* + * 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 +{ + /// + /// DAG number output. This output loads the content from a file as a floating number. + /// + [DataContract(Name = "DAGNumberOutput")] + public partial class DAGNumberOutput : GenericOutput, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected DAGNumberOutput() + { + // Set non-required readonly properties with defaultValue + this.Type = "DAGNumberOutput"; + } + + /// + /// Initializes a new instance of the class. + /// + /// Reference to a file or a task output. Task output must be file. (required). + /// A list of additional processes for loading this output on different platforms.. + /// A boolean to indicate if an artifact output is required. A False value makes the artifact optional. (default to true). + /// Output name. (required). + /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. + /// Optional description for output.. + public DAGNumberOutput + ( + string name, AnyOf from, // Required parameters + Dictionary annotations= default, string description= default, List> alias= default, bool required = true // Optional parameters + ) : base(name: name, annotations: annotations, description: description)// BaseClass + { + // to ensure "from" is required (not null) + this.From = from ?? throw new ArgumentNullException("from is a required property for DAGNumberOutput and cannot be null"); + this.Alias = alias; + this.Required = required; + + // Set non-required readonly properties with defaultValue + this.Type = "DAGNumberOutput"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "DAGNumberOutput"; + + /// + /// Reference to a file or a task output. Task output must be file. + /// + /// Reference to a file or a task output. Task output must be file. + [DataMember(Name = "from", IsRequired = true, EmitDefaultValue = false)] + public AnyOf From { get; set; } + /// + /// A list of additional processes for loading this output on different platforms. + /// + /// A list of additional processes for loading this output on different platforms. + [DataMember(Name = "alias", EmitDefaultValue = false)] + public List> Alias { get; set; } + /// + /// A boolean to indicate if an artifact output is required. A False value makes the artifact optional. + /// + /// A boolean to indicate if an artifact output is required. A False value makes the artifact optional. + [DataMember(Name = "required", EmitDefaultValue = true)] + public bool Required { get; set; } = true; + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + return "DAGNumberOutput"; + } + + /// + /// 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("DAGNumberOutput:\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Annotations: ").Append(Annotations).Append("\n"); + sb.Append(" Description: ").Append(Description).Append("\n"); + sb.Append(" From: ").Append(From).Append("\n"); + sb.Append(" Alias: ").Append(Alias).Append("\n"); + sb.Append(" Required: ").Append(Required).Append("\n"); + return sb.ToString(); + } + + /// + /// Returns the object from JSON string + /// + /// DAGNumberOutput object + public static DAGNumberOutput 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. + /// + /// DAGNumberOutput object + public virtual DAGNumberOutput DuplicateDAGNumberOutput() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateDAGNumberOutput(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override GenericOutput DuplicateGenericOutput() + { + return DuplicateDAGNumberOutput(); + } + + /// + /// 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 DAGNumberOutput); + } + + /// + /// Returns true if DAGNumberOutput instances are equal + /// + /// Instance of DAGNumberOutput to be compared + /// Boolean + public bool Equals(DAGNumberOutput input) + { + if (input == null) + return false; + return base.Equals(input) && + ( + this.From == input.From || + (this.From != null && + this.From.Equals(input.From)) + ) && base.Equals(input) && + ( + this.Alias == input.Alias || + this.Alias != null && + input.Alias != null && + this.Alias.SequenceEqual(input.Alias) + ) && base.Equals(input) && + ( + this.Required == input.Required || + (this.Required != null && + this.Required.Equals(input.Required)) + ) && 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.From != null) + hashCode = hashCode * 59 + this.From.GetHashCode(); + if (this.Alias != null) + hashCode = hashCode * 59 + this.Alias.GetHashCode(); + if (this.Required != null) + hashCode = hashCode * 59 + this.Required.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(@"^DAGNumberOutput$", 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/DAGNumberOutputAlias.cs b/src/PollinationSDK/Model/DAGNumberOutputAlias.cs new file mode 100644 index 000000000..fa18f5fda --- /dev/null +++ b/src/PollinationSDK/Model/DAGNumberOutputAlias.cs @@ -0,0 +1,219 @@ +/* + * 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 +{ + /// + /// DAG alias number output. This output loads the content from a file as a floating number. + /// + [DataContract(Name = "DAGNumberOutputAlias")] + public partial class DAGNumberOutputAlias : DAGArtifactOutputAlias, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected DAGNumberOutputAlias() + { + // Set non-required readonly properties with defaultValue + this.Type = "DAGNumberOutputAlias"; + } + + /// + /// Initializes a new instance of the class. + /// + /// Reference to a file or a task output. Task output must be file. (required). + /// Output name. (required). + /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. + /// Optional description for output.. + /// 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. (required). + /// List of process actions to process the input or output value. (required). + /// A boolean to indicate if an artifact output is required. A False value makes the artifact optional. (default to true). + public DAGNumberOutputAlias + ( + string name, List platform, List handler, AnyOf from, // Required parameters + Dictionary annotations= default, string description= default, bool required = true // Optional parameters + ) : base(name: name, annotations: annotations, description: description, platform: platform, handler: handler, required: required)// BaseClass + { + // to ensure "from" is required (not null) + this.From = from ?? throw new ArgumentNullException("from is a required property for DAGNumberOutputAlias and cannot be null"); + + // Set non-required readonly properties with defaultValue + this.Type = "DAGNumberOutputAlias"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "DAGNumberOutputAlias"; + + /// + /// Reference to a file or a task output. Task output must be file. + /// + /// Reference to a file or a task output. Task output must be file. + [DataMember(Name = "from", IsRequired = true, EmitDefaultValue = false)] + public AnyOf From { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + return "DAGNumberOutputAlias"; + } + + /// + /// 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("DAGNumberOutputAlias:\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Annotations: ").Append(Annotations).Append("\n"); + sb.Append(" Description: ").Append(Description).Append("\n"); + sb.Append(" Platform: ").Append(Platform).Append("\n"); + sb.Append(" Handler: ").Append(Handler).Append("\n"); + sb.Append(" Required: ").Append(Required).Append("\n"); + sb.Append(" From: ").Append(From).Append("\n"); + return sb.ToString(); + } + + /// + /// Returns the object from JSON string + /// + /// DAGNumberOutputAlias object + public static DAGNumberOutputAlias 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. + /// + /// DAGNumberOutputAlias object + public virtual DAGNumberOutputAlias DuplicateDAGNumberOutputAlias() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateDAGNumberOutputAlias(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override DAGArtifactOutputAlias DuplicateDAGArtifactOutputAlias() + { + return DuplicateDAGNumberOutputAlias(); + } + + /// + /// 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 DAGNumberOutputAlias); + } + + /// + /// Returns true if DAGNumberOutputAlias instances are equal + /// + /// Instance of DAGNumberOutputAlias to be compared + /// Boolean + public bool Equals(DAGNumberOutputAlias input) + { + if (input == null) + return false; + return base.Equals(input) && + ( + this.From == input.From || + (this.From != null && + this.From.Equals(input.From)) + ) && 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.From != null) + hashCode = hashCode * 59 + this.From.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(@"^DAGNumberOutputAlias$", 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/DAGPathInput.cs b/src/PollinationSDK/Model/DAGPathInput.cs new file mode 100644 index 000000000..7dcbfb53f --- /dev/null +++ b/src/PollinationSDK/Model/DAGPathInput.cs @@ -0,0 +1,273 @@ +/* + * 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 file or a folder input. Use this input only in cases that the input can be either a file or folder. For file or folder-only inputs see File and Folder. Path is a special string input. Unlike other string inputs, a path will be copied from its location to execution folder when a workflow is executed. You can add additional validation by defining a JSONSchema specification. See http://json-schema.org/understanding-json-schema/reference/string.html#string for more information. .. code-block:: python # a file with maximum 50 characters with an ``epw`` extension. \"schema\": { \"type\": \"string\", \"maxLength\": 50, \"pattern\": \"(?i)(^.*\\.epw$)\" } + /// + [DataContract(Name = "DAGPathInput")] + public partial class DAGPathInput : GenericInput, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected DAGPathInput() + { + // Set non-required readonly properties with defaultValue + this.Type = "DAGPathInput"; + } + + /// + /// Initializes a new instance of the class. + /// + /// The default source for file if the value is not provided.. + /// A list of aliases for this input in different platforms.. + /// A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. (default to false). + /// An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec.. + /// Optional list of extensions for path. The check for extension is case-insensitive. The extension will only be validated for file inputs.. + /// Input name. (required). + /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. + /// Optional description for input.. + public DAGPathInput + ( + string name, // Required parameters + Dictionary annotations= default, string description= default, AnyOf _default= default, List> alias= default, bool required = false, Object spec= default, List extensions= default // Optional parameters + ) : base(name: name, annotations: annotations, description: description)// BaseClass + { + this.Default = _default; + this.Alias = alias; + this.Required = required; + this.Spec = spec; + this.Extensions = extensions; + + // Set non-required readonly properties with defaultValue + this.Type = "DAGPathInput"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "DAGPathInput"; + + /// + /// The default source for file if the value is not provided. + /// + /// The default source for file if the value is not provided. + [DataMember(Name = "default", EmitDefaultValue = false)] + public AnyOf Default { get; set; } + /// + /// A list of aliases for this input in different platforms. + /// + /// A list of aliases for this input in different platforms. + [DataMember(Name = "alias", EmitDefaultValue = false)] + public List> Alias { get; set; } + /// + /// A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. + /// + /// A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. + [DataMember(Name = "required", EmitDefaultValue = true)] + public bool Required { get; set; } = false; + /// + /// An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec. + /// + /// An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec. + [DataMember(Name = "spec", EmitDefaultValue = false)] + public Object Spec { get; set; } + /// + /// Optional list of extensions for path. The check for extension is case-insensitive. The extension will only be validated for file inputs. + /// + /// Optional list of extensions for path. The check for extension is case-insensitive. The extension will only be validated for file inputs. + [DataMember(Name = "extensions", EmitDefaultValue = false)] + public List Extensions { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + return "DAGPathInput"; + } + + /// + /// 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("DAGPathInput:\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Annotations: ").Append(Annotations).Append("\n"); + sb.Append(" Description: ").Append(Description).Append("\n"); + sb.Append(" Default: ").Append(Default).Append("\n"); + sb.Append(" Alias: ").Append(Alias).Append("\n"); + sb.Append(" Required: ").Append(Required).Append("\n"); + sb.Append(" Spec: ").Append(Spec).Append("\n"); + sb.Append(" Extensions: ").Append(Extensions).Append("\n"); + return sb.ToString(); + } + + /// + /// Returns the object from JSON string + /// + /// DAGPathInput object + public static DAGPathInput 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. + /// + /// DAGPathInput object + public virtual DAGPathInput DuplicateDAGPathInput() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateDAGPathInput(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override GenericInput DuplicateGenericInput() + { + return DuplicateDAGPathInput(); + } + + /// + /// 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 DAGPathInput); + } + + /// + /// Returns true if DAGPathInput instances are equal + /// + /// Instance of DAGPathInput to be compared + /// Boolean + public bool Equals(DAGPathInput input) + { + if (input == null) + return false; + return base.Equals(input) && + ( + this.Default == input.Default || + (this.Default != null && + this.Default.Equals(input.Default)) + ) && base.Equals(input) && + ( + this.Alias == input.Alias || + this.Alias != null && + input.Alias != null && + this.Alias.SequenceEqual(input.Alias) + ) && base.Equals(input) && + ( + this.Required == input.Required || + (this.Required != null && + this.Required.Equals(input.Required)) + ) && base.Equals(input) && + ( + this.Extensions == input.Extensions || + this.Extensions != null && + input.Extensions != null && + this.Extensions.SequenceEqual(input.Extensions) + ) && 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.Default != null) + hashCode = hashCode * 59 + this.Default.GetHashCode(); + if (this.Alias != null) + hashCode = hashCode * 59 + this.Alias.GetHashCode(); + if (this.Required != null) + hashCode = hashCode * 59 + this.Required.GetHashCode(); + if (this.Spec != null) + hashCode = hashCode * 59 + this.Spec.GetHashCode(); + if (this.Extensions != null) + hashCode = hashCode * 59 + this.Extensions.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(@"^DAGPathInput$", 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/DAGPathInputAlias.cs b/src/PollinationSDK/Model/DAGPathInputAlias.cs new file mode 100644 index 000000000..d76598c42 --- /dev/null +++ b/src/PollinationSDK/Model/DAGPathInputAlias.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 +{ + /// + /// A file or a folder input. Use this input only in cases that the input can be either a file or folder. For file or folder-only inputs see File and Folder. Path is a special string input. Unlike other string inputs, a path will be copied from its location to execution folder when a workflow is executed. You can add additional validation by defining a JSONSchema specification. See http://json-schema.org/understanding-json-schema/reference/string.html#string for more information. .. code-block:: python # a file with maximum 50 characters with an ``epw`` extension. \"schema\": { \"type\": \"string\", \"maxLength\": 50, \"pattern\": \"(?i)(^.*\\.epw$)\" } + /// + [DataContract(Name = "DAGPathInputAlias")] + public partial class DAGPathInputAlias : GenericInput, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected DAGPathInputAlias() + { + // Set non-required readonly properties with defaultValue + this.Type = "DAGPathInputAlias"; + } + + /// + /// Initializes a new instance of the class. + /// + /// 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. (required). + /// List of process actions to process the input or output value. (required). + /// The default source for file if the value is not provided.. + /// A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. (default to false). + /// An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec.. + /// Optional list of extensions for path. The check for extension is case-insensitive. The extension will only be validated for file inputs.. + /// Input name. (required). + /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. + /// Optional description for input.. + public DAGPathInputAlias + ( + string name, List platform, List handler, // Required parameters + Dictionary annotations= default, string description= default, AnyOf _default= default, bool required = false, Object spec= default, List extensions= default // Optional parameters + ) : base(name: name, annotations: annotations, description: description)// BaseClass + { + // to ensure "platform" is required (not null) + this.Platform = platform ?? throw new ArgumentNullException("platform is a required property for DAGPathInputAlias and cannot be null"); + // to ensure "handler" is required (not null) + this.Handler = handler ?? throw new ArgumentNullException("handler is a required property for DAGPathInputAlias and cannot be null"); + this.Default = _default; + this.Required = required; + this.Spec = spec; + this.Extensions = extensions; + + // Set non-required readonly properties with defaultValue + this.Type = "DAGPathInputAlias"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "DAGPathInputAlias"; + + /// + /// 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. + /// + /// 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. + [DataMember(Name = "platform", IsRequired = true, EmitDefaultValue = false)] + public List Platform { get; set; } + /// + /// List of process actions to process the input or output value. + /// + /// List of process actions to process the input or output value. + [DataMember(Name = "handler", IsRequired = true, EmitDefaultValue = false)] + public List Handler { get; set; } + /// + /// The default source for file if the value is not provided. + /// + /// The default source for file if the value is not provided. + [DataMember(Name = "default", EmitDefaultValue = false)] + public AnyOf Default { get; set; } + /// + /// A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. + /// + /// A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. + [DataMember(Name = "required", EmitDefaultValue = true)] + public bool Required { get; set; } = false; + /// + /// An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec. + /// + /// An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec. + [DataMember(Name = "spec", EmitDefaultValue = false)] + public Object Spec { get; set; } + /// + /// Optional list of extensions for path. The check for extension is case-insensitive. The extension will only be validated for file inputs. + /// + /// Optional list of extensions for path. The check for extension is case-insensitive. The extension will only be validated for file inputs. + [DataMember(Name = "extensions", EmitDefaultValue = false)] + public List Extensions { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + return "DAGPathInputAlias"; + } + + /// + /// 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("DAGPathInputAlias:\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Annotations: ").Append(Annotations).Append("\n"); + sb.Append(" Description: ").Append(Description).Append("\n"); + sb.Append(" Platform: ").Append(Platform).Append("\n"); + sb.Append(" Handler: ").Append(Handler).Append("\n"); + sb.Append(" Default: ").Append(Default).Append("\n"); + sb.Append(" Required: ").Append(Required).Append("\n"); + sb.Append(" Spec: ").Append(Spec).Append("\n"); + sb.Append(" Extensions: ").Append(Extensions).Append("\n"); + return sb.ToString(); + } + + /// + /// Returns the object from JSON string + /// + /// DAGPathInputAlias object + public static DAGPathInputAlias 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. + /// + /// DAGPathInputAlias object + public virtual DAGPathInputAlias DuplicateDAGPathInputAlias() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateDAGPathInputAlias(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override GenericInput DuplicateGenericInput() + { + return DuplicateDAGPathInputAlias(); + } + + /// + /// 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 DAGPathInputAlias); + } + + /// + /// Returns true if DAGPathInputAlias instances are equal + /// + /// Instance of DAGPathInputAlias to be compared + /// Boolean + public bool Equals(DAGPathInputAlias input) + { + if (input == null) + return false; + return base.Equals(input) && + ( + this.Platform == input.Platform || + this.Platform != null && + input.Platform != null && + this.Platform.SequenceEqual(input.Platform) + ) && base.Equals(input) && + ( + this.Handler == input.Handler || + this.Handler != null && + input.Handler != null && + this.Handler.SequenceEqual(input.Handler) + ) && base.Equals(input) && + ( + this.Default == input.Default || + (this.Default != null && + this.Default.Equals(input.Default)) + ) && base.Equals(input) && + ( + this.Required == input.Required || + (this.Required != null && + this.Required.Equals(input.Required)) + ) && base.Equals(input) && + ( + this.Extensions == input.Extensions || + this.Extensions != null && + input.Extensions != null && + this.Extensions.SequenceEqual(input.Extensions) + ) && 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.Platform != null) + hashCode = hashCode * 59 + this.Platform.GetHashCode(); + if (this.Handler != null) + hashCode = hashCode * 59 + this.Handler.GetHashCode(); + if (this.Default != null) + hashCode = hashCode * 59 + this.Default.GetHashCode(); + if (this.Required != null) + hashCode = hashCode * 59 + this.Required.GetHashCode(); + if (this.Spec != null) + hashCode = hashCode * 59 + this.Spec.GetHashCode(); + if (this.Extensions != null) + hashCode = hashCode * 59 + this.Extensions.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(@"^DAGPathInputAlias$", 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/DAGPathOutput.cs b/src/PollinationSDK/Model/DAGPathOutput.cs new file mode 100644 index 000000000..d4bfa6fbd --- /dev/null +++ b/src/PollinationSDK/Model/DAGPathOutput.cs @@ -0,0 +1,246 @@ +/* + * 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 +{ + /// + /// DAG path output. + /// + [DataContract(Name = "DAGPathOutput")] + public partial class DAGPathOutput : GenericOutput, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected DAGPathOutput() + { + // Set non-required readonly properties with defaultValue + this.Type = "DAGPathOutput"; + } + + /// + /// Initializes a new instance of the class. + /// + /// Reference to a file, folder or a task output. Task output must either be a file or a folder. (required). + /// A list of additional processes for loading this output on different platforms.. + /// A boolean to indicate if an artifact output is required. A False value makes the artifact optional. (default to true). + /// Output name. (required). + /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. + /// Optional description for output.. + public DAGPathOutput + ( + string name, AnyOf from, // Required parameters + Dictionary annotations= default, string description= default, List> alias= default, bool required = true // Optional parameters + ) : base(name: name, annotations: annotations, description: description)// BaseClass + { + // to ensure "from" is required (not null) + this.From = from ?? throw new ArgumentNullException("from is a required property for DAGPathOutput and cannot be null"); + this.Alias = alias; + this.Required = required; + + // Set non-required readonly properties with defaultValue + this.Type = "DAGPathOutput"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "DAGPathOutput"; + + /// + /// Reference to a file, folder or a task output. Task output must either be a file or a folder. + /// + /// Reference to a file, folder or a task output. Task output must either be a file or a folder. + [DataMember(Name = "from", IsRequired = true, EmitDefaultValue = false)] + public AnyOf From { get; set; } + /// + /// A list of additional processes for loading this output on different platforms. + /// + /// A list of additional processes for loading this output on different platforms. + [DataMember(Name = "alias", EmitDefaultValue = false)] + public List> Alias { get; set; } + /// + /// A boolean to indicate if an artifact output is required. A False value makes the artifact optional. + /// + /// A boolean to indicate if an artifact output is required. A False value makes the artifact optional. + [DataMember(Name = "required", EmitDefaultValue = true)] + public bool Required { get; set; } = true; + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + return "DAGPathOutput"; + } + + /// + /// 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("DAGPathOutput:\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Annotations: ").Append(Annotations).Append("\n"); + sb.Append(" Description: ").Append(Description).Append("\n"); + sb.Append(" From: ").Append(From).Append("\n"); + sb.Append(" Alias: ").Append(Alias).Append("\n"); + sb.Append(" Required: ").Append(Required).Append("\n"); + return sb.ToString(); + } + + /// + /// Returns the object from JSON string + /// + /// DAGPathOutput object + public static DAGPathOutput 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. + /// + /// DAGPathOutput object + public virtual DAGPathOutput DuplicateDAGPathOutput() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateDAGPathOutput(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override GenericOutput DuplicateGenericOutput() + { + return DuplicateDAGPathOutput(); + } + + /// + /// 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 DAGPathOutput); + } + + /// + /// Returns true if DAGPathOutput instances are equal + /// + /// Instance of DAGPathOutput to be compared + /// Boolean + public bool Equals(DAGPathOutput input) + { + if (input == null) + return false; + return base.Equals(input) && + ( + this.From == input.From || + (this.From != null && + this.From.Equals(input.From)) + ) && base.Equals(input) && + ( + this.Alias == input.Alias || + this.Alias != null && + input.Alias != null && + this.Alias.SequenceEqual(input.Alias) + ) && base.Equals(input) && + ( + this.Required == input.Required || + (this.Required != null && + this.Required.Equals(input.Required)) + ) && 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.From != null) + hashCode = hashCode * 59 + this.From.GetHashCode(); + if (this.Alias != null) + hashCode = hashCode * 59 + this.Alias.GetHashCode(); + if (this.Required != null) + hashCode = hashCode * 59 + this.Required.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(@"^DAGPathOutput$", 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/DAGPathOutputAlias.cs b/src/PollinationSDK/Model/DAGPathOutputAlias.cs new file mode 100644 index 000000000..2354711a8 --- /dev/null +++ b/src/PollinationSDK/Model/DAGPathOutputAlias.cs @@ -0,0 +1,219 @@ +/* + * 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 +{ + /// + /// DAG alias path output. + /// + [DataContract(Name = "DAGPathOutputAlias")] + public partial class DAGPathOutputAlias : DAGArtifactOutputAlias, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected DAGPathOutputAlias() + { + // Set non-required readonly properties with defaultValue + this.Type = "DAGPathOutputAlias"; + } + + /// + /// Initializes a new instance of the class. + /// + /// Reference to a file, folder or a task output. Task output must either be a file or a folder. (required). + /// Output name. (required). + /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. + /// Optional description for output.. + /// 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. (required). + /// List of process actions to process the input or output value. (required). + /// A boolean to indicate if an artifact output is required. A False value makes the artifact optional. (default to true). + public DAGPathOutputAlias + ( + string name, List platform, List handler, AnyOf from, // Required parameters + Dictionary annotations= default, string description= default, bool required = true // Optional parameters + ) : base(name: name, annotations: annotations, description: description, platform: platform, handler: handler, required: required)// BaseClass + { + // to ensure "from" is required (not null) + this.From = from ?? throw new ArgumentNullException("from is a required property for DAGPathOutputAlias and cannot be null"); + + // Set non-required readonly properties with defaultValue + this.Type = "DAGPathOutputAlias"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "DAGPathOutputAlias"; + + /// + /// Reference to a file, folder or a task output. Task output must either be a file or a folder. + /// + /// Reference to a file, folder or a task output. Task output must either be a file or a folder. + [DataMember(Name = "from", IsRequired = true, EmitDefaultValue = false)] + public AnyOf From { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + return "DAGPathOutputAlias"; + } + + /// + /// 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("DAGPathOutputAlias:\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Annotations: ").Append(Annotations).Append("\n"); + sb.Append(" Description: ").Append(Description).Append("\n"); + sb.Append(" Platform: ").Append(Platform).Append("\n"); + sb.Append(" Handler: ").Append(Handler).Append("\n"); + sb.Append(" Required: ").Append(Required).Append("\n"); + sb.Append(" From: ").Append(From).Append("\n"); + return sb.ToString(); + } + + /// + /// Returns the object from JSON string + /// + /// DAGPathOutputAlias object + public static DAGPathOutputAlias 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. + /// + /// DAGPathOutputAlias object + public virtual DAGPathOutputAlias DuplicateDAGPathOutputAlias() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateDAGPathOutputAlias(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override DAGArtifactOutputAlias DuplicateDAGArtifactOutputAlias() + { + return DuplicateDAGPathOutputAlias(); + } + + /// + /// 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 DAGPathOutputAlias); + } + + /// + /// Returns true if DAGPathOutputAlias instances are equal + /// + /// Instance of DAGPathOutputAlias to be compared + /// Boolean + public bool Equals(DAGPathOutputAlias input) + { + if (input == null) + return false; + return base.Equals(input) && + ( + this.From == input.From || + (this.From != null && + this.From.Equals(input.From)) + ) && 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.From != null) + hashCode = hashCode * 59 + this.From.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(@"^DAGPathOutputAlias$", 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/DAGStringInput.cs b/src/PollinationSDK/Model/DAGStringInput.cs new file mode 100644 index 000000000..0ad5ab7ed --- /dev/null +++ b/src/PollinationSDK/Model/DAGStringInput.cs @@ -0,0 +1,214 @@ +/* + * 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 String input. You can add additional validation by defining a JSONSchema specification. See http://json-schema.org/understanding-json-schema/reference/string.html#string for more information. .. code-block:: python \"schema\": { \"type\": \"string\", \"maxLength\": 50, \"pattern\": \"(?i)(^.*\\.epw$)\" } + /// + [DataContract(Name = "DAGStringInput")] + public partial class DAGStringInput : DAGGenericInput, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected DAGStringInput() + { + // Set non-required readonly properties with defaultValue + this.Type = "DAGStringInput"; + } + + /// + /// Initializes a new instance of the class. + /// + /// Input name. (required). + /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. + /// Optional description for input.. + /// Default value for generic input.. + /// A list of aliases for this input in different platforms.. + /// A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. (default to false). + /// An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec.. + public DAGStringInput + ( + string name, // Required parameters + Dictionary annotations= default, string description= default, string _default= default, List> alias= default, bool required = false, Object spec= default // Optional parameters + ) : base(name: name, annotations: annotations, description: description, _default: _default, alias: alias, required: required, spec: spec)// BaseClass + { + + // Set non-required readonly properties with defaultValue + this.Type = "DAGStringInput"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "DAGStringInput"; + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + return "DAGStringInput"; + } + + /// + /// 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("DAGStringInput:\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Annotations: ").Append(Annotations).Append("\n"); + sb.Append(" Description: ").Append(Description).Append("\n"); + sb.Append(" Default: ").Append(Default).Append("\n"); + sb.Append(" Alias: ").Append(Alias).Append("\n"); + sb.Append(" Required: ").Append(Required).Append("\n"); + sb.Append(" Spec: ").Append(Spec).Append("\n"); + return sb.ToString(); + } + + /// + /// Returns the object from JSON string + /// + /// DAGStringInput object + public static DAGStringInput 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. + /// + /// DAGStringInput object + public virtual DAGStringInput DuplicateDAGStringInput() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateDAGStringInput(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override DAGGenericInput DuplicateDAGGenericInput() + { + return DuplicateDAGStringInput(); + } + + /// + /// 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 DAGStringInput); + } + + /// + /// Returns true if DAGStringInput instances are equal + /// + /// Instance of DAGStringInput to be compared + /// Boolean + public bool Equals(DAGStringInput 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(@"^DAGStringInput$", 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/DAGStringInputAlias.cs b/src/PollinationSDK/Model/DAGStringInputAlias.cs new file mode 100644 index 000000000..d55831060 --- /dev/null +++ b/src/PollinationSDK/Model/DAGStringInputAlias.cs @@ -0,0 +1,206 @@ +/* + * 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 Alias String input. You can add additional validation by defining a JSONSchema specification. See http://json-schema.org/understanding-json-schema/reference/string.html#string for more information. .. code-block:: python \"schema\": { \"type\": \"string\", \"maxLength\": 50, \"pattern\": \"(?i)(^.*\\.epw$)\" } + /// + [DataContract(Name = "DAGStringInputAlias")] + public partial class DAGStringInputAlias : DAGGenericInputAlias, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected DAGStringInputAlias() + { + // Set non-required readonly properties with defaultValue + this.Type = "DAGStringInputAlias"; + } + + /// + /// Initializes a new instance of the class. + /// + /// Input name. (required). + /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. + /// Optional description for input.. + /// 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. (required). + /// List of process actions to process the input or output value. (required). + /// Default value for generic input.. + /// A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. (default to false). + /// An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec.. + public DAGStringInputAlias + ( + string name, List platform, List handler, // Required parameters + Dictionary annotations= default, string description= default, string _default= default, bool required = false, Object spec= default // Optional parameters + ) : base(name: name, annotations: annotations, description: description, platform: platform, handler: handler, _default: _default, required: required, spec: spec)// BaseClass + { + + // Set non-required readonly properties with defaultValue + this.Type = "DAGStringInputAlias"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "DAGStringInputAlias"; + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + return "DAGStringInputAlias"; + } + + /// + /// 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("DAGStringInputAlias:\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Annotations: ").Append(Annotations).Append("\n"); + sb.Append(" Description: ").Append(Description).Append("\n"); + sb.Append(" Platform: ").Append(Platform).Append("\n"); + sb.Append(" Handler: ").Append(Handler).Append("\n"); + sb.Append(" Default: ").Append(Default).Append("\n"); + sb.Append(" Required: ").Append(Required).Append("\n"); + sb.Append(" Spec: ").Append(Spec).Append("\n"); + return sb.ToString(); + } + + /// + /// Returns the object from JSON string + /// + /// DAGStringInputAlias object + public static DAGStringInputAlias 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. + /// + /// DAGStringInputAlias object + public virtual DAGStringInputAlias DuplicateDAGStringInputAlias() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateDAGStringInputAlias(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override DAGGenericInputAlias DuplicateDAGGenericInputAlias() + { + return DuplicateDAGStringInputAlias(); + } + + /// + /// 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 DAGStringInputAlias); + } + + /// + /// Returns true if DAGStringInputAlias instances are equal + /// + /// Instance of DAGStringInputAlias to be compared + /// Boolean + public bool Equals(DAGStringInputAlias 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(@"^DAGStringInputAlias$", 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/DAGStringOutput.cs b/src/PollinationSDK/Model/DAGStringOutput.cs new file mode 100644 index 000000000..2537e9137 --- /dev/null +++ b/src/PollinationSDK/Model/DAGStringOutput.cs @@ -0,0 +1,246 @@ +/* + * 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 +{ + /// + /// DAG string output. This output loads the content from a file as a string. + /// + [DataContract(Name = "DAGStringOutput")] + public partial class DAGStringOutput : GenericOutput, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected DAGStringOutput() + { + // Set non-required readonly properties with defaultValue + this.Type = "DAGStringOutput"; + } + + /// + /// Initializes a new instance of the class. + /// + /// Reference to a file or a task output. Task output must be file. (required). + /// A list of additional processes for loading this output on different platforms.. + /// A boolean to indicate if an artifact output is required. A False value makes the artifact optional. (default to true). + /// Output name. (required). + /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. + /// Optional description for output.. + public DAGStringOutput + ( + string name, AnyOf from, // Required parameters + Dictionary annotations= default, string description= default, List> alias= default, bool required = true // Optional parameters + ) : base(name: name, annotations: annotations, description: description)// BaseClass + { + // to ensure "from" is required (not null) + this.From = from ?? throw new ArgumentNullException("from is a required property for DAGStringOutput and cannot be null"); + this.Alias = alias; + this.Required = required; + + // Set non-required readonly properties with defaultValue + this.Type = "DAGStringOutput"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "DAGStringOutput"; + + /// + /// Reference to a file or a task output. Task output must be file. + /// + /// Reference to a file or a task output. Task output must be file. + [DataMember(Name = "from", IsRequired = true, EmitDefaultValue = false)] + public AnyOf From { get; set; } + /// + /// A list of additional processes for loading this output on different platforms. + /// + /// A list of additional processes for loading this output on different platforms. + [DataMember(Name = "alias", EmitDefaultValue = false)] + public List> Alias { get; set; } + /// + /// A boolean to indicate if an artifact output is required. A False value makes the artifact optional. + /// + /// A boolean to indicate if an artifact output is required. A False value makes the artifact optional. + [DataMember(Name = "required", EmitDefaultValue = true)] + public bool Required { get; set; } = true; + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + return "DAGStringOutput"; + } + + /// + /// 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("DAGStringOutput:\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Annotations: ").Append(Annotations).Append("\n"); + sb.Append(" Description: ").Append(Description).Append("\n"); + sb.Append(" From: ").Append(From).Append("\n"); + sb.Append(" Alias: ").Append(Alias).Append("\n"); + sb.Append(" Required: ").Append(Required).Append("\n"); + return sb.ToString(); + } + + /// + /// Returns the object from JSON string + /// + /// DAGStringOutput object + public static DAGStringOutput 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. + /// + /// DAGStringOutput object + public virtual DAGStringOutput DuplicateDAGStringOutput() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateDAGStringOutput(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override GenericOutput DuplicateGenericOutput() + { + return DuplicateDAGStringOutput(); + } + + /// + /// 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 DAGStringOutput); + } + + /// + /// Returns true if DAGStringOutput instances are equal + /// + /// Instance of DAGStringOutput to be compared + /// Boolean + public bool Equals(DAGStringOutput input) + { + if (input == null) + return false; + return base.Equals(input) && + ( + this.From == input.From || + (this.From != null && + this.From.Equals(input.From)) + ) && base.Equals(input) && + ( + this.Alias == input.Alias || + this.Alias != null && + input.Alias != null && + this.Alias.SequenceEqual(input.Alias) + ) && base.Equals(input) && + ( + this.Required == input.Required || + (this.Required != null && + this.Required.Equals(input.Required)) + ) && 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.From != null) + hashCode = hashCode * 59 + this.From.GetHashCode(); + if (this.Alias != null) + hashCode = hashCode * 59 + this.Alias.GetHashCode(); + if (this.Required != null) + hashCode = hashCode * 59 + this.Required.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(@"^DAGStringOutput$", 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/DAGStringOutputAlias.cs b/src/PollinationSDK/Model/DAGStringOutputAlias.cs new file mode 100644 index 000000000..e96e96525 --- /dev/null +++ b/src/PollinationSDK/Model/DAGStringOutputAlias.cs @@ -0,0 +1,219 @@ +/* + * 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 +{ + /// + /// DAG alias string output. This output loads the content from a file as a string. + /// + [DataContract(Name = "DAGStringOutputAlias")] + public partial class DAGStringOutputAlias : DAGArtifactOutputAlias, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected DAGStringOutputAlias() + { + // Set non-required readonly properties with defaultValue + this.Type = "DAGStringOutputAlias"; + } + + /// + /// Initializes a new instance of the class. + /// + /// Reference to a file or a task output. Task output must be file. (required). + /// Output name. (required). + /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. + /// Optional description for output.. + /// 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. (required). + /// List of process actions to process the input or output value. (required). + /// A boolean to indicate if an artifact output is required. A False value makes the artifact optional. (default to true). + public DAGStringOutputAlias + ( + string name, List platform, List handler, AnyOf from, // Required parameters + Dictionary annotations= default, string description= default, bool required = true // Optional parameters + ) : base(name: name, annotations: annotations, description: description, platform: platform, handler: handler, required: required)// BaseClass + { + // to ensure "from" is required (not null) + this.From = from ?? throw new ArgumentNullException("from is a required property for DAGStringOutputAlias and cannot be null"); + + // Set non-required readonly properties with defaultValue + this.Type = "DAGStringOutputAlias"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "DAGStringOutputAlias"; + + /// + /// Reference to a file or a task output. Task output must be file. + /// + /// Reference to a file or a task output. Task output must be file. + [DataMember(Name = "from", IsRequired = true, EmitDefaultValue = false)] + public AnyOf From { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + return "DAGStringOutputAlias"; + } + + /// + /// 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("DAGStringOutputAlias:\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Annotations: ").Append(Annotations).Append("\n"); + sb.Append(" Description: ").Append(Description).Append("\n"); + sb.Append(" Platform: ").Append(Platform).Append("\n"); + sb.Append(" Handler: ").Append(Handler).Append("\n"); + sb.Append(" Required: ").Append(Required).Append("\n"); + sb.Append(" From: ").Append(From).Append("\n"); + return sb.ToString(); + } + + /// + /// Returns the object from JSON string + /// + /// DAGStringOutputAlias object + public static DAGStringOutputAlias 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. + /// + /// DAGStringOutputAlias object + public virtual DAGStringOutputAlias DuplicateDAGStringOutputAlias() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateDAGStringOutputAlias(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override DAGArtifactOutputAlias DuplicateDAGArtifactOutputAlias() + { + return DuplicateDAGStringOutputAlias(); + } + + /// + /// 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 DAGStringOutputAlias); + } + + /// + /// Returns true if DAGStringOutputAlias instances are equal + /// + /// Instance of DAGStringOutputAlias to be compared + /// Boolean + public bool Equals(DAGStringOutputAlias input) + { + if (input == null) + return false; + return base.Equals(input) && + ( + this.From == input.From || + (this.From != null && + this.From.Equals(input.From)) + ) && 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.From != null) + hashCode = hashCode * 59 + this.From.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(@"^DAGStringOutputAlias$", 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/DAGTask.cs b/src/PollinationSDK/Model/DAGTask.cs new file mode 100644 index 000000000..df95d830e --- /dev/null +++ b/src/PollinationSDK/Model/DAGTask.cs @@ -0,0 +1,324 @@ +/* + * 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 single task in a DAG flow. + /// + [DataContract(Name = "DAGTask")] + public partial class DAGTask : OpenAPIGenBaseModel, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected DAGTask() + { + // Set non-required readonly properties with defaultValue + this.Type = "DAGTask"; + } + + /// + /// Initializes a new instance of the class. + /// + /// Name for this task. It must be unique in a DAG. (required). + /// Template name. A template is a Function or a DAG. This template must be available in the dependencies. (required). + /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. + /// List of DAG tasks that this task depends on and needs to be executed before this task.. + /// The input arguments for this task.. + /// Loop configuration for this task.. + /// 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.. + /// List of task returns.. + public DAGTask + ( + string name, string template, // Required parameters + Dictionary annotations= default, List needs= default, List> arguments= default, DAGTaskLoop loop= default, string subFolder= default, List> returns= default// Optional parameters + ) : base()// BaseClass + { + // to ensure "name" is required (not null) + this.Name = name ?? throw new ArgumentNullException("name is a required property for DAGTask and cannot be null"); + // to ensure "template" is required (not null) + this.Template = template ?? throw new ArgumentNullException("template is a required property for DAGTask and cannot be null"); + this.Annotations = annotations; + this.Needs = needs; + this.Arguments = arguments; + this.Loop = loop; + this.SubFolder = subFolder; + this.Returns = returns; + + // Set non-required readonly properties with defaultValue + this.Type = "DAGTask"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "DAGTask"; + + /// + /// Name for this task. It must be unique in a DAG. + /// + /// Name for this task. It must be unique in a DAG. + [DataMember(Name = "name", IsRequired = true, EmitDefaultValue = false)] + public string Name { get; set; } + /// + /// Template name. A template is a Function or a DAG. This template must be available in the dependencies. + /// + /// Template name. A template is a Function or a DAG. This template must be available in the dependencies. + [DataMember(Name = "template", IsRequired = true, EmitDefaultValue = false)] + public string Template { 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; } + /// + /// List of DAG tasks that this task depends on and needs to be executed before this task. + /// + /// List of DAG tasks that this task depends on and needs to be executed before this task. + [DataMember(Name = "needs", EmitDefaultValue = false)] + public List Needs { get; set; } + /// + /// The input arguments for this task. + /// + /// The input arguments for this task. + [DataMember(Name = "arguments", EmitDefaultValue = false)] + public List> Arguments { get; set; } + /// + /// Loop configuration for this task. + /// + /// Loop configuration for this task. + [DataMember(Name = "loop", EmitDefaultValue = false)] + public DAGTaskLoop Loop { get; set; } + /// + /// 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. + /// + /// 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. + [DataMember(Name = "sub_folder", EmitDefaultValue = false)] + public string SubFolder { get; set; } + /// + /// List of task returns. + /// + /// List of task returns. + [DataMember(Name = "returns", EmitDefaultValue = false)] + public List> Returns { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + return "DAGTask"; + } + + /// + /// 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("DAGTask:\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Template: ").Append(Template).Append("\n"); + sb.Append(" Annotations: ").Append(Annotations).Append("\n"); + sb.Append(" Needs: ").Append(Needs).Append("\n"); + sb.Append(" Arguments: ").Append(Arguments).Append("\n"); + sb.Append(" Loop: ").Append(Loop).Append("\n"); + sb.Append(" SubFolder: ").Append(SubFolder).Append("\n"); + sb.Append(" Returns: ").Append(Returns).Append("\n"); + return sb.ToString(); + } + + /// + /// Returns the object from JSON string + /// + /// DAGTask object + public static DAGTask 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. + /// + /// DAGTask object + public virtual DAGTask DuplicateDAGTask() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateDAGTask(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel DuplicateOpenAPIGenBaseModel() + { + return DuplicateDAGTask(); + } + + /// + /// 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 DAGTask); + } + + /// + /// Returns true if DAGTask instances are equal + /// + /// Instance of DAGTask to be compared + /// Boolean + public bool Equals(DAGTask 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.Template == input.Template || + (this.Template != null && + this.Template.Equals(input.Template)) + ) && base.Equals(input) && + ( + this.Type == input.Type || + (this.Type != null && + this.Type.Equals(input.Type)) + ) && base.Equals(input) && + ( + this.Annotations == input.Annotations || + this.Annotations != null && + input.Annotations != null && + this.Annotations.SequenceEqual(input.Annotations) + ) && base.Equals(input) && + ( + this.Needs == input.Needs || + this.Needs != null && + input.Needs != null && + this.Needs.SequenceEqual(input.Needs) + ) && base.Equals(input) && + ( + this.Arguments == input.Arguments || + this.Arguments != null && + input.Arguments != null && + this.Arguments.SequenceEqual(input.Arguments) + ) && base.Equals(input) && + ( + this.Loop == input.Loop || + (this.Loop != null && + this.Loop.Equals(input.Loop)) + ) && base.Equals(input) && + ( + this.SubFolder == input.SubFolder || + (this.SubFolder != null && + this.SubFolder.Equals(input.SubFolder)) + ) && base.Equals(input) && + ( + this.Returns == input.Returns || + this.Returns != null && + input.Returns != null && + this.Returns.SequenceEqual(input.Returns) + ); + } + + /// + /// 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.Template != null) + hashCode = hashCode * 59 + this.Template.GetHashCode(); + if (this.Type != null) + hashCode = hashCode * 59 + this.Type.GetHashCode(); + if (this.Annotations != null) + hashCode = hashCode * 59 + this.Annotations.GetHashCode(); + if (this.Needs != null) + hashCode = hashCode * 59 + this.Needs.GetHashCode(); + if (this.Arguments != null) + hashCode = hashCode * 59 + this.Arguments.GetHashCode(); + if (this.Loop != null) + hashCode = hashCode * 59 + this.Loop.GetHashCode(); + if (this.SubFolder != null) + hashCode = hashCode * 59 + this.SubFolder.GetHashCode(); + if (this.Returns != null) + hashCode = hashCode * 59 + this.Returns.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(@"^DAGTask$", 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/DAGTaskLoop.cs b/src/PollinationSDK/Model/DAGTaskLoop.cs new file mode 100644 index 000000000..11b1d177b --- /dev/null +++ b/src/PollinationSDK/Model/DAGTaskLoop.cs @@ -0,0 +1,213 @@ +/* + * 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 +{ + /// + /// Loop configuration for the task. This will run the template provided multiple times and in parallel relative to an input or task parameter which should be a list. + /// + [DataContract(Name = "DAGTaskLoop")] + public partial class DAGTaskLoop : OpenAPIGenBaseModel, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. + /// The task or DAG parameter to loop over (must be iterable).. + public DAGTaskLoop + ( + // Required parameters + Dictionary annotations= default, AnyOf from= default// Optional parameters + ) : base()// BaseClass + { + this.Annotations = annotations; + this.From = from; + + // Set non-required readonly properties with defaultValue + this.Type = "DAGTaskLoop"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "DAGTaskLoop"; + + /// + /// 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; } + /// + /// The task or DAG parameter to loop over (must be iterable). + /// + /// The task or DAG parameter to loop over (must be iterable). + [DataMember(Name = "from", EmitDefaultValue = false)] + public AnyOf From { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + return "DAGTaskLoop"; + } + + /// + /// 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("DAGTaskLoop:\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Annotations: ").Append(Annotations).Append("\n"); + sb.Append(" From: ").Append(From).Append("\n"); + return sb.ToString(); + } + + /// + /// Returns the object from JSON string + /// + /// DAGTaskLoop object + public static DAGTaskLoop 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. + /// + /// DAGTaskLoop object + public virtual DAGTaskLoop DuplicateDAGTaskLoop() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateDAGTaskLoop(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel DuplicateOpenAPIGenBaseModel() + { + return DuplicateDAGTaskLoop(); + } + + /// + /// 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 DAGTaskLoop); + } + + /// + /// Returns true if DAGTaskLoop instances are equal + /// + /// Instance of DAGTaskLoop to be compared + /// Boolean + public bool Equals(DAGTaskLoop 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.Annotations == input.Annotations || + this.Annotations != null && + input.Annotations != null && + this.Annotations.SequenceEqual(input.Annotations) + ) && base.Equals(input) && + ( + this.From == input.From || + (this.From != null && + this.From.Equals(input.From)) + ); + } + + /// + /// 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.Annotations != null) + hashCode = hashCode * 59 + this.Annotations.GetHashCode(); + if (this.From != null) + hashCode = hashCode * 59 + this.From.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(@"^DAGTaskLoop$", 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/DailyUsage.cs b/src/PollinationSDK/Model/DailyUsage.cs new file mode 100644 index 000000000..dec7d9dd3 --- /dev/null +++ b/src/PollinationSDK/Model/DailyUsage.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 +{ + /// + /// DailyUsage + /// + [DataContract(Name = "DailyUsage")] + public partial class DailyUsage : OpenAPIGenBaseModel, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected DailyUsage() + { + // Set non-required readonly properties with defaultValue + this.Type = "DailyUsage"; + } + + /// + /// Initializes a new instance of the class. + /// + /// The day this usage was aggregated for (required). + /// cpu usage (default to 0D). + /// memory usage (default to 0D). + /// succeeded usage (default to 0). + /// failed usage (default to 0). + public DailyUsage + ( + DateTime date, // Required parameters + double cpu = 0D, double memory = 0D, int succeeded = 0, int failed = 0 // Optional parameters + ) : base()// BaseClass + { + this.Date = date; + this.Cpu = cpu; + this.Memory = memory; + this.Succeeded = succeeded; + this.Failed = failed; + + // Set non-required readonly properties with defaultValue + this.Type = "DailyUsage"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "DailyUsage"; + + /// + /// The day this usage was aggregated for + /// + /// The day this usage was aggregated for + [DataMember(Name = "date", IsRequired = true, EmitDefaultValue = false)] + public DateTime Date { get; set; } + /// + /// cpu usage + /// + /// cpu usage + [DataMember(Name = "cpu", EmitDefaultValue = true)] + public double Cpu { get; set; } = 0D; + /// + /// memory usage + /// + /// memory usage + [DataMember(Name = "memory", EmitDefaultValue = true)] + public double Memory { get; set; } = 0D; + /// + /// succeeded usage + /// + /// succeeded usage + [DataMember(Name = "succeeded", EmitDefaultValue = true)] + public int Succeeded { get; set; } = 0; + /// + /// failed usage + /// + /// failed usage + [DataMember(Name = "failed", EmitDefaultValue = true)] + public int Failed { get; set; } = 0; + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + return "DailyUsage"; + } + + /// + /// 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("DailyUsage:\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Date: ").Append(Date).Append("\n"); + sb.Append(" Cpu: ").Append(Cpu).Append("\n"); + sb.Append(" Memory: ").Append(Memory).Append("\n"); + sb.Append(" Succeeded: ").Append(Succeeded).Append("\n"); + sb.Append(" Failed: ").Append(Failed).Append("\n"); + return sb.ToString(); + } + + /// + /// Returns the object from JSON string + /// + /// DailyUsage object + public static DailyUsage 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. + /// + /// DailyUsage object + public virtual DailyUsage DuplicateDailyUsage() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateDailyUsage(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel DuplicateOpenAPIGenBaseModel() + { + return DuplicateDailyUsage(); + } + + /// + /// 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 DailyUsage); + } + + /// + /// Returns true if DailyUsage instances are equal + /// + /// Instance of DailyUsage to be compared + /// Boolean + public bool Equals(DailyUsage input) + { + if (input == null) + return false; + return base.Equals(input) && + ( + this.Date == input.Date || + (this.Date != null && + this.Date.Equals(input.Date)) + ) && 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.Succeeded == input.Succeeded || + (this.Succeeded != null && + this.Succeeded.Equals(input.Succeeded)) + ) && base.Equals(input) && + ( + this.Failed == input.Failed || + (this.Failed != null && + this.Failed.Equals(input.Failed)) + ) && 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.Date != null) + hashCode = hashCode * 59 + this.Date.GetHashCode(); + if (this.Cpu != null) + hashCode = hashCode * 59 + this.Cpu.GetHashCode(); + if (this.Memory != null) + hashCode = hashCode * 59 + this.Memory.GetHashCode(); + if (this.Succeeded != null) + hashCode = hashCode * 59 + this.Succeeded.GetHashCode(); + if (this.Failed != null) + hashCode = hashCode * 59 + this.Failed.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(@"^DailyUsage$", 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/Dependency.cs b/src/PollinationSDK/Model/Dependency.cs new file mode 100644 index 000000000..3ac84fa28 --- /dev/null +++ b/src/PollinationSDK/Model/Dependency.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 +{ + /// + /// Configuration to fetch a Recipe or Plugin that another Recipe depends on. + /// + [DataContract(Name = "Dependency")] + public partial class Dependency : OpenAPIGenBaseModel, IEquatable, IValidatableObject + { + /// + /// The kind of dependency. It can be a recipe or an plugin. + /// + /// The kind of dependency. It can be a recipe or an plugin. + [DataMember(Name="kind", EmitDefaultValue=false)] + public DependencyKind Kind { get; set; } + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected Dependency() + { + // Set non-required readonly properties with defaultValue + this.Type = "Dependency"; + } + + /// + /// Initializes a new instance of the class. + /// + /// The kind of dependency. It can be a recipe or an plugin. (required). + /// Workflow name. This name should be unique among all the resources in your resource. Use an alias if this is not the case. (required). + /// Tag of the resource. (required). + /// URL to a repository where this resource can be found. (required). + /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. + /// The digest hash of the dependency when retrieved from its source. This is locked when the resource dependencies are downloaded.. + /// An optional alias to refer to this dependency. Useful if the name is already used somewhere else.. + public Dependency + ( + DependencyKind kind, string name, string tag, string source, // Required parameters + Dictionary annotations= default, string hash= default, string alias= default// Optional parameters + ) : base()// BaseClass + { + this.Kind = kind; + // to ensure "name" is required (not null) + this.Name = name ?? throw new ArgumentNullException("name is a required property for Dependency and cannot be null"); + // to ensure "tag" is required (not null) + this.Tag = tag ?? throw new ArgumentNullException("tag is a required property for Dependency and cannot be null"); + // to ensure "source" is required (not null) + this.Source = source ?? throw new ArgumentNullException("source is a required property for Dependency and cannot be null"); + this.Annotations = annotations; + this.Hash = hash; + this.Alias = alias; + + // Set non-required readonly properties with defaultValue + this.Type = "Dependency"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "Dependency"; + + /// + /// Workflow name. This name should be unique among all the resources in your resource. Use an alias if this is not the case. + /// + /// Workflow name. This name should be unique among all the resources in your resource. Use an alias if this is not the case. + [DataMember(Name = "name", IsRequired = true, EmitDefaultValue = false)] + public string Name { get; set; } + /// + /// Tag of the resource. + /// + /// Tag of the resource. + [DataMember(Name = "tag", IsRequired = true, EmitDefaultValue = false)] + public string Tag { get; set; } + /// + /// URL to a repository where this resource can be found. + /// + /// URL to a repository where this resource can be found. + [DataMember(Name = "source", IsRequired = true, EmitDefaultValue = false)] + public string Source { 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; } + /// + /// The digest hash of the dependency when retrieved from its source. This is locked when the resource dependencies are downloaded. + /// + /// The digest hash of the dependency when retrieved from its source. This is locked when the resource dependencies are downloaded. + [DataMember(Name = "hash", EmitDefaultValue = false)] + public string Hash { get; set; } + /// + /// An optional alias to refer to this dependency. Useful if the name is already used somewhere else. + /// + /// An optional alias to refer to this dependency. Useful if the name is already used somewhere else. + [DataMember(Name = "alias", EmitDefaultValue = false)] + public string Alias { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + return "Dependency"; + } + + /// + /// 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("Dependency:\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Kind: ").Append(Kind).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Tag: ").Append(Tag).Append("\n"); + sb.Append(" Source: ").Append(Source).Append("\n"); + sb.Append(" Annotations: ").Append(Annotations).Append("\n"); + sb.Append(" Hash: ").Append(Hash).Append("\n"); + sb.Append(" Alias: ").Append(Alias).Append("\n"); + return sb.ToString(); + } + + /// + /// Returns the object from JSON string + /// + /// Dependency object + public static Dependency 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. + /// + /// Dependency object + public virtual Dependency DuplicateDependency() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateDependency(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel DuplicateOpenAPIGenBaseModel() + { + return DuplicateDependency(); + } + + /// + /// 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 Dependency); + } + + /// + /// Returns true if Dependency instances are equal + /// + /// Instance of Dependency to be compared + /// Boolean + public bool Equals(Dependency input) + { + if (input == null) + return false; + return base.Equals(input) && + ( + this.Kind == input.Kind || + (this.Kind != null && + this.Kind.Equals(input.Kind)) + ) && base.Equals(input) && + ( + this.Name == input.Name || + (this.Name != null && + this.Name.Equals(input.Name)) + ) && base.Equals(input) && + ( + this.Tag == input.Tag || + (this.Tag != null && + this.Tag.Equals(input.Tag)) + ) && base.Equals(input) && + ( + this.Source == input.Source || + (this.Source != null && + this.Source.Equals(input.Source)) + ) && base.Equals(input) && + ( + this.Type == input.Type || + (this.Type != null && + this.Type.Equals(input.Type)) + ) && base.Equals(input) && + ( + this.Annotations == input.Annotations || + this.Annotations != null && + input.Annotations != null && + this.Annotations.SequenceEqual(input.Annotations) + ) && base.Equals(input) && + ( + this.Hash == input.Hash || + (this.Hash != null && + this.Hash.Equals(input.Hash)) + ) && base.Equals(input) && + ( + this.Alias == input.Alias || + (this.Alias != null && + this.Alias.Equals(input.Alias)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = base.GetHashCode(); + if (this.Kind != null) + hashCode = hashCode * 59 + this.Kind.GetHashCode(); + if (this.Name != null) + hashCode = hashCode * 59 + this.Name.GetHashCode(); + if (this.Tag != null) + hashCode = hashCode * 59 + this.Tag.GetHashCode(); + if (this.Source != null) + hashCode = hashCode * 59 + this.Source.GetHashCode(); + if (this.Type != null) + hashCode = hashCode * 59 + this.Type.GetHashCode(); + if (this.Annotations != null) + hashCode = hashCode * 59 + this.Annotations.GetHashCode(); + if (this.Hash != null) + hashCode = hashCode * 59 + this.Hash.GetHashCode(); + if (this.Alias != null) + hashCode = hashCode * 59 + this.Alias.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(@"^Dependency$", 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/DependencyKind.cs b/src/PollinationSDK/Model/DependencyKind.cs new file mode 100644 index 000000000..dacc74150 --- /dev/null +++ b/src/PollinationSDK/Model/DependencyKind.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 +{ + /// + /// Dependency kind. + /// + /// Dependency kind. + + [JsonConverter(typeof(StringEnumConverter))] + + public enum DependencyKind + { + /// + /// Enum Recipe for value: recipe + /// + [EnumMember(Value = "recipe")] + Recipe = 1, + + /// + /// Enum Plugin for value: plugin + /// + [EnumMember(Value = "plugin")] + Plugin = 2 + + } + +} 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/DockerConfig.cs b/src/PollinationSDK/Model/DockerConfig.cs new file mode 100644 index 000000000..2ec13db2b --- /dev/null +++ b/src/PollinationSDK/Model/DockerConfig.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 +{ + /// + /// Plugin Configuration to run in a Docker container + /// + [DataContract(Name = "DockerConfig")] + public partial class DockerConfig : OpenAPIGenBaseModel, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected DockerConfig() + { + // Set non-required readonly properties with defaultValue + this.Type = "DockerConfig"; + } + + /// + /// Initializes a new instance of the class. + /// + /// Docker image name. Must include tag. (required). + /// The working directory the entrypoint command of the container runsin. This is used to determine where to load artifacts when running in the container. (required). + /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. + /// The container registry URLs that this container should be pulled from. Will default to Dockerhub if none is specified.. + public DockerConfig + ( + string image, string workdir, // Required parameters + Dictionary annotations= default, string registry= default// Optional parameters + ) : base()// BaseClass + { + // to ensure "image" is required (not null) + this.Image = image ?? throw new ArgumentNullException("image is a required property for DockerConfig and cannot be null"); + // to ensure "workdir" is required (not null) + this.Workdir = workdir ?? throw new ArgumentNullException("workdir is a required property for DockerConfig and cannot be null"); + this.Annotations = annotations; + this.Registry = registry; + + // Set non-required readonly properties with defaultValue + this.Type = "DockerConfig"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "DockerConfig"; + + /// + /// Docker image name. Must include tag. + /// + /// Docker image name. Must include tag. + [DataMember(Name = "image", IsRequired = true, EmitDefaultValue = false)] + public string Image { get; set; } + /// + /// The working directory the entrypoint command of the container runsin. This is used to determine where to load artifacts when running in the container. + /// + /// The working directory the entrypoint command of the container runsin. This is used to determine where to load artifacts when running in the container. + [DataMember(Name = "workdir", IsRequired = true, EmitDefaultValue = false)] + public string Workdir { 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; } + /// + /// The container registry URLs that this container should be pulled from. Will default to Dockerhub if none is specified. + /// + /// The container registry URLs that this container should be pulled from. Will default to Dockerhub if none is specified. + [DataMember(Name = "registry", EmitDefaultValue = false)] + public string Registry { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + return "DockerConfig"; + } + + /// + /// 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("DockerConfig:\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Image: ").Append(Image).Append("\n"); + sb.Append(" Workdir: ").Append(Workdir).Append("\n"); + sb.Append(" Annotations: ").Append(Annotations).Append("\n"); + sb.Append(" Registry: ").Append(Registry).Append("\n"); + return sb.ToString(); + } + + /// + /// Returns the object from JSON string + /// + /// DockerConfig object + public static DockerConfig 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. + /// + /// DockerConfig object + public virtual DockerConfig DuplicateDockerConfig() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateDockerConfig(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel DuplicateOpenAPIGenBaseModel() + { + return DuplicateDockerConfig(); + } + + /// + /// 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 DockerConfig); + } + + /// + /// Returns true if DockerConfig instances are equal + /// + /// Instance of DockerConfig to be compared + /// Boolean + public bool Equals(DockerConfig input) + { + if (input == null) + return false; + return base.Equals(input) && + ( + this.Image == input.Image || + (this.Image != null && + this.Image.Equals(input.Image)) + ) && base.Equals(input) && + ( + this.Workdir == input.Workdir || + (this.Workdir != null && + this.Workdir.Equals(input.Workdir)) + ) && base.Equals(input) && + ( + this.Type == input.Type || + (this.Type != null && + this.Type.Equals(input.Type)) + ) && base.Equals(input) && + ( + this.Annotations == input.Annotations || + this.Annotations != null && + input.Annotations != null && + this.Annotations.SequenceEqual(input.Annotations) + ) && base.Equals(input) && + ( + this.Registry == input.Registry || + (this.Registry != null && + this.Registry.Equals(input.Registry)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = base.GetHashCode(); + if (this.Image != null) + hashCode = hashCode * 59 + this.Image.GetHashCode(); + if (this.Workdir != null) + hashCode = hashCode * 59 + this.Workdir.GetHashCode(); + if (this.Type != null) + hashCode = hashCode * 59 + this.Type.GetHashCode(); + if (this.Annotations != null) + hashCode = hashCode * 59 + this.Annotations.GetHashCode(); + if (this.Registry != null) + hashCode = hashCode * 59 + this.Registry.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(@"^DockerConfig", 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/FileMeta.cs b/src/PollinationSDK/Model/FileMeta.cs new file mode 100644 index 000000000..c7ebb1a29 --- /dev/null +++ b/src/PollinationSDK/Model/FileMeta.cs @@ -0,0 +1,268 @@ +/* + * 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 +{ + /// + /// FileMeta + /// + [DataContract(Name = "FileMeta")] + public partial class FileMeta : OpenAPIGenBaseModel, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected FileMeta() + { + // Set non-required readonly properties with defaultValue + this.Type = "FileMeta"; + } + + /// + /// Initializes a new instance of the class. + /// + /// key (required). + /// fileType (required). + /// fileName (required). + /// lastModified. + /// size. + public FileMeta + ( + string key, string fileType, string fileName, // Required parameters + DateTime lastModified= default, int size= default // Optional parameters + ) : base()// BaseClass + { + // to ensure "key" is required (not null) + this.Key = key ?? throw new ArgumentNullException("key is a required property for FileMeta and cannot be null"); + // to ensure "fileType" is required (not null) + this.FileType = fileType ?? throw new ArgumentNullException("fileType is a required property for FileMeta and cannot be null"); + // to ensure "fileName" is required (not null) + this.FileName = fileName ?? throw new ArgumentNullException("fileName is a required property for FileMeta and cannot be null"); + this.LastModified = lastModified; + this.Size = size; + + // Set non-required readonly properties with defaultValue + this.Type = "FileMeta"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "FileMeta"; + + /// + /// Gets or Sets Key + /// + [DataMember(Name = "key", IsRequired = true, EmitDefaultValue = false)] + public string Key { get; set; } + /// + /// Gets or Sets FileType + /// + [DataMember(Name = "file_type", IsRequired = true, EmitDefaultValue = false)] + public string FileType { get; set; } + /// + /// Gets or Sets FileName + /// + [DataMember(Name = "file_name", IsRequired = true, EmitDefaultValue = false)] + public string FileName { get; set; } + /// + /// Gets or Sets LastModified + /// + [DataMember(Name = "last_modified", EmitDefaultValue = false)] + public DateTime LastModified { get; set; } + /// + /// Gets or Sets Size + /// + [DataMember(Name = "size", EmitDefaultValue = false)] + public int Size { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + return "FileMeta"; + } + + /// + /// 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("FileMeta:\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Key: ").Append(Key).Append("\n"); + sb.Append(" FileType: ").Append(FileType).Append("\n"); + sb.Append(" FileName: ").Append(FileName).Append("\n"); + sb.Append(" LastModified: ").Append(LastModified).Append("\n"); + sb.Append(" Size: ").Append(Size).Append("\n"); + return sb.ToString(); + } + + /// + /// Returns the object from JSON string + /// + /// FileMeta object + public static FileMeta 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. + /// + /// FileMeta object + public virtual FileMeta DuplicateFileMeta() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateFileMeta(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel DuplicateOpenAPIGenBaseModel() + { + return DuplicateFileMeta(); + } + + /// + /// 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 FileMeta); + } + + /// + /// Returns true if FileMeta instances are equal + /// + /// Instance of FileMeta to be compared + /// Boolean + public bool Equals(FileMeta 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.FileType == input.FileType || + (this.FileType != null && + this.FileType.Equals(input.FileType)) + ) && base.Equals(input) && + ( + this.FileName == input.FileName || + (this.FileName != null && + this.FileName.Equals(input.FileName)) + ) && base.Equals(input) && + ( + this.LastModified == input.LastModified || + (this.LastModified != null && + this.LastModified.Equals(input.LastModified)) + ) && base.Equals(input) && + ( + this.Size == input.Size || + (this.Size != null && + this.Size.Equals(input.Size)) + ) && 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.FileType != null) + hashCode = hashCode * 59 + this.FileType.GetHashCode(); + if (this.FileName != null) + hashCode = hashCode * 59 + this.FileName.GetHashCode(); + if (this.LastModified != null) + hashCode = hashCode * 59 + this.LastModified.GetHashCode(); + if (this.Size != null) + hashCode = hashCode * 59 + this.Size.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(@"^FileMeta$", 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/FileReference.cs b/src/PollinationSDK/Model/FileReference.cs new file mode 100644 index 000000000..f3b9e9a6c --- /dev/null +++ b/src/PollinationSDK/Model/FileReference.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 +{ + /// + /// Reference to a file. + /// + [DataContract(Name = "FileReference")] + public partial class FileReference : BaseReference, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected FileReference() + { + // Set non-required readonly properties with defaultValue + this.Type = "FileReference"; + } + + /// + /// Initializes a new instance of the class. + /// + /// Relative path to a file. (required). + /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. + public FileReference + ( + string path, // Required parameters + Dictionary annotations= default // Optional parameters + ) : base(annotations: annotations)// BaseClass + { + // to ensure "path" is required (not null) + this.Path = path ?? throw new ArgumentNullException("path is a required property for FileReference and cannot be null"); + + // Set non-required readonly properties with defaultValue + this.Type = "FileReference"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "FileReference"; + + /// + /// Relative path to a file. + /// + /// Relative path to a file. + [DataMember(Name = "path", IsRequired = true, EmitDefaultValue = false)] + public string Path { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + return "FileReference"; + } + + /// + /// 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("FileReference:\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Annotations: ").Append(Annotations).Append("\n"); + sb.Append(" Path: ").Append(Path).Append("\n"); + return sb.ToString(); + } + + /// + /// Returns the object from JSON string + /// + /// FileReference object + public static FileReference 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. + /// + /// FileReference object + public virtual FileReference DuplicateFileReference() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateFileReference(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override BaseReference DuplicateBaseReference() + { + return DuplicateFileReference(); + } + + /// + /// 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 FileReference); + } + + /// + /// Returns true if FileReference instances are equal + /// + /// Instance of FileReference to be compared + /// Boolean + public bool Equals(FileReference input) + { + if (input == null) + return false; + return base.Equals(input) && + ( + this.Path == input.Path || + (this.Path != null && + this.Path.Equals(input.Path)) + ) && 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.Path != null) + hashCode = hashCode * 59 + this.Path.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(@"^FileReference$", 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/FolderReference.cs b/src/PollinationSDK/Model/FolderReference.cs new file mode 100644 index 000000000..fbd44b8d7 --- /dev/null +++ b/src/PollinationSDK/Model/FolderReference.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 +{ + /// + /// Reference to a folder. + /// + [DataContract(Name = "FolderReference")] + public partial class FolderReference : BaseReference, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected FolderReference() + { + // Set non-required readonly properties with defaultValue + this.Type = "FolderReference"; + } + + /// + /// Initializes a new instance of the class. + /// + /// Relative path to a folder. (required). + /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. + public FolderReference + ( + string path, // Required parameters + Dictionary annotations= default // Optional parameters + ) : base(annotations: annotations)// BaseClass + { + // to ensure "path" is required (not null) + this.Path = path ?? throw new ArgumentNullException("path is a required property for FolderReference and cannot be null"); + + // Set non-required readonly properties with defaultValue + this.Type = "FolderReference"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "FolderReference"; + + /// + /// Relative path to a folder. + /// + /// Relative path to a folder. + [DataMember(Name = "path", IsRequired = true, EmitDefaultValue = false)] + public string Path { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + return "FolderReference"; + } + + /// + /// 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("FolderReference:\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Annotations: ").Append(Annotations).Append("\n"); + sb.Append(" Path: ").Append(Path).Append("\n"); + return sb.ToString(); + } + + /// + /// Returns the object from JSON string + /// + /// FolderReference object + public static FolderReference 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. + /// + /// FolderReference object + public virtual FolderReference DuplicateFolderReference() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateFolderReference(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override BaseReference DuplicateBaseReference() + { + return DuplicateFolderReference(); + } + + /// + /// 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 FolderReference); + } + + /// + /// Returns true if FolderReference instances are equal + /// + /// Instance of FolderReference to be compared + /// Boolean + public bool Equals(FolderReference input) + { + if (input == null) + return false; + return base.Equals(input) && + ( + this.Path == input.Path || + (this.Path != null && + this.Path.Equals(input.Path)) + ) && 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.Path != null) + hashCode = hashCode * 59 + this.Path.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(@"^FolderReference$", 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/FromOutput.cs b/src/PollinationSDK/Model/FromOutput.cs new file mode 100644 index 000000000..f12d9c3c8 --- /dev/null +++ b/src/PollinationSDK/Model/FromOutput.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 +{ + /// + /// Base class for output classes that source ``from`` an object. See DAG output classes for more examples. + /// + [DataContract(Name = "FromOutput")] + public partial class FromOutput : GenericOutput, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected FromOutput() + { + // Set non-required readonly properties with defaultValue + this.Type = "FromOutput"; + } + + /// + /// Initializes a new instance of the class. + /// + /// Reference to a file or a task output. Task output must be file. (required). + /// Output name. (required). + /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. + /// Optional description for output.. + public FromOutput + ( + string name, object from, // Required parameters + Dictionary annotations= default, string description= default // Optional parameters + ) : base(name: name, annotations: annotations, description: description)// BaseClass + { + // to ensure "from" is required (not null) + this.From = from ?? throw new ArgumentNullException("from is a required property for FromOutput and cannot be null"); + + // Set non-required readonly properties with defaultValue + this.Type = "FromOutput"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "FromOutput"; + + /// + /// Reference to a file or a task output. Task output must be file. + /// + /// Reference to a file or a task output. Task output must be file. + [DataMember(Name = "from", IsRequired = true, EmitDefaultValue = true)] + public object From { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + return "FromOutput"; + } + + /// + /// 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("FromOutput:\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Annotations: ").Append(Annotations).Append("\n"); + sb.Append(" Description: ").Append(Description).Append("\n"); + sb.Append(" From: ").Append(From).Append("\n"); + return sb.ToString(); + } + + /// + /// Returns the object from JSON string + /// + /// FromOutput object + public static FromOutput 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. + /// + /// FromOutput object + public virtual FromOutput DuplicateFromOutput() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateFromOutput(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override GenericOutput DuplicateGenericOutput() + { + return DuplicateFromOutput(); + } + + /// + /// 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 FromOutput); + } + + /// + /// Returns true if FromOutput instances are equal + /// + /// Instance of FromOutput to be compared + /// Boolean + public bool Equals(FromOutput input) + { + if (input == null) + return false; + return base.Equals(input) && + ( + this.From == input.From || + (this.From != null && + this.From.Equals(input.From)) + ) && 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.From != null) + hashCode = hashCode * 59 + this.From.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(@"^FromOutput$", 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/Function.cs b/src/PollinationSDK/Model/Function.cs new file mode 100644 index 000000000..039d3a4d9 --- /dev/null +++ b/src/PollinationSDK/Model/Function.cs @@ -0,0 +1,291 @@ +/* + * 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 Function with a single command + /// + [DataContract(Name = "Function")] + public partial class Function : OpenAPIGenBaseModel, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected Function() + { + // Set non-required readonly properties with defaultValue + this.Type = "Function"; + } + + /// + /// 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). + /// 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 Function + ( + string name, string command, // 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 Function and cannot be null"); + // to ensure "command" is required (not null) + this.Command = command ?? throw new ArgumentNullException("command is a required property for Function 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 = "Function"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "Function"; + + /// + /// 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; } + /// + /// 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 "Function"; + } + + /// + /// 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("Function:\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Command: ").Append(Command).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 + /// + /// Function object + public static Function 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. + /// + /// Function object + public virtual Function DuplicateFunction() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateFunction(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel DuplicateOpenAPIGenBaseModel() + { + return DuplicateFunction(); + } + + /// + /// 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 Function); + } + + /// + /// Returns true if Function instances are equal + /// + /// Instance of Function to be compared + /// Boolean + public bool Equals(Function 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.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.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(@"^Function$", 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/FunctionArrayInput.cs b/src/PollinationSDK/Model/FunctionArrayInput.cs new file mode 100644 index 000000000..4a8e7110b --- /dev/null +++ b/src/PollinationSDK/Model/FunctionArrayInput.cs @@ -0,0 +1,273 @@ +/* + * 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 JSON array input. You can add additional validation by defining a JSONSchema specification. See http://json-schema.org/understanding-json-schema/reference/array.html for more information. + /// + [DataContract(Name = "FunctionArrayInput")] + public partial class FunctionArrayInput : GenericInput, IEquatable, IValidatableObject + { + /// + /// Type of items in an array. All the items in an array must be from the same type. + /// + /// Type of items in an array. All the items in an array must be from the same type. + [DataMember(Name="items_type", EmitDefaultValue=false)] + public ItemType ItemsType { get; set; } = ItemType.String; + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected FunctionArrayInput() + { + // Set non-required readonly properties with defaultValue + this.Type = "FunctionArrayInput"; + } + + /// + /// Initializes a new instance of the class. + /// + /// Default value to use for an input if a value was not supplied.. + /// A list of aliases for this input in different platforms.. + /// A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. (default to false). + /// An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec.. + /// Type of items in an array. All the items in an array must be from the same type.. + /// Input name. (required). + /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. + /// Optional description for input.. + public FunctionArrayInput + ( + string name, // Required parameters + Dictionary annotations= default, string description= default, List _default= default, List> alias= default, bool required = false, Object spec= default, ItemType itemsType= ItemType.String // Optional parameters + ) : base(name: name, annotations: annotations, description: description)// BaseClass + { + this.Default = _default; + this.Alias = alias; + this.Required = required; + this.Spec = spec; + this.ItemsType = itemsType; + + // Set non-required readonly properties with defaultValue + this.Type = "FunctionArrayInput"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "FunctionArrayInput"; + + /// + /// Default value to use for an input if a value was not supplied. + /// + /// Default value to use for an input if a value was not supplied. + [DataMember(Name = "default", EmitDefaultValue = false)] + public List Default { get; set; } + /// + /// A list of aliases for this input in different platforms. + /// + /// A list of aliases for this input in different platforms. + [DataMember(Name = "alias", EmitDefaultValue = false)] + public List> Alias { get; set; } + /// + /// A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. + /// + /// A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. + [DataMember(Name = "required", EmitDefaultValue = true)] + public bool Required { get; set; } = false; + /// + /// An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec. + /// + /// An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec. + [DataMember(Name = "spec", EmitDefaultValue = false)] + public Object Spec { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + return "FunctionArrayInput"; + } + + /// + /// 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("FunctionArrayInput:\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Annotations: ").Append(Annotations).Append("\n"); + sb.Append(" Description: ").Append(Description).Append("\n"); + sb.Append(" Default: ").Append(Default).Append("\n"); + sb.Append(" Alias: ").Append(Alias).Append("\n"); + sb.Append(" Required: ").Append(Required).Append("\n"); + sb.Append(" Spec: ").Append(Spec).Append("\n"); + sb.Append(" ItemsType: ").Append(ItemsType).Append("\n"); + return sb.ToString(); + } + + /// + /// Returns the object from JSON string + /// + /// FunctionArrayInput object + public static FunctionArrayInput 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. + /// + /// FunctionArrayInput object + public virtual FunctionArrayInput DuplicateFunctionArrayInput() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateFunctionArrayInput(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override GenericInput DuplicateGenericInput() + { + return DuplicateFunctionArrayInput(); + } + + /// + /// 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 FunctionArrayInput); + } + + /// + /// Returns true if FunctionArrayInput instances are equal + /// + /// Instance of FunctionArrayInput to be compared + /// Boolean + public bool Equals(FunctionArrayInput input) + { + if (input == null) + return false; + return base.Equals(input) && + ( + this.Default == input.Default || + this.Default != null && + input.Default != null && + this.Default.SequenceEqual(input.Default) + ) && base.Equals(input) && + ( + this.Alias == input.Alias || + this.Alias != null && + input.Alias != null && + this.Alias.SequenceEqual(input.Alias) + ) && base.Equals(input) && + ( + this.Required == input.Required || + (this.Required != null && + this.Required.Equals(input.Required)) + ) && base.Equals(input) && + ( + this.ItemsType == input.ItemsType || + (this.ItemsType != null && + this.ItemsType.Equals(input.ItemsType)) + ) && 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.Default != null) + hashCode = hashCode * 59 + this.Default.GetHashCode(); + if (this.Alias != null) + hashCode = hashCode * 59 + this.Alias.GetHashCode(); + if (this.Required != null) + hashCode = hashCode * 59 + this.Required.GetHashCode(); + if (this.Spec != null) + hashCode = hashCode * 59 + this.Spec.GetHashCode(); + if (this.ItemsType != null) + hashCode = hashCode * 59 + this.ItemsType.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(@"^FunctionArrayInput$", 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/FunctionArrayOutput.cs b/src/PollinationSDK/Model/FunctionArrayOutput.cs new file mode 100644 index 000000000..6adfe40ef --- /dev/null +++ b/src/PollinationSDK/Model/FunctionArrayOutput.cs @@ -0,0 +1,216 @@ +/* + * 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 array output. This output loads the content from a JSON file which must be a JSON Array. + /// + [DataContract(Name = "FunctionArrayOutput")] + public partial class FunctionArrayOutput : FunctionStringOutput, IEquatable, IValidatableObject + { + /// + /// Type of items in this array. All the items in an array must be from the same type. + /// + /// Type of items in this array. All the items in an array must be from the same type. + [DataMember(Name="items_type", EmitDefaultValue=false)] + public ItemType ItemsType { get; set; } = ItemType.String; + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected FunctionArrayOutput() + { + // Set non-required readonly properties with defaultValue + this.Type = "FunctionArrayOutput"; + } + + /// + /// Initializes a new instance of the class. + /// + /// Type of items in this array. All the items in an array must be from the same type.. + /// Output name. (required). + /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. + /// Optional description for output.. + /// Path to the output artifact relative to where the function command is executed. (required). + /// A boolean to indicate if an artifact output is required. A False value makes the artifact optional. (default to true). + public FunctionArrayOutput + ( + string name, string path, // Required parameters + Dictionary annotations= default, string description= default, bool required = true, ItemType itemsType= ItemType.String // Optional parameters + ) : base(name: name, annotations: annotations, description: description, path: path, required: required)// BaseClass + { + this.ItemsType = itemsType; + + // Set non-required readonly properties with defaultValue + this.Type = "FunctionArrayOutput"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "FunctionArrayOutput"; + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + return "FunctionArrayOutput"; + } + + /// + /// 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("FunctionArrayOutput:\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Annotations: ").Append(Annotations).Append("\n"); + sb.Append(" Description: ").Append(Description).Append("\n"); + sb.Append(" Path: ").Append(Path).Append("\n"); + sb.Append(" Required: ").Append(Required).Append("\n"); + sb.Append(" ItemsType: ").Append(ItemsType).Append("\n"); + return sb.ToString(); + } + + /// + /// Returns the object from JSON string + /// + /// FunctionArrayOutput object + public static FunctionArrayOutput 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. + /// + /// FunctionArrayOutput object + public virtual FunctionArrayOutput DuplicateFunctionArrayOutput() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateFunctionArrayOutput(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override FunctionStringOutput DuplicateFunctionStringOutput() + { + return DuplicateFunctionArrayOutput(); + } + + /// + /// 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 FunctionArrayOutput); + } + + /// + /// Returns true if FunctionArrayOutput instances are equal + /// + /// Instance of FunctionArrayOutput to be compared + /// Boolean + public bool Equals(FunctionArrayOutput input) + { + if (input == null) + return false; + return base.Equals(input) && + ( + this.ItemsType == input.ItemsType || + (this.ItemsType != null && + this.ItemsType.Equals(input.ItemsType)) + ) && 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.ItemsType != null) + hashCode = hashCode * 59 + this.ItemsType.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(@"^FunctionArrayOutput$", 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/FunctionBooleanInput.cs b/src/PollinationSDK/Model/FunctionBooleanInput.cs new file mode 100644 index 000000000..97ad71975 --- /dev/null +++ b/src/PollinationSDK/Model/FunctionBooleanInput.cs @@ -0,0 +1,256 @@ +/* + * 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 boolean type matches only two special values: True and False. Note that values that evaluate to true or false, such as 1 and 0, are not accepted. You can add additional validation by defining a JSONSchema specification. See http://json-schema.org/understanding-json-schema/reference/boolean.html for more information. + /// + [DataContract(Name = "FunctionBooleanInput")] + public partial class FunctionBooleanInput : GenericInput, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected FunctionBooleanInput() + { + // Set non-required readonly properties with defaultValue + this.Type = "FunctionBooleanInput"; + } + + /// + /// Initializes a new instance of the class. + /// + /// Default value to use for an input if a value was not supplied.. + /// A list of aliases for this input in different platforms.. + /// A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. (default to false). + /// An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec.. + /// Input name. (required). + /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. + /// Optional description for input.. + public FunctionBooleanInput + ( + string name, // Required parameters + Dictionary annotations= default, string description= default, bool _default= default, List> alias= default, bool required = false, Object spec= default // Optional parameters + ) : base(name: name, annotations: annotations, description: description)// BaseClass + { + this.Default = _default; + this.Alias = alias; + this.Required = required; + this.Spec = spec; + + // Set non-required readonly properties with defaultValue + this.Type = "FunctionBooleanInput"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "FunctionBooleanInput"; + + /// + /// Default value to use for an input if a value was not supplied. + /// + /// Default value to use for an input if a value was not supplied. + [DataMember(Name = "default", EmitDefaultValue = false)] + public bool Default { get; set; } + /// + /// A list of aliases for this input in different platforms. + /// + /// A list of aliases for this input in different platforms. + [DataMember(Name = "alias", EmitDefaultValue = false)] + public List> Alias { get; set; } + /// + /// A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. + /// + /// A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. + [DataMember(Name = "required", EmitDefaultValue = true)] + public bool Required { get; set; } = false; + /// + /// An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec. + /// + /// An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec. + [DataMember(Name = "spec", EmitDefaultValue = false)] + public Object Spec { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + return "FunctionBooleanInput"; + } + + /// + /// 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("FunctionBooleanInput:\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Annotations: ").Append(Annotations).Append("\n"); + sb.Append(" Description: ").Append(Description).Append("\n"); + sb.Append(" Default: ").Append(Default).Append("\n"); + sb.Append(" Alias: ").Append(Alias).Append("\n"); + sb.Append(" Required: ").Append(Required).Append("\n"); + sb.Append(" Spec: ").Append(Spec).Append("\n"); + return sb.ToString(); + } + + /// + /// Returns the object from JSON string + /// + /// FunctionBooleanInput object + public static FunctionBooleanInput 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. + /// + /// FunctionBooleanInput object + public virtual FunctionBooleanInput DuplicateFunctionBooleanInput() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateFunctionBooleanInput(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override GenericInput DuplicateGenericInput() + { + return DuplicateFunctionBooleanInput(); + } + + /// + /// 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 FunctionBooleanInput); + } + + /// + /// Returns true if FunctionBooleanInput instances are equal + /// + /// Instance of FunctionBooleanInput to be compared + /// Boolean + public bool Equals(FunctionBooleanInput input) + { + if (input == null) + return false; + return base.Equals(input) && + ( + this.Default == input.Default || + (this.Default != null && + this.Default.Equals(input.Default)) + ) && base.Equals(input) && + ( + this.Alias == input.Alias || + this.Alias != null && + input.Alias != null && + this.Alias.SequenceEqual(input.Alias) + ) && base.Equals(input) && + ( + this.Required == input.Required || + (this.Required != null && + this.Required.Equals(input.Required)) + ) && 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.Default != null) + hashCode = hashCode * 59 + this.Default.GetHashCode(); + if (this.Alias != null) + hashCode = hashCode * 59 + this.Alias.GetHashCode(); + if (this.Required != null) + hashCode = hashCode * 59 + this.Required.GetHashCode(); + if (this.Spec != null) + hashCode = hashCode * 59 + this.Spec.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(@"^FunctionBooleanInput$", 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/FunctionBooleanOutput.cs b/src/PollinationSDK/Model/FunctionBooleanOutput.cs new file mode 100644 index 000000000..8ca2c0492 --- /dev/null +++ b/src/PollinationSDK/Model/FunctionBooleanOutput.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 +{ + /// + /// Function boolean output. This output loads the content from a file as a boolean. + /// + [DataContract(Name = "FunctionBooleanOutput")] + public partial class FunctionBooleanOutput : FunctionStringOutput, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected FunctionBooleanOutput() + { + // Set non-required readonly properties with defaultValue + this.Type = "FunctionBooleanOutput"; + } + + /// + /// Initializes a new instance of the class. + /// + /// Output name. (required). + /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. + /// Optional description for output.. + /// Path to the output artifact relative to where the function command is executed. (required). + /// A boolean to indicate if an artifact output is required. A False value makes the artifact optional. (default to true). + public FunctionBooleanOutput + ( + string name, string path, // Required parameters + Dictionary annotations= default, string description= default, bool required = true // Optional parameters + ) : base(name: name, annotations: annotations, description: description, path: path, required: required)// BaseClass + { + + // Set non-required readonly properties with defaultValue + this.Type = "FunctionBooleanOutput"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "FunctionBooleanOutput"; + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + return "FunctionBooleanOutput"; + } + + /// + /// 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("FunctionBooleanOutput:\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Annotations: ").Append(Annotations).Append("\n"); + sb.Append(" Description: ").Append(Description).Append("\n"); + sb.Append(" Path: ").Append(Path).Append("\n"); + sb.Append(" Required: ").Append(Required).Append("\n"); + return sb.ToString(); + } + + /// + /// Returns the object from JSON string + /// + /// FunctionBooleanOutput object + public static FunctionBooleanOutput 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. + /// + /// FunctionBooleanOutput object + public virtual FunctionBooleanOutput DuplicateFunctionBooleanOutput() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateFunctionBooleanOutput(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override FunctionStringOutput DuplicateFunctionStringOutput() + { + return DuplicateFunctionBooleanOutput(); + } + + /// + /// 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 FunctionBooleanOutput); + } + + /// + /// Returns true if FunctionBooleanOutput instances are equal + /// + /// Instance of FunctionBooleanOutput to be compared + /// Boolean + public bool Equals(FunctionBooleanOutput 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(@"^FunctionBooleanOutput$", 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/FunctionFileInput.cs b/src/PollinationSDK/Model/FunctionFileInput.cs new file mode 100644 index 000000000..644a887f0 --- /dev/null +++ b/src/PollinationSDK/Model/FunctionFileInput.cs @@ -0,0 +1,290 @@ +/* + * 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 file input. File is a special string input. Unlike other string inputs, a file will be copied from its location to execution folder when a workflow is executed. You can add additional validation by defining a JSONSchema specification. See http://json-schema.org/understanding-json-schema/reference/string.html#string for more information. .. code-block:: python # a file with maximum 50 characters with an ``epw`` extension. \"schema\": { \"type\": \"string\", \"maxLength\": 50, \"pattern\": \"(?i)(^.*\\.epw$)\" } + /// + [DataContract(Name = "FunctionFileInput")] + public partial class FunctionFileInput : GenericInput, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected FunctionFileInput() + { + // Set non-required readonly properties with defaultValue + this.Type = "FunctionFileInput"; + } + + /// + /// Initializes a new instance of the class. + /// + /// 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. (required). + /// The default source for file if the value is not provided.. + /// A list of aliases for this input in different platforms.. + /// A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. (default to false). + /// An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec.. + /// Optional list of extensions for file. The check for extension is case-insensitive.. + /// Input name. (required). + /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. + /// Optional description for input.. + public FunctionFileInput + ( + string name, string path, // Required parameters + Dictionary annotations= default, string description= default, AnyOf _default= default, List> alias= default, bool required = false, Object spec= default, List extensions= default // Optional parameters + ) : base(name: name, annotations: annotations, description: description)// BaseClass + { + // to ensure "path" is required (not null) + this.Path = path ?? throw new ArgumentNullException("path is a required property for FunctionFileInput and cannot be null"); + this.Default = _default; + this.Alias = alias; + this.Required = required; + this.Spec = spec; + this.Extensions = extensions; + + // Set non-required readonly properties with defaultValue + this.Type = "FunctionFileInput"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "FunctionFileInput"; + + /// + /// 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. + /// + /// 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. + [DataMember(Name = "path", IsRequired = true, EmitDefaultValue = false)] + public string Path { get; set; } + /// + /// The default source for file if the value is not provided. + /// + /// The default source for file if the value is not provided. + [DataMember(Name = "default", EmitDefaultValue = false)] + public AnyOf Default { get; set; } + /// + /// A list of aliases for this input in different platforms. + /// + /// A list of aliases for this input in different platforms. + [DataMember(Name = "alias", EmitDefaultValue = false)] + public List> Alias { get; set; } + /// + /// A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. + /// + /// A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. + [DataMember(Name = "required", EmitDefaultValue = true)] + public bool Required { get; set; } = false; + /// + /// An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec. + /// + /// An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec. + [DataMember(Name = "spec", EmitDefaultValue = false)] + public Object Spec { get; set; } + /// + /// Optional list of extensions for file. The check for extension is case-insensitive. + /// + /// Optional list of extensions for file. The check for extension is case-insensitive. + [DataMember(Name = "extensions", EmitDefaultValue = false)] + public List Extensions { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + return "FunctionFileInput"; + } + + /// + /// 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("FunctionFileInput:\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Annotations: ").Append(Annotations).Append("\n"); + sb.Append(" Description: ").Append(Description).Append("\n"); + sb.Append(" Path: ").Append(Path).Append("\n"); + sb.Append(" Default: ").Append(Default).Append("\n"); + sb.Append(" Alias: ").Append(Alias).Append("\n"); + sb.Append(" Required: ").Append(Required).Append("\n"); + sb.Append(" Spec: ").Append(Spec).Append("\n"); + sb.Append(" Extensions: ").Append(Extensions).Append("\n"); + return sb.ToString(); + } + + /// + /// Returns the object from JSON string + /// + /// FunctionFileInput object + public static FunctionFileInput 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. + /// + /// FunctionFileInput object + public virtual FunctionFileInput DuplicateFunctionFileInput() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateFunctionFileInput(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override GenericInput DuplicateGenericInput() + { + return DuplicateFunctionFileInput(); + } + + /// + /// 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 FunctionFileInput); + } + + /// + /// Returns true if FunctionFileInput instances are equal + /// + /// Instance of FunctionFileInput to be compared + /// Boolean + public bool Equals(FunctionFileInput input) + { + if (input == null) + return false; + return base.Equals(input) && + ( + this.Path == input.Path || + (this.Path != null && + this.Path.Equals(input.Path)) + ) && base.Equals(input) && + ( + this.Default == input.Default || + (this.Default != null && + this.Default.Equals(input.Default)) + ) && base.Equals(input) && + ( + this.Alias == input.Alias || + this.Alias != null && + input.Alias != null && + this.Alias.SequenceEqual(input.Alias) + ) && base.Equals(input) && + ( + this.Required == input.Required || + (this.Required != null && + this.Required.Equals(input.Required)) + ) && base.Equals(input) && + ( + this.Extensions == input.Extensions || + this.Extensions != null && + input.Extensions != null && + this.Extensions.SequenceEqual(input.Extensions) + ) && 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.Path != null) + hashCode = hashCode * 59 + this.Path.GetHashCode(); + if (this.Default != null) + hashCode = hashCode * 59 + this.Default.GetHashCode(); + if (this.Alias != null) + hashCode = hashCode * 59 + this.Alias.GetHashCode(); + if (this.Required != null) + hashCode = hashCode * 59 + this.Required.GetHashCode(); + if (this.Spec != null) + hashCode = hashCode * 59 + this.Spec.GetHashCode(); + if (this.Extensions != null) + hashCode = hashCode * 59 + this.Extensions.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(@"^FunctionFileInput$", 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/FunctionFileOutput.cs b/src/PollinationSDK/Model/FunctionFileOutput.cs new file mode 100644 index 000000000..b151defb5 --- /dev/null +++ b/src/PollinationSDK/Model/FunctionFileOutput.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 +{ + /// + /// Function File output. + /// + [DataContract(Name = "FunctionFileOutput")] + public partial class FunctionFileOutput : PathOutput, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected FunctionFileOutput() + { + // Set non-required readonly properties with defaultValue + this.Type = "FunctionFileOutput"; + } + + /// + /// Initializes a new instance of the class. + /// + /// Output name. (required). + /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. + /// Optional description for output.. + /// Path to the output artifact relative to where the function command is executed. (required). + /// A boolean to indicate if an artifact output is required. A False value makes the artifact optional. (default to true). + public FunctionFileOutput + ( + string name, string path, // Required parameters + Dictionary annotations= default, string description= default, bool required = true // Optional parameters + ) : base(name: name, annotations: annotations, description: description, path: path, required: required)// BaseClass + { + + // Set non-required readonly properties with defaultValue + this.Type = "FunctionFileOutput"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "FunctionFileOutput"; + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + return "FunctionFileOutput"; + } + + /// + /// 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("FunctionFileOutput:\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Annotations: ").Append(Annotations).Append("\n"); + sb.Append(" Description: ").Append(Description).Append("\n"); + sb.Append(" Path: ").Append(Path).Append("\n"); + sb.Append(" Required: ").Append(Required).Append("\n"); + return sb.ToString(); + } + + /// + /// Returns the object from JSON string + /// + /// FunctionFileOutput object + public static FunctionFileOutput 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. + /// + /// FunctionFileOutput object + public virtual FunctionFileOutput DuplicateFunctionFileOutput() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateFunctionFileOutput(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override PathOutput DuplicatePathOutput() + { + return DuplicateFunctionFileOutput(); + } + + /// + /// 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 FunctionFileOutput); + } + + /// + /// Returns true if FunctionFileOutput instances are equal + /// + /// Instance of FunctionFileOutput to be compared + /// Boolean + public bool Equals(FunctionFileOutput 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(@"^FunctionFileOutput$", 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/FunctionFolderInput.cs b/src/PollinationSDK/Model/FunctionFolderInput.cs new file mode 100644 index 000000000..1b49bfcc2 --- /dev/null +++ b/src/PollinationSDK/Model/FunctionFolderInput.cs @@ -0,0 +1,273 @@ +/* + * 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 folder input. Folder is a special string input. Unlike other string inputs, a folder will be copied from its location to execution folder when a workflow is executed. You can add additional validation by defining a JSONSchema specification. See http://json-schema.org/understanding-json-schema/reference/string.html#string for more information. .. code-block:: python \"schema\": { \"type\": \"string\", \"maxLength\": 50, } + /// + [DataContract(Name = "FunctionFolderInput")] + public partial class FunctionFolderInput : GenericInput, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected FunctionFolderInput() + { + // Set non-required readonly properties with defaultValue + this.Type = "FunctionFolderInput"; + } + + /// + /// Initializes a new instance of the class. + /// + /// 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. (required). + /// The default source for file if the value is not provided.. + /// A list of aliases for this input in different platforms.. + /// A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. (default to false). + /// An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec.. + /// Input name. (required). + /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. + /// Optional description for input.. + public FunctionFolderInput + ( + string name, string path, // Required parameters + Dictionary annotations= default, string description= default, AnyOf _default= default, List> alias= default, bool required = false, Object spec= default // Optional parameters + ) : base(name: name, annotations: annotations, description: description)// BaseClass + { + // to ensure "path" is required (not null) + this.Path = path ?? throw new ArgumentNullException("path is a required property for FunctionFolderInput and cannot be null"); + this.Default = _default; + this.Alias = alias; + this.Required = required; + this.Spec = spec; + + // Set non-required readonly properties with defaultValue + this.Type = "FunctionFolderInput"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "FunctionFolderInput"; + + /// + /// 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. + /// + /// 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. + [DataMember(Name = "path", IsRequired = true, EmitDefaultValue = false)] + public string Path { get; set; } + /// + /// The default source for file if the value is not provided. + /// + /// The default source for file if the value is not provided. + [DataMember(Name = "default", EmitDefaultValue = false)] + public AnyOf Default { get; set; } + /// + /// A list of aliases for this input in different platforms. + /// + /// A list of aliases for this input in different platforms. + [DataMember(Name = "alias", EmitDefaultValue = false)] + public List> Alias { get; set; } + /// + /// A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. + /// + /// A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. + [DataMember(Name = "required", EmitDefaultValue = true)] + public bool Required { get; set; } = false; + /// + /// An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec. + /// + /// An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec. + [DataMember(Name = "spec", EmitDefaultValue = false)] + public Object Spec { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + return "FunctionFolderInput"; + } + + /// + /// 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("FunctionFolderInput:\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Annotations: ").Append(Annotations).Append("\n"); + sb.Append(" Description: ").Append(Description).Append("\n"); + sb.Append(" Path: ").Append(Path).Append("\n"); + sb.Append(" Default: ").Append(Default).Append("\n"); + sb.Append(" Alias: ").Append(Alias).Append("\n"); + sb.Append(" Required: ").Append(Required).Append("\n"); + sb.Append(" Spec: ").Append(Spec).Append("\n"); + return sb.ToString(); + } + + /// + /// Returns the object from JSON string + /// + /// FunctionFolderInput object + public static FunctionFolderInput 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. + /// + /// FunctionFolderInput object + public virtual FunctionFolderInput DuplicateFunctionFolderInput() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateFunctionFolderInput(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override GenericInput DuplicateGenericInput() + { + return DuplicateFunctionFolderInput(); + } + + /// + /// 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 FunctionFolderInput); + } + + /// + /// Returns true if FunctionFolderInput instances are equal + /// + /// Instance of FunctionFolderInput to be compared + /// Boolean + public bool Equals(FunctionFolderInput input) + { + if (input == null) + return false; + return base.Equals(input) && + ( + this.Path == input.Path || + (this.Path != null && + this.Path.Equals(input.Path)) + ) && base.Equals(input) && + ( + this.Default == input.Default || + (this.Default != null && + this.Default.Equals(input.Default)) + ) && base.Equals(input) && + ( + this.Alias == input.Alias || + this.Alias != null && + input.Alias != null && + this.Alias.SequenceEqual(input.Alias) + ) && base.Equals(input) && + ( + this.Required == input.Required || + (this.Required != null && + this.Required.Equals(input.Required)) + ) && 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.Path != null) + hashCode = hashCode * 59 + this.Path.GetHashCode(); + if (this.Default != null) + hashCode = hashCode * 59 + this.Default.GetHashCode(); + if (this.Alias != null) + hashCode = hashCode * 59 + this.Alias.GetHashCode(); + if (this.Required != null) + hashCode = hashCode * 59 + this.Required.GetHashCode(); + if (this.Spec != null) + hashCode = hashCode * 59 + this.Spec.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(@"^FunctionFolderInput$", 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/FunctionFolderOutput.cs b/src/PollinationSDK/Model/FunctionFolderOutput.cs new file mode 100644 index 000000000..a7ec4028b --- /dev/null +++ b/src/PollinationSDK/Model/FunctionFolderOutput.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 +{ + /// + /// Function Folder output. + /// + [DataContract(Name = "FunctionFolderOutput")] + public partial class FunctionFolderOutput : PathOutput, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected FunctionFolderOutput() + { + // Set non-required readonly properties with defaultValue + this.Type = "FunctionFolderOutput"; + } + + /// + /// Initializes a new instance of the class. + /// + /// Output name. (required). + /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. + /// Optional description for output.. + /// Path to the output artifact relative to where the function command is executed. (required). + /// A boolean to indicate if an artifact output is required. A False value makes the artifact optional. (default to true). + public FunctionFolderOutput + ( + string name, string path, // Required parameters + Dictionary annotations= default, string description= default, bool required = true // Optional parameters + ) : base(name: name, annotations: annotations, description: description, path: path, required: required)// BaseClass + { + + // Set non-required readonly properties with defaultValue + this.Type = "FunctionFolderOutput"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "FunctionFolderOutput"; + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + return "FunctionFolderOutput"; + } + + /// + /// 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("FunctionFolderOutput:\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Annotations: ").Append(Annotations).Append("\n"); + sb.Append(" Description: ").Append(Description).Append("\n"); + sb.Append(" Path: ").Append(Path).Append("\n"); + sb.Append(" Required: ").Append(Required).Append("\n"); + return sb.ToString(); + } + + /// + /// Returns the object from JSON string + /// + /// FunctionFolderOutput object + public static FunctionFolderOutput 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. + /// + /// FunctionFolderOutput object + public virtual FunctionFolderOutput DuplicateFunctionFolderOutput() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateFunctionFolderOutput(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override PathOutput DuplicatePathOutput() + { + return DuplicateFunctionFolderOutput(); + } + + /// + /// 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 FunctionFolderOutput); + } + + /// + /// Returns true if FunctionFolderOutput instances are equal + /// + /// Instance of FunctionFolderOutput to be compared + /// Boolean + public bool Equals(FunctionFolderOutput 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(@"^FunctionFolderOutput$", 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/FunctionIntegerInput.cs b/src/PollinationSDK/Model/FunctionIntegerInput.cs new file mode 100644 index 000000000..070e8f463 --- /dev/null +++ b/src/PollinationSDK/Model/FunctionIntegerInput.cs @@ -0,0 +1,256 @@ +/* + * 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 integer input. You can add additional validation by defining a JSONSchema specification. See http://json-schema.org/understanding-json-schema/reference/numeric.html#numeric for more information. + /// + [DataContract(Name = "FunctionIntegerInput")] + public partial class FunctionIntegerInput : GenericInput, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected FunctionIntegerInput() + { + // Set non-required readonly properties with defaultValue + this.Type = "FunctionIntegerInput"; + } + + /// + /// Initializes a new instance of the class. + /// + /// Default value to use for an input if a value was not supplied.. + /// A list of aliases for this input in different platforms.. + /// A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. (default to false). + /// An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec.. + /// Input name. (required). + /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. + /// Optional description for input.. + public FunctionIntegerInput + ( + string name, // Required parameters + Dictionary annotations= default, string description= default, int _default= default, List> alias= default, bool required = false, Object spec= default // Optional parameters + ) : base(name: name, annotations: annotations, description: description)// BaseClass + { + this.Default = _default; + this.Alias = alias; + this.Required = required; + this.Spec = spec; + + // Set non-required readonly properties with defaultValue + this.Type = "FunctionIntegerInput"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "FunctionIntegerInput"; + + /// + /// Default value to use for an input if a value was not supplied. + /// + /// Default value to use for an input if a value was not supplied. + [DataMember(Name = "default", EmitDefaultValue = false)] + public int Default { get; set; } + /// + /// A list of aliases for this input in different platforms. + /// + /// A list of aliases for this input in different platforms. + [DataMember(Name = "alias", EmitDefaultValue = false)] + public List> Alias { get; set; } + /// + /// A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. + /// + /// A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. + [DataMember(Name = "required", EmitDefaultValue = true)] + public bool Required { get; set; } = false; + /// + /// An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec. + /// + /// An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec. + [DataMember(Name = "spec", EmitDefaultValue = false)] + public Object Spec { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + return "FunctionIntegerInput"; + } + + /// + /// 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("FunctionIntegerInput:\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Annotations: ").Append(Annotations).Append("\n"); + sb.Append(" Description: ").Append(Description).Append("\n"); + sb.Append(" Default: ").Append(Default).Append("\n"); + sb.Append(" Alias: ").Append(Alias).Append("\n"); + sb.Append(" Required: ").Append(Required).Append("\n"); + sb.Append(" Spec: ").Append(Spec).Append("\n"); + return sb.ToString(); + } + + /// + /// Returns the object from JSON string + /// + /// FunctionIntegerInput object + public static FunctionIntegerInput 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. + /// + /// FunctionIntegerInput object + public virtual FunctionIntegerInput DuplicateFunctionIntegerInput() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateFunctionIntegerInput(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override GenericInput DuplicateGenericInput() + { + return DuplicateFunctionIntegerInput(); + } + + /// + /// 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 FunctionIntegerInput); + } + + /// + /// Returns true if FunctionIntegerInput instances are equal + /// + /// Instance of FunctionIntegerInput to be compared + /// Boolean + public bool Equals(FunctionIntegerInput input) + { + if (input == null) + return false; + return base.Equals(input) && + ( + this.Default == input.Default || + (this.Default != null && + this.Default.Equals(input.Default)) + ) && base.Equals(input) && + ( + this.Alias == input.Alias || + this.Alias != null && + input.Alias != null && + this.Alias.SequenceEqual(input.Alias) + ) && base.Equals(input) && + ( + this.Required == input.Required || + (this.Required != null && + this.Required.Equals(input.Required)) + ) && 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.Default != null) + hashCode = hashCode * 59 + this.Default.GetHashCode(); + if (this.Alias != null) + hashCode = hashCode * 59 + this.Alias.GetHashCode(); + if (this.Required != null) + hashCode = hashCode * 59 + this.Required.GetHashCode(); + if (this.Spec != null) + hashCode = hashCode * 59 + this.Spec.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(@"^FunctionIntegerInput$", 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/FunctionIntegerOutput.cs b/src/PollinationSDK/Model/FunctionIntegerOutput.cs new file mode 100644 index 000000000..7d36d64d4 --- /dev/null +++ b/src/PollinationSDK/Model/FunctionIntegerOutput.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 +{ + /// + /// Function integer output. This output loads the content from a file as an integer. + /// + [DataContract(Name = "FunctionIntegerOutput")] + public partial class FunctionIntegerOutput : FunctionStringOutput, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected FunctionIntegerOutput() + { + // Set non-required readonly properties with defaultValue + this.Type = "FunctionIntegerOutput"; + } + + /// + /// Initializes a new instance of the class. + /// + /// Output name. (required). + /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. + /// Optional description for output.. + /// Path to the output artifact relative to where the function command is executed. (required). + /// A boolean to indicate if an artifact output is required. A False value makes the artifact optional. (default to true). + public FunctionIntegerOutput + ( + string name, string path, // Required parameters + Dictionary annotations= default, string description= default, bool required = true // Optional parameters + ) : base(name: name, annotations: annotations, description: description, path: path, required: required)// BaseClass + { + + // Set non-required readonly properties with defaultValue + this.Type = "FunctionIntegerOutput"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "FunctionIntegerOutput"; + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + return "FunctionIntegerOutput"; + } + + /// + /// 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("FunctionIntegerOutput:\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Annotations: ").Append(Annotations).Append("\n"); + sb.Append(" Description: ").Append(Description).Append("\n"); + sb.Append(" Path: ").Append(Path).Append("\n"); + sb.Append(" Required: ").Append(Required).Append("\n"); + return sb.ToString(); + } + + /// + /// Returns the object from JSON string + /// + /// FunctionIntegerOutput object + public static FunctionIntegerOutput 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. + /// + /// FunctionIntegerOutput object + public virtual FunctionIntegerOutput DuplicateFunctionIntegerOutput() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateFunctionIntegerOutput(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override FunctionStringOutput DuplicateFunctionStringOutput() + { + return DuplicateFunctionIntegerOutput(); + } + + /// + /// 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 FunctionIntegerOutput); + } + + /// + /// Returns true if FunctionIntegerOutput instances are equal + /// + /// Instance of FunctionIntegerOutput to be compared + /// Boolean + public bool Equals(FunctionIntegerOutput 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(@"^FunctionIntegerOutput$", 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/FunctionJSONObjectInput.cs b/src/PollinationSDK/Model/FunctionJSONObjectInput.cs new file mode 100644 index 000000000..c22c84fa8 --- /dev/null +++ b/src/PollinationSDK/Model/FunctionJSONObjectInput.cs @@ -0,0 +1,256 @@ +/* + * 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 JSON object input. JSON objects are similar to Python dictionaries. You can add additional validation by defining a JSONSchema specification. See http://json-schema.org/understanding-json-schema/reference/object.html for more information. + /// + [DataContract(Name = "FunctionJSONObjectInput")] + public partial class FunctionJSONObjectInput : GenericInput, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected FunctionJSONObjectInput() + { + // Set non-required readonly properties with defaultValue + this.Type = "FunctionJSONObjectInput"; + } + + /// + /// Initializes a new instance of the class. + /// + /// Default value to use for an input if a value was not supplied.. + /// A list of aliases for this input in different platforms.. + /// A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. (default to false). + /// An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec.. + /// Input name. (required). + /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. + /// Optional description for input.. + public FunctionJSONObjectInput + ( + string name, // Required parameters + Dictionary annotations= default, string description= default, Object _default= default, List> alias= default, bool required = false, Object spec= default // Optional parameters + ) : base(name: name, annotations: annotations, description: description)// BaseClass + { + this.Default = _default; + this.Alias = alias; + this.Required = required; + this.Spec = spec; + + // Set non-required readonly properties with defaultValue + this.Type = "FunctionJSONObjectInput"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "FunctionJSONObjectInput"; + + /// + /// Default value to use for an input if a value was not supplied. + /// + /// Default value to use for an input if a value was not supplied. + [DataMember(Name = "default", EmitDefaultValue = false)] + public Object Default { get; set; } + /// + /// A list of aliases for this input in different platforms. + /// + /// A list of aliases for this input in different platforms. + [DataMember(Name = "alias", EmitDefaultValue = false)] + public List> Alias { get; set; } + /// + /// A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. + /// + /// A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. + [DataMember(Name = "required", EmitDefaultValue = true)] + public bool Required { get; set; } = false; + /// + /// An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec. + /// + /// An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec. + [DataMember(Name = "spec", EmitDefaultValue = false)] + public Object Spec { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + return "FunctionJSONObjectInput"; + } + + /// + /// 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("FunctionJSONObjectInput:\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Annotations: ").Append(Annotations).Append("\n"); + sb.Append(" Description: ").Append(Description).Append("\n"); + sb.Append(" Default: ").Append(Default).Append("\n"); + sb.Append(" Alias: ").Append(Alias).Append("\n"); + sb.Append(" Required: ").Append(Required).Append("\n"); + sb.Append(" Spec: ").Append(Spec).Append("\n"); + return sb.ToString(); + } + + /// + /// Returns the object from JSON string + /// + /// FunctionJSONObjectInput object + public static FunctionJSONObjectInput 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. + /// + /// FunctionJSONObjectInput object + public virtual FunctionJSONObjectInput DuplicateFunctionJSONObjectInput() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateFunctionJSONObjectInput(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override GenericInput DuplicateGenericInput() + { + return DuplicateFunctionJSONObjectInput(); + } + + /// + /// 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 FunctionJSONObjectInput); + } + + /// + /// Returns true if FunctionJSONObjectInput instances are equal + /// + /// Instance of FunctionJSONObjectInput to be compared + /// Boolean + public bool Equals(FunctionJSONObjectInput input) + { + if (input == null) + return false; + return base.Equals(input) && + ( + this.Default == input.Default || + (this.Default != null && + this.Default.Equals(input.Default)) + ) && base.Equals(input) && + ( + this.Alias == input.Alias || + this.Alias != null && + input.Alias != null && + this.Alias.SequenceEqual(input.Alias) + ) && base.Equals(input) && + ( + this.Required == input.Required || + (this.Required != null && + this.Required.Equals(input.Required)) + ) && 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.Default != null) + hashCode = hashCode * 59 + this.Default.GetHashCode(); + if (this.Alias != null) + hashCode = hashCode * 59 + this.Alias.GetHashCode(); + if (this.Required != null) + hashCode = hashCode * 59 + this.Required.GetHashCode(); + if (this.Spec != null) + hashCode = hashCode * 59 + this.Spec.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(@"^FunctionJSONObjectInput$", 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/FunctionJSONObjectOutput.cs b/src/PollinationSDK/Model/FunctionJSONObjectOutput.cs new file mode 100644 index 000000000..e00804540 --- /dev/null +++ b/src/PollinationSDK/Model/FunctionJSONObjectOutput.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 +{ + /// + /// Function object output. This output loads the content from a file as a JSON object. + /// + [DataContract(Name = "FunctionJSONObjectOutput")] + public partial class FunctionJSONObjectOutput : FunctionStringOutput, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected FunctionJSONObjectOutput() + { + // Set non-required readonly properties with defaultValue + this.Type = "FunctionJSONObjectOutput"; + } + + /// + /// Initializes a new instance of the class. + /// + /// Output name. (required). + /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. + /// Optional description for output.. + /// Path to the output artifact relative to where the function command is executed. (required). + /// A boolean to indicate if an artifact output is required. A False value makes the artifact optional. (default to true). + public FunctionJSONObjectOutput + ( + string name, string path, // Required parameters + Dictionary annotations= default, string description= default, bool required = true // Optional parameters + ) : base(name: name, annotations: annotations, description: description, path: path, required: required)// BaseClass + { + + // Set non-required readonly properties with defaultValue + this.Type = "FunctionJSONObjectOutput"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "FunctionJSONObjectOutput"; + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + return "FunctionJSONObjectOutput"; + } + + /// + /// 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("FunctionJSONObjectOutput:\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Annotations: ").Append(Annotations).Append("\n"); + sb.Append(" Description: ").Append(Description).Append("\n"); + sb.Append(" Path: ").Append(Path).Append("\n"); + sb.Append(" Required: ").Append(Required).Append("\n"); + return sb.ToString(); + } + + /// + /// Returns the object from JSON string + /// + /// FunctionJSONObjectOutput object + public static FunctionJSONObjectOutput 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. + /// + /// FunctionJSONObjectOutput object + public virtual FunctionJSONObjectOutput DuplicateFunctionJSONObjectOutput() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateFunctionJSONObjectOutput(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override FunctionStringOutput DuplicateFunctionStringOutput() + { + return DuplicateFunctionJSONObjectOutput(); + } + + /// + /// 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 FunctionJSONObjectOutput); + } + + /// + /// Returns true if FunctionJSONObjectOutput instances are equal + /// + /// Instance of FunctionJSONObjectOutput to be compared + /// Boolean + public bool Equals(FunctionJSONObjectOutput 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(@"^FunctionJSONObjectOutput$", 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/FunctionNumberInput.cs b/src/PollinationSDK/Model/FunctionNumberInput.cs new file mode 100644 index 000000000..b7c0d7874 --- /dev/null +++ b/src/PollinationSDK/Model/FunctionNumberInput.cs @@ -0,0 +1,256 @@ +/* + * 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 number input. You can add additional validation by defining a JSONSchema specification. See http://json-schema.org/understanding-json-schema/reference/numeric.html#numeric for more information. + /// + [DataContract(Name = "FunctionNumberInput")] + public partial class FunctionNumberInput : GenericInput, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected FunctionNumberInput() + { + // Set non-required readonly properties with defaultValue + this.Type = "FunctionNumberInput"; + } + + /// + /// Initializes a new instance of the class. + /// + /// Default value to use for an input if a value was not supplied.. + /// A list of aliases for this input in different platforms.. + /// A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. (default to false). + /// An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec.. + /// Input name. (required). + /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. + /// Optional description for input.. + public FunctionNumberInput + ( + string name, // Required parameters + Dictionary annotations= default, string description= default, double _default= default, List> alias= default, bool required = false, Object spec= default // Optional parameters + ) : base(name: name, annotations: annotations, description: description)// BaseClass + { + this.Default = _default; + this.Alias = alias; + this.Required = required; + this.Spec = spec; + + // Set non-required readonly properties with defaultValue + this.Type = "FunctionNumberInput"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "FunctionNumberInput"; + + /// + /// Default value to use for an input if a value was not supplied. + /// + /// Default value to use for an input if a value was not supplied. + [DataMember(Name = "default", EmitDefaultValue = false)] + public double Default { get; set; } + /// + /// A list of aliases for this input in different platforms. + /// + /// A list of aliases for this input in different platforms. + [DataMember(Name = "alias", EmitDefaultValue = false)] + public List> Alias { get; set; } + /// + /// A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. + /// + /// A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. + [DataMember(Name = "required", EmitDefaultValue = true)] + public bool Required { get; set; } = false; + /// + /// An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec. + /// + /// An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec. + [DataMember(Name = "spec", EmitDefaultValue = false)] + public Object Spec { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + return "FunctionNumberInput"; + } + + /// + /// 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("FunctionNumberInput:\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Annotations: ").Append(Annotations).Append("\n"); + sb.Append(" Description: ").Append(Description).Append("\n"); + sb.Append(" Default: ").Append(Default).Append("\n"); + sb.Append(" Alias: ").Append(Alias).Append("\n"); + sb.Append(" Required: ").Append(Required).Append("\n"); + sb.Append(" Spec: ").Append(Spec).Append("\n"); + return sb.ToString(); + } + + /// + /// Returns the object from JSON string + /// + /// FunctionNumberInput object + public static FunctionNumberInput 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. + /// + /// FunctionNumberInput object + public virtual FunctionNumberInput DuplicateFunctionNumberInput() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateFunctionNumberInput(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override GenericInput DuplicateGenericInput() + { + return DuplicateFunctionNumberInput(); + } + + /// + /// 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 FunctionNumberInput); + } + + /// + /// Returns true if FunctionNumberInput instances are equal + /// + /// Instance of FunctionNumberInput to be compared + /// Boolean + public bool Equals(FunctionNumberInput input) + { + if (input == null) + return false; + return base.Equals(input) && + ( + this.Default == input.Default || + (this.Default != null && + this.Default.Equals(input.Default)) + ) && base.Equals(input) && + ( + this.Alias == input.Alias || + this.Alias != null && + input.Alias != null && + this.Alias.SequenceEqual(input.Alias) + ) && base.Equals(input) && + ( + this.Required == input.Required || + (this.Required != null && + this.Required.Equals(input.Required)) + ) && 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.Default != null) + hashCode = hashCode * 59 + this.Default.GetHashCode(); + if (this.Alias != null) + hashCode = hashCode * 59 + this.Alias.GetHashCode(); + if (this.Required != null) + hashCode = hashCode * 59 + this.Required.GetHashCode(); + if (this.Spec != null) + hashCode = hashCode * 59 + this.Spec.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(@"^FunctionNumberInput$", 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/FunctionNumberOutput.cs b/src/PollinationSDK/Model/FunctionNumberOutput.cs new file mode 100644 index 000000000..1b4e331cc --- /dev/null +++ b/src/PollinationSDK/Model/FunctionNumberOutput.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 +{ + /// + /// Function number output. This output loads the content from a file as a floating number. + /// + [DataContract(Name = "FunctionNumberOutput")] + public partial class FunctionNumberOutput : FunctionStringOutput, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected FunctionNumberOutput() + { + // Set non-required readonly properties with defaultValue + this.Type = "FunctionNumberOutput"; + } + + /// + /// Initializes a new instance of the class. + /// + /// Output name. (required). + /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. + /// Optional description for output.. + /// Path to the output artifact relative to where the function command is executed. (required). + /// A boolean to indicate if an artifact output is required. A False value makes the artifact optional. (default to true). + public FunctionNumberOutput + ( + string name, string path, // Required parameters + Dictionary annotations= default, string description= default, bool required = true // Optional parameters + ) : base(name: name, annotations: annotations, description: description, path: path, required: required)// BaseClass + { + + // Set non-required readonly properties with defaultValue + this.Type = "FunctionNumberOutput"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "FunctionNumberOutput"; + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + return "FunctionNumberOutput"; + } + + /// + /// 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("FunctionNumberOutput:\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Annotations: ").Append(Annotations).Append("\n"); + sb.Append(" Description: ").Append(Description).Append("\n"); + sb.Append(" Path: ").Append(Path).Append("\n"); + sb.Append(" Required: ").Append(Required).Append("\n"); + return sb.ToString(); + } + + /// + /// Returns the object from JSON string + /// + /// FunctionNumberOutput object + public static FunctionNumberOutput 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. + /// + /// FunctionNumberOutput object + public virtual FunctionNumberOutput DuplicateFunctionNumberOutput() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateFunctionNumberOutput(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override FunctionStringOutput DuplicateFunctionStringOutput() + { + return DuplicateFunctionNumberOutput(); + } + + /// + /// 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 FunctionNumberOutput); + } + + /// + /// Returns true if FunctionNumberOutput instances are equal + /// + /// Instance of FunctionNumberOutput to be compared + /// Boolean + public bool Equals(FunctionNumberOutput 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(@"^FunctionNumberOutput$", 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/FunctionPathInput.cs b/src/PollinationSDK/Model/FunctionPathInput.cs new file mode 100644 index 000000000..bb3823ba0 --- /dev/null +++ b/src/PollinationSDK/Model/FunctionPathInput.cs @@ -0,0 +1,290 @@ +/* + * 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 file or a folder input. Use this input only in cases that the input can be either a file or folder. For file or folder-only inputs see File and Folder. Path is a special string input. Unlike other string inputs, a path will be copied from its location to execution folder when a workflow is executed. You can add additional validation by defining a JSONSchema specification. See http://json-schema.org/understanding-json-schema/reference/string.html#string for more information. .. code-block:: python # a file with maximum 50 characters with an ``epw`` extension. \"schema\": { \"type\": \"string\", \"maxLength\": 50, \"pattern\": \"(?i)(^.*\\.epw$)\" } + /// + [DataContract(Name = "FunctionPathInput")] + public partial class FunctionPathInput : GenericInput, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected FunctionPathInput() + { + // Set non-required readonly properties with defaultValue + this.Type = "FunctionPathInput"; + } + + /// + /// Initializes a new instance of the class. + /// + /// 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. (required). + /// The default source for file if the value is not provided.. + /// A list of aliases for this input in different platforms.. + /// A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. (default to false). + /// An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec.. + /// Optional list of extensions for file. The check for extension is case-insensitive.. + /// Input name. (required). + /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. + /// Optional description for input.. + public FunctionPathInput + ( + string name, string path, // Required parameters + Dictionary annotations= default, string description= default, AnyOf _default= default, List> alias= default, bool required = false, Object spec= default, List extensions= default // Optional parameters + ) : base(name: name, annotations: annotations, description: description)// BaseClass + { + // to ensure "path" is required (not null) + this.Path = path ?? throw new ArgumentNullException("path is a required property for FunctionPathInput and cannot be null"); + this.Default = _default; + this.Alias = alias; + this.Required = required; + this.Spec = spec; + this.Extensions = extensions; + + // Set non-required readonly properties with defaultValue + this.Type = "FunctionPathInput"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "FunctionPathInput"; + + /// + /// 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. + /// + /// 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. + [DataMember(Name = "path", IsRequired = true, EmitDefaultValue = false)] + public string Path { get; set; } + /// + /// The default source for file if the value is not provided. + /// + /// The default source for file if the value is not provided. + [DataMember(Name = "default", EmitDefaultValue = false)] + public AnyOf Default { get; set; } + /// + /// A list of aliases for this input in different platforms. + /// + /// A list of aliases for this input in different platforms. + [DataMember(Name = "alias", EmitDefaultValue = false)] + public List> Alias { get; set; } + /// + /// A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. + /// + /// A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. + [DataMember(Name = "required", EmitDefaultValue = true)] + public bool Required { get; set; } = false; + /// + /// An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec. + /// + /// An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec. + [DataMember(Name = "spec", EmitDefaultValue = false)] + public Object Spec { get; set; } + /// + /// Optional list of extensions for file. The check for extension is case-insensitive. + /// + /// Optional list of extensions for file. The check for extension is case-insensitive. + [DataMember(Name = "extensions", EmitDefaultValue = false)] + public List Extensions { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + return "FunctionPathInput"; + } + + /// + /// 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("FunctionPathInput:\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Annotations: ").Append(Annotations).Append("\n"); + sb.Append(" Description: ").Append(Description).Append("\n"); + sb.Append(" Path: ").Append(Path).Append("\n"); + sb.Append(" Default: ").Append(Default).Append("\n"); + sb.Append(" Alias: ").Append(Alias).Append("\n"); + sb.Append(" Required: ").Append(Required).Append("\n"); + sb.Append(" Spec: ").Append(Spec).Append("\n"); + sb.Append(" Extensions: ").Append(Extensions).Append("\n"); + return sb.ToString(); + } + + /// + /// Returns the object from JSON string + /// + /// FunctionPathInput object + public static FunctionPathInput 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. + /// + /// FunctionPathInput object + public virtual FunctionPathInput DuplicateFunctionPathInput() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateFunctionPathInput(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override GenericInput DuplicateGenericInput() + { + return DuplicateFunctionPathInput(); + } + + /// + /// 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 FunctionPathInput); + } + + /// + /// Returns true if FunctionPathInput instances are equal + /// + /// Instance of FunctionPathInput to be compared + /// Boolean + public bool Equals(FunctionPathInput input) + { + if (input == null) + return false; + return base.Equals(input) && + ( + this.Path == input.Path || + (this.Path != null && + this.Path.Equals(input.Path)) + ) && base.Equals(input) && + ( + this.Default == input.Default || + (this.Default != null && + this.Default.Equals(input.Default)) + ) && base.Equals(input) && + ( + this.Alias == input.Alias || + this.Alias != null && + input.Alias != null && + this.Alias.SequenceEqual(input.Alias) + ) && base.Equals(input) && + ( + this.Required == input.Required || + (this.Required != null && + this.Required.Equals(input.Required)) + ) && base.Equals(input) && + ( + this.Extensions == input.Extensions || + this.Extensions != null && + input.Extensions != null && + this.Extensions.SequenceEqual(input.Extensions) + ) && 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.Path != null) + hashCode = hashCode * 59 + this.Path.GetHashCode(); + if (this.Default != null) + hashCode = hashCode * 59 + this.Default.GetHashCode(); + if (this.Alias != null) + hashCode = hashCode * 59 + this.Alias.GetHashCode(); + if (this.Required != null) + hashCode = hashCode * 59 + this.Required.GetHashCode(); + if (this.Spec != null) + hashCode = hashCode * 59 + this.Spec.GetHashCode(); + if (this.Extensions != null) + hashCode = hashCode * 59 + this.Extensions.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(@"^FunctionPathInput$", 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/FunctionPathOutput.cs b/src/PollinationSDK/Model/FunctionPathOutput.cs new file mode 100644 index 000000000..852f71e3e --- /dev/null +++ b/src/PollinationSDK/Model/FunctionPathOutput.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 +{ + /// + /// Function Path output. + /// + [DataContract(Name = "FunctionPathOutput")] + public partial class FunctionPathOutput : PathOutput, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected FunctionPathOutput() + { + // Set non-required readonly properties with defaultValue + this.Type = "FunctionPathOutput"; + } + + /// + /// Initializes a new instance of the class. + /// + /// Output name. (required). + /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. + /// Optional description for output.. + /// Path to the output artifact relative to where the function command is executed. (required). + /// A boolean to indicate if an artifact output is required. A False value makes the artifact optional. (default to true). + public FunctionPathOutput + ( + string name, string path, // Required parameters + Dictionary annotations= default, string description= default, bool required = true // Optional parameters + ) : base(name: name, annotations: annotations, description: description, path: path, required: required)// BaseClass + { + + // Set non-required readonly properties with defaultValue + this.Type = "FunctionPathOutput"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "FunctionPathOutput"; + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + return "FunctionPathOutput"; + } + + /// + /// 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("FunctionPathOutput:\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Annotations: ").Append(Annotations).Append("\n"); + sb.Append(" Description: ").Append(Description).Append("\n"); + sb.Append(" Path: ").Append(Path).Append("\n"); + sb.Append(" Required: ").Append(Required).Append("\n"); + return sb.ToString(); + } + + /// + /// Returns the object from JSON string + /// + /// FunctionPathOutput object + public static FunctionPathOutput 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. + /// + /// FunctionPathOutput object + public virtual FunctionPathOutput DuplicateFunctionPathOutput() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateFunctionPathOutput(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override PathOutput DuplicatePathOutput() + { + return DuplicateFunctionPathOutput(); + } + + /// + /// 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 FunctionPathOutput); + } + + /// + /// Returns true if FunctionPathOutput instances are equal + /// + /// Instance of FunctionPathOutput to be compared + /// Boolean + public bool Equals(FunctionPathOutput 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(@"^FunctionPathOutput$", 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/FunctionStringInput.cs b/src/PollinationSDK/Model/FunctionStringInput.cs new file mode 100644 index 000000000..eaf3bf1fb --- /dev/null +++ b/src/PollinationSDK/Model/FunctionStringInput.cs @@ -0,0 +1,214 @@ +/* + * 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 String input. You can add additional validation by defining a JSONSchema specification. See http://json-schema.org/understanding-json-schema/reference/string.html#string for more information. .. code-block:: python \"schema\": { \"type\": \"string\", \"maxLength\": 50, \"pattern\": \"(?i)(^.*\\.epw$)\" } + /// + [DataContract(Name = "FunctionStringInput")] + public partial class FunctionStringInput : DAGStringInput, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected FunctionStringInput() + { + // Set non-required readonly properties with defaultValue + this.Type = "FunctionStringInput"; + } + + /// + /// Initializes a new instance of the class. + /// + /// Input name. (required). + /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. + /// Optional description for input.. + /// Default value for generic input.. + /// A list of aliases for this input in different platforms.. + /// A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. (default to false). + /// An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec.. + public FunctionStringInput + ( + string name, // Required parameters + Dictionary annotations= default, string description= default, string _default= default, List> alias= default, bool required = false, Object spec= default // Optional parameters + ) : base(name: name, annotations: annotations, description: description, _default: _default, alias: alias, required: required, spec: spec)// BaseClass + { + + // Set non-required readonly properties with defaultValue + this.Type = "FunctionStringInput"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "FunctionStringInput"; + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + return "FunctionStringInput"; + } + + /// + /// 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("FunctionStringInput:\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Annotations: ").Append(Annotations).Append("\n"); + sb.Append(" Description: ").Append(Description).Append("\n"); + sb.Append(" Default: ").Append(Default).Append("\n"); + sb.Append(" Alias: ").Append(Alias).Append("\n"); + sb.Append(" Required: ").Append(Required).Append("\n"); + sb.Append(" Spec: ").Append(Spec).Append("\n"); + return sb.ToString(); + } + + /// + /// Returns the object from JSON string + /// + /// FunctionStringInput object + public static FunctionStringInput 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. + /// + /// FunctionStringInput object + public virtual FunctionStringInput DuplicateFunctionStringInput() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateFunctionStringInput(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override DAGStringInput DuplicateDAGStringInput() + { + return DuplicateFunctionStringInput(); + } + + /// + /// 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 FunctionStringInput); + } + + /// + /// Returns true if FunctionStringInput instances are equal + /// + /// Instance of FunctionStringInput to be compared + /// Boolean + public bool Equals(FunctionStringInput 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(@"^FunctionStringInput$", 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/FunctionStringOutput.cs b/src/PollinationSDK/Model/FunctionStringOutput.cs new file mode 100644 index 000000000..59a9fd5eb --- /dev/null +++ b/src/PollinationSDK/Model/FunctionStringOutput.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 +{ + /// + /// Function string output. This output loads the content from a file as a string. + /// + [DataContract(Name = "FunctionStringOutput")] + public partial class FunctionStringOutput : FunctionFileOutput, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected FunctionStringOutput() + { + // Set non-required readonly properties with defaultValue + this.Type = "FunctionStringOutput"; + } + + /// + /// Initializes a new instance of the class. + /// + /// Output name. (required). + /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. + /// Optional description for output.. + /// Path to the output artifact relative to where the function command is executed. (required). + /// A boolean to indicate if an artifact output is required. A False value makes the artifact optional. (default to true). + public FunctionStringOutput + ( + string name, string path, // Required parameters + Dictionary annotations= default, string description= default, bool required = true // Optional parameters + ) : base(name: name, annotations: annotations, description: description, path: path, required: required)// BaseClass + { + + // Set non-required readonly properties with defaultValue + this.Type = "FunctionStringOutput"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "FunctionStringOutput"; + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + return "FunctionStringOutput"; + } + + /// + /// 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("FunctionStringOutput:\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Annotations: ").Append(Annotations).Append("\n"); + sb.Append(" Description: ").Append(Description).Append("\n"); + sb.Append(" Path: ").Append(Path).Append("\n"); + sb.Append(" Required: ").Append(Required).Append("\n"); + return sb.ToString(); + } + + /// + /// Returns the object from JSON string + /// + /// FunctionStringOutput object + public static FunctionStringOutput 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. + /// + /// FunctionStringOutput object + public virtual FunctionStringOutput DuplicateFunctionStringOutput() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateFunctionStringOutput(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override FunctionFileOutput DuplicateFunctionFileOutput() + { + return DuplicateFunctionStringOutput(); + } + + /// + /// 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 FunctionStringOutput); + } + + /// + /// Returns true if FunctionStringOutput instances are equal + /// + /// Instance of FunctionStringOutput to be compared + /// Boolean + public bool Equals(FunctionStringOutput 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(@"^FunctionStringOutput$", 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/GenericInput.cs b/src/PollinationSDK/Model/GenericInput.cs new file mode 100644 index 000000000..cfc9c702c --- /dev/null +++ b/src/PollinationSDK/Model/GenericInput.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 +{ + /// + /// Base class for all input types. + /// + [DataContract(Name = "GenericInput")] + public partial class GenericInput : OpenAPIGenBaseModel, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected GenericInput() + { + // Set non-required readonly properties with defaultValue + this.Type = "GenericInput"; + } + + /// + /// Initializes a new instance of the class. + /// + /// Input name. (required). + /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. + /// Optional description for input.. + public GenericInput + ( + string name, // Required parameters + Dictionary annotations= 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 GenericInput and cannot be null"); + this.Annotations = annotations; + this.Description = description; + + // Set non-required readonly properties with defaultValue + this.Type = "GenericInput"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "GenericInput"; + + /// + /// Input name. + /// + /// Input name. + [DataMember(Name = "name", IsRequired = true, EmitDefaultValue = false)] + public string Name { 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; } + /// + /// Optional description for input. + /// + /// Optional description for input. + [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 "GenericInput"; + } + + /// + /// 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("GenericInput:\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Annotations: ").Append(Annotations).Append("\n"); + sb.Append(" Description: ").Append(Description).Append("\n"); + return sb.ToString(); + } + + /// + /// Returns the object from JSON string + /// + /// GenericInput object + public static GenericInput 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. + /// + /// GenericInput object + public virtual GenericInput DuplicateGenericInput() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateGenericInput(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel DuplicateOpenAPIGenBaseModel() + { + return DuplicateGenericInput(); + } + + /// + /// 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 GenericInput); + } + + /// + /// Returns true if GenericInput instances are equal + /// + /// Instance of GenericInput to be compared + /// Boolean + public bool Equals(GenericInput 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.Type == input.Type || + (this.Type != null && + this.Type.Equals(input.Type)) + ) && base.Equals(input) && + ( + this.Annotations == input.Annotations || + this.Annotations != null && + input.Annotations != null && + this.Annotations.SequenceEqual(input.Annotations) + ) && base.Equals(input) && + ( + this.Description == input.Description || + (this.Description != null && + this.Description.Equals(input.Description)) + ); + } + + /// + /// 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.Type != null) + hashCode = hashCode * 59 + this.Type.GetHashCode(); + if (this.Annotations != null) + hashCode = hashCode * 59 + this.Annotations.GetHashCode(); + if (this.Description != null) + hashCode = hashCode * 59 + this.Description.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(@"^GenericInput$", 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/GenericOutput.cs b/src/PollinationSDK/Model/GenericOutput.cs new file mode 100644 index 000000000..b957d9dfa --- /dev/null +++ b/src/PollinationSDK/Model/GenericOutput.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 +{ + /// + /// Base class for all output types. The baseclass uses a name to source the output. + /// + [DataContract(Name = "GenericOutput")] + public partial class GenericOutput : OpenAPIGenBaseModel, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected GenericOutput() + { + // Set non-required readonly properties with defaultValue + this.Type = "GenericOutput"; + } + + /// + /// Initializes a new instance of the class. + /// + /// Output name. (required). + /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. + /// Optional description for output.. + public GenericOutput + ( + string name, // Required parameters + Dictionary annotations= 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 GenericOutput and cannot be null"); + this.Annotations = annotations; + this.Description = description; + + // Set non-required readonly properties with defaultValue + this.Type = "GenericOutput"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "GenericOutput"; + + /// + /// Output name. + /// + /// Output name. + [DataMember(Name = "name", IsRequired = true, EmitDefaultValue = false)] + public string Name { 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; } + /// + /// Optional description for output. + /// + /// Optional description for output. + [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 "GenericOutput"; + } + + /// + /// 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("GenericOutput:\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Annotations: ").Append(Annotations).Append("\n"); + sb.Append(" Description: ").Append(Description).Append("\n"); + return sb.ToString(); + } + + /// + /// Returns the object from JSON string + /// + /// GenericOutput object + public static GenericOutput 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. + /// + /// GenericOutput object + public virtual GenericOutput DuplicateGenericOutput() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateGenericOutput(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel DuplicateOpenAPIGenBaseModel() + { + return DuplicateGenericOutput(); + } + + /// + /// 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 GenericOutput); + } + + /// + /// Returns true if GenericOutput instances are equal + /// + /// Instance of GenericOutput to be compared + /// Boolean + public bool Equals(GenericOutput 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.Type == input.Type || + (this.Type != null && + this.Type.Equals(input.Type)) + ) && base.Equals(input) && + ( + this.Annotations == input.Annotations || + this.Annotations != null && + input.Annotations != null && + this.Annotations.SequenceEqual(input.Annotations) + ) && base.Equals(input) && + ( + this.Description == input.Description || + (this.Description != null && + this.Description.Equals(input.Description)) + ); + } + + /// + /// 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.Type != null) + hashCode = hashCode * 59 + this.Type.GetHashCode(); + if (this.Annotations != null) + hashCode = hashCode * 59 + this.Annotations.GetHashCode(); + if (this.Description != null) + hashCode = hashCode * 59 + this.Description.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(@"^GenericOutput$", 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/HTTP.cs b/src/PollinationSDK/Model/HTTP.cs new file mode 100644 index 000000000..d8d3a7bf5 --- /dev/null +++ b/src/PollinationSDK/Model/HTTP.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 +{ + /// + /// HTTP Source A web HTTP to an FTP server or an API for example. + /// + [DataContract(Name = "HTTP")] + public partial class HTTP : ArtifactSource, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected HTTP() + { + // Set non-required readonly properties with defaultValue + this.Type = "HTTP"; + } + + /// + /// Initializes a new instance of the class. + /// + /// For a HTTP endpoint this can be http://climate.onebuilding.org. (required). + /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. + public HTTP + ( + string url, // Required parameters + Dictionary annotations= default // Optional parameters + ) : base(annotations: annotations)// BaseClass + { + // to ensure "url" is required (not null) + this.Url = url ?? throw new ArgumentNullException("url is a required property for HTTP and cannot be null"); + + // Set non-required readonly properties with defaultValue + this.Type = "HTTP"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "HTTP"; + + /// + /// For a HTTP endpoint this can be http://climate.onebuilding.org. + /// + /// For a HTTP endpoint this can be http://climate.onebuilding.org. + [DataMember(Name = "url", IsRequired = true, EmitDefaultValue = false)] + public string Url { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + return "HTTP"; + } + + /// + /// 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("HTTP:\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Annotations: ").Append(Annotations).Append("\n"); + sb.Append(" Url: ").Append(Url).Append("\n"); + return sb.ToString(); + } + + /// + /// Returns the object from JSON string + /// + /// HTTP object + public static HTTP 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. + /// + /// HTTP object + public virtual HTTP DuplicateHTTP() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateHTTP(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override ArtifactSource DuplicateArtifactSource() + { + return DuplicateHTTP(); + } + + /// + /// 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 HTTP); + } + + /// + /// Returns true if HTTP instances are equal + /// + /// Instance of HTTP to be compared + /// Boolean + public bool Equals(HTTP input) + { + if (input == null) + return false; + return base.Equals(input) && + ( + this.Url == input.Url || + (this.Url != null && + this.Url.Equals(input.Url)) + ) && 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.Url != null) + hashCode = hashCode * 59 + this.Url.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(@"^HTTP$", 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/IOAliasHandler.cs b/src/PollinationSDK/Model/IOAliasHandler.cs new file mode 100644 index 000000000..c01b05b2d --- /dev/null +++ b/src/PollinationSDK/Model/IOAliasHandler.cs @@ -0,0 +1,274 @@ +/* + * 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 +{ + /// + /// Input and output alias handler object. + /// + [DataContract(Name = "IOAliasHandler")] + public partial class IOAliasHandler : OpenAPIGenBaseModel, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected IOAliasHandler() + { + // Set non-required readonly properties with defaultValue + this.Type = "IOAliasHandler"; + } + + /// + /// Initializes a new instance of the class. + /// + /// Declare the language (e.g. python, csharp, etc.). This option allows the recipe to be flexible on handling different programming languages. (required). + /// Target module or namespace to load the alias function. (required). + /// Name of the function. The input value will be passed to this function as the first argument. (required). + /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. + /// 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 to 0). + public IOAliasHandler + ( + string language, string module, string function, // Required parameters + Dictionary annotations= default, int index = 0// Optional parameters + ) : base()// BaseClass + { + // to ensure "language" is required (not null) + this.Language = language ?? throw new ArgumentNullException("language is a required property for IOAliasHandler and cannot be null"); + // to ensure "module" is required (not null) + this.Module = module ?? throw new ArgumentNullException("module is a required property for IOAliasHandler and cannot be null"); + // to ensure "function" is required (not null) + this.Function = function ?? throw new ArgumentNullException("function is a required property for IOAliasHandler and cannot be null"); + this.Annotations = annotations; + this.Index = index; + + // Set non-required readonly properties with defaultValue + this.Type = "IOAliasHandler"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "IOAliasHandler"; + + /// + /// Declare the language (e.g. python, csharp, etc.). This option allows the recipe to be flexible on handling different programming languages. + /// + /// Declare the language (e.g. python, csharp, etc.). This option allows the recipe to be flexible on handling different programming languages. + [DataMember(Name = "language", IsRequired = true, EmitDefaultValue = false)] + public string Language { get; set; } + /// + /// Target module or namespace to load the alias function. + /// + /// Target module or namespace to load the alias function. + [DataMember(Name = "module", IsRequired = true, EmitDefaultValue = false)] + public string Module { get; set; } + /// + /// Name of the function. The input value will be passed to this function as the first argument. + /// + /// Name of the function. The input value will be passed to this function as the first argument. + [DataMember(Name = "function", IsRequired = true, EmitDefaultValue = false)] + public string Function { 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; } + /// + /// 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. + /// + /// 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. + [DataMember(Name = "index", EmitDefaultValue = true)] + public int Index { get; set; } = 0; + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + return "IOAliasHandler"; + } + + /// + /// 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("IOAliasHandler:\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Language: ").Append(Language).Append("\n"); + sb.Append(" Module: ").Append(Module).Append("\n"); + sb.Append(" Function: ").Append(Function).Append("\n"); + sb.Append(" Annotations: ").Append(Annotations).Append("\n"); + sb.Append(" Index: ").Append(Index).Append("\n"); + return sb.ToString(); + } + + /// + /// Returns the object from JSON string + /// + /// IOAliasHandler object + public static IOAliasHandler 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. + /// + /// IOAliasHandler object + public virtual IOAliasHandler DuplicateIOAliasHandler() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateIOAliasHandler(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel DuplicateOpenAPIGenBaseModel() + { + return DuplicateIOAliasHandler(); + } + + /// + /// 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 IOAliasHandler); + } + + /// + /// Returns true if IOAliasHandler instances are equal + /// + /// Instance of IOAliasHandler to be compared + /// Boolean + public bool Equals(IOAliasHandler input) + { + if (input == null) + return false; + return base.Equals(input) && + ( + this.Language == input.Language || + (this.Language != null && + this.Language.Equals(input.Language)) + ) && base.Equals(input) && + ( + this.Module == input.Module || + (this.Module != null && + this.Module.Equals(input.Module)) + ) && base.Equals(input) && + ( + this.Function == input.Function || + (this.Function != null && + this.Function.Equals(input.Function)) + ) && base.Equals(input) && + ( + this.Type == input.Type || + (this.Type != null && + this.Type.Equals(input.Type)) + ) && base.Equals(input) && + ( + this.Annotations == input.Annotations || + this.Annotations != null && + input.Annotations != null && + this.Annotations.SequenceEqual(input.Annotations) + ) && base.Equals(input) && + ( + this.Index == input.Index || + (this.Index != null && + this.Index.Equals(input.Index)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = base.GetHashCode(); + if (this.Language != null) + hashCode = hashCode * 59 + this.Language.GetHashCode(); + if (this.Module != null) + hashCode = hashCode * 59 + this.Module.GetHashCode(); + if (this.Function != null) + hashCode = hashCode * 59 + this.Function.GetHashCode(); + if (this.Type != null) + hashCode = hashCode * 59 + this.Type.GetHashCode(); + if (this.Annotations != null) + hashCode = hashCode * 59 + this.Annotations.GetHashCode(); + if (this.Index != null) + hashCode = hashCode * 59 + this.Index.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(@"^IOAliasHandler$", 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/IOBase.cs b/src/PollinationSDK/Model/IOBase.cs new file mode 100644 index 000000000..75d08109a --- /dev/null +++ b/src/PollinationSDK/Model/IOBase.cs @@ -0,0 +1,241 @@ +/* + * 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 reusable model for classes with Input and Output (IO) objects. IOBase is the baseclass for Function, DAG and Workflow. + /// + [DataContract(Name = "IOBase")] + public partial class IOBase : OpenAPIGenBaseModel, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. + /// Place-holder. Overwrite this!. + /// Place-holder. Overwrite this!. + public IOBase + ( + // Required parameters + Dictionary annotations= default, List inputs= default, List outputs= default// Optional parameters + ) : base()// BaseClass + { + this.Annotations = annotations; + this.Inputs = inputs; + this.Outputs = outputs; + + // Set non-required readonly properties with defaultValue + this.Type = "IOBase"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "IOBase"; + + /// + /// 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; } + /// + /// Place-holder. Overwrite this! + /// + /// Place-holder. Overwrite this! + [DataMember(Name = "inputs", EmitDefaultValue = false)] + public List Inputs { get; set; } + /// + /// Place-holder. Overwrite this! + /// + /// Place-holder. Overwrite this! + [DataMember(Name = "outputs", EmitDefaultValue = false)] + public List Outputs { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + return "IOBase"; + } + + /// + /// 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("IOBase:\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Annotations: ").Append(Annotations).Append("\n"); + sb.Append(" Inputs: ").Append(Inputs).Append("\n"); + sb.Append(" Outputs: ").Append(Outputs).Append("\n"); + return sb.ToString(); + } + + /// + /// Returns the object from JSON string + /// + /// IOBase object + public static IOBase 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. + /// + /// IOBase object + public virtual IOBase DuplicateIOBase() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateIOBase(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel DuplicateOpenAPIGenBaseModel() + { + return DuplicateIOBase(); + } + + /// + /// 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 IOBase); + } + + /// + /// Returns true if IOBase instances are equal + /// + /// Instance of IOBase to be compared + /// Boolean + public bool Equals(IOBase 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.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) + ); + } + + /// + /// 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.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(); + 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(@"^IOBase$", 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/InputFileReference.cs b/src/PollinationSDK/Model/InputFileReference.cs new file mode 100644 index 000000000..40c604c8d --- /dev/null +++ b/src/PollinationSDK/Model/InputFileReference.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 +{ + /// + /// An input file reference + /// + [DataContract(Name = "InputFileReference")] + public partial class InputFileReference : InputReferenceBase, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected InputFileReference() + { + // Set non-required readonly properties with defaultValue + this.Type = "InputFileReference"; + } + + /// + /// Initializes a new instance of the class. + /// + /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. + /// The name of the DAG input variable (required). + public InputFileReference + ( + string variable, // Required parameters + Dictionary annotations= default // Optional parameters + ) : base(annotations: annotations, variable: variable)// BaseClass + { + + // Set non-required readonly properties with defaultValue + this.Type = "InputFileReference"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "InputFileReference"; + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + return "InputFileReference"; + } + + /// + /// 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("InputFileReference:\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Annotations: ").Append(Annotations).Append("\n"); + sb.Append(" Variable: ").Append(Variable).Append("\n"); + return sb.ToString(); + } + + /// + /// Returns the object from JSON string + /// + /// InputFileReference object + public static InputFileReference 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. + /// + /// InputFileReference object + public virtual InputFileReference DuplicateInputFileReference() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateInputFileReference(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override InputReferenceBase DuplicateInputReferenceBase() + { + return DuplicateInputFileReference(); + } + + /// + /// 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 InputFileReference); + } + + /// + /// Returns true if InputFileReference instances are equal + /// + /// Instance of InputFileReference to be compared + /// Boolean + public bool Equals(InputFileReference 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(@"^InputFileReference$", 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/InputFolderReference.cs b/src/PollinationSDK/Model/InputFolderReference.cs new file mode 100644 index 000000000..a57db9fdd --- /dev/null +++ b/src/PollinationSDK/Model/InputFolderReference.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 +{ + /// + /// An input folder reference + /// + [DataContract(Name = "InputFolderReference")] + public partial class InputFolderReference : InputReferenceBase, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected InputFolderReference() + { + // Set non-required readonly properties with defaultValue + this.Type = "InputFolderReference"; + } + + /// + /// Initializes a new instance of the class. + /// + /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. + /// The name of the DAG input variable (required). + public InputFolderReference + ( + string variable, // Required parameters + Dictionary annotations= default // Optional parameters + ) : base(annotations: annotations, variable: variable)// BaseClass + { + + // Set non-required readonly properties with defaultValue + this.Type = "InputFolderReference"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "InputFolderReference"; + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + return "InputFolderReference"; + } + + /// + /// 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("InputFolderReference:\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Annotations: ").Append(Annotations).Append("\n"); + sb.Append(" Variable: ").Append(Variable).Append("\n"); + return sb.ToString(); + } + + /// + /// Returns the object from JSON string + /// + /// InputFolderReference object + public static InputFolderReference 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. + /// + /// InputFolderReference object + public virtual InputFolderReference DuplicateInputFolderReference() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateInputFolderReference(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override InputReferenceBase DuplicateInputReferenceBase() + { + return DuplicateInputFolderReference(); + } + + /// + /// 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 InputFolderReference); + } + + /// + /// Returns true if InputFolderReference instances are equal + /// + /// Instance of InputFolderReference to be compared + /// Boolean + public bool Equals(InputFolderReference 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(@"^InputFolderReference$", 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/InputPathReference.cs b/src/PollinationSDK/Model/InputPathReference.cs new file mode 100644 index 000000000..6e1872afb --- /dev/null +++ b/src/PollinationSDK/Model/InputPathReference.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 +{ + /// + /// An input file or folder reference + /// + [DataContract(Name = "InputPathReference")] + public partial class InputPathReference : InputReferenceBase, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected InputPathReference() + { + // Set non-required readonly properties with defaultValue + this.Type = "InputPathReference"; + } + + /// + /// Initializes a new instance of the class. + /// + /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. + /// The name of the DAG input variable (required). + public InputPathReference + ( + string variable, // Required parameters + Dictionary annotations= default // Optional parameters + ) : base(annotations: annotations, variable: variable)// BaseClass + { + + // Set non-required readonly properties with defaultValue + this.Type = "InputPathReference"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "InputPathReference"; + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + return "InputPathReference"; + } + + /// + /// 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("InputPathReference:\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Annotations: ").Append(Annotations).Append("\n"); + sb.Append(" Variable: ").Append(Variable).Append("\n"); + return sb.ToString(); + } + + /// + /// Returns the object from JSON string + /// + /// InputPathReference object + public static InputPathReference 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. + /// + /// InputPathReference object + public virtual InputPathReference DuplicateInputPathReference() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateInputPathReference(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override InputReferenceBase DuplicateInputReferenceBase() + { + return DuplicateInputPathReference(); + } + + /// + /// 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 InputPathReference); + } + + /// + /// Returns true if InputPathReference instances are equal + /// + /// Instance of InputPathReference to be compared + /// Boolean + public bool Equals(InputPathReference 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(@"^InputPathReference$", 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/InputReference.cs b/src/PollinationSDK/Model/InputReference.cs new file mode 100644 index 000000000..55252fe1b --- /dev/null +++ b/src/PollinationSDK/Model/InputReference.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 +{ + /// + /// An input parameter reference which is not a file or a folder. For a file or a folder use InputFileReference, InputFolderReference or InputPathReference instead. + /// + [DataContract(Name = "InputReference")] + public partial class InputReference : InputReferenceBase, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected InputReference() + { + // Set non-required readonly properties with defaultValue + this.Type = "InputReference"; + } + + /// + /// Initializes a new instance of the class. + /// + /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. + /// The name of the DAG input variable (required). + public InputReference + ( + string variable, // Required parameters + Dictionary annotations= default // Optional parameters + ) : base(annotations: annotations, variable: variable)// BaseClass + { + + // Set non-required readonly properties with defaultValue + this.Type = "InputReference"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "InputReference"; + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + return "InputReference"; + } + + /// + /// 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("InputReference:\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Annotations: ").Append(Annotations).Append("\n"); + sb.Append(" Variable: ").Append(Variable).Append("\n"); + return sb.ToString(); + } + + /// + /// Returns the object from JSON string + /// + /// InputReference object + public static InputReference 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. + /// + /// InputReference object + public virtual InputReference DuplicateInputReference() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateInputReference(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override InputReferenceBase DuplicateInputReferenceBase() + { + return DuplicateInputReference(); + } + + /// + /// 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 InputReference); + } + + /// + /// Returns true if InputReference instances are equal + /// + /// Instance of InputReference to be compared + /// Boolean + public bool Equals(InputReference 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(@"^InputReference$", 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/InputReferenceBase.cs b/src/PollinationSDK/Model/InputReferenceBase.cs new file mode 100644 index 000000000..5f7492864 --- /dev/null +++ b/src/PollinationSDK/Model/InputReferenceBase.cs @@ -0,0 +1,219 @@ +/* + * 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 input reference. + /// + [DataContract(Name = "_InputReferenceBase")] + public partial class InputReferenceBase : BaseReference, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected InputReferenceBase() + { + // Set non-required readonly properties with defaultValue + this.Type = "_InputReferenceBase"; + } + + /// + /// Initializes a new instance of the class. + /// + /// The name of the DAG input variable (required). + /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. + public InputReferenceBase + ( + string variable, // Required parameters + Dictionary annotations= default // Optional parameters + ) : base(annotations: annotations)// BaseClass + { + // to ensure "variable" is required (not null) + this.Variable = variable ?? throw new ArgumentNullException("variable is a required property for InputReferenceBase and cannot be null"); + + // Set non-required readonly properties with defaultValue + this.Type = "_InputReferenceBase"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "_InputReferenceBase"; + + /// + /// The name of the DAG input variable + /// + /// The name of the DAG input variable + [DataMember(Name = "variable", IsRequired = true, EmitDefaultValue = false)] + public string Variable { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + return "InputReferenceBase"; + } + + /// + /// 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("InputReferenceBase:\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Annotations: ").Append(Annotations).Append("\n"); + sb.Append(" Variable: ").Append(Variable).Append("\n"); + return sb.ToString(); + } + + /// + /// Returns the object from JSON string + /// + /// InputReferenceBase object + public static InputReferenceBase 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. + /// + /// InputReferenceBase object + public virtual InputReferenceBase DuplicateInputReferenceBase() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateInputReferenceBase(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override BaseReference DuplicateBaseReference() + { + return DuplicateInputReferenceBase(); + } + + /// + /// 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 InputReferenceBase); + } + + /// + /// Returns true if InputReferenceBase instances are equal + /// + /// Instance of InputReferenceBase to be compared + /// Boolean + public bool Equals(InputReferenceBase input) + { + if (input == null) + return false; + return base.Equals(input) && + ( + this.Variable == input.Variable || + (this.Variable != null && + this.Variable.Equals(input.Variable)) + ) && 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.Variable != null) + hashCode = hashCode * 59 + this.Variable.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(@"^_InputReferenceBase$", 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/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/ItemReference.cs b/src/PollinationSDK/Model/ItemReference.cs new file mode 100644 index 000000000..d78af44a2 --- /dev/null +++ b/src/PollinationSDK/Model/ItemReference.cs @@ -0,0 +1,198 @@ +/* + * 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 Item Reference. + /// + [DataContract(Name = "ItemReference")] + public partial class ItemReference : BaseReference, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// The name of the looped item variable (use dot notation for nested json values). + /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. + public ItemReference + ( + // Required parameters + Dictionary annotations= default, string variable= default // Optional parameters + ) : base(annotations: annotations)// BaseClass + { + this.Variable = variable; + + // Set non-required readonly properties with defaultValue + this.Type = "ItemReference"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "ItemReference"; + + /// + /// The name of the looped item variable (use dot notation for nested json values) + /// + /// The name of the looped item variable (use dot notation for nested json values) + [DataMember(Name = "variable", EmitDefaultValue = false)] + public string Variable { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + return "ItemReference"; + } + + /// + /// 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("ItemReference:\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Annotations: ").Append(Annotations).Append("\n"); + sb.Append(" Variable: ").Append(Variable).Append("\n"); + return sb.ToString(); + } + + /// + /// Returns the object from JSON string + /// + /// ItemReference object + public static ItemReference 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. + /// + /// ItemReference object + public virtual ItemReference DuplicateItemReference() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateItemReference(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override BaseReference DuplicateBaseReference() + { + return DuplicateItemReference(); + } + + /// + /// 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 ItemReference); + } + + /// + /// Returns true if ItemReference instances are equal + /// + /// Instance of ItemReference to be compared + /// Boolean + public bool Equals(ItemReference input) + { + if (input == null) + return false; + return base.Equals(input) && + ( + this.Variable == input.Variable || + (this.Variable != null && + this.Variable.Equals(input.Variable)) + ) && 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.Variable != null) + hashCode = hashCode * 59 + this.Variable.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(@"^ItemReference$", 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/ItemType.cs b/src/PollinationSDK/Model/ItemType.cs new file mode 100644 index 000000000..f8fb7f504 --- /dev/null +++ b/src/PollinationSDK/Model/ItemType.cs @@ -0,0 +1,79 @@ +/* + * 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 +{ + /// + /// Type enum for items in a list. Items can not be files or folder. For a list of files you should copy them to a folder and use FolderInput input instead of using ArrayInput. + /// + /// Type enum for items in a list. Items can not be files or folder. For a list of files you should copy them to a folder and use FolderInput input instead of using ArrayInput. + + [JsonConverter(typeof(StringEnumConverter))] + + public enum ItemType + { + /// + /// Enum Generic for value: Generic + /// + [EnumMember(Value = "Generic")] + Generic = 1, + + /// + /// Enum String for value: String + /// + [EnumMember(Value = "String")] + String = 2, + + /// + /// Enum Integer for value: Integer + /// + [EnumMember(Value = "Integer")] + Integer = 3, + + /// + /// Enum Number for value: Number + /// + [EnumMember(Value = "Number")] + Number = 4, + + /// + /// Enum Boolean for value: Boolean + /// + [EnumMember(Value = "Boolean")] + Boolean = 5, + + /// + /// Enum Array for value: Array + /// + [EnumMember(Value = "Array")] + Array = 6, + + /// + /// Enum JSONObject for value: JSONObject + /// + [EnumMember(Value = "JSONObject")] + JSONObject = 7 + + } + +} diff --git a/src/PollinationSDK/Model/Job.cs b/src/PollinationSDK/Model/Job.cs new file mode 100644 index 000000000..3c06fbd3e --- /dev/null +++ b/src/PollinationSDK/Model/Job.cs @@ -0,0 +1,315 @@ +/* + * 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 +{ + /// + /// Queenbee Job. A Job is an object to submit a list of arguments to execute a Queenbee recipe. + /// + [DataContract(Name = "Job")] + public partial class Job : OpenAPIGenBaseModel, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected Job() + { + // Set non-required readonly properties with defaultValue + this.Type = "Job"; + this.ApiVersion = "v1beta1"; + } + + /// + /// Initializes a new instance of the class. + /// + /// The source url for downloading the recipe. (required). + /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. + /// Input arguments for this job.. + /// An optional name for this job. This name will be used a the display name for the run.. + /// Run 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.. + public Job + ( + string source, // Required parameters + Dictionary annotations= default, List>> arguments= default, string name= default, string description= default, Dictionary labels= default// Optional parameters + ) : base()// BaseClass + { + // to ensure "source" is required (not null) + this.Source = source ?? throw new ArgumentNullException("source is a required property for Job and cannot be null"); + this.Annotations = annotations; + this.Arguments = arguments; + this.Name = name; + this.Description = description; + this.Labels = labels; + + // Set non-required readonly properties with defaultValue + this.Type = "Job"; + this.ApiVersion = "v1beta1"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "Job"; + //============================================== is ReadOnly + /// + /// Gets or Sets ApiVersion + /// + [DataMember(Name = "api_version", EmitDefaultValue = true)] + public string ApiVersion { get; protected internal set; } = "v1beta1"; + + /// + /// The source url for downloading the recipe. + /// + /// The source url for downloading the recipe. + [DataMember(Name = "source", IsRequired = true, EmitDefaultValue = false)] + public string Source { 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 job. + /// + /// Input arguments for this job. + [DataMember(Name = "arguments", EmitDefaultValue = false)] + public List>> Arguments { get; set; } + /// + /// An optional name for this job. This name will be used a the display name for the run. + /// + /// An optional name for this job. This name will be used a the display name for the run. + [DataMember(Name = "name", EmitDefaultValue = false)] + public string Name { get; set; } + /// + /// Run description. + /// + /// Run description. + [DataMember(Name = "description", EmitDefaultValue = false)] + public string Description { get; set; } + /// + /// Optional user data as a dictionary. User data is for user reference only and will not be used in the execution of the job. + /// + /// Optional user data as a dictionary. User data is for user reference only and will not be used in the execution of the job. + [DataMember(Name = "labels", EmitDefaultValue = false)] + public Dictionary Labels { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + return "Job"; + } + + /// + /// 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("Job:\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Source: ").Append(Source).Append("\n"); + sb.Append(" Annotations: ").Append(Annotations).Append("\n"); + sb.Append(" ApiVersion: ").Append(ApiVersion).Append("\n"); + sb.Append(" Arguments: ").Append(Arguments).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Description: ").Append(Description).Append("\n"); + sb.Append(" Labels: ").Append(Labels).Append("\n"); + return sb.ToString(); + } + + /// + /// Returns the object from JSON string + /// + /// Job object + public static Job 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. + /// + /// Job object + public virtual Job DuplicateJob() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateJob(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel DuplicateOpenAPIGenBaseModel() + { + return DuplicateJob(); + } + + /// + /// 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 Job); + } + + /// + /// Returns true if Job instances are equal + /// + /// Instance of Job to be compared + /// Boolean + public bool Equals(Job input) + { + if (input == null) + return false; + return base.Equals(input) && + ( + this.Source == input.Source || + (this.Source != null && + this.Source.Equals(input.Source)) + ) && base.Equals(input) && + ( + this.Type == input.Type || + (this.Type != null && + this.Type.Equals(input.Type)) + ) && 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.Arguments == input.Arguments || + this.Arguments != null && + input.Arguments != null && + this.Arguments.SequenceEqual(input.Arguments) + ) && 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.Labels == input.Labels || + this.Labels != null && + input.Labels != null && + this.Labels.SequenceEqual(input.Labels) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = base.GetHashCode(); + if (this.Source != null) + hashCode = hashCode * 59 + this.Source.GetHashCode(); + if (this.Type != null) + hashCode = hashCode * 59 + this.Type.GetHashCode(); + if (this.Annotations != null) + hashCode = hashCode * 59 + this.Annotations.GetHashCode(); + if (this.ApiVersion != null) + hashCode = hashCode * 59 + this.ApiVersion.GetHashCode(); + if (this.Arguments != null) + hashCode = hashCode * 59 + this.Arguments.GetHashCode(); + if (this.Name != null) + hashCode = hashCode * 59 + this.Name.GetHashCode(); + if (this.Description != null) + hashCode = hashCode * 59 + this.Description.GetHashCode(); + if (this.Labels != null) + hashCode = hashCode * 59 + this.Labels.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(@"^Job$", 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" }); + } + + + + // 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" }); + } + + yield break; + } + } +} diff --git a/src/PollinationSDK/Model/JobArgument.cs b/src/PollinationSDK/Model/JobArgument.cs new file mode 100644 index 000000000..b85a47fb5 --- /dev/null +++ b/src/PollinationSDK/Model/JobArgument.cs @@ -0,0 +1,241 @@ +/* + * 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 +{ + /// + /// Job argument is an argument input for arguments which are not files or folders. + /// + [DataContract(Name = "JobArgument")] + public partial class JobArgument : OpenAPIGenBaseModel, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected JobArgument() + { + // Set non-required readonly properties with defaultValue + this.Type = "JobArgument"; + } + + /// + /// Initializes a new instance of the class. + /// + /// Argument name. The name must match one of the input names from Job's DAG template. (required). + /// The value of the job argument. (required). + /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. + public JobArgument + ( + string name, object value, // Required parameters + Dictionary annotations= default// Optional parameters + ) : base()// BaseClass + { + // to ensure "name" is required (not null) + this.Name = name ?? throw new ArgumentNullException("name is a required property for JobArgument and cannot be null"); + // to ensure "value" is required (not null) + this.Value = value ?? throw new ArgumentNullException("value is a required property for JobArgument and cannot be null"); + this.Annotations = annotations; + + // Set non-required readonly properties with defaultValue + this.Type = "JobArgument"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "JobArgument"; + + /// + /// Argument name. The name must match one of the input names from Job's DAG template. + /// + /// Argument name. The name must match one of the input names from Job's DAG template. + [DataMember(Name = "name", IsRequired = true, EmitDefaultValue = false)] + public string Name { get; set; } + /// + /// The value of the job argument. + /// + /// The value of the job argument. + [DataMember(Name = "value", IsRequired = true, EmitDefaultValue = true)] + public object Value { 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; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + return "JobArgument"; + } + + /// + /// 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("JobArgument:\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Value: ").Append(Value).Append("\n"); + sb.Append(" Annotations: ").Append(Annotations).Append("\n"); + return sb.ToString(); + } + + /// + /// Returns the object from JSON string + /// + /// JobArgument object + public static JobArgument 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. + /// + /// JobArgument object + public virtual JobArgument DuplicateJobArgument() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateJobArgument(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel DuplicateOpenAPIGenBaseModel() + { + return DuplicateJobArgument(); + } + + /// + /// 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 JobArgument); + } + + /// + /// Returns true if JobArgument instances are equal + /// + /// Instance of JobArgument to be compared + /// Boolean + public bool Equals(JobArgument 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.Value == input.Value || + (this.Value != null && + this.Value.Equals(input.Value)) + ) && base.Equals(input) && + ( + this.Type == input.Type || + (this.Type != null && + this.Type.Equals(input.Type)) + ) && base.Equals(input) && + ( + this.Annotations == input.Annotations || + this.Annotations != null && + input.Annotations != null && + this.Annotations.SequenceEqual(input.Annotations) + ); + } + + /// + /// 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.Value != null) + hashCode = hashCode * 59 + this.Value.GetHashCode(); + if (this.Type != null) + hashCode = hashCode * 59 + this.Type.GetHashCode(); + if (this.Annotations != null) + hashCode = hashCode * 59 + this.Annotations.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(@"^JobArgument$", 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/JobPathArgument.cs b/src/PollinationSDK/Model/JobPathArgument.cs new file mode 100644 index 000000000..ee39415f9 --- /dev/null +++ b/src/PollinationSDK/Model/JobPathArgument.cs @@ -0,0 +1,241 @@ +/* + * 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 +{ + /// + /// BaseModel with functionality to return the object as a yaml string. + /// + [DataContract(Name = "JobPathArgument")] + public partial class JobPathArgument : OpenAPIGenBaseModel, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected JobPathArgument() + { + // Set non-required readonly properties with defaultValue + this.Type = "JobPathArgument"; + } + + /// + /// Initializes a new instance of the class. + /// + /// Argument name. The name must match one of the input names from Job's template which can be a function or DAG. (required). + /// The path to source the file from. (required). + /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. + public JobPathArgument + ( + string name, AnyOf source, // Required parameters + Dictionary annotations= default// Optional parameters + ) : base()// BaseClass + { + // to ensure "name" is required (not null) + this.Name = name ?? throw new ArgumentNullException("name is a required property for JobPathArgument and cannot be null"); + // to ensure "source" is required (not null) + this.Source = source ?? throw new ArgumentNullException("source is a required property for JobPathArgument and cannot be null"); + this.Annotations = annotations; + + // Set non-required readonly properties with defaultValue + this.Type = "JobPathArgument"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "JobPathArgument"; + + /// + /// Argument name. The name must match one of the input names from Job's template which can be a function or DAG. + /// + /// Argument name. The name must match one of the input names from Job's template which can be a function or DAG. + [DataMember(Name = "name", IsRequired = true, EmitDefaultValue = false)] + public string Name { get; set; } + /// + /// The path to source the file from. + /// + /// The path to source the file from. + [DataMember(Name = "source", IsRequired = true, EmitDefaultValue = false)] + public AnyOf Source { 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; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + return "JobPathArgument"; + } + + /// + /// 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("JobPathArgument:\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Source: ").Append(Source).Append("\n"); + sb.Append(" Annotations: ").Append(Annotations).Append("\n"); + return sb.ToString(); + } + + /// + /// Returns the object from JSON string + /// + /// JobPathArgument object + public static JobPathArgument 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. + /// + /// JobPathArgument object + public virtual JobPathArgument DuplicateJobPathArgument() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateJobPathArgument(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel DuplicateOpenAPIGenBaseModel() + { + return DuplicateJobPathArgument(); + } + + /// + /// 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 JobPathArgument); + } + + /// + /// Returns true if JobPathArgument instances are equal + /// + /// Instance of JobPathArgument to be compared + /// Boolean + public bool Equals(JobPathArgument 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.Source == input.Source || + (this.Source != null && + this.Source.Equals(input.Source)) + ) && base.Equals(input) && + ( + this.Type == input.Type || + (this.Type != null && + this.Type.Equals(input.Type)) + ) && base.Equals(input) && + ( + this.Annotations == input.Annotations || + this.Annotations != null && + input.Annotations != null && + this.Annotations.SequenceEqual(input.Annotations) + ); + } + + /// + /// 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.Source != null) + hashCode = hashCode * 59 + this.Source.GetHashCode(); + if (this.Type != null) + hashCode = hashCode * 59 + this.Type.GetHashCode(); + if (this.Annotations != null) + hashCode = hashCode * 59 + this.Annotations.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(@"^JobPathArgument$", 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/JobStatus.cs b/src/PollinationSDK/Model/JobStatus.cs new file mode 100644 index 000000000..6daefa024 --- /dev/null +++ b/src/PollinationSDK/Model/JobStatus.cs @@ -0,0 +1,409 @@ +/* + * 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 +{ + /// + /// Parametric Job Status. + /// + [DataContract(Name = "JobStatus")] + public partial class JobStatus : OpenAPIGenBaseModel, IEquatable, IValidatableObject + { + /// + /// The status of this job. + /// + /// The status of this job. + [DataMember(Name="status", EmitDefaultValue=false)] + public JobStatusEnum Status { get; set; } = JobStatusEnum.Unknown; + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected JobStatus() + { + // Set non-required readonly properties with defaultValue + this.Type = "JobStatus"; + this.ApiVersion = "v1beta1"; + } + + /// + /// Initializes a new instance of the class. + /// + /// The ID of the individual job. (required). + /// The time at which the job was started (required). + /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. + /// The status of this job.. + /// Any message produced by the job. Usually error/debugging hints.. + /// The time at which the task was completed. + /// Source url for the status object. It can be a recipe or a function.. + /// The count of runs that are pending (default to 0). + /// The count of runs that are running (default to 0). + /// The count of runs that have completed (default to 0). + /// The count of runs that have failed (default to 0). + /// The count of runs that have been cancelled (default to 0). + public JobStatus + ( + string id, DateTime startedAt, // Required parameters + Dictionary annotations= default, JobStatusEnum status= JobStatusEnum.Unknown, string message= default, DateTime finishedAt= default, string source= default, int runsPending = 0, int runsRunning = 0, int runsCompleted = 0, int runsFailed = 0, int runsCancelled = 0// Optional parameters + ) : base()// BaseClass + { + // to ensure "id" is required (not null) + this.Id = id ?? throw new ArgumentNullException("id is a required property for JobStatus and cannot be null"); + this.StartedAt = startedAt; + this.Annotations = annotations; + this.Status = status; + this.Message = message; + this.FinishedAt = finishedAt; + this.Source = source; + this.RunsPending = runsPending; + this.RunsRunning = runsRunning; + this.RunsCompleted = runsCompleted; + this.RunsFailed = runsFailed; + this.RunsCancelled = runsCancelled; + + // Set non-required readonly properties with defaultValue + this.Type = "JobStatus"; + this.ApiVersion = "v1beta1"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "JobStatus"; + //============================================== is ReadOnly + /// + /// Gets or Sets ApiVersion + /// + [DataMember(Name = "api_version", EmitDefaultValue = true)] + public string ApiVersion { get; protected internal set; } = "v1beta1"; + + /// + /// The ID of the individual job. + /// + /// The ID of the individual job. + [DataMember(Name = "id", IsRequired = true, EmitDefaultValue = false)] + public string Id { get; set; } + /// + /// The time at which the job was started + /// + /// The time at which the job was started + [DataMember(Name = "started_at", IsRequired = true, EmitDefaultValue = false)] + public DateTime StartedAt { 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; } + /// + /// Any message produced by the job. Usually error/debugging hints. + /// + /// Any message produced by the job. Usually error/debugging hints. + [DataMember(Name = "message", EmitDefaultValue = false)] + public string Message { get; set; } + /// + /// The time at which the task was completed + /// + /// The time at which the task was completed + [DataMember(Name = "finished_at", EmitDefaultValue = false)] + public DateTime FinishedAt { get; set; } + /// + /// Source url for the status object. It can be a recipe or a function. + /// + /// Source url for the status object. It can be a recipe or a function. + [DataMember(Name = "source", EmitDefaultValue = false)] + public string Source { get; set; } + /// + /// The count of runs that are pending + /// + /// The count of runs that are pending + [DataMember(Name = "runs_pending", EmitDefaultValue = true)] + public int RunsPending { get; set; } = 0; + /// + /// The count of runs that are running + /// + /// The count of runs that are running + [DataMember(Name = "runs_running", EmitDefaultValue = true)] + public int RunsRunning { get; set; } = 0; + /// + /// The count of runs that have completed + /// + /// The count of runs that have completed + [DataMember(Name = "runs_completed", EmitDefaultValue = true)] + public int RunsCompleted { get; set; } = 0; + /// + /// The count of runs that have failed + /// + /// The count of runs that have failed + [DataMember(Name = "runs_failed", EmitDefaultValue = true)] + public int RunsFailed { get; set; } = 0; + /// + /// The count of runs that have been cancelled + /// + /// The count of runs that have been cancelled + [DataMember(Name = "runs_cancelled", EmitDefaultValue = true)] + public int RunsCancelled { get; set; } = 0; + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + return "JobStatus"; + } + + /// + /// 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("JobStatus:\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Id: ").Append(Id).Append("\n"); + sb.Append(" StartedAt: ").Append(StartedAt).Append("\n"); + sb.Append(" Annotations: ").Append(Annotations).Append("\n"); + sb.Append(" ApiVersion: ").Append(ApiVersion).Append("\n"); + sb.Append(" Status: ").Append(Status).Append("\n"); + sb.Append(" Message: ").Append(Message).Append("\n"); + sb.Append(" FinishedAt: ").Append(FinishedAt).Append("\n"); + sb.Append(" Source: ").Append(Source).Append("\n"); + sb.Append(" RunsPending: ").Append(RunsPending).Append("\n"); + sb.Append(" RunsRunning: ").Append(RunsRunning).Append("\n"); + sb.Append(" RunsCompleted: ").Append(RunsCompleted).Append("\n"); + sb.Append(" RunsFailed: ").Append(RunsFailed).Append("\n"); + sb.Append(" RunsCancelled: ").Append(RunsCancelled).Append("\n"); + return sb.ToString(); + } + + /// + /// Returns the object from JSON string + /// + /// JobStatus object + public static JobStatus 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. + /// + /// JobStatus object + public virtual JobStatus DuplicateJobStatus() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateJobStatus(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel DuplicateOpenAPIGenBaseModel() + { + return DuplicateJobStatus(); + } + + /// + /// 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 JobStatus); + } + + /// + /// Returns true if JobStatus instances are equal + /// + /// Instance of JobStatus to be compared + /// Boolean + public bool Equals(JobStatus 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.StartedAt == input.StartedAt || + (this.StartedAt != null && + this.StartedAt.Equals(input.StartedAt)) + ) && base.Equals(input) && + ( + this.Type == input.Type || + (this.Type != null && + this.Type.Equals(input.Type)) + ) && 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.Status == input.Status || + (this.Status != null && + this.Status.Equals(input.Status)) + ) && base.Equals(input) && + ( + this.Message == input.Message || + (this.Message != null && + this.Message.Equals(input.Message)) + ) && base.Equals(input) && + ( + this.FinishedAt == input.FinishedAt || + (this.FinishedAt != null && + this.FinishedAt.Equals(input.FinishedAt)) + ) && base.Equals(input) && + ( + this.Source == input.Source || + (this.Source != null && + this.Source.Equals(input.Source)) + ) && base.Equals(input) && + ( + this.RunsPending == input.RunsPending || + (this.RunsPending != null && + this.RunsPending.Equals(input.RunsPending)) + ) && base.Equals(input) && + ( + this.RunsRunning == input.RunsRunning || + (this.RunsRunning != null && + this.RunsRunning.Equals(input.RunsRunning)) + ) && base.Equals(input) && + ( + this.RunsCompleted == input.RunsCompleted || + (this.RunsCompleted != null && + this.RunsCompleted.Equals(input.RunsCompleted)) + ) && base.Equals(input) && + ( + this.RunsFailed == input.RunsFailed || + (this.RunsFailed != null && + this.RunsFailed.Equals(input.RunsFailed)) + ) && base.Equals(input) && + ( + this.RunsCancelled == input.RunsCancelled || + (this.RunsCancelled != null && + this.RunsCancelled.Equals(input.RunsCancelled)) + ); + } + + /// + /// 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.StartedAt != null) + hashCode = hashCode * 59 + this.StartedAt.GetHashCode(); + if (this.Type != null) + hashCode = hashCode * 59 + this.Type.GetHashCode(); + if (this.Annotations != null) + hashCode = hashCode * 59 + this.Annotations.GetHashCode(); + if (this.ApiVersion != null) + hashCode = hashCode * 59 + this.ApiVersion.GetHashCode(); + if (this.Status != null) + hashCode = hashCode * 59 + this.Status.GetHashCode(); + if (this.Message != null) + hashCode = hashCode * 59 + this.Message.GetHashCode(); + if (this.FinishedAt != null) + hashCode = hashCode * 59 + this.FinishedAt.GetHashCode(); + if (this.Source != null) + hashCode = hashCode * 59 + this.Source.GetHashCode(); + if (this.RunsPending != null) + hashCode = hashCode * 59 + this.RunsPending.GetHashCode(); + if (this.RunsRunning != null) + hashCode = hashCode * 59 + this.RunsRunning.GetHashCode(); + if (this.RunsCompleted != null) + hashCode = hashCode * 59 + this.RunsCompleted.GetHashCode(); + if (this.RunsFailed != null) + hashCode = hashCode * 59 + this.RunsFailed.GetHashCode(); + if (this.RunsCancelled != null) + hashCode = hashCode * 59 + this.RunsCancelled.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(@"^JobStatus$", 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" }); + } + + + + // 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" }); + } + + yield break; + } + } +} diff --git a/src/PollinationSDK/Model/JobStatusEnum.cs b/src/PollinationSDK/Model/JobStatusEnum.cs new file mode 100644 index 000000000..fa97a13b1 --- /dev/null +++ b/src/PollinationSDK/Model/JobStatusEnum.cs @@ -0,0 +1,79 @@ +/* + * 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 +{ + /// + /// Enumaration of allowable status strings + /// + /// Enumaration of allowable status strings + + [JsonConverter(typeof(StringEnumConverter))] + + public enum JobStatusEnum + { + /// + /// Enum Created for value: Created + /// + [EnumMember(Value = "Created")] + Created = 1, + + /// + /// Enum PreProcessing for value: Pre-Processing + /// + [EnumMember(Value = "Pre-Processing")] + PreProcessing = 2, + + /// + /// Enum Running for value: Running + /// + [EnumMember(Value = "Running")] + Running = 3, + + /// + /// Enum Failed for value: Failed + /// + [EnumMember(Value = "Failed")] + Failed = 4, + + /// + /// Enum Cancelled for value: Cancelled + /// + [EnumMember(Value = "Cancelled")] + Cancelled = 5, + + /// + /// Enum Completed for value: Completed + /// + [EnumMember(Value = "Completed")] + Completed = 6, + + /// + /// Enum Unknown for value: Unknown + /// + [EnumMember(Value = "Unknown")] + Unknown = 7 + + } + +} diff --git a/src/PollinationSDK/Model/KeyRequest.cs b/src/PollinationSDK/Model/KeyRequest.cs new file mode 100644 index 000000000..544339aea --- /dev/null +++ b/src/PollinationSDK/Model/KeyRequest.cs @@ -0,0 +1,206 @@ +/* + * 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 +{ + /// + /// KeyRequest + /// + [DataContract(Name = "KeyRequest")] + public partial class KeyRequest : OpenAPIGenBaseModel, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected KeyRequest() + { + // Set non-required readonly properties with defaultValue + this.Type = "KeyRequest"; + } + + /// + /// Initializes a new instance of the class. + /// + /// key (required). + public KeyRequest + ( + string key// Required parameters + // Optional parameters + ) : base()// BaseClass + { + // to ensure "key" is required (not null) + this.Key = key ?? throw new ArgumentNullException("key is a required property for KeyRequest and cannot be null"); + + // Set non-required readonly properties with defaultValue + this.Type = "KeyRequest"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "KeyRequest"; + + /// + /// Gets or Sets Key + /// + [DataMember(Name = "key", IsRequired = true, EmitDefaultValue = false)] + public string Key { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + return "KeyRequest"; + } + + /// + /// 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("KeyRequest:\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Key: ").Append(Key).Append("\n"); + return sb.ToString(); + } + + /// + /// Returns the object from JSON string + /// + /// KeyRequest object + public static KeyRequest 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. + /// + /// KeyRequest object + public virtual KeyRequest DuplicateKeyRequest() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateKeyRequest(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel DuplicateOpenAPIGenBaseModel() + { + return DuplicateKeyRequest(); + } + + /// + /// 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 KeyRequest); + } + + /// + /// Returns true if KeyRequest instances are equal + /// + /// Instance of KeyRequest to be compared + /// Boolean + public bool Equals(KeyRequest 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.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.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(@"^KeyRequest$", 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 new file mode 100644 index 000000000..0688c2359 --- /dev/null +++ b/src/PollinationSDK/Model/License.cs @@ -0,0 +1,262 @@ +/* + * 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 +{ + /// + /// License information for the Package + /// + [DataContract(Name = "License")] + public partial class License : OpenAPIGenBaseModel, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected License() + { + // Set non-required readonly properties with defaultValue + this.Type = "License"; + } + + /// + /// Initializes a new instance of the class. + /// + /// 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 License + ( + string name, // Required parameters + Dictionary annotations= default, string url= default// Optional parameters + ) : base()// BaseClass + { + // to ensure "name" is required (not null) + this.Name = name ?? throw new ArgumentNullException("name is a required property for License and cannot be null"); + this.Annotations = annotations; + this.Url = url; + + // Set non-required readonly properties with defaultValue + this.Type = "License"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "License"; + + /// + /// The license name used for the package. + /// + /// The license name used for the package. + [DataMember(Name = "name", IsRequired = true, EmitDefaultValue = false)] + public string Name { 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; } + /// + /// A URL to the license used for the package. + /// + /// A URL to the license used for the package. + [DataMember(Name = "url", EmitDefaultValue = false)] + public string Url { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + return "License"; + } + + /// + /// 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("License:\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"); + return sb.ToString(); + } + + /// + /// Returns the object from JSON string + /// + /// License object + public static License 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. + /// + /// License object + public virtual License DuplicateLicense() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateLicense(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel DuplicateOpenAPIGenBaseModel() + { + return DuplicateLicense(); + } + + /// + /// 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 License); + } + + /// + /// Returns true if License instances are equal + /// + /// Instance of License to be compared + /// Boolean + public bool Equals(License 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.Type == input.Type || + (this.Type != null && + this.Type.Equals(input.Type)) + ) && base.Equals(input) && + ( + this.Annotations == input.Annotations || + this.Annotations != null && + input.Annotations != null && + this.Annotations.SequenceEqual(input.Annotations) + ) && base.Equals(input) && + ( + this.Url == input.Url || + (this.Url != null && + this.Url.Equals(input.Url)) + ); + } + + /// + /// 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.Type != null) + hashCode = hashCode * 59 + this.Type.GetHashCode(); + if (this.Annotations != null) + hashCode = hashCode * 59 + this.Annotations.GetHashCode(); + if (this.Url != null) + hashCode = hashCode * 59 + this.Url.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(@"^License$", 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" }); + } + + // Url (string) maxLength + if(this.Url != null && this.Url.Length > 65536) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Url, length must be less than 65536.", new [] { "Url" }); + } + + // Url (string) minLength + if(this.Url != null && this.Url.Length < 1) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Url, length must be greater than 1.", new [] { "Url" }); + } + + yield break; + } + } +} 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/ListResponseMeta.cs b/src/PollinationSDK/Model/ListResponseMeta.cs new file mode 100644 index 000000000..64e00cc7d --- /dev/null +++ b/src/PollinationSDK/Model/ListResponseMeta.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 = "ListResponseMeta")] + public partial class ListResponseMeta : OpenAPIGenBaseModel, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected ListResponseMeta() + { + // Set non-required readonly properties with defaultValue + this.Type = "ListResponseMeta"; + } + + /// + /// 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). + /// The next page, if this on is not the last. + /// The list of resources returned from the list query. + public ListResponseMeta + ( + int page, int perPage, int pageCount, int totalCount, // Required parameters + int nextPage= default, List resources= default // Optional parameters + ) : base()// BaseClass + { + this.Page = page; + this.PerPage = perPage; + this.PageCount = pageCount; + this.TotalCount = totalCount; + this.NextPage = nextPage; + this.Resources = resources; + + // Set non-required readonly properties with defaultValue + this.Type = "ListResponseMeta"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "ListResponseMeta"; + + /// + /// 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; } + /// + /// 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; } + /// + /// The list of resources returned from the list query + /// + /// The list of resources returned from the list query + [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 "ListResponseMeta"; + } + + /// + /// 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("ListResponseMeta:\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(" NextPage: ").Append(NextPage).Append("\n"); + sb.Append(" Resources: ").Append(Resources).Append("\n"); + return sb.ToString(); + } + + /// + /// Returns the object from JSON string + /// + /// ListResponseMeta object + public static ListResponseMeta 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. + /// + /// ListResponseMeta object + public virtual ListResponseMeta DuplicateListResponseMeta() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateListResponseMeta(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel DuplicateOpenAPIGenBaseModel() + { + return DuplicateListResponseMeta(); + } + + /// + /// 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 ListResponseMeta); + } + + /// + /// Returns true if ListResponseMeta instances are equal + /// + /// Instance of ListResponseMeta to be compared + /// Boolean + public bool Equals(ListResponseMeta 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.NextPage == input.NextPage || + (this.NextPage != null && + this.NextPage.Equals(input.NextPage)) + ) && 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.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.NextPage != null) + hashCode = hashCode * 59 + this.NextPage.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(@"^ListResponseMeta$", 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/LocalConfig.cs b/src/PollinationSDK/Model/LocalConfig.cs new file mode 100644 index 000000000..742a0a7e6 --- /dev/null +++ b/src/PollinationSDK/Model/LocalConfig.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 +{ + /// + /// Plugin Configuration to run on a desktop. + /// + [DataContract(Name = "LocalConfig")] + public partial class LocalConfig : OpenAPIGenBaseModel, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. + public LocalConfig + ( + // Required parameters + Dictionary annotations= default// Optional parameters + ) : base()// BaseClass + { + this.Annotations = annotations; + + // Set non-required readonly properties with defaultValue + this.Type = "LocalConfig"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "LocalConfig"; + + /// + /// 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; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + return "LocalConfig"; + } + + /// + /// 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("LocalConfig:\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Annotations: ").Append(Annotations).Append("\n"); + return sb.ToString(); + } + + /// + /// Returns the object from JSON string + /// + /// LocalConfig object + public static LocalConfig 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. + /// + /// LocalConfig object + public virtual LocalConfig DuplicateLocalConfig() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateLocalConfig(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel DuplicateOpenAPIGenBaseModel() + { + return DuplicateLocalConfig(); + } + + /// + /// 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 LocalConfig); + } + + /// + /// Returns true if LocalConfig instances are equal + /// + /// Instance of LocalConfig to be compared + /// Boolean + public bool Equals(LocalConfig 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.Annotations == input.Annotations || + this.Annotations != null && + input.Annotations != null && + this.Annotations.SequenceEqual(input.Annotations) + ); + } + + /// + /// 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.Annotations != null) + hashCode = hashCode * 59 + this.Annotations.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(@"^LocalConfig", 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/Maintainer.cs b/src/PollinationSDK/Model/Maintainer.cs new file mode 100644 index 000000000..1bf1e88e8 --- /dev/null +++ b/src/PollinationSDK/Model/Maintainer.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 +{ + /// + /// Maintainer information + /// + [DataContract(Name = "Maintainer")] + public partial class Maintainer : OpenAPIGenBaseModel, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected Maintainer() + { + // Set non-required readonly properties with defaultValue + this.Type = "Maintainer"; + } + + /// + /// Initializes a new instance of the class. + /// + /// The name of the author/maintainer person or organization. (required). + /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. + /// The email address of the author/maintainer person or organization.. + public Maintainer + ( + string name, // Required parameters + Dictionary annotations= default, string email= default// Optional parameters + ) : base()// BaseClass + { + // to ensure "name" is required (not null) + this.Name = name ?? throw new ArgumentNullException("name is a required property for Maintainer and cannot be null"); + this.Annotations = annotations; + this.Email = email; + + // Set non-required readonly properties with defaultValue + this.Type = "Maintainer"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "Maintainer"; + + /// + /// The name of the author/maintainer person or organization. + /// + /// The name of the author/maintainer person or organization. + [DataMember(Name = "name", IsRequired = true, EmitDefaultValue = false)] + public string Name { 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; } + /// + /// The email address of the author/maintainer person or organization. + /// + /// The email address of the author/maintainer person or organization. + [DataMember(Name = "email", EmitDefaultValue = false)] + public string Email { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + return "Maintainer"; + } + + /// + /// 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("Maintainer:\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Annotations: ").Append(Annotations).Append("\n"); + sb.Append(" Email: ").Append(Email).Append("\n"); + return sb.ToString(); + } + + /// + /// Returns the object from JSON string + /// + /// Maintainer object + public static Maintainer 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. + /// + /// Maintainer object + public virtual Maintainer DuplicateMaintainer() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateMaintainer(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel DuplicateOpenAPIGenBaseModel() + { + return DuplicateMaintainer(); + } + + /// + /// 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 Maintainer); + } + + /// + /// Returns true if Maintainer instances are equal + /// + /// Instance of Maintainer to be compared + /// Boolean + public bool Equals(Maintainer 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.Type == input.Type || + (this.Type != null && + this.Type.Equals(input.Type)) + ) && base.Equals(input) && + ( + this.Annotations == input.Annotations || + this.Annotations != null && + input.Annotations != null && + this.Annotations.SequenceEqual(input.Annotations) + ) && base.Equals(input) && + ( + this.Email == input.Email || + (this.Email != null && + this.Email.Equals(input.Email)) + ); + } + + /// + /// 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.Type != null) + hashCode = hashCode * 59 + this.Type.GetHashCode(); + if (this.Annotations != null) + hashCode = hashCode * 59 + this.Annotations.GetHashCode(); + if (this.Email != null) + hashCode = hashCode * 59 + this.Email.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(@"^Maintainer$", 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..c443ebad5 --- /dev/null +++ b/src/PollinationSDK/Model/MetaData.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 +{ + /// + /// Package metadata information. + /// + [DataContract(Name = "MetaData")] + public partial class MetaData : OpenAPIGenBaseModel, 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. + /// + /// Package name. Make it descriptive and helpful ;) (required). + /// The tag of the package (required). + /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. + /// The version of the application code underlying the manifest. + /// A list of keywords to search the package by. + /// A list of maintainers for the package. + /// The URL of this package's home page. + /// A list of URLs to source code for this project. + /// A URL to an SVG or PNG image to be used as an icon. + /// Whether this package is deprecated. + /// A description of what this package does. + /// The license information.. + public MetaData + ( + string name, string tag, // Required parameters + Dictionary annotations= default, string appVersion= default, List keywords= default, List maintainers= default, string home= default, List sources= default, string icon= default, bool deprecated= default, string description= default, License license= default// Optional parameters + ) : base()// BaseClass + { + // to ensure "name" is required (not null) + this.Name = name ?? throw new ArgumentNullException("name is a required property for MetaData and cannot be null"); + // to ensure "tag" is required (not null) + this.Tag = tag ?? throw new ArgumentNullException("tag is a required property for MetaData and cannot be null"); + this.Annotations = annotations; + this.AppVersion = appVersion; + this.Keywords = keywords; + this.Maintainers = maintainers; + this.Home = home; + this.Sources = sources; + this.Icon = icon; + this.Deprecated = deprecated; + this.Description = description; + this.License = license; + + // 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"; + + /// + /// Package name. Make it descriptive and helpful ;) + /// + /// Package name. Make it descriptive and helpful ;) + [DataMember(Name = "name", IsRequired = true, EmitDefaultValue = false)] + public string Name { get; set; } + /// + /// The tag of the package + /// + /// The tag of the package + [DataMember(Name = "tag", IsRequired = true, EmitDefaultValue = false)] + public string Tag { 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; } + /// + /// The version of the application code underlying the manifest + /// + /// The version of the application code underlying the manifest + [DataMember(Name = "app_version", EmitDefaultValue = false)] + public string AppVersion { get; set; } + /// + /// A list of keywords to search the package by + /// + /// A list of keywords to search the package by + [DataMember(Name = "keywords", EmitDefaultValue = false)] + public List Keywords { get; set; } + /// + /// A list of maintainers for the package + /// + /// A list of maintainers for the package + [DataMember(Name = "maintainers", EmitDefaultValue = false)] + public List Maintainers { get; set; } + /// + /// The URL of this package's home page + /// + /// The URL of this package's home page + [DataMember(Name = "home", EmitDefaultValue = false)] + public string Home { get; set; } + /// + /// A list of URLs to source code for this project + /// + /// A list of URLs to source code for this project + [DataMember(Name = "sources", EmitDefaultValue = false)] + public List Sources { get; set; } + /// + /// A URL to an SVG or PNG image to be used as an icon + /// + /// A URL to an SVG or PNG image to be used as an icon + [DataMember(Name = "icon", EmitDefaultValue = false)] + public string Icon { get; set; } + /// + /// Whether this package is deprecated + /// + /// Whether this package is deprecated + [DataMember(Name = "deprecated", EmitDefaultValue = false)] + public bool Deprecated { get; set; } + /// + /// A description of what this package does + /// + /// A description of what this package does + [DataMember(Name = "description", EmitDefaultValue = false)] + public string Description { get; set; } + /// + /// The license information. + /// + /// The license information. + [DataMember(Name = "license", EmitDefaultValue = false)] + public License License { get; set; } + + /// + /// 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(" Name: ").Append(Name).Append("\n"); + sb.Append(" Tag: ").Append(Tag).Append("\n"); + sb.Append(" Annotations: ").Append(Annotations).Append("\n"); + sb.Append(" AppVersion: ").Append(AppVersion).Append("\n"); + sb.Append(" Keywords: ").Append(Keywords).Append("\n"); + sb.Append(" Maintainers: ").Append(Maintainers).Append("\n"); + sb.Append(" Home: ").Append(Home).Append("\n"); + sb.Append(" Sources: ").Append(Sources).Append("\n"); + sb.Append(" Icon: ").Append(Icon).Append("\n"); + sb.Append(" Deprecated: ").Append(Deprecated).Append("\n"); + sb.Append(" Description: ").Append(Description).Append("\n"); + sb.Append(" License: ").Append(License).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 OpenAPIGenBaseModel DuplicateOpenAPIGenBaseModel() + { + 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.Name == input.Name || + (this.Name != null && + this.Name.Equals(input.Name)) + ) && base.Equals(input) && + ( + this.Tag == input.Tag || + (this.Tag != null && + this.Tag.Equals(input.Tag)) + ) && base.Equals(input) && + ( + this.Type == input.Type || + (this.Type != null && + this.Type.Equals(input.Type)) + ) && base.Equals(input) && + ( + this.Annotations == input.Annotations || + this.Annotations != null && + input.Annotations != null && + this.Annotations.SequenceEqual(input.Annotations) + ) && base.Equals(input) && + ( + this.AppVersion == input.AppVersion || + (this.AppVersion != null && + this.AppVersion.Equals(input.AppVersion)) + ) && base.Equals(input) && + ( + this.Keywords == input.Keywords || + this.Keywords != null && + input.Keywords != null && + this.Keywords.SequenceEqual(input.Keywords) + ) && base.Equals(input) && + ( + this.Maintainers == input.Maintainers || + this.Maintainers != null && + input.Maintainers != null && + this.Maintainers.SequenceEqual(input.Maintainers) + ) && base.Equals(input) && + ( + this.Home == input.Home || + (this.Home != null && + this.Home.Equals(input.Home)) + ) && base.Equals(input) && + ( + this.Sources == input.Sources || + this.Sources != null && + input.Sources != null && + this.Sources.SequenceEqual(input.Sources) + ) && base.Equals(input) && + ( + this.Icon == input.Icon || + (this.Icon != null && + this.Icon.Equals(input.Icon)) + ) && base.Equals(input) && + ( + this.Deprecated == input.Deprecated || + (this.Deprecated != null && + this.Deprecated.Equals(input.Deprecated)) + ) && base.Equals(input) && + ( + this.Description == input.Description || + (this.Description != null && + this.Description.Equals(input.Description)) + ) && base.Equals(input) && + ( + this.License == input.License || + (this.License != null && + this.License.Equals(input.License)) + ); + } + + /// + /// 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.Tag != null) + hashCode = hashCode * 59 + this.Tag.GetHashCode(); + if (this.Type != null) + hashCode = hashCode * 59 + this.Type.GetHashCode(); + if (this.Annotations != null) + hashCode = hashCode * 59 + this.Annotations.GetHashCode(); + if (this.AppVersion != null) + hashCode = hashCode * 59 + this.AppVersion.GetHashCode(); + if (this.Keywords != null) + hashCode = hashCode * 59 + this.Keywords.GetHashCode(); + if (this.Maintainers != null) + hashCode = hashCode * 59 + this.Maintainers.GetHashCode(); + if (this.Home != null) + hashCode = hashCode * 59 + this.Home.GetHashCode(); + if (this.Sources != null) + hashCode = hashCode * 59 + this.Sources.GetHashCode(); + if (this.Icon != null) + hashCode = hashCode * 59 + this.Icon.GetHashCode(); + if (this.Deprecated != null) + hashCode = hashCode * 59 + this.Deprecated.GetHashCode(); + if (this.Description != null) + hashCode = hashCode * 59 + this.Description.GetHashCode(); + if (this.License != null) + hashCode = hashCode * 59 + this.License.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/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/NewPluginPackage.cs b/src/PollinationSDK/Model/NewPluginPackage.cs new file mode 100644 index 000000000..726db068f --- /dev/null +++ b/src/PollinationSDK/Model/NewPluginPackage.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 +{ + /// + /// NewPluginPackage + /// + [DataContract(Name = "NewPluginPackage")] + public partial class NewPluginPackage : OpenAPIGenBaseModel, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected NewPluginPackage() + { + // Set non-required readonly properties with defaultValue + this.Type = "NewPluginPackage"; + } + + /// + /// Initializes a new instance of the class. + /// + /// The Plugin manifest to be created (required). + /// The README file to attach to this package (default to ""). + public NewPluginPackage + ( + Plugin manifest, // Required parameters + string readme = "" // Optional parameters + ) : base()// BaseClass + { + // to ensure "manifest" is required (not null) + this.Manifest = manifest ?? throw new ArgumentNullException("manifest is a required property for NewPluginPackage and cannot be null"); + // use default value if no "readme" provided + this.Readme = readme ?? ""; + + // Set non-required readonly properties with defaultValue + this.Type = "NewPluginPackage"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "NewPluginPackage"; + + /// + /// The Plugin manifest to be created + /// + /// The Plugin manifest to be created + [DataMember(Name = "manifest", IsRequired = true, EmitDefaultValue = false)] + public Plugin Manifest { get; set; } + /// + /// The README file to attach to this package + /// + /// The README file to attach to this package + [DataMember(Name = "readme", EmitDefaultValue = true)] + public string Readme { get; set; } = ""; + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + return "NewPluginPackage"; + } + + /// + /// 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("NewPluginPackage:\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Manifest: ").Append(Manifest).Append("\n"); + sb.Append(" Readme: ").Append(Readme).Append("\n"); + return sb.ToString(); + } + + /// + /// Returns the object from JSON string + /// + /// NewPluginPackage object + public static NewPluginPackage 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. + /// + /// NewPluginPackage object + public virtual NewPluginPackage DuplicateNewPluginPackage() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateNewPluginPackage(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel DuplicateOpenAPIGenBaseModel() + { + return DuplicateNewPluginPackage(); + } + + /// + /// 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 NewPluginPackage); + } + + /// + /// Returns true if NewPluginPackage instances are equal + /// + /// Instance of NewPluginPackage to be compared + /// Boolean + public bool Equals(NewPluginPackage input) + { + if (input == null) + return false; + return base.Equals(input) && + ( + this.Manifest == input.Manifest || + (this.Manifest != null && + this.Manifest.Equals(input.Manifest)) + ) && base.Equals(input) && + ( + this.Readme == input.Readme || + (this.Readme != null && + this.Readme.Equals(input.Readme)) + ) && 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.Manifest != null) + hashCode = hashCode * 59 + this.Manifest.GetHashCode(); + if (this.Readme != null) + hashCode = hashCode * 59 + this.Readme.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(@"^NewPluginPackage$", 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/NewRecipePackage.cs b/src/PollinationSDK/Model/NewRecipePackage.cs new file mode 100644 index 000000000..8feaa361d --- /dev/null +++ b/src/PollinationSDK/Model/NewRecipePackage.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 +{ + /// + /// NewRecipePackage + /// + [DataContract(Name = "NewRecipePackage")] + public partial class NewRecipePackage : OpenAPIGenBaseModel, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected NewRecipePackage() + { + // Set non-required readonly properties with defaultValue + this.Type = "NewRecipePackage"; + } + + /// + /// Initializes a new instance of the class. + /// + /// The Recipe manifest to be created (required). + /// The README file to attach to this package (default to ""). + public NewRecipePackage + ( + Recipe manifest, // Required parameters + string readme = "" // Optional parameters + ) : base()// BaseClass + { + // to ensure "manifest" is required (not null) + this.Manifest = manifest ?? throw new ArgumentNullException("manifest is a required property for NewRecipePackage and cannot be null"); + // use default value if no "readme" provided + this.Readme = readme ?? ""; + + // Set non-required readonly properties with defaultValue + this.Type = "NewRecipePackage"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "NewRecipePackage"; + + /// + /// The Recipe manifest to be created + /// + /// The Recipe manifest to be created + [DataMember(Name = "manifest", IsRequired = true, EmitDefaultValue = false)] + public Recipe Manifest { get; set; } + /// + /// The README file to attach to this package + /// + /// The README file to attach to this package + [DataMember(Name = "readme", EmitDefaultValue = true)] + public string Readme { get; set; } = ""; + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + return "NewRecipePackage"; + } + + /// + /// 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("NewRecipePackage:\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Manifest: ").Append(Manifest).Append("\n"); + sb.Append(" Readme: ").Append(Readme).Append("\n"); + return sb.ToString(); + } + + /// + /// Returns the object from JSON string + /// + /// NewRecipePackage object + public static NewRecipePackage 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. + /// + /// NewRecipePackage object + public virtual NewRecipePackage DuplicateNewRecipePackage() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateNewRecipePackage(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel DuplicateOpenAPIGenBaseModel() + { + return DuplicateNewRecipePackage(); + } + + /// + /// 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 NewRecipePackage); + } + + /// + /// Returns true if NewRecipePackage instances are equal + /// + /// Instance of NewRecipePackage to be compared + /// Boolean + public bool Equals(NewRecipePackage input) + { + if (input == null) + return false; + return base.Equals(input) && + ( + this.Manifest == input.Manifest || + (this.Manifest != null && + this.Manifest.Equals(input.Manifest)) + ) && base.Equals(input) && + ( + this.Readme == input.Readme || + (this.Readme != null && + this.Readme.Equals(input.Readme)) + ) && 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.Manifest != null) + hashCode = hashCode * 59 + this.Manifest.GetHashCode(); + if (this.Readme != null) + hashCode = hashCode * 59 + this.Readme.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(@"^NewRecipePackage$", 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/OpenAPIGenBaseModel.cs b/src/PollinationSDK/Model/OpenAPIGenBaseModel.cs new file mode 100644 index 000000000..b053ab112 --- /dev/null +++ b/src/PollinationSDK/Model/OpenAPIGenBaseModel.cs @@ -0,0 +1,174 @@ +/* + * 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 +{ + /// + /// OpenAPIGenBaseModel + /// + [DataContract(Name = "_OpenAPIGenBaseModel")] + public partial class OpenAPIGenBaseModel : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + public OpenAPIGenBaseModel + ( + // Required parameters + // Optional parameters + )// BaseClass + { + + // Set non-required readonly properties with defaultValue + this.Type = "InvalidType"; + } + + //============================================== is ReadOnly + /// + /// A base class to use when there is no baseclass available to fall on. + /// + /// A base class to use when there is no baseclass available to fall on. + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "InvalidType"; + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + return "OpenAPIGenBaseModel"; + } + + /// + /// 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("OpenAPIGenBaseModel:\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + return sb.ToString(); + } + + /// + /// Returns the object from JSON string + /// + /// OpenAPIGenBaseModel object + public static OpenAPIGenBaseModel 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. + /// + /// OpenAPIGenBaseModel object + public virtual OpenAPIGenBaseModel DuplicateOpenAPIGenBaseModel() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateOpenAPIGenBaseModel(); + } + + + /// + /// 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 OpenAPIGenBaseModel); + } + + /// + /// Returns true if OpenAPIGenBaseModel instances are equal + /// + /// Instance of OpenAPIGenBaseModel to be compared + /// Boolean + public bool Equals(OpenAPIGenBaseModel input) + { + if (input == null) + return false; + return + ( + 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.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) + { + yield break; + } + } +} diff --git a/src/PollinationSDK/Model/Organization.cs b/src/PollinationSDK/Model/Organization.cs new file mode 100644 index 000000000..f02e97f37 --- /dev/null +++ b/src/PollinationSDK/Model/Organization.cs @@ -0,0 +1,282 @@ +/* + * 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 +{ + /// + /// Organization + /// + [DataContract(Name = "Organization")] + public partial class Organization : OrganizationUpdate, IEquatable, IValidatableObject + { + /// + /// The role the user has within the organization + /// + /// The role the user has within the organization + [DataMember(Name="role", EmitDefaultValue=false)] + public OrganizationRoleEnum Role { get; set; } + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected Organization() + { + // Set non-required readonly properties with defaultValue + this.Type = "Organization"; + } + + /// + /// Initializes a new instance of the class. + /// + /// The org ID (required). + /// The account the organization represents (required). + /// The role the user has within the organization. + /// The number of members that are part of this org (default to 0). + /// The number of teams that are part of this org (default to 0). + /// The unique name of the org in small case without spaces. + /// The display name for this org. + /// URL to the picture associated with this org. + /// The contact email for the Organization. + /// A description of the org. + public Organization + ( + string id, AccountPublic owner, // Required parameters + string accountName= default, string name= default, string pictureUrl= default, string contactEmail= default, string description= default, OrganizationRoleEnum role= default, int memberCount = 0, int teamCount = 0 // Optional parameters + ) : base(accountName: accountName, name: name, pictureUrl: pictureUrl, contactEmail: contactEmail, description: description)// BaseClass + { + // to ensure "id" is required (not null) + this.Id = id ?? throw new ArgumentNullException("id is a required property for Organization and cannot be null"); + // to ensure "owner" is required (not null) + this.Owner = owner ?? throw new ArgumentNullException("owner is a required property for Organization and cannot be null"); + this.Role = role; + this.MemberCount = memberCount; + this.TeamCount = teamCount; + + // Set non-required readonly properties with defaultValue + this.Type = "Organization"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "Organization"; + + /// + /// The org ID + /// + /// The org ID + [DataMember(Name = "id", IsRequired = true, EmitDefaultValue = false)] + public string Id { get; set; } + /// + /// The account the organization represents + /// + /// The account the organization represents + [DataMember(Name = "owner", IsRequired = true, EmitDefaultValue = false)] + public AccountPublic Owner { get; set; } + /// + /// The number of members that are part of this org + /// + /// The number of members that are part of this org + [DataMember(Name = "member_count", EmitDefaultValue = true)] + public int MemberCount { get; set; } = 0; + /// + /// The number of teams that are part of this org + /// + /// The number of teams that are part of this org + [DataMember(Name = "team_count", EmitDefaultValue = true)] + public int TeamCount { get; set; } = 0; + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + return "Organization"; + } + + /// + /// 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("Organization:\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" AccountName: ").Append(AccountName).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" PictureUrl: ").Append(PictureUrl).Append("\n"); + sb.Append(" ContactEmail: ").Append(ContactEmail).Append("\n"); + sb.Append(" Description: ").Append(Description).Append("\n"); + sb.Append(" Id: ").Append(Id).Append("\n"); + sb.Append(" Owner: ").Append(Owner).Append("\n"); + sb.Append(" Role: ").Append(Role).Append("\n"); + sb.Append(" MemberCount: ").Append(MemberCount).Append("\n"); + sb.Append(" TeamCount: ").Append(TeamCount).Append("\n"); + return sb.ToString(); + } + + /// + /// Returns the object from JSON string + /// + /// Organization object + public static Organization 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. + /// + /// Organization object + public virtual Organization DuplicateOrganization() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateOrganization(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OrganizationUpdate DuplicateOrganizationUpdate() + { + return DuplicateOrganization(); + } + + /// + /// 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 Organization); + } + + /// + /// Returns true if Organization instances are equal + /// + /// Instance of Organization to be compared + /// Boolean + public bool Equals(Organization 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.Owner == input.Owner || + (this.Owner != null && + this.Owner.Equals(input.Owner)) + ) && base.Equals(input) && + ( + this.Role == input.Role || + (this.Role != null && + this.Role.Equals(input.Role)) + ) && base.Equals(input) && + ( + this.MemberCount == input.MemberCount || + (this.MemberCount != null && + this.MemberCount.Equals(input.MemberCount)) + ) && base.Equals(input) && + ( + this.TeamCount == input.TeamCount || + (this.TeamCount != null && + this.TeamCount.Equals(input.TeamCount)) + ) && 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.Owner != null) + hashCode = hashCode * 59 + this.Owner.GetHashCode(); + if (this.Role != null) + hashCode = hashCode * 59 + this.Role.GetHashCode(); + if (this.MemberCount != null) + hashCode = hashCode * 59 + this.MemberCount.GetHashCode(); + if (this.TeamCount != null) + hashCode = hashCode * 59 + this.TeamCount.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(@"^Organization$", 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/OrganizationCreate.cs b/src/PollinationSDK/Model/OrganizationCreate.cs new file mode 100644 index 000000000..df1f3f935 --- /dev/null +++ b/src/PollinationSDK/Model/OrganizationCreate.cs @@ -0,0 +1,190 @@ +/* + * 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 +{ + /// + /// OrganizationCreate + /// + [DataContract(Name = "OrganizationCreate")] + public partial class OrganizationCreate : OrganizationUpdate, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// The unique name of the org in small case without spaces. + /// The display name for this org. + /// URL to the picture associated with this org. + /// The contact email for the Organization. + /// A description of the org. + public OrganizationCreate + ( + // Required parameters + string accountName= default, string name= default, string pictureUrl= default, string contactEmail= default, string description= default // Optional parameters + ) : base(accountName: accountName, name: name, pictureUrl: pictureUrl, contactEmail: contactEmail, description: description)// BaseClass + { + + // Set non-required readonly properties with defaultValue + this.Type = "OrganizationCreate"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "OrganizationCreate"; + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + return "OrganizationCreate"; + } + + /// + /// 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("OrganizationCreate:\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" AccountName: ").Append(AccountName).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" PictureUrl: ").Append(PictureUrl).Append("\n"); + sb.Append(" ContactEmail: ").Append(ContactEmail).Append("\n"); + sb.Append(" Description: ").Append(Description).Append("\n"); + return sb.ToString(); + } + + /// + /// Returns the object from JSON string + /// + /// OrganizationCreate object + public static OrganizationCreate 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. + /// + /// OrganizationCreate object + public virtual OrganizationCreate DuplicateOrganizationCreate() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateOrganizationCreate(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OrganizationUpdate DuplicateOrganizationUpdate() + { + return DuplicateOrganizationCreate(); + } + + /// + /// 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 OrganizationCreate); + } + + /// + /// Returns true if OrganizationCreate instances are equal + /// + /// Instance of OrganizationCreate to be compared + /// Boolean + public bool Equals(OrganizationCreate 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(@"^OrganizationCreate$", 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/OrganizationList.cs b/src/PollinationSDK/Model/OrganizationList.cs new file mode 100644 index 000000000..8573a2b1b --- /dev/null +++ b/src/PollinationSDK/Model/OrganizationList.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 = "OrganizationList")] + public partial class OrganizationList : OpenAPIGenBaseModel, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected OrganizationList() + { + // Set non-required readonly properties with defaultValue + this.Type = "OrganizationList"; + } + + /// + /// 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 OrganizationList + ( + 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 OrganizationList and cannot be null"); + this.NextPage = nextPage; + + // Set non-required readonly properties with defaultValue + this.Type = "OrganizationList"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "OrganizationList"; + + /// + /// 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 "OrganizationList"; + } + + /// + /// 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("OrganizationList:\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 + /// + /// OrganizationList object + public static OrganizationList 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. + /// + /// OrganizationList object + public virtual OrganizationList DuplicateOrganizationList() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateOrganizationList(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel DuplicateOpenAPIGenBaseModel() + { + return DuplicateOrganizationList(); + } + + /// + /// 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 OrganizationList); + } + + /// + /// Returns true if OrganizationList instances are equal + /// + /// Instance of OrganizationList to be compared + /// Boolean + public bool Equals(OrganizationList 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(@"^OrganizationList$", 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/OrganizationMember.cs b/src/PollinationSDK/Model/OrganizationMember.cs new file mode 100644 index 000000000..5b16742e1 --- /dev/null +++ b/src/PollinationSDK/Model/OrganizationMember.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 +{ + /// + /// OrganizationMember + /// + [DataContract(Name = "OrganizationMember")] + public partial class OrganizationMember : OpenAPIGenBaseModel, IEquatable, IValidatableObject + { + /// + /// The role the user has within the organization + /// + /// The role the user has within the organization + [DataMember(Name="role", EmitDefaultValue=false)] + public OrganizationRoleEnum Role { get; set; } + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected OrganizationMember() + { + // Set non-required readonly properties with defaultValue + this.Type = "OrganizationMember"; + } + + /// + /// Initializes a new instance of the class. + /// + /// The organization member (required). + /// The role the user has within the organization (required). + public OrganizationMember + ( + UserPublic user, OrganizationRoleEnum role// Required parameters + // Optional parameters + ) : base()// BaseClass + { + // to ensure "user" is required (not null) + this.User = user ?? throw new ArgumentNullException("user is a required property for OrganizationMember and cannot be null"); + this.Role = role; + + // Set non-required readonly properties with defaultValue + this.Type = "OrganizationMember"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "OrganizationMember"; + + /// + /// The organization member + /// + /// The organization member + [DataMember(Name = "user", IsRequired = true, EmitDefaultValue = false)] + public UserPublic User { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + return "OrganizationMember"; + } + + /// + /// 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("OrganizationMember:\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" User: ").Append(User).Append("\n"); + sb.Append(" Role: ").Append(Role).Append("\n"); + return sb.ToString(); + } + + /// + /// Returns the object from JSON string + /// + /// OrganizationMember object + public static OrganizationMember 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. + /// + /// OrganizationMember object + public virtual OrganizationMember DuplicateOrganizationMember() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateOrganizationMember(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel DuplicateOpenAPIGenBaseModel() + { + return DuplicateOrganizationMember(); + } + + /// + /// 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 OrganizationMember); + } + + /// + /// Returns true if OrganizationMember instances are equal + /// + /// Instance of OrganizationMember to be compared + /// Boolean + public bool Equals(OrganizationMember input) + { + if (input == null) + return false; + return base.Equals(input) && + ( + this.User == input.User || + (this.User != null && + this.User.Equals(input.User)) + ) && base.Equals(input) && + ( + this.Role == input.Role || + (this.Role != null && + this.Role.Equals(input.Role)) + ) && 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.User != null) + hashCode = hashCode * 59 + this.User.GetHashCode(); + if (this.Role != null) + hashCode = hashCode * 59 + this.Role.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(@"^OrganizationMember$", 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/OrganizationMemberList.cs b/src/PollinationSDK/Model/OrganizationMemberList.cs new file mode 100644 index 000000000..48692cbf1 --- /dev/null +++ b/src/PollinationSDK/Model/OrganizationMemberList.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 = "OrganizationMemberList")] + public partial class OrganizationMemberList : OpenAPIGenBaseModel, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected OrganizationMemberList() + { + // Set non-required readonly properties with defaultValue + this.Type = "OrganizationMemberList"; + } + + /// + /// 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 OrganizationMemberList + ( + 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 OrganizationMemberList and cannot be null"); + this.NextPage = nextPage; + + // Set non-required readonly properties with defaultValue + this.Type = "OrganizationMemberList"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "OrganizationMemberList"; + + /// + /// 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 "OrganizationMemberList"; + } + + /// + /// 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("OrganizationMemberList:\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 + /// + /// OrganizationMemberList object + public static OrganizationMemberList 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. + /// + /// OrganizationMemberList object + public virtual OrganizationMemberList DuplicateOrganizationMemberList() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateOrganizationMemberList(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel DuplicateOpenAPIGenBaseModel() + { + return DuplicateOrganizationMemberList(); + } + + /// + /// 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 OrganizationMemberList); + } + + /// + /// Returns true if OrganizationMemberList instances are equal + /// + /// Instance of OrganizationMemberList to be compared + /// Boolean + public bool Equals(OrganizationMemberList 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(@"^OrganizationMemberList$", 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/OrganizationRoleEnum.cs b/src/PollinationSDK/Model/OrganizationRoleEnum.cs new file mode 100644 index 000000000..c3d6186ef --- /dev/null +++ b/src/PollinationSDK/Model/OrganizationRoleEnum.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 OrganizationRoleEnum + { + /// + /// Enum Owner for value: owner + /// + [EnumMember(Value = "owner")] + Owner = 1, + + /// + /// Enum Member for value: member + /// + [EnumMember(Value = "member")] + Member = 2 + + } + +} diff --git a/src/PollinationSDK/Model/OrganizationUpdate.cs b/src/PollinationSDK/Model/OrganizationUpdate.cs new file mode 100644 index 000000000..e666ac4ce --- /dev/null +++ b/src/PollinationSDK/Model/OrganizationUpdate.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 +{ + /// + /// OrganizationUpdate + /// + [DataContract(Name = "OrganizationUpdate")] + public partial class OrganizationUpdate : OpenAPIGenBaseModel, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// The unique name of the org in small case without spaces. + /// The display name for this org. + /// URL to the picture associated with this org. + /// The contact email for the Organization. + /// A description of the org. + public OrganizationUpdate + ( + // Required parameters + string accountName= default, string name= default, string pictureUrl= default, string contactEmail= default, string description= default // Optional parameters + ) : base()// BaseClass + { + this.AccountName = accountName; + this.Name = name; + this.PictureUrl = pictureUrl; + this.ContactEmail = contactEmail; + this.Description = description; + + // Set non-required readonly properties with defaultValue + this.Type = "OrganizationUpdate"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "OrganizationUpdate"; + + /// + /// The unique name of the org in small case without spaces + /// + /// The unique name of the org in small case without spaces + [DataMember(Name = "account_name", EmitDefaultValue = false)] + public string AccountName { get; set; } + /// + /// The display name for this org + /// + /// The display name for this org + [DataMember(Name = "name", EmitDefaultValue = false)] + public string Name { get; set; } + /// + /// URL to the picture associated with this org + /// + /// URL to the picture associated with this org + [DataMember(Name = "picture_url", EmitDefaultValue = false)] + public string PictureUrl { get; set; } + /// + /// The contact email for the Organization + /// + /// The contact email for the Organization + [DataMember(Name = "contact_email", EmitDefaultValue = false)] + public string ContactEmail { get; set; } + /// + /// A description of the org + /// + /// A description of the org + [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 "OrganizationUpdate"; + } + + /// + /// 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("OrganizationUpdate:\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" AccountName: ").Append(AccountName).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" PictureUrl: ").Append(PictureUrl).Append("\n"); + sb.Append(" ContactEmail: ").Append(ContactEmail).Append("\n"); + sb.Append(" Description: ").Append(Description).Append("\n"); + return sb.ToString(); + } + + /// + /// Returns the object from JSON string + /// + /// OrganizationUpdate object + public static OrganizationUpdate 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. + /// + /// OrganizationUpdate object + public virtual OrganizationUpdate DuplicateOrganizationUpdate() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateOrganizationUpdate(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel DuplicateOpenAPIGenBaseModel() + { + return DuplicateOrganizationUpdate(); + } + + /// + /// 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 OrganizationUpdate); + } + + /// + /// Returns true if OrganizationUpdate instances are equal + /// + /// Instance of OrganizationUpdate to be compared + /// Boolean + public bool Equals(OrganizationUpdate input) + { + if (input == null) + return false; + return base.Equals(input) && + ( + this.AccountName == input.AccountName || + (this.AccountName != null && + this.AccountName.Equals(input.AccountName)) + ) && base.Equals(input) && + ( + this.Name == input.Name || + (this.Name != null && + this.Name.Equals(input.Name)) + ) && base.Equals(input) && + ( + this.PictureUrl == input.PictureUrl || + (this.PictureUrl != null && + this.PictureUrl.Equals(input.PictureUrl)) + ) && base.Equals(input) && + ( + this.ContactEmail == input.ContactEmail || + (this.ContactEmail != null && + this.ContactEmail.Equals(input.ContactEmail)) + ) && 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.AccountName != null) + hashCode = hashCode * 59 + this.AccountName.GetHashCode(); + if (this.Name != null) + hashCode = hashCode * 59 + this.Name.GetHashCode(); + if (this.PictureUrl != null) + hashCode = hashCode * 59 + this.PictureUrl.GetHashCode(); + if (this.ContactEmail != null) + hashCode = hashCode * 59 + this.ContactEmail.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(@"^OrganizationUpdate$", 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/PackageVersion.cs b/src/PollinationSDK/Model/PackageVersion.cs new file mode 100644 index 000000000..f13bda001 --- /dev/null +++ b/src/PollinationSDK/Model/PackageVersion.cs @@ -0,0 +1,500 @@ +/* + * 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 +{ + /// + /// Package Version A MetaData object to distinguish a specific package version within a repository index. + /// + [DataContract(Name = "PackageVersion")] + public partial class PackageVersion : OpenAPIGenBaseModel, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected PackageVersion() + { + // Set non-required readonly properties with defaultValue + this.Type = "PackageVersion"; + } + + /// + /// Initializes a new instance of the class. + /// + /// Package name. Make it descriptive and helpful ;) (required). + /// The tag of the package (required). + /// url (required). + /// created (required). + /// digest (required). + /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. + /// The version of the application code underlying the manifest. + /// A list of keywords to search the package by. + /// A list of maintainers for the package. + /// The URL of this package's home page. + /// A list of URLs to source code for this project. + /// A URL to an SVG or PNG image to be used as an icon. + /// Whether this package is deprecated. + /// A description of what this package does. + /// The license information.. + /// A slug of the repository name and the package name.. + /// The type of Queenbee package (ie: recipe or plugin) (default to ""). + /// The README file string for this package. + /// The package Recipe or Plugin manifest. + public PackageVersion + ( + string name, string tag, string url, DateTime created, string digest, // Required parameters + Dictionary annotations= default, string appVersion= default, List keywords= default, List maintainers= default, string home= default, List sources= default, string icon= default, bool deprecated= default, string description= default, License license= default, string slug= default, string kind = "", string readme= default, AnyOf manifest= default // Optional parameters + ) : base()// BaseClass + { + // to ensure "name" is required (not null) + this.Name = name ?? throw new ArgumentNullException("name is a required property for PackageVersion and cannot be null"); + // to ensure "tag" is required (not null) + this.Tag = tag ?? throw new ArgumentNullException("tag is a required property for PackageVersion and cannot be null"); + // to ensure "url" is required (not null) + this.Url = url ?? throw new ArgumentNullException("url is a required property for PackageVersion and cannot be null"); + this.Created = created; + // to ensure "digest" is required (not null) + this.Digest = digest ?? throw new ArgumentNullException("digest is a required property for PackageVersion and cannot be null"); + this.Annotations = annotations; + this.AppVersion = appVersion; + this.Keywords = keywords; + this.Maintainers = maintainers; + this.Home = home; + this.Sources = sources; + this.Icon = icon; + this.Deprecated = deprecated; + this.Description = description; + this.License = license; + this.Slug = slug; + // use default value if no "kind" provided + this.Kind = kind ?? ""; + this.Readme = readme; + this.Manifest = manifest; + + // Set non-required readonly properties with defaultValue + this.Type = "PackageVersion"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "PackageVersion"; + + /// + /// Package name. Make it descriptive and helpful ;) + /// + /// Package name. Make it descriptive and helpful ;) + [DataMember(Name = "name", IsRequired = true, EmitDefaultValue = false)] + public string Name { get; set; } + /// + /// The tag of the package + /// + /// The tag of the package + [DataMember(Name = "tag", IsRequired = true, EmitDefaultValue = false)] + public string Tag { get; set; } + /// + /// Gets or Sets Url + /// + [DataMember(Name = "url", IsRequired = true, EmitDefaultValue = false)] + public string Url { get; set; } + /// + /// Gets or Sets Created + /// + [DataMember(Name = "created", IsRequired = true, EmitDefaultValue = false)] + public DateTime Created { get; set; } + /// + /// Gets or Sets Digest + /// + [DataMember(Name = "digest", IsRequired = true, EmitDefaultValue = false)] + public string Digest { 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; } + /// + /// The version of the application code underlying the manifest + /// + /// The version of the application code underlying the manifest + [DataMember(Name = "app_version", EmitDefaultValue = false)] + public string AppVersion { get; set; } + /// + /// A list of keywords to search the package by + /// + /// A list of keywords to search the package by + [DataMember(Name = "keywords", EmitDefaultValue = false)] + public List Keywords { get; set; } + /// + /// A list of maintainers for the package + /// + /// A list of maintainers for the package + [DataMember(Name = "maintainers", EmitDefaultValue = false)] + public List Maintainers { get; set; } + /// + /// The URL of this package's home page + /// + /// The URL of this package's home page + [DataMember(Name = "home", EmitDefaultValue = false)] + public string Home { get; set; } + /// + /// A list of URLs to source code for this project + /// + /// A list of URLs to source code for this project + [DataMember(Name = "sources", EmitDefaultValue = false)] + public List Sources { get; set; } + /// + /// A URL to an SVG or PNG image to be used as an icon + /// + /// A URL to an SVG or PNG image to be used as an icon + [DataMember(Name = "icon", EmitDefaultValue = false)] + public string Icon { get; set; } + /// + /// Whether this package is deprecated + /// + /// Whether this package is deprecated + [DataMember(Name = "deprecated", EmitDefaultValue = false)] + public bool Deprecated { get; set; } + /// + /// A description of what this package does + /// + /// A description of what this package does + [DataMember(Name = "description", EmitDefaultValue = false)] + public string Description { get; set; } + /// + /// The license information. + /// + /// The license information. + [DataMember(Name = "license", EmitDefaultValue = false)] + public License License { get; set; } + /// + /// A slug of the repository name and the package name. + /// + /// A slug of the repository name and the package name. + [DataMember(Name = "slug", EmitDefaultValue = false)] + public string Slug { get; set; } + /// + /// The type of Queenbee package (ie: recipe or plugin) + /// + /// The type of Queenbee package (ie: recipe or plugin) + [DataMember(Name = "kind", EmitDefaultValue = true)] + public string Kind { get; set; } = ""; + /// + /// The README file string for this package + /// + /// The README file string for this package + [DataMember(Name = "readme", EmitDefaultValue = false)] + public string Readme { get; set; } + /// + /// The package Recipe or Plugin manifest + /// + /// The package Recipe or Plugin manifest + [DataMember(Name = "manifest", EmitDefaultValue = false)] + public AnyOf Manifest { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + return "PackageVersion"; + } + + /// + /// 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("PackageVersion:\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Tag: ").Append(Tag).Append("\n"); + sb.Append(" Url: ").Append(Url).Append("\n"); + sb.Append(" Created: ").Append(Created).Append("\n"); + sb.Append(" Digest: ").Append(Digest).Append("\n"); + sb.Append(" Annotations: ").Append(Annotations).Append("\n"); + sb.Append(" AppVersion: ").Append(AppVersion).Append("\n"); + sb.Append(" Keywords: ").Append(Keywords).Append("\n"); + sb.Append(" Maintainers: ").Append(Maintainers).Append("\n"); + sb.Append(" Home: ").Append(Home).Append("\n"); + sb.Append(" Sources: ").Append(Sources).Append("\n"); + sb.Append(" Icon: ").Append(Icon).Append("\n"); + sb.Append(" Deprecated: ").Append(Deprecated).Append("\n"); + sb.Append(" Description: ").Append(Description).Append("\n"); + sb.Append(" License: ").Append(License).Append("\n"); + sb.Append(" Slug: ").Append(Slug).Append("\n"); + sb.Append(" Kind: ").Append(Kind).Append("\n"); + sb.Append(" Readme: ").Append(Readme).Append("\n"); + sb.Append(" Manifest: ").Append(Manifest).Append("\n"); + return sb.ToString(); + } + + /// + /// Returns the object from JSON string + /// + /// PackageVersion object + public static PackageVersion 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. + /// + /// PackageVersion object + public virtual PackageVersion DuplicatePackageVersion() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicatePackageVersion(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel DuplicateOpenAPIGenBaseModel() + { + return DuplicatePackageVersion(); + } + + /// + /// 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 PackageVersion); + } + + /// + /// Returns true if PackageVersion instances are equal + /// + /// Instance of PackageVersion to be compared + /// Boolean + public bool Equals(PackageVersion 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.Tag == input.Tag || + (this.Tag != null && + this.Tag.Equals(input.Tag)) + ) && base.Equals(input) && + ( + this.Url == input.Url || + (this.Url != null && + this.Url.Equals(input.Url)) + ) && base.Equals(input) && + ( + this.Created == input.Created || + (this.Created != null && + this.Created.Equals(input.Created)) + ) && base.Equals(input) && + ( + this.Digest == input.Digest || + (this.Digest != null && + this.Digest.Equals(input.Digest)) + ) && base.Equals(input) && + ( + this.Annotations == input.Annotations || + this.Annotations != null && + input.Annotations != null && + this.Annotations.SequenceEqual(input.Annotations) + ) && base.Equals(input) && + ( + this.AppVersion == input.AppVersion || + (this.AppVersion != null && + this.AppVersion.Equals(input.AppVersion)) + ) && base.Equals(input) && + ( + this.Keywords == input.Keywords || + this.Keywords != null && + input.Keywords != null && + this.Keywords.SequenceEqual(input.Keywords) + ) && base.Equals(input) && + ( + this.Maintainers == input.Maintainers || + this.Maintainers != null && + input.Maintainers != null && + this.Maintainers.SequenceEqual(input.Maintainers) + ) && base.Equals(input) && + ( + this.Home == input.Home || + (this.Home != null && + this.Home.Equals(input.Home)) + ) && base.Equals(input) && + ( + this.Sources == input.Sources || + this.Sources != null && + input.Sources != null && + this.Sources.SequenceEqual(input.Sources) + ) && base.Equals(input) && + ( + this.Icon == input.Icon || + (this.Icon != null && + this.Icon.Equals(input.Icon)) + ) && base.Equals(input) && + ( + this.Deprecated == input.Deprecated || + (this.Deprecated != null && + this.Deprecated.Equals(input.Deprecated)) + ) && base.Equals(input) && + ( + this.Description == input.Description || + (this.Description != null && + this.Description.Equals(input.Description)) + ) && base.Equals(input) && + ( + this.License == input.License || + (this.License != null && + this.License.Equals(input.License)) + ) && base.Equals(input) && + ( + this.Slug == input.Slug || + (this.Slug != null && + this.Slug.Equals(input.Slug)) + ) && base.Equals(input) && + ( + this.Kind == input.Kind || + (this.Kind != null && + this.Kind.Equals(input.Kind)) + ) && base.Equals(input) && + ( + this.Readme == input.Readme || + (this.Readme != null && + this.Readme.Equals(input.Readme)) + ) && base.Equals(input) && + ( + this.Manifest == input.Manifest || + (this.Manifest != null && + this.Manifest.Equals(input.Manifest)) + ) && 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.Tag != null) + hashCode = hashCode * 59 + this.Tag.GetHashCode(); + if (this.Url != null) + hashCode = hashCode * 59 + this.Url.GetHashCode(); + if (this.Created != null) + hashCode = hashCode * 59 + this.Created.GetHashCode(); + if (this.Digest != null) + hashCode = hashCode * 59 + this.Digest.GetHashCode(); + if (this.Annotations != null) + hashCode = hashCode * 59 + this.Annotations.GetHashCode(); + if (this.AppVersion != null) + hashCode = hashCode * 59 + this.AppVersion.GetHashCode(); + if (this.Keywords != null) + hashCode = hashCode * 59 + this.Keywords.GetHashCode(); + if (this.Maintainers != null) + hashCode = hashCode * 59 + this.Maintainers.GetHashCode(); + if (this.Home != null) + hashCode = hashCode * 59 + this.Home.GetHashCode(); + if (this.Sources != null) + hashCode = hashCode * 59 + this.Sources.GetHashCode(); + if (this.Icon != null) + hashCode = hashCode * 59 + this.Icon.GetHashCode(); + if (this.Deprecated != null) + hashCode = hashCode * 59 + this.Deprecated.GetHashCode(); + if (this.Description != null) + hashCode = hashCode * 59 + this.Description.GetHashCode(); + if (this.License != null) + hashCode = hashCode * 59 + this.License.GetHashCode(); + if (this.Slug != null) + hashCode = hashCode * 59 + this.Slug.GetHashCode(); + if (this.Kind != null) + hashCode = hashCode * 59 + this.Kind.GetHashCode(); + if (this.Readme != null) + hashCode = hashCode * 59 + this.Readme.GetHashCode(); + if (this.Manifest != null) + hashCode = hashCode * 59 + this.Manifest.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(@"^PackageVersion$", 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/PathOutput.cs b/src/PollinationSDK/Model/PathOutput.cs new file mode 100644 index 000000000..79897076a --- /dev/null +++ b/src/PollinationSDK/Model/PathOutput.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 +{ + /// + /// Base class for output classes that source tha output from a path. An example of using PathOutput is TaskFile and TaskFolder outputs. + /// + [DataContract(Name = "PathOutput")] + public partial class PathOutput : GenericOutput, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected PathOutput() + { + // Set non-required readonly properties with defaultValue + this.Type = "PathOutput"; + } + + /// + /// Initializes a new instance of the class. + /// + /// Path to the output artifact relative to where the function command is executed. (required). + /// A boolean to indicate if an artifact output is required. A False value makes the artifact optional. (default to true). + /// Output name. (required). + /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. + /// Optional description for output.. + public PathOutput + ( + string name, string path, // Required parameters + Dictionary annotations= default, string description= default, bool required = true // Optional parameters + ) : base(name: name, annotations: annotations, description: description)// BaseClass + { + // to ensure "path" is required (not null) + this.Path = path ?? throw new ArgumentNullException("path is a required property for PathOutput and cannot be null"); + this.Required = required; + + // Set non-required readonly properties with defaultValue + this.Type = "PathOutput"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "PathOutput"; + + /// + /// Path to the output artifact relative to where the function command is executed. + /// + /// Path to the output artifact relative to where the function command is executed. + [DataMember(Name = "path", IsRequired = true, EmitDefaultValue = false)] + public string Path { get; set; } + /// + /// A boolean to indicate if an artifact output is required. A False value makes the artifact optional. + /// + /// A boolean to indicate if an artifact output is required. A False value makes the artifact optional. + [DataMember(Name = "required", EmitDefaultValue = true)] + public bool Required { get; set; } = true; + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + return "PathOutput"; + } + + /// + /// 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("PathOutput:\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Annotations: ").Append(Annotations).Append("\n"); + sb.Append(" Description: ").Append(Description).Append("\n"); + sb.Append(" Path: ").Append(Path).Append("\n"); + sb.Append(" Required: ").Append(Required).Append("\n"); + return sb.ToString(); + } + + /// + /// Returns the object from JSON string + /// + /// PathOutput object + public static PathOutput 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. + /// + /// PathOutput object + public virtual PathOutput DuplicatePathOutput() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicatePathOutput(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override GenericOutput DuplicateGenericOutput() + { + return DuplicatePathOutput(); + } + + /// + /// 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 PathOutput); + } + + /// + /// Returns true if PathOutput instances are equal + /// + /// Instance of PathOutput to be compared + /// Boolean + public bool Equals(PathOutput input) + { + if (input == null) + return false; + return base.Equals(input) && + ( + this.Path == input.Path || + (this.Path != null && + this.Path.Equals(input.Path)) + ) && base.Equals(input) && + ( + this.Required == input.Required || + (this.Required != null && + this.Required.Equals(input.Required)) + ) && 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.Path != null) + hashCode = hashCode * 59 + this.Path.GetHashCode(); + if (this.Required != null) + hashCode = hashCode * 59 + this.Required.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(@"^PathOutput$", 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/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/Permission.cs b/src/PollinationSDK/Model/Permission.cs new file mode 100644 index 000000000..f8f6c0cf3 --- /dev/null +++ b/src/PollinationSDK/Model/Permission.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 Permission + { + /// + /// Enum Admin for value: admin + /// + [EnumMember(Value = "admin")] + Admin = 1, + + /// + /// Enum Write for value: write + /// + [EnumMember(Value = "write")] + Write = 2, + + /// + /// Enum Read for value: read + /// + [EnumMember(Value = "read")] + Read = 3 + + } + +} diff --git a/src/PollinationSDK/Model/Plugin.cs b/src/PollinationSDK/Model/Plugin.cs new file mode 100644 index 000000000..0f4a92860 --- /dev/null +++ b/src/PollinationSDK/Model/Plugin.cs @@ -0,0 +1,284 @@ +/* + * 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 Queenbee Plugin. A plugin contains runtime configuration for a Command Line Interface (CLI) and a list of functions that can be executed using this CLI tool. + /// + [DataContract(Name = "Plugin")] + public partial class Plugin : OpenAPIGenBaseModel, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected Plugin() + { + // Set non-required readonly properties with defaultValue + this.Type = "Plugin"; + this.ApiVersion = "v1beta1"; + } + + /// + /// Initializes a new instance of the class. + /// + /// The Plugin metadata information (required). + /// The configuration information to run this plugin (required). + /// List of Plugin functions (required). + /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. + public Plugin + ( + MetaData metadata, PluginConfig config, List functions, // Required parameters + Dictionary annotations= default // Optional parameters + ) : base()// BaseClass + { + // to ensure "metadata" is required (not null) + this.Metadata = metadata ?? throw new ArgumentNullException("metadata is a required property for Plugin and cannot be null"); + // to ensure "config" is required (not null) + this.Config = config ?? throw new ArgumentNullException("config is a required property for Plugin and cannot be null"); + // to ensure "functions" is required (not null) + this.Functions = functions ?? throw new ArgumentNullException("functions is a required property for Plugin and cannot be null"); + this.Annotations = annotations; + + // Set non-required readonly properties with defaultValue + this.Type = "Plugin"; + this.ApiVersion = "v1beta1"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "Plugin"; + //============================================== is ReadOnly + /// + /// Gets or Sets ApiVersion + /// + [DataMember(Name = "api_version", EmitDefaultValue = true)] + public string ApiVersion { get; protected internal set; } = "v1beta1"; + + /// + /// The Plugin metadata information + /// + /// The Plugin metadata information + [DataMember(Name = "metadata", IsRequired = true, EmitDefaultValue = false)] + public MetaData Metadata { get; set; } + /// + /// The configuration information to run this plugin + /// + /// The configuration information to run this plugin + [DataMember(Name = "config", IsRequired = true, EmitDefaultValue = false)] + public PluginConfig Config { get; set; } + /// + /// List of Plugin functions + /// + /// List of Plugin functions + [DataMember(Name = "functions", IsRequired = true, EmitDefaultValue = false)] + public List Functions { 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; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + return "Plugin"; + } + + /// + /// 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("Plugin:\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Metadata: ").Append(Metadata).Append("\n"); + sb.Append(" Config: ").Append(Config).Append("\n"); + sb.Append(" Functions: ").Append(Functions).Append("\n"); + sb.Append(" Annotations: ").Append(Annotations).Append("\n"); + sb.Append(" ApiVersion: ").Append(ApiVersion).Append("\n"); + return sb.ToString(); + } + + /// + /// Returns the object from JSON string + /// + /// Plugin object + public static Plugin 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. + /// + /// Plugin object + public virtual Plugin DuplicatePlugin() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicatePlugin(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel DuplicateOpenAPIGenBaseModel() + { + return DuplicatePlugin(); + } + + /// + /// 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 Plugin); + } + + /// + /// Returns true if Plugin instances are equal + /// + /// Instance of Plugin to be compared + /// Boolean + public bool Equals(Plugin input) + { + if (input == null) + return false; + return base.Equals(input) && + ( + this.Metadata == input.Metadata || + (this.Metadata != null && + this.Metadata.Equals(input.Metadata)) + ) && base.Equals(input) && + ( + this.Config == input.Config || + (this.Config != null && + this.Config.Equals(input.Config)) + ) && base.Equals(input) && + ( + this.Functions == input.Functions || + this.Functions != null && + input.Functions != null && + this.Functions.SequenceEqual(input.Functions) + ) && base.Equals(input) && + ( + this.Type == input.Type || + (this.Type != null && + this.Type.Equals(input.Type)) + ) && 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)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = base.GetHashCode(); + if (this.Metadata != null) + hashCode = hashCode * 59 + this.Metadata.GetHashCode(); + if (this.Config != null) + hashCode = hashCode * 59 + this.Config.GetHashCode(); + if (this.Functions != null) + hashCode = hashCode * 59 + this.Functions.GetHashCode(); + if (this.Type != null) + hashCode = hashCode * 59 + this.Type.GetHashCode(); + if (this.Annotations != null) + hashCode = hashCode * 59 + this.Annotations.GetHashCode(); + if (this.ApiVersion != null) + hashCode = hashCode * 59 + this.ApiVersion.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(@"^Plugin", 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" }); + } + + + + // 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" }); + } + + yield break; + } + } +} diff --git a/src/PollinationSDK/Model/PluginConfig.cs b/src/PollinationSDK/Model/PluginConfig.cs new file mode 100644 index 000000000..3e06993df --- /dev/null +++ b/src/PollinationSDK/Model/PluginConfig.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 +{ + /// + /// Plugin configuration. The config is used to schedule functions on a desktop or in other contexts (ie: Docker). + /// + [DataContract(Name = "PluginConfig")] + public partial class PluginConfig : OpenAPIGenBaseModel, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected PluginConfig() + { + // Set non-required readonly properties with defaultValue + this.Type = "PluginConfig"; + } + + /// + /// Initializes a new instance of the class. + /// + /// The configuration to use this plugin in a docker container (required). + /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. + /// The configuration to use this plugin locally. + public PluginConfig + ( + DockerConfig docker, // Required parameters + Dictionary annotations= default, LocalConfig local= default// Optional parameters + ) : base()// BaseClass + { + // to ensure "docker" is required (not null) + this.Docker = docker ?? throw new ArgumentNullException("docker is a required property for PluginConfig and cannot be null"); + this.Annotations = annotations; + this.Local = local; + + // Set non-required readonly properties with defaultValue + this.Type = "PluginConfig"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "PluginConfig"; + + /// + /// The configuration to use this plugin in a docker container + /// + /// The configuration to use this plugin in a docker container + [DataMember(Name = "docker", IsRequired = true, EmitDefaultValue = false)] + public DockerConfig Docker { 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; } + /// + /// The configuration to use this plugin locally + /// + /// The configuration to use this plugin locally + [DataMember(Name = "local", EmitDefaultValue = false)] + public LocalConfig Local { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + return "PluginConfig"; + } + + /// + /// 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("PluginConfig:\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Docker: ").Append(Docker).Append("\n"); + sb.Append(" Annotations: ").Append(Annotations).Append("\n"); + sb.Append(" Local: ").Append(Local).Append("\n"); + return sb.ToString(); + } + + /// + /// Returns the object from JSON string + /// + /// PluginConfig object + public static PluginConfig 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. + /// + /// PluginConfig object + public virtual PluginConfig DuplicatePluginConfig() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicatePluginConfig(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel DuplicateOpenAPIGenBaseModel() + { + return DuplicatePluginConfig(); + } + + /// + /// 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 PluginConfig); + } + + /// + /// Returns true if PluginConfig instances are equal + /// + /// Instance of PluginConfig to be compared + /// Boolean + public bool Equals(PluginConfig input) + { + if (input == null) + return false; + return base.Equals(input) && + ( + this.Docker == input.Docker || + (this.Docker != null && + this.Docker.Equals(input.Docker)) + ) && base.Equals(input) && + ( + this.Type == input.Type || + (this.Type != null && + this.Type.Equals(input.Type)) + ) && base.Equals(input) && + ( + this.Annotations == input.Annotations || + this.Annotations != null && + input.Annotations != null && + this.Annotations.SequenceEqual(input.Annotations) + ) && base.Equals(input) && + ( + this.Local == input.Local || + (this.Local != null && + this.Local.Equals(input.Local)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = base.GetHashCode(); + if (this.Docker != null) + hashCode = hashCode * 59 + this.Docker.GetHashCode(); + if (this.Type != null) + hashCode = hashCode * 59 + this.Type.GetHashCode(); + if (this.Annotations != null) + hashCode = hashCode * 59 + this.Annotations.GetHashCode(); + if (this.Local != null) + hashCode = hashCode * 59 + this.Local.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(@"^PluginConfig", 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/PluginPackage.cs b/src/PollinationSDK/Model/PluginPackage.cs new file mode 100644 index 000000000..571fdd95e --- /dev/null +++ b/src/PollinationSDK/Model/PluginPackage.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 +{ + /// + /// PluginPackage + /// + [DataContract(Name = "PluginPackage")] + public partial class PluginPackage : RepositoryPackage, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected PluginPackage() + { + // Set non-required readonly properties with defaultValue + this.Type = "PluginPackage"; + } + + /// + /// Initializes a new instance of the class. + /// + /// manifest (required). + /// The new package digest (required). + /// The new package tag (required). + /// keywords. + /// description. + /// icon. + /// Creation Timestamp. + /// The Repository Readme. + public PluginPackage + ( + string digest, string tag, Plugin manifest, // Required parameters + List keywords= default, string description= default, string icon= default, DateTime createdAt= default, string readme= default // Optional parameters + ) : base(digest: digest, tag: tag, keywords: keywords, description: description, icon: icon, createdAt: createdAt, readme: readme)// BaseClass + { + // to ensure "manifest" is required (not null) + this.Manifest = manifest ?? throw new ArgumentNullException("manifest is a required property for PluginPackage and cannot be null"); + + // Set non-required readonly properties with defaultValue + this.Type = "PluginPackage"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "PluginPackage"; + + /// + /// Gets or Sets Manifest + /// + [DataMember(Name = "manifest", IsRequired = true, EmitDefaultValue = false)] + public Plugin Manifest { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + return "PluginPackage"; + } + + /// + /// 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("PluginPackage:\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Digest: ").Append(Digest).Append("\n"); + sb.Append(" Tag: ").Append(Tag).Append("\n"); + sb.Append(" Keywords: ").Append(Keywords).Append("\n"); + sb.Append(" Description: ").Append(Description).Append("\n"); + sb.Append(" Icon: ").Append(Icon).Append("\n"); + sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n"); + sb.Append(" Readme: ").Append(Readme).Append("\n"); + sb.Append(" Manifest: ").Append(Manifest).Append("\n"); + return sb.ToString(); + } + + /// + /// Returns the object from JSON string + /// + /// PluginPackage object + public static PluginPackage 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. + /// + /// PluginPackage object + public virtual PluginPackage DuplicatePluginPackage() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicatePluginPackage(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override RepositoryPackage DuplicateRepositoryPackage() + { + return DuplicatePluginPackage(); + } + + /// + /// 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 PluginPackage); + } + + /// + /// Returns true if PluginPackage instances are equal + /// + /// Instance of PluginPackage to be compared + /// Boolean + public bool Equals(PluginPackage input) + { + if (input == null) + return false; + return base.Equals(input) && + ( + this.Manifest == input.Manifest || + (this.Manifest != null && + this.Manifest.Equals(input.Manifest)) + ) && 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.Manifest != null) + hashCode = hashCode * 59 + this.Manifest.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(@"^PluginPackage$", 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/PluginPackageList.cs b/src/PollinationSDK/Model/PluginPackageList.cs new file mode 100644 index 000000000..4f691883f --- /dev/null +++ b/src/PollinationSDK/Model/PluginPackageList.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 = "PluginPackageList")] + public partial class PluginPackageList : OpenAPIGenBaseModel, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected PluginPackageList() + { + // Set non-required readonly properties with defaultValue + this.Type = "PluginPackageList"; + } + + /// + /// 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 PluginPackageList + ( + 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 PluginPackageList and cannot be null"); + this.NextPage = nextPage; + + // Set non-required readonly properties with defaultValue + this.Type = "PluginPackageList"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "PluginPackageList"; + + /// + /// 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 "PluginPackageList"; + } + + /// + /// 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("PluginPackageList:\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 + /// + /// PluginPackageList object + public static PluginPackageList 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. + /// + /// PluginPackageList object + public virtual PluginPackageList DuplicatePluginPackageList() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicatePluginPackageList(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel DuplicateOpenAPIGenBaseModel() + { + return DuplicatePluginPackageList(); + } + + /// + /// 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 PluginPackageList); + } + + /// + /// Returns true if PluginPackageList instances are equal + /// + /// Instance of PluginPackageList to be compared + /// Boolean + public bool Equals(PluginPackageList 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(@"^PluginPackageList$", 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/PolicySubject.cs b/src/PollinationSDK/Model/PolicySubject.cs new file mode 100644 index 000000000..226d6ca4a --- /dev/null +++ b/src/PollinationSDK/Model/PolicySubject.cs @@ -0,0 +1,232 @@ +/* + * 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 +{ + /// + /// PolicySubject + /// + [DataContract(Name = "PolicySubject")] + public partial class PolicySubject : OpenAPIGenBaseModel, IEquatable, IValidatableObject + { + /// + /// Gets or Sets SubjectType + /// + [DataMember(Name="subject_type", EmitDefaultValue=false)] + public SubjectType SubjectType { get; set; } + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected PolicySubject() + { + // Set non-required readonly properties with defaultValue + this.Type = "PolicySubject"; + } + + /// + /// Initializes a new instance of the class. + /// + /// subjectType (required). + /// The name of the policy subject (required). + public PolicySubject + ( + SubjectType subjectType, string name// Required parameters + // Optional parameters + ) : base()// BaseClass + { + this.SubjectType = subjectType; + // to ensure "name" is required (not null) + this.Name = name ?? throw new ArgumentNullException("name is a required property for PolicySubject and cannot be null"); + + // Set non-required readonly properties with defaultValue + this.Type = "PolicySubject"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "PolicySubject"; + + /// + /// The name of the policy subject + /// + /// The name of the policy subject + [DataMember(Name = "name", IsRequired = true, EmitDefaultValue = false)] + public string Name { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + return "PolicySubject"; + } + + /// + /// 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("PolicySubject:\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 + /// + /// PolicySubject object + public static PolicySubject 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. + /// + /// PolicySubject object + public virtual PolicySubject DuplicatePolicySubject() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicatePolicySubject(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel DuplicateOpenAPIGenBaseModel() + { + return DuplicatePolicySubject(); + } + + /// + /// 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 PolicySubject); + } + + /// + /// Returns true if PolicySubject instances are equal + /// + /// Instance of PolicySubject to be compared + /// Boolean + public bool Equals(PolicySubject input) + { + if (input == null) + return false; + return base.Equals(input) && + ( + this.SubjectType == input.SubjectType || + (this.SubjectType != null && + this.SubjectType.Equals(input.SubjectType)) + ) && 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)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = base.GetHashCode(); + if (this.SubjectType != null) + hashCode = hashCode * 59 + this.SubjectType.GetHashCode(); + if (this.Name != null) + hashCode = hashCode * 59 + this.Name.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(@"^PolicySubject$", 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/Project.cs b/src/PollinationSDK/Model/Project.cs new file mode 100644 index 000000000..bee683aa9 --- /dev/null +++ b/src/PollinationSDK/Model/Project.cs @@ -0,0 +1,279 @@ +/* + * 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 +{ + /// + /// Project + /// + [DataContract(Name = "Project")] + public partial class Project : ProjectCreate, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected Project() + { + // Set non-required readonly properties with defaultValue + this.Type = "Project"; + } + + /// + /// Initializes a new instance of the class. + /// + /// The project ID (required). + /// The project owner (required). + /// permissions (required). + /// The project name in slug format (required). + /// The resource consumption of this project. + /// The name of the project. Must be unique to a given owner (required). + /// A description of the project (default to ""). + /// Whether or not a project is publicly viewable (default to true). + public Project + ( + string name, string id, AccountPublic owner, UserPermission permissions, string slug, // Required parameters + string description = "", bool _public = true, Usage usage= default // Optional parameters + ) : base(name: name, description: description, _public: _public)// BaseClass + { + // to ensure "id" is required (not null) + this.Id = id ?? throw new ArgumentNullException("id is a required property for Project and cannot be null"); + // to ensure "owner" is required (not null) + this.Owner = owner ?? throw new ArgumentNullException("owner is a required property for Project and cannot be null"); + // to ensure "permissions" is required (not null) + this.Permissions = permissions ?? throw new ArgumentNullException("permissions is a required property for Project and cannot be null"); + // to ensure "slug" is required (not null) + this.Slug = slug ?? throw new ArgumentNullException("slug is a required property for Project and cannot be null"); + this.Usage = usage; + + // Set non-required readonly properties with defaultValue + this.Type = "Project"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "Project"; + + /// + /// The project ID + /// + /// The project ID + [DataMember(Name = "id", IsRequired = true, EmitDefaultValue = false)] + public string Id { get; set; } + /// + /// The project owner + /// + /// The project owner + [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 project name in slug format + /// + /// The project name in slug format + [DataMember(Name = "slug", IsRequired = true, EmitDefaultValue = false)] + public string Slug { get; set; } + /// + /// The resource consumption of this project + /// + /// The resource consumption of this project + [DataMember(Name = "usage", EmitDefaultValue = false)] + public Usage Usage { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + return "Project"; + } + + /// + /// 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("Project:\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Description: ").Append(Description).Append("\n"); + sb.Append(" Public: ").Append(Public).Append("\n"); + sb.Append(" Id: ").Append(Id).Append("\n"); + sb.Append(" Owner: ").Append(Owner).Append("\n"); + sb.Append(" Permissions: ").Append(Permissions).Append("\n"); + sb.Append(" Slug: ").Append(Slug).Append("\n"); + sb.Append(" Usage: ").Append(Usage).Append("\n"); + return sb.ToString(); + } + + /// + /// Returns the object from JSON string + /// + /// Project object + public static Project 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. + /// + /// Project object + public virtual Project DuplicateProject() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateProject(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override ProjectCreate DuplicateProjectCreate() + { + return DuplicateProject(); + } + + /// + /// 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 Project); + } + + /// + /// Returns true if Project instances are equal + /// + /// Instance of Project to be compared + /// Boolean + public bool Equals(Project 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.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.Slug == input.Slug || + (this.Slug != null && + this.Slug.Equals(input.Slug)) + ) && base.Equals(input) && + ( + this.Usage == input.Usage || + (this.Usage != null && + this.Usage.Equals(input.Usage)) + ) && 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.Owner != null) + hashCode = hashCode * 59 + this.Owner.GetHashCode(); + if (this.Permissions != null) + hashCode = hashCode * 59 + this.Permissions.GetHashCode(); + if (this.Slug != null) + hashCode = hashCode * 59 + this.Slug.GetHashCode(); + if (this.Usage != null) + hashCode = hashCode * 59 + this.Usage.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(@"^Project$", 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/ProjectAccessPolicy.cs b/src/PollinationSDK/Model/ProjectAccessPolicy.cs new file mode 100644 index 000000000..be4987690 --- /dev/null +++ b/src/PollinationSDK/Model/ProjectAccessPolicy.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 +{ + /// + /// ProjectAccessPolicy + /// + [DataContract(Name = "ProjectAccessPolicy")] + public partial class ProjectAccessPolicy : OpenAPIGenBaseModel, IEquatable, IValidatableObject + { + /// + /// The permission given to the subject of the access policy + /// + /// The permission given to the subject of the access policy + [DataMember(Name="permission", EmitDefaultValue=false)] + public Permission Permission { get; set; } + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected ProjectAccessPolicy() + { + // Set non-required readonly properties with defaultValue + this.Type = "ProjectAccessPolicy"; + } + + /// + /// Initializes a new instance of the class. + /// + /// The subject of the access policy (required). + /// The permission given to the subject of the access policy (required). + public ProjectAccessPolicy + ( + PolicySubject 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 ProjectAccessPolicy and cannot be null"); + this.Permission = permission; + + // Set non-required readonly properties with defaultValue + this.Type = "ProjectAccessPolicy"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "ProjectAccessPolicy"; + + /// + /// 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 "ProjectAccessPolicy"; + } + + /// + /// 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("ProjectAccessPolicy:\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 + /// + /// ProjectAccessPolicy object + public static ProjectAccessPolicy 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. + /// + /// ProjectAccessPolicy object + public virtual ProjectAccessPolicy DuplicateProjectAccessPolicy() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateProjectAccessPolicy(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel DuplicateOpenAPIGenBaseModel() + { + return DuplicateProjectAccessPolicy(); + } + + /// + /// 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 ProjectAccessPolicy); + } + + /// + /// Returns true if ProjectAccessPolicy instances are equal + /// + /// Instance of ProjectAccessPolicy to be compared + /// Boolean + public bool Equals(ProjectAccessPolicy 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(@"^ProjectAccessPolicy$", 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/ProjectAccessPolicyList.cs b/src/PollinationSDK/Model/ProjectAccessPolicyList.cs new file mode 100644 index 000000000..9bfc5ac1a --- /dev/null +++ b/src/PollinationSDK/Model/ProjectAccessPolicyList.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 = "ProjectAccessPolicyList")] + public partial class ProjectAccessPolicyList : OpenAPIGenBaseModel, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected ProjectAccessPolicyList() + { + // Set non-required readonly properties with defaultValue + this.Type = "ProjectAccessPolicyList"; + } + + /// + /// 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 ProjectAccessPolicyList + ( + 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 ProjectAccessPolicyList and cannot be null"); + this.NextPage = nextPage; + + // Set non-required readonly properties with defaultValue + this.Type = "ProjectAccessPolicyList"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "ProjectAccessPolicyList"; + + /// + /// 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 "ProjectAccessPolicyList"; + } + + /// + /// 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("ProjectAccessPolicyList:\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 + /// + /// ProjectAccessPolicyList object + public static ProjectAccessPolicyList 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. + /// + /// ProjectAccessPolicyList object + public virtual ProjectAccessPolicyList DuplicateProjectAccessPolicyList() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateProjectAccessPolicyList(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel DuplicateOpenAPIGenBaseModel() + { + return DuplicateProjectAccessPolicyList(); + } + + /// + /// 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 ProjectAccessPolicyList); + } + + /// + /// Returns true if ProjectAccessPolicyList instances are equal + /// + /// Instance of ProjectAccessPolicyList to be compared + /// Boolean + public bool Equals(ProjectAccessPolicyList 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(@"^ProjectAccessPolicyList$", 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/ProjectCreate.cs b/src/PollinationSDK/Model/ProjectCreate.cs new file mode 100644 index 000000000..d28b0a7e1 --- /dev/null +++ b/src/PollinationSDK/Model/ProjectCreate.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 +{ + /// + /// ProjectCreate + /// + [DataContract(Name = "ProjectCreate")] + public partial class ProjectCreate : OpenAPIGenBaseModel, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected ProjectCreate() + { + // Set non-required readonly properties with defaultValue + this.Type = "ProjectCreate"; + } + + /// + /// Initializes a new instance of the class. + /// + /// The name of the project. Must be unique to a given owner (required). + /// A description of the project (default to ""). + /// Whether or not a project is publicly viewable (default to true). + public ProjectCreate + ( + string name, // Required parameters + string description = "", bool _public = true // Optional parameters + ) : base()// BaseClass + { + // to ensure "name" is required (not null) + this.Name = name ?? throw new ArgumentNullException("name is a required property for ProjectCreate and cannot be null"); + // use default value if no "description" provided + this.Description = description ?? ""; + this.Public = _public; + + // Set non-required readonly properties with defaultValue + this.Type = "ProjectCreate"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "ProjectCreate"; + + /// + /// The name of the project. Must be unique to a given owner + /// + /// The name of the project. Must be unique to a given owner + [DataMember(Name = "name", IsRequired = true, EmitDefaultValue = false)] + public string Name { get; set; } + /// + /// A description of the project + /// + /// A description of the project + [DataMember(Name = "description", EmitDefaultValue = true)] + public string Description { get; set; } = ""; + /// + /// Whether or not a project is publicly viewable + /// + /// Whether or not a project is publicly viewable + [DataMember(Name = "public", EmitDefaultValue = true)] + public bool Public { get; set; } = true; + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + return "ProjectCreate"; + } + + /// + /// 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("ProjectCreate:\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Description: ").Append(Description).Append("\n"); + sb.Append(" Public: ").Append(Public).Append("\n"); + return sb.ToString(); + } + + /// + /// Returns the object from JSON string + /// + /// ProjectCreate object + public static ProjectCreate 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. + /// + /// ProjectCreate object + public virtual ProjectCreate DuplicateProjectCreate() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateProjectCreate(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel DuplicateOpenAPIGenBaseModel() + { + return DuplicateProjectCreate(); + } + + /// + /// 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 ProjectCreate); + } + + /// + /// Returns true if ProjectCreate instances are equal + /// + /// Instance of ProjectCreate to be compared + /// Boolean + public bool Equals(ProjectCreate 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.Description == input.Description || + (this.Description != null && + this.Description.Equals(input.Description)) + ) && base.Equals(input) && + ( + this.Public == input.Public || + (this.Public != null && + this.Public.Equals(input.Public)) + ) && 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.Description != null) + hashCode = hashCode * 59 + this.Description.GetHashCode(); + if (this.Public != null) + hashCode = hashCode * 59 + this.Public.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(@"^ProjectCreate$", 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/ProjectFolder.cs b/src/PollinationSDK/Model/ProjectFolder.cs new file mode 100644 index 000000000..f27e378f6 --- /dev/null +++ b/src/PollinationSDK/Model/ProjectFolder.cs @@ -0,0 +1,198 @@ +/* + * 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 +{ + /// + /// Project Folder Source This is the path to a folder where files and folders can be sourced. In the context of a desktop run Workflow this folder will correspond to a local folder. In the context of a workflow run on Pollination this folder will correspond to a Project scoped folder. + /// + [DataContract(Name = "ProjectFolder")] + public partial class ProjectFolder : ArtifactSource, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// The path to a folder where files and folders can be sourced. For a local filesystem this can be \"C:\\Users\\me\\jobs\\test\".. + /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. + public ProjectFolder + ( + // Required parameters + Dictionary annotations= default, string path= default // Optional parameters + ) : base(annotations: annotations)// BaseClass + { + this.Path = path; + + // Set non-required readonly properties with defaultValue + this.Type = "ProjectFolder"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "ProjectFolder"; + + /// + /// The path to a folder where files and folders can be sourced. For a local filesystem this can be \"C:\\Users\\me\\jobs\\test\". + /// + /// The path to a folder where files and folders can be sourced. For a local filesystem this can be \"C:\\Users\\me\\jobs\\test\". + [DataMember(Name = "path", EmitDefaultValue = false)] + public string Path { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + return "ProjectFolder"; + } + + /// + /// 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("ProjectFolder:\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Annotations: ").Append(Annotations).Append("\n"); + sb.Append(" Path: ").Append(Path).Append("\n"); + return sb.ToString(); + } + + /// + /// Returns the object from JSON string + /// + /// ProjectFolder object + public static ProjectFolder 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. + /// + /// ProjectFolder object + public virtual ProjectFolder DuplicateProjectFolder() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateProjectFolder(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override ArtifactSource DuplicateArtifactSource() + { + return DuplicateProjectFolder(); + } + + /// + /// 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 ProjectFolder); + } + + /// + /// Returns true if ProjectFolder instances are equal + /// + /// Instance of ProjectFolder to be compared + /// Boolean + public bool Equals(ProjectFolder input) + { + if (input == null) + return false; + return base.Equals(input) && + ( + this.Path == input.Path || + (this.Path != null && + this.Path.Equals(input.Path)) + ) && 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.Path != null) + hashCode = hashCode * 59 + this.Path.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(@"^ProjectFolder$", 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/ProjectList.cs b/src/PollinationSDK/Model/ProjectList.cs new file mode 100644 index 000000000..955b90745 --- /dev/null +++ b/src/PollinationSDK/Model/ProjectList.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 = "ProjectList")] + public partial class ProjectList : OpenAPIGenBaseModel, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected ProjectList() + { + // Set non-required readonly properties with defaultValue + this.Type = "ProjectList"; + } + + /// + /// 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 ProjectList + ( + 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 ProjectList and cannot be null"); + this.NextPage = nextPage; + + // Set non-required readonly properties with defaultValue + this.Type = "ProjectList"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "ProjectList"; + + /// + /// 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 "ProjectList"; + } + + /// + /// 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("ProjectList:\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 + /// + /// ProjectList object + public static ProjectList 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. + /// + /// ProjectList object + public virtual ProjectList DuplicateProjectList() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateProjectList(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel DuplicateOpenAPIGenBaseModel() + { + return DuplicateProjectList(); + } + + /// + /// 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 ProjectList); + } + + /// + /// Returns true if ProjectList instances are equal + /// + /// Instance of ProjectList to be compared + /// Boolean + public bool Equals(ProjectList 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(@"^ProjectList$", 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/ProjectPolicySubject.cs b/src/PollinationSDK/Model/ProjectPolicySubject.cs new file mode 100644 index 000000000..5ad0f4301 --- /dev/null +++ b/src/PollinationSDK/Model/ProjectPolicySubject.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 +{ + /// + /// ProjectPolicySubject + /// + [DataContract(Name = "ProjectPolicySubject")] + public partial class ProjectPolicySubject : PolicySubject, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected ProjectPolicySubject() + { + // Set non-required readonly properties with defaultValue + this.Type = "ProjectPolicySubject"; + } + + /// + /// Initializes a new instance of the class. + /// + /// subjectType (required). + /// The name of the policy subject (required). + public ProjectPolicySubject + ( + SubjectType subjectType, string name// Required parameters + // Optional parameters + ) : base(subjectType: subjectType, name: name)// BaseClass + { + + // Set non-required readonly properties with defaultValue + this.Type = "ProjectPolicySubject"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "ProjectPolicySubject"; + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + return "ProjectPolicySubject"; + } + + /// + /// 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("ProjectPolicySubject:\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 + /// + /// ProjectPolicySubject object + public static ProjectPolicySubject 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. + /// + /// ProjectPolicySubject object + public virtual ProjectPolicySubject DuplicateProjectPolicySubject() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateProjectPolicySubject(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override PolicySubject DuplicatePolicySubject() + { + return DuplicateProjectPolicySubject(); + } + + /// + /// 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 ProjectPolicySubject); + } + + /// + /// Returns true if ProjectPolicySubject instances are equal + /// + /// Instance of ProjectPolicySubject to be compared + /// Boolean + public bool Equals(ProjectPolicySubject 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(@"^ProjectPolicySubject$", 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/ProjectRecipeFilter.cs b/src/PollinationSDK/Model/ProjectRecipeFilter.cs new file mode 100644 index 000000000..e8afee549 --- /dev/null +++ b/src/PollinationSDK/Model/ProjectRecipeFilter.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 +{ + /// + /// ProjectRecipeFilter + /// + [DataContract(Name = "ProjectRecipeFilter")] + public partial class ProjectRecipeFilter : OpenAPIGenBaseModel, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected ProjectRecipeFilter() + { + // Set non-required readonly properties with defaultValue + this.Type = "ProjectRecipeFilter"; + } + + /// + /// Initializes a new instance of the class. + /// + /// The name of the account the recipe belongs to (required). + /// The name of the recipe (required). + /// The specific recipe tag. + public ProjectRecipeFilter + ( + string owner, string name, // Required parameters + string tag= default // Optional parameters + ) : base()// BaseClass + { + // to ensure "owner" is required (not null) + this.Owner = owner ?? throw new ArgumentNullException("owner is a required property for ProjectRecipeFilter and cannot be null"); + // to ensure "name" is required (not null) + this.Name = name ?? throw new ArgumentNullException("name is a required property for ProjectRecipeFilter and cannot be null"); + this.Tag = tag; + + // Set non-required readonly properties with defaultValue + this.Type = "ProjectRecipeFilter"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "ProjectRecipeFilter"; + + /// + /// The name of the account the recipe belongs to + /// + /// The name of the account the recipe belongs to + [DataMember(Name = "owner", IsRequired = true, EmitDefaultValue = false)] + public string Owner { get; set; } + /// + /// The name of the recipe + /// + /// The name of the recipe + [DataMember(Name = "name", IsRequired = true, EmitDefaultValue = false)] + public string Name { get; set; } + /// + /// The specific recipe tag + /// + /// The specific recipe tag + [DataMember(Name = "tag", EmitDefaultValue = false)] + public string Tag { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + return "ProjectRecipeFilter"; + } + + /// + /// 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("ProjectRecipeFilter:\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Owner: ").Append(Owner).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Tag: ").Append(Tag).Append("\n"); + return sb.ToString(); + } + + /// + /// Returns the object from JSON string + /// + /// ProjectRecipeFilter object + public static ProjectRecipeFilter 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. + /// + /// ProjectRecipeFilter object + public virtual ProjectRecipeFilter DuplicateProjectRecipeFilter() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateProjectRecipeFilter(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel DuplicateOpenAPIGenBaseModel() + { + return DuplicateProjectRecipeFilter(); + } + + /// + /// 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 ProjectRecipeFilter); + } + + /// + /// Returns true if ProjectRecipeFilter instances are equal + /// + /// Instance of ProjectRecipeFilter to be compared + /// Boolean + public bool Equals(ProjectRecipeFilter input) + { + if (input == null) + return false; + return base.Equals(input) && + ( + this.Owner == input.Owner || + (this.Owner != null && + this.Owner.Equals(input.Owner)) + ) && base.Equals(input) && + ( + this.Name == input.Name || + (this.Name != null && + this.Name.Equals(input.Name)) + ) && base.Equals(input) && + ( + this.Tag == input.Tag || + (this.Tag != null && + this.Tag.Equals(input.Tag)) + ) && 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.Owner != null) + hashCode = hashCode * 59 + this.Owner.GetHashCode(); + if (this.Name != null) + hashCode = hashCode * 59 + this.Name.GetHashCode(); + if (this.Tag != null) + hashCode = hashCode * 59 + this.Tag.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(@"^ProjectRecipeFilter$", 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/ProjectRecipeFilterList.cs b/src/PollinationSDK/Model/ProjectRecipeFilterList.cs new file mode 100644 index 000000000..75b243e31 --- /dev/null +++ b/src/PollinationSDK/Model/ProjectRecipeFilterList.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 = "ProjectRecipeFilterList")] + public partial class ProjectRecipeFilterList : OpenAPIGenBaseModel, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected ProjectRecipeFilterList() + { + // Set non-required readonly properties with defaultValue + this.Type = "ProjectRecipeFilterList"; + } + + /// + /// 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 ProjectRecipeFilterList + ( + 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 ProjectRecipeFilterList and cannot be null"); + this.NextPage = nextPage; + + // Set non-required readonly properties with defaultValue + this.Type = "ProjectRecipeFilterList"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "ProjectRecipeFilterList"; + + /// + /// 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 "ProjectRecipeFilterList"; + } + + /// + /// 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("ProjectRecipeFilterList:\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 + /// + /// ProjectRecipeFilterList object + public static ProjectRecipeFilterList 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. + /// + /// ProjectRecipeFilterList object + public virtual ProjectRecipeFilterList DuplicateProjectRecipeFilterList() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateProjectRecipeFilterList(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel DuplicateOpenAPIGenBaseModel() + { + return DuplicateProjectRecipeFilterList(); + } + + /// + /// 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 ProjectRecipeFilterList); + } + + /// + /// Returns true if ProjectRecipeFilterList instances are equal + /// + /// Instance of ProjectRecipeFilterList to be compared + /// Boolean + public bool Equals(ProjectRecipeFilterList 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(@"^ProjectRecipeFilterList$", 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/ProjectUpdate.cs b/src/PollinationSDK/Model/ProjectUpdate.cs new file mode 100644 index 000000000..e88536fe7 --- /dev/null +++ b/src/PollinationSDK/Model/ProjectUpdate.cs @@ -0,0 +1,228 @@ +/* + * 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 +{ + /// + /// ProjectUpdate + /// + [DataContract(Name = "ProjectUpdate")] + public partial class ProjectUpdate : OpenAPIGenBaseModel, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// The name of the project. Must be unique to a given owner. + /// A description of the project. + /// Whether or not a project is publicly viewable. + public ProjectUpdate + ( + // Required parameters + string name= default, string description= default, bool _public= default // Optional parameters + ) : base()// BaseClass + { + this.Name = name; + this.Description = description; + this.Public = _public; + + // Set non-required readonly properties with defaultValue + this.Type = "ProjectUpdate"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "ProjectUpdate"; + + /// + /// The name of the project. Must be unique to a given owner + /// + /// The name of the project. Must be unique to a given owner + [DataMember(Name = "name", EmitDefaultValue = false)] + public string Name { get; set; } + /// + /// A description of the project + /// + /// A description of the project + [DataMember(Name = "description", EmitDefaultValue = false)] + public string Description { get; set; } + /// + /// Whether or not a project is publicly viewable + /// + /// Whether or not a project is publicly viewable + [DataMember(Name = "public", EmitDefaultValue = false)] + public bool Public { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + return "ProjectUpdate"; + } + + /// + /// 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("ProjectUpdate:\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Description: ").Append(Description).Append("\n"); + sb.Append(" Public: ").Append(Public).Append("\n"); + return sb.ToString(); + } + + /// + /// Returns the object from JSON string + /// + /// ProjectUpdate object + public static ProjectUpdate 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. + /// + /// ProjectUpdate object + public virtual ProjectUpdate DuplicateProjectUpdate() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateProjectUpdate(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel DuplicateOpenAPIGenBaseModel() + { + return DuplicateProjectUpdate(); + } + + /// + /// 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 ProjectUpdate); + } + + /// + /// Returns true if ProjectUpdate instances are equal + /// + /// Instance of ProjectUpdate to be compared + /// Boolean + public bool Equals(ProjectUpdate 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.Description == input.Description || + (this.Description != null && + this.Description.Equals(input.Description)) + ) && base.Equals(input) && + ( + this.Public == input.Public || + (this.Public != null && + this.Public.Equals(input.Public)) + ) && 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.Description != null) + hashCode = hashCode * 59 + this.Description.GetHashCode(); + if (this.Public != null) + hashCode = hashCode * 59 + this.Public.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(@"^ProjectUpdate$", 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/PublicAccountList.cs b/src/PollinationSDK/Model/PublicAccountList.cs new file mode 100644 index 000000000..9f55b9356 --- /dev/null +++ b/src/PollinationSDK/Model/PublicAccountList.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 = "PublicAccountList")] + public partial class PublicAccountList : OpenAPIGenBaseModel, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected PublicAccountList() + { + // Set non-required readonly properties with defaultValue + this.Type = "PublicAccountList"; + } + + /// + /// 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 PublicAccountList + ( + 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 PublicAccountList and cannot be null"); + this.NextPage = nextPage; + + // Set non-required readonly properties with defaultValue + this.Type = "PublicAccountList"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "PublicAccountList"; + + /// + /// 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 "PublicAccountList"; + } + + /// + /// 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("PublicAccountList:\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 + /// + /// PublicAccountList object + public static PublicAccountList 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. + /// + /// PublicAccountList object + public virtual PublicAccountList DuplicatePublicAccountList() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicatePublicAccountList(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel DuplicateOpenAPIGenBaseModel() + { + return DuplicatePublicAccountList(); + } + + /// + /// 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 PublicAccountList); + } + + /// + /// Returns true if PublicAccountList instances are equal + /// + /// Instance of PublicAccountList to be compared + /// Boolean + public bool Equals(PublicAccountList 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(@"^PublicAccountList$", 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/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/Recipe.cs b/src/PollinationSDK/Model/Recipe.cs new file mode 100644 index 000000000..53520a885 --- /dev/null +++ b/src/PollinationSDK/Model/Recipe.cs @@ -0,0 +1,283 @@ +/* + * 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 Queenbee Recipe + /// + [DataContract(Name = "Recipe")] + public partial class Recipe : OpenAPIGenBaseModel, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected Recipe() + { + // Set non-required readonly properties with defaultValue + this.Type = "Recipe"; + this.ApiVersion = "v1beta1"; + } + + /// + /// Initializes a new instance of the class. + /// + /// A list of tasks to create a DAG recipe. (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 Recipe + ( + List flow, // 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 Recipe and cannot be null"); + this.Annotations = annotations; + this.Metadata = metadata; + this.Dependencies = dependencies; + + // Set non-required readonly properties with defaultValue + this.Type = "Recipe"; + this.ApiVersion = "v1beta1"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "Recipe"; + //============================================== is ReadOnly + /// + /// Gets or Sets ApiVersion + /// + [DataMember(Name = "api_version", EmitDefaultValue = true)] + public string ApiVersion { get; protected internal set; } = "v1beta1"; + + /// + /// 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; } + /// + /// 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 "Recipe"; + } + + /// + /// 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("Recipe:\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Flow: ").Append(Flow).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 + /// + /// Recipe object + public static Recipe 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. + /// + /// Recipe object + public virtual Recipe DuplicateRecipe() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateRecipe(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel DuplicateOpenAPIGenBaseModel() + { + return DuplicateRecipe(); + } + + /// + /// 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 Recipe); + } + + /// + /// Returns true if Recipe instances are equal + /// + /// Instance of Recipe to be compared + /// Boolean + public bool Equals(Recipe 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.Type == input.Type || + (this.Type != null && + this.Type.Equals(input.Type)) + ) && 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) + ); + } + + /// + /// 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.Type != null) + hashCode = hashCode * 59 + this.Type.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(); + 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(@"^Recipe$", 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" }); + } + + + + // 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" }); + } + + yield break; + } + } +} diff --git a/src/PollinationSDK/Model/RecipeInterface.cs b/src/PollinationSDK/Model/RecipeInterface.cs new file mode 100644 index 000000000..78812f27d --- /dev/null +++ b/src/PollinationSDK/Model/RecipeInterface.cs @@ -0,0 +1,299 @@ +/* + * 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 interface object for creating a Recipe. Recipe information only includes metadata, source, inputs and outputs of a Recipe. This object is useful for creating user interface for Recipes. + /// + [DataContract(Name = "RecipeInterface")] + public partial class RecipeInterface : OpenAPIGenBaseModel, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected RecipeInterface() + { + // Set non-required readonly properties with defaultValue + this.Type = "RecipeInterface"; + this.ApiVersion = "v1beta1"; + } + + /// + /// Initializes a new instance of the class. + /// + /// Recipe metadata information. (required). + /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. + /// A URL to the source this recipe from a registry.. + /// A list of recipe inputs.. + /// A list of recipe outputs.. + public RecipeInterface + ( + MetaData metadata, // Required parameters + Dictionary annotations= default, string source= default, List> inputs= default, List> outputs= default// Optional parameters + ) : base()// BaseClass + { + // to ensure "metadata" is required (not null) + this.Metadata = metadata ?? throw new ArgumentNullException("metadata is a required property for RecipeInterface and cannot be null"); + this.Annotations = annotations; + this.Source = source; + this.Inputs = inputs; + this.Outputs = outputs; + + // Set non-required readonly properties with defaultValue + this.Type = "RecipeInterface"; + this.ApiVersion = "v1beta1"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "RecipeInterface"; + //============================================== is ReadOnly + /// + /// Gets or Sets ApiVersion + /// + [DataMember(Name = "api_version", EmitDefaultValue = true)] + public string ApiVersion { get; protected internal set; } = "v1beta1"; + + /// + /// Recipe metadata information. + /// + /// Recipe metadata information. + [DataMember(Name = "metadata", IsRequired = true, EmitDefaultValue = false)] + public MetaData Metadata { 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; } + /// + /// A URL to the source this recipe from a registry. + /// + /// A URL to the source this recipe from a registry. + [DataMember(Name = "source", EmitDefaultValue = false)] + public string Source { get; set; } + /// + /// A list of recipe inputs. + /// + /// A list of recipe inputs. + [DataMember(Name = "inputs", EmitDefaultValue = false)] + public List> Inputs { get; set; } + /// + /// A list of recipe outputs. + /// + /// A list of recipe outputs. + [DataMember(Name = "outputs", EmitDefaultValue = false)] + public List> Outputs { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + return "RecipeInterface"; + } + + /// + /// 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("RecipeInterface:\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Metadata: ").Append(Metadata).Append("\n"); + sb.Append(" Annotations: ").Append(Annotations).Append("\n"); + sb.Append(" ApiVersion: ").Append(ApiVersion).Append("\n"); + sb.Append(" Source: ").Append(Source).Append("\n"); + sb.Append(" Inputs: ").Append(Inputs).Append("\n"); + sb.Append(" Outputs: ").Append(Outputs).Append("\n"); + return sb.ToString(); + } + + /// + /// Returns the object from JSON string + /// + /// RecipeInterface object + public static RecipeInterface 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. + /// + /// RecipeInterface object + public virtual RecipeInterface DuplicateRecipeInterface() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateRecipeInterface(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel DuplicateOpenAPIGenBaseModel() + { + return DuplicateRecipeInterface(); + } + + /// + /// 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 RecipeInterface); + } + + /// + /// Returns true if RecipeInterface instances are equal + /// + /// Instance of RecipeInterface to be compared + /// Boolean + public bool Equals(RecipeInterface input) + { + if (input == null) + return false; + return 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)) + ) && 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.Source == input.Source || + (this.Source != null && + this.Source.Equals(input.Source)) + ) && 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) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = base.GetHashCode(); + if (this.Metadata != null) + hashCode = hashCode * 59 + this.Metadata.GetHashCode(); + if (this.Type != null) + hashCode = hashCode * 59 + this.Type.GetHashCode(); + if (this.Annotations != null) + hashCode = hashCode * 59 + this.Annotations.GetHashCode(); + if (this.ApiVersion != null) + hashCode = hashCode * 59 + this.ApiVersion.GetHashCode(); + if (this.Source != null) + hashCode = hashCode * 59 + this.Source.GetHashCode(); + if (this.Inputs != null) + hashCode = hashCode * 59 + this.Inputs.GetHashCode(); + if (this.Outputs != null) + hashCode = hashCode * 59 + this.Outputs.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(@"^RecipeInterface$", 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" }); + } + + + + // 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" }); + } + + yield break; + } + } +} diff --git a/src/PollinationSDK/Model/RecipeInterfaceList.cs b/src/PollinationSDK/Model/RecipeInterfaceList.cs new file mode 100644 index 000000000..dd6dc8c9d --- /dev/null +++ b/src/PollinationSDK/Model/RecipeInterfaceList.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 = "RecipeInterfaceList")] + public partial class RecipeInterfaceList : OpenAPIGenBaseModel, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected RecipeInterfaceList() + { + // Set non-required readonly properties with defaultValue + this.Type = "RecipeInterfaceList"; + } + + /// + /// 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 RecipeInterfaceList + ( + 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 RecipeInterfaceList and cannot be null"); + this.NextPage = nextPage; + + // Set non-required readonly properties with defaultValue + this.Type = "RecipeInterfaceList"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "RecipeInterfaceList"; + + /// + /// 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 "RecipeInterfaceList"; + } + + /// + /// 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("RecipeInterfaceList:\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 + /// + /// RecipeInterfaceList object + public static RecipeInterfaceList 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. + /// + /// RecipeInterfaceList object + public virtual RecipeInterfaceList DuplicateRecipeInterfaceList() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateRecipeInterfaceList(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel DuplicateOpenAPIGenBaseModel() + { + return DuplicateRecipeInterfaceList(); + } + + /// + /// 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 RecipeInterfaceList); + } + + /// + /// Returns true if RecipeInterfaceList instances are equal + /// + /// Instance of RecipeInterfaceList to be compared + /// Boolean + public bool Equals(RecipeInterfaceList 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(@"^RecipeInterfaceList$", 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/RecipePackage.cs b/src/PollinationSDK/Model/RecipePackage.cs new file mode 100644 index 000000000..c4910a915 --- /dev/null +++ b/src/PollinationSDK/Model/RecipePackage.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 +{ + /// + /// RecipePackage + /// + [DataContract(Name = "RecipePackage")] + public partial class RecipePackage : RepositoryPackage, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected RecipePackage() + { + // Set non-required readonly properties with defaultValue + this.Type = "RecipePackage"; + } + + /// + /// Initializes a new instance of the class. + /// + /// manifest (required). + /// The new package digest (required). + /// The new package tag (required). + /// keywords. + /// description. + /// icon. + /// Creation Timestamp. + /// The Repository Readme. + public RecipePackage + ( + string digest, string tag, RecipeInterface manifest, // Required parameters + List keywords= default, string description= default, string icon= default, DateTime createdAt= default, string readme= default // Optional parameters + ) : base(digest: digest, tag: tag, keywords: keywords, description: description, icon: icon, createdAt: createdAt, readme: readme)// BaseClass + { + // to ensure "manifest" is required (not null) + this.Manifest = manifest ?? throw new ArgumentNullException("manifest is a required property for RecipePackage and cannot be null"); + + // Set non-required readonly properties with defaultValue + this.Type = "RecipePackage"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "RecipePackage"; + + /// + /// Gets or Sets Manifest + /// + [DataMember(Name = "manifest", IsRequired = true, EmitDefaultValue = false)] + public RecipeInterface Manifest { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + return "RecipePackage"; + } + + /// + /// 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("RecipePackage:\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Digest: ").Append(Digest).Append("\n"); + sb.Append(" Tag: ").Append(Tag).Append("\n"); + sb.Append(" Keywords: ").Append(Keywords).Append("\n"); + sb.Append(" Description: ").Append(Description).Append("\n"); + sb.Append(" Icon: ").Append(Icon).Append("\n"); + sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n"); + sb.Append(" Readme: ").Append(Readme).Append("\n"); + sb.Append(" Manifest: ").Append(Manifest).Append("\n"); + return sb.ToString(); + } + + /// + /// Returns the object from JSON string + /// + /// RecipePackage object + public static RecipePackage 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. + /// + /// RecipePackage object + public virtual RecipePackage DuplicateRecipePackage() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateRecipePackage(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override RepositoryPackage DuplicateRepositoryPackage() + { + return DuplicateRecipePackage(); + } + + /// + /// 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 RecipePackage); + } + + /// + /// Returns true if RecipePackage instances are equal + /// + /// Instance of RecipePackage to be compared + /// Boolean + public bool Equals(RecipePackage input) + { + if (input == null) + return false; + return base.Equals(input) && + ( + this.Manifest == input.Manifest || + (this.Manifest != null && + this.Manifest.Equals(input.Manifest)) + ) && 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.Manifest != null) + hashCode = hashCode * 59 + this.Manifest.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(@"^RecipePackage$", 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/RecipePackageList.cs b/src/PollinationSDK/Model/RecipePackageList.cs new file mode 100644 index 000000000..66684f98c --- /dev/null +++ b/src/PollinationSDK/Model/RecipePackageList.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 = "RecipePackageList")] + public partial class RecipePackageList : OpenAPIGenBaseModel, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected RecipePackageList() + { + // Set non-required readonly properties with defaultValue + this.Type = "RecipePackageList"; + } + + /// + /// 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 RecipePackageList + ( + 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 RecipePackageList and cannot be null"); + this.NextPage = nextPage; + + // Set non-required readonly properties with defaultValue + this.Type = "RecipePackageList"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "RecipePackageList"; + + /// + /// 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 "RecipePackageList"; + } + + /// + /// 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("RecipePackageList:\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 + /// + /// RecipePackageList object + public static RecipePackageList 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. + /// + /// RecipePackageList object + public virtual RecipePackageList DuplicateRecipePackageList() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateRecipePackageList(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel DuplicateOpenAPIGenBaseModel() + { + return DuplicateRecipePackageList(); + } + + /// + /// 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 RecipePackageList); + } + + /// + /// Returns true if RecipePackageList instances are equal + /// + /// Instance of RecipePackageList to be compared + /// Boolean + public bool Equals(RecipePackageList 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(@"^RecipePackageList$", 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/Repository.cs b/src/PollinationSDK/Model/Repository.cs new file mode 100644 index 000000000..41cf28560 --- /dev/null +++ b/src/PollinationSDK/Model/Repository.cs @@ -0,0 +1,283 @@ +/* + * 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 +{ + /// + /// Repository + /// + [DataContract(Name = "Repository")] + public partial class Repository : RepositoryCreate, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected Repository() + { + // Set non-required readonly properties with defaultValue + this.Type = "Repository"; + } + + /// + /// Initializes a new instance of the class. + /// + /// The recipe unique ID (required). + /// The latest package version to be indexed (required). + /// The owner of the repository (required). + /// The permissions the user making the API call has on the resource. + /// The repository slug. + /// Whether or not a repository is publicly viewable. + /// A list of keywords to index the repository by. + /// A description of the repository. + /// An icon to represent this repository. + /// The name of the repository (required). + public Repository + ( + string name, string id, string latestTag, AccountPublic owner, // Required parameters + bool _public= default, List keywords= default, string description= default, string icon= default, RepositoryUserPermissions permissions= default, string slug= default // Optional parameters + ) : base(_public: _public, keywords: keywords, description: description, icon: icon, name: name)// BaseClass + { + // to ensure "id" is required (not null) + this.Id = id ?? throw new ArgumentNullException("id is a required property for Repository and cannot be null"); + // to ensure "latestTag" is required (not null) + this.LatestTag = latestTag ?? throw new ArgumentNullException("latestTag is a required property for Repository and cannot be null"); + // to ensure "owner" is required (not null) + this.Owner = owner ?? throw new ArgumentNullException("owner is a required property for Repository and cannot be null"); + this.Permissions = permissions; + this.Slug = slug; + + // Set non-required readonly properties with defaultValue + this.Type = "Repository"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "Repository"; + + /// + /// The recipe unique ID + /// + /// The recipe unique ID + [DataMember(Name = "id", IsRequired = true, EmitDefaultValue = false)] + public string Id { get; set; } + /// + /// The latest package version to be indexed + /// + /// The latest package version to be indexed + [DataMember(Name = "latest_tag", IsRequired = true, EmitDefaultValue = false)] + public string LatestTag { get; set; } + /// + /// The owner of the repository + /// + /// The owner of the repository + [DataMember(Name = "owner", IsRequired = true, EmitDefaultValue = false)] + public AccountPublic Owner { get; set; } + /// + /// The permissions the user making the API call has on the resource + /// + /// The permissions the user making the API call has on the resource + [DataMember(Name = "permissions", EmitDefaultValue = false)] + public RepositoryUserPermissions Permissions { get; set; } + /// + /// The repository slug + /// + /// The repository slug + [DataMember(Name = "slug", EmitDefaultValue = false)] + public string Slug { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + return "Repository"; + } + + /// + /// 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("Repository:\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Public: ").Append(Public).Append("\n"); + sb.Append(" Keywords: ").Append(Keywords).Append("\n"); + sb.Append(" Description: ").Append(Description).Append("\n"); + sb.Append(" Icon: ").Append(Icon).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Id: ").Append(Id).Append("\n"); + sb.Append(" LatestTag: ").Append(LatestTag).Append("\n"); + sb.Append(" Owner: ").Append(Owner).Append("\n"); + sb.Append(" Permissions: ").Append(Permissions).Append("\n"); + sb.Append(" Slug: ").Append(Slug).Append("\n"); + return sb.ToString(); + } + + /// + /// Returns the object from JSON string + /// + /// Repository object + public static Repository 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. + /// + /// Repository object + public virtual Repository DuplicateRepository() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateRepository(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override RepositoryCreate DuplicateRepositoryCreate() + { + return DuplicateRepository(); + } + + /// + /// 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 Repository); + } + + /// + /// Returns true if Repository instances are equal + /// + /// Instance of Repository to be compared + /// Boolean + public bool Equals(Repository 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.LatestTag == input.LatestTag || + (this.LatestTag != null && + this.LatestTag.Equals(input.LatestTag)) + ) && 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.Slug == input.Slug || + (this.Slug != null && + this.Slug.Equals(input.Slug)) + ) && 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.LatestTag != null) + hashCode = hashCode * 59 + this.LatestTag.GetHashCode(); + if (this.Owner != null) + hashCode = hashCode * 59 + this.Owner.GetHashCode(); + if (this.Permissions != null) + hashCode = hashCode * 59 + this.Permissions.GetHashCode(); + if (this.Slug != null) + hashCode = hashCode * 59 + this.Slug.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(@"^Repository$", 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/RepositoryAccessPolicy.cs b/src/PollinationSDK/Model/RepositoryAccessPolicy.cs new file mode 100644 index 000000000..047770108 --- /dev/null +++ b/src/PollinationSDK/Model/RepositoryAccessPolicy.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 +{ + /// + /// RepositoryAccessPolicy + /// + [DataContract(Name = "RepositoryAccessPolicy")] + public partial class RepositoryAccessPolicy : OpenAPIGenBaseModel, IEquatable, IValidatableObject + { + /// + /// The permission given to the subject of the access policy + /// + /// The permission given to the subject of the access policy + [DataMember(Name="permission", EmitDefaultValue=false)] + public Permission Permission { get; set; } + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected RepositoryAccessPolicy() + { + // Set non-required readonly properties with defaultValue + this.Type = "RepositoryAccessPolicy"; + } + + /// + /// Initializes a new instance of the class. + /// + /// The subject of the access policy (required). + /// The permission given to the subject of the access policy (required). + public RepositoryAccessPolicy + ( + PolicySubject 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 RepositoryAccessPolicy and cannot be null"); + this.Permission = permission; + + // Set non-required readonly properties with defaultValue + this.Type = "RepositoryAccessPolicy"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "RepositoryAccessPolicy"; + + /// + /// 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 "RepositoryAccessPolicy"; + } + + /// + /// 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("RepositoryAccessPolicy:\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 + /// + /// RepositoryAccessPolicy object + public static RepositoryAccessPolicy 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. + /// + /// RepositoryAccessPolicy object + public virtual RepositoryAccessPolicy DuplicateRepositoryAccessPolicy() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateRepositoryAccessPolicy(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel DuplicateOpenAPIGenBaseModel() + { + return DuplicateRepositoryAccessPolicy(); + } + + /// + /// 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 RepositoryAccessPolicy); + } + + /// + /// Returns true if RepositoryAccessPolicy instances are equal + /// + /// Instance of RepositoryAccessPolicy to be compared + /// Boolean + public bool Equals(RepositoryAccessPolicy 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(@"^RepositoryAccessPolicy$", 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/RepositoryAccessPolicyList.cs b/src/PollinationSDK/Model/RepositoryAccessPolicyList.cs new file mode 100644 index 000000000..ae9a46adb --- /dev/null +++ b/src/PollinationSDK/Model/RepositoryAccessPolicyList.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 = "RepositoryAccessPolicyList")] + public partial class RepositoryAccessPolicyList : OpenAPIGenBaseModel, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected RepositoryAccessPolicyList() + { + // Set non-required readonly properties with defaultValue + this.Type = "RepositoryAccessPolicyList"; + } + + /// + /// 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 RepositoryAccessPolicyList + ( + 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 RepositoryAccessPolicyList and cannot be null"); + this.NextPage = nextPage; + + // Set non-required readonly properties with defaultValue + this.Type = "RepositoryAccessPolicyList"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "RepositoryAccessPolicyList"; + + /// + /// 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 "RepositoryAccessPolicyList"; + } + + /// + /// 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("RepositoryAccessPolicyList:\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 + /// + /// RepositoryAccessPolicyList object + public static RepositoryAccessPolicyList 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. + /// + /// RepositoryAccessPolicyList object + public virtual RepositoryAccessPolicyList DuplicateRepositoryAccessPolicyList() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateRepositoryAccessPolicyList(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel DuplicateOpenAPIGenBaseModel() + { + return DuplicateRepositoryAccessPolicyList(); + } + + /// + /// 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 RepositoryAccessPolicyList); + } + + /// + /// Returns true if RepositoryAccessPolicyList instances are equal + /// + /// Instance of RepositoryAccessPolicyList to be compared + /// Boolean + public bool Equals(RepositoryAccessPolicyList 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(@"^RepositoryAccessPolicyList$", 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/RepositoryCreate.cs b/src/PollinationSDK/Model/RepositoryCreate.cs new file mode 100644 index 000000000..e90c82ce7 --- /dev/null +++ b/src/PollinationSDK/Model/RepositoryCreate.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 +{ + /// + /// RepositoryCreate + /// + [DataContract(Name = "RepositoryCreate")] + public partial class RepositoryCreate : RepositoryUpdate, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected RepositoryCreate() + { + // Set non-required readonly properties with defaultValue + this.Type = "RepositoryCreate"; + } + + /// + /// Initializes a new instance of the class. + /// + /// The name of the repository (required). + /// Whether or not a repository is publicly viewable. + /// A list of keywords to index the repository by. + /// A description of the repository. + /// An icon to represent this repository. + public RepositoryCreate + ( + string name, // Required parameters + bool _public= default, List keywords= default, string description= default, string icon= default // Optional parameters + ) : base(_public: _public, keywords: keywords, description: description, icon: icon)// BaseClass + { + // to ensure "name" is required (not null) + this.Name = name ?? throw new ArgumentNullException("name is a required property for RepositoryCreate and cannot be null"); + + // Set non-required readonly properties with defaultValue + this.Type = "RepositoryCreate"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "RepositoryCreate"; + + /// + /// The name of the repository + /// + /// The name of the repository + [DataMember(Name = "name", IsRequired = true, EmitDefaultValue = false)] + public string Name { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + return "RepositoryCreate"; + } + + /// + /// 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("RepositoryCreate:\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Public: ").Append(Public).Append("\n"); + sb.Append(" Keywords: ").Append(Keywords).Append("\n"); + sb.Append(" Description: ").Append(Description).Append("\n"); + sb.Append(" Icon: ").Append(Icon).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + return sb.ToString(); + } + + /// + /// Returns the object from JSON string + /// + /// RepositoryCreate object + public static RepositoryCreate 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. + /// + /// RepositoryCreate object + public virtual RepositoryCreate DuplicateRepositoryCreate() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateRepositoryCreate(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override RepositoryUpdate DuplicateRepositoryUpdate() + { + return DuplicateRepositoryCreate(); + } + + /// + /// 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 RepositoryCreate); + } + + /// + /// Returns true if RepositoryCreate instances are equal + /// + /// Instance of RepositoryCreate to be compared + /// Boolean + public bool Equals(RepositoryCreate 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.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.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(@"^RepositoryCreate$", 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/RepositoryIndex.cs b/src/PollinationSDK/Model/RepositoryIndex.cs new file mode 100644 index 000000000..9236bf20a --- /dev/null +++ b/src/PollinationSDK/Model/RepositoryIndex.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 searchable index for a Queenbee Plugin and Recipe repository + /// + [DataContract(Name = "RepositoryIndex")] + public partial class RepositoryIndex : OpenAPIGenBaseModel, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. + /// The timestamp at which the index was generated. + /// Extra information about the repository. + /// A dict of plugins accessible by name. Each name key points to a list of plugin versions. + /// A dict of recipes accessible by name. Each name key points to a list of recipesversions. + public RepositoryIndex + ( + // Required parameters + Dictionary annotations= default, DateTime generated= default, RepositoryMetadata metadata= default, Dictionary> plugin= default, Dictionary> recipe= default// Optional parameters + ) : base()// BaseClass + { + this.Annotations = annotations; + this.Generated = generated; + this.Metadata = metadata; + this.Plugin = plugin; + this.Recipe = recipe; + + // Set non-required readonly properties with defaultValue + this.Type = "RepositoryIndex"; + this.ApiVersion = "v1beta1"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "RepositoryIndex"; + //============================================== is ReadOnly + /// + /// Gets or Sets ApiVersion + /// + [DataMember(Name = "api_version", EmitDefaultValue = true)] + public string ApiVersion { get; protected internal set; } = "v1beta1"; + + /// + /// 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; } + /// + /// The timestamp at which the index was generated + /// + /// The timestamp at which the index was generated + [DataMember(Name = "generated", EmitDefaultValue = false)] + public DateTime Generated { get; set; } + /// + /// Extra information about the repository + /// + /// Extra information about the repository + [DataMember(Name = "metadata", EmitDefaultValue = false)] + public RepositoryMetadata Metadata { get; set; } + /// + /// A dict of plugins accessible by name. Each name key points to a list of plugin versions + /// + /// A dict of plugins accessible by name. Each name key points to a list of plugin versions + [DataMember(Name = "plugin", EmitDefaultValue = false)] + public Dictionary> Plugin { get; set; } + /// + /// A dict of recipes accessible by name. Each name key points to a list of recipesversions + /// + /// A dict of recipes accessible by name. Each name key points to a list of recipesversions + [DataMember(Name = "recipe", EmitDefaultValue = false)] + public Dictionary> Recipe { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + return "RepositoryIndex"; + } + + /// + /// 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("RepositoryIndex:\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Annotations: ").Append(Annotations).Append("\n"); + sb.Append(" ApiVersion: ").Append(ApiVersion).Append("\n"); + sb.Append(" Generated: ").Append(Generated).Append("\n"); + sb.Append(" Metadata: ").Append(Metadata).Append("\n"); + sb.Append(" Plugin: ").Append(Plugin).Append("\n"); + sb.Append(" Recipe: ").Append(Recipe).Append("\n"); + return sb.ToString(); + } + + /// + /// Returns the object from JSON string + /// + /// RepositoryIndex object + public static RepositoryIndex 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. + /// + /// RepositoryIndex object + public virtual RepositoryIndex DuplicateRepositoryIndex() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateRepositoryIndex(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel DuplicateOpenAPIGenBaseModel() + { + return DuplicateRepositoryIndex(); + } + + /// + /// 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 RepositoryIndex); + } + + /// + /// Returns true if RepositoryIndex instances are equal + /// + /// Instance of RepositoryIndex to be compared + /// Boolean + public bool Equals(RepositoryIndex 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.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.Generated == input.Generated || + (this.Generated != null && + this.Generated.Equals(input.Generated)) + ) && base.Equals(input) && + ( + this.Metadata == input.Metadata || + (this.Metadata != null && + this.Metadata.Equals(input.Metadata)) + ) && base.Equals(input) && + ( + this.Plugin == input.Plugin || + this.Plugin != null && + input.Plugin != null && + this.Plugin.SequenceEqual(input.Plugin) + ) && base.Equals(input) && + ( + this.Recipe == input.Recipe || + this.Recipe != null && + input.Recipe != null && + this.Recipe.SequenceEqual(input.Recipe) + ); + } + + /// + /// 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.Annotations != null) + hashCode = hashCode * 59 + this.Annotations.GetHashCode(); + if (this.ApiVersion != null) + hashCode = hashCode * 59 + this.ApiVersion.GetHashCode(); + if (this.Generated != null) + hashCode = hashCode * 59 + this.Generated.GetHashCode(); + if (this.Metadata != null) + hashCode = hashCode * 59 + this.Metadata.GetHashCode(); + if (this.Plugin != null) + hashCode = hashCode * 59 + this.Plugin.GetHashCode(); + if (this.Recipe != null) + hashCode = hashCode * 59 + this.Recipe.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(@"^RepositoryIndex$", 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" }); + } + + + + // 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" }); + } + + yield break; + } + } +} diff --git a/src/PollinationSDK/Model/RepositoryList.cs b/src/PollinationSDK/Model/RepositoryList.cs new file mode 100644 index 000000000..a2ea2c907 --- /dev/null +++ b/src/PollinationSDK/Model/RepositoryList.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 = "RepositoryList")] + public partial class RepositoryList : OpenAPIGenBaseModel, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected RepositoryList() + { + // Set non-required readonly properties with defaultValue + this.Type = "RepositoryList"; + } + + /// + /// 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 RepositoryList + ( + 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 RepositoryList and cannot be null"); + this.NextPage = nextPage; + + // Set non-required readonly properties with defaultValue + this.Type = "RepositoryList"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "RepositoryList"; + + /// + /// 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 "RepositoryList"; + } + + /// + /// 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("RepositoryList:\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 + /// + /// RepositoryList object + public static RepositoryList 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. + /// + /// RepositoryList object + public virtual RepositoryList DuplicateRepositoryList() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateRepositoryList(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel DuplicateOpenAPIGenBaseModel() + { + return DuplicateRepositoryList(); + } + + /// + /// 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 RepositoryList); + } + + /// + /// Returns true if RepositoryList instances are equal + /// + /// Instance of RepositoryList to be compared + /// Boolean + public bool Equals(RepositoryList 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(@"^RepositoryList$", 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/RepositoryMetadata.cs b/src/PollinationSDK/Model/RepositoryMetadata.cs new file mode 100644 index 000000000..838881986 --- /dev/null +++ b/src/PollinationSDK/Model/RepositoryMetadata.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 +{ + /// + /// BaseModel with functionality to return the object as a yaml string. + /// + [DataContract(Name = "RepositoryMetadata")] + public partial class RepositoryMetadata : OpenAPIGenBaseModel, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. + /// The name of the repository. + /// A short description of the repository (default to "A Queenbee package repository"). + /// The source path (url or local) to the repository. + /// The number of plugins hosted by the repository (default to 0). + /// The number of recipes hosted by the repository (default to 0). + public RepositoryMetadata + ( + // Required parameters + Dictionary annotations= default, string name= default, string description = "A Queenbee package repository", string source= default, int pluginCount = 0, int recipeCount = 0// Optional parameters + ) : base()// BaseClass + { + this.Annotations = annotations; + this.Name = name; + // use default value if no "description" provided + this.Description = description ?? "A Queenbee package repository"; + this.Source = source; + this.PluginCount = pluginCount; + this.RecipeCount = recipeCount; + + // Set non-required readonly properties with defaultValue + this.Type = "RepositoryMetadata"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "RepositoryMetadata"; + + /// + /// 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; } + /// + /// The name of the repository + /// + /// The name of the repository + [DataMember(Name = "name", EmitDefaultValue = false)] + public string Name { get; set; } + /// + /// A short description of the repository + /// + /// A short description of the repository + [DataMember(Name = "description", EmitDefaultValue = true)] + public string Description { get; set; } = "A Queenbee package repository"; + /// + /// The source path (url or local) to the repository + /// + /// The source path (url or local) to the repository + [DataMember(Name = "source", EmitDefaultValue = false)] + public string Source { get; set; } + /// + /// The number of plugins hosted by the repository + /// + /// The number of plugins hosted by the repository + [DataMember(Name = "plugin_count", EmitDefaultValue = true)] + public int PluginCount { get; set; } = 0; + /// + /// The number of recipes hosted by the repository + /// + /// The number of recipes hosted by the repository + [DataMember(Name = "recipe_count", EmitDefaultValue = true)] + public int RecipeCount { get; set; } = 0; + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + return "RepositoryMetadata"; + } + + /// + /// 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("RepositoryMetadata:\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Annotations: ").Append(Annotations).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Description: ").Append(Description).Append("\n"); + sb.Append(" Source: ").Append(Source).Append("\n"); + sb.Append(" PluginCount: ").Append(PluginCount).Append("\n"); + sb.Append(" RecipeCount: ").Append(RecipeCount).Append("\n"); + return sb.ToString(); + } + + /// + /// Returns the object from JSON string + /// + /// RepositoryMetadata object + public static RepositoryMetadata 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. + /// + /// RepositoryMetadata object + public virtual RepositoryMetadata DuplicateRepositoryMetadata() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateRepositoryMetadata(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel DuplicateOpenAPIGenBaseModel() + { + return DuplicateRepositoryMetadata(); + } + + /// + /// 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 RepositoryMetadata); + } + + /// + /// Returns true if RepositoryMetadata instances are equal + /// + /// Instance of RepositoryMetadata to be compared + /// Boolean + public bool Equals(RepositoryMetadata 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.Annotations == input.Annotations || + this.Annotations != null && + input.Annotations != null && + this.Annotations.SequenceEqual(input.Annotations) + ) && 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.Source == input.Source || + (this.Source != null && + this.Source.Equals(input.Source)) + ) && base.Equals(input) && + ( + this.PluginCount == input.PluginCount || + (this.PluginCount != null && + this.PluginCount.Equals(input.PluginCount)) + ) && base.Equals(input) && + ( + this.RecipeCount == input.RecipeCount || + (this.RecipeCount != null && + this.RecipeCount.Equals(input.RecipeCount)) + ); + } + + /// + /// 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.Annotations != null) + hashCode = hashCode * 59 + this.Annotations.GetHashCode(); + if (this.Name != null) + hashCode = hashCode * 59 + this.Name.GetHashCode(); + if (this.Description != null) + hashCode = hashCode * 59 + this.Description.GetHashCode(); + if (this.Source != null) + hashCode = hashCode * 59 + this.Source.GetHashCode(); + if (this.PluginCount != null) + hashCode = hashCode * 59 + this.PluginCount.GetHashCode(); + if (this.RecipeCount != null) + hashCode = hashCode * 59 + this.RecipeCount.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(@"^RepositoryMetadata$", 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/RepositoryPackage.cs b/src/PollinationSDK/Model/RepositoryPackage.cs new file mode 100644 index 000000000..b375dedb9 --- /dev/null +++ b/src/PollinationSDK/Model/RepositoryPackage.cs @@ -0,0 +1,315 @@ +/* + * 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 +{ + /// + /// RepositoryPackage + /// + [DataContract(Name = "RepositoryPackage")] + public partial class RepositoryPackage : OpenAPIGenBaseModel, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected RepositoryPackage() + { + // Set non-required readonly properties with defaultValue + this.Type = "RepositoryPackage"; + } + + /// + /// Initializes a new instance of the class. + /// + /// The new package digest (required). + /// The new package tag (required). + /// keywords. + /// description. + /// icon. + /// Creation Timestamp. + /// The Repository Readme. + public RepositoryPackage + ( + string digest, string tag, // Required parameters + List keywords= default, string description= default, string icon= default, DateTime createdAt= default, string readme= default // Optional parameters + ) : base()// BaseClass + { + // to ensure "digest" is required (not null) + this.Digest = digest ?? throw new ArgumentNullException("digest is a required property for RepositoryPackage and cannot be null"); + // to ensure "tag" is required (not null) + this.Tag = tag ?? throw new ArgumentNullException("tag is a required property for RepositoryPackage and cannot be null"); + this.Keywords = keywords; + this.Description = description; + this.Icon = icon; + this.CreatedAt = createdAt; + this.Readme = readme; + + // Set non-required readonly properties with defaultValue + this.Type = "RepositoryPackage"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "RepositoryPackage"; + + /// + /// The new package digest + /// + /// The new package digest + [DataMember(Name = "digest", IsRequired = true, EmitDefaultValue = false)] + public string Digest { get; set; } + /// + /// The new package tag + /// + /// The new package tag + [DataMember(Name = "tag", IsRequired = true, EmitDefaultValue = false)] + public string Tag { get; set; } + /// + /// keywords + /// + /// keywords + [DataMember(Name = "keywords", EmitDefaultValue = false)] + public List Keywords { get; set; } + /// + /// description + /// + /// description + [DataMember(Name = "description", EmitDefaultValue = false)] + public string Description { get; set; } + /// + /// icon + /// + /// icon + [DataMember(Name = "icon", EmitDefaultValue = false)] + public string Icon { get; set; } + /// + /// Creation Timestamp + /// + /// Creation Timestamp + [DataMember(Name = "created_at", EmitDefaultValue = false)] + public DateTime CreatedAt { get; set; } + /// + /// The Repository Readme + /// + /// The Repository Readme + [DataMember(Name = "readme", EmitDefaultValue = false)] + public string Readme { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + return "RepositoryPackage"; + } + + /// + /// 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("RepositoryPackage:\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Digest: ").Append(Digest).Append("\n"); + sb.Append(" Tag: ").Append(Tag).Append("\n"); + sb.Append(" Keywords: ").Append(Keywords).Append("\n"); + sb.Append(" Description: ").Append(Description).Append("\n"); + sb.Append(" Icon: ").Append(Icon).Append("\n"); + sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n"); + sb.Append(" Readme: ").Append(Readme).Append("\n"); + return sb.ToString(); + } + + /// + /// Returns the object from JSON string + /// + /// RepositoryPackage object + public static RepositoryPackage 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. + /// + /// RepositoryPackage object + public virtual RepositoryPackage DuplicateRepositoryPackage() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateRepositoryPackage(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel DuplicateOpenAPIGenBaseModel() + { + return DuplicateRepositoryPackage(); + } + + /// + /// 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 RepositoryPackage); + } + + /// + /// Returns true if RepositoryPackage instances are equal + /// + /// Instance of RepositoryPackage to be compared + /// Boolean + public bool Equals(RepositoryPackage input) + { + if (input == null) + return false; + return base.Equals(input) && + ( + this.Digest == input.Digest || + (this.Digest != null && + this.Digest.Equals(input.Digest)) + ) && base.Equals(input) && + ( + this.Tag == input.Tag || + (this.Tag != null && + this.Tag.Equals(input.Tag)) + ) && base.Equals(input) && + ( + this.Keywords == input.Keywords || + this.Keywords != null && + input.Keywords != null && + this.Keywords.SequenceEqual(input.Keywords) + ) && base.Equals(input) && + ( + this.Description == input.Description || + (this.Description != null && + this.Description.Equals(input.Description)) + ) && base.Equals(input) && + ( + this.Icon == input.Icon || + (this.Icon != null && + this.Icon.Equals(input.Icon)) + ) && base.Equals(input) && + ( + this.CreatedAt == input.CreatedAt || + (this.CreatedAt != null && + this.CreatedAt.Equals(input.CreatedAt)) + ) && base.Equals(input) && + ( + this.Readme == input.Readme || + (this.Readme != null && + this.Readme.Equals(input.Readme)) + ) && 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.Digest != null) + hashCode = hashCode * 59 + this.Digest.GetHashCode(); + if (this.Tag != null) + hashCode = hashCode * 59 + this.Tag.GetHashCode(); + if (this.Keywords != null) + hashCode = hashCode * 59 + this.Keywords.GetHashCode(); + if (this.Description != null) + hashCode = hashCode * 59 + this.Description.GetHashCode(); + if (this.Icon != null) + hashCode = hashCode * 59 + this.Icon.GetHashCode(); + if (this.CreatedAt != null) + hashCode = hashCode * 59 + this.CreatedAt.GetHashCode(); + if (this.Readme != null) + hashCode = hashCode * 59 + this.Readme.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(@"^RepositoryPackage$", 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/RepositoryPolicySubject.cs b/src/PollinationSDK/Model/RepositoryPolicySubject.cs new file mode 100644 index 000000000..0eba578e1 --- /dev/null +++ b/src/PollinationSDK/Model/RepositoryPolicySubject.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 +{ + /// + /// RepositoryPolicySubject + /// + [DataContract(Name = "RepositoryPolicySubject")] + public partial class RepositoryPolicySubject : PolicySubject, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected RepositoryPolicySubject() + { + // Set non-required readonly properties with defaultValue + this.Type = "RepositoryPolicySubject"; + } + + /// + /// Initializes a new instance of the class. + /// + /// subjectType (required). + /// The name of the policy subject (required). + public RepositoryPolicySubject + ( + SubjectType subjectType, string name// Required parameters + // Optional parameters + ) : base(subjectType: subjectType, name: name)// BaseClass + { + + // Set non-required readonly properties with defaultValue + this.Type = "RepositoryPolicySubject"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "RepositoryPolicySubject"; + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + return "RepositoryPolicySubject"; + } + + /// + /// 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("RepositoryPolicySubject:\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 + /// + /// RepositoryPolicySubject object + public static RepositoryPolicySubject 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. + /// + /// RepositoryPolicySubject object + public virtual RepositoryPolicySubject DuplicateRepositoryPolicySubject() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateRepositoryPolicySubject(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override PolicySubject DuplicatePolicySubject() + { + return DuplicateRepositoryPolicySubject(); + } + + /// + /// 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 RepositoryPolicySubject); + } + + /// + /// Returns true if RepositoryPolicySubject instances are equal + /// + /// Instance of RepositoryPolicySubject to be compared + /// Boolean + public bool Equals(RepositoryPolicySubject 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(@"^RepositoryPolicySubject$", 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/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/RepositoryUpdate.cs b/src/PollinationSDK/Model/RepositoryUpdate.cs new file mode 100644 index 000000000..905da5e33 --- /dev/null +++ b/src/PollinationSDK/Model/RepositoryUpdate.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 +{ + /// + /// RepositoryUpdate + /// + [DataContract(Name = "RepositoryUpdate")] + public partial class RepositoryUpdate : OpenAPIGenBaseModel, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// Whether or not a repository is publicly viewable. + /// A list of keywords to index the repository by. + /// A description of the repository. + /// An icon to represent this repository. + public RepositoryUpdate + ( + // Required parameters + bool _public= default, List keywords= default, string description= default, string icon= default // Optional parameters + ) : base()// BaseClass + { + this.Public = _public; + this.Keywords = keywords; + this.Description = description; + this.Icon = icon; + + // Set non-required readonly properties with defaultValue + this.Type = "RepositoryUpdate"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "RepositoryUpdate"; + + /// + /// Whether or not a repository is publicly viewable + /// + /// Whether or not a repository is publicly viewable + [DataMember(Name = "public", EmitDefaultValue = false)] + public bool Public { get; set; } + /// + /// A list of keywords to index the repository by + /// + /// A list of keywords to index the repository by + [DataMember(Name = "keywords", EmitDefaultValue = false)] + public List Keywords { get; set; } + /// + /// A description of the repository + /// + /// A description of the repository + [DataMember(Name = "description", EmitDefaultValue = false)] + public string Description { get; set; } + /// + /// An icon to represent this repository + /// + /// An icon to represent this repository + [DataMember(Name = "icon", EmitDefaultValue = false)] + public string Icon { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + return "RepositoryUpdate"; + } + + /// + /// 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("RepositoryUpdate:\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Public: ").Append(Public).Append("\n"); + sb.Append(" Keywords: ").Append(Keywords).Append("\n"); + sb.Append(" Description: ").Append(Description).Append("\n"); + sb.Append(" Icon: ").Append(Icon).Append("\n"); + return sb.ToString(); + } + + /// + /// Returns the object from JSON string + /// + /// RepositoryUpdate object + public static RepositoryUpdate 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. + /// + /// RepositoryUpdate object + public virtual RepositoryUpdate DuplicateRepositoryUpdate() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateRepositoryUpdate(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel DuplicateOpenAPIGenBaseModel() + { + return DuplicateRepositoryUpdate(); + } + + /// + /// 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 RepositoryUpdate); + } + + /// + /// Returns true if RepositoryUpdate instances are equal + /// + /// Instance of RepositoryUpdate to be compared + /// Boolean + public bool Equals(RepositoryUpdate input) + { + if (input == null) + return false; + return base.Equals(input) && + ( + this.Public == input.Public || + (this.Public != null && + this.Public.Equals(input.Public)) + ) && base.Equals(input) && + ( + this.Keywords == input.Keywords || + this.Keywords != null && + input.Keywords != null && + this.Keywords.SequenceEqual(input.Keywords) + ) && base.Equals(input) && + ( + this.Description == input.Description || + (this.Description != null && + this.Description.Equals(input.Description)) + ) && base.Equals(input) && + ( + this.Icon == input.Icon || + (this.Icon != null && + this.Icon.Equals(input.Icon)) + ) && 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.Public != null) + hashCode = hashCode * 59 + this.Public.GetHashCode(); + if (this.Keywords != null) + hashCode = hashCode * 59 + this.Keywords.GetHashCode(); + if (this.Description != null) + hashCode = hashCode * 59 + this.Description.GetHashCode(); + if (this.Icon != null) + hashCode = hashCode * 59 + this.Icon.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(@"^RepositoryUpdate$", 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/RepositoryUserPermissions.cs b/src/PollinationSDK/Model/RepositoryUserPermissions.cs new file mode 100644 index 000000000..d46a11c94 --- /dev/null +++ b/src/PollinationSDK/Model/RepositoryUserPermissions.cs @@ -0,0 +1,186 @@ +/* + * 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 +{ + /// + /// RepositoryUserPermissions + /// + [DataContract(Name = "RepositoryUserPermissions")] + public partial class RepositoryUserPermissions : UserPermission, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// The user has admin permission to this resource (default to false). + /// The user has write permission on this resource (default to false). + /// The user has read permission on this resource (default to false). + public RepositoryUserPermissions + ( + // Required parameters + bool admin = false, bool write = false, bool read = false // Optional parameters + ) : base(admin: admin, write: write, read: read)// BaseClass + { + + // Set non-required readonly properties with defaultValue + this.Type = "RepositoryUserPermissions"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "RepositoryUserPermissions"; + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + return "RepositoryUserPermissions"; + } + + /// + /// 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("RepositoryUserPermissions:\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Admin: ").Append(Admin).Append("\n"); + sb.Append(" Write: ").Append(Write).Append("\n"); + sb.Append(" Read: ").Append(Read).Append("\n"); + return sb.ToString(); + } + + /// + /// Returns the object from JSON string + /// + /// RepositoryUserPermissions object + public static RepositoryUserPermissions 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. + /// + /// RepositoryUserPermissions object + public virtual RepositoryUserPermissions DuplicateRepositoryUserPermissions() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateRepositoryUserPermissions(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override UserPermission DuplicateUserPermission() + { + return DuplicateRepositoryUserPermissions(); + } + + /// + /// 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 RepositoryUserPermissions); + } + + /// + /// Returns true if RepositoryUserPermissions instances are equal + /// + /// Instance of RepositoryUserPermissions to be compared + /// Boolean + public bool Equals(RepositoryUserPermissions 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(@"^RepositoryUserPermissions$", 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/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/RoleEnum.cs b/src/PollinationSDK/Model/RoleEnum.cs new file mode 100644 index 000000000..4f7d7545d --- /dev/null +++ b/src/PollinationSDK/Model/RoleEnum.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 RoleEnum + { + /// + /// Enum Owner for value: owner + /// + [EnumMember(Value = "owner")] + Owner = 1, + + /// + /// Enum Member for value: member + /// + [EnumMember(Value = "member")] + Member = 2 + + } + +} diff --git a/src/PollinationSDK/Model/Run.cs b/src/PollinationSDK/Model/Run.cs new file mode 100644 index 000000000..d77a47c54 --- /dev/null +++ b/src/PollinationSDK/Model/Run.cs @@ -0,0 +1,303 @@ +/* + * 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 +{ + /// + /// Run + /// + [DataContract(Name = "Run")] + public partial class Run : OpenAPIGenBaseModel, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected Run() + { + // Set non-required readonly properties with defaultValue + this.Type = "Run"; + } + + /// + /// Initializes a new instance of the class. + /// + /// The unique ID for this run (required). + /// author. + /// owner. + /// 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, RunMeta meta= default // Optional parameters + ) : base()// BaseClass + { + // to ensure "id" is required (not null) + this.Id = id ?? throw new ArgumentNullException("id is a required property for Run and cannot be null"); + this.Author = author; + this.Owner = owner; + this.Recipe = recipe; + this.Generation = generation; + this.Status = status; + this.Meta = meta; + + // Set non-required readonly properties with defaultValue + this.Type = "Run"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "Run"; + + /// + /// The unique ID for this run + /// + /// The unique ID for this run + [DataMember(Name = "id", IsRequired = true, EmitDefaultValue = false)] + public string Id { get; set; } + /// + /// author + /// + /// author + [DataMember(Name = "author", EmitDefaultValue = false)] + public AccountPublic Author { get; set; } + /// + /// owner + /// + /// owner + [DataMember(Name = "owner", EmitDefaultValue = false)] + public AccountPublic Owner { get; set; } + /// + /// The recipe used to generate this + /// + /// The recipe used to generate this + [DataMember(Name = "recipe", EmitDefaultValue = false)] + public RecipeInterface Recipe { get; set; } + /// + /// The generation of this run + /// + /// The generation of this run + [DataMember(Name = "generation", EmitDefaultValue = false)] + public double Generation { get; set; } + /// + /// The status of the 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 + /// + /// String presentation of the object + public override string ToString() + { + return "Run"; + } + + /// + /// 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("Run:\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Id: ").Append(Id).Append("\n"); + sb.Append(" Author: ").Append(Author).Append("\n"); + sb.Append(" Owner: ").Append(Owner).Append("\n"); + 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(); + } + + /// + /// Returns the object from JSON string + /// + /// Run object + public static Run 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. + /// + /// Run object + public virtual Run DuplicateRun() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateRun(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel DuplicateOpenAPIGenBaseModel() + { + return DuplicateRun(); + } + + /// + /// 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 Run); + } + + /// + /// Returns true if Run instances are equal + /// + /// Instance of Run to be compared + /// Boolean + public bool Equals(Run 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.Author == input.Author || + (this.Author != null && + this.Author.Equals(input.Author)) + ) && base.Equals(input) && + ( + this.Owner == input.Owner || + (this.Owner != null && + this.Owner.Equals(input.Owner)) + ) && base.Equals(input) && + ( + this.Recipe == input.Recipe || + (this.Recipe != null && + this.Recipe.Equals(input.Recipe)) + ) && base.Equals(input) && + ( + this.Generation == input.Generation || + (this.Generation != null && + this.Generation.Equals(input.Generation)) + ) && base.Equals(input) && + ( + this.Status == input.Status || + (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 && + 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.Author != null) + hashCode = hashCode * 59 + this.Author.GetHashCode(); + if (this.Owner != null) + hashCode = hashCode * 59 + this.Owner.GetHashCode(); + if (this.Recipe != null) + hashCode = hashCode * 59 + this.Recipe.GetHashCode(); + if (this.Generation != null) + 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; + } + } + + /// + /// 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(@"^Run$", 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/RunList.cs b/src/PollinationSDK/Model/RunList.cs new file mode 100644 index 000000000..e903756a0 --- /dev/null +++ b/src/PollinationSDK/Model/RunList.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 = "RunList")] + public partial class RunList : OpenAPIGenBaseModel, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected RunList() + { + // Set non-required readonly properties with defaultValue + this.Type = "RunList"; + } + + /// + /// 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 RunList + ( + 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 RunList and cannot be null"); + this.NextPage = nextPage; + + // Set non-required readonly properties with defaultValue + this.Type = "RunList"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "RunList"; + + /// + /// 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 "RunList"; + } + + /// + /// 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("RunList:\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 + /// + /// RunList object + public static RunList 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. + /// + /// RunList object + public virtual RunList DuplicateRunList() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateRunList(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel DuplicateOpenAPIGenBaseModel() + { + return DuplicateRunList(); + } + + /// + /// 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 RunList); + } + + /// + /// Returns true if RunList instances are equal + /// + /// Instance of RunList to be compared + /// Boolean + public bool Equals(RunList 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(@"^RunList$", 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/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/RunResultList.cs b/src/PollinationSDK/Model/RunResultList.cs new file mode 100644 index 000000000..809acb47b --- /dev/null +++ b/src/PollinationSDK/Model/RunResultList.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 = "RunResultList")] + public partial class RunResultList : OpenAPIGenBaseModel, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected RunResultList() + { + // Set non-required readonly properties with defaultValue + this.Type = "RunResultList"; + } + + /// + /// 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 RunResultList + ( + 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 RunResultList and cannot be null"); + this.NextPage = nextPage; + + // Set non-required readonly properties with defaultValue + this.Type = "RunResultList"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "RunResultList"; + + /// + /// 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 "RunResultList"; + } + + /// + /// 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("RunResultList:\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 + /// + /// RunResultList object + public static RunResultList 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. + /// + /// RunResultList object + public virtual RunResultList DuplicateRunResultList() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateRunResultList(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel DuplicateOpenAPIGenBaseModel() + { + return DuplicateRunResultList(); + } + + /// + /// 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 RunResultList); + } + + /// + /// Returns true if RunResultList instances are equal + /// + /// Instance of RunResultList to be compared + /// Boolean + public bool Equals(RunResultList 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(@"^RunResultList$", 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/RunStatus.cs b/src/PollinationSDK/Model/RunStatus.cs new file mode 100644 index 000000000..70362abe0 --- /dev/null +++ b/src/PollinationSDK/Model/RunStatus.cs @@ -0,0 +1,414 @@ +/* + * 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 +{ + /// + /// Job Status. + /// + [DataContract(Name = "RunStatus")] + public partial class RunStatus : OpenAPIGenBaseModel, IEquatable, IValidatableObject + { + /// + /// The status of this run. + /// + /// The status of this run. + [DataMember(Name="status", EmitDefaultValue=false)] + public RunStatusEnum Status { get; set; } = RunStatusEnum.Unknown; + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected RunStatus() + { + // Set non-required readonly properties with defaultValue + this.ApiVersion = "v1beta1"; + this.Type = "RunStatus"; + } + + /// + /// Initializes a new instance of the class. + /// + /// The inputs used for this run. (required). + /// The outputs produced by this run. (required). + /// The time at which the task was started (required). + /// The ID of the individual run. (required). + /// The ID of the job that generated this run. (required). + /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. + /// Any message produced by the task. Usually error/debugging hints.. + /// The time at which the task was completed. + /// Source url for the status object. It can be a recipe or a function.. + /// The ID of the first step in the run.. + /// The status of this run.. + /// steps. + public RunStatus + ( + List> inputs, List> outputs, DateTime startedAt, string id, string jobId, // Required parameters + Dictionary annotations= default, string message= default, DateTime finishedAt= default, string source= default, string entrypoint= default, RunStatusEnum status= RunStatusEnum.Unknown, Dictionary steps= default // Optional parameters + ) : base()// BaseClass + { + // to ensure "inputs" is required (not null) + this.Inputs = inputs ?? throw new ArgumentNullException("inputs is a required property for RunStatus and cannot be null"); + // to ensure "outputs" is required (not null) + this.Outputs = outputs ?? throw new ArgumentNullException("outputs is a required property for RunStatus and cannot be null"); + this.StartedAt = startedAt; + // to ensure "id" is required (not null) + this.Id = id ?? throw new ArgumentNullException("id is a required property for RunStatus and cannot be null"); + // to ensure "jobId" is required (not null) + this.JobId = jobId ?? throw new ArgumentNullException("jobId is a required property for RunStatus and cannot be null"); + this.Annotations = annotations; + this.Message = message; + this.FinishedAt = finishedAt; + this.Source = source; + this.Entrypoint = entrypoint; + this.Status = status; + this.Steps = steps; + + // Set non-required readonly properties with defaultValue + this.ApiVersion = "v1beta1"; + this.Type = "RunStatus"; + } + + //============================================== 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; } = "RunStatus"; + + /// + /// The inputs used for this run. + /// + /// The inputs used for this run. + [DataMember(Name = "inputs", IsRequired = true, EmitDefaultValue = false)] + public List> Inputs { get; set; } + /// + /// The outputs produced by this run. + /// + /// The outputs produced by this run. + [DataMember(Name = "outputs", IsRequired = true, EmitDefaultValue = false)] + public List> Outputs { get; set; } + /// + /// The time at which the task was started + /// + /// The time at which the task was started + [DataMember(Name = "started_at", IsRequired = true, EmitDefaultValue = false)] + public DateTime StartedAt { get; set; } + /// + /// The ID of the individual run. + /// + /// The ID of the individual run. + [DataMember(Name = "id", IsRequired = true, EmitDefaultValue = false)] + public string Id { get; set; } + /// + /// The ID of the job that generated this run. + /// + /// The ID of the job that generated this run. + [DataMember(Name = "job_id", IsRequired = true, EmitDefaultValue = false)] + public string JobId { 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; } + /// + /// Any message produced by the task. Usually error/debugging hints. + /// + /// Any message produced by the task. Usually error/debugging hints. + [DataMember(Name = "message", EmitDefaultValue = false)] + public string Message { get; set; } + /// + /// The time at which the task was completed + /// + /// The time at which the task was completed + [DataMember(Name = "finished_at", EmitDefaultValue = false)] + public DateTime FinishedAt { get; set; } + /// + /// Source url for the status object. It can be a recipe or a function. + /// + /// Source url for the status object. It can be a recipe or a function. + [DataMember(Name = "source", EmitDefaultValue = false)] + public string Source { get; set; } + /// + /// The ID of the first step in the run. + /// + /// The ID of the first step in the run. + [DataMember(Name = "entrypoint", EmitDefaultValue = false)] + public string Entrypoint { get; set; } + /// + /// Gets or Sets Steps + /// + [DataMember(Name = "steps", EmitDefaultValue = false)] + public Dictionary Steps { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + return "RunStatus"; + } + + /// + /// 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("RunStatus:\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Inputs: ").Append(Inputs).Append("\n"); + sb.Append(" Outputs: ").Append(Outputs).Append("\n"); + sb.Append(" StartedAt: ").Append(StartedAt).Append("\n"); + sb.Append(" Id: ").Append(Id).Append("\n"); + sb.Append(" JobId: ").Append(JobId).Append("\n"); + sb.Append(" Annotations: ").Append(Annotations).Append("\n"); + sb.Append(" Message: ").Append(Message).Append("\n"); + sb.Append(" FinishedAt: ").Append(FinishedAt).Append("\n"); + sb.Append(" Source: ").Append(Source).Append("\n"); + sb.Append(" ApiVersion: ").Append(ApiVersion).Append("\n"); + sb.Append(" Entrypoint: ").Append(Entrypoint).Append("\n"); + sb.Append(" Status: ").Append(Status).Append("\n"); + sb.Append(" Steps: ").Append(Steps).Append("\n"); + return sb.ToString(); + } + + /// + /// Returns the object from JSON string + /// + /// RunStatus object + public static RunStatus 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. + /// + /// RunStatus object + public virtual RunStatus DuplicateRunStatus() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateRunStatus(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel DuplicateOpenAPIGenBaseModel() + { + return DuplicateRunStatus(); + } + + /// + /// 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 RunStatus); + } + + /// + /// Returns true if RunStatus instances are equal + /// + /// Instance of RunStatus to be compared + /// Boolean + public bool Equals(RunStatus input) + { + if (input == null) + return false; + return 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.StartedAt == input.StartedAt || + (this.StartedAt != null && + this.StartedAt.Equals(input.StartedAt)) + ) && base.Equals(input) && + ( + this.Id == input.Id || + (this.Id != null && + this.Id.Equals(input.Id)) + ) && base.Equals(input) && + ( + this.JobId == input.JobId || + (this.JobId != null && + this.JobId.Equals(input.JobId)) + ) && base.Equals(input) && + ( + this.Annotations == input.Annotations || + this.Annotations != null && + input.Annotations != null && + this.Annotations.SequenceEqual(input.Annotations) + ) && base.Equals(input) && + ( + this.Message == input.Message || + (this.Message != null && + this.Message.Equals(input.Message)) + ) && base.Equals(input) && + ( + this.FinishedAt == input.FinishedAt || + (this.FinishedAt != null && + this.FinishedAt.Equals(input.FinishedAt)) + ) && base.Equals(input) && + ( + this.Source == input.Source || + (this.Source != null && + this.Source.Equals(input.Source)) + ) && base.Equals(input) && + ( + this.ApiVersion == input.ApiVersion || + (this.ApiVersion != null && + this.ApiVersion.Equals(input.ApiVersion)) + ) && base.Equals(input) && + ( + this.Entrypoint == input.Entrypoint || + (this.Entrypoint != null && + this.Entrypoint.Equals(input.Entrypoint)) + ) && base.Equals(input) && + ( + this.Status == input.Status || + (this.Status != null && + this.Status.Equals(input.Status)) + ) && base.Equals(input) && + ( + this.Steps == input.Steps || + this.Steps != null && + input.Steps != null && + this.Steps.SequenceEqual(input.Steps) + ) && 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.Inputs != null) + hashCode = hashCode * 59 + this.Inputs.GetHashCode(); + if (this.Outputs != null) + hashCode = hashCode * 59 + this.Outputs.GetHashCode(); + if (this.StartedAt != null) + hashCode = hashCode * 59 + this.StartedAt.GetHashCode(); + if (this.Id != null) + hashCode = hashCode * 59 + this.Id.GetHashCode(); + if (this.JobId != null) + hashCode = hashCode * 59 + this.JobId.GetHashCode(); + if (this.Annotations != null) + hashCode = hashCode * 59 + this.Annotations.GetHashCode(); + if (this.Message != null) + hashCode = hashCode * 59 + this.Message.GetHashCode(); + if (this.FinishedAt != null) + hashCode = hashCode * 59 + this.FinishedAt.GetHashCode(); + if (this.Source != null) + hashCode = hashCode * 59 + this.Source.GetHashCode(); + if (this.ApiVersion != null) + hashCode = hashCode * 59 + this.ApiVersion.GetHashCode(); + if (this.Entrypoint != null) + hashCode = hashCode * 59 + this.Entrypoint.GetHashCode(); + if (this.Status != null) + hashCode = hashCode * 59 + this.Status.GetHashCode(); + if (this.Steps != null) + hashCode = hashCode * 59 + this.Steps.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(@"^RunStatus$", 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/RunStatusEnum.cs b/src/PollinationSDK/Model/RunStatusEnum.cs new file mode 100644 index 000000000..36fdefbb0 --- /dev/null +++ b/src/PollinationSDK/Model/RunStatusEnum.cs @@ -0,0 +1,85 @@ +/* + * 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 +{ + /// + /// Enumaration of allowable status strings + /// + /// Enumaration of allowable status strings + + [JsonConverter(typeof(StringEnumConverter))] + + public enum RunStatusEnum + { + /// + /// Enum Created for value: Created + /// + [EnumMember(Value = "Created")] + Created = 1, + + /// + /// Enum Scheduled for value: Scheduled + /// + [EnumMember(Value = "Scheduled")] + Scheduled = 2, + + /// + /// Enum Running for value: Running + /// + [EnumMember(Value = "Running")] + Running = 3, + + /// + /// Enum PostProcessing for value: Post-Processing + /// + [EnumMember(Value = "Post-Processing")] + PostProcessing = 4, + + /// + /// Enum Failed for value: Failed + /// + [EnumMember(Value = "Failed")] + Failed = 5, + + /// + /// Enum Cancelled for value: Cancelled + /// + [EnumMember(Value = "Cancelled")] + Cancelled = 6, + + /// + /// Enum Succeeded for value: Succeeded + /// + [EnumMember(Value = "Succeeded")] + Succeeded = 7, + + /// + /// Enum Unknown for value: Unknown + /// + [EnumMember(Value = "Unknown")] + Unknown = 8 + + } + +} diff --git a/src/PollinationSDK/Model/S3.cs b/src/PollinationSDK/Model/S3.cs new file mode 100644 index 000000000..8e8a9947c --- /dev/null +++ b/src/PollinationSDK/Model/S3.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 +{ + /// + /// S3 Source An S3 bucket artifact Source. + /// + [DataContract(Name = "S3")] + public partial class S3 : ArtifactSource, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected S3() + { + // Set non-required readonly properties with defaultValue + this.Type = "S3"; + } + + /// + /// Initializes a new instance of the class. + /// + /// The path inside the bucket to source artifacts from. (required). + /// The HTTP endpoint to reach the S3 bucket. (required). + /// The name of the S3 bucket on the host server. (required). + /// Path to the file holding the AccessKey and SecretAccessKey to authenticate to the bucket. Assumes public bucket access if none are specified.. + /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. + public S3 + ( + string key, string endpoint, string bucket, // Required parameters + Dictionary annotations= default, string credentialsPath= default // Optional parameters + ) : base(annotations: annotations)// BaseClass + { + // to ensure "key" is required (not null) + this.Key = key ?? throw new ArgumentNullException("key is a required property for S3 and cannot be null"); + // to ensure "endpoint" is required (not null) + this.Endpoint = endpoint ?? throw new ArgumentNullException("endpoint is a required property for S3 and cannot be null"); + // to ensure "bucket" is required (not null) + this.Bucket = bucket ?? throw new ArgumentNullException("bucket is a required property for S3 and cannot be null"); + this.CredentialsPath = credentialsPath; + + // Set non-required readonly properties with defaultValue + this.Type = "S3"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "S3"; + + /// + /// The path inside the bucket to source artifacts from. + /// + /// The path inside the bucket to source artifacts from. + [DataMember(Name = "key", IsRequired = true, EmitDefaultValue = false)] + public string Key { get; set; } + /// + /// The HTTP endpoint to reach the S3 bucket. + /// + /// The HTTP endpoint to reach the S3 bucket. + [DataMember(Name = "endpoint", IsRequired = true, EmitDefaultValue = false)] + public string Endpoint { get; set; } + /// + /// The name of the S3 bucket on the host server. + /// + /// The name of the S3 bucket on the host server. + [DataMember(Name = "bucket", IsRequired = true, EmitDefaultValue = false)] + public string Bucket { get; set; } + /// + /// Path to the file holding the AccessKey and SecretAccessKey to authenticate to the bucket. Assumes public bucket access if none are specified. + /// + /// Path to the file holding the AccessKey and SecretAccessKey to authenticate to the bucket. Assumes public bucket access if none are specified. + [DataMember(Name = "credentials_path", EmitDefaultValue = false)] + public string CredentialsPath { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + return "S3"; + } + + /// + /// 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("S3:\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Annotations: ").Append(Annotations).Append("\n"); + sb.Append(" Key: ").Append(Key).Append("\n"); + sb.Append(" Endpoint: ").Append(Endpoint).Append("\n"); + sb.Append(" Bucket: ").Append(Bucket).Append("\n"); + sb.Append(" CredentialsPath: ").Append(CredentialsPath).Append("\n"); + return sb.ToString(); + } + + /// + /// Returns the object from JSON string + /// + /// S3 object + public static S3 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. + /// + /// S3 object + public virtual S3 DuplicateS3() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateS3(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override ArtifactSource DuplicateArtifactSource() + { + return DuplicateS3(); + } + + /// + /// 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 S3); + } + + /// + /// Returns true if S3 instances are equal + /// + /// Instance of S3 to be compared + /// Boolean + public bool Equals(S3 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.Endpoint == input.Endpoint || + (this.Endpoint != null && + this.Endpoint.Equals(input.Endpoint)) + ) && base.Equals(input) && + ( + this.Bucket == input.Bucket || + (this.Bucket != null && + this.Bucket.Equals(input.Bucket)) + ) && base.Equals(input) && + ( + this.CredentialsPath == input.CredentialsPath || + (this.CredentialsPath != null && + this.CredentialsPath.Equals(input.CredentialsPath)) + ) && 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.Endpoint != null) + hashCode = hashCode * 59 + this.Endpoint.GetHashCode(); + if (this.Bucket != null) + hashCode = hashCode * 59 + this.Bucket.GetHashCode(); + if (this.CredentialsPath != null) + hashCode = hashCode * 59 + this.CredentialsPath.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(@"^S3$", 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/S3UploadRequest.cs b/src/PollinationSDK/Model/S3UploadRequest.cs new file mode 100644 index 000000000..42d33bae8 --- /dev/null +++ b/src/PollinationSDK/Model/S3UploadRequest.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 +{ + /// + /// S3UploadRequest + /// + [DataContract(Name = "S3UploadRequest")] + public partial class S3UploadRequest : OpenAPIGenBaseModel, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected S3UploadRequest() + { + // Set non-required readonly properties with defaultValue + this.Type = "S3UploadRequest"; + } + + /// + /// Initializes a new instance of the class. + /// + /// url (required). + /// fields (required). + public S3UploadRequest + ( + string url, Dictionary fields// Required parameters + // Optional parameters + ) : base()// BaseClass + { + // to ensure "url" is required (not null) + this.Url = url ?? throw new ArgumentNullException("url is a required property for S3UploadRequest and cannot be null"); + // to ensure "fields" is required (not null) + this.Fields = fields ?? throw new ArgumentNullException("fields is a required property for S3UploadRequest and cannot be null"); + + // Set non-required readonly properties with defaultValue + this.Type = "S3UploadRequest"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "S3UploadRequest"; + + /// + /// Gets or Sets Url + /// + [DataMember(Name = "url", IsRequired = true, EmitDefaultValue = false)] + public string Url { get; set; } + /// + /// Gets or Sets Fields + /// + [DataMember(Name = "fields", IsRequired = true, EmitDefaultValue = false)] + public Dictionary Fields { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + return "S3UploadRequest"; + } + + /// + /// 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("S3UploadRequest:\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Url: ").Append(Url).Append("\n"); + sb.Append(" Fields: ").Append(Fields).Append("\n"); + return sb.ToString(); + } + + /// + /// Returns the object from JSON string + /// + /// S3UploadRequest object + public static S3UploadRequest 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. + /// + /// S3UploadRequest object + public virtual S3UploadRequest DuplicateS3UploadRequest() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateS3UploadRequest(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel DuplicateOpenAPIGenBaseModel() + { + return DuplicateS3UploadRequest(); + } + + /// + /// 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 S3UploadRequest); + } + + /// + /// Returns true if S3UploadRequest instances are equal + /// + /// Instance of S3UploadRequest to be compared + /// Boolean + public bool Equals(S3UploadRequest input) + { + if (input == null) + return false; + return base.Equals(input) && + ( + this.Url == input.Url || + (this.Url != null && + this.Url.Equals(input.Url)) + ) && base.Equals(input) && + ( + this.Fields == input.Fields || + this.Fields != null && + input.Fields != null && + this.Fields.SequenceEqual(input.Fields) + ) && 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.Url != null) + hashCode = hashCode * 59 + this.Url.GetHashCode(); + if (this.Fields != null) + hashCode = hashCode * 59 + this.Fields.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(@"^S3UploadRequest$", 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/SortEnum.cs b/src/PollinationSDK/Model/SortEnum.cs new file mode 100644 index 000000000..ee9e0ec85 --- /dev/null +++ b/src/PollinationSDK/Model/SortEnum.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 SortEnum + { + /// + /// Enum Ascending for value: ascending + /// + [EnumMember(Value = "ascending")] + Ascending = 1, + + /// + /// Enum Descending for value: descending + /// + [EnumMember(Value = "descending")] + Descending = 2 + + } + +} 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/StatusType.cs b/src/PollinationSDK/Model/StatusType.cs new file mode 100644 index 000000000..14c026b01 --- /dev/null +++ b/src/PollinationSDK/Model/StatusType.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 +{ + /// + /// Type enum for status type. + /// + /// Type enum for status type. + + [JsonConverter(typeof(StringEnumConverter))] + + public enum StatusType + { + /// + /// Enum Function for value: Function + /// + [EnumMember(Value = "Function")] + Function = 1, + + /// + /// Enum DAG for value: DAG + /// + [EnumMember(Value = "DAG")] + DAG = 2, + + /// + /// Enum Loop for value: Loop + /// + [EnumMember(Value = "Loop")] + Loop = 3, + + /// + /// Enum Unknown for value: Unknown + /// + [EnumMember(Value = "Unknown")] + Unknown = 4 + + } + +} diff --git a/src/PollinationSDK/Model/StepArrayInput.cs b/src/PollinationSDK/Model/StepArrayInput.cs new file mode 100644 index 000000000..62d1704f1 --- /dev/null +++ b/src/PollinationSDK/Model/StepArrayInput.cs @@ -0,0 +1,290 @@ +/* + * 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 JSON array input. + /// + [DataContract(Name = "StepArrayInput")] + public partial class StepArrayInput : GenericInput, IEquatable, IValidatableObject + { + /// + /// Type of items in an array. All the items in an array must be from the same type. + /// + /// Type of items in an array. All the items in an array must be from the same type. + [DataMember(Name="items_type", EmitDefaultValue=false)] + public ItemType ItemsType { get; set; } = ItemType.String; + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected StepArrayInput() + { + // Set non-required readonly properties with defaultValue + this.Type = "StepArrayInput"; + } + + /// + /// Initializes a new instance of the class. + /// + /// value (required). + /// Default value to use for an input if a value was not supplied.. + /// A list of aliases for this input in different platforms.. + /// A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. (default to false). + /// An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec.. + /// Type of items in an array. All the items in an array must be from the same type.. + /// Input name. (required). + /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. + /// Optional description for input.. + public StepArrayInput + ( + string name, List value, // Required parameters + Dictionary annotations= default, string description= default, List _default= default, List> alias= default, bool required = false, Object spec= default, ItemType itemsType= ItemType.String // Optional parameters + ) : base(name: name, annotations: annotations, description: description)// BaseClass + { + // to ensure "value" is required (not null) + this.Value = value ?? throw new ArgumentNullException("value is a required property for StepArrayInput and cannot be null"); + this.Default = _default; + this.Alias = alias; + this.Required = required; + this.Spec = spec; + this.ItemsType = itemsType; + + // Set non-required readonly properties with defaultValue + this.Type = "StepArrayInput"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "StepArrayInput"; + + /// + /// Gets or Sets Value + /// + [DataMember(Name = "value", IsRequired = true, EmitDefaultValue = false)] + public List Value { get; set; } + /// + /// Default value to use for an input if a value was not supplied. + /// + /// Default value to use for an input if a value was not supplied. + [DataMember(Name = "default", EmitDefaultValue = false)] + public List Default { get; set; } + /// + /// A list of aliases for this input in different platforms. + /// + /// A list of aliases for this input in different platforms. + [DataMember(Name = "alias", EmitDefaultValue = false)] + public List> Alias { get; set; } + /// + /// A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. + /// + /// A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. + [DataMember(Name = "required", EmitDefaultValue = true)] + public bool Required { get; set; } = false; + /// + /// An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec. + /// + /// An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec. + [DataMember(Name = "spec", EmitDefaultValue = false)] + public Object Spec { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + return "StepArrayInput"; + } + + /// + /// 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("StepArrayInput:\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Annotations: ").Append(Annotations).Append("\n"); + sb.Append(" Description: ").Append(Description).Append("\n"); + sb.Append(" Value: ").Append(Value).Append("\n"); + sb.Append(" Default: ").Append(Default).Append("\n"); + sb.Append(" Alias: ").Append(Alias).Append("\n"); + sb.Append(" Required: ").Append(Required).Append("\n"); + sb.Append(" Spec: ").Append(Spec).Append("\n"); + sb.Append(" ItemsType: ").Append(ItemsType).Append("\n"); + return sb.ToString(); + } + + /// + /// Returns the object from JSON string + /// + /// StepArrayInput object + public static StepArrayInput 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. + /// + /// StepArrayInput object + public virtual StepArrayInput DuplicateStepArrayInput() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateStepArrayInput(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override GenericInput DuplicateGenericInput() + { + return DuplicateStepArrayInput(); + } + + /// + /// 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 StepArrayInput); + } + + /// + /// Returns true if StepArrayInput instances are equal + /// + /// Instance of StepArrayInput to be compared + /// Boolean + public bool Equals(StepArrayInput input) + { + if (input == null) + return false; + return base.Equals(input) && + ( + this.Value == input.Value || + this.Value != null && + input.Value != null && + this.Value.SequenceEqual(input.Value) + ) && base.Equals(input) && + ( + this.Default == input.Default || + this.Default != null && + input.Default != null && + this.Default.SequenceEqual(input.Default) + ) && base.Equals(input) && + ( + this.Alias == input.Alias || + this.Alias != null && + input.Alias != null && + this.Alias.SequenceEqual(input.Alias) + ) && base.Equals(input) && + ( + this.Required == input.Required || + (this.Required != null && + this.Required.Equals(input.Required)) + ) && base.Equals(input) && + ( + this.ItemsType == input.ItemsType || + (this.ItemsType != null && + this.ItemsType.Equals(input.ItemsType)) + ) && 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.Value != null) + hashCode = hashCode * 59 + this.Value.GetHashCode(); + if (this.Default != null) + hashCode = hashCode * 59 + this.Default.GetHashCode(); + if (this.Alias != null) + hashCode = hashCode * 59 + this.Alias.GetHashCode(); + if (this.Required != null) + hashCode = hashCode * 59 + this.Required.GetHashCode(); + if (this.Spec != null) + hashCode = hashCode * 59 + this.Spec.GetHashCode(); + if (this.ItemsType != null) + hashCode = hashCode * 59 + this.ItemsType.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(@"^StepArrayInput$", 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/StepArrayOutput.cs b/src/PollinationSDK/Model/StepArrayOutput.cs new file mode 100644 index 000000000..219b515bf --- /dev/null +++ b/src/PollinationSDK/Model/StepArrayOutput.cs @@ -0,0 +1,233 @@ +/* + * 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 JSON array output. + /// + [DataContract(Name = "StepArrayOutput")] + public partial class StepArrayOutput : FunctionStringOutput, IEquatable, IValidatableObject + { + /// + /// Type of items in this array. All the items in an array must be from the same type. + /// + /// Type of items in this array. All the items in an array must be from the same type. + [DataMember(Name="items_type", EmitDefaultValue=false)] + public ItemType ItemsType { get; set; } = ItemType.String; + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected StepArrayOutput() + { + // Set non-required readonly properties with defaultValue + this.Type = "StepArrayOutput"; + } + + /// + /// Initializes a new instance of the class. + /// + /// value (required). + /// Type of items in this array. All the items in an array must be from the same type.. + /// Output name. (required). + /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. + /// Optional description for output.. + /// Path to the output artifact relative to where the function command is executed. (required). + /// A boolean to indicate if an artifact output is required. A False value makes the artifact optional. (default to true). + public StepArrayOutput + ( + string name, string path, List value, // Required parameters + Dictionary annotations= default, string description= default, bool required = true, ItemType itemsType= ItemType.String // Optional parameters + ) : base(name: name, annotations: annotations, description: description, path: path, required: required)// BaseClass + { + // to ensure "value" is required (not null) + this.Value = value ?? throw new ArgumentNullException("value is a required property for StepArrayOutput and cannot be null"); + this.ItemsType = itemsType; + + // Set non-required readonly properties with defaultValue + this.Type = "StepArrayOutput"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "StepArrayOutput"; + + /// + /// Gets or Sets Value + /// + [DataMember(Name = "value", IsRequired = true, EmitDefaultValue = false)] + public List Value { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + return "StepArrayOutput"; + } + + /// + /// 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("StepArrayOutput:\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Annotations: ").Append(Annotations).Append("\n"); + sb.Append(" Description: ").Append(Description).Append("\n"); + sb.Append(" Path: ").Append(Path).Append("\n"); + sb.Append(" Required: ").Append(Required).Append("\n"); + sb.Append(" Value: ").Append(Value).Append("\n"); + sb.Append(" ItemsType: ").Append(ItemsType).Append("\n"); + return sb.ToString(); + } + + /// + /// Returns the object from JSON string + /// + /// StepArrayOutput object + public static StepArrayOutput 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. + /// + /// StepArrayOutput object + public virtual StepArrayOutput DuplicateStepArrayOutput() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateStepArrayOutput(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override FunctionStringOutput DuplicateFunctionStringOutput() + { + return DuplicateStepArrayOutput(); + } + + /// + /// 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 StepArrayOutput); + } + + /// + /// Returns true if StepArrayOutput instances are equal + /// + /// Instance of StepArrayOutput to be compared + /// Boolean + public bool Equals(StepArrayOutput input) + { + if (input == null) + return false; + return base.Equals(input) && + ( + this.Value == input.Value || + this.Value != null && + input.Value != null && + this.Value.SequenceEqual(input.Value) + ) && base.Equals(input) && + ( + this.ItemsType == input.ItemsType || + (this.ItemsType != null && + this.ItemsType.Equals(input.ItemsType)) + ) && 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.Value != null) + hashCode = hashCode * 59 + this.Value.GetHashCode(); + if (this.ItemsType != null) + hashCode = hashCode * 59 + this.ItemsType.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(@"^StepArrayOutput$", 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/StepBooleanInput.cs b/src/PollinationSDK/Model/StepBooleanInput.cs new file mode 100644 index 000000000..ac1ae39b1 --- /dev/null +++ b/src/PollinationSDK/Model/StepBooleanInput.cs @@ -0,0 +1,271 @@ +/* + * 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 boolean type matches only two special values: True and False. + /// + [DataContract(Name = "StepBooleanInput")] + public partial class StepBooleanInput : GenericInput, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected StepBooleanInput() + { + // Set non-required readonly properties with defaultValue + this.Type = "StepBooleanInput"; + } + + /// + /// Initializes a new instance of the class. + /// + /// value (required). + /// Default value to use for an input if a value was not supplied.. + /// A list of aliases for this input in different platforms.. + /// A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. (default to false). + /// An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec.. + /// Input name. (required). + /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. + /// Optional description for input.. + public StepBooleanInput + ( + string name, bool value, // Required parameters + Dictionary annotations= default, string description= default, bool _default= default, List> alias= default, bool required = false, Object spec= default // Optional parameters + ) : base(name: name, annotations: annotations, description: description)// BaseClass + { + this.Value = value; + this.Default = _default; + this.Alias = alias; + this.Required = required; + this.Spec = spec; + + // Set non-required readonly properties with defaultValue + this.Type = "StepBooleanInput"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "StepBooleanInput"; + + /// + /// Gets or Sets Value + /// + [DataMember(Name = "value", IsRequired = true, EmitDefaultValue = false)] + public bool Value { get; set; } + /// + /// Default value to use for an input if a value was not supplied. + /// + /// Default value to use for an input if a value was not supplied. + [DataMember(Name = "default", EmitDefaultValue = false)] + public bool Default { get; set; } + /// + /// A list of aliases for this input in different platforms. + /// + /// A list of aliases for this input in different platforms. + [DataMember(Name = "alias", EmitDefaultValue = false)] + public List> Alias { get; set; } + /// + /// A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. + /// + /// A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. + [DataMember(Name = "required", EmitDefaultValue = true)] + public bool Required { get; set; } = false; + /// + /// An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec. + /// + /// An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec. + [DataMember(Name = "spec", EmitDefaultValue = false)] + public Object Spec { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + return "StepBooleanInput"; + } + + /// + /// 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("StepBooleanInput:\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Annotations: ").Append(Annotations).Append("\n"); + sb.Append(" Description: ").Append(Description).Append("\n"); + sb.Append(" Value: ").Append(Value).Append("\n"); + sb.Append(" Default: ").Append(Default).Append("\n"); + sb.Append(" Alias: ").Append(Alias).Append("\n"); + sb.Append(" Required: ").Append(Required).Append("\n"); + sb.Append(" Spec: ").Append(Spec).Append("\n"); + return sb.ToString(); + } + + /// + /// Returns the object from JSON string + /// + /// StepBooleanInput object + public static StepBooleanInput 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. + /// + /// StepBooleanInput object + public virtual StepBooleanInput DuplicateStepBooleanInput() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateStepBooleanInput(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override GenericInput DuplicateGenericInput() + { + return DuplicateStepBooleanInput(); + } + + /// + /// 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 StepBooleanInput); + } + + /// + /// Returns true if StepBooleanInput instances are equal + /// + /// Instance of StepBooleanInput to be compared + /// Boolean + public bool Equals(StepBooleanInput input) + { + if (input == null) + return false; + return base.Equals(input) && + ( + this.Value == input.Value || + (this.Value != null && + this.Value.Equals(input.Value)) + ) && base.Equals(input) && + ( + this.Default == input.Default || + (this.Default != null && + this.Default.Equals(input.Default)) + ) && base.Equals(input) && + ( + this.Alias == input.Alias || + this.Alias != null && + input.Alias != null && + this.Alias.SequenceEqual(input.Alias) + ) && base.Equals(input) && + ( + this.Required == input.Required || + (this.Required != null && + this.Required.Equals(input.Required)) + ) && 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.Value != null) + hashCode = hashCode * 59 + this.Value.GetHashCode(); + if (this.Default != null) + hashCode = hashCode * 59 + this.Default.GetHashCode(); + if (this.Alias != null) + hashCode = hashCode * 59 + this.Alias.GetHashCode(); + if (this.Required != null) + hashCode = hashCode * 59 + this.Required.GetHashCode(); + if (this.Spec != null) + hashCode = hashCode * 59 + this.Spec.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(@"^StepBooleanInput$", 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/StepBooleanOutput.cs b/src/PollinationSDK/Model/StepBooleanOutput.cs new file mode 100644 index 000000000..f5fd6cfa1 --- /dev/null +++ b/src/PollinationSDK/Model/StepBooleanOutput.cs @@ -0,0 +1,215 @@ +/* + * 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 boolean type matches only two special values: True and False. + /// + [DataContract(Name = "StepBooleanOutput")] + public partial class StepBooleanOutput : FunctionBooleanOutput, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected StepBooleanOutput() + { + // Set non-required readonly properties with defaultValue + this.Type = "StepBooleanOutput"; + } + + /// + /// Initializes a new instance of the class. + /// + /// value (required). + /// Output name. (required). + /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. + /// Optional description for output.. + /// Path to the output artifact relative to where the function command is executed. (required). + /// A boolean to indicate if an artifact output is required. A False value makes the artifact optional. (default to true). + public StepBooleanOutput + ( + string name, string path, bool value, // Required parameters + Dictionary annotations= default, string description= default, bool required = true // Optional parameters + ) : base(name: name, annotations: annotations, description: description, path: path, required: required)// BaseClass + { + this.Value = value; + + // Set non-required readonly properties with defaultValue + this.Type = "StepBooleanOutput"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "StepBooleanOutput"; + + /// + /// Gets or Sets Value + /// + [DataMember(Name = "value", IsRequired = true, EmitDefaultValue = false)] + public bool Value { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + return "StepBooleanOutput"; + } + + /// + /// 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("StepBooleanOutput:\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Annotations: ").Append(Annotations).Append("\n"); + sb.Append(" Description: ").Append(Description).Append("\n"); + sb.Append(" Path: ").Append(Path).Append("\n"); + sb.Append(" Required: ").Append(Required).Append("\n"); + sb.Append(" Value: ").Append(Value).Append("\n"); + return sb.ToString(); + } + + /// + /// Returns the object from JSON string + /// + /// StepBooleanOutput object + public static StepBooleanOutput 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. + /// + /// StepBooleanOutput object + public virtual StepBooleanOutput DuplicateStepBooleanOutput() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateStepBooleanOutput(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override FunctionBooleanOutput DuplicateFunctionBooleanOutput() + { + return DuplicateStepBooleanOutput(); + } + + /// + /// 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 StepBooleanOutput); + } + + /// + /// Returns true if StepBooleanOutput instances are equal + /// + /// Instance of StepBooleanOutput to be compared + /// Boolean + public bool Equals(StepBooleanOutput input) + { + if (input == null) + return false; + return base.Equals(input) && + ( + this.Value == input.Value || + (this.Value != null && + this.Value.Equals(input.Value)) + ) && 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.Value != null) + hashCode = hashCode * 59 + this.Value.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(@"^StepBooleanOutput$", 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/StepFileInput.cs b/src/PollinationSDK/Model/StepFileInput.cs new file mode 100644 index 000000000..7c99b9c87 --- /dev/null +++ b/src/PollinationSDK/Model/StepFileInput.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 +{ + /// + /// A file input. + /// + [DataContract(Name = "StepFileInput")] + public partial class StepFileInput : GenericInput, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected StepFileInput() + { + // Set non-required readonly properties with defaultValue + this.Type = "StepFileInput"; + } + + /// + /// Initializes a new instance of the class. + /// + /// The path to source the file from. (required). + /// The default source for file if the value is not provided.. + /// A list of aliases for this input in different platforms.. + /// A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. (default to false). + /// An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec.. + /// 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.. + /// Optional list of extensions for file. The check for extension is case-insensitive.. + /// Input name. (required). + /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. + /// Optional description for input.. + public StepFileInput + ( + string name, AnyOf source, // Required parameters + Dictionary annotations= default, string description= default, AnyOf _default= default, List> alias= default, bool required = false, Object spec= default, string path= default, List extensions= default // Optional parameters + ) : base(name: name, annotations: annotations, description: description)// BaseClass + { + // to ensure "source" is required (not null) + this.Source = source ?? throw new ArgumentNullException("source is a required property for StepFileInput and cannot be null"); + this.Default = _default; + this.Alias = alias; + this.Required = required; + this.Spec = spec; + this.Path = path; + this.Extensions = extensions; + + // Set non-required readonly properties with defaultValue + this.Type = "StepFileInput"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "StepFileInput"; + + /// + /// The path to source the file from. + /// + /// The path to source the file from. + [DataMember(Name = "source", IsRequired = true, EmitDefaultValue = false)] + public AnyOf Source { get; set; } + /// + /// The default source for file if the value is not provided. + /// + /// The default source for file if the value is not provided. + [DataMember(Name = "default", EmitDefaultValue = false)] + public AnyOf Default { get; set; } + /// + /// A list of aliases for this input in different platforms. + /// + /// A list of aliases for this input in different platforms. + [DataMember(Name = "alias", EmitDefaultValue = false)] + public List> Alias { get; set; } + /// + /// A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. + /// + /// A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. + [DataMember(Name = "required", EmitDefaultValue = true)] + public bool Required { get; set; } = false; + /// + /// An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec. + /// + /// An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec. + [DataMember(Name = "spec", EmitDefaultValue = false)] + public Object Spec { get; set; } + /// + /// 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. + /// + /// 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. + [DataMember(Name = "path", EmitDefaultValue = false)] + public string Path { get; set; } + /// + /// Optional list of extensions for file. The check for extension is case-insensitive. + /// + /// Optional list of extensions for file. The check for extension is case-insensitive. + [DataMember(Name = "extensions", EmitDefaultValue = false)] + public List Extensions { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + return "StepFileInput"; + } + + /// + /// 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("StepFileInput:\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Annotations: ").Append(Annotations).Append("\n"); + sb.Append(" Description: ").Append(Description).Append("\n"); + sb.Append(" Source: ").Append(Source).Append("\n"); + sb.Append(" Default: ").Append(Default).Append("\n"); + sb.Append(" Alias: ").Append(Alias).Append("\n"); + sb.Append(" Required: ").Append(Required).Append("\n"); + sb.Append(" Spec: ").Append(Spec).Append("\n"); + sb.Append(" Path: ").Append(Path).Append("\n"); + sb.Append(" Extensions: ").Append(Extensions).Append("\n"); + return sb.ToString(); + } + + /// + /// Returns the object from JSON string + /// + /// StepFileInput object + public static StepFileInput 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. + /// + /// StepFileInput object + public virtual StepFileInput DuplicateStepFileInput() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateStepFileInput(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override GenericInput DuplicateGenericInput() + { + return DuplicateStepFileInput(); + } + + /// + /// 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 StepFileInput); + } + + /// + /// Returns true if StepFileInput instances are equal + /// + /// Instance of StepFileInput to be compared + /// Boolean + public bool Equals(StepFileInput input) + { + if (input == null) + return false; + return base.Equals(input) && + ( + this.Source == input.Source || + (this.Source != null && + this.Source.Equals(input.Source)) + ) && base.Equals(input) && + ( + this.Default == input.Default || + (this.Default != null && + this.Default.Equals(input.Default)) + ) && base.Equals(input) && + ( + this.Alias == input.Alias || + this.Alias != null && + input.Alias != null && + this.Alias.SequenceEqual(input.Alias) + ) && base.Equals(input) && + ( + this.Required == input.Required || + (this.Required != null && + this.Required.Equals(input.Required)) + ) && base.Equals(input) && + ( + this.Path == input.Path || + (this.Path != null && + this.Path.Equals(input.Path)) + ) && base.Equals(input) && + ( + this.Extensions == input.Extensions || + this.Extensions != null && + input.Extensions != null && + this.Extensions.SequenceEqual(input.Extensions) + ) && 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.Source != null) + hashCode = hashCode * 59 + this.Source.GetHashCode(); + if (this.Default != null) + hashCode = hashCode * 59 + this.Default.GetHashCode(); + if (this.Alias != null) + hashCode = hashCode * 59 + this.Alias.GetHashCode(); + if (this.Required != null) + hashCode = hashCode * 59 + this.Required.GetHashCode(); + if (this.Spec != null) + hashCode = hashCode * 59 + this.Spec.GetHashCode(); + if (this.Path != null) + hashCode = hashCode * 59 + this.Path.GetHashCode(); + if (this.Extensions != null) + hashCode = hashCode * 59 + this.Extensions.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(@"^StepFileInput$", 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/StepFileOutput.cs b/src/PollinationSDK/Model/StepFileOutput.cs new file mode 100644 index 000000000..7040d9468 --- /dev/null +++ b/src/PollinationSDK/Model/StepFileOutput.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 +{ + /// + /// A file output. + /// + [DataContract(Name = "StepFileOutput")] + public partial class StepFileOutput : FunctionFileOutput, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected StepFileOutput() + { + // Set non-required readonly properties with defaultValue + this.Type = "StepFileOutput"; + } + + /// + /// Initializes a new instance of the class. + /// + /// The path to source the file from. (required). + /// Output name. (required). + /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. + /// Optional description for output.. + /// Path to the output artifact relative to where the function command is executed. (required). + /// A boolean to indicate if an artifact output is required. A False value makes the artifact optional. (default to true). + public StepFileOutput + ( + string name, string path, AnyOf source, // Required parameters + Dictionary annotations= default, string description= default, bool required = true // Optional parameters + ) : base(name: name, annotations: annotations, description: description, path: path, required: required)// BaseClass + { + // to ensure "source" is required (not null) + this.Source = source ?? throw new ArgumentNullException("source is a required property for StepFileOutput and cannot be null"); + + // Set non-required readonly properties with defaultValue + this.Type = "StepFileOutput"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "StepFileOutput"; + + /// + /// The path to source the file from. + /// + /// The path to source the file from. + [DataMember(Name = "source", IsRequired = true, EmitDefaultValue = false)] + public AnyOf Source { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + return "StepFileOutput"; + } + + /// + /// 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("StepFileOutput:\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Annotations: ").Append(Annotations).Append("\n"); + sb.Append(" Description: ").Append(Description).Append("\n"); + sb.Append(" Path: ").Append(Path).Append("\n"); + sb.Append(" Required: ").Append(Required).Append("\n"); + sb.Append(" Source: ").Append(Source).Append("\n"); + return sb.ToString(); + } + + /// + /// Returns the object from JSON string + /// + /// StepFileOutput object + public static StepFileOutput 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. + /// + /// StepFileOutput object + public virtual StepFileOutput DuplicateStepFileOutput() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateStepFileOutput(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override FunctionFileOutput DuplicateFunctionFileOutput() + { + return DuplicateStepFileOutput(); + } + + /// + /// 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 StepFileOutput); + } + + /// + /// Returns true if StepFileOutput instances are equal + /// + /// Instance of StepFileOutput to be compared + /// Boolean + public bool Equals(StepFileOutput input) + { + if (input == null) + return false; + return base.Equals(input) && + ( + this.Source == input.Source || + (this.Source != null && + this.Source.Equals(input.Source)) + ) && 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.Source != null) + hashCode = hashCode * 59 + this.Source.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(@"^StepFileOutput$", 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/StepFolderInput.cs b/src/PollinationSDK/Model/StepFolderInput.cs new file mode 100644 index 000000000..96703d06d --- /dev/null +++ b/src/PollinationSDK/Model/StepFolderInput.cs @@ -0,0 +1,289 @@ +/* + * 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 folder input. + /// + [DataContract(Name = "StepFolderInput")] + public partial class StepFolderInput : GenericInput, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected StepFolderInput() + { + // Set non-required readonly properties with defaultValue + this.Type = "StepFolderInput"; + } + + /// + /// Initializes a new instance of the class. + /// + /// The path to source the file from. (required). + /// The default source for file if the value is not provided.. + /// A list of aliases for this input in different platforms.. + /// A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. (default to false). + /// An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec.. + /// 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.. + /// Input name. (required). + /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. + /// Optional description for input.. + public StepFolderInput + ( + string name, AnyOf source, // Required parameters + Dictionary annotations= default, string description= default, AnyOf _default= default, List> alias= default, bool required = false, Object spec= default, string path= default // Optional parameters + ) : base(name: name, annotations: annotations, description: description)// BaseClass + { + // to ensure "source" is required (not null) + this.Source = source ?? throw new ArgumentNullException("source is a required property for StepFolderInput and cannot be null"); + this.Default = _default; + this.Alias = alias; + this.Required = required; + this.Spec = spec; + this.Path = path; + + // Set non-required readonly properties with defaultValue + this.Type = "StepFolderInput"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "StepFolderInput"; + + /// + /// The path to source the file from. + /// + /// The path to source the file from. + [DataMember(Name = "source", IsRequired = true, EmitDefaultValue = false)] + public AnyOf Source { get; set; } + /// + /// The default source for file if the value is not provided. + /// + /// The default source for file if the value is not provided. + [DataMember(Name = "default", EmitDefaultValue = false)] + public AnyOf Default { get; set; } + /// + /// A list of aliases for this input in different platforms. + /// + /// A list of aliases for this input in different platforms. + [DataMember(Name = "alias", EmitDefaultValue = false)] + public List> Alias { get; set; } + /// + /// A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. + /// + /// A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. + [DataMember(Name = "required", EmitDefaultValue = true)] + public bool Required { get; set; } = false; + /// + /// An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec. + /// + /// An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec. + [DataMember(Name = "spec", EmitDefaultValue = false)] + public Object Spec { get; set; } + /// + /// 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. + /// + /// 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. + [DataMember(Name = "path", EmitDefaultValue = false)] + public string Path { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + return "StepFolderInput"; + } + + /// + /// 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("StepFolderInput:\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Annotations: ").Append(Annotations).Append("\n"); + sb.Append(" Description: ").Append(Description).Append("\n"); + sb.Append(" Source: ").Append(Source).Append("\n"); + sb.Append(" Default: ").Append(Default).Append("\n"); + sb.Append(" Alias: ").Append(Alias).Append("\n"); + sb.Append(" Required: ").Append(Required).Append("\n"); + sb.Append(" Spec: ").Append(Spec).Append("\n"); + sb.Append(" Path: ").Append(Path).Append("\n"); + return sb.ToString(); + } + + /// + /// Returns the object from JSON string + /// + /// StepFolderInput object + public static StepFolderInput 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. + /// + /// StepFolderInput object + public virtual StepFolderInput DuplicateStepFolderInput() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateStepFolderInput(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override GenericInput DuplicateGenericInput() + { + return DuplicateStepFolderInput(); + } + + /// + /// 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 StepFolderInput); + } + + /// + /// Returns true if StepFolderInput instances are equal + /// + /// Instance of StepFolderInput to be compared + /// Boolean + public bool Equals(StepFolderInput input) + { + if (input == null) + return false; + return base.Equals(input) && + ( + this.Source == input.Source || + (this.Source != null && + this.Source.Equals(input.Source)) + ) && base.Equals(input) && + ( + this.Default == input.Default || + (this.Default != null && + this.Default.Equals(input.Default)) + ) && base.Equals(input) && + ( + this.Alias == input.Alias || + this.Alias != null && + input.Alias != null && + this.Alias.SequenceEqual(input.Alias) + ) && base.Equals(input) && + ( + this.Required == input.Required || + (this.Required != null && + this.Required.Equals(input.Required)) + ) && base.Equals(input) && + ( + this.Path == input.Path || + (this.Path != null && + this.Path.Equals(input.Path)) + ) && 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.Source != null) + hashCode = hashCode * 59 + this.Source.GetHashCode(); + if (this.Default != null) + hashCode = hashCode * 59 + this.Default.GetHashCode(); + if (this.Alias != null) + hashCode = hashCode * 59 + this.Alias.GetHashCode(); + if (this.Required != null) + hashCode = hashCode * 59 + this.Required.GetHashCode(); + if (this.Spec != null) + hashCode = hashCode * 59 + this.Spec.GetHashCode(); + if (this.Path != null) + hashCode = hashCode * 59 + this.Path.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(@"^StepFolderInput$", 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/StepFolderOutput.cs b/src/PollinationSDK/Model/StepFolderOutput.cs new file mode 100644 index 000000000..f25480a82 --- /dev/null +++ b/src/PollinationSDK/Model/StepFolderOutput.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 +{ + /// + /// A folder output. + /// + [DataContract(Name = "StepFolderOutput")] + public partial class StepFolderOutput : FunctionFolderOutput, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected StepFolderOutput() + { + // Set non-required readonly properties with defaultValue + this.Type = "StepFolderOutput"; + } + + /// + /// Initializes a new instance of the class. + /// + /// The path to source the file from. (required). + /// Output name. (required). + /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. + /// Optional description for output.. + /// Path to the output artifact relative to where the function command is executed. (required). + /// A boolean to indicate if an artifact output is required. A False value makes the artifact optional. (default to true). + public StepFolderOutput + ( + string name, string path, AnyOf source, // Required parameters + Dictionary annotations= default, string description= default, bool required = true // Optional parameters + ) : base(name: name, annotations: annotations, description: description, path: path, required: required)// BaseClass + { + // to ensure "source" is required (not null) + this.Source = source ?? throw new ArgumentNullException("source is a required property for StepFolderOutput and cannot be null"); + + // Set non-required readonly properties with defaultValue + this.Type = "StepFolderOutput"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "StepFolderOutput"; + + /// + /// The path to source the file from. + /// + /// The path to source the file from. + [DataMember(Name = "source", IsRequired = true, EmitDefaultValue = false)] + public AnyOf Source { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + return "StepFolderOutput"; + } + + /// + /// 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("StepFolderOutput:\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Annotations: ").Append(Annotations).Append("\n"); + sb.Append(" Description: ").Append(Description).Append("\n"); + sb.Append(" Path: ").Append(Path).Append("\n"); + sb.Append(" Required: ").Append(Required).Append("\n"); + sb.Append(" Source: ").Append(Source).Append("\n"); + return sb.ToString(); + } + + /// + /// Returns the object from JSON string + /// + /// StepFolderOutput object + public static StepFolderOutput 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. + /// + /// StepFolderOutput object + public virtual StepFolderOutput DuplicateStepFolderOutput() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateStepFolderOutput(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override FunctionFolderOutput DuplicateFunctionFolderOutput() + { + return DuplicateStepFolderOutput(); + } + + /// + /// 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 StepFolderOutput); + } + + /// + /// Returns true if StepFolderOutput instances are equal + /// + /// Instance of StepFolderOutput to be compared + /// Boolean + public bool Equals(StepFolderOutput input) + { + if (input == null) + return false; + return base.Equals(input) && + ( + this.Source == input.Source || + (this.Source != null && + this.Source.Equals(input.Source)) + ) && 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.Source != null) + hashCode = hashCode * 59 + this.Source.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(@"^StepFolderOutput$", 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/StepIntegerInput.cs b/src/PollinationSDK/Model/StepIntegerInput.cs new file mode 100644 index 000000000..63de1ef02 --- /dev/null +++ b/src/PollinationSDK/Model/StepIntegerInput.cs @@ -0,0 +1,271 @@ +/* + * 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 integer input. + /// + [DataContract(Name = "StepIntegerInput")] + public partial class StepIntegerInput : GenericInput, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected StepIntegerInput() + { + // Set non-required readonly properties with defaultValue + this.Type = "StepIntegerInput"; + } + + /// + /// Initializes a new instance of the class. + /// + /// value (required). + /// Default value to use for an input if a value was not supplied.. + /// A list of aliases for this input in different platforms.. + /// A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. (default to false). + /// An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec.. + /// Input name. (required). + /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. + /// Optional description for input.. + public StepIntegerInput + ( + string name, int value, // Required parameters + Dictionary annotations= default, string description= default, int _default= default, List> alias= default, bool required = false, Object spec= default // Optional parameters + ) : base(name: name, annotations: annotations, description: description)// BaseClass + { + this.Value = value; + this.Default = _default; + this.Alias = alias; + this.Required = required; + this.Spec = spec; + + // Set non-required readonly properties with defaultValue + this.Type = "StepIntegerInput"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "StepIntegerInput"; + + /// + /// Gets or Sets Value + /// + [DataMember(Name = "value", IsRequired = true, EmitDefaultValue = false)] + public int Value { get; set; } + /// + /// Default value to use for an input if a value was not supplied. + /// + /// Default value to use for an input if a value was not supplied. + [DataMember(Name = "default", EmitDefaultValue = false)] + public int Default { get; set; } + /// + /// A list of aliases for this input in different platforms. + /// + /// A list of aliases for this input in different platforms. + [DataMember(Name = "alias", EmitDefaultValue = false)] + public List> Alias { get; set; } + /// + /// A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. + /// + /// A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. + [DataMember(Name = "required", EmitDefaultValue = true)] + public bool Required { get; set; } = false; + /// + /// An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec. + /// + /// An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec. + [DataMember(Name = "spec", EmitDefaultValue = false)] + public Object Spec { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + return "StepIntegerInput"; + } + + /// + /// 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("StepIntegerInput:\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Annotations: ").Append(Annotations).Append("\n"); + sb.Append(" Description: ").Append(Description).Append("\n"); + sb.Append(" Value: ").Append(Value).Append("\n"); + sb.Append(" Default: ").Append(Default).Append("\n"); + sb.Append(" Alias: ").Append(Alias).Append("\n"); + sb.Append(" Required: ").Append(Required).Append("\n"); + sb.Append(" Spec: ").Append(Spec).Append("\n"); + return sb.ToString(); + } + + /// + /// Returns the object from JSON string + /// + /// StepIntegerInput object + public static StepIntegerInput 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. + /// + /// StepIntegerInput object + public virtual StepIntegerInput DuplicateStepIntegerInput() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateStepIntegerInput(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override GenericInput DuplicateGenericInput() + { + return DuplicateStepIntegerInput(); + } + + /// + /// 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 StepIntegerInput); + } + + /// + /// Returns true if StepIntegerInput instances are equal + /// + /// Instance of StepIntegerInput to be compared + /// Boolean + public bool Equals(StepIntegerInput input) + { + if (input == null) + return false; + return base.Equals(input) && + ( + this.Value == input.Value || + (this.Value != null && + this.Value.Equals(input.Value)) + ) && base.Equals(input) && + ( + this.Default == input.Default || + (this.Default != null && + this.Default.Equals(input.Default)) + ) && base.Equals(input) && + ( + this.Alias == input.Alias || + this.Alias != null && + input.Alias != null && + this.Alias.SequenceEqual(input.Alias) + ) && base.Equals(input) && + ( + this.Required == input.Required || + (this.Required != null && + this.Required.Equals(input.Required)) + ) && 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.Value != null) + hashCode = hashCode * 59 + this.Value.GetHashCode(); + if (this.Default != null) + hashCode = hashCode * 59 + this.Default.GetHashCode(); + if (this.Alias != null) + hashCode = hashCode * 59 + this.Alias.GetHashCode(); + if (this.Required != null) + hashCode = hashCode * 59 + this.Required.GetHashCode(); + if (this.Spec != null) + hashCode = hashCode * 59 + this.Spec.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(@"^StepIntegerInput$", 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/StepIntegerOutput.cs b/src/PollinationSDK/Model/StepIntegerOutput.cs new file mode 100644 index 000000000..c405fabb8 --- /dev/null +++ b/src/PollinationSDK/Model/StepIntegerOutput.cs @@ -0,0 +1,215 @@ +/* + * 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 integer output. + /// + [DataContract(Name = "StepIntegerOutput")] + public partial class StepIntegerOutput : FunctionIntegerOutput, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected StepIntegerOutput() + { + // Set non-required readonly properties with defaultValue + this.Type = "StepIntegerOutput"; + } + + /// + /// Initializes a new instance of the class. + /// + /// value (required). + /// Output name. (required). + /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. + /// Optional description for output.. + /// Path to the output artifact relative to where the function command is executed. (required). + /// A boolean to indicate if an artifact output is required. A False value makes the artifact optional. (default to true). + public StepIntegerOutput + ( + string name, string path, int value, // Required parameters + Dictionary annotations= default, string description= default, bool required = true // Optional parameters + ) : base(name: name, annotations: annotations, description: description, path: path, required: required)// BaseClass + { + this.Value = value; + + // Set non-required readonly properties with defaultValue + this.Type = "StepIntegerOutput"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "StepIntegerOutput"; + + /// + /// Gets or Sets Value + /// + [DataMember(Name = "value", IsRequired = true, EmitDefaultValue = false)] + public int Value { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + return "StepIntegerOutput"; + } + + /// + /// 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("StepIntegerOutput:\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Annotations: ").Append(Annotations).Append("\n"); + sb.Append(" Description: ").Append(Description).Append("\n"); + sb.Append(" Path: ").Append(Path).Append("\n"); + sb.Append(" Required: ").Append(Required).Append("\n"); + sb.Append(" Value: ").Append(Value).Append("\n"); + return sb.ToString(); + } + + /// + /// Returns the object from JSON string + /// + /// StepIntegerOutput object + public static StepIntegerOutput 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. + /// + /// StepIntegerOutput object + public virtual StepIntegerOutput DuplicateStepIntegerOutput() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateStepIntegerOutput(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override FunctionIntegerOutput DuplicateFunctionIntegerOutput() + { + return DuplicateStepIntegerOutput(); + } + + /// + /// 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 StepIntegerOutput); + } + + /// + /// Returns true if StepIntegerOutput instances are equal + /// + /// Instance of StepIntegerOutput to be compared + /// Boolean + public bool Equals(StepIntegerOutput input) + { + if (input == null) + return false; + return base.Equals(input) && + ( + this.Value == input.Value || + (this.Value != null && + this.Value.Equals(input.Value)) + ) && 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.Value != null) + hashCode = hashCode * 59 + this.Value.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(@"^StepIntegerOutput$", 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/StepJSONObjectInput.cs b/src/PollinationSDK/Model/StepJSONObjectInput.cs new file mode 100644 index 000000000..75dfe295a --- /dev/null +++ b/src/PollinationSDK/Model/StepJSONObjectInput.cs @@ -0,0 +1,272 @@ +/* + * 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 JSON object input. + /// + [DataContract(Name = "StepJSONObjectInput")] + public partial class StepJSONObjectInput : GenericInput, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected StepJSONObjectInput() + { + // Set non-required readonly properties with defaultValue + this.Type = "StepJSONObjectInput"; + } + + /// + /// Initializes a new instance of the class. + /// + /// value (required). + /// Default value to use for an input if a value was not supplied.. + /// A list of aliases for this input in different platforms.. + /// A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. (default to false). + /// An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec.. + /// Input name. (required). + /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. + /// Optional description for input.. + public StepJSONObjectInput + ( + string name, Object value, // Required parameters + Dictionary annotations= default, string description= default, Object _default= default, List> alias= default, bool required = false, Object spec= default // Optional parameters + ) : base(name: name, annotations: annotations, description: description)// BaseClass + { + // to ensure "value" is required (not null) + this.Value = value ?? throw new ArgumentNullException("value is a required property for StepJSONObjectInput and cannot be null"); + this.Default = _default; + this.Alias = alias; + this.Required = required; + this.Spec = spec; + + // Set non-required readonly properties with defaultValue + this.Type = "StepJSONObjectInput"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "StepJSONObjectInput"; + + /// + /// Gets or Sets Value + /// + [DataMember(Name = "value", IsRequired = true, EmitDefaultValue = false)] + public Object Value { get; set; } + /// + /// Default value to use for an input if a value was not supplied. + /// + /// Default value to use for an input if a value was not supplied. + [DataMember(Name = "default", EmitDefaultValue = false)] + public Object Default { get; set; } + /// + /// A list of aliases for this input in different platforms. + /// + /// A list of aliases for this input in different platforms. + [DataMember(Name = "alias", EmitDefaultValue = false)] + public List> Alias { get; set; } + /// + /// A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. + /// + /// A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. + [DataMember(Name = "required", EmitDefaultValue = true)] + public bool Required { get; set; } = false; + /// + /// An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec. + /// + /// An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec. + [DataMember(Name = "spec", EmitDefaultValue = false)] + public Object Spec { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + return "StepJSONObjectInput"; + } + + /// + /// 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("StepJSONObjectInput:\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Annotations: ").Append(Annotations).Append("\n"); + sb.Append(" Description: ").Append(Description).Append("\n"); + sb.Append(" Value: ").Append(Value).Append("\n"); + sb.Append(" Default: ").Append(Default).Append("\n"); + sb.Append(" Alias: ").Append(Alias).Append("\n"); + sb.Append(" Required: ").Append(Required).Append("\n"); + sb.Append(" Spec: ").Append(Spec).Append("\n"); + return sb.ToString(); + } + + /// + /// Returns the object from JSON string + /// + /// StepJSONObjectInput object + public static StepJSONObjectInput 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. + /// + /// StepJSONObjectInput object + public virtual StepJSONObjectInput DuplicateStepJSONObjectInput() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateStepJSONObjectInput(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override GenericInput DuplicateGenericInput() + { + return DuplicateStepJSONObjectInput(); + } + + /// + /// 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 StepJSONObjectInput); + } + + /// + /// Returns true if StepJSONObjectInput instances are equal + /// + /// Instance of StepJSONObjectInput to be compared + /// Boolean + public bool Equals(StepJSONObjectInput input) + { + if (input == null) + return false; + return base.Equals(input) && + ( + this.Value == input.Value || + (this.Value != null && + this.Value.Equals(input.Value)) + ) && base.Equals(input) && + ( + this.Default == input.Default || + (this.Default != null && + this.Default.Equals(input.Default)) + ) && base.Equals(input) && + ( + this.Alias == input.Alias || + this.Alias != null && + input.Alias != null && + this.Alias.SequenceEqual(input.Alias) + ) && base.Equals(input) && + ( + this.Required == input.Required || + (this.Required != null && + this.Required.Equals(input.Required)) + ) && 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.Value != null) + hashCode = hashCode * 59 + this.Value.GetHashCode(); + if (this.Default != null) + hashCode = hashCode * 59 + this.Default.GetHashCode(); + if (this.Alias != null) + hashCode = hashCode * 59 + this.Alias.GetHashCode(); + if (this.Required != null) + hashCode = hashCode * 59 + this.Required.GetHashCode(); + if (this.Spec != null) + hashCode = hashCode * 59 + this.Spec.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(@"^StepJSONObjectInput$", 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/StepJSONObjectOutput.cs b/src/PollinationSDK/Model/StepJSONObjectOutput.cs new file mode 100644 index 000000000..82965776f --- /dev/null +++ b/src/PollinationSDK/Model/StepJSONObjectOutput.cs @@ -0,0 +1,216 @@ +/* + * 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 JSON object output. + /// + [DataContract(Name = "StepJSONObjectOutput")] + public partial class StepJSONObjectOutput : FunctionJSONObjectOutput, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected StepJSONObjectOutput() + { + // Set non-required readonly properties with defaultValue + this.Type = "StepJSONObjectOutput"; + } + + /// + /// Initializes a new instance of the class. + /// + /// value (required). + /// Output name. (required). + /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. + /// Optional description for output.. + /// Path to the output artifact relative to where the function command is executed. (required). + /// A boolean to indicate if an artifact output is required. A False value makes the artifact optional. (default to true). + public StepJSONObjectOutput + ( + string name, string path, Object value, // Required parameters + Dictionary annotations= default, string description= default, bool required = true // Optional parameters + ) : base(name: name, annotations: annotations, description: description, path: path, required: required)// BaseClass + { + // to ensure "value" is required (not null) + this.Value = value ?? throw new ArgumentNullException("value is a required property for StepJSONObjectOutput and cannot be null"); + + // Set non-required readonly properties with defaultValue + this.Type = "StepJSONObjectOutput"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "StepJSONObjectOutput"; + + /// + /// Gets or Sets Value + /// + [DataMember(Name = "value", IsRequired = true, EmitDefaultValue = false)] + public Object Value { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + return "StepJSONObjectOutput"; + } + + /// + /// 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("StepJSONObjectOutput:\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Annotations: ").Append(Annotations).Append("\n"); + sb.Append(" Description: ").Append(Description).Append("\n"); + sb.Append(" Path: ").Append(Path).Append("\n"); + sb.Append(" Required: ").Append(Required).Append("\n"); + sb.Append(" Value: ").Append(Value).Append("\n"); + return sb.ToString(); + } + + /// + /// Returns the object from JSON string + /// + /// StepJSONObjectOutput object + public static StepJSONObjectOutput 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. + /// + /// StepJSONObjectOutput object + public virtual StepJSONObjectOutput DuplicateStepJSONObjectOutput() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateStepJSONObjectOutput(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override FunctionJSONObjectOutput DuplicateFunctionJSONObjectOutput() + { + return DuplicateStepJSONObjectOutput(); + } + + /// + /// 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 StepJSONObjectOutput); + } + + /// + /// Returns true if StepJSONObjectOutput instances are equal + /// + /// Instance of StepJSONObjectOutput to be compared + /// Boolean + public bool Equals(StepJSONObjectOutput input) + { + if (input == null) + return false; + return base.Equals(input) && + ( + this.Value == input.Value || + (this.Value != null && + this.Value.Equals(input.Value)) + ) && 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.Value != null) + hashCode = hashCode * 59 + this.Value.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(@"^StepJSONObjectOutput$", 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/StepList.cs b/src/PollinationSDK/Model/StepList.cs new file mode 100644 index 000000000..3e6e1d970 --- /dev/null +++ b/src/PollinationSDK/Model/StepList.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 = "StepList")] + public partial class StepList : OpenAPIGenBaseModel, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected StepList() + { + // Set non-required readonly properties with defaultValue + this.Type = "StepList"; + } + + /// + /// 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 StepList + ( + 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 StepList and cannot be null"); + this.NextPage = nextPage; + + // Set non-required readonly properties with defaultValue + this.Type = "StepList"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "StepList"; + + /// + /// 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 "StepList"; + } + + /// + /// 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("StepList:\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 + /// + /// StepList object + public static StepList 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. + /// + /// StepList object + public virtual StepList DuplicateStepList() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateStepList(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel DuplicateOpenAPIGenBaseModel() + { + return DuplicateStepList(); + } + + /// + /// 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 StepList); + } + + /// + /// Returns true if StepList instances are equal + /// + /// Instance of StepList to be compared + /// Boolean + public bool Equals(StepList 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(@"^StepList$", 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/StepNumberInput.cs b/src/PollinationSDK/Model/StepNumberInput.cs new file mode 100644 index 000000000..5c263399f --- /dev/null +++ b/src/PollinationSDK/Model/StepNumberInput.cs @@ -0,0 +1,271 @@ +/* + * 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 number input. + /// + [DataContract(Name = "StepNumberInput")] + public partial class StepNumberInput : GenericInput, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected StepNumberInput() + { + // Set non-required readonly properties with defaultValue + this.Type = "StepNumberInput"; + } + + /// + /// Initializes a new instance of the class. + /// + /// value (required). + /// Default value to use for an input if a value was not supplied.. + /// A list of aliases for this input in different platforms.. + /// A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. (default to false). + /// An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec.. + /// Input name. (required). + /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. + /// Optional description for input.. + public StepNumberInput + ( + string name, double value, // Required parameters + Dictionary annotations= default, string description= default, double _default= default, List> alias= default, bool required = false, Object spec= default // Optional parameters + ) : base(name: name, annotations: annotations, description: description)// BaseClass + { + this.Value = value; + this.Default = _default; + this.Alias = alias; + this.Required = required; + this.Spec = spec; + + // Set non-required readonly properties with defaultValue + this.Type = "StepNumberInput"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "StepNumberInput"; + + /// + /// Gets or Sets Value + /// + [DataMember(Name = "value", IsRequired = true, EmitDefaultValue = false)] + public double Value { get; set; } + /// + /// Default value to use for an input if a value was not supplied. + /// + /// Default value to use for an input if a value was not supplied. + [DataMember(Name = "default", EmitDefaultValue = false)] + public double Default { get; set; } + /// + /// A list of aliases for this input in different platforms. + /// + /// A list of aliases for this input in different platforms. + [DataMember(Name = "alias", EmitDefaultValue = false)] + public List> Alias { get; set; } + /// + /// A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. + /// + /// A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. + [DataMember(Name = "required", EmitDefaultValue = true)] + public bool Required { get; set; } = false; + /// + /// An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec. + /// + /// An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec. + [DataMember(Name = "spec", EmitDefaultValue = false)] + public Object Spec { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + return "StepNumberInput"; + } + + /// + /// 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("StepNumberInput:\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Annotations: ").Append(Annotations).Append("\n"); + sb.Append(" Description: ").Append(Description).Append("\n"); + sb.Append(" Value: ").Append(Value).Append("\n"); + sb.Append(" Default: ").Append(Default).Append("\n"); + sb.Append(" Alias: ").Append(Alias).Append("\n"); + sb.Append(" Required: ").Append(Required).Append("\n"); + sb.Append(" Spec: ").Append(Spec).Append("\n"); + return sb.ToString(); + } + + /// + /// Returns the object from JSON string + /// + /// StepNumberInput object + public static StepNumberInput 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. + /// + /// StepNumberInput object + public virtual StepNumberInput DuplicateStepNumberInput() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateStepNumberInput(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override GenericInput DuplicateGenericInput() + { + return DuplicateStepNumberInput(); + } + + /// + /// 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 StepNumberInput); + } + + /// + /// Returns true if StepNumberInput instances are equal + /// + /// Instance of StepNumberInput to be compared + /// Boolean + public bool Equals(StepNumberInput input) + { + if (input == null) + return false; + return base.Equals(input) && + ( + this.Value == input.Value || + (this.Value != null && + this.Value.Equals(input.Value)) + ) && base.Equals(input) && + ( + this.Default == input.Default || + (this.Default != null && + this.Default.Equals(input.Default)) + ) && base.Equals(input) && + ( + this.Alias == input.Alias || + this.Alias != null && + input.Alias != null && + this.Alias.SequenceEqual(input.Alias) + ) && base.Equals(input) && + ( + this.Required == input.Required || + (this.Required != null && + this.Required.Equals(input.Required)) + ) && 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.Value != null) + hashCode = hashCode * 59 + this.Value.GetHashCode(); + if (this.Default != null) + hashCode = hashCode * 59 + this.Default.GetHashCode(); + if (this.Alias != null) + hashCode = hashCode * 59 + this.Alias.GetHashCode(); + if (this.Required != null) + hashCode = hashCode * 59 + this.Required.GetHashCode(); + if (this.Spec != null) + hashCode = hashCode * 59 + this.Spec.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(@"^StepNumberInput$", 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/StepNumberOutput.cs b/src/PollinationSDK/Model/StepNumberOutput.cs new file mode 100644 index 000000000..1efa0c358 --- /dev/null +++ b/src/PollinationSDK/Model/StepNumberOutput.cs @@ -0,0 +1,215 @@ +/* + * 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 number output. + /// + [DataContract(Name = "StepNumberOutput")] + public partial class StepNumberOutput : FunctionNumberOutput, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected StepNumberOutput() + { + // Set non-required readonly properties with defaultValue + this.Type = "StepNumberOutput"; + } + + /// + /// Initializes a new instance of the class. + /// + /// value (required). + /// Output name. (required). + /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. + /// Optional description for output.. + /// Path to the output artifact relative to where the function command is executed. (required). + /// A boolean to indicate if an artifact output is required. A False value makes the artifact optional. (default to true). + public StepNumberOutput + ( + string name, string path, double value, // Required parameters + Dictionary annotations= default, string description= default, bool required = true // Optional parameters + ) : base(name: name, annotations: annotations, description: description, path: path, required: required)// BaseClass + { + this.Value = value; + + // Set non-required readonly properties with defaultValue + this.Type = "StepNumberOutput"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "StepNumberOutput"; + + /// + /// Gets or Sets Value + /// + [DataMember(Name = "value", IsRequired = true, EmitDefaultValue = false)] + public double Value { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + return "StepNumberOutput"; + } + + /// + /// 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("StepNumberOutput:\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Annotations: ").Append(Annotations).Append("\n"); + sb.Append(" Description: ").Append(Description).Append("\n"); + sb.Append(" Path: ").Append(Path).Append("\n"); + sb.Append(" Required: ").Append(Required).Append("\n"); + sb.Append(" Value: ").Append(Value).Append("\n"); + return sb.ToString(); + } + + /// + /// Returns the object from JSON string + /// + /// StepNumberOutput object + public static StepNumberOutput 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. + /// + /// StepNumberOutput object + public virtual StepNumberOutput DuplicateStepNumberOutput() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateStepNumberOutput(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override FunctionNumberOutput DuplicateFunctionNumberOutput() + { + return DuplicateStepNumberOutput(); + } + + /// + /// 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 StepNumberOutput); + } + + /// + /// Returns true if StepNumberOutput instances are equal + /// + /// Instance of StepNumberOutput to be compared + /// Boolean + public bool Equals(StepNumberOutput input) + { + if (input == null) + return false; + return base.Equals(input) && + ( + this.Value == input.Value || + (this.Value != null && + this.Value.Equals(input.Value)) + ) && 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.Value != null) + hashCode = hashCode * 59 + this.Value.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(@"^StepNumberOutput$", 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/StepPathInput.cs b/src/PollinationSDK/Model/StepPathInput.cs new file mode 100644 index 000000000..cd188c088 --- /dev/null +++ b/src/PollinationSDK/Model/StepPathInput.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 +{ + /// + /// A file or a folder input. + /// + [DataContract(Name = "StepPathInput")] + public partial class StepPathInput : GenericInput, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected StepPathInput() + { + // Set non-required readonly properties with defaultValue + this.Type = "StepPathInput"; + } + + /// + /// Initializes a new instance of the class. + /// + /// The path to source the file from. (required). + /// The default source for file if the value is not provided.. + /// A list of aliases for this input in different platforms.. + /// A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. (default to false). + /// An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec.. + /// 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.. + /// Optional list of extensions for file. The check for extension is case-insensitive.. + /// Input name. (required). + /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. + /// Optional description for input.. + public StepPathInput + ( + string name, AnyOf source, // Required parameters + Dictionary annotations= default, string description= default, AnyOf _default= default, List> alias= default, bool required = false, Object spec= default, string path= default, List extensions= default // Optional parameters + ) : base(name: name, annotations: annotations, description: description)// BaseClass + { + // to ensure "source" is required (not null) + this.Source = source ?? throw new ArgumentNullException("source is a required property for StepPathInput and cannot be null"); + this.Default = _default; + this.Alias = alias; + this.Required = required; + this.Spec = spec; + this.Path = path; + this.Extensions = extensions; + + // Set non-required readonly properties with defaultValue + this.Type = "StepPathInput"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "StepPathInput"; + + /// + /// The path to source the file from. + /// + /// The path to source the file from. + [DataMember(Name = "source", IsRequired = true, EmitDefaultValue = false)] + public AnyOf Source { get; set; } + /// + /// The default source for file if the value is not provided. + /// + /// The default source for file if the value is not provided. + [DataMember(Name = "default", EmitDefaultValue = false)] + public AnyOf Default { get; set; } + /// + /// A list of aliases for this input in different platforms. + /// + /// A list of aliases for this input in different platforms. + [DataMember(Name = "alias", EmitDefaultValue = false)] + public List> Alias { get; set; } + /// + /// A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. + /// + /// A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. + [DataMember(Name = "required", EmitDefaultValue = true)] + public bool Required { get; set; } = false; + /// + /// An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec. + /// + /// An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec. + [DataMember(Name = "spec", EmitDefaultValue = false)] + public Object Spec { get; set; } + /// + /// 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. + /// + /// 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. + [DataMember(Name = "path", EmitDefaultValue = false)] + public string Path { get; set; } + /// + /// Optional list of extensions for file. The check for extension is case-insensitive. + /// + /// Optional list of extensions for file. The check for extension is case-insensitive. + [DataMember(Name = "extensions", EmitDefaultValue = false)] + public List Extensions { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + return "StepPathInput"; + } + + /// + /// 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("StepPathInput:\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Annotations: ").Append(Annotations).Append("\n"); + sb.Append(" Description: ").Append(Description).Append("\n"); + sb.Append(" Source: ").Append(Source).Append("\n"); + sb.Append(" Default: ").Append(Default).Append("\n"); + sb.Append(" Alias: ").Append(Alias).Append("\n"); + sb.Append(" Required: ").Append(Required).Append("\n"); + sb.Append(" Spec: ").Append(Spec).Append("\n"); + sb.Append(" Path: ").Append(Path).Append("\n"); + sb.Append(" Extensions: ").Append(Extensions).Append("\n"); + return sb.ToString(); + } + + /// + /// Returns the object from JSON string + /// + /// StepPathInput object + public static StepPathInput 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. + /// + /// StepPathInput object + public virtual StepPathInput DuplicateStepPathInput() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateStepPathInput(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override GenericInput DuplicateGenericInput() + { + return DuplicateStepPathInput(); + } + + /// + /// 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 StepPathInput); + } + + /// + /// Returns true if StepPathInput instances are equal + /// + /// Instance of StepPathInput to be compared + /// Boolean + public bool Equals(StepPathInput input) + { + if (input == null) + return false; + return base.Equals(input) && + ( + this.Source == input.Source || + (this.Source != null && + this.Source.Equals(input.Source)) + ) && base.Equals(input) && + ( + this.Default == input.Default || + (this.Default != null && + this.Default.Equals(input.Default)) + ) && base.Equals(input) && + ( + this.Alias == input.Alias || + this.Alias != null && + input.Alias != null && + this.Alias.SequenceEqual(input.Alias) + ) && base.Equals(input) && + ( + this.Required == input.Required || + (this.Required != null && + this.Required.Equals(input.Required)) + ) && base.Equals(input) && + ( + this.Path == input.Path || + (this.Path != null && + this.Path.Equals(input.Path)) + ) && base.Equals(input) && + ( + this.Extensions == input.Extensions || + this.Extensions != null && + input.Extensions != null && + this.Extensions.SequenceEqual(input.Extensions) + ) && 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.Source != null) + hashCode = hashCode * 59 + this.Source.GetHashCode(); + if (this.Default != null) + hashCode = hashCode * 59 + this.Default.GetHashCode(); + if (this.Alias != null) + hashCode = hashCode * 59 + this.Alias.GetHashCode(); + if (this.Required != null) + hashCode = hashCode * 59 + this.Required.GetHashCode(); + if (this.Spec != null) + hashCode = hashCode * 59 + this.Spec.GetHashCode(); + if (this.Path != null) + hashCode = hashCode * 59 + this.Path.GetHashCode(); + if (this.Extensions != null) + hashCode = hashCode * 59 + this.Extensions.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(@"^StepPathInput$", 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/StepPathOutput.cs b/src/PollinationSDK/Model/StepPathOutput.cs new file mode 100644 index 000000000..ad970a0ab --- /dev/null +++ b/src/PollinationSDK/Model/StepPathOutput.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 +{ + /// + /// A file or a folder output. + /// + [DataContract(Name = "StepPathOutput")] + public partial class StepPathOutput : FunctionPathOutput, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected StepPathOutput() + { + // Set non-required readonly properties with defaultValue + this.Type = "StepPathOutput"; + } + + /// + /// Initializes a new instance of the class. + /// + /// The path to source the file from. (required). + /// Output name. (required). + /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. + /// Optional description for output.. + /// Path to the output artifact relative to where the function command is executed. (required). + /// A boolean to indicate if an artifact output is required. A False value makes the artifact optional. (default to true). + public StepPathOutput + ( + string name, string path, AnyOf source, // Required parameters + Dictionary annotations= default, string description= default, bool required = true // Optional parameters + ) : base(name: name, annotations: annotations, description: description, path: path, required: required)// BaseClass + { + // to ensure "source" is required (not null) + this.Source = source ?? throw new ArgumentNullException("source is a required property for StepPathOutput and cannot be null"); + + // Set non-required readonly properties with defaultValue + this.Type = "StepPathOutput"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "StepPathOutput"; + + /// + /// The path to source the file from. + /// + /// The path to source the file from. + [DataMember(Name = "source", IsRequired = true, EmitDefaultValue = false)] + public AnyOf Source { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + return "StepPathOutput"; + } + + /// + /// 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("StepPathOutput:\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Annotations: ").Append(Annotations).Append("\n"); + sb.Append(" Description: ").Append(Description).Append("\n"); + sb.Append(" Path: ").Append(Path).Append("\n"); + sb.Append(" Required: ").Append(Required).Append("\n"); + sb.Append(" Source: ").Append(Source).Append("\n"); + return sb.ToString(); + } + + /// + /// Returns the object from JSON string + /// + /// StepPathOutput object + public static StepPathOutput 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. + /// + /// StepPathOutput object + public virtual StepPathOutput DuplicateStepPathOutput() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateStepPathOutput(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override FunctionPathOutput DuplicateFunctionPathOutput() + { + return DuplicateStepPathOutput(); + } + + /// + /// 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 StepPathOutput); + } + + /// + /// Returns true if StepPathOutput instances are equal + /// + /// Instance of StepPathOutput to be compared + /// Boolean + public bool Equals(StepPathOutput input) + { + if (input == null) + return false; + return base.Equals(input) && + ( + this.Source == input.Source || + (this.Source != null && + this.Source.Equals(input.Source)) + ) && 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.Source != null) + hashCode = hashCode * 59 + this.Source.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(@"^StepPathOutput$", 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/StepStatus.cs b/src/PollinationSDK/Model/StepStatus.cs new file mode 100644 index 000000000..293260df7 --- /dev/null +++ b/src/PollinationSDK/Model/StepStatus.cs @@ -0,0 +1,458 @@ +/* + * 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 Status of a Job Step + /// + [DataContract(Name = "StepStatus")] + public partial class StepStatus : OpenAPIGenBaseModel, IEquatable, IValidatableObject + { + /// + /// The type of step this status is for. Can be \"Function\", \"DAG\" or \"Loop\" + /// + /// The type of step this status is for. Can be \"Function\", \"DAG\" or \"Loop\" + [DataMember(Name="status_type", EmitDefaultValue=false)] + public StatusType StatusType { get; set; } + /// + /// The status of this step. + /// + /// The status of this step. + [DataMember(Name="status", EmitDefaultValue=false)] + public StepStatusEnum Status { get; set; } = StepStatusEnum.Unknown; + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected StepStatus() + { + // Set non-required readonly properties with defaultValue + this.Type = "StepStatus"; + } + + /// + /// Initializes a new instance of the class. + /// + /// The inputs used by this step. (required). + /// The outputs produced by this step. (required). + /// The time at which the task was started (required). + /// The step unique ID (required). + /// 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. (required). + /// The type of step this status is for. Can be \"Function\", \"DAG\" or \"Loop\" (required). + /// The name of the template that spawned this step (required). + /// A list of child step IDs (required). + /// 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. (required). + /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. + /// Any message produced by the task. Usually error/debugging hints.. + /// The time at which the task was completed. + /// Source url for the status object. It can be a recipe or a function.. + /// The status of this step.. + /// The command used to run this step. Only applies to Function steps.. + /// 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.. + public StepStatus + ( + List> inputs, List> outputs, DateTime startedAt, string id, string name, StatusType statusType, string templateRef, List childrenIds, List outboundSteps, // Required parameters + Dictionary annotations= default, string message= default, DateTime finishedAt= default, string source= default, StepStatusEnum status= StepStatusEnum.Unknown, string command= default, string boundaryId= default // Optional parameters + ) : base()// BaseClass + { + // to ensure "inputs" is required (not null) + this.Inputs = inputs ?? throw new ArgumentNullException("inputs is a required property for StepStatus and cannot be null"); + // to ensure "outputs" is required (not null) + this.Outputs = outputs ?? throw new ArgumentNullException("outputs is a required property for StepStatus and cannot be null"); + this.StartedAt = startedAt; + // to ensure "id" is required (not null) + this.Id = id ?? throw new ArgumentNullException("id is a required property for StepStatus and cannot be null"); + // to ensure "name" is required (not null) + this.Name = name ?? throw new ArgumentNullException("name is a required property for StepStatus and cannot be null"); + this.StatusType = statusType; + // to ensure "templateRef" is required (not null) + this.TemplateRef = templateRef ?? throw new ArgumentNullException("templateRef is a required property for StepStatus and cannot be null"); + // to ensure "childrenIds" is required (not null) + this.ChildrenIds = childrenIds ?? throw new ArgumentNullException("childrenIds is a required property for StepStatus and cannot be null"); + // to ensure "outboundSteps" is required (not null) + this.OutboundSteps = outboundSteps ?? throw new ArgumentNullException("outboundSteps is a required property for StepStatus and cannot be null"); + this.Annotations = annotations; + this.Message = message; + this.FinishedAt = finishedAt; + this.Source = source; + this.Status = status; + this.Command = command; + this.BoundaryId = boundaryId; + + // Set non-required readonly properties with defaultValue + this.Type = "StepStatus"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "StepStatus"; + + /// + /// The inputs used by this step. + /// + /// The inputs used by this step. + [DataMember(Name = "inputs", IsRequired = true, EmitDefaultValue = false)] + public List> Inputs { get; set; } + /// + /// The outputs produced by this step. + /// + /// The outputs produced by this step. + [DataMember(Name = "outputs", IsRequired = true, EmitDefaultValue = false)] + public List> Outputs { get; set; } + /// + /// The time at which the task was started + /// + /// The time at which the task was started + [DataMember(Name = "started_at", IsRequired = true, EmitDefaultValue = false)] + public DateTime StartedAt { get; set; } + /// + /// The step unique ID + /// + /// The step unique ID + [DataMember(Name = "id", IsRequired = true, EmitDefaultValue = false)] + public string Id { get; set; } + /// + /// 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. + /// + /// 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. + [DataMember(Name = "name", IsRequired = true, EmitDefaultValue = false)] + public string Name { get; set; } + /// + /// The name of the template that spawned this step + /// + /// The name of the template that spawned this step + [DataMember(Name = "template_ref", IsRequired = true, EmitDefaultValue = false)] + public string TemplateRef { get; set; } + /// + /// A list of child step IDs + /// + /// A list of child step IDs + [DataMember(Name = "children_ids", IsRequired = true, EmitDefaultValue = false)] + public List ChildrenIds { get; set; } + /// + /// 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. + /// + /// 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. + [DataMember(Name = "outbound_steps", IsRequired = true, EmitDefaultValue = false)] + public List OutboundSteps { 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; } + /// + /// Any message produced by the task. Usually error/debugging hints. + /// + /// Any message produced by the task. Usually error/debugging hints. + [DataMember(Name = "message", EmitDefaultValue = false)] + public string Message { get; set; } + /// + /// The time at which the task was completed + /// + /// The time at which the task was completed + [DataMember(Name = "finished_at", EmitDefaultValue = false)] + public DateTime FinishedAt { get; set; } + /// + /// Source url for the status object. It can be a recipe or a function. + /// + /// Source url for the status object. It can be a recipe or a function. + [DataMember(Name = "source", EmitDefaultValue = false)] + public string Source { get; set; } + /// + /// The command used to run this step. Only applies to Function steps. + /// + /// The command used to run this step. Only applies to Function steps. + [DataMember(Name = "command", EmitDefaultValue = false)] + public string Command { get; set; } + /// + /// 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. + /// + /// 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. + [DataMember(Name = "boundary_id", EmitDefaultValue = false)] + public string BoundaryId { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + return "StepStatus"; + } + + /// + /// 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("StepStatus:\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Inputs: ").Append(Inputs).Append("\n"); + sb.Append(" Outputs: ").Append(Outputs).Append("\n"); + sb.Append(" StartedAt: ").Append(StartedAt).Append("\n"); + sb.Append(" Id: ").Append(Id).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" StatusType: ").Append(StatusType).Append("\n"); + sb.Append(" TemplateRef: ").Append(TemplateRef).Append("\n"); + sb.Append(" ChildrenIds: ").Append(ChildrenIds).Append("\n"); + sb.Append(" OutboundSteps: ").Append(OutboundSteps).Append("\n"); + sb.Append(" Annotations: ").Append(Annotations).Append("\n"); + sb.Append(" Message: ").Append(Message).Append("\n"); + sb.Append(" FinishedAt: ").Append(FinishedAt).Append("\n"); + sb.Append(" Source: ").Append(Source).Append("\n"); + sb.Append(" Status: ").Append(Status).Append("\n"); + sb.Append(" Command: ").Append(Command).Append("\n"); + sb.Append(" BoundaryId: ").Append(BoundaryId).Append("\n"); + return sb.ToString(); + } + + /// + /// Returns the object from JSON string + /// + /// StepStatus object + public static StepStatus 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. + /// + /// StepStatus object + public virtual StepStatus DuplicateStepStatus() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateStepStatus(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel DuplicateOpenAPIGenBaseModel() + { + return DuplicateStepStatus(); + } + + /// + /// 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 StepStatus); + } + + /// + /// Returns true if StepStatus instances are equal + /// + /// Instance of StepStatus to be compared + /// Boolean + public bool Equals(StepStatus input) + { + if (input == null) + return false; + return 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.StartedAt == input.StartedAt || + (this.StartedAt != null && + this.StartedAt.Equals(input.StartedAt)) + ) && 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.StatusType == input.StatusType || + (this.StatusType != null && + this.StatusType.Equals(input.StatusType)) + ) && base.Equals(input) && + ( + this.TemplateRef == input.TemplateRef || + (this.TemplateRef != null && + this.TemplateRef.Equals(input.TemplateRef)) + ) && base.Equals(input) && + ( + this.ChildrenIds == input.ChildrenIds || + this.ChildrenIds != null && + input.ChildrenIds != null && + this.ChildrenIds.SequenceEqual(input.ChildrenIds) + ) && base.Equals(input) && + ( + this.OutboundSteps == input.OutboundSteps || + this.OutboundSteps != null && + input.OutboundSteps != null && + this.OutboundSteps.SequenceEqual(input.OutboundSteps) + ) && base.Equals(input) && + ( + this.Annotations == input.Annotations || + this.Annotations != null && + input.Annotations != null && + this.Annotations.SequenceEqual(input.Annotations) + ) && base.Equals(input) && + ( + this.Message == input.Message || + (this.Message != null && + this.Message.Equals(input.Message)) + ) && base.Equals(input) && + ( + this.FinishedAt == input.FinishedAt || + (this.FinishedAt != null && + this.FinishedAt.Equals(input.FinishedAt)) + ) && base.Equals(input) && + ( + this.Source == input.Source || + (this.Source != null && + this.Source.Equals(input.Source)) + ) && base.Equals(input) && + ( + this.Status == input.Status || + (this.Status != null && + this.Status.Equals(input.Status)) + ) && base.Equals(input) && + ( + this.Command == input.Command || + (this.Command != null && + this.Command.Equals(input.Command)) + ) && base.Equals(input) && + ( + this.BoundaryId == input.BoundaryId || + (this.BoundaryId != null && + this.BoundaryId.Equals(input.BoundaryId)) + ) && 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.Inputs != null) + hashCode = hashCode * 59 + this.Inputs.GetHashCode(); + if (this.Outputs != null) + hashCode = hashCode * 59 + this.Outputs.GetHashCode(); + if (this.StartedAt != null) + hashCode = hashCode * 59 + this.StartedAt.GetHashCode(); + if (this.Id != null) + hashCode = hashCode * 59 + this.Id.GetHashCode(); + if (this.Name != null) + hashCode = hashCode * 59 + this.Name.GetHashCode(); + if (this.StatusType != null) + hashCode = hashCode * 59 + this.StatusType.GetHashCode(); + if (this.TemplateRef != null) + hashCode = hashCode * 59 + this.TemplateRef.GetHashCode(); + if (this.ChildrenIds != null) + hashCode = hashCode * 59 + this.ChildrenIds.GetHashCode(); + if (this.OutboundSteps != null) + hashCode = hashCode * 59 + this.OutboundSteps.GetHashCode(); + if (this.Annotations != null) + hashCode = hashCode * 59 + this.Annotations.GetHashCode(); + if (this.Message != null) + hashCode = hashCode * 59 + this.Message.GetHashCode(); + if (this.FinishedAt != null) + hashCode = hashCode * 59 + this.FinishedAt.GetHashCode(); + if (this.Source != null) + hashCode = hashCode * 59 + this.Source.GetHashCode(); + if (this.Status != null) + hashCode = hashCode * 59 + this.Status.GetHashCode(); + if (this.Command != null) + hashCode = hashCode * 59 + this.Command.GetHashCode(); + if (this.BoundaryId != null) + hashCode = hashCode * 59 + this.BoundaryId.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(@"^StepStatus$", 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/StepStatusEnum.cs b/src/PollinationSDK/Model/StepStatusEnum.cs new file mode 100644 index 000000000..0045365be --- /dev/null +++ b/src/PollinationSDK/Model/StepStatusEnum.cs @@ -0,0 +1,73 @@ +/* + * 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 +{ + /// + /// Enumaration of allowable status strings + /// + /// Enumaration of allowable status strings + + [JsonConverter(typeof(StringEnumConverter))] + + public enum StepStatusEnum + { + /// + /// Enum Scheduled for value: Scheduled + /// + [EnumMember(Value = "Scheduled")] + Scheduled = 1, + + /// + /// Enum Running for value: Running + /// + [EnumMember(Value = "Running")] + Running = 2, + + /// + /// Enum Failed for value: Failed + /// + [EnumMember(Value = "Failed")] + Failed = 3, + + /// + /// Enum Succeeded for value: Succeeded + /// + [EnumMember(Value = "Succeeded")] + Succeeded = 4, + + /// + /// Enum Skipped for value: Skipped + /// + [EnumMember(Value = "Skipped")] + Skipped = 5, + + /// + /// Enum Unknown for value: Unknown + /// + [EnumMember(Value = "Unknown")] + Unknown = 6 + + } + +} diff --git a/src/PollinationSDK/Model/StepStringInput.cs b/src/PollinationSDK/Model/StepStringInput.cs new file mode 100644 index 000000000..bc580f3e2 --- /dev/null +++ b/src/PollinationSDK/Model/StepStringInput.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 +{ + /// + /// A String input. + /// + [DataContract(Name = "StepStringInput")] + public partial class StepStringInput : FunctionStringInput, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected StepStringInput() + { + // Set non-required readonly properties with defaultValue + this.Type = "StepStringInput"; + } + + /// + /// Initializes a new instance of the class. + /// + /// value (required). + /// Input name. (required). + /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. + /// Optional description for input.. + /// Default value for generic input.. + /// A list of aliases for this input in different platforms.. + /// A field to indicate if this input is required. This input needs to be set explicitly even when a default value is provided. (default to false). + /// An optional JSON Schema specification to validate the input value. You can use validate_spec method to validate a value against the spec.. + public StepStringInput + ( + string name, string value, // Required parameters + Dictionary annotations= default, string description= default, string _default= default, List> alias= default, bool required = false, Object spec= default // Optional parameters + ) : base(name: name, annotations: annotations, description: description, _default: _default, alias: alias, required: required, spec: spec)// BaseClass + { + // to ensure "value" is required (not null) + this.Value = value ?? throw new ArgumentNullException("value is a required property for StepStringInput and cannot be null"); + + // Set non-required readonly properties with defaultValue + this.Type = "StepStringInput"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "StepStringInput"; + + /// + /// Gets or Sets Value + /// + [DataMember(Name = "value", IsRequired = true, EmitDefaultValue = false)] + public string Value { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + return "StepStringInput"; + } + + /// + /// 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("StepStringInput:\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Annotations: ").Append(Annotations).Append("\n"); + sb.Append(" Description: ").Append(Description).Append("\n"); + sb.Append(" Default: ").Append(Default).Append("\n"); + sb.Append(" Alias: ").Append(Alias).Append("\n"); + sb.Append(" Required: ").Append(Required).Append("\n"); + sb.Append(" Spec: ").Append(Spec).Append("\n"); + sb.Append(" Value: ").Append(Value).Append("\n"); + return sb.ToString(); + } + + /// + /// Returns the object from JSON string + /// + /// StepStringInput object + public static StepStringInput 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. + /// + /// StepStringInput object + public virtual StepStringInput DuplicateStepStringInput() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateStepStringInput(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override FunctionStringInput DuplicateFunctionStringInput() + { + return DuplicateStepStringInput(); + } + + /// + /// 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 StepStringInput); + } + + /// + /// Returns true if StepStringInput instances are equal + /// + /// Instance of StepStringInput to be compared + /// Boolean + public bool Equals(StepStringInput input) + { + if (input == null) + return false; + return base.Equals(input) && + ( + this.Value == input.Value || + (this.Value != null && + this.Value.Equals(input.Value)) + ) && 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.Value != null) + hashCode = hashCode * 59 + this.Value.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(@"^StepStringInput$", 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/StepStringOutput.cs b/src/PollinationSDK/Model/StepStringOutput.cs new file mode 100644 index 000000000..55adb9561 --- /dev/null +++ b/src/PollinationSDK/Model/StepStringOutput.cs @@ -0,0 +1,216 @@ +/* + * 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 String output. + /// + [DataContract(Name = "StepStringOutput")] + public partial class StepStringOutput : FunctionStringOutput, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected StepStringOutput() + { + // Set non-required readonly properties with defaultValue + this.Type = "StepStringOutput"; + } + + /// + /// Initializes a new instance of the class. + /// + /// value (required). + /// Output name. (required). + /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. + /// Optional description for output.. + /// Path to the output artifact relative to where the function command is executed. (required). + /// A boolean to indicate if an artifact output is required. A False value makes the artifact optional. (default to true). + public StepStringOutput + ( + string name, string path, string value, // Required parameters + Dictionary annotations= default, string description= default, bool required = true // Optional parameters + ) : base(name: name, annotations: annotations, description: description, path: path, required: required)// BaseClass + { + // to ensure "value" is required (not null) + this.Value = value ?? throw new ArgumentNullException("value is a required property for StepStringOutput and cannot be null"); + + // Set non-required readonly properties with defaultValue + this.Type = "StepStringOutput"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "StepStringOutput"; + + /// + /// Gets or Sets Value + /// + [DataMember(Name = "value", IsRequired = true, EmitDefaultValue = false)] + public string Value { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + return "StepStringOutput"; + } + + /// + /// 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("StepStringOutput:\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Annotations: ").Append(Annotations).Append("\n"); + sb.Append(" Description: ").Append(Description).Append("\n"); + sb.Append(" Path: ").Append(Path).Append("\n"); + sb.Append(" Required: ").Append(Required).Append("\n"); + sb.Append(" Value: ").Append(Value).Append("\n"); + return sb.ToString(); + } + + /// + /// Returns the object from JSON string + /// + /// StepStringOutput object + public static StepStringOutput 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. + /// + /// StepStringOutput object + public virtual StepStringOutput DuplicateStepStringOutput() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateStepStringOutput(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override FunctionStringOutput DuplicateFunctionStringOutput() + { + return DuplicateStepStringOutput(); + } + + /// + /// 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 StepStringOutput); + } + + /// + /// Returns true if StepStringOutput instances are equal + /// + /// Instance of StepStringOutput to be compared + /// Boolean + public bool Equals(StepStringOutput input) + { + if (input == null) + return false; + return base.Equals(input) && + ( + this.Value == input.Value || + (this.Value != null && + this.Value.Equals(input.Value)) + ) && 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.Value != null) + hashCode = hashCode * 59 + this.Value.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(@"^StepStringOutput$", 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/SubjectType.cs b/src/PollinationSDK/Model/SubjectType.cs new file mode 100644 index 000000000..83302d7b4 --- /dev/null +++ b/src/PollinationSDK/Model/SubjectType.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 SubjectType + { + /// + /// Enum User for value: user + /// + [EnumMember(Value = "user")] + User = 1, + + /// + /// Enum Team for value: team + /// + [EnumMember(Value = "team")] + Team = 2 + + } + +} 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/TaskArgument.cs b/src/PollinationSDK/Model/TaskArgument.cs new file mode 100644 index 000000000..ecc33b50e --- /dev/null +++ b/src/PollinationSDK/Model/TaskArgument.cs @@ -0,0 +1,241 @@ +/* + * 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 +{ + /// + /// Task argument for receiving inputs that are not files or folders. + /// + [DataContract(Name = "TaskArgument")] + public partial class TaskArgument : OpenAPIGenBaseModel, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected TaskArgument() + { + // Set non-required readonly properties with defaultValue + this.Type = "TaskArgument"; + } + + /// + /// Initializes a new instance of the class. + /// + /// Argument name. The name must match one of the input names from Task's template which can be a function or DAG. (required). + /// 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. (required). + /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. + public TaskArgument + ( + string name, AnyOf from, // Required parameters + Dictionary annotations= default// Optional parameters + ) : base()// BaseClass + { + // to ensure "name" is required (not null) + this.Name = name ?? throw new ArgumentNullException("name is a required property for TaskArgument and cannot be null"); + // to ensure "from" is required (not null) + this.From = from ?? throw new ArgumentNullException("from is a required property for TaskArgument and cannot be null"); + this.Annotations = annotations; + + // Set non-required readonly properties with defaultValue + this.Type = "TaskArgument"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "TaskArgument"; + + /// + /// Argument name. The name must match one of the input names from Task's template which can be a function or DAG. + /// + /// Argument name. The name must match one of the input names from Task's template which can be a function or DAG. + [DataMember(Name = "name", IsRequired = true, EmitDefaultValue = false)] + public string Name { get; set; } + /// + /// 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. + /// + /// 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. + [DataMember(Name = "from", IsRequired = true, EmitDefaultValue = false)] + public AnyOf From { 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; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + return "TaskArgument"; + } + + /// + /// 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("TaskArgument:\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" From: ").Append(From).Append("\n"); + sb.Append(" Annotations: ").Append(Annotations).Append("\n"); + return sb.ToString(); + } + + /// + /// Returns the object from JSON string + /// + /// TaskArgument object + public static TaskArgument 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. + /// + /// TaskArgument object + public virtual TaskArgument DuplicateTaskArgument() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateTaskArgument(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel DuplicateOpenAPIGenBaseModel() + { + return DuplicateTaskArgument(); + } + + /// + /// 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 TaskArgument); + } + + /// + /// Returns true if TaskArgument instances are equal + /// + /// Instance of TaskArgument to be compared + /// Boolean + public bool Equals(TaskArgument 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.From == input.From || + (this.From != null && + this.From.Equals(input.From)) + ) && base.Equals(input) && + ( + this.Type == input.Type || + (this.Type != null && + this.Type.Equals(input.Type)) + ) && base.Equals(input) && + ( + this.Annotations == input.Annotations || + this.Annotations != null && + input.Annotations != null && + this.Annotations.SequenceEqual(input.Annotations) + ); + } + + /// + /// 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.From != null) + hashCode = hashCode * 59 + this.From.GetHashCode(); + if (this.Type != null) + hashCode = hashCode * 59 + this.Type.GetHashCode(); + if (this.Annotations != null) + hashCode = hashCode * 59 + this.Annotations.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(@"^TaskArgument$", 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/TaskFileReference.cs b/src/PollinationSDK/Model/TaskFileReference.cs new file mode 100644 index 000000000..b034b992e --- /dev/null +++ b/src/PollinationSDK/Model/TaskFileReference.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 +{ + /// + /// A reference to a file that is generated in a task. + /// + [DataContract(Name = "TaskFileReference")] + public partial class TaskFileReference : TaskReferenceBase, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected TaskFileReference() + { + // Set non-required readonly properties with defaultValue + this.Type = "TaskFileReference"; + } + + /// + /// Initializes a new instance of the class. + /// + /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. + /// The name of the task to pull output data from. (required). + /// The name of the variable. (required). + public TaskFileReference + ( + string name, string variable, // Required parameters + Dictionary annotations= default // Optional parameters + ) : base(annotations: annotations, name: name, variable: variable)// BaseClass + { + + // Set non-required readonly properties with defaultValue + this.Type = "TaskFileReference"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "TaskFileReference"; + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + return "TaskFileReference"; + } + + /// + /// 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("TaskFileReference:\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Annotations: ").Append(Annotations).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Variable: ").Append(Variable).Append("\n"); + return sb.ToString(); + } + + /// + /// Returns the object from JSON string + /// + /// TaskFileReference object + public static TaskFileReference 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. + /// + /// TaskFileReference object + public virtual TaskFileReference DuplicateTaskFileReference() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateTaskFileReference(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override TaskReferenceBase DuplicateTaskReferenceBase() + { + return DuplicateTaskFileReference(); + } + + /// + /// 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 TaskFileReference); + } + + /// + /// Returns true if TaskFileReference instances are equal + /// + /// Instance of TaskFileReference to be compared + /// Boolean + public bool Equals(TaskFileReference 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(@"^TaskFileReference$", 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/TaskFolderReference.cs b/src/PollinationSDK/Model/TaskFolderReference.cs new file mode 100644 index 000000000..c4ba6cf26 --- /dev/null +++ b/src/PollinationSDK/Model/TaskFolderReference.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 +{ + /// + /// A reference to a folder that is generated in a task. + /// + [DataContract(Name = "TaskFolderReference")] + public partial class TaskFolderReference : TaskReferenceBase, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected TaskFolderReference() + { + // Set non-required readonly properties with defaultValue + this.Type = "TaskFolderReference"; + } + + /// + /// Initializes a new instance of the class. + /// + /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. + /// The name of the task to pull output data from. (required). + /// The name of the variable. (required). + public TaskFolderReference + ( + string name, string variable, // Required parameters + Dictionary annotations= default // Optional parameters + ) : base(annotations: annotations, name: name, variable: variable)// BaseClass + { + + // Set non-required readonly properties with defaultValue + this.Type = "TaskFolderReference"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "TaskFolderReference"; + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + return "TaskFolderReference"; + } + + /// + /// 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("TaskFolderReference:\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Annotations: ").Append(Annotations).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Variable: ").Append(Variable).Append("\n"); + return sb.ToString(); + } + + /// + /// Returns the object from JSON string + /// + /// TaskFolderReference object + public static TaskFolderReference 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. + /// + /// TaskFolderReference object + public virtual TaskFolderReference DuplicateTaskFolderReference() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateTaskFolderReference(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override TaskReferenceBase DuplicateTaskReferenceBase() + { + return DuplicateTaskFolderReference(); + } + + /// + /// 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 TaskFolderReference); + } + + /// + /// Returns true if TaskFolderReference instances are equal + /// + /// Instance of TaskFolderReference to be compared + /// Boolean + public bool Equals(TaskFolderReference 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(@"^TaskFolderReference$", 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/TaskPathArgument.cs b/src/PollinationSDK/Model/TaskPathArgument.cs new file mode 100644 index 000000000..52b62e1ce --- /dev/null +++ b/src/PollinationSDK/Model/TaskPathArgument.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 +{ + /// + /// BaseModel with functionality to return the object as a yaml string. + /// + [DataContract(Name = "TaskPathArgument")] + public partial class TaskPathArgument : OpenAPIGenBaseModel, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected TaskPathArgument() + { + // Set non-required readonly properties with defaultValue + this.Type = "TaskPathArgument"; + } + + /// + /// Initializes a new instance of the class. + /// + /// Argument name. The name must match one of the input names from Task's template which can be a function or DAG. (required). + /// 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. (required). + /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. + /// 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.. + public TaskPathArgument + ( + string name, AnyOf from, // Required parameters + Dictionary annotations= default, string subPath= default// Optional parameters + ) : base()// BaseClass + { + // to ensure "name" is required (not null) + this.Name = name ?? throw new ArgumentNullException("name is a required property for TaskPathArgument and cannot be null"); + // to ensure "from" is required (not null) + this.From = from ?? throw new ArgumentNullException("from is a required property for TaskPathArgument and cannot be null"); + this.Annotations = annotations; + this.SubPath = subPath; + + // Set non-required readonly properties with defaultValue + this.Type = "TaskPathArgument"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "TaskPathArgument"; + + /// + /// Argument name. The name must match one of the input names from Task's template which can be a function or DAG. + /// + /// Argument name. The name must match one of the input names from Task's template which can be a function or DAG. + [DataMember(Name = "name", IsRequired = true, EmitDefaultValue = false)] + public string Name { get; set; } + /// + /// 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. + /// + /// 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. + [DataMember(Name = "from", IsRequired = true, EmitDefaultValue = false)] + public AnyOf From { 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; } + /// + /// 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. + /// + /// 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. + [DataMember(Name = "sub_path", EmitDefaultValue = false)] + public string SubPath { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + return "TaskPathArgument"; + } + + /// + /// 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("TaskPathArgument:\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" From: ").Append(From).Append("\n"); + sb.Append(" Annotations: ").Append(Annotations).Append("\n"); + sb.Append(" SubPath: ").Append(SubPath).Append("\n"); + return sb.ToString(); + } + + /// + /// Returns the object from JSON string + /// + /// TaskPathArgument object + public static TaskPathArgument 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. + /// + /// TaskPathArgument object + public virtual TaskPathArgument DuplicateTaskPathArgument() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateTaskPathArgument(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel DuplicateOpenAPIGenBaseModel() + { + return DuplicateTaskPathArgument(); + } + + /// + /// 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 TaskPathArgument); + } + + /// + /// Returns true if TaskPathArgument instances are equal + /// + /// Instance of TaskPathArgument to be compared + /// Boolean + public bool Equals(TaskPathArgument 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.From == input.From || + (this.From != null && + this.From.Equals(input.From)) + ) && base.Equals(input) && + ( + this.Type == input.Type || + (this.Type != null && + this.Type.Equals(input.Type)) + ) && base.Equals(input) && + ( + this.Annotations == input.Annotations || + this.Annotations != null && + input.Annotations != null && + this.Annotations.SequenceEqual(input.Annotations) + ) && base.Equals(input) && + ( + this.SubPath == input.SubPath || + (this.SubPath != null && + this.SubPath.Equals(input.SubPath)) + ); + } + + /// + /// 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.From != null) + hashCode = hashCode * 59 + this.From.GetHashCode(); + if (this.Type != null) + hashCode = hashCode * 59 + this.Type.GetHashCode(); + if (this.Annotations != null) + hashCode = hashCode * 59 + this.Annotations.GetHashCode(); + if (this.SubPath != null) + hashCode = hashCode * 59 + this.SubPath.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(@"^TaskPathArgument$", 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/TaskPathReference.cs b/src/PollinationSDK/Model/TaskPathReference.cs new file mode 100644 index 000000000..57ddc18ef --- /dev/null +++ b/src/PollinationSDK/Model/TaskPathReference.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 +{ + /// + /// A reference to a file or folder that is generated in a task. + /// + [DataContract(Name = "TaskPathReference")] + public partial class TaskPathReference : TaskReferenceBase, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected TaskPathReference() + { + // Set non-required readonly properties with defaultValue + this.Type = "TaskPathReference"; + } + + /// + /// Initializes a new instance of the class. + /// + /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. + /// The name of the task to pull output data from. (required). + /// The name of the variable. (required). + public TaskPathReference + ( + string name, string variable, // Required parameters + Dictionary annotations= default // Optional parameters + ) : base(annotations: annotations, name: name, variable: variable)// BaseClass + { + + // Set non-required readonly properties with defaultValue + this.Type = "TaskPathReference"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "TaskPathReference"; + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + return "TaskPathReference"; + } + + /// + /// 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("TaskPathReference:\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Annotations: ").Append(Annotations).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Variable: ").Append(Variable).Append("\n"); + return sb.ToString(); + } + + /// + /// Returns the object from JSON string + /// + /// TaskPathReference object + public static TaskPathReference 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. + /// + /// TaskPathReference object + public virtual TaskPathReference DuplicateTaskPathReference() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateTaskPathReference(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override TaskReferenceBase DuplicateTaskReferenceBase() + { + return DuplicateTaskPathReference(); + } + + /// + /// 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 TaskPathReference); + } + + /// + /// Returns true if TaskPathReference instances are equal + /// + /// Instance of TaskPathReference to be compared + /// Boolean + public bool Equals(TaskPathReference 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(@"^TaskPathReference$", 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/TaskPathReturn.cs b/src/PollinationSDK/Model/TaskPathReturn.cs new file mode 100644 index 000000000..c3a1af782 --- /dev/null +++ b/src/PollinationSDK/Model/TaskPathReturn.cs @@ -0,0 +1,200 @@ +/* + * 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 Task output that returns a file or a folder output from a function or a DAG. + /// + [DataContract(Name = "TaskPathReturn")] + public partial class TaskPathReturn : PathOutput, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected TaskPathReturn() + { + // Set non-required readonly properties with defaultValue + this.Type = "TaskPathReturn"; + } + + /// + /// Initializes a new instance of the class. + /// + /// Output name. (required). + /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. + /// Optional description for output.. + /// Path to the output artifact relative to where the function command is executed. (required). + /// A boolean to indicate if an artifact output is required. A False value makes the artifact optional. (default to true). + public TaskPathReturn + ( + string name, string path, // Required parameters + Dictionary annotations= default, string description= default, bool required = true // Optional parameters + ) : base(name: name, annotations: annotations, description: description, path: path, required: required)// BaseClass + { + + // Set non-required readonly properties with defaultValue + this.Type = "TaskPathReturn"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "TaskPathReturn"; + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + return "TaskPathReturn"; + } + + /// + /// 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("TaskPathReturn:\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Annotations: ").Append(Annotations).Append("\n"); + sb.Append(" Description: ").Append(Description).Append("\n"); + sb.Append(" Path: ").Append(Path).Append("\n"); + sb.Append(" Required: ").Append(Required).Append("\n"); + return sb.ToString(); + } + + /// + /// Returns the object from JSON string + /// + /// TaskPathReturn object + public static TaskPathReturn 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. + /// + /// TaskPathReturn object + public virtual TaskPathReturn DuplicateTaskPathReturn() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateTaskPathReturn(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override PathOutput DuplicatePathOutput() + { + return DuplicateTaskPathReturn(); + } + + /// + /// 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 TaskPathReturn); + } + + /// + /// Returns true if TaskPathReturn instances are equal + /// + /// Instance of TaskPathReturn to be compared + /// Boolean + public bool Equals(TaskPathReturn 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(@"^TaskPathReturn$", 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/TaskReference.cs b/src/PollinationSDK/Model/TaskReference.cs new file mode 100644 index 000000000..46e68455b --- /dev/null +++ b/src/PollinationSDK/Model/TaskReference.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 +{ + /// + /// A Task reference for parameters other than files or folders. + /// + [DataContract(Name = "TaskReference")] + public partial class TaskReference : TaskReferenceBase, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected TaskReference() + { + // Set non-required readonly properties with defaultValue + this.Type = "TaskReference"; + } + + /// + /// Initializes a new instance of the class. + /// + /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. + /// The name of the task to pull output data from. (required). + /// The name of the variable. (required). + public TaskReference + ( + string name, string variable, // Required parameters + Dictionary annotations= default // Optional parameters + ) : base(annotations: annotations, name: name, variable: variable)// BaseClass + { + + // Set non-required readonly properties with defaultValue + this.Type = "TaskReference"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "TaskReference"; + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + return "TaskReference"; + } + + /// + /// 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("TaskReference:\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Annotations: ").Append(Annotations).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Variable: ").Append(Variable).Append("\n"); + return sb.ToString(); + } + + /// + /// Returns the object from JSON string + /// + /// TaskReference object + public static TaskReference 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. + /// + /// TaskReference object + public virtual TaskReference DuplicateTaskReference() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateTaskReference(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override TaskReferenceBase DuplicateTaskReferenceBase() + { + return DuplicateTaskReference(); + } + + /// + /// 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 TaskReference); + } + + /// + /// Returns true if TaskReference instances are equal + /// + /// Instance of TaskReference to be compared + /// Boolean + public bool Equals(TaskReference 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(@"^TaskReference$", 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/TaskReferenceBase.cs b/src/PollinationSDK/Model/TaskReferenceBase.cs new file mode 100644 index 000000000..50aeca5b7 --- /dev/null +++ b/src/PollinationSDK/Model/TaskReferenceBase.cs @@ -0,0 +1,236 @@ +/* + * 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 Task Reference + /// + [DataContract(Name = "_TaskReferenceBase")] + public partial class TaskReferenceBase : BaseReference, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected TaskReferenceBase() + { + // Set non-required readonly properties with defaultValue + this.Type = "_TaskReferenceBase"; + } + + /// + /// Initializes a new instance of the class. + /// + /// The name of the task to pull output data from. (required). + /// The name of the variable. (required). + /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. + public TaskReferenceBase + ( + string name, string variable, // Required parameters + Dictionary annotations= default // Optional parameters + ) : base(annotations: annotations)// BaseClass + { + // to ensure "name" is required (not null) + this.Name = name ?? throw new ArgumentNullException("name is a required property for TaskReferenceBase and cannot be null"); + // to ensure "variable" is required (not null) + this.Variable = variable ?? throw new ArgumentNullException("variable is a required property for TaskReferenceBase and cannot be null"); + + // Set non-required readonly properties with defaultValue + this.Type = "_TaskReferenceBase"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "_TaskReferenceBase"; + + /// + /// The name of the task to pull output data from. + /// + /// The name of the task to pull output data from. + [DataMember(Name = "name", IsRequired = true, EmitDefaultValue = false)] + public string Name { get; set; } + /// + /// The name of the variable. + /// + /// The name of the variable. + [DataMember(Name = "variable", IsRequired = true, EmitDefaultValue = false)] + public string Variable { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + return "TaskReferenceBase"; + } + + /// + /// 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("TaskReferenceBase:\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Annotations: ").Append(Annotations).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Variable: ").Append(Variable).Append("\n"); + return sb.ToString(); + } + + /// + /// Returns the object from JSON string + /// + /// TaskReferenceBase object + public static TaskReferenceBase 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. + /// + /// TaskReferenceBase object + public virtual TaskReferenceBase DuplicateTaskReferenceBase() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateTaskReferenceBase(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override BaseReference DuplicateBaseReference() + { + return DuplicateTaskReferenceBase(); + } + + /// + /// 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 TaskReferenceBase); + } + + /// + /// Returns true if TaskReferenceBase instances are equal + /// + /// Instance of TaskReferenceBase to be compared + /// Boolean + public bool Equals(TaskReferenceBase 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.Variable == input.Variable || + (this.Variable != null && + this.Variable.Equals(input.Variable)) + ) && 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.Variable != null) + hashCode = hashCode * 59 + this.Variable.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(@"^_TaskReferenceBase$", 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/TaskReturn.cs b/src/PollinationSDK/Model/TaskReturn.cs new file mode 100644 index 000000000..970069ead --- /dev/null +++ b/src/PollinationSDK/Model/TaskReturn.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 +{ + /// + /// A Task return output that exposes the values from a function or a DAG. + /// + [DataContract(Name = "TaskReturn")] + public partial class TaskReturn : GenericOutput, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected TaskReturn() + { + // Set non-required readonly properties with defaultValue + this.Type = "TaskReturn"; + } + + /// + /// Initializes a new instance of the class. + /// + /// Output name. (required). + /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. + /// Optional description for output.. + public TaskReturn + ( + string name, // Required parameters + Dictionary annotations= default, string description= default // Optional parameters + ) : base(name: name, annotations: annotations, description: description)// BaseClass + { + + // Set non-required readonly properties with defaultValue + this.Type = "TaskReturn"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "TaskReturn"; + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + return "TaskReturn"; + } + + /// + /// 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("TaskReturn:\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Annotations: ").Append(Annotations).Append("\n"); + sb.Append(" Description: ").Append(Description).Append("\n"); + return sb.ToString(); + } + + /// + /// Returns the object from JSON string + /// + /// TaskReturn object + public static TaskReturn 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. + /// + /// TaskReturn object + public virtual TaskReturn DuplicateTaskReturn() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateTaskReturn(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override GenericOutput DuplicateGenericOutput() + { + return DuplicateTaskReturn(); + } + + /// + /// 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 TaskReturn); + } + + /// + /// Returns true if TaskReturn instances are equal + /// + /// Instance of TaskReturn to be compared + /// Boolean + public bool Equals(TaskReturn 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(@"^TaskReturn$", 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/Team.cs b/src/PollinationSDK/Model/Team.cs new file mode 100644 index 000000000..83ffdfda9 --- /dev/null +++ b/src/PollinationSDK/Model/Team.cs @@ -0,0 +1,244 @@ +/* + * 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 +{ + /// + /// Team + /// + [DataContract(Name = "Team")] + public partial class Team : TeamUpdate, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected Team() + { + // Set non-required readonly properties with defaultValue + this.Type = "Team"; + } + + /// + /// Initializes a new instance of the class. + /// + /// The team ID (required). + /// The public slug of the team (required). + /// The number of members that are part of this team (default to 0). + /// name (required). + /// description. + public Team + ( + string name, string id, string slug, // Required parameters + string description= default, int memberCount = 0 // Optional parameters + ) : base(name: name, description: description)// BaseClass + { + // to ensure "id" is required (not null) + this.Id = id ?? throw new ArgumentNullException("id is a required property for Team and cannot be null"); + // to ensure "slug" is required (not null) + this.Slug = slug ?? throw new ArgumentNullException("slug is a required property for Team and cannot be null"); + this.MemberCount = memberCount; + + // Set non-required readonly properties with defaultValue + this.Type = "Team"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "Team"; + + /// + /// The team ID + /// + /// The team ID + [DataMember(Name = "id", IsRequired = true, EmitDefaultValue = false)] + public string Id { get; set; } + /// + /// The public slug of the team + /// + /// The public slug of the team + [DataMember(Name = "slug", IsRequired = true, EmitDefaultValue = false)] + public string Slug { get; set; } + /// + /// The number of members that are part of this team + /// + /// The number of members that are part of this team + [DataMember(Name = "member_count", EmitDefaultValue = true)] + public int MemberCount { get; set; } = 0; + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + return "Team"; + } + + /// + /// 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("Team:\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Description: ").Append(Description).Append("\n"); + sb.Append(" Id: ").Append(Id).Append("\n"); + sb.Append(" Slug: ").Append(Slug).Append("\n"); + sb.Append(" MemberCount: ").Append(MemberCount).Append("\n"); + return sb.ToString(); + } + + /// + /// Returns the object from JSON string + /// + /// Team object + public static Team 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. + /// + /// Team object + public virtual Team DuplicateTeam() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateTeam(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override TeamUpdate DuplicateTeamUpdate() + { + return DuplicateTeam(); + } + + /// + /// 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 Team); + } + + /// + /// Returns true if Team instances are equal + /// + /// Instance of Team to be compared + /// Boolean + public bool Equals(Team 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.Slug == input.Slug || + (this.Slug != null && + this.Slug.Equals(input.Slug)) + ) && base.Equals(input) && + ( + this.MemberCount == input.MemberCount || + (this.MemberCount != null && + this.MemberCount.Equals(input.MemberCount)) + ) && 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.Slug != null) + hashCode = hashCode * 59 + this.Slug.GetHashCode(); + if (this.MemberCount != null) + hashCode = hashCode * 59 + this.MemberCount.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(@"^Team$", 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/TeamCreate.cs b/src/PollinationSDK/Model/TeamCreate.cs new file mode 100644 index 000000000..d5077f574 --- /dev/null +++ b/src/PollinationSDK/Model/TeamCreate.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 +{ + /// + /// TeamCreate + /// + [DataContract(Name = "TeamCreate")] + public partial class TeamCreate : OpenAPIGenBaseModel, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected TeamCreate() + { + // Set non-required readonly properties with defaultValue + this.Type = "TeamCreate"; + } + + /// + /// Initializes a new instance of the class. + /// + /// name (required). + /// description. + public TeamCreate + ( + string name, // Required parameters + 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 TeamCreate and cannot be null"); + this.Description = description; + + // Set non-required readonly properties with defaultValue + this.Type = "TeamCreate"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "TeamCreate"; + + /// + /// 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 "TeamCreate"; + } + + /// + /// 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("TeamCreate:\n"); + sb.Append(" Type: ").Append(Type).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 + /// + /// TeamCreate object + public static TeamCreate 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. + /// + /// TeamCreate object + public virtual TeamCreate DuplicateTeamCreate() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateTeamCreate(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel DuplicateOpenAPIGenBaseModel() + { + return DuplicateTeamCreate(); + } + + /// + /// 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 TeamCreate); + } + + /// + /// Returns true if TeamCreate instances are equal + /// + /// Instance of TeamCreate to be compared + /// Boolean + public bool Equals(TeamCreate 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.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.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(@"^TeamCreate$", 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/TeamList.cs b/src/PollinationSDK/Model/TeamList.cs new file mode 100644 index 000000000..d3cf3f2d2 --- /dev/null +++ b/src/PollinationSDK/Model/TeamList.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 = "TeamList")] + public partial class TeamList : OpenAPIGenBaseModel, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected TeamList() + { + // Set non-required readonly properties with defaultValue + this.Type = "TeamList"; + } + + /// + /// 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 TeamList + ( + 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 TeamList and cannot be null"); + this.NextPage = nextPage; + + // Set non-required readonly properties with defaultValue + this.Type = "TeamList"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "TeamList"; + + /// + /// 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 "TeamList"; + } + + /// + /// 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("TeamList:\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 + /// + /// TeamList object + public static TeamList 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. + /// + /// TeamList object + public virtual TeamList DuplicateTeamList() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateTeamList(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel DuplicateOpenAPIGenBaseModel() + { + return DuplicateTeamList(); + } + + /// + /// 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 TeamList); + } + + /// + /// Returns true if TeamList instances are equal + /// + /// Instance of TeamList to be compared + /// Boolean + public bool Equals(TeamList 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(@"^TeamList$", 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/TeamMember.cs b/src/PollinationSDK/Model/TeamMember.cs new file mode 100644 index 000000000..26caf8509 --- /dev/null +++ b/src/PollinationSDK/Model/TeamMember.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 +{ + /// + /// TeamMember + /// + [DataContract(Name = "TeamMember")] + public partial class TeamMember : OpenAPIGenBaseModel, IEquatable, IValidatableObject + { + /// + /// The role the user has within the team + /// + /// The role the user has within the team + [DataMember(Name="role", EmitDefaultValue=false)] + public TeamRoleEnum Role { get; set; } + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected TeamMember() + { + // Set non-required readonly properties with defaultValue + this.Type = "TeamMember"; + } + + /// + /// Initializes a new instance of the class. + /// + /// The team member (required). + /// The role the user has within the team (required). + public TeamMember + ( + UserPublic user, TeamRoleEnum role// Required parameters + // Optional parameters + ) : base()// BaseClass + { + // to ensure "user" is required (not null) + this.User = user ?? throw new ArgumentNullException("user is a required property for TeamMember and cannot be null"); + this.Role = role; + + // Set non-required readonly properties with defaultValue + this.Type = "TeamMember"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "TeamMember"; + + /// + /// The team member + /// + /// The team member + [DataMember(Name = "user", IsRequired = true, EmitDefaultValue = false)] + public UserPublic User { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + return "TeamMember"; + } + + /// + /// 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("TeamMember:\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" User: ").Append(User).Append("\n"); + sb.Append(" Role: ").Append(Role).Append("\n"); + return sb.ToString(); + } + + /// + /// Returns the object from JSON string + /// + /// TeamMember object + public static TeamMember 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. + /// + /// TeamMember object + public virtual TeamMember DuplicateTeamMember() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateTeamMember(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel DuplicateOpenAPIGenBaseModel() + { + return DuplicateTeamMember(); + } + + /// + /// 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 TeamMember); + } + + /// + /// Returns true if TeamMember instances are equal + /// + /// Instance of TeamMember to be compared + /// Boolean + public bool Equals(TeamMember input) + { + if (input == null) + return false; + return base.Equals(input) && + ( + this.User == input.User || + (this.User != null && + this.User.Equals(input.User)) + ) && base.Equals(input) && + ( + this.Role == input.Role || + (this.Role != null && + this.Role.Equals(input.Role)) + ) && 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.User != null) + hashCode = hashCode * 59 + this.User.GetHashCode(); + if (this.Role != null) + hashCode = hashCode * 59 + this.Role.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(@"^TeamMember$", 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/TeamMemberList.cs b/src/PollinationSDK/Model/TeamMemberList.cs new file mode 100644 index 000000000..1f8fef9d8 --- /dev/null +++ b/src/PollinationSDK/Model/TeamMemberList.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 = "TeamMemberList")] + public partial class TeamMemberList : OpenAPIGenBaseModel, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected TeamMemberList() + { + // Set non-required readonly properties with defaultValue + this.Type = "TeamMemberList"; + } + + /// + /// 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 TeamMemberList + ( + 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 TeamMemberList and cannot be null"); + this.NextPage = nextPage; + + // Set non-required readonly properties with defaultValue + this.Type = "TeamMemberList"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "TeamMemberList"; + + /// + /// 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 "TeamMemberList"; + } + + /// + /// 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("TeamMemberList:\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 + /// + /// TeamMemberList object + public static TeamMemberList 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. + /// + /// TeamMemberList object + public virtual TeamMemberList DuplicateTeamMemberList() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateTeamMemberList(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel DuplicateOpenAPIGenBaseModel() + { + return DuplicateTeamMemberList(); + } + + /// + /// 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 TeamMemberList); + } + + /// + /// Returns true if TeamMemberList instances are equal + /// + /// Instance of TeamMemberList to be compared + /// Boolean + public bool Equals(TeamMemberList 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(@"^TeamMemberList$", 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/TeamRoleEnum.cs b/src/PollinationSDK/Model/TeamRoleEnum.cs new file mode 100644 index 000000000..c94984a79 --- /dev/null +++ b/src/PollinationSDK/Model/TeamRoleEnum.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 TeamRoleEnum + { + /// + /// Enum Owner for value: owner + /// + [EnumMember(Value = "owner")] + Owner = 1, + + /// + /// Enum Member for value: member + /// + [EnumMember(Value = "member")] + Member = 2 + + } + +} diff --git a/src/PollinationSDK/Model/TeamUpdate.cs b/src/PollinationSDK/Model/TeamUpdate.cs new file mode 100644 index 000000000..01f88db63 --- /dev/null +++ b/src/PollinationSDK/Model/TeamUpdate.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 +{ + /// + /// TeamUpdate + /// + [DataContract(Name = "TeamUpdate")] + public partial class TeamUpdate : TeamCreate, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected TeamUpdate() + { + // Set non-required readonly properties with defaultValue + this.Type = "TeamUpdate"; + } + + /// + /// Initializes a new instance of the class. + /// + /// name (required). + /// description. + public TeamUpdate + ( + string name, // Required parameters + string description= default // Optional parameters + ) : base(name: name, description: description)// BaseClass + { + + // Set non-required readonly properties with defaultValue + this.Type = "TeamUpdate"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "TeamUpdate"; + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + return "TeamUpdate"; + } + + /// + /// 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("TeamUpdate:\n"); + sb.Append(" Type: ").Append(Type).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 + /// + /// TeamUpdate object + public static TeamUpdate 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. + /// + /// TeamUpdate object + public virtual TeamUpdate DuplicateTeamUpdate() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateTeamUpdate(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override TeamCreate DuplicateTeamCreate() + { + return DuplicateTeamUpdate(); + } + + /// + /// 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 TeamUpdate); + } + + /// + /// Returns true if TeamUpdate instances are equal + /// + /// Instance of TeamUpdate to be compared + /// Boolean + public bool Equals(TeamUpdate 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(@"^TeamUpdate$", 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/UpdateAccepted.cs b/src/PollinationSDK/Model/UpdateAccepted.cs new file mode 100644 index 000000000..9f76d34c8 --- /dev/null +++ b/src/PollinationSDK/Model/UpdateAccepted.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 +{ + /// + /// Accepted request response for existing resource + /// + [DataContract(Name = "UpdateAccepted")] + public partial class UpdateAccepted : OpenAPIGenBaseModel, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// status (default to "accepted"). + public UpdateAccepted + ( + // Required parameters + string status = "accepted" // Optional parameters + ) : base()// BaseClass + { + // use default value if no "status" provided + this.Status = status ?? "accepted"; + + // Set non-required readonly properties with defaultValue + this.Type = "UpdateAccepted"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "UpdateAccepted"; + + /// + /// Gets or Sets Status + /// + [DataMember(Name = "status", EmitDefaultValue = true)] + public string Status { get; set; } = "accepted"; + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + return "UpdateAccepted"; + } + + /// + /// 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("UpdateAccepted:\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Status: ").Append(Status).Append("\n"); + return sb.ToString(); + } + + /// + /// Returns the object from JSON string + /// + /// UpdateAccepted object + public static UpdateAccepted 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. + /// + /// UpdateAccepted object + public virtual UpdateAccepted DuplicateUpdateAccepted() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateUpdateAccepted(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel DuplicateOpenAPIGenBaseModel() + { + return DuplicateUpdateAccepted(); + } + + /// + /// 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 UpdateAccepted); + } + + /// + /// Returns true if UpdateAccepted instances are equal + /// + /// Instance of UpdateAccepted to be compared + /// Boolean + public bool Equals(UpdateAccepted input) + { + if (input == null) + return false; + return base.Equals(input) && + ( + this.Status == input.Status || + (this.Status != null && + this.Status.Equals(input.Status)) + ) && 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.Status != null) + hashCode = hashCode * 59 + this.Status.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(@"^UpdateAccepted$", 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/Usage.cs b/src/PollinationSDK/Model/Usage.cs new file mode 100644 index 000000000..36acec6e9 --- /dev/null +++ b/src/PollinationSDK/Model/Usage.cs @@ -0,0 +1,303 @@ +/* + * 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 +{ + /// + /// Usage + /// + [DataContract(Name = "Usage")] + public partial class Usage : OpenAPIGenBaseModel, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected Usage() + { + // Set non-required readonly properties with defaultValue + this.Type = "Usage"; + } + + /// + /// Initializes a new instance of the class. + /// + /// The start date for this usage aggregation (required). + /// The end date for this usage aggregation (required). + /// cpu usage (default to 0D). + /// memory usage (default to 0D). + /// succeeded usage (default to 0). + /// failed usage (default to 0). + /// daily breakdown of usage. + public Usage + ( + DateTime start, DateTime end, // Required parameters + double cpu = 0D, double memory = 0D, int succeeded = 0, int failed = 0, List dailyUsage= default // Optional parameters + ) : base()// BaseClass + { + this.Start = start; + this.End = end; + this.Cpu = cpu; + this.Memory = memory; + this.Succeeded = succeeded; + this.Failed = failed; + this.DailyUsage = dailyUsage; + + // Set non-required readonly properties with defaultValue + this.Type = "Usage"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "Usage"; + + /// + /// The start date for this usage aggregation + /// + /// The start date for this usage aggregation + [DataMember(Name = "start", IsRequired = true, EmitDefaultValue = false)] + public DateTime Start { get; set; } + /// + /// The end date for this usage aggregation + /// + /// The end date for this usage aggregation + [DataMember(Name = "end", IsRequired = true, EmitDefaultValue = false)] + public DateTime End { get; set; } + /// + /// cpu usage + /// + /// cpu usage + [DataMember(Name = "cpu", EmitDefaultValue = true)] + public double Cpu { get; set; } = 0D; + /// + /// memory usage + /// + /// memory usage + [DataMember(Name = "memory", EmitDefaultValue = true)] + public double Memory { get; set; } = 0D; + /// + /// succeeded usage + /// + /// succeeded usage + [DataMember(Name = "succeeded", EmitDefaultValue = true)] + public int Succeeded { get; set; } = 0; + /// + /// failed usage + /// + /// failed usage + [DataMember(Name = "failed", EmitDefaultValue = true)] + public int Failed { get; set; } = 0; + /// + /// daily breakdown of usage + /// + /// daily breakdown of usage + [DataMember(Name = "daily_usage", EmitDefaultValue = false)] + public List DailyUsage { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + return "Usage"; + } + + /// + /// 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("Usage:\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Start: ").Append(Start).Append("\n"); + sb.Append(" End: ").Append(End).Append("\n"); + sb.Append(" Cpu: ").Append(Cpu).Append("\n"); + sb.Append(" Memory: ").Append(Memory).Append("\n"); + sb.Append(" Succeeded: ").Append(Succeeded).Append("\n"); + sb.Append(" Failed: ").Append(Failed).Append("\n"); + sb.Append(" DailyUsage: ").Append(DailyUsage).Append("\n"); + return sb.ToString(); + } + + /// + /// Returns the object from JSON string + /// + /// Usage object + public static Usage 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. + /// + /// Usage object + public virtual Usage DuplicateUsage() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateUsage(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel DuplicateOpenAPIGenBaseModel() + { + return DuplicateUsage(); + } + + /// + /// 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 Usage); + } + + /// + /// Returns true if Usage instances are equal + /// + /// Instance of Usage to be compared + /// Boolean + public bool Equals(Usage 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.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.Succeeded == input.Succeeded || + (this.Succeeded != null && + this.Succeeded.Equals(input.Succeeded)) + ) && base.Equals(input) && + ( + this.Failed == input.Failed || + (this.Failed != null && + this.Failed.Equals(input.Failed)) + ) && base.Equals(input) && + ( + this.DailyUsage == input.DailyUsage || + this.DailyUsage != null && + input.DailyUsage != null && + this.DailyUsage.SequenceEqual(input.DailyUsage) + ) && 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.Cpu != null) + hashCode = hashCode * 59 + this.Cpu.GetHashCode(); + if (this.Memory != null) + hashCode = hashCode * 59 + this.Memory.GetHashCode(); + if (this.Succeeded != null) + hashCode = hashCode * 59 + this.Succeeded.GetHashCode(); + if (this.Failed != null) + hashCode = hashCode * 59 + this.Failed.GetHashCode(); + if (this.DailyUsage != null) + hashCode = hashCode * 59 + this.DailyUsage.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(@"^Usage$", 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/UserCreate.cs b/src/PollinationSDK/Model/UserCreate.cs new file mode 100644 index 000000000..abf91c5f7 --- /dev/null +++ b/src/PollinationSDK/Model/UserCreate.cs @@ -0,0 +1,213 @@ +/* + * 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 +{ + /// + /// UserCreate + /// + [DataContract(Name = "UserCreate")] + public partial class UserCreate : UserUpdate, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected UserCreate() + { + // Set non-required readonly properties with defaultValue + this.Type = "UserCreate"; + } + + /// + /// Initializes a new instance of the class. + /// + /// The unique name of the user in small case without spaces (required). + /// The display name for this user (required). + /// URL to the picture associated with this user (required). + /// A description of the user (default to ""). + public UserCreate + ( + string name, string pictureUrl, string username, // Required parameters + string description = "" // Optional parameters + ) : base(name: name, pictureUrl: pictureUrl, description: description)// BaseClass + { + // to ensure "username" is required (not null) + this.Username = username ?? throw new ArgumentNullException("username is a required property for UserCreate and cannot be null"); + + // Set non-required readonly properties with defaultValue + this.Type = "UserCreate"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "UserCreate"; + + /// + /// The unique name of the user in small case without spaces + /// + /// The unique name of the user in small case without spaces + [DataMember(Name = "username", IsRequired = true, EmitDefaultValue = false)] + public string Username { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + return "UserCreate"; + } + + /// + /// 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("UserCreate:\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" PictureUrl: ").Append(PictureUrl).Append("\n"); + sb.Append(" Description: ").Append(Description).Append("\n"); + sb.Append(" Username: ").Append(Username).Append("\n"); + return sb.ToString(); + } + + /// + /// Returns the object from JSON string + /// + /// UserCreate object + public static UserCreate 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. + /// + /// UserCreate object + public virtual UserCreate DuplicateUserCreate() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateUserCreate(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override UserUpdate DuplicateUserUpdate() + { + return DuplicateUserCreate(); + } + + /// + /// 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 UserCreate); + } + + /// + /// Returns true if UserCreate instances are equal + /// + /// Instance of UserCreate to be compared + /// Boolean + public bool Equals(UserCreate input) + { + if (input == null) + return false; + return base.Equals(input) && + ( + this.Username == input.Username || + (this.Username != null && + this.Username.Equals(input.Username)) + ) && 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.Username != null) + hashCode = hashCode * 59 + this.Username.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(@"^UserCreate$", 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/UserPermission.cs b/src/PollinationSDK/Model/UserPermission.cs new file mode 100644 index 000000000..6fbf8c098 --- /dev/null +++ b/src/PollinationSDK/Model/UserPermission.cs @@ -0,0 +1,238 @@ +/* + * 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 +{ + /// + /// UserPermission + /// + [DataContract(Name = "UserPermission")] + public partial class UserPermission : OpenAPIGenBaseModel, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// The user has admin permission to this resource (default to false). + /// The user has write permission on this resource (default to false). + /// The user has read permission on this resource (default to false). + public UserPermission + ( + // Required parameters + bool admin = false, bool write = false, bool read = false // Optional parameters + ) : base()// BaseClass + { + this.Admin = admin; + this.Write = write; + this.Read = read; + + // Set non-required readonly properties with defaultValue + this.Type = "UserPermission"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "UserPermission"; + + /// + /// The user has admin permission to this resource + /// + /// The user has admin permission to this resource + [DataMember(Name = "admin", EmitDefaultValue = true)] + public bool Admin { get; set; } = false; + /// + /// The user has write permission on this resource + /// + /// The user has write permission on this resource + [DataMember(Name = "write", EmitDefaultValue = true)] + public bool Write { get; set; } = false; + /// + /// The user has read permission on this resource + /// + /// The user has read permission on this resource + [DataMember(Name = "read", EmitDefaultValue = true)] + public bool Read { get; set; } = false; + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + return "UserPermission"; + } + + /// + /// 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("UserPermission:\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Admin: ").Append(Admin).Append("\n"); + sb.Append(" Write: ").Append(Write).Append("\n"); + sb.Append(" Read: ").Append(Read).Append("\n"); + return sb.ToString(); + } + + /// + /// Returns the object from JSON string + /// + /// UserPermission object + public static UserPermission 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. + /// + /// UserPermission object + public virtual UserPermission DuplicateUserPermission() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateUserPermission(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel DuplicateOpenAPIGenBaseModel() + { + return DuplicateUserPermission(); + } + + /// + /// 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 UserPermission); + } + + /// + /// Returns true if UserPermission instances are equal + /// + /// Instance of UserPermission to be compared + /// Boolean + public bool Equals(UserPermission input) + { + if (input == null) + return false; + return base.Equals(input) && + ( + this.Admin == input.Admin || + (this.Admin != null && + this.Admin.Equals(input.Admin)) + ) && base.Equals(input) && + ( + this.Write == input.Write || + (this.Write != null && + this.Write.Equals(input.Write)) + ) && base.Equals(input) && + ( + this.Read == input.Read || + (this.Read != null && + this.Read.Equals(input.Read)) + ) && 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.Admin != null) + hashCode = hashCode * 59 + this.Admin.GetHashCode(); + if (this.Write != null) + hashCode = hashCode * 59 + this.Write.GetHashCode(); + if (this.Read != null) + hashCode = hashCode * 59 + this.Read.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(@"^UserPermission$", 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/UserPrivate.cs b/src/PollinationSDK/Model/UserPrivate.cs new file mode 100644 index 000000000..96f1715e9 --- /dev/null +++ b/src/PollinationSDK/Model/UserPrivate.cs @@ -0,0 +1,289 @@ +/* + * 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 +{ + /// + /// UserPrivate + /// + [DataContract(Name = "UserPrivate")] + public partial class UserPrivate : OpenAPIGenBaseModel, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected UserPrivate() + { + // Set non-required readonly properties with defaultValue + this.Type = "UserPrivate"; + } + + /// + /// Initializes a new instance of the class. + /// + /// The unique ID for that user (required). + /// The email associated with that user (required). + /// The lowercase account name for this user (required). + /// The display name for this user. + /// A short description of the user. + /// URL to the picture associated with this user. + public UserPrivate + ( + string id, string email, string username, // Required parameters + string name= default, string description= default, string picture= default // Optional parameters + ) : base()// BaseClass + { + // to ensure "id" is required (not null) + this.Id = id ?? throw new ArgumentNullException("id is a required property for UserPrivate and cannot be null"); + // to ensure "email" is required (not null) + this.Email = email ?? throw new ArgumentNullException("email is a required property for UserPrivate and cannot be null"); + // to ensure "username" is required (not null) + this.Username = username ?? throw new ArgumentNullException("username is a required property for UserPrivate and cannot be null"); + this.Name = name; + this.Description = description; + this.Picture = picture; + + // Set non-required readonly properties with defaultValue + this.Type = "UserPrivate"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "UserPrivate"; + + /// + /// The unique ID for that user + /// + /// The unique ID for that user + [DataMember(Name = "id", IsRequired = true, EmitDefaultValue = false)] + public string Id { get; set; } + /// + /// The email associated with that user + /// + /// The email associated with that user + [DataMember(Name = "email", IsRequired = true, EmitDefaultValue = false)] + public string Email { get; set; } + /// + /// The lowercase account name for this user + /// + /// The lowercase account name for this user + [DataMember(Name = "username", IsRequired = true, EmitDefaultValue = false)] + public string Username { get; set; } + /// + /// The display name for this user + /// + /// The display name for this user + [DataMember(Name = "name", EmitDefaultValue = false)] + public string Name { get; set; } + /// + /// A short description of the user + /// + /// A short description of the user + [DataMember(Name = "description", EmitDefaultValue = false)] + public string Description { get; set; } + /// + /// URL to the picture associated with this user + /// + /// URL to the picture associated with this user + [DataMember(Name = "picture", EmitDefaultValue = false)] + public string Picture { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + return "UserPrivate"; + } + + /// + /// 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("UserPrivate:\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Id: ").Append(Id).Append("\n"); + sb.Append(" Email: ").Append(Email).Append("\n"); + sb.Append(" Username: ").Append(Username).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Description: ").Append(Description).Append("\n"); + sb.Append(" Picture: ").Append(Picture).Append("\n"); + return sb.ToString(); + } + + /// + /// Returns the object from JSON string + /// + /// UserPrivate object + public static UserPrivate 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. + /// + /// UserPrivate object + public virtual UserPrivate DuplicateUserPrivate() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateUserPrivate(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel DuplicateOpenAPIGenBaseModel() + { + return DuplicateUserPrivate(); + } + + /// + /// 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 UserPrivate); + } + + /// + /// Returns true if UserPrivate instances are equal + /// + /// Instance of UserPrivate to be compared + /// Boolean + public bool Equals(UserPrivate 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.Email == input.Email || + (this.Email != null && + this.Email.Equals(input.Email)) + ) && base.Equals(input) && + ( + this.Username == input.Username || + (this.Username != null && + this.Username.Equals(input.Username)) + ) && 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.Picture == input.Picture || + (this.Picture != null && + this.Picture.Equals(input.Picture)) + ) && 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.Email != null) + hashCode = hashCode * 59 + this.Email.GetHashCode(); + if (this.Username != null) + hashCode = hashCode * 59 + this.Username.GetHashCode(); + if (this.Name != null) + hashCode = hashCode * 59 + this.Name.GetHashCode(); + if (this.Description != null) + hashCode = hashCode * 59 + this.Description.GetHashCode(); + if (this.Picture != null) + hashCode = hashCode * 59 + this.Picture.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(@"^UserPrivate$", 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/UserPublic.cs b/src/PollinationSDK/Model/UserPublic.cs new file mode 100644 index 000000000..0eb40db95 --- /dev/null +++ b/src/PollinationSDK/Model/UserPublic.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 +{ + /// + /// UserPublic + /// + [DataContract(Name = "UserPublic")] + public partial class UserPublic : OpenAPIGenBaseModel, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected UserPublic() + { + // Set non-required readonly properties with defaultValue + this.Type = "UserPublic"; + } + + /// + /// Initializes a new instance of the class. + /// + /// The lowercase account name for this user (required). + /// The display name for this user. + /// A short description of the user. + /// URL to the picture associated with this user. + public UserPublic + ( + string username, // Required parameters + string name= default, string description= default, string picture= default // Optional parameters + ) : base()// BaseClass + { + // to ensure "username" is required (not null) + this.Username = username ?? throw new ArgumentNullException("username is a required property for UserPublic and cannot be null"); + this.Name = name; + this.Description = description; + this.Picture = picture; + + // Set non-required readonly properties with defaultValue + this.Type = "UserPublic"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "UserPublic"; + + /// + /// The lowercase account name for this user + /// + /// The lowercase account name for this user + [DataMember(Name = "username", IsRequired = true, EmitDefaultValue = false)] + public string Username { get; set; } + /// + /// The display name for this user + /// + /// The display name for this user + [DataMember(Name = "name", EmitDefaultValue = false)] + public string Name { get; set; } + /// + /// A short description of the user + /// + /// A short description of the user + [DataMember(Name = "description", EmitDefaultValue = false)] + public string Description { get; set; } + /// + /// URL to the picture associated with this user + /// + /// URL to the picture associated with this user + [DataMember(Name = "picture", EmitDefaultValue = false)] + public string Picture { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + return "UserPublic"; + } + + /// + /// 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("UserPublic:\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Username: ").Append(Username).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Description: ").Append(Description).Append("\n"); + sb.Append(" Picture: ").Append(Picture).Append("\n"); + return sb.ToString(); + } + + /// + /// Returns the object from JSON string + /// + /// UserPublic object + public static UserPublic 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. + /// + /// UserPublic object + public virtual UserPublic DuplicateUserPublic() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateUserPublic(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel DuplicateOpenAPIGenBaseModel() + { + return DuplicateUserPublic(); + } + + /// + /// 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 UserPublic); + } + + /// + /// Returns true if UserPublic instances are equal + /// + /// Instance of UserPublic to be compared + /// Boolean + public bool Equals(UserPublic input) + { + if (input == null) + return false; + return base.Equals(input) && + ( + this.Username == input.Username || + (this.Username != null && + this.Username.Equals(input.Username)) + ) && 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.Picture == input.Picture || + (this.Picture != null && + this.Picture.Equals(input.Picture)) + ) && 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.Username != null) + hashCode = hashCode * 59 + this.Username.GetHashCode(); + if (this.Name != null) + hashCode = hashCode * 59 + this.Name.GetHashCode(); + if (this.Description != null) + hashCode = hashCode * 59 + this.Description.GetHashCode(); + if (this.Picture != null) + hashCode = hashCode * 59 + this.Picture.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(@"^UserPublic$", 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/UserPublicList.cs b/src/PollinationSDK/Model/UserPublicList.cs new file mode 100644 index 000000000..61e51c9f7 --- /dev/null +++ b/src/PollinationSDK/Model/UserPublicList.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 = "UserPublicList")] + public partial class UserPublicList : OpenAPIGenBaseModel, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected UserPublicList() + { + // Set non-required readonly properties with defaultValue + this.Type = "UserPublicList"; + } + + /// + /// 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 UserPublicList + ( + 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 UserPublicList and cannot be null"); + this.NextPage = nextPage; + + // Set non-required readonly properties with defaultValue + this.Type = "UserPublicList"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "UserPublicList"; + + /// + /// 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 "UserPublicList"; + } + + /// + /// 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("UserPublicList:\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 + /// + /// UserPublicList object + public static UserPublicList 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. + /// + /// UserPublicList object + public virtual UserPublicList DuplicateUserPublicList() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateUserPublicList(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel DuplicateOpenAPIGenBaseModel() + { + return DuplicateUserPublicList(); + } + + /// + /// 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 UserPublicList); + } + + /// + /// Returns true if UserPublicList instances are equal + /// + /// Instance of UserPublicList to be compared + /// Boolean + public bool Equals(UserPublicList 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(@"^UserPublicList$", 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/UserUpdate.cs b/src/PollinationSDK/Model/UserUpdate.cs new file mode 100644 index 000000000..8f893b998 --- /dev/null +++ b/src/PollinationSDK/Model/UserUpdate.cs @@ -0,0 +1,251 @@ +/* + * 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 +{ + /// + /// UserUpdate + /// + [DataContract(Name = "UserUpdate")] + public partial class UserUpdate : OpenAPIGenBaseModel, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected UserUpdate() + { + // Set non-required readonly properties with defaultValue + this.Type = "UserUpdate"; + } + + /// + /// Initializes a new instance of the class. + /// + /// The display name for this user (required). + /// URL to the picture associated with this user (required). + /// A description of the user (default to ""). + public UserUpdate + ( + string name, string pictureUrl, // Required parameters + string description = "" // Optional parameters + ) : base()// BaseClass + { + // to ensure "name" is required (not null) + this.Name = name ?? throw new ArgumentNullException("name is a required property for UserUpdate and cannot be null"); + // to ensure "pictureUrl" is required (not null) + this.PictureUrl = pictureUrl ?? throw new ArgumentNullException("pictureUrl is a required property for UserUpdate and cannot be null"); + // use default value if no "description" provided + this.Description = description ?? ""; + + // Set non-required readonly properties with defaultValue + this.Type = "UserUpdate"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "UserUpdate"; + + /// + /// The display name for this user + /// + /// The display name for this user + [DataMember(Name = "name", IsRequired = true, EmitDefaultValue = false)] + public string Name { get; set; } + /// + /// URL to the picture associated with this user + /// + /// URL to the picture associated with this user + [DataMember(Name = "picture_url", IsRequired = true, EmitDefaultValue = false)] + public string PictureUrl { get; set; } + /// + /// A description of the user + /// + /// A description of the user + [DataMember(Name = "description", EmitDefaultValue = true)] + public string Description { get; set; } = ""; + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + return "UserUpdate"; + } + + /// + /// 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("UserUpdate:\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" PictureUrl: ").Append(PictureUrl).Append("\n"); + sb.Append(" Description: ").Append(Description).Append("\n"); + return sb.ToString(); + } + + /// + /// Returns the object from JSON string + /// + /// UserUpdate object + public static UserUpdate 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. + /// + /// UserUpdate object + public virtual UserUpdate DuplicateUserUpdate() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateUserUpdate(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel DuplicateOpenAPIGenBaseModel() + { + return DuplicateUserUpdate(); + } + + /// + /// 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 UserUpdate); + } + + /// + /// Returns true if UserUpdate instances are equal + /// + /// Instance of UserUpdate to be compared + /// Boolean + public bool Equals(UserUpdate 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.PictureUrl == input.PictureUrl || + (this.PictureUrl != null && + this.PictureUrl.Equals(input.PictureUrl)) + ) && 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.PictureUrl != null) + hashCode = hashCode * 59 + this.PictureUrl.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(@"^UserUpdate$", 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/Model/ValueFileReference.cs b/src/PollinationSDK/Model/ValueFileReference.cs new file mode 100644 index 000000000..363373f80 --- /dev/null +++ b/src/PollinationSDK/Model/ValueFileReference.cs @@ -0,0 +1,219 @@ +/* + * 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 reference to a fixed file. + /// + [DataContract(Name = "ValueFileReference")] + public partial class ValueFileReference : BaseReference, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected ValueFileReference() + { + // Set non-required readonly properties with defaultValue + this.Type = "ValueFileReference"; + } + + /// + /// Initializes a new instance of the class. + /// + /// A fixed value for this reference. (required). + /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. + public ValueFileReference + ( + string path, // Required parameters + Dictionary annotations= default // Optional parameters + ) : base(annotations: annotations)// BaseClass + { + // to ensure "path" is required (not null) + this.Path = path ?? throw new ArgumentNullException("path is a required property for ValueFileReference and cannot be null"); + + // Set non-required readonly properties with defaultValue + this.Type = "ValueFileReference"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "ValueFileReference"; + + /// + /// A fixed value for this reference. + /// + /// A fixed value for this reference. + [DataMember(Name = "path", IsRequired = true, EmitDefaultValue = false)] + public string Path { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + return "ValueFileReference"; + } + + /// + /// 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("ValueFileReference:\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Annotations: ").Append(Annotations).Append("\n"); + sb.Append(" Path: ").Append(Path).Append("\n"); + return sb.ToString(); + } + + /// + /// Returns the object from JSON string + /// + /// ValueFileReference object + public static ValueFileReference 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. + /// + /// ValueFileReference object + public virtual ValueFileReference DuplicateValueFileReference() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateValueFileReference(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override BaseReference DuplicateBaseReference() + { + return DuplicateValueFileReference(); + } + + /// + /// 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 ValueFileReference); + } + + /// + /// Returns true if ValueFileReference instances are equal + /// + /// Instance of ValueFileReference to be compared + /// Boolean + public bool Equals(ValueFileReference input) + { + if (input == null) + return false; + return base.Equals(input) && + ( + this.Path == input.Path || + (this.Path != null && + this.Path.Equals(input.Path)) + ) && 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.Path != null) + hashCode = hashCode * 59 + this.Path.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(@"^ValueFileReference$", 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/ValueFolderReference.cs b/src/PollinationSDK/Model/ValueFolderReference.cs new file mode 100644 index 000000000..af3c83d2f --- /dev/null +++ b/src/PollinationSDK/Model/ValueFolderReference.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 +{ + /// + /// A reference to a fixed folder. + /// + [DataContract(Name = "ValueFolderReference")] + public partial class ValueFolderReference : ValueFileReference, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected ValueFolderReference() + { + // Set non-required readonly properties with defaultValue + this.Type = "ValueFolderReference"; + } + + /// + /// Initializes a new instance of the class. + /// + /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. + /// A fixed value for this reference. (required). + public ValueFolderReference + ( + string path, // Required parameters + Dictionary annotations= default // Optional parameters + ) : base(annotations: annotations, path: path)// BaseClass + { + + // Set non-required readonly properties with defaultValue + this.Type = "ValueFolderReference"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "ValueFolderReference"; + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + return "ValueFolderReference"; + } + + /// + /// 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("ValueFolderReference:\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Annotations: ").Append(Annotations).Append("\n"); + sb.Append(" Path: ").Append(Path).Append("\n"); + return sb.ToString(); + } + + /// + /// Returns the object from JSON string + /// + /// ValueFolderReference object + public static ValueFolderReference 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. + /// + /// ValueFolderReference object + public virtual ValueFolderReference DuplicateValueFolderReference() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateValueFolderReference(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override ValueFileReference DuplicateValueFileReference() + { + return DuplicateValueFolderReference(); + } + + /// + /// 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 ValueFolderReference); + } + + /// + /// Returns true if ValueFolderReference instances are equal + /// + /// Instance of ValueFolderReference to be compared + /// Boolean + public bool Equals(ValueFolderReference 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(@"^ValueFolderReference$", 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/ValueListReference.cs b/src/PollinationSDK/Model/ValueListReference.cs new file mode 100644 index 000000000..1e6ede95f --- /dev/null +++ b/src/PollinationSDK/Model/ValueListReference.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 +{ + /// + /// A reference to a fixed value. + /// + [DataContract(Name = "ValueListReference")] + public partial class ValueListReference : BaseReference, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected ValueListReference() + { + // Set non-required readonly properties with defaultValue + this.Type = "ValueListReference"; + } + + /// + /// Initializes a new instance of the class. + /// + /// A fixed value for this reference. (required). + /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. + public ValueListReference + ( + List value, // Required parameters + Dictionary annotations= default // Optional parameters + ) : base(annotations: annotations)// BaseClass + { + // to ensure "value" is required (not null) + this.Value = value ?? throw new ArgumentNullException("value is a required property for ValueListReference and cannot be null"); + + // Set non-required readonly properties with defaultValue + this.Type = "ValueListReference"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "ValueListReference"; + + /// + /// A fixed value for this reference. + /// + /// A fixed value for this reference. + [DataMember(Name = "value", IsRequired = true, EmitDefaultValue = false)] + public List Value { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + return "ValueListReference"; + } + + /// + /// 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("ValueListReference:\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Annotations: ").Append(Annotations).Append("\n"); + sb.Append(" Value: ").Append(Value).Append("\n"); + return sb.ToString(); + } + + /// + /// Returns the object from JSON string + /// + /// ValueListReference object + public static ValueListReference 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. + /// + /// ValueListReference object + public virtual ValueListReference DuplicateValueListReference() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateValueListReference(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override BaseReference DuplicateBaseReference() + { + return DuplicateValueListReference(); + } + + /// + /// 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 ValueListReference); + } + + /// + /// Returns true if ValueListReference instances are equal + /// + /// Instance of ValueListReference to be compared + /// Boolean + public bool Equals(ValueListReference input) + { + if (input == null) + return false; + return base.Equals(input) && + ( + this.Value == input.Value || + this.Value != null && + input.Value != null && + this.Value.SequenceEqual(input.Value) + ) && 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.Value != null) + hashCode = hashCode * 59 + this.Value.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(@"^ValueListReference$", 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/ValueReference.cs b/src/PollinationSDK/Model/ValueReference.cs new file mode 100644 index 000000000..7d315b8dd --- /dev/null +++ b/src/PollinationSDK/Model/ValueReference.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 +{ + /// + /// A reference to a fixed value. + /// + [DataContract(Name = "ValueReference")] + public partial class ValueReference : BaseReference, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected ValueReference() + { + // Set non-required readonly properties with defaultValue + this.Type = "ValueReference"; + } + + /// + /// Initializes a new instance of the class. + /// + /// A fixed value for this reference. (required). + /// An optional dictionary to add annotations to inputs. These annotations will be used by the client side libraries.. + public ValueReference + ( + object value, // Required parameters + Dictionary annotations= default // Optional parameters + ) : base(annotations: annotations)// BaseClass + { + // to ensure "value" is required (not null) + this.Value = value ?? throw new ArgumentNullException("value is a required property for ValueReference and cannot be null"); + + // Set non-required readonly properties with defaultValue + this.Type = "ValueReference"; + } + + //============================================== is ReadOnly + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; protected internal set; } = "ValueReference"; + + /// + /// A fixed value for this reference. + /// + /// A fixed value for this reference. + [DataMember(Name = "value", IsRequired = true, EmitDefaultValue = true)] + public object Value { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + return "ValueReference"; + } + + /// + /// 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("ValueReference:\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Annotations: ").Append(Annotations).Append("\n"); + sb.Append(" Value: ").Append(Value).Append("\n"); + return sb.ToString(); + } + + /// + /// Returns the object from JSON string + /// + /// ValueReference object + public static ValueReference 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. + /// + /// ValueReference object + public virtual ValueReference DuplicateValueReference() + { + return FromJson(this.ToJson()); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override OpenAPIGenBaseModel Duplicate() + { + return DuplicateValueReference(); + } + + /// + /// Creates a new instance with the same properties. + /// + /// OpenAPIGenBaseModel + public override BaseReference DuplicateBaseReference() + { + return DuplicateValueReference(); + } + + /// + /// 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 ValueReference); + } + + /// + /// Returns true if ValueReference instances are equal + /// + /// Instance of ValueReference to be compared + /// Boolean + public bool Equals(ValueReference input) + { + if (input == null) + return false; + return base.Equals(input) && + ( + this.Value == input.Value || + (this.Value != null && + this.Value.Equals(input.Value)) + ) && 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.Value != null) + hashCode = hashCode * 59 + this.Value.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(@"^ValueReference$", 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/PollinationSDK.csproj b/src/PollinationSDK/PollinationSDK.csproj index b79233bd6..8fde16c3b 100644 --- a/src/PollinationSDK/PollinationSDK.csproj +++ b/src/PollinationSDK/PollinationSDK.csproj @@ -3,14 +3,14 @@ netstandard2.0;net452 true - 0.22.0.0 + 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.22.0.0 - 0.22.0.0 + 0.23.0.0 + 0.23.0.0 https://github.com/pollination/csharp-sdk true From a37ec15769435ba2ca7c26e13be3eeea3d96e1b4 Mon Sep 17 00:00:00 2001 From: Antoine Dao Date: Mon, 10 Jan 2022 17:24:52 +0000 Subject: [PATCH 7/7] chore(dev): add python debugger to devcontainer --- .devcontainer/devcontainer.json | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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: