UNPKG

@htdangkhoa/google-ads

Version:
170 lines (169 loc) 7.16 kB
"use strict"; // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: // protoc-gen-ts_proto v1.181.2 // protoc v3.21.12 // source: google/ads/googleads/v21/resources/payments_account.proto var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); exports.PaymentsAccount = void 0; /* eslint-disable */ const minimal_js_1 = __importDefault(require("protobufjs/minimal.js")); function createBasePaymentsAccount() { return { resource_name: "", payments_account_id: undefined, name: undefined, currency_code: undefined, payments_profile_id: undefined, secondary_payments_profile_id: undefined, paying_manager_customer: undefined, }; } exports.PaymentsAccount = { encode(message, writer = minimal_js_1.default.Writer.create()) { if (message.resource_name !== undefined && message.resource_name !== "") { writer.uint32(10).string(message.resource_name); } if (message.payments_account_id !== undefined) { writer.uint32(66).string(message.payments_account_id); } if (message.name !== undefined) { writer.uint32(74).string(message.name); } if (message.currency_code !== undefined) { writer.uint32(82).string(message.currency_code); } if (message.payments_profile_id !== undefined) { writer.uint32(90).string(message.payments_profile_id); } if (message.secondary_payments_profile_id !== undefined) { writer.uint32(98).string(message.secondary_payments_profile_id); } if (message.paying_manager_customer !== undefined) { writer.uint32(106).string(message.paying_manager_customer); } return writer; }, decode(input, length) { const reader = input instanceof minimal_js_1.default.Reader ? input : minimal_js_1.default.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBasePaymentsAccount(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { case 1: if (tag !== 10) { break; } message.resource_name = reader.string(); continue; case 8: if (tag !== 66) { break; } message.payments_account_id = reader.string(); continue; case 9: if (tag !== 74) { break; } message.name = reader.string(); continue; case 10: if (tag !== 82) { break; } message.currency_code = reader.string(); continue; case 11: if (tag !== 90) { break; } message.payments_profile_id = reader.string(); continue; case 12: if (tag !== 98) { break; } message.secondary_payments_profile_id = reader.string(); continue; case 13: if (tag !== 106) { break; } message.paying_manager_customer = reader.string(); continue; } if ((tag & 7) === 4 || tag === 0) { break; } reader.skipType(tag & 7); } return message; }, fromJSON(object) { return { resource_name: isSet(object.resource_name) ? globalThis.String(object.resource_name) : "", payments_account_id: isSet(object.payments_account_id) ? globalThis.String(object.payments_account_id) : undefined, name: isSet(object.name) ? globalThis.String(object.name) : undefined, currency_code: isSet(object.currency_code) ? globalThis.String(object.currency_code) : undefined, payments_profile_id: isSet(object.payments_profile_id) ? globalThis.String(object.payments_profile_id) : undefined, secondary_payments_profile_id: isSet(object.secondary_payments_profile_id) ? globalThis.String(object.secondary_payments_profile_id) : undefined, paying_manager_customer: isSet(object.paying_manager_customer) ? globalThis.String(object.paying_manager_customer) : undefined, }; }, toJSON(message) { const obj = {}; if (message.resource_name !== undefined && message.resource_name !== "") { obj.resource_name = message.resource_name; } if (message.payments_account_id !== undefined) { obj.payments_account_id = message.payments_account_id; } if (message.name !== undefined) { obj.name = message.name; } if (message.currency_code !== undefined) { obj.currency_code = message.currency_code; } if (message.payments_profile_id !== undefined) { obj.payments_profile_id = message.payments_profile_id; } if (message.secondary_payments_profile_id !== undefined) { obj.secondary_payments_profile_id = message.secondary_payments_profile_id; } if (message.paying_manager_customer !== undefined) { obj.paying_manager_customer = message.paying_manager_customer; } return obj; }, create(base) { return exports.PaymentsAccount.fromPartial(base !== null && base !== void 0 ? base : {}); }, fromPartial(object) { var _a, _b, _c, _d, _e, _f, _g; const message = createBasePaymentsAccount(); message.resource_name = (_a = object.resource_name) !== null && _a !== void 0 ? _a : ""; message.payments_account_id = (_b = object.payments_account_id) !== null && _b !== void 0 ? _b : undefined; message.name = (_c = object.name) !== null && _c !== void 0 ? _c : undefined; message.currency_code = (_d = object.currency_code) !== null && _d !== void 0 ? _d : undefined; message.payments_profile_id = (_e = object.payments_profile_id) !== null && _e !== void 0 ? _e : undefined; message.secondary_payments_profile_id = (_f = object.secondary_payments_profile_id) !== null && _f !== void 0 ? _f : undefined; message.paying_manager_customer = (_g = object.paying_manager_customer) !== null && _g !== void 0 ? _g : undefined; return message; }, }; function isSet(value) { return value !== null && value !== undefined; }