// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
// This file is automatically generated. DO NOT EDIT

// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore: Unused imports
import { Create as $Create } from "@wailsio/runtime";

/**
 * Workspace represents a user's workspace.
 */
export class Workspace {
    "Name": string;
    "Path": string;

    /** Creates a new Workspace instance. */
    constructor($$source: Partial<Workspace> = {}) {
        if (!("Name" in $$source)) {
            this["Name"] = "";
        }
        if (!("Path" in $$source)) {
            this["Path"] = "";
        }

        Object.assign(this, $$source);
    }

    /**
     * Creates a new Workspace instance from a string or object.
     */
    static createFrom($$source: any = {}): Workspace {
        let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
        return new Workspace($$parsedSource as Partial<Workspace>);
    }
}
