import * as API from "@distilled.cloud/core/api"; import * as C from "@distilled.cloud/core/category"; // AUTO-GENERATED by scripts/generate.ts from .generated-specs (specs/spec-mirror-stackit). Do not edit. import * as S from "@distilled.cloud/core/schema-lite"; import * as __L from "@distilled.cloud/core/schema-lite"; import type * as Redacted from "effect/Redacted"; import { StackitServiceErrors } from "../errors.ts"; import { StackitProtocol, type StackitOpError, type StackitOpContext } from "../protocol.ts"; import * as Retry from "../retry.ts"; import * as T from "../traits.ts"; // Schema table, filled on first reach (see __S at the end). const __s: any[] = []; export type { StackitOpError, StackitOpContext }; /** Span facts shared by every operation (com.distilled.telemetry#service). */ const TELEMETRY = { system: "stackit-api", responseHeaders: [ { header: "x-request-id", name: "http.response.header.x-request-id", transform: "list" }, { header: "request-id", name: "http.response.header.request-id", transform: "list" }, ], prefix: "STACKIT", service: "TelemetryLink", labels: "stackit", propagate: "w3c", } as const; export class BadRequest extends /*@__PURE__*/ T.applyErrorMatchers( /*@__PURE__*/ S.TaggedError()("BadRequest", { code: S.Number, message: S.String, body: /*@__PURE__*/ S.optional( /*@__PURE__*/ S.Union([/*@__PURE__*/ S.suspend(() => __S(0, __c0, 0)), S.String]), ), headers: /*@__PURE__*/ S.optional(/*@__PURE__*/ S.Record(S.String, S.String)), }).pipe(C.withBadRequestError), [{ status: 400 }], ) { declare readonly body?: Response4xx | string; } export class Conflict extends /*@__PURE__*/ T.applyErrorMatchers( /*@__PURE__*/ S.TaggedError()("Conflict", { code: S.Number, message: S.String, body: /*@__PURE__*/ S.optional( /*@__PURE__*/ S.Union([/*@__PURE__*/ S.suspend(() => __S(0, __c0, 0)), S.String]), ), headers: /*@__PURE__*/ S.optional(/*@__PURE__*/ S.Record(S.String, S.String)), }).pipe(C.withConflictError), [{ status: 409 }], ) { declare readonly body?: Response4xx | string; } export class NotFound extends /*@__PURE__*/ T.applyErrorMatchers( /*@__PURE__*/ S.TaggedError()("NotFound", { code: S.Number, message: S.String, body: /*@__PURE__*/ S.optional(S.Unknown), headers: /*@__PURE__*/ S.optional(/*@__PURE__*/ S.Record(S.String, S.String)), }).pipe(C.withBadRequestError), [{ status: 404 }], ) {} export type CreateFolderBackflushJobRequestRegionId = "eu01" | "eu02"; export interface CreateFolderBackflushJobRequest { /** The STACKIT portal folder UUID the resource is located in. */ folderId: string; /** The STACKIT region name the resource is located in. */ regionId: CreateFolderBackflushJobRequestRegionId | (string & {}); /** The description is a longer text chosen by the user to provide more context for the resource. */ description?: string | undefined; /** The display name is a short name chosen by the user to identify the resource. */ displayName?: string | undefined; } /** The STACKIT region name the resource is located in. */ export type BackflushJobResponseRegionId = "eu01" | "eu02"; /** The current state of the link. */ export type BackflushJobResponseStatus = | "active" | "complete" | "failed" | "reconciling" | "deleting"; export interface BackflushJobResponse { /** The point in time the resource was created. */ createTime: string; /** The description is a longer text chosen by the user to provide more context for the resource. */ description?: string | undefined; /** The display name is a short name chosen by the user to identify the resource. */ displayName?: string | undefined; /** A auto generated unique id which identifies the resource. */ id: string; /** The STACKIT region name the resource is located in. */ regionId: BackflushJobResponseRegionId; /** The current state of the link. */ status: BackflushJobResponseStatus; } export type CreateOrganizationBackflushJobRequestRegionId = "eu01" | "eu02"; export interface CreateOrganizationBackflushJobRequest { /** The STACKIT portal organization UUID the resource is located in. */ organizationId: string; /** The STACKIT region name the resource is located in. */ regionId: CreateOrganizationBackflushJobRequestRegionId | (string & {}); /** The description is a longer text chosen by the user to provide more context for the resource. */ description?: string | undefined; /** The display name is a short name chosen by the user to identify the resource. */ displayName?: string | undefined; } export type CreateOrUpdateFolderTelemetryLinkRequestRegionId = "eu01" | "eu02"; /** Resource lables as described [in the documentation](https://docs.stackit.cloud/platform/cost-and-billing/labels/) */ export type CreateOrUpdateFolderTelemetryLinkRequestResourceLabelsMap = { [key: string]: string | undefined; }; export interface CreateOrUpdateFolderTelemetryLinkRequest { /** The STACKIT portal folder UUID the resource is located in. */ folderId: string; /** The STACKIT region name the resource is located in. */ regionId: CreateOrUpdateFolderTelemetryLinkRequestRegionId | (string & {}); /** The access token. */ accessToken: string | Redacted.Redacted; /** The description is a longer text chosen by the user to provide more context for the resource. */ description?: string | undefined; /** The display name is a short name chosen by the user to identify the resource. */ displayName: string; /** Indicates whether routing through the link to a telemetry-router is active. */ enabled?: boolean | undefined; /** The ID of the telemetry-router to route the telemetry data. */ telemetryRouterId: string; /** Resource lables as described [in the documentation](https://docs.stackit.cloud/platform/cost-and-billing/labels/) */ resourceLabels?: CreateOrUpdateFolderTelemetryLinkRequestResourceLabelsMap | undefined; } /** The STACKIT region name the resource is located in. */ export type TelemetryLinkResponseRegionId = "eu01" | "eu02"; /** Resource lables as described [in the documentation](https://docs.stackit.cloud/platform/cost-and-billing/labels/) */ export type TelemetryLinkResponseResourceLabelsMap = { [key: string]: string | undefined }; /** The current state of the link. */ export type TelemetryLinkResponseStatus = | "active" | "inactive" | "failed" | "reconciling" | "deleting"; export interface TelemetryLinkResponse { /** The access token. */ accessToken?: string | Redacted.Redacted | undefined; /** The point in time the resource was created. */ createTime: string; /** The description is a longer text chosen by the user to provide more context for the resource. */ description?: string | undefined; /** The display name is a short name chosen by the user to identify the resource. */ displayName: string; /** Indicates whether routing through the link to a telemetry-router is active. */ enabled: boolean; /** A auto generated unique id which identifies the resource. */ id: string; /** The STACKIT region name the resource is located in. */ regionId: TelemetryLinkResponseRegionId; /** Resource lables as described [in the documentation](https://docs.stackit.cloud/platform/cost-and-billing/labels/) */ resourceLabels?: TelemetryLinkResponseResourceLabelsMap | undefined; /** The current state of the link. */ status: TelemetryLinkResponseStatus; /** The ID of the telemetry-router to route the telemetry data. */ telemetryRouterId: string; } export type CreateOrUpdateOrganizationTelemetryLinkRequestRegionId = "eu01" | "eu02"; /** Resource lables as described [in the documentation](https://docs.stackit.cloud/platform/cost-and-billing/labels/) */ export type CreateOrUpdateOrganizationTelemetryLinkRequestResourceLabelsMap = { [key: string]: string | undefined; }; export interface CreateOrUpdateOrganizationTelemetryLinkRequest { /** The STACKIT portal organization UUID the resource is located in. */ organizationId: string; /** The STACKIT region name the resource is located in. */ regionId: CreateOrUpdateOrganizationTelemetryLinkRequestRegionId | (string & {}); /** The access token. */ accessToken: string | Redacted.Redacted; /** The description is a longer text chosen by the user to provide more context for the resource. */ description?: string | undefined; /** The display name is a short name chosen by the user to identify the resource. */ displayName: string; /** Indicates whether routing through the link to a telemetry-router is active. */ enabled?: boolean | undefined; /** The ID of the telemetry-router to route the telemetry data. */ telemetryRouterId: string; /** Resource lables as described [in the documentation](https://docs.stackit.cloud/platform/cost-and-billing/labels/) */ resourceLabels?: CreateOrUpdateOrganizationTelemetryLinkRequestResourceLabelsMap | undefined; } export type CreateOrUpdateProjectTelemetryLinkRequestRegionId = "eu01" | "eu02"; /** Resource lables as described [in the documentation](https://docs.stackit.cloud/platform/cost-and-billing/labels/) */ export type CreateOrUpdateProjectTelemetryLinkRequestResourceLabelsMap = { [key: string]: string | undefined; }; export interface CreateOrUpdateProjectTelemetryLinkRequest { /** The STACKIT portal project UUID the resource is located in. */ projectId: string; /** The STACKIT region name the resource is located in. */ regionId: CreateOrUpdateProjectTelemetryLinkRequestRegionId | (string & {}); /** The access token. */ accessToken: string | Redacted.Redacted; /** The description is a longer text chosen by the user to provide more context for the resource. */ description?: string | undefined; /** The display name is a short name chosen by the user to identify the resource. */ displayName: string; /** Indicates whether routing through the link to a telemetry-router is active. */ enabled?: boolean | undefined; /** The ID of the telemetry-router to route the telemetry data. */ telemetryRouterId: string; /** Resource lables as described [in the documentation](https://docs.stackit.cloud/platform/cost-and-billing/labels/) */ resourceLabels?: CreateOrUpdateProjectTelemetryLinkRequestResourceLabelsMap | undefined; } export type CreateProjectBackflushJobRequestRegionId = "eu01" | "eu02"; export interface CreateProjectBackflushJobRequest { /** The STACKIT portal project UUID the resource is located in. */ projectId: string; /** The STACKIT region name the resource is located in. */ regionId: CreateProjectBackflushJobRequestRegionId | (string & {}); /** The description is a longer text chosen by the user to provide more context for the resource. */ description?: string | undefined; /** The display name is a short name chosen by the user to identify the resource. */ displayName?: string | undefined; } export type DeleteFolderTelemetryLinkRequestRegionId = "eu01" | "eu02"; export interface DeleteFolderTelemetryLinkRequest { /** The STACKIT portal folder UUID the resource is located in. */ folderId: string; /** The STACKIT region name the resource is located in. */ regionId: DeleteFolderTelemetryLinkRequestRegionId | (string & {}); } export interface DeleteFolderTelemetryLinkResponse {} export type DeleteOrganizationTelemetryLinkRequestRegionId = "eu01" | "eu02"; export interface DeleteOrganizationTelemetryLinkRequest { /** The STACKIT portal organization UUID the resource is located in. */ organizationId: string; /** The STACKIT region name the resource is located in. */ regionId: DeleteOrganizationTelemetryLinkRequestRegionId | (string & {}); } export interface DeleteOrganizationTelemetryLinkResponse {} export type DeleteProjectTelemetryLinkRequestRegionId = "eu01" | "eu02"; export interface DeleteProjectTelemetryLinkRequest { /** The STACKIT portal project UUID the resource is located in. */ projectId: string; /** The STACKIT region name the resource is located in. */ regionId: DeleteProjectTelemetryLinkRequestRegionId | (string & {}); } export interface DeleteProjectTelemetryLinkResponse {} export type GetFolderBackflushJobRequestRegionId = "eu01" | "eu02"; export interface GetFolderBackflushJobRequest { /** The STACKIT portal folder UUID the resource is located in. */ folderId: string; /** The STACKIT region name the resource is located in. */ regionId: GetFolderBackflushJobRequestRegionId | (string & {}); /** The Backflush Job UUID. */ backflushJobId: string; } export type GetFolderTelemetryLinkRequestRegionId = "eu01" | "eu02"; export interface GetFolderTelemetryLinkRequest { /** The STACKIT portal folder UUID the resource is located in. */ folderId: string; /** The STACKIT region name the resource is located in. */ regionId: GetFolderTelemetryLinkRequestRegionId | (string & {}); } export type GetOrganizationBackflushJobRequestRegionId = "eu01" | "eu02"; export interface GetOrganizationBackflushJobRequest { /** The STACKIT portal organization UUID the resource is located in. */ organizationId: string; /** The STACKIT region name the resource is located in. */ regionId: GetOrganizationBackflushJobRequestRegionId | (string & {}); /** The Backflush Job UUID. */ backflushJobId: string; } export type GetOrganizationTelemetryLinkRequestRegionId = "eu01" | "eu02"; export interface GetOrganizationTelemetryLinkRequest { /** The STACKIT portal organization UUID the resource is located in. */ organizationId: string; /** The STACKIT region name the resource is located in. */ regionId: GetOrganizationTelemetryLinkRequestRegionId | (string & {}); } export type GetProjectBackflushJobRequestRegionId = "eu01" | "eu02"; export interface GetProjectBackflushJobRequest { /** The STACKIT portal project UUID the resource is located in. */ projectId: string; /** The STACKIT region name the resource is located in. */ regionId: GetProjectBackflushJobRequestRegionId | (string & {}); /** The Backflush Job UUID. */ backflushJobId: string; } export type GetProjectTelemetryLinkRequestRegionId = "eu01" | "eu02"; export interface GetProjectTelemetryLinkRequest { /** The STACKIT portal project UUID the resource is located in. */ projectId: string; /** The STACKIT region name the resource is located in. */ regionId: GetProjectTelemetryLinkRequestRegionId | (string & {}); } export type ListFolderBackflushJobsRequestRegionId = "eu01" | "eu02"; export interface ListFolderBackflushJobsRequest { /** The STACKIT portal folder UUID the resource is located in. */ folderId: string; /** The STACKIT region name the resource is located in. */ regionId: ListFolderBackflushJobsRequestRegionId | (string & {}); /** A token to retrieve the next page of results. */ pageToken?: string | undefined; /** Maximum number of items to return */ pageSize?: number | undefined; } export type ListBackflushJobsResponseBackflushJobsList = Array; export interface ListBackflushJobsResponse { backflushJobs: ListBackflushJobsResponseBackflushJobsList; /** A token to retrieve the next page of results. */ nextPageToken?: string | undefined; } export type ListOrganizationBackflushJobsRequestRegionId = "eu01" | "eu02"; export interface ListOrganizationBackflushJobsRequest { /** The STACKIT portal organization UUID the resource is located in. */ organizationId: string; /** The STACKIT region name the resource is located in. */ regionId: ListOrganizationBackflushJobsRequestRegionId | (string & {}); /** A token to retrieve the next page of results. */ pageToken?: string | undefined; /** Maximum number of items to return */ pageSize?: number | undefined; } export type ListProjectBackflushJobsRequestRegionId = "eu01" | "eu02"; export interface ListProjectBackflushJobsRequest { /** The STACKIT portal project UUID the resource is located in. */ projectId: string; /** The STACKIT region name the resource is located in. */ regionId: ListProjectBackflushJobsRequestRegionId | (string & {}); /** A token to retrieve the next page of results. */ pageToken?: string | undefined; /** Maximum number of items to return */ pageSize?: number | undefined; } export type PartialUpdateFolderTelemetryLinkRequestRegionId = "eu01" | "eu02"; /** Resource lables as described [in the documentation](https://docs.stackit.cloud/platform/cost-and-billing/labels/) */ export type PartialUpdateFolderTelemetryLinkRequestResourceLabelsMap = { [key: string]: string | null | undefined; }; export interface PartialUpdateFolderTelemetryLinkRequest { /** The STACKIT portal folder UUID the resource is located in. */ folderId: string; /** The STACKIT region name the resource is located in. */ regionId: PartialUpdateFolderTelemetryLinkRequestRegionId | (string & {}); /** The access token. */ accessToken?: string | Redacted.Redacted | undefined; /** The description is a longer text chosen by the user to provide more context for the resource. */ description?: string | undefined; /** The display name is a short name chosen by the user to identify the resource. */ displayName?: string | undefined; /** Indicates whether routing through the link to a telemetry-router is active. */ enabled?: boolean | undefined; /** The ID of the telemetry-router to route the telemetry data. */ telemetryRouterId?: string | undefined; /** Resource lables as described [in the documentation](https://docs.stackit.cloud/platform/cost-and-billing/labels/) */ resourceLabels?: PartialUpdateFolderTelemetryLinkRequestResourceLabelsMap | undefined; } export type PartialUpdateOrganizationTelemetryLinkRequestRegionId = "eu01" | "eu02"; /** Resource lables as described [in the documentation](https://docs.stackit.cloud/platform/cost-and-billing/labels/) */ export type PartialUpdateOrganizationTelemetryLinkRequestResourceLabelsMap = { [key: string]: string | null | undefined; }; export interface PartialUpdateOrganizationTelemetryLinkRequest { /** The STACKIT portal organization UUID the resource is located in. */ organizationId: string; /** The STACKIT region name the resource is located in. */ regionId: PartialUpdateOrganizationTelemetryLinkRequestRegionId | (string & {}); /** The access token. */ accessToken?: string | Redacted.Redacted | undefined; /** The description is a longer text chosen by the user to provide more context for the resource. */ description?: string | undefined; /** The display name is a short name chosen by the user to identify the resource. */ displayName?: string | undefined; /** Indicates whether routing through the link to a telemetry-router is active. */ enabled?: boolean | undefined; /** The ID of the telemetry-router to route the telemetry data. */ telemetryRouterId?: string | undefined; /** Resource lables as described [in the documentation](https://docs.stackit.cloud/platform/cost-and-billing/labels/) */ resourceLabels?: PartialUpdateOrganizationTelemetryLinkRequestResourceLabelsMap | undefined; } export type PartialUpdateProjectTelemetryLinkRequestRegionId = "eu01" | "eu02"; /** Resource lables as described [in the documentation](https://docs.stackit.cloud/platform/cost-and-billing/labels/) */ export type PartialUpdateProjectTelemetryLinkRequestResourceLabelsMap = { [key: string]: string | null | undefined; }; export interface PartialUpdateProjectTelemetryLinkRequest { /** The STACKIT portal project UUID the resource is located in. */ projectId: string; /** The STACKIT region name the resource is located in. */ regionId: PartialUpdateProjectTelemetryLinkRequestRegionId | (string & {}); /** The access token. */ accessToken?: string | Redacted.Redacted | undefined; /** The description is a longer text chosen by the user to provide more context for the resource. */ description?: string | undefined; /** The display name is a short name chosen by the user to identify the resource. */ displayName?: string | undefined; /** Indicates whether routing through the link to a telemetry-router is active. */ enabled?: boolean | undefined; /** The ID of the telemetry-router to route the telemetry data. */ telemetryRouterId?: string | undefined; /** Resource lables as described [in the documentation](https://docs.stackit.cloud/platform/cost-and-billing/labels/) */ resourceLabels?: PartialUpdateProjectTelemetryLinkRequestResourceLabelsMap | undefined; } export interface Response4xx { /** A message containing the reason for failure */ message: string; } export type CreateFolderBackflushJobError = BadRequest | Conflict | StackitOpError; /** Creates a new Backflush Job for the folder. */ export const createFolderBackflushJob: API.OperationMethod< CreateFolderBackflushJobRequest, BackflushJobResponse, CreateFolderBackflushJobError, StackitOpContext > = /*@__PURE__*/ API.make(() => ({ input: __S(34, __c17, 0) as any as S.Schema, output: __S(36, __c18, 0) as any as S.Schema, errors: [BadRequest, Conflict], serviceErrors: StackitServiceErrors, protocol: StackitProtocol, retry: Retry.Retry, telemetry: TELEMETRY, span: "CreateFolderBackflushJob", })); export type CreateOrganizationBackflushJobError = BadRequest | Conflict | StackitOpError; /** Creates a new Backflush Job for the organization. */ export const createOrganizationBackflushJob: API.OperationMethod< CreateOrganizationBackflushJobRequest, BackflushJobResponse, CreateOrganizationBackflushJobError, StackitOpContext > = /*@__PURE__*/ API.make(() => ({ input: __S(38, __c19, 0) as any as S.Schema, output: __S(36, __c18, 0) as any as S.Schema, errors: [BadRequest, Conflict], serviceErrors: StackitServiceErrors, protocol: StackitProtocol, retry: Retry.Retry, telemetry: TELEMETRY, span: "CreateOrganizationBackflushJob", })); export type CreateOrUpdateFolderTelemetryLinkError = | BadRequest | NotFound | Conflict | StackitOpError; /** Creates or updates the given Telemetry Link within the folder. */ export const createOrUpdateFolderTelemetryLink: API.OperationMethod< CreateOrUpdateFolderTelemetryLinkRequest, TelemetryLinkResponse, CreateOrUpdateFolderTelemetryLinkError, StackitOpContext > = /*@__PURE__*/ API.make(() => ({ input: __S(40, __c20, 0) as any as S.Schema, output: __S(43, __c21, 1) as any as S.Schema, errors: [BadRequest, NotFound, Conflict], serviceErrors: StackitServiceErrors, protocol: StackitProtocol, retry: Retry.Retry, telemetry: TELEMETRY, span: "CreateOrUpdateFolderTelemetryLink", })); export type CreateOrUpdateOrganizationTelemetryLinkError = | BadRequest | NotFound | Conflict | StackitOpError; /** Creates or updates the given Telemetry Link within the organization. */ export const createOrUpdateOrganizationTelemetryLink: API.OperationMethod< CreateOrUpdateOrganizationTelemetryLinkRequest, TelemetryLinkResponse, CreateOrUpdateOrganizationTelemetryLinkError, StackitOpContext > = /*@__PURE__*/ API.make(() => ({ input: __S(44, __c22, 0) as any as S.Schema, output: __S(43, __c21, 1) as any as S.Schema, errors: [BadRequest, NotFound, Conflict], serviceErrors: StackitServiceErrors, protocol: StackitProtocol, retry: Retry.Retry, telemetry: TELEMETRY, span: "CreateOrUpdateOrganizationTelemetryLink", })); export type CreateOrUpdateProjectTelemetryLinkError = | BadRequest | NotFound | Conflict | StackitOpError; /** Creates or updates the given Telemetry Link within the project. */ export const createOrUpdateProjectTelemetryLink: API.OperationMethod< CreateOrUpdateProjectTelemetryLinkRequest, TelemetryLinkResponse, CreateOrUpdateProjectTelemetryLinkError, StackitOpContext > = /*@__PURE__*/ API.make(() => ({ input: __S(46, __c23, 0) as any as S.Schema, output: __S(43, __c21, 1) as any as S.Schema, errors: [BadRequest, NotFound, Conflict], serviceErrors: StackitServiceErrors, protocol: StackitProtocol, retry: Retry.Retry, telemetry: TELEMETRY, span: "CreateOrUpdateProjectTelemetryLink", })); export type CreateProjectBackflushJobError = BadRequest | Conflict | StackitOpError; /** Creates a new Backflush Job for the project. */ export const createProjectBackflushJob: API.OperationMethod< CreateProjectBackflushJobRequest, BackflushJobResponse, CreateProjectBackflushJobError, StackitOpContext > = /*@__PURE__*/ API.make(() => ({ input: __S(48, __c24, 0) as any as S.Schema, output: __S(36, __c18, 0) as any as S.Schema, errors: [BadRequest, Conflict], serviceErrors: StackitServiceErrors, protocol: StackitProtocol, retry: Retry.Retry, telemetry: TELEMETRY, span: "CreateProjectBackflushJob", })); export type DeleteFolderTelemetryLinkError = BadRequest | NotFound | Conflict | StackitOpError; /** Deletes the given Telemetry Link within the folder. */ export const deleteFolderTelemetryLink: API.OperationMethod< DeleteFolderTelemetryLinkRequest, DeleteFolderTelemetryLinkResponse, DeleteFolderTelemetryLinkError, StackitOpContext > = /*@__PURE__*/ API.make(() => ({ input: __S(50, __c25, 0) as any as S.Schema, output: __S(52, __c26, 0) as any as S.Schema, errors: [BadRequest, NotFound, Conflict], serviceErrors: StackitServiceErrors, protocol: StackitProtocol, retry: Retry.Retry, telemetry: TELEMETRY, span: "DeleteFolderTelemetryLink", })); export type DeleteOrganizationTelemetryLinkError = | BadRequest | NotFound | Conflict | StackitOpError; /** Deletes the given Telemetry Link within the organization. */ export const deleteOrganizationTelemetryLink: API.OperationMethod< DeleteOrganizationTelemetryLinkRequest, DeleteOrganizationTelemetryLinkResponse, DeleteOrganizationTelemetryLinkError, StackitOpContext > = /*@__PURE__*/ API.make(() => ({ input: __S(2, __c1, 0) as any as S.Schema, output: __S(52, __c26, 0) as any as S.Schema, errors: [BadRequest, NotFound, Conflict], serviceErrors: StackitServiceErrors, protocol: StackitProtocol, retry: Retry.Retry, telemetry: TELEMETRY, span: "DeleteOrganizationTelemetryLink", })); export type DeleteProjectTelemetryLinkError = BadRequest | NotFound | Conflict | StackitOpError; /** Deletes the given Telemetry Link within the project. */ export const deleteProjectTelemetryLink: API.OperationMethod< DeleteProjectTelemetryLinkRequest, DeleteProjectTelemetryLinkResponse, DeleteProjectTelemetryLinkError, StackitOpContext > = /*@__PURE__*/ API.make(() => ({ input: __S(4, __c2, 0) as any as S.Schema, output: __S(52, __c26, 0) as any as S.Schema, errors: [BadRequest, NotFound, Conflict], serviceErrors: StackitServiceErrors, protocol: StackitProtocol, retry: Retry.Retry, telemetry: TELEMETRY, span: "DeleteProjectTelemetryLink", })); export type GetFolderBackflushJobError = BadRequest | NotFound | StackitOpError; /** Returns the details for the given Backflush Job in a folder. */ export const getFolderBackflushJob: API.OperationMethod< GetFolderBackflushJobRequest, BackflushJobResponse, GetFolderBackflushJobError, StackitOpContext > = /*@__PURE__*/ API.make(() => ({ input: __S(6, __c3, 0) as any as S.Schema, output: __S(36, __c18, 0) as any as S.Schema, errors: [BadRequest, NotFound], serviceErrors: StackitServiceErrors, protocol: StackitProtocol, retry: Retry.Retry, telemetry: TELEMETRY, span: "GetFolderBackflushJob", })); export type GetFolderTelemetryLinkError = BadRequest | NotFound | StackitOpError; /** Returns the details for the given Telemetry Link within the folder. */ export const getFolderTelemetryLink: API.OperationMethod< GetFolderTelemetryLinkRequest, TelemetryLinkResponse, GetFolderTelemetryLinkError, StackitOpContext > = /*@__PURE__*/ API.make(() => ({ input: __S(8, __c4, 0) as any as S.Schema, output: __S(43, __c21, 1) as any as S.Schema, errors: [BadRequest, NotFound], serviceErrors: StackitServiceErrors, protocol: StackitProtocol, retry: Retry.Retry, telemetry: TELEMETRY, span: "GetFolderTelemetryLink", })); export type GetOrganizationBackflushJobError = BadRequest | NotFound | StackitOpError; /** Returns the details for the given Backflush Job in a organization. */ export const getOrganizationBackflushJob: API.OperationMethod< GetOrganizationBackflushJobRequest, BackflushJobResponse, GetOrganizationBackflushJobError, StackitOpContext > = /*@__PURE__*/ API.make(() => ({ input: __S(10, __c5, 0) as any as S.Schema, output: __S(36, __c18, 0) as any as S.Schema, errors: [BadRequest, NotFound], serviceErrors: StackitServiceErrors, protocol: StackitProtocol, retry: Retry.Retry, telemetry: TELEMETRY, span: "GetOrganizationBackflushJob", })); export type GetOrganizationTelemetryLinkError = BadRequest | NotFound | StackitOpError; /** Returns the details for the given Telemetry Link within the organization. */ export const getOrganizationTelemetryLink: API.OperationMethod< GetOrganizationTelemetryLinkRequest, TelemetryLinkResponse, GetOrganizationTelemetryLinkError, StackitOpContext > = /*@__PURE__*/ API.make(() => ({ input: __S(12, __c6, 0) as any as S.Schema, output: __S(43, __c21, 1) as any as S.Schema, errors: [BadRequest, NotFound], serviceErrors: StackitServiceErrors, protocol: StackitProtocol, retry: Retry.Retry, telemetry: TELEMETRY, span: "GetOrganizationTelemetryLink", })); export type GetProjectBackflushJobError = BadRequest | NotFound | StackitOpError; /** Returns the details for the given Backflush Job in a project. */ export const getProjectBackflushJob: API.OperationMethod< GetProjectBackflushJobRequest, BackflushJobResponse, GetProjectBackflushJobError, StackitOpContext > = /*@__PURE__*/ API.make(() => ({ input: __S(14, __c7, 0) as any as S.Schema, output: __S(36, __c18, 0) as any as S.Schema, errors: [BadRequest, NotFound], serviceErrors: StackitServiceErrors, protocol: StackitProtocol, retry: Retry.Retry, telemetry: TELEMETRY, span: "GetProjectBackflushJob", })); export type GetProjectTelemetryLinkError = BadRequest | NotFound | StackitOpError; /** Returns the details for the given Telemetry Link within the project. */ export const getProjectTelemetryLink: API.OperationMethod< GetProjectTelemetryLinkRequest, TelemetryLinkResponse, GetProjectTelemetryLinkError, StackitOpContext > = /*@__PURE__*/ API.make(() => ({ input: __S(16, __c8, 0) as any as S.Schema, output: __S(43, __c21, 1) as any as S.Schema, errors: [BadRequest, NotFound], serviceErrors: StackitServiceErrors, protocol: StackitProtocol, retry: Retry.Retry, telemetry: TELEMETRY, span: "GetProjectTelemetryLink", })); export type ListFolderBackflushJobsError = BadRequest | StackitOpError; /** Returns a list of all Backflush Jobs for the folder. */ export const listFolderBackflushJobs: API.OperationMethod< ListFolderBackflushJobsRequest, ListBackflushJobsResponse, ListFolderBackflushJobsError, StackitOpContext > = /*@__PURE__*/ API.make(() => ({ input: __S(18, __c9, 0) as any as S.Schema, output: __S(21, __c10, 1) as any as S.Schema, errors: [BadRequest], serviceErrors: StackitServiceErrors, protocol: StackitProtocol, retry: Retry.Retry, telemetry: TELEMETRY, span: "ListFolderBackflushJobs", })); export type ListOrganizationBackflushJobsError = BadRequest | StackitOpError; /** Returns a list of all Backflush Jobs for the organization. */ export const listOrganizationBackflushJobs: API.OperationMethod< ListOrganizationBackflushJobsRequest, ListBackflushJobsResponse, ListOrganizationBackflushJobsError, StackitOpContext > = /*@__PURE__*/ API.make(() => ({ input: __S(22, __c11, 0) as any as S.Schema, output: __S(21, __c10, 1) as any as S.Schema, errors: [BadRequest], serviceErrors: StackitServiceErrors, protocol: StackitProtocol, retry: Retry.Retry, telemetry: TELEMETRY, span: "ListOrganizationBackflushJobs", })); export type ListProjectBackflushJobsError = BadRequest | StackitOpError; /** Returns a list of all Backflush Jobs for the project. */ export const listProjectBackflushJobs: API.OperationMethod< ListProjectBackflushJobsRequest, ListBackflushJobsResponse, ListProjectBackflushJobsError, StackitOpContext > = /*@__PURE__*/ API.make(() => ({ input: __S(24, __c12, 0) as any as S.Schema, output: __S(21, __c10, 1) as any as S.Schema, errors: [BadRequest], serviceErrors: StackitServiceErrors, protocol: StackitProtocol, retry: Retry.Retry, telemetry: TELEMETRY, span: "ListProjectBackflushJobs", })); export type PartialUpdateFolderTelemetryLinkError = | BadRequest | NotFound | Conflict | StackitOpError; /** Patches the given Telemetry Link within the folder. */ export const partialUpdateFolderTelemetryLink: API.OperationMethod< PartialUpdateFolderTelemetryLinkRequest, TelemetryLinkResponse, PartialUpdateFolderTelemetryLinkError, StackitOpContext > = /*@__PURE__*/ API.make(() => ({ input: __S(26, __c13, 0) as any as S.Schema, output: __S(43, __c21, 1) as any as S.Schema, errors: [BadRequest, NotFound, Conflict], serviceErrors: StackitServiceErrors, protocol: StackitProtocol, retry: Retry.Retry, telemetry: TELEMETRY, span: "PartialUpdateFolderTelemetryLink", })); export type PartialUpdateOrganizationTelemetryLinkError = | BadRequest | NotFound | Conflict | StackitOpError; /** Patches the given Telemetry Link within the organization. */ export const partialUpdateOrganizationTelemetryLink: API.OperationMethod< PartialUpdateOrganizationTelemetryLinkRequest, TelemetryLinkResponse, PartialUpdateOrganizationTelemetryLinkError, StackitOpContext > = /*@__PURE__*/ API.make(() => ({ input: __S(30, __c15, 0) as any as S.Schema, output: __S(43, __c21, 1) as any as S.Schema, errors: [BadRequest, NotFound, Conflict], serviceErrors: StackitServiceErrors, protocol: StackitProtocol, retry: Retry.Retry, telemetry: TELEMETRY, span: "PartialUpdateOrganizationTelemetryLink", })); export type PartialUpdateProjectTelemetryLinkError = | BadRequest | NotFound | Conflict | StackitOpError; /** Patches the given Telemetry Link within the project. */ export const partialUpdateProjectTelemetryLink: API.OperationMethod< PartialUpdateProjectTelemetryLinkRequest, TelemetryLinkResponse, PartialUpdateProjectTelemetryLinkError, StackitOpContext > = /*@__PURE__*/ API.make(() => ({ input: __S(32, __c16, 0) as any as S.Schema, output: __S(43, __c21, 1) as any as S.Schema, errors: [BadRequest, NotFound, Conflict], serviceErrors: StackitServiceErrors, protocol: StackitProtocol, retry: Retry.Retry, telemetry: TELEMETRY, span: "PartialUpdateProjectTelemetryLink", })); // Schema builders: each runs one schema initializer, on that schema's first use. function __c0(j: number): any { switch (j) { case 0: return S.suspend(() => S.Struct({ message: S.String, }), ).annotate({ identifier: "Response4xx" }); } } function __c1(j: number): any { switch (j) { case 0: return S.suspend(() => S.Struct({ organizationId: S.String.pipe(T.Label()), regionId: S.String.pipe(T.Label()), }).pipe( T.Http({ method: "DELETE", uri: "/v1/organizations/{organizationId}/regions/{regionId}/telemetry-link", code: 200, baseUrl: "https://telemetry-link.api.stackit.cloud", }), ), ).annotate({ identifier: "DeleteOrganizationTelemetryLinkRequest" }); } } function __c2(j: number): any { switch (j) { case 0: return S.suspend(() => S.Struct({ projectId: S.String.pipe(T.Label()), regionId: S.String.pipe(T.Label()), }).pipe( T.Http({ method: "DELETE", uri: "/v1/projects/{projectId}/regions/{regionId}/telemetry-link", code: 200, baseUrl: "https://telemetry-link.api.stackit.cloud", }), ), ).annotate({ identifier: "DeleteProjectTelemetryLinkRequest" }); } } function __c3(j: number): any { switch (j) { case 0: return S.suspend(() => S.Struct({ folderId: S.String.pipe(T.Label()), regionId: S.String.pipe(T.Label()), backflushJobId: S.String.pipe(T.Label()), }).pipe( T.Http({ method: "GET", uri: "/v1/folders/{folderId}/regions/{regionId}/telemetry-link/backflush-jobs/{backflushJobId}", code: 200, baseUrl: "https://telemetry-link.api.stackit.cloud", }), ), ).annotate({ identifier: "GetFolderBackflushJobRequest" }); } } function __c4(j: number): any { switch (j) { case 0: return S.suspend(() => S.Struct({ folderId: S.String.pipe(T.Label()), regionId: S.String.pipe(T.Label()), }).pipe( T.Http({ method: "GET", uri: "/v1/folders/{folderId}/regions/{regionId}/telemetry-link", code: 200, baseUrl: "https://telemetry-link.api.stackit.cloud", }), ), ).annotate({ identifier: "GetFolderTelemetryLinkRequest" }); } } function __c5(j: number): any { switch (j) { case 0: return S.suspend(() => S.Struct({ organizationId: S.String.pipe(T.Label()), regionId: S.String.pipe(T.Label()), backflushJobId: S.String.pipe(T.Label()), }).pipe( T.Http({ method: "GET", uri: "/v1/organizations/{organizationId}/regions/{regionId}/telemetry-link/backflush-jobs/{backflushJobId}", code: 200, baseUrl: "https://telemetry-link.api.stackit.cloud", }), ), ).annotate({ identifier: "GetOrganizationBackflushJobRequest" }); } } function __c6(j: number): any { switch (j) { case 0: return S.suspend(() => S.Struct({ organizationId: S.String.pipe(T.Label()), regionId: S.String.pipe(T.Label()), }).pipe( T.Http({ method: "GET", uri: "/v1/organizations/{organizationId}/regions/{regionId}/telemetry-link", code: 200, baseUrl: "https://telemetry-link.api.stackit.cloud", }), ), ).annotate({ identifier: "GetOrganizationTelemetryLinkRequest" }); } } function __c7(j: number): any { switch (j) { case 0: return S.suspend(() => S.Struct({ projectId: S.String.pipe(T.Label()), regionId: S.String.pipe(T.Label()), backflushJobId: S.String.pipe(T.Label()), }).pipe( T.Http({ method: "GET", uri: "/v1/projects/{projectId}/regions/{regionId}/telemetry-link/backflush-jobs/{backflushJobId}", code: 200, baseUrl: "https://telemetry-link.api.stackit.cloud", }), ), ).annotate({ identifier: "GetProjectBackflushJobRequest" }); } } function __c8(j: number): any { switch (j) { case 0: return S.suspend(() => S.Struct({ projectId: S.String.pipe(T.Label()), regionId: S.String.pipe(T.Label()), }).pipe( T.Http({ method: "GET", uri: "/v1/projects/{projectId}/regions/{regionId}/telemetry-link", code: 200, baseUrl: "https://telemetry-link.api.stackit.cloud", }), ), ).annotate({ identifier: "GetProjectTelemetryLinkRequest" }); } } function __c9(j: number): any { switch (j) { case 0: return S.suspend(() => S.Struct({ folderId: S.String.pipe(T.Label()), regionId: S.String.pipe(T.Label()), pageToken: S.optional(S.String.pipe(T.Query())), pageSize: S.optional(S.Number.pipe(T.Query())), }).pipe( T.Http({ method: "GET", uri: "/v1/folders/{folderId}/regions/{regionId}/telemetry-link/backflush-jobs", code: 200, baseUrl: "https://telemetry-link.api.stackit.cloud", }), ), ).annotate({ identifier: "ListFolderBackflushJobsRequest" }); } } function __c10(j: number): any { switch (j) { case 0: return S.Array(__S(36, __c18, 0)); case 1: return S.suspend(() => S.Struct({ backflushJobs: __S(20, __c10, 0), nextPageToken: S.optional(S.String), }), ).annotate({ identifier: "ListBackflushJobsResponse" }); } } function __c11(j: number): any { switch (j) { case 0: return S.suspend(() => S.Struct({ organizationId: S.String.pipe(T.Label()), regionId: S.String.pipe(T.Label()), pageToken: S.optional(S.String.pipe(T.Query())), pageSize: S.optional(S.Number.pipe(T.Query())), }).pipe( T.Http({ method: "GET", uri: "/v1/organizations/{organizationId}/regions/{regionId}/telemetry-link/backflush-jobs", code: 200, baseUrl: "https://telemetry-link.api.stackit.cloud", }), ), ).annotate({ identifier: "ListOrganizationBackflushJobsRequest" }); } } function __c12(j: number): any { switch (j) { case 0: return S.suspend(() => S.Struct({ projectId: S.String.pipe(T.Label()), regionId: S.String.pipe(T.Label()), pageToken: S.optional(S.String.pipe(T.Query())), pageSize: S.optional(S.Number.pipe(T.Query())), }).pipe( T.Http({ method: "GET", uri: "/v1/projects/{projectId}/regions/{regionId}/telemetry-link/backflush-jobs", code: 200, baseUrl: "https://telemetry-link.api.stackit.cloud", }), ), ).annotate({ identifier: "ListProjectBackflushJobsRequest" }); } } function __c13(j: number): any { switch (j) { case 0: return S.suspend(() => S.Struct({ folderId: S.String.pipe(T.Label()), regionId: S.String.pipe(T.Label()), accessToken: S.optional(S.String.pipe(T.SensitiveValue({}))), description: S.optional(S.String), displayName: S.optional(S.String), enabled: S.optional(S.Boolean), telemetryRouterId: S.optional(S.String), resourceLabels: S.optional(__S(28, __c14, 0)), }).pipe( T.Http({ method: "PATCH", uri: "/v1/folders/{folderId}/regions/{regionId}/telemetry-link", code: 200, baseUrl: "https://telemetry-link.api.stackit.cloud", }), ), ).annotate({ identifier: "PartialUpdateFolderTelemetryLinkRequest" }); } } function __c14(j: number): any { switch (j) { case 0: return S.Record(S.String, /*@__PURE__*/ S.NullOr(S.String)); } } function __c15(j: number): any { switch (j) { case 0: return S.suspend(() => S.Struct({ organizationId: S.String.pipe(T.Label()), regionId: S.String.pipe(T.Label()), accessToken: S.optional(S.String.pipe(T.SensitiveValue({}))), description: S.optional(S.String), displayName: S.optional(S.String), enabled: S.optional(S.Boolean), telemetryRouterId: S.optional(S.String), resourceLabels: S.optional(__S(28, __c14, 0)), }).pipe( T.Http({ method: "PATCH", uri: "/v1/organizations/{organizationId}/regions/{regionId}/telemetry-link", code: 200, baseUrl: "https://telemetry-link.api.stackit.cloud", }), ), ).annotate({ identifier: "PartialUpdateOrganizationTelemetryLinkRequest" }); } } function __c16(j: number): any { switch (j) { case 0: return S.suspend(() => S.Struct({ projectId: S.String.pipe(T.Label()), regionId: S.String.pipe(T.Label()), accessToken: S.optional(S.String.pipe(T.SensitiveValue({}))), description: S.optional(S.String), displayName: S.optional(S.String), enabled: S.optional(S.Boolean), telemetryRouterId: S.optional(S.String), resourceLabels: S.optional(__S(28, __c14, 0)), }).pipe( T.Http({ method: "PATCH", uri: "/v1/projects/{projectId}/regions/{regionId}/telemetry-link", code: 200, baseUrl: "https://telemetry-link.api.stackit.cloud", }), ), ).annotate({ identifier: "PartialUpdateProjectTelemetryLinkRequest" }); } } function __c17(j: number): any { switch (j) { case 0: return S.suspend(() => S.Struct({ folderId: S.String.pipe(T.Label()), regionId: S.String.pipe(T.Label()), description: S.optional(S.String), displayName: S.optional(S.String), }).pipe( T.Http({ method: "POST", uri: "/v1/folders/{folderId}/regions/{regionId}/telemetry-link/backflush-jobs", code: 200, baseUrl: "https://telemetry-link.api.stackit.cloud", }), ), ).annotate({ identifier: "CreateFolderBackflushJobRequest" }); } } function __c18(j: number): any { switch (j) { case 0: return S.suspend(() => S.Struct({ createTime: S.String, description: S.optional(S.String), displayName: S.optional(S.String), id: S.String, regionId: S.String, status: S.String, }), ).annotate({ identifier: "BackflushJobResponse" }); } } function __c19(j: number): any { switch (j) { case 0: return S.suspend(() => S.Struct({ organizationId: S.String.pipe(T.Label()), regionId: S.String.pipe(T.Label()), description: S.optional(S.String), displayName: S.optional(S.String), }).pipe( T.Http({ method: "POST", uri: "/v1/organizations/{organizationId}/regions/{regionId}/telemetry-link/backflush-jobs", code: 200, baseUrl: "https://telemetry-link.api.stackit.cloud", }), ), ).annotate({ identifier: "CreateOrganizationBackflushJobRequest" }); } } function __c20(j: number): any { switch (j) { case 0: return S.suspend(() => S.Struct({ folderId: S.String.pipe(T.Label()), regionId: S.String.pipe(T.Label()), accessToken: S.String.pipe(T.SensitiveValue({})), description: S.optional(S.String), displayName: S.String, enabled: S.optional(S.Boolean), telemetryRouterId: S.String, resourceLabels: S.optional(__S(42, __c21, 0)), }).pipe( T.Http({ method: "PUT", uri: "/v1/folders/{folderId}/regions/{regionId}/telemetry-link", code: 200, baseUrl: "https://telemetry-link.api.stackit.cloud", }), ), ).annotate({ identifier: "CreateOrUpdateFolderTelemetryLinkRequest" }); } } function __c21(j: number): any { switch (j) { case 0: return S.Record(S.String, S.String); case 1: return S.suspend(() => S.Struct({ accessToken: S.optional(S.String.pipe(T.SensitiveValue({}))), createTime: S.String, description: S.optional(S.String), displayName: S.String, enabled: S.Boolean, id: S.String, regionId: S.String, resourceLabels: S.optional(__S(42, __c21, 0)), status: S.String, telemetryRouterId: S.String, }), ).annotate({ identifier: "TelemetryLinkResponse" }); } } function __c22(j: number): any { switch (j) { case 0: return S.suspend(() => S.Struct({ organizationId: S.String.pipe(T.Label()), regionId: S.String.pipe(T.Label()), accessToken: S.String.pipe(T.SensitiveValue({})), description: S.optional(S.String), displayName: S.String, enabled: S.optional(S.Boolean), telemetryRouterId: S.String, resourceLabels: S.optional(__S(42, __c21, 0)), }).pipe( T.Http({ method: "PUT", uri: "/v1/organizations/{organizationId}/regions/{regionId}/telemetry-link", code: 200, baseUrl: "https://telemetry-link.api.stackit.cloud", }), ), ).annotate({ identifier: "CreateOrUpdateOrganizationTelemetryLinkRequest" }); } } function __c23(j: number): any { switch (j) { case 0: return S.suspend(() => S.Struct({ projectId: S.String.pipe(T.Label()), regionId: S.String.pipe(T.Label()), accessToken: S.String.pipe(T.SensitiveValue({})), description: S.optional(S.String), displayName: S.String, enabled: S.optional(S.Boolean), telemetryRouterId: S.String, resourceLabels: S.optional(__S(42, __c21, 0)), }).pipe( T.Http({ method: "PUT", uri: "/v1/projects/{projectId}/regions/{regionId}/telemetry-link", code: 200, baseUrl: "https://telemetry-link.api.stackit.cloud", }), ), ).annotate({ identifier: "CreateOrUpdateProjectTelemetryLinkRequest" }); } } function __c24(j: number): any { switch (j) { case 0: return S.suspend(() => S.Struct({ projectId: S.String.pipe(T.Label()), regionId: S.String.pipe(T.Label()), description: S.optional(S.String), displayName: S.optional(S.String), }).pipe( T.Http({ method: "POST", uri: "/v1/projects/{projectId}/regions/{regionId}/telemetry-link/backflush-jobs", code: 200, baseUrl: "https://telemetry-link.api.stackit.cloud", }), ), ).annotate({ identifier: "CreateProjectBackflushJobRequest" }); } } function __c25(j: number): any { switch (j) { case 0: return S.suspend(() => S.Struct({ folderId: S.String.pipe(T.Label()), regionId: S.String.pipe(T.Label()), }).pipe( T.Http({ method: "DELETE", uri: "/v1/folders/{folderId}/regions/{regionId}/telemetry-link", code: 200, baseUrl: "https://telemetry-link.api.stackit.cloud", }), ), ).annotate({ identifier: "DeleteFolderTelemetryLinkRequest" }); } } function __c26(j: number): any { switch (j) { case 0: return S.suspend(() => S.Struct({})).annotate({ identifier: "DeleteFolderTelemetryLinkResponse", }); } } // Schema table: entry i is schema j of builder f, made on first reach. function __S(i: number, f: (j: number) => unknown, j: number): any { return (__s[i] ??= __L.at(f, j)); }