// SPDX-License-Identifier: Apache-2.0
/**
 * A request to list all Helm releases.
 */
export class ReleaseListRequest {
    allNamespaces;
    namespace;
    kubeContext;
    constructor(allNamespaces, namespace, kubeContext) {
        this.allNamespaces = allNamespaces;
        this.namespace = namespace;
        this.kubeContext = kubeContext;
    }
    apply(builder) {
        builder.argument('output', 'json');
        if (this.allNamespaces) {
            builder.flag('--all-namespaces');
        }
        else if (this.namespace) {
            builder.argument('namespace', this.namespace);
        }
        if (this.kubeContext) {
            builder.argument('kube-context', this.kubeContext);
        }
        builder.subcommands('list');
    }
}
//# sourceMappingURL=release-list-request.js.map