Skip to content

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

test: add blackbox testing

adilsonb13c9d149800
diff --git a/CLAUDE.md b/CLAUDE.md
index 4ffb9a64ca..a6737603f3 100644
--- a/CLAUDE.md
+++ b/CLAUDE.md
@@ -151,10 +151,12 @@ stop agreeing.
A policy on the global approval system can hand its requests to an external approval system (ServiceNow)
through `backend/src/services/external-approval/`, which owns the `external_approval_policies` and
`external_approval_requests` rows. Secret access policies opt in with `externalApproval: { type, connectionId }`
-on create and update (`secret-access-approval-global-policy-bridge-service.ts`). An external policy cannot use
-break glass (soft enforcement or bypassers) or self approval, cannot be updated while it has pending
-requests, and a policy on the legacy approval system can never be external. Keep those rules in
-`assertExternalApprovalPolicyConstraints` when another policy type opts in.
+on create and update (`secret-access-approval-global-policy-bridge-service.ts`). An external policy has no
+Infisical approvers, cannot use break glass (soft enforcement or bypassers) or self approval, cannot be updated
+while it has pending requests, and a policy on the legacy approval system can never be external. Keep those
+rules in `assertExternalApprovalPolicyConstraints` when another policy type opts in. Only secret access
+policies may opt in today: `assertPolicyTypeSupportsExternalApproval` refuses the rest, and secret change
+policies return it as a 400 rather than dropping the field.
### API Layer (Frontend)
diff --git a/backend/src/ee/routes/v1/access-approval-policy-router.ts b/backend/src/ee/routes/v1/access-approval-policy-router.ts
index c26ada7564..934087dd39 100644
--- a/backend/src/ee/routes/v1/access-approval-policy-router.ts
+++ b/backend/src/ee/routes/v1/access-approval-policy-router.ts
@@ -10,7 +10,7 @@ import { getTelemetryDistinctId } from "@app/server/lib/telemetry";
import { verifyAuth } from "@app/server/plugins/auth/verify-auth";
import { sapPubSchema } from "@app/server/routes/sanitizedSchemas";
import { AuthMode } from "@app/services/auth/auth-type";
-import { ExternalApprovalPolicyType } from "@app/services/external-approval/external-approval-enums";
+import { ExternalApprovalSchema } from "@app/services/external-approval/external-approval-schemas";
import { PostHogEventTypes } from "@app/services/telemetry/telemetry-types";
const maxTimePeriodSchema = z
@@ -71,15 +71,8 @@ const requestExpirationTimeSchema = z
return val;
});
-const externalApprovalSchema = z.object({
- type: z
- .nativeEnum(ExternalApprovalPolicyType)
- .describe("The external approval system that reviews requests made against this policy."),
- connectionId: z.string().uuid().describe("The ID of the App Connection used to reach the external approval system.")
-});
-
const accessApprovalPolicyPubSchema = sapPubSchema.extend({
- externalApproval: externalApprovalSchema.nullable().optional()
+ externalApproval: ExternalApprovalSchema.nullable().optional()
});
export const registerAccessApprovalPolicyRouter = async (server: FastifyZodProvider) => {
@@ -90,6 +83,7 @@ export const registerAccessApprovalPolicyRouter = async (server: FastifyZodProvi
rateLimit: writeLimit
},
schema: {
+ operationId: "createAccessApprovalPolicy",
body: z
.object({
projectSlug: z.string().trim(),
@@ -123,7 +117,7 @@ export const registerAccessApprovalPolicyRouter = async (server: FastifyZodProvi
"Must provide either username or id"
)
.optional()
- .describe("Required unless externalApproval is set; an external approval system reviews requests then."),
+ .describe("Required unless externalApproval is set, and must be omitted when it is."),
bypassers: z
.discriminatedUnion("type", [
z.object({ type: z.literal(BypasserType.Group), id: z.string() }),
@@ -148,9 +142,9 @@ export const registerAccessApprovalPolicyRouter = async (server: FastifyZodProvi
allowedSelfApprovals: z.boolean().default(true),
maxTimePeriod: maxTimePeriodSchema,
requestExpirationTime: requestExpirationTimeSchema,
- externalApproval: externalApprovalSchema
- .optional()
- .describe("Hand requests made against this policy to an external approval system.")
+ externalApproval: ExternalApprovalSchema.optional().describe(
+ "Hand requests made against this policy to an external approval system."
+ )
})
.refine(
(val) => Boolean(val.environment) || Boolean(val.environments),
@@ -210,6 +204,7 @@ export const registerAccessApprovalPolicyRouter = async (server: FastifyZodProvi
rateLimit: readLimit
},
schema: {
+ operationId: "listAccessApprovalPolicies",
querystring: z.object({
projectSlug: z.string().trim()
}),
@@ -288,6 +283,7 @@ export const registerAccessApprovalPolicyRouter = async (server: FastifyZodProvi
rateLimit: writeLimit
},
schema: {
+ operationId: "updateAccessApprovalPolicy",
params: z.object({
policyId: z.string()
}),
@@ -321,7 +317,9 @@ export const registerAccessApprovalPolicyRouter = async (server: FastifyZodProvi
"Must provide either username or id"
)
.optional()
- .describe("Required unless the policy is handled by an external approval system."),
+ .describe(
+ "Required unless the policy is handled by an external approval system, and must be omitted when it is."
+ ),
bypassers: z
.discriminatedUnion("type", [
z.object({ type: z.literal(BypasserType.Group), id: z.string() }),
@@ -343,8 +341,7 @@ export const registerAccessApprovalPolicyRouter = async (server: FastifyZodProvi
.optional(),
maxTimePeriod: maxTimePeriodSchema,
requestExpirationTime: requestExpirationTimeSchema,
- externalApproval: externalApprovalSchema
- .nullable()
+ externalApproval: ExternalApprovalSchema.nullable()
.optional()
.describe(
"Hand requests made against this policy to an external approval system. Send null to stop using one."
@@ -432,6 +429,7 @@ export const registerAccessApprovalPolicyRouter = async (server: FastifyZodProvi
rateLimit: readLimit
},
schema: {
+ operationId: "getAccessApprovalPolicy",
params: z.object({
policyId: z.string()
}),
diff --git a/backend/src/ee/routes/v1/access-approval-request-router.ts b/backend/src/ee/routes/v1/access-approval-request-router.ts
index 2b26b6f491..c5bce91ce1 100644
--- a/backend/src/ee/routes/v1/access-approval-request-router.ts
+++ b/backend/src/ee/routes/v1/access-approval-request-router.ts
@@ -28,6 +28,7 @@ export const registerAccessApprovalRequestRouter = async (server: FastifyZodProv
rateLimit: writeLimit
},
schema: {
+ operationId: "createAccessApprovalRequest",
body: z.object({
permissions: z.tuple([z.string(), z.string()]).rest(z.unknown()).array().min(1),
isTemporary: z.boolean(),
diff --git a/backend/src/ee/routes/v2/secret-approval-policy-router.ts b/backend/src/ee/routes/v2/secret-approval-policy-router.ts
index 954f21bdd9..9b5368c29f 100644
--- a/backend/src/ee/routes/v2/secret-approval-policy-router.ts
+++ b/backend/src/ee/routes/v2/secret-approval-policy-router.ts
@@ -9,6 +9,7 @@ import { getTelemetryDistinctId } from "@app/server/lib/telemetry";
import { verifyAuth } from "@app/server/plugins/auth/verify-auth";
import { sapPubSchema } from "@app/server/routes/sanitizedSchemas";
import { AuthMode } from "@app/services/auth/auth-type";
+import { ExternalApprovalSchema } from "@app/services/external-approval/external-approval-schemas";
import { PostHogEventTypes } from "@app/services/telemetry/telemetry-types";
export const registerSecretApprovalPolicyRouter = async (server: FastifyZodProvider) => {
@@ -57,7 +58,10 @@ export const registerSecretApprovalPolicyRouter = async (server: FastifyZodProvi
approvals: z.number().min(1).default(1),
enforcementLevel: z.nativeEnum(EnforcementLevel).default(EnforcementLevel.Hard),
allowedSelfApprovals: z.boolean().default(true),
- bypassForMachineIdentities: z.boolean().default(false)
+ bypassForMachineIdentities: z.boolean().default(false),
+ externalApproval: ExternalApprovalSchema.optional().describe(
+ "Not supported on secret change policies. Only secret access policies can be handled by an external approval system, so sending this returns an error."
+ )
})
.refine((data) => data.environment || data.environments, "At least one environment should be provided"),
response: {
@@ -138,7 +142,10 @@ export const registerSecretApprovalPolicyRouter = async (server: FastifyZodProvi
enforcementLevel: z.nativeEnum(EnforcementLevel).optional(),
allowedSelfApprovals: z.boolean().default(true),
bypassForMachineIdentities: z.boolean().optional(),
- environments: z.array(z.string()).optional()
+ environments: z.array(z.string()).optional(),
+ externalApproval: ExternalApprovalSchema.optional().describe(
+ "Not supported on secret change policies. Only secret access policies can be handled by an external approval system, so sending this returns an error."
+ )
}),
response: {
200: z.object({
diff --git a/backend/src/ee/services/secret-approval-policy/secret-approval-policy-service.test.ts b/backend/src/ee/services/secret-approval-policy/secret-approval-policy-service.test.ts
index da3a8e6210..f8058be928 100644
--- a/backend/src/ee/services/secret-approval-policy/secret-approval-policy-service.test.ts
+++ b/backend/src/ee/services/secret-approval-policy/secret-approval-policy-service.test.ts
@@ -6,6 +6,7 @@ import { ProjectVersion } from "@app/db/schemas";
import { conditionsMatcher } from "@app/lib/casl";
import { EnforcementLevel } from "@app/lib/types";
import { ActorType } from "@app/services/auth/auth-type";
+import { ExternalApprovalPolicyType } from "@app/services/external-approval/external-approval-enums";
import { ApproverType } from "../access-approval-policy/access-approval-policy-types";
import { ProjectPermissionActions, ProjectPermissionSet, ProjectPermissionSub } from "../permission/project-permission";
@@ -106,6 +107,20 @@ describe("secretApprovalPolicyService createSecretApprovalPolicy", () => {
expect(deps.secretApprovalPolicyDAL.findPolicyByEnvIdAndSecretPath).not.toHaveBeenCalled();
});
+ test("rejects external approval before reaching either approval system", async () => {
+ const { service, deps } = buildService({ projectVersion: ProjectVersion.V3 });
+
+ await expect(
+ service.createSecretApprovalPolicy({
+ ...createDto,
+ externalApproval: { type: ExternalApprovalPolicyType.ServiceNow, connectionId: "connection-1" }
+ })
+ ).rejects.toThrow("Only secret access policies can be handled by an external approval system");
+
+ expect(deps.secretChangeGlobalPolicyBridgeService.createSecretChangePolicy).not.toHaveBeenCalled();
+ expect(deps.projectDAL.findById).not.toHaveBeenCalled();
+ });
+
test("rejects a path and environment already governed by a policy created through the bridge", async () => {
const { service, deps } = buildService({
bridgePolicy: { id: "bridge-policy-1", environments: [{ id: ENV_DEV.id }] }
diff --git a/backend/src/ee/services/secret-approval-policy/secret-approval-policy-service.ts b/backend/src/ee/services/secret-approval-policy/secret-approval-policy-service.ts
index 93f647d820..dad72e1411 100644
--- a/backend/src/ee/services/secret-approval-policy/secret-approval-policy-service.ts
+++ b/backend/src/ee/services/secret-approval-policy/secret-approval-policy-service.ts
@@ -6,6 +6,8 @@ import { TPermissionServiceFactory } from "@app/ee/services/permission/permissio
import { ProjectPermissionActions, ProjectPermissionSub } from "@app/ee/services/permission/project-permission";
import { BadRequestError, NotFoundError } from "@app/lib/errors";
import { removeTrailingSlash } from "@app/lib/fn";
+import { ApprovalPolicyType } from "@app/services/approval-policy/approval-policy-enums";
+import { assertPolicyTypeSupportsExternalApproval } from "@app/services/external-approval/external-approval-fns";
import { TProjectDALFactory } from "@app/services/project/project-dal";
import { TProjectEnvDALFactory } from "@app/services/project-env/project-env-dal";
import { TUserDALFactory } from "@app/services/user/user-dal";
@@ -100,6 +102,8 @@ export const secretApprovalPolicyServiceFactory = ({
Boolean(await secretChangeGlobalPolicyBridgeService.findSecretChangePolicy(policyId));
const createSecretApprovalPolicy = async (dto: TCreateSapDTO) => {
+ if (dto.externalApproval) assertPolicyTypeSupportsExternalApproval(ApprovalPolicyType.SecretChange);
+
const project = await projectDAL.findById(dto.projectId);
if (project?.version === ProjectVersion.V3) {
return secretChangeGlobalPolicyBridgeService.createSecretChangePolicy(dto);
@@ -326,6 +330,8 @@ export const secretApprovalPolicyServiceFactory = ({
};
const updateSecretApprovalPolicy = async (dto: TUpdateSapDTO) => {
+ if (dto.externalApproval) assertPolicyTypeSupportsExternalApproval(ApprovalPolicyType.SecretChange);
+
if (await $useSecretChangeGlobalPolicyBridge(dto.secretPolicyId)) {
return secretChangeGlobalPolicyBridgeService.updateSecretChangePolicy(dto);
}
diff --git a/backend/src/ee/services/secret-approval-policy/secret-approval-policy-types.ts b/backend/src/ee/services/secret-approval-policy/secret-approval-policy-types.ts
index e806c56b7e..ad7785590b 100644
--- a/backend/src/ee/services/secret-approval-policy/secret-approval-policy-types.ts
+++ b/backend/src/ee/services/secret-approval-policy/secret-approval-policy-types.ts
@@ -1,4 +1,5 @@
import { EnforcementLevel, TProjectPermission } from "@app/lib/types";
+import { TExternalApprovalPolicyInput } from "@app/services/external-approval/external-approval-types";
import { ApproverType, BypasserType } from "../access-approval-policy/access-approval-policy-types";
@@ -17,6 +18,7 @@ export type TCreateSapDTO = {
enforcementLevel: EnforcementLevel;
allowedSelfApprovals: boolean;
bypassForMachineIdentities: boolean;
+ externalApproval?: TExternalApprovalPolicyInput;
} & Omit<TProjectPermission, "projectId">;
export type TUpdateSapDTO = {
@@ -33,6 +35,7 @@ export type TUpdateSapDTO = {
allowedSelfApprovals?: boolean;
bypassForMachineIdentities?: boolean;
environments?: string[];
+ externalApproval?: TExternalApprovalPolicyInput;
} & Omit<TProjectPermission, "projectId">;
export type TDeleteSapDTO = {
diff --git a/backend/src/server/routes/index.ts b/backend/src/server/routes/index.ts
index fb0e444814..d0acfb4752 100644
--- a/backend/src/server/routes/index.ts
+++ b/backend/src/server/routes/index.ts
@@ -2664,6 +2664,7 @@ export const registerRoutes = async (
additionalPrivilegeDAL,
secretAccessApprovalGlobalPolicyBridgeDAL,
secretAccessApprovalGlobalRequestBridgeDAL,
+ externalApprovalPolicyDAL,
smtpService,
notificationService,
kmsService,
diff --git a/backend/src/services/external-approval/external-approval-fns.test.ts b/backend/src/services/external-approval/external-approval-fns.test.ts
index a245191fa1..6f05949d3e 100644
--- a/backend/src/services/external-approval/external-approval-fns.test.ts
+++ b/backend/src/services/external-approval/external-approval-fns.test.ts
@@ -1,9 +1,12 @@
import { describe, expect, test } from "vitest";
import { BadRequestError } from "@app/lib/errors";
-import { EnforcementLevel } from "@app/services/approval-policy/approval-policy-enums";
+import { ApprovalPolicyType, EnforcementLevel } from "@app/services/approval-policy/approval-policy-enums";
-import { assertExternalApprovalPolicyConstraints } from "./external-approval-fns";
+import {
+ assertExternalApprovalPolicyConstraints,
+ assertPolicyTypeSupportsExternalApproval
+} from "./external-approval-fns";
describe("assertExternalApprovalPolicyConstraints", () => {
const valid = { enforcementLevel: EnforcementLevel.Hard, bypassers: [], allowedSelfApprovals: false };
@@ -13,6 +16,13 @@ describe("assertExternalApprovalPolicyConstraints", () => {
expect(() => assertExternalApprovalPolicyConstraints({ ...valid, bypassers: undefined })).not.toThrow();
});
+ test("rejects approvers", () => {
+ expect(() =>
+ assertExternalApprovalPolicyConstraints({ ...valid, approvers: [{ type: "user", id: "u1" }] })
+ ).toThrow(BadRequestError);
+ expect(() => assertExternalApprovalPolicyConstraints({ ...valid, approvers: [] })).not.toThrow();
+ });
+
test("rejects soft enforcement", () => {
expect(() =>
assertExternalApprovalPolicyConstraints({ ...valid, enforcementLevel: EnforcementLevel.Soft })
@@ -31,3 +41,18 @@ describe("assertExternalApprovalPolicyConstraints", () => {
);
});
});
+
+describe("assertPolicyTypeSupportsExternalApproval", () => {
+ test("accepts secret access policies", () => {
+ expect(() => assertPolicyTypeSupportsExternalApproval(ApprovalPolicyType.SecretAccess)).not.toThrow();
+ });
+
+ test.each([
+ ApprovalPolicyType.SecretChange,
+ ApprovalPolicyType.PamAccess,
+ ApprovalPolicyType.CertRequest,
+ ApprovalPolicyType.CertCodeSigning
+ ])("rejects %s policies", (policyType) => {
+ expect(() => assertPolicyTypeSupportsExternalApproval(policyType)).toThrow(BadRequestError);
+ });
+});
diff --git a/backend/src/services/external-approval/external-approval-fns.ts b/backend/src/services/external-approval/external-approval-fns.ts
index 641e686e8f..9eb15c668b 100644
--- a/backend/src/services/external-approval/external-approval-fns.ts
+++ b/backend/src/services/external-approval/external-approval-fns.ts
@@ -2,7 +2,11 @@ import { BadRequestError } from "@app/lib/errors";
import { EnforcementLevel } from "@app/services/approval-policy/approval-policy-enums";
import { ExternalApprovalPolicyType } from "./external-approval-enums";
-import { EXTERNAL_APPROVAL_CONNECTION_MAP, EXTERNAL_APPROVAL_NAME_MAP } from "./external-approval-maps";
+import {
+ EXTERNAL_APPROVAL_CONNECTION_MAP,
+ EXTERNAL_APPROVAL_NAME_MAP,
+ EXTERNAL_APPROVAL_SUPPORTED_POLICY_TYPES
+} from "./external-approval-maps";
import { TExternalApprovalListItem } from "./external-approval-types";
export const listExternalApprovalOptions = (): TExternalApprovalListItem[] =>
@@ -16,13 +20,21 @@ export const listExternalApprovalOptions = (): TExternalApprovalListItem[] =>
export const assertExternalApprovalPolicyConstraints = ({
enforcementLevel,
+ approvers,
bypassers,
allowedSelfApprovals
}: {
enforcementLevel: string;
+ approvers?: unknown[];
bypassers?: unknown[];
allowedSelfApprovals: boolean;
}) => {
+ if (approvers?.length) {
+ throw new BadRequestError({
+ message:
+ "Policies handled by an external approval system cannot have approvers, since the external approval system reviews their requests. Remove the approvers."
+ });
+ }
if (enforcementLevel === EnforcementLevel.Soft) {
throw new BadRequestError({
message:
@@ -42,3 +54,12 @@ export const assertExternalApprovalPolicyConstraints = ({
});
}
};
+
+export const assertPolicyTypeSupportsExternalApproval = (policyType: string) => {
+ if (!EXTERNAL_APPROVAL_SUPPORTED_POLICY_TYPES.includes(policyType)) {
+ throw new BadRequestError({
+ message:
+ "Only secret access policies can be handled by an external approval system. Remove externalApproval from the request."
+ });
+ }
+};
diff --git a/backend/src/services/external-approval/external-approval-maps.ts b/backend/src/services/external-approval/external-approval-maps.ts
index 0666391eb8..449ddd247d 100644
--- a/backend/src/services/external-approval/external-approval-maps.ts
+++ b/backend/src/services/external-approval/external-approval-maps.ts
@@ -1,4 +1,5 @@
import { AppConnection } from "@app/services/app-connection/app-connection-enums";
+import { ApprovalPolicyType } from "@app/services/approval-policy/approval-policy-enums";
import { ExternalApprovalPolicyType } from "./external-approval-enums";
@@ -9,3 +10,5 @@ export const EXTERNAL_APPROVAL_NAME_MAP: Record<ExternalApprovalPolicyType, stri
export const EXTERNAL_APPROVAL_CONNECTION_MAP: Record<ExternalApprovalPolicyType, AppConnection> = {
[ExternalApprovalPolicyType.ServiceNow]: AppConnection.ServiceNow
};
+
+export const EXTERNAL_APPROVAL_SUPPORTED_POLICY_TYPES: readonly string[] = [ApprovalPolicyType.SecretAccess];
diff --git a/backend/src/services/external-approval/external-approval-schemas.ts b/backend/src/services/external-approval/external-approval-schemas.ts
new file mode 100644
index 0000000000..68976235ee
--- /dev/null
+++ b/backend/src/services/external-approval/external-approval-schemas.ts
@@ -0,0 +1,10 @@
+import { z } from "zod";
+
+import { ExternalApprovalPolicyType } from "./external-approval-enums";
+
+export const ExternalApprovalSchema = z.object({
+ type: z
+ .nativeEnum(ExternalApprovalPolicyType)
+ .describe("The external approval system that reviews requests made against this policy."),
+ connectionId: z.string().uuid().describe("The ID of the App Connection used to reach the external approval system.")
+});
diff --git a/backend/src/services/external-approval/external-approval-service.ts b/backend/src/services/external-approval/external-approval-service.ts
index 90299a3d11..3ad5589f6f 100644
--- a/backend/src/services/external-approval/external-approval-service.ts
+++ b/backend/src/services/external-approval/external-approval-service.ts
@@ -11,7 +11,7 @@ import { TApprovalPolicyDALFactory } from "@app/services/approval-policy/approva
import { TApprovalRequestDALFactory } from "@app/services/approval-policy/approval-request-dal";
import { ExternalApprovalPolicyType, ExternalApprovalRequestStatus } from "./external-approval-enums";
-import { listExternalApprovalOptions } from "./external-approval-fns";
+import { assertPolicyTypeSupportsExternalApproval, listExternalApprovalOptions } from "./external-approval-fns";
import { EXTERNAL_APPROVAL_CONNECTION_MAP, EXTERNAL_APPROVAL_NAME_MAP } from "./external-approval-maps";
import { TExternalApprovalPolicyDALFactory } from "./external-approval-policy-dal";
import { TExternalApprovalRequestDALFactory } from "./external-approval-request-dal";
@@ -87,6 +87,7 @@ export const externalApprovalServiceFactory = ({
if (!approvalPolicy) {
throw new NotFoundError({ message: `Approval policy with ID '${policyId}' not found` });
}
+ assertPolicyTypeSupportsExternalApproval(approvalPolicy.type);
await $assertConnectionMatches({ type, connectionId, organizationId: approvalPolicy.organizationId }, tx);
@@ -125,6 +126,7 @@ export const externalApprovalServiceFactory = ({
if (!approvalPolicy) {
throw new NotFoundError({ message: `Approval policy with ID '${policyId}' not found` });
}
+ assertPolicyTypeSupportsExternalApproval(approvalPolicy.type);
await $assertConnectionMatches(
{ type: newType, connectionId: newConnectionId, organizationId: approvalPolicy.organizationId },
diff --git a/backend/src/services/secret-access-approval-global-policy-bridge/secret-access-approval-global-policy-bridge-service.ts b/backend/src/services/secret-access-approval-global-policy-bridge/secret-access-approval-global-policy-bridge-service.ts
index 9040678fa5..9a32e4efb0 100644
--- a/backend/src/services/secret-access-approval-global-policy-bridge/secret-access-approval-global-policy-bridge-service.ts
+++ b/backend/src/services/secret-access-approval-global-policy-bridge/secret-access-approval-global-policy-bridge-service.ts
@@ -284,7 +284,7 @@ export const secretAccessApprovalGlobalPolicyBridgeServiceFactory = ({
scope: { projectId: string; orgId: string }
): Promise<TPolicyReviewers> => {
if (externalApproval) {
- assertExternalApprovalPolicyConstraints({ enforcementLevel, bypassers, allowedSelfApprovals });
+ assertExternalApprovalPolicyConstraints({ enforcementLevel, approvers, bypassers, allowedSelfApprovals });
return NO_REVIEWERS;
}
diff --git a/backend/src/services/secret-access-approval-global-request-bridge/secret-access-approval-global-request-bridge-service.ts b/backend/src/services/secret-access-approval-global-request-bridge/secret-access-approval-global-request-bridge-service.ts
index 2c1469b0eb..a9e5530cdf 100644
--- a/backend/src/services/secret-access-approval-global-request-bridge/secret-access-approval-global-request-bridge-service.ts
+++ b/backend/src/services/secret-access-approval-global-request-bridge/secret-access-approval-global-request-bridge-service.ts
@@ -70,6 +70,7 @@ export const secretAccessApprovalGlobalRequestBridgeServiceFactory = ({
additionalPrivilegeDAL,
secretAccessApprovalGlobalPolicyBridgeDAL,
secretAccessApprovalGlobalRequestBridgeDAL,
+ externalApprovalPolicyDAL,
smtpService,
notificationService,
kmsService,
@@ -292,7 +293,10 @@ export const secretAccessApprovalGlobalRequestBridgeServiceFactory = ({
if (!requestedByUser) throw new ForbiddenRequestError({ message: "User not found" });
if (!project) throw new NotFoundError({ message: `Project with ID '${projectId}' not found` });
if (!policy.steps.length) {
- throw new BadRequestError({ message: `Policy '${policy.name}' has no approvers configured` });
+ const externalPolicy = await externalApprovalPolicyDAL.findOne({ policyId: policy.id });
+ if (!externalPolicy) {
+ throw new BadRequestError({ message: `Policy '${policy.name}' has no approvers configured` });
+ }
}
const activeGrant = await secretAccessApprovalGlobalResource.canAccess(projectId, requestedByUserId, {
@@ -342,28 +346,31 @@ export const secretAccessApprovalGlobalRequestBridgeServiceFactory = ({
);
const request = await $findRequestById(created.id);
- await notifySecretAccessStepApprovers(
- {
- step: policy.steps[0],
- request,
- project,
- requestedByUser,
- data: requestData,
- environment: { slug: envSlug },
- secretPath
- },
- {
- userDAL,
- userGroupMembershipDAL,
- projectDAL,
- projectSlackConfigDAL,
- kmsService,
- microsoftTeamsService,
- projectMicrosoftTeamsConfigDAL,
- notificationService,
- smtpService
- }
- );
+ const [firstStep] = policy.steps;
+ if (firstStep) {
+ await notifySecretAccessStepApprovers(
+ {
+ step: firstStep,
+ request,
+ project,
+ requestedByUser,
+ data: requestData,
+ environment: { slug: envSlug },
+ secretPath
+ },
+ {
+ userDAL,
+ userGroupMembershipDAL,
+ projectDAL,
+ projectSlackConfigDAL,
+ kmsService,
+ microsoftTeamsService,
+ projectMicrosoftTeamsConfigDAL,
+ notificationService,
+ smtpService
+ }
+ );
+ }
const legacyRequest = toLegacyAccessApprovalRequest(request);
diff --git a/backend/src/services/secret-access-approval-global-request-bridge/secret-access-approval-global-request-bridge-types.ts b/backend/src/services/secret-access-approval-global-request-bridge/secret-access-approval-global-request-bridge-types.ts
index 4e92f58f16..94f5d15deb 100644
--- a/backend/src/services/secret-access-approval-global-request-bridge/secret-access-approval-global-request-bridge-types.ts
+++ b/backend/src/services/secret-access-approval-global-request-bridge/secret-access-approval-global-request-bridge-types.ts
@@ -15,6 +15,7 @@ import {
} from "@app/services/approval-policy/approval-request-dal";
import { TSecretAccessApprovalGlobalResource } from "@app/services/approval-policy/secret-access/secret-access-policy-factory";
import { TSecretAccessPolicy } from "@app/services/approval-policy/secret-access/secret-access-policy-types";
+import { TExternalApprovalPolicyDALFactory } from "@app/services/external-approval/external-approval-policy-dal";
import { TKmsServiceFactory } from "@app/services/kms/kms-service";
import { TMicrosoftTeamsServiceFactory } from "@app/services/microsoft-teams/microsoft-teams-service";
import { TProjectMicrosoftTeamsConfigDALFactory } from "@app/services/microsoft-teams/project-microsoft-teams-config-dal";
@@ -59,6 +60,7 @@ export type TSecretAccessApprovalGlobalRequestBridgeServiceFactoryDep = {
| "findUsersByIds"
| "findOrgMembershipActivity"
>;
+ externalApprovalPolicyDAL: Pick<TExternalApprovalPolicyDALFactory, "findOne">;
smtpService: Pick<TSmtpService, "sendMail">;
notificationService: Pick<TNotificationServiceFactory, "createUserNotifications">;
kmsService: Pick<TKmsServiceFactory, "createCipherPairWithDataKey">;
diff --git a/tests/clients/api/api.gen.go b/tests/clients/api/api.gen.go
index 3241f0004c..66ea000aad 100644
--- a/tests/clients/api/api.gen.go
+++ b/tests/clients/api/api.gen.go
@@ -108,6 +108,774 @@ func (e GetInstanceStatus500JSONResponseBodyStatusCode) Valid() bool {
}
}
+// Defines values for ListAccessApprovalPolicies200JSONResponseBodyApprovalsApproversType.
+const (
+ ListAccessApprovalPolicies200JSONResponseBodyApprovalsApproversTypeGroup ListAccessApprovalPolicies200JSONResponseBodyApprovalsApproversType = "group"
+ ListAccessApprovalPolicies200JSONResponseBodyApprovalsApproversTypeUser ListAccessApprovalPolicies200JSONResponseBodyApprovalsApproversType = "user"
+)
+
+// Valid indicates whether the value is a known member of the ListAccessApprovalPolicies200JSONResponseBodyApprovalsApproversType enum.
+func (e ListAccessApprovalPolicies200JSONResponseBodyApprovalsApproversType) Valid() bool {
+ switch e {
+ case ListAccessApprovalPolicies200JSONResponseBodyApprovalsApproversTypeGroup:
+ return true
+ case ListAccessApprovalPolicies200JSONResponseBodyApprovalsApproversTypeUser:
+ return true
+ default:
+ return false
+ }
+}
+
+// Defines values for ListAccessApprovalPolicies200JSONResponseBodyApprovalsBypassersType.
+const (
+ ListAccessApprovalPolicies200JSONResponseBodyApprovalsBypassersTypeGroup ListAccessApprovalPolicies200JSONResponseBodyApprovalsBypassersType = "group"
+ ListAccessApprovalPolicies200JSONResponseBodyApprovalsBypassersTypeUser ListAccessApprovalPolicies200JSONResponseBodyApprovalsBypassersType = "user"
+)
+
+// Valid indicates whether the value is a known member of the ListAccessApprovalPolicies200JSONResponseBodyApprovalsBypassersType enum.
+func (e ListAccessApprovalPolicies200JSONResponseBodyApprovalsBypassersType) Valid() bool {
+ switch e {
+ case ListAccessApprovalPolicies200JSONResponseBodyApprovalsBypassersTypeGroup:
+ return true
+ case ListAccessApprovalPolicies200JSONResponseBodyApprovalsBypassersTypeUser:
+ return true
+ default:
+ return false
+ }
+}
+
+// Defines values for ListAccessApprovalPolicies200JSONResponseBodyApprovalsExternalApprovalType.
+const (
+ ListAccessApprovalPolicies200JSONResponseBodyApprovalsExternalApprovalTypeServicenow ListAccessApprovalPolicies200JSONResponseBodyApprovalsExternalApprovalType = "servicenow"
+)
+
+// Valid indicates whether the value is a known member of the ListAccessApprovalPolicies200JSONResponseBodyApprovalsExternalApprovalType enum.
+func (e ListAccessApprovalPolicies200JSONResponseBodyApprovalsExternalApprovalType) Valid() bool {
+ switch e {
+ case ListAccessApprovalPolicies200JSONResponseBodyApprovalsExternalApprovalTypeServicenow:
+ return true
+ default:
+ return false
+ }
+}
+
+// Defines values for ListAccessApprovalPolicies400JSONResponseBodyStatusCode.
+const (
+ ListAccessApprovalPolicies400JSONResponseBodyStatusCodeN400 ListAccessApprovalPolicies400JSONResponseBodyStatusCode = 400
+)
+
+// Valid indicates whether the value is a known member of the ListAccessApprovalPolicies400JSONResponseBodyStatusCode enum.
+func (e ListAccessApprovalPolicies400JSONResponseBodyStatusCode) Valid() bool {
+ switch e {
+ case ListAccessApprovalPolicies400JSONResponseBodyStatusCodeN400:
+ return true
+ default:
+ return false
+ }
+}
+
+// Defines values for ListAccessApprovalPolicies401JSONResponseBodyStatusCode.
+const (
+ ListAccessApprovalPolicies401JSONResponseBodyStatusCodeN401 ListAccessApprovalPolicies401JSONResponseBodyStatusCode = 401
+)
+
+// Valid indicates whether the value is a known member of the ListAccessApprovalPolicies401JSONResponseBodyStatusCode enum.
+func (e ListAccessApprovalPolicies401JSONResponseBodyStatusCode) Valid() bool {
+ switch e {
+ case ListAccessApprovalPolicies401JSONResponseBodyStatusCodeN401:
+ return true
+ default:
+ return false
+ }
+}
+
+// Defines values for ListAccessApprovalPolicies403JSONResponseBodyStatusCode.
+const (
+ ListAccessApprovalPolicies403JSONResponseBodyStatusCodeN403 ListAccessApprovalPolicies403JSONResponseBodyStatusCode = 403
+)
+
+// Valid indicates whether the value is a known member of the ListAccessApprovalPolicies403JSONResponseBodyStatusCode enum.
+func (e ListAccessApprovalPolicies403JSONResponseBodyStatusCode) Valid() bool {
+ switch e {
+ case ListAccessApprovalPolicies403JSONResponseBodyStatusCodeN403:
+ return true
+ default:
+ return false
+ }
+}
+
+// Defines values for ListAccessApprovalPolicies404JSONResponseBodyStatusCode.
+const (
+ ListAccessApprovalPolicies404JSONResponseBodyStatusCodeN404 ListAccessApprovalPolicies404JSONResponseBodyStatusCode = 404
+)
+
+// Valid indicates whether the value is a known member of the ListAccessApprovalPolicies404JSONResponseBodyStatusCode enum.
+func (e ListAccessApprovalPolicies404JSONResponseBodyStatusCode) Valid() bool {
+ switch e {
+ case ListAccessApprovalPolicies404JSONResponseBodyStatusCodeN404:
+ return true
+ default:
+ return false
+ }
+}
+
+// Defines values for ListAccessApprovalPolicies422JSONResponseBodyStatusCode.
+const (
+ ListAccessApprovalPolicies422JSONResponseBodyStatusCodeN422 ListAccessApprovalPolicies422JSONResponseBodyStatusCode = 422
+)
+
+// Valid indicates whether the value is a known member of the ListAccessApprovalPolicies422JSONResponseBodyStatusCode enum.
+func (e ListAccessApprovalPolicies422JSONResponseBodyStatusCode) Valid() bool {
+ switch e {
+ case ListAccessApprovalPolicies422JSONResponseBodyStatusCodeN422:
+ return true
+ default:
+ return false
+ }
+}
+
+// Defines values for ListAccessApprovalPolicies500JSONResponseBodyStatusCode.
+const (
+ ListAccessApprovalPolicies500JSONResponseBodyStatusCodeN500 ListAccessApprovalPolicies500JSONResponseBodyStatusCode = 500
+)
+
+// Valid indicates whether the value is a known member of the ListAccessApprovalPolicies500JSONResponseBodyStatusCode enum.
+func (e ListAccessApprovalPolicies500JSONResponseBodyStatusCode) Valid() bool {
+ switch e {
+ case ListAccessApprovalPolicies500JSONResponseBodyStatusCodeN500:
+ return true
+ default:
+ return false
+ }
+}
+
+// Defines values for CreateAccessApprovalPolicyJSONBodyApprovers0Type.
+const (
+ CreateAccessApprovalPolicyJSONBodyApprovers0TypeGroup CreateAccessApprovalPolicyJSONBodyApprovers0Type = "group"
+)
+
+// Valid indicates whether the value is a known member of the CreateAccessApprovalPolicyJSONBodyApprovers0Type enum.
+func (e CreateAccessApprovalPolicyJSONBodyApprovers0Type) Valid() bool {
+ switch e {
+ case CreateAccessApprovalPolicyJSONBodyApprovers0TypeGroup:
+ return true
+ default:
+ return false
+ }
+}
+
+// Defines values for CreateAccessApprovalPolicyJSONBodyApprovers1Type.
+const (
+ CreateAccessApprovalPolicyJSONBodyApprovers1TypeUser CreateAccessApprovalPolicyJSONBodyApprovers1Type = "user"
+)
+
+// Valid indicates whether the value is a known member of the CreateAccessApprovalPolicyJSONBodyApprovers1Type enum.
+func (e CreateAccessApprovalPolicyJSONBodyApprovers1Type) Valid() bool {
+ switch e {
+ case CreateAccessApprovalPolicyJSONBodyApprovers1TypeUser:
+ return true
+ default:
+ return false
+ }
+}
+
+// Defines values for CreateAccessApprovalPolicyJSONBodyBypassers0Type.
+const (
+ CreateAccessApprovalPolicyJSONBodyBypassers0TypeGroup CreateAccessApprovalPolicyJSONBodyBypassers0Type = "group"
+)
+
+// Valid indicates whether the value is a known member of the CreateAccessApprovalPolicyJSONBodyBypassers0Type enum.
+func (e CreateAccessApprovalPolicyJSONBodyBypassers0Type) Valid() bool {
+ switch e {
+ case CreateAccessApprovalPolicyJSONBodyBypassers0TypeGroup:
+ return true
+ default:
+ return false
+ }
+}
+
+// Defines values for CreateAccessApprovalPolicyJSONBodyBypassers1Type.
+const (
+ CreateAccessApprovalPolicyJSONBodyBypassers1TypeUser CreateAccessApprovalPolicyJSONBodyBypassers1Type = "user"
+)
+
+// Valid indicates whether the value is a known member of the CreateAccessApprovalPolicyJSONBodyBypassers1Type enum.
+func (e CreateAccessApprovalPolicyJSONBodyBypassers1Type) Valid() bool {
+ switch e {
+ case CreateAccessApprovalPolicyJSONBodyBypassers1TypeUser:
+ return true
+ default:
+ return false
+ }
+}
+
+// Defines values for CreateAccessApprovalPolicyJSONBodyEnforcementLevel.
+const (
+ CreateAccessApprovalPolicyJSONBodyEnforcementLevelHard CreateAccessApprovalPolicyJSONBodyEnforcementLevel = "hard"
+ CreateAccessApprovalPolicyJSONBodyEnforcementLevelSoft CreateAccessApprovalPolicyJSONBodyEnforcementLevel = "soft"
+)
+
+// Valid indicates whether the value is a known member of the CreateAccessApprovalPolicyJSONBodyEnforcementLevel enum.
+func (e CreateAccessApprovalPolicyJSONBodyEnforcementLevel) Valid() bool {
+ switch e {
+ case CreateAccessApprovalPolicyJSONBodyEnforcementLevelHard:
+ return true
+ case CreateAccessApprovalPolicyJSONBodyEnforcementLevelSoft:
+ return true
+ default:
+ return false
+ }
+}
+
+// Defines values for CreateAccessApprovalPolicyJSONBodyExternalApprovalType.
+const (
+ CreateAccessApprovalPolicyJSONBodyExternalApprovalTypeServicenow CreateAccessApprovalPolicyJSONBodyExternalApprovalType = "servicenow"
+)
+
+// Valid indicates whether the value is a known member of the CreateAccessApprovalPolicyJSONBodyExternalApprovalType enum.
+func (e CreateAccessApprovalPolicyJSONBodyExternalApprovalType) Valid() bool {
+ switch e {
+ case CreateAccessApprovalPolicyJSONBodyExternalApprovalTypeServicenow:
+ return true
+ default:
+ return false
+ }
+}
+
+// Defines values for CreateAccessApprovalPolicy200JSONResponseBodyApprovalExternalApprovalType.
+const (
+ CreateAccessApprovalPolicy200JSONResponseBodyApprovalExternalApprovalTypeServicenow CreateAccessApprovalPolicy200JSONResponseBodyApprovalExternalApprovalType = "servicenow"
+)
+
+// Valid indicates whether the value is a known member of the CreateAccessApprovalPolicy200JSONResponseBodyApprovalExternalApprovalType enum.
+func (e CreateAccessApprovalPolicy200JSONResponseBodyApprovalExternalApprovalType) Valid() bool {
+ switch e {
+ case CreateAccessApprovalPolicy200JSONResponseBodyApprovalExternalApprovalTypeServicenow:
+ return true
+ default:
+ return false
+ }
+}
+
+// Defines values for CreateAccessApprovalPolicy400JSONResponseBodyStatusCode.
+const (
+ CreateAccessApprovalPolicy400JSONResponseBodyStatusCodeN400 CreateAccessApprovalPolicy400JSONResponseBodyStatusCode = 400
+)
+
+// Valid indicates whether the value is a known member of the CreateAccessApprovalPolicy400JSONResponseBodyStatusCode enum.
+func (e CreateAccessApprovalPolicy400JSONResponseBodyStatusCode) Valid() bool {
+ switch e {
+ case CreateAccessApprovalPolicy400JSONResponseBodyStatusCodeN400:
+ return true
+ default:
+ return false
+ }
+}
+
+// Defines values for CreateAccessApprovalPolicy401JSONResponseBodyStatusCode.
+const (
+ CreateAccessApprovalPolicy401JSONResponseBodyStatusCodeN401 CreateAccessApprovalPolicy401JSONResponseBodyStatusCode = 401
+)
+
+// Valid indicates whether the value is a known member of the CreateAccessApprovalPolicy401JSONResponseBodyStatusCode enum.
+func (e CreateAccessApprovalPolicy401JSONResponseBodyStatusCode) Valid() bool {
+ switch e {
+ case CreateAccessApprovalPolicy401JSONResponseBodyStatusCodeN401:
+ return true
+ default:
+ return false
+ }
+}
+
+// Defines values for CreateAccessApprovalPolicy403JSONResponseBodyStatusCode.
+const (
+ CreateAccessApprovalPolicy403JSONResponseBodyStatusCodeN403 CreateAccessApprovalPolicy403JSONResponseBodyStatusCode = 403
+)
+
+// Valid indicates whether the value is a known member of the CreateAccessApprovalPolicy403JSONResponseBodyStatusCode enum.
+func (e CreateAccessApprovalPolicy403JSONResponseBodyStatusCode) Valid() bool {
+ switch e {
+ case CreateAccessApprovalPolicy403JSONResponseBodyStatusCodeN403:
+ return true
+ default:
+ return false
+ }
+}
+
+// Defines values for CreateAccessApprovalPolicy404JSONResponseBodyStatusCode.
+const (
+ CreateAccessApprovalPolicy404JSONResponseBodyStatusCodeN404 CreateAccessApprovalPolicy404JSONResponseBodyStatusCode = 404
+)
+
+// Valid indicates whether the value is a known member of the CreateAccessApprovalPolicy404JSONResponseBodyStatusCode enum.
+func (e CreateAccessApprovalPolicy404JSONResponseBodyStatusCode) Valid() bool {
+ switch e {
+ case CreateAccessApprovalPolicy404JSONResponseBodyStatusCodeN404:
+ return true
+ default:
+ return false
+ }
+}
+
+// Defines values for CreateAccessApprovalPolicy422JSONResponseBodyStatusCode.
+const (
+ CreateAccessApprovalPolicy422JSONResponseBodyStatusCodeN422 CreateAccessApprovalPolicy422JSONResponseBodyStatusCode = 422
+)
+
+// Valid indicates whether the value is a known member of the CreateAccessApprovalPolicy422JSONResponseBodyStatusCode enum.
+func (e CreateAccessApprovalPolicy422JSONResponseBodyStatusCode) Valid() bool {
+ switch e {
+ case CreateAccessApprovalPolicy422JSONResponseBodyStatusCodeN422:
+ return true
+ default:
+ return false
+ }
+}
+
+// Defines values for CreateAccessApprovalPolicy500JSONResponseBodyStatusCode.
+const (
+ CreateAccessApprovalPolicy500JSONResponseBodyStatusCodeN500 CreateAccessApprovalPolicy500JSONResponseBodyStatusCode = 500
+)
+
+// Valid indicates whether the value is a known member of the CreateAccessApprovalPolicy500JSONResponseBodyStatusCode enum.
+func (e CreateAccessApprovalPolicy500JSONResponseBodyStatusCode) Valid() bool {
+ switch e {
+ case CreateAccessApprovalPolicy500JSONResponseBodyStatusCodeN500:
+ return true
+ default:
+ return false
+ }
+}
+
+// Defines values for GetAccessApprovalPolicy200JSONResponseBodyApprovalApproversType.
+const (
+ GetAccessApprovalPolicy200JSONResponseBodyApprovalApproversTypeGroup GetAccessApprovalPolicy200JSONResponseBodyApprovalApproversType = "group"
+ GetAccessApprovalPolicy200JSONResponseBodyApprovalApproversTypeUser GetAccessApprovalPolicy200JSONResponseBodyApprovalApproversType = "user"
+)
+
+// Valid indicates whether the value is a known member of the GetAccessApprovalPolicy200JSONResponseBodyApprovalApproversType enum.
+func (e GetAccessApprovalPolicy200JSONResponseBodyApprovalApproversType) Valid() bool {
+ switch e {
+ case GetAccessApprovalPolicy200JSONResponseBodyApprovalApproversTypeGroup:
+ return true
+ case GetAccessApprovalPolicy200JSONResponseBodyApprovalApproversTypeUser:
+ return true
+ default:
+ return false
+ }
+}
+
+// Defines values for GetAccessApprovalPolicy200JSONResponseBodyApprovalBypassersType.
+const (
+ GetAccessApprovalPolicy200JSONResponseBodyApprovalBypassersTypeGroup GetAccessApprovalPolicy200JSONResponseBodyApprovalBypassersType = "group"
+ GetAccessApprovalPolicy200JSONResponseBodyApprovalBypassersTypeUser GetAccessApprovalPolicy200JSONResponseBodyApprovalBypassersType = "user"
+)
+
+// Valid indicates whether the value is a known member of the GetAccessApprovalPolicy200JSONResponseBodyApprovalBypassersType enum.
+func (e GetAccessApprovalPolicy200JSONResponseBodyApprovalBypassersType) Valid() bool {
+ switch e {
+ case GetAccessApprovalPolicy200JSONResponseBodyApprovalBypassersTypeGroup:
+ return true
+ case GetAccessApprovalPolicy200JSONResponseBodyApprovalBypassersTypeUser:
+ return true
+ default:
+ return false
+ }
+}
+
+// Defines values for GetAccessApprovalPolicy200JSONResponseBodyApprovalExternalApprovalType.
+const (
+ GetAccessApprovalPolicy200JSONResponseBodyApprovalExternalApprovalTypeServicenow GetAccessApprovalPolicy200JSONResponseBodyApprovalExternalApprovalType = "servicenow"
+)
+
+// Valid indicates whether the value is a known member of the GetAccessApprovalPolicy200JSONResponseBodyApprovalExternalApprovalType enum.
+func (e GetAccessApprovalPolicy200JSONResponseBodyApprovalExternalApprovalType) Valid() bool {
+ switch e {
+ case GetAccessApprovalPolicy200JSONResponseBodyApprovalExternalApprovalTypeServicenow:
+ return true
+ default:
+ return false
+ }
+}
+
+// Defines values for GetAccessApprovalPolicy400JSONResponseBodyStatusCode.
+const (
+ GetAccessApprovalPolicy400JSONResponseBodyStatusCodeN400 GetAccessApprovalPolicy400JSONResponseBodyStatusCode = 400
+)
+
+// Valid indicates whether the value is a known member of the GetAccessApprovalPolicy400JSONResponseBodyStatusCode enum.
+func (e GetAccessApprovalPolicy400JSONResponseBodyStatusCode) Valid() bool {
+ switch e {
+ case GetAccessApprovalPolicy400JSONResponseBodyStatusCodeN400:
+ return true
+ default:
+ return false
+ }
+}
+
+// Defines values for GetAccessApprovalPolicy401JSONResponseBodyStatusCode.
+const (
+ GetAccessApprovalPolicy401JSONResponseBodyStatusCodeN401 GetAccessApprovalPolicy401JSONResponseBodyStatusCode = 401
+)
+
+// Valid indicates whether the value is a known member of the GetAccessApprovalPolicy401JSONResponseBodyStatusCode enum.
+func (e GetAccessApprovalPolicy401JSONResponseBodyStatusCode) Valid() bool {
+ switch e {
+ case GetAccessApprovalPolicy401JSONResponseBodyStatusCodeN401:
+ return true
+ default:
+ return false
+ }
+}
+
+// Defines values for GetAccessApprovalPolicy403JSONResponseBodyStatusCode.
+const (
+ GetAccessApprovalPolicy403JSONResponseBodyStatusCodeN403 GetAccessApprovalPolicy403JSONResponseBodyStatusCode = 403
+)
+
+// Valid indicates whether the value is a known member of the GetAccessApprovalPolicy403JSONResponseBodyStatusCode enum.
+func (e GetAccessApprovalPolicy403JSONResponseBodyStatusCode) Valid() bool {
+ switch e {
+ case GetAccessApprovalPolicy403JSONResponseBodyStatusCodeN403:
+ return true
+ default:
+ return false
+ }
+}
+
+// Defines values for GetAccessApprovalPolicy404JSONResponseBodyStatusCode.
+const (
+ GetAccessApprovalPolicy404JSONResponseBodyStatusCodeN404 GetAccessApprovalPolicy404JSONResponseBodyStatusCode = 404
+)
+
+// Valid indicates whether the value is a known member of the GetAccessApprovalPolicy404JSONResponseBodyStatusCode enum.
+func (e GetAccessApprovalPolicy404JSONResponseBodyStatusCode) Valid() bool {
+ switch e {
+ case GetAccessApprovalPolicy404JSONResponseBodyStatusCodeN404:
+ return true
+ default:
+ return false
+ }
+}
+
+// Defines values for GetAccessApprovalPolicy422JSONResponseBodyStatusCode.
+const (
+ GetAccessApprovalPolicy422JSONResponseBodyStatusCodeN422 GetAccessApprovalPolicy422JSONResponseBodyStatusCode = 422
+)
+
+// Valid indicates whether the value is a known member of the GetAccessApprovalPolicy422JSONResponseBodyStatusCode enum.
+func (e GetAccessApprovalPolicy422JSONResponseBodyStatusCode) Valid() bool {
+ switch e {
+ case GetAccessApprovalPolicy422JSONResponseBodyStatusCodeN422:
+ return true
+ default:
+ return false
+ }
+}
+
+// Defines values for GetAccessApprovalPolicy500JSONResponseBodyStatusCode.
+const (
+ GetAccessApprovalPolicy500JSONResponseBodyStatusCodeN500 GetAccessApprovalPolicy500JSONResponseBodyStatusCode = 500
+)
+
+// Valid indicates whether the value is a known member of the GetAccessApprovalPolicy500JSONResponseBodyStatusCode enum.
+func (e GetAccessApprovalPolicy500JSONResponseBodyStatusCode) Valid() bool {
+ switch e {
+ case GetAccessApprovalPolicy500JSONResponseBodyStatusCodeN500:
+ return true
+ default:
+ return false
+ }
+}
+
+// Defines values for UpdateAccessApprovalPolicyJSONBodyApprovers0Type.
+const (
+ UpdateAccessApprovalPolicyJSONBodyApprovers0TypeGroup UpdateAccessApprovalPolicyJSONBodyApprovers0Type = "group"
+)
+
+// Valid indicates whether the value is a known member of the UpdateAccessApprovalPolicyJSONBodyApprovers0Type enum.
+func (e UpdateAccessApprovalPolicyJSONBodyApprovers0Type) Valid() bool {
+ switch e {
+ case UpdateAccessApprovalPolicyJSONBodyApprovers0TypeGroup:
+ return true
+ default:
+ return false
+ }
+}
+
+// Defines values for UpdateAccessApprovalPolicyJSONBodyApprovers1Type.
+const (
+ UpdateAccessApprovalPolicyJSONBodyApprovers1TypeUser UpdateAccessApprovalPolicyJSONBodyApprovers1Type = "user"
+)
+
+// Valid indicates whether the value is a known member of the UpdateAccessApprovalPolicyJSONBodyApprovers1Type enum.
+func (e UpdateAccessApprovalPolicyJSONBodyApprovers1Type) Valid() bool {
+ switch e {
+ case UpdateAccessApprovalPolicyJSONBodyApprovers1TypeUser:
+ return true
+ default:
+ return false
+ }
+}
+
+// Defines values for UpdateAccessApprovalPolicyJSONBodyBypassers0Type.
+const (
+ UpdateAccessApprovalPolicyJSONBodyBypassers0TypeGroup UpdateAccessApprovalPolicyJSONBodyBypassers0Type = "group"
+)
+
+// Valid indicates whether the value is a known member of the UpdateAccessApprovalPolicyJSONBodyBypassers0Type enum.
+func (e UpdateAccessApprovalPolicyJSONBodyBypassers0Type) Valid() bool {
+ switch e {
+ case UpdateAccessApprovalPolicyJSONBodyBypassers0TypeGroup:
+ return true
+ default:
+ return false
+ }
+}
+
+// Defines values for UpdateAccessApprovalPolicyJSONBodyBypassers1Type.
+const (
+ UpdateAccessApprovalPolicyJSONBodyBypassers1TypeUser UpdateAccessApprovalPolicyJSONBodyBypassers1Type = "user"
+)
+
+// Valid indicates whether the value is a known member of the UpdateAccessApprovalPolicyJSONBodyBypassers1Type enum.
+func (e UpdateAccessApprovalPolicyJSONBodyBypassers1Type) Valid() bool {
+ switch e {
+ case UpdateAccessApprovalPolicyJSONBodyBypassers1TypeUser:
+ return true
+ default:
+ return false
+ }
+}
+
+// Defines values for UpdateAccessApprovalPolicyJSONBodyEnforcementLevel.
+const (
+ UpdateAccessApprovalPolicyJSONBodyEnforcementLevelHard UpdateAccessApprovalPolicyJSONBodyEnforcementLevel = "hard"
+ UpdateAccessApprovalPolicyJSONBodyEnforcementLevelSoft UpdateAccessApprovalPolicyJSONBodyEnforcementLevel = "soft"
+)
+
+// Valid indicates whether the value is a known member of the UpdateAccessApprovalPolicyJSONBodyEnforcementLevel enum.
+func (e UpdateAccessApprovalPolicyJSONBodyEnforcementLevel) Valid() bool {
+ switch e {
+ case UpdateAccessApprovalPolicyJSONBodyEnforcementLevelHard:
+ return true
+ case UpdateAccessApprovalPolicyJSONBodyEnforcementLevelSoft:
+ return true
+ default:
+ return false
+ }
+}
+
+// Defines values for UpdateAccessApprovalPolicyJSONBodyExternalApprovalType.
+const (
+ UpdateAccessApprovalPolicyJSONBodyExternalApprovalTypeServicenow UpdateAccessApprovalPolicyJSONBodyExternalApprovalType = "servicenow"
+)
+
+// Valid indicates whether the value is a known member of the UpdateAccessApprovalPolicyJSONBodyExternalApprovalType enum.
+func (e UpdateAccessApprovalPolicyJSONBodyExternalApprovalType) Valid() bool {
+ switch e {
+ case UpdateAccessApprovalPolicyJSONBodyExternalApprovalTypeServicenow:
+ return true
+ default:
+ return false
+ }
+}
+
+// Defines values for UpdateAccessApprovalPolicy200JSONResponseBodyApprovalExternalApprovalType.
+const (
+ UpdateAccessApprovalPolicy200JSONResponseBodyApprovalExternalApprovalTypeServicenow UpdateAccessApprovalPolicy200JSONResponseBodyApprovalExternalApprovalType = "servicenow"
+)
+
+// Valid indicates whether the value is a known member of the UpdateAccessApprovalPolicy200JSONResponseBodyApprovalExternalApprovalType enum.
+func (e UpdateAccessApprovalPolicy200JSONResponseBodyApprovalExternalApprovalType) Valid() bool {
+ switch e {
+ case UpdateAccessApprovalPolicy200JSONResponseBodyApprovalExternalApprovalTypeServicenow:
+ return true
+ default:
+ return false
+ }
+}
+
+// Defines values for UpdateAccessApprovalPolicy400JSONResponseBodyStatusCode.
+const (
+ UpdateAccessApprovalPolicy400JSONResponseBodyStatusCodeN400 UpdateAccessApprovalPolicy400JSONResponseBodyStatusCode = 400
+)
+
+// Valid indicates whether the value is a known member of the UpdateAccessApprovalPolicy400JSONResponseBodyStatusCode enum.
+func (e UpdateAccessApprovalPolicy400JSONResponseBodyStatusCode) Valid() bool {
+ switch e {
+ case UpdateAccessApprovalPolicy400JSONResponseBodyStatusCodeN400:
+ return true
+ default:
+ return false
+ }
+}
+
+// Defines values for UpdateAccessApprovalPolicy401JSONResponseBodyStatusCode.
+const (
+ UpdateAccessApprovalPolicy401JSONResponseBodyStatusCodeN401 UpdateAccessApprovalPolicy401JSONResponseBodyStatusCode = 401
+)
+
+// Valid indicates whether the value is a known member of the UpdateAccessApprovalPolicy401JSONResponseBodyStatusCode enum.
+func (e UpdateAccessApprovalPolicy401JSONResponseBodyStatusCode) Valid() bool {
+ switch e {
+ case UpdateAccessApprovalPolicy401JSONResponseBodyStatusCodeN401:
+ return true
+ default:
+ return false
+ }
+}
+
+// Defines values for UpdateAccessApprovalPolicy403JSONResponseBodyStatusCode.
+const (
+ UpdateAccessApprovalPolicy403JSONResponseBodyStatusCodeN403 UpdateAccessApprovalPolicy403JSONResponseBodyStatusCode = 403
+)
+
+// Valid indicates whether the value is a known member of the UpdateAccessApprovalPolicy403JSONResponseBodyStatusCode enum.
+func (e UpdateAccessApprovalPolicy403JSONResponseBodyStatusCode) Valid() bool {
+ switch e {
+ case UpdateAccessApprovalPolicy403JSONResponseBodyStatusCodeN403:
+ return true
+ default:
+ return false
+ }
+}
+
+// Defines values for UpdateAccessApprovalPolicy404JSONResponseBodyStatusCode.
+const (
+ UpdateAccessApprovalPolicy404JSONResponseBodyStatusCodeN404 UpdateAccessApprovalPolicy404JSONResponseBodyStatusCode = 404
+)
+
+// Valid indicates whether the value is a known member of the UpdateAccessApprovalPolicy404JSONResponseBodyStatusCode enum.
+func (e UpdateAccessApprovalPolicy404JSONResponseBodyStatusCode) Valid() bool {
+ switch e {
+ case UpdateAccessApprovalPolicy404JSONResponseBodyStatusCodeN404:
+ return true
+ default:
+ return false
+ }
+}
+
+// Defines values for UpdateAccessApprovalPolicy422JSONResponseBodyStatusCode.
+const (
+ UpdateAccessApprovalPolicy422JSONResponseBodyStatusCodeN422 UpdateAccessApprovalPolicy422JSONResponseBodyStatusCode = 422
+)
+
+// Valid indicates whether the value is a known member of the UpdateAccessApprovalPolicy422JSONResponseBodyStatusCode enum.
+func (e UpdateAccessApprovalPolicy422JSONResponseBodyStatusCode) Valid() bool {
+ switch e {
+ case UpdateAccessApprovalPolicy422JSONResponseBodyStatusCodeN422:
+ return true
+ default:
+ return false
+ }
+}
+
+// Defines values for UpdateAccessApprovalPolicy500JSONResponseBodyStatusCode.
+const (
+ UpdateAccessApprovalPolicy500JSONResponseBodyStatusCodeN500 UpdateAccessApprovalPolicy500JSONResponseBodyStatusCode = 500
+)
+
+// Valid indicates whether the value is a known member of the UpdateAccessApprovalPolicy500JSONResponseBodyStatusCode enum.
+func (e UpdateAccessApprovalPolicy500JSONResponseBodyStatusCode) Valid() bool {
+ switch e {
+ case UpdateAccessApprovalPolicy500JSONResponseBodyStatusCodeN500:
+ return true
+ default:
+ return false
+ }
+}
+
+// Defines values for CreateAccessApprovalRequest400JSONResponseBodyStatusCode.
+const (
+ CreateAccessApprovalRequest400JSONResponseBodyStatusCodeN400 CreateAccessApprovalRequest400JSONResponseBodyStatusCode = 400
+)
+
+// Valid indicates whether the value is a known member of the CreateAccessApprovalRequest400JSONResponseBodyStatusCode enum.
+func (e CreateAccessApprovalRequest400JSONResponseBodyStatusCode) Valid() bool {
+ switch e {
+ case CreateAccessApprovalRequest400JSONResponseBodyStatusCodeN400:
+ return true
+ default:
+ return false
+ }
+}
+
+// Defines values for CreateAccessApprovalRequest401JSONResponseBodyStatusCode.
+const (
+ CreateAccessApprovalRequest401JSONResponseBodyStatusCodeN401 CreateAccessApprovalRequest401JSONResponseBodyStatusCode = 401
+)
+
+// Valid indicates whether the value is a known member of the CreateAccessApprovalRequest401JSONResponseBodyStatusCode enum.
+func (e CreateAccessApprovalRequest401JSONResponseBodyStatusCode) Valid() bool {
+ switch e {
+ case CreateAccessApprovalRequest401JSONResponseBodyStatusCodeN401:
+ return true
+ default:
+ return false
+ }
+}
+
+// Defines values for CreateAccessApprovalRequest403JSONResponseBodyStatusCode.
+const (
+ CreateAccessApprovalRequest403JSONResponseBodyStatusCodeN403 CreateAccessApprovalRequest403JSONResponseBodyStatusCode = 403
+)
+
+// Valid indicates whether the value is a known member of the CreateAccessApprovalRequest403JSONResponseBodyStatusCode enum.
+func (e CreateAccessApprovalRequest403JSONResponseBodyStatusCode) Valid() bool {
+ switch e {
+ case CreateAccessApprovalRequest403JSONResponseBodyStatusCodeN403:
+ return true
+ default:
+ return false
+ }
+}
+
+// Defines values for CreateAccessApprovalRequest404JSONResponseBodyStatusCode.
+const (
+ CreateAccessApprovalRequest404JSONResponseBodyStatusCodeN404 CreateAccessApprovalRequest404JSONResponseBodyStatusCode = 404
+)
+
+// Valid indicates whether the value is a known member of the CreateAccessApprovalRequest404JSONResponseBodyStatusCode enum.
+func (e CreateAccessApprovalRequest404JSONResponseBodyStatusCode) Valid() bool {
+ switch e {
+ case CreateAccessApprovalRequest404JSONResponseBodyStatusCodeN404:
+ return true
+ default:
+ return false
+ }
+}
+
+// Defines values for CreateAccessApprovalRequest422JSONResponseBodyStatusCode.
+const (
+ CreateAccessApprovalRequest422JSONResponseBodyStatusCodeN422 CreateAccessApprovalRequest422JSONResponseBodyStatusCode = 422
+)
+
+// Valid indicates whether the value is a known member of the CreateAccessApprovalRequest422JSONResponseBodyStatusCode enum.
+func (e CreateAccessApprovalRequest422JSONResponseBodyStatusCode) Valid() bool {
+ switch e {
+ case CreateAccessApprovalRequest422JSONResponseBodyStatusCodeN422:
+ return true
+ default:
+ return false
+ }
+}
+
+// Defines values for CreateAccessApprovalRequest500JSONResponseBodyStatusCode.
+const (
+ CreateAccessApprovalRequest500JSONResponseBodyStatusCodeN500 CreateAccessApprovalRequest500JSONResponseBodyStatusCode = 500
+)
+
+// Valid indicates whether the value is a known member of the CreateAccessApprovalRequest500JSONResponseBodyStatusCode enum.
+func (e CreateAccessApprovalRequest500JSONResponseBodyStatusCode) Valid() bool {
+ switch e {
+ case CreateAccessApprovalRequest500JSONResponseBodyStatusCodeN500:
+ return true
+ default:
+ return false
+ }
+}
+
// Defines values for AdminBootstrap400JSONResponseBodyStatusCode.
const (
AdminBootstrap400JSONResponseBodyStatusCodeN400 AdminBootstrap400JSONResponseBodyStatusCode = 400
@@ -1134,6 +1902,189 @@ func (e DeleteGitHubAppConnection500JSONResponseBodyStatusCode) Valid() bool {
}
}
+// Defines values for CreateServiceNowAppConnectionJSONBodyIsAutoRotationEnabled.
+const (
+ CreateServiceNowAppConnectionJSONBodyIsAutoRotationEnabledFalse CreateServiceNowAppConnectionJSONBodyIsAutoRotationEnabled = false
+)
+
+// Valid indicates whether the value is a known member of the CreateServiceNowAppConnectionJSONBodyIsAutoRotationEnabled enum.
+func (e CreateServiceNowAppConnectionJSONBodyIsAutoRotationEnabled) Valid() bool {
+ switch e {
+ case CreateServiceNowAppConnectionJSONBodyIsAutoRotationEnabledFalse:
+ return true
+ default:
+ return false
+ }
+}
+
+// Defines values for CreateServiceNowAppConnectionJSONBodyIsPlatformManagedCredentials.
+const (
+ CreateServiceNowAppConnectionJSONBodyIsPlatformManagedCredentialsFalse CreateServiceNowAppConnectionJSONBodyIsPlatformManagedCredentials = false
+)
+
+// Valid indicates whether the value is a known member of the CreateServiceNowAppConnectionJSONBodyIsPlatformManagedCredentials enum.
+func (e CreateServiceNowAppConnectionJSONBodyIsPlatformManagedCredentials) Valid() bool {
+ switch e {
+ case CreateServiceNowAppConnectionJSONBodyIsPlatformManagedCredentialsFalse:
+ return true
+ default:
+ return false
+ }
+}
+
+// Defines values for CreateServiceNowAppConnectionJSONBody0Method.
+const (
+ CreateServiceNowAppConnectionJSONBody0MethodBasicAuth CreateServiceNowAppConnectionJSONBody0Method = "basic-auth"
+)
+
+// Valid indicates whether the value is a known member of the CreateServiceNowAppConnectionJSONBody0Method enum.
+func (e CreateServiceNowAppConnectionJSONBody0Method) Valid() bool {
+ switch e {
+ case CreateServiceNowAppConnectionJSONBody0MethodBasicAuth:
+ return true
+ default:
+ return false
+ }
+}
+
+// Defines values for CreateServiceNowAppConnection200JSONResponseBodyAppConnection0App.
+const (
+ CreateServiceNowAppConnection200JSONResponseBodyAppConnection0AppServicenow CreateServiceNowAppConnection200JSONResponseBodyAppConnection0App = "servicenow"
+)
+
+// Valid indicates whether the value is a known member of the CreateServiceNowAppConnection200JSONResponseBodyAppConnection0App enum.
+func (e CreateServiceNowAppConnection200JSONResponseBodyAppConnection0App) Valid() bool {
+ switch e {
+ case CreateServiceNowAppConnection200JSONResponseBodyAppConnection0AppServicenow:
+ return true
+ default:
+ return false
+ }
+}
+
+// Defines values for CreateServiceNowAppConnection200JSONResponseBodyAppConnection0Method.
+const (
+ CreateServiceNowAppConnection200JSONResponseBodyAppConnection0MethodBasicAuth CreateServiceNowAppConnection200JSONResponseBodyAppConnection0Method = "basic-auth"
+)
+
+// Valid indicates whether the value is a known member of the CreateServiceNowAppConnection200JSONResponseBodyAppConnection0Method enum.
+func (e CreateServiceNowAppConnection200JSONResponseBodyAppConnection0Method) Valid() bool {
+ switch e {
+ case CreateServiceNowAppConnection200JSONResponseBodyAppConnection0MethodBasicAuth:
+ return true
+ default:
+ return false
+ }
+}
+
+// Defines values for CreateServiceNowAppConnection200JSONResponseBodyAppConnection0RotationRotationStatus.
+const (
+ CreateServiceNowAppConnection200JSONResponseBodyAppConnection0RotationRotationStatusFailed CreateServiceNowAppConnection200JSONResponseBodyAppConnection0RotationRotationStatus = "failed"
+ CreateServiceNowAppConnection200JSONResponseBodyAppConnection0RotationRotationStatusSuccess CreateServiceNowAppConnection200JSONResponseBodyAppConnection0RotationRotationStatus = "success"
+)
+
+// Valid indicates whether the value is a known member of the CreateServiceNowAppConnection200JSONResponseBodyAppConnection0RotationRotationStatus enum.
+func (e CreateServiceNowAppConnection200JSONResponseBodyAppConnection0RotationRotationStatus) Valid() bool {
+ switch e {
+ case CreateServiceNowAppConnection200JSONResponseBodyAppConnection0RotationRotationStatusFailed:
+ return true
+ case CreateServiceNowAppConnection200JSONResponseBodyAppConnection0RotationRotationStatusSuccess:
+ return true
+ default:
+ return false
+ }
+}
+
+// Defines values for CreateServiceNowAppConnection400JSONResponseBodyStatusCode.
+const (
+ CreateServiceNowAppConnection400JSONResponseBodyStatusCodeN400 CreateServiceNowAppConnection400JSONResponseBodyStatusCode = 400
+)
+
+// Valid indicates whether the value is a known member of the CreateServiceNowAppConnection400JSONResponseBodyStatusCode enum.
+func (e CreateServiceNowAppConnection400JSONResponseBodyStatusCode) Valid() bool {
+ switch e {
+ case CreateServiceNowAppConnection400JSONResponseBodyStatusCodeN400:
+ return true
+ default:
+ return false
+ }
+}
+
+// Defines values for CreateServiceNowAppConnection401JSONResponseBodyStatusCode.
+const (
+ CreateServiceNowAppConnection401JSONResponseBodyStatusCodeN401 CreateServiceNowAppConnection401JSONResponseBodyStatusCode = 401
+)
+
+// Valid indicates whether the value is a known member of the CreateServiceNowAppConnection401JSONResponseBodyStatusCode enum.
+func (e CreateServiceNowAppConnection401JSONResponseBodyStatusCode) Valid() bool {
+ switch e {
+ case CreateServiceNowAppConnection401JSONResponseBodyStatusCodeN401:
+ return true
+ default:
+ return false
+ }
+}
+
+// Defines values for CreateServiceNowAppConnection403JSONResponseBodyStatusCode.
+const (
+ CreateServiceNowAppConnection403JSONResponseBodyStatusCodeN403 CreateServiceNowAppConnection403JSONResponseBodyStatusCode = 403
+)
+
+// Valid indicates whether the value is a known member of the CreateServiceNowAppConnection403JSONResponseBodyStatusCode enum.
+func (e CreateServiceNowAppConnection403JSONResponseBodyStatusCode) Valid() bool {
+ switch e {
+ case CreateServiceNowAppConnection403JSONResponseBodyStatusCodeN403:
+ return true
+ default:
+ return false
+ }
+}
+
+// Defines values for CreateServiceNowAppConnection404JSONResponseBodyStatusCode.
+const (
+ CreateServiceNowAppConnection404JSONResponseBodyStatusCodeN404 CreateServiceNowAppConnection404JSONResponseBodyStatusCode = 404
+)
+
+// Valid indicates whether the value is a known member of the CreateServiceNowAppConnection404JSONResponseBodyStatusCode enum.
+func (e CreateServiceNowAppConnection404JSONResponseBodyStatusCode) Valid() bool {
+ switch e {
+ case CreateServiceNowAppConnection404JSONResponseBodyStatusCodeN404:
+ return true
+ default:
+ return false
+ }
+}
+
+// Defines values for CreateServiceNowAppConnection422JSONResponseBodyStatusCode.
+const (
+ CreateServiceNowAppConnection422JSONResponseBodyStatusCodeN422 CreateServiceNowAppConnection422JSONResponseBodyStatusCode = 422
+)
+
+// Valid indicates whether the value is a known member of the CreateServiceNowAppConnection422JSONResponseBodyStatusCode enum.
+func (e CreateServiceNowAppConnection422JSONResponseBodyStatusCode) Valid() bool {
+ switch e {
+ case CreateServiceNowAppConnection422JSONResponseBodyStatusCodeN422:
+ return true
+ default:
+ return false
+ }
+}
+
+// Defines values for CreateServiceNowAppConnection500JSONResponseBodyStatusCode.
+const (
+ CreateServiceNowAppConnection500JSONResponseBodyStatusCodeN500 CreateServiceNowAppConnection500JSONResponseBodyStatusCode = 500
+)
+
+// Valid indicates whether the value is a known member of the CreateServiceNowAppConnection500JSONResponseBodyStatusCode enum.
+func (e CreateServiceNowAppConnection500JSONResponseBodyStatusCode) Valid() bool {
+ switch e {
+ case CreateServiceNowAppConnection500JSONResponseBodyStatusCodeN500:
+ return true
+ default:
+ return false
+ }
+}
+
// Defines values for RefreshAuthToken400JSONResponseBodyStatusCode.
const (
RefreshAuthToken400JSONResponseBodyStatusCodeN400 RefreshAuthToken400JSONResponseBodyStatusCode = 400
@@ -6540,6 +7491,21 @@ func (e CreateSecretApprovalPolicyJSONBodyEnforcementLevel) Valid() bool {
}
}
+// Defines values for CreateSecretApprovalPolicyJSONBodyExternalApprovalType.
+const (
+ CreateSecretApprovalPolicyJSONBodyExternalApprovalTypeServicenow CreateSecretApprovalPolicyJSONBodyExternalApprovalType = "servicenow"
+)
+
+// Valid indicates whether the value is a known member of the CreateSecretApprovalPolicyJSONBodyExternalApprovalType enum.
+func (e CreateSecretApprovalPolicyJSONBodyExternalApprovalType) Valid() bool {
+ switch e {
+ case CreateSecretApprovalPolicyJSONBodyExternalApprovalTypeServicenow:
+ return true
+ default:
+ return false
+ }
+}
+
// Defines values for CreateSecretApprovalPolicy400JSONResponseBodyStatusCode.
const (
CreateSecretApprovalPolicy400JSONResponseBodyStatusCodeN400 CreateSecretApprovalPolicy400JSONResponseBodyStatusCode = 400
@@ -7014,6 +7980,21 @@ func (e UpdateSecretApprovalPolicyJSONBodyEnforcementLevel) Valid() bool {
}
}
+// Defines values for UpdateSecretApprovalPolicyJSONBodyExternalApprovalType.
+const (
+ UpdateSecretApprovalPolicyJSONBodyExternalApprovalTypeServicenow UpdateSecretApprovalPolicyJSONBodyExternalApprovalType = "servicenow"
+)
+
+// Valid indicates whether the value is a known member of the UpdateSecretApprovalPolicyJSONBodyExternalApprovalType enum.
+func (e UpdateSecretApprovalPolicyJSONBodyExternalApprovalType) Valid() bool {
+ switch e {
+ case UpdateSecretApprovalPolicyJSONBodyExternalApprovalTypeServicenow:
+ return true
+ default:
+ return false
+ }
+}
+
// Defines values for UpdateSecretApprovalPolicy400JSONResponseBodyStatusCode.
const (
UpdateSecretApprovalPolicy400JSONResponseBodyStatusCodeN400 UpdateSecretApprovalPolicy400JSONResponseBodyStatusCode = 400
@@ -9222,6 +10203,310 @@ type GetInstanceStatus422JSONResponseBodyStatusCode float32
// GetInstanceStatus500JSONResponseBodyStatusCode defines parameters for GetInstanceStatus.
type GetInstanceStatus500JSONResponseBodyStatusCode float32
+// ListAccessApprovalPoliciesParams defines parameters for ListAccessApprovalPolicies.
+type ListAccessApprovalPoliciesParams struct {
+ ProjectSlug string `form:"projectSlug" json:"projectSlug"`
+}
+
+// ListAccessApprovalPolicies200JSONResponseBodyApprovalsApproversType defines parameters for ListAccessApprovalPolicies.
+type ListAccessApprovalPolicies200JSONResponseBodyApprovalsApproversType string
+
+// ListAccessApprovalPolicies200JSONResponseBodyApprovalsBypassersType defines parameters for ListAccessApprovalPolicies.
+type ListAccessApprovalPolicies200JSONResponseBodyApprovalsBypassersType string
+
+// ListAccessApprovalPolicies200JSONResponseBodyApprovalsExternalApprovalType defines parameters for ListAccessApprovalPolicies.
+type ListAccessApprovalPolicies200JSONResponseBodyApprovalsExternalApprovalType string
+
+// ListAccessApprovalPolicies400JSONResponseBodyStatusCode defines parameters for ListAccessApprovalPolicies.
+type ListAccessApprovalPolicies400JSONResponseBodyStatusCode float32
+
+// ListAccessApprovalPolicies401JSONResponseBodyStatusCode defines parameters for ListAccessApprovalPolicies.
+type ListAccessApprovalPolicies401JSONResponseBodyStatusCode float32
+
+// ListAccessApprovalPolicies403JSONResponseBodyStatusCode defines parameters for ListAccessApprovalPolicies.
+type ListAccessApprovalPolicies403JSONResponseBodyStatusCode float32
+
+// ListAccessApprovalPolicies404JSONResponseBodyStatusCode defines parameters for ListAccessApprovalPolicies.
+type ListAccessApprovalPolicies404JSONResponseBodyStatusCode float32
+
+// ListAccessApprovalPolicies422JSONResponseBodyStatusCode defines parameters for ListAccessApprovalPolicies.
+type ListAccessApprovalPolicies422JSONResponseBodyStatusCode float32
+
+// ListAccessApprovalPolicies500JSONResponseBodyStatusCode defines parameters for ListAccessApprovalPolicies.
+type ListAccessApprovalPolicies500JSONResponseBodyStatusCode float32
+
+// CreateAccessApprovalPolicyJSONBody defines parameters for CreateAccessApprovalPolicy.
+type CreateAccessApprovalPolicyJSONBody struct {
+ AllowedSelfApprovals *bool `json:"allowedSelfApprovals,omitempty"`
+ Approvals *float32 `json:"approvals,omitempty"`
+ ApprovalsRequired *[]struct {
+ NumberOfApprovals int `json:"numberOfApprovals"`
+ StepNumber int `json:"stepNumber"`
+ } `json:"approvalsRequired,omitempty"`
+
+ // Approvers Required unless externalApproval is set, and must be omitted when it is.
+ Approvers *[]CreateAccessApprovalPolicyJSONBody_Approvers_Item `json:"approvers,omitempty"`
+ Bypassers *[]CreateAccessApprovalPolicyJSONBody_Bypassers_Item `json:"bypassers,omitempty"`
+ EnforcementLevel *CreateAccessApprovalPolicyJSONBodyEnforcementLevel `json:"enforcementLevel,omitempty"`
+ Environment *string `json:"environment,omitempty"`
+ Environments *[]string `json:"environments,omitempty"`
+
+ // ExternalApproval Hand requests made against this policy to an external approval system.
+ ExternalApproval *struct {
+ // ConnectionId The ID of the App Connection used to reach the external approval system.
+ ConnectionId openapi_types.UUID `json:"connectionId"`
+
+ // Type The external approval system that reviews requests made against this policy.
+ Type CreateAccessApprovalPolicyJSONBodyExternalApprovalType `json:"type"`
+ } `json:"externalApproval,omitempty"`
+ MaxTimePeriod *string `json:"maxTimePeriod,omitempty"`
+ Name *string `json:"name,omitempty"`
+ ProjectSlug string `json:"projectSlug"`
+ RequestExpirationTime *string `json:"requestExpirationTime,omitempty"`
+ SecretPath string `json:"secretPath"`
+}
+
+// CreateAccessApprovalPolicyJSONBodyApprovers0 defines parameters for CreateAccessApprovalPolicy.
+type CreateAccessApprovalPolicyJSONBodyApprovers0 struct {
+ Id string `json:"id"`
+ Sequence *int `json:"sequence,omitempty"`
+ Type CreateAccessApprovalPolicyJSONBodyApprovers0Type `json:"type"`
+}
+
+// CreateAccessApprovalPolicyJSONBodyApprovers0Type defines parameters for CreateAccessApprovalPolicy.
+type CreateAccessApprovalPolicyJSONBodyApprovers0Type string
+
+// CreateAccessApprovalPolicyJSONBodyApprovers1 defines parameters for CreateAccessApprovalPolicy.
+type CreateAccessApprovalPolicyJSONBodyApprovers1 struct {
+ Id *string `json:"id,omitempty"`
+ Sequence *int `json:"sequence,omitempty"`
+ Type CreateAccessApprovalPolicyJSONBodyApprovers1Type `json:"type"`
+ Username *string `json:"username,omitempty"`
+}
+
+// CreateAccessApprovalPolicyJSONBodyApprovers1Type defines parameters for CreateAccessApprovalPolicy.
+type CreateAccessApprovalPolicyJSONBodyApprovers1Type string
+
+// CreateAccessApprovalPolicyJSONBody_Approvers_Item defines parameters for CreateAccessApprovalPolicy.
+type CreateAccessApprovalPolicyJSONBody_Approvers_Item struct {
+ union json.RawMessage
+}
+
+// CreateAccessApprovalPolicyJSONBodyBypassers0 defines parameters for CreateAccessApprovalPolicy.
+type CreateAccessApprovalPolicyJSONBodyBypassers0 struct {
+ Id string `json:"id"`
+ Type CreateAccessApprovalPolicyJSONBodyBypassers0Type `json:"type"`
+}
+
+// CreateAccessApprovalPolicyJSONBodyBypassers0Type defines parameters for CreateAccessApprovalPolicy.
+type CreateAccessApprovalPolicyJSONBodyBypassers0Type string
+
+// CreateAccessApprovalPolicyJSONBodyBypassers1 defines parameters for CreateAccessApprovalPolicy.
+type CreateAccessApprovalPolicyJSONBodyBypassers1 struct {
+ Id *string `json:"id,omitempty"`
+ Type CreateAccessApprovalPolicyJSONBodyBypassers1Type `json:"type"`
+ Username *string `json:"username,omitempty"`
+}
+
+// CreateAccessApprovalPolicyJSONBodyBypassers1Type defines parameters for CreateAccessApprovalPolicy.
+type CreateAccessApprovalPolicyJSONBodyBypassers1Type string
+
+// CreateAccessApprovalPolicyJSONBody_Bypassers_Item defines parameters for CreateAccessApprovalPolicy.
+type CreateAccessApprovalPolicyJSONBody_Bypassers_Item struct {
+ union json.RawMessage
+}
+
+// CreateAccessApprovalPolicyJSONBodyEnforcementLevel defines parameters for CreateAccessApprovalPolicy.
+type CreateAccessApprovalPolicyJSONBodyEnforcementLevel string
+
+// CreateAccessApprovalPolicyJSONBodyExternalApprovalType defines parameters for CreateAccessApprovalPolicy.
+type CreateAccessApprovalPolicyJSONBodyExternalApprovalType string
+
+// CreateAccessApprovalPolicy200JSONResponseBodyApprovalExternalApprovalType defines parameters for CreateAccessApprovalPolicy.
+type CreateAccessApprovalPolicy200JSONResponseBodyApprovalExternalApprovalType string
+
+// CreateAccessApprovalPolicy400JSONResponseBodyStatusCode defines parameters for CreateAccessApprovalPolicy.
+type CreateAccessApprovalPolicy400JSONResponseBodyStatusCode float32
+
+// CreateAccessApprovalPolicy401JSONResponseBodyStatusCode defines parameters for CreateAccessApprovalPolicy.
+type CreateAccessApprovalPolicy401JSONResponseBodyStatusCode float32
+
+// CreateAccessApprovalPolicy403JSONResponseBodyStatusCode defines parameters for CreateAccessApprovalPolicy.
+type CreateAccessApprovalPolicy403JSONResponseBodyStatusCode float32
+
+// CreateAccessApprovalPolicy404JSONResponseBodyStatusCode defines parameters for CreateAccessApprovalPolicy.
+type CreateAccessApprovalPolicy404JSONResponseBodyStatusCode float32
+
+// CreateAccessApprovalPolicy422JSONResponseBodyStatusCode defines parameters for CreateAccessApprovalPolicy.
+type CreateAccessApprovalPolicy422JSONResponseBodyStatusCode float32
+
+// CreateAccessApprovalPolicy500JSONResponseBodyStatusCode defines parameters for CreateAccessApprovalPolicy.
+type CreateAccessApprovalPolicy500JSONResponseBodyStatusCode float32
+
+// GetAccessApprovalPolicy200JSONResponseBodyApprovalApproversType defines parameters for GetAccessApprovalPolicy.
+type GetAccessApprovalPolicy200JSONResponseBodyApprovalApproversType string
+
+// GetAccessApprovalPolicy200JSONResponseBodyApprovalBypassersType defines parameters for GetAccessApprovalPolicy.
+type GetAccessApprovalPolicy200JSONResponseBodyApprovalBypassersType string
+
+// GetAccessApprovalPolicy200JSONResponseBodyApprovalExternalApprovalType defines parameters for GetAccessApprovalPolicy.
+type GetAccessApprovalPolicy200JSONResponseBodyApprovalExternalApprovalType string
+
+// GetAccessApprovalPolicy400JSONResponseBodyStatusCode defines parameters for GetAccessApprovalPolicy.
+type GetAccessApprovalPolicy400JSONResponseBodyStatusCode float32
+
+// GetAccessApprovalPolicy401JSONResponseBodyStatusCode defines parameters for GetAccessApprovalPolicy.
+type GetAccessApprovalPolicy401JSONResponseBodyStatusCode float32
+
+// GetAccessApprovalPolicy403JSONResponseBodyStatusCode defines parameters for GetAccessApprovalPolicy.
+type GetAccessApprovalPolicy403JSONResponseBodyStatusCode float32
+
+// GetAccessApprovalPolicy404JSONResponseBodyStatusCode defines parameters for GetAccessApprovalPolicy.
+type GetAccessApprovalPolicy404JSONResponseBodyStatusCode float32
+
+// GetAccessApprovalPolicy422JSONResponseBodyStatusCode defines parameters for GetAccessApprovalPolicy.
+type GetAccessApprovalPolicy422JSONResponseBodyStatusCode float32
+
+// GetAccessApprovalPolicy500JSONResponseBodyStatusCode defines parameters for GetAccessApprovalPolicy.
+type GetAccessApprovalPolicy500JSONResponseBodyStatusCode float32
+
+// UpdateAccessApprovalPolicyJSONBody defines parameters for UpdateAccessApprovalPolicy.
+type UpdateAccessApprovalPolicyJSONBody struct {
+ AllowedSelfApprovals *bool `json:"allowedSelfApprovals,omitempty"`
+ Approvals *float32 `json:"approvals,omitempty"`
+ ApprovalsRequired *[]struct {
+ NumberOfApprovals int `json:"numberOfApprovals"`
+ StepNumber int `json:"stepNumber"`
+ } `json:"approvalsRequired,omitempty"`
+
+ // Approvers Required unless the policy is handled by an external approval system, and must be omitted when it is.
+ Approvers *[]UpdateAccessApprovalPolicyJSONBody_Approvers_Item `json:"approvers,omitempty"`
+ Bypassers *[]UpdateAccessApprovalPolicyJSONBody_Bypassers_Item `json:"bypassers,omitempty"`
+ EnforcementLevel *UpdateAccessApprovalPolicyJSONBodyEnforcementLevel `json:"enforcementLevel,omitempty"`
+ Environments *[]string `json:"environments,omitempty"`
+
+ // ExternalApproval Hand requests made against this policy to an external approval system. Send null to stop using one.
+ ExternalApproval *struct {
+ // ConnectionId The ID of the App Connection used to reach the external approval system.
+ ConnectionId openapi_types.UUID `json:"connectionId"`
+
+ // Type The external approval system that reviews requests made against this policy.
+ Type UpdateAccessApprovalPolicyJSONBodyExternalApprovalType `json:"type"`
+ } `json:"externalApproval,omitempty"`
+ MaxTimePeriod *string `json:"maxTimePeriod,omitempty"`
+ Name *string `json:"name,omitempty"`
+ RequestExpirationTime *string `json:"requestExpirationTime,omitempty"`
+ SecretPath *string `json:"secretPath,omitempty"`
+}
+
+// UpdateAccessApprovalPolicyJSONBodyApprovers0 defines parameters for UpdateAccessApprovalPolicy.
+type UpdateAccessApprovalPolicyJSONBodyApprovers0 struct {
+ Id string `json:"id"`
+ Sequence *int `json:"sequence,omitempty"`
+ Type UpdateAccessApprovalPolicyJSONBodyApprovers0Type `json:"type"`
+}
+
+// UpdateAccessApprovalPolicyJSONBodyApprovers0Type defines parameters for UpdateAccessApprovalPolicy.
+type UpdateAccessApprovalPolicyJSONBodyApprovers0Type string
+
+// UpdateAccessApprovalPolicyJSONBodyApprovers1 defines parameters for UpdateAccessApprovalPolicy.
+type UpdateAccessApprovalPolicyJSONBodyApprovers1 struct {
+ Id *string `json:"id,omitempty"`
+ Sequence *int `json:"sequence,omitempty"`
+ Type UpdateAccessApprovalPolicyJSONBodyApprovers1Type `json:"type"`
+ Username *string `json:"username,omitempty"`
+}
+
+// UpdateAccessApprovalPolicyJSONBodyApprovers1Type defines parameters for UpdateAccessApprovalPolicy.
+type UpdateAccessApprovalPolicyJSONBodyApprovers1Type string
+
+// UpdateAccessApprovalPolicyJSONBody_Approvers_Item defines parameters for UpdateAccessApprovalPolicy.
+type UpdateAccessApprovalPolicyJSONBody_Approvers_Item struct {
+ union json.RawMessage
+}
+
+// UpdateAccessApprovalPolicyJSONBodyBypassers0 defines parameters for UpdateAccessApprovalPolicy.
+type UpdateAccessApprovalPolicyJSONBodyBypassers0 struct {
+ Id string `json:"id"`
+ Type UpdateAccessApprovalPolicyJSONBodyBypassers0Type `json:"type"`
+}
+
+// UpdateAccessApprovalPolicyJSONBodyBypassers0Type defines parameters for UpdateAccessApprovalPolicy.
+type UpdateAccessApprovalPolicyJSONBodyBypassers0Type string
+
+// UpdateAccessApprovalPolicyJSONBodyBypassers1 defines parameters for UpdateAccessApprovalPolicy.
+type UpdateAccessApprovalPolicyJSONBodyBypassers1 struct {
+ Id *string `json:"id,omitempty"`
+ Type UpdateAccessApprovalPolicyJSONBodyBypassers1Type `json:"type"`
+ Username *string `json:"username,omitempty"`
+}
+
+// UpdateAccessApprovalPolicyJSONBodyBypassers1Type defines parameters for UpdateAccessApprovalPolicy.
+type UpdateAccessApprovalPolicyJSONBodyBypassers1Type string
+
+// UpdateAccessApprovalPolicyJSONBody_Bypassers_Item defines parameters for UpdateAccessApprovalPolicy.
+type UpdateAccessApprovalPolicyJSONBody_Bypassers_Item struct {
+ union json.RawMessage
+}
+
+// UpdateAccessApprovalPolicyJSONBodyEnforcementLevel defines parameters for UpdateAccessApprovalPolicy.
+type UpdateAccessApprovalPolicyJSONBodyEnforcementLevel string
+
+// UpdateAccessApprovalPolicyJSONBodyExternalApprovalType defines parameters for UpdateAccessApprovalPolicy.
+type UpdateAccessApprovalPolicyJSONBodyExternalApprovalType string
+
+// UpdateAccessApprovalPolicy200JSONResponseBodyApprovalExternalApprovalType defines parameters for UpdateAccessApprovalPolicy.
+type UpdateAccessApprovalPolicy200JSONResponseBodyApprovalExternalApprovalType string
+
+// UpdateAccessApprovalPolicy400JSONResponseBodyStatusCode defines parameters for UpdateAccessApprovalPolicy.
+type UpdateAccessApprovalPolicy400JSONResponseBodyStatusCode float32
+
+// UpdateAccessApprovalPolicy401JSONResponseBodyStatusCode defines parameters for UpdateAccessApprovalPolicy.
+type UpdateAccessApprovalPolicy401JSONResponseBodyStatusCode float32
+
+// UpdateAccessApprovalPolicy403JSONResponseBodyStatusCode defines parameters for UpdateAccessApprovalPolicy.
+type UpdateAccessApprovalPolicy403JSONResponseBodyStatusCode float32
+
+// UpdateAccessApprovalPolicy404JSONResponseBodyStatusCode defines parameters for UpdateAccessApprovalPolicy.
+type UpdateAccessApprovalPolicy404JSONResponseBodyStatusCode float32
+
+// UpdateAccessApprovalPolicy422JSONResponseBodyStatusCode defines parameters for UpdateAccessApprovalPolicy.
+type UpdateAccessApprovalPolicy422JSONResponseBodyStatusCode float32
+
+// UpdateAccessApprovalPolicy500JSONResponseBodyStatusCode defines parameters for UpdateAccessApprovalPolicy.
+type UpdateAccessApprovalPolicy500JSONResponseBodyStatusCode float32
+
+// CreateAccessApprovalRequestJSONBody defines parameters for CreateAccessApprovalRequest.
+type CreateAccessApprovalRequestJSONBody struct {
+ IsTemporary bool `json:"isTemporary"`
+ Note *string `json:"note,omitempty"`
+ Permissions [][]string `json:"permissions"`
+ TemporaryRange *string `json:"temporaryRange,omitempty"`
+}
+
+// CreateAccessApprovalRequestParams defines parameters for CreateAccessApprovalRequest.
+type CreateAccessApprovalRequestParams struct {
+ ProjectSlug string `form:"projectSlug" json:"projectSlug"`
+}
+
+// CreateAccessApprovalRequest400JSONResponseBodyStatusCode defines parameters for CreateAccessApprovalRequest.
+type CreateAccessApprovalRequest400JSONResponseBodyStatusCode float32
+
+// CreateAccessApprovalRequest401JSONResponseBodyStatusCode defines parameters for CreateAccessApprovalRequest.
+type CreateAccessApprovalRequest401JSONResponseBodyStatusCode float32
+
+// CreateAccessApprovalRequest403JSONResponseBodyStatusCode defines parameters for CreateAccessApprovalRequest.
+type CreateAccessApprovalRequest403JSONResponseBodyStatusCode float32
+
+// CreateAccessApprovalRequest404JSONResponseBodyStatusCode defines parameters for CreateAccessApprovalRequest.
+type CreateAccessApprovalRequest404JSONResponseBodyStatusCode float32
+
+// CreateAccessApprovalRequest422JSONResponseBodyStatusCode defines parameters for CreateAccessApprovalRequest.
+type CreateAccessApprovalRequest422JSONResponseBodyStatusCode float32
+
+// CreateAccessApprovalRequest500JSONResponseBodyStatusCode defines parameters for CreateAccessApprovalRequest.
+type CreateAccessApprovalRequest500JSONResponseBodyStatusCode float32
+
// AdminBootstrapJSONBody defines parameters for AdminBootstrap.
type AdminBootstrapJSONBody struct {
Email openapi_types.Email `json:"email"`
@@ -9980,6 +11265,182 @@ type DeleteGitHubAppConnection422JSONResponseBodyStatusCode float32
// DeleteGitHubAppConnection500JSONResponseBodyStatusCode defines parameters for DeleteGitHubAppConnection.
type DeleteGitHubAppConnection500JSONResponseBodyStatusCode float32
+// CreateServiceNowAppConnectionJSONBody defines parameters for CreateServiceNowAppConnection.
+type CreateServiceNowAppConnectionJSONBody struct {
+ // Description An optional description for the ServiceNow Connection.
+ Description *string `json:"description,omitempty"`
+
+ // GatewayId Not supported for ServiceNow Connections.
+ GatewayId *CreateServiceNowAppConnectionJSONBody_GatewayId `json:"gatewayId,omitempty"`
+
+ // GatewayPoolId Not supported for ServiceNow Connections.
+ GatewayPoolId *CreateServiceNowAppConnectionJSONBody_GatewayPoolId `json:"gatewayPoolId,omitempty"`
+
+ // IsAutoRotationEnabled Not supported for ServiceNow Connections.
+ IsAutoRotationEnabled *CreateServiceNowAppConnectionJSONBodyIsAutoRotationEnabled `json:"isAutoRotationEnabled,omitempty"`
+
+ // IsPlatformManagedCredentials Not supported for ServiceNow Connections.
+ IsPlatformManagedCredentials *CreateServiceNowAppConnectionJSONBodyIsPlatformManagedCredentials `json:"isPlatformManagedCredentials,omitempty"`
+
+ // Name The name of the ServiceNow Connection to create. Must be slug-friendly.
+ Name string `json:"name"`
+
+ // ProjectId The ID of the project to create the ServiceNow Connection in.
+ ProjectId *string `json:"projectId,omitempty"`
+
+ // Rotation Not supported for ServiceNow Connections.
+ Rotation *CreateServiceNowAppConnectionJSONBody_Rotation `json:"rotation,omitempty"`
+ union json.RawMessage
+}
+
+// CreateServiceNowAppConnectionJSONBodyGatewayId0 defines parameters for CreateServiceNowAppConnection.
+type CreateServiceNowAppConnectionJSONBodyGatewayId0 = interface{}
+
+// CreateServiceNowAppConnectionJSONBodyGatewayId1 defines parameters for CreateServiceNowAppConnection.
+type CreateServiceNowAppConnectionJSONBodyGatewayId1 = interface{}
+
+// CreateServiceNowAppConnectionJSONBody_GatewayId defines parameters for CreateServiceNowAppConnection.
+type CreateServiceNowAppConnectionJSONBody_GatewayId struct {
+ union json.RawMessage
+}
+
+// CreateServiceNowAppConnectionJSONBodyGatewayPoolId0 defines parameters for CreateServiceNowAppConnection.
+type CreateServiceNowAppConnectionJSONBodyGatewayPoolId0 = interface{}
+
+// CreateServiceNowAppConnectionJSONBodyGatewayPoolId1 defines parameters for CreateServiceNowAppConnection.
+type CreateServiceNowAppConnectionJSONBodyGatewayPoolId1 = interface{}
+
+// CreateServiceNowAppConnectionJSONBody_GatewayPoolId defines parameters for CreateServiceNowAppConnection.
+type CreateServiceNowAppConnectionJSONBody_GatewayPoolId struct {
+ union json.RawMessage
+}
+
+// CreateServiceNowAppConnectionJSONBodyIsAutoRotationEnabled defines parameters for CreateServiceNowAppConnection.
+type CreateServiceNowAppConnectionJSONBodyIsAutoRotationEnabled bool
+
+// CreateServiceNowAppConnectionJSONBodyIsPlatformManagedCredentials defines parameters for CreateServiceNowAppConnection.
+type CreateServiceNowAppConnectionJSONBodyIsPlatformManagedCredentials bool
+
+// CreateServiceNowAppConnectionJSONBodyRotation0 defines parameters for CreateServiceNowAppConnection.
+type CreateServiceNowAppConnectionJSONBodyRotation0 = interface{}
+
+// CreateServiceNowAppConnectionJSONBodyRotation1 defines parameters for CreateServiceNowAppConnection.
+type CreateServiceNowAppConnectionJSONBodyRotation1 = interface{}
+
+// CreateServiceNowAppConnectionJSONBody_Rotation defines parameters for CreateServiceNowAppConnection.
+type CreateServiceNowAppConnectionJSONBody_Rotation struct {
+ union json.RawMessage
+}
+
+// CreateServiceNowAppConnectionJSONBody0 defines parameters for CreateServiceNowAppConnection.
+type CreateServiceNowAppConnectionJSONBody0 struct {
+ // Credentials The credentials used to connect with ServiceNow.
+ Credentials struct {
+ // InstanceUrl The base URL of the ServiceNow instance to connect with, without a path or trailing slash.
+ InstanceUrl string `json:"instanceUrl"`
+
+ // Password The password of the ServiceNow integration user.
+ Password string `json:"password"`
+
+ // Username The User ID of the ServiceNow integration user.
+ Username string `json:"username"`
+ } `json:"credentials"`
+
+ // Method The method used to authenticate with ServiceNow.
+ Method CreateServiceNowAppConnectionJSONBody0Method `json:"method"`
+}
+
+// CreateServiceNowAppConnectionJSONBody0Method defines parameters for CreateServiceNowAppConnection.
+type CreateServiceNowAppConnectionJSONBody0Method string
+
+// CreateServiceNowAppConnection200JSONResponseBodyAppConnection0 defines parameters for CreateServiceNowAppConnection.
+type CreateServiceNowAppConnection200JSONResponseBodyAppConnection0 struct {
+ App CreateServiceNowAppConnection200JSONResponseBodyAppConnection0App `json:"app"`
+ CreatedAt time.Time `json:"createdAt"`
+ Credentials struct {
+ // InstanceUrl The base URL of the ServiceNow instance to connect with, without a path or trailing slash.
+ InstanceUrl string `json:"instanceUrl"`
+
+ // Username The User ID of the ServiceNow integration user.
+ Username string `json:"username"`
+ } `json:"credentials"`
+ CredentialsHash *string `json:"credentialsHash,omitempty"`
+ Description *string `json:"description,omitempty"`
+ GatewayId *openapi_types.UUID `json:"gatewayId,omitempty"`
+ GatewayPoolId *openapi_types.UUID `json:"gatewayPoolId,omitempty"`
+ Id openapi_types.UUID `json:"id"`
+ IsAutoRotationEnabled *bool `json:"isAutoRotationEnabled,omitempty"`
+ IsPlatformManagedCredentials *bool `json:"isPlatformManagedCredentials,omitempty"`
+ Method CreateServiceNowAppConnection200JSONResponseBodyAppConnection0Method `json:"method"`
+ Name string `json:"name"`
+ OrgId openapi_types.UUID `json:"orgId"`
+ Project *struct {
+ Id string `json:"id"`
+ Name string `json:"name"`
+ Slug string `json:"slug"`
+ Type string `json:"type"`
+ } `json:"project,omitempty"`
+ ProjectId *string `json:"projectId,omitempty"`
+
+ // Rotation The credential rotation configuration, if configured.
+ Rotation *struct {
+ // LastRotationMessage The message from the last rotation attempt.
+ LastRotationMessage *string `json:"lastRotationMessage,omitempty"`
+
+ // NextRotationAt The next scheduled rotation time.
+ NextRotationAt *time.Time `json:"nextRotationAt,omitempty"`
+
+ // RotateAtUtc The UTC time of day at which rotation should occur.
+ RotateAtUtc struct {
+ // Hours The hour (0-23) at which to rotate.
+ Hours float32 `json:"hours"`
+
+ // Minutes The minute (0-59) at which to rotate.
+ Minutes float32 `json:"minutes"`
+ } `json:"rotateAtUtc"`
+
+ // RotationInterval The interval in days between credential rotations.
+ RotationInterval float32 `json:"rotationInterval"`
+
+ // RotationStatus The status of the last rotation attempt.
+ RotationStatus CreateServiceNowAppConnection200JSONResponseBodyAppConnection0RotationRotationStatus `json:"rotationStatus"`
+ } `json:"rotation,omitempty"`
+ UpdatedAt time.Time `json:"updatedAt"`
+ Version *float32 `json:"version,omitempty"`
+}
+
+// CreateServiceNowAppConnection200JSONResponseBodyAppConnection0App defines parameters for CreateServiceNowAppConnection.
+type CreateServiceNowAppConnection200JSONResponseBodyAppConnection0App string
+
+// CreateServiceNowAppConnection200JSONResponseBodyAppConnection0Method defines parameters for CreateServiceNowAppConnection.
+type CreateServiceNowAppConnection200JSONResponseBodyAppConnection0Method string
+
+// CreateServiceNowAppConnection200JSONResponseBodyAppConnection0RotationRotationStatus defines parameters for CreateServiceNowAppConnection.
+type CreateServiceNowAppConnection200JSONResponseBodyAppConnection0RotationRotationStatus string
+
+// CreateServiceNowAppConnection200JSONResponseBody_AppConnection defines parameters for CreateServiceNowAppConnection.
+type CreateServiceNowAppConnection200JSONResponseBody_AppConnection struct {
+ union json.RawMessage
+}
+
+// CreateServiceNowAppConnection400JSONResponseBodyStatusCode defines parameters for CreateServiceNowAppConnection.
+type CreateServiceNowAppConnection400JSONResponseBodyStatusCode float32
+
+// CreateServiceNowAppConnection401JSONResponseBodyStatusCode defines parameters for CreateServiceNowAppConnection.
+type CreateServiceNowAppConnection401JSONResponseBodyStatusCode float32
+
+// CreateServiceNowAppConnection403JSONResponseBodyStatusCode defines parameters for CreateServiceNowAppConnection.
+type CreateServiceNowAppConnection403JSONResponseBodyStatusCode float32
+
+// CreateServiceNowAppConnection404JSONResponseBodyStatusCode defines parameters for CreateServiceNowAppConnection.
+type CreateServiceNowAppConnection404JSONResponseBodyStatusCode float32
+
+// CreateServiceNowAppConnection422JSONResponseBodyStatusCode defines parameters for CreateServiceNowAppConnection.
+type CreateServiceNowAppConnection422JSONResponseBodyStatusCode float32
+
+// CreateServiceNowAppConnection500JSONResponseBodyStatusCode defines parameters for CreateServiceNowAppConnection.
+type CreateServiceNowAppConnection500JSONResponseBodyStatusCode float32
+
// RefreshAuthToken400JSONResponseBodyStatusCode defines parameters for RefreshAuthToken.
type RefreshAuthToken400JSONResponseBodyStatusCode float32
@@ -11910,9 +13371,18 @@ type CreateSecretApprovalPolicyJSONBody struct {
EnforcementLevel *CreateSecretApprovalPolicyJSONBodyEnforcementLevel `json:"enforcementLevel,omitempty"`
Environment *string `json:"environment,omitempty"`
Environments *[]string `json:"environments,omitempty"`
- Name *string `json:"name,omitempty"`
- ProjectId string `json:"projectId"`
- SecretPath string `json:"secretPath"`
+
+ // ExternalApproval Not supported on secret change policies. Only secret access policies can be handled by an external approval system, so sending this returns an error.
+ ExternalApproval *struct {
+ // ConnectionId The ID of the App Connection used to reach the external approval system.
+ ConnectionId openapi_types.UUID `json:"connectionId"`
+
+ // Type The external approval system that reviews requests made against this policy.
+ Type CreateSecretApprovalPolicyJSONBodyExternalApprovalType `json:"type"`
+ } `json:"externalApproval,omitempty"`
+ Name *string `json:"name,omitempty"`
+ ProjectId string `json:"projectId"`
+ SecretPath string `json:"secretPath"`
}
// CreateSecretApprovalPolicyJSONBodyApprovers0 defines parameters for CreateSecretApprovalPolicy.
@@ -11966,6 +13436,9 @@ type CreateSecretApprovalPolicyJSONBody_Bypassers_Item struct {
// CreateSecretApprovalPolicyJSONBodyEnforcementLevel defines parameters for CreateSecretApprovalPolicy.
type CreateSecretApprovalPolicyJSONBodyEnforcementLevel string
+// CreateSecretApprovalPolicyJSONBodyExternalApprovalType defines parameters for CreateSecretApprovalPolicy.
+type CreateSecretApprovalPolicyJSONBodyExternalApprovalType string
+
// CreateSecretApprovalPolicy400JSONResponseBodyStatusCode defines parameters for CreateSecretApprovalPolicy.
type CreateSecretApprovalPolicy400JSONResponseBodyStatusCode float32
@@ -12060,8 +13533,17 @@ type UpdateSecretApprovalPolicyJSONBody struct {
Bypassers *[]UpdateSecretApprovalPolicyJSONBody_Bypassers_Item `json:"bypassers,omitempty"`
EnforcementLevel *UpdateSecretApprovalPolicyJSONBodyEnforcementLevel `json:"enforcementLevel,omitempty"`
Environments *[]string `json:"environments,omitempty"`
- Name *string `json:"name,omitempty"`
- SecretPath *string `json:"secretPath,omitempty"`
+
+ // ExternalApproval Not supported on secret change policies. Only secret access policies can be handled by an external approval system, so sending this returns an error.
+ ExternalApproval *struct {
+ // ConnectionId The ID of the App Connection used to reach the external approval system.
+ ConnectionId openapi_types.UUID `json:"connectionId"`
+
+ // Type The external approval system that reviews requests made against this policy.
+ Type UpdateSecretApprovalPolicyJSONBodyExternalApprovalType `json:"type"`
+ } `json:"externalApproval,omitempty"`
+ Name *string `json:"name,omitempty"`
+ SecretPath *string `json:"secretPath,omitempty"`
}
// UpdateSecretApprovalPolicyJSONBodyApprovers0 defines parameters for UpdateSecretApprovalPolicy.
@@ -12115,6 +13597,9 @@ type UpdateSecretApprovalPolicyJSONBody_Bypassers_Item struct {
// UpdateSecretApprovalPolicyJSONBodyEnforcementLevel defines parameters for UpdateSecretApprovalPolicy.
type UpdateSecretApprovalPolicyJSONBodyEnforcementLevel string
+// UpdateSecretApprovalPolicyJSONBodyExternalApprovalType defines parameters for UpdateSecretApprovalPolicy.
+type UpdateSecretApprovalPolicyJSONBodyExternalApprovalType string
+
// UpdateSecretApprovalPolicy400JSONResponseBodyStatusCode defines parameters for UpdateSecretApprovalPolicy.
type UpdateSecretApprovalPolicy400JSONResponseBodyStatusCode float32
@@ -13313,6 +14798,15 @@ type GetSecretReferenceTreeV4422JSONResponseBodyStatusCode float32
// GetSecretReferenceTreeV4500JSONResponseBodyStatusCode defines parameters for GetSecretReferenceTreeV4.
type GetSecretReferenceTreeV4500JSONResponseBodyStatusCode float32
+// CreateAccessApprovalPolicyJSONRequestBody defines body for CreateAccessApprovalPolicy for application/json ContentType.
+type CreateAccessApprovalPolicyJSONRequestBody CreateAccessApprovalPolicyJSONBody
+
+// UpdateAccessApprovalPolicyJSONRequestBody defines body for UpdateAccessApprovalPolicy for application/json ContentType.
+type UpdateAccessApprovalPolicyJSONRequestBody UpdateAccessApprovalPolicyJSONBody
+
+// CreateAccessApprovalRequestJSONRequestBody defines body for CreateAccessApprovalRequest for application/json ContentType.
+type CreateAccessApprovalRequestJSONRequestBody CreateAccessApprovalRequestJSONBody
+
// AdminBootstrapJSONRequestBody defines body for AdminBootstrap for application/json ContentType.
type AdminBootstrapJSONRequestBody AdminBootstrapJSONBody
@@ -13322,6 +14816,9 @@ type UpdateAdminConfigJSONRequestBody UpdateAdminConfigJSONBody
// CreateGitHubAppConnectionJSONRequestBody defines body for CreateGitHubAppConnection for application/json ContentType.
type CreateGitHubAppConnectionJSONRequestBody CreateGitHubAppConnectionJSONBody
+// CreateServiceNowAppConnectionJSONRequestBody defines body for CreateServiceNowAppConnection for application/json ContentType.
+type CreateServiceNowAppConnectionJSONRequestBody CreateServiceNowAppConnectionJSONBody
+
// AttachUniversalAuthJSONRequestBody defines body for AttachUniversalAuth for application/json ContentType.
type AttachUniversalAuthJSONRequestBody AttachUniversalAuthJSONBody
@@ -13451,6 +14948,254 @@ type UpdateSecretV4JSONRequestBody UpdateSecretV4JSONBody
// CreateSecretV4JSONRequestBody defines body for CreateSecretV4 for application/json ContentType.
type CreateSecretV4JSONRequestBody CreateSecretV4JSONBody
+// AsCreateAccessApprovalPolicyJSONBodyApprovers0 returns the union data inside the CreateAccessApprovalPolicyJSONBody_Approvers_Item as a CreateAccessApprovalPolicyJSONBodyApprovers0
+func (t CreateAccessApprovalPolicyJSONBody_Approvers_Item) AsCreateAccessApprovalPolicyJSONBodyApprovers0() (CreateAccessApprovalPolicyJSONBodyApprovers0, error) {
+ var body CreateAccessApprovalPolicyJSONBodyApprovers0
+ err := json.Unmarshal(t.union, &body)
+ return body, err
+}
+
+// FromCreateAccessApprovalPolicyJSONBodyApprovers0 overwrites any union data inside the CreateAccessApprovalPolicyJSONBody_Approvers_Item as the provided CreateAccessApprovalPolicyJSONBodyApprovers0
+func (t *CreateAccessApprovalPolicyJSONBody_Approvers_Item) FromCreateAccessApprovalPolicyJSONBodyApprovers0(v CreateAccessApprovalPolicyJSONBodyApprovers0) error {
+ b, err := json.Marshal(v)
+ t.union = b
+ return err
+}
+
+// MergeCreateAccessApprovalPolicyJSONBodyApprovers0 performs a merge with any union data inside the CreateAccessApprovalPolicyJSONBody_Approvers_Item, using the provided CreateAccessApprovalPolicyJSONBodyApprovers0
+func (t *CreateAccessApprovalPolicyJSONBody_Approvers_Item) MergeCreateAccessApprovalPolicyJSONBodyApprovers0(v CreateAccessApprovalPolicyJSONBodyApprovers0) error {
+ b, err := json.Marshal(v)
+ if err != nil {
+ return err
+ }
+
+ merged, err := runtime.JSONMerge(t.union, b)
+ t.union = merged
+ return err
+}
+
+// AsCreateAccessApprovalPolicyJSONBodyApprovers1 returns the union data inside the CreateAccessApprovalPolicyJSONBody_Approvers_Item as a CreateAccessApprovalPolicyJSONBodyApprovers1
+func (t CreateAccessApprovalPolicyJSONBody_Approvers_Item) AsCreateAccessApprovalPolicyJSONBodyApprovers1() (CreateAccessApprovalPolicyJSONBodyApprovers1, error) {
+ var body CreateAccessApprovalPolicyJSONBodyApprovers1
+ err := json.Unmarshal(t.union, &body)
+ return body, err
+}
+
+// FromCreateAccessApprovalPolicyJSONBodyApprovers1 overwrites any union data inside the CreateAccessApprovalPolicyJSONBody_Approvers_Item as the provided CreateAccessApprovalPolicyJSONBodyApprovers1
+func (t *CreateAccessApprovalPolicyJSONBody_Approvers_Item) FromCreateAccessApprovalPolicyJSONBodyApprovers1(v CreateAccessApprovalPolicyJSONBodyApprovers1) error {
+ b, err := json.Marshal(v)
+ t.union = b
+ return err
+}
+
+// MergeCreateAccessApprovalPolicyJSONBodyApprovers1 performs a merge with any union data inside the CreateAccessApprovalPolicyJSONBody_Approvers_Item, using the provided CreateAccessApprovalPolicyJSONBodyApprovers1
+func (t *CreateAccessApprovalPolicyJSONBody_Approvers_Item) MergeCreateAccessApprovalPolicyJSONBodyApprovers1(v CreateAccessApprovalPolicyJSONBodyApprovers1) 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 CreateAccessApprovalPolicyJSONBody_Approvers_Item) MarshalJSON() ([]byte, error) {
+ b, err := t.union.MarshalJSON()
+ return b, err
+}
+
+func (t *CreateAccessApprovalPolicyJSONBody_Approvers_Item) UnmarshalJSON(b []byte) error {
+ err := t.union.UnmarshalJSON(b)
+ return err
+}
+
+// AsCreateAccessApprovalPolicyJSONBodyBypassers0 returns the union data inside the CreateAccessApprovalPolicyJSONBody_Bypassers_Item as a CreateAccessApprovalPolicyJSONBodyBypassers0
+func (t CreateAccessApprovalPolicyJSONBody_Bypassers_Item) AsCreateAccessApprovalPolicyJSONBodyBypassers0() (CreateAccessApprovalPolicyJSONBodyBypassers0, error) {
+ var body CreateAccessApprovalPolicyJSONBodyBypassers0
+ err := json.Unmarshal(t.union, &body)
+ return body, err
+}
+
+// FromCreateAccessApprovalPolicyJSONBodyBypassers0 overwrites any union data inside the CreateAccessApprovalPolicyJSONBody_Bypassers_Item as the provided CreateAccessApprovalPolicyJSONBodyBypassers0
+func (t *CreateAccessApprovalPolicyJSONBody_Bypassers_Item) FromCreateAccessApprovalPolicyJSONBodyBypassers0(v CreateAccessApprovalPolicyJSONBodyBypassers0) error {
+ b, err := json.Marshal(v)
+ t.union = b
+ return err
+}
+
+// MergeCreateAccessApprovalPolicyJSONBodyBypassers0 performs a merge with any union data inside the CreateAccessApprovalPolicyJSONBody_Bypassers_Item, using the provided CreateAccessApprovalPolicyJSONBodyBypassers0
+func (t *CreateAccessApprovalPolicyJSONBody_Bypassers_Item) MergeCreateAccessApprovalPolicyJSONBodyBypassers0(v CreateAccessApprovalPolicyJSONBodyBypassers0) error {
+ b, err := json.Marshal(v)
+ if err != nil {
+ return err
+ }
+
+ merged, err := runtime.JSONMerge(t.union, b)
+ t.union = merged
+ return err
+}
+
+// AsCreateAccessApprovalPolicyJSONBodyBypassers1 returns the union data inside the CreateAccessApprovalPolicyJSONBody_Bypassers_Item as a CreateAccessApprovalPolicyJSONBodyBypassers1
+func (t CreateAccessApprovalPolicyJSONBody_Bypassers_Item) AsCreateAccessApprovalPolicyJSONBodyBypassers1() (CreateAccessApprovalPolicyJSONBodyBypassers1, error) {
+ var body CreateAccessApprovalPolicyJSONBodyBypassers1
+ err := json.Unmarshal(t.union, &body)
+ return body, err
+}
+
+// FromCreateAccessApprovalPolicyJSONBodyBypassers1 overwrites any union data inside the CreateAccessApprovalPolicyJSONBody_Bypassers_Item as the provided CreateAccessApprovalPolicyJSONBodyBypassers1
+func (t *CreateAccessApprovalPolicyJSONBody_Bypassers_Item) FromCreateAccessApprovalPolicyJSONBodyBypassers1(v CreateAccessApprovalPolicyJSONBodyBypassers1) error {
+ b, err := json.Marshal(v)
+ t.union = b
+ return err
+}
+
+// MergeCreateAccessApprovalPolicyJSONBodyBypassers1 performs a merge with any union data inside the CreateAccessApprovalPolicyJSONBody_Bypassers_Item, using the provided CreateAccessApprovalPolicyJSONBodyBypassers1
+func (t *CreateAccessApprovalPolicyJSONBody_Bypassers_Item) MergeCreateAccessApprovalPolicyJSONBodyBypassers1(v CreateAccessApprovalPolicyJSONBodyBypassers1) 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 CreateAccessApprovalPolicyJSONBody_Bypassers_Item) MarshalJSON() ([]byte, error) {
+ b, err := t.union.MarshalJSON()
+ return b, err
+}
+
+func (t *CreateAccessApprovalPolicyJSONBody_Bypassers_Item) UnmarshalJSON(b []byte) error {
+ err := t.union.UnmarshalJSON(b)
+ return err
+}
+
+// AsUpdateAccessApprovalPolicyJSONBodyApprovers0 returns the union data inside the UpdateAccessApprovalPolicyJSONBody_Approvers_Item as a UpdateAccessApprovalPolicyJSONBodyApprovers0
+func (t UpdateAccessApprovalPolicyJSONBody_Approvers_Item) AsUpdateAccessApprovalPolicyJSONBodyApprovers0() (UpdateAccessApprovalPolicyJSONBodyApprovers0, error) {
+ var body UpdateAccessApprovalPolicyJSONBodyApprovers0
+ err := json.Unmarshal(t.union, &body)
+ return body, err
+}
+
+// FromUpdateAccessApprovalPolicyJSONBodyApprovers0 overwrites any union data inside the UpdateAccessApprovalPolicyJSONBody_Approvers_Item as the provided UpdateAccessApprovalPolicyJSONBodyApprovers0
+func (t *UpdateAccessApprovalPolicyJSONBody_Approvers_Item) FromUpdateAccessApprovalPolicyJSONBodyApprovers0(v UpdateAccessApprovalPolicyJSONBodyApprovers0) error {
+ b, err := json.Marshal(v)
+ t.union = b
+ return err
+}
+
+// MergeUpdateAccessApprovalPolicyJSONBodyApprovers0 performs a merge with any union data inside the UpdateAccessApprovalPolicyJSONBody_Approvers_Item, using the provided UpdateAccessApprovalPolicyJSONBodyApprovers0
+func (t *UpdateAccessApprovalPolicyJSONBody_Approvers_Item) MergeUpdateAccessApprovalPolicyJSONBodyApprovers0(v UpdateAccessApprovalPolicyJSONBodyApprovers0) error {
+ b, err := json.Marshal(v)
+ if err != nil {
+ return err
+ }
+
+ merged, err := runtime.JSONMerge(t.union, b)
+ t.union = merged
+ return err
+}
+
+// AsUpdateAccessApprovalPolicyJSONBodyApprovers1 returns the union data inside the UpdateAccessApprovalPolicyJSONBody_Approvers_Item as a UpdateAccessApprovalPolicyJSONBodyApprovers1
+func (t UpdateAccessApprovalPolicyJSONBody_Approvers_Item) AsUpdateAccessApprovalPolicyJSONBodyApprovers1() (UpdateAccessApprovalPolicyJSONBodyApprovers1, error) {
+ var body UpdateAccessApprovalPolicyJSONBodyApprovers1
+ err := json.Unmarshal(t.union, &body)
+ return body, err
+}
+
+// FromUpdateAccessApprovalPolicyJSONBodyApprovers1 overwrites any union data inside the UpdateAccessApprovalPolicyJSONBody_Approvers_Item as the provided UpdateAccessApprovalPolicyJSONBodyApprovers1
+func (t *UpdateAccessApprovalPolicyJSONBody_Approvers_Item) FromUpdateAccessApprovalPolicyJSONBodyApprovers1(v UpdateAccessApprovalPolicyJSONBodyApprovers1) error {
+ b, err := json.Marshal(v)
+ t.union = b
+ return err
+}
+
+// MergeUpdateAccessApprovalPolicyJSONBodyApprovers1 performs a merge with any union data inside the UpdateAccessApprovalPolicyJSONBody_Approvers_Item, using the provided UpdateAccessApprovalPolicyJSONBodyApprovers1
+func (t *UpdateAccessApprovalPolicyJSONBody_Approvers_Item) MergeUpdateAccessApprovalPolicyJSONBodyApprovers1(v UpdateAccessApprovalPolicyJSONBodyApprovers1) 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 UpdateAccessApprovalPolicyJSONBody_Approvers_Item) MarshalJSON() ([]byte, error) {
+ b, err := t.union.MarshalJSON()
+ return b, err
+}
+
+func (t *UpdateAccessApprovalPolicyJSONBody_Approvers_Item) UnmarshalJSON(b []byte) error {
+ err := t.union.UnmarshalJSON(b)
+ return err
+}
+
+// AsUpdateAccessApprovalPolicyJSONBodyBypassers0 returns the union data inside the UpdateAccessApprovalPolicyJSONBody_Bypassers_Item as a UpdateAccessApprovalPolicyJSONBodyBypassers0
+func (t UpdateAccessApprovalPolicyJSONBody_Bypassers_Item) AsUpdateAccessApprovalPolicyJSONBodyBypassers0() (UpdateAccessApprovalPolicyJSONBodyBypassers0, error) {
+ var body UpdateAccessApprovalPolicyJSONBodyBypassers0
+ err := json.Unmarshal(t.union, &body)
+ return body, err
+}
+
+// FromUpdateAccessApprovalPolicyJSONBodyBypassers0 overwrites any union data inside the UpdateAccessApprovalPolicyJSONBody_Bypassers_Item as the provided UpdateAccessApprovalPolicyJSONBodyBypassers0
+func (t *UpdateAccessApprovalPolicyJSONBody_Bypassers_Item) FromUpdateAccessApprovalPolicyJSONBodyBypassers0(v UpdateAccessApprovalPolicyJSONBodyBypassers0) error {
+ b, err := json.Marshal(v)
+ t.union = b
+ return err
+}
+
+// MergeUpdateAccessApprovalPolicyJSONBodyBypassers0 performs a merge with any union data inside the UpdateAccessApprovalPolicyJSONBody_Bypassers_Item, using the provided UpdateAccessApprovalPolicyJSONBodyBypassers0
+func (t *UpdateAccessApprovalPolicyJSONBody_Bypassers_Item) MergeUpdateAccessApprovalPolicyJSONBodyBypassers0(v UpdateAccessApprovalPolicyJSONBodyBypassers0) error {
+ b, err := json.Marshal(v)
+ if err != nil {
+ return err
+ }
+
+ merged, err := runtime.JSONMerge(t.union, b)
+ t.union = merged
+ return err
+}
+
+// AsUpdateAccessApprovalPolicyJSONBodyBypassers1 returns the union data inside the UpdateAccessApprovalPolicyJSONBody_Bypassers_Item as a UpdateAccessApprovalPolicyJSONBodyBypassers1
+func (t UpdateAccessApprovalPolicyJSONBody_Bypassers_Item) AsUpdateAccessApprovalPolicyJSONBodyBypassers1() (UpdateAccessApprovalPolicyJSONBodyBypassers1, error) {
+ var body UpdateAccessApprovalPolicyJSONBodyBypassers1
+ err := json.Unmarshal(t.union, &body)
+ return body, err
+}
+
+// FromUpdateAccessApprovalPolicyJSONBodyBypassers1 overwrites any union data inside the UpdateAccessApprovalPolicyJSONBody_Bypassers_Item as the provided UpdateAccessApprovalPolicyJSONBodyBypassers1
+func (t *UpdateAccessApprovalPolicyJSONBody_Bypassers_Item) FromUpdateAccessApprovalPolicyJSONBodyBypassers1(v UpdateAccessApprovalPolicyJSONBodyBypassers1) error {
+ b, err := json.Marshal(v)
+ t.union = b
+ return err
+}
+
+// MergeUpdateAccessApprovalPolicyJSONBodyBypassers1 performs a merge with any union data inside the UpdateAccessApprovalPolicyJSONBody_Bypassers_Item, using the provided UpdateAccessApprovalPolicyJSONBodyBypassers1
+func (t *UpdateAccessApprovalPolicyJSONBody_Bypassers_Item) MergeUpdateAccessApprovalPolicyJSONBodyBypassers1(v UpdateAccessApprovalPolicyJSONBodyBypassers1) 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 UpdateAccessApprovalPolicyJSONBody_Bypassers_Item) MarshalJSON() ([]byte, error) {
+ b, err := t.union.MarshalJSON()
+ return b, err
+}
+
+func (t *UpdateAccessApprovalPolicyJSONBody_Bypassers_Item) UnmarshalJSON(b []byte) error {
+ err := t.union.UnmarshalJSON(b)
+ return err
+}
+
// AsCreateGitHubAppConnectionJSONBody0 returns the union data inside the CreateGitHubAppConnectionJSONBody as a CreateGitHubAppConnectionJSONBody0
func (t CreateGitHubAppConnectionJSONBody) AsCreateGitHubAppConnectionJSONBody0() (CreateGitHubAppConnectionJSONBody0, error) {
var body CreateGitHubAppConnectionJSONBody0
@@ -14465,22 +16210,22 @@ func (t *DeleteGitHubAppConnection200JSONResponseBody_AppConnection) UnmarshalJS
return err
}
-// AsUpdateOrganizationJSONBodySecretShareBrandConfigPrimaryColor00 returns the union data inside the UpdateOrganizationJSONBodySecretShareBrandConfigPrimaryColor0 as a UpdateOrganizationJSONBodySecretShareBrandConfigPrimaryColor00
-func (t UpdateOrganizationJSONBodySecretShareBrandConfigPrimaryColor0) AsUpdateOrganizationJSONBodySecretShareBrandConfigPrimaryColor00() (UpdateOrganizationJSONBodySecretShareBrandConfigPrimaryColor00, error) {
- var body UpdateOrganizationJSONBodySecretShareBrandConfigPrimaryColor00
+// AsCreateServiceNowAppConnectionJSONBody0 returns the union data inside the CreateServiceNowAppConnectionJSONBody as a CreateServiceNowAppConnectionJSONBody0
+func (t CreateServiceNowAppConnectionJSONBody) AsCreateServiceNowAppConnectionJSONBody0() (CreateServiceNowAppConnectionJSONBody0, error) {
+ var body CreateServiceNowAppConnectionJSONBody0
err := json.Unmarshal(t.union, &body)
return body, err
}
-// FromUpdateOrganizationJSONBodySecretShareBrandConfigPrimaryColor00 overwrites any union data inside the UpdateOrganizationJSONBodySecretShareBrandConfigPrimaryColor0 as the provided UpdateOrganizationJSONBodySecretShareBrandConfigPrimaryColor00
-func (t *UpdateOrganizationJSONBodySecretShareBrandConfigPrimaryColor0) FromUpdateOrganizationJSONBodySecretShareBrandConfigPrimaryColor00(v UpdateOrganizationJSONBodySecretShareBrandConfigPrimaryColor00) error {
+// FromCreateServiceNowAppConnectionJSONBody0 overwrites any union data inside the CreateServiceNowAppConnectionJSONBody as the provided CreateServiceNowAppConnectionJSONBody0
+func (t *CreateServiceNowAppConnectionJSONBody) FromCreateServiceNowAppConnectionJSONBody0(v CreateServiceNowAppConnectionJSONBody0) error {
b, err := json.Marshal(v)
t.union = b
return err
}
-// MergeUpdateOrganizationJSONBodySecretShareBrandConfigPrimaryColor00 performs a merge with any union data inside the UpdateOrganizationJSONBodySecretShareBrandConfigPrimaryColor0, using the provided UpdateOrganizationJSONBodySecretShareBrandConfigPrimaryColor00
-func (t *UpdateOrganizationJSONBodySecretShareBrandConfigPrimaryColor0) MergeUpdateOrganizationJSONBodySecretShareBrandConfigPrimaryColor00(v UpdateOrganizationJSONBodySecretShareBrandConfigPrimaryColor00) error {
+// MergeCreateServiceNowAppConnectionJSONBody0 performs a merge with any union data inside the CreateServiceNowAppConnectionJSONBody, using the provided CreateServiceNowAppConnectionJSONBody0
+func (t *CreateServiceNowAppConnectionJSONBody) MergeCreateServiceNowAppConnectionJSONBody0(v CreateServiceNowAppConnectionJSONBody0) error {
b, err := json.Marshal(v)
if err != nil {
return err
@@ -14491,58 +16236,162 @@ func (t *UpdateOrganizationJSONBodySecretShareBrandConfigPrimaryColor0) MergeUpd
return err
}
-// AsUpdateOrganizationJSONBodySecretShareBrandConfigPrimaryColor01 returns the union data inside the UpdateOrganizationJSONBodySecretShareBrandConfigPrimaryColor0 as a UpdateOrganizationJSONBodySecretShareBrandConfigPrimaryColor01
-func (t UpdateOrganizationJSONBodySecretShareBrandConfigPrimaryColor0) AsUpdateOrganizationJSONBodySecretShareBrandConfigPrimaryColor01() (UpdateOrganizationJSONBodySecretShareBrandConfigPrimaryColor01, error) {
- var body UpdateOrganizationJSONBodySecretShareBrandConfigPrimaryColor01
- err := json.Unmarshal(t.union, &body)
- return body, err
-}
+func (t CreateServiceNowAppConnectionJSONBody) MarshalJSON() ([]byte, error) {
+ b, err := t.union.MarshalJSON()
+ if err != nil {
+ return nil, err
+ }
+ object := make(map[string]json.RawMessage)
+ if t.union != nil {
+ err = json.Unmarshal(b, &object)
+ if err != nil {
+ return nil, err
+ }
+ }
-// FromUpdateOrganizationJSONBodySecretShareBrandConfigPrimaryColor01 overwrites any union data inside the UpdateOrganizationJSONBodySecretShareBrandConfigPrimaryColor0 as the provided UpdateOrganizationJSONBodySecretShareBrandConfigPrimaryColor01
-func (t *UpdateOrganizationJSONBodySecretShareBrandConfigPrimaryColor0) FromUpdateOrganizationJSONBodySecretShareBrandConfigPrimaryColor01(v UpdateOrganizationJSONBodySecretShareBrandConfigPrimaryColor01) error {
- b, err := json.Marshal(v)
- t.union = b
- return err
-}
+ if t.Description != nil {
+ object["description"], err = json.Marshal(t.Description)
+ if err != nil {
+ return nil, fmt.Errorf("error marshaling 'description': %w", err)
+ }
+ }
-// MergeUpdateOrganizationJSONBodySecretShareBrandConfigPrimaryColor01 performs a merge with any union data inside the UpdateOrganizationJSONBodySecretShareBrandConfigPrimaryColor0, using the provided UpdateOrganizationJSONBodySecretShareBrandConfigPrimaryColor01
-func (t *UpdateOrganizationJSONBodySecretShareBrandConfigPrimaryColor0) MergeUpdateOrganizationJSONBodySecretShareBrandConfigPrimaryColor01(v UpdateOrganizationJSONBodySecretShareBrandConfigPrimaryColor01) error {
- b, err := json.Marshal(v)
+ if t.GatewayId != nil {
+ object["gatewayId"], err = json.Marshal(t.GatewayId)
+ if err != nil {
+ return nil, fmt.Errorf("error marshaling 'gatewayId': %w", err)
+ }
+ }
+
+ if t.GatewayPoolId != nil {
+ object["gatewayPoolId"], err = json.Marshal(t.GatewayPoolId)
+ if err != nil {
+ return nil, fmt.Errorf("error marshaling 'gatewayPoolId': %w", err)
+ }
+ }
+
+ if t.IsAutoRotationEnabled != nil {
+ object["isAutoRotationEnabled"], err = json.Marshal(t.IsAutoRotationEnabled)
+ if err != nil {
+ return nil, fmt.Errorf("error marshaling 'isAutoRotationEnabled': %w", err)
+ }
+ }
+
+ if t.IsPlatformManagedCredentials != nil {
+ object["isPlatformManagedCredentials"], err = json.Marshal(t.IsPlatformManagedCredentials)
+ if err != nil {
+ return nil, fmt.Errorf("error marshaling 'isPlatformManagedCredentials': %w", err)
+ }
+ }
+
+ object["name"], err = json.Marshal(t.Name)
if err != nil {
- return err
+ return nil, fmt.Errorf("error marshaling 'name': %w", err)
}
- merged, err := runtime.JSONMerge(t.union, b)
- t.union = merged
- return err
-}
+ if t.ProjectId != nil {
+ object["projectId"], err = json.Marshal(t.ProjectId)
+ if err != nil {
+ return nil, fmt.Errorf("error marshaling 'projectId': %w", err)
+ }
+ }
-func (t UpdateOrganizationJSONBodySecretShareBrandConfigPrimaryColor0) MarshalJSON() ([]byte, error) {
- b, err := t.union.MarshalJSON()
+ if t.Rotation != nil {
+ object["rotation"], err = json.Marshal(t.Rotation)
+ if err != nil {
+ return nil, fmt.Errorf("error marshaling 'rotation': %w", err)
+ }
+ }
+ b, err = json.Marshal(object)
return b, err
}
-func (t *UpdateOrganizationJSONBodySecretShareBrandConfigPrimaryColor0) UnmarshalJSON(b []byte) error {
+func (t *CreateServiceNowAppConnectionJSONBody) UnmarshalJSON(b []byte) error {
err := t.union.UnmarshalJSON(b)
+ if err != nil {
+ return err
+ }
+ object := make(map[string]json.RawMessage)
+ err = json.Unmarshal(b, &object)
+ if err != nil {
+ return err
+ }
+
+ if raw, found := object["description"]; found {
+ err = json.Unmarshal(raw, &t.Description)
+ if err != nil {
+ return fmt.Errorf("error reading 'description': %w", err)
+ }
+ }
+
+ if raw, found := object["gatewayId"]; found {
+ err = json.Unmarshal(raw, &t.GatewayId)
+ if err != nil {
+ return fmt.Errorf("error reading 'gatewayId': %w", err)
+ }
+ }
+
+ if raw, found := object["gatewayPoolId"]; found {
+ err = json.Unmarshal(raw, &t.GatewayPoolId)
+ if err != nil {
+ return fmt.Errorf("error reading 'gatewayPoolId': %w", err)
+ }
+ }
+
+ if raw, found := object["isAutoRotationEnabled"]; found {
+ err = json.Unmarshal(raw, &t.IsAutoRotationEnabled)
+ if err != nil {
+ return fmt.Errorf("error reading 'isAutoRotationEnabled': %w", err)
+ }
+ }
+
+ if raw, found := object["isPlatformManagedCredentials"]; found {
+ err = json.Unmarshal(raw, &t.IsPlatformManagedCredentials)
+ if err != nil {
+ return fmt.Errorf("error reading 'isPlatformManagedCredentials': %w", err)
+ }
+ }
+
+ if raw, found := object["name"]; found {
+ err = json.Unmarshal(raw, &t.Name)
+ if err != nil {
+ return fmt.Errorf("error reading 'name': %w", err)
+ }
+ }
+
+ if raw, found := object["projectId"]; found {
+ err = json.Unmarshal(raw, &t.ProjectId)
+ if err != nil {
+ return fmt.Errorf("error reading 'projectId': %w", err)
+ }
+ }
+
+ if raw, found := object["rotation"]; found {
+ err = json.Unmarshal(raw, &t.Rotation)
+ if err != nil {
+ return fmt.Errorf("error reading 'rotation': %w", err)
+ }
+ }
+
return err
}
-// AsUpdateOrganizationJSONBodySecretShareBrandConfigPrimaryColor0 returns the union data inside the UpdateOrganizationJSONBody_SecretShareBrandConfig_PrimaryColor as a UpdateOrganizationJSONBodySecretShareBrandConfigPrimaryColor0
-func (t UpdateOrganizationJSONBody_SecretShareBrandConfig_PrimaryColor) AsUpdateOrganizationJSONBodySecretShareBrandConfigPrimaryColor0() (UpdateOrganizationJSONBodySecretShareBrandConfigPrimaryColor0, error) {
- var body UpdateOrganizationJSONBodySecretShareBrandConfigPrimaryColor0
+// AsCreateServiceNowAppConnectionJSONBodyGatewayId0 returns the union data inside the CreateServiceNowAppConnectionJSONBody_GatewayId as a CreateServiceNowAppConnectionJSONBodyGatewayId0
+func (t CreateServiceNowAppConnectionJSONBody_GatewayId) AsCreateServiceNowAppConnectionJSONBodyGatewayId0() (CreateServiceNowAppConnectionJSONBodyGatewayId0, error) {
+ var body CreateServiceNowAppConnectionJSONBodyGatewayId0
err := json.Unmarshal(t.union, &body)
return body, err
}
-// FromUpdateOrganizationJSONBodySecretShareBrandConfigPrimaryColor0 overwrites any union data inside the UpdateOrganizationJSONBody_SecretShareBrandConfig_PrimaryColor as the provided UpdateOrganizationJSONBodySecretShareBrandConfigPrimaryColor0
-func (t *UpdateOrganizationJSONBody_SecretShareBrandConfig_PrimaryColor) FromUpdateOrganizationJSONBodySecretShareBrandConfigPrimaryColor0(v UpdateOrganizationJSONBodySecretShareBrandConfigPrimaryColor0) error {
+// FromCreateServiceNowAppConnectionJSONBodyGatewayId0 overwrites any union data inside the CreateServiceNowAppConnectionJSONBody_GatewayId as the provided CreateServiceNowAppConnectionJSONBodyGatewayId0
+func (t *CreateServiceNowAppConnectionJSONBody_GatewayId) FromCreateServiceNowAppConnectionJSONBodyGatewayId0(v CreateServiceNowAppConnectionJSONBodyGatewayId0) error {
b, err := json.Marshal(v)
t.union = b
return err
}
-// MergeUpdateOrganizationJSONBodySecretShareBrandConfigPrimaryColor0 performs a merge with any union data inside the UpdateOrganizationJSONBody_SecretShareBrandConfig_PrimaryColor, using the provided UpdateOrganizationJSONBodySecretShareBrandConfigPrimaryColor0
-func (t *UpdateOrganizationJSONBody_SecretShareBrandConfig_PrimaryColor) MergeUpdateOrganizationJSONBodySecretShareBrandConfigPrimaryColor0(v UpdateOrganizationJSONBodySecretShareBrandConfigPrimaryColor0) error {
+// MergeCreateServiceNowAppConnectionJSONBodyGatewayId0 performs a merge with any union data inside the CreateServiceNowAppConnectionJSONBody_GatewayId, using the provided CreateServiceNowAppConnectionJSONBodyGatewayId0
+func (t *CreateServiceNowAppConnectionJSONBody_GatewayId) MergeCreateServiceNowAppConnectionJSONBodyGatewayId0(v CreateServiceNowAppConnectionJSONBodyGatewayId0) error {
b, err := json.Marshal(v)
if err != nil {
return err
@@ -14553,22 +16402,22 @@ func (t *UpdateOrganizationJSONBody_SecretShareBrandConfig_PrimaryColor) MergeUp
return err
}
-// AsUpdateOrganizationJSONBodySecretShareBrandConfigPrimaryColor1 returns the union data inside the UpdateOrganizationJSONBody_SecretShareBrandConfig_PrimaryColor as a UpdateOrganizationJSONBodySecretShareBrandConfigPrimaryColor1
-func (t UpdateOrganizationJSONBody_SecretShareBrandConfig_PrimaryColor) AsUpdateOrganizationJSONBodySecretShareBrandConfigPrimaryColor1() (UpdateOrganizationJSONBodySecretShareBrandConfigPrimaryColor1, error) {
- var body UpdateOrganizationJSONBodySecretShareBrandConfigPrimaryColor1
+// AsCreateServiceNowAppConnectionJSONBodyGatewayId1 returns the union data inside the CreateServiceNowAppConnectionJSONBody_GatewayId as a CreateServiceNowAppConnectionJSONBodyGatewayId1
+func (t CreateServiceNowAppConnectionJSONBody_GatewayId) AsCreateServiceNowAppConnectionJSONBodyGatewayId1() (CreateServiceNowAppConnectionJSONBodyGatewayId1, error) {
+ var body CreateServiceNowAppConnectionJSONBodyGatewayId1
err := json.Unmarshal(t.union, &body)
return body, err
}
-// FromUpdateOrganizationJSONBodySecretShareBrandConfigPrimaryColor1 overwrites any union data inside the UpdateOrganizationJSONBody_SecretShareBrandConfig_PrimaryColor as the provided UpdateOrganizationJSONBodySecretShareBrandConfigPrimaryColor1
-func (t *UpdateOrganizationJSONBody_SecretShareBrandConfig_PrimaryColor) FromUpdateOrganizationJSONBodySecretShareBrandConfigPrimaryColor1(v UpdateOrganizationJSONBodySecretShareBrandConfigPrimaryColor1) error {
+// FromCreateServiceNowAppConnectionJSONBodyGatewayId1 overwrites any union data inside the CreateServiceNowAppConnectionJSONBody_GatewayId as the provided CreateServiceNowAppConnectionJSONBodyGatewayId1
+func (t *CreateServiceNowAppConnectionJSONBody_GatewayId) FromCreateServiceNowAppConnectionJSONBodyGatewayId1(v CreateServiceNowAppConnectionJSONBodyGatewayId1) error {
b, err := json.Marshal(v)
t.union = b
return err
}
-// MergeUpdateOrganizationJSONBodySecretShareBrandConfigPrimaryColor1 performs a merge with any union data inside the UpdateOrganizationJSONBody_SecretShareBrandConfig_PrimaryColor, using the provided UpdateOrganizationJSONBodySecretShareBrandConfigPrimaryColor1
-func (t *UpdateOrganizationJSONBody_SecretShareBrandConfig_PrimaryColor) MergeUpdateOrganizationJSONBodySecretShareBrandConfigPrimaryColor1(v UpdateOrganizationJSONBodySecretShareBrandConfigPrimaryColor1) error {
+// MergeCreateServiceNowAppConnectionJSONBodyGatewayId1 performs a merge with any union data inside the CreateServiceNowAppConnectionJSONBody_GatewayId, using the provided CreateServiceNowAppConnectionJSONBodyGatewayId1
+func (t *CreateServiceNowAppConnectionJSONBody_GatewayId) MergeCreateServiceNowAppConnectionJSONBodyGatewayId1(v CreateServiceNowAppConnectionJSONBodyGatewayId1) error {
b, err := json.Marshal(v)
if err != nil {
return err
@@ -14579,32 +16428,32 @@ func (t *UpdateOrganizationJSONBody_SecretShareBrandConfig_PrimaryColor) MergeUp
return err
}
-func (t UpdateOrganizationJSONBody_SecretShareBrandConfig_PrimaryColor) MarshalJSON() ([]byte, error) {
+func (t CreateServiceNowAppConnectionJSONBody_GatewayId) MarshalJSON() ([]byte, error) {
b, err := t.union.MarshalJSON()
return b, err
}
-func (t *UpdateOrganizationJSONBody_SecretShareBrandConfig_PrimaryColor) UnmarshalJSON(b []byte) error {
+func (t *CreateServiceNowAppConnectionJSONBody_GatewayId) UnmarshalJSON(b []byte) error {
err := t.union.UnmarshalJSON(b)
return err
}
-// AsUpdateOrganizationJSONBodySecretShareBrandConfigSecondaryColor00 returns the union data inside the UpdateOrganizationJSONBodySecretShareBrandConfigSecondaryColor0 as a UpdateOrganizationJSONBodySecretShareBrandConfigSecondaryColor00
-func (t UpdateOrganizationJSONBodySecretShareBrandConfigSecondaryColor0) AsUpdateOrganizationJSONBodySecretShareBrandConfigSecondaryColor00() (UpdateOrganizationJSONBodySecretShareBrandConfigSecondaryColor00, error) {
- var body UpdateOrganizationJSONBodySecretShareBrandConfigSecondaryColor00
+// AsCreateServiceNowAppConnectionJSONBodyGatewayPoolId0 returns the union data inside the CreateServiceNowAppConnectionJSONBody_GatewayPoolId as a CreateServiceNowAppConnectionJSONBodyGatewayPoolId0
+func (t CreateServiceNowAppConnectionJSONBody_GatewayPoolId) AsCreateServiceNowAppConnectionJSONBodyGatewayPoolId0() (CreateServiceNowAppConnectionJSONBodyGatewayPoolId0, error) {
+ var body CreateServiceNowAppConnectionJSONBodyGatewayPoolId0
err := json.Unmarshal(t.union, &body)
return body, err
}
-// FromUpdateOrganizationJSONBodySecretShareBrandConfigSecondaryColor00 overwrites any union data inside the UpdateOrganizationJSONBodySecretShareBrandConfigSecondaryColor0 as the provided UpdateOrganizationJSONBodySecretShareBrandConfigSecondaryColor00
-func (t *UpdateOrganizationJSONBodySecretShareBrandConfigSecondaryColor0) FromUpdateOrganizationJSONBodySecretShareBrandConfigSecondaryColor00(v UpdateOrganizationJSONBodySecretShareBrandConfigSecondaryColor00) error {
+// FromCreateServiceNowAppConnectionJSONBodyGatewayPoolId0 overwrites any union data inside the CreateServiceNowAppConnectionJSONBody_GatewayPoolId as the provided CreateServiceNowAppConnectionJSONBodyGatewayPoolId0
+func (t *CreateServiceNowAppConnectionJSONBody_GatewayPoolId) FromCreateServiceNowAppConnectionJSONBodyGatewayPoolId0(v CreateServiceNowAppConnectionJSONBodyGatewayPoolId0) error {
b, err := json.Marshal(v)
t.union = b
return err
}
-// MergeUpdateOrganizationJSONBodySecretShareBrandConfigSecondaryColor00 performs a merge with any union data inside the UpdateOrganizationJSONBodySecretShareBrandConfigSecondaryColor0, using the provided UpdateOrganizationJSONBodySecretShareBrandConfigSecondaryColor00
-func (t *UpdateOrganizationJSONBodySecretShareBrandConfigSecondaryColor0) MergeUpdateOrganizationJSONBodySecretShareBrandConfigSecondaryColor00(v UpdateOrganizationJSONBodySecretShareBrandConfigSecondaryColor00) error {
+// MergeCreateServiceNowAppConnectionJSONBodyGatewayPoolId0 performs a merge with any union data inside the CreateServiceNowAppConnectionJSONBody_GatewayPoolId, using the provided CreateServiceNowAppConnectionJSONBodyGatewayPoolId0
+func (t *CreateServiceNowAppConnectionJSONBody_GatewayPoolId) MergeCreateServiceNowAppConnectionJSONBodyGatewayPoolId0(v CreateServiceNowAppConnectionJSONBodyGatewayPoolId0) error {
b, err := json.Marshal(v)
if err != nil {
return err
@@ -14615,22 +16464,22 @@ func (t *UpdateOrganizationJSONBodySecretShareBrandConfigSecondaryColor0) MergeU
return err
}
-// AsUpdateOrganizationJSONBodySecretShareBrandConfigSecondaryColor01 returns the union data inside the UpdateOrganizationJSONBodySecretShareBrandConfigSecondaryColor0 as a UpdateOrganizationJSONBodySecretShareBrandConfigSecondaryColor01
-func (t UpdateOrganizationJSONBodySecretShareBrandConfigSecondaryColor0) AsUpdateOrganizationJSONBodySecretShareBrandConfigSecondaryColor01() (UpdateOrganizationJSONBodySecretShareBrandConfigSecondaryColor01, error) {
- var body UpdateOrganizationJSONBodySecretShareBrandConfigSecondaryColor01
+// AsCreateServiceNowAppConnectionJSONBodyGatewayPoolId1 returns the union data inside the CreateServiceNowAppConnectionJSONBody_GatewayPoolId as a CreateServiceNowAppConnectionJSONBodyGatewayPoolId1
+func (t CreateServiceNowAppConnectionJSONBody_GatewayPoolId) AsCreateServiceNowAppConnectionJSONBodyGatewayPoolId1() (CreateServiceNowAppConnectionJSONBodyGatewayPoolId1, error) {
+ var body CreateServiceNowAppConnectionJSONBodyGatewayPoolId1
err := json.Unmarshal(t.union, &body)
return body, err
}
-// FromUpdateOrganizationJSONBodySecretShareBrandConfigSecondaryColor01 overwrites any union data inside the UpdateOrganizationJSONBodySecretShareBrandConfigSecondaryColor0 as the provided UpdateOrganizationJSONBodySecretShareBrandConfigSecondaryColor01
-func (t *UpdateOrganizationJSONBodySecretShareBrandConfigSecondaryColor0) FromUpdateOrganizationJSONBodySecretShareBrandConfigSecondaryColor01(v UpdateOrganizationJSONBodySecretShareBrandConfigSecondaryColor01) error {
+// FromCreateServiceNowAppConnectionJSONBodyGatewayPoolId1 overwrites any union data inside the CreateServiceNowAppConnectionJSONBody_GatewayPoolId as the provided CreateServiceNowAppConnectionJSONBodyGatewayPoolId1
+func (t *CreateServiceNowAppConnectionJSONBody_GatewayPoolId) FromCreateServiceNowAppConnectionJSONBodyGatewayPoolId1(v CreateServiceNowAppConnectionJSONBodyGatewayPoolId1) error {
b, err := json.Marshal(v)
t.union = b
return err
}
-// MergeUpdateOrganizationJSONBodySecretShareBrandConfigSecondaryColor01 performs a merge with any union data inside the UpdateOrganizationJSONBodySecretShareBrandConfigSecondaryColor0, using the provided UpdateOrganizationJSONBodySecretShareBrandConfigSecondaryColor01
-func (t *UpdateOrganizationJSONBodySecretShareBrandConfigSecondaryColor0) MergeUpdateOrganizationJSONBodySecretShareBrandConfigSecondaryColor01(v UpdateOrganizationJSONBodySecretShareBrandConfigSecondaryColor01) error {
+// MergeCreateServiceNowAppConnectionJSONBodyGatewayPoolId1 performs a merge with any union data inside the CreateServiceNowAppConnectionJSONBody_GatewayPoolId, using the provided CreateServiceNowAppConnectionJSONBodyGatewayPoolId1
+func (t *CreateServiceNowAppConnectionJSONBody_GatewayPoolId) MergeCreateServiceNowAppConnectionJSONBodyGatewayPoolId1(v CreateServiceNowAppConnectionJSONBodyGatewayPoolId1) error {
b, err := json.Marshal(v)
if err != nil {
return err
@@ -14641,32 +16490,32 @@ func (t *UpdateOrganizationJSONBodySecretShareBrandConfigSecondaryColor0) MergeU
return err
}
-func (t UpdateOrganizationJSONBodySecretShareBrandConfigSecondaryColor0) MarshalJSON() ([]byte, error) {
+func (t CreateServiceNowAppConnectionJSONBody_GatewayPoolId) MarshalJSON() ([]byte, error) {
b, err := t.union.MarshalJSON()
return b, err
}
-func (t *UpdateOrganizationJSONBodySecretShareBrandConfigSecondaryColor0) UnmarshalJSON(b []byte) error {
+func (t *CreateServiceNowAppConnectionJSONBody_GatewayPoolId) UnmarshalJSON(b []byte) error {
err := t.union.UnmarshalJSON(b)
return err
}
-// AsUpdateOrganizationJSONBodySecretShareBrandConfigSecondaryColor0 returns the union data inside the UpdateOrganizationJSONBody_SecretShareBrandConfig_SecondaryColor as a UpdateOrganizationJSONBodySecretShareBrandConfigSecondaryColor0
-func (t UpdateOrganizationJSONBody_SecretShareBrandConfig_SecondaryColor) AsUpdateOrganizationJSONBodySecretShareBrandConfigSecondaryColor0() (UpdateOrganizationJSONBodySecretShareBrandConfigSecondaryColor0, error) {
- var body UpdateOrganizationJSONBodySecretShareBrandConfigSecondaryColor0
+// AsCreateServiceNowAppConnectionJSONBodyRotation0 returns the union data inside the CreateServiceNowAppConnectionJSONBody_Rotation as a CreateServiceNowAppConnectionJSONBodyRotation0
+func (t CreateServiceNowAppConnectionJSONBody_Rotation) AsCreateServiceNowAppConnectionJSONBodyRotation0() (CreateServiceNowAppConnectionJSONBodyRotation0, error) {
+ var body CreateServiceNowAppConnectionJSONBodyRotation0
err := json.Unmarshal(t.union, &body)
return body, err
}
-// FromUpdateOrganizationJSONBodySecretShareBrandConfigSecondaryColor0 overwrites any union data inside the UpdateOrganizationJSONBody_SecretShareBrandConfig_SecondaryColor as the provided UpdateOrganizationJSONBodySecretShareBrandConfigSecondaryColor0
-func (t *UpdateOrganizationJSONBody_SecretShareBrandConfig_SecondaryColor) FromUpdateOrganizationJSONBodySecretShareBrandConfigSecondaryColor0(v UpdateOrganizationJSONBodySecretShareBrandConfigSecondaryColor0) error {
+// FromCreateServiceNowAppConnectionJSONBodyRotation0 overwrites any union data inside the CreateServiceNowAppConnectionJSONBody_Rotation as the provided CreateServiceNowAppConnectionJSONBodyRotation0
+func (t *CreateServiceNowAppConnectionJSONBody_Rotation) FromCreateServiceNowAppConnectionJSONBodyRotation0(v CreateServiceNowAppConnectionJSONBodyRotation0) error {
b, err := json.Marshal(v)
t.union = b
return err
}
-// MergeUpdateOrganizationJSONBodySecretShareBrandConfigSecondaryColor0 performs a merge with any union data inside the UpdateOrganizationJSONBody_SecretShareBrandConfig_SecondaryColor, using the provided UpdateOrganizationJSONBodySecretShareBrandConfigSecondaryColor0
-func (t *UpdateOrganizationJSONBody_SecretShareBrandConfig_SecondaryColor) MergeUpdateOrganizationJSONBodySecretShareBrandConfigSecondaryColor0(v UpdateOrganizationJSONBodySecretShareBrandConfigSecondaryColor0) error {
+// MergeCreateServiceNowAppConnectionJSONBodyRotation0 performs a merge with any union data inside the CreateServiceNowAppConnectionJSONBody_Rotation, using the provided CreateServiceNowAppConnectionJSONBodyRotation0
+func (t *CreateServiceNowAppConnectionJSONBody_Rotation) MergeCreateServiceNowAppConnectionJSONBodyRotation0(v CreateServiceNowAppConnectionJSONBodyRotation0) error {
b, err := json.Marshal(v)
if err != nil {
return err
@@ -14677,22 +16526,22 @@ func (t *UpdateOrganizationJSONBody_SecretShareBrandConfig_SecondaryColor) Merge
return err
}
-// AsUpdateOrganizationJSONBodySecretShareBrandConfigSecondaryColor1 returns the union data inside the UpdateOrganizationJSONBody_SecretShareBrandConfig_SecondaryColor as a UpdateOrganizationJSONBodySecretShareBrandConfigSecondaryColor1
-func (t UpdateOrganizationJSONBody_SecretShareBrandConfig_SecondaryColor) AsUpdateOrganizationJSONBodySecretShareBrandConfigSecondaryColor1() (UpdateOrganizationJSONBodySecretShareBrandConfigSecondaryColor1, error) {
- var body UpdateOrganizationJSONBodySecretShareBrandConfigSecondaryColor1
+// AsCreateServiceNowAppConnectionJSONBodyRotation1 returns the union data inside the CreateServiceNowAppConnectionJSONBody_Rotation as a CreateServiceNowAppConnectionJSONBodyRotation1
+func (t CreateServiceNowAppConnectionJSONBody_Rotation) AsCreateServiceNowAppConnectionJSONBodyRotation1() (CreateServiceNowAppConnectionJSONBodyRotation1, error) {
+ var body CreateServiceNowAppConnectionJSONBodyRotation1
err := json.Unmarshal(t.union, &body)
return body, err
}
-// FromUpdateOrganizationJSONBodySecretShareBrandConfigSecondaryColor1 overwrites any union data inside the UpdateOrganizationJSONBody_SecretShareBrandConfig_SecondaryColor as the provided UpdateOrganizationJSONBodySecretShareBrandConfigSecondaryColor1
-func (t *UpdateOrganizationJSONBody_SecretShareBrandConfig_SecondaryColor) FromUpdateOrganizationJSONBodySecretShareBrandConfigSecondaryColor1(v UpdateOrganizationJSONBodySecretShareBrandConfigSecondaryColor1) error {
+// FromCreateServiceNowAppConnectionJSONBodyRotation1 overwrites any union data inside the CreateServiceNowAppConnectionJSONBody_Rotation as the provided CreateServiceNowAppConnectionJSONBodyRotation1
+func (t *CreateServiceNowAppConnectionJSONBody_Rotation) FromCreateServiceNowAppConnectionJSONBodyRotation1(v CreateServiceNowAppConnectionJSONBodyRotation1) error {
b, err := json.Marshal(v)
t.union = b
return err
}
-// MergeUpdateOrganizationJSONBodySecretShareBrandConfigSecondaryColor1 performs a merge with any union data inside the UpdateOrganizationJSONBody_SecretShareBrandConfig_SecondaryColor, using the provided UpdateOrganizationJSONBodySecretShareBrandConfigSecondaryColor1
-func (t *UpdateOrganizationJSONBody_SecretShareBrandConfig_SecondaryColor) MergeUpdateOrganizationJSONBodySecretShareBrandConfigSecondaryColor1(v UpdateOrganizationJSONBodySecretShareBrandConfigSecondaryColor1) error {
+// MergeCreateServiceNowAppConnectionJSONBodyRotation1 performs a merge with any union data inside the CreateServiceNowAppConnectionJSONBody_Rotation, using the provided CreateServiceNowAppConnectionJSONBodyRotation1
+func (t *CreateServiceNowAppConnectionJSONBody_Rotation) MergeCreateServiceNowAppConnectionJSONBodyRotation1(v CreateServiceNowAppConnectionJSONBodyRotation1) error {
b, err := json.Marshal(v)
if err != nil {
return err
@@ -14703,58 +16552,32 @@ func (t *UpdateOrganizationJSONBody_SecretShareBrandConfig_SecondaryColor) Merge
return err
}
-func (t UpdateOrganizationJSONBody_SecretShareBrandConfig_SecondaryColor) MarshalJSON() ([]byte, error) {
+func (t CreateServiceNowAppConnectionJSONBody_Rotation) MarshalJSON() ([]byte, error) {
b, err := t.union.MarshalJSON()
return b, err
}
-func (t *UpdateOrganizationJSONBody_SecretShareBrandConfig_SecondaryColor) UnmarshalJSON(b []byte) error {
+func (t *CreateServiceNowAppConnectionJSONBody_Rotation) UnmarshalJSON(b []byte) error {
err := t.union.UnmarshalJSON(b)
return err
}
-// 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
+// AsCreateServiceNowAppConnection200JSONResponseBodyAppConnection0 returns the union data inside the CreateServiceNowAppConnection200JSONResponseBody_AppConnection as a CreateServiceNowAppConnection200JSONResponseBodyAppConnection0
+func (t CreateServiceNowAppConnection200JSONResponseBody_AppConnection) AsCreateServiceNowAppConnection200JSONResponseBodyAppConnection0() (CreateServiceNowAppConnection200JSONResponseBodyAppConnection0, error) {
+ var body CreateServiceNowAppConnection200JSONResponseBodyAppConnection0
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 {
+// FromCreateServiceNowAppConnection200JSONResponseBodyAppConnection0 overwrites any union data inside the CreateServiceNowAppConnection200JSONResponseBody_AppConnection as the provided CreateServiceNowAppConnection200JSONResponseBodyAppConnection0
+func (t *CreateServiceNowAppConnection200JSONResponseBody_AppConnection) FromCreateServiceNowAppConnection200JSONResponseBodyAppConnection0(v CreateServiceNowAppConnection200JSONResponseBodyAppConnection0) 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 {
+// MergeCreateServiceNowAppConnection200JSONResponseBodyAppConnection0 performs a merge with any union data inside the CreateServiceNowAppConnection200JSONResponseBody_AppConnection, using the provided CreateServiceNowAppConnection200JSONResponseBodyAppConnection0
+func (t *CreateServiceNowAppConnection200JSONResponseBody_AppConnection) MergeCreateServiceNowAppConnection200JSONResponseBodyAppConnection0(v CreateServiceNowAppConnection200JSONResponseBodyAppConnection0) error {
b, err := json.Marshal(v)
if err != nil {
return err
@@ -14765,32 +16588,32 @@ func (t *CreateProject200JSONResponseBody_Project_DeletedEnvironments_DeletedBy)
return err
}
-func (t CreateProject200JSONResponseBody_Project_DeletedEnvironments_DeletedBy) MarshalJSON() ([]byte, error) {
+func (t CreateServiceNowAppConnection200JSONResponseBody_AppConnection) MarshalJSON() ([]byte, error) {
b, err := t.union.MarshalJSON()
return b, err
}
-func (t *CreateProject200JSONResponseBody_Project_DeletedEnvironments_DeletedBy) UnmarshalJSON(b []byte) error {
+func (t *CreateServiceNowAppConnection200JSONResponseBody_AppConnection) UnmarshalJSON(b []byte) error {
err := t.union.UnmarshalJSON(b)
return err
}
-// AsCreateProjectMachineIdentityJSONBodyRoles0 returns the union data inside the CreateProjectMachineIdentityJSONBody_Roles_Item as a CreateProjectMachineIdentityJSONBodyRoles0
-func (t CreateProjectMachineIdentityJSONBody_Roles_Item) AsCreateProjectMachineIdentityJSONBodyRoles0() (CreateProjectMachineIdentityJSONBodyRoles0, error) {
- var body CreateProjectMachineIdentityJSONBodyRoles0
+// AsUpdateOrganizationJSONBodySecretShareBrandConfigPrimaryColor00 returns the union data inside the UpdateOrganizationJSONBodySecretShareBrandConfigPrimaryColor0 as a UpdateOrganizationJSONBodySecretShareBrandConfigPrimaryColor00
+func (t UpdateOrganizationJSONBodySecretShareBrandConfigPrimaryColor0) AsUpdateOrganizationJSONBodySecretShareBrandConfigPrimaryColor00() (UpdateOrganizationJSONBodySecretShareBrandConfigPrimaryColor00, error) {
+ var body UpdateOrganizationJSONBodySecretShareBrandConfigPrimaryColor00
err := json.Unmarshal(t.union, &body)
return body, err
}
-// FromCreateProjectMachineIdentityJSONBodyRoles0 overwrites any union data inside the CreateProjectMachineIdentityJSONBody_Roles_Item as the provided CreateProjectMachineIdentityJSONBodyRoles0
-func (t *CreateProjectMachineIdentityJSONBody_Roles_Item) FromCreateProjectMachineIdentityJSONBodyRoles0(v CreateProjectMachineIdentityJSONBodyRoles0) error {
+// FromUpdateOrganizationJSONBodySecretShareBrandConfigPrimaryColor00 overwrites any union data inside the UpdateOrganizationJSONBodySecretShareBrandConfigPrimaryColor0 as the provided UpdateOrganizationJSONBodySecretShareBrandConfigPrimaryColor00
+func (t *UpdateOrganizationJSONBodySecretShareBrandConfigPrimaryColor0) FromUpdateOrganizationJSONBodySecretShareBrandConfigPrimaryColor00(v UpdateOrganizationJSONBodySecretShareBrandConfigPrimaryColor00) error {
b, err := json.Marshal(v)
t.union = b
return err
}
-// MergeCreateProjectMachineIdentityJSONBodyRoles0 performs a merge with any union data inside the CreateProjectMachineIdentityJSONBody_Roles_Item, using the provided CreateProjectMachineIdentityJSONBodyRoles0
-func (t *CreateProjectMachineIdentityJSONBody_Roles_Item) MergeCreateProjectMachineIdentityJSONBodyRoles0(v CreateProjectMachineIdentityJSONBodyRoles0) error {
+// MergeUpdateOrganizationJSONBodySecretShareBrandConfigPrimaryColor00 performs a merge with any union data inside the UpdateOrganizationJSONBodySecretShareBrandConfigPrimaryColor0, using the provided UpdateOrganizationJSONBodySecretShareBrandConfigPrimaryColor00
+func (t *UpdateOrganizationJSONBodySecretShareBrandConfigPrimaryColor0) MergeUpdateOrganizationJSONBodySecretShareBrandConfigPrimaryColor00(v UpdateOrganizationJSONBodySecretShareBrandConfigPrimaryColor00) error {
b, err := json.Marshal(v)
if err != nil {
return err
@@ -14801,22 +16624,22 @@ func (t *CreateProjectMachineIdentityJSONBody_Roles_Item) MergeCreateProjectMach
return err
}
-// AsCreateProjectMachineIdentityJSONBodyRoles1 returns the union data inside the CreateProjectMachineIdentityJSONBody_Roles_Item as a CreateProjectMachineIdentityJSONBodyRoles1
-func (t CreateProjectMachineIdentityJSONBody_Roles_Item) AsCreateProjectMachineIdentityJSONBodyRoles1() (CreateProjectMachineIdentityJSONBodyRoles1, error) {
- var body CreateProjectMachineIdentityJSONBodyRoles1
+// AsUpdateOrganizationJSONBodySecretShareBrandConfigPrimaryColor01 returns the union data inside the UpdateOrganizationJSONBodySecretShareBrandConfigPrimaryColor0 as a UpdateOrganizationJSONBodySecretShareBrandConfigPrimaryColor01
+func (t UpdateOrganizationJSONBodySecretShareBrandConfigPrimaryColor0) AsUpdateOrganizationJSONBodySecretShareBrandConfigPrimaryColor01() (UpdateOrganizationJSONBodySecretShareBrandConfigPrimaryColor01, error) {
+ var body UpdateOrganizationJSONBodySecretShareBrandConfigPrimaryColor01
err := json.Unmarshal(t.union, &body)
return body, err
}
-// FromCreateProjectMachineIdentityJSONBodyRoles1 overwrites any union data inside the CreateProjectMachineIdentityJSONBody_Roles_Item as the provided CreateProjectMachineIdentityJSONBodyRoles1
-func (t *CreateProjectMachineIdentityJSONBody_Roles_Item) FromCreateProjectMachineIdentityJSONBodyRoles1(v CreateProjectMachineIdentityJSONBodyRoles1) error {
+// FromUpdateOrganizationJSONBodySecretShareBrandConfigPrimaryColor01 overwrites any union data inside the UpdateOrganizationJSONBodySecretShareBrandConfigPrimaryColor0 as the provided UpdateOrganizationJSONBodySecretShareBrandConfigPrimaryColor01
+func (t *UpdateOrganizationJSONBodySecretShareBrandConfigPrimaryColor0) FromUpdateOrganizationJSONBodySecretShareBrandConfigPrimaryColor01(v UpdateOrganizationJSONBodySecretShareBrandConfigPrimaryColor01) error {
b, err := json.Marshal(v)
t.union = b
return err
}
-// MergeCreateProjectMachineIdentityJSONBodyRoles1 performs a merge with any union data inside the CreateProjectMachineIdentityJSONBody_Roles_Item, using the provided CreateProjectMachineIdentityJSONBodyRoles1
-func (t *CreateProjectMachineIdentityJSONBody_Roles_Item) MergeCreateProjectMachineIdentityJSONBodyRoles1(v CreateProjectMachineIdentityJSONBodyRoles1) error {
+// MergeUpdateOrganizationJSONBodySecretShareBrandConfigPrimaryColor01 performs a merge with any union data inside the UpdateOrganizationJSONBodySecretShareBrandConfigPrimaryColor0, using the provided UpdateOrganizationJSONBodySecretShareBrandConfigPrimaryColor01
+func (t *UpdateOrganizationJSONBodySecretShareBrandConfigPrimaryColor0) MergeUpdateOrganizationJSONBodySecretShareBrandConfigPrimaryColor01(v UpdateOrganizationJSONBodySecretShareBrandConfigPrimaryColor01) error {
b, err := json.Marshal(v)
if err != nil {
return err
@@ -14827,32 +16650,32 @@ func (t *CreateProjectMachineIdentityJSONBody_Roles_Item) MergeCreateProjectMach
return err
}
-func (t CreateProjectMachineIdentityJSONBody_Roles_Item) MarshalJSON() ([]byte, error) {
+func (t UpdateOrganizationJSONBodySecretShareBrandConfigPrimaryColor0) MarshalJSON() ([]byte, error) {
b, err := t.union.MarshalJSON()
return b, err
}
-func (t *CreateProjectMachineIdentityJSONBody_Roles_Item) UnmarshalJSON(b []byte) error {
+func (t *UpdateOrganizationJSONBodySecretShareBrandConfigPrimaryColor0) UnmarshalJSON(b []byte) error {
err := t.union.UnmarshalJSON(b)
return err
}
-// AsCreateProjectGroupMembershipJSONBodyRoles0 returns the union data inside the CreateProjectGroupMembershipJSONBody_Roles_Item as a CreateProjectGroupMembershipJSONBodyRoles0
-func (t CreateProjectGroupMembershipJSONBody_Roles_Item) AsCreateProjectGroupMembershipJSONBodyRoles0() (CreateProjectGroupMembershipJSONBodyRoles0, error) {
- var body CreateProjectGroupMembershipJSONBodyRoles0
+// AsUpdateOrganizationJSONBodySecretShareBrandConfigPrimaryColor0 returns the union data inside the UpdateOrganizationJSONBody_SecretShareBrandConfig_PrimaryColor as a UpdateOrganizationJSONBodySecretShareBrandConfigPrimaryColor0
+func (t UpdateOrganizationJSONBody_SecretShareBrandConfig_PrimaryColor) AsUpdateOrganizationJSONBodySecretShareBrandConfigPrimaryColor0() (UpdateOrganizationJSONBodySecretShareBrandConfigPrimaryColor0, error) {
+ var body UpdateOrganizationJSONBodySecretShareBrandConfigPrimaryColor0
err := json.Unmarshal(t.union, &body)
return body, err
}
-// FromCreateProjectGroupMembershipJSONBodyRoles0 overwrites any union data inside the CreateProjectGroupMembershipJSONBody_Roles_Item as the provided CreateProjectGroupMembershipJSONBodyRoles0
-func (t *CreateProjectGroupMembershipJSONBody_Roles_Item) FromCreateProjectGroupMembershipJSONBodyRoles0(v CreateProjectGroupMembershipJSONBodyRoles0) error {
+// FromUpdateOrganizationJSONBodySecretShareBrandConfigPrimaryColor0 overwrites any union data inside the UpdateOrganizationJSONBody_SecretShareBrandConfig_PrimaryColor as the provided UpdateOrganizationJSONBodySecretShareBrandConfigPrimaryColor0
+func (t *UpdateOrganizationJSONBody_SecretShareBrandConfig_PrimaryColor) FromUpdateOrganizationJSONBodySecretShareBrandConfigPrimaryColor0(v UpdateOrganizationJSONBodySecretShareBrandConfigPrimaryColor0) error {
b, err := json.Marshal(v)
t.union = b
return err
}
-// MergeCreateProjectGroupMembershipJSONBodyRoles0 performs a merge with any union data inside the CreateProjectGroupMembershipJSONBody_Roles_Item, using the provided CreateProjectGroupMembershipJSONBodyRoles0
-func (t *CreateProjectGroupMembershipJSONBody_Roles_Item) MergeCreateProjectGroupMembershipJSONBodyRoles0(v CreateProjectGroupMembershipJSONBodyRoles0) error {
+// MergeUpdateOrganizationJSONBodySecretShareBrandConfigPrimaryColor0 performs a merge with any union data inside the UpdateOrganizationJSONBody_SecretShareBrandConfig_PrimaryColor, using the provided UpdateOrganizationJSONBodySecretShareBrandConfigPrimaryColor0
+func (t *UpdateOrganizationJSONBody_SecretShareBrandConfig_PrimaryColor) MergeUpdateOrganizationJSONBodySecretShareBrandConfigPrimaryColor0(v UpdateOrganizationJSONBodySecretShareBrandConfigPrimaryColor0) error {
b, err := json.Marshal(v)
if err != nil {
return err
@@ -14863,22 +16686,22 @@ func (t *CreateProjectGroupMembershipJSONBody_Roles_Item) MergeCreateProjectGrou
return err
}
-// AsCreateProjectGroupMembershipJSONBodyRoles1 returns the union data inside the CreateProjectGroupMembershipJSONBody_Roles_Item as a CreateProjectGroupMembershipJSONBodyRoles1
-func (t CreateProjectGroupMembershipJSONBody_Roles_Item) AsCreateProjectGroupMembershipJSONBodyRoles1() (CreateProjectGroupMembershipJSONBodyRoles1, error) {
- var body CreateProjectGroupMembershipJSONBodyRoles1
+// AsUpdateOrganizationJSONBodySecretShareBrandConfigPrimaryColor1 returns the union data inside the UpdateOrganizationJSONBody_SecretShareBrandConfig_PrimaryColor as a UpdateOrganizationJSONBodySecretShareBrandConfigPrimaryColor1
+func (t UpdateOrganizationJSONBody_SecretShareBrandConfig_PrimaryColor) AsUpdateOrganizationJSONBodySecretShareBrandConfigPrimaryColor1() (UpdateOrganizationJSONBodySecretShareBrandConfigPrimaryColor1, error) {
+ var body UpdateOrganizationJSONBodySecretShareBrandConfigPrimaryColor1
err := json.Unmarshal(t.union, &body)
return body, err
}
-// FromCreateProjectGroupMembershipJSONBodyRoles1 overwrites any union data inside the CreateProjectGroupMembershipJSONBody_Roles_Item as the provided CreateProjectGroupMembershipJSONBodyRoles1
-func (t *CreateProjectGroupMembershipJSONBody_Roles_Item) FromCreateProjectGroupMembershipJSONBodyRoles1(v CreateProjectGroupMembershipJSONBodyRoles1) error {
+// FromUpdateOrganizationJSONBodySecretShareBrandConfigPrimaryColor1 overwrites any union data inside the UpdateOrganizationJSONBody_SecretShareBrandConfig_PrimaryColor as the provided UpdateOrganizationJSONBodySecretShareBrandConfigPrimaryColor1
+func (t *UpdateOrganizationJSONBody_SecretShareBrandConfig_PrimaryColor) FromUpdateOrganizationJSONBodySecretShareBrandConfigPrimaryColor1(v UpdateOrganizationJSONBodySecretShareBrandConfigPrimaryColor1) error {
b, err := json.Marshal(v)
t.union = b
return err
}
-// MergeCreateProjectGroupMembershipJSONBodyRoles1 performs a merge with any union data inside the CreateProjectGroupMembershipJSONBody_Roles_Item, using the provided CreateProjectGroupMembershipJSONBodyRoles1
-func (t *CreateProjectGroupMembershipJSONBody_Roles_Item) MergeCreateProjectGroupMembershipJSONBodyRoles1(v CreateProjectGroupMembershipJSONBodyRoles1) error {
+// MergeUpdateOrganizationJSONBodySecretShareBrandConfigPrimaryColor1 performs a merge with any union data inside the UpdateOrganizationJSONBody_SecretShareBrandConfig_PrimaryColor, using the provided UpdateOrganizationJSONBodySecretShareBrandConfigPrimaryColor1
+func (t *UpdateOrganizationJSONBody_SecretShareBrandConfig_PrimaryColor) MergeUpdateOrganizationJSONBodySecretShareBrandConfigPrimaryColor1(v UpdateOrganizationJSONBodySecretShareBrandConfigPrimaryColor1) error {
b, err := json.Marshal(v)
if err != nil {
return err
@@ -14889,32 +16712,32 @@ func (t *CreateProjectGroupMembershipJSONBody_Roles_Item) MergeCreateProjectGrou
return err
}
-func (t CreateProjectGroupMembershipJSONBody_Roles_Item) MarshalJSON() ([]byte, error) {
+func (t UpdateOrganizationJSONBody_SecretShareBrandConfig_PrimaryColor) MarshalJSON() ([]byte, error) {
b, err := t.union.MarshalJSON()
return b, err
}
-func (t *CreateProjectGroupMembershipJSONBody_Roles_Item) UnmarshalJSON(b []byte) error {
+func (t *UpdateOrganizationJSONBody_SecretShareBrandConfig_PrimaryColor) UnmarshalJSON(b []byte) error {
err := t.union.UnmarshalJSON(b)
return err
}
-// AsCreateProjectIdentityMembershipJSONBodyRoles0 returns the union data inside the CreateProjectIdentityMembershipJSONBody_Roles_Item as a CreateProjectIdentityMembershipJSONBodyRoles0
-func (t CreateProjectIdentityMembershipJSONBody_Roles_Item) AsCreateProjectIdentityMembershipJSONBodyRoles0() (CreateProjectIdentityMembershipJSONBodyRoles0, error) {
- var body CreateProjectIdentityMembershipJSONBodyRoles0
+// AsUpdateOrganizationJSONBodySecretShareBrandConfigSecondaryColor00 returns the union data inside the UpdateOrganizationJSONBodySecretShareBrandConfigSecondaryColor0 as a UpdateOrganizationJSONBodySecretShareBrandConfigSecondaryColor00
+func (t UpdateOrganizationJSONBodySecretShareBrandConfigSecondaryColor0) AsUpdateOrganizationJSONBodySecretShareBrandConfigSecondaryColor00() (UpdateOrganizationJSONBodySecretShareBrandConfigSecondaryColor00, error) {
+ var body UpdateOrganizationJSONBodySecretShareBrandConfigSecondaryColor00
err := json.Unmarshal(t.union, &body)
return body, err
}
-// FromCreateProjectIdentityMembershipJSONBodyRoles0 overwrites any union data inside the CreateProjectIdentityMembershipJSONBody_Roles_Item as the provided CreateProjectIdentityMembershipJSONBodyRoles0
-func (t *CreateProjectIdentityMembershipJSONBody_Roles_Item) FromCreateProjectIdentityMembershipJSONBodyRoles0(v CreateProjectIdentityMembershipJSONBodyRoles0) error {
+// FromUpdateOrganizationJSONBodySecretShareBrandConfigSecondaryColor00 overwrites any union data inside the UpdateOrganizationJSONBodySecretShareBrandConfigSecondaryColor0 as the provided UpdateOrganizationJSONBodySecretShareBrandConfigSecondaryColor00
+func (t *UpdateOrganizationJSONBodySecretShareBrandConfigSecondaryColor0) FromUpdateOrganizationJSONBodySecretShareBrandConfigSecondaryColor00(v UpdateOrganizationJSONBodySecretShareBrandConfigSecondaryColor00) error {
b, err := json.Marshal(v)
t.union = b
return err
}
-// MergeCreateProjectIdentityMembershipJSONBodyRoles0 performs a merge with any union data inside the CreateProjectIdentityMembershipJSONBody_Roles_Item, using the provided CreateProjectIdentityMembershipJSONBodyRoles0
-func (t *CreateProjectIdentityMembershipJSONBody_Roles_Item) MergeCreateProjectIdentityMembershipJSONBodyRoles0(v CreateProjectIdentityMembershipJSONBodyRoles0) error {
+// MergeUpdateOrganizationJSONBodySecretShareBrandConfigSecondaryColor00 performs a merge with any union data inside the UpdateOrganizationJSONBodySecretShareBrandConfigSecondaryColor0, using the provided UpdateOrganizationJSONBodySecretShareBrandConfigSecondaryColor00
+func (t *UpdateOrganizationJSONBodySecretShareBrandConfigSecondaryColor0) MergeUpdateOrganizationJSONBodySecretShareBrandConfigSecondaryColor00(v UpdateOrganizationJSONBodySecretShareBrandConfigSecondaryColor00) error {
b, err := json.Marshal(v)
if err != nil {
return err
@@ -14925,7 +16748,317 @@ func (t *CreateProjectIdentityMembershipJSONBody_Roles_Item) MergeCreateProjectI
return err
}
-// AsCreateProjectIdentityMembershipJSONBodyRoles1 returns the union data inside the CreateProjectIdentityMembershipJSONBody_Roles_Item as a CreateProjectIdentityMembershipJSONBodyRoles1
+// AsUpdateOrganizationJSONBodySecretShareBrandConfigSecondaryColor01 returns the union data inside the UpdateOrganizationJSONBodySecretShareBrandConfigSecondaryColor0 as a UpdateOrganizationJSONBodySecretShareBrandConfigSecondaryColor01
+func (t UpdateOrganizationJSONBodySecretShareBrandConfigSecondaryColor0) AsUpdateOrganizationJSONBodySecretShareBrandConfigSecondaryColor01() (UpdateOrganizationJSONBodySecretShareBrandConfigSecondaryColor01, error) {
+ var body UpdateOrganizationJSONBodySecretShareBrandConfigSecondaryColor01
+ err := json.Unmarshal(t.union, &body)
+ return body, err
+}
+
+// FromUpdateOrganizationJSONBodySecretShareBrandConfigSecondaryColor01 overwrites any union data inside the UpdateOrganizationJSONBodySecretShareBrandConfigSecondaryColor0 as the provided UpdateOrganizationJSONBodySecretShareBrandConfigSecondaryColor01
+func (t *UpdateOrganizationJSONBodySecretShareBrandConfigSecondaryColor0) FromUpdateOrganizationJSONBodySecretShareBrandConfigSecondaryColor01(v UpdateOrganizationJSONBodySecretShareBrandConfigSecondaryColor01) error {
+ b, err := json.Marshal(v)
+ t.union = b
+ return err
+}
+
+// MergeUpdateOrganizationJSONBodySecretShareBrandConfigSecondaryColor01 performs a merge with any union data inside the UpdateOrganizationJSONBodySecretShareBrandConfigSecondaryColor0, using the provided UpdateOrganizationJSONBodySecretShareBrandConfigSecondaryColor01
+func (t *UpdateOrganizationJSONBodySecretShareBrandConfigSecondaryColor0) MergeUpdateOrganizationJSONBodySecretShareBrandConfigSecondaryColor01(v UpdateOrganizationJSONBodySecretShareBrandConfigSecondaryColor01) 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 UpdateOrganizationJSONBodySecretShareBrandConfigSecondaryColor0) MarshalJSON() ([]byte, error) {
+ b, err := t.union.MarshalJSON()
+ return b, err
+}
+
+func (t *UpdateOrganizationJSONBodySecretShareBrandConfigSecondaryColor0) UnmarshalJSON(b []byte) error {
+ err := t.union.UnmarshalJSON(b)
+ return err
+}
+
+// AsUpdateOrganizationJSONBodySecretShareBrandConfigSecondaryColor0 returns the union data inside the UpdateOrganizationJSONBody_SecretShareBrandConfig_SecondaryColor as a UpdateOrganizationJSONBodySecretShareBrandConfigSecondaryColor0
+func (t UpdateOrganizationJSONBody_SecretShareBrandConfig_SecondaryColor) AsUpdateOrganizationJSONBodySecretShareBrandConfigSecondaryColor0() (UpdateOrganizationJSONBodySecretShareBrandConfigSecondaryColor0, error) {
+ var body UpdateOrganizationJSONBodySecretShareBrandConfigSecondaryColor0
+ err := json.Unmarshal(t.union, &body)
+ return body, err
+}
+
+// FromUpdateOrganizationJSONBodySecretShareBrandConfigSecondaryColor0 overwrites any union data inside the UpdateOrganizationJSONBody_SecretShareBrandConfig_SecondaryColor as the provided UpdateOrganizationJSONBodySecretShareBrandConfigSecondaryColor0
+func (t *UpdateOrganizationJSONBody_SecretShareBrandConfig_SecondaryColor) FromUpdateOrganizationJSONBodySecretShareBrandConfigSecondaryColor0(v UpdateOrganizationJSONBodySecretShareBrandConfigSecondaryColor0) error {
+ b, err := json.Marshal(v)
+ t.union = b
+ return err
+}
+
+// MergeUpdateOrganizationJSONBodySecretShareBrandConfigSecondaryColor0 performs a merge with any union data inside the UpdateOrganizationJSONBody_SecretShareBrandConfig_SecondaryColor, using the provided UpdateOrganizationJSONBodySecretShareBrandConfigSecondaryColor0
+func (t *UpdateOrganizationJSONBody_SecretShareBrandConfig_SecondaryColor) MergeUpdateOrganizationJSONBodySecretShareBrandConfigSecondaryColor0(v UpdateOrganizationJSONBodySecretShareBrandConfigSecondaryColor0) error {
+ b, err := json.Marshal(v)
+ if err != nil {
+ return err
+ }
+
+ merged, err := runtime.JSONMerge(t.union, b)
+ t.union = merged
+ return err
+}
+
+// AsUpdateOrganizationJSONBodySecretShareBrandConfigSecondaryColor1 returns the union data inside the UpdateOrganizationJSONBody_SecretShareBrandConfig_SecondaryColor as a UpdateOrganizationJSONBodySecretShareBrandConfigSecondaryColor1
+func (t UpdateOrganizationJSONBody_SecretShareBrandConfig_SecondaryColor) AsUpdateOrganizationJSONBodySecretShareBrandConfigSecondaryColor1() (UpdateOrganizationJSONBodySecretShareBrandConfigSecondaryColor1, error) {
+ var body UpdateOrganizationJSONBodySecretShareBrandConfigSecondaryColor1
+ err := json.Unmarshal(t.union, &body)
+ return body, err
+}
+
+// FromUpdateOrganizationJSONBodySecretShareBrandConfigSecondaryColor1 overwrites any union data inside the UpdateOrganizationJSONBody_SecretShareBrandConfig_SecondaryColor as the provided UpdateOrganizationJSONBodySecretShareBrandConfigSecondaryColor1
+func (t *UpdateOrganizationJSONBody_SecretShareBrandConfig_SecondaryColor) FromUpdateOrganizationJSONBodySecretShareBrandConfigSecondaryColor1(v UpdateOrganizationJSONBodySecretShareBrandConfigSecondaryColor1) error {
+ b, err := json.Marshal(v)
+ t.union = b
+ return err
+}
+
+// MergeUpdateOrganizationJSONBodySecretShareBrandConfigSecondaryColor1 performs a merge with any union data inside the UpdateOrganizationJSONBody_SecretShareBrandConfig_SecondaryColor, using the provided UpdateOrganizationJSONBodySecretShareBrandConfigSecondaryColor1
+func (t *UpdateOrganizationJSONBody_SecretShareBrandConfig_SecondaryColor) MergeUpdateOrganizationJSONBodySecretShareBrandConfigSecondaryColor1(v UpdateOrganizationJSONBodySecretShareBrandConfigSecondaryColor1) 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 UpdateOrganizationJSONBody_SecretShareBrandConfig_SecondaryColor) MarshalJSON() ([]byte, error) {
+ b, err := t.union.MarshalJSON()
+ return b, err
+}
+
+func (t *UpdateOrganizationJSONBody_SecretShareBrandConfig_SecondaryColor) UnmarshalJSON(b []byte) error {
+ err := t.union.UnmarshalJSON(b)
+ return err
+}
+
+// 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
+}
+
+// AsCreateProjectMachineIdentityJSONBodyRoles0 returns the union data inside the CreateProjectMachineIdentityJSONBody_Roles_Item as a CreateProjectMachineIdentityJSONBodyRoles0
+func (t CreateProjectMachineIdentityJSONBody_Roles_Item) AsCreateProjectMachineIdentityJSONBodyRoles0() (CreateProjectMachineIdentityJSONBodyRoles0, error) {
+ var body CreateProjectMachineIdentityJSONBodyRoles0
+ err := json.Unmarshal(t.union, &body)
+ return body, err
+}
+
+// FromCreateProjectMachineIdentityJSONBodyRoles0 overwrites any union data inside the CreateProjectMachineIdentityJSONBody_Roles_Item as the provided CreateProjectMachineIdentityJSONBodyRoles0
+func (t *CreateProjectMachineIdentityJSONBody_Roles_Item) FromCreateProjectMachineIdentityJSONBodyRoles0(v CreateProjectMachineIdentityJSONBodyRoles0) error {
+ b, err := json.Marshal(v)
+ t.union = b
+ return err
+}
+
+// MergeCreateProjectMachineIdentityJSONBodyRoles0 performs a merge with any union data inside the CreateProjectMachineIdentityJSONBody_Roles_Item, using the provided CreateProjectMachineIdentityJSONBodyRoles0
+func (t *CreateProjectMachineIdentityJSONBody_Roles_Item) MergeCreateProjectMachineIdentityJSONBodyRoles0(v CreateProjectMachineIdentityJSONBodyRoles0) error {
+ b, err := json.Marshal(v)
+ if err != nil {
+ return err
+ }
+
+ merged, err := runtime.JSONMerge(t.union, b)
+ t.union = merged
+ return err
+}
+
+// AsCreateProjectMachineIdentityJSONBodyRoles1 returns the union data inside the CreateProjectMachineIdentityJSONBody_Roles_Item as a CreateProjectMachineIdentityJSONBodyRoles1
+func (t CreateProjectMachineIdentityJSONBody_Roles_Item) AsCreateProjectMachineIdentityJSONBodyRoles1() (CreateProjectMachineIdentityJSONBodyRoles1, error) {
+ var body CreateProjectMachineIdentityJSONBodyRoles1
+ err := json.Unmarshal(t.union, &body)
+ return body, err
+}
+
+// FromCreateProjectMachineIdentityJSONBodyRoles1 overwrites any union data inside the CreateProjectMachineIdentityJSONBody_Roles_Item as the provided CreateProjectMachineIdentityJSONBodyRoles1
+func (t *CreateProjectMachineIdentityJSONBody_Roles_Item) FromCreateProjectMachineIdentityJSONBodyRoles1(v CreateProjectMachineIdentityJSONBodyRoles1) error {
+ b, err := json.Marshal(v)
+ t.union = b
+ return err
+}
+
+// MergeCreateProjectMachineIdentityJSONBodyRoles1 performs a merge with any union data inside the CreateProjectMachineIdentityJSONBody_Roles_Item, using the provided CreateProjectMachineIdentityJSONBodyRoles1
+func (t *CreateProjectMachineIdentityJSONBody_Roles_Item) MergeCreateProjectMachineIdentityJSONBodyRoles1(v CreateProjectMachineIdentityJSONBodyRoles1) 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 CreateProjectMachineIdentityJSONBody_Roles_Item) MarshalJSON() ([]byte, error) {
+ b, err := t.union.MarshalJSON()
+ return b, err
+}
+
+func (t *CreateProjectMachineIdentityJSONBody_Roles_Item) UnmarshalJSON(b []byte) error {
+ err := t.union.UnmarshalJSON(b)
+ return err
+}
+
+// AsCreateProjectGroupMembershipJSONBodyRoles0 returns the union data inside the CreateProjectGroupMembershipJSONBody_Roles_Item as a CreateProjectGroupMembershipJSONBodyRoles0
+func (t CreateProjectGroupMembershipJSONBody_Roles_Item) AsCreateProjectGroupMembershipJSONBodyRoles0() (CreateProjectGroupMembershipJSONBodyRoles0, error) {
+ var body CreateProjectGroupMembershipJSONBodyRoles0
+ err := json.Unmarshal(t.union, &body)
+ return body, err
+}
+
+// FromCreateProjectGroupMembershipJSONBodyRoles0 overwrites any union data inside the CreateProjectGroupMembershipJSONBody_Roles_Item as the provided CreateProjectGroupMembershipJSONBodyRoles0
+func (t *CreateProjectGroupMembershipJSONBody_Roles_Item) FromCreateProjectGroupMembershipJSONBodyRoles0(v CreateProjectGroupMembershipJSONBodyRoles0) error {
+ b, err := json.Marshal(v)
+ t.union = b
+ return err
+}
+
+// MergeCreateProjectGroupMembershipJSONBodyRoles0 performs a merge with any union data inside the CreateProjectGroupMembershipJSONBody_Roles_Item, using the provided CreateProjectGroupMembershipJSONBodyRoles0
+func (t *CreateProjectGroupMembershipJSONBody_Roles_Item) MergeCreateProjectGroupMembershipJSONBodyRoles0(v CreateProjectGroupMembershipJSONBodyRoles0) error {
+ b, err := json.Marshal(v)
+ if err != nil {
+ return err
+ }
+
+ merged, err := runtime.JSONMerge(t.union, b)
+ t.union = merged
+ return err
+}
+
+// AsCreateProjectGroupMembershipJSONBodyRoles1 returns the union data inside the CreateProjectGroupMembershipJSONBody_Roles_Item as a CreateProjectGroupMembershipJSONBodyRoles1
+func (t CreateProjectGroupMembershipJSONBody_Roles_Item) AsCreateProjectGroupMembershipJSONBodyRoles1() (CreateProjectGroupMembershipJSONBodyRoles1, error) {
+ var body CreateProjectGroupMembershipJSONBodyRoles1
+ err := json.Unmarshal(t.union, &body)
+ return body, err
+}
+
+// FromCreateProjectGroupMembershipJSONBodyRoles1 overwrites any union data inside the CreateProjectGroupMembershipJSONBody_Roles_Item as the provided CreateProjectGroupMembershipJSONBodyRoles1
+func (t *CreateProjectGroupMembershipJSONBody_Roles_Item) FromCreateProjectGroupMembershipJSONBodyRoles1(v CreateProjectGroupMembershipJSONBodyRoles1) error {
+ b, err := json.Marshal(v)
+ t.union = b
+ return err
+}
+
+// MergeCreateProjectGroupMembershipJSONBodyRoles1 performs a merge with any union data inside the CreateProjectGroupMembershipJSONBody_Roles_Item, using the provided CreateProjectGroupMembershipJSONBodyRoles1
+func (t *CreateProjectGroupMembershipJSONBody_Roles_Item) MergeCreateProjectGroupMembershipJSONBodyRoles1(v CreateProjectGroupMembershipJSONBodyRoles1) 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 CreateProjectGroupMembershipJSONBody_Roles_Item) MarshalJSON() ([]byte, error) {
+ b, err := t.union.MarshalJSON()
+ return b, err
+}
+
+func (t *CreateProjectGroupMembershipJSONBody_Roles_Item) UnmarshalJSON(b []byte) error {
+ err := t.union.UnmarshalJSON(b)
+ return err
+}
+
+// AsCreateProjectIdentityMembershipJSONBodyRoles0 returns the union data inside the CreateProjectIdentityMembershipJSONBody_Roles_Item as a CreateProjectIdentityMembershipJSONBodyRoles0
+func (t CreateProjectIdentityMembershipJSONBody_Roles_Item) AsCreateProjectIdentityMembershipJSONBodyRoles0() (CreateProjectIdentityMembershipJSONBodyRoles0, error) {
+ var body CreateProjectIdentityMembershipJSONBodyRoles0
+ err := json.Unmarshal(t.union, &body)
+ return body, err
+}
+
+// FromCreateProjectIdentityMembershipJSONBodyRoles0 overwrites any union data inside the CreateProjectIdentityMembershipJSONBody_Roles_Item as the provided CreateProjectIdentityMembershipJSONBodyRoles0
+func (t *CreateProjectIdentityMembershipJSONBody_Roles_Item) FromCreateProjectIdentityMembershipJSONBodyRoles0(v CreateProjectIdentityMembershipJSONBodyRoles0) error {
+ b, err := json.Marshal(v)
+ t.union = b
+ return err
+}
+
+// MergeCreateProjectIdentityMembershipJSONBodyRoles0 performs a merge with any union data inside the CreateProjectIdentityMembershipJSONBody_Roles_Item, using the provided CreateProjectIdentityMembershipJSONBodyRoles0
+func (t *CreateProjectIdentityMembershipJSONBody_Roles_Item) MergeCreateProjectIdentityMembershipJSONBodyRoles0(v CreateProjectIdentityMembershipJSONBodyRoles0) error {
+ b, err := json.Marshal(v)
+ if err != nil {
+ return err
+ }
+
+ merged, err := runtime.JSONMerge(t.union, b)
+ t.union = merged
+ return err
+}
+
+// AsCreateProjectIdentityMembershipJSONBodyRoles1 returns the union data inside the CreateProjectIdentityMembershipJSONBody_Roles_Item as a CreateProjectIdentityMembershipJSONBodyRoles1
func (t CreateProjectIdentityMembershipJSONBody_Roles_Item) AsCreateProjectIdentityMembershipJSONBodyRoles1() (CreateProjectIdentityMembershipJSONBodyRoles1, error) {
var body CreateProjectIdentityMembershipJSONBodyRoles1
err := json.Unmarshal(t.union, &body)
@@ -16374,6 +18507,36 @@ type ClientInterface interface {
// 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.
GetInstanceStatus(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
+ // ListAccessApprovalPolicies performs a GET /api/v1/access-approvals/policies (the `ListAccessApprovalPolicies` operationId) request.
+ ListAccessApprovalPolicies(ctx context.Context, params *ListAccessApprovalPoliciesParams, reqEditors ...RequestEditorFn) (*http.Response, error)
+
+ // CreateAccessApprovalPolicyWithBody performs a POST /api/v1/access-approvals/policies (the `CreateAccessApprovalPolicy` operationId) request,
+ // with any type of body and a specified content type.
+ CreateAccessApprovalPolicyWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
+
+ // CreateAccessApprovalPolicy performs a POST /api/v1/access-approvals/policies (the `CreateAccessApprovalPolicy` operationId) request.
+ // Takes a body of the `application/json` content type.
+ CreateAccessApprovalPolicy(ctx context.Context, body CreateAccessApprovalPolicyJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
+
+ // GetAccessApprovalPolicy performs a GET /api/v1/access-approvals/policies/{policyId} (the `GetAccessApprovalPolicy` operationId) request.
+ GetAccessApprovalPolicy(ctx context.Context, policyId string, reqEditors ...RequestEditorFn) (*http.Response, error)
+
+ // UpdateAccessApprovalPolicyWithBody performs a PATCH /api/v1/access-approvals/policies/{policyId} (the `UpdateAccessApprovalPolicy` operationId) request,
+ // with any type of body and a specified content type.
+ UpdateAccessApprovalPolicyWithBody(ctx context.Context, policyId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
+
+ // UpdateAccessApprovalPolicy performs a PATCH /api/v1/access-approvals/policies/{policyId} (the `UpdateAccessApprovalPolicy` operationId) request.
+ // Takes a body of the `application/json` content type.
+ UpdateAccessApprovalPolicy(ctx context.Context, policyId string, body UpdateAccessApprovalPolicyJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
+
+ // CreateAccessApprovalRequestWithBody performs a POST /api/v1/access-approvals/requests (the `CreateAccessApprovalRequest` operationId) request,
+ // with any type of body and a specified content type.
+ CreateAccessApprovalRequestWithBody(ctx context.Context, params *CreateAccessApprovalRequestParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
+
+ // CreateAccessApprovalRequest performs a POST /api/v1/access-approvals/requests (the `CreateAccessApprovalRequest` operationId) request.
+ // Takes a body of the `application/json` content type.
+ CreateAccessApprovalRequest(ctx context.Context, params *CreateAccessApprovalRequestParams, body CreateAccessApprovalRequestJSONRequestBody, 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)
@@ -16407,6 +18570,18 @@ type ClientInterface interface {
// Delete the specified GitHub Connection.
DeleteGitHubAppConnection(ctx context.Context, connectionId openapi_types.UUID, reqEditors ...RequestEditorFn) (*http.Response, error)
+ // CreateServiceNowAppConnectionWithBody performs a POST /api/v1/app-connections/servicenow (the `CreateServiceNowAppConnection` operationId) request,
+ // with any type of body and a specified content type.
+ //
+ // Create a ServiceNow Connection.
+ CreateServiceNowAppConnectionWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
+
+ // CreateServiceNowAppConnection performs a POST /api/v1/app-connections/servicenow (the `CreateServiceNowAppConnection` operationId) request.
+ // Takes a body of the `application/json` content type.
+ //
+ // Create a ServiceNow Connection.
+ CreateServiceNowAppConnection(ctx context.Context, body CreateServiceNowAppConnectionJSONRequestBody, 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)
@@ -16984,6 +19159,116 @@ func (c *Client) GetInstanceStatus(ctx context.Context, reqEditors ...RequestEdi
return c.Client.Do(req)
}
+// ListAccessApprovalPolicies performs a GET /api/v1/access-approvals/policies (the `ListAccessApprovalPolicies` operationId) request.
+func (c *Client) ListAccessApprovalPolicies(ctx context.Context, params *ListAccessApprovalPoliciesParams, reqEditors ...RequestEditorFn) (*http.Response, error) {
+ req, err := NewListAccessApprovalPoliciesRequest(c.Server, 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)
+}
+
+// CreateAccessApprovalPolicyWithBody performs a POST /api/v1/access-approvals/policies (the `CreateAccessApprovalPolicy` operationId) request,
+// with any type of body and a specified content type.
+func (c *Client) CreateAccessApprovalPolicyWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
+ req, err := NewCreateAccessApprovalPolicyRequestWithBody(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)
+}
+
+// CreateAccessApprovalPolicy performs a POST /api/v1/access-approvals/policies (the `CreateAccessApprovalPolicy` operationId) request.
+// Takes a body of the `application/json` content type.
+func (c *Client) CreateAccessApprovalPolicy(ctx context.Context, body CreateAccessApprovalPolicyJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
+ req, err := NewCreateAccessApprovalPolicyRequest(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)
+}
+
+// GetAccessApprovalPolicy performs a GET /api/v1/access-approvals/policies/{policyId} (the `GetAccessApprovalPolicy` operationId) request.
+func (c *Client) GetAccessApprovalPolicy(ctx context.Context, policyId string, reqEditors ...RequestEditorFn) (*http.Response, error) {
+ req, err := NewGetAccessApprovalPolicyRequest(c.Server, policyId)
+ 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)
+}
+
+// UpdateAccessApprovalPolicyWithBody performs a PATCH /api/v1/access-approvals/policies/{policyId} (the `UpdateAccessApprovalPolicy` operationId) request,
+// with any type of body and a specified content type.
+func (c *Client) UpdateAccessApprovalPolicyWithBody(ctx context.Context, policyId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
+ req, err := NewUpdateAccessApprovalPolicyRequestWithBody(c.Server, policyId, 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)
+}
+
+// UpdateAccessApprovalPolicy performs a PATCH /api/v1/access-approvals/policies/{policyId} (the `UpdateAccessApprovalPolicy` operationId) request.
+// Takes a body of the `application/json` content type.
+func (c *Client) UpdateAccessApprovalPolicy(ctx context.Context, policyId string, body UpdateAccessApprovalPolicyJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
+ req, err := NewUpdateAccessApprovalPolicyRequest(c.Server, policyId, 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)
+}
+
+// CreateAccessApprovalRequestWithBody performs a POST /api/v1/access-approvals/requests (the `CreateAccessApprovalRequest` operationId) request,
+// with any type of body and a specified content type.
+func (c *Client) CreateAccessApprovalRequestWithBody(ctx context.Context, params *CreateAccessApprovalRequestParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
+ req, err := NewCreateAccessApprovalRequestRequestWithBody(c.Server, params, 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)
+}
+
+// CreateAccessApprovalRequest performs a POST /api/v1/access-approvals/requests (the `CreateAccessApprovalRequest` operationId) request.
+// Takes a body of the `application/json` content type.
+func (c *Client) CreateAccessApprovalRequest(ctx context.Context, params *CreateAccessApprovalRequestParams, body CreateAccessApprovalRequestJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
+ req, err := NewCreateAccessApprovalRequestRequest(c.Server, params, 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)
+}
+
// 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) {
@@ -17087,6 +19372,38 @@ func (c *Client) DeleteGitHubAppConnection(ctx context.Context, connectionId ope
return c.Client.Do(req)
}
+// CreateServiceNowAppConnectionWithBody performs a POST /api/v1/app-connections/servicenow (the `CreateServiceNowAppConnection` operationId) request,
+// with any type of body and a specified content type.
+//
+// Create a ServiceNow Connection.
+func (c *Client) CreateServiceNowAppConnectionWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
+ req, err := NewCreateServiceNowAppConnectionRequestWithBody(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)
+}
+
+// CreateServiceNowAppConnection performs a POST /api/v1/app-connections/servicenow (the `CreateServiceNowAppConnection` operationId) request.
+// Takes a body of the `application/json` content type.
+//
+// Create a ServiceNow Connection.
+func (c *Client) CreateServiceNowAppConnection(ctx context.Context, body CreateServiceNowAppConnectionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
+ req, err := NewCreateServiceNowAppConnectionRequest(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)
@@ -18865,6 +21182,240 @@ func NewGetInstanceStatusRequest(server string) (*http.Request, error) {
return req, nil
}
+// NewListAccessApprovalPoliciesRequest constructs an http.Request for the ListAccessApprovalPolicies method
+func NewListAccessApprovalPoliciesRequest(server string, params *ListAccessApprovalPoliciesParams) (*http.Request, error) {
+ var err error
+
+ serverURL, err := url.Parse(server)
+ if err != nil {
+ return nil, err
+ }
+
+ operationPath := fmt.Sprintf("/api/v1/access-approvals/policies")
+ 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 queryFrag, err := runtime.StyleParamWithOptions("form", true, "projectSlug", params.ProjectSlug, 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
+}
+
+// NewCreateAccessApprovalPolicyRequest calls the generic CreateAccessApprovalPolicy builder with application/json body
+func NewCreateAccessApprovalPolicyRequest(server string, body CreateAccessApprovalPolicyJSONRequestBody) (*http.Request, error) {
+ var bodyReader io.Reader
+ buf, err := json.Marshal(body)
+ if err != nil {
+ return nil, err
+ }
+ bodyReader = bytes.NewReader(buf)
+ return NewCreateAccessApprovalPolicyRequestWithBody(server, "application/json", bodyReader)
+}
+
+// NewCreateAccessApprovalPolicyRequestWithBody constructs an http.Request for the CreateAccessApprovalPolicy method, with any body, and a specified content type
+func NewCreateAccessApprovalPolicyRequestWithBody(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/access-approvals/policies")
+ 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
+}
+
+// NewGetAccessApprovalPolicyRequest constructs an http.Request for the GetAccessApprovalPolicy method
+func NewGetAccessApprovalPolicyRequest(server string, policyId string) (*http.Request, error) {
+ var err error
+
+ var pathParam0 string
+
+ pathParam0, err = runtime.StyleParamWithOptions("simple", false, "policyId", policyId, 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/access-approvals/policies/%s", pathParam0)
+ 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
+}
+
+// NewUpdateAccessApprovalPolicyRequest calls the generic UpdateAccessApprovalPolicy builder with application/json body
+func NewUpdateAccessApprovalPolicyRequest(server string, policyId string, body UpdateAccessApprovalPolicyJSONRequestBody) (*http.Request, error) {
+ var bodyReader io.Reader
+ buf, err := json.Marshal(body)
+ if err != nil {
+ return nil, err
+ }
+ bodyReader = bytes.NewReader(buf)
+ return NewUpdateAccessApprovalPolicyRequestWithBody(server, policyId, "application/json", bodyReader)
+}
+
+// NewUpdateAccessApprovalPolicyRequestWithBody constructs an http.Request for the UpdateAccessApprovalPolicy method, with any body, and a specified content type
+func NewUpdateAccessApprovalPolicyRequestWithBody(server string, policyId string, contentType string, body io.Reader) (*http.Request, error) {
+ var err error
+
+ var pathParam0 string
+
+ pathParam0, err = runtime.StyleParamWithOptions("simple", false, "policyId", policyId, 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/access-approvals/policies/%s", pathParam0)
+ 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
+}
+
+// NewCreateAccessApprovalRequestRequest calls the generic CreateAccessApprovalRequest builder with application/json body
+func NewCreateAccessApprovalRequestRequest(server string, params *CreateAccessApprovalRequestParams, body CreateAccessApprovalRequestJSONRequestBody) (*http.Request, error) {
+ var bodyReader io.Reader
+ buf, err := json.Marshal(body)
+ if err != nil {
+ return nil, err
+ }
+ bodyReader = bytes.NewReader(buf)
+ return NewCreateAccessApprovalRequestRequestWithBody(server, params, "application/json", bodyReader)
+}
+
+// NewCreateAccessApprovalRequestRequestWithBody constructs an http.Request for the CreateAccessApprovalRequest method, with any body, and a specified content type
+func NewCreateAccessApprovalRequestRequestWithBody(server string, params *CreateAccessApprovalRequestParams, 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/access-approvals/requests")
+ 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 queryFrag, err := runtime.StyleParamWithOptions("form", true, "projectSlug", params.ProjectSlug, 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.MethodPost, queryURL.String(), body)
+ if err != nil {
+ return nil, err
+ }
+
+ req.Header.Add("Content-Type", contentType)
+
+ 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
@@ -19019,6 +21570,46 @@ func NewDeleteGitHubAppConnectionRequest(server string, connectionId openapi_typ
return req, nil
}
+// NewCreateServiceNowAppConnectionRequest calls the generic CreateServiceNowAppConnection builder with application/json body
+func NewCreateServiceNowAppConnectionRequest(server string, body CreateServiceNowAppConnectionJSONRequestBody) (*http.Request, error) {
+ var bodyReader io.Reader
+ buf, err := json.Marshal(body)
+ if err != nil {
+ return nil, err
+ }
+ bodyReader = bytes.NewReader(buf)
+ return NewCreateServiceNowAppConnectionRequestWithBody(server, "application/json", bodyReader)
+}
+
+// NewCreateServiceNowAppConnectionRequestWithBody constructs an http.Request for the CreateServiceNowAppConnection method, with any body, and a specified content type
+func NewCreateServiceNowAppConnectionRequestWithBody(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/app-connections/servicenow")
+ 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
+}
+
// NewRefreshAuthTokenRequest constructs an http.Request for the RefreshAuthToken method
func NewRefreshAuthTokenRequest(server string) (*http.Request, error) {
var err error
@@ -22811,6 +25402,46 @@ type ClientWithResponsesInterface interface {
// Returns a wrapper object for the known response body format(s).
GetInstanceStatusWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetInstanceStatusResponse, error)
+ // ListAccessApprovalPoliciesWithResponse performs a GET /api/v1/access-approvals/policies (the `ListAccessApprovalPolicies` operationId) request.
+ //
+ // Returns a wrapper object for the known response body format(s).
+ ListAccessApprovalPoliciesWithResponse(ctx context.Context, params *ListAccessApprovalPoliciesParams, reqEditors ...RequestEditorFn) (*ListAccessApprovalPoliciesResponse, error)
+
+ // CreateAccessApprovalPolicyWithBodyWithResponse performs a POST /api/v1/access-approvals/policies (the `CreateAccessApprovalPolicy` operationId) request,
+ // with any type of body and a specified content type.
+ //
+ // Returns a wrapper object for the known response body format(s).
+ CreateAccessApprovalPolicyWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateAccessApprovalPolicyResponse, error)
+
+ // CreateAccessApprovalPolicyWithResponse performs a POST /api/v1/access-approvals/policies (the `CreateAccessApprovalPolicy` operationId) request.
+ // Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
+ CreateAccessApprovalPolicyWithResponse(ctx context.Context, body CreateAccessApprovalPolicyJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateAccessApprovalPolicyResponse, error)
+
+ // GetAccessApprovalPolicyWithResponse performs a GET /api/v1/access-approvals/policies/{policyId} (the `GetAccessApprovalPolicy` operationId) request.
+ //
+ // Returns a wrapper object for the known response body format(s).
+ GetAccessApprovalPolicyWithResponse(ctx context.Context, policyId string, reqEditors ...RequestEditorFn) (*GetAccessApprovalPolicyResponse, error)
+
+ // UpdateAccessApprovalPolicyWithBodyWithResponse performs a PATCH /api/v1/access-approvals/policies/{policyId} (the `UpdateAccessApprovalPolicy` operationId) request,
+ // with any type of body and a specified content type.
+ //
+ // Returns a wrapper object for the known response body format(s).
+ UpdateAccessApprovalPolicyWithBodyWithResponse(ctx context.Context, policyId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateAccessApprovalPolicyResponse, error)
+
+ // UpdateAccessApprovalPolicyWithResponse performs a PATCH /api/v1/access-approvals/policies/{policyId} (the `UpdateAccessApprovalPolicy` operationId) request.
+ // Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
+ UpdateAccessApprovalPolicyWithResponse(ctx context.Context, policyId string, body UpdateAccessApprovalPolicyJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateAccessApprovalPolicyResponse, error)
+
+ // CreateAccessApprovalRequestWithBodyWithResponse performs a POST /api/v1/access-approvals/requests (the `CreateAccessApprovalRequest` operationId) request,
+ // with any type of body and a specified content type.
+ //
+ // Returns a wrapper object for the known response body format(s).
+ CreateAccessApprovalRequestWithBodyWithResponse(ctx context.Context, params *CreateAccessApprovalRequestParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateAccessApprovalRequestResponse, error)
+
+ // CreateAccessApprovalRequestWithResponse performs a POST /api/v1/access-approvals/requests (the `CreateAccessApprovalRequest` operationId) request.
+ // Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
+ CreateAccessApprovalRequestWithResponse(ctx context.Context, params *CreateAccessApprovalRequestParams, body CreateAccessApprovalRequestJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateAccessApprovalRequestResponse, error)
+
// AdminBootstrapWithBodyWithResponse performs a POST /api/v1/admin/bootstrap (the `AdminBootstrap` operationId) request,
// with any type of body and a specified content type.
//
@@ -22852,6 +25483,20 @@ type ClientWithResponsesInterface interface {
// Returns a wrapper object for the known response body format(s).
DeleteGitHubAppConnectionWithResponse(ctx context.Context, connectionId openapi_types.UUID, reqEditors ...RequestEditorFn) (*DeleteGitHubAppConnectionResponse, error)
+ // CreateServiceNowAppConnectionWithBodyWithResponse performs a POST /api/v1/app-connections/servicenow (the `CreateServiceNowAppConnection` operationId) request,
+ // with any type of body and a specified content type.
+ //
+ // Create a ServiceNow Connection.
+ //
+ // Returns a wrapper object for the known response body format(s).
+ CreateServiceNowAppConnectionWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateServiceNowAppConnectionResponse, error)
+
+ // CreateServiceNowAppConnectionWithResponse performs a POST /api/v1/app-connections/servicenow (the `CreateServiceNowAppConnection` 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 ServiceNow Connection.
+ CreateServiceNowAppConnectionWithResponse(ctx context.Context, body CreateServiceNowAppConnectionJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateServiceNowAppConnectionResponse, error)
+
// RefreshAuthTokenWithResponse performs a POST /api/v1/auth/token (the `RefreshAuthToken` operationId) request.
//
// Returns a wrapper object for the known response body format(s).
@@ -23733,175 +26378,221 @@ func (r GetInstanceStatusResponse) ContentType() string {
return ""
}
-type AdminBootstrapResponse struct {
+type ListAccessApprovalPoliciesResponse 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"`
+ Approvals *[]struct {
+ AllowedSelfApprovals *bool `json:"allowedSelfApprovals,omitempty"`
+ Approvals *float32 `json:"approvals,omitempty"`
+ Approvers *[]struct {
+ ApprovalsRequired *float32 `json:"approvalsRequired,omitempty"`
+ Id *string `json:"id,omitempty"`
+ Name *string `json:"name,omitempty"`
+ Sequence *float32 `json:"sequence,omitempty"`
+ Type ListAccessApprovalPolicies200JSONResponseBodyApprovalsApproversType `json:"type"`
+ } `json:"approvers,omitempty"`
+ BypassForMachineIdentities *bool `json:"bypassForMachineIdentities,omitempty"`
+ Bypassers []struct {
+ Id *string `json:"id,omitempty"`
+ Type ListAccessApprovalPolicies200JSONResponseBodyApprovalsBypassersType `json:"type"`
+ } `json:"bypassers"`
+ CreatedAt time.Time `json:"createdAt"`
+ DeletedAt *time.Time `json:"deletedAt,omitempty"`
+ EnforcementLevel *string `json:"enforcementLevel,omitempty"`
+ EnvId openapi_types.UUID `json:"envId"`
+ Environment struct {
+ Id string `json:"id"`
+ Name string `json:"name"`
+ Slug string `json:"slug"`
+ } `json:"environment"`
+ Environments []struct {
+ Id string `json:"id"`
+ Name string `json:"name"`
+ Slug string `json:"slug"`
+ } `json:"environments"`
+ ExternalApproval *struct {
+ // ConnectionId The ID of the App Connection used to reach the external approval system.
+ ConnectionId openapi_types.UUID `json:"connectionId"`
+
+ // Type The external approval system that reviews requests made against this policy.
+ Type ListAccessApprovalPolicies200JSONResponseBodyApprovalsExternalApprovalType `json:"type"`
+ } `json:"externalApproval,omitempty"`
+ Id openapi_types.UUID `json:"id"`
+ MaxTimePeriod *string `json:"maxTimePeriod,omitempty"`
+ Name string `json:"name"`
+ ProjectId string `json:"projectId"`
+ RequestExpirationTime *string `json:"requestExpirationTime,omitempty"`
+ SecretPath string `json:"secretPath"`
+ UpdatedAt time.Time `json:"updatedAt"`
+ } `json:"approvals,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 AdminBootstrap400JSONResponseBodyStatusCode `json:"statusCode"`
+ Details interface{} `json:"details,omitempty"`
+ Error string `json:"error"`
+ Message string `json:"message"`
+ ReqId string `json:"reqId"`
+ StatusCode ListAccessApprovalPolicies400JSONResponseBodyStatusCode `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"`
+ Error string `json:"error"`
+ Message string `json:"message"`
+ ReqId string `json:"reqId"`
+ StatusCode ListAccessApprovalPolicies401JSONResponseBodyStatusCode `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"`
+ Details interface{} `json:"details,omitempty"`
+ Error string `json:"error"`
+ Message string `json:"message"`
+ ReqId string `json:"reqId"`
+ StatusCode ListAccessApprovalPolicies403JSONResponseBodyStatusCode `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"`
+ Error string `json:"error"`
+ Message string `json:"message"`
+ ReqId string `json:"reqId"`
+ StatusCode ListAccessApprovalPolicies404JSONResponseBodyStatusCode `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"`
+ Error string `json:"error"`
+ Message interface{} `json:"message,omitempty"`
+ ReqId string `json:"reqId"`
+ StatusCode ListAccessApprovalPolicies422JSONResponseBodyStatusCode `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"`
+ Error string `json:"error"`
+ Message string `json:"message"`
+ ReqId string `json:"reqId"`
+ StatusCode ListAccessApprovalPolicies500JSONResponseBodyStatusCode `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"`
+func (r ListAccessApprovalPoliciesResponse) GetJSON200() *struct {
+ Approvals *[]struct {
+ AllowedSelfApprovals *bool `json:"allowedSelfApprovals,omitempty"`
+ Approvals *float32 `json:"approvals,omitempty"`
+ Approvers *[]struct {
+ ApprovalsRequired *float32 `json:"approvalsRequired,omitempty"`
+ Id *string `json:"id,omitempty"`
+ Name *string `json:"name,omitempty"`
+ Sequence *float32 `json:"sequence,omitempty"`
+ Type ListAccessApprovalPolicies200JSONResponseBodyApprovalsApproversType `json:"type"`
+ } `json:"approvers,omitempty"`
+ BypassForMachineIdentities *bool `json:"bypassForMachineIdentities,omitempty"`
+ Bypassers []struct {
+ Id *string `json:"id,omitempty"`
+ Type ListAccessApprovalPolicies200JSONResponseBodyApprovalsBypassersType `json:"type"`
+ } `json:"bypassers"`
+ CreatedAt time.Time `json:"createdAt"`
+ DeletedAt *time.Time `json:"deletedAt,omitempty"`
+ EnforcementLevel *string `json:"enforcementLevel,omitempty"`
+ EnvId openapi_types.UUID `json:"envId"`
+ Environment struct {
+ Id string `json:"id"`
+ Name string `json:"name"`
+ Slug string `json:"slug"`
+ } `json:"environment"`
+ Environments []struct {
+ Id string `json:"id"`
+ Name string `json:"name"`
+ Slug string `json:"slug"`
+ } `json:"environments"`
+ ExternalApproval *struct {
+ // ConnectionId The ID of the App Connection used to reach the external approval system.
+ ConnectionId openapi_types.UUID `json:"connectionId"`
+
+ // Type The external approval system that reviews requests made against this policy.
+ Type ListAccessApprovalPolicies200JSONResponseBodyApprovalsExternalApprovalType `json:"type"`
+ } `json:"externalApproval,omitempty"`
+ Id openapi_types.UUID `json:"id"`
+ MaxTimePeriod *string `json:"maxTimePeriod,omitempty"`
+ Name string `json:"name"`
+ ProjectId string `json:"projectId"`
+ RequestExpirationTime *string `json:"requestExpirationTime,omitempty"`
+ SecretPath string `json:"secretPath"`
+ UpdatedAt time.Time `json:"updatedAt"`
+ } `json:"approvals,omitempty"`
} {
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"`
+func (r ListAccessApprovalPoliciesResponse) GetJSON400() *struct {
+ Details interface{} `json:"details,omitempty"`
+ Error string `json:"error"`
+ Message string `json:"message"`
+ ReqId string `json:"reqId"`
+ StatusCode ListAccessApprovalPolicies400JSONResponseBodyStatusCode `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"`
+func (r ListAccessApprovalPoliciesResponse) GetJSON401() *struct {
+ Error string `json:"error"`
+ Message string `json:"message"`
+ ReqId string `json:"reqId"`
+ StatusCode ListAccessApprovalPolicies401JSONResponseBodyStatusCode `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"`
+func (r ListAccessApprovalPoliciesResponse) GetJSON403() *struct {
+ Details interface{} `json:"details,omitempty"`
+ Error string `json:"error"`
+ Message string `json:"message"`
+ ReqId string `json:"reqId"`
+ StatusCode ListAccessApprovalPolicies403JSONResponseBodyStatusCode `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"`
+func (r ListAccessApprovalPoliciesResponse) GetJSON404() *struct {
+ Error string `json:"error"`
+ Message string `json:"message"`
+ ReqId string `json:"reqId"`
+ StatusCode ListAccessApprovalPolicies404JSONResponseBodyStatusCode `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"`
+func (r ListAccessApprovalPoliciesResponse) GetJSON422() *struct {
+ Error string `json:"error"`
+ Message interface{} `json:"message,omitempty"`
+ ReqId string `json:"reqId"`
+ StatusCode ListAccessApprovalPolicies422JSONResponseBodyStatusCode `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"`
+func (r ListAccessApprovalPoliciesResponse) GetJSON500() *struct {
+ Error string `json:"error"`
+ Message string `json:"message"`
+ ReqId string `json:"reqId"`
+ StatusCode ListAccessApprovalPolicies500JSONResponseBodyStatusCode `json:"statusCode"`
} {
return r.JSON500
}
// GetBody returns the raw response body bytes
-func (r AdminBootstrapResponse) GetBody() []byte {
+func (r ListAccessApprovalPoliciesResponse) GetBody() []byte {
return r.Body
}
// Status returns HTTPResponse.Status
-func (r AdminBootstrapResponse) Status() string {
+func (r ListAccessApprovalPoliciesResponse) Status() string {
if r.HTTPResponse != nil {
return r.HTTPResponse.Status
}
@@ -23909,7 +26600,7 @@ func (r AdminBootstrapResponse) Status() string {
}
// StatusCode returns HTTPResponse.StatusCode
-func (r AdminBootstrapResponse) StatusCode() int {
+func (r ListAccessApprovalPoliciesResponse) StatusCode() int {
if r.HTTPResponse != nil {
return r.HTTPResponse.StatusCode
}
@@ -23917,218 +26608,202 @@ func (r AdminBootstrapResponse) StatusCode() int {
}
// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
-func (r AdminBootstrapResponse) ContentType() string {
+func (r ListAccessApprovalPoliciesResponse) ContentType() string {
if r.HTTPResponse != nil {
return r.HTTPResponse.Header.Get("Content-Type")
}
return ""
}
-type UpdateAdminConfigResponse struct {
+type CreateAccessApprovalPolicyResponse 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"`
+ Approval struct {
+ AllowedSelfApprovals *bool `json:"allowedSelfApprovals,omitempty"`
+ Approvals *float32 `json:"approvals,omitempty"`
+ BypassForMachineIdentities *bool `json:"bypassForMachineIdentities,omitempty"`
+ CreatedAt time.Time `json:"createdAt"`
+ DeletedAt *time.Time `json:"deletedAt,omitempty"`
+ EnforcementLevel *string `json:"enforcementLevel,omitempty"`
+ EnvId openapi_types.UUID `json:"envId"`
+ Environment struct {
+ Id string `json:"id"`
+ Name string `json:"name"`
+ Slug string `json:"slug"`
+ } `json:"environment"`
+ Environments []struct {
+ Id string `json:"id"`
+ Name string `json:"name"`
+ Slug string `json:"slug"`
+ } `json:"environments"`
+ ExternalApproval *struct {
+ // ConnectionId The ID of the App Connection used to reach the external approval system.
+ ConnectionId openapi_types.UUID `json:"connectionId"`
+
+ // Type The external approval system that reviews requests made against this policy.
+ Type CreateAccessApprovalPolicy200JSONResponseBodyApprovalExternalApprovalType `json:"type"`
+ } `json:"externalApproval,omitempty"`
+ Id openapi_types.UUID `json:"id"`
+ Name string `json:"name"`
+ ProjectId string `json:"projectId"`
+ SecretPath string `json:"secretPath"`
+ UpdatedAt time.Time `json:"updatedAt"`
+ } `json:"approval"`
}
// 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"`
+ Details interface{} `json:"details,omitempty"`
+ Error string `json:"error"`
+ Message string `json:"message"`
+ ReqId string `json:"reqId"`
+ StatusCode CreateAccessApprovalPolicy400JSONResponseBodyStatusCode `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"`
+ Error string `json:"error"`
+ Message string `json:"message"`
+ ReqId string `json:"reqId"`
+ StatusCode CreateAccessApprovalPolicy401JSONResponseBodyStatusCode `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"`
+ Details interface{} `json:"details,omitempty"`
+ Error string `json:"error"`
+ Message string `json:"message"`
+ ReqId string `json:"reqId"`
+ StatusCode CreateAccessApprovalPolicy403JSONResponseBodyStatusCode `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"`
+ Error string `json:"error"`
+ Message string `json:"message"`
+ ReqId string `json:"reqId"`
+ StatusCode CreateAccessApprovalPolicy404JSONResponseBodyStatusCode `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"`
+ Error string `json:"error"`
+ Message interface{} `json:"message,omitempty"`
+ ReqId string `json:"reqId"`
+ StatusCode CreateAccessApprovalPolicy422JSONResponseBodyStatusCode `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"`
+ Error string `json:"error"`
+ Message string `json:"message"`
+ ReqId string `json:"reqId"`
+ StatusCode CreateAccessApprovalPolicy500JSONResponseBodyStatusCode `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"`
+func (r CreateAccessApprovalPolicyResponse) GetJSON200() *struct {
+ Approval struct {
+ AllowedSelfApprovals *bool `json:"allowedSelfApprovals,omitempty"`
+ Approvals *float32 `json:"approvals,omitempty"`
+ BypassForMachineIdentities *bool `json:"bypassForMachineIdentities,omitempty"`
+ CreatedAt time.Time `json:"createdAt"`
+ DeletedAt *time.Time `json:"deletedAt,omitempty"`
+ EnforcementLevel *string `json:"enforcementLevel,omitempty"`
+ EnvId openapi_types.UUID `json:"envId"`
+ Environment struct {
+ Id string `json:"id"`
+ Name string `json:"name"`
+ Slug string `json:"slug"`
+ } `json:"environment"`
+ Environments []struct {
+ Id string `json:"id"`
+ Name string `json:"name"`
+ Slug string `json:"slug"`
+ } `json:"environments"`
+ ExternalApproval *struct {
+ // ConnectionId The ID of the App Connection used to reach the external approval system.
+ ConnectionId openapi_types.UUID `json:"connectionId"`
+
+ // Type The external approval system that reviews requests made against this policy.
+ Type CreateAccessApprovalPolicy200JSONResponseBodyApprovalExternalApprovalType `json:"type"`
+ } `json:"externalApproval,omitempty"`
+ Id openapi_types.UUID `json:"id"`
+ Name string `json:"name"`
+ ProjectId string `json:"projectId"`
+ SecretPath string `json:"secretPath"`
+ UpdatedAt time.Time `json:"updatedAt"`
+ } `json:"approval"`
} {
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"`
+func (r CreateAccessApprovalPolicyResponse) GetJSON400() *struct {
+ Details interface{} `json:"details,omitempty"`
+ Error string `json:"error"`
+ Message string `json:"message"`
+ ReqId string `json:"reqId"`
+ StatusCode CreateAccessApprovalPolicy400JSONResponseBodyStatusCode `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"`
+func (r CreateAccessApprovalPolicyResponse) GetJSON401() *struct {
+ Error string `json:"error"`
+ Message string `json:"message"`
+ ReqId string `json:"reqId"`
+ StatusCode CreateAccessApprovalPolicy401JSONResponseBodyStatusCode `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"`
+func (r CreateAccessApprovalPolicyResponse) GetJSON403() *struct {
+ Details interface{} `json:"details,omitempty"`
+ Error string `json:"error"`
+ Message string `json:"message"`
+ ReqId string `json:"reqId"`
+ StatusCode CreateAccessApprovalPolicy403JSONResponseBodyStatusCode `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"`
+func (r CreateAccessApprovalPolicyResponse) GetJSON404() *struct {
+ Error string `json:"error"`
+ Message string `json:"message"`
+ ReqId string `json:"reqId"`
+ StatusCode CreateAccessApprovalPolicy404JSONResponseBodyStatusCode `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"`
+func (r CreateAccessApprovalPolicyResponse) GetJSON422() *struct {
+ Error string `json:"error"`
+ Message interface{} `json:"message,omitempty"`
+ ReqId string `json:"reqId"`
+ StatusCode CreateAccessApprovalPolicy422JSONResponseBodyStatusCode `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"`
+func (r CreateAccessApprovalPolicyResponse) GetJSON500() *struct {
+ Error string `json:"error"`
+ Message string `json:"message"`
+ ReqId string `json:"reqId"`
+ StatusCode CreateAccessApprovalPolicy500JSONResponseBodyStatusCode `json:"statusCode"`
} {
return r.JSON500
}
// GetBody returns the raw response body bytes
-func (r UpdateAdminConfigResponse) GetBody() []byte {
+func (r CreateAccessApprovalPolicyResponse) GetBody() []byte {
return r.Body
}
// Status returns HTTPResponse.Status
-func (r UpdateAdminConfigResponse) Status() string {
+func (r CreateAccessApprovalPolicyResponse) Status() string {
if r.HTTPResponse != nil {
return r.HTTPResponse.Status
}
@@ -24136,7 +26811,7 @@ func (r UpdateAdminConfigResponse) Status() string {
}
// StatusCode returns HTTPResponse.StatusCode
-func (r UpdateAdminConfigResponse) StatusCode() int {
+func (r CreateAccessApprovalPolicyResponse) StatusCode() int {
if r.HTTPResponse != nil {
return r.HTTPResponse.StatusCode
}
@@ -24144,27 +26819,1088 @@ func (r UpdateAdminConfigResponse) StatusCode() int {
}
// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
-func (r UpdateAdminConfigResponse) ContentType() string {
+func (r CreateAccessApprovalPolicyResponse) ContentType() string {
if r.HTTPResponse != nil {
return r.HTTPResponse.Header.Get("Content-Type")
}
return ""
}
-type CreateGitHubAppConnectionResponse struct {
+type GetAccessApprovalPolicyResponse struct {
Body []byte
HTTPResponse *http.Response
// JSON200 the response for an HTTP 200 `application/json` response
JSON200 *struct {
- AppConnection CreateGitHubAppConnection200JSONResponseBody_AppConnection `json:"appConnection"`
+ Approval struct {
+ AllowedSelfApprovals *bool `json:"allowedSelfApprovals,omitempty"`
+ Approvals *float32 `json:"approvals,omitempty"`
+ Approvers *[]struct {
+ ApprovalsRequired *float32 `json:"approvalsRequired,omitempty"`
+ Id *string `json:"id,omitempty"`
+ Name *string `json:"name,omitempty"`
+ Sequence *float32 `json:"sequence,omitempty"`
+ Type GetAccessApprovalPolicy200JSONResponseBodyApprovalApproversType `json:"type"`
+ } `json:"approvers,omitempty"`
+ BypassForMachineIdentities *bool `json:"bypassForMachineIdentities,omitempty"`
+ Bypassers *[]struct {
+ Id *string `json:"id,omitempty"`
+ Name *string `json:"name,omitempty"`
+ Type GetAccessApprovalPolicy200JSONResponseBodyApprovalBypassersType `json:"type"`
+ } `json:"bypassers,omitempty"`
+ CreatedAt time.Time `json:"createdAt"`
+ DeletedAt *time.Time `json:"deletedAt,omitempty"`
+ EnforcementLevel *string `json:"enforcementLevel,omitempty"`
+ EnvId openapi_types.UUID `json:"envId"`
+ Environment struct {
+ Id string `json:"id"`
+ Name string `json:"name"`
+ Slug string `json:"slug"`
+ } `json:"environment"`
+ Environments []struct {
+ Id string `json:"id"`
+ Name string `json:"name"`
+ Slug string `json:"slug"`
+ } `json:"environments"`
+ ExternalApproval *struct {
+ // ConnectionId The ID of the App Connection used to reach the external approval system.
+ ConnectionId openapi_types.UUID `json:"connectionId"`
+
+ // Type The external approval system that reviews requests made against this policy.
+ Type GetAccessApprovalPolicy200JSONResponseBodyApprovalExternalApprovalType `json:"type"`
+ } `json:"externalApproval,omitempty"`
+ Id openapi_types.UUID `json:"id"`
+ MaxTimePeriod *string `json:"maxTimePeriod,omitempty"`
+ Name string `json:"name"`
+ ProjectId string `json:"projectId"`
+ RequestExpirationTime *string `json:"requestExpirationTime,omitempty"`
+ SecretPath string `json:"secretPath"`
+ UpdatedAt time.Time `json:"updatedAt"`
+ } `json:"approval"`
}
// 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 CreateGitHubAppConnection400JSONResponseBodyStatusCode `json:"statusCode"`
+ Details interface{} `json:"details,omitempty"`
+ Error string `json:"error"`
+ Message string `json:"message"`
+ ReqId string `json:"reqId"`
+ StatusCode GetAccessApprovalPolicy400JSONResponseBodyStatusCode `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 GetAccessApprovalPolicy401JSONResponseBodyStatusCode `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 GetAccessApprovalPolicy403JSONResponseBodyStatusCode `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 GetAccessApprovalPolicy404JSONResponseBodyStatusCode `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 GetAccessApprovalPolicy422JSONResponseBodyStatusCode `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 GetAccessApprovalPolicy500JSONResponseBodyStatusCode `json:"statusCode"`
+ }
+}
+
+// GetJSON200 returns the response for an HTTP 200 `application/json` response
+func (r GetAccessApprovalPolicyResponse) GetJSON200() *struct {
+ Approval struct {
+ AllowedSelfApprovals *bool `json:"allowedSelfApprovals,omitempty"`
+ Approvals *float32 `json:"approvals,omitempty"`
+ Approvers *[]struct {
+ ApprovalsRequired *float32 `json:"approvalsRequired,omitempty"`
+ Id *string `json:"id,omitempty"`
+ Name *string `json:"name,omitempty"`
+ Sequence *float32 `json:"sequence,omitempty"`
+ Type GetAccessApprovalPolicy200JSONResponseBodyApprovalApproversType `json:"type"`
+ } `json:"approvers,omitempty"`
+ BypassForMachineIdentities *bool `json:"bypassForMachineIdentities,omitempty"`
+ Bypassers *[]struct {
+ Id *string `json:"id,omitempty"`
+ Name *string `json:"name,omitempty"`
+ Type GetAccessApprovalPolicy200JSONResponseBodyApprovalBypassersType `json:"type"`
+ } `json:"bypassers,omitempty"`
+ CreatedAt time.Time `json:"createdAt"`
+ DeletedAt *time.Time `json:"deletedAt,omitempty"`
+ EnforcementLevel *string `json:"enforcementLevel,omitempty"`
+ EnvId openapi_types.UUID `json:"envId"`
+ Environment struct {
+ Id string `json:"id"`
+ Name string `json:"name"`
+ Slug string `json:"slug"`
+ } `json:"environment"`
+ Environments []struct {
+ Id string `json:"id"`
+ Name string `json:"name"`
+ Slug string `json:"slug"`
+ } `json:"environments"`
+ ExternalApproval *struct {
+ // ConnectionId The ID of the App Connection used to reach the external approval system.
+ ConnectionId openapi_types.UUID `json:"connectionId"`
+
+ // Type The external approval system that reviews requests made against this policy.
+ Type GetAccessApprovalPolicy200JSONResponseBodyApprovalExternalApprovalType `json:"type"`
+ } `json:"externalApproval,omitempty"`
+ Id openapi_types.UUID `json:"id"`
+ MaxTimePeriod *string `json:"maxTimePeriod,omitempty"`
+ Name string `json:"name"`
+ ProjectId string `json:"projectId"`
+ RequestExpirationTime *string `json:"requestExpirationTime,omitempty"`
+ SecretPath string `json:"secretPath"`
+ UpdatedAt time.Time `json:"updatedAt"`
+ } `json:"approval"`
+} {
+ return r.JSON200
+}
+
+// GetJSON400 returns the response for an HTTP 400 `application/json` response
+func (r GetAccessApprovalPolicyResponse) GetJSON400() *struct {
+ Details interface{} `json:"details,omitempty"`
+ Error string `json:"error"`
+ Message string `json:"message"`
+ ReqId string `json:"reqId"`
+ StatusCode GetAccessApprovalPolicy400JSONResponseBodyStatusCode `json:"statusCode"`
+} {
+ return r.JSON400
+}
+
+// GetJSON401 returns the response for an HTTP 401 `application/json` response
+func (r GetAccessApprovalPolicyResponse) GetJSON401() *struct {
+ Error string `json:"error"`
+ Message string `json:"message"`
+ ReqId string `json:"reqId"`
+ StatusCode GetAccessApprovalPolicy401JSONResponseBodyStatusCode `json:"statusCode"`
+} {
+ return r.JSON401
+}
+
+// GetJSON403 returns the response for an HTTP 403 `application/json` response
+func (r GetAccessApprovalPolicyResponse) GetJSON403() *struct {
+ Details interface{} `json:"details,omitempty"`
+ Error string `json:"error"`
+ Message string `json:"message"`
+ ReqId string `json:"reqId"`
+ StatusCode GetAccessApprovalPolicy403JSONResponseBodyStatusCode `json:"statusCode"`
+} {
+ return r.JSON403
+}
+
+// GetJSON404 returns the response for an HTTP 404 `application/json` response
+func (r GetAccessApprovalPolicyResponse) GetJSON404() *struct {
+ Error string `json:"error"`
+ Message string `json:"message"`
+ ReqId string `json:"reqId"`
+ StatusCode GetAccessApprovalPolicy404JSONResponseBodyStatusCode `json:"statusCode"`
+} {
+ return r.JSON404
+}
+
+// GetJSON422 returns the response for an HTTP 422 `application/json` response
+func (r GetAccessApprovalPolicyResponse) GetJSON422() *struct {
+ Error string `json:"error"`
+ Message interface{} `json:"message,omitempty"`
+ ReqId string `json:"reqId"`
+ StatusCode GetAccessApprovalPolicy422JSONResponseBodyStatusCode `json:"statusCode"`
+} {
+ return r.JSON422
+}
+
+// GetJSON500 returns the response for an HTTP 500 `application/json` response
+func (r GetAccessApprovalPolicyResponse) GetJSON500() *struct {
+ Error string `json:"error"`
+ Message string `json:"message"`
+ ReqId string `json:"reqId"`
+ StatusCode GetAccessApprovalPolicy500JSONResponseBodyStatusCode `json:"statusCode"`
+} {
+ return r.JSON500
+}
+
+// GetBody returns the raw response body bytes
+func (r GetAccessApprovalPolicyResponse) GetBody() []byte {
+ return r.Body
+}
+
+// Status returns HTTPResponse.Status
+func (r GetAccessApprovalPolicyResponse) Status() string {
+ if r.HTTPResponse != nil {
+ return r.HTTPResponse.Status
+ }
+ return http.StatusText(0)
+}
+
+// StatusCode returns HTTPResponse.StatusCode
+func (r GetAccessApprovalPolicyResponse) 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 GetAccessApprovalPolicyResponse) ContentType() string {
+ if r.HTTPResponse != nil {
+ return r.HTTPResponse.Header.Get("Content-Type")
+ }
+ return ""
+}
+
+type UpdateAccessApprovalPolicyResponse struct {
+ Body []byte
+ HTTPResponse *http.Response
+ // JSON200 the response for an HTTP 200 `application/json` response
+ JSON200 *struct {
+ Approval struct {
+ AllowedSelfApprovals *bool `json:"allowedSelfApprovals,omitempty"`
+ Approvals *float32 `json:"approvals,omitempty"`
+ BypassForMachineIdentities *bool `json:"bypassForMachineIdentities,omitempty"`
+ CreatedAt time.Time `json:"createdAt"`
+ DeletedAt *time.Time `json:"deletedAt,omitempty"`
+ EnforcementLevel *string `json:"enforcementLevel,omitempty"`
+ EnvId openapi_types.UUID `json:"envId"`
+ Environment struct {
+ Id string `json:"id"`
+ Name string `json:"name"`
+ Slug string `json:"slug"`
+ } `json:"environment"`
+ Environments []struct {
+ Id string `json:"id"`
+ Name string `json:"name"`
+ Slug string `json:"slug"`
+ } `json:"environments"`
+ ExternalApproval *struct {
+ // ConnectionId The ID of the App Connection used to reach the external approval system.
+ ConnectionId openapi_types.UUID `json:"connectionId"`
+
+ // Type The external approval system that reviews requests made against this policy.
+ Type UpdateAccessApprovalPolicy200JSONResponseBodyApprovalExternalApprovalType `json:"type"`
+ } `json:"externalApproval,omitempty"`
+ Id openapi_types.UUID `json:"id"`
+ Name string `json:"name"`
+ ProjectId string `json:"projectId"`
+ SecretPath string `json:"secretPath"`
+ UpdatedAt time.Time `json:"updatedAt"`
+ } `json:"approval"`
+ }
+ // 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 UpdateAccessApprovalPolicy400JSONResponseBodyStatusCode `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 UpdateAccessApprovalPolicy401JSONResponseBodyStatusCode `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 UpdateAccessApprovalPolicy403JSONResponseBodyStatusCode `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 UpdateAccessApprovalPolicy404JSONResponseBodyStatusCode `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 UpdateAccessApprovalPolicy422JSONResponseBodyStatusCode `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 UpdateAccessApprovalPolicy500JSONResponseBodyStatusCode `json:"statusCode"`
+ }
+}
+
+// GetJSON200 returns the response for an HTTP 200 `application/json` response
+func (r UpdateAccessApprovalPolicyResponse) GetJSON200() *struct {
+ Approval struct {
+ AllowedSelfApprovals *bool `json:"allowedSelfApprovals,omitempty"`
+ Approvals *float32 `json:"approvals,omitempty"`
+ BypassForMachineIdentities *bool `json:"bypassForMachineIdentities,omitempty"`
+ CreatedAt time.Time `json:"createdAt"`
+ DeletedAt *time.Time `json:"deletedAt,omitempty"`
+ EnforcementLevel *string `json:"enforcementLevel,omitempty"`
+ EnvId openapi_types.UUID `json:"envId"`
+ Environment struct {
+ Id string `json:"id"`
+ Name string `json:"name"`
+ Slug string `json:"slug"`
+ } `json:"environment"`
+ Environments []struct {
+ Id string `json:"id"`
+ Name string `json:"name"`
+ Slug string `json:"slug"`
+ } `json:"environments"`
+ ExternalApproval *struct {
+ // ConnectionId The ID of the App Connection used to reach the external approval system.
+ ConnectionId openapi_types.UUID `json:"connectionId"`
+
+ // Type The external approval system that reviews requests made against this policy.
+ Type UpdateAccessApprovalPolicy200JSONResponseBodyApprovalExternalApprovalType `json:"type"`
+ } `json:"externalApproval,omitempty"`
+ Id openapi_types.UUID `json:"id"`
+ Name string `json:"name"`
+ ProjectId string `json:"projectId"`
+ SecretPath string `json:"secretPath"`
+ UpdatedAt time.Time `json:"updatedAt"`
+ } `json:"approval"`
+} {
+ return r.JSON200
+}
+
+// GetJSON400 returns the response for an HTTP 400 `application/json` response
+func (r UpdateAccessApprovalPolicyResponse) GetJSON400() *struct {
+ Details interface{} `json:"details,omitempty"`
+ Error string `json:"error"`
+ Message string `json:"message"`
+ ReqId string `json:"reqId"`
+ StatusCode UpdateAccessApprovalPolicy400JSONResponseBodyStatusCode `json:"statusCode"`
+} {
+ return r.JSON400
+}
+
+// GetJSON401 returns the response for an HTTP 401 `application/json` response
+func (r UpdateAccessApprovalPolicyResponse) GetJSON401() *struct {
+ Error string `json:"error"`
+ Message string `json:"message"`
+ ReqId string `json:"reqId"`
+ StatusCode UpdateAccessApprovalPolicy401JSONResponseBodyStatusCode `json:"statusCode"`
+} {
+ return r.JSON401
+}
+
+// GetJSON403 returns the response for an HTTP 403 `application/json` response
+func (r UpdateAccessApprovalPolicyResponse) GetJSON403() *struct {
+ Details interface{} `json:"details,omitempty"`
+ Error string `json:"error"`
+ Message string `json:"message"`
+ ReqId string `json:"reqId"`
+ StatusCode UpdateAccessApprovalPolicy403JSONResponseBodyStatusCode `json:"statusCode"`
+} {
+ return r.JSON403
+}
+
+// GetJSON404 returns the response for an HTTP 404 `application/json` response
+func (r UpdateAccessApprovalPolicyResponse) GetJSON404() *struct {
+ Error string `json:"error"`
+ Message string `json:"message"`
+ ReqId string `json:"reqId"`
+ StatusCode UpdateAccessApprovalPolicy404JSONResponseBodyStatusCode `json:"statusCode"`
+} {
+ return r.JSON404
+}
+
+// GetJSON422 returns the response for an HTTP 422 `application/json` response
+func (r UpdateAccessApprovalPolicyResponse) GetJSON422() *struct {
+ Error string `json:"error"`
+ Message interface{} `json:"message,omitempty"`
+ ReqId string `json:"reqId"`
+ StatusCode UpdateAccessApprovalPolicy422JSONResponseBodyStatusCode `json:"statusCode"`
+} {
+ return r.JSON422
+}
+
+// GetJSON500 returns the response for an HTTP 500 `application/json` response
+func (r UpdateAccessApprovalPolicyResponse) GetJSON500() *struct {
+ Error string `json:"error"`
+ Message string `json:"message"`
+ ReqId string `json:"reqId"`
+ StatusCode UpdateAccessApprovalPolicy500JSONResponseBodyStatusCode `json:"statusCode"`
+} {
+ return r.JSON500
+}
+
+// GetBody returns the raw response body bytes
+func (r UpdateAccessApprovalPolicyResponse) GetBody() []byte {
+ return r.Body
+}
+
+// Status returns HTTPResponse.Status
+func (r UpdateAccessApprovalPolicyResponse) Status() string {
+ if r.HTTPResponse != nil {
+ return r.HTTPResponse.Status
+ }
+ return http.StatusText(0)
+}
+
+// StatusCode returns HTTPResponse.StatusCode
+func (r UpdateAccessApprovalPolicyResponse) 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 UpdateAccessApprovalPolicyResponse) ContentType() string {
+ if r.HTTPResponse != nil {
+ return r.HTTPResponse.Header.Get("Content-Type")
+ }
+ return ""
+}
+
+type CreateAccessApprovalRequestResponse struct {
+ Body []byte
+ HTTPResponse *http.Response
+ // JSON200 the response for an HTTP 200 `application/json` response
+ JSON200 *struct {
+ Approval struct {
+ ApprovedAt *time.Time `json:"approvedAt,omitempty"`
+ ApprovedByUserId *openapi_types.UUID `json:"approvedByUserId,omitempty"`
+ BypassReason *string `json:"bypassReason,omitempty"`
+ CreatedAt time.Time `json:"createdAt"`
+ EditNote *string `json:"editNote,omitempty"`
+ EditedByUserId *openapi_types.UUID `json:"editedByUserId,omitempty"`
+ ExpiresAt *time.Time `json:"expiresAt,omitempty"`
+ Id openapi_types.UUID `json:"id"`
+ IsTemporary bool `json:"isTemporary"`
+ Note *string `json:"note,omitempty"`
+ Permissions interface{} `json:"permissions,omitempty"`
+ PolicyId openapi_types.UUID `json:"policyId"`
+ PrivilegeDeletedAt *time.Time `json:"privilegeDeletedAt,omitempty"`
+ PrivilegeId *openapi_types.UUID `json:"privilegeId,omitempty"`
+ RequestedByUserId openapi_types.UUID `json:"requestedByUserId"`
+ RevokedAt *time.Time `json:"revokedAt,omitempty"`
+ RevokedByUserId *openapi_types.UUID `json:"revokedByUserId,omitempty"`
+ Status *string `json:"status,omitempty"`
+ TemporaryRange *string `json:"temporaryRange,omitempty"`
+ UpdatedAt time.Time `json:"updatedAt"`
+ } `json:"approval"`
+ }
+ // 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 CreateAccessApprovalRequest400JSONResponseBodyStatusCode `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 CreateAccessApprovalRequest401JSONResponseBodyStatusCode `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 CreateAccessApprovalRequest403JSONResponseBodyStatusCode `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 CreateAccessApprovalRequest404JSONResponseBodyStatusCode `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 CreateAccessApprovalRequest422JSONResponseBodyStatusCode `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 CreateAccessApprovalRequest500JSONResponseBodyStatusCode `json:"statusCode"`
+ }
+}
+
+// GetJSON200 returns the response for an HTTP 200 `application/json` response
+func (r CreateAccessApprovalRequestResponse) GetJSON200() *struct {
+ Approval struct {
+ ApprovedAt *time.Time `json:"approvedAt,omitempty"`
+ ApprovedByUserId *openapi_types.UUID `json:"approvedByUserId,omitempty"`
+ BypassReason *string `json:"bypassReason,omitempty"`
+ CreatedAt time.Time `json:"createdAt"`
+ EditNote *string `json:"editNote,omitempty"`
+ EditedByUserId *openapi_types.UUID `json:"editedByUserId,omitempty"`
+ ExpiresAt *time.Time `json:"expiresAt,omitempty"`
+ Id openapi_types.UUID `json:"id"`
+ IsTemporary bool `json:"isTemporary"`
+ Note *string `json:"note,omitempty"`
+ Permissions interface{} `json:"permissions,omitempty"`
+ PolicyId openapi_types.UUID `json:"policyId"`
+ PrivilegeDeletedAt *time.Time `json:"privilegeDeletedAt,omitempty"`
+ PrivilegeId *openapi_types.UUID `json:"privilegeId,omitempty"`
+ RequestedByUserId openapi_types.UUID `json:"requestedByUserId"`
+ RevokedAt *time.Time `json:"revokedAt,omitempty"`
+ RevokedByUserId *openapi_types.UUID `json:"revokedByUserId,omitempty"`
+ Status *string `json:"status,omitempty"`
+ TemporaryRange *string `json:"temporaryRange,omitempty"`
+ UpdatedAt time.Time `json:"updatedAt"`
+ } `json:"approval"`
+} {
+ return r.JSON200
+}
+
+// GetJSON400 returns the response for an HTTP 400 `application/json` response
+func (r CreateAccessApprovalRequestResponse) GetJSON400() *struct {
+ Details interface{} `json:"details,omitempty"`
+ Error string `json:"error"`
+ Message string `json:"message"`
+ ReqId string `json:"reqId"`
+ StatusCode CreateAccessApprovalRequest400JSONResponseBodyStatusCode `json:"statusCode"`
+} {
+ return r.JSON400
+}
+
+// GetJSON401 returns the response for an HTTP 401 `application/json` response
+func (r CreateAccessApprovalRequestResponse) GetJSON401() *struct {
+ Error string `json:"error"`
+ Message string `json:"message"`
+ ReqId string `json:"reqId"`
+ StatusCode CreateAccessApprovalRequest401JSONResponseBodyStatusCode `json:"statusCode"`
+} {
+ return r.JSON401
+}
+
+// GetJSON403 returns the response for an HTTP 403 `application/json` response
+func (r CreateAccessApprovalRequestResponse) GetJSON403() *struct {
+ Details interface{} `json:"details,omitempty"`
+ Error string `json:"error"`
+ Message string `json:"message"`
+ ReqId string `json:"reqId"`
+ StatusCode CreateAccessApprovalRequest403JSONResponseBodyStatusCode `json:"statusCode"`
+} {
+ return r.JSON403
+}
+
+// GetJSON404 returns the response for an HTTP 404 `application/json` response
+func (r CreateAccessApprovalRequestResponse) GetJSON404() *struct {
+ Error string `json:"error"`
+ Message string `json:"message"`
+ ReqId string `json:"reqId"`
+ StatusCode CreateAccessApprovalRequest404JSONResponseBodyStatusCode `json:"statusCode"`
+} {
+ return r.JSON404
+}
+
+// GetJSON422 returns the response for an HTTP 422 `application/json` response
+func (r CreateAccessApprovalRequestResponse) GetJSON422() *struct {
+ Error string `json:"error"`
+ Message interface{} `json:"message,omitempty"`
+ ReqId string `json:"reqId"`
+ StatusCode CreateAccessApprovalRequest422JSONResponseBodyStatusCode `json:"statusCode"`
+} {
+ return r.JSON422
+}
+
+// GetJSON500 returns the response for an HTTP 500 `application/json` response
+func (r CreateAccessApprovalRequestResponse) GetJSON500() *struct {
+ Error string `json:"error"`
+ Message string `json:"message"`
+ ReqId string `json:"reqId"`
+ StatusCode CreateAccessApprovalRequest500JSONResponseBodyStatusCode `json:"statusCode"`
+} {
+ return r.JSON500
+}
+
+// GetBody returns the raw response body bytes
+func (r CreateAccessApprovalRequestResponse) GetBody() []byte {
+ return r.Body
+}
+
+// Status returns HTTPResponse.Status
+func (r CreateAccessApprovalRequestResponse) Status() string {
+ if r.HTTPResponse != nil {
+ return r.HTTPResponse.Status
+ }
+ return http.StatusText(0)
+}
+
+// StatusCode returns HTTPResponse.StatusCode
+func (r CreateAccessApprovalRequestResponse) 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 CreateAccessApprovalRequestResponse) 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 CreateGitHubAppConnectionResponse struct {
+ Body []byte
+ HTTPResponse *http.Response
+ // JSON200 the response for an HTTP 200 `application/json` response
+ JSON200 *struct {
+ AppConnection CreateGitHubAppConnection200JSONResponseBody_AppConnection `json:"appConnection"`
+ }
+ // 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 CreateGitHubAppConnection400JSONResponseBodyStatusCode `json:"statusCode"`
}
// JSON401 the response for an HTTP 401 `application/json` response
JSON401 *struct {
@@ -24453,6 +28189,157 @@ func (r DeleteGitHubAppConnectionResponse) ContentType() string {
return ""
}
+type CreateServiceNowAppConnectionResponse struct {
+ Body []byte
+ HTTPResponse *http.Response
+ // JSON200 the response for an HTTP 200 `application/json` response
+ JSON200 *struct {
+ AppConnection CreateServiceNowAppConnection200JSONResponseBody_AppConnection `json:"appConnection"`
+ }
+ // 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 CreateServiceNowAppConnection400JSONResponseBodyStatusCode `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 CreateServiceNowAppConnection401JSONResponseBodyStatusCode `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 CreateServiceNowAppConnection403JSONResponseBodyStatusCode `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 CreateServiceNowAppConnection404JSONResponseBodyStatusCode `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 CreateServiceNowAppConnection422JSONResponseBodyStatusCode `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 CreateServiceNowAppConnection500JSONResponseBodyStatusCode `json:"statusCode"`
+ }
+}
+
+// GetJSON200 returns the response for an HTTP 200 `application/json` response
+func (r CreateServiceNowAppConnectionResponse) GetJSON200() *struct {
+ AppConnection CreateServiceNowAppConnection200JSONResponseBody_AppConnection `json:"appConnection"`
+} {
+ return r.JSON200
+}
+
+// GetJSON400 returns the response for an HTTP 400 `application/json` response
+func (r CreateServiceNowAppConnectionResponse) GetJSON400() *struct {
+ Details interface{} `json:"details,omitempty"`
+ Error string `json:"error"`
+ Message string `json:"message"`
+ ReqId string `json:"reqId"`
+ StatusCode CreateServiceNowAppConnection400JSONResponseBodyStatusCode `json:"statusCode"`
+} {
+ return r.JSON400
+}
+
+// GetJSON401 returns the response for an HTTP 401 `application/json` response
+func (r CreateServiceNowAppConnectionResponse) GetJSON401() *struct {
+ Error string `json:"error"`
+ Message string `json:"message"`
+ ReqId string `json:"reqId"`
+ StatusCode CreateServiceNowAppConnection401JSONResponseBodyStatusCode `json:"statusCode"`
+} {
+ return r.JSON401
+}
+
+// GetJSON403 returns the response for an HTTP 403 `application/json` response
+func (r CreateServiceNowAppConnectionResponse) GetJSON403() *struct {
+ Details interface{} `json:"details,omitempty"`
+ Error string `json:"error"`
+ Message string `json:"message"`
+ ReqId string `json:"reqId"`
+ StatusCode CreateServiceNowAppConnection403JSONResponseBodyStatusCode `json:"statusCode"`
+} {
+ return r.JSON403
+}
+
+// GetJSON404 returns the response for an HTTP 404 `application/json` response
+func (r CreateServiceNowAppConnectionResponse) GetJSON404() *struct {
+ Error string `json:"error"`
+ Message string `json:"message"`
+ ReqId string `json:"reqId"`
+ StatusCode CreateServiceNowAppConnection404JSONResponseBodyStatusCode `json:"statusCode"`
+} {
+ return r.JSON404
+}
+
+// GetJSON422 returns the response for an HTTP 422 `application/json` response
+func (r CreateServiceNowAppConnectionResponse) GetJSON422() *struct {
+ Error string `json:"error"`
+ Message interface{} `json:"message,omitempty"`
+ ReqId string `json:"reqId"`
+ StatusCode CreateServiceNowAppConnection422JSONResponseBodyStatusCode `json:"statusCode"`
+} {
+ return r.JSON422
+}
+
+// GetJSON500 returns the response for an HTTP 500 `application/json` response
+func (r CreateServiceNowAppConnectionResponse) GetJSON500() *struct {
+ Error string `json:"error"`
+ Message string `json:"message"`
+ ReqId string `json:"reqId"`
+ StatusCode CreateServiceNowAppConnection500JSONResponseBodyStatusCode `json:"statusCode"`
+} {
+ return r.JSON500
+}
+
+// GetBody returns the raw response body bytes
+func (r CreateServiceNowAppConnectionResponse) GetBody() []byte {
+ return r.Body
+}
+
+// Status returns HTTPResponse.Status
+func (r CreateServiceNowAppConnectionResponse) Status() string {
+ if r.HTTPResponse != nil {
+ return r.HTTPResponse.Status
+ }
+ return http.StatusText(0)
+}
+
+// StatusCode returns HTTPResponse.StatusCode
+func (r CreateServiceNowAppConnectionResponse) 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 CreateServiceNowAppConnectionResponse) ContentType() string {
+ if r.HTTPResponse != nil {
+ return r.HTTPResponse.Header.Get("Content-Type")
+ }
+ return ""
+}
+
type RefreshAuthTokenResponse struct {
Body []byte
HTTPResponse *http.Response
@@ -38074,6 +41961,94 @@ func (c *ClientWithResponses) GetInstanceStatusWithResponse(ctx context.Context,
return ParseGetInstanceStatusResponse(rsp)
}
+// ListAccessApprovalPoliciesWithResponse performs a GET /api/v1/access-approvals/policies (the `ListAccessApprovalPolicies` operationId) request.
+//
+// Returns a wrapper object for the known response body format(s).
+func (c *ClientWithResponses) ListAccessApprovalPoliciesWithResponse(ctx context.Context, params *ListAccessApprovalPoliciesParams, reqEditors ...RequestEditorFn) (*ListAccessApprovalPoliciesResponse, error) {
+ rsp, err := c.ListAccessApprovalPolicies(ctx, params, reqEditors...)
+ if err != nil {
+ return nil, err
+ }
+ return ParseListAccessApprovalPoliciesResponse(rsp)
+}
+
+// CreateAccessApprovalPolicyWithBodyWithResponse performs a POST /api/v1/access-approvals/policies (the `CreateAccessApprovalPolicy` 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) CreateAccessApprovalPolicyWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateAccessApprovalPolicyResponse, error) {
+ rsp, err := c.CreateAccessApprovalPolicyWithBody(ctx, contentType, body, reqEditors...)
+ if err != nil {
+ return nil, err
+ }
+ return ParseCreateAccessApprovalPolicyResponse(rsp)
+}
+
+// CreateAccessApprovalPolicyWithResponse performs a POST /api/v1/access-approvals/policies (the `CreateAccessApprovalPolicy` 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) CreateAccessApprovalPolicyWithResponse(ctx context.Context, body CreateAccessApprovalPolicyJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateAccessApprovalPolicyResponse, error) {
+ rsp, err := c.CreateAccessApprovalPolicy(ctx, body, reqEditors...)
+ if err != nil {
+ return nil, err
+ }
+ return ParseCreateAccessApprovalPolicyResponse(rsp)
+}
+
+// GetAccessApprovalPolicyWithResponse performs a GET /api/v1/access-approvals/policies/{policyId} (the `GetAccessApprovalPolicy` operationId) request.
+//
+// Returns a wrapper object for the known response body format(s).
+func (c *ClientWithResponses) GetAccessApprovalPolicyWithResponse(ctx context.Context, policyId string, reqEditors ...RequestEditorFn) (*GetAccessApprovalPolicyResponse, error) {
+ rsp, err := c.GetAccessApprovalPolicy(ctx, policyId, reqEditors...)
+ if err != nil {
+ return nil, err
+ }
+ return ParseGetAccessApprovalPolicyResponse(rsp)
+}
+
+// UpdateAccessApprovalPolicyWithBodyWithResponse performs a PATCH /api/v1/access-approvals/policies/{policyId} (the `UpdateAccessApprovalPolicy` 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) UpdateAccessApprovalPolicyWithBodyWithResponse(ctx context.Context, policyId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateAccessApprovalPolicyResponse, error) {
+ rsp, err := c.UpdateAccessApprovalPolicyWithBody(ctx, policyId, contentType, body, reqEditors...)
+ if err != nil {
+ return nil, err
+ }
+ return ParseUpdateAccessApprovalPolicyResponse(rsp)
+}
+
+// UpdateAccessApprovalPolicyWithResponse performs a PATCH /api/v1/access-approvals/policies/{policyId} (the `UpdateAccessApprovalPolicy` 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) UpdateAccessApprovalPolicyWithResponse(ctx context.Context, policyId string, body UpdateAccessApprovalPolicyJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateAccessApprovalPolicyResponse, error) {
+ rsp, err := c.UpdateAccessApprovalPolicy(ctx, policyId, body, reqEditors...)
+ if err != nil {
+ return nil, err
+ }
+ return ParseUpdateAccessApprovalPolicyResponse(rsp)
+}
+
+// CreateAccessApprovalRequestWithBodyWithResponse performs a POST /api/v1/access-approvals/requests (the `CreateAccessApprovalRequest` 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) CreateAccessApprovalRequestWithBodyWithResponse(ctx context.Context, params *CreateAccessApprovalRequestParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateAccessApprovalRequestResponse, error) {
+ rsp, err := c.CreateAccessApprovalRequestWithBody(ctx, params, contentType, body, reqEditors...)
+ if err != nil {
+ return nil, err
+ }
+ return ParseCreateAccessApprovalRequestResponse(rsp)
+}
+
+// CreateAccessApprovalRequestWithResponse performs a POST /api/v1/access-approvals/requests (the `CreateAccessApprovalRequest` 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) CreateAccessApprovalRequestWithResponse(ctx context.Context, params *CreateAccessApprovalRequestParams, body CreateAccessApprovalRequestJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateAccessApprovalRequestResponse, error) {
+ rsp, err := c.CreateAccessApprovalRequest(ctx, params, body, reqEditors...)
+ if err != nil {
+ return nil, err
+ }
+ return ParseCreateAccessApprovalRequestResponse(rsp)
+}
+
// AdminBootstrapWithBodyWithResponse performs a POST /api/v1/admin/bootstrap (the `AdminBootstrap` operationId) request,
// with any type of body and a specified content type.
//
@@ -38157,6 +42132,32 @@ func (c *ClientWithResponses) DeleteGitHubAppConnectionWithResponse(ctx context.
return ParseDeleteGitHubAppConnectionResponse(rsp)
}
+// CreateServiceNowAppConnectionWithBodyWithResponse performs a POST /api/v1/app-connections/servicenow (the `CreateServiceNowAppConnection` operationId) request,
+// with any type of body and a specified content type.
+//
+// Create a ServiceNow Connection.
+//
+// Returns a wrapper object for the known response body format(s).
+func (c *ClientWithResponses) CreateServiceNowAppConnectionWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateServiceNowAppConnectionResponse, error) {
+ rsp, err := c.CreateServiceNowAppConnectionWithBody(ctx, contentType, body, reqEditors...)
+ if err != nil {
+ return nil, err
+ }
+ return ParseCreateServiceNowAppConnectionResponse(rsp)
+}
+
+// CreateServiceNowAppConnectionWithResponse performs a POST /api/v1/app-connections/servicenow (the `CreateServiceNowAppConnection` 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 ServiceNow Connection.
+func (c *ClientWithResponses) CreateServiceNowAppConnectionWithResponse(ctx context.Context, body CreateServiceNowAppConnectionJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateServiceNowAppConnectionResponse, error) {
+ rsp, err := c.CreateServiceNowAppConnection(ctx, body, reqEditors...)
+ if err != nil {
+ return nil, err
+ }
+ return ParseCreateServiceNowAppConnectionResponse(rsp)
+}
+
// RefreshAuthTokenWithResponse performs a POST /api/v1/auth/token (the `RefreshAuthToken` operationId) request.
//
// Returns a wrapper object for the known response body format(s).
@@ -39408,191 +43409,856 @@ func (c *ClientWithResponses) CreateManySecretsV4WithResponse(ctx context.Contex
return ParseCreateManySecretsV4Response(rsp)
}
-// DuplicateSecretV4WithBodyWithResponse performs a POST /api/v4/secrets/duplicate (the `DuplicateSecretV4` operationId) request,
-// with any type of body and a specified content type.
-//
-// Duplicate one or more static secrets into another environment.
-//
-// Returns a wrapper object for the known response body format(s).
-func (c *ClientWithResponses) DuplicateSecretV4WithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*DuplicateSecretV4Response, error) {
- rsp, err := c.DuplicateSecretV4WithBody(ctx, contentType, body, reqEditors...)
- if err != nil {
- return nil, err
+// DuplicateSecretV4WithBodyWithResponse performs a POST /api/v4/secrets/duplicate (the `DuplicateSecretV4` operationId) request,
+// with any type of body and a specified content type.
+//
+// Duplicate one or more static secrets into another environment.
+//
+// Returns a wrapper object for the known response body format(s).
+func (c *ClientWithResponses) DuplicateSecretV4WithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*DuplicateSecretV4Response, error) {
+ rsp, err := c.DuplicateSecretV4WithBody(ctx, contentType, body, reqEditors...)
+ if err != nil {
+ return nil, err
+ }
+ return ParseDuplicateSecretV4Response(rsp)
+}
+
+// DuplicateSecretV4WithResponse performs a POST /api/v4/secrets/duplicate (the `DuplicateSecretV4` operationId) request.
+// Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
+//
+// Duplicate one or more static secrets into another environment.
+func (c *ClientWithResponses) DuplicateSecretV4WithResponse(ctx context.Context, body DuplicateSecretV4JSONRequestBody, reqEditors ...RequestEditorFn) (*DuplicateSecretV4Response, error) {
+ rsp, err := c.DuplicateSecretV4(ctx, body, reqEditors...)
+ if err != nil {
+ return nil, err
+ }
+ return ParseDuplicateSecretV4Response(rsp)
+}
+
+// GetSecretByIdV4WithResponse performs a GET /api/v4/secrets/id/{secretId} (the `GetSecretByIdV4` operationId) request.
+//
+// Returns a wrapper object for the known response body format(s).
+func (c *ClientWithResponses) GetSecretByIdV4WithResponse(ctx context.Context, secretId string, reqEditors ...RequestEditorFn) (*GetSecretByIdV4Response, error) {
+ rsp, err := c.GetSecretByIdV4(ctx, secretId, reqEditors...)
+ if err != nil {
+ return nil, err
+ }
+ return ParseGetSecretByIdV4Response(rsp)
+}
+
+// MoveSecretsV4WithBodyWithResponse performs a POST /api/v4/secrets/move (the `MoveSecretsV4` 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) MoveSecretsV4WithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*MoveSecretsV4Response, error) {
+ rsp, err := c.MoveSecretsV4WithBody(ctx, contentType, body, reqEditors...)
+ if err != nil {
+ return nil, err
+ }
+ return ParseMoveSecretsV4Response(rsp)
+}
+
+// MoveSecretsV4WithResponse performs a POST /api/v4/secrets/move (the `MoveSecretsV4` 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) MoveSecretsV4WithResponse(ctx context.Context, body MoveSecretsV4JSONRequestBody, reqEditors ...RequestEditorFn) (*MoveSecretsV4Response, error) {
+ rsp, err := c.MoveSecretsV4(ctx, body, reqEditors...)
+ if err != nil {
+ return nil, err
+ }
+ return ParseMoveSecretsV4Response(rsp)
+}
+
+// DeleteSecretV4WithBodyWithResponse performs a DELETE /api/v4/secrets/{secretName} (the `DeleteSecretV4` operationId) request,
+// with any type of body and a specified content type.
+//
+// Delete secret.
+//
+// Returns a wrapper object for the known response body format(s).
+func (c *ClientWithResponses) DeleteSecretV4WithBodyWithResponse(ctx context.Context, secretName string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*DeleteSecretV4Response, error) {
+ rsp, err := c.DeleteSecretV4WithBody(ctx, secretName, contentType, body, reqEditors...)
+ if err != nil {
+ return nil, err
+ }
+ return ParseDeleteSecretV4Response(rsp)
+}
+
+// DeleteSecretV4WithResponse performs a DELETE /api/v4/secrets/{secretName} (the `DeleteSecretV4` operationId) request.
+// Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
+//
+// Delete secret.
+func (c *ClientWithResponses) DeleteSecretV4WithResponse(ctx context.Context, secretName string, body DeleteSecretV4JSONRequestBody, reqEditors ...RequestEditorFn) (*DeleteSecretV4Response, error) {
+ rsp, err := c.DeleteSecretV4(ctx, secretName, body, reqEditors...)
+ if err != nil {
+ return nil, err
+ }
+ return ParseDeleteSecretV4Response(rsp)
+}
+
+// GetSecretByNameV4WithResponse performs a GET /api/v4/secrets/{secretName} (the `GetSecretByNameV4` operationId) request.
+//
+// Get a secret by name.
+//
+// Returns a wrapper object for the known response body format(s).
+func (c *ClientWithResponses) GetSecretByNameV4WithResponse(ctx context.Context, secretName string, params *GetSecretByNameV4Params, reqEditors ...RequestEditorFn) (*GetSecretByNameV4Response, error) {
+ rsp, err := c.GetSecretByNameV4(ctx, secretName, params, reqEditors...)
+ if err != nil {
+ return nil, err
+ }
+ return ParseGetSecretByNameV4Response(rsp)
+}
+
+// UpdateSecretV4WithBodyWithResponse performs a PATCH /api/v4/secrets/{secretName} (the `UpdateSecretV4` operationId) request,
+// with any type of body and a specified content type.
+//
+// Update secret.
+//
+// Returns a wrapper object for the known response body format(s).
+func (c *ClientWithResponses) UpdateSecretV4WithBodyWithResponse(ctx context.Context, secretName string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateSecretV4Response, error) {
+ rsp, err := c.UpdateSecretV4WithBody(ctx, secretName, contentType, body, reqEditors...)
+ if err != nil {
+ return nil, err
+ }
+ return ParseUpdateSecretV4Response(rsp)
+}
+
+// UpdateSecretV4WithResponse performs a PATCH /api/v4/secrets/{secretName} (the `UpdateSecretV4` operationId) request.
+// Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
+//
+// Update secret.
+func (c *ClientWithResponses) UpdateSecretV4WithResponse(ctx context.Context, secretName string, body UpdateSecretV4JSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateSecretV4Response, error) {
+ rsp, err := c.UpdateSecretV4(ctx, secretName, body, reqEditors...)
+ if err != nil {
+ return nil, err
+ }
+ return ParseUpdateSecretV4Response(rsp)
+}
+
+// CreateSecretV4WithBodyWithResponse performs a POST /api/v4/secrets/{secretName} (the `CreateSecretV4` operationId) request,
+// with any type of body and a specified content type.
+//
+// Create secret.
+//
+// Returns a wrapper object for the known response body format(s).
+func (c *ClientWithResponses) CreateSecretV4WithBodyWithResponse(ctx context.Context, secretName string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateSecretV4Response, error) {
+ rsp, err := c.CreateSecretV4WithBody(ctx, secretName, contentType, body, reqEditors...)
+ if err != nil {
+ return nil, err
+ }
+ return ParseCreateSecretV4Response(rsp)
+}
+
+// CreateSecretV4WithResponse performs a POST /api/v4/secrets/{secretName} (the `CreateSecretV4` operationId) request.
+// Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
+//
+// Create secret.
+func (c *ClientWithResponses) CreateSecretV4WithResponse(ctx context.Context, secretName string, body CreateSecretV4JSONRequestBody, reqEditors ...RequestEditorFn) (*CreateSecretV4Response, error) {
+ rsp, err := c.CreateSecretV4(ctx, secretName, body, reqEditors...)
+ if err != nil {
+ return nil, err
+ }
+ return ParseCreateSecretV4Response(rsp)
+}
+
+// GetSecretReferencesV4WithResponse performs a GET /api/v4/secrets/{secretName}/reference-dependency-tree (the `GetSecretReferencesV4` operationId) request.
+//
+// Get secret reference dependency tree.
+//
+// Returns a wrapper object for the known response body format(s).
+func (c *ClientWithResponses) GetSecretReferencesV4WithResponse(ctx context.Context, secretName string, params *GetSecretReferencesV4Params, reqEditors ...RequestEditorFn) (*GetSecretReferencesV4Response, error) {
+ rsp, err := c.GetSecretReferencesV4(ctx, secretName, params, reqEditors...)
+ if err != nil {
+ return nil, err
+ }
+ return ParseGetSecretReferencesV4Response(rsp)
+}
+
+// GetSecretReferenceTreeV4WithResponse performs a GET /api/v4/secrets/{secretName}/secret-reference-tree (the `GetSecretReferenceTreeV4` operationId) request.
+//
+// Get secret reference tree.
+//
+// Returns a wrapper object for the known response body format(s).
+func (c *ClientWithResponses) GetSecretReferenceTreeV4WithResponse(ctx context.Context, secretName string, params *GetSecretReferenceTreeV4Params, reqEditors ...RequestEditorFn) (*GetSecretReferenceTreeV4Response, error) {
+ rsp, err := c.GetSecretReferenceTreeV4(ctx, secretName, params, reqEditors...)
+ if err != nil {
+ return nil, err
+ }
+ return ParseGetSecretReferenceTreeV4Response(rsp)
+}
+
+// ParseGetInstanceStatusResponse parses an HTTP response from a GetInstanceStatusWithResponse call
+func ParseGetInstanceStatusResponse(rsp *http.Response) (*GetInstanceStatusResponse, error) {
+ bodyBytes, err := io.ReadAll(rsp.Body)
+ defer func() { _ = rsp.Body.Close() }()
+ if err != nil {
+ return nil, err
+ }
+
+ response := &GetInstanceStatusResponse{
+ 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 GetInstanceStatus400JSONResponseBodyStatusCode `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 GetInstanceStatus401JSONResponseBodyStatusCode `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 GetInstanceStatus403JSONResponseBodyStatusCode `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 GetInstanceStatus404JSONResponseBodyStatusCode `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 GetInstanceStatus422JSONResponseBodyStatusCode `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 GetInstanceStatus500JSONResponseBodyStatusCode `json:"statusCode"`
+ }
+ if err := json.Unmarshal(bodyBytes, &dest); err != nil {
+ return nil, err
+ }
+ response.JSON500 = &dest
+
+ }
+
+ return response, nil
+}
+
+// ParseListAccessApprovalPoliciesResponse parses an HTTP response from a ListAccessApprovalPoliciesWithResponse call
+func ParseListAccessApprovalPoliciesResponse(rsp *http.Response) (*ListAccessApprovalPoliciesResponse, error) {
+ bodyBytes, err := io.ReadAll(rsp.Body)
+ defer func() { _ = rsp.Body.Close() }()
+ if err != nil {
+ return nil, err
+ }
+
+ response := &ListAccessApprovalPoliciesResponse{
+ Body: bodyBytes,
+ HTTPResponse: rsp,
+ }
+
+ switch {
+ case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
+ var dest struct {
+ Approvals *[]struct {
+ AllowedSelfApprovals *bool `json:"allowedSelfApprovals,omitempty"`
+ Approvals *float32 `json:"approvals,omitempty"`
+ Approvers *[]struct {
+ ApprovalsRequired *float32 `json:"approvalsRequired,omitempty"`
+ Id *string `json:"id,omitempty"`
+ Name *string `json:"name,omitempty"`
+ Sequence *float32 `json:"sequence,omitempty"`
+ Type ListAccessApprovalPolicies200JSONResponseBodyApprovalsApproversType `json:"type"`
+ } `json:"approvers,omitempty"`
+ BypassForMachineIdentities *bool `json:"bypassForMachineIdentities,omitempty"`
+ Bypassers []struct {
+ Id *string `json:"id,omitempty"`
+ Type ListAccessApprovalPolicies200JSONResponseBodyApprovalsBypassersType `json:"type"`
+ } `json:"bypassers"`
+ CreatedAt time.Time `json:"createdAt"`
+ DeletedAt *time.Time `json:"deletedAt,omitempty"`
+ EnforcementLevel *string `json:"enforcementLevel,omitempty"`
+ EnvId openapi_types.UUID `json:"envId"`
+ Environment struct {
+ Id string `json:"id"`
+ Name string `json:"name"`
+ Slug string `json:"slug"`
+ } `json:"environment"`
+ Environments []struct {
+ Id string `json:"id"`
+ Name string `json:"name"`
+ Slug string `json:"slug"`
+ } `json:"environments"`
+ ExternalApproval *struct {
+ // ConnectionId The ID of the App Connection used to reach the external approval system.
+ ConnectionId openapi_types.UUID `json:"connectionId"`
+
+ // Type The external approval system that reviews requests made against this policy.
+ Type ListAccessApprovalPolicies200JSONResponseBodyApprovalsExternalApprovalType `json:"type"`
+ } `json:"externalApproval,omitempty"`
+ Id openapi_types.UUID `json:"id"`
+ MaxTimePeriod *string `json:"maxTimePeriod,omitempty"`
+ Name string `json:"name"`
+ ProjectId string `json:"projectId"`
+ RequestExpirationTime *string `json:"requestExpirationTime,omitempty"`
+ SecretPath string `json:"secretPath"`
+ UpdatedAt time.Time `json:"updatedAt"`
+ } `json:"approvals,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 ListAccessApprovalPolicies400JSONResponseBodyStatusCode `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 ListAccessApprovalPolicies401JSONResponseBodyStatusCode `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 ListAccessApprovalPolicies403JSONResponseBodyStatusCode `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 ListAccessApprovalPolicies404JSONResponseBodyStatusCode `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 ListAccessApprovalPolicies422JSONResponseBodyStatusCode `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 ListAccessApprovalPolicies500JSONResponseBodyStatusCode `json:"statusCode"`
+ }
+ if err := json.Unmarshal(bodyBytes, &dest); err != nil {
+ return nil, err
+ }
+ response.JSON500 = &dest
+
+ }
+
+ return response, nil
+}
+
+// ParseCreateAccessApprovalPolicyResponse parses an HTTP response from a CreateAccessApprovalPolicyWithResponse call
+func ParseCreateAccessApprovalPolicyResponse(rsp *http.Response) (*CreateAccessApprovalPolicyResponse, error) {
+ bodyBytes, err := io.ReadAll(rsp.Body)
+ defer func() { _ = rsp.Body.Close() }()
+ if err != nil {
+ return nil, err
+ }
+
+ response := &CreateAccessApprovalPolicyResponse{
+ Body: bodyBytes,
+ HTTPResponse: rsp,
+ }
+
+ switch {
+ case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
+ var dest struct {
+ Approval struct {
+ AllowedSelfApprovals *bool `json:"allowedSelfApprovals,omitempty"`
+ Approvals *float32 `json:"approvals,omitempty"`
+ BypassForMachineIdentities *bool `json:"bypassForMachineIdentities,omitempty"`
+ CreatedAt time.Time `json:"createdAt"`
+ DeletedAt *time.Time `json:"deletedAt,omitempty"`
+ EnforcementLevel *string `json:"enforcementLevel,omitempty"`
+ EnvId openapi_types.UUID `json:"envId"`
+ Environment struct {
+ Id string `json:"id"`
+ Name string `json:"name"`
+ Slug string `json:"slug"`
+ } `json:"environment"`
+ Environments []struct {
+ Id string `json:"id"`
+ Name string `json:"name"`
+ Slug string `json:"slug"`
+ } `json:"environments"`
+ ExternalApproval *struct {
+ // ConnectionId The ID of the App Connection used to reach the external approval system.
+ ConnectionId openapi_types.UUID `json:"connectionId"`
+
+ // Type The external approval system that reviews requests made against this policy.
+ Type CreateAccessApprovalPolicy200JSONResponseBodyApprovalExternalApprovalType `json:"type"`
+ } `json:"externalApproval,omitempty"`
+ Id openapi_types.UUID `json:"id"`
+ Name string `json:"name"`
+ ProjectId string `json:"projectId"`
+ SecretPath string `json:"secretPath"`
+ UpdatedAt time.Time `json:"updatedAt"`
+ } `json:"approval"`
+ }
+ 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 CreateAccessApprovalPolicy400JSONResponseBodyStatusCode `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 CreateAccessApprovalPolicy401JSONResponseBodyStatusCode `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 CreateAccessApprovalPolicy403JSONResponseBodyStatusCode `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 CreateAccessApprovalPolicy404JSONResponseBodyStatusCode `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 CreateAccessApprovalPolicy422JSONResponseBodyStatusCode `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 CreateAccessApprovalPolicy500JSONResponseBodyStatusCode `json:"statusCode"`
+ }
+ if err := json.Unmarshal(bodyBytes, &dest); err != nil {
+ return nil, err
+ }
+ response.JSON500 = &dest
+
}
- return ParseDuplicateSecretV4Response(rsp)
-}
-// DuplicateSecretV4WithResponse performs a POST /api/v4/secrets/duplicate (the `DuplicateSecretV4` operationId) request.
-// Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
-//
-// Duplicate one or more static secrets into another environment.
-func (c *ClientWithResponses) DuplicateSecretV4WithResponse(ctx context.Context, body DuplicateSecretV4JSONRequestBody, reqEditors ...RequestEditorFn) (*DuplicateSecretV4Response, error) {
- rsp, err := c.DuplicateSecretV4(ctx, body, reqEditors...)
- if err != nil {
- return nil, err
- }
- return ParseDuplicateSecretV4Response(rsp)
+ return response, nil
}
-// GetSecretByIdV4WithResponse performs a GET /api/v4/secrets/id/{secretId} (the `GetSecretByIdV4` operationId) request.
-//
-// Returns a wrapper object for the known response body format(s).
-func (c *ClientWithResponses) GetSecretByIdV4WithResponse(ctx context.Context, secretId string, reqEditors ...RequestEditorFn) (*GetSecretByIdV4Response, error) {
- rsp, err := c.GetSecretByIdV4(ctx, secretId, reqEditors...)
+// ParseGetAccessApprovalPolicyResponse parses an HTTP response from a GetAccessApprovalPolicyWithResponse call
+func ParseGetAccessApprovalPolicyResponse(rsp *http.Response) (*GetAccessApprovalPolicyResponse, error) {
+ bodyBytes, err := io.ReadAll(rsp.Body)
+ defer func() { _ = rsp.Body.Close() }()
if err != nil {
return nil, err
}
- return ParseGetSecretByIdV4Response(rsp)
-}
-// MoveSecretsV4WithBodyWithResponse performs a POST /api/v4/secrets/move (the `MoveSecretsV4` 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) MoveSecretsV4WithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*MoveSecretsV4Response, error) {
- rsp, err := c.MoveSecretsV4WithBody(ctx, contentType, body, reqEditors...)
- if err != nil {
- return nil, err
+ response := &GetAccessApprovalPolicyResponse{
+ Body: bodyBytes,
+ HTTPResponse: rsp,
}
- return ParseMoveSecretsV4Response(rsp)
-}
-// MoveSecretsV4WithResponse performs a POST /api/v4/secrets/move (the `MoveSecretsV4` 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) MoveSecretsV4WithResponse(ctx context.Context, body MoveSecretsV4JSONRequestBody, reqEditors ...RequestEditorFn) (*MoveSecretsV4Response, error) {
- rsp, err := c.MoveSecretsV4(ctx, body, reqEditors...)
- if err != nil {
- return nil, err
- }
- return ParseMoveSecretsV4Response(rsp)
-}
+ switch {
+ case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
+ var dest struct {
+ Approval struct {
+ AllowedSelfApprovals *bool `json:"allowedSelfApprovals,omitempty"`
+ Approvals *float32 `json:"approvals,omitempty"`
+ Approvers *[]struct {
+ ApprovalsRequired *float32 `json:"approvalsRequired,omitempty"`
+ Id *string `json:"id,omitempty"`
+ Name *string `json:"name,omitempty"`
+ Sequence *float32 `json:"sequence,omitempty"`
+ Type GetAccessApprovalPolicy200JSONResponseBodyApprovalApproversType `json:"type"`
+ } `json:"approvers,omitempty"`
+ BypassForMachineIdentities *bool `json:"bypassForMachineIdentities,omitempty"`
+ Bypassers *[]struct {
+ Id *string `json:"id,omitempty"`
+ Name *string `json:"name,omitempty"`
+ Type GetAccessApprovalPolicy200JSONResponseBodyApprovalBypassersType `json:"type"`
+ } `json:"bypassers,omitempty"`
+ CreatedAt time.Time `json:"createdAt"`
+ DeletedAt *time.Time `json:"deletedAt,omitempty"`
+ EnforcementLevel *string `json:"enforcementLevel,omitempty"`
+ EnvId openapi_types.UUID `json:"envId"`
+ Environment struct {
+ Id string `json:"id"`
+ Name string `json:"name"`
+ Slug string `json:"slug"`
+ } `json:"environment"`
+ Environments []struct {
+ Id string `json:"id"`
+ Name string `json:"name"`
+ Slug string `json:"slug"`
+ } `json:"environments"`
+ ExternalApproval *struct {
+ // ConnectionId The ID of the App Connection used to reach the external approval system.
+ ConnectionId openapi_types.UUID `json:"connectionId"`
+
+ // Type The external approval system that reviews requests made against this policy.
+ Type GetAccessApprovalPolicy200JSONResponseBodyApprovalExternalApprovalType `json:"type"`
+ } `json:"externalApproval,omitempty"`
+ Id openapi_types.UUID `json:"id"`
+ MaxTimePeriod *string `json:"maxTimePeriod,omitempty"`
+ Name string `json:"name"`
+ ProjectId string `json:"projectId"`
+ RequestExpirationTime *string `json:"requestExpirationTime,omitempty"`
+ SecretPath string `json:"secretPath"`
+ UpdatedAt time.Time `json:"updatedAt"`
+ } `json:"approval"`
+ }
+ if err := json.Unmarshal(bodyBytes, &dest); err != nil {
+ return nil, err
+ }
+ response.JSON200 = &dest
-// DeleteSecretV4WithBodyWithResponse performs a DELETE /api/v4/secrets/{secretName} (the `DeleteSecretV4` operationId) request,
-// with any type of body and a specified content type.
-//
-// Delete secret.
-//
-// Returns a wrapper object for the known response body format(s).
-func (c *ClientWithResponses) DeleteSecretV4WithBodyWithResponse(ctx context.Context, secretName string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*DeleteSecretV4Response, error) {
- rsp, err := c.DeleteSecretV4WithBody(ctx, secretName, contentType, body, reqEditors...)
- if err != nil {
- return nil, err
- }
- return ParseDeleteSecretV4Response(rsp)
-}
+ 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 GetAccessApprovalPolicy400JSONResponseBodyStatusCode `json:"statusCode"`
+ }
+ if err := json.Unmarshal(bodyBytes, &dest); err != nil {
+ return nil, err
+ }
+ response.JSON400 = &dest
-// DeleteSecretV4WithResponse performs a DELETE /api/v4/secrets/{secretName} (the `DeleteSecretV4` operationId) request.
-// Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
-//
-// Delete secret.
-func (c *ClientWithResponses) DeleteSecretV4WithResponse(ctx context.Context, secretName string, body DeleteSecretV4JSONRequestBody, reqEditors ...RequestEditorFn) (*DeleteSecretV4Response, error) {
- rsp, err := c.DeleteSecretV4(ctx, secretName, body, reqEditors...)
- if err != nil {
- return nil, err
- }
- return ParseDeleteSecretV4Response(rsp)
-}
+ 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 GetAccessApprovalPolicy401JSONResponseBodyStatusCode `json:"statusCode"`
+ }
+ if err := json.Unmarshal(bodyBytes, &dest); err != nil {
+ return nil, err
+ }
+ response.JSON401 = &dest
-// GetSecretByNameV4WithResponse performs a GET /api/v4/secrets/{secretName} (the `GetSecretByNameV4` operationId) request.
-//
-// Get a secret by name.
-//
-// Returns a wrapper object for the known response body format(s).
-func (c *ClientWithResponses) GetSecretByNameV4WithResponse(ctx context.Context, secretName string, params *GetSecretByNameV4Params, reqEditors ...RequestEditorFn) (*GetSecretByNameV4Response, error) {
- rsp, err := c.GetSecretByNameV4(ctx, secretName, params, reqEditors...)
- if err != nil {
- return nil, err
- }
- return ParseGetSecretByNameV4Response(rsp)
-}
+ 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 GetAccessApprovalPolicy403JSONResponseBodyStatusCode `json:"statusCode"`
+ }
+ if err := json.Unmarshal(bodyBytes, &dest); err != nil {
+ return nil, err
+ }
+ response.JSON403 = &dest
-// UpdateSecretV4WithBodyWithResponse performs a PATCH /api/v4/secrets/{secretName} (the `UpdateSecretV4` operationId) request,
-// with any type of body and a specified content type.
-//
-// Update secret.
-//
-// Returns a wrapper object for the known response body format(s).
-func (c *ClientWithResponses) UpdateSecretV4WithBodyWithResponse(ctx context.Context, secretName string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateSecretV4Response, error) {
- rsp, err := c.UpdateSecretV4WithBody(ctx, secretName, contentType, body, reqEditors...)
- if err != nil {
- return nil, err
- }
- return ParseUpdateSecretV4Response(rsp)
-}
+ 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 GetAccessApprovalPolicy404JSONResponseBodyStatusCode `json:"statusCode"`
+ }
+ if err := json.Unmarshal(bodyBytes, &dest); err != nil {
+ return nil, err
+ }
+ response.JSON404 = &dest
-// UpdateSecretV4WithResponse performs a PATCH /api/v4/secrets/{secretName} (the `UpdateSecretV4` operationId) request.
-// Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
-//
-// Update secret.
-func (c *ClientWithResponses) UpdateSecretV4WithResponse(ctx context.Context, secretName string, body UpdateSecretV4JSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateSecretV4Response, error) {
- rsp, err := c.UpdateSecretV4(ctx, secretName, body, reqEditors...)
- if err != nil {
- return nil, err
- }
- return ParseUpdateSecretV4Response(rsp)
-}
+ 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 GetAccessApprovalPolicy422JSONResponseBodyStatusCode `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 GetAccessApprovalPolicy500JSONResponseBodyStatusCode `json:"statusCode"`
+ }
+ if err := json.Unmarshal(bodyBytes, &dest); err != nil {
+ return nil, err
+ }
+ response.JSON500 = &dest
-// CreateSecretV4WithBodyWithResponse performs a POST /api/v4/secrets/{secretName} (the `CreateSecretV4` operationId) request,
-// with any type of body and a specified content type.
-//
-// Create secret.
-//
-// Returns a wrapper object for the known response body format(s).
-func (c *ClientWithResponses) CreateSecretV4WithBodyWithResponse(ctx context.Context, secretName string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateSecretV4Response, error) {
- rsp, err := c.CreateSecretV4WithBody(ctx, secretName, contentType, body, reqEditors...)
- if err != nil {
- return nil, err
}
- return ParseCreateSecretV4Response(rsp)
+
+ return response, nil
}
-// CreateSecretV4WithResponse performs a POST /api/v4/secrets/{secretName} (the `CreateSecretV4` operationId) request.
-// Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
-//
-// Create secret.
-func (c *ClientWithResponses) CreateSecretV4WithResponse(ctx context.Context, secretName string, body CreateSecretV4JSONRequestBody, reqEditors ...RequestEditorFn) (*CreateSecretV4Response, error) {
- rsp, err := c.CreateSecretV4(ctx, secretName, body, reqEditors...)
+// ParseUpdateAccessApprovalPolicyResponse parses an HTTP response from a UpdateAccessApprovalPolicyWithResponse call
+func ParseUpdateAccessApprovalPolicyResponse(rsp *http.Response) (*UpdateAccessApprovalPolicyResponse, error) {
+ bodyBytes, err := io.ReadAll(rsp.Body)
+ defer func() { _ = rsp.Body.Close() }()
if err != nil {
return nil, err
}
- return ParseCreateSecretV4Response(rsp)
-}
-// GetSecretReferencesV4WithResponse performs a GET /api/v4/secrets/{secretName}/reference-dependency-tree (the `GetSecretReferencesV4` operationId) request.
-//
-// Get secret reference dependency tree.
-//
-// Returns a wrapper object for the known response body format(s).
-func (c *ClientWithResponses) GetSecretReferencesV4WithResponse(ctx context.Context, secretName string, params *GetSecretReferencesV4Params, reqEditors ...RequestEditorFn) (*GetSecretReferencesV4Response, error) {
- rsp, err := c.GetSecretReferencesV4(ctx, secretName, params, reqEditors...)
- if err != nil {
- return nil, err
+ response := &UpdateAccessApprovalPolicyResponse{
+ Body: bodyBytes,
+ HTTPResponse: rsp,
}
- return ParseGetSecretReferencesV4Response(rsp)
-}
-// GetSecretReferenceTreeV4WithResponse performs a GET /api/v4/secrets/{secretName}/secret-reference-tree (the `GetSecretReferenceTreeV4` operationId) request.
-//
-// Get secret reference tree.
-//
-// Returns a wrapper object for the known response body format(s).
-func (c *ClientWithResponses) GetSecretReferenceTreeV4WithResponse(ctx context.Context, secretName string, params *GetSecretReferenceTreeV4Params, reqEditors ...RequestEditorFn) (*GetSecretReferenceTreeV4Response, error) {
- rsp, err := c.GetSecretReferenceTreeV4(ctx, secretName, params, reqEditors...)
- if err != nil {
- return nil, err
+ switch {
+ case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
+ var dest struct {
+ Approval struct {
+ AllowedSelfApprovals *bool `json:"allowedSelfApprovals,omitempty"`
+ Approvals *float32 `json:"approvals,omitempty"`
+ BypassForMachineIdentities *bool `json:"bypassForMachineIdentities,omitempty"`
+ CreatedAt time.Time `json:"createdAt"`
+ DeletedAt *time.Time `json:"deletedAt,omitempty"`
+ EnforcementLevel *string `json:"enforcementLevel,omitempty"`
+ EnvId openapi_types.UUID `json:"envId"`
+ Environment struct {
+ Id string `json:"id"`
+ Name string `json:"name"`
+ Slug string `json:"slug"`
+ } `json:"environment"`
+ Environments []struct {
+ Id string `json:"id"`
+ Name string `json:"name"`
+ Slug string `json:"slug"`
+ } `json:"environments"`
+ ExternalApproval *struct {
+ // ConnectionId The ID of the App Connection used to reach the external approval system.
+ ConnectionId openapi_types.UUID `json:"connectionId"`
+
+ // Type The external approval system that reviews requests made against this policy.
+ Type UpdateAccessApprovalPolicy200JSONResponseBodyApprovalExternalApprovalType `json:"type"`
+ } `json:"externalApproval,omitempty"`
+ Id openapi_types.UUID `json:"id"`
+ Name string `json:"name"`
+ ProjectId string `json:"projectId"`
+ SecretPath string `json:"secretPath"`
+ UpdatedAt time.Time `json:"updatedAt"`
+ } `json:"approval"`
+ }
+ 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 UpdateAccessApprovalPolicy400JSONResponseBodyStatusCode `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 UpdateAccessApprovalPolicy401JSONResponseBodyStatusCode `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 UpdateAccessApprovalPolicy403JSONResponseBodyStatusCode `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 UpdateAccessApprovalPolicy404JSONResponseBodyStatusCode `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 UpdateAccessApprovalPolicy422JSONResponseBodyStatusCode `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 UpdateAccessApprovalPolicy500JSONResponseBodyStatusCode `json:"statusCode"`
+ }
+ if err := json.Unmarshal(bodyBytes, &dest); err != nil {
+ return nil, err
+ }
+ response.JSON500 = &dest
+
}
- return ParseGetSecretReferenceTreeV4Response(rsp)
+
+ return response, nil
}
-// ParseGetInstanceStatusResponse parses an HTTP response from a GetInstanceStatusWithResponse call
-func ParseGetInstanceStatusResponse(rsp *http.Response) (*GetInstanceStatusResponse, error) {
+// ParseCreateAccessApprovalRequestResponse parses an HTTP response from a CreateAccessApprovalRequestWithResponse call
+func ParseCreateAccessApprovalRequestResponse(rsp *http.Response) (*CreateAccessApprovalRequestResponse, error) {
bodyBytes, err := io.ReadAll(rsp.Body)
defer func() { _ = rsp.Body.Close() }()
if err != nil {
return nil, err
}
- response := &GetInstanceStatusResponse{
+ response := &CreateAccessApprovalRequestResponse{
Body: bodyBytes,
HTTPResponse: rsp,
}
@@ -39600,15 +44266,28 @@ func ParseGetInstanceStatusResponse(rsp *http.Response) (*GetInstanceStatusRespo
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"`
+ Approval struct {
+ ApprovedAt *time.Time `json:"approvedAt,omitempty"`
+ ApprovedByUserId *openapi_types.UUID `json:"approvedByUserId,omitempty"`
+ BypassReason *string `json:"bypassReason,omitempty"`
+ CreatedAt time.Time `json:"createdAt"`
+ EditNote *string `json:"editNote,omitempty"`
+ EditedByUserId *openapi_types.UUID `json:"editedByUserId,omitempty"`
+ ExpiresAt *time.Time `json:"expiresAt,omitempty"`
+ Id openapi_types.UUID `json:"id"`
+ IsTemporary bool `json:"isTemporary"`
+ Note *string `json:"note,omitempty"`
+ Permissions interface{} `json:"permissions,omitempty"`
+ PolicyId openapi_types.UUID `json:"policyId"`
+ PrivilegeDeletedAt *time.Time `json:"privilegeDeletedAt,omitempty"`
+ PrivilegeId *openapi_types.UUID `json:"privilegeId,omitempty"`
+ RequestedByUserId openapi_types.UUID `json:"requestedByUserId"`
+ RevokedAt *time.Time `json:"revokedAt,omitempty"`
+ RevokedByUserId *openapi_types.UUID `json:"revokedByUserId,omitempty"`
+ Status *string `json:"status,omitempty"`
+ TemporaryRange *string `json:"temporaryRange,omitempty"`
+ UpdatedAt time.Time `json:"updatedAt"`
+ } `json:"approval"`
}
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
return nil, err
@@ -39617,11 +44296,11 @@ func ParseGetInstanceStatusResponse(rsp *http.Response) (*GetInstanceStatusRespo
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 GetInstanceStatus400JSONResponseBodyStatusCode `json:"statusCode"`
+ Details interface{} `json:"details,omitempty"`
+ Error string `json:"error"`
+ Message string `json:"message"`
+ ReqId string `json:"reqId"`
+ StatusCode CreateAccessApprovalRequest400JSONResponseBodyStatusCode `json:"statusCode"`
}
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
return nil, err
@@ -39630,10 +44309,10 @@ func ParseGetInstanceStatusResponse(rsp *http.Response) (*GetInstanceStatusRespo
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 GetInstanceStatus401JSONResponseBodyStatusCode `json:"statusCode"`
+ Error string `json:"error"`
+ Message string `json:"message"`
+ ReqId string `json:"reqId"`
+ StatusCode CreateAccessApprovalRequest401JSONResponseBodyStatusCode `json:"statusCode"`
}
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
return nil, err
@@ -39642,11 +44321,11 @@ func ParseGetInstanceStatusResponse(rsp *http.Response) (*GetInstanceStatusRespo
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 GetInstanceStatus403JSONResponseBodyStatusCode `json:"statusCode"`
+ Details interface{} `json:"details,omitempty"`
+ Error string `json:"error"`
+ Message string `json:"message"`
+ ReqId string `json:"reqId"`
+ StatusCode CreateAccessApprovalRequest403JSONResponseBodyStatusCode `json:"statusCode"`
}
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
return nil, err
@@ -39655,10 +44334,10 @@ func ParseGetInstanceStatusResponse(rsp *http.Response) (*GetInstanceStatusRespo
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 GetInstanceStatus404JSONResponseBodyStatusCode `json:"statusCode"`
+ Error string `json:"error"`
+ Message string `json:"message"`
+ ReqId string `json:"reqId"`
+ StatusCode CreateAccessApprovalRequest404JSONResponseBodyStatusCode `json:"statusCode"`
}
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
return nil, err
@@ -39667,10 +44346,10 @@ func ParseGetInstanceStatusResponse(rsp *http.Response) (*GetInstanceStatusRespo
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 GetInstanceStatus422JSONResponseBodyStatusCode `json:"statusCode"`
+ Error string `json:"error"`
+ Message interface{} `json:"message,omitempty"`
+ ReqId string `json:"reqId"`
+ StatusCode CreateAccessApprovalRequest422JSONResponseBodyStatusCode `json:"statusCode"`
}
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
return nil, err
@@ -39679,10 +44358,10 @@ func ParseGetInstanceStatusResponse(rsp *http.Response) (*GetInstanceStatusRespo
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 GetInstanceStatus500JSONResponseBodyStatusCode `json:"statusCode"`
+ Error string `json:"error"`
+ Message string `json:"message"`
+ ReqId string `json:"reqId"`
+ StatusCode CreateAccessApprovalRequest500JSONResponseBodyStatusCode `json:"statusCode"`
}
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
return nil, err
@@ -40160,6 +44839,108 @@ func ParseDeleteGitHubAppConnectionResponse(rsp *http.Response) (*DeleteGitHubAp
return response, nil
}
+// ParseCreateServiceNowAppConnectionResponse parses an HTTP response from a CreateServiceNowAppConnectionWithResponse call
+func ParseCreateServiceNowAppConnectionResponse(rsp *http.Response) (*CreateServiceNowAppConnectionResponse, error) {
+ bodyBytes, err := io.ReadAll(rsp.Body)
+ defer func() { _ = rsp.Body.Close() }()
+ if err != nil {
+ return nil, err
+ }
+
+ response := &CreateServiceNowAppConnectionResponse{
+ Body: bodyBytes,
+ HTTPResponse: rsp,
+ }
+
+ switch {
+ case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
+ var dest struct {
+ AppConnection CreateServiceNowAppConnection200JSONResponseBody_AppConnection `json:"appConnection"`
+ }
+ 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 CreateServiceNowAppConnection400JSONResponseBodyStatusCode `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 CreateServiceNowAppConnection401JSONResponseBodyStatusCode `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 CreateServiceNowAppConnection403JSONResponseBodyStatusCode `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 CreateServiceNowAppConnection404JSONResponseBodyStatusCode `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 CreateServiceNowAppConnection422JSONResponseBodyStatusCode `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 CreateServiceNowAppConnection500JSONResponseBodyStatusCode `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)
diff --git a/tests/clients/api/oapi-codegen.yaml b/tests/clients/api/oapi-codegen.yaml
index d2c6275d5e..c680a4d4da 100644
--- a/tests/clients/api/oapi-codegen.yaml
+++ b/tests/clients/api/oapi-codegen.yaml
@@ -37,6 +37,7 @@ output-options:
- createProjectIdentityMembership
- listProjectMachineIdentities
- createGitHubAppConnection
+ - createServiceNowAppConnection
- createGitHubSecretSync
- getGitHubSecretSync
- deleteGitHubSecretSync
@@ -77,6 +78,11 @@ output-options:
- reviewSecretApprovalRequest
- updateSecretApprovalRequestStatus
- mergeSecretApprovalRequest
+ - createAccessApprovalPolicy
+ - listAccessApprovalPolicies
+ - updateAccessApprovalPolicy
+ - getAccessApprovalPolicy
+ - createAccessApprovalRequest
- createGroup
- addUserToGroup
- removeUserFromGroup
diff --git a/tests/cmd/fakenet/main.go b/tests/cmd/fakenet/main.go
index ef67727612..e47b51d5fc 100644
--- a/tests/cmd/fakenet/main.go
+++ b/tests/cmd/fakenet/main.go
@@ -16,6 +16,7 @@ import (
"github.com/Infisical/infisical/tests/fakes/github"
"github.com/Infisical/infisical/tests/fakes/license"
+ "github.com/Infisical/infisical/tests/fakes/servicenow"
"github.com/Infisical/infisical/tests/fakes/smtp"
"github.com/Infisical/infisical/tests/infra/fakenet"
)
@@ -34,6 +35,7 @@ func main() {
srv := fakenet.New(
github.Service,
license.Service,
+ servicenow.Service,
)
mail := smtp.New(func(domain string) fakenet.Emitter { return srv.Emitter(smtp.Host, domain) })
diff --git a/tests/fakes/servicenow/fake.go b/tests/fakes/servicenow/fake.go
new file mode 100644
index 0000000000..1cad3f4327
--- /dev/null
+++ b/tests/fakes/servicenow/fake.go
@@ -0,0 +1,79 @@
+package servicenow
+
+import (
+ "encoding/json"
+ "net/http"
+
+ "github.com/Infisical/infisical/tests/infra/fakenet"
+)
+
+// Service answers as one ServiceNow instance.
+//
+// An instance URL is always the customer's own, so unlike GitHub there is no name the
+// client has hardcoded. A real name under service-now.com still reaches this fake only
+// through fakenet's DNS and CA, never by pointing the connection at fakenet itself.
+var Service = service{host: "harness.service-now.com"}
+
+type service struct{ host string }
+
+func (s service) Host() string { return s.host }
+
+// Scope is the integration user, which basic auth carries on every call.
+func (service) Scope(r *http.Request) (string, bool) {
+ user, _, ok := r.BasicAuth()
+ return user, ok
+}
+
+func (service) New(fakenet.Emitter) fakenet.Fake {
+ in := &Instance{UserSysID: "6816f79cc0a8016401c5a33be04be441"}
+ in.mux = in.routes()
+ return in
+}
+
+func (in *Instance) ServeHTTP(w http.ResponseWriter, r *http.Request) { in.mux.ServeHTTP(w, r) }
+
+func (in *Instance) routes() *http.ServeMux {
+ mux := http.NewServeMux()
+
+ // Creating a ServiceNow App Connection calls this to check the credential works,
+ // so the fake answers it by existing rather than because a test registered anything.
+ mux.HandleFunc("GET /api/now/ui/user/current_user", in.currentUser)
+
+ return mux
+}
+
+func (in *Instance) currentUser(w http.ResponseWriter, r *http.Request) {
+ user, _, _ := r.BasicAuth()
+ in.mu.Lock()
+ defer in.mu.Unlock()
+ writeJSON(w, http.StatusOK, map[string]any{
+ "result": map[string]any{"user_name": user, "user_sys_id": in.UserSysID},
+ })
+}
+
+func (in *Instance) Snapshot() ([]byte, error) {
+ in.mu.Lock()
+ defer in.mu.Unlock()
+ return json.Marshal(in)
+}
+
+// Seed merges a partial instance in, so a test names only what it cares about.
+func (in *Instance) Seed(raw []byte) error {
+ var seed Instance
+ if err := json.Unmarshal(raw, &seed); err != nil {
+ return err
+ }
+
+ in.mu.Lock()
+ defer in.mu.Unlock()
+ if seed.UserSysID != "" {
+ in.UserSysID = seed.UserSysID
+ }
+ return nil
+}
+
+func writeJSON(w http.ResponseWriter, status int, body any) {
+ w.Header().Set("Content-Type", "application/json")
+ w.WriteHeader(status)
+ _ = json.NewEncoder(w).Encode(body)
+}
diff --git a/tests/fakes/servicenow/fake_test.go b/tests/fakes/servicenow/fake_test.go
new file mode 100644
index 0000000000..985bf30cbd
--- /dev/null
+++ b/tests/fakes/servicenow/fake_test.go
@@ -0,0 +1,45 @@
+package servicenow_test
+
+import (
+ "encoding/json"
+ "io"
+ "net/http"
+ "net/http/httptest"
+ "testing"
+
+ "github.com/Infisical/infisical/tests/fakes/servicenow"
+ "github.com/Infisical/infisical/tests/infra/fakenet"
+ "github.com/stretchr/testify/require"
+)
+
+// A fake is a plain http.Handler, so it is provable without Docker.
+func TestCurrentUser(t *testing.T) {
+ t.Parallel()
+
+ // Setup
+ ts := httptest.NewServer(fakenet.New(servicenow.Service))
+ t.Cleanup(ts.Close)
+
+ req, err := http.NewRequestWithContext(t.Context(), http.MethodGet, ts.URL+"/api/now/ui/user/current_user", nil)
+ require.NoError(t, err)
+ req.Host = servicenow.Service.Host()
+ req.SetBasicAuth("integration-user", "password")
+
+ // Action
+ res, err := ts.Client().Do(req)
+ require.NoError(t, err)
+ t.Cleanup(func() { _ = res.Body.Close() })
+
+ // Assert
+ body, err := io.ReadAll(res.Body)
+ require.NoError(t, err)
+ require.Equalf(t, http.StatusOK, res.StatusCode, "current_user: %s", body)
+
+ var reply struct {
+ Result struct {
+ UserName string `json:"user_name"`
+ } `json:"result"`
+ }
+ require.NoError(t, json.Unmarshal(body, &reply))
+ require.Equal(t, "integration-user", reply.Result.UserName)
+}
diff --git a/tests/fakes/servicenow/state.go b/tests/fakes/servicenow/state.go
new file mode 100644
index 0000000000..5adf6161db
--- /dev/null
+++ b/tests/fakes/servicenow/state.go
@@ -0,0 +1,20 @@
+// Package servicenow fakes the parts of a ServiceNow instance's REST API that Infisical
+// calls.
+//
+// One fake for the service, not one per feature. The App Connection and external
+// approval both reach the same instance as the same integration user.
+package servicenow
+
+import (
+ "net/http"
+ "sync"
+)
+
+// Instance is one ServiceNow instance as one integration user sees it, addressed by
+// the username a test invented.
+type Instance struct {
+ UserSysID string `json:"userSysId"`
+
+ mu sync.Mutex
+ mux *http.ServeMux
+}
diff --git a/tests/fixture/appconnection_servicenow.go b/tests/fixture/appconnection_servicenow.go
new file mode 100644
index 0000000000..f75a61d7e0
--- /dev/null
+++ b/tests/fixture/appconnection_servicenow.go
@@ -0,0 +1,58 @@
+package fixture
+
+import (
+ "bytes"
+ "context"
+ "encoding/json"
+ "fmt"
+
+ "github.com/Infisical/infisical/tests/clients/api"
+ "github.com/Infisical/infisical/tests/fakes/servicenow"
+ "github.com/google/uuid"
+)
+
+// ServiceNowBasicAuthAppConnection is a ServiceNow App Connection over an integration
+// user's basic auth, the only method ServiceNow connections have.
+//
+// The instance URL is the one exception to taking a hardcoded host: every customer
+// supplies their own, so the client has none. It still names a real service-now.com
+// instance rather than fakenet's address, so the call reaches the fake only through
+// fakenet's DNS and CA, the same as every other kind.
+var ServiceNowBasicAuthAppConnection = AppConnectionKind{
+ App: "servicenow",
+ Host: servicenow.Service.Host(),
+ create: createServiceNowBasicAuthAppConnection,
+}
+
+func createServiceNowBasicAuthAppConnection(ctx context.Context, c *api.ClientWithResponses, name, credential string) (uuid.UUID, error) {
+ var branch api.CreateServiceNowAppConnectionJSONBody0
+ branch.Method = api.CreateServiceNowAppConnectionJSONBody0MethodBasicAuth
+ branch.Credentials.InstanceUrl = "https://" + servicenow.Service.Host()
+ branch.Credentials.Username = credential
+ branch.Credentials.Password = "harness-password"
+
+ // Marshalled by hand because the request-body type does not inherit the union's
+ // MarshalJSON, so the typed body would serialise as {}.
+ var body api.CreateServiceNowAppConnectionJSONBody
+ if err := body.FromCreateServiceNowAppConnectionJSONBody0(branch); err != nil {
+ return uuid.Nil, err
+ }
+ body.Name = name
+ raw, err := json.Marshal(body)
+ if err != nil {
+ return uuid.Nil, err
+ }
+
+ res, err := c.CreateServiceNowAppConnectionWithBodyWithResponse(ctx, "application/json", bytes.NewReader(raw))
+ if err != nil {
+ return uuid.Nil, err
+ }
+ if res.JSON200 == nil {
+ return uuid.Nil, fmt.Errorf("creating the connection returned %d: %s", res.StatusCode(), res.Body)
+ }
+ conn, err := res.JSON200.AppConnection.AsCreateServiceNowAppConnection200JSONResponseBodyAppConnection0()
+ if err != nil {
+ return uuid.Nil, err
+ }
+ return conn.Id, nil
+}
diff --git a/tests/suites/secretmanager/approvals/helpers_test.go b/tests/suites/secretmanager/approvals/helpers_test.go
index 36bb4d663a..5cf8ad8953 100644
--- a/tests/suites/secretmanager/approvals/helpers_test.go
+++ b/tests/suites/secretmanager/approvals/helpers_test.go
@@ -1,7 +1,9 @@
package approvals_test
import (
+ "bytes"
"encoding/json"
+ "io"
"net/http"
"testing"
@@ -219,3 +221,24 @@ func createSecret(t *testing.T, actor *harness.Principal, proj *fixture.Project,
require.NoError(t, err)
return res
}
+
+// newExternalSystem connects the tenant to an external approval system.
+//
+// The rules these tests pin belong to external approval, not to any one system, so
+// this is the only place a system is named. Supporting another one needs no new tests.
+func newExternalSystem(t *testing.T, tn *harness.Tenant) *fixture.AppConnection {
+ t.Helper()
+ return fixture.NewAppConnection(t, tn, fixture.ServiceNowBasicAuthAppConnection)
+}
+
+// externalSystem is the externalApproval field that hands a policy to conn.
+func externalSystem(conn *fixture.AppConnection) map[string]any {
+ return map[string]any{"type": "servicenow", "connectionId": conn.ID}
+}
+
+func jsonBody(t *testing.T, v any) io.Reader {
+ t.Helper()
+ raw, err := json.Marshal(v)
+ require.NoError(t, err)
+ return bytes.NewReader(raw)
+}
diff --git a/tests/suites/secretmanager/approvals/secret_access_policy_test.go b/tests/suites/secretmanager/approvals/secret_access_policy_test.go
new file mode 100644
index 0000000000..9d2ecd494e
--- /dev/null
+++ b/tests/suites/secretmanager/approvals/secret_access_policy_test.go
@@ -0,0 +1,171 @@
+package approvals_test
+
+import (
+ "encoding/json"
+ "net/http"
+ "testing"
+
+ "github.com/Infisical/infisical/tests/clients/api"
+ "github.com/Infisical/infisical/tests/fixture"
+ "github.com/Infisical/infisical/tests/harness"
+ "github.com/Infisical/infisical/tests/internal/apierr"
+ "github.com/google/uuid"
+ "github.com/stretchr/testify/require"
+)
+
+func TestAccessApprovalPolicy_ExternalApproval(t *testing.T) {
+ t.Parallel()
+ h := harness.From(t)
+
+ t.Run("should refuse to update a policy handled by an external system while it has a pending request", func(t *testing.T) {
+ t.Parallel()
+
+ // Setup
+ tn := h.NewTenant(t)
+ proj := fixture.NewProject(t, tn, fixture.WithProjectType("secret-manager"))
+ requester := proj.NewUser(t, fixture.WithPrincipalName("requester"))
+ conn := newExternalSystem(t, tn)
+ policyID, name := newExternalAccessPolicy(t, proj, conn)
+ requestAccess(t, requester, proj, "dev", "/")
+
+ // Action
+ res, err := tn.Admin.API.UpdateAccessApprovalPolicyWithBodyWithResponse(t.Context(), policyID.String(),
+ "application/json", jsonBody(t, map[string]any{"name": "renamed", "allowedSelfApprovals": false}))
+
+ // Assert
+ require.NoError(t, err)
+ require.Equalf(t, http.StatusConflict, res.StatusCode(), "%s", apierr.Body(res.Body))
+ require.Contains(t, errorMessage(t, res.Body),
+ "has 1 pending request(s). Resolve or cancel them before updating the policy.")
+ require.Equal(t, name, accessPolicyName(t, proj, policyID))
+ })
+
+ for _, tc := range []struct {
+ managedBy string
+ configure func(t *testing.T, proj *fixture.Project, body map[string]any)
+ message string
+ }{
+ {
+ managedBy: "approvers",
+ configure: func(t *testing.T, proj *fixture.Project, body map[string]any) {
+ approver := proj.NewUser(t, fixture.WithPrincipalName("approver"))
+ body["approvers"] = []map[string]any{{"type": "user", "id": approver.ID}}
+ },
+ message: "Policies handled by an external approval system cannot have approvers, since the external approval system reviews their requests. Remove the approvers.",
+ },
+ {
+ managedBy: "bypassers",
+ configure: func(t *testing.T, proj *fixture.Project, body map[string]any) {
+ bypasser := proj.NewUser(t, fixture.WithPrincipalName("bypasser"))
+ body["bypassers"] = []map[string]any{{"type": "user", "id": bypasser.ID}}
+ },
+ message: "Policies handled by an external approval system cannot have bypassers, since break glass is not available for them.",
+ },
+ {
+ managedBy: "self approvals",
+ configure: func(_ *testing.T, _ *fixture.Project, body map[string]any) {
+ body["allowedSelfApprovals"] = true
+ },
+ message: "Policies handled by an external approval system cannot allow self approvals. Set allowedSelfApprovals to false.",
+ },
+ {
+ managedBy: "soft enforcement",
+ configure: func(_ *testing.T, _ *fixture.Project, body map[string]any) {
+ body["enforcementLevel"] = "soft"
+ },
+ message: "Policies handled by an external approval system cannot use soft enforcement, since break glass is not available for them. Set enforcementLevel to 'hard'.",
+ },
+ } {
+ t.Run("should refuse and create no policy when one handled by an external system also has "+tc.managedBy, func(t *testing.T) {
+ t.Parallel()
+
+ // Setup
+ tn := h.NewTenant(t)
+ proj := fixture.NewProject(t, tn, fixture.WithProjectType("secret-manager"))
+ conn := newExternalSystem(t, tn)
+ body := externalAccessPolicyBody(proj, conn)
+ tc.configure(t, proj, body)
+
+ // Action
+ res, err := tn.Admin.API.CreateAccessApprovalPolicyWithBodyWithResponse(t.Context(), "application/json",
+ jsonBody(t, body))
+
+ // Assert
+ require.NoError(t, err)
+ require.Equalf(t, http.StatusBadRequest, res.StatusCode(), "%s", apierr.Body(res.Body))
+ require.Equal(t, tc.message, res.JSON400.Message)
+ require.Zero(t, accessPolicyCount(t, proj))
+ })
+ }
+}
+
+// externalAccessPolicyBody hands dev:/ to an external system with nothing for
+// Infisical to review itself, which is the only shape such a policy may take.
+//
+// A map rather than the typed body because externalApproval is generated as an
+// anonymous struct, which a test cannot name without restating its tags.
+func externalAccessPolicyBody(proj *fixture.Project, conn *fixture.AppConnection) map[string]any {
+ return map[string]any{
+ "projectSlug": proj.Slug,
+ "environment": "dev",
+ "secretPath": "/",
+ "enforcementLevel": "hard",
+ "allowedSelfApprovals": false,
+ "externalApproval": externalSystem(conn),
+ }
+}
+
+func newExternalAccessPolicy(t *testing.T, proj *fixture.Project, conn *fixture.AppConnection) (uuid.UUID, string) {
+ t.Helper()
+ res, err := proj.Tenant().Admin.API.CreateAccessApprovalPolicyWithBodyWithResponse(t.Context(), "application/json",
+ jsonBody(t, externalAccessPolicyBody(proj, conn)))
+ require.NoError(t, err)
+ require.NotNilf(t, res.JSON200, "creating the policy returned %d: %s", res.StatusCode(), apierr.Body(res.Body))
+ return res.JSON200.Approval.Id, res.JSON200.Approval.Name
+}
+
+// requestAccess fails unless the requester's ask to read a folder is left pending.
+func requestAccess(t *testing.T, requester *harness.Principal, proj *fixture.Project, env, secretPath string) {
+ t.Helper()
+ body := jsonBody(t, map[string]any{
+ "permissions": []any{
+ []any{"read", "secrets", map[string]any{"environment": env, "secretPath": map[string]any{"$glob": secretPath}}},
+ },
+ "isTemporary": false,
+ })
+ res, err := requester.API.CreateAccessApprovalRequestWithBodyWithResponse(t.Context(),
+ &api.CreateAccessApprovalRequestParams{ProjectSlug: proj.Slug}, "application/json", body)
+ require.NoError(t, err)
+ require.NotNilf(t, res.JSON200, "requesting access returned %d: %s", res.StatusCode(), apierr.Body(res.Body))
+ require.Equal(t, new("pending"), res.JSON200.Approval.Status)
+}
+
+func accessPolicyName(t *testing.T, proj *fixture.Project, policyID uuid.UUID) string {
+ t.Helper()
+ res, err := proj.Tenant().Admin.API.GetAccessApprovalPolicyWithResponse(t.Context(), policyID.String())
+ require.NoError(t, err)
+ require.NotNilf(t, res.JSON200, "reading the policy returned %d: %s", res.StatusCode(), apierr.Body(res.Body))
+ return res.JSON200.Approval.Name
+}
+
+func accessPolicyCount(t *testing.T, proj *fixture.Project) int {
+ t.Helper()
+ res, err := proj.Tenant().Admin.API.ListAccessApprovalPoliciesWithResponse(t.Context(),
+ &api.ListAccessApprovalPoliciesParams{ProjectSlug: proj.Slug})
+ require.NoError(t, err)
+ require.NotNilf(t, res.JSON200, "listing policies returned %d: %s", res.StatusCode(), apierr.Body(res.Body))
+ if res.JSON200.Approvals == nil {
+ return 0
+ }
+ return len(*res.JSON200.Approvals)
+}
+
+// errorMessage reads the message off an error the generated client has no type for.
+func errorMessage(t *testing.T, body []byte) string {
+ t.Helper()
+ var reply struct {
+ Message string `json:"message"`
+ }
+ require.NoErrorf(t, json.Unmarshal(body, &reply), "reading the error: %s", apierr.Body(body))
+ return reply.Message
+}
diff --git a/tests/suites/secretmanager/approvals/secret_change_policy_test.go b/tests/suites/secretmanager/approvals/secret_change_policy_test.go
index c5ba77ccd4..a438add820 100644
--- a/tests/suites/secretmanager/approvals/secret_change_policy_test.go
+++ b/tests/suites/secretmanager/approvals/secret_change_policy_test.go
@@ -9,6 +9,7 @@ import (
"github.com/Infisical/infisical/tests/fixture"
"github.com/Infisical/infisical/tests/fixture/secretmanager"
"github.com/Infisical/infisical/tests/harness"
+ "github.com/Infisical/infisical/tests/internal/apierr"
"github.com/Infisical/infisical/tests/internal/spec"
"github.com/stretchr/testify/require"
)
@@ -331,6 +332,34 @@ func TestSecretApprovalPolicy_Create(t *testing.T) {
res.JSON400.Message)
secretmanager.CreateSecret(t, proj, "dev", "API_KEY", "value", secretmanager.As(committer))
})
+
+ t.Run("should refuse and create no policy when a secret change policy receives an external approval", func(t *testing.T) {
+ t.Parallel()
+
+ // Setup
+ tn := h.NewTenant(t)
+ proj := fixture.NewProject(t, tn, fixture.WithProjectType("secret-manager"))
+ reviewer := proj.NewUser(t, fixture.WithPrincipalName("reviewer"))
+ conn := newExternalSystem(t, tn)
+
+ // Action
+ res, err := tn.Admin.API.CreateSecretApprovalPolicyWithBodyWithResponse(t.Context(), "application/json",
+ jsonBody(t, map[string]any{
+ "projectId": proj.ID,
+ "environment": "dev",
+ "secretPath": "/",
+ "approvers": []map[string]any{{"type": "user", "id": reviewer.ID}},
+ "externalApproval": externalSystem(conn),
+ }))
+
+ // Assert
+ require.NoError(t, err)
+ require.Equalf(t, http.StatusBadRequest, res.StatusCode(), "%s", apierr.Body(res.Body))
+ require.Equal(t,
+ "Only secret access policies can be handled by an external approval system. Remove externalApproval from the request.",
+ res.JSON400.Message)
+ require.Nil(t, policyAt(t, proj, "dev", "/"))
+ })
}
func TestSecretApprovalPolicy_Delete(t *testing.T) {