@htdangkhoa/google-ads
Version:
Google Ads API client for Node.js
111 lines (110 loc) • 4.07 kB
JavaScript
;
// 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_setting.proto
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.GoalSetting_RetentionGoal = exports.GoalSetting = void 0;
/* eslint-disable */
const minimal_js_1 = __importDefault(require("protobufjs/minimal.js"));
const goal_common_js_1 = require("./goal_common.js");
function createBaseGoalSetting() {
return {};
}
exports.GoalSetting = {
encode(_, writer = minimal_js_1.default.Writer.create()) {
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 = createBaseGoalSetting();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
}
if ((tag & 7) === 4 || tag === 0) {
break;
}
reader.skipType(tag & 7);
}
return message;
},
fromJSON(_) {
return {};
},
toJSON(_) {
const obj = {};
return obj;
},
create(base) {
return exports.GoalSetting.fromPartial(base !== null && base !== void 0 ? base : {});
},
fromPartial(_) {
const message = createBaseGoalSetting();
return message;
},
};
function createBaseGoalSetting_RetentionGoal() {
return { value_settings: undefined };
}
exports.GoalSetting_RetentionGoal = {
encode(message, writer = minimal_js_1.default.Writer.create()) {
if (message.value_settings !== undefined) {
goal_common_js_1.CustomerLifecycleOptimizationValueSettings.encode(message.value_settings, writer.uint32(10).fork()).ldelim();
}
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 = createBaseGoalSetting_RetentionGoal();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1:
if (tag !== 10) {
break;
}
message.value_settings = goal_common_js_1.CustomerLifecycleOptimizationValueSettings.decode(reader, reader.uint32());
continue;
}
if ((tag & 7) === 4 || tag === 0) {
break;
}
reader.skipType(tag & 7);
}
return message;
},
fromJSON(object) {
return {
value_settings: isSet(object.value_settings)
? goal_common_js_1.CustomerLifecycleOptimizationValueSettings.fromJSON(object.value_settings)
: undefined,
};
},
toJSON(message) {
const obj = {};
if (message.value_settings !== undefined) {
obj.value_settings = goal_common_js_1.CustomerLifecycleOptimizationValueSettings.toJSON(message.value_settings);
}
return obj;
},
create(base) {
return exports.GoalSetting_RetentionGoal.fromPartial(base !== null && base !== void 0 ? base : {});
},
fromPartial(object) {
const message = createBaseGoalSetting_RetentionGoal();
message.value_settings = (object.value_settings !== undefined && object.value_settings !== null)
? goal_common_js_1.CustomerLifecycleOptimizationValueSettings.fromPartial(object.value_settings)
: undefined;
return message;
},
};
function isSet(value) {
return value !== null && value !== undefined;
}