UNPKG

@soft-stech/fleet

Version:
65 lines (64 loc) 1.7 kB
import { addSchema } from "@soft-stech/apimachinery/_schemas/IoK8sApimachineryPkgApisMetaV1ObjectMeta"; import { Model, setSchema, createTypeMetaGuard } from "@soft-stech/base"; import { register } from "@soft-stech/validate"; const schemaId = "fleet.cattle.io.v1alpha1.Content"; const schema = { "type": "object", "properties": { "apiVersion": { "type": "string", "enum": [ "fleet.cattle.io/v1alpha1" ] }, "content": { "format": "byte", "nullable": true, "type": "string" }, "kind": { "type": "string", "enum": [ "Content" ] }, "metadata": { "oneOf": [ { "$ref": "io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta#" }, { "type": "null" } ] }, "sha256sum": { "type": "string", "nullable": true } }, "required": [ "apiVersion", "kind" ] }; /** * Content is used internally by Fleet and should not be used directly. It * contains the resources from a bundle for a specific target cluster. */ export class Content extends Model { constructor(data) { super({ apiVersion: Content.apiVersion, kind: Content.kind, ...data }); } } Content.apiVersion = "fleet.cattle.io/v1alpha1"; Content.kind = "Content"; Content.is = createTypeMetaGuard(Content); setSchema(Content, schemaId, () => { addSchema(); register(schemaId, schema); });