Skip to content

Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.

feat: added openapi clietn

=f42cc9cad9ff
diff --git a/backend/src/ee/routes/v1/license-router.ts b/backend/src/ee/routes/v1/license-router.ts
index c7335cf783..1e6222f24b 100644
--- a/backend/src/ee/routes/v1/license-router.ts
+++ b/backend/src/ee/routes/v1/license-router.ts
@@ -18,6 +18,7 @@ export const registerLicenseRouter = async (server: FastifyZodProvider) => {
rateLimit: readLimit
},
schema: {
+ operationId: "getOrganizationPlan",
params: z.object({ organizationId: z.string().trim() }),
querystring: z.object({
refreshCache: z
diff --git a/backend/src/lib/config/env.ts b/backend/src/lib/config/env.ts
index cbdf41e139..51457c0d2a 100644
--- a/backend/src/lib/config/env.ts
+++ b/backend/src/lib/config/env.ts
@@ -316,6 +316,8 @@ const envSchema = z
ROTATION_DEVELOPMENT_MODE: zodStrBool.default("false").optional(),
DAILY_RESOURCE_CLEAN_UP_DEVELOPMENT_MODE: zodStrBool.default("false").optional(),
BDD_NOCK_API_ENABLED: zodStrBool.default("false").optional(),
+
+ OPENAPI_FULL_SPEC: zodStrBool.default("false").optional(),
ACME_DEVELOPMENT_MODE: zodStrBool.default("false").optional(),
ACME_SKIP_UPSTREAM_VALIDATION: zodStrBool.default("false").optional(),
ACME_DEVELOPMENT_HTTP01_CHALLENGE_HOST_OVERRIDES: zpStr(
@@ -740,6 +742,7 @@ const envSchema = z
isSecretScanningRunModeEnabled: data.INFISICAL_RUN_MODES.includes(RunMode.SecretScanning),
isRedisSentinelMode: Boolean(data.REDIS_SENTINEL_HOSTS),
isBddNockApiEnabled: data.NODE_ENV !== "production" && data.BDD_NOCK_API_ENABLED,
+ isOpenApiFullSpec: data.NODE_ENV !== "production" && data.OPENAPI_FULL_SPEC,
REDIS_SENTINEL_HOSTS: data.REDIS_SENTINEL_HOSTS?.trim()
?.split(",")
.map((el) => {
diff --git a/backend/src/server/plugins/fastify-zod.ts b/backend/src/server/plugins/fastify-zod.ts
index ea3f80f089..c2c25bbc1f 100644
--- a/backend/src/server/plugins/fastify-zod.ts
+++ b/backend/src/server/plugins/fastify-zod.ts
@@ -51,11 +51,19 @@ const zodToJsonSchemaOptions = {
} as const;
/**
- * Recursively removes properties marked with "x-hidden": true from the JSON schema.
- * This allows fields to be hidden from OpenAPI docs while still being validated.
- * Usage: .describe(JSON.stringify({ "x-hidden": true }))
+ * Normalizes a JSON schema for OpenAPI output.
+ *
+ * Two jobs. It removes properties marked with "x-hidden": true, so a field can be
+ * hidden from the docs while still being validated
+ * (usage: .describe(JSON.stringify({ "x-hidden": true }))). And it flattens JSON
+ * Schema tuple form, which zod-to-json-schema emits for z.tuple() even under its
+ * openApi3 target: OpenAPI 3.0 has no tuple type and requires `items` to be a single
+ * schema, so a spec containing one fails to parse in any standard OpenAPI parser.
+ *
+ * keepHidden suppresses only the first job. The tuple flattening is unconditional,
+ * because it is about producing valid OpenAPI rather than about hiding anything.
*/
-const removeHiddenProperties = (schema: FreeformRecord): FreeformRecord => {
+const removeHiddenProperties = (schema: FreeformRecord, keepHidden = false): FreeformRecord => {
if (!schema || typeof schema !== "object") {
return schema;
}
@@ -68,10 +76,10 @@ const removeHiddenProperties = (schema: FreeformRecord): FreeformRecord => {
for (const key of Object.keys(result.properties)) {
const prop = result.properties[key];
- if (prop?.["x-hidden"]) {
+ if (!keepHidden && prop?.["x-hidden"]) {
hiddenKeys.push(key);
} else {
- filteredProperties[key] = removeHiddenProperties(prop);
+ filteredProperties[key] = removeHiddenProperties(prop, keepHidden);
}
}
@@ -86,28 +94,28 @@ const removeHiddenProperties = (schema: FreeformRecord): FreeformRecord => {
}
if (Array.isArray(result.items)) {
- const variants = (result.items as FreeformRecord[]).map((v) => removeHiddenProperties(v));
+ const variants = (result.items as FreeformRecord[]).map((v) => removeHiddenProperties(v, keepHidden));
if (result.additionalItems && typeof result.additionalItems === "object") {
- const rest = removeHiddenProperties(result.additionalItems);
+ const rest = removeHiddenProperties(result.additionalItems, keepHidden);
if (Object.keys(rest).length > 0) variants.push(rest);
}
delete result.additionalItems;
const unique = variants.filter((v, i, arr) => arr.findIndex((x) => JSON.stringify(x) === JSON.stringify(v)) === i);
result.items = unique.length === 1 ? unique[0] : { oneOf: unique };
} else if (result.items) {
- result.items = removeHiddenProperties(result.items);
+ result.items = removeHiddenProperties(result.items, keepHidden);
}
if (result.allOf && Array.isArray(result.allOf)) {
- result.allOf = result.allOf.map(removeHiddenProperties);
+ result.allOf = result.allOf.map((v: FreeformRecord) => removeHiddenProperties(v, keepHidden));
}
if (result.oneOf && Array.isArray(result.oneOf)) {
- result.oneOf = result.oneOf.map(removeHiddenProperties);
+ result.oneOf = result.oneOf.map((v: FreeformRecord) => removeHiddenProperties(v, keepHidden));
}
if (result.anyOf && Array.isArray(result.anyOf)) {
- result.anyOf = result.anyOf.map(removeHiddenProperties);
+ result.anyOf = result.anyOf.map((v: FreeformRecord) => removeHiddenProperties(v, keepHidden));
}
return result;
@@ -172,7 +180,7 @@ function resolveSchema(maybeSchema: ZodAny | { properties: ZodAny }): Pick<ZodAn
throw new Error(`Invalid schema passed: ${JSON.stringify(maybeSchema)}`);
}
-export const createJsonSchemaTransform = ({ skipList }: { skipList: readonly string[] }) => {
+export const createJsonSchemaTransform = ({ skipList, full = false }: { skipList: readonly string[]; full?: boolean }) => {
return ({ schema = {}, url }: { schema: Schema; url: string }) => {
if (!schema) {
return {
@@ -181,14 +189,17 @@ export const createJsonSchemaTransform = ({ skipList }: { skipList: readonly str
};
}
+ // Routes are hidden by default, so the published spec only carries what a route
+ // explicitly opted into. `full` lifts every suppression below, which is what lets
+ // a client be generated for the complete surface outside production.
if (typeof schema.hide === "undefined") {
- schema.hide = true;
+ schema.hide = !full;
}
const { response, headers, querystring, body, params, hide, ...rest } = schema;
const transformed: FreeformRecord = {};
- if (skipList.includes(url) || hide) {
+ if (!full && (skipList.includes(url) || hide)) {
transformed.hide = true;
return { schema: transformed, url };
}
@@ -198,13 +209,13 @@ export const createJsonSchemaTransform = ({ skipList }: { skipList: readonly str
for (const prop in zodSchemas) {
const zodSchema = zodSchemas[prop];
if (zodSchema) {
- transformed[prop] = removeHiddenProperties(zodToJsonSchema(zodSchema, zodToJsonSchemaOptions));
+ transformed[prop] = removeHiddenProperties(zodToJsonSchema(zodSchema, zodToJsonSchemaOptions), full);
}
}
if (response) {
transformed.response = {};
- const stripProjectId = isCertManagerUrl(url);
+ const stripProjectId = !full && isCertManagerUrl(url);
// eslint-disable-next-line @typescript-eslint/no-explicit-any
for (const prop in response as any) {
@@ -216,7 +227,8 @@ export const createJsonSchemaTransform = ({ skipList }: { skipList: readonly str
// eslint-disable-next-line @typescript-eslint/no-explicit-any
schema as any,
zodToJsonSchemaOptions
- )
+ ),
+ full
);
if (stripProjectId) {
transformedResponse = stripPropertyDeep(transformedResponse, "projectId");
@@ -240,6 +252,11 @@ export const jsonSchemaTransform = createJsonSchemaTransform({
skipList: defaultSkipList
});
+export const fullJsonSchemaTransform = createJsonSchemaTransform({
+ skipList: defaultSkipList,
+ full: true
+});
+
export const validatorCompiler: FastifySchemaCompiler<ZodAny> =
({ schema }) =>
// eslint-disable-next-line @typescript-eslint/no-explicit-any
diff --git a/backend/src/server/plugins/swagger.ts b/backend/src/server/plugins/swagger.ts
index b35999ff41..a7352bfe98 100644
--- a/backend/src/server/plugins/swagger.ts
+++ b/backend/src/server/plugins/swagger.ts
@@ -10,7 +10,9 @@ import { z } from "zod";
import { ApiDocsTags } from "@app/lib/api-docs";
-import { jsonSchemaTransform } from "./fastify-zod";
+import { getConfig } from "@app/lib/config/env";
+
+import { fullJsonSchemaTransform, jsonSchemaTransform } from "./fastify-zod";
const DOCS_ROUTE_PREFIX = "/api/docs";
const SPEC_CACHE_MAX_AGE_SECONDS = 600;
@@ -141,7 +143,7 @@ const pickSpecEncoding = (header: FastifyRequest["headers"]["accept-encoding"]):
export const fastifySwagger = fp(async (fastify) => {
await fastify.register(swagger, {
- transform: jsonSchemaTransform,
+ transform: getConfig().isOpenApiFullSpec ? fullJsonSchemaTransform : jsonSchemaTransform,
openapi: {
info: {
title: "Infisical API",
diff --git a/backend/src/server/routes/index.ts b/backend/src/server/routes/index.ts
index 919a560901..9ad57330a0 100644
--- a/backend/src/server/routes/index.ts
+++ b/backend/src/server/routes/index.ts
@@ -4625,11 +4625,7 @@ export const registerRoutes = async (
rateLimit: readLimit
},
schema: {
- hide: false,
- operationId: "getInstanceStatus",
- tags: [ApiDocsTags.Instance],
- description:
- "Get the status of the Infisical instance and the features configured on it. Public and unauthenticated; used by liveness and readiness probes and exempt from the API-wide rate limit.",
+ operationId: "getServerStatus",
response: {
200: z.object({
date: z.date(),
diff --git a/backend/src/server/routes/v1/admin-router.ts b/backend/src/server/routes/v1/admin-router.ts
index a437b82f3b..dcdc5ef77b 100644
--- a/backend/src/server/routes/v1/admin-router.ts
+++ b/backend/src/server/routes/v1/admin-router.ts
@@ -986,6 +986,7 @@ export const registerAdminRouter = async (server: FastifyZodProvider) => {
},
schema: {
hide: false,
+ operationId: "adminBootstrap",
body: z.object({
email: z.string().email().trim().min(1),
password: z.string().trim().min(1),
diff --git a/docker-compose.dev.yml b/docker-compose.dev.yml
index 26867a7af2..7911012165 100644
--- a/docker-compose.dev.yml
+++ b/docker-compose.dev.yml
@@ -103,6 +103,7 @@ services:
- NODE_ENV=development
- DB_CONNECTION_URI=postgres://infisical:infisical@db/infisical?sslmode=disable
- TELEMETRY_ENABLED=false
+ - OPENAPI_FULL_SPEC=true
# Dev-only: lets the backend accept PingFederate's self-signed cert when testing
# OIDC locally via `make up-dev-pingfed`. NEVER set this in production.
# - NODE_TLS_REJECT_UNAUTHORIZED=0
diff --git a/tests/Makefile b/tests/Makefile
index 29fe2ff1d8..c32b54730b 100644
--- a/tests/Makefile
+++ b/tests/Makefile
@@ -3,7 +3,7 @@
# the toolchain's own.
GOFMT := $(shell go env GOROOT)/bin/gofmt
-.PHONY: fmt lint test test-unit test-docker down status
+.PHONY: fmt lint test test-unit test-docker down status generate-client
fmt:
$(GOFMT) -w .
@@ -12,6 +12,7 @@ lint:
@out="$$($(GOFMT) -l .)"; \
if [ -n "$$out" ]; then echo "gofmt needed:"; echo "$$out"; exit 1; fi
go vet ./...
+ go tool staticcheck ./harness/... ./infra/... ./internal/...
# Unit tests only: no Docker, no containers, runs in under a second.
test-unit:
@@ -28,3 +29,13 @@ down:
status:
go run ./cmd/inf status
+
+# Generate the API client from a running Infisical. Bring one up first (`make up-dev`
+# from the repo root); it must have OPENAPI_FULL_SPEC set, which docker-compose.dev.yml
+# does, or half the routes are missing from the spec and no test can reach them.
+#
+# oapi-codegen reads the URL directly, so there is no spec snapshot to keep in sync.
+INFISICAL_OPENAPI_URL ?= http://localhost:8080
+
+generate-client:
+ go tool oapi-codegen -config clients/api/oapi-codegen.yaml $(INFISICAL_OPENAPI_URL)/api/docs/json
diff --git a/tests/clients/api/api.gen.go b/tests/clients/api/api.gen.go
new file mode 100644
index 0000000000..3e9f44c7f9
--- /dev/null
+++ b/tests/clients/api/api.gen.go
@@ -0,0 +1,5565 @@
+// Package api provides primitives to interact with the openapi HTTP API.
+//
+// Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.8.0 DO NOT EDIT.
+package api
+
+import (
+ "bytes"
+ "context"
+ "encoding/json"
+ "fmt"
+ "io"
+ "net/http"
+ "net/url"
+ "strings"
+ "time"
+
+ "github.com/oapi-codegen/runtime"
+ openapi_types "github.com/oapi-codegen/runtime/types"
+)
+
+// Defines values for GetServerStatus400JSONResponseBodyStatusCode.
+const (
+ GetServerStatus400JSONResponseBodyStatusCodeN400 GetServerStatus400JSONResponseBodyStatusCode = 400
+)
+
+// Valid indicates whether the value is a known member of the GetServerStatus400JSONResponseBodyStatusCode enum.
+func (e GetServerStatus400JSONResponseBodyStatusCode) Valid() bool {
+ switch e {
+ case GetServerStatus400JSONResponseBodyStatusCodeN400:
+ return true
+ default:
+ return false
+ }
+}
+
+// Defines values for GetServerStatus401JSONResponseBodyStatusCode.
+const (
+ GetServerStatus401JSONResponseBodyStatusCodeN401 GetServerStatus401JSONResponseBodyStatusCode = 401
+)
+
+// Valid indicates whether the value is a known member of the GetServerStatus401JSONResponseBodyStatusCode enum.
+func (e GetServerStatus401JSONResponseBodyStatusCode) Valid() bool {
+ switch e {
+ case GetServerStatus401JSONResponseBodyStatusCodeN401:
+ return true
+ default:
+ return false
+ }
+}
+
+// Defines values for GetServerStatus403JSONResponseBodyStatusCode.
+const (
+ GetServerStatus403JSONResponseBodyStatusCodeN403 GetServerStatus403JSONResponseBodyStatusCode = 403
+)
+
+// Valid indicates whether the value is a known member of the GetServerStatus403JSONResponseBodyStatusCode enum.
+func (e GetServerStatus403JSONResponseBodyStatusCode) Valid() bool {
+ switch e {
+ case GetServerStatus403JSONResponseBodyStatusCodeN403:
+ return true
+ default:
+ return false
+ }
+}
+
+// Defines values for GetServerStatus404JSONResponseBodyStatusCode.
+const (
+ GetServerStatus404JSONResponseBodyStatusCodeN404 GetServerStatus404JSONResponseBodyStatusCode = 404
+)
+
+// Valid indicates whether the value is a known member of the GetServerStatus404JSONResponseBodyStatusCode enum.
+func (e GetServerStatus404JSONResponseBodyStatusCode) Valid() bool {
+ switch e {
+ case GetServerStatus404JSONResponseBodyStatusCodeN404:
+ return true
+ default:
+ return false
+ }
+}
+
+// Defines values for GetServerStatus422JSONResponseBodyStatusCode.
+const (
+ GetServerStatus422JSONResponseBodyStatusCodeN422 GetServerStatus422JSONResponseBodyStatusCode = 422
+)
+
+// Valid indicates whether the value is a known member of the GetServerStatus422JSONResponseBodyStatusCode enum.
+func (e GetServerStatus422JSONResponseBodyStatusCode) Valid() bool {
+ switch e {
+ case GetServerStatus422JSONResponseBodyStatusCodeN422:
+ return true
+ default:
+ return false
+ }
+}
+
+// Defines values for GetServerStatus500JSONResponseBodyStatusCode.
+const (
+ GetServerStatus500JSONResponseBodyStatusCodeN500 GetServerStatus500JSONResponseBodyStatusCode = 500
+)
+
+// Valid indicates whether the value is a known member of the GetServerStatus500JSONResponseBodyStatusCode enum.
+func (e GetServerStatus500JSONResponseBodyStatusCode) Valid() bool {
+ switch e {
+ case GetServerStatus500JSONResponseBodyStatusCodeN500:
+ return true
+ default:
+ return false
+ }
+}
+
+// Defines values for AdminBootstrap400JSONResponseBodyStatusCode.
+const (
+ AdminBootstrap400JSONResponseBodyStatusCodeN400 AdminBootstrap400JSONResponseBodyStatusCode = 400
+)
+
+// Valid indicates whether the value is a known member of the AdminBootstrap400JSONResponseBodyStatusCode enum.
+func (e AdminBootstrap400JSONResponseBodyStatusCode) Valid() bool {
+ switch e {
+ case AdminBootstrap400JSONResponseBodyStatusCodeN400:
+ return true
+ default:
+ return false
+ }
+}
+
+// Defines values for AdminBootstrap401JSONResponseBodyStatusCode.
+const (
+ AdminBootstrap401JSONResponseBodyStatusCodeN401 AdminBootstrap401JSONResponseBodyStatusCode = 401
+)
+
+// Valid indicates whether the value is a known member of the AdminBootstrap401JSONResponseBodyStatusCode enum.
+func (e AdminBootstrap401JSONResponseBodyStatusCode) Valid() bool {
+ switch e {
+ case AdminBootstrap401JSONResponseBodyStatusCodeN401:
+ return true
+ default:
+ return false
+ }
+}
+
+// Defines values for AdminBootstrap403JSONResponseBodyStatusCode.
+const (
+ AdminBootstrap403JSONResponseBodyStatusCodeN403 AdminBootstrap403JSONResponseBodyStatusCode = 403
+)
+
+// Valid indicates whether the value is a known member of the AdminBootstrap403JSONResponseBodyStatusCode enum.
+func (e AdminBootstrap403JSONResponseBodyStatusCode) Valid() bool {
+ switch e {
+ case AdminBootstrap403JSONResponseBodyStatusCodeN403:
+ return true
+ default:
+ return false
+ }
+}
+
+// Defines values for AdminBootstrap404JSONResponseBodyStatusCode.
+const (
+ AdminBootstrap404JSONResponseBodyStatusCodeN404 AdminBootstrap404JSONResponseBodyStatusCode = 404
+)
+
+// Valid indicates whether the value is a known member of the AdminBootstrap404JSONResponseBodyStatusCode enum.
+func (e AdminBootstrap404JSONResponseBodyStatusCode) Valid() bool {
+ switch e {
+ case AdminBootstrap404JSONResponseBodyStatusCodeN404:
+ return true
+ default:
+ return false
+ }
+}
+
+// Defines values for AdminBootstrap422JSONResponseBodyStatusCode.
+const (
+ AdminBootstrap422JSONResponseBodyStatusCodeN422 AdminBootstrap422JSONResponseBodyStatusCode = 422
+)
+
+// Valid indicates whether the value is a known member of the AdminBootstrap422JSONResponseBodyStatusCode enum.
+func (e AdminBootstrap422JSONResponseBodyStatusCode) Valid() bool {
+ switch e {
+ case AdminBootstrap422JSONResponseBodyStatusCodeN422:
+ return true
+ default:
+ return false
+ }
+}
+
+// Defines values for AdminBootstrap500JSONResponseBodyStatusCode.
+const (
+ AdminBootstrap500JSONResponseBodyStatusCodeN500 AdminBootstrap500JSONResponseBodyStatusCode = 500
+)
+
+// Valid indicates whether the value is a known member of the AdminBootstrap500JSONResponseBodyStatusCode enum.
+func (e AdminBootstrap500JSONResponseBodyStatusCode) Valid() bool {
+ switch e {
+ case AdminBootstrap500JSONResponseBodyStatusCodeN500:
+ return true
+ default:
+ return false
+ }
+}
+
+// Defines values for UpdateAdminConfigJSONBodyEnabledLoginMethods.
+const (
+ Email UpdateAdminConfigJSONBodyEnabledLoginMethods = "email"
+ Github UpdateAdminConfigJSONBodyEnabledLoginMethods = "github"
+ Gitlab UpdateAdminConfigJSONBodyEnabledLoginMethods = "gitlab"
+ Google UpdateAdminConfigJSONBodyEnabledLoginMethods = "google"
+ Ldap UpdateAdminConfigJSONBodyEnabledLoginMethods = "ldap"
+ Oidc UpdateAdminConfigJSONBodyEnabledLoginMethods = "oidc"
+ Saml UpdateAdminConfigJSONBodyEnabledLoginMethods = "saml"
+)
+
+// Valid indicates whether the value is a known member of the UpdateAdminConfigJSONBodyEnabledLoginMethods enum.
+func (e UpdateAdminConfigJSONBodyEnabledLoginMethods) Valid() bool {
+ switch e {
+ case Email:
+ return true
+ case Github:
+ return true
+ case Gitlab:
+ return true
+ case Google:
+ return true
+ case Ldap:
+ return true
+ case Oidc:
+ return true
+ case Saml:
+ return true
+ default:
+ return false
+ }
+}
+
+// Defines values for UpdateAdminConfig400JSONResponseBodyStatusCode.
+const (
+ UpdateAdminConfig400JSONResponseBodyStatusCodeN400 UpdateAdminConfig400JSONResponseBodyStatusCode = 400
+)
+
+// Valid indicates whether the value is a known member of the UpdateAdminConfig400JSONResponseBodyStatusCode enum.
+func (e UpdateAdminConfig400JSONResponseBodyStatusCode) Valid() bool {
+ switch e {
+ case UpdateAdminConfig400JSONResponseBodyStatusCodeN400:
+ return true
+ default:
+ return false
+ }
+}
+
+// Defines values for UpdateAdminConfig401JSONResponseBodyStatusCode.
+const (
+ UpdateAdminConfig401JSONResponseBodyStatusCodeN401 UpdateAdminConfig401JSONResponseBodyStatusCode = 401
+)
+
+// Valid indicates whether the value is a known member of the UpdateAdminConfig401JSONResponseBodyStatusCode enum.
+func (e UpdateAdminConfig401JSONResponseBodyStatusCode) Valid() bool {
+ switch e {
+ case UpdateAdminConfig401JSONResponseBodyStatusCodeN401:
+ return true
+ default:
+ return false
+ }
+}
+
+// Defines values for UpdateAdminConfig403JSONResponseBodyStatusCode.
+const (
+ UpdateAdminConfig403JSONResponseBodyStatusCodeN403 UpdateAdminConfig403JSONResponseBodyStatusCode = 403
+)
+
+// Valid indicates whether the value is a known member of the UpdateAdminConfig403JSONResponseBodyStatusCode enum.
+func (e UpdateAdminConfig403JSONResponseBodyStatusCode) Valid() bool {
+ switch e {
+ case UpdateAdminConfig403JSONResponseBodyStatusCodeN403:
+ return true
+ default:
+ return false
+ }
+}
+
+// Defines values for UpdateAdminConfig404JSONResponseBodyStatusCode.
+const (
+ UpdateAdminConfig404JSONResponseBodyStatusCodeN404 UpdateAdminConfig404JSONResponseBodyStatusCode = 404
+)
+
+// Valid indicates whether the value is a known member of the UpdateAdminConfig404JSONResponseBodyStatusCode enum.
+func (e UpdateAdminConfig404JSONResponseBodyStatusCode) Valid() bool {
+ switch e {
+ case UpdateAdminConfig404JSONResponseBodyStatusCodeN404:
+ return true
+ default:
+ return false
+ }
+}
+
+// Defines values for UpdateAdminConfig422JSONResponseBodyStatusCode.
+const (
+ UpdateAdminConfig422JSONResponseBodyStatusCodeN422 UpdateAdminConfig422JSONResponseBodyStatusCode = 422
+)
+
+// Valid indicates whether the value is a known member of the UpdateAdminConfig422JSONResponseBodyStatusCode enum.
+func (e UpdateAdminConfig422JSONResponseBodyStatusCode) Valid() bool {
+ switch e {
+ case UpdateAdminConfig422JSONResponseBodyStatusCodeN422:
+ return true
+ default:
+ return false
+ }
+}
+
+// Defines values for UpdateAdminConfig500JSONResponseBodyStatusCode.
+const (
+ UpdateAdminConfig500JSONResponseBodyStatusCodeN500 UpdateAdminConfig500JSONResponseBodyStatusCode = 500
+)
+
+// Valid indicates whether the value is a known member of the UpdateAdminConfig500JSONResponseBodyStatusCode enum.
+func (e UpdateAdminConfig500JSONResponseBodyStatusCode) Valid() bool {
+ switch e {
+ case UpdateAdminConfig500JSONResponseBodyStatusCodeN500:
+ return true
+ default:
+ return false
+ }
+}
+
+// Defines values for RefreshAuthToken400JSONResponseBodyStatusCode.
+const (
+ RefreshAuthToken400JSONResponseBodyStatusCodeN400 RefreshAuthToken400JSONResponseBodyStatusCode = 400
+)
+
+// Valid indicates whether the value is a known member of the RefreshAuthToken400JSONResponseBodyStatusCode enum.
+func (e RefreshAuthToken400JSONResponseBodyStatusCode) Valid() bool {
+ switch e {
+ case RefreshAuthToken400JSONResponseBodyStatusCodeN400:
+ return true
+ default:
+ return false
+ }
+}
+
+// Defines values for RefreshAuthToken401JSONResponseBodyStatusCode.
+const (
+ RefreshAuthToken401JSONResponseBodyStatusCodeN401 RefreshAuthToken401JSONResponseBodyStatusCode = 401
+)
+
+// Valid indicates whether the value is a known member of the RefreshAuthToken401JSONResponseBodyStatusCode enum.
+func (e RefreshAuthToken401JSONResponseBodyStatusCode) Valid() bool {
+ switch e {
+ case RefreshAuthToken401JSONResponseBodyStatusCodeN401:
+ return true
+ default:
+ return false
+ }
+}
+
+// Defines values for RefreshAuthToken403JSONResponseBodyStatusCode.
+const (
+ RefreshAuthToken403JSONResponseBodyStatusCodeN403 RefreshAuthToken403JSONResponseBodyStatusCode = 403
+)
+
+// Valid indicates whether the value is a known member of the RefreshAuthToken403JSONResponseBodyStatusCode enum.
+func (e RefreshAuthToken403JSONResponseBodyStatusCode) Valid() bool {
+ switch e {
+ case RefreshAuthToken403JSONResponseBodyStatusCodeN403:
+ return true
+ default:
+ return false
+ }
+}
+
+// Defines values for RefreshAuthToken404JSONResponseBodyStatusCode.
+const (
+ RefreshAuthToken404JSONResponseBodyStatusCodeN404 RefreshAuthToken404JSONResponseBodyStatusCode = 404
+)
+
+// Valid indicates whether the value is a known member of the RefreshAuthToken404JSONResponseBodyStatusCode enum.
+func (e RefreshAuthToken404JSONResponseBodyStatusCode) Valid() bool {
+ switch e {
+ case RefreshAuthToken404JSONResponseBodyStatusCodeN404:
+ return true
+ default:
+ return false
+ }
+}
+
+// Defines values for RefreshAuthToken422JSONResponseBodyStatusCode.
+const (
+ RefreshAuthToken422JSONResponseBodyStatusCodeN422 RefreshAuthToken422JSONResponseBodyStatusCode = 422
+)
+
+// Valid indicates whether the value is a known member of the RefreshAuthToken422JSONResponseBodyStatusCode enum.
+func (e RefreshAuthToken422JSONResponseBodyStatusCode) Valid() bool {
+ switch e {
+ case RefreshAuthToken422JSONResponseBodyStatusCodeN422:
+ return true
+ default:
+ return false
+ }
+}
+
+// Defines values for RefreshAuthToken500JSONResponseBodyStatusCode.
+const (
+ RefreshAuthToken500JSONResponseBodyStatusCodeN500 RefreshAuthToken500JSONResponseBodyStatusCode = 500
+)
+
+// Valid indicates whether the value is a known member of the RefreshAuthToken500JSONResponseBodyStatusCode enum.
+func (e RefreshAuthToken500JSONResponseBodyStatusCode) Valid() bool {
+ switch e {
+ case RefreshAuthToken500JSONResponseBodyStatusCodeN500:
+ return true
+ default:
+ return false
+ }
+}
+
+// Defines values for GetOrganizationPlanParamsRefreshCache.
+const (
+ False GetOrganizationPlanParamsRefreshCache = "false"
+ True GetOrganizationPlanParamsRefreshCache = "true"
+)
+
+// Valid indicates whether the value is a known member of the GetOrganizationPlanParamsRefreshCache enum.
+func (e GetOrganizationPlanParamsRefreshCache) Valid() bool {
+ switch e {
+ case False:
+ return true
+ case True:
+ return true
+ default:
+ return false
+ }
+}
+
+// Defines values for GetOrganizationPlan400JSONResponseBodyStatusCode.
+const (
+ GetOrganizationPlan400JSONResponseBodyStatusCodeN400 GetOrganizationPlan400JSONResponseBodyStatusCode = 400
+)
+
+// Valid indicates whether the value is a known member of the GetOrganizationPlan400JSONResponseBodyStatusCode enum.
+func (e GetOrganizationPlan400JSONResponseBodyStatusCode) Valid() bool {
+ switch e {
+ case GetOrganizationPlan400JSONResponseBodyStatusCodeN400:
+ return true
+ default:
+ return false
+ }
+}
+
+// Defines values for GetOrganizationPlan401JSONResponseBodyStatusCode.
+const (
+ GetOrganizationPlan401JSONResponseBodyStatusCodeN401 GetOrganizationPlan401JSONResponseBodyStatusCode = 401
+)
+
+// Valid indicates whether the value is a known member of the GetOrganizationPlan401JSONResponseBodyStatusCode enum.
+func (e GetOrganizationPlan401JSONResponseBodyStatusCode) Valid() bool {
+ switch e {
+ case GetOrganizationPlan401JSONResponseBodyStatusCodeN401:
+ return true
+ default:
+ return false
+ }
+}
+
+// Defines values for GetOrganizationPlan403JSONResponseBodyStatusCode.
+const (
+ GetOrganizationPlan403JSONResponseBodyStatusCodeN403 GetOrganizationPlan403JSONResponseBodyStatusCode = 403
+)
+
+// Valid indicates whether the value is a known member of the GetOrganizationPlan403JSONResponseBodyStatusCode enum.
+func (e GetOrganizationPlan403JSONResponseBodyStatusCode) Valid() bool {
+ switch e {
+ case GetOrganizationPlan403JSONResponseBodyStatusCodeN403:
+ return true
+ default:
+ return false
+ }
+}
+
+// Defines values for GetOrganizationPlan404JSONResponseBodyStatusCode.
+const (
+ GetOrganizationPlan404JSONResponseBodyStatusCodeN404 GetOrganizationPlan404JSONResponseBodyStatusCode = 404
+)
+
+// Valid indicates whether the value is a known member of the GetOrganizationPlan404JSONResponseBodyStatusCode enum.
+func (e GetOrganizationPlan404JSONResponseBodyStatusCode) Valid() bool {
+ switch e {
+ case GetOrganizationPlan404JSONResponseBodyStatusCodeN404:
+ return true
+ default:
+ return false
+ }
+}
+
+// Defines values for GetOrganizationPlan422JSONResponseBodyStatusCode.
+const (
+ GetOrganizationPlan422JSONResponseBodyStatusCodeN422 GetOrganizationPlan422JSONResponseBodyStatusCode = 422
+)
+
+// Valid indicates whether the value is a known member of the GetOrganizationPlan422JSONResponseBodyStatusCode enum.
+func (e GetOrganizationPlan422JSONResponseBodyStatusCode) Valid() bool {
+ switch e {
+ case GetOrganizationPlan422JSONResponseBodyStatusCodeN422:
+ return true
+ default:
+ return false
+ }
+}
+
+// Defines values for GetOrganizationPlan500JSONResponseBodyStatusCode.
+const (
+ GetOrganizationPlan500JSONResponseBodyStatusCodeN500 GetOrganizationPlan500JSONResponseBodyStatusCode = 500
+)
+
+// Valid indicates whether the value is a known member of the GetOrganizationPlan500JSONResponseBodyStatusCode enum.
+func (e GetOrganizationPlan500JSONResponseBodyStatusCode) Valid() bool {
+ switch e {
+ case GetOrganizationPlan500JSONResponseBodyStatusCodeN500:
+ return true
+ default:
+ return false
+ }
+}
+
+// Defines values for CreateProjectJSONBodyType.
+const (
+ AgentVault CreateProjectJSONBodyType = "agent-vault"
+ CertManager CreateProjectJSONBodyType = "cert-manager"
+ Kms CreateProjectJSONBodyType = "kms"
+ Pam CreateProjectJSONBodyType = "pam"
+ SecretManager CreateProjectJSONBodyType = "secret-manager"
+ SecretScanning CreateProjectJSONBodyType = "secret-scanning"
+)
+
+// Valid indicates whether the value is a known member of the CreateProjectJSONBodyType enum.
+func (e CreateProjectJSONBodyType) Valid() bool {
+ switch e {
+ case AgentVault:
+ return true
+ case CertManager:
+ return true
+ case Kms:
+ return true
+ case Pam:
+ return true
+ case SecretManager:
+ return true
+ case SecretScanning:
+ return true
+ default:
+ return false
+ }
+}
+
+// Defines values for CreateProject200JSONResponseBodyProjectDeletedEnvironmentsDeletedBy0Type.
+const (
+ User CreateProject200JSONResponseBodyProjectDeletedEnvironmentsDeletedBy0Type = "user"
+)
+
+// Valid indicates whether the value is a known member of the CreateProject200JSONResponseBodyProjectDeletedEnvironmentsDeletedBy0Type enum.
+func (e CreateProject200JSONResponseBodyProjectDeletedEnvironmentsDeletedBy0Type) Valid() bool {
+ switch e {
+ case User:
+ return true
+ default:
+ return false
+ }
+}
+
+// Defines values for CreateProject200JSONResponseBodyProjectDeletedEnvironmentsDeletedBy1Type.
+const (
+ Identity CreateProject200JSONResponseBodyProjectDeletedEnvironmentsDeletedBy1Type = "identity"
+)
+
+// Valid indicates whether the value is a known member of the CreateProject200JSONResponseBodyProjectDeletedEnvironmentsDeletedBy1Type enum.
+func (e CreateProject200JSONResponseBodyProjectDeletedEnvironmentsDeletedBy1Type) Valid() bool {
+ switch e {
+ case Identity:
+ return true
+ default:
+ return false
+ }
+}
+
+// Defines values for CreateProject400JSONResponseBodyStatusCode.
+const (
+ CreateProject400JSONResponseBodyStatusCodeN400 CreateProject400JSONResponseBodyStatusCode = 400
+)
+
+// Valid indicates whether the value is a known member of the CreateProject400JSONResponseBodyStatusCode enum.
+func (e CreateProject400JSONResponseBodyStatusCode) Valid() bool {
+ switch e {
+ case CreateProject400JSONResponseBodyStatusCodeN400:
+ return true
+ default:
+ return false
+ }
+}
+
+// Defines values for CreateProject401JSONResponseBodyStatusCode.
+const (
+ CreateProject401JSONResponseBodyStatusCodeN401 CreateProject401JSONResponseBodyStatusCode = 401
+)
+
+// Valid indicates whether the value is a known member of the CreateProject401JSONResponseBodyStatusCode enum.
+func (e CreateProject401JSONResponseBodyStatusCode) Valid() bool {
+ switch e {
+ case CreateProject401JSONResponseBodyStatusCodeN401:
+ return true
+ default:
+ return false
+ }
+}
+
+// Defines values for CreateProject403JSONResponseBodyStatusCode.
+const (
+ CreateProject403JSONResponseBodyStatusCodeN403 CreateProject403JSONResponseBodyStatusCode = 403
+)
+
+// Valid indicates whether the value is a known member of the CreateProject403JSONResponseBodyStatusCode enum.
+func (e CreateProject403JSONResponseBodyStatusCode) Valid() bool {
+ switch e {
+ case CreateProject403JSONResponseBodyStatusCodeN403:
+ return true
+ default:
+ return false
+ }
+}
+
+// Defines values for CreateProject404JSONResponseBodyStatusCode.
+const (
+ CreateProject404JSONResponseBodyStatusCodeN404 CreateProject404JSONResponseBodyStatusCode = 404
+)
+
+// Valid indicates whether the value is a known member of the CreateProject404JSONResponseBodyStatusCode enum.
+func (e CreateProject404JSONResponseBodyStatusCode) Valid() bool {
+ switch e {
+ case CreateProject404JSONResponseBodyStatusCodeN404:
+ return true
+ default:
+ return false
+ }
+}
+
+// Defines values for CreateProject422JSONResponseBodyStatusCode.
+const (
+ CreateProject422JSONResponseBodyStatusCodeN422 CreateProject422JSONResponseBodyStatusCode = 422
+)
+
+// Valid indicates whether the value is a known member of the CreateProject422JSONResponseBodyStatusCode enum.
+func (e CreateProject422JSONResponseBodyStatusCode) Valid() bool {
+ switch e {
+ case CreateProject422JSONResponseBodyStatusCodeN422:
+ return true
+ default:
+ return false
+ }
+}
+
+// Defines values for CreateProject500JSONResponseBodyStatusCode.
+const (
+ CreateProject500JSONResponseBodyStatusCodeN500 CreateProject500JSONResponseBodyStatusCode = 500
+)
+
+// Valid indicates whether the value is a known member of the CreateProject500JSONResponseBodyStatusCode enum.
+func (e CreateProject500JSONResponseBodyStatusCode) Valid() bool {
+ switch e {
+ case CreateProject500JSONResponseBodyStatusCodeN500:
+ return true
+ default:
+ return false
+ }
+}
+
+// Defines values for CreateOrganization400JSONResponseBodyStatusCode.
+const (
+ CreateOrganization400JSONResponseBodyStatusCodeN400 CreateOrganization400JSONResponseBodyStatusCode = 400
+)
+
+// Valid indicates whether the value is a known member of the CreateOrganization400JSONResponseBodyStatusCode enum.
+func (e CreateOrganization400JSONResponseBodyStatusCode) Valid() bool {
+ switch e {
+ case CreateOrganization400JSONResponseBodyStatusCodeN400:
+ return true
+ default:
+ return false
+ }
+}
+
+// Defines values for CreateOrganization401JSONResponseBodyStatusCode.
+const (
+ CreateOrganization401JSONResponseBodyStatusCodeN401 CreateOrganization401JSONResponseBodyStatusCode = 401
+)
+
+// Valid indicates whether the value is a known member of the CreateOrganization401JSONResponseBodyStatusCode enum.
+func (e CreateOrganization401JSONResponseBodyStatusCode) Valid() bool {
+ switch e {
+ case CreateOrganization401JSONResponseBodyStatusCodeN401:
+ return true
+ default:
+ return false
+ }
+}
+
+// Defines values for CreateOrganization403JSONResponseBodyStatusCode.
+const (
+ CreateOrganization403JSONResponseBodyStatusCodeN403 CreateOrganization403JSONResponseBodyStatusCode = 403
+)
+
+// Valid indicates whether the value is a known member of the CreateOrganization403JSONResponseBodyStatusCode enum.
+func (e CreateOrganization403JSONResponseBodyStatusCode) Valid() bool {
+ switch e {
+ case CreateOrganization403JSONResponseBodyStatusCodeN403:
+ return true
+ default:
+ return false
+ }
+}
+
+// Defines values for CreateOrganization404JSONResponseBodyStatusCode.
+const (
+ CreateOrganization404JSONResponseBodyStatusCodeN404 CreateOrganization404JSONResponseBodyStatusCode = 404
+)
+
+// Valid indicates whether the value is a known member of the CreateOrganization404JSONResponseBodyStatusCode enum.
+func (e CreateOrganization404JSONResponseBodyStatusCode) Valid() bool {
+ switch e {
+ case CreateOrganization404JSONResponseBodyStatusCodeN404:
+ return true
+ default:
+ return false
+ }
+}
+
+// Defines values for CreateOrganization422JSONResponseBodyStatusCode.
+const (
+ CreateOrganization422JSONResponseBodyStatusCodeN422 CreateOrganization422JSONResponseBodyStatusCode = 422
+)
+
+// Valid indicates whether the value is a known member of the CreateOrganization422JSONResponseBodyStatusCode enum.
+func (e CreateOrganization422JSONResponseBodyStatusCode) Valid() bool {
+ switch e {
+ case CreateOrganization422JSONResponseBodyStatusCodeN422:
+ return true
+ default:
+ return false
+ }
+}
+
+// Defines values for CreateOrganization500JSONResponseBodyStatusCode.
+const (
+ CreateOrganization500JSONResponseBodyStatusCodeN500 CreateOrganization500JSONResponseBodyStatusCode = 500
+)
+
+// Valid indicates whether the value is a known member of the CreateOrganization500JSONResponseBodyStatusCode enum.
+func (e CreateOrganization500JSONResponseBodyStatusCode) Valid() bool {
+ switch e {
+ case CreateOrganization500JSONResponseBodyStatusCodeN500:
+ return true
+ default:
+ return false
+ }
+}
+
+// Defines values for DeleteOrganization400JSONResponseBodyStatusCode.
+const (
+ DeleteOrganization400JSONResponseBodyStatusCodeN400 DeleteOrganization400JSONResponseBodyStatusCode = 400
+)
+
+// Valid indicates whether the value is a known member of the DeleteOrganization400JSONResponseBodyStatusCode enum.
+func (e DeleteOrganization400JSONResponseBodyStatusCode) Valid() bool {
+ switch e {
+ case DeleteOrganization400JSONResponseBodyStatusCodeN400:
+ return true
+ default:
+ return false
+ }
+}
+
+// Defines values for DeleteOrganization401JSONResponseBodyStatusCode.
+const (
+ DeleteOrganization401JSONResponseBodyStatusCodeN401 DeleteOrganization401JSONResponseBodyStatusCode = 401
+)
+
+// Valid indicates whether the value is a known member of the DeleteOrganization401JSONResponseBodyStatusCode enum.
+func (e DeleteOrganization401JSONResponseBodyStatusCode) Valid() bool {
+ switch e {
+ case DeleteOrganization401JSONResponseBodyStatusCodeN401:
+ return true
+ default:
+ return false
+ }
+}
+
+// Defines values for DeleteOrganization403JSONResponseBodyStatusCode.
+const (
+ DeleteOrganization403JSONResponseBodyStatusCodeN403 DeleteOrganization403JSONResponseBodyStatusCode = 403
+)
+
+// Valid indicates whether the value is a known member of the DeleteOrganization403JSONResponseBodyStatusCode enum.
+func (e DeleteOrganization403JSONResponseBodyStatusCode) Valid() bool {
+ switch e {
+ case DeleteOrganization403JSONResponseBodyStatusCodeN403:
+ return true
+ default:
+ return false
+ }
+}
+
+// Defines values for DeleteOrganization404JSONResponseBodyStatusCode.
+const (
+ DeleteOrganization404JSONResponseBodyStatusCodeN404 DeleteOrganization404JSONResponseBodyStatusCode = 404
+)
+
+// Valid indicates whether the value is a known member of the DeleteOrganization404JSONResponseBodyStatusCode enum.
+func (e DeleteOrganization404JSONResponseBodyStatusCode) Valid() bool {
+ switch e {
+ case DeleteOrganization404JSONResponseBodyStatusCodeN404:
+ return true
+ default:
+ return false
+ }
+}
+
+// Defines values for DeleteOrganization422JSONResponseBodyStatusCode.
+const (
+ DeleteOrganization422JSONResponseBodyStatusCodeN422 DeleteOrganization422JSONResponseBodyStatusCode = 422
+)
+
+// Valid indicates whether the value is a known member of the DeleteOrganization422JSONResponseBodyStatusCode enum.
+func (e DeleteOrganization422JSONResponseBodyStatusCode) Valid() bool {
+ switch e {
+ case DeleteOrganization422JSONResponseBodyStatusCodeN422:
+ return true
+ default:
+ return false
+ }
+}
+
+// Defines values for DeleteOrganization500JSONResponseBodyStatusCode.
+const (
+ DeleteOrganization500JSONResponseBodyStatusCodeN500 DeleteOrganization500JSONResponseBodyStatusCode = 500
+)
+
+// Valid indicates whether the value is a known member of the DeleteOrganization500JSONResponseBodyStatusCode enum.
+func (e DeleteOrganization500JSONResponseBodyStatusCode) Valid() bool {
+ switch e {
+ case DeleteOrganization500JSONResponseBodyStatusCodeN500:
+ return true
+ default:
+ return false
+ }
+}
+
+// Defines values for LoginV3400JSONResponseBodyStatusCode.
+const (
+ LoginV3400JSONResponseBodyStatusCodeN400 LoginV3400JSONResponseBodyStatusCode = 400
+)
+
+// Valid indicates whether the value is a known member of the LoginV3400JSONResponseBodyStatusCode enum.
+func (e LoginV3400JSONResponseBodyStatusCode) Valid() bool {
+ switch e {
+ case LoginV3400JSONResponseBodyStatusCodeN400:
+ return true
+ default:
+ return false
+ }
+}
+
+// Defines values for LoginV3401JSONResponseBodyStatusCode.
+const (
+ LoginV3401JSONResponseBodyStatusCodeN401 LoginV3401JSONResponseBodyStatusCode = 401
+)
+
+// Valid indicates whether the value is a known member of the LoginV3401JSONResponseBodyStatusCode enum.
+func (e LoginV3401JSONResponseBodyStatusCode) Valid() bool {
+ switch e {
+ case LoginV3401JSONResponseBodyStatusCodeN401:
+ return true
+ default:
+ return false
+ }
+}
+
+// Defines values for LoginV3403JSONResponseBodyStatusCode.
+const (
+ LoginV3403JSONResponseBodyStatusCodeN403 LoginV3403JSONResponseBodyStatusCode = 403
+)
+
+// Valid indicates whether the value is a known member of the LoginV3403JSONResponseBodyStatusCode enum.
+func (e LoginV3403JSONResponseBodyStatusCode) Valid() bool {
+ switch e {
+ case LoginV3403JSONResponseBodyStatusCodeN403:
+ return true
+ default:
+ return false
+ }
+}
+
+// Defines values for LoginV3404JSONResponseBodyStatusCode.
+const (
+ LoginV3404JSONResponseBodyStatusCodeN404 LoginV3404JSONResponseBodyStatusCode = 404
+)
+
+// Valid indicates whether the value is a known member of the LoginV3404JSONResponseBodyStatusCode enum.
+func (e LoginV3404JSONResponseBodyStatusCode) Valid() bool {
+ switch e {
+ case LoginV3404JSONResponseBodyStatusCodeN404:
+ return true
+ default:
+ return false
+ }
+}
+
+// Defines values for LoginV3422JSONResponseBodyStatusCode.
+const (
+ LoginV3422JSONResponseBodyStatusCodeN422 LoginV3422JSONResponseBodyStatusCode = 422
+)
+
+// Valid indicates whether the value is a known member of the LoginV3422JSONResponseBodyStatusCode enum.
+func (e LoginV3422JSONResponseBodyStatusCode) Valid() bool {
+ switch e {
+ case LoginV3422JSONResponseBodyStatusCodeN422:
+ return true
+ default:
+ return false
+ }
+}
+
+// Defines values for LoginV3500JSONResponseBodyStatusCode.
+const (
+ LoginV3500JSONResponseBodyStatusCodeN500 LoginV3500JSONResponseBodyStatusCode = 500
+)
+
+// Valid indicates whether the value is a known member of the LoginV3500JSONResponseBodyStatusCode enum.
+func (e LoginV3500JSONResponseBodyStatusCode) Valid() bool {
+ switch e {
+ case LoginV3500JSONResponseBodyStatusCodeN500:
+ return true
+ default:
+ return false
+ }
+}
+
+// Defines values for SelectOrganizationV3JSONBodyUserAgent.
+const (
+ Cli SelectOrganizationV3JSONBodyUserAgent = "cli"
+)
+
+// Valid indicates whether the value is a known member of the SelectOrganizationV3JSONBodyUserAgent enum.
+func (e SelectOrganizationV3JSONBodyUserAgent) Valid() bool {
+ switch e {
+ case Cli:
+ return true
+ default:
+ return false
+ }
+}
+
+// Defines values for SelectOrganizationV3400JSONResponseBodyStatusCode.
+const (
+ SelectOrganizationV3400JSONResponseBodyStatusCodeN400 SelectOrganizationV3400JSONResponseBodyStatusCode = 400
+)
+
+// Valid indicates whether the value is a known member of the SelectOrganizationV3400JSONResponseBodyStatusCode enum.
+func (e SelectOrganizationV3400JSONResponseBodyStatusCode) Valid() bool {
+ switch e {
+ case SelectOrganizationV3400JSONResponseBodyStatusCodeN400:
+ return true
+ default:
+ return false
+ }
+}
+
+// Defines values for SelectOrganizationV3401JSONResponseBodyStatusCode.
+const (
+ SelectOrganizationV3401JSONResponseBodyStatusCodeN401 SelectOrganizationV3401JSONResponseBodyStatusCode = 401
+)
+
+// Valid indicates whether the value is a known member of the SelectOrganizationV3401JSONResponseBodyStatusCode enum.
+func (e SelectOrganizationV3401JSONResponseBodyStatusCode) Valid() bool {
+ switch e {
+ case SelectOrganizationV3401JSONResponseBodyStatusCodeN401:
+ return true
+ default:
+ return false
+ }
+}
+
+// Defines values for SelectOrganizationV3403JSONResponseBodyStatusCode.
+const (
+ SelectOrganizationV3403JSONResponseBodyStatusCodeN403 SelectOrganizationV3403JSONResponseBodyStatusCode = 403
+)
+
+// Valid indicates whether the value is a known member of the SelectOrganizationV3403JSONResponseBodyStatusCode enum.
+func (e SelectOrganizationV3403JSONResponseBodyStatusCode) Valid() bool {
+ switch e {
+ case SelectOrganizationV3403JSONResponseBodyStatusCodeN403:
+ return true
+ default:
+ return false
+ }
+}
+
+// Defines values for SelectOrganizationV3404JSONResponseBodyStatusCode.
+const (
+ SelectOrganizationV3404JSONResponseBodyStatusCodeN404 SelectOrganizationV3404JSONResponseBodyStatusCode = 404
+)
+
+// Valid indicates whether the value is a known member of the SelectOrganizationV3404JSONResponseBodyStatusCode enum.
+func (e SelectOrganizationV3404JSONResponseBodyStatusCode) Valid() bool {
+ switch e {
+ case SelectOrganizationV3404JSONResponseBodyStatusCodeN404:
+ return true
+ default:
+ return false
+ }
+}
+
+// Defines values for SelectOrganizationV3422JSONResponseBodyStatusCode.
+const (
+ SelectOrganizationV3422JSONResponseBodyStatusCodeN422 SelectOrganizationV3422JSONResponseBodyStatusCode = 422
+)
+
+// Valid indicates whether the value is a known member of the SelectOrganizationV3422JSONResponseBodyStatusCode enum.
+func (e SelectOrganizationV3422JSONResponseBodyStatusCode) Valid() bool {
+ switch e {
+ case SelectOrganizationV3422JSONResponseBodyStatusCodeN422:
+ return true
+ default:
+ return false
+ }
+}
+
+// Defines values for SelectOrganizationV3500JSONResponseBodyStatusCode.
+const (
+ SelectOrganizationV3500JSONResponseBodyStatusCodeN500 SelectOrganizationV3500JSONResponseBodyStatusCode = 500
+)
+
+// Valid indicates whether the value is a known member of the SelectOrganizationV3500JSONResponseBodyStatusCode enum.
+func (e SelectOrganizationV3500JSONResponseBodyStatusCode) Valid() bool {
+ switch e {
+ case SelectOrganizationV3500JSONResponseBodyStatusCodeN500:
+ return true
+ default:
+ return false
+ }
+}
+
+// GetServerStatus400JSONResponseBodyStatusCode defines parameters for GetServerStatus.
+type GetServerStatus400JSONResponseBodyStatusCode float32
+
+// GetServerStatus401JSONResponseBodyStatusCode defines parameters for GetServerStatus.
+type GetServerStatus401JSONResponseBodyStatusCode float32
+
+// GetServerStatus403JSONResponseBodyStatusCode defines parameters for GetServerStatus.
+type GetServerStatus403JSONResponseBodyStatusCode float32
+
+// GetServerStatus404JSONResponseBodyStatusCode defines parameters for GetServerStatus.
+type GetServerStatus404JSONResponseBodyStatusCode float32
+
+// GetServerStatus422JSONResponseBodyStatusCode defines parameters for GetServerStatus.
+type GetServerStatus422JSONResponseBodyStatusCode float32
+
+// GetServerStatus500JSONResponseBodyStatusCode defines parameters for GetServerStatus.
+type GetServerStatus500JSONResponseBodyStatusCode float32
+
+// AdminBootstrapJSONBody defines parameters for AdminBootstrap.
+type AdminBootstrapJSONBody struct {
+ Email openapi_types.Email `json:"email"`
+ Organization string `json:"organization"`
+ Password string `json:"password"`
+}
+
+// AdminBootstrap400JSONResponseBodyStatusCode defines parameters for AdminBootstrap.
+type AdminBootstrap400JSONResponseBodyStatusCode float32
+
+// AdminBootstrap401JSONResponseBodyStatusCode defines parameters for AdminBootstrap.
+type AdminBootstrap401JSONResponseBodyStatusCode float32
+
+// AdminBootstrap403JSONResponseBodyStatusCode defines parameters for AdminBootstrap.
+type AdminBootstrap403JSONResponseBodyStatusCode float32
+
+// AdminBootstrap404JSONResponseBodyStatusCode defines parameters for AdminBootstrap.
+type AdminBootstrap404JSONResponseBodyStatusCode float32
+
+// AdminBootstrap422JSONResponseBodyStatusCode defines parameters for AdminBootstrap.
+type AdminBootstrap422JSONResponseBodyStatusCode float32
+
+// AdminBootstrap500JSONResponseBodyStatusCode defines parameters for AdminBootstrap.
+type AdminBootstrap500JSONResponseBodyStatusCode float32
+
+// UpdateAdminConfigJSONBody defines parameters for UpdateAdminConfig.
+type UpdateAdminConfigJSONBody struct {
+ AllowSignUp *bool `json:"allowSignUp,omitempty"`
+ AllowedSignUpDomain *string `json:"allowedSignUpDomain,omitempty"`
+ AuthConsentContent *string `json:"authConsentContent,omitempty"`
+ DefaultAuthOrgId *string `json:"defaultAuthOrgId,omitempty"`
+ EnabledLoginMethods *[]UpdateAdminConfigJSONBodyEnabledLoginMethods `json:"enabledLoginMethods,omitempty"`
+ EnvOverrides *struct {
+ CLIENTGITLABLOGINURL string `json:"CLIENT_GITLAB_LOGIN_URL"`
+ CLIENTIDGITHUBLOGIN string `json:"CLIENT_ID_GITHUB_LOGIN"`
+ CLIENTIDGITLABLOGIN string `json:"CLIENT_ID_GITLAB_LOGIN"`
+ CLIENTIDGOOGLELOGIN string `json:"CLIENT_ID_GOOGLE_LOGIN"`
+ CLIENTSECRETGITHUBLOGIN string `json:"CLIENT_SECRET_GITHUB_LOGIN"`
+ CLIENTSECRETGITLABLOGIN string `json:"CLIENT_SECRET_GITLAB_LOGIN"`
+ CLIENTSECRETGOOGLELOGIN string `json:"CLIENT_SECRET_GOOGLE_LOGIN"`
+ DISABLEAUDITLOGSTORAGE string `json:"DISABLE_AUDIT_LOG_STORAGE"`
+ DISABLEPOSTGRESAUDITLOGSTORAGE string `json:"DISABLE_POSTGRES_AUDIT_LOG_STORAGE"`
+ DISABLEPUBLICSECRETSHARING string `json:"DISABLE_PUBLIC_SECRET_SHARING"`
+ INFAPPCONNECTIONAWSACCESSKEYID string `json:"INF_APP_CONNECTION_AWS_ACCESS_KEY_ID"`
+ INFAPPCONNECTIONAWSSECRETACCESSKEY string `json:"INF_APP_CONNECTION_AWS_SECRET_ACCESS_KEY"`
+ INFAPPCONNECTIONAZUREAPPCONFIGURATIONCLIENTID string `json:"INF_APP_CONNECTION_AZURE_APP_CONFIGURATION_CLIENT_ID"`
+ INFAPPCONNECTIONAZUREAPPCONFIGURATIONCLIENTSECRET string `json:"INF_APP_CONNECTION_AZURE_APP_CONFIGURATION_CLIENT_SECRET"`
+ INFAPPCONNECTIONAZURECLIENTSECRETSCLIENTID string `json:"INF_APP_CONNECTION_AZURE_CLIENT_SECRETS_CLIENT_ID"`
+ INFAPPCONNECTIONAZURECLIENTSECRETSCLIENTSECRET string `json:"INF_APP_CONNECTION_AZURE_CLIENT_SECRETS_CLIENT_SECRET"`
+ INFAPPCONNECTIONAZUREDEVOPSCLIENTID string `json:"INF_APP_CONNECTION_AZURE_DEVOPS_CLIENT_ID"`
+ INFAPPCONNECTIONAZUREDEVOPSCLIENTSECRET string `json:"INF_APP_CONNECTION_AZURE_DEVOPS_CLIENT_SECRET"`
+ INFAPPCONNECTIONAZUREKEYVAULTCLIENTID string `json:"INF_APP_CONNECTION_AZURE_KEY_VAULT_CLIENT_ID"`
+ INFAPPCONNECTIONAZUREKEYVAULTCLIENTSECRET string `json:"INF_APP_CONNECTION_AZURE_KEY_VAULT_CLIENT_SECRET"`
+ INFAPPCONNECTIONGCPSERVICEACCOUNTCREDENTIAL string `json:"INF_APP_CONNECTION_GCP_SERVICE_ACCOUNT_CREDENTIAL"`
+ INFAPPCONNECTIONGITHUBAPPCLIENTID string `json:"INF_APP_CONNECTION_GITHUB_APP_CLIENT_ID"`
+ INFAPPCONNECTIONGITHUBAPPCLIENTSECRET string `json:"INF_APP_CONNECTION_GITHUB_APP_CLIENT_SECRET"`
+ INFAPPCONNECTIONGITHUBAPPHOST string `json:"INF_APP_CONNECTION_GITHUB_APP_HOST"`
+ INFAPPCONNECTIONGITHUBAPPID string `json:"INF_APP_CONNECTION_GITHUB_APP_ID"`
+ INFAPPCONNECTIONGITHUBAPPPRIVATEKEY string `json:"INF_APP_CONNECTION_GITHUB_APP_PRIVATE_KEY"`
+ INFAPPCONNECTIONGITHUBAPPSLUG string `json:"INF_APP_CONNECTION_GITHUB_APP_SLUG"`
+ INFAPPCONNECTIONGITHUBOAUTHCLIENTID string `json:"INF_APP_CONNECTION_GITHUB_OAUTH_CLIENT_ID"`
+ INFAPPCONNECTIONGITHUBOAUTHCLIENTSECRET string `json:"INF_APP_CONNECTION_GITHUB_OAUTH_CLIENT_SECRET"`
+ INFAPPCONNECTIONGITHUBRADARAPPCLIENTID string `json:"INF_APP_CONNECTION_GITHUB_RADAR_APP_CLIENT_ID"`
+ INFAPPCONNECTIONGITHUBRADARAPPCLIENTSECRET string `json:"INF_APP_CONNECTION_GITHUB_RADAR_APP_CLIENT_SECRET"`
+ INFAPPCONNECTIONGITHUBRADARAPPID string `json:"INF_APP_CONNECTION_GITHUB_RADAR_APP_ID"`
+ INFAPPCONNECTIONGITHUBRADARAPPPRIVATEKEY string `json:"INF_APP_CONNECTION_GITHUB_RADAR_APP_PRIVATE_KEY"`
+ INFAPPCONNECTIONGITHUBRADARAPPSLUG string `json:"INF_APP_CONNECTION_GITHUB_RADAR_APP_SLUG"`
+ INFAPPCONNECTIONGITHUBRADARAPPWEBHOOKSECRET string `json:"INF_APP_CONNECTION_GITHUB_RADAR_APP_WEBHOOK_SECRET"`
+ INFAPPCONNECTIONGITLABOAUTHCLIENTID string `json:"INF_APP_CONNECTION_GITLAB_OAUTH_CLIENT_ID"`
+ INFAPPCONNECTIONGITLABOAUTHCLIENTSECRET string `json:"INF_APP_CONNECTION_GITLAB_OAUTH_CLIENT_SECRET"`
+ INFAPPCONNECTIONHEROKUOAUTHCLIENTID string `json:"INF_APP_CONNECTION_HEROKU_OAUTH_CLIENT_ID"`
+ INFAPPCONNECTIONHEROKUOAUTHCLIENTSECRET string `json:"INF_APP_CONNECTION_HEROKU_OAUTH_CLIENT_SECRET"`
+ } `json:"envOverrides,omitempty"`
+ GitHubAppConnectionClientId *string `json:"gitHubAppConnectionClientId,omitempty"`
+ GitHubAppConnectionClientSecret *string `json:"gitHubAppConnectionClientSecret,omitempty"`
+ GitHubAppConnectionId *string `json:"gitHubAppConnectionId,omitempty"`
+ GitHubAppConnectionPrivateKey *string `json:"gitHubAppConnectionPrivateKey,omitempty"`
+ GitHubAppConnectionSlug *string `json:"gitHubAppConnectionSlug,omitempty"`
+ MicrosoftTeamsAppId *string `json:"microsoftTeamsAppId,omitempty"`
+ MicrosoftTeamsBotId *string `json:"microsoftTeamsBotId,omitempty"`
+ MicrosoftTeamsClientSecret *string `json:"microsoftTeamsClientSecret,omitempty"`
+ OnboardingCompleted *bool `json:"onboardingCompleted,omitempty"`
+ PageFrameContent *string `json:"pageFrameContent,omitempty"`
+ SlackClientId *string `json:"slackClientId,omitempty"`
+ SlackClientSecret *string `json:"slackClientSecret,omitempty"`
+ TrustLdapEmails *bool `json:"trustLdapEmails,omitempty"`
+}
+
+// UpdateAdminConfigJSONBodyEnabledLoginMethods defines parameters for UpdateAdminConfig.
+type UpdateAdminConfigJSONBodyEnabledLoginMethods string
+
+// UpdateAdminConfig400JSONResponseBodyStatusCode defines parameters for UpdateAdminConfig.
+type UpdateAdminConfig400JSONResponseBodyStatusCode float32
+
+// UpdateAdminConfig401JSONResponseBodyStatusCode defines parameters for UpdateAdminConfig.
+type UpdateAdminConfig401JSONResponseBodyStatusCode float32
+
+// UpdateAdminConfig403JSONResponseBodyStatusCode defines parameters for UpdateAdminConfig.
+type UpdateAdminConfig403JSONResponseBodyStatusCode float32
+
+// UpdateAdminConfig404JSONResponseBodyStatusCode defines parameters for UpdateAdminConfig.
+type UpdateAdminConfig404JSONResponseBodyStatusCode float32
+
+// UpdateAdminConfig422JSONResponseBodyStatusCode defines parameters for UpdateAdminConfig.
+type UpdateAdminConfig422JSONResponseBodyStatusCode float32
+
+// UpdateAdminConfig500JSONResponseBodyStatusCode defines parameters for UpdateAdminConfig.
+type UpdateAdminConfig500JSONResponseBodyStatusCode float32
+
+// RefreshAuthToken400JSONResponseBodyStatusCode defines parameters for RefreshAuthToken.
+type RefreshAuthToken400JSONResponseBodyStatusCode float32
+
+// RefreshAuthToken401JSONResponseBodyStatusCode defines parameters for RefreshAuthToken.
+type RefreshAuthToken401JSONResponseBodyStatusCode float32
+
+// RefreshAuthToken403JSONResponseBodyStatusCode defines parameters for RefreshAuthToken.
+type RefreshAuthToken403JSONResponseBodyStatusCode float32
+
+// RefreshAuthToken404JSONResponseBodyStatusCode defines parameters for RefreshAuthToken.
+type RefreshAuthToken404JSONResponseBodyStatusCode float32
+
+// RefreshAuthToken422JSONResponseBodyStatusCode defines parameters for RefreshAuthToken.
+type RefreshAuthToken422JSONResponseBodyStatusCode float32
+
+// RefreshAuthToken500JSONResponseBodyStatusCode defines parameters for RefreshAuthToken.
+type RefreshAuthToken500JSONResponseBodyStatusCode float32
+
+// GetOrganizationPlanParams defines parameters for GetOrganizationPlan.
+type GetOrganizationPlanParams struct {
+ RefreshCache *GetOrganizationPlanParamsRefreshCache `form:"refreshCache,omitempty" json:"refreshCache,omitempty"`
+}
+
+// GetOrganizationPlanParamsRefreshCache defines parameters for GetOrganizationPlan.
+type GetOrganizationPlanParamsRefreshCache string
+
+// GetOrganizationPlan400JSONResponseBodyStatusCode defines parameters for GetOrganizationPlan.
+type GetOrganizationPlan400JSONResponseBodyStatusCode float32
+
+// GetOrganizationPlan401JSONResponseBodyStatusCode defines parameters for GetOrganizationPlan.
+type GetOrganizationPlan401JSONResponseBodyStatusCode float32
+
+// GetOrganizationPlan403JSONResponseBodyStatusCode defines parameters for GetOrganizationPlan.
+type GetOrganizationPlan403JSONResponseBodyStatusCode float32
+
+// GetOrganizationPlan404JSONResponseBodyStatusCode defines parameters for GetOrganizationPlan.
+type GetOrganizationPlan404JSONResponseBodyStatusCode float32
+
+// GetOrganizationPlan422JSONResponseBodyStatusCode defines parameters for GetOrganizationPlan.
+type GetOrganizationPlan422JSONResponseBodyStatusCode float32
+
+// GetOrganizationPlan500JSONResponseBodyStatusCode defines parameters for GetOrganizationPlan.
+type GetOrganizationPlan500JSONResponseBodyStatusCode float32
+
+// CreateProjectJSONBody defines parameters for CreateProject.
+type CreateProjectJSONBody struct {
+ HasDeleteProtection *bool `json:"hasDeleteProtection,omitempty"`
+ KmsKeyId *string `json:"kmsKeyId,omitempty"`
+
+ // ProjectDescription An optional description label for the project.
+ ProjectDescription *string `json:"projectDescription,omitempty"`
+
+ // ProjectName The name of the project to create.
+ ProjectName string `json:"projectName"`
+ ShouldCreateDefaultEnvs *bool `json:"shouldCreateDefaultEnvs,omitempty"`
+
+ // Slug An optional slug for the project.
+ Slug *string `json:"slug,omitempty"`
+
+ // Template The name of the project template, if specified, to apply to this project.
+ Template *string `json:"template,omitempty"`
+ Type *CreateProjectJSONBodyType `json:"type,omitempty"`
+}
+
+// CreateProjectJSONBodyType defines parameters for CreateProject.
+type CreateProjectJSONBodyType string
+
+// CreateProject200JSONResponseBodyProjectDeletedEnvironmentsDeletedBy0 defines parameters for CreateProject.
+type CreateProject200JSONResponseBodyProjectDeletedEnvironmentsDeletedBy0 struct {
+ Email *string `json:"email"`
+ FirstName *string `json:"firstName"`
+ Id string `json:"id"`
+ LastName *string `json:"lastName"`
+ Type CreateProject200JSONResponseBodyProjectDeletedEnvironmentsDeletedBy0Type `json:"type"`
+ Username *string `json:"username"`
+}
+
+// CreateProject200JSONResponseBodyProjectDeletedEnvironmentsDeletedBy0Type defines parameters for CreateProject.
+type CreateProject200JSONResponseBodyProjectDeletedEnvironmentsDeletedBy0Type string
+
+// CreateProject200JSONResponseBodyProjectDeletedEnvironmentsDeletedBy1 defines parameters for CreateProject.
+type CreateProject200JSONResponseBodyProjectDeletedEnvironmentsDeletedBy1 struct {
+ Id string `json:"id"`
+ Name string `json:"name"`
+ Type CreateProject200JSONResponseBodyProjectDeletedEnvironmentsDeletedBy1Type `json:"type"`
+}
+
+// CreateProject200JSONResponseBodyProjectDeletedEnvironmentsDeletedBy1Type defines parameters for CreateProject.
+type CreateProject200JSONResponseBodyProjectDeletedEnvironmentsDeletedBy1Type string
+
+// CreateProject200JSONResponseBody_Project_DeletedEnvironments_DeletedBy defines parameters for CreateProject.
+type CreateProject200JSONResponseBody_Project_DeletedEnvironments_DeletedBy struct {
+ union json.RawMessage
+}
+
+// CreateProject400JSONResponseBodyStatusCode defines parameters for CreateProject.
+type CreateProject400JSONResponseBodyStatusCode float32
+
+// CreateProject401JSONResponseBodyStatusCode defines parameters for CreateProject.
+type CreateProject401JSONResponseBodyStatusCode float32
+
+// CreateProject403JSONResponseBodyStatusCode defines parameters for CreateProject.
+type CreateProject403JSONResponseBodyStatusCode float32
+
+// CreateProject404JSONResponseBodyStatusCode defines parameters for CreateProject.
+type CreateProject404JSONResponseBodyStatusCode float32
+
+// CreateProject422JSONResponseBodyStatusCode defines parameters for CreateProject.
+type CreateProject422JSONResponseBodyStatusCode float32
+
+// CreateProject500JSONResponseBodyStatusCode defines parameters for CreateProject.
+type CreateProject500JSONResponseBodyStatusCode float32
+
+// CreateOrganizationJSONBody defines parameters for CreateOrganization.
+type CreateOrganizationJSONBody struct {
+ Name string `json:"name"`
+}
+
+// CreateOrganization400JSONResponseBodyStatusCode defines parameters for CreateOrganization.
+type CreateOrganization400JSONResponseBodyStatusCode float32
+
+// CreateOrganization401JSONResponseBodyStatusCode defines parameters for CreateOrganization.
+type CreateOrganization401JSONResponseBodyStatusCode float32
+
+// CreateOrganization403JSONResponseBodyStatusCode defines parameters for CreateOrganization.
+type CreateOrganization403JSONResponseBodyStatusCode float32
+
+// CreateOrganization404JSONResponseBodyStatusCode defines parameters for CreateOrganization.
+type CreateOrganization404JSONResponseBodyStatusCode float32
+
+// CreateOrganization422JSONResponseBodyStatusCode defines parameters for CreateOrganization.
+type CreateOrganization422JSONResponseBodyStatusCode float32
+
+// CreateOrganization500JSONResponseBodyStatusCode defines parameters for CreateOrganization.
+type CreateOrganization500JSONResponseBodyStatusCode float32
+
+// DeleteOrganization400JSONResponseBodyStatusCode defines parameters for DeleteOrganization.
+type DeleteOrganization400JSONResponseBodyStatusCode float32
+
+// DeleteOrganization401JSONResponseBodyStatusCode defines parameters for DeleteOrganization.
+type DeleteOrganization401JSONResponseBodyStatusCode float32
+
+// DeleteOrganization403JSONResponseBodyStatusCode defines parameters for DeleteOrganization.
+type DeleteOrganization403JSONResponseBodyStatusCode float32
+
+// DeleteOrganization404JSONResponseBodyStatusCode defines parameters for DeleteOrganization.
+type DeleteOrganization404JSONResponseBodyStatusCode float32
+
+// DeleteOrganization422JSONResponseBodyStatusCode defines parameters for DeleteOrganization.
+type DeleteOrganization422JSONResponseBodyStatusCode float32
+
+// DeleteOrganization500JSONResponseBodyStatusCode defines parameters for DeleteOrganization.
+type DeleteOrganization500JSONResponseBodyStatusCode float32
+
+// LoginV3JSONBody defines parameters for LoginV3.
+type LoginV3JSONBody struct {
+ CaptchaToken *string `json:"captchaToken,omitempty"`
+ Email string `json:"email"`
+ Password string `json:"password"`
+}
+
+// LoginV3400JSONResponseBodyStatusCode defines parameters for LoginV3.
+type LoginV3400JSONResponseBodyStatusCode float32
+
+// LoginV3401JSONResponseBodyStatusCode defines parameters for LoginV3.
+type LoginV3401JSONResponseBodyStatusCode float32
+
+// LoginV3403JSONResponseBodyStatusCode defines parameters for LoginV3.
+type LoginV3403JSONResponseBodyStatusCode float32
+
+// LoginV3404JSONResponseBodyStatusCode defines parameters for LoginV3.
+type LoginV3404JSONResponseBodyStatusCode float32
+
+// LoginV3422JSONResponseBodyStatusCode defines parameters for LoginV3.
+type LoginV3422JSONResponseBodyStatusCode float32
+
+// LoginV3500JSONResponseBodyStatusCode defines parameters for LoginV3.
+type LoginV3500JSONResponseBodyStatusCode float32
+
+// SelectOrganizationV3JSONBody defines parameters for SelectOrganizationV3.
+type SelectOrganizationV3JSONBody struct {
+ OrganizationId string `json:"organizationId"`
+ UserAgent *SelectOrganizationV3JSONBodyUserAgent `json:"userAgent,omitempty"`
+}
+
+// SelectOrganizationV3JSONBodyUserAgent defines parameters for SelectOrganizationV3.
+type SelectOrganizationV3JSONBodyUserAgent string
+
+// SelectOrganizationV3400JSONResponseBodyStatusCode defines parameters for SelectOrganizationV3.
+type SelectOrganizationV3400JSONResponseBodyStatusCode float32
+
+// SelectOrganizationV3401JSONResponseBodyStatusCode defines parameters for SelectOrganizationV3.
+type SelectOrganizationV3401JSONResponseBodyStatusCode float32
+
+// SelectOrganizationV3403JSONResponseBodyStatusCode defines parameters for SelectOrganizationV3.
+type SelectOrganizationV3403JSONResponseBodyStatusCode float32
+
+// SelectOrganizationV3404JSONResponseBodyStatusCode defines parameters for SelectOrganizationV3.
+type SelectOrganizationV3404JSONResponseBodyStatusCode float32
+
+// SelectOrganizationV3422JSONResponseBodyStatusCode defines parameters for SelectOrganizationV3.
+type SelectOrganizationV3422JSONResponseBodyStatusCode float32
+
+// SelectOrganizationV3500JSONResponseBodyStatusCode defines parameters for SelectOrganizationV3.
+type SelectOrganizationV3500JSONResponseBodyStatusCode float32
+
+// AdminBootstrapJSONRequestBody defines body for AdminBootstrap for application/json ContentType.
+type AdminBootstrapJSONRequestBody AdminBootstrapJSONBody
+
+// UpdateAdminConfigJSONRequestBody defines body for UpdateAdminConfig for application/json ContentType.
+type UpdateAdminConfigJSONRequestBody UpdateAdminConfigJSONBody
+
+// CreateProjectJSONRequestBody defines body for CreateProject for application/json ContentType.
+type CreateProjectJSONRequestBody CreateProjectJSONBody
+
+// CreateOrganizationJSONRequestBody defines body for CreateOrganization for application/json ContentType.
+type CreateOrganizationJSONRequestBody CreateOrganizationJSONBody
+
+// LoginV3JSONRequestBody defines body for LoginV3 for application/json ContentType.
+type LoginV3JSONRequestBody LoginV3JSONBody
+
+// SelectOrganizationV3JSONRequestBody defines body for SelectOrganizationV3 for application/json ContentType.
+type SelectOrganizationV3JSONRequestBody SelectOrganizationV3JSONBody
+
+// AsCreateProject200JSONResponseBodyProjectDeletedEnvironmentsDeletedBy0 returns the union data inside the CreateProject200JSONResponseBody_Project_DeletedEnvironments_DeletedBy as a CreateProject200JSONResponseBodyProjectDeletedEnvironmentsDeletedBy0
+func (t CreateProject200JSONResponseBody_Project_DeletedEnvironments_DeletedBy) AsCreateProject200JSONResponseBodyProjectDeletedEnvironmentsDeletedBy0() (CreateProject200JSONResponseBodyProjectDeletedEnvironmentsDeletedBy0, error) {
+ var body CreateProject200JSONResponseBodyProjectDeletedEnvironmentsDeletedBy0
+ err := json.Unmarshal(t.union, &body)
+ return body, err
+}
+
+// FromCreateProject200JSONResponseBodyProjectDeletedEnvironmentsDeletedBy0 overwrites any union data inside the CreateProject200JSONResponseBody_Project_DeletedEnvironments_DeletedBy as the provided CreateProject200JSONResponseBodyProjectDeletedEnvironmentsDeletedBy0
+func (t *CreateProject200JSONResponseBody_Project_DeletedEnvironments_DeletedBy) FromCreateProject200JSONResponseBodyProjectDeletedEnvironmentsDeletedBy0(v CreateProject200JSONResponseBodyProjectDeletedEnvironmentsDeletedBy0) error {
+ b, err := json.Marshal(v)
+ t.union = b
+ return err
+}
+
+// MergeCreateProject200JSONResponseBodyProjectDeletedEnvironmentsDeletedBy0 performs a merge with any union data inside the CreateProject200JSONResponseBody_Project_DeletedEnvironments_DeletedBy, using the provided CreateProject200JSONResponseBodyProjectDeletedEnvironmentsDeletedBy0
+func (t *CreateProject200JSONResponseBody_Project_DeletedEnvironments_DeletedBy) MergeCreateProject200JSONResponseBodyProjectDeletedEnvironmentsDeletedBy0(v CreateProject200JSONResponseBodyProjectDeletedEnvironmentsDeletedBy0) error {
+ b, err := json.Marshal(v)
+ if err != nil {
+ return err
+ }
+
+ merged, err := runtime.JSONMerge(t.union, b)
+ t.union = merged
+ return err
+}
+
+// AsCreateProject200JSONResponseBodyProjectDeletedEnvironmentsDeletedBy1 returns the union data inside the CreateProject200JSONResponseBody_Project_DeletedEnvironments_DeletedBy as a CreateProject200JSONResponseBodyProjectDeletedEnvironmentsDeletedBy1
+func (t CreateProject200JSONResponseBody_Project_DeletedEnvironments_DeletedBy) AsCreateProject200JSONResponseBodyProjectDeletedEnvironmentsDeletedBy1() (CreateProject200JSONResponseBodyProjectDeletedEnvironmentsDeletedBy1, error) {
+ var body CreateProject200JSONResponseBodyProjectDeletedEnvironmentsDeletedBy1
+ err := json.Unmarshal(t.union, &body)
+ return body, err
+}
+
+// FromCreateProject200JSONResponseBodyProjectDeletedEnvironmentsDeletedBy1 overwrites any union data inside the CreateProject200JSONResponseBody_Project_DeletedEnvironments_DeletedBy as the provided CreateProject200JSONResponseBodyProjectDeletedEnvironmentsDeletedBy1
+func (t *CreateProject200JSONResponseBody_Project_DeletedEnvironments_DeletedBy) FromCreateProject200JSONResponseBodyProjectDeletedEnvironmentsDeletedBy1(v CreateProject200JSONResponseBodyProjectDeletedEnvironmentsDeletedBy1) error {
+ b, err := json.Marshal(v)
+ t.union = b
+ return err
+}
+
+// MergeCreateProject200JSONResponseBodyProjectDeletedEnvironmentsDeletedBy1 performs a merge with any union data inside the CreateProject200JSONResponseBody_Project_DeletedEnvironments_DeletedBy, using the provided CreateProject200JSONResponseBodyProjectDeletedEnvironmentsDeletedBy1
+func (t *CreateProject200JSONResponseBody_Project_DeletedEnvironments_DeletedBy) MergeCreateProject200JSONResponseBodyProjectDeletedEnvironmentsDeletedBy1(v CreateProject200JSONResponseBodyProjectDeletedEnvironmentsDeletedBy1) error {
+ b, err := json.Marshal(v)
+ if err != nil {
+ return err
+ }
+
+ merged, err := runtime.JSONMerge(t.union, b)
+ t.union = merged
+ return err
+}
+
+func (t CreateProject200JSONResponseBody_Project_DeletedEnvironments_DeletedBy) MarshalJSON() ([]byte, error) {
+ b, err := t.union.MarshalJSON()
+ return b, err
+}
+
+func (t *CreateProject200JSONResponseBody_Project_DeletedEnvironments_DeletedBy) UnmarshalJSON(b []byte) error {
+ err := t.union.UnmarshalJSON(b)
+ return err
+}
+
+// RequestEditorFn is the function signature for the RequestEditor callback function
+type RequestEditorFn func(ctx context.Context, req *http.Request) error
+
+// Doer performs HTTP requests.
+//
+// The standard http.Client implements this interface.
+type HttpRequestDoer interface {
+ Do(req *http.Request) (*http.Response, error)
+}
+
+// Client which conforms to the OpenAPI3 specification for this service.
+type Client struct {
+ // The endpoint of the server conforming to this interface, with scheme,
+ // https://api.deepmap.com for example. This can contain a path relative
+ // to the server, such as https://api.deepmap.com/dev-test, and all the
+ // paths in the swagger spec will be appended to the server.
+ Server string
+
+ // Doer for performing requests, typically a *http.Client with any
+ // customized settings, such as certificate chains.
+ Client HttpRequestDoer
+
+ // A list of callbacks for modifying requests which are generated before sending over
+ // the network.
+ RequestEditors []RequestEditorFn
+}
+
+// ClientOption allows setting custom parameters during construction
+type ClientOption func(*Client) error
+
+// Creates a new Client, with reasonable defaults
+func NewClient(server string, opts ...ClientOption) (*Client, error) {
+ // create a client with sane default values
+ client := Client{
+ Server: server,
+ }
+ // mutate client and add all optional params
+ for _, o := range opts {
+ if err := o(&client); err != nil {
+ return nil, err
+ }
+ }
+ // ensure the server URL always has a trailing slash
+ if !strings.HasSuffix(client.Server, "/") {
+ client.Server += "/"
+ }
+ // create httpClient, if not already present
+ if client.Client == nil {
+ client.Client = &http.Client{}
+ }
+ return &client, nil
+}
+
+// WithHTTPClient allows overriding the default Doer, which is
+// automatically created using http.Client. This is useful for tests.
+func WithHTTPClient(doer HttpRequestDoer) ClientOption {
+ return func(c *Client) error {
+ c.Client = doer
+ return nil
+ }
+}
+
+// WithRequestEditorFn allows setting up a callback function, which will be
+// called right before sending the request. This can be used to mutate the request.
+func WithRequestEditorFn(fn RequestEditorFn) ClientOption {
+ return func(c *Client) error {
+ c.RequestEditors = append(c.RequestEditors, fn)
+ return nil
+ }
+}
+
+// The interface specification for the client above.
+type ClientInterface interface {
+
+ // GetServerStatus performs a GET /api/status (the `GetServerStatus` operationId) request.
+ GetServerStatus(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
+
+ // AdminBootstrapWithBody performs a POST /api/v1/admin/bootstrap (the `AdminBootstrap` operationId) request,
+ // with any type of body and a specified content type.
+ AdminBootstrapWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
+
+ // AdminBootstrap performs a POST /api/v1/admin/bootstrap (the `AdminBootstrap` operationId) request.
+ // Takes a body of the `application/json` content type.
+ AdminBootstrap(ctx context.Context, body AdminBootstrapJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
+
+ // UpdateAdminConfigWithBody performs a PATCH /api/v1/admin/config (the `UpdateAdminConfig` operationId) request,
+ // with any type of body and a specified content type.
+ UpdateAdminConfigWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
+
+ // UpdateAdminConfig performs a PATCH /api/v1/admin/config (the `UpdateAdminConfig` operationId) request.
+ // Takes a body of the `application/json` content type.
+ UpdateAdminConfig(ctx context.Context, body UpdateAdminConfigJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
+
+ // RefreshAuthToken performs a POST /api/v1/auth/token (the `RefreshAuthToken` operationId) request.
+ RefreshAuthToken(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
+
+ // GetOrganizationPlan performs a GET /api/v1/organizations/{organizationId}/plan (the `GetOrganizationPlan` operationId) request.
+ GetOrganizationPlan(ctx context.Context, organizationId string, params *GetOrganizationPlanParams, reqEditors ...RequestEditorFn) (*http.Response, error)
+
+ // CreateProjectWithBody performs a POST /api/v1/projects (the `CreateProject` operationId) request,
+ // with any type of body and a specified content type.
+ //
+ // Create a new project.
+ CreateProjectWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
+
+ // CreateProject performs a POST /api/v1/projects (the `CreateProject` operationId) request.
+ // Takes a body of the `application/json` content type.
+ //
+ // Create a new project.
+ CreateProject(ctx context.Context, body CreateProjectJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
+
+ // CreateOrganizationWithBody performs a POST /api/v2/organizations (the `CreateOrganization` operationId) request,
+ // with any type of body and a specified content type.
+ CreateOrganizationWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
+
+ // CreateOrganization performs a POST /api/v2/organizations (the `CreateOrganization` operationId) request.
+ // Takes a body of the `application/json` content type.
+ CreateOrganization(ctx context.Context, body CreateOrganizationJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
+
+ // DeleteOrganization performs a DELETE /api/v2/organizations/{organizationId} (the `DeleteOrganization` operationId) request.
+ DeleteOrganization(ctx context.Context, organizationId string, reqEditors ...RequestEditorFn) (*http.Response, error)
+
+ // LoginV3WithBody performs a POST /api/v3/auth/login (the `LoginV3` operationId) request,
+ // with any type of body and a specified content type.
+ LoginV3WithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
+
+ // LoginV3 performs a POST /api/v3/auth/login (the `LoginV3` operationId) request.
+ // Takes a body of the `application/json` content type.
+ LoginV3(ctx context.Context, body LoginV3JSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
+
+ // SelectOrganizationV3WithBody performs a POST /api/v3/auth/select-organization (the `SelectOrganizationV3` operationId) request,
+ // with any type of body and a specified content type.
+ SelectOrganizationV3WithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
+
+ // SelectOrganizationV3 performs a POST /api/v3/auth/select-organization (the `SelectOrganizationV3` operationId) request.
+ // Takes a body of the `application/json` content type.
+ SelectOrganizationV3(ctx context.Context, body SelectOrganizationV3JSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
+}
+
+// GetServerStatus performs a GET /api/status (the `GetServerStatus` operationId) request.
+func (c *Client) GetServerStatus(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) {
+ req, err := NewGetServerStatusRequest(c.Server)
+ if err != nil {
+ return nil, err
+ }
+ req = req.WithContext(ctx)
+ if err := c.applyEditors(ctx, req, reqEditors); err != nil {
+ return nil, err
+ }
+ return c.Client.Do(req)
+}
+
+// AdminBootstrapWithBody performs a POST /api/v1/admin/bootstrap (the `AdminBootstrap` operationId) request,
+// with any type of body and a specified content type.
+func (c *Client) AdminBootstrapWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
+ req, err := NewAdminBootstrapRequestWithBody(c.Server, contentType, body)
+ if err != nil {
+ return nil, err
+ }
+ req = req.WithContext(ctx)
+ if err := c.applyEditors(ctx, req, reqEditors); err != nil {
+ return nil, err
+ }
+ return c.Client.Do(req)
+}
+
+// AdminBootstrap performs a POST /api/v1/admin/bootstrap (the `AdminBootstrap` operationId) request.
+// Takes a body of the `application/json` content type.
+func (c *Client) AdminBootstrap(ctx context.Context, body AdminBootstrapJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
+ req, err := NewAdminBootstrapRequest(c.Server, body)
+ if err != nil {
+ return nil, err
+ }
+ req = req.WithContext(ctx)
+ if err := c.applyEditors(ctx, req, reqEditors); err != nil {
+ return nil, err
+ }
+ return c.Client.Do(req)
+}
+
+// UpdateAdminConfigWithBody performs a PATCH /api/v1/admin/config (the `UpdateAdminConfig` operationId) request,
+// with any type of body and a specified content type.
+func (c *Client) UpdateAdminConfigWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
+ req, err := NewUpdateAdminConfigRequestWithBody(c.Server, contentType, body)
+ if err != nil {
+ return nil, err
+ }
+ req = req.WithContext(ctx)
+ if err := c.applyEditors(ctx, req, reqEditors); err != nil {
+ return nil, err
+ }
+ return c.Client.Do(req)
+}
+
+// UpdateAdminConfig performs a PATCH /api/v1/admin/config (the `UpdateAdminConfig` operationId) request.
+// Takes a body of the `application/json` content type.
+func (c *Client) UpdateAdminConfig(ctx context.Context, body UpdateAdminConfigJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
+ req, err := NewUpdateAdminConfigRequest(c.Server, body)
+ if err != nil {
+ return nil, err
+ }
+ req = req.WithContext(ctx)
+ if err := c.applyEditors(ctx, req, reqEditors); err != nil {
+ return nil, err
+ }
+ return c.Client.Do(req)
+}
+
+// RefreshAuthToken performs a POST /api/v1/auth/token (the `RefreshAuthToken` operationId) request.
+func (c *Client) RefreshAuthToken(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) {
+ req, err := NewRefreshAuthTokenRequest(c.Server)
+ if err != nil {
+ return nil, err
+ }
+ req = req.WithContext(ctx)
+ if err := c.applyEditors(ctx, req, reqEditors); err != nil {
+ return nil, err
+ }
+ return c.Client.Do(req)
+}
+
+// GetOrganizationPlan performs a GET /api/v1/organizations/{organizationId}/plan (the `GetOrganizationPlan` operationId) request.
+func (c *Client) GetOrganizationPlan(ctx context.Context, organizationId string, params *GetOrganizationPlanParams, reqEditors ...RequestEditorFn) (*http.Response, error) {
+ req, err := NewGetOrganizationPlanRequest(c.Server, organizationId, params)
+ if err != nil {
+ return nil, err
+ }
+ req = req.WithContext(ctx)
+ if err := c.applyEditors(ctx, req, reqEditors); err != nil {
+ return nil, err
+ }
+ return c.Client.Do(req)
+}
+
+// CreateProjectWithBody performs a POST /api/v1/projects (the `CreateProject` operationId) request,
+// with any type of body and a specified content type.
+//
+// Create a new project.
+func (c *Client) CreateProjectWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
+ req, err := NewCreateProjectRequestWithBody(c.Server, contentType, body)
+ if err != nil {
+ return nil, err
+ }
+ req = req.WithContext(ctx)
+ if err := c.applyEditors(ctx, req, reqEditors); err != nil {
+ return nil, err
+ }
+ return c.Client.Do(req)
+}
+
+// CreateProject performs a POST /api/v1/projects (the `CreateProject` operationId) request.
+// Takes a body of the `application/json` content type.
+//
+// Create a new project.
+func (c *Client) CreateProject(ctx context.Context, body CreateProjectJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
+ req, err := NewCreateProjectRequest(c.Server, body)
+ if err != nil {
+ return nil, err
+ }
+ req = req.WithContext(ctx)
+ if err := c.applyEditors(ctx, req, reqEditors); err != nil {
+ return nil, err
+ }
+ return c.Client.Do(req)
+}
+
+// CreateOrganizationWithBody performs a POST /api/v2/organizations (the `CreateOrganization` operationId) request,
+// with any type of body and a specified content type.
+func (c *Client) CreateOrganizationWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
+ req, err := NewCreateOrganizationRequestWithBody(c.Server, contentType, body)
+ if err != nil {
+ return nil, err
+ }
+ req = req.WithContext(ctx)
+ if err := c.applyEditors(ctx, req, reqEditors); err != nil {
+ return nil, err
+ }
+ return c.Client.Do(req)
+}
+
+// CreateOrganization performs a POST /api/v2/organizations (the `CreateOrganization` operationId) request.
+// Takes a body of the `application/json` content type.
+func (c *Client) CreateOrganization(ctx context.Context, body CreateOrganizationJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
+ req, err := NewCreateOrganizationRequest(c.Server, body)
+ if err != nil {
+ return nil, err
+ }
+ req = req.WithContext(ctx)
+ if err := c.applyEditors(ctx, req, reqEditors); err != nil {
+ return nil, err
+ }
+ return c.Client.Do(req)
+}
+
+// DeleteOrganization performs a DELETE /api/v2/organizations/{organizationId} (the `DeleteOrganization` operationId) request.
+func (c *Client) DeleteOrganization(ctx context.Context, organizationId string, reqEditors ...RequestEditorFn) (*http.Response, error) {
+ req, err := NewDeleteOrganizationRequest(c.Server, organizationId)
+ if err != nil {
+ return nil, err
+ }
+ req = req.WithContext(ctx)
+ if err := c.applyEditors(ctx, req, reqEditors); err != nil {
+ return nil, err
+ }
+ return c.Client.Do(req)
+}
+
+// LoginV3WithBody performs a POST /api/v3/auth/login (the `LoginV3` operationId) request,
+// with any type of body and a specified content type.
+func (c *Client) LoginV3WithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
+ req, err := NewLoginV3RequestWithBody(c.Server, contentType, body)
+ if err != nil {
+ return nil, err
+ }
+ req = req.WithContext(ctx)
+ if err := c.applyEditors(ctx, req, reqEditors); err != nil {
+ return nil, err
+ }
+ return c.Client.Do(req)
+}
+
+// LoginV3 performs a POST /api/v3/auth/login (the `LoginV3` operationId) request.
+// Takes a body of the `application/json` content type.
+func (c *Client) LoginV3(ctx context.Context, body LoginV3JSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
+ req, err := NewLoginV3Request(c.Server, body)
+ if err != nil {
+ return nil, err
+ }
+ req = req.WithContext(ctx)
+ if err := c.applyEditors(ctx, req, reqEditors); err != nil {
+ return nil, err
+ }
+ return c.Client.Do(req)
+}
+
+// SelectOrganizationV3WithBody performs a POST /api/v3/auth/select-organization (the `SelectOrganizationV3` operationId) request,
+// with any type of body and a specified content type.
+func (c *Client) SelectOrganizationV3WithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
+ req, err := NewSelectOrganizationV3RequestWithBody(c.Server, contentType, body)
+ if err != nil {
+ return nil, err
+ }
+ req = req.WithContext(ctx)
+ if err := c.applyEditors(ctx, req, reqEditors); err != nil {
+ return nil, err
+ }
+ return c.Client.Do(req)
+}
+
+// SelectOrganizationV3 performs a POST /api/v3/auth/select-organization (the `SelectOrganizationV3` operationId) request.
+// Takes a body of the `application/json` content type.
+func (c *Client) SelectOrganizationV3(ctx context.Context, body SelectOrganizationV3JSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
+ req, err := NewSelectOrganizationV3Request(c.Server, body)
+ if err != nil {
+ return nil, err
+ }
+ req = req.WithContext(ctx)
+ if err := c.applyEditors(ctx, req, reqEditors); err != nil {
+ return nil, err
+ }
+ return c.Client.Do(req)
+}
+
+// NewGetServerStatusRequest constructs an http.Request for the GetServerStatus method
+func NewGetServerStatusRequest(server string) (*http.Request, error) {
+ var err error
+
+ serverURL, err := url.Parse(server)
+ if err != nil {
+ return nil, err
+ }
+
+ operationPath := fmt.Sprintf("/api/status")
+ if operationPath[0] == '/' {
+ operationPath = "." + operationPath
+ }
+
+ queryURL, err := serverURL.Parse(operationPath)
+ if err != nil {
+ return nil, err
+ }
+
+ req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil)
+ if err != nil {
+ return nil, err
+ }
+
+ return req, nil
+}
+
+// NewAdminBootstrapRequest calls the generic AdminBootstrap builder with application/json body
+func NewAdminBootstrapRequest(server string, body AdminBootstrapJSONRequestBody) (*http.Request, error) {
+ var bodyReader io.Reader
+ buf, err := json.Marshal(body)
+ if err != nil {
+ return nil, err
+ }
+ bodyReader = bytes.NewReader(buf)
+ return NewAdminBootstrapRequestWithBody(server, "application/json", bodyReader)
+}
+
+// NewAdminBootstrapRequestWithBody constructs an http.Request for the AdminBootstrap method, with any body, and a specified content type
+func NewAdminBootstrapRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) {
+ var err error
+
+ serverURL, err := url.Parse(server)
+ if err != nil {
+ return nil, err
+ }
+
+ operationPath := fmt.Sprintf("/api/v1/admin/bootstrap")
+ if operationPath[0] == '/' {
+ operationPath = "." + operationPath
+ }
+
+ queryURL, err := serverURL.Parse(operationPath)
+ if err != nil {
+ return nil, err
+ }
+
+ req, err := http.NewRequest(http.MethodPost, queryURL.String(), body)
+ if err != nil {
+ return nil, err
+ }
+
+ req.Header.Add("Content-Type", contentType)
+
+ return req, nil
+}
+
+// NewUpdateAdminConfigRequest calls the generic UpdateAdminConfig builder with application/json body
+func NewUpdateAdminConfigRequest(server string, body UpdateAdminConfigJSONRequestBody) (*http.Request, error) {
+ var bodyReader io.Reader
+ buf, err := json.Marshal(body)
+ if err != nil {
+ return nil, err
+ }
+ bodyReader = bytes.NewReader(buf)
+ return NewUpdateAdminConfigRequestWithBody(server, "application/json", bodyReader)
+}
+
+// NewUpdateAdminConfigRequestWithBody constructs an http.Request for the UpdateAdminConfig method, with any body, and a specified content type
+func NewUpdateAdminConfigRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) {
+ var err error
+
+ serverURL, err := url.Parse(server)
+ if err != nil {
+ return nil, err
+ }
+
+ operationPath := fmt.Sprintf("/api/v1/admin/config")
+ if operationPath[0] == '/' {
+ operationPath = "." + operationPath
+ }
+
+ queryURL, err := serverURL.Parse(operationPath)
+ if err != nil {
+ return nil, err
+ }
+
+ req, err := http.NewRequest(http.MethodPatch, queryURL.String(), body)
+ if err != nil {
+ return nil, err
+ }
+
+ req.Header.Add("Content-Type", contentType)
+
+ return req, nil
+}
+
+// NewRefreshAuthTokenRequest constructs an http.Request for the RefreshAuthToken method
+func NewRefreshAuthTokenRequest(server string) (*http.Request, error) {
+ var err error
+
+ serverURL, err := url.Parse(server)
+ if err != nil {
+ return nil, err
+ }
+
+ operationPath := fmt.Sprintf("/api/v1/auth/token")
+ if operationPath[0] == '/' {
+ operationPath = "." + operationPath
+ }
+
+ queryURL, err := serverURL.Parse(operationPath)
+ if err != nil {
+ return nil, err
+ }
+
+ req, err := http.NewRequest(http.MethodPost, queryURL.String(), nil)
+ if err != nil {
+ return nil, err
+ }
+
+ return req, nil
+}
+
+// NewGetOrganizationPlanRequest constructs an http.Request for the GetOrganizationPlan method
+func NewGetOrganizationPlanRequest(server string, organizationId string, params *GetOrganizationPlanParams) (*http.Request, error) {
+ var err error
+
+ var pathParam0 string
+
+ pathParam0, err = runtime.StyleParamWithOptions("simple", false, "organizationId", organizationId, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""})
+ if err != nil {
+ return nil, err
+ }
+
+ serverURL, err := url.Parse(server)
+ if err != nil {
+ return nil, err
+ }
+
+ operationPath := fmt.Sprintf("/api/v1/organizations/%s/plan", pathParam0)
+ if operationPath[0] == '/' {
+ operationPath = "." + operationPath
+ }
+
+ queryURL, err := serverURL.Parse(operationPath)
+ if err != nil {
+ return nil, err
+ }
+
+ if params != nil {
+ // queryValues collects non-styled parameters (passthrough, JSON)
+ // that are safe to round-trip through url.Values.Encode().
+ queryValues := queryURL.Query()
+ // rawQueryFragments collects pre-encoded query fragments from
+ // styled parameters, preserving literal commas as delimiters
+ // per the OpenAPI spec (e.g. "color=blue,black,brown").
+ var rawQueryFragments []string
+
+ if params.RefreshCache != nil {
+
+ if queryFrag, err := runtime.StyleParamWithOptions("form", true, "refreshCache", *params.RefreshCache, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil {
+ return nil, err
+ } else {
+ for _, qp := range strings.Split(queryFrag, "&") {
+ rawQueryFragments = append(rawQueryFragments, qp)
+ }
+ }
+
+ }
+
+ if encoded := queryValues.Encode(); encoded != "" {
+ rawQueryFragments = append(rawQueryFragments, encoded)
+ }
+ queryURL.RawQuery = strings.Join(rawQueryFragments, "&")
+ }
+
+ req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil)
+ if err != nil {
+ return nil, err
+ }
+
+ return req, nil
+}
+
+// NewCreateProjectRequest calls the generic CreateProject builder with application/json body
+func NewCreateProjectRequest(server string, body CreateProjectJSONRequestBody) (*http.Request, error) {
+ var bodyReader io.Reader
+ buf, err := json.Marshal(body)
+ if err != nil {
+ return nil, err
+ }
+ bodyReader = bytes.NewReader(buf)
+ return NewCreateProjectRequestWithBody(server, "application/json", bodyReader)
+}
+
+// NewCreateProjectRequestWithBody constructs an http.Request for the CreateProject method, with any body, and a specified content type
+func NewCreateProjectRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) {
+ var err error
+
+ serverURL, err := url.Parse(server)
+ if err != nil {
+ return nil, err
+ }
+
+ operationPath := fmt.Sprintf("/api/v1/projects")
+ if operationPath[0] == '/' {
+ operationPath = "." + operationPath
+ }
+
+ queryURL, err := serverURL.Parse(operationPath)
+ if err != nil {
+ return nil, err
+ }
+
+ req, err := http.NewRequest(http.MethodPost, queryURL.String(), body)
+ if err != nil {
+ return nil, err
+ }
+
+ req.Header.Add("Content-Type", contentType)
+
+ return req, nil
+}
+
+// NewCreateOrganizationRequest calls the generic CreateOrganization builder with application/json body
+func NewCreateOrganizationRequest(server string, body CreateOrganizationJSONRequestBody) (*http.Request, error) {
+ var bodyReader io.Reader
+ buf, err := json.Marshal(body)
+ if err != nil {
+ return nil, err
+ }
+ bodyReader = bytes.NewReader(buf)
+ return NewCreateOrganizationRequestWithBody(server, "application/json", bodyReader)
+}
+
+// NewCreateOrganizationRequestWithBody constructs an http.Request for the CreateOrganization method, with any body, and a specified content type
+func NewCreateOrganizationRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) {
+ var err error
+
+ serverURL, err := url.Parse(server)
+ if err != nil {
+ return nil, err
+ }
+
+ operationPath := fmt.Sprintf("/api/v2/organizations")
+ if operationPath[0] == '/' {
+ operationPath = "." + operationPath
+ }
+
+ queryURL, err := serverURL.Parse(operationPath)
+ if err != nil {
+ return nil, err
+ }
+
+ req, err := http.NewRequest(http.MethodPost, queryURL.String(), body)
+ if err != nil {
+ return nil, err
+ }
+
+ req.Header.Add("Content-Type", contentType)
+
+ return req, nil
+}
+
+// NewDeleteOrganizationRequest constructs an http.Request for the DeleteOrganization method
+func NewDeleteOrganizationRequest(server string, organizationId string) (*http.Request, error) {
+ var err error
+
+ var pathParam0 string
+
+ pathParam0, err = runtime.StyleParamWithOptions("simple", false, "organizationId", organizationId, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""})
+ if err != nil {
+ return nil, err
+ }
+
+ serverURL, err := url.Parse(server)
+ if err != nil {
+ return nil, err
+ }
+
+ operationPath := fmt.Sprintf("/api/v2/organizations/%s", pathParam0)
+ if operationPath[0] == '/' {
+ operationPath = "." + operationPath
+ }
+
+ queryURL, err := serverURL.Parse(operationPath)
+ if err != nil {
+ return nil, err
+ }
+
+ req, err := http.NewRequest(http.MethodDelete, queryURL.String(), nil)
+ if err != nil {
+ return nil, err
+ }
+
+ return req, nil
+}
+
+// NewLoginV3Request calls the generic LoginV3 builder with application/json body
+func NewLoginV3Request(server string, body LoginV3JSONRequestBody) (*http.Request, error) {
+ var bodyReader io.Reader
+ buf, err := json.Marshal(body)
+ if err != nil {
+ return nil, err
+ }
+ bodyReader = bytes.NewReader(buf)
+ return NewLoginV3RequestWithBody(server, "application/json", bodyReader)
+}
+
+// NewLoginV3RequestWithBody constructs an http.Request for the LoginV3 method, with any body, and a specified content type
+func NewLoginV3RequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) {
+ var err error
+
+ serverURL, err := url.Parse(server)
+ if err != nil {
+ return nil, err
+ }
+
+ operationPath := fmt.Sprintf("/api/v3/auth/login")
+ if operationPath[0] == '/' {
+ operationPath = "." + operationPath
+ }
+
+ queryURL, err := serverURL.Parse(operationPath)
+ if err != nil {
+ return nil, err
+ }
+
+ req, err := http.NewRequest(http.MethodPost, queryURL.String(), body)
+ if err != nil {
+ return nil, err
+ }
+
+ req.Header.Add("Content-Type", contentType)
+
+ return req, nil
+}
+
+// NewSelectOrganizationV3Request calls the generic SelectOrganizationV3 builder with application/json body
+func NewSelectOrganizationV3Request(server string, body SelectOrganizationV3JSONRequestBody) (*http.Request, error) {
+ var bodyReader io.Reader
+ buf, err := json.Marshal(body)
+ if err != nil {
+ return nil, err
+ }
+ bodyReader = bytes.NewReader(buf)
+ return NewSelectOrganizationV3RequestWithBody(server, "application/json", bodyReader)
+}
+
+// NewSelectOrganizationV3RequestWithBody constructs an http.Request for the SelectOrganizationV3 method, with any body, and a specified content type
+func NewSelectOrganizationV3RequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) {
+ var err error
+
+ serverURL, err := url.Parse(server)
+ if err != nil {
+ return nil, err
+ }
+
+ operationPath := fmt.Sprintf("/api/v3/auth/select-organization")
+ if operationPath[0] == '/' {
+ operationPath = "." + operationPath
+ }
+
+ queryURL, err := serverURL.Parse(operationPath)
+ if err != nil {
+ return nil, err
+ }
+
+ req, err := http.NewRequest(http.MethodPost, queryURL.String(), body)
+ if err != nil {
+ return nil, err
+ }
+
+ req.Header.Add("Content-Type", contentType)
+
+ return req, nil
+}
+
+func (c *Client) applyEditors(ctx context.Context, req *http.Request, additionalEditors []RequestEditorFn) error {
+ for _, r := range c.RequestEditors {
+ if err := r(ctx, req); err != nil {
+ return err
+ }
+ }
+ for _, r := range additionalEditors {
+ if err := r(ctx, req); err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+// ClientWithResponses builds on ClientInterface to offer response payloads
+type ClientWithResponses struct {
+ ClientInterface
+}
+
+// NewClientWithResponses creates a new ClientWithResponses, which wraps
+// Client with return type handling
+func NewClientWithResponses(server string, opts ...ClientOption) (*ClientWithResponses, error) {
+ client, err := NewClient(server, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return &ClientWithResponses{client}, nil
+}
+
+// WithBaseURL overrides the baseURL.
+func WithBaseURL(baseURL string) ClientOption {
+ return func(c *Client) error {
+ newBaseURL, err := url.Parse(baseURL)
+ if err != nil {
+ return err
+ }
+ c.Server = newBaseURL.String()
+ return nil
+ }
+}
+
+// ClientWithResponsesInterface is the interface specification for the client with responses above.
+type ClientWithResponsesInterface interface {
+
+ // GetServerStatusWithResponse performs a GET /api/status (the `GetServerStatus` operationId) request.
+ //
+ // Returns a wrapper object for the known response body format(s).
+ GetServerStatusWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetServerStatusResponse, error)
+
+ // AdminBootstrapWithBodyWithResponse performs a POST /api/v1/admin/bootstrap (the `AdminBootstrap` operationId) request,
+ // with any type of body and a specified content type.
+ //
+ // Returns a wrapper object for the known response body format(s).
+ AdminBootstrapWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*AdminBootstrapResponse, error)
+
+ // AdminBootstrapWithResponse performs a POST /api/v1/admin/bootstrap (the `AdminBootstrap` operationId) request.
+ // Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
+ AdminBootstrapWithResponse(ctx context.Context, body AdminBootstrapJSONRequestBody, reqEditors ...RequestEditorFn) (*AdminBootstrapResponse, error)
+
+ // UpdateAdminConfigWithBodyWithResponse performs a PATCH /api/v1/admin/config (the `UpdateAdminConfig` operationId) request,
+ // with any type of body and a specified content type.
+ //
+ // Returns a wrapper object for the known response body format(s).
+ UpdateAdminConfigWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateAdminConfigResponse, error)
+
+ // UpdateAdminConfigWithResponse performs a PATCH /api/v1/admin/config (the `UpdateAdminConfig` operationId) request.
+ // Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
+ UpdateAdminConfigWithResponse(ctx context.Context, body UpdateAdminConfigJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateAdminConfigResponse, error)
+
+ // RefreshAuthTokenWithResponse performs a POST /api/v1/auth/token (the `RefreshAuthToken` operationId) request.
+ //
+ // Returns a wrapper object for the known response body format(s).
+ RefreshAuthTokenWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*RefreshAuthTokenResponse, error)
+
+ // GetOrganizationPlanWithResponse performs a GET /api/v1/organizations/{organizationId}/plan (the `GetOrganizationPlan` operationId) request.
+ //
+ // Returns a wrapper object for the known response body format(s).
+ GetOrganizationPlanWithResponse(ctx context.Context, organizationId string, params *GetOrganizationPlanParams, reqEditors ...RequestEditorFn) (*GetOrganizationPlanResponse, error)
+
+ // CreateProjectWithBodyWithResponse performs a POST /api/v1/projects (the `CreateProject` operationId) request,
+ // with any type of body and a specified content type.
+ //
+ // Create a new project.
+ //
+ // Returns a wrapper object for the known response body format(s).
+ CreateProjectWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateProjectResponse, error)
+
+ // CreateProjectWithResponse performs a POST /api/v1/projects (the `CreateProject` operationId) request.
+ // Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
+ //
+ // Create a new project.
+ CreateProjectWithResponse(ctx context.Context, body CreateProjectJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateProjectResponse, error)
+
+ // CreateOrganizationWithBodyWithResponse performs a POST /api/v2/organizations (the `CreateOrganization` operationId) request,
+ // with any type of body and a specified content type.
+ //
+ // Returns a wrapper object for the known response body format(s).
+ CreateOrganizationWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateOrganizationResponse, error)
+
+ // CreateOrganizationWithResponse performs a POST /api/v2/organizations (the `CreateOrganization` operationId) request.
+ // Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
+ CreateOrganizationWithResponse(ctx context.Context, body CreateOrganizationJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateOrganizationResponse, error)
+
+ // DeleteOrganizationWithResponse performs a DELETE /api/v2/organizations/{organizationId} (the `DeleteOrganization` operationId) request.
+ //
+ // Returns a wrapper object for the known response body format(s).
+ DeleteOrganizationWithResponse(ctx context.Context, organizationId string, reqEditors ...RequestEditorFn) (*DeleteOrganizationResponse, error)
+
+ // LoginV3WithBodyWithResponse performs a POST /api/v3/auth/login (the `LoginV3` operationId) request,
+ // with any type of body and a specified content type.
+ //
+ // Returns a wrapper object for the known response body format(s).
+ LoginV3WithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*LoginV3Response, error)
+
+ // LoginV3WithResponse performs a POST /api/v3/auth/login (the `LoginV3` operationId) request.
+ // Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
+ LoginV3WithResponse(ctx context.Context, body LoginV3JSONRequestBody, reqEditors ...RequestEditorFn) (*LoginV3Response, error)
+
+ // SelectOrganizationV3WithBodyWithResponse performs a POST /api/v3/auth/select-organization (the `SelectOrganizationV3` operationId) request,
+ // with any type of body and a specified content type.
+ //
+ // Returns a wrapper object for the known response body format(s).
+ SelectOrganizationV3WithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SelectOrganizationV3Response, error)
+
+ // SelectOrganizationV3WithResponse performs a POST /api/v3/auth/select-organization (the `SelectOrganizationV3` operationId) request.
+ // Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
+ SelectOrganizationV3WithResponse(ctx context.Context, body SelectOrganizationV3JSONRequestBody, reqEditors ...RequestEditorFn) (*SelectOrganizationV3Response, error)
+}
+
+type GetServerStatusResponse struct {
+ Body []byte
+ HTTPResponse *http.Response
+ // JSON200 the response for an HTTP 200 `application/json` response
+ JSON200 *struct {
+ AuditLogStorageDisabled *bool `json:"auditLogStorageDisabled,omitempty"`
+ Date time.Time `json:"date"`
+ EmailConfigured *bool `json:"emailConfigured,omitempty"`
+ InviteOnlySignup *bool `json:"inviteOnlySignup,omitempty"`
+ MaxIdentityAccessTokenTTL *float32 `json:"maxIdentityAccessTokenTTL,omitempty"`
+ Message *string `json:"message,omitempty"`
+ RedisConfigured *bool `json:"redisConfigured,omitempty"`
+ SamlDefaultOrgSlug *string `json:"samlDefaultOrgSlug,omitempty"`
+ SecretScanningConfigured *bool `json:"secretScanningConfigured,omitempty"`
+ }
+ // JSON400 the response for an HTTP 400 `application/json` response
+ JSON400 *struct {
+ Details interface{} `json:"details,omitempty"`
+ Error string `json:"error"`
+ Message string `json:"message"`
+ ReqId string `json:"reqId"`
+ StatusCode GetServerStatus400JSONResponseBodyStatusCode `json:"statusCode"`
+ }
+ // JSON401 the response for an HTTP 401 `application/json` response
+ JSON401 *struct {
+ Error string `json:"error"`
+ Message string `json:"message"`
+ ReqId string `json:"reqId"`
+ StatusCode GetServerStatus401JSONResponseBodyStatusCode `json:"statusCode"`
+ }
+ // JSON403 the response for an HTTP 403 `application/json` response
+ JSON403 *struct {
+ Details interface{} `json:"details,omitempty"`
+ Error string `json:"error"`
+ Message string `json:"message"`
+ ReqId string `json:"reqId"`
+ StatusCode GetServerStatus403JSONResponseBodyStatusCode `json:"statusCode"`
+ }
+ // JSON404 the response for an HTTP 404 `application/json` response
+ JSON404 *struct {
+ Error string `json:"error"`
+ Message string `json:"message"`
+ ReqId string `json:"reqId"`
+ StatusCode GetServerStatus404JSONResponseBodyStatusCode `json:"statusCode"`
+ }
+ // JSON422 the response for an HTTP 422 `application/json` response
+ JSON422 *struct {
+ Error string `json:"error"`
+ Message interface{} `json:"message,omitempty"`
+ ReqId string `json:"reqId"`
+ StatusCode GetServerStatus422JSONResponseBodyStatusCode `json:"statusCode"`
+ }
+ // JSON500 the response for an HTTP 500 `application/json` response
+ JSON500 *struct {
+ Error string `json:"error"`
+ Message string `json:"message"`
+ ReqId string `json:"reqId"`
+ StatusCode GetServerStatus500JSONResponseBodyStatusCode `json:"statusCode"`
+ }
+}
+
+// GetJSON200 returns the response for an HTTP 200 `application/json` response
+func (r GetServerStatusResponse) GetJSON200() *struct {
+ AuditLogStorageDisabled *bool `json:"auditLogStorageDisabled,omitempty"`
+ Date time.Time `json:"date"`
+ EmailConfigured *bool `json:"emailConfigured,omitempty"`
+ InviteOnlySignup *bool `json:"inviteOnlySignup,omitempty"`
+ MaxIdentityAccessTokenTTL *float32 `json:"maxIdentityAccessTokenTTL,omitempty"`
+ Message *string `json:"message,omitempty"`
+ RedisConfigured *bool `json:"redisConfigured,omitempty"`
+ SamlDefaultOrgSlug *string `json:"samlDefaultOrgSlug,omitempty"`
+ SecretScanningConfigured *bool `json:"secretScanningConfigured,omitempty"`
+} {
+ return r.JSON200
+}
+
+// GetJSON400 returns the response for an HTTP 400 `application/json` response
+func (r GetServerStatusResponse) GetJSON400() *struct {
+ Details interface{} `json:"details,omitempty"`
+ Error string `json:"error"`
+ Message string `json:"message"`
+ ReqId string `json:"reqId"`
+ StatusCode GetServerStatus400JSONResponseBodyStatusCode `json:"statusCode"`
+} {
+ return r.JSON400
+}
+
+// GetJSON401 returns the response for an HTTP 401 `application/json` response
+func (r GetServerStatusResponse) GetJSON401() *struct {
+ Error string `json:"error"`
+ Message string `json:"message"`
+ ReqId string `json:"reqId"`
+ StatusCode GetServerStatus401JSONResponseBodyStatusCode `json:"statusCode"`
+} {
+ return r.JSON401
+}
+
+// GetJSON403 returns the response for an HTTP 403 `application/json` response
+func (r GetServerStatusResponse) GetJSON403() *struct {
+ Details interface{} `json:"details,omitempty"`
+ Error string `json:"error"`
+ Message string `json:"message"`
+ ReqId string `json:"reqId"`
+ StatusCode GetServerStatus403JSONResponseBodyStatusCode `json:"statusCode"`
+} {
+ return r.JSON403
+}
+
+// GetJSON404 returns the response for an HTTP 404 `application/json` response
+func (r GetServerStatusResponse) GetJSON404() *struct {
+ Error string `json:"error"`
+ Message string `json:"message"`
+ ReqId string `json:"reqId"`
+ StatusCode GetServerStatus404JSONResponseBodyStatusCode `json:"statusCode"`
+} {
+ return r.JSON404
+}
+
+// GetJSON422 returns the response for an HTTP 422 `application/json` response
+func (r GetServerStatusResponse) GetJSON422() *struct {
+ Error string `json:"error"`
+ Message interface{} `json:"message,omitempty"`
+ ReqId string `json:"reqId"`
+ StatusCode GetServerStatus422JSONResponseBodyStatusCode `json:"statusCode"`
+} {
+ return r.JSON422
+}
+
+// GetJSON500 returns the response for an HTTP 500 `application/json` response
+func (r GetServerStatusResponse) GetJSON500() *struct {
+ Error string `json:"error"`
+ Message string `json:"message"`
+ ReqId string `json:"reqId"`
+ StatusCode GetServerStatus500JSONResponseBodyStatusCode `json:"statusCode"`
+} {
+ return r.JSON500
+}
+
+// GetBody returns the raw response body bytes
+func (r GetServerStatusResponse) GetBody() []byte {
+ return r.Body
+}
+
+// Status returns HTTPResponse.Status
+func (r GetServerStatusResponse) Status() string {
+ if r.HTTPResponse != nil {
+ return r.HTTPResponse.Status
+ }
+ return http.StatusText(0)
+}
+
+// StatusCode returns HTTPResponse.StatusCode
+func (r GetServerStatusResponse) StatusCode() int {
+ if r.HTTPResponse != nil {
+ return r.HTTPResponse.StatusCode
+ }
+ return 0
+}
+
+// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
+func (r GetServerStatusResponse) ContentType() string {
+ if r.HTTPResponse != nil {
+ return r.HTTPResponse.Header.Get("Content-Type")
+ }
+ return ""
+}
+
+type AdminBootstrapResponse struct {
+ Body []byte
+ HTTPResponse *http.Response
+ // JSON200 the response for an HTTP 200 `application/json` response
+ JSON200 *struct {
+ Identity struct {
+ Credentials struct {
+ Token string `json:"token"`
+ } `json:"credentials"`
+ Id openapi_types.UUID `json:"id"`
+ Name string `json:"name"`
+ } `json:"identity"`
+ Message string `json:"message"`
+ Organization struct {
+ Id openapi_types.UUID `json:"id"`
+ Name string `json:"name"`
+ Slug string `json:"slug"`
+ } `json:"organization"`
+ User struct {
+ Email *string `json:"email,omitempty"`
+ FirstName *string `json:"firstName,omitempty"`
+ Id openapi_types.UUID `json:"id"`
+ LastName *string `json:"lastName,omitempty"`
+ SuperAdmin *bool `json:"superAdmin,omitempty"`
+ Username string `json:"username"`
+ } `json:"user"`
+ }
+ // JSON400 the response for an HTTP 400 `application/json` response
+ JSON400 *struct {
+ Details interface{} `json:"details,omitempty"`
+ Error string `json:"error"`
+ Message string `json:"message"`
+ ReqId string `json:"reqId"`
+ StatusCode AdminBootstrap400JSONResponseBodyStatusCode `json:"statusCode"`
+ }
+ // JSON401 the response for an HTTP 401 `application/json` response
+ JSON401 *struct {
+ Error string `json:"error"`
+ Message string `json:"message"`
+ ReqId string `json:"reqId"`
+ StatusCode AdminBootstrap401JSONResponseBodyStatusCode `json:"statusCode"`
+ }
+ // JSON403 the response for an HTTP 403 `application/json` response
+ JSON403 *struct {
+ Details interface{} `json:"details,omitempty"`
+ Error string `json:"error"`
+ Message string `json:"message"`
+ ReqId string `json:"reqId"`
+ StatusCode AdminBootstrap403JSONResponseBodyStatusCode `json:"statusCode"`
+ }
+ // JSON404 the response for an HTTP 404 `application/json` response
+ JSON404 *struct {
+ Error string `json:"error"`
+ Message string `json:"message"`
+ ReqId string `json:"reqId"`
+ StatusCode AdminBootstrap404JSONResponseBodyStatusCode `json:"statusCode"`
+ }
+ // JSON422 the response for an HTTP 422 `application/json` response
+ JSON422 *struct {
+ Error string `json:"error"`
+ Message interface{} `json:"message,omitempty"`
+ ReqId string `json:"reqId"`
+ StatusCode AdminBootstrap422JSONResponseBodyStatusCode `json:"statusCode"`
+ }
+ // JSON500 the response for an HTTP 500 `application/json` response
+ JSON500 *struct {
+ Error string `json:"error"`
+ Message string `json:"message"`
+ ReqId string `json:"reqId"`
+ StatusCode AdminBootstrap500JSONResponseBodyStatusCode `json:"statusCode"`
+ }
+}
+
+// GetJSON200 returns the response for an HTTP 200 `application/json` response
+func (r AdminBootstrapResponse) GetJSON200() *struct {
+ Identity struct {
+ Credentials struct {
+ Token string `json:"token"`
+ } `json:"credentials"`
+ Id openapi_types.UUID `json:"id"`
+ Name string `json:"name"`
+ } `json:"identity"`
+ Message string `json:"message"`
+ Organization struct {
+ Id openapi_types.UUID `json:"id"`
+ Name string `json:"name"`
+ Slug string `json:"slug"`
+ } `json:"organization"`
+ User struct {
+ Email *string `json:"email,omitempty"`
+ FirstName *string `json:"firstName,omitempty"`
+ Id openapi_types.UUID `json:"id"`
+ LastName *string `json:"lastName,omitempty"`
+ SuperAdmin *bool `json:"superAdmin,omitempty"`
+ Username string `json:"username"`
+ } `json:"user"`
+} {
+ return r.JSON200
+}
+
+// GetJSON400 returns the response for an HTTP 400 `application/json` response
+func (r AdminBootstrapResponse) GetJSON400() *struct {
+ Details interface{} `json:"details,omitempty"`
+ Error string `json:"error"`
+ Message string `json:"message"`
+ ReqId string `json:"reqId"`
+ StatusCode AdminBootstrap400JSONResponseBodyStatusCode `json:"statusCode"`
+} {
+ return r.JSON400
+}
+
+// GetJSON401 returns the response for an HTTP 401 `application/json` response
+func (r AdminBootstrapResponse) GetJSON401() *struct {
+ Error string `json:"error"`
+ Message string `json:"message"`
+ ReqId string `json:"reqId"`
+ StatusCode AdminBootstrap401JSONResponseBodyStatusCode `json:"statusCode"`
+} {
+ return r.JSON401
+}
+
+// GetJSON403 returns the response for an HTTP 403 `application/json` response
+func (r AdminBootstrapResponse) GetJSON403() *struct {
+ Details interface{} `json:"details,omitempty"`
+ Error string `json:"error"`
+ Message string `json:"message"`
+ ReqId string `json:"reqId"`
+ StatusCode AdminBootstrap403JSONResponseBodyStatusCode `json:"statusCode"`
+} {
+ return r.JSON403
+}
+
+// GetJSON404 returns the response for an HTTP 404 `application/json` response
+func (r AdminBootstrapResponse) GetJSON404() *struct {
+ Error string `json:"error"`
+ Message string `json:"message"`
+ ReqId string `json:"reqId"`
+ StatusCode AdminBootstrap404JSONResponseBodyStatusCode `json:"statusCode"`
+} {
+ return r.JSON404
+}
+
+// GetJSON422 returns the response for an HTTP 422 `application/json` response
+func (r AdminBootstrapResponse) GetJSON422() *struct {
+ Error string `json:"error"`
+ Message interface{} `json:"message,omitempty"`
+ ReqId string `json:"reqId"`
+ StatusCode AdminBootstrap422JSONResponseBodyStatusCode `json:"statusCode"`
+} {
+ return r.JSON422
+}
+
+// GetJSON500 returns the response for an HTTP 500 `application/json` response
+func (r AdminBootstrapResponse) GetJSON500() *struct {
+ Error string `json:"error"`
+ Message string `json:"message"`
+ ReqId string `json:"reqId"`
+ StatusCode AdminBootstrap500JSONResponseBodyStatusCode `json:"statusCode"`
+} {
+ return r.JSON500
+}
+
+// GetBody returns the raw response body bytes
+func (r AdminBootstrapResponse) GetBody() []byte {
+ return r.Body
+}
+
+// Status returns HTTPResponse.Status
+func (r AdminBootstrapResponse) Status() string {
+ if r.HTTPResponse != nil {
+ return r.HTTPResponse.Status
+ }
+ return http.StatusText(0)
+}
+
+// StatusCode returns HTTPResponse.StatusCode
+func (r AdminBootstrapResponse) StatusCode() int {
+ if r.HTTPResponse != nil {
+ return r.HTTPResponse.StatusCode
+ }
+ return 0
+}
+
+// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
+func (r AdminBootstrapResponse) ContentType() string {
+ if r.HTTPResponse != nil {
+ return r.HTTPResponse.Header.Get("Content-Type")
+ }
+ return ""
+}
+
+type UpdateAdminConfigResponse struct {
+ Body []byte
+ HTTPResponse *http.Response
+ // JSON200 the response for an HTTP 200 `application/json` response
+ JSON200 *struct {
+ Config struct {
+ AdminIdentityIds *[]string `json:"adminIdentityIds,omitempty"`
+ AllowSignUp *bool `json:"allowSignUp,omitempty"`
+ AllowedSignUpDomain *string `json:"allowedSignUpDomain,omitempty"`
+ AuthConsentContent *string `json:"authConsentContent,omitempty"`
+ CreatedAt *time.Time `json:"createdAt,omitempty"`
+ DefaultAuthOrgAuthEnforced *bool `json:"defaultAuthOrgAuthEnforced,omitempty"`
+ DefaultAuthOrgAuthMethod *string `json:"defaultAuthOrgAuthMethod,omitempty"`
+ DefaultAuthOrgId *openapi_types.UUID `json:"defaultAuthOrgId,omitempty"`
+ DefaultAuthOrgSlug *string `json:"defaultAuthOrgSlug"`
+ EnabledLoginMethods *[]string `json:"enabledLoginMethods,omitempty"`
+ FipsEnabled *bool `json:"fipsEnabled,omitempty"`
+ Id openapi_types.UUID `json:"id"`
+ Initialized *bool `json:"initialized,omitempty"`
+ InstanceId *openapi_types.UUID `json:"instanceId,omitempty"`
+ IsClickhouseAuditLogEnabled *bool `json:"isClickhouseAuditLogEnabled,omitempty"`
+ IsMigrationModeOn *bool `json:"isMigrationModeOn,omitempty"`
+ IsOfflineUsageReportsEnabled *bool `json:"isOfflineUsageReportsEnabled,omitempty"`
+ IsPublicSecretSharingDisabled *bool `json:"isPublicSecretSharingDisabled,omitempty"`
+ IsSecretScanningDisabled *bool `json:"isSecretScanningDisabled,omitempty"`
+ KubernetesAutoFetchServiceAccountToken *bool `json:"kubernetesAutoFetchServiceAccountToken,omitempty"`
+ LatestAvailableVersion *string `json:"latestAvailableVersion,omitempty"`
+ OnboardingCompleted *bool `json:"onboardingCompleted,omitempty"`
+ PageFrameContent *string `json:"pageFrameContent,omitempty"`
+ ParamsFolderSecretDetectionEnabled *bool `json:"paramsFolderSecretDetectionEnabled,omitempty"`
+ PasswordPolicy struct {
+ Requirements []struct {
+ Code string `json:"code"`
+ Flags *string `json:"flags,omitempty"`
+ IsPrimary bool `json:"isPrimary"`
+ MaxConsecutiveCharacters *int `json:"maxConsecutiveCharacters,omitempty"`
+ Message string `json:"message"`
+ Patterns []string `json:"patterns"`
+ ShouldMatch bool `json:"shouldMatch"`
+ ValidationMessage string `json:"validationMessage"`
+ } `json:"requirements"`
+ } `json:"passwordPolicy"`
+ TrustLdapEmails *bool `json:"trustLdapEmails,omitempty"`
+ } `json:"config"`
+ }
+ // JSON400 the response for an HTTP 400 `application/json` response
+ JSON400 *struct {
+ Details interface{} `json:"details,omitempty"`
+ Error string `json:"error"`
+ Message string `json:"message"`
+ ReqId string `json:"reqId"`
+ StatusCode UpdateAdminConfig400JSONResponseBodyStatusCode `json:"statusCode"`
+ }
+ // JSON401 the response for an HTTP 401 `application/json` response
+ JSON401 *struct {
+ Error string `json:"error"`
+ Message string `json:"message"`
+ ReqId string `json:"reqId"`
+ StatusCode UpdateAdminConfig401JSONResponseBodyStatusCode `json:"statusCode"`
+ }
+ // JSON403 the response for an HTTP 403 `application/json` response
+ JSON403 *struct {
+ Details interface{} `json:"details,omitempty"`
+ Error string `json:"error"`
+ Message string `json:"message"`
+ ReqId string `json:"reqId"`
+ StatusCode UpdateAdminConfig403JSONResponseBodyStatusCode `json:"statusCode"`
+ }
+ // JSON404 the response for an HTTP 404 `application/json` response
+ JSON404 *struct {
+ Error string `json:"error"`
+ Message string `json:"message"`
+ ReqId string `json:"reqId"`
+ StatusCode UpdateAdminConfig404JSONResponseBodyStatusCode `json:"statusCode"`
+ }
+ // JSON422 the response for an HTTP 422 `application/json` response
+ JSON422 *struct {
+ Error string `json:"error"`
+ Message interface{} `json:"message,omitempty"`
+ ReqId string `json:"reqId"`
+ StatusCode UpdateAdminConfig422JSONResponseBodyStatusCode `json:"statusCode"`
+ }
+ // JSON500 the response for an HTTP 500 `application/json` response
+ JSON500 *struct {
+ Error string `json:"error"`
+ Message string `json:"message"`
+ ReqId string `json:"reqId"`
+ StatusCode UpdateAdminConfig500JSONResponseBodyStatusCode `json:"statusCode"`
+ }
+}
+
+// GetJSON200 returns the response for an HTTP 200 `application/json` response
+func (r UpdateAdminConfigResponse) GetJSON200() *struct {
+ Config struct {
+ AdminIdentityIds *[]string `json:"adminIdentityIds,omitempty"`
+ AllowSignUp *bool `json:"allowSignUp,omitempty"`
+ AllowedSignUpDomain *string `json:"allowedSignUpDomain,omitempty"`
+ AuthConsentContent *string `json:"authConsentContent,omitempty"`
+ CreatedAt *time.Time `json:"createdAt,omitempty"`
+ DefaultAuthOrgAuthEnforced *bool `json:"defaultAuthOrgAuthEnforced,omitempty"`
+ DefaultAuthOrgAuthMethod *string `json:"defaultAuthOrgAuthMethod,omitempty"`
+ DefaultAuthOrgId *openapi_types.UUID `json:"defaultAuthOrgId,omitempty"`
+ DefaultAuthOrgSlug *string `json:"defaultAuthOrgSlug"`
+ EnabledLoginMethods *[]string `json:"enabledLoginMethods,omitempty"`
+ FipsEnabled *bool `json:"fipsEnabled,omitempty"`
+ Id openapi_types.UUID `json:"id"`
+ Initialized *bool `json:"initialized,omitempty"`
+ InstanceId *openapi_types.UUID `json:"instanceId,omitempty"`
+ IsClickhouseAuditLogEnabled *bool `json:"isClickhouseAuditLogEnabled,omitempty"`
+ IsMigrationModeOn *bool `json:"isMigrationModeOn,omitempty"`
+ IsOfflineUsageReportsEnabled *bool `json:"isOfflineUsageReportsEnabled,omitempty"`
+ IsPublicSecretSharingDisabled *bool `json:"isPublicSecretSharingDisabled,omitempty"`
+ IsSecretScanningDisabled *bool `json:"isSecretScanningDisabled,omitempty"`
+ KubernetesAutoFetchServiceAccountToken *bool `json:"kubernetesAutoFetchServiceAccountToken,omitempty"`
+ LatestAvailableVersion *string `json:"latestAvailableVersion,omitempty"`
+ OnboardingCompleted *bool `json:"onboardingCompleted,omitempty"`
+ PageFrameContent *string `json:"pageFrameContent,omitempty"`
+ ParamsFolderSecretDetectionEnabled *bool `json:"paramsFolderSecretDetectionEnabled,omitempty"`
+ PasswordPolicy struct {
+ Requirements []struct {
+ Code string `json:"code"`
+ Flags *string `json:"flags,omitempty"`
+ IsPrimary bool `json:"isPrimary"`
+ MaxConsecutiveCharacters *int `json:"maxConsecutiveCharacters,omitempty"`
+ Message string `json:"message"`
+ Patterns []string `json:"patterns"`
+ ShouldMatch bool `json:"shouldMatch"`
+ ValidationMessage string `json:"validationMessage"`
+ } `json:"requirements"`
+ } `json:"passwordPolicy"`
+ TrustLdapEmails *bool `json:"trustLdapEmails,omitempty"`
+ } `json:"config"`
+} {
+ return r.JSON200
+}
+
+// GetJSON400 returns the response for an HTTP 400 `application/json` response
+func (r UpdateAdminConfigResponse) GetJSON400() *struct {
+ Details interface{} `json:"details,omitempty"`
+ Error string `json:"error"`
+ Message string `json:"message"`
+ ReqId string `json:"reqId"`
+ StatusCode UpdateAdminConfig400JSONResponseBodyStatusCode `json:"statusCode"`
+} {
+ return r.JSON400
+}
+
+// GetJSON401 returns the response for an HTTP 401 `application/json` response
+func (r UpdateAdminConfigResponse) GetJSON401() *struct {
+ Error string `json:"error"`
+ Message string `json:"message"`
+ ReqId string `json:"reqId"`
+ StatusCode UpdateAdminConfig401JSONResponseBodyStatusCode `json:"statusCode"`
+} {
+ return r.JSON401
+}
+
+// GetJSON403 returns the response for an HTTP 403 `application/json` response
+func (r UpdateAdminConfigResponse) GetJSON403() *struct {
+ Details interface{} `json:"details,omitempty"`
+ Error string `json:"error"`
+ Message string `json:"message"`
+ ReqId string `json:"reqId"`
+ StatusCode UpdateAdminConfig403JSONResponseBodyStatusCode `json:"statusCode"`
+} {
+ return r.JSON403
+}
+
+// GetJSON404 returns the response for an HTTP 404 `application/json` response
+func (r UpdateAdminConfigResponse) GetJSON404() *struct {
+ Error string `json:"error"`
+ Message string `json:"message"`
+ ReqId string `json:"reqId"`
+ StatusCode UpdateAdminConfig404JSONResponseBodyStatusCode `json:"statusCode"`
+} {
+ return r.JSON404
+}
+
+// GetJSON422 returns the response for an HTTP 422 `application/json` response
+func (r UpdateAdminConfigResponse) GetJSON422() *struct {
+ Error string `json:"error"`
+ Message interface{} `json:"message,omitempty"`
+ ReqId string `json:"reqId"`
+ StatusCode UpdateAdminConfig422JSONResponseBodyStatusCode `json:"statusCode"`
+} {
+ return r.JSON422
+}
+
+// GetJSON500 returns the response for an HTTP 500 `application/json` response
+func (r UpdateAdminConfigResponse) GetJSON500() *struct {
+ Error string `json:"error"`
+ Message string `json:"message"`
+ ReqId string `json:"reqId"`
+ StatusCode UpdateAdminConfig500JSONResponseBodyStatusCode `json:"statusCode"`
+} {
+ return r.JSON500
+}
+
+// GetBody returns the raw response body bytes
+func (r UpdateAdminConfigResponse) GetBody() []byte {
+ return r.Body
+}
+
+// Status returns HTTPResponse.Status
+func (r UpdateAdminConfigResponse) Status() string {
+ if r.HTTPResponse != nil {
+ return r.HTTPResponse.Status
+ }
+ return http.StatusText(0)
+}
+
+// StatusCode returns HTTPResponse.StatusCode
+func (r UpdateAdminConfigResponse) StatusCode() int {
+ if r.HTTPResponse != nil {
+ return r.HTTPResponse.StatusCode
+ }
+ return 0
+}
+
+// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
+func (r UpdateAdminConfigResponse) ContentType() string {
+ if r.HTTPResponse != nil {
+ return r.HTTPResponse.Header.Get("Content-Type")
+ }
+ return ""
+}
+
+type RefreshAuthTokenResponse struct {
+ Body []byte
+ HTTPResponse *http.Response
+ // JSON200 the response for an HTTP 200 `application/json` response
+ JSON200 *struct {
+ OrganizationId *string `json:"organizationId,omitempty"`
+ RefreshToken *string `json:"refreshToken,omitempty"`
+ SubOrganizationId *string `json:"subOrganizationId,omitempty"`
+ Token string `json:"token"`
+ }
+ // JSON400 the response for an HTTP 400 `application/json` response
+ JSON400 *struct {
+ Details interface{} `json:"details,omitempty"`
+ Error string `json:"error"`
+ Message string `json:"message"`
+ ReqId string `json:"reqId"`
+ StatusCode RefreshAuthToken400JSONResponseBodyStatusCode `json:"statusCode"`
+ }
+ // JSON401 the response for an HTTP 401 `application/json` response
+ JSON401 *struct {
+ Error string `json:"error"`
+ Message string `json:"message"`
+ ReqId string `json:"reqId"`
+ StatusCode RefreshAuthToken401JSONResponseBodyStatusCode `json:"statusCode"`
+ }
+ // JSON403 the response for an HTTP 403 `application/json` response
+ JSON403 *struct {
+ Details interface{} `json:"details,omitempty"`
+ Error string `json:"error"`
+ Message string `json:"message"`
+ ReqId string `json:"reqId"`
+ StatusCode RefreshAuthToken403JSONResponseBodyStatusCode `json:"statusCode"`
+ }
+ // JSON404 the response for an HTTP 404 `application/json` response
+ JSON404 *struct {
+ Error string `json:"error"`
+ Message string `json:"message"`
+ ReqId string `json:"reqId"`
+ StatusCode RefreshAuthToken404JSONResponseBodyStatusCode `json:"statusCode"`
+ }
+ // JSON422 the response for an HTTP 422 `application/json` response
+ JSON422 *struct {
+ Error string `json:"error"`
+ Message interface{} `json:"message,omitempty"`
+ ReqId string `json:"reqId"`
+ StatusCode RefreshAuthToken422JSONResponseBodyStatusCode `json:"statusCode"`
+ }
+ // JSON500 the response for an HTTP 500 `application/json` response
+ JSON500 *struct {
+ Error string `json:"error"`
+ Message string `json:"message"`
+ ReqId string `json:"reqId"`
+ StatusCode RefreshAuthToken500JSONResponseBodyStatusCode `json:"statusCode"`
+ }
+}
+
+// GetJSON200 returns the response for an HTTP 200 `application/json` response
+func (r RefreshAuthTokenResponse) GetJSON200() *struct {
+ OrganizationId *string `json:"organizationId,omitempty"`
+ RefreshToken *string `json:"refreshToken,omitempty"`
+ SubOrganizationId *string `json:"subOrganizationId,omitempty"`
+ Token string `json:"token"`
+} {
+ return r.JSON200
+}
+
+// GetJSON400 returns the response for an HTTP 400 `application/json` response
+func (r RefreshAuthTokenResponse) GetJSON400() *struct {
+ Details interface{} `json:"details,omitempty"`
+ Error string `json:"error"`
+ Message string `json:"message"`
+ ReqId string `json:"reqId"`
+ StatusCode RefreshAuthToken400JSONResponseBodyStatusCode `json:"statusCode"`
+} {
+ return r.JSON400
+}
+
+// GetJSON401 returns the response for an HTTP 401 `application/json` response
+func (r RefreshAuthTokenResponse) GetJSON401() *struct {
+ Error string `json:"error"`
+ Message string `json:"message"`
+ ReqId string `json:"reqId"`
+ StatusCode RefreshAuthToken401JSONResponseBodyStatusCode `json:"statusCode"`
+} {
+ return r.JSON401
+}
+
+// GetJSON403 returns the response for an HTTP 403 `application/json` response
+func (r RefreshAuthTokenResponse) GetJSON403() *struct {
+ Details interface{} `json:"details,omitempty"`
+ Error string `json:"error"`
+ Message string `json:"message"`
+ ReqId string `json:"reqId"`
+ StatusCode RefreshAuthToken403JSONResponseBodyStatusCode `json:"statusCode"`
+} {
+ return r.JSON403
+}
+
+// GetJSON404 returns the response for an HTTP 404 `application/json` response
+func (r RefreshAuthTokenResponse) GetJSON404() *struct {
+ Error string `json:"error"`
+ Message string `json:"message"`
+ ReqId string `json:"reqId"`
+ StatusCode RefreshAuthToken404JSONResponseBodyStatusCode `json:"statusCode"`
+} {
+ return r.JSON404
+}
+
+// GetJSON422 returns the response for an HTTP 422 `application/json` response
+func (r RefreshAuthTokenResponse) GetJSON422() *struct {
+ Error string `json:"error"`
+ Message interface{} `json:"message,omitempty"`
+ ReqId string `json:"reqId"`
+ StatusCode RefreshAuthToken422JSONResponseBodyStatusCode `json:"statusCode"`
+} {
+ return r.JSON422
+}
+
+// GetJSON500 returns the response for an HTTP 500 `application/json` response
+func (r RefreshAuthTokenResponse) GetJSON500() *struct {
+ Error string `json:"error"`
+ Message string `json:"message"`
+ ReqId string `json:"reqId"`
+ StatusCode RefreshAuthToken500JSONResponseBodyStatusCode `json:"statusCode"`
+} {
+ return r.JSON500
+}
+
+// GetBody returns the raw response body bytes
+func (r RefreshAuthTokenResponse) GetBody() []byte {
+ return r.Body
+}
+
+// Status returns HTTPResponse.Status
+func (r RefreshAuthTokenResponse) Status() string {
+ if r.HTTPResponse != nil {
+ return r.HTTPResponse.Status
+ }
+ return http.StatusText(0)
+}
+
+// StatusCode returns HTTPResponse.StatusCode
+func (r RefreshAuthTokenResponse) StatusCode() int {
+ if r.HTTPResponse != nil {
+ return r.HTTPResponse.StatusCode
+ }
+ return 0
+}
+
+// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
+func (r RefreshAuthTokenResponse) ContentType() string {
+ if r.HTTPResponse != nil {
+ return r.HTTPResponse.Header.Get("Content-Type")
+ }
+ return ""
+}
+
+type GetOrganizationPlanResponse struct {
+ Body []byte
+ HTTPResponse *http.Response
+ // JSON200 the response for an HTTP 200 `application/json` response
+ JSON200 *struct {
+ Plan interface{} `json:"plan,omitempty"`
+ }
+ // JSON400 the response for an HTTP 400 `application/json` response
+ JSON400 *struct {
+ Details interface{} `json:"details,omitempty"`
+ Error string `json:"error"`
+ Message string `json:"message"`
+ ReqId string `json:"reqId"`
+ StatusCode GetOrganizationPlan400JSONResponseBodyStatusCode `json:"statusCode"`
+ }
+ // JSON401 the response for an HTTP 401 `application/json` response
+ JSON401 *struct {
+ Error string `json:"error"`
+ Message string `json:"message"`
+ ReqId string `json:"reqId"`
+ StatusCode GetOrganizationPlan401JSONResponseBodyStatusCode `json:"statusCode"`
+ }
+ // JSON403 the response for an HTTP 403 `application/json` response
+ JSON403 *struct {
+ Details interface{} `json:"details,omitempty"`
+ Error string `json:"error"`
+ Message string `json:"message"`
+ ReqId string `json:"reqId"`
+ StatusCode GetOrganizationPlan403JSONResponseBodyStatusCode `json:"statusCode"`
+ }
+ // JSON404 the response for an HTTP 404 `application/json` response
+ JSON404 *struct {
+ Error string `json:"error"`
+ Message string `json:"message"`
+ ReqId string `json:"reqId"`
+ StatusCode GetOrganizationPlan404JSONResponseBodyStatusCode `json:"statusCode"`
+ }
+ // JSON422 the response for an HTTP 422 `application/json` response
+ JSON422 *struct {
+ Error string `json:"error"`
+ Message interface{} `json:"message,omitempty"`
+ ReqId string `json:"reqId"`
+ StatusCode GetOrganizationPlan422JSONResponseBodyStatusCode `json:"statusCode"`
+ }
+ // JSON500 the response for an HTTP 500 `application/json` response
+ JSON500 *struct {
+ Error string `json:"error"`
+ Message string `json:"message"`
+ ReqId string `json:"reqId"`
+ StatusCode GetOrganizationPlan500JSONResponseBodyStatusCode `json:"statusCode"`
+ }
+}
+
+// GetJSON200 returns the response for an HTTP 200 `application/json` response
+func (r GetOrganizationPlanResponse) GetJSON200() *struct {
+ Plan interface{} `json:"plan,omitempty"`
+} {
+ return r.JSON200
+}
+
+// GetJSON400 returns the response for an HTTP 400 `application/json` response
+func (r GetOrganizationPlanResponse) GetJSON400() *struct {
+ Details interface{} `json:"details,omitempty"`
+ Error string `json:"error"`
+ Message string `json:"message"`
+ ReqId string `json:"reqId"`
+ StatusCode GetOrganizationPlan400JSONResponseBodyStatusCode `json:"statusCode"`
+} {
+ return r.JSON400
+}
+
+// GetJSON401 returns the response for an HTTP 401 `application/json` response
+func (r GetOrganizationPlanResponse) GetJSON401() *struct {
+ Error string `json:"error"`
+ Message string `json:"message"`
+ ReqId string `json:"reqId"`
+ StatusCode GetOrganizationPlan401JSONResponseBodyStatusCode `json:"statusCode"`
+} {
+ return r.JSON401
+}
+
+// GetJSON403 returns the response for an HTTP 403 `application/json` response
+func (r GetOrganizationPlanResponse) GetJSON403() *struct {
+ Details interface{} `json:"details,omitempty"`
+ Error string `json:"error"`
+ Message string `json:"message"`
+ ReqId string `json:"reqId"`
+ StatusCode GetOrganizationPlan403JSONResponseBodyStatusCode `json:"statusCode"`
+} {
+ return r.JSON403
+}
+
+// GetJSON404 returns the response for an HTTP 404 `application/json` response
+func (r GetOrganizationPlanResponse) GetJSON404() *struct {
+ Error string `json:"error"`
+ Message string `json:"message"`
+ ReqId string `json:"reqId"`
+ StatusCode GetOrganizationPlan404JSONResponseBodyStatusCode `json:"statusCode"`
+} {
+ return r.JSON404
+}
+
+// GetJSON422 returns the response for an HTTP 422 `application/json` response
+func (r GetOrganizationPlanResponse) GetJSON422() *struct {
+ Error string `json:"error"`
+ Message interface{} `json:"message,omitempty"`
+ ReqId string `json:"reqId"`
+ StatusCode GetOrganizationPlan422JSONResponseBodyStatusCode `json:"statusCode"`
+} {
+ return r.JSON422
+}
+
+// GetJSON500 returns the response for an HTTP 500 `application/json` response
+func (r GetOrganizationPlanResponse) GetJSON500() *struct {
+ Error string `json:"error"`
+ Message string `json:"message"`
+ ReqId string `json:"reqId"`
+ StatusCode GetOrganizationPlan500JSONResponseBodyStatusCode `json:"statusCode"`
+} {
+ return r.JSON500
+}
+
+// GetBody returns the raw response body bytes
+func (r GetOrganizationPlanResponse) GetBody() []byte {
+ return r.Body
+}
+
+// Status returns HTTPResponse.Status
+func (r GetOrganizationPlanResponse) Status() string {
+ if r.HTTPResponse != nil {
+ return r.HTTPResponse.Status
+ }
+ return http.StatusText(0)
+}
+
+// StatusCode returns HTTPResponse.StatusCode
+func (r GetOrganizationPlanResponse) StatusCode() int {
+ if r.HTTPResponse != nil {
+ return r.HTTPResponse.StatusCode
+ }
+ return 0
+}
+
+// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
+func (r GetOrganizationPlanResponse) ContentType() string {
+ if r.HTTPResponse != nil {
+ return r.HTTPResponse.Header.Get("Content-Type")
+ }
+ return ""
+}
+
+type CreateProjectResponse struct {
+ Body []byte
+ HTTPResponse *http.Response
+ // JSON200 the response for an HTTP 200 `application/json` response
+ JSON200 *struct {
+ Project struct {
+ UnderscoreId string `json:"_id"`
+ AuditLogsRetentionDays *float32 `json:"auditLogsRetentionDays,omitempty"`
+ AutoCapitalization *bool `json:"autoCapitalization,omitempty"`
+ CreatedAt time.Time `json:"createdAt"`
+ DefaultProduct *string `json:"defaultProduct,omitempty"`
+ DeletedEnvironments []struct {
+ DeleteAfter time.Time `json:"deleteAfter"`
+ DeletedBy *CreateProject200JSONResponseBody_Project_DeletedEnvironments_DeletedBy `json:"deletedBy"`
+ Id string `json:"id"`
+ Name string `json:"name"`
+ Slug string `json:"slug"`
+ SoftDeletedAt time.Time `json:"softDeletedAt"`
+ } `json:"deletedEnvironments"`
+ Description *string `json:"description,omitempty"`
+ EnforceEncryptedSecretManagerSecretMetadata *bool `json:"enforceEncryptedSecretManagerSecretMetadata,omitempty"`
+ Environments []struct {
+ Id string `json:"id"`
+ Name string `json:"name"`
+ Slug string `json:"slug"`
+ } `json:"environments"`
+ HasDeleteProtection *bool `json:"hasDeleteProtection,omitempty"`
+ Id string `json:"id"`
+ IsLegacyAdditionalPrivilegesEnabled *bool `json:"isLegacyAdditionalPrivilegesEnabled,omitempty"`
+ KmsCertificateKeyId *openapi_types.UUID `json:"kmsCertificateKeyId,omitempty"`
+ Name string `json:"name"`
+ OrgId openapi_types.UUID `json:"orgId"`
+ PitVersionLimit *float32 `json:"pitVersionLimit,omitempty"`
+ SecretDetectionIgnoreValues *[]string `json:"secretDetectionIgnoreValues,omitempty"`
+ SecretSharing *bool `json:"secretSharing,omitempty"`
+ ShowSnapshotsLegacy *bool `json:"showSnapshotsLegacy,omitempty"`
+ Slug string `json:"slug"`
+ Type string `json:"type"`
+ UpdatedAt time.Time `json:"updatedAt"`
+ UpgradeStatus *string `json:"upgradeStatus,omitempty"`
+ Version *float32 `json:"version,omitempty"`
+ } `json:"project"`
+ }
+ // JSON400 the response for an HTTP 400 `application/json` response
+ JSON400 *struct {
+ Details interface{} `json:"details,omitempty"`
+ Error string `json:"error"`
+ Message string `json:"message"`
+ ReqId string `json:"reqId"`
+ StatusCode CreateProject400JSONResponseBodyStatusCode `json:"statusCode"`
+ }
+ // JSON401 the response for an HTTP 401 `application/json` response
+ JSON401 *struct {
+ Error string `json:"error"`
+ Message string `json:"message"`
+ ReqId string `json:"reqId"`
+ StatusCode CreateProject401JSONResponseBodyStatusCode `json:"statusCode"`
+ }
+ // JSON403 the response for an HTTP 403 `application/json` response
+ JSON403 *struct {
+ Details interface{} `json:"details,omitempty"`
+ Error string `json:"error"`
+ Message string `json:"message"`
+ ReqId string `json:"reqId"`
+ StatusCode CreateProject403JSONResponseBodyStatusCode `json:"statusCode"`
+ }
+ // JSON404 the response for an HTTP 404 `application/json` response
+ JSON404 *struct {
+ Error string `json:"error"`
+ Message string `json:"message"`
+ ReqId string `json:"reqId"`
+ StatusCode CreateProject404JSONResponseBodyStatusCode `json:"statusCode"`
+ }
+ // JSON422 the response for an HTTP 422 `application/json` response
+ JSON422 *struct {
+ Error string `json:"error"`
+ Message interface{} `json:"message,omitempty"`
+ ReqId string `json:"reqId"`
+ StatusCode CreateProject422JSONResponseBodyStatusCode `json:"statusCode"`
+ }
+ // JSON500 the response for an HTTP 500 `application/json` response
+ JSON500 *struct {
+ Error string `json:"error"`
+ Message string `json:"message"`
+ ReqId string `json:"reqId"`
+ StatusCode CreateProject500JSONResponseBodyStatusCode `json:"statusCode"`
+ }
+}
+
+// GetJSON200 returns the response for an HTTP 200 `application/json` response
+func (r CreateProjectResponse) GetJSON200() *struct {
+ Project struct {
+ UnderscoreId string `json:"_id"`
+ AuditLogsRetentionDays *float32 `json:"auditLogsRetentionDays,omitempty"`
+ AutoCapitalization *bool `json:"autoCapitalization,omitempty"`
+ CreatedAt time.Time `json:"createdAt"`
+ DefaultProduct *string `json:"defaultProduct,omitempty"`
+ DeletedEnvironments []struct {
+ DeleteAfter time.Time `json:"deleteAfter"`
+ DeletedBy *CreateProject200JSONResponseBody_Project_DeletedEnvironments_DeletedBy `json:"deletedBy"`
+ Id string `json:"id"`
+ Name string `json:"name"`
+ Slug string `json:"slug"`
+ SoftDeletedAt time.Time `json:"softDeletedAt"`
+ } `json:"deletedEnvironments"`
+ Description *string `json:"description,omitempty"`
+ EnforceEncryptedSecretManagerSecretMetadata *bool `json:"enforceEncryptedSecretManagerSecretMetadata,omitempty"`
+ Environments []struct {
+ Id string `json:"id"`
+ Name string `json:"name"`
+ Slug string `json:"slug"`
+ } `json:"environments"`
+ HasDeleteProtection *bool `json:"hasDeleteProtection,omitempty"`
+ Id string `json:"id"`
+ IsLegacyAdditionalPrivilegesEnabled *bool `json:"isLegacyAdditionalPrivilegesEnabled,omitempty"`
+ KmsCertificateKeyId *openapi_types.UUID `json:"kmsCertificateKeyId,omitempty"`
+ Name string `json:"name"`
+ OrgId openapi_types.UUID `json:"orgId"`
+ PitVersionLimit *float32 `json:"pitVersionLimit,omitempty"`
+ SecretDetectionIgnoreValues *[]string `json:"secretDetectionIgnoreValues,omitempty"`
+ SecretSharing *bool `json:"secretSharing,omitempty"`
+ ShowSnapshotsLegacy *bool `json:"showSnapshotsLegacy,omitempty"`
+ Slug string `json:"slug"`
+ Type string `json:"type"`
+ UpdatedAt time.Time `json:"updatedAt"`
+ UpgradeStatus *string `json:"upgradeStatus,omitempty"`
+ Version *float32 `json:"version,omitempty"`
+ } `json:"project"`
+} {
+ return r.JSON200
+}
+
+// GetJSON400 returns the response for an HTTP 400 `application/json` response
+func (r CreateProjectResponse) GetJSON400() *struct {
+ Details interface{} `json:"details,omitempty"`
+ Error string `json:"error"`
+ Message string `json:"message"`
+ ReqId string `json:"reqId"`
+ StatusCode CreateProject400JSONResponseBodyStatusCode `json:"statusCode"`
+} {
+ return r.JSON400
+}
+
+// GetJSON401 returns the response for an HTTP 401 `application/json` response
+func (r CreateProjectResponse) GetJSON401() *struct {
+ Error string `json:"error"`
+ Message string `json:"message"`
+ ReqId string `json:"reqId"`
+ StatusCode CreateProject401JSONResponseBodyStatusCode `json:"statusCode"`
+} {
+ return r.JSON401
+}
+
+// GetJSON403 returns the response for an HTTP 403 `application/json` response
+func (r CreateProjectResponse) GetJSON403() *struct {
+ Details interface{} `json:"details,omitempty"`
+ Error string `json:"error"`
+ Message string `json:"message"`
+ ReqId string `json:"reqId"`
+ StatusCode CreateProject403JSONResponseBodyStatusCode `json:"statusCode"`
+} {
+ return r.JSON403
+}
+
+// GetJSON404 returns the response for an HTTP 404 `application/json` response
+func (r CreateProjectResponse) GetJSON404() *struct {
+ Error string `json:"error"`
+ Message string `json:"message"`
+ ReqId string `json:"reqId"`
+ StatusCode CreateProject404JSONResponseBodyStatusCode `json:"statusCode"`
+} {
+ return r.JSON404
+}
+
+// GetJSON422 returns the response for an HTTP 422 `application/json` response
+func (r CreateProjectResponse) GetJSON422() *struct {
+ Error string `json:"error"`
+ Message interface{} `json:"message,omitempty"`
+ ReqId string `json:"reqId"`
+ StatusCode CreateProject422JSONResponseBodyStatusCode `json:"statusCode"`
+} {
+ return r.JSON422
+}
+
+// GetJSON500 returns the response for an HTTP 500 `application/json` response
+func (r CreateProjectResponse) GetJSON500() *struct {
+ Error string `json:"error"`
+ Message string `json:"message"`
+ ReqId string `json:"reqId"`
+ StatusCode CreateProject500JSONResponseBodyStatusCode `json:"statusCode"`
+} {
+ return r.JSON500
+}
+
+// GetBody returns the raw response body bytes
+func (r CreateProjectResponse) GetBody() []byte {
+ return r.Body
+}
+
+// Status returns HTTPResponse.Status
+func (r CreateProjectResponse) Status() string {
+ if r.HTTPResponse != nil {
+ return r.HTTPResponse.Status
+ }
+ return http.StatusText(0)
+}
+
+// StatusCode returns HTTPResponse.StatusCode
+func (r CreateProjectResponse) StatusCode() int {
+ if r.HTTPResponse != nil {
+ return r.HTTPResponse.StatusCode
+ }
+ return 0
+}
+
+// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
+func (r CreateProjectResponse) ContentType() string {
+ if r.HTTPResponse != nil {
+ return r.HTTPResponse.Header.Get("Content-Type")
+ }
+ return ""
+}
+
+type CreateOrganizationResponse struct {
+ Body []byte
+ HTTPResponse *http.Response
+ // JSON200 the response for an HTTP 200 `application/json` response
+ JSON200 *struct {
+ Organization struct {
+ AllowCrossProjectSecretSharing *bool `json:"allowCrossProjectSecretSharing,omitempty"`
+ AllowSecretSharingOutsideOrganization *bool `json:"allowSecretSharingOutsideOrganization,omitempty"`
+ AuthEnforced *bool `json:"authEnforced,omitempty"`
+ BlockDuplicateSecretSyncDestinations *bool `json:"blockDuplicateSecretSyncDestinations,omitempty"`
+ BypassOrgAuthEnabled *bool `json:"bypassOrgAuthEnabled,omitempty"`
+ CreatedAt time.Time `json:"createdAt"`
+ CustomerId *string `json:"customerId,omitempty"`
+ DefaultMembershipRole *string `json:"defaultMembershipRole,omitempty"`
+ EnforceMfa *bool `json:"enforceMfa,omitempty"`
+ GoogleSsoAuthEnforced *bool `json:"googleSsoAuthEnforced,omitempty"`
+ Id openapi_types.UUID `json:"id"`
+ KmsDefaultKeyId *openapi_types.UUID `json:"kmsDefaultKeyId,omitempty"`
+ KmsProductEnabled *bool `json:"kmsProductEnabled,omitempty"`
+ MaxSharedSecretLifetime *float32 `json:"maxSharedSecretLifetime,omitempty"`
+ MaxSharedSecretViewLimit *float32 `json:"maxSharedSecretViewLimit,omitempty"`
+ Name string `json:"name"`
+ ParentOrgId *openapi_types.UUID `json:"parentOrgId,omitempty"`
+ PkiProductEnabled *bool `json:"pkiProductEnabled,omitempty"`
+ PrivilegeUpgradeInitiatedAt *time.Time `json:"privilegeUpgradeInitiatedAt,omitempty"`
+ PrivilegeUpgradeInitiatedByUsername *string `json:"privilegeUpgradeInitiatedByUsername,omitempty"`
+ RootOrgId *openapi_types.UUID `json:"rootOrgId,omitempty"`
+ ScannerProductEnabled *bool `json:"scannerProductEnabled,omitempty"`
+ ScimEnabled *bool `json:"scimEnabled,omitempty"`
+ SecretShareBrandConfig interface{} `json:"secretShareBrandConfig,omitempty"`
+ SecretsProductEnabled *bool `json:"secretsProductEnabled,omitempty"`
+ SelectedMfaMethod *string `json:"selectedMfaMethod,omitempty"`
+ ShareSecretsProductEnabled *bool `json:"shareSecretsProductEnabled,omitempty"`
+ ShouldUseNewPrivilegeSystem *bool `json:"shouldUseNewPrivilegeSystem,omitempty"`
+ Slug string `json:"slug"`
+ UpdatedAt time.Time `json:"updatedAt"`
+ UserTokenExpiration *string `json:"userTokenExpiration,omitempty"`
+ } `json:"organization"`
+ }
+ // JSON400 the response for an HTTP 400 `application/json` response
+ JSON400 *struct {
+ Details interface{} `json:"details,omitempty"`
+ Error string `json:"error"`
+ Message string `json:"message"`
+ ReqId string `json:"reqId"`
+ StatusCode CreateOrganization400JSONResponseBodyStatusCode `json:"statusCode"`
+ }
+ // JSON401 the response for an HTTP 401 `application/json` response
+ JSON401 *struct {
+ Error string `json:"error"`
+ Message string `json:"message"`
+ ReqId string `json:"reqId"`
+ StatusCode CreateOrganization401JSONResponseBodyStatusCode `json:"statusCode"`
+ }
+ // JSON403 the response for an HTTP 403 `application/json` response
+ JSON403 *struct {
+ Details interface{} `json:"details,omitempty"`
+ Error string `json:"error"`
+ Message string `json:"message"`
+ ReqId string `json:"reqId"`
+ StatusCode CreateOrganization403JSONResponseBodyStatusCode `json:"statusCode"`
+ }
+ // JSON404 the response for an HTTP 404 `application/json` response
+ JSON404 *struct {
+ Error string `json:"error"`
+ Message string `json:"message"`
+ ReqId string `json:"reqId"`
+ StatusCode CreateOrganization404JSONResponseBodyStatusCode `json:"statusCode"`
+ }
+ // JSON422 the response for an HTTP 422 `application/json` response
+ JSON422 *struct {
+ Error string `json:"error"`
+ Message interface{} `json:"message,omitempty"`
+ ReqId string `json:"reqId"`
+ StatusCode CreateOrganization422JSONResponseBodyStatusCode `json:"statusCode"`
+ }
+ // JSON500 the response for an HTTP 500 `application/json` response
+ JSON500 *struct {
+ Error string `json:"error"`
+ Message string `json:"message"`
+ ReqId string `json:"reqId"`
+ StatusCode CreateOrganization500JSONResponseBodyStatusCode `json:"statusCode"`
+ }
+}
+
+// GetJSON200 returns the response for an HTTP 200 `application/json` response
+func (r CreateOrganizationResponse) GetJSON200() *struct {
+ Organization struct {
+ AllowCrossProjectSecretSharing *bool `json:"allowCrossProjectSecretSharing,omitempty"`
+ AllowSecretSharingOutsideOrganization *bool `json:"allowSecretSharingOutsideOrganization,omitempty"`
+ AuthEnforced *bool `json:"authEnforced,omitempty"`
+ BlockDuplicateSecretSyncDestinations *bool `json:"blockDuplicateSecretSyncDestinations,omitempty"`
+ BypassOrgAuthEnabled *bool `json:"bypassOrgAuthEnabled,omitempty"`
+ CreatedAt time.Time `json:"createdAt"`
+ CustomerId *string `json:"customerId,omitempty"`
+ DefaultMembershipRole *string `json:"defaultMembershipRole,omitempty"`
+ EnforceMfa *bool `json:"enforceMfa,omitempty"`
+ GoogleSsoAuthEnforced *bool `json:"googleSsoAuthEnforced,omitempty"`
+ Id openapi_types.UUID `json:"id"`
+ KmsDefaultKeyId *openapi_types.UUID `json:"kmsDefaultKeyId,omitempty"`
+ KmsProductEnabled *bool `json:"kmsProductEnabled,omitempty"`
+ MaxSharedSecretLifetime *float32 `json:"maxSharedSecretLifetime,omitempty"`
+ MaxSharedSecretViewLimit *float32 `json:"maxSharedSecretViewLimit,omitempty"`
+ Name string `json:"name"`
+ ParentOrgId *openapi_types.UUID `json:"parentOrgId,omitempty"`
+ PkiProductEnabled *bool `json:"pkiProductEnabled,omitempty"`
+ PrivilegeUpgradeInitiatedAt *time.Time `json:"privilegeUpgradeInitiatedAt,omitempty"`
+ PrivilegeUpgradeInitiatedByUsername *string `json:"privilegeUpgradeInitiatedByUsername,omitempty"`
+ RootOrgId *openapi_types.UUID `json:"rootOrgId,omitempty"`
+ ScannerProductEnabled *bool `json:"scannerProductEnabled,omitempty"`
+ ScimEnabled *bool `json:"scimEnabled,omitempty"`
+ SecretShareBrandConfig interface{} `json:"secretShareBrandConfig,omitempty"`
+ SecretsProductEnabled *bool `json:"secretsProductEnabled,omitempty"`
+ SelectedMfaMethod *string `json:"selectedMfaMethod,omitempty"`
+ ShareSecretsProductEnabled *bool `json:"shareSecretsProductEnabled,omitempty"`
+ ShouldUseNewPrivilegeSystem *bool `json:"shouldUseNewPrivilegeSystem,omitempty"`
+ Slug string `json:"slug"`
+ UpdatedAt time.Time `json:"updatedAt"`
+ UserTokenExpiration *string `json:"userTokenExpiration,omitempty"`
+ } `json:"organization"`
+} {
+ return r.JSON200
+}
+
+// GetJSON400 returns the response for an HTTP 400 `application/json` response
+func (r CreateOrganizationResponse) GetJSON400() *struct {
+ Details interface{} `json:"details,omitempty"`
+ Error string `json:"error"`
+ Message string `json:"message"`
+ ReqId string `json:"reqId"`
+ StatusCode CreateOrganization400JSONResponseBodyStatusCode `json:"statusCode"`
+} {
+ return r.JSON400
+}
+
+// GetJSON401 returns the response for an HTTP 401 `application/json` response
+func (r CreateOrganizationResponse) GetJSON401() *struct {
+ Error string `json:"error"`
+ Message string `json:"message"`
+ ReqId string `json:"reqId"`
+ StatusCode CreateOrganization401JSONResponseBodyStatusCode `json:"statusCode"`
+} {
+ return r.JSON401
+}
+
+// GetJSON403 returns the response for an HTTP 403 `application/json` response
+func (r CreateOrganizationResponse) GetJSON403() *struct {
+ Details interface{} `json:"details,omitempty"`
+ Error string `json:"error"`
+ Message string `json:"message"`
+ ReqId string `json:"reqId"`
+ StatusCode CreateOrganization403JSONResponseBodyStatusCode `json:"statusCode"`
+} {
+ return r.JSON403
+}
+
+// GetJSON404 returns the response for an HTTP 404 `application/json` response
+func (r CreateOrganizationResponse) GetJSON404() *struct {
+ Error string `json:"error"`
+ Message string `json:"message"`
+ ReqId string `json:"reqId"`
+ StatusCode CreateOrganization404JSONResponseBodyStatusCode `json:"statusCode"`
+} {
+ return r.JSON404
+}
+
+// GetJSON422 returns the response for an HTTP 422 `application/json` response
+func (r CreateOrganizationResponse) GetJSON422() *struct {
+ Error string `json:"error"`
+ Message interface{} `json:"message,omitempty"`
+ ReqId string `json:"reqId"`
+ StatusCode CreateOrganization422JSONResponseBodyStatusCode `json:"statusCode"`
+} {
+ return r.JSON422
+}
+
+// GetJSON500 returns the response for an HTTP 500 `application/json` response
+func (r CreateOrganizationResponse) GetJSON500() *struct {
+ Error string `json:"error"`
+ Message string `json:"message"`
+ ReqId string `json:"reqId"`
+ StatusCode CreateOrganization500JSONResponseBodyStatusCode `json:"statusCode"`
+} {
+ return r.JSON500
+}
+
+// GetBody returns the raw response body bytes
+func (r CreateOrganizationResponse) GetBody() []byte {
+ return r.Body
+}
+
+// Status returns HTTPResponse.Status
+func (r CreateOrganizationResponse) Status() string {
+ if r.HTTPResponse != nil {
+ return r.HTTPResponse.Status
+ }
+ return http.StatusText(0)
+}
+
+// StatusCode returns HTTPResponse.StatusCode
+func (r CreateOrganizationResponse) StatusCode() int {
+ if r.HTTPResponse != nil {
+ return r.HTTPResponse.StatusCode
+ }
+ return 0
+}
+
+// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
+func (r CreateOrganizationResponse) ContentType() string {
+ if r.HTTPResponse != nil {
+ return r.HTTPResponse.Header.Get("Content-Type")
+ }
+ return ""
+}
+
+type DeleteOrganizationResponse struct {
+ Body []byte
+ HTTPResponse *http.Response
+ // JSON200 the response for an HTTP 200 `application/json` response
+ JSON200 *struct {
+ AccessToken string `json:"accessToken"`
+ Organization struct {
+ AllowCrossProjectSecretSharing *bool `json:"allowCrossProjectSecretSharing,omitempty"`
+ AllowSecretSharingOutsideOrganization *bool `json:"allowSecretSharingOutsideOrganization,omitempty"`
+ AuthEnforced *bool `json:"authEnforced,omitempty"`
+ BlockDuplicateSecretSyncDestinations *bool `json:"blockDuplicateSecretSyncDestinations,omitempty"`
+ BypassOrgAuthEnabled *bool `json:"bypassOrgAuthEnabled,omitempty"`
+ CreatedAt time.Time `json:"createdAt"`
+ CustomerId *string `json:"customerId,omitempty"`
+ DefaultMembershipRole *string `json:"defaultMembershipRole,omitempty"`
+ EnforceMfa *bool `json:"enforceMfa,omitempty"`
+ GoogleSsoAuthEnforced *bool `json:"googleSsoAuthEnforced,omitempty"`
+ Id openapi_types.UUID `json:"id"`
+ KmsDefaultKeyId *openapi_types.UUID `json:"kmsDefaultKeyId,omitempty"`
+ KmsProductEnabled *bool `json:"kmsProductEnabled,omitempty"`
+ MaxSharedSecretLifetime *float32 `json:"maxSharedSecretLifetime,omitempty"`
+ MaxSharedSecretViewLimit *float32 `json:"maxSharedSecretViewLimit,omitempty"`
+ Name string `json:"name"`
+ ParentOrgId *openapi_types.UUID `json:"parentOrgId,omitempty"`
+ PkiProductEnabled *bool `json:"pkiProductEnabled,omitempty"`
+ PrivilegeUpgradeInitiatedAt *time.Time `json:"privilegeUpgradeInitiatedAt,omitempty"`
+ PrivilegeUpgradeInitiatedByUsername *string `json:"privilegeUpgradeInitiatedByUsername,omitempty"`
+ RootOrgId *openapi_types.UUID `json:"rootOrgId,omitempty"`
+ ScannerProductEnabled *bool `json:"scannerProductEnabled,omitempty"`
+ ScimEnabled *bool `json:"scimEnabled,omitempty"`
+ SecretShareBrandConfig interface{} `json:"secretShareBrandConfig,omitempty"`
+ SecretsProductEnabled *bool `json:"secretsProductEnabled,omitempty"`
+ SelectedMfaMethod *string `json:"selectedMfaMethod,omitempty"`
+ ShareSecretsProductEnabled *bool `json:"shareSecretsProductEnabled,omitempty"`
+ ShouldUseNewPrivilegeSystem *bool `json:"shouldUseNewPrivilegeSystem,omitempty"`
+ Slug string `json:"slug"`
+ UpdatedAt time.Time `json:"updatedAt"`
+ UserTokenExpiration *string `json:"userTokenExpiration,omitempty"`
+ } `json:"organization"`
+ }
+ // JSON400 the response for an HTTP 400 `application/json` response
+ JSON400 *struct {
+ Details interface{} `json:"details,omitempty"`
+ Error string `json:"error"`
+ Message string `json:"message"`
+ ReqId string `json:"reqId"`
+ StatusCode DeleteOrganization400JSONResponseBodyStatusCode `json:"statusCode"`
+ }
+ // JSON401 the response for an HTTP 401 `application/json` response
+ JSON401 *struct {
+ Error string `json:"error"`
+ Message string `json:"message"`
+ ReqId string `json:"reqId"`
+ StatusCode DeleteOrganization401JSONResponseBodyStatusCode `json:"statusCode"`
+ }
+ // JSON403 the response for an HTTP 403 `application/json` response
+ JSON403 *struct {
+ Details interface{} `json:"details,omitempty"`
+ Error string `json:"error"`
+ Message string `json:"message"`
+ ReqId string `json:"reqId"`
+ StatusCode DeleteOrganization403JSONResponseBodyStatusCode `json:"statusCode"`
+ }
+ // JSON404 the response for an HTTP 404 `application/json` response
+ JSON404 *struct {
+ Error string `json:"error"`
+ Message string `json:"message"`
+ ReqId string `json:"reqId"`
+ StatusCode DeleteOrganization404JSONResponseBodyStatusCode `json:"statusCode"`
+ }
+ // JSON422 the response for an HTTP 422 `application/json` response
+ JSON422 *struct {
+ Error string `json:"error"`
+ Message interface{} `json:"message,omitempty"`
+ ReqId string `json:"reqId"`
+ StatusCode DeleteOrganization422JSONResponseBodyStatusCode `json:"statusCode"`
+ }
+ // JSON500 the response for an HTTP 500 `application/json` response
+ JSON500 *struct {
+ Error string `json:"error"`
+ Message string `json:"message"`
+ ReqId string `json:"reqId"`
+ StatusCode DeleteOrganization500JSONResponseBodyStatusCode `json:"statusCode"`
+ }
+}
+
+// GetJSON200 returns the response for an HTTP 200 `application/json` response
+func (r DeleteOrganizationResponse) GetJSON200() *struct {
+ AccessToken string `json:"accessToken"`
+ Organization struct {
+ AllowCrossProjectSecretSharing *bool `json:"allowCrossProjectSecretSharing,omitempty"`
+ AllowSecretSharingOutsideOrganization *bool `json:"allowSecretSharingOutsideOrganization,omitempty"`
+ AuthEnforced *bool `json:"authEnforced,omitempty"`
+ BlockDuplicateSecretSyncDestinations *bool `json:"blockDuplicateSecretSyncDestinations,omitempty"`
+ BypassOrgAuthEnabled *bool `json:"bypassOrgAuthEnabled,omitempty"`
+ CreatedAt time.Time `json:"createdAt"`
+ CustomerId *string `json:"customerId,omitempty"`
+ DefaultMembershipRole *string `json:"defaultMembershipRole,omitempty"`
+ EnforceMfa *bool `json:"enforceMfa,omitempty"`
+ GoogleSsoAuthEnforced *bool `json:"googleSsoAuthEnforced,omitempty"`
+ Id openapi_types.UUID `json:"id"`
+ KmsDefaultKeyId *openapi_types.UUID `json:"kmsDefaultKeyId,omitempty"`
+ KmsProductEnabled *bool `json:"kmsProductEnabled,omitempty"`
+ MaxSharedSecretLifetime *float32 `json:"maxSharedSecretLifetime,omitempty"`
+ MaxSharedSecretViewLimit *float32 `json:"maxSharedSecretViewLimit,omitempty"`
+ Name string `json:"name"`
+ ParentOrgId *openapi_types.UUID `json:"parentOrgId,omitempty"`
+ PkiProductEnabled *bool `json:"pkiProductEnabled,omitempty"`
+ PrivilegeUpgradeInitiatedAt *time.Time `json:"privilegeUpgradeInitiatedAt,omitempty"`
+ PrivilegeUpgradeInitiatedByUsername *string `json:"privilegeUpgradeInitiatedByUsername,omitempty"`
+ RootOrgId *openapi_types.UUID `json:"rootOrgId,omitempty"`
+ ScannerProductEnabled *bool `json:"scannerProductEnabled,omitempty"`
+ ScimEnabled *bool `json:"scimEnabled,omitempty"`
+ SecretShareBrandConfig interface{} `json:"secretShareBrandConfig,omitempty"`
+ SecretsProductEnabled *bool `json:"secretsProductEnabled,omitempty"`
+ SelectedMfaMethod *string `json:"selectedMfaMethod,omitempty"`
+ ShareSecretsProductEnabled *bool `json:"shareSecretsProductEnabled,omitempty"`
+ ShouldUseNewPrivilegeSystem *bool `json:"shouldUseNewPrivilegeSystem,omitempty"`
+ Slug string `json:"slug"`
+ UpdatedAt time.Time `json:"updatedAt"`
+ UserTokenExpiration *string `json:"userTokenExpiration,omitempty"`
+ } `json:"organization"`
+} {
+ return r.JSON200
+}
+
+// GetJSON400 returns the response for an HTTP 400 `application/json` response
+func (r DeleteOrganizationResponse) GetJSON400() *struct {
+ Details interface{} `json:"details,omitempty"`
+ Error string `json:"error"`
+ Message string `json:"message"`
+ ReqId string `json:"reqId"`
+ StatusCode DeleteOrganization400JSONResponseBodyStatusCode `json:"statusCode"`
+} {
+ return r.JSON400
+}
+
+// GetJSON401 returns the response for an HTTP 401 `application/json` response
+func (r DeleteOrganizationResponse) GetJSON401() *struct {
+ Error string `json:"error"`
+ Message string `json:"message"`
+ ReqId string `json:"reqId"`
+ StatusCode DeleteOrganization401JSONResponseBodyStatusCode `json:"statusCode"`
+} {
+ return r.JSON401
+}
+
+// GetJSON403 returns the response for an HTTP 403 `application/json` response
+func (r DeleteOrganizationResponse) GetJSON403() *struct {
+ Details interface{} `json:"details,omitempty"`
+ Error string `json:"error"`
+ Message string `json:"message"`
+ ReqId string `json:"reqId"`
+ StatusCode DeleteOrganization403JSONResponseBodyStatusCode `json:"statusCode"`
+} {
+ return r.JSON403
+}
+
+// GetJSON404 returns the response for an HTTP 404 `application/json` response
+func (r DeleteOrganizationResponse) GetJSON404() *struct {
+ Error string `json:"error"`
+ Message string `json:"message"`
+ ReqId string `json:"reqId"`
+ StatusCode DeleteOrganization404JSONResponseBodyStatusCode `json:"statusCode"`
+} {
+ return r.JSON404
+}
+
+// GetJSON422 returns the response for an HTTP 422 `application/json` response
+func (r DeleteOrganizationResponse) GetJSON422() *struct {
+ Error string `json:"error"`
+ Message interface{} `json:"message,omitempty"`
+ ReqId string `json:"reqId"`
+ StatusCode DeleteOrganization422JSONResponseBodyStatusCode `json:"statusCode"`
+} {
+ return r.JSON422
+}
+
+// GetJSON500 returns the response for an HTTP 500 `application/json` response
+func (r DeleteOrganizationResponse) GetJSON500() *struct {
+ Error string `json:"error"`
+ Message string `json:"message"`
+ ReqId string `json:"reqId"`
+ StatusCode DeleteOrganization500JSONResponseBodyStatusCode `json:"statusCode"`
+} {
+ return r.JSON500
+}
+
+// GetBody returns the raw response body bytes
+func (r DeleteOrganizationResponse) GetBody() []byte {
+ return r.Body
+}
+
+// Status returns HTTPResponse.Status
+func (r DeleteOrganizationResponse) Status() string {
+ if r.HTTPResponse != nil {
+ return r.HTTPResponse.Status
+ }
+ return http.StatusText(0)
+}
+
+// StatusCode returns HTTPResponse.StatusCode
+func (r DeleteOrganizationResponse) StatusCode() int {
+ if r.HTTPResponse != nil {
+ return r.HTTPResponse.StatusCode
+ }
+ return 0
+}
+
+// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
+func (r DeleteOrganizationResponse) ContentType() string {
+ if r.HTTPResponse != nil {
+ return r.HTTPResponse.Header.Get("Content-Type")
+ }
+ return ""
+}
+
+type LoginV3Response struct {
+ Body []byte
+ HTTPResponse *http.Response
+ // JSON200 the response for an HTTP 200 `application/json` response
+ JSON200 *struct {
+ AccessToken string `json:"accessToken"`
+ }
+ // JSON400 the response for an HTTP 400 `application/json` response
+ JSON400 *struct {
+ Details interface{} `json:"details,omitempty"`
+ Error string `json:"error"`
+ Message string `json:"message"`
+ ReqId string `json:"reqId"`
+ StatusCode LoginV3400JSONResponseBodyStatusCode `json:"statusCode"`
+ }
+ // JSON401 the response for an HTTP 401 `application/json` response
+ JSON401 *struct {
+ Error string `json:"error"`
+ Message string `json:"message"`
+ ReqId string `json:"reqId"`
+ StatusCode LoginV3401JSONResponseBodyStatusCode `json:"statusCode"`
+ }
+ // JSON403 the response for an HTTP 403 `application/json` response
+ JSON403 *struct {
+ Details interface{} `json:"details,omitempty"`
+ Error string `json:"error"`
+ Message string `json:"message"`
+ ReqId string `json:"reqId"`
+ StatusCode LoginV3403JSONResponseBodyStatusCode `json:"statusCode"`
+ }
+ // JSON404 the response for an HTTP 404 `application/json` response
+ JSON404 *struct {
+ Error string `json:"error"`
+ Message string `json:"message"`
+ ReqId string `json:"reqId"`
+ StatusCode LoginV3404JSONResponseBodyStatusCode `json:"statusCode"`
+ }
+ // JSON422 the response for an HTTP 422 `application/json` response
+ JSON422 *struct {
+ Error string `json:"error"`
+ Message interface{} `json:"message,omitempty"`
+ ReqId string `json:"reqId"`
+ StatusCode LoginV3422JSONResponseBodyStatusCode `json:"statusCode"`
+ }
+ // JSON500 the response for an HTTP 500 `application/json` response
+ JSON500 *struct {
+ Error string `json:"error"`
+ Message string `json:"message"`
+ ReqId string `json:"reqId"`
+ StatusCode LoginV3500JSONResponseBodyStatusCode `json:"statusCode"`
+ }
+}
+
+// GetJSON200 returns the response for an HTTP 200 `application/json` response
+func (r LoginV3Response) GetJSON200() *struct {
+ AccessToken string `json:"accessToken"`
+} {
+ return r.JSON200
+}
+
+// GetJSON400 returns the response for an HTTP 400 `application/json` response
+func (r LoginV3Response) GetJSON400() *struct {
+ Details interface{} `json:"details,omitempty"`
+ Error string `json:"error"`
+ Message string `json:"message"`
+ ReqId string `json:"reqId"`
+ StatusCode LoginV3400JSONResponseBodyStatusCode `json:"statusCode"`
+} {
+ return r.JSON400
+}
+
+// GetJSON401 returns the response for an HTTP 401 `application/json` response
+func (r LoginV3Response) GetJSON401() *struct {
+ Error string `json:"error"`
+ Message string `json:"message"`
+ ReqId string `json:"reqId"`
+ StatusCode LoginV3401JSONResponseBodyStatusCode `json:"statusCode"`
+} {
+ return r.JSON401
+}
+
+// GetJSON403 returns the response for an HTTP 403 `application/json` response
+func (r LoginV3Response) GetJSON403() *struct {
+ Details interface{} `json:"details,omitempty"`
+ Error string `json:"error"`
+ Message string `json:"message"`
+ ReqId string `json:"reqId"`
+ StatusCode LoginV3403JSONResponseBodyStatusCode `json:"statusCode"`
+} {
+ return r.JSON403
+}
+
+// GetJSON404 returns the response for an HTTP 404 `application/json` response
+func (r LoginV3Response) GetJSON404() *struct {
+ Error string `json:"error"`
+ Message string `json:"message"`
+ ReqId string `json:"reqId"`
+ StatusCode LoginV3404JSONResponseBodyStatusCode `json:"statusCode"`
+} {
+ return r.JSON404
+}
+
+// GetJSON422 returns the response for an HTTP 422 `application/json` response
+func (r LoginV3Response) GetJSON422() *struct {
+ Error string `json:"error"`
+ Message interface{} `json:"message,omitempty"`
+ ReqId string `json:"reqId"`
+ StatusCode LoginV3422JSONResponseBodyStatusCode `json:"statusCode"`
+} {
+ return r.JSON422
+}
+
+// GetJSON500 returns the response for an HTTP 500 `application/json` response
+func (r LoginV3Response) GetJSON500() *struct {
+ Error string `json:"error"`
+ Message string `json:"message"`
+ ReqId string `json:"reqId"`
+ StatusCode LoginV3500JSONResponseBodyStatusCode `json:"statusCode"`
+} {
+ return r.JSON500
+}
+
+// GetBody returns the raw response body bytes
+func (r LoginV3Response) GetBody() []byte {
+ return r.Body
+}
+
+// Status returns HTTPResponse.Status
+func (r LoginV3Response) Status() string {
+ if r.HTTPResponse != nil {
+ return r.HTTPResponse.Status
+ }
+ return http.StatusText(0)
+}
+
+// StatusCode returns HTTPResponse.StatusCode
+func (r LoginV3Response) StatusCode() int {
+ if r.HTTPResponse != nil {
+ return r.HTTPResponse.StatusCode
+ }
+ return 0
+}
+
+// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
+func (r LoginV3Response) ContentType() string {
+ if r.HTTPResponse != nil {
+ return r.HTTPResponse.Header.Get("Content-Type")
+ }
+ return ""
+}
+
+type SelectOrganizationV3Response struct {
+ Body []byte
+ HTTPResponse *http.Response
+ // JSON200 the response for an HTTP 200 `application/json` response
+ JSON200 *struct {
+ IsMfaEnabled bool `json:"isMfaEnabled"`
+ MfaMethod *string `json:"mfaMethod,omitempty"`
+ Token string `json:"token"`
+ }
+ // JSON400 the response for an HTTP 400 `application/json` response
+ JSON400 *struct {
+ Details interface{} `json:"details,omitempty"`
+ Error string `json:"error"`
+ Message string `json:"message"`
+ ReqId string `json:"reqId"`
+ StatusCode SelectOrganizationV3400JSONResponseBodyStatusCode `json:"statusCode"`
+ }
+ // JSON401 the response for an HTTP 401 `application/json` response
+ JSON401 *struct {
+ Error string `json:"error"`
+ Message string `json:"message"`
+ ReqId string `json:"reqId"`
+ StatusCode SelectOrganizationV3401JSONResponseBodyStatusCode `json:"statusCode"`
+ }
+ // JSON403 the response for an HTTP 403 `application/json` response
+ JSON403 *struct {
+ Details interface{} `json:"details,omitempty"`
+ Error string `json:"error"`
+ Message string `json:"message"`
+ ReqId string `json:"reqId"`
+ StatusCode SelectOrganizationV3403JSONResponseBodyStatusCode `json:"statusCode"`
+ }
+ // JSON404 the response for an HTTP 404 `application/json` response
+ JSON404 *struct {
+ Error string `json:"error"`
+ Message string `json:"message"`
+ ReqId string `json:"reqId"`
+ StatusCode SelectOrganizationV3404JSONResponseBodyStatusCode `json:"statusCode"`
+ }
+ // JSON422 the response for an HTTP 422 `application/json` response
+ JSON422 *struct {
+ Error string `json:"error"`
+ Message interface{} `json:"message,omitempty"`
+ ReqId string `json:"reqId"`
+ StatusCode SelectOrganizationV3422JSONResponseBodyStatusCode `json:"statusCode"`
+ }
+ // JSON500 the response for an HTTP 500 `application/json` response
+ JSON500 *struct {
+ Error string `json:"error"`
+ Message string `json:"message"`
+ ReqId string `json:"reqId"`
+ StatusCode SelectOrganizationV3500JSONResponseBodyStatusCode `json:"statusCode"`
+ }
+}
+
+// GetJSON200 returns the response for an HTTP 200 `application/json` response
+func (r SelectOrganizationV3Response) GetJSON200() *struct {
+ IsMfaEnabled bool `json:"isMfaEnabled"`
+ MfaMethod *string `json:"mfaMethod,omitempty"`
+ Token string `json:"token"`
+} {
+ return r.JSON200
+}
+
+// GetJSON400 returns the response for an HTTP 400 `application/json` response
+func (r SelectOrganizationV3Response) GetJSON400() *struct {
+ Details interface{} `json:"details,omitempty"`
+ Error string `json:"error"`
+ Message string `json:"message"`
+ ReqId string `json:"reqId"`
+ StatusCode SelectOrganizationV3400JSONResponseBodyStatusCode `json:"statusCode"`
+} {
+ return r.JSON400
+}
+
+// GetJSON401 returns the response for an HTTP 401 `application/json` response
+func (r SelectOrganizationV3Response) GetJSON401() *struct {
+ Error string `json:"error"`
+ Message string `json:"message"`
+ ReqId string `json:"reqId"`
+ StatusCode SelectOrganizationV3401JSONResponseBodyStatusCode `json:"statusCode"`
+} {
+ return r.JSON401
+}
+
+// GetJSON403 returns the response for an HTTP 403 `application/json` response
+func (r SelectOrganizationV3Response) GetJSON403() *struct {
+ Details interface{} `json:"details,omitempty"`
+ Error string `json:"error"`
+ Message string `json:"message"`
+ ReqId string `json:"reqId"`
+ StatusCode SelectOrganizationV3403JSONResponseBodyStatusCode `json:"statusCode"`
+} {
+ return r.JSON403
+}
+
+// GetJSON404 returns the response for an HTTP 404 `application/json` response
+func (r SelectOrganizationV3Response) GetJSON404() *struct {
+ Error string `json:"error"`
+ Message string `json:"message"`
+ ReqId string `json:"reqId"`
+ StatusCode SelectOrganizationV3404JSONResponseBodyStatusCode `json:"statusCode"`
+} {
+ return r.JSON404
+}
+
+// GetJSON422 returns the response for an HTTP 422 `application/json` response
+func (r SelectOrganizationV3Response) GetJSON422() *struct {
+ Error string `json:"error"`
+ Message interface{} `json:"message,omitempty"`
+ ReqId string `json:"reqId"`
+ StatusCode SelectOrganizationV3422JSONResponseBodyStatusCode `json:"statusCode"`
+} {
+ return r.JSON422
+}
+
+// GetJSON500 returns the response for an HTTP 500 `application/json` response
+func (r SelectOrganizationV3Response) GetJSON500() *struct {
+ Error string `json:"error"`
+ Message string `json:"message"`
+ ReqId string `json:"reqId"`
+ StatusCode SelectOrganizationV3500JSONResponseBodyStatusCode `json:"statusCode"`
+} {
+ return r.JSON500
+}
+
+// GetBody returns the raw response body bytes
+func (r SelectOrganizationV3Response) GetBody() []byte {
+ return r.Body
+}
+
+// Status returns HTTPResponse.Status
+func (r SelectOrganizationV3Response) Status() string {
+ if r.HTTPResponse != nil {
+ return r.HTTPResponse.Status
+ }
+ return http.StatusText(0)
+}
+
+// StatusCode returns HTTPResponse.StatusCode
+func (r SelectOrganizationV3Response) StatusCode() int {
+ if r.HTTPResponse != nil {
+ return r.HTTPResponse.StatusCode
+ }
+ return 0
+}
+
+// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
+func (r SelectOrganizationV3Response) ContentType() string {
+ if r.HTTPResponse != nil {
+ return r.HTTPResponse.Header.Get("Content-Type")
+ }
+ return ""
+}
+
+// GetServerStatusWithResponse performs a GET /api/status (the `GetServerStatus` operationId) request.
+//
+// Returns a wrapper object for the known response body format(s).
+func (c *ClientWithResponses) GetServerStatusWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetServerStatusResponse, error) {
+ rsp, err := c.GetServerStatus(ctx, reqEditors...)
+ if err != nil {
+ return nil, err
+ }
+ return ParseGetServerStatusResponse(rsp)
+}
+
+// AdminBootstrapWithBodyWithResponse performs a POST /api/v1/admin/bootstrap (the `AdminBootstrap` operationId) request,
+// with any type of body and a specified content type.
+//
+// Returns a wrapper object for the known response body format(s).
+func (c *ClientWithResponses) AdminBootstrapWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*AdminBootstrapResponse, error) {
+ rsp, err := c.AdminBootstrapWithBody(ctx, contentType, body, reqEditors...)
+ if err != nil {
+ return nil, err
+ }
+ return ParseAdminBootstrapResponse(rsp)
+}
+
+// AdminBootstrapWithResponse performs a POST /api/v1/admin/bootstrap (the `AdminBootstrap` operationId) request.
+// Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
+func (c *ClientWithResponses) AdminBootstrapWithResponse(ctx context.Context, body AdminBootstrapJSONRequestBody, reqEditors ...RequestEditorFn) (*AdminBootstrapResponse, error) {
+ rsp, err := c.AdminBootstrap(ctx, body, reqEditors...)
+ if err != nil {
+ return nil, err
+ }
+ return ParseAdminBootstrapResponse(rsp)
+}
+
+// UpdateAdminConfigWithBodyWithResponse performs a PATCH /api/v1/admin/config (the `UpdateAdminConfig` operationId) request,
+// with any type of body and a specified content type.
+//
+// Returns a wrapper object for the known response body format(s).
+func (c *ClientWithResponses) UpdateAdminConfigWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateAdminConfigResponse, error) {
+ rsp, err := c.UpdateAdminConfigWithBody(ctx, contentType, body, reqEditors...)
+ if err != nil {
+ return nil, err
+ }
+ return ParseUpdateAdminConfigResponse(rsp)
+}
+
+// UpdateAdminConfigWithResponse performs a PATCH /api/v1/admin/config (the `UpdateAdminConfig` operationId) request.
+// Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
+func (c *ClientWithResponses) UpdateAdminConfigWithResponse(ctx context.Context, body UpdateAdminConfigJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateAdminConfigResponse, error) {
+ rsp, err := c.UpdateAdminConfig(ctx, body, reqEditors...)
+ if err != nil {
+ return nil, err
+ }
+ return ParseUpdateAdminConfigResponse(rsp)
+}
+
+// RefreshAuthTokenWithResponse performs a POST /api/v1/auth/token (the `RefreshAuthToken` operationId) request.
+//
+// Returns a wrapper object for the known response body format(s).
+func (c *ClientWithResponses) RefreshAuthTokenWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*RefreshAuthTokenResponse, error) {
+ rsp, err := c.RefreshAuthToken(ctx, reqEditors...)
+ if err != nil {
+ return nil, err
+ }
+ return ParseRefreshAuthTokenResponse(rsp)
+}
+
+// GetOrganizationPlanWithResponse performs a GET /api/v1/organizations/{organizationId}/plan (the `GetOrganizationPlan` operationId) request.
+//
+// Returns a wrapper object for the known response body format(s).
+func (c *ClientWithResponses) GetOrganizationPlanWithResponse(ctx context.Context, organizationId string, params *GetOrganizationPlanParams, reqEditors ...RequestEditorFn) (*GetOrganizationPlanResponse, error) {
+ rsp, err := c.GetOrganizationPlan(ctx, organizationId, params, reqEditors...)
+ if err != nil {
+ return nil, err
+ }
+ return ParseGetOrganizationPlanResponse(rsp)
+}
+
+// CreateProjectWithBodyWithResponse performs a POST /api/v1/projects (the `CreateProject` operationId) request,
+// with any type of body and a specified content type.
+//
+// Create a new project.
+//
+// Returns a wrapper object for the known response body format(s).
+func (c *ClientWithResponses) CreateProjectWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateProjectResponse, error) {
+ rsp, err := c.CreateProjectWithBody(ctx, contentType, body, reqEditors...)
+ if err != nil {
+ return nil, err
+ }
+ return ParseCreateProjectResponse(rsp)
+}
+
+// CreateProjectWithResponse performs a POST /api/v1/projects (the `CreateProject` operationId) request.
+// Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
+//
+// Create a new project.
+func (c *ClientWithResponses) CreateProjectWithResponse(ctx context.Context, body CreateProjectJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateProjectResponse, error) {
+ rsp, err := c.CreateProject(ctx, body, reqEditors...)
+ if err != nil {
+ return nil, err
+ }
+ return ParseCreateProjectResponse(rsp)
+}
+
+// CreateOrganizationWithBodyWithResponse performs a POST /api/v2/organizations (the `CreateOrganization` operationId) request,
+// with any type of body and a specified content type.
+//
+// Returns a wrapper object for the known response body format(s).
+func (c *ClientWithResponses) CreateOrganizationWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateOrganizationResponse, error) {
+ rsp, err := c.CreateOrganizationWithBody(ctx, contentType, body, reqEditors...)
+ if err != nil {
+ return nil, err
+ }
+ return ParseCreateOrganizationResponse(rsp)
+}
+
+// CreateOrganizationWithResponse performs a POST /api/v2/organizations (the `CreateOrganization` operationId) request.
+// Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
+func (c *ClientWithResponses) CreateOrganizationWithResponse(ctx context.Context, body CreateOrganizationJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateOrganizationResponse, error) {
+ rsp, err := c.CreateOrganization(ctx, body, reqEditors...)
+ if err != nil {
+ return nil, err
+ }
+ return ParseCreateOrganizationResponse(rsp)
+}
+
+// DeleteOrganizationWithResponse performs a DELETE /api/v2/organizations/{organizationId} (the `DeleteOrganization` operationId) request.
+//
+// Returns a wrapper object for the known response body format(s).
+func (c *ClientWithResponses) DeleteOrganizationWithResponse(ctx context.Context, organizationId string, reqEditors ...RequestEditorFn) (*DeleteOrganizationResponse, error) {
+ rsp, err := c.DeleteOrganization(ctx, organizationId, reqEditors...)
+ if err != nil {
+ return nil, err
+ }
+ return ParseDeleteOrganizationResponse(rsp)
+}
+
+// LoginV3WithBodyWithResponse performs a POST /api/v3/auth/login (the `LoginV3` operationId) request,
+// with any type of body and a specified content type.
+//
+// Returns a wrapper object for the known response body format(s).
+func (c *ClientWithResponses) LoginV3WithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*LoginV3Response, error) {
+ rsp, err := c.LoginV3WithBody(ctx, contentType, body, reqEditors...)
+ if err != nil {
+ return nil, err
+ }
+ return ParseLoginV3Response(rsp)
+}
+
+// LoginV3WithResponse performs a POST /api/v3/auth/login (the `LoginV3` operationId) request.
+// Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
+func (c *ClientWithResponses) LoginV3WithResponse(ctx context.Context, body LoginV3JSONRequestBody, reqEditors ...RequestEditorFn) (*LoginV3Response, error) {
+ rsp, err := c.LoginV3(ctx, body, reqEditors...)
+ if err != nil {
+ return nil, err
+ }
+ return ParseLoginV3Response(rsp)
+}
+
+// SelectOrganizationV3WithBodyWithResponse performs a POST /api/v3/auth/select-organization (the `SelectOrganizationV3` operationId) request,
+// with any type of body and a specified content type.
+//
+// Returns a wrapper object for the known response body format(s).
+func (c *ClientWithResponses) SelectOrganizationV3WithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SelectOrganizationV3Response, error) {
+ rsp, err := c.SelectOrganizationV3WithBody(ctx, contentType, body, reqEditors...)
+ if err != nil {
+ return nil, err
+ }
+ return ParseSelectOrganizationV3Response(rsp)
+}
+
+// SelectOrganizationV3WithResponse performs a POST /api/v3/auth/select-organization (the `SelectOrganizationV3` operationId) request.
+// Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
+func (c *ClientWithResponses) SelectOrganizationV3WithResponse(ctx context.Context, body SelectOrganizationV3JSONRequestBody, reqEditors ...RequestEditorFn) (*SelectOrganizationV3Response, error) {
+ rsp, err := c.SelectOrganizationV3(ctx, body, reqEditors...)
+ if err != nil {
+ return nil, err
+ }
+ return ParseSelectOrganizationV3Response(rsp)
+}
+
+// ParseGetServerStatusResponse parses an HTTP response from a GetServerStatusWithResponse call
+func ParseGetServerStatusResponse(rsp *http.Response) (*GetServerStatusResponse, error) {
+ bodyBytes, err := io.ReadAll(rsp.Body)
+ defer func() { _ = rsp.Body.Close() }()
+ if err != nil {
+ return nil, err
+ }
+
+ response := &GetServerStatusResponse{
+ Body: bodyBytes,
+ HTTPResponse: rsp,
+ }
+
+ switch {
+ case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
+ var dest struct {
+ AuditLogStorageDisabled *bool `json:"auditLogStorageDisabled,omitempty"`
+ Date time.Time `json:"date"`
+ EmailConfigured *bool `json:"emailConfigured,omitempty"`
+ InviteOnlySignup *bool `json:"inviteOnlySignup,omitempty"`
+ MaxIdentityAccessTokenTTL *float32 `json:"maxIdentityAccessTokenTTL,omitempty"`
+ Message *string `json:"message,omitempty"`
+ RedisConfigured *bool `json:"redisConfigured,omitempty"`
+ SamlDefaultOrgSlug *string `json:"samlDefaultOrgSlug,omitempty"`
+ SecretScanningConfigured *bool `json:"secretScanningConfigured,omitempty"`
+ }
+ if err := json.Unmarshal(bodyBytes, &dest); err != nil {
+ return nil, err
+ }
+ response.JSON200 = &dest
+
+ case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400:
+ var dest struct {
+ Details interface{} `json:"details,omitempty"`
+ Error string `json:"error"`
+ Message string `json:"message"`
+ ReqId string `json:"reqId"`
+ StatusCode GetServerStatus400JSONResponseBodyStatusCode `json:"statusCode"`
+ }
+ if err := json.Unmarshal(bodyBytes, &dest); err != nil {
+ return nil, err
+ }
+ response.JSON400 = &dest
+
+ case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401:
+ var dest struct {
+ Error string `json:"error"`
+ Message string `json:"message"`
+ ReqId string `json:"reqId"`
+ StatusCode GetServerStatus401JSONResponseBodyStatusCode `json:"statusCode"`
+ }
+ if err := json.Unmarshal(bodyBytes, &dest); err != nil {
+ return nil, err
+ }
+ response.JSON401 = &dest
+
+ case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403:
+ var dest struct {
+ Details interface{} `json:"details,omitempty"`
+ Error string `json:"error"`
+ Message string `json:"message"`
+ ReqId string `json:"reqId"`
+ StatusCode GetServerStatus403JSONResponseBodyStatusCode `json:"statusCode"`
+ }
+ if err := json.Unmarshal(bodyBytes, &dest); err != nil {
+ return nil, err
+ }
+ response.JSON403 = &dest
+
+ case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404:
+ var dest struct {
+ Error string `json:"error"`
+ Message string `json:"message"`
+ ReqId string `json:"reqId"`
+ StatusCode GetServerStatus404JSONResponseBodyStatusCode `json:"statusCode"`
+ }
+ if err := json.Unmarshal(bodyBytes, &dest); err != nil {
+ return nil, err
+ }
+ response.JSON404 = &dest
+
+ case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422:
+ var dest struct {
+ Error string `json:"error"`
+ Message interface{} `json:"message,omitempty"`
+ ReqId string `json:"reqId"`
+ StatusCode GetServerStatus422JSONResponseBodyStatusCode `json:"statusCode"`
+ }
+ if err := json.Unmarshal(bodyBytes, &dest); err != nil {
+ return nil, err
+ }
+ response.JSON422 = &dest
+
+ case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500:
+ var dest struct {
+ Error string `json:"error"`
+ Message string `json:"message"`
+ ReqId string `json:"reqId"`
+ StatusCode GetServerStatus500JSONResponseBodyStatusCode `json:"statusCode"`
+ }
+ if err := json.Unmarshal(bodyBytes, &dest); err != nil {
+ return nil, err
+ }
+ response.JSON500 = &dest
+
+ }
+
+ return response, nil
+}
+
+// ParseAdminBootstrapResponse parses an HTTP response from a AdminBootstrapWithResponse call
+func ParseAdminBootstrapResponse(rsp *http.Response) (*AdminBootstrapResponse, error) {
+ bodyBytes, err := io.ReadAll(rsp.Body)
+ defer func() { _ = rsp.Body.Close() }()
+ if err != nil {
+ return nil, err
+ }
+
+ response := &AdminBootstrapResponse{
+ Body: bodyBytes,
+ HTTPResponse: rsp,
+ }
+
+ switch {
+ case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
+ var dest struct {
+ Identity struct {
+ Credentials struct {
+ Token string `json:"token"`
+ } `json:"credentials"`
+ Id openapi_types.UUID `json:"id"`
+ Name string `json:"name"`
+ } `json:"identity"`
+ Message string `json:"message"`
+ Organization struct {
+ Id openapi_types.UUID `json:"id"`
+ Name string `json:"name"`
+ Slug string `json:"slug"`
+ } `json:"organization"`
+ User struct {
+ Email *string `json:"email,omitempty"`
+ FirstName *string `json:"firstName,omitempty"`
+ Id openapi_types.UUID `json:"id"`
+ LastName *string `json:"lastName,omitempty"`
+ SuperAdmin *bool `json:"superAdmin,omitempty"`
+ Username string `json:"username"`
+ } `json:"user"`
+ }
+ if err := json.Unmarshal(bodyBytes, &dest); err != nil {
+ return nil, err
+ }
+ response.JSON200 = &dest
+
+ case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400:
+ var dest struct {
+ Details interface{} `json:"details,omitempty"`
+ Error string `json:"error"`
+ Message string `json:"message"`
+ ReqId string `json:"reqId"`
+ StatusCode AdminBootstrap400JSONResponseBodyStatusCode `json:"statusCode"`
+ }
+ if err := json.Unmarshal(bodyBytes, &dest); err != nil {
+ return nil, err
+ }
+ response.JSON400 = &dest
+
+ case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401:
+ var dest struct {
+ Error string `json:"error"`
+ Message string `json:"message"`
+ ReqId string `json:"reqId"`
+ StatusCode AdminBootstrap401JSONResponseBodyStatusCode `json:"statusCode"`
+ }
+ if err := json.Unmarshal(bodyBytes, &dest); err != nil {
+ return nil, err
+ }
+ response.JSON401 = &dest
+
+ case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403:
+ var dest struct {
+ Details interface{} `json:"details,omitempty"`
+ Error string `json:"error"`
+ Message string `json:"message"`
+ ReqId string `json:"reqId"`
+ StatusCode AdminBootstrap403JSONResponseBodyStatusCode `json:"statusCode"`
+ }
+ if err := json.Unmarshal(bodyBytes, &dest); err != nil {
+ return nil, err
+ }
+ response.JSON403 = &dest
+
+ case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404:
+ var dest struct {
+ Error string `json:"error"`
+ Message string `json:"message"`
+ ReqId string `json:"reqId"`
+ StatusCode AdminBootstrap404JSONResponseBodyStatusCode `json:"statusCode"`
+ }
+ if err := json.Unmarshal(bodyBytes, &dest); err != nil {
+ return nil, err
+ }
+ response.JSON404 = &dest
+
+ case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422:
+ var dest struct {
+ Error string `json:"error"`
+ Message interface{} `json:"message,omitempty"`
+ ReqId string `json:"reqId"`
+ StatusCode AdminBootstrap422JSONResponseBodyStatusCode `json:"statusCode"`
+ }
+ if err := json.Unmarshal(bodyBytes, &dest); err != nil {
+ return nil, err
+ }
+ response.JSON422 = &dest
+
+ case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500:
+ var dest struct {
+ Error string `json:"error"`
+ Message string `json:"message"`
+ ReqId string `json:"reqId"`
+ StatusCode AdminBootstrap500JSONResponseBodyStatusCode `json:"statusCode"`
+ }
+ if err := json.Unmarshal(bodyBytes, &dest); err != nil {
+ return nil, err
+ }
+ response.JSON500 = &dest
+
+ }
+
+ return response, nil
+}
+
+// ParseUpdateAdminConfigResponse parses an HTTP response from a UpdateAdminConfigWithResponse call
+func ParseUpdateAdminConfigResponse(rsp *http.Response) (*UpdateAdminConfigResponse, error) {
+ bodyBytes, err := io.ReadAll(rsp.Body)
+ defer func() { _ = rsp.Body.Close() }()
+ if err != nil {
+ return nil, err
+ }
+
+ response := &UpdateAdminConfigResponse{
+ Body: bodyBytes,
+ HTTPResponse: rsp,
+ }
+
+ switch {
+ case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
+ var dest struct {
+ Config struct {
+ AdminIdentityIds *[]string `json:"adminIdentityIds,omitempty"`
+ AllowSignUp *bool `json:"allowSignUp,omitempty"`
+ AllowedSignUpDomain *string `json:"allowedSignUpDomain,omitempty"`
+ AuthConsentContent *string `json:"authConsentContent,omitempty"`
+ CreatedAt *time.Time `json:"createdAt,omitempty"`
+ DefaultAuthOrgAuthEnforced *bool `json:"defaultAuthOrgAuthEnforced,omitempty"`
+ DefaultAuthOrgAuthMethod *string `json:"defaultAuthOrgAuthMethod,omitempty"`
+ DefaultAuthOrgId *openapi_types.UUID `json:"defaultAuthOrgId,omitempty"`
+ DefaultAuthOrgSlug *string `json:"defaultAuthOrgSlug"`
+ EnabledLoginMethods *[]string `json:"enabledLoginMethods,omitempty"`
+ FipsEnabled *bool `json:"fipsEnabled,omitempty"`
+ Id openapi_types.UUID `json:"id"`
+ Initialized *bool `json:"initialized,omitempty"`
+ InstanceId *openapi_types.UUID `json:"instanceId,omitempty"`
+ IsClickhouseAuditLogEnabled *bool `json:"isClickhouseAuditLogEnabled,omitempty"`
+ IsMigrationModeOn *bool `json:"isMigrationModeOn,omitempty"`
+ IsOfflineUsageReportsEnabled *bool `json:"isOfflineUsageReportsEnabled,omitempty"`
+ IsPublicSecretSharingDisabled *bool `json:"isPublicSecretSharingDisabled,omitempty"`
+ IsSecretScanningDisabled *bool `json:"isSecretScanningDisabled,omitempty"`
+ KubernetesAutoFetchServiceAccountToken *bool `json:"kubernetesAutoFetchServiceAccountToken,omitempty"`
+ LatestAvailableVersion *string `json:"latestAvailableVersion,omitempty"`
+ OnboardingCompleted *bool `json:"onboardingCompleted,omitempty"`
+ PageFrameContent *string `json:"pageFrameContent,omitempty"`
+ ParamsFolderSecretDetectionEnabled *bool `json:"paramsFolderSecretDetectionEnabled,omitempty"`
+ PasswordPolicy struct {
+ Requirements []struct {
+ Code string `json:"code"`
+ Flags *string `json:"flags,omitempty"`
+ IsPrimary bool `json:"isPrimary"`
+ MaxConsecutiveCharacters *int `json:"maxConsecutiveCharacters,omitempty"`
+ Message string `json:"message"`
+ Patterns []string `json:"patterns"`
+ ShouldMatch bool `json:"shouldMatch"`
+ ValidationMessage string `json:"validationMessage"`
+ } `json:"requirements"`
+ } `json:"passwordPolicy"`
+ TrustLdapEmails *bool `json:"trustLdapEmails,omitempty"`
+ } `json:"config"`
+ }
+ if err := json.Unmarshal(bodyBytes, &dest); err != nil {
+ return nil, err
+ }
+ response.JSON200 = &dest
+
+ case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400:
+ var dest struct {
+ Details interface{} `json:"details,omitempty"`
+ Error string `json:"error"`
+ Message string `json:"message"`
+ ReqId string `json:"reqId"`
+ StatusCode UpdateAdminConfig400JSONResponseBodyStatusCode `json:"statusCode"`
+ }
+ if err := json.Unmarshal(bodyBytes, &dest); err != nil {
+ return nil, err
+ }
+ response.JSON400 = &dest
+
+ case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401:
+ var dest struct {
+ Error string `json:"error"`
+ Message string `json:"message"`
+ ReqId string `json:"reqId"`
+ StatusCode UpdateAdminConfig401JSONResponseBodyStatusCode `json:"statusCode"`
+ }
+ if err := json.Unmarshal(bodyBytes, &dest); err != nil {
+ return nil, err
+ }
+ response.JSON401 = &dest
+
+ case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403:
+ var dest struct {
+ Details interface{} `json:"details,omitempty"`
+ Error string `json:"error"`
+ Message string `json:"message"`
+ ReqId string `json:"reqId"`
+ StatusCode UpdateAdminConfig403JSONResponseBodyStatusCode `json:"statusCode"`
+ }
+ if err := json.Unmarshal(bodyBytes, &dest); err != nil {
+ return nil, err
+ }
+ response.JSON403 = &dest
+
+ case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404:
+ var dest struct {
+ Error string `json:"error"`
+ Message string `json:"message"`
+ ReqId string `json:"reqId"`
+ StatusCode UpdateAdminConfig404JSONResponseBodyStatusCode `json:"statusCode"`
+ }
+ if err := json.Unmarshal(bodyBytes, &dest); err != nil {
+ return nil, err
+ }
+ response.JSON404 = &dest
+
+ case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422:
+ var dest struct {
+ Error string `json:"error"`
+ Message interface{} `json:"message,omitempty"`
+ ReqId string `json:"reqId"`
+ StatusCode UpdateAdminConfig422JSONResponseBodyStatusCode `json:"statusCode"`
+ }
+ if err := json.Unmarshal(bodyBytes, &dest); err != nil {
+ return nil, err
+ }
+ response.JSON422 = &dest
+
+ case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500:
+ var dest struct {
+ Error string `json:"error"`
+ Message string `json:"message"`
+ ReqId string `json:"reqId"`
+ StatusCode UpdateAdminConfig500JSONResponseBodyStatusCode `json:"statusCode"`
+ }
+ if err := json.Unmarshal(bodyBytes, &dest); err != nil {
+ return nil, err
+ }
+ response.JSON500 = &dest
+
+ }
+
+ return response, nil
+}
+
+// ParseRefreshAuthTokenResponse parses an HTTP response from a RefreshAuthTokenWithResponse call
+func ParseRefreshAuthTokenResponse(rsp *http.Response) (*RefreshAuthTokenResponse, error) {
+ bodyBytes, err := io.ReadAll(rsp.Body)
+ defer func() { _ = rsp.Body.Close() }()
+ if err != nil {
+ return nil, err
+ }
+
+ response := &RefreshAuthTokenResponse{
+ Body: bodyBytes,
+ HTTPResponse: rsp,
+ }
+
+ switch {
+ case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
+ var dest struct {
+ OrganizationId *string `json:"organizationId,omitempty"`
+ RefreshToken *string `json:"refreshToken,omitempty"`
+ SubOrganizationId *string `json:"subOrganizationId,omitempty"`
+ Token string `json:"token"`
+ }
+ if err := json.Unmarshal(bodyBytes, &dest); err != nil {
+ return nil, err
+ }
+ response.JSON200 = &dest
+
+ case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400:
+ var dest struct {
+ Details interface{} `json:"details,omitempty"`
+ Error string `json:"error"`
+ Message string `json:"message"`
+ ReqId string `json:"reqId"`
+ StatusCode RefreshAuthToken400JSONResponseBodyStatusCode `json:"statusCode"`
+ }
+ if err := json.Unmarshal(bodyBytes, &dest); err != nil {
+ return nil, err
+ }
+ response.JSON400 = &dest
+
+ case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401:
+ var dest struct {
+ Error string `json:"error"`
+ Message string `json:"message"`
+ ReqId string `json:"reqId"`
+ StatusCode RefreshAuthToken401JSONResponseBodyStatusCode `json:"statusCode"`
+ }
+ if err := json.Unmarshal(bodyBytes, &dest); err != nil {
+ return nil, err
+ }
+ response.JSON401 = &dest
+
+ case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403:
+ var dest struct {
+ Details interface{} `json:"details,omitempty"`
+ Error string `json:"error"`
+ Message string `json:"message"`
+ ReqId string `json:"reqId"`
+ StatusCode RefreshAuthToken403JSONResponseBodyStatusCode `json:"statusCode"`
+ }
+ if err := json.Unmarshal(bodyBytes, &dest); err != nil {
+ return nil, err
+ }
+ response.JSON403 = &dest
+
+ case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404:
+ var dest struct {
+ Error string `json:"error"`
+ Message string `json:"message"`
+ ReqId string `json:"reqId"`
+ StatusCode RefreshAuthToken404JSONResponseBodyStatusCode `json:"statusCode"`
+ }
+ if err := json.Unmarshal(bodyBytes, &dest); err != nil {
+ return nil, err
+ }
+ response.JSON404 = &dest
+
+ case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422:
+ var dest struct {
+ Error string `json:"error"`
+ Message interface{} `json:"message,omitempty"`
+ ReqId string `json:"reqId"`
+ StatusCode RefreshAuthToken422JSONResponseBodyStatusCode `json:"statusCode"`
+ }
+ if err := json.Unmarshal(bodyBytes, &dest); err != nil {
+ return nil, err
+ }
+ response.JSON422 = &dest
+
+ case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500:
+ var dest struct {
+ Error string `json:"error"`
+ Message string `json:"message"`
+ ReqId string `json:"reqId"`
+ StatusCode RefreshAuthToken500JSONResponseBodyStatusCode `json:"statusCode"`
+ }
+ if err := json.Unmarshal(bodyBytes, &dest); err != nil {
+ return nil, err
+ }
+ response.JSON500 = &dest
+
+ }
+
+ return response, nil
+}
+
+// ParseGetOrganizationPlanResponse parses an HTTP response from a GetOrganizationPlanWithResponse call
+func ParseGetOrganizationPlanResponse(rsp *http.Response) (*GetOrganizationPlanResponse, error) {
+ bodyBytes, err := io.ReadAll(rsp.Body)
+ defer func() { _ = rsp.Body.Close() }()
+ if err != nil {
+ return nil, err
+ }
+
+ response := &GetOrganizationPlanResponse{
+ Body: bodyBytes,
+ HTTPResponse: rsp,
+ }
+
+ switch {
+ case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
+ var dest struct {
+ Plan interface{} `json:"plan,omitempty"`
+ }
+ if err := json.Unmarshal(bodyBytes, &dest); err != nil {
+ return nil, err
+ }
+ response.JSON200 = &dest
+
+ case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400:
+ var dest struct {
+ Details interface{} `json:"details,omitempty"`
+ Error string `json:"error"`
+ Message string `json:"message"`
+ ReqId string `json:"reqId"`
+ StatusCode GetOrganizationPlan400JSONResponseBodyStatusCode `json:"statusCode"`
+ }
+ if err := json.Unmarshal(bodyBytes, &dest); err != nil {
+ return nil, err
+ }
+ response.JSON400 = &dest
+
+ case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401:
+ var dest struct {
+ Error string `json:"error"`
+ Message string `json:"message"`
+ ReqId string `json:"reqId"`
+ StatusCode GetOrganizationPlan401JSONResponseBodyStatusCode `json:"statusCode"`
+ }
+ if err := json.Unmarshal(bodyBytes, &dest); err != nil {
+ return nil, err
+ }
+ response.JSON401 = &dest
+
+ case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403:
+ var dest struct {
+ Details interface{} `json:"details,omitempty"`
+ Error string `json:"error"`
+ Message string `json:"message"`
+ ReqId string `json:"reqId"`
+ StatusCode GetOrganizationPlan403JSONResponseBodyStatusCode `json:"statusCode"`
+ }
+ if err := json.Unmarshal(bodyBytes, &dest); err != nil {
+ return nil, err
+ }
+ response.JSON403 = &dest
+
+ case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404:
+ var dest struct {
+ Error string `json:"error"`
+ Message string `json:"message"`
+ ReqId string `json:"reqId"`
+ StatusCode GetOrganizationPlan404JSONResponseBodyStatusCode `json:"statusCode"`
+ }
+ if err := json.Unmarshal(bodyBytes, &dest); err != nil {
+ return nil, err
+ }
+ response.JSON404 = &dest
+
+ case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422:
+ var dest struct {
+ Error string `json:"error"`
+ Message interface{} `json:"message,omitempty"`
+ ReqId string `json:"reqId"`
+ StatusCode GetOrganizationPlan422JSONResponseBodyStatusCode `json:"statusCode"`
+ }
+ if err := json.Unmarshal(bodyBytes, &dest); err != nil {
+ return nil, err
+ }
+ response.JSON422 = &dest
+
+ case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500:
+ var dest struct {
+ Error string `json:"error"`
+ Message string `json:"message"`
+ ReqId string `json:"reqId"`
+ StatusCode GetOrganizationPlan500JSONResponseBodyStatusCode `json:"statusCode"`
+ }
+ if err := json.Unmarshal(bodyBytes, &dest); err != nil {
+ return nil, err
+ }
+ response.JSON500 = &dest
+
+ }
+
+ return response, nil
+}
+
+// ParseCreateProjectResponse parses an HTTP response from a CreateProjectWithResponse call
+func ParseCreateProjectResponse(rsp *http.Response) (*CreateProjectResponse, error) {
+ bodyBytes, err := io.ReadAll(rsp.Body)
+ defer func() { _ = rsp.Body.Close() }()
+ if err != nil {
+ return nil, err
+ }
+
+ response := &CreateProjectResponse{
+ Body: bodyBytes,
+ HTTPResponse: rsp,
+ }
+
+ switch {
+ case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
+ var dest struct {
+ Project struct {
+ UnderscoreId string `json:"_id"`
+ AuditLogsRetentionDays *float32 `json:"auditLogsRetentionDays,omitempty"`
+ AutoCapitalization *bool `json:"autoCapitalization,omitempty"`
+ CreatedAt time.Time `json:"createdAt"`
+ DefaultProduct *string `json:"defaultProduct,omitempty"`
+ DeletedEnvironments []struct {
+ DeleteAfter time.Time `json:"deleteAfter"`
+ DeletedBy *CreateProject200JSONResponseBody_Project_DeletedEnvironments_DeletedBy `json:"deletedBy"`
+ Id string `json:"id"`
+ Name string `json:"name"`
+ Slug string `json:"slug"`
+ SoftDeletedAt time.Time `json:"softDeletedAt"`
+ } `json:"deletedEnvironments"`
+ Description *string `json:"description,omitempty"`
+ EnforceEncryptedSecretManagerSecretMetadata *bool `json:"enforceEncryptedSecretManagerSecretMetadata,omitempty"`
+ Environments []struct {
+ Id string `json:"id"`
+ Name string `json:"name"`
+ Slug string `json:"slug"`
+ } `json:"environments"`
+ HasDeleteProtection *bool `json:"hasDeleteProtection,omitempty"`
+ Id string `json:"id"`
+ IsLegacyAdditionalPrivilegesEnabled *bool `json:"isLegacyAdditionalPrivilegesEnabled,omitempty"`
+ KmsCertificateKeyId *openapi_types.UUID `json:"kmsCertificateKeyId,omitempty"`
+ Name string `json:"name"`
+ OrgId openapi_types.UUID `json:"orgId"`
+ PitVersionLimit *float32 `json:"pitVersionLimit,omitempty"`
+ SecretDetectionIgnoreValues *[]string `json:"secretDetectionIgnoreValues,omitempty"`
+ SecretSharing *bool `json:"secretSharing,omitempty"`
+ ShowSnapshotsLegacy *bool `json:"showSnapshotsLegacy,omitempty"`
+ Slug string `json:"slug"`
+ Type string `json:"type"`
+ UpdatedAt time.Time `json:"updatedAt"`
+ UpgradeStatus *string `json:"upgradeStatus,omitempty"`
+ Version *float32 `json:"version,omitempty"`
+ } `json:"project"`
+ }
+ if err := json.Unmarshal(bodyBytes, &dest); err != nil {
+ return nil, err
+ }
+ response.JSON200 = &dest
+
+ case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400:
+ var dest struct {
+ Details interface{} `json:"details,omitempty"`
+ Error string `json:"error"`
+ Message string `json:"message"`
+ ReqId string `json:"reqId"`
+ StatusCode CreateProject400JSONResponseBodyStatusCode `json:"statusCode"`
+ }
+ if err := json.Unmarshal(bodyBytes, &dest); err != nil {
+ return nil, err
+ }
+ response.JSON400 = &dest
+
+ case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401:
+ var dest struct {
+ Error string `json:"error"`
+ Message string `json:"message"`
+ ReqId string `json:"reqId"`
+ StatusCode CreateProject401JSONResponseBodyStatusCode `json:"statusCode"`
+ }
+ if err := json.Unmarshal(bodyBytes, &dest); err != nil {
+ return nil, err
+ }
+ response.JSON401 = &dest
+
+ case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403:
+ var dest struct {
+ Details interface{} `json:"details,omitempty"`
+ Error string `json:"error"`
+ Message string `json:"message"`
+ ReqId string `json:"reqId"`
+ StatusCode CreateProject403JSONResponseBodyStatusCode `json:"statusCode"`
+ }
+ if err := json.Unmarshal(bodyBytes, &dest); err != nil {
+ return nil, err
+ }
+ response.JSON403 = &dest
+
+ case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404:
+ var dest struct {
+ Error string `json:"error"`
+ Message string `json:"message"`
+ ReqId string `json:"reqId"`
+ StatusCode CreateProject404JSONResponseBodyStatusCode `json:"statusCode"`
+ }
+ if err := json.Unmarshal(bodyBytes, &dest); err != nil {
+ return nil, err
+ }
+ response.JSON404 = &dest
+
+ case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422:
+ var dest struct {
+ Error string `json:"error"`
+ Message interface{} `json:"message,omitempty"`
+ ReqId string `json:"reqId"`
+ StatusCode CreateProject422JSONResponseBodyStatusCode `json:"statusCode"`
+ }
+ if err := json.Unmarshal(bodyBytes, &dest); err != nil {
+ return nil, err
+ }
+ response.JSON422 = &dest
+
+ case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500:
+ var dest struct {
+ Error string `json:"error"`
+ Message string `json:"message"`
+ ReqId string `json:"reqId"`
+ StatusCode CreateProject500JSONResponseBodyStatusCode `json:"statusCode"`
+ }
+ if err := json.Unmarshal(bodyBytes, &dest); err != nil {
+ return nil, err
+ }
+ response.JSON500 = &dest
+
+ }
+
+ return response, nil
+}
+
+// ParseCreateOrganizationResponse parses an HTTP response from a CreateOrganizationWithResponse call
+func ParseCreateOrganizationResponse(rsp *http.Response) (*CreateOrganizationResponse, error) {
+ bodyBytes, err := io.ReadAll(rsp.Body)
+ defer func() { _ = rsp.Body.Close() }()
+ if err != nil {
+ return nil, err
+ }
+
+ response := &CreateOrganizationResponse{
+ Body: bodyBytes,
+ HTTPResponse: rsp,
+ }
+
+ switch {
+ case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
+ var dest struct {
+ Organization struct {
+ AllowCrossProjectSecretSharing *bool `json:"allowCrossProjectSecretSharing,omitempty"`
+ AllowSecretSharingOutsideOrganization *bool `json:"allowSecretSharingOutsideOrganization,omitempty"`
+ AuthEnforced *bool `json:"authEnforced,omitempty"`
+ BlockDuplicateSecretSyncDestinations *bool `json:"blockDuplicateSecretSyncDestinations,omitempty"`
+ BypassOrgAuthEnabled *bool `json:"bypassOrgAuthEnabled,omitempty"`
+ CreatedAt time.Time `json:"createdAt"`
+ CustomerId *string `json:"customerId,omitempty"`
+ DefaultMembershipRole *string `json:"defaultMembershipRole,omitempty"`
+ EnforceMfa *bool `json:"enforceMfa,omitempty"`
+ GoogleSsoAuthEnforced *bool `json:"googleSsoAuthEnforced,omitempty"`
+ Id openapi_types.UUID `json:"id"`
+ KmsDefaultKeyId *openapi_types.UUID `json:"kmsDefaultKeyId,omitempty"`
+ KmsProductEnabled *bool `json:"kmsProductEnabled,omitempty"`
+ MaxSharedSecretLifetime *float32 `json:"maxSharedSecretLifetime,omitempty"`
+ MaxSharedSecretViewLimit *float32 `json:"maxSharedSecretViewLimit,omitempty"`
+ Name string `json:"name"`
+ ParentOrgId *openapi_types.UUID `json:"parentOrgId,omitempty"`
+ PkiProductEnabled *bool `json:"pkiProductEnabled,omitempty"`
+ PrivilegeUpgradeInitiatedAt *time.Time `json:"privilegeUpgradeInitiatedAt,omitempty"`
+ PrivilegeUpgradeInitiatedByUsername *string `json:"privilegeUpgradeInitiatedByUsername,omitempty"`
+ RootOrgId *openapi_types.UUID `json:"rootOrgId,omitempty"`
+ ScannerProductEnabled *bool `json:"scannerProductEnabled,omitempty"`
+ ScimEnabled *bool `json:"scimEnabled,omitempty"`
+ SecretShareBrandConfig interface{} `json:"secretShareBrandConfig,omitempty"`
+ SecretsProductEnabled *bool `json:"secretsProductEnabled,omitempty"`
+ SelectedMfaMethod *string `json:"selectedMfaMethod,omitempty"`
+ ShareSecretsProductEnabled *bool `json:"shareSecretsProductEnabled,omitempty"`
+ ShouldUseNewPrivilegeSystem *bool `json:"shouldUseNewPrivilegeSystem,omitempty"`
+ Slug string `json:"slug"`
+ UpdatedAt time.Time `json:"updatedAt"`
+ UserTokenExpiration *string `json:"userTokenExpiration,omitempty"`
+ } `json:"organization"`
+ }
+ if err := json.Unmarshal(bodyBytes, &dest); err != nil {
+ return nil, err
+ }
+ response.JSON200 = &dest
+
+ case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400:
+ var dest struct {
+ Details interface{} `json:"details,omitempty"`
+ Error string `json:"error"`
+ Message string `json:"message"`
+ ReqId string `json:"reqId"`
+ StatusCode CreateOrganization400JSONResponseBodyStatusCode `json:"statusCode"`
+ }
+ if err := json.Unmarshal(bodyBytes, &dest); err != nil {
+ return nil, err
+ }
+ response.JSON400 = &dest
+
+ case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401:
+ var dest struct {
+ Error string `json:"error"`
+ Message string `json:"message"`
+ ReqId string `json:"reqId"`
+ StatusCode CreateOrganization401JSONResponseBodyStatusCode `json:"statusCode"`
+ }
+ if err := json.Unmarshal(bodyBytes, &dest); err != nil {
+ return nil, err
+ }
+ response.JSON401 = &dest
+
+ case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403:
+ var dest struct {
+ Details interface{} `json:"details,omitempty"`
+ Error string `json:"error"`
+ Message string `json:"message"`
+ ReqId string `json:"reqId"`
+ StatusCode CreateOrganization403JSONResponseBodyStatusCode `json:"statusCode"`
+ }
+ if err := json.Unmarshal(bodyBytes, &dest); err != nil {
+ return nil, err
+ }
+ response.JSON403 = &dest
+
+ case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404:
+ var dest struct {
+ Error string `json:"error"`
+ Message string `json:"message"`
+ ReqId string `json:"reqId"`
+ StatusCode CreateOrganization404JSONResponseBodyStatusCode `json:"statusCode"`
+ }
+ if err := json.Unmarshal(bodyBytes, &dest); err != nil {
+ return nil, err
+ }
+ response.JSON404 = &dest
+
+ case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422:
+ var dest struct {
+ Error string `json:"error"`
+ Message interface{} `json:"message,omitempty"`
+ ReqId string `json:"reqId"`
+ StatusCode CreateOrganization422JSONResponseBodyStatusCode `json:"statusCode"`
+ }
+ if err := json.Unmarshal(bodyBytes, &dest); err != nil {
+ return nil, err
+ }
+ response.JSON422 = &dest
+
+ case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500:
+ var dest struct {
+ Error string `json:"error"`
+ Message string `json:"message"`
+ ReqId string `json:"reqId"`
+ StatusCode CreateOrganization500JSONResponseBodyStatusCode `json:"statusCode"`
+ }
+ if err := json.Unmarshal(bodyBytes, &dest); err != nil {
+ return nil, err
+ }
+ response.JSON500 = &dest
+
+ }
+
+ return response, nil
+}
+
+// ParseDeleteOrganizationResponse parses an HTTP response from a DeleteOrganizationWithResponse call
+func ParseDeleteOrganizationResponse(rsp *http.Response) (*DeleteOrganizationResponse, error) {
+ bodyBytes, err := io.ReadAll(rsp.Body)
+ defer func() { _ = rsp.Body.Close() }()
+ if err != nil {
+ return nil, err
+ }
+
+ response := &DeleteOrganizationResponse{
+ Body: bodyBytes,
+ HTTPResponse: rsp,
+ }
+
+ switch {
+ case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
+ var dest struct {
+ AccessToken string `json:"accessToken"`
+ Organization struct {
+ AllowCrossProjectSecretSharing *bool `json:"allowCrossProjectSecretSharing,omitempty"`
+ AllowSecretSharingOutsideOrganization *bool `json:"allowSecretSharingOutsideOrganization,omitempty"`
+ AuthEnforced *bool `json:"authEnforced,omitempty"`
+ BlockDuplicateSecretSyncDestinations *bool `json:"blockDuplicateSecretSyncDestinations,omitempty"`
+ BypassOrgAuthEnabled *bool `json:"bypassOrgAuthEnabled,omitempty"`
+ CreatedAt time.Time `json:"createdAt"`
+ CustomerId *string `json:"customerId,omitempty"`
+ DefaultMembershipRole *string `json:"defaultMembershipRole,omitempty"`
+ EnforceMfa *bool `json:"enforceMfa,omitempty"`
+ GoogleSsoAuthEnforced *bool `json:"googleSsoAuthEnforced,omitempty"`
+ Id openapi_types.UUID `json:"id"`
+ KmsDefaultKeyId *openapi_types.UUID `json:"kmsDefaultKeyId,omitempty"`
+ KmsProductEnabled *bool `json:"kmsProductEnabled,omitempty"`
+ MaxSharedSecretLifetime *float32 `json:"maxSharedSecretLifetime,omitempty"`
+ MaxSharedSecretViewLimit *float32 `json:"maxSharedSecretViewLimit,omitempty"`
+ Name string `json:"name"`
+ ParentOrgId *openapi_types.UUID `json:"parentOrgId,omitempty"`
+ PkiProductEnabled *bool `json:"pkiProductEnabled,omitempty"`
+ PrivilegeUpgradeInitiatedAt *time.Time `json:"privilegeUpgradeInitiatedAt,omitempty"`
+ PrivilegeUpgradeInitiatedByUsername *string `json:"privilegeUpgradeInitiatedByUsername,omitempty"`
+ RootOrgId *openapi_types.UUID `json:"rootOrgId,omitempty"`
+ ScannerProductEnabled *bool `json:"scannerProductEnabled,omitempty"`
+ ScimEnabled *bool `json:"scimEnabled,omitempty"`
+ SecretShareBrandConfig interface{} `json:"secretShareBrandConfig,omitempty"`
+ SecretsProductEnabled *bool `json:"secretsProductEnabled,omitempty"`
+ SelectedMfaMethod *string `json:"selectedMfaMethod,omitempty"`
+ ShareSecretsProductEnabled *bool `json:"shareSecretsProductEnabled,omitempty"`
+ ShouldUseNewPrivilegeSystem *bool `json:"shouldUseNewPrivilegeSystem,omitempty"`
+ Slug string `json:"slug"`
+ UpdatedAt time.Time `json:"updatedAt"`
+ UserTokenExpiration *string `json:"userTokenExpiration,omitempty"`
+ } `json:"organization"`
+ }
+ if err := json.Unmarshal(bodyBytes, &dest); err != nil {
+ return nil, err
+ }
+ response.JSON200 = &dest
+
+ case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400:
+ var dest struct {
+ Details interface{} `json:"details,omitempty"`
+ Error string `json:"error"`
+ Message string `json:"message"`
+ ReqId string `json:"reqId"`
+ StatusCode DeleteOrganization400JSONResponseBodyStatusCode `json:"statusCode"`
+ }
+ if err := json.Unmarshal(bodyBytes, &dest); err != nil {
+ return nil, err
+ }
+ response.JSON400 = &dest
+
+ case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401:
+ var dest struct {
+ Error string `json:"error"`
+ Message string `json:"message"`
+ ReqId string `json:"reqId"`
+ StatusCode DeleteOrganization401JSONResponseBodyStatusCode `json:"statusCode"`
+ }
+ if err := json.Unmarshal(bodyBytes, &dest); err != nil {
+ return nil, err
+ }
+ response.JSON401 = &dest
+
+ case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403:
+ var dest struct {
+ Details interface{} `json:"details,omitempty"`
+ Error string `json:"error"`
+ Message string `json:"message"`
+ ReqId string `json:"reqId"`
+ StatusCode DeleteOrganization403JSONResponseBodyStatusCode `json:"statusCode"`
+ }
+ if err := json.Unmarshal(bodyBytes, &dest); err != nil {
+ return nil, err
+ }
+ response.JSON403 = &dest
+
+ case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404:
+ var dest struct {
+ Error string `json:"error"`
+ Message string `json:"message"`
+ ReqId string `json:"reqId"`
+ StatusCode DeleteOrganization404JSONResponseBodyStatusCode `json:"statusCode"`
+ }
+ if err := json.Unmarshal(bodyBytes, &dest); err != nil {
+ return nil, err
+ }
+ response.JSON404 = &dest
+
+ case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422:
+ var dest struct {
+ Error string `json:"error"`
+ Message interface{} `json:"message,omitempty"`
+ ReqId string `json:"reqId"`
+ StatusCode DeleteOrganization422JSONResponseBodyStatusCode `json:"statusCode"`
+ }
+ if err := json.Unmarshal(bodyBytes, &dest); err != nil {
+ return nil, err
+ }
+ response.JSON422 = &dest
+
+ case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500:
+ var dest struct {
+ Error string `json:"error"`
+ Message string `json:"message"`
+ ReqId string `json:"reqId"`
+ StatusCode DeleteOrganization500JSONResponseBodyStatusCode `json:"statusCode"`
+ }
+ if err := json.Unmarshal(bodyBytes, &dest); err != nil {
+ return nil, err
+ }
+ response.JSON500 = &dest
+
+ }
+
+ return response, nil
+}
+
+// ParseLoginV3Response parses an HTTP response from a LoginV3WithResponse call
+func ParseLoginV3Response(rsp *http.Response) (*LoginV3Response, error) {
+ bodyBytes, err := io.ReadAll(rsp.Body)
+ defer func() { _ = rsp.Body.Close() }()
+ if err != nil {
+ return nil, err
+ }
+
+ response := &LoginV3Response{
+ Body: bodyBytes,
+ HTTPResponse: rsp,
+ }
+
+ switch {
+ case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
+ var dest struct {
+ AccessToken string `json:"accessToken"`
+ }
+ if err := json.Unmarshal(bodyBytes, &dest); err != nil {
+ return nil, err
+ }
+ response.JSON200 = &dest
+
+ case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400:
+ var dest struct {
+ Details interface{} `json:"details,omitempty"`
+ Error string `json:"error"`
+ Message string `json:"message"`
+ ReqId string `json:"reqId"`
+ StatusCode LoginV3400JSONResponseBodyStatusCode `json:"statusCode"`
+ }
+ if err := json.Unmarshal(bodyBytes, &dest); err != nil {
+ return nil, err
+ }
+ response.JSON400 = &dest
+
+ case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401:
+ var dest struct {
+ Error string `json:"error"`
+ Message string `json:"message"`
+ ReqId string `json:"reqId"`
+ StatusCode LoginV3401JSONResponseBodyStatusCode `json:"statusCode"`
+ }
+ if err := json.Unmarshal(bodyBytes, &dest); err != nil {
+ return nil, err
+ }
+ response.JSON401 = &dest
+
+ case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403:
+ var dest struct {
+ Details interface{} `json:"details,omitempty"`
+ Error string `json:"error"`
+ Message string `json:"message"`
+ ReqId string `json:"reqId"`
+ StatusCode LoginV3403JSONResponseBodyStatusCode `json:"statusCode"`
+ }
+ if err := json.Unmarshal(bodyBytes, &dest); err != nil {
+ return nil, err
+ }
+ response.JSON403 = &dest
+
+ case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404:
+ var dest struct {
+ Error string `json:"error"`
+ Message string `json:"message"`
+ ReqId string `json:"reqId"`
+ StatusCode LoginV3404JSONResponseBodyStatusCode `json:"statusCode"`
+ }
+ if err := json.Unmarshal(bodyBytes, &dest); err != nil {
+ return nil, err
+ }
+ response.JSON404 = &dest
+
+ case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422:
+ var dest struct {
+ Error string `json:"error"`
+ Message interface{} `json:"message,omitempty"`
+ ReqId string `json:"reqId"`
+ StatusCode LoginV3422JSONResponseBodyStatusCode `json:"statusCode"`
+ }
+ if err := json.Unmarshal(bodyBytes, &dest); err != nil {
+ return nil, err
+ }
+ response.JSON422 = &dest
+
+ case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500:
+ var dest struct {
+ Error string `json:"error"`
+ Message string `json:"message"`
+ ReqId string `json:"reqId"`
+ StatusCode LoginV3500JSONResponseBodyStatusCode `json:"statusCode"`
+ }
+ if err := json.Unmarshal(bodyBytes, &dest); err != nil {
+ return nil, err
+ }
+ response.JSON500 = &dest
+
+ }
+
+ return response, nil
+}
+
+// ParseSelectOrganizationV3Response parses an HTTP response from a SelectOrganizationV3WithResponse call
+func ParseSelectOrganizationV3Response(rsp *http.Response) (*SelectOrganizationV3Response, error) {
+ bodyBytes, err := io.ReadAll(rsp.Body)
+ defer func() { _ = rsp.Body.Close() }()
+ if err != nil {
+ return nil, err
+ }
+
+ response := &SelectOrganizationV3Response{
+ Body: bodyBytes,
+ HTTPResponse: rsp,
+ }
+
+ switch {
+ case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
+ var dest struct {
+ IsMfaEnabled bool `json:"isMfaEnabled"`
+ MfaMethod *string `json:"mfaMethod,omitempty"`
+ Token string `json:"token"`
+ }
+ if err := json.Unmarshal(bodyBytes, &dest); err != nil {
+ return nil, err
+ }
+ response.JSON200 = &dest
+
+ case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400:
+ var dest struct {
+ Details interface{} `json:"details,omitempty"`
+ Error string `json:"error"`
+ Message string `json:"message"`
+ ReqId string `json:"reqId"`
+ StatusCode SelectOrganizationV3400JSONResponseBodyStatusCode `json:"statusCode"`
+ }
+ if err := json.Unmarshal(bodyBytes, &dest); err != nil {
+ return nil, err
+ }
+ response.JSON400 = &dest
+
+ case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401:
+ var dest struct {
+ Error string `json:"error"`
+ Message string `json:"message"`
+ ReqId string `json:"reqId"`
+ StatusCode SelectOrganizationV3401JSONResponseBodyStatusCode `json:"statusCode"`
+ }
+ if err := json.Unmarshal(bodyBytes, &dest); err != nil {
+ return nil, err
+ }
+ response.JSON401 = &dest
+
+ case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403:
+ var dest struct {
+ Details interface{} `json:"details,omitempty"`
+ Error string `json:"error"`
+ Message string `json:"message"`
+ ReqId string `json:"reqId"`
+ StatusCode SelectOrganizationV3403JSONResponseBodyStatusCode `json:"statusCode"`
+ }
+ if err := json.Unmarshal(bodyBytes, &dest); err != nil {
+ return nil, err
+ }
+ response.JSON403 = &dest
+
+ case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404:
+ var dest struct {
+ Error string `json:"error"`
+ Message string `json:"message"`
+ ReqId string `json:"reqId"`
+ StatusCode SelectOrganizationV3404JSONResponseBodyStatusCode `json:"statusCode"`
+ }
+ if err := json.Unmarshal(bodyBytes, &dest); err != nil {
+ return nil, err
+ }
+ response.JSON404 = &dest
+
+ case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422:
+ var dest struct {
+ Error string `json:"error"`
+ Message interface{} `json:"message,omitempty"`
+ ReqId string `json:"reqId"`
+ StatusCode SelectOrganizationV3422JSONResponseBodyStatusCode `json:"statusCode"`
+ }
+ if err := json.Unmarshal(bodyBytes, &dest); err != nil {
+ return nil, err
+ }
+ response.JSON422 = &dest
+
+ case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500:
+ var dest struct {
+ Error string `json:"error"`
+ Message string `json:"message"`
+ ReqId string `json:"reqId"`
+ StatusCode SelectOrganizationV3500JSONResponseBodyStatusCode `json:"statusCode"`
+ }
+ if err := json.Unmarshal(bodyBytes, &dest); err != nil {
+ return nil, err
+ }
+ response.JSON500 = &dest
+
+ }
+
+ return response, nil
+}
diff --git a/tests/clients/api/oapi-codegen.yaml b/tests/clients/api/oapi-codegen.yaml
new file mode 100644
index 0000000000..ab3f291d13
--- /dev/null
+++ b/tests/clients/api/oapi-codegen.yaml
@@ -0,0 +1,25 @@
+# yaml-language-server: $schema=https://raw.githubusercontent.com/oapi-codegen/oapi-codegen/HEAD/configuration-schema.json
+package: api
+output: clients/api/api.gen.go
+
+generate:
+ models: true
+ client: true
+
+output-options:
+ # Only what the suite calls. Add an id here when a test reaches for a new endpoint.
+ #
+ # The route must also be in the spec, which needs OPENAPI_FULL_SPEC on the instance
+ # being generated from: half the routes are hidden by default, and a route with no
+ # operationId gets a name derived from its path that changes when the path does.
+ include-operation-ids:
+ - adminBootstrap
+ - updateAdminConfig
+ - getServerStatus
+ - loginV3
+ - selectOrganizationV3
+ - refreshAuthToken
+ - createOrganization
+ - deleteOrganization
+ - createProject
+ - getOrganizationPlan
diff --git a/tests/go.mod b/tests/go.mod
index 0c6f0e4d56..ff21d1c419 100644
--- a/tests/go.mod
+++ b/tests/go.mod
@@ -7,7 +7,9 @@ require github.com/testcontainers/testcontainers-go v0.44.0
require (
dario.cat/mergo v1.0.2 // indirect
github.com/Azure/go-ansiterm v0.0.0-20250102033503-faa5f7b0171c // indirect
+ github.com/BurntSushi/toml v1.4.1-0.20240526193622-a339e1f7089c // indirect
github.com/Microsoft/go-winio v0.6.2 // indirect
+ github.com/apapsch/go-jsonmerge/v2 v2.0.0 // indirect
github.com/cenkalti/backoff/v4 v4.3.0 // indirect
github.com/cespare/xxhash/v2 v2.3.0 // indirect
github.com/containerd/errdefs v1.0.0 // indirect
@@ -15,15 +17,19 @@ require (
github.com/containerd/log v0.1.0 // indirect
github.com/containerd/platforms v0.2.1 // indirect
github.com/cpuguy83/dockercfg v0.3.2 // indirect
- github.com/davecgh/go-spew v1.1.1 // indirect
+ github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
github.com/distribution/reference v0.6.0 // indirect
github.com/docker/go-connections v0.7.0 // indirect
github.com/docker/go-units v0.5.0 // indirect
+ github.com/dprotaso/go-yit v0.0.0-20220510233725-9ba8df137936 // indirect
github.com/ebitengine/purego v0.10.1 // indirect
github.com/felixge/httpsnoop v1.1.0 // indirect
+ github.com/getkin/kin-openapi v0.142.0 // indirect
github.com/go-logr/logr v1.4.3 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
github.com/go-ole/go-ole v1.3.0 // indirect
+ github.com/go-openapi/jsonpointer v0.23.1 // indirect
+ github.com/go-openapi/swag/jsonname v0.26.0 // indirect
github.com/google/uuid v1.6.0 // indirect
github.com/klauspost/compress v1.18.6 // indirect
github.com/lufia/plan9stats v0.0.0-20260330125221-c963978e514e // indirect
@@ -37,22 +43,42 @@ require (
github.com/moby/sys/user v0.4.0 // indirect
github.com/moby/sys/userns v0.1.0 // indirect
github.com/moby/term v0.5.2 // indirect
+ github.com/oapi-codegen/oapi-codegen/v2 v2.8.0 // indirect
+ github.com/oapi-codegen/runtime v1.7.0 // indirect
+ github.com/oasdiff/yaml v0.1.1 // indirect
+ github.com/oasdiff/yaml3 v0.0.14 // indirect
github.com/opencontainers/go-digest v1.0.0 // indirect
github.com/opencontainers/image-spec v1.1.1 // indirect
- github.com/pmezard/go-difflib v1.0.0 // indirect
+ github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
github.com/power-devops/perfstat v0.0.0-20240221224432-82ca36839d55 // indirect
+ github.com/santhosh-tekuri/jsonschema/v6 v6.0.2 // indirect
github.com/shirou/gopsutil/v4 v4.26.6 // indirect
github.com/sirupsen/logrus v1.9.4 // indirect
+ github.com/speakeasy-api/jsonpath v0.6.3 // indirect
+ github.com/speakeasy-api/openapi v1.24.0 // indirect
github.com/stretchr/testify v1.11.1 // indirect
github.com/tklauser/go-sysconf v0.4.0 // indirect
github.com/tklauser/numcpus v0.12.0 // indirect
+ github.com/vmware-labs/yaml-jsonpath v0.3.2 // indirect
github.com/yusufpapurcu/wmi v1.2.4 // indirect
go.opentelemetry.io/auto/sdk v1.2.1 // indirect
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.69.0 // indirect
go.opentelemetry.io/otel v1.44.0 // indirect
go.opentelemetry.io/otel/metric v1.44.0 // indirect
go.opentelemetry.io/otel/trace v1.44.0 // indirect
+ go.yaml.in/yaml/v3 v3.0.4 // indirect
golang.org/x/crypto v0.54.0 // indirect
+ golang.org/x/exp/typeparams v0.0.0-20231108232855-2478ac86f678 // indirect
+ golang.org/x/mod v0.38.0 // indirect
+ golang.org/x/sync v0.22.0 // indirect
golang.org/x/sys v0.47.0 // indirect
+ golang.org/x/text v0.40.0 // indirect
+ golang.org/x/tools v0.48.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
+ honnef.co/go/tools v0.8.1 // indirect
+)
+
+tool (
+ github.com/oapi-codegen/oapi-codegen/v2/cmd/oapi-codegen
+ honnef.co/go/tools/cmd/staticcheck
)
diff --git a/tests/go.sum b/tests/go.sum
index ccb4f78537..427c6189ac 100644
--- a/tests/go.sum
+++ b/tests/go.sum
@@ -4,12 +4,21 @@ github.com/AdaLogics/go-fuzz-headers v0.0.0-20240806141605-e8a1dd7889d6 h1:He8af
github.com/AdaLogics/go-fuzz-headers v0.0.0-20240806141605-e8a1dd7889d6/go.mod h1:8o94RPi1/7XTJvwPpRSzSUedZrtlirdB3r9Z20bi2f8=
github.com/Azure/go-ansiterm v0.0.0-20250102033503-faa5f7b0171c h1:udKWzYgxTojEKWjV8V+WSxDXJ4NFATAsZjh8iIbsQIg=
github.com/Azure/go-ansiterm v0.0.0-20250102033503-faa5f7b0171c/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E=
+github.com/BurntSushi/toml v1.4.1-0.20240526193622-a339e1f7089c h1:pxW6RcqyfI9/kWtOwnv/G+AzdKuy2ZrqINhenH4HyNs=
+github.com/BurntSushi/toml v1.4.1-0.20240526193622-a339e1f7089c/go.mod h1:ukJfTF/6rtPPRCnwkur4qwRxa8vTRFBF0uk2lLoLwho=
github.com/Microsoft/go-winio v0.6.2 h1:F2VQgta7ecxGYO8k3ZZz3RS8fVIXVxONVUPlNERoyfY=
github.com/Microsoft/go-winio v0.6.2/go.mod h1:yd8OoFMLzJbo9gZq8j5qaps8bJ9aShtEA8Ipt1oGCvU=
+github.com/RaveNoX/go-jsoncommentstrip v1.0.0/go.mod h1:78ihd09MekBnJnxpICcwzCMzGrKSKYe4AqU6PDYYpjk=
+github.com/apapsch/go-jsonmerge/v2 v2.0.0 h1:axGnT1gRIfimI7gJifB699GoE/oq+F2MU7Dml6nw9rQ=
+github.com/apapsch/go-jsonmerge/v2 v2.0.0/go.mod h1:lvDnEdqiQrp0O42VQGgmlKpxL1AP2+08jFMw88y4klk=
+github.com/bmatcuk/doublestar v1.1.1/go.mod h1:UD6OnuiIn0yFxxA2le/rnRU1G4RaI4UvFv1sNto9p6w=
github.com/cenkalti/backoff/v4 v4.3.0 h1:MyRJ/UdXutAwSAT+s3wNd7MfTIcy71VQueUuFK343L8=
github.com/cenkalti/backoff/v4 v4.3.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE=
github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs=
github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
+github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI=
+github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI=
+github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU=
github.com/containerd/errdefs v1.0.0 h1:tg5yIfIlQIrxYtu9ajqY42W3lpS19XqdxRQeEwYG8PI=
github.com/containerd/errdefs v1.0.0/go.mod h1:+YBYIdtsnF4Iw6nWZhJcqGSg/dwvV7tyJ/kCkyJ2k+M=
github.com/containerd/errdefs/pkg v0.3.0 h1:9IKJ06FvyNlexW690DXuQNx2KA2cUJXx151Xdx3ZPPE=
@@ -22,18 +31,28 @@ github.com/cpuguy83/dockercfg v0.3.2 h1:DlJTyZGBDlXqUZ2Dk2Q3xHs/FtnooJJVaad2S9GK
github.com/cpuguy83/dockercfg v0.3.2/go.mod h1:sugsbF4//dDlL/i+S+rtpIWp+5h0BHJHfjj5/jFyUJc=
github.com/creack/pty v1.1.24 h1:bJrF4RRfyJnbTJqzRLHzcGaZK1NeM5kTC9jGgovnR1s=
github.com/creack/pty v1.1.24/go.mod h1:08sCNb52WyoAwi2QDyzUCTgcvVFhUzewun7wtTfvcwE=
+github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
+github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM=
+github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/distribution/reference v0.6.0 h1:0IXCQ5g4/QMHHkarYzh5l+u8T3t73zM5QvfrDyIgxBk=
github.com/distribution/reference v0.6.0/go.mod h1:BbU0aIcezP1/5jX/8MP0YiH4SdvB5Y4f/wlDRiLyi3E=
github.com/docker/go-connections v0.7.0 h1:6SsRfJddP22WMrCkj19x9WKjEDTB+ahsdiGYf0mN39c=
github.com/docker/go-connections v0.7.0/go.mod h1:no1qkHdjq7kLMGUXYAduOhYPSJxxvgWBh7ogVvptn3Q=
github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4=
github.com/docker/go-units v0.5.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk=
+github.com/dprotaso/go-yit v0.0.0-20191028211022-135eb7262960/go.mod h1:9HQzr9D/0PGwMEbC3d5AB7oi67+h4TsQqItC1GVYG58=
+github.com/dprotaso/go-yit v0.0.0-20220510233725-9ba8df137936 h1:PRxIJD8XjimM5aTknUK9w6DHLDox2r2M3DI4i2pnd3w=
+github.com/dprotaso/go-yit v0.0.0-20220510233725-9ba8df137936/go.mod h1:ttYvX5qlB+mlV1okblJqcSMtR4c52UKxDiX9GRBS8+Q=
github.com/ebitengine/purego v0.10.1 h1:dewVBCBT2GaMu1SrNTYxQhgQBethzfhiwvZiLGP/qyY=
github.com/ebitengine/purego v0.10.1/go.mod h1:iIjxzd6CiRiOG0UyXP+V1+jWqUXVjPKLAI0mRfJZTmQ=
github.com/felixge/httpsnoop v1.1.0 h1:3YtUj32ZZkqZtt3sZZsClsymw/QDuVfpNhoA31zeORc=
github.com/felixge/httpsnoop v1.1.0/go.mod h1:Zqxgdd+1Rkcz8euOqdr7lqgCRJztwr5hp9vDSi5UZCE=
+github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
+github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ=
+github.com/getkin/kin-openapi v0.142.0 h1:izj0vBdFprMhitfzaX8sTqztsEQyvwhssBoB6n8NO7w=
+github.com/getkin/kin-openapi v0.142.0/go.mod h1:3BH9M9XDe/y9M5DSvEocVYAYq1w0qrhJHjC/vZi0AaY=
github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A=
github.com/go-logr/logr v1.4.3 h1:CjnDlHq8ikf6E492q6eKboGOC0T8CDaOvkHCIg8idEI=
github.com/go-logr/logr v1.4.3/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY=
@@ -42,14 +61,39 @@ github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre
github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0=
github.com/go-ole/go-ole v1.3.0 h1:Dt6ye7+vXGIKZ7Xtk4s6/xVdGDQynvom7xCFEdWr6uE=
github.com/go-ole/go-ole v1.3.0/go.mod h1:5LS6F96DhAwUc7C+1HLexzMXY1xGRSryjyPPKW6zv78=
+github.com/go-openapi/jsonpointer v0.23.1 h1:1HBACs7XIwR2RcmItfdSFlALhGbe6S92p0ry4d1GWg4=
+github.com/go-openapi/jsonpointer v0.23.1/go.mod h1:iWRmZTrGn7XwYhtPt/fvdSFj1OfNBngqRT2UG3BxSqY=
+github.com/go-openapi/swag/jsonname v0.26.0 h1:gV1NFX9M8avo0YSpmWogqfQISigCmpaiNci8cGECU5w=
+github.com/go-openapi/swag/jsonname v0.26.0/go.mod h1:urBBR8bZNoDYGr653ynhIx+gTeIz0ARZxHkAPktJK2M=
+github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE=
+github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
+github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8=
+github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA=
+github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs=
+github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w=
+github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0=
+github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI=
+github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk=
+github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY=
+github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
+github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
+github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
+github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8=
github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU=
+github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=
github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=
github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
+github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU=
+github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc=
+github.com/juju/gnuflag v0.0.0-20171113085948-2ce1bb71843d/go.mod h1:2PavIy+JPciBPrBUjwbNvtwB6RQlve+hkpll6QSNmOE=
github.com/klauspost/compress v1.18.6 h1:2jupLlAwFm95+YDR+NwD2MEfFO9d4z4Prjl1XXDjuao=
github.com/klauspost/compress v1.18.6/go.mod h1:cwPg85FWrGar70rWktvGQj8/hthj3wpl0PGDogxkrSQ=
+github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE=
github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk=
+github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
+github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
github.com/lufia/plan9stats v0.0.0-20260330125221-c963978e514e h1:Q6MvJtQK/iRcRtzAscm/zF23XxJlbECiGPyRicsX+Ak=
@@ -74,22 +118,56 @@ github.com/moby/sys/userns v0.1.0 h1:tVLXkFOxVu9A64/yh59slHVv9ahO9UIev4JZusOLG/g
github.com/moby/sys/userns v0.1.0/go.mod h1:IHUYgu/kao6N8YZlp9Cf444ySSvCmDlmzUcYfDHOl28=
github.com/moby/term v0.5.2 h1:6qk3FJAFDs6i/q3W/pQ97SX192qKfZgGjCQqfCJkgzQ=
github.com/moby/term v0.5.2/go.mod h1:d3djjFCrjnB+fl8NJux+EJzu0msscUP+f8it8hPkFLc=
+github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A=
+github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU=
+github.com/oapi-codegen/oapi-codegen/v2 v2.8.0 h1:s4hxMxuqtR8jPzXkBTtFwY/SBuj3gEAYikmbBSdtLMM=
+github.com/oapi-codegen/oapi-codegen/v2 v2.8.0/go.mod h1:yae2TI9IYB5vxQ35gFrpXh9L5H1eJv4MAUK1jumGMTo=
+github.com/oapi-codegen/runtime v1.7.0 h1:t7358VYPvNbWJ9gdAkIK/smVeHpBf6yp8VTsaZsb/7k=
+github.com/oapi-codegen/runtime v1.7.0/go.mod h1:GwV7hC2hviaMzj+ITfHVRESK5J2W/GefVwIND/bMGvU=
+github.com/oasdiff/yaml v0.1.1 h1:6nHx+pn9gBRM6YpBlFZFQGCCd1nuvqOBtTD3KKTgGxY=
+github.com/oasdiff/yaml v0.1.1/go.mod h1:EYJNoyktvWMJ0Hmhx+6qTaqMOsalUaRGT8Sj1hNcegU=
+github.com/oasdiff/yaml3 v0.0.14 h1:aLJee3hxBK2H5wdXd9iPcIXb93Nty1Ge0pT171eHtkw=
+github.com/oasdiff/yaml3 v0.0.14/go.mod h1:csto2xfDjYccdUn/yw/bPjj/cYTdp6HtFA0J4TWG+gg=
+github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
+github.com/onsi/ginkgo v1.10.2/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
+github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk=
+github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vvnwo0=
+github.com/onsi/ginkgo/v2 v2.1.3/go.mod h1:vw5CSIxN1JObi/U8gcbwft7ZxR2dgaR70JSE3/PpL4c=
+github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY=
+github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY=
+github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo=
+github.com/onsi/gomega v1.17.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAlGdZY=
+github.com/onsi/gomega v1.19.0/go.mod h1:LY+I3pBVzYsTBU1AnDwOSxaYi9WoWiqgwooUqq9yPro=
github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U=
github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM=
github.com/opencontainers/image-spec v1.1.1 h1:y0fUlFfIZhPF1W537XOLg0/fcx6zcHCJwooC2xJA040=
github.com/opencontainers/image-spec v1.1.1/go.mod h1:qpqAh3Dmcf36wStyyWU+kCeDgrGnAve2nCC8+7h8Q0M=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
+github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U=
+github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/power-devops/perfstat v0.0.0-20240221224432-82ca36839d55 h1:o4JXh1EVt9k/+g42oCprj/FisM4qX9L3sZB3upGN2ZU=
github.com/power-devops/perfstat v0.0.0-20240221224432-82ca36839d55/go.mod h1:OmDBASR4679mdNQnz2pUhc2G8CO2JrUAVFDRBDP/hJE=
github.com/rogpeppe/go-internal v1.14.1 h1:UQB4HGPB6osV0SQTLymcB4TgvyWu6ZyliaW0tI/otEQ=
github.com/rogpeppe/go-internal v1.14.1/go.mod h1:MaRKkUm5W0goXpeCfT7UZI6fk/L7L7so1lCWt35ZSgc=
+github.com/santhosh-tekuri/jsonschema/v6 v6.0.2 h1:KRzFb2m7YtdldCEkzs6KqmJw4nqEVZGK7IN2kJkjTuQ=
+github.com/santhosh-tekuri/jsonschema/v6 v6.0.2/go.mod h1:JXeL+ps8p7/KNMjDQk3TCwPpBy0wYklyWTfbkIzdIFU=
+github.com/sergi/go-diff v1.1.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM=
github.com/shirou/gopsutil/v4 v4.26.6 h1:Mzr/npDtQC/xpeEuQKHZt8Zo9CmPvhTj8nkR8w5TLDs=
github.com/shirou/gopsutil/v4 v4.26.6/go.mod h1:LZ6ewCSkBqUpvSOf+LsTGnRinC6iaNUNMGBtDkJBaLQ=
github.com/sirupsen/logrus v1.9.4 h1:TsZE7l11zFCLZnZ+teH4Umoq5BhEIfIzfRDZ1Uzql2w=
github.com/sirupsen/logrus v1.9.4/go.mod h1:ftWc9WdOfJ0a92nsE2jF5u5ZwH8Bv2zdeOC42RjbV2g=
+github.com/speakeasy-api/jsonpath v0.6.3 h1:c+QPwzAOdrWvzycuc9HFsIZcxKIaWcNpC+xhOW9rJxU=
+github.com/speakeasy-api/jsonpath v0.6.3/go.mod h1:2cXloNuQ+RSXi5HTRaeBh7JEmjRXTiaKpFTdZiL7URI=
+github.com/speakeasy-api/openapi v1.24.0 h1:opoD27rupX7zBVPq1HkIGLeMOzNNA7JalhYP8q34i04=
+github.com/speakeasy-api/openapi v1.24.0/go.mod h1:g3+dIMe0AYgbbGvnlQZqesmjAVWSm9BmsjLevnefQrg=
+github.com/spkg/bom v0.0.0-20160624110644-59b7046e48ad/go.mod h1:qLr4V1qq6nMqFKkMo8ZTx3f+BZEkzsRUY10Xsm2mwU0=
+github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/objx v0.5.3 h1:jmXUvGomnU1o3W/V5h2VEradbpJDwGrzugQQvL0POH4=
github.com/stretchr/objx v0.5.3/go.mod h1:rDQraq+vQZU7Fde9LOZLr8Tax6zZvy4kuNKF+QYS+U0=
+github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
+github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
+github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA=
github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U=
github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U=
github.com/testcontainers/testcontainers-go v0.44.0 h1:/Fwh6HY1mIikhnm9e7HwoxGycx0lzRAE0f5VQpjFxzI=
@@ -98,6 +176,9 @@ github.com/tklauser/go-sysconf v0.4.0 h1:7H0uAN+7RkwWRaxhYXDLqa5V3LPrJeV8wmD9dRU
github.com/tklauser/go-sysconf v0.4.0/go.mod h1:8mTNWyog7H+MpKijp4VmKJAd2bbYQ2zuUwkYRbUArPI=
github.com/tklauser/numcpus v0.12.0 h1:NR85qdvHA9pFse3x3weVZ0r0ST8R6l5RHbZrlRaqob4=
github.com/tklauser/numcpus v0.12.0/go.mod h1:ABHeXzJnr/qqwguhClkZKT1/8VABcYrsyUiUGobwWJg=
+github.com/vmware-labs/yaml-jsonpath v0.3.2 h1:/5QKeCBGdsInyDCyVNLbXyilb61MXGi9NP674f9Hobk=
+github.com/vmware-labs/yaml-jsonpath v0.3.2/go.mod h1:U6whw1z03QyqgWdgXxvVnQ90zN1BWz5V+51Ewf8k+rQ=
+github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yusufpapurcu/wmi v1.2.4 h1:zFUKzehAFReQwLys1b/iSMl+JQGSCSjtVqQn9bBrPo0=
github.com/yusufpapurcu/wmi v1.2.4/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0=
go.opentelemetry.io/auto/sdk v1.2.1 h1:jXsnJ4Lmnqd11kwkBV2LgLoFMZKizbCi5fNZ/ipaZ64=
@@ -114,22 +195,96 @@ go.opentelemetry.io/otel/sdk/metric v1.44.0 h1:3LlKgI+VjbVsjNRFZJZAJ30WjXC5VkNRk
go.opentelemetry.io/otel/sdk/metric v1.44.0/go.mod h1:5B5pMARnXxKhltooO4xUuCBorl65a4EpnTalObqOigA=
go.opentelemetry.io/otel/trace v1.44.0 h1:jxF5CsGYCe74MCRx2X4g7WsY/VBKRqqpNvXlX/6gtIk=
go.opentelemetry.io/otel/trace v1.44.0/go.mod h1:oLl1jrMQAVo6v3GAggN+1VH9VIz9iUSvW53sW1Q8PIE=
+go.yaml.in/yaml/v3 v3.0.4 h1:tfq32ie2Jv2UxXFdLJdh3jXuOzWiL1fo0bu/FbuKpbc=
+go.yaml.in/yaml/v3 v3.0.4/go.mod h1:DhzuOOF2ATzADvBadXxruRBLzYTpT36CKvDb3+aBEFg=
+golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
+golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
+golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
golang.org/x/crypto v0.54.0 h1:YLIA59K4fiNzHzjnZt2tUJQjQtUWfWbeHBqKtk3eScw=
golang.org/x/crypto v0.54.0/go.mod h1:KWL8ny2AZdGR2cWmzeHrp2azQPGogOv+HeQaVEXC2dk=
+golang.org/x/exp v0.0.0-20240404231335-c0f41cb1a7a0 h1:985EYyeCOxTpcgOTJpflJUwOeEz0CQOdPt73OzpE9F8=
+golang.org/x/exp/typeparams v0.0.0-20231108232855-2478ac86f678 h1:1P7xPZEwZMoBoz0Yze5Nx2/4pxj6nw9ZqHWXqP0iRgQ=
+golang.org/x/exp/typeparams v0.0.0-20231108232855-2478ac86f678/go.mod h1:AbB0pIl9nAr9wVwH+Z2ZpaocVmF5I4GyWCDIsVjR0bk=
+golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
+golang.org/x/mod v0.38.0 h1:MECBjubtXD7yj4HrhIUcywNaGeNVUdfVnxmPajOk4yk=
+golang.org/x/mod v0.38.0/go.mod h1:V6Xz0pq8TQ3dGqVQ1FVHuelZpAL0uNhSkk9ogYP3c40=
+golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
+golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
+golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
+golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
+golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
+golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk=
+golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk=
+golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
+golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
+golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
+golang.org/x/sync v0.22.0 h1:SZjpbeLmrCk4xhRSZFNZW5gFUeCeFgjekvI/+gfScek=
+golang.org/x/sync v0.22.0/go.mod h1:9xrNwdLfx4jkKbNva9FpL6vEN7evnE43NNNJQ2LF3+0=
+golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
+golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
+golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20201204225414-ed752295db88/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20210112080510-489259a85091/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.47.0 h1:o7XGOvZQCADBQQ4Y7VNq2dRWQR7JmOUW8Kxx4ZsNgWs=
golang.org/x/sys v0.47.0/go.mod h1:4GL1E5IUh+htKOUEOaiffhrAeqysfVGipDYzABqnCmw=
+golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
+golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
golang.org/x/term v0.45.0 h1:NwWyBmoJCbfTHpxrWoZ9C6/VxOf7ic219I8xZZFdrf0=
golang.org/x/term v0.45.0/go.mod h1:9aqxs0blBcrm/n0L9QW0aRVD+ktan8ssZromtqJC43w=
+golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
+golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
+golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
+golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
+golang.org/x/text v0.40.0 h1:Ub2Z6/xjgF1WrYQz2nuITOEegKFtiIy+rieRJ5lHZKs=
+golang.org/x/text v0.40.0/go.mod h1:hpnzDAfGV753zIKo+wk3u1bVKCGPbrnF7+7LBF/UHVY=
+golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
+golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
+golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
+golang.org/x/tools v0.48.0 h1:3+hClM1aLL5mjMKm5ovokw9epgRXPuu2tILgismM6RE=
+golang.org/x/tools v0.48.0/go.mod h1:08xX0orndb/F7jJxGDicx061tyd5pcMto75YMAXr6lk=
+golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
+golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
+golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
+golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
+google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8=
+google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0=
+google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM=
+google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE=
+google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo=
+google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
+google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
+google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
+gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk=
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q=
+gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys=
+gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw=
+gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
+gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
+gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
+gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
+gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=
+gopkg.in/yaml.v3 v3.0.0-20191026110619-0b21df46bc1d/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
+gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gotest.tools/v3 v3.5.2 h1:7koQfIKdy+I8UTetycgUqXWSDwpgv193Ka+qRsmBY8Q=
gotest.tools/v3 v3.5.2/go.mod h1:LtdLGcnqToBH83WByAAi/wiwSFCArdFIUV/xxN4pcjA=
+honnef.co/go/tools v0.8.1 h1:+JKf3xJ1ni4CwrhVg4/pqsfPGP6vNAXcKbMXJodYx3w=
+honnef.co/go/tools v0.8.1/go.mod h1:XA+OnlRA9EDh/ukGvXMNSZNKGwFQJ+5dER0ioUkOxks=
pgregory.net/rapid v1.2.0 h1:keKAYRcjm+e1F0oAuU5F5+YPAWcyxNNRK2wud503Gnk=
pgregory.net/rapid v1.2.0/go.mod h1:PY5XlDGj0+V1FCq0o192FdRhpKHGTRIWBgqjDBTrq04=
diff --git a/tests/harness/infisical/bootstrap.go b/tests/harness/infisical/bootstrap.go
index 9c974aa76d..d4a9cef563 100644
--- a/tests/harness/infisical/bootstrap.go
+++ b/tests/harness/infisical/bootstrap.go
@@ -1,13 +1,14 @@
package infisical
import (
- "bytes"
"context"
- "encoding/json"
"fmt"
- "io"
"net/http"
- "time"
+ "strings"
+
+ "github.com/Infisical/infisical/tests/clients/api"
+ "github.com/google/uuid"
+ openapi_types "github.com/oapi-codegen/runtime/types"
)
// Credentials the harness bootstraps an instance with.
@@ -23,8 +24,7 @@ const (
// Root is what bootstrapping an instance yields.
//
-// Three principals come out of one call, and they are deliberately used for
-// different things:
+// Three principals come out of one call, deliberately used for different things:
//
// - The USER is the only one that can create an organization, because
// POST /api/v2/organizations checks req.auth.actor !== ActorType.USER. The
@@ -35,155 +35,98 @@ const (
// level suites get.
// - The organization it creates is incidental. Tenants make their own.
type Root struct {
- UserID string
+ UserID uuid.UUID
Email string
Password string
- OrgID string
- IdentityID string
+ OrgID uuid.UUID
+ IdentityID uuid.UUID
IdentityToken string
}
-type bootstrapResponse struct {
- User struct {
- ID string `json:"id"`
- Username string `json:"username"`
- } `json:"user"`
- Organization struct {
- ID string `json:"id"`
- Slug string `json:"slug"`
- } `json:"organization"`
- Identity struct {
- ID string `json:"id"`
- Credentials struct {
- Token string `json:"token"`
- } `json:"credentials"`
- } `json:"identity"`
-}
-
// Bootstrap prepares a freshly migrated instance.
//
// POST /api/v1/admin/bootstrap is one shot per database: it refuses once
// serverCfg.initialized is set. An adopted container is therefore already
// bootstrapped, and the second caller logs in instead.
func Bootstrap(ctx context.Context, baseURL string) (Root, error) {
- c := &http.Client{Timeout: 30 * time.Second}
-
- var out bootstrapResponse
- code, body, err := post(ctx, c, baseURL+"/api/v1/admin/bootstrap", "", map[string]string{
- "email": RootEmail,
- "password": RootPassword,
- "organization": RootOrgName,
- }, &out)
+ c, err := NewClient(baseURL)
if err != nil {
return Root{}, err
}
+ res, err := c.AdminBootstrapWithResponse(ctx, api.AdminBootstrapJSONRequestBody{
+ Email: openapi_types.Email(RootEmail),
+ Password: RootPassword,
+ Organization: RootOrgName,
+ })
+ if err != nil {
+ return Root{}, fmt.Errorf("infisical: bootstrap: %w", err)
+ }
+
switch {
- case code == http.StatusOK:
- case alreadyBootstrapped(code, body):
- return adopt(ctx, c, baseURL)
+ case res.StatusCode() == http.StatusOK && res.JSON200 != nil:
+ case alreadyBootstrapped(res.StatusCode(), res.Body):
+ // An adopted instance. The credentials are constants, so this is recoverable
+ // rather than fatal: log in and carry on with what the first caller created.
+ return adopt(ctx, c)
default:
- return Root{}, fmt.Errorf("infisical: bootstrap returned %d: %s", code, trunc(body))
+ return Root{}, apiError("bootstrap", res.StatusCode(), res.Body)
}
+ body := res.JSON200
root := Root{
- UserID: out.User.ID,
+ UserID: body.User.Id,
Email: RootEmail,
Password: RootPassword,
- OrgID: out.Organization.ID,
- IdentityID: out.Identity.ID,
- IdentityToken: out.Identity.Credentials.Token,
+ OrgID: body.Organization.Id,
+ IdentityID: body.Identity.Id,
+ IdentityToken: body.Identity.Credentials.Token,
}
// bootstrapInstance sets allowSignUp:false whenever the instance is not cloud.
- // Without turning it back on, creating a second real user is impossible, and
- // that is the only path to a non-administrator principal.
- if err := allowSignUp(ctx, c, baseURL, root.IdentityToken); err != nil {
+ // Without turning it back on, creating a second real user is impossible, and that
+ // is the only path to a non-administrator principal.
+ if err := allowSignUp(ctx, baseURL, root.IdentityToken); err != nil {
return Root{}, err
}
return root, nil
}
-func adopt(ctx context.Context, c *http.Client, baseURL string) (Root, error) {
- var login struct {
- AccessToken string `json:"accessToken"`
- }
- code, body, err := post(ctx, c, baseURL+"/api/v3/auth/login", "", map[string]string{
- "email": RootEmail,
- "password": RootPassword,
- }, &login)
+func adopt(ctx context.Context, c *api.ClientWithResponses) (Root, error) {
+ res, err := c.LoginV3WithResponse(ctx, api.LoginV3JSONRequestBody{
+ Email: RootEmail,
+ Password: RootPassword,
+ })
if err != nil {
- return Root{}, err
+ return Root{}, fmt.Errorf("infisical: logging in as the harness root: %w", err)
}
- if code != http.StatusOK {
+ if res.StatusCode() != http.StatusOK {
return Root{}, fmt.Errorf(
- "infisical: this instance is already bootstrapped but the harness root cannot log in (%d: %s).\n"+
- "It was probably bootstrapped by something other than the harness. Run `inf down` and retry.",
- code, trunc(body))
+ "infisical: this instance is already bootstrapped but the harness root cannot log in (%d).\n"+
+ "It was probably bootstrapped by something other than the harness, so run `inf down` and retry",
+ res.StatusCode())
}
return Root{Email: RootEmail, Password: RootPassword}, nil
}
-func allowSignUp(ctx context.Context, c *http.Client, baseURL, token string) error {
- code, body, err := patch(ctx, c, baseURL+"/api/v1/admin/config", token, map[string]any{
- "allowSignUp": true,
- })
+func allowSignUp(ctx context.Context, baseURL, token string) error {
+ c, err := NewClient(baseURL, BearerAuth(token))
if err != nil {
return err
}
- if code != http.StatusOK {
- return fmt.Errorf("infisical: re-enabling signup returned %d: %s", code, trunc(body))
- }
- return nil
-}
-
-// alreadyBootstrapped recognises the one failure that is expected and recoverable.
-func alreadyBootstrapped(code int, body string) bool {
- return code == http.StatusBadRequest && bytes.Contains([]byte(body), []byte("already"))
-}
-
-func post(ctx context.Context, c *http.Client, url, token string, in, out any) (int, string, error) {
- return do(ctx, c, http.MethodPost, url, token, in, out)
-}
-
-func patch(ctx context.Context, c *http.Client, url, token string, in any) (int, string, error) {
- return do(ctx, c, http.MethodPatch, url, token, in, nil)
-}
-
-func do(ctx context.Context, c *http.Client, method, url, token string, in, out any) (int, string, error) {
- buf, err := json.Marshal(in)
- if err != nil {
- return 0, "", err
- }
- req, err := http.NewRequestWithContext(ctx, method, url, bytes.NewReader(buf))
- if err != nil {
- return 0, "", err
- }
- req.Header.Set("Content-Type", "application/json")
- // completeAccount rejects a request without one, so send it everywhere.
- req.Header.Set("User-Agent", "infisical-harness")
- if token != "" {
- req.Header.Set("Authorization", "Bearer "+token)
- }
-
- resp, err := c.Do(req)
+ res, err := c.UpdateAdminConfigWithResponse(ctx, api.UpdateAdminConfigJSONRequestBody{
+ AllowSignUp: new(true),
+ })
if err != nil {
- return 0, "", fmt.Errorf("infisical: %s %s: %w", method, url, err)
+ return fmt.Errorf("infisical: re-enabling signup: %w", err)
}
- defer func() { _ = resp.Body.Close() }()
-
- body, _ := io.ReadAll(resp.Body)
- if out != nil && resp.StatusCode == http.StatusOK {
- if err := json.Unmarshal(body, out); err != nil {
- return resp.StatusCode, string(body), fmt.Errorf("infisical: decoding %s: %w", url, err)
- }
+ if res.StatusCode() != http.StatusOK {
+ return apiError("re-enabling signup", res.StatusCode(), res.Body)
}
- return resp.StatusCode, string(body), nil
+ return nil
}
-func trunc(s string) string {
- if len(s) > 400 {
- return s[:400] + "..."
- }
- return s
+// alreadyBootstrapped recognises the one failure that is expected and recoverable.
+func alreadyBootstrapped(status int, body []byte) bool {
+ return status == http.StatusBadRequest && strings.Contains(string(body), "already")
}
diff --git a/tests/harness/infisical/bootstrap_test.go b/tests/harness/infisical/bootstrap_test.go
new file mode 100644
index 0000000000..3d91842438
--- /dev/null
+++ b/tests/harness/infisical/bootstrap_test.go
@@ -0,0 +1,69 @@
+package infisical_test
+
+import (
+ "testing"
+
+ "github.com/Infisical/infisical/tests/harness/infisical"
+ "github.com/Infisical/infisical/tests/infra"
+ "github.com/Infisical/infisical/tests/internal/spec"
+ "github.com/google/uuid"
+)
+
+func TestBootstrap(t *testing.T) {
+ requireDocker(t)
+ spec.Why(t, `Bootstrap is the root of every principal the suite has. If it is wrong,
+ nothing downstream can authenticate, and the failure surfaces as an unexplained 401
+ in whichever test happens to run first.`)
+
+ app := bootStack(t)
+ root, err := infisical.Bootstrap(t.Context(), app.BaseURL(infra.External))
+ if err != nil {
+ t.Fatalf("bootstrap: %v", err)
+ }
+
+ t.Run("ok/yields an instance admin identity token", func(t *testing.T) {
+ if root.IdentityToken == "" {
+ t.Fatal("no identity token; instance-level suites have no principal")
+ }
+ if root.IdentityID == uuid.Nil {
+ t.Error("identity has no id")
+ }
+ })
+
+ t.Run("ok/keeps the root user credentials", func(t *testing.T) {
+ spec.Why(t, `POST /api/v2/organizations refuses any actor that is not a USER, so the
+ identity token cannot mint tenants and the password is the only thing that can.`)
+
+ if root.Email == "" || root.Password == "" {
+ t.Fatal("no root user credentials; NewTenant cannot create an organization")
+ }
+ })
+
+ t.Run("ok/signup is re-enabled", func(t *testing.T) {
+ spec.Why(t, `bootstrapInstance sets allowSignUp:false on any non-cloud instance.
+ Left off, there is no path to a second real user, which is the only way to get a
+ non-administrator principal.`)
+
+ st, err := app.Status(t.Context())
+ if err != nil {
+ t.Fatalf("status: %v", err)
+ }
+ if !st.SignupAllowed {
+ t.Error("allowSignUp is still false")
+ }
+ })
+
+ t.Run("idempotent/bootstrapping an adopted instance logs in instead of failing", func(t *testing.T) {
+ spec.Why(t, `admin/bootstrap is one shot per database, but a container is adopted by
+ name, so the second test binary to arrive finds an instance already bootstrapped.
+ That has to be recoverable or only the first binary in a run can work.`)
+
+ again, err := infisical.Bootstrap(t.Context(), app.BaseURL(infra.External))
+ if err != nil {
+ t.Fatalf("second bootstrap: %v", err)
+ }
+ if again.Email != root.Email {
+ t.Errorf("adopted a different root: %q then %q", root.Email, again.Email)
+ }
+ })
+}
diff --git a/tests/harness/infisical/client.go b/tests/harness/infisical/client.go
new file mode 100644
index 0000000000..ded17cac58
--- /dev/null
+++ b/tests/harness/infisical/client.go
@@ -0,0 +1,60 @@
+package infisical
+
+import (
+ "context"
+ "fmt"
+ "net/http"
+
+ "github.com/Infisical/infisical/tests/clients/api"
+)
+
+// userAgent is sent on every request.
+//
+// Not cosmetic: completeAccount rejects a request without one, so a missing header
+// surfaces as an opaque 500 from a route that looks unrelated to headers.
+const userAgent = "infisical-harness"
+
+// NewClient builds an API client for one principal.
+//
+// Every call the harness makes goes through this, including its own bootstrap. There
+// is no hand-written HTTP path: a route the generated client cannot reach is a route
+// missing an operationId, and the fix is upstream in the router rather than an
+// escape hatch here.
+func NewClient(baseURL string, editors ...api.RequestEditorFn) (*api.ClientWithResponses, error) {
+ opts := []api.ClientOption{
+ api.WithRequestEditorFn(func(_ context.Context, req *http.Request) error {
+ req.Header.Set("User-Agent", userAgent)
+ return nil
+ }),
+ }
+ for _, e := range editors {
+ opts = append(opts, api.WithRequestEditorFn(e))
+ }
+
+ c, err := api.NewClientWithResponses(baseURL, opts...)
+ if err != nil {
+ return nil, fmt.Errorf("infisical: building API client for %s: %w", baseURL, err)
+ }
+ return c, nil
+}
+
+// BearerAuth attaches a token to every request.
+func BearerAuth(token string) api.RequestEditorFn {
+ return func(_ context.Context, req *http.Request) error {
+ req.Header.Set("Authorization", "Bearer "+token)
+ return nil
+ }
+}
+
+// apiError renders a non-2xx response in a form worth reading.
+//
+// The generated client surfaces a status and a raw body; without this, a failure
+// reads as "expected 200, got 400" with the reason left in a byte slice nobody prints.
+func apiError(what string, status int, body []byte) error {
+ const max = 400
+ msg := string(body)
+ if len(msg) > max {
+ msg = msg[:max] + "..."
+ }
+ return fmt.Errorf("infisical: %s returned %d: %s", what, status, msg)
+}
diff --git a/tests/harness/infisical/infisical.go b/tests/harness/infisical/infisical.go
index ef736e722f..7bea55e7a1 100644
--- a/tests/harness/infisical/infisical.go
+++ b/tests/harness/infisical/infisical.go
@@ -90,6 +90,10 @@ func (m *module) Start(ctx context.Context, d infra.Deps) (infra.Handle, error)
"ENCRYPTION_KEY": encryptionKey,
"NODE_ENV": "production",
"TELEMETRY_ENABLED": "false",
+ // Serve every route and every field at /api/docs/json. The suite generates
+ // every call it makes and has no hand-written client to fall back on, so a
+ // route missing from the spec is a route no test can reach.
+ "OPENAPI_FULL_SPEC": "true",
"SITE_URL": fmt.Sprintf("http://%s:%d", self, port),
}
if m.runModes != "" {
@@ -156,3 +160,33 @@ func (h *Handle) BaseURL(m infra.Mode) string { return h.Endpoint(m).URL("http")
func (h *Handle) Logs(ctx context.Context) (string, error) { return h.c.Logs(ctx) }
func From(d infra.Deps) (*Handle, bool) { return d.Get[*Handle](Key) }
+
+// Status is the part of GET /api/status the harness cares about.
+type Status struct {
+ EmailConfigured bool
+ RedisConfigured bool
+ SignupAllowed bool
+}
+
+// Status reads GET /api/status, for instance-wide configuration no other response
+// exposes.
+func (h *Handle) Status(ctx context.Context) (Status, error) {
+ c, err := NewClient(h.BaseURL(infra.External))
+ if err != nil {
+ return Status{}, err
+ }
+ res, err := c.GetServerStatusWithResponse(ctx)
+ if err != nil {
+ return Status{}, fmt.Errorf("infisical: reading status: %w", err)
+ }
+ if res.JSON200 == nil {
+ return Status{}, apiError("status", res.StatusCode(), res.Body)
+ }
+ return Status{
+ EmailConfigured: deref(res.JSON200.EmailConfigured),
+ RedisConfigured: deref(res.JSON200.RedisConfigured),
+ SignupAllowed: deref(res.JSON200.InviteOnlySignup),
+ }, nil
+}
+
+func deref(b *bool) bool { return b != nil && *b }
diff --git a/tests/harness/license/license_test.go b/tests/harness/license/license_test.go
index b87d82e276..9c7fb69676 100644
--- a/tests/harness/license/license_test.go
+++ b/tests/harness/license/license_test.go
@@ -38,6 +38,19 @@ func TestPlan_Payload(t *testing.T) {
}
})
+ t.Run("ok/the entitled rate limits are raised, not merely enabled", func(t *testing.T) {
+ t.Parallel()
+ p := Enterprise()
+ for _, f := range []Feature{ReadRateLimit, WriteRateLimit, SecretsRateLimit} {
+ got, ok := p.Features[f.V2].(int)
+ if !ok || got < 100_000 {
+ t.Errorf("%s entitled as %v; the limiter registers whenever the license "+
+ "stub is on, so a default-height limit would throttle the suite",
+ f.V2, p.Features[f.V2])
+ }
+ }
+ })
+
t.Run("ok/Without leaves the original untouched", func(t *testing.T) {
t.Parallel()
base := Enterprise()
diff --git a/tests/harness/license/plan.go b/tests/harness/license/plan.go
index 71ea1d1904..494de44abb 100644
--- a/tests/harness/license/plan.go
+++ b/tests/harness/license/plan.go
@@ -22,8 +22,8 @@ type Product struct {
// OSS default, which is what a downgraded customer actually gets.
var Free = Plan{Slug: "", Features: map[string]any{}}
-// Enterprise turns on everything in the generated mapping.
-//
+const RateLimitCeiling = 1_000_000
+
// It has to enumerate rather than send a wildcard: projectV2ToFeatureSet layers
// entitlements over getDefaultOnPremFeatures(), so a feature the stub omits stays
// off. Limit features get a large number rather than true, since their value is a cap.
@@ -32,6 +32,11 @@ func Enterprise() Plan {
for _, f := range All {
features[f.V2] = valueFor(f)
}
+ // Explicit rather than left to valueFor's name heuristic, because these three
+ // decide whether a parallel suite runs at all.
+ for _, f := range []Feature{ReadRateLimit, WriteRateLimit, SecretsRateLimit} {
+ features[f.V2] = RateLimitCeiling
+ }
return Plan{
Slug: "enterprise",
Features: features,
diff --git a/tests/infra/container.go b/tests/infra/container.go
index 5de17fc899..4575094a0b 100644
--- a/tests/infra/container.go
+++ b/tests/infra/container.go
@@ -1,6 +1,9 @@
package infra
-import "context"
+import (
+ "context"
+ "time"
+)
// File is copied into a container before it starts.
type File struct {
@@ -24,8 +27,20 @@ type ContainerSpec struct {
Aliases []string
Files []File
Labels map[string]string
- Ready Ready
- Check func(context.Context, Container) error
+
+ // Ready is applied by the container engine while the container starts. It
+ // answers "is it up".
+ Ready Ready
+
+ // StartupTimeout overrides DefaultStartupTimeout. Only worth setting for a
+ // container expected to fail, so a test asserting that failure does not wait out
+ // the full deadline.
+ StartupTimeout time.Duration
+
+ // Check runs once the container is ready and answers "is it the thing we asked
+ // for". A wait strategy returns a bool; this is where a silently ineffective
+ // environment variable gets caught with a message that names it.
+ Check func(context.Context, Container) error
}
// Container is a started container, as seen by a module.
diff --git a/tests/infra/logs.go b/tests/infra/logs.go
new file mode 100644
index 0000000000..c5e725eb7a
--- /dev/null
+++ b/tests/infra/logs.go
@@ -0,0 +1,113 @@
+package infra
+
+import (
+ "fmt"
+ "os"
+ "path/filepath"
+ "strings"
+ "sync"
+
+ "github.com/testcontainers/testcontainers-go"
+)
+
+// LogDir is where container output is written, relative to the tests module.
+const LogDir = ".logs"
+
+// tailLines is how much output an error carries. Enough to show the actual failure
+// without burying the assertion that follows it.
+const tailLines = 30
+
+// logSink captures a container's output.
+//
+// Attached at container start rather than read on demand, because a container that
+// fails its wait strategy is torn down before anyone can call Logs() on it. That is
+// the worst failure the harness can produce: a five minute boot that ends in
+// "context deadline exceeded" with nothing about why.
+//
+// Output is written to a file unconditionally, so a hanging container can be tailed
+// live, and the last few lines are kept in memory for the error message.
+type logSink struct {
+ mu sync.Mutex
+ file *os.File
+ tail []string
+ path string
+}
+
+func newLogSink(runID, name string) *logSink {
+ s := &logSink{}
+
+ dir := filepath.Join(LogDir, runID)
+ if err := os.MkdirAll(dir, 0o755); err != nil {
+ // Capture is a diagnostic aid, never a reason a test cannot run.
+ return s
+ }
+ path := filepath.Join(dir, Sanitize(name)+".log")
+ f, err := os.Create(path)
+ if err != nil {
+ return s
+ }
+ s.file, s.path = f, path
+ return s
+}
+
+// Accept implements testcontainers.LogConsumer.
+func (s *logSink) Accept(l testcontainers.Log) {
+ s.mu.Lock()
+ defer s.mu.Unlock()
+
+ if s.file != nil {
+ _, _ = s.file.Write(l.Content)
+ }
+ for _, line := range strings.Split(strings.TrimRight(string(l.Content), "\n"), "\n") {
+ if strings.TrimSpace(line) == "" {
+ continue
+ }
+ s.tail = append(s.tail, line)
+ }
+ if len(s.tail) > tailLines {
+ s.tail = s.tail[len(s.tail)-tailLines:]
+ }
+}
+
+// Tail is the captured output, for an error message.
+func (s *logSink) Tail() string {
+ s.mu.Lock()
+ defer s.mu.Unlock()
+
+ if len(s.tail) == 0 {
+ return "(no output)"
+ }
+ return strings.Join(s.tail, "\n")
+}
+
+// Path is where the full output was written, empty when capture failed.
+func (s *logSink) Path() string {
+ s.mu.Lock()
+ defer s.mu.Unlock()
+ return s.path
+}
+
+func (s *logSink) Close() {
+ s.mu.Lock()
+ defer s.mu.Unlock()
+ if s.file != nil {
+ _ = s.file.Close()
+ }
+}
+
+// startFailure renders a container that never came up, with the evidence attached.
+func startFailure(name, image string, sink *logSink, err error) error {
+ msg := fmt.Sprintf("infra: %s (%s) never became ready: %v", name, image, err)
+ if p := sink.Path(); p != "" {
+ msg += fmt.Sprintf("\nfull output: %s", p)
+ }
+ return fmt.Errorf("%s\nlast output:\n%s", msg, indent(sink.Tail()))
+}
+
+func indent(s string) string {
+ lines := strings.Split(s, "\n")
+ for i, l := range lines {
+ lines[i] = " " + l
+ }
+ return strings.Join(lines, "\n")
+}
diff --git a/tests/infra/logs_test.go b/tests/infra/logs_test.go
new file mode 100644
index 0000000000..10d1362347
--- /dev/null
+++ b/tests/infra/logs_test.go
@@ -0,0 +1,49 @@
+package infra_test
+
+import (
+ "os"
+ "strings"
+ "testing"
+ "time"
+
+ "github.com/Infisical/infisical/tests/infra"
+ "github.com/Infisical/infisical/tests/internal/spec"
+)
+
+func TestRunner_FailedStartupCarriesContainerOutput(t *testing.T) {
+ requireDocker(t)
+ spec.Why(t, `A container that never becomes ready is torn down before anyone can call
+ Logs() on it, so without capture the error is "context deadline exceeded" and nothing
+ else. That is the worst failure this harness can produce: a long boot that ends with
+ no evidence. Only a deliberately failing container exercises this, so a passing suite
+ never covers it.`)
+
+ ctx := t.Context()
+ runner := infra.NewRunner(infra.Workspace(), infra.NewLogger())
+ if err := runner.Network(ctx, infra.NetworkName); err != nil {
+ t.Fatalf("network: %v", err)
+ }
+
+ const marker = "harness-log-capture-marker"
+ _, err := runner.Run(ctx, infra.ContainerSpec{
+ Name: infra.ContainerName(infra.NameParts{Scope: infra.Test, ScopeID: "logcap", Module: "alpine"}),
+ Image: "alpine:3.20",
+ Command: []string{"sh", "-c", "echo " + marker + "; sleep 120"},
+ Ports: []int{9999},
+ // Nothing listens on 9999, so this can only time out.
+ Ready: infra.ForListeningPort("9999/tcp"),
+ StartupTimeout: 8 * time.Second,
+ })
+ if err == nil {
+ t.Fatal("expected the container to fail its wait strategy")
+ }
+
+ if !strings.Contains(err.Error(), marker) {
+ t.Errorf("error does not carry the container's output, so a real failure would be undiagnosable.\ngot: %v", err)
+ }
+ if !strings.Contains(err.Error(), "full output:") {
+ t.Errorf("error does not point at the captured log file.\ngot: %v", err)
+ }
+
+ t.Cleanup(func() { _ = os.RemoveAll(infra.LogDir) })
+}
diff --git a/tests/infra/module.go b/tests/infra/module.go
index 47572ffd39..8318033fe2 100644
--- a/tests/infra/module.go
+++ b/tests/infra/module.go
@@ -157,7 +157,7 @@ func checkLifetimes(m Module, scopes map[Key]Scope, byKey map[Key]Module) error
return fmt.Errorf(
"infra: %s is %s-scoped but depends on %s which is %s-scoped.\n"+
"A container reads its configuration once at start, so it cannot point at something that dies first.\n"+
- "Either widen %s to %s, or narrow %s to %s.",
+ "Either widen %s to %s, or narrow %s to %s",
m.Key(), mine, dep, theirs, dep, mine, m.Key(), theirs)
}
return nil
diff --git a/tests/infra/runner.go b/tests/infra/runner.go
index 447f22b5d0..01f598aa81 100644
--- a/tests/infra/runner.go
+++ b/tests/infra/runner.go
@@ -26,6 +26,7 @@ type dockerRunner struct {
workspace string
log Logger
netName string
+ runID string
mu sync.Mutex
seen map[string]bool // names this process has already started
@@ -33,7 +34,7 @@ type dockerRunner struct {
// NewRunner returns the default Docker-backed Runner.
func NewRunner(workspace string, log Logger) Runner {
- return &dockerRunner{workspace: workspace, log: log}
+ return &dockerRunner{workspace: workspace, log: log, runID: time.Now().UTC().Format("20060102-150405")}
}
// Network creates the shared network if it is absent, and is a no-op otherwise.
@@ -83,7 +84,11 @@ func (r *dockerRunner) Run(ctx context.Context, spec ContainerSpec) (Container,
opts = append(opts, testcontainers.WithExposedPorts(ports...))
}
if spec.Ready != nil {
- opts = append(opts, testcontainers.WithWaitStrategyAndDeadline(DefaultStartupTimeout, spec.Ready))
+ deadline := spec.StartupTimeout
+ if deadline == 0 {
+ deadline = DefaultStartupTimeout
+ }
+ opts = append(opts, testcontainers.WithWaitStrategyAndDeadline(deadline, spec.Ready))
}
if len(spec.Command) > 0 {
opts = append(opts, testcontainers.WithCmd(spec.Command...))
@@ -116,11 +121,17 @@ func (r *dockerRunner) Run(ctx context.Context, spec ContainerSpec) (Container,
}
defer release()
+ // Attached before the container starts, so output survives a failed wait
+ // strategy tearing the container down before anyone can read it.
+ sink := newLogSink(r.runID, spec.Name)
+ opts = append(opts, testcontainers.WithLogConsumers(sink))
+
r.log.Infof("start %s (%s)", spec.Name, spec.Image)
dc, err := testcontainers.Run(ctx, spec.Image, opts...)
if err != nil {
- return Container{}, fmt.Errorf("infra: starting %s (%s): %w", spec.Name, spec.Image, err)
+ sink.Close()
+ return Container{}, startFailure(spec.Name, spec.Image, sink, err)
}
c := Container{
@@ -145,7 +156,10 @@ func (r *dockerRunner) Run(ctx context.Context, spec ContainerSpec) (Container,
}
return Endpoint{Host: host, Port: int(mapped.Num())}
},
- stop: func(ctx context.Context) error { return dc.Terminate(ctx) },
+ stop: func(ctx context.Context) error {
+ sink.Close()
+ return dc.Terminate(ctx)
+ },
exec: func(ctx context.Context, cmd []string) (int, string, error) {
code, reader, err := dc.Exec(ctx, cmd, tcexec.Multiplexed())
if err != nil {