90 lines
2.8 KiB
TypeScript
90 lines
2.8 KiB
TypeScript
// This file is auto-generated. Do not edit manually.
|
|
import * as S from 'effect/Schema';
|
|
|
|
export const Operation = S.Literal(
|
|
"get",
|
|
"set",
|
|
"test",
|
|
"export"
|
|
);
|
|
export type Operation = S.Schema.Type<typeof Operation>;
|
|
|
|
export const ExecutionKind = S.Literal(
|
|
"actual",
|
|
"whatIf"
|
|
);
|
|
export type ExecutionKind = S.Schema.Type<typeof ExecutionKind>;
|
|
|
|
export const SecurityContextKind = S.Literal(
|
|
"current",
|
|
"elevated",
|
|
"restricted"
|
|
);
|
|
export type SecurityContextKind = S.Schema.Type<typeof SecurityContextKind>;
|
|
|
|
export const MicrosoftDscMetadata = S.Struct({
|
|
"version": S.optional(S.NullOr(S.String)),
|
|
"operation": S.optional(S.NullOr(Operation)),
|
|
"executionType": S.optional(S.NullOr(ExecutionKind)),
|
|
"startDatetime": S.optional(S.NullOr(S.String)),
|
|
"endDatetime": S.optional(S.NullOr(S.String)),
|
|
"duration": S.optional(S.NullOr(S.String)),
|
|
"securityContext": S.optional(S.NullOr(SecurityContextKind))
|
|
});
|
|
export type MicrosoftDscMetadata = S.Schema.Type<typeof MicrosoftDscMetadata>;
|
|
|
|
export const Metadata = S.Struct({
|
|
"Microsoft.DSC": S.optional(S.NullOr(MicrosoftDscMetadata))
|
|
});
|
|
export type Metadata = S.Schema.Type<typeof Metadata>;
|
|
|
|
export const ResourceTestResponse = S.Struct({
|
|
"desiredState": S.Unknown,
|
|
"actualState": S.Unknown,
|
|
"inDesiredState": S.Boolean,
|
|
"differingProperties": S.Array(S.String)
|
|
});
|
|
export type ResourceTestResponse = S.Schema.Type<typeof ResourceTestResponse>;
|
|
|
|
export const MessageLevel = S.Literal(
|
|
"error",
|
|
"warning",
|
|
"information"
|
|
);
|
|
export type MessageLevel = S.Schema.Type<typeof MessageLevel>;
|
|
|
|
export const ResourceMessage = S.Struct({
|
|
"name": S.String,
|
|
"type": S.String,
|
|
"message": S.String,
|
|
"level": MessageLevel
|
|
});
|
|
export type ResourceMessage = S.Schema.Type<typeof ResourceMessage>;
|
|
|
|
export const ConfigurationTestResult = S.Struct({
|
|
"metadata": S.optional(S.NullOr(Metadata)),
|
|
"results": S.Array(S.suspend((): S.Schema<ResourceTestResult> => ResourceTestResult)),
|
|
"messages": S.Array(ResourceMessage),
|
|
"hadErrors": S.Boolean
|
|
});
|
|
export type ConfigurationTestResult = S.Schema.Type<typeof ConfigurationTestResult>;
|
|
|
|
// Recursive type declarations
|
|
interface ResourceTestResult {
|
|
readonly "metadata"?: Metadata | null;
|
|
readonly "name": string;
|
|
readonly "type": string;
|
|
readonly "result": TestResult
|
|
}
|
|
type TestResult = ResourceTestResponse | ReadonlyArray<ResourceTestResult>
|
|
|
|
// Recursive schema definitions
|
|
export const ResourceTestResult = S.Struct({
|
|
"metadata": S.optional(S.NullOr(Metadata)),
|
|
"name": S.String,
|
|
"type": S.String,
|
|
"result": S.suspend((): S.Schema<TestResult> => TestResult)
|
|
}) as unknown as S.Schema<ResourceTestResult>;
|
|
|
|
export const TestResult = S.Union(ResourceTestResponse, S.Array(S.suspend((): S.Schema<ResourceTestResult> => ResourceTestResult))) as unknown as S.Schema<TestResult>;
|