{
  "swagger": "2.0",
  "info": {
    "title": "TiDB Cloud TCPN Open API",
    "description": "TiDB Cloud TCPN Open API.",
    "version": "v1beta1"
  },
  "tags": [
    {
      "name": "ApiKeyService"
    },
    {
      "name": "OrgService"
    },
    {
      "name": "UserService"
    },
    {
      "name": "InvitationService"
    },
    {
      "name": "PartnerService"
    },
    {
      "name": "FileUploadService"
    }
  ],
  "host": "tcpn.tidbapi.com",
  "schemes": [
    "https"
  ],
  "consumes": [
    "application/json"
  ],
  "produces": [
    "application/json"
  ],
  "paths": {
    "/v1beta1/apiKeys": {
      "get": {
        "summary": "List API keys",
        "operationId": "ApiKeyService_ListApiKeys",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/v1beta1ListApiKeysResponse"
            }
          },
          "400": {
            "description": "Bad Request",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          },
          "403": {
            "description": "Forbidden",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          },
          "404": {
            "description": "Not Found",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          },
          "429": {
            "description": "Too Many Requests",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          },
          "500": {
            "description": "Internal Server Error",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "pageSize",
            "description": "The maximum number of API keys to return.",
            "in": "query",
            "required": false,
            "type": "integer",
            "format": "int32"
          },
          {
            "name": "pageToken",
            "description": "A page token, received from a previous `ListApiKeys` call.",
            "in": "query",
            "required": false,
            "type": "string"
          },
          {
            "name": "skip",
            "description": "Allow the user to skip results.",
            "in": "query",
            "required": false,
            "type": "integer",
            "format": "int32"
          },
          {
            "name": "accessOrgId",
            "description": "Organization id",
            "in": "query",
            "required": true,
            "type": "string",
            "format": "uint64"
          }
        ],
        "tags": [
          "API Key"
        ]
      },
      "post": {
        "summary": "Create a new API key",
        "operationId": "ApiKeyService_CreateApiKey",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/v1beta1ApiKey"
            }
          },
          "400": {
            "description": "Bad Request",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          },
          "403": {
            "description": "Forbidden",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          },
          "404": {
            "description": "Not Found",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          },
          "429": {
            "description": "Too Many Requests",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          },
          "500": {
            "description": "Internal Server Error",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "apiKey",
            "description": "ApiKey resource",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/v1beta1ApiKey"
            }
          },
          {
            "name": "accessOrgId",
            "description": "Organization id",
            "in": "query",
            "required": true,
            "type": "string",
            "format": "uint64"
          }
        ],
        "tags": [
          "API Key"
        ]
      }
    },
    "/v1beta1/apiKeys/{accessKey}": {
      "delete": {
        "summary": "Delete an API key",
        "operationId": "ApiKeyService_DeleteApiKey",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "type": "object"
            }
          },
          "400": {
            "description": "Bad Request",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          },
          "403": {
            "description": "Forbidden",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          },
          "404": {
            "description": "Not Found",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          },
          "429": {
            "description": "Too Many Requests",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          },
          "500": {
            "description": "Internal Server Error",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "accessKey",
            "description": "Access Key of the API key.",
            "in": "path",
            "required": true,
            "type": "string"
          },
          {
            "name": "accessOrgId",
            "description": "Organization id",
            "in": "query",
            "required": true,
            "type": "string",
            "format": "uint64"
          }
        ],
        "tags": [
          "API Key"
        ]
      },
      "get": {
        "summary": "Get an API key",
        "operationId": "ApiKeyService_GetApiKey",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/v1beta1ApiKey"
            }
          },
          "400": {
            "description": "Bad Request",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          },
          "403": {
            "description": "Forbidden",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          },
          "404": {
            "description": "Not Found",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          },
          "429": {
            "description": "Too Many Requests",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          },
          "500": {
            "description": "Internal Server Error",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "accessKey",
            "description": "Access Key of the API key.",
            "in": "path",
            "required": true,
            "type": "string"
          },
          {
            "name": "accessOrgId",
            "description": "Organization id",
            "in": "query",
            "required": true,
            "type": "string",
            "format": "uint64"
          }
        ],
        "tags": [
          "API Key"
        ]
      }
    },
    "/v1beta1/org": {
      "get": {
        "summary": "Get a Org",
        "operationId": "OrgService_GetOrg",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/v1beta1Org"
            }
          },
          "400": {
            "description": "Bad Request",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          },
          "403": {
            "description": "Forbidden",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          },
          "404": {
            "description": "Not Found",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          },
          "429": {
            "description": "Too Many Requests",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          },
          "500": {
            "description": "Internal Server Error",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "accessOrgId",
            "description": "Organization id",
            "in": "query",
            "required": true,
            "type": "string",
            "format": "uint64"
          }
        ],
        "tags": [
          "Org"
        ]
      }
    },
    "/v1beta1/partners/customers": {
      "get": {
        "summary": "List Partner Customers",
        "operationId": "PartnerService_ListCustomers",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/v1beta1ListCustomersResponse"
            }
          },
          "400": {
            "description": "Bad Request",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          },
          "403": {
            "description": "Forbidden",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          },
          "404": {
            "description": "Not Found",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          },
          "429": {
            "description": "Too Many Requests",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          },
          "500": {
            "description": "Internal Server Error",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "accessOrgId",
            "description": "Organization id",
            "in": "query",
            "required": true,
            "type": "string",
            "format": "uint64"
          }
        ],
        "tags": [
          "Partner"
        ]
      }
    },
    "/v1beta1/partners/logo:upload": {
      "post": {
        "summary": "Upload Partner Logo",
        "operationId": "FileUploadService_UploadLogo",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/v1beta1UploadLogoResponse"
            }
          },
          "400": {
            "description": "Bad Request",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          },
          "403": {
            "description": "Forbidden",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          },
          "404": {
            "description": "Not Found",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          },
          "429": {
            "description": "Too Many Requests",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          },
          "500": {
            "description": "Internal Server Error",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/v1beta1UploadLogoRequest"
            }
          },
          {
            "name": "accessOrgId",
            "description": "Organization id",
            "in": "query",
            "required": true,
            "type": "string",
            "format": "uint64"
          }
        ],
        "tags": [
          "Partner"
        ]
      }
    },
    "/v1beta1/partners/msp/signupUrl": {
      "post": {
        "summary": "Create a Signup URL",
        "operationId": "PartnerService_CreateSignupUrl",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/v1beta1CreateSignupUrlResponse"
            }
          },
          "400": {
            "description": "Bad Request",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          },
          "403": {
            "description": "Forbidden",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          },
          "404": {
            "description": "Not Found",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          },
          "429": {
            "description": "Too Many Requests",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          },
          "500": {
            "description": "Internal Server Error",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "accessOrgId",
            "description": "Organization id",
            "in": "query",
            "required": true,
            "type": "string",
            "format": "uint64"
          }
        ],
        "tags": [
          "Partner"
        ]
      }
    },
    "/v1beta1/partners/orgs": {
      "get": {
        "summary": "List Partner Orgs",
        "operationId": "OrgService_ListPartnerOrgs",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/v1beta1ListPartnerOrgsResponse"
            }
          },
          "400": {
            "description": "Bad Request",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          },
          "403": {
            "description": "Forbidden",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          },
          "404": {
            "description": "Not Found",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          },
          "429": {
            "description": "Too Many Requests",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          },
          "500": {
            "description": "Internal Server Error",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "accessOrgId",
            "description": "Organization id",
            "in": "query",
            "required": true,
            "type": "string",
            "format": "uint64"
          }
        ],
        "tags": [
          "Org"
        ]
      }
    },
    "/v1beta1/partners/partnerProfile": {
      "get": {
        "summary": "Get Partner Profile",
        "operationId": "PartnerService_GetPartnerProfile",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/v1beta1PartnerProfile"
            }
          },
          "400": {
            "description": "Bad Request",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          },
          "403": {
            "description": "Forbidden",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          },
          "404": {
            "description": "Not Found",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          },
          "429": {
            "description": "Too Many Requests",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          },
          "500": {
            "description": "Internal Server Error",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "accessOrgId",
            "description": "Organization id",
            "in": "query",
            "required": true,
            "type": "string",
            "format": "uint64"
          }
        ],
        "tags": [
          "Partner"
        ]
      },
      "patch": {
        "summary": "Update Partner Profile",
        "operationId": "PartnerService_UpdatePartnerProfile",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/v1beta1PartnerProfile"
            }
          },
          "400": {
            "description": "Bad Request",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          },
          "403": {
            "description": "Forbidden",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          },
          "404": {
            "description": "Not Found",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          },
          "429": {
            "description": "Too Many Requests",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          },
          "500": {
            "description": "Internal Server Error",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "partnerProfile",
            "description": "The Profile of the Partner",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/v1beta1PartnerProfile"
            }
          },
          {
            "name": "accessOrgId",
            "description": "Organization id",
            "in": "query",
            "required": true,
            "type": "string",
            "format": "uint64"
          }
        ],
        "tags": [
          "Partner"
        ]
      }
    },
    "/v1beta1/projects/{projectId}/users/{userId}": {
      "delete": {
        "summary": "Remove User from Project",
        "operationId": "UserService_DeleteProjectUser",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "type": "object"
            }
          },
          "400": {
            "description": "Bad Request",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          },
          "403": {
            "description": "Forbidden",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          },
          "404": {
            "description": "Not Found",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          },
          "429": {
            "description": "Too Many Requests",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          },
          "500": {
            "description": "Internal Server Error",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "projectId",
            "description": "ID of the Project.",
            "in": "path",
            "required": true,
            "type": "string",
            "format": "uint64"
          },
          {
            "name": "userId",
            "description": "ID of the User.",
            "in": "path",
            "required": true,
            "type": "string",
            "format": "uint64"
          },
          {
            "name": "accessOrgId",
            "description": "Organization id",
            "in": "query",
            "required": true,
            "type": "string",
            "format": "uint64"
          }
        ],
        "tags": [
          "User"
        ]
      }
    },
    "/v1beta1/projects/{projectId}/users:invite": {
      "post": {
        "summary": "Create a Project Invitation",
        "operationId": "InvitationService_CreateProjectInvitation",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/v1beta1CreateInvitationResponse"
            }
          },
          "400": {
            "description": "Bad Request",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          },
          "403": {
            "description": "Forbidden",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          },
          "404": {
            "description": "Not Found",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          },
          "429": {
            "description": "Too Many Requests",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          },
          "500": {
            "description": "Internal Server Error",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "projectId",
            "description": "Project ID.",
            "in": "path",
            "required": true,
            "type": "string",
            "format": "uint64"
          },
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "type": "object",
              "properties": {
                "inviteesEmails": {
                  "items": {
                    "type": "string"
                  },
                  "required": [
                    "inviteesEmails"
                  ],
                  "title": "The Invitees Emails of Invitation",
                  "type": "array"
                },
                "role": {
                  "enum": [
                    "project:owner",
                    "project:dev",
                    "project:readonly"
                  ],
                  "required": [
                    "role"
                  ],
                  "title": "The Role of Invitation",
                  "type": "string"
                }
              }
            }
          },
          {
            "name": "accessOrgId",
            "description": "Organization id",
            "in": "query",
            "required": true,
            "type": "string",
            "format": "uint64"
          }
        ],
        "tags": [
          "Invitation"
        ]
      }
    },
    "/v1beta1/users": {
      "get": {
        "summary": "List Users",
        "operationId": "UserService_ListUsers",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/v1beta1ListUsersResponse"
            }
          },
          "400": {
            "description": "Bad Request",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          },
          "403": {
            "description": "Forbidden",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          },
          "404": {
            "description": "Not Found",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          },
          "429": {
            "description": "Too Many Requests",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          },
          "500": {
            "description": "Internal Server Error",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "pageSize",
            "description": "The maximum number of User to return.",
            "in": "query",
            "required": false,
            "type": "integer",
            "format": "int32"
          },
          {
            "name": "pageToken",
            "description": "A page token, received from a previous `ListApiKeys` call.",
            "in": "query",
            "required": false,
            "type": "string"
          },
          {
            "name": "projectId",
            "description": "The Project ID that User have active Project Role.",
            "in": "query",
            "required": false,
            "type": "string",
            "format": "int64"
          },
          {
            "name": "email",
            "description": "The Email of User.",
            "in": "query",
            "required": false,
            "type": "string"
          },
          {
            "name": "skip",
            "description": "Allow the user to skip results.",
            "in": "query",
            "required": false,
            "type": "integer",
            "format": "int32"
          },
          {
            "name": "accessOrgId",
            "description": "Organization id",
            "in": "query",
            "required": true,
            "type": "string",
            "format": "uint64"
          }
        ],
        "tags": [
          "User"
        ]
      }
    },
    "/v1beta1/users/me": {
      "get": {
        "summary": "Get Current User from Token",
        "operationId": "UserService_GetCurrentUser",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/v1beta1User"
            }
          },
          "400": {
            "description": "Bad Request",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          },
          "403": {
            "description": "Forbidden",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          },
          "404": {
            "description": "Not Found",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          },
          "429": {
            "description": "Too Many Requests",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          },
          "500": {
            "description": "Internal Server Error",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "accessOrgId",
            "description": "Organization id",
            "in": "query",
            "required": true,
            "type": "string",
            "format": "uint64"
          }
        ],
        "tags": [
          "User"
        ]
      },
      "patch": {
        "summary": "Update User Profile",
        "operationId": "UserService_UpdateCurrentUser",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/v1beta1User"
            }
          },
          "400": {
            "description": "Bad Request",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          },
          "403": {
            "description": "Forbidden",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          },
          "404": {
            "description": "Not Found",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          },
          "429": {
            "description": "Too Many Requests",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          },
          "500": {
            "description": "Internal Server Error",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "user",
            "description": "User resource",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/v1beta1User"
            }
          },
          {
            "name": "accessOrgId",
            "description": "Organization id",
            "in": "query",
            "required": true,
            "type": "string",
            "format": "uint64"
          }
        ],
        "tags": [
          "User"
        ]
      }
    },
    "/v1beta1/users/{userId}": {
      "delete": {
        "summary": "Remove User from Org",
        "operationId": "UserService_DeleteOrgUser",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "type": "object"
            }
          },
          "400": {
            "description": "Bad Request",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          },
          "403": {
            "description": "Forbidden",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          },
          "404": {
            "description": "Not Found",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          },
          "429": {
            "description": "Too Many Requests",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          },
          "500": {
            "description": "Internal Server Error",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "userId",
            "description": "ID of the User.",
            "in": "path",
            "required": true,
            "type": "string",
            "format": "uint64"
          },
          {
            "name": "accessOrgId",
            "description": "Organization id",
            "in": "query",
            "required": true,
            "type": "string",
            "format": "uint64"
          }
        ],
        "tags": [
          "User"
        ]
      }
    },
    "/v1beta1/users:invite": {
      "post": {
        "summary": "Create an Org Invitation",
        "operationId": "InvitationService_CreateOrgInvitation",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/v1beta1CreateInvitationResponse"
            }
          },
          "400": {
            "description": "Bad Request",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          },
          "403": {
            "description": "Forbidden",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          },
          "404": {
            "description": "Not Found",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          },
          "429": {
            "description": "Too Many Requests",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          },
          "500": {
            "description": "Internal Server Error",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/v1beta1CreateOrgInvitationRequest"
            }
          },
          {
            "name": "accessOrgId",
            "description": "Organization id",
            "in": "query",
            "required": true,
            "type": "string",
            "format": "uint64"
          }
        ],
        "tags": [
          "Invitation"
        ]
      }
    }
  },
  "definitions": {
    "InvitationResult": {
      "default": "RESULT_UNSPECIFIED",
      "description": "- RESULT_UNSPECIFIED: Unspecified. Do not use\n - RESULT_SUCCESS: Success\n - RESULT_FAIL: Fail",
      "enum": [
        "RESULT_UNSPECIFIED",
        "RESULT_SUCCESS",
        "RESULT_FAIL"
      ],
      "title": "Result for Invitation",
      "type": "string"
    },
    "protobufAny": {
      "additionalProperties": {},
      "properties": {
        "@type": {
          "type": "string"
        }
      },
      "type": "object"
    },
    "rpcStatus": {
      "properties": {
        "code": {
          "format": "int32",
          "type": "integer"
        },
        "details": {
          "items": {
            "$ref": "#/definitions/protobufAny"
          },
          "type": "array"
        },
        "message": {
          "type": "string"
        }
      },
      "type": "object"
    },
    "v1beta1Advertising": {
      "properties": {
        "body": {
          "required": [
            "body"
          ],
          "title": "Body of Advertising",
          "type": "string"
        },
        "heading": {
          "required": [
            "heading"
          ],
          "title": "Heading of Advertising",
          "type": "string"
        },
        "index": {
          "required": [
            "index"
          ],
          "title": "Index of Advertising",
          "type": "string"
        }
      },
      "required": [
        "index",
        "heading",
        "body"
      ],
      "title": "Advertising of Partner",
      "type": "object"
    },
    "v1beta1ApiKey": {
      "properties": {
        "accessKey": {
          "readOnly": true,
          "title": "Access key of API key",
          "type": "string"
        },
        "createTime": {
          "readOnly": true,
          "title": "Create time of API Key",
          "type": "string"
        },
        "creator": {
          "readOnly": true,
          "title": "Creator of API Key",
          "type": "string"
        },
        "displayName": {
          "required": [
            "displayName"
          ],
          "title": "Description of API key",
          "type": "string"
        },
        "name": {
          "description": "The name of API key, format: orgs/{org_id}/apikeys/{api_key}",
          "readOnly": true,
          "title": "The name of API key",
          "type": "string"
        },
        "role": {
          "enum": [
            "api:org:owner"
          ],
          "required": [
            "role"
          ],
          "title": "Role of API key",
          "type": "string"
        },
        "secretKey": {
          "description": "Secret key of API key, only fully displayed when initially created.",
          "readOnly": true,
          "title": "Secret key of API key",
          "type": "string"
        },
        "updateTime": {
          "readOnly": true,
          "title": "Update time of API Key",
          "type": "string"
        }
      },
      "required": [
        "displayName",
        "role"
      ],
      "title": "An API key",
      "type": "object"
    },
    "v1beta1CreateInvitationResponse": {
      "properties": {
        "invitations": {
          "items": {
            "$ref": "#/definitions/v1beta1Invitation"
          },
          "readOnly": true,
          "title": "The Invitation Result",
          "type": "array"
        }
      },
      "title": "Response for CreateOrgInvitation CreateProjectInvitation",
      "type": "object"
    },
    "v1beta1CreateOrgInvitationRequest": {
      "properties": {
        "inviteesEmails": {
          "items": {
            "type": "string"
          },
          "required": [
            "inviteesEmails"
          ],
          "title": "The Invitees Emails of Invitation.",
          "type": "array"
        },
        "role": {
          "enum": [
            "partner:admin",
            "org:owner",
            "org:member",
            "org:audit_admin",
            "org:billing_admin"
          ],
          "required": [
            "role"
          ],
          "title": "The Role of Invitation",
          "type": "string"
        }
      },
      "required": [
        "inviteesEmails",
        "role"
      ],
      "title": "(-- api-linter: core::0133::request-resource-field=disabled\n    aip.dev/not-precedent: We need to do this because reasons. --)\n(-- api-linter: core::0133::request-parent-required=disabled\n    aip.dev/not-precedent: We need to do this because reasons. --)\n(-- api-linter: core::0133::request-id-field=disabled\n    aip.dev/not-precedent: We need to do this because reasons. --)\nRequest for CreateOrgInvitation",
      "type": "object"
    },
    "v1beta1CreateSignupUrlResponse": {
      "properties": {
        "customerSignupUrl": {
          "readOnly": true,
          "title": "The Signup URL for Partner Customer",
          "type": "string"
        },
        "expiredTime": {
          "readOnly": true,
          "title": "The Expired Time for Signup URL",
          "type": "string"
        }
      },
      "title": "(-- api-linter: core::0142::time-field-type=disabled\n    aip.dev/not-precedent: We need to do this because reasons. --)\n(-- api-linter: core::0140::uri=disabled\n    aip.dev/not-precedent: We need to do this because reasons. --)\nResponse for CreateSignupUrl",
      "type": "object"
    },
    "v1beta1Customer": {
      "properties": {
        "effectedTime": {
          "readOnly": true,
          "title": "The EffectedTime of Customer",
          "type": "string"
        },
        "email": {
          "readOnly": true,
          "title": "The Email of Customer",
          "type": "string"
        },
        "expiredTime": {
          "readOnly": true,
          "title": "The ExpiredTime of Customer",
          "type": "string"
        },
        "orgId": {
          "readOnly": true,
          "title": "The Org ID of Customer",
          "type": "string"
        },
        "orgName": {
          "readOnly": true,
          "title": "The OrgName of Customer",
          "type": "string"
        },
        "state": {
          "readOnly": true,
          "title": "The State of Customer",
          "type": "string"
        }
      },
      "title": "A Partner Customer",
      "type": "object"
    },
    "v1beta1Invitation": {
      "properties": {
        "inviteesEmail": {
          "readOnly": true,
          "title": "The Invitees Email of Invitation",
          "type": "string"
        },
        "message": {
          "readOnly": true,
          "title": "The tip message of Invitation result",
          "type": "string"
        },
        "orgId": {
          "readOnly": true,
          "title": "The Org ID of Invitation",
          "type": "string"
        },
        "projectId": {
          "readOnly": true,
          "title": "The Project ID of Invitation",
          "type": "string"
        },
        "result": {
          "$ref": "#/definitions/InvitationResult",
          "title": "The Result of Invitation"
        },
        "role": {
          "readOnly": true,
          "title": "The Role of Invitation",
          "type": "string"
        }
      },
      "title": "An Invitation",
      "type": "object"
    },
    "v1beta1ListApiKeysResponse": {
      "properties": {
        "apiKeys": {
          "description": "The list of matching API keys.",
          "items": {
            "$ref": "#/definitions/v1beta1ApiKey"
          },
          "type": "array"
        },
        "nextPageToken": {
          "description": "nextPageToken can be sent in a subsequent call to fetch more results",
          "title": "The page token for the next `ListApiKeys` call",
          "type": "string"
        },
        "totalSize": {
          "description": "The total size of matching API keys.",
          "format": "int32",
          "type": "integer"
        }
      },
      "title": "Response for ListApiKeys",
      "type": "object"
    },
    "v1beta1ListCustomersResponse": {
      "properties": {
        "customers": {
          "items": {
            "$ref": "#/definitions/v1beta1Customer"
          },
          "readOnly": true,
          "title": "The Customers in the Partner",
          "type": "array"
        }
      },
      "title": "(-- api-linter: core::0158::response-next-page-token-field=disabled\n    aip.dev/not-precedent: We need to do this because reasons. --)\nResponse for ListCustomers",
      "type": "object"
    },
    "v1beta1ListPartnerOrgsResponse": {
      "properties": {
        "orgs": {
          "description": "The list of matching Orgs.",
          "items": {
            "$ref": "#/definitions/v1beta1Org"
          },
          "type": "array"
        },
        "totalSize": {
          "description": "The total size of matching Orgs.",
          "format": "int32",
          "type": "integer"
        }
      },
      "title": "(-- api-linter: core::0158::response-next-page-token-field=disabled\n    aip.dev/not-precedent: We need to do this because reasons. --)\nResponse for ListPartnerOrgs",
      "type": "object"
    },
    "v1beta1ListUsersResponse": {
      "properties": {
        "nextPageToken": {
          "description": "nextPageToken can be sent in a subsequent call to fetch more results",
          "title": "nextPageToken",
          "type": "string"
        },
        "totalSize": {
          "description": "The total size of matching Users.",
          "format": "int32",
          "type": "integer"
        },
        "users": {
          "description": "The list of matching Users.",
          "items": {
            "$ref": "#/definitions/v1beta1User"
          },
          "type": "array"
        }
      },
      "title": "Response for ListUsers",
      "type": "object"
    },
    "v1beta1Org": {
      "properties": {
        "createTime": {
          "readOnly": true,
          "title": "The Create Time of Org",
          "type": "string"
        },
        "email": {
          "readOnly": true,
          "title": "The Email of Org",
          "type": "string"
        },
        "emailDomain": {
          "readOnly": true,
          "title": "The Email Domain of Org Creator",
          "type": "string"
        },
        "orgId": {
          "readOnly": true,
          "title": "The ID of Org",
          "type": "string"
        },
        "orgName": {
          "readOnly": true,
          "title": "The Name of Org",
          "type": "string"
        },
        "orgTag": {
          "readOnly": true,
          "title": "The Tag of Org",
          "type": "string"
        }
      },
      "title": "A Org",
      "type": "object"
    },
    "v1beta1PartnerProfile": {
      "properties": {
        "advertising": {
          "items": {
            "$ref": "#/definitions/v1beta1Advertising"
          },
          "required": [
            "advertising"
          ],
          "title": "The Advertising of the Partner",
          "type": "array"
        },
        "darkLogo": {
          "required": [
            "darkLogo"
          ],
          "title": "The Dark Logo of the Partner",
          "type": "string"
        },
        "lightLogo": {
          "required": [
            "lightLogo"
          ],
          "title": "The Light Logo of the Partner",
          "type": "string"
        },
        "orgId": {
          "readOnly": true,
          "title": "The Org ID of the Partner",
          "type": "string"
        }
      },
      "required": [
        "lightLogo",
        "advertising",
        "darkLogo"
      ],
      "title": "Partner Profile",
      "type": "object"
    },
    "v1beta1UploadLogoRequest": {
      "properties": {
        "content": {
          "format": "byte",
          "required": [
            "content"
          ],
          "title": "The Content of Upload file",
          "type": "string"
        },
        "fileName": {
          "required": [
            "fileName"
          ],
          "title": "The File Name of Upload file",
          "type": "string"
        },
        "headers": {
          "additionalProperties": {
            "type": "string"
          },
          "required": [
            "headers"
          ],
          "title": "The Header of Upload file",
          "type": "object"
        }
      },
      "required": [
        "fileName",
        "content",
        "headers"
      ],
      "title": "(-- api-linter: core::0122::name-suffix=disabled\n    aip.dev/not-precedent: We need to do this because reasons. --)\nRequest for UploadLogo",
      "type": "object"
    },
    "v1beta1UploadLogoResponse": {
      "properties": {
        "logoName": {
          "title": "The Logo Name of Uploaded file",
          "type": "string"
        },
        "logoUrl": {
          "title": "The Logo Url of Uploaded file",
          "type": "string"
        }
      },
      "title": "(-- api-linter: core::0140::uri=disabled\n    aip.dev/not-precedent: We need to do this because reasons. --)\n(-- api-linter: core::0122::name-suffix=disabled\n    aip.dev/not-precedent: We need to do this because reasons. --)\nResponse for UploadLogo",
      "type": "object"
    },
    "v1beta1User": {
      "properties": {
        "email": {
          "readOnly": true,
          "title": "The Email of User",
          "type": "string"
        },
        "firstName": {
          "required": [
            "firstName"
          ],
          "title": "The First Name of User",
          "type": "string"
        },
        "inviteTime": {
          "readOnly": true,
          "title": "The Invite Time of User in Resource",
          "type": "string"
        },
        "lastLoginTime": {
          "readOnly": true,
          "title": "The Last Login Time of User in Resource",
          "type": "string"
        },
        "lastName": {
          "required": [
            "lastName"
          ],
          "title": "The Last Name of User",
          "type": "string"
        },
        "name": {
          "readOnly": true,
          "title": "The Name of User, format: users/{user_id}.",
          "type": "string"
        },
        "roleBindingRole": {
          "readOnly": true,
          "title": "The Role of User in Resource",
          "type": "string"
        },
        "roleBindingStatus": {
          "readOnly": true,
          "title": "The Status of User in Resource",
          "type": "string"
        },
        "userId": {
          "readOnly": true,
          "title": "The ID of User",
          "type": "string"
        }
      },
      "required": [
        "firstName",
        "lastName"
      ],
      "title": "A User",
      "type": "object"
    }
  }
}