"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.HelmReleaseServiceClient = exports.HelmReleaseServiceService = exports.Value = exports.ValueWithKey = exports.UninstallHelmReleaseMetadata = exports.UninstallHelmReleaseRequest = exports.UpdateHelmReleaseMetadata = exports.UpdateHelmReleaseRequest = exports.InstallHelmReleaseMetadata = exports.InstallHelmReleaseRequest = exports.GetHelmReleaseRequest = exports.ListHelmReleasesResponse = exports.ListHelmReleasesRequest = exports.protobufPackage = void 0;
/* eslint-disable */
const long_1 = __importDefault(require("long"));
const grpc_js_1 = require("@grpc/grpc-js");
const minimal_1 = __importDefault(require("protobufjs/minimal"));
const helm_release_1 = require("../../../../../yandex/cloud/k8s/marketplace/v1/helm_release");
const operation_1 = require("../../../../../yandex/cloud/operation/operation");
exports.protobufPackage = 'yandex.cloud.k8s.marketplace.v1';
const baseListHelmReleasesRequest = { clusterId: '', pageSize: 0, pageToken: '' };
exports.ListHelmReleasesRequest = {
    encode(message, writer = minimal_1.default.Writer.create()) {
        if (message.clusterId !== '') {
            writer.uint32(10).string(message.clusterId);
        }
        if (message.pageSize !== 0) {
            writer.uint32(16).int64(message.pageSize);
        }
        if (message.pageToken !== '') {
            writer.uint32(26).string(message.pageToken);
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = Object.assign({}, baseListHelmReleasesRequest);
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1:
                    message.clusterId = reader.string();
                    break;
                case 2:
                    message.pageSize = longToNumber(reader.int64());
                    break;
                case 3:
                    message.pageToken = reader.string();
                    break;
                default:
                    reader.skipType(tag & 7);
                    break;
            }
        }
        return message;
    },
    fromJSON(object) {
        const message = Object.assign({}, baseListHelmReleasesRequest);
        message.clusterId =
            object.clusterId !== undefined && object.clusterId !== null
                ? String(object.clusterId)
                : '';
        message.pageSize =
            object.pageSize !== undefined && object.pageSize !== null ? Number(object.pageSize) : 0;
        message.pageToken =
            object.pageToken !== undefined && object.pageToken !== null
                ? String(object.pageToken)
                : '';
        return message;
    },
    toJSON(message) {
        const obj = {};
        message.clusterId !== undefined && (obj.clusterId = message.clusterId);
        message.pageSize !== undefined && (obj.pageSize = Math.round(message.pageSize));
        message.pageToken !== undefined && (obj.pageToken = message.pageToken);
        return obj;
    },
    fromPartial(object) {
        var _a, _b, _c;
        const message = Object.assign({}, baseListHelmReleasesRequest);
        message.clusterId = (_a = object.clusterId) !== null && _a !== void 0 ? _a : '';
        message.pageSize = (_b = object.pageSize) !== null && _b !== void 0 ? _b : 0;
        message.pageToken = (_c = object.pageToken) !== null && _c !== void 0 ? _c : '';
        return message;
    },
};
const baseListHelmReleasesResponse = { nextPageToken: '' };
exports.ListHelmReleasesResponse = {
    encode(message, writer = minimal_1.default.Writer.create()) {
        for (const v of message.helmReleases) {
            helm_release_1.HelmRelease.encode(v, writer.uint32(10).fork()).ldelim();
        }
        if (message.nextPageToken !== '') {
            writer.uint32(18).string(message.nextPageToken);
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = Object.assign({}, baseListHelmReleasesResponse);
        message.helmReleases = [];
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1:
                    message.helmReleases.push(helm_release_1.HelmRelease.decode(reader, reader.uint32()));
                    break;
                case 2:
                    message.nextPageToken = reader.string();
                    break;
                default:
                    reader.skipType(tag & 7);
                    break;
            }
        }
        return message;
    },
    fromJSON(object) {
        var _a;
        const message = Object.assign({}, baseListHelmReleasesResponse);
        message.helmReleases = ((_a = object.helmReleases) !== null && _a !== void 0 ? _a : []).map((e) => helm_release_1.HelmRelease.fromJSON(e));
        message.nextPageToken =
            object.nextPageToken !== undefined && object.nextPageToken !== null
                ? String(object.nextPageToken)
                : '';
        return message;
    },
    toJSON(message) {
        const obj = {};
        if (message.helmReleases) {
            obj.helmReleases = message.helmReleases.map((e) => e ? helm_release_1.HelmRelease.toJSON(e) : undefined);
        }
        else {
            obj.helmReleases = [];
        }
        message.nextPageToken !== undefined && (obj.nextPageToken = message.nextPageToken);
        return obj;
    },
    fromPartial(object) {
        var _a, _b;
        const message = Object.assign({}, baseListHelmReleasesResponse);
        message.helmReleases = ((_a = object.helmReleases) === null || _a === void 0 ? void 0 : _a.map((e) => helm_release_1.HelmRelease.fromPartial(e))) || [];
        message.nextPageToken = (_b = object.nextPageToken) !== null && _b !== void 0 ? _b : '';
        return message;
    },
};
const baseGetHelmReleaseRequest = { id: '' };
exports.GetHelmReleaseRequest = {
    encode(message, writer = minimal_1.default.Writer.create()) {
        if (message.id !== '') {
            writer.uint32(10).string(message.id);
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = Object.assign({}, baseGetHelmReleaseRequest);
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1:
                    message.id = reader.string();
                    break;
                default:
                    reader.skipType(tag & 7);
                    break;
            }
        }
        return message;
    },
    fromJSON(object) {
        const message = Object.assign({}, baseGetHelmReleaseRequest);
        message.id = object.id !== undefined && object.id !== null ? String(object.id) : '';
        return message;
    },
    toJSON(message) {
        const obj = {};
        message.id !== undefined && (obj.id = message.id);
        return obj;
    },
    fromPartial(object) {
        var _a;
        const message = Object.assign({}, baseGetHelmReleaseRequest);
        message.id = (_a = object.id) !== null && _a !== void 0 ? _a : '';
        return message;
    },
};
const baseInstallHelmReleaseRequest = { clusterId: '', productVersionId: '' };
exports.InstallHelmReleaseRequest = {
    encode(message, writer = minimal_1.default.Writer.create()) {
        if (message.clusterId !== '') {
            writer.uint32(10).string(message.clusterId);
        }
        if (message.productVersionId !== '') {
            writer.uint32(18).string(message.productVersionId);
        }
        for (const v of message.userValues) {
            exports.ValueWithKey.encode(v, writer.uint32(26).fork()).ldelim();
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = Object.assign({}, baseInstallHelmReleaseRequest);
        message.userValues = [];
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1:
                    message.clusterId = reader.string();
                    break;
                case 2:
                    message.productVersionId = reader.string();
                    break;
                case 3:
                    message.userValues.push(exports.ValueWithKey.decode(reader, reader.uint32()));
                    break;
                default:
                    reader.skipType(tag & 7);
                    break;
            }
        }
        return message;
    },
    fromJSON(object) {
        var _a;
        const message = Object.assign({}, baseInstallHelmReleaseRequest);
        message.clusterId =
            object.clusterId !== undefined && object.clusterId !== null
                ? String(object.clusterId)
                : '';
        message.productVersionId =
            object.productVersionId !== undefined && object.productVersionId !== null
                ? String(object.productVersionId)
                : '';
        message.userValues = ((_a = object.userValues) !== null && _a !== void 0 ? _a : []).map((e) => exports.ValueWithKey.fromJSON(e));
        return message;
    },
    toJSON(message) {
        const obj = {};
        message.clusterId !== undefined && (obj.clusterId = message.clusterId);
        message.productVersionId !== undefined && (obj.productVersionId = message.productVersionId);
        if (message.userValues) {
            obj.userValues = message.userValues.map((e) => e ? exports.ValueWithKey.toJSON(e) : undefined);
        }
        else {
            obj.userValues = [];
        }
        return obj;
    },
    fromPartial(object) {
        var _a, _b, _c;
        const message = Object.assign({}, baseInstallHelmReleaseRequest);
        message.clusterId = (_a = object.clusterId) !== null && _a !== void 0 ? _a : '';
        message.productVersionId = (_b = object.productVersionId) !== null && _b !== void 0 ? _b : '';
        message.userValues = ((_c = object.userValues) === null || _c === void 0 ? void 0 : _c.map((e) => exports.ValueWithKey.fromPartial(e))) || [];
        return message;
    },
};
const baseInstallHelmReleaseMetadata = {
    clusterId: '',
    helmReleaseId: '',
    productVersionId: '',
};
exports.InstallHelmReleaseMetadata = {
    encode(message, writer = minimal_1.default.Writer.create()) {
        if (message.clusterId !== '') {
            writer.uint32(10).string(message.clusterId);
        }
        if (message.helmReleaseId !== '') {
            writer.uint32(18).string(message.helmReleaseId);
        }
        if (message.productVersionId !== '') {
            writer.uint32(26).string(message.productVersionId);
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = Object.assign({}, baseInstallHelmReleaseMetadata);
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1:
                    message.clusterId = reader.string();
                    break;
                case 2:
                    message.helmReleaseId = reader.string();
                    break;
                case 3:
                    message.productVersionId = reader.string();
                    break;
                default:
                    reader.skipType(tag & 7);
                    break;
            }
        }
        return message;
    },
    fromJSON(object) {
        const message = Object.assign({}, baseInstallHelmReleaseMetadata);
        message.clusterId =
            object.clusterId !== undefined && object.clusterId !== null
                ? String(object.clusterId)
                : '';
        message.helmReleaseId =
            object.helmReleaseId !== undefined && object.helmReleaseId !== null
                ? String(object.helmReleaseId)
                : '';
        message.productVersionId =
            object.productVersionId !== undefined && object.productVersionId !== null
                ? String(object.productVersionId)
                : '';
        return message;
    },
    toJSON(message) {
        const obj = {};
        message.clusterId !== undefined && (obj.clusterId = message.clusterId);
        message.helmReleaseId !== undefined && (obj.helmReleaseId = message.helmReleaseId);
        message.productVersionId !== undefined && (obj.productVersionId = message.productVersionId);
        return obj;
    },
    fromPartial(object) {
        var _a, _b, _c;
        const message = Object.assign({}, baseInstallHelmReleaseMetadata);
        message.clusterId = (_a = object.clusterId) !== null && _a !== void 0 ? _a : '';
        message.helmReleaseId = (_b = object.helmReleaseId) !== null && _b !== void 0 ? _b : '';
        message.productVersionId = (_c = object.productVersionId) !== null && _c !== void 0 ? _c : '';
        return message;
    },
};
const baseUpdateHelmReleaseRequest = { id: '', productVersionId: '' };
exports.UpdateHelmReleaseRequest = {
    encode(message, writer = minimal_1.default.Writer.create()) {
        if (message.id !== '') {
            writer.uint32(10).string(message.id);
        }
        if (message.productVersionId !== '') {
            writer.uint32(18).string(message.productVersionId);
        }
        for (const v of message.userValues) {
            exports.ValueWithKey.encode(v, writer.uint32(26).fork()).ldelim();
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = Object.assign({}, baseUpdateHelmReleaseRequest);
        message.userValues = [];
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1:
                    message.id = reader.string();
                    break;
                case 2:
                    message.productVersionId = reader.string();
                    break;
                case 3:
                    message.userValues.push(exports.ValueWithKey.decode(reader, reader.uint32()));
                    break;
                default:
                    reader.skipType(tag & 7);
                    break;
            }
        }
        return message;
    },
    fromJSON(object) {
        var _a;
        const message = Object.assign({}, baseUpdateHelmReleaseRequest);
        message.id = object.id !== undefined && object.id !== null ? String(object.id) : '';
        message.productVersionId =
            object.productVersionId !== undefined && object.productVersionId !== null
                ? String(object.productVersionId)
                : '';
        message.userValues = ((_a = object.userValues) !== null && _a !== void 0 ? _a : []).map((e) => exports.ValueWithKey.fromJSON(e));
        return message;
    },
    toJSON(message) {
        const obj = {};
        message.id !== undefined && (obj.id = message.id);
        message.productVersionId !== undefined && (obj.productVersionId = message.productVersionId);
        if (message.userValues) {
            obj.userValues = message.userValues.map((e) => e ? exports.ValueWithKey.toJSON(e) : undefined);
        }
        else {
            obj.userValues = [];
        }
        return obj;
    },
    fromPartial(object) {
        var _a, _b, _c;
        const message = Object.assign({}, baseUpdateHelmReleaseRequest);
        message.id = (_a = object.id) !== null && _a !== void 0 ? _a : '';
        message.productVersionId = (_b = object.productVersionId) !== null && _b !== void 0 ? _b : '';
        message.userValues = ((_c = object.userValues) === null || _c === void 0 ? void 0 : _c.map((e) => exports.ValueWithKey.fromPartial(e))) || [];
        return message;
    },
};
const baseUpdateHelmReleaseMetadata = {
    clusterId: '',
    helmReleaseId: '',
    productVersionId: '',
};
exports.UpdateHelmReleaseMetadata = {
    encode(message, writer = minimal_1.default.Writer.create()) {
        if (message.clusterId !== '') {
            writer.uint32(10).string(message.clusterId);
        }
        if (message.helmReleaseId !== '') {
            writer.uint32(18).string(message.helmReleaseId);
        }
        if (message.productVersionId !== '') {
            writer.uint32(26).string(message.productVersionId);
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = Object.assign({}, baseUpdateHelmReleaseMetadata);
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1:
                    message.clusterId = reader.string();
                    break;
                case 2:
                    message.helmReleaseId = reader.string();
                    break;
                case 3:
                    message.productVersionId = reader.string();
                    break;
                default:
                    reader.skipType(tag & 7);
                    break;
            }
        }
        return message;
    },
    fromJSON(object) {
        const message = Object.assign({}, baseUpdateHelmReleaseMetadata);
        message.clusterId =
            object.clusterId !== undefined && object.clusterId !== null
                ? String(object.clusterId)
                : '';
        message.helmReleaseId =
            object.helmReleaseId !== undefined && object.helmReleaseId !== null
                ? String(object.helmReleaseId)
                : '';
        message.productVersionId =
            object.productVersionId !== undefined && object.productVersionId !== null
                ? String(object.productVersionId)
                : '';
        return message;
    },
    toJSON(message) {
        const obj = {};
        message.clusterId !== undefined && (obj.clusterId = message.clusterId);
        message.helmReleaseId !== undefined && (obj.helmReleaseId = message.helmReleaseId);
        message.productVersionId !== undefined && (obj.productVersionId = message.productVersionId);
        return obj;
    },
    fromPartial(object) {
        var _a, _b, _c;
        const message = Object.assign({}, baseUpdateHelmReleaseMetadata);
        message.clusterId = (_a = object.clusterId) !== null && _a !== void 0 ? _a : '';
        message.helmReleaseId = (_b = object.helmReleaseId) !== null && _b !== void 0 ? _b : '';
        message.productVersionId = (_c = object.productVersionId) !== null && _c !== void 0 ? _c : '';
        return message;
    },
};
const baseUninstallHelmReleaseRequest = { id: '' };
exports.UninstallHelmReleaseRequest = {
    encode(message, writer = minimal_1.default.Writer.create()) {
        if (message.id !== '') {
            writer.uint32(10).string(message.id);
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = Object.assign({}, baseUninstallHelmReleaseRequest);
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1:
                    message.id = reader.string();
                    break;
                default:
                    reader.skipType(tag & 7);
                    break;
            }
        }
        return message;
    },
    fromJSON(object) {
        const message = Object.assign({}, baseUninstallHelmReleaseRequest);
        message.id = object.id !== undefined && object.id !== null ? String(object.id) : '';
        return message;
    },
    toJSON(message) {
        const obj = {};
        message.id !== undefined && (obj.id = message.id);
        return obj;
    },
    fromPartial(object) {
        var _a;
        const message = Object.assign({}, baseUninstallHelmReleaseRequest);
        message.id = (_a = object.id) !== null && _a !== void 0 ? _a : '';
        return message;
    },
};
const baseUninstallHelmReleaseMetadata = { clusterId: '', helmReleaseId: '' };
exports.UninstallHelmReleaseMetadata = {
    encode(message, writer = minimal_1.default.Writer.create()) {
        if (message.clusterId !== '') {
            writer.uint32(10).string(message.clusterId);
        }
        if (message.helmReleaseId !== '') {
            writer.uint32(18).string(message.helmReleaseId);
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = Object.assign({}, baseUninstallHelmReleaseMetadata);
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1:
                    message.clusterId = reader.string();
                    break;
                case 2:
                    message.helmReleaseId = reader.string();
                    break;
                default:
                    reader.skipType(tag & 7);
                    break;
            }
        }
        return message;
    },
    fromJSON(object) {
        const message = Object.assign({}, baseUninstallHelmReleaseMetadata);
        message.clusterId =
            object.clusterId !== undefined && object.clusterId !== null
                ? String(object.clusterId)
                : '';
        message.helmReleaseId =
            object.helmReleaseId !== undefined && object.helmReleaseId !== null
                ? String(object.helmReleaseId)
                : '';
        return message;
    },
    toJSON(message) {
        const obj = {};
        message.clusterId !== undefined && (obj.clusterId = message.clusterId);
        message.helmReleaseId !== undefined && (obj.helmReleaseId = message.helmReleaseId);
        return obj;
    },
    fromPartial(object) {
        var _a, _b;
        const message = Object.assign({}, baseUninstallHelmReleaseMetadata);
        message.clusterId = (_a = object.clusterId) !== null && _a !== void 0 ? _a : '';
        message.helmReleaseId = (_b = object.helmReleaseId) !== null && _b !== void 0 ? _b : '';
        return message;
    },
};
const baseValueWithKey = { key: '' };
exports.ValueWithKey = {
    encode(message, writer = minimal_1.default.Writer.create()) {
        if (message.key !== '') {
            writer.uint32(10).string(message.key);
        }
        if (message.value !== undefined) {
            exports.Value.encode(message.value, writer.uint32(18).fork()).ldelim();
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = Object.assign({}, baseValueWithKey);
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1:
                    message.key = reader.string();
                    break;
                case 2:
                    message.value = exports.Value.decode(reader, reader.uint32());
                    break;
                default:
                    reader.skipType(tag & 7);
                    break;
            }
        }
        return message;
    },
    fromJSON(object) {
        const message = Object.assign({}, baseValueWithKey);
        message.key = object.key !== undefined && object.key !== null ? String(object.key) : '';
        message.value =
            object.value !== undefined && object.value !== null
                ? exports.Value.fromJSON(object.value)
                : undefined;
        return message;
    },
    toJSON(message) {
        const obj = {};
        message.key !== undefined && (obj.key = message.key);
        message.value !== undefined &&
            (obj.value = message.value ? exports.Value.toJSON(message.value) : undefined);
        return obj;
    },
    fromPartial(object) {
        var _a;
        const message = Object.assign({}, baseValueWithKey);
        message.key = (_a = object.key) !== null && _a !== void 0 ? _a : '';
        message.value =
            object.value !== undefined && object.value !== null
                ? exports.Value.fromPartial(object.value)
                : undefined;
        return message;
    },
};
const baseValue = {};
exports.Value = {
    encode(message, writer = minimal_1.default.Writer.create()) {
        if (message.typedValue !== undefined) {
            writer.uint32(10).string(message.typedValue);
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = Object.assign({}, baseValue);
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1:
                    message.typedValue = reader.string();
                    break;
                default:
                    reader.skipType(tag & 7);
                    break;
            }
        }
        return message;
    },
    fromJSON(object) {
        const message = Object.assign({}, baseValue);
        message.typedValue =
            object.typedValue !== undefined && object.typedValue !== null
                ? String(object.typedValue)
                : undefined;
        return message;
    },
    toJSON(message) {
        const obj = {};
        message.typedValue !== undefined && (obj.typedValue = message.typedValue);
        return obj;
    },
    fromPartial(object) {
        var _a;
        const message = Object.assign({}, baseValue);
        message.typedValue = (_a = object.typedValue) !== null && _a !== void 0 ? _a : undefined;
        return message;
    },
};
/** A set of methods for managing Helm release. */
exports.HelmReleaseServiceService = {
    /** Retrieves the list of Helm releases in the specified Kubernetes Cluster. */
    list: {
        path: '/yandex.cloud.k8s.marketplace.v1.HelmReleaseService/List',
        requestStream: false,
        responseStream: false,
        requestSerialize: (value) => Buffer.from(exports.ListHelmReleasesRequest.encode(value).finish()),
        requestDeserialize: (value) => exports.ListHelmReleasesRequest.decode(value),
        responseSerialize: (value) => Buffer.from(exports.ListHelmReleasesResponse.encode(value).finish()),
        responseDeserialize: (value) => exports.ListHelmReleasesResponse.decode(value),
    },
    /** Returns the specified Helm release. */
    get: {
        path: '/yandex.cloud.k8s.marketplace.v1.HelmReleaseService/Get',
        requestStream: false,
        responseStream: false,
        requestSerialize: (value) => Buffer.from(exports.GetHelmReleaseRequest.encode(value).finish()),
        requestDeserialize: (value) => exports.GetHelmReleaseRequest.decode(value),
        responseSerialize: (value) => Buffer.from(helm_release_1.HelmRelease.encode(value).finish()),
        responseDeserialize: (value) => helm_release_1.HelmRelease.decode(value),
    },
    /** Installs helm release into specified Kubernetes Cluster. */
    install: {
        path: '/yandex.cloud.k8s.marketplace.v1.HelmReleaseService/Install',
        requestStream: false,
        responseStream: false,
        requestSerialize: (value) => Buffer.from(exports.InstallHelmReleaseRequest.encode(value).finish()),
        requestDeserialize: (value) => exports.InstallHelmReleaseRequest.decode(value),
        responseSerialize: (value) => Buffer.from(operation_1.Operation.encode(value).finish()),
        responseDeserialize: (value) => operation_1.Operation.decode(value),
    },
    /** Updates helm release. */
    update: {
        path: '/yandex.cloud.k8s.marketplace.v1.HelmReleaseService/Update',
        requestStream: false,
        responseStream: false,
        requestSerialize: (value) => Buffer.from(exports.UpdateHelmReleaseRequest.encode(value).finish()),
        requestDeserialize: (value) => exports.UpdateHelmReleaseRequest.decode(value),
        responseSerialize: (value) => Buffer.from(operation_1.Operation.encode(value).finish()),
        responseDeserialize: (value) => operation_1.Operation.decode(value),
    },
    /** Uninstalls helm release. */
    uninstall: {
        path: '/yandex.cloud.k8s.marketplace.v1.HelmReleaseService/Uninstall',
        requestStream: false,
        responseStream: false,
        requestSerialize: (value) => Buffer.from(exports.UninstallHelmReleaseRequest.encode(value).finish()),
        requestDeserialize: (value) => exports.UninstallHelmReleaseRequest.decode(value),
        responseSerialize: (value) => Buffer.from(operation_1.Operation.encode(value).finish()),
        responseDeserialize: (value) => operation_1.Operation.decode(value),
    },
};
exports.HelmReleaseServiceClient = (0, grpc_js_1.makeGenericClientConstructor)(exports.HelmReleaseServiceService, 'yandex.cloud.k8s.marketplace.v1.HelmReleaseService');
var globalThis = (() => {
    if (typeof globalThis !== 'undefined')
        return globalThis;
    if (typeof self !== 'undefined')
        return self;
    if (typeof window !== 'undefined')
        return window;
    if (typeof global !== 'undefined')
        return global;
    throw 'Unable to locate global object';
})();
function longToNumber(long) {
    if (long.gt(Number.MAX_SAFE_INTEGER)) {
        throw new globalThis.Error('Value is larger than Number.MAX_SAFE_INTEGER');
    }
    return long.toNumber();
}
if (minimal_1.default.util.Long !== long_1.default) {
    minimal_1.default.util.Long = long_1.default;
    minimal_1.default.configure();
}
