@htdangkhoa/google-ads
Version:
Google Ads API client for Node.js
155 lines (154 loc) • 7.89 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/v21/enums/attribution_model.proto
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.AttributionModelEnum = exports.AttributionModelEnum_AttributionModel = void 0;
exports.attributionModelEnum_AttributionModelFromJSON = attributionModelEnum_AttributionModelFromJSON;
exports.attributionModelEnum_AttributionModelToJSON = attributionModelEnum_AttributionModelToJSON;
/* eslint-disable */
const minimal_js_1 = __importDefault(require("protobufjs/minimal.js"));
/**
* The attribution model that describes how to distribute credit for a
* particular conversion across potentially many prior interactions.
*/
var AttributionModelEnum_AttributionModel;
(function (AttributionModelEnum_AttributionModel) {
/** UNSPECIFIED - Not specified. */
AttributionModelEnum_AttributionModel[AttributionModelEnum_AttributionModel["UNSPECIFIED"] = 0] = "UNSPECIFIED";
/** UNKNOWN - Used for return value only. Represents value unknown in this version. */
AttributionModelEnum_AttributionModel[AttributionModelEnum_AttributionModel["UNKNOWN"] = 1] = "UNKNOWN";
/** EXTERNAL - Uses external attribution. */
AttributionModelEnum_AttributionModel[AttributionModelEnum_AttributionModel["EXTERNAL"] = 100] = "EXTERNAL";
/** GOOGLE_ADS_LAST_CLICK - Attributes all credit for a conversion to its last click. */
AttributionModelEnum_AttributionModel[AttributionModelEnum_AttributionModel["GOOGLE_ADS_LAST_CLICK"] = 101] = "GOOGLE_ADS_LAST_CLICK";
/**
* GOOGLE_SEARCH_ATTRIBUTION_FIRST_CLICK - Attributes all credit for a conversion to its first click using Google
* Search attribution.
*/
AttributionModelEnum_AttributionModel[AttributionModelEnum_AttributionModel["GOOGLE_SEARCH_ATTRIBUTION_FIRST_CLICK"] = 102] = "GOOGLE_SEARCH_ATTRIBUTION_FIRST_CLICK";
/**
* GOOGLE_SEARCH_ATTRIBUTION_LINEAR - Attributes credit for a conversion equally across all of its clicks using
* Google Search attribution.
*/
AttributionModelEnum_AttributionModel[AttributionModelEnum_AttributionModel["GOOGLE_SEARCH_ATTRIBUTION_LINEAR"] = 103] = "GOOGLE_SEARCH_ATTRIBUTION_LINEAR";
/**
* GOOGLE_SEARCH_ATTRIBUTION_TIME_DECAY - Attributes exponentially more credit for a conversion to its more recent
* clicks using Google Search attribution (half-life is 1 week).
*/
AttributionModelEnum_AttributionModel[AttributionModelEnum_AttributionModel["GOOGLE_SEARCH_ATTRIBUTION_TIME_DECAY"] = 104] = "GOOGLE_SEARCH_ATTRIBUTION_TIME_DECAY";
/**
* GOOGLE_SEARCH_ATTRIBUTION_POSITION_BASED - Attributes 40% of the credit for a conversion to its first and last
* clicks. Remaining 20% is evenly distributed across all other clicks. This
* uses Google Search attribution.
*/
AttributionModelEnum_AttributionModel[AttributionModelEnum_AttributionModel["GOOGLE_SEARCH_ATTRIBUTION_POSITION_BASED"] = 105] = "GOOGLE_SEARCH_ATTRIBUTION_POSITION_BASED";
/**
* GOOGLE_SEARCH_ATTRIBUTION_DATA_DRIVEN - Flexible model that uses machine learning to determine the appropriate
* distribution of credit among clicks using Google Search attribution.
*/
AttributionModelEnum_AttributionModel[AttributionModelEnum_AttributionModel["GOOGLE_SEARCH_ATTRIBUTION_DATA_DRIVEN"] = 106] = "GOOGLE_SEARCH_ATTRIBUTION_DATA_DRIVEN";
AttributionModelEnum_AttributionModel[AttributionModelEnum_AttributionModel["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
})(AttributionModelEnum_AttributionModel || (exports.AttributionModelEnum_AttributionModel = AttributionModelEnum_AttributionModel = {}));
function attributionModelEnum_AttributionModelFromJSON(object) {
switch (object) {
case 0:
case "UNSPECIFIED":
return AttributionModelEnum_AttributionModel.UNSPECIFIED;
case 1:
case "UNKNOWN":
return AttributionModelEnum_AttributionModel.UNKNOWN;
case 100:
case "EXTERNAL":
return AttributionModelEnum_AttributionModel.EXTERNAL;
case 101:
case "GOOGLE_ADS_LAST_CLICK":
return AttributionModelEnum_AttributionModel.GOOGLE_ADS_LAST_CLICK;
case 102:
case "GOOGLE_SEARCH_ATTRIBUTION_FIRST_CLICK":
return AttributionModelEnum_AttributionModel.GOOGLE_SEARCH_ATTRIBUTION_FIRST_CLICK;
case 103:
case "GOOGLE_SEARCH_ATTRIBUTION_LINEAR":
return AttributionModelEnum_AttributionModel.GOOGLE_SEARCH_ATTRIBUTION_LINEAR;
case 104:
case "GOOGLE_SEARCH_ATTRIBUTION_TIME_DECAY":
return AttributionModelEnum_AttributionModel.GOOGLE_SEARCH_ATTRIBUTION_TIME_DECAY;
case 105:
case "GOOGLE_SEARCH_ATTRIBUTION_POSITION_BASED":
return AttributionModelEnum_AttributionModel.GOOGLE_SEARCH_ATTRIBUTION_POSITION_BASED;
case 106:
case "GOOGLE_SEARCH_ATTRIBUTION_DATA_DRIVEN":
return AttributionModelEnum_AttributionModel.GOOGLE_SEARCH_ATTRIBUTION_DATA_DRIVEN;
case -1:
case "UNRECOGNIZED":
default:
return AttributionModelEnum_AttributionModel.UNRECOGNIZED;
}
}
function attributionModelEnum_AttributionModelToJSON(object) {
switch (object) {
case AttributionModelEnum_AttributionModel.UNSPECIFIED:
return "UNSPECIFIED";
case AttributionModelEnum_AttributionModel.UNKNOWN:
return "UNKNOWN";
case AttributionModelEnum_AttributionModel.EXTERNAL:
return "EXTERNAL";
case AttributionModelEnum_AttributionModel.GOOGLE_ADS_LAST_CLICK:
return "GOOGLE_ADS_LAST_CLICK";
case AttributionModelEnum_AttributionModel.GOOGLE_SEARCH_ATTRIBUTION_FIRST_CLICK:
return "GOOGLE_SEARCH_ATTRIBUTION_FIRST_CLICK";
case AttributionModelEnum_AttributionModel.GOOGLE_SEARCH_ATTRIBUTION_LINEAR:
return "GOOGLE_SEARCH_ATTRIBUTION_LINEAR";
case AttributionModelEnum_AttributionModel.GOOGLE_SEARCH_ATTRIBUTION_TIME_DECAY:
return "GOOGLE_SEARCH_ATTRIBUTION_TIME_DECAY";
case AttributionModelEnum_AttributionModel.GOOGLE_SEARCH_ATTRIBUTION_POSITION_BASED:
return "GOOGLE_SEARCH_ATTRIBUTION_POSITION_BASED";
case AttributionModelEnum_AttributionModel.GOOGLE_SEARCH_ATTRIBUTION_DATA_DRIVEN:
return "GOOGLE_SEARCH_ATTRIBUTION_DATA_DRIVEN";
case AttributionModelEnum_AttributionModel.UNRECOGNIZED:
default:
return "UNRECOGNIZED";
}
}
function createBaseAttributionModelEnum() {
return {};
}
exports.AttributionModelEnum = {
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 = createBaseAttributionModelEnum();
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.AttributionModelEnum.fromPartial(base !== null && base !== void 0 ? base : {});
},
fromPartial(_) {
const message = createBaseAttributionModelEnum();
return message;
},
};