// SPDX-License-Identifier: Apache-2.0
import { HelmChartSchema } from '../../../../data/schema/model/common/helm-chart-schema.js';
import { NamespaceName } from '../../../../types/namespace/namespace-name.js';
export class HelmChart {
    encapsulatedObject;
    constructor(encapsulatedObject) {
        this.encapsulatedObject = encapsulatedObject;
        if (!encapsulatedObject) {
            this.encapsulatedObject = new HelmChartSchema();
        }
    }
    get name() {
        return this.encapsulatedObject.name;
    }
    set name(name) {
        this.encapsulatedObject.name = name;
    }
    get namespace() {
        return this.encapsulatedObject.namespace;
    }
    set namespace(namespace) {
        this.encapsulatedObject.namespace = namespace;
    }
    get namespaceName() {
        return NamespaceName.of(this.encapsulatedObject.namespace);
    }
    get release() {
        return this.encapsulatedObject.release;
    }
    set release(release) {
        this.encapsulatedObject.release = release;
    }
    get repository() {
        if (this.encapsulatedObject.directory) {
            return this.encapsulatedObject.directory;
        }
        return this.encapsulatedObject.repository;
    }
    set repository(repository) {
        this.encapsulatedObject.repository = repository;
    }
    get directory() {
        return this.encapsulatedObject.directory;
    }
    set directory(directory) {
        this.encapsulatedObject.directory = directory;
    }
    get version() {
        return this.encapsulatedObject.version;
    }
    set version(version) {
        this.encapsulatedObject.version = version;
    }
    get labelSelector() {
        return this.encapsulatedObject.labelSelector;
    }
    set labelSelector(labelSelector) {
        this.encapsulatedObject.labelSelector = labelSelector;
    }
    get labels() {
        return this.encapsulatedObject.labelSelector?.split(',') ?? [];
    }
    get containerName() {
        return this.encapsulatedObject.containerName;
    }
    set containerName(containerName) {
        this.encapsulatedObject.containerName = containerName;
    }
    get ingressClassName() {
        return this.encapsulatedObject.ingressClassName;
    }
    set ingressClassName(ingressClassName) {
        this.encapsulatedObject.ingressClassName = ingressClassName;
    }
    get ingressControllerName() {
        return this.encapsulatedObject.ingressControllerName;
    }
    set ingressControllerName(ingressControllerName) {
        this.encapsulatedObject.ingressControllerName = ingressControllerName;
    }
    get ingressControllerPrefix() {
        return this.encapsulatedObject.ingressControllerPrefix;
    }
    set ingressControllerPrefix(ingressControllerPrefix) {
        this.encapsulatedObject.ingressControllerPrefix = ingressControllerPrefix;
    }
}
//# sourceMappingURL=helm-chart.js.map