UNPKG

@htdangkhoa/google-ads

Version:
80 lines (79 loc) 3.19 kB
// 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/v24/common/goal_common.proto /* eslint-disable */ import _m0 from "protobufjs/minimal.js"; function createBaseCustomerLifecycleOptimizationValueSettings() { return { additional_value: undefined, additional_high_lifetime_value: undefined }; } export const CustomerLifecycleOptimizationValueSettings = { encode(message, writer = _m0.Writer.create()) { if (message.additional_value !== undefined) { writer.uint32(9).double(message.additional_value); } if (message.additional_high_lifetime_value !== undefined) { writer.uint32(17).double(message.additional_high_lifetime_value); } return writer; }, decode(input, length) { const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseCustomerLifecycleOptimizationValueSettings(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { case 1: if (tag !== 9) { break; } message.additional_value = reader.double(); continue; case 2: if (tag !== 17) { break; } message.additional_high_lifetime_value = reader.double(); continue; } if ((tag & 7) === 4 || tag === 0) { break; } reader.skipType(tag & 7); } return message; }, fromJSON(object) { return { additional_value: isSet(object.additional_value) ? globalThis.Number(object.additional_value) : undefined, additional_high_lifetime_value: isSet(object.additional_high_lifetime_value) ? globalThis.Number(object.additional_high_lifetime_value) : undefined, }; }, toJSON(message) { const obj = {}; if (message.additional_value !== undefined) { obj.additional_value = message.additional_value; } if (message.additional_high_lifetime_value !== undefined) { obj.additional_high_lifetime_value = message.additional_high_lifetime_value; } return obj; }, create(base) { return CustomerLifecycleOptimizationValueSettings.fromPartial(base !== null && base !== void 0 ? base : {}); }, fromPartial(object) { var _a, _b; const message = createBaseCustomerLifecycleOptimizationValueSettings(); message.additional_value = (_a = object.additional_value) !== null && _a !== void 0 ? _a : undefined; message.additional_high_lifetime_value = (_b = object.additional_high_lifetime_value) !== null && _b !== void 0 ? _b : undefined; return message; }, }; function isSet(value) { return value !== null && value !== undefined; }