@htdangkhoa/google-ads
Version:
Google Ads API client for Node.js
1,196 lines • 111 kB
JavaScript
"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/v19/common/segments.proto
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.SkAdNetworkSourceApp = exports.AssetInteractionTarget = exports.BudgetCampaignAssociationStatus = exports.Keyword = exports.Segments = void 0;
/* eslint-disable */
const long_1 = __importDefault(require("long"));
const minimal_js_1 = __importDefault(require("protobufjs/minimal.js"));
const ad_destination_type_js_1 = require("../enums/ad_destination_type.js");
const ad_format_type_js_1 = require("../enums/ad_format_type.js");
const ad_network_type_js_1 = require("../enums/ad_network_type.js");
const budget_campaign_association_status_js_1 = require("../enums/budget_campaign_association_status.js");
const click_type_js_1 = require("../enums/click_type.js");
const conversion_action_category_js_1 = require("../enums/conversion_action_category.js");
const conversion_attribution_event_type_js_1 = require("../enums/conversion_attribution_event_type.js");
const conversion_lag_bucket_js_1 = require("../enums/conversion_lag_bucket.js");
const conversion_or_adjustment_lag_bucket_js_1 = require("../enums/conversion_or_adjustment_lag_bucket.js");
const conversion_value_rule_primary_dimension_js_1 = require("../enums/conversion_value_rule_primary_dimension.js");
const converting_user_prior_engagement_type_and_ltv_bucket_js_1 = require("../enums/converting_user_prior_engagement_type_and_ltv_bucket.js");
const day_of_week_js_1 = require("../enums/day_of_week.js");
const device_js_1 = require("../enums/device.js");
const external_conversion_source_js_1 = require("../enums/external_conversion_source.js");
const hotel_date_selection_type_js_1 = require("../enums/hotel_date_selection_type.js");
const hotel_price_bucket_js_1 = require("../enums/hotel_price_bucket.js");
const hotel_rate_type_js_1 = require("../enums/hotel_rate_type.js");
const month_of_year_js_1 = require("../enums/month_of_year.js");
const product_channel_js_1 = require("../enums/product_channel.js");
const product_channel_exclusivity_js_1 = require("../enums/product_channel_exclusivity.js");
const product_condition_js_1 = require("../enums/product_condition.js");
const recommendation_type_js_1 = require("../enums/recommendation_type.js");
const search_engine_results_page_type_js_1 = require("../enums/search_engine_results_page_type.js");
const search_term_match_type_js_1 = require("../enums/search_term_match_type.js");
const sk_ad_network_ad_event_type_js_1 = require("../enums/sk_ad_network_ad_event_type.js");
const sk_ad_network_attribution_credit_js_1 = require("../enums/sk_ad_network_attribution_credit.js");
const sk_ad_network_coarse_conversion_value_js_1 = require("../enums/sk_ad_network_coarse_conversion_value.js");
const sk_ad_network_source_type_js_1 = require("../enums/sk_ad_network_source_type.js");
const sk_ad_network_user_type_js_1 = require("../enums/sk_ad_network_user_type.js");
const slot_js_1 = require("../enums/slot.js");
const criteria_js_1 = require("./criteria.js");
function createBaseSegments() {
return {
activity_account_id: undefined,
activity_city: undefined,
activity_country: undefined,
activity_rating: undefined,
activity_state: undefined,
external_activity_id: undefined,
ad_destination_type: 0,
ad_format_type: 0,
ad_network_type: 0,
ad_group: undefined,
asset_group: undefined,
auction_insight_domain: undefined,
budget_campaign_association_status: undefined,
campaign: undefined,
click_type: 0,
conversion_action: undefined,
conversion_action_category: 0,
conversion_action_name: undefined,
conversion_adjustment: undefined,
conversion_attribution_event_type: 0,
conversion_lag_bucket: 0,
conversion_or_adjustment_lag_bucket: 0,
date: undefined,
day_of_week: 0,
device: 0,
external_conversion_source: 0,
geo_target_airport: undefined,
geo_target_canton: undefined,
geo_target_city: undefined,
geo_target_country: undefined,
geo_target_county: undefined,
geo_target_district: undefined,
geo_target_metro: undefined,
geo_target_most_specific_location: undefined,
geo_target_postal_code: undefined,
geo_target_province: undefined,
geo_target_region: undefined,
geo_target_state: undefined,
hotel_booking_window_days: undefined,
hotel_center_id: undefined,
hotel_check_in_date: undefined,
hotel_check_in_day_of_week: 0,
hotel_city: undefined,
hotel_class: undefined,
hotel_country: undefined,
hotel_date_selection_type: 0,
hotel_length_of_stay: undefined,
hotel_rate_rule_id: undefined,
hotel_rate_type: 0,
hotel_price_bucket: 0,
hotel_state: undefined,
hour: undefined,
interaction_on_this_extension: undefined,
keyword: undefined,
month: undefined,
month_of_year: 0,
partner_hotel_id: undefined,
product_aggregator_id: undefined,
product_category_level1: undefined,
product_category_level2: undefined,
product_category_level3: undefined,
product_category_level4: undefined,
product_category_level5: undefined,
product_brand: undefined,
product_channel: 0,
product_channel_exclusivity: 0,
product_condition: 0,
product_country: undefined,
product_custom_attribute0: undefined,
product_custom_attribute1: undefined,
product_custom_attribute2: undefined,
product_custom_attribute3: undefined,
product_custom_attribute4: undefined,
product_feed_label: undefined,
product_item_id: undefined,
product_language: undefined,
product_merchant_id: undefined,
product_store_id: undefined,
product_title: undefined,
product_type_l1: undefined,
product_type_l2: undefined,
product_type_l3: undefined,
product_type_l4: undefined,
product_type_l5: undefined,
quarter: undefined,
travel_destination_city: undefined,
travel_destination_country: undefined,
travel_destination_region: undefined,
recommendation_type: 0,
search_engine_results_page_type: 0,
search_subcategory: undefined,
search_term: undefined,
search_term_match_type: 0,
slot: 0,
conversion_value_rule_primary_dimension: 0,
webpage: undefined,
week: undefined,
year: undefined,
sk_ad_network_fine_conversion_value: undefined,
sk_ad_network_redistributed_fine_conversion_value: undefined,
sk_ad_network_user_type: 0,
sk_ad_network_ad_event_type: 0,
sk_ad_network_source_app: undefined,
sk_ad_network_attribution_credit: 0,
sk_ad_network_coarse_conversion_value: 0,
sk_ad_network_source_domain: undefined,
sk_ad_network_source_type: 0,
sk_ad_network_postback_sequence_index: undefined,
sk_ad_network_version: undefined,
asset_interaction_target: undefined,
new_versus_returning_customers: 0,
};
}
exports.Segments = {
encode(message, writer = minimal_js_1.default.Writer.create()) {
if (message.activity_account_id !== undefined) {
writer.uint32(1184).int64(message.activity_account_id);
}
if (message.activity_city !== undefined) {
writer.uint32(1482).string(message.activity_city);
}
if (message.activity_country !== undefined) {
writer.uint32(1490).string(message.activity_country);
}
if (message.activity_rating !== undefined) {
writer.uint32(1192).int64(message.activity_rating);
}
if (message.activity_state !== undefined) {
writer.uint32(1498).string(message.activity_state);
}
if (message.external_activity_id !== undefined) {
writer.uint32(1202).string(message.external_activity_id);
}
if (message.ad_destination_type !== undefined && message.ad_destination_type !== 0) {
writer.uint32(1088).int32(message.ad_destination_type);
}
if (message.ad_format_type !== undefined && message.ad_format_type !== 0) {
writer.uint32(1528).int32(message.ad_format_type);
}
if (message.ad_network_type !== undefined && message.ad_network_type !== 0) {
writer.uint32(24).int32(message.ad_network_type);
}
if (message.ad_group !== undefined) {
writer.uint32(1266).string(message.ad_group);
}
if (message.asset_group !== undefined) {
writer.uint32(1274).string(message.asset_group);
}
if (message.auction_insight_domain !== undefined) {
writer.uint32(1162).string(message.auction_insight_domain);
}
if (message.budget_campaign_association_status !== undefined) {
exports.BudgetCampaignAssociationStatus.encode(message.budget_campaign_association_status, writer.uint32(1074).fork())
.ldelim();
}
if (message.campaign !== undefined) {
writer.uint32(1258).string(message.campaign);
}
if (message.click_type !== undefined && message.click_type !== 0) {
writer.uint32(208).int32(message.click_type);
}
if (message.conversion_action !== undefined) {
writer.uint32(906).string(message.conversion_action);
}
if (message.conversion_action_category !== undefined && message.conversion_action_category !== 0) {
writer.uint32(424).int32(message.conversion_action_category);
}
if (message.conversion_action_name !== undefined) {
writer.uint32(914).string(message.conversion_action_name);
}
if (message.conversion_adjustment !== undefined) {
writer.uint32(920).bool(message.conversion_adjustment);
}
if (message.conversion_attribution_event_type !== undefined && message.conversion_attribution_event_type !== 0) {
writer.uint32(16).int32(message.conversion_attribution_event_type);
}
if (message.conversion_lag_bucket !== undefined && message.conversion_lag_bucket !== 0) {
writer.uint32(400).int32(message.conversion_lag_bucket);
}
if (message.conversion_or_adjustment_lag_bucket !== undefined && message.conversion_or_adjustment_lag_bucket !== 0) {
writer.uint32(408).int32(message.conversion_or_adjustment_lag_bucket);
}
if (message.date !== undefined) {
writer.uint32(634).string(message.date);
}
if (message.day_of_week !== undefined && message.day_of_week !== 0) {
writer.uint32(40).int32(message.day_of_week);
}
if (message.device !== undefined && message.device !== 0) {
writer.uint32(8).int32(message.device);
}
if (message.external_conversion_source !== undefined && message.external_conversion_source !== 0) {
writer.uint32(440).int32(message.external_conversion_source);
}
if (message.geo_target_airport !== undefined) {
writer.uint32(930).string(message.geo_target_airport);
}
if (message.geo_target_canton !== undefined) {
writer.uint32(938).string(message.geo_target_canton);
}
if (message.geo_target_city !== undefined) {
writer.uint32(946).string(message.geo_target_city);
}
if (message.geo_target_country !== undefined) {
writer.uint32(954).string(message.geo_target_country);
}
if (message.geo_target_county !== undefined) {
writer.uint32(962).string(message.geo_target_county);
}
if (message.geo_target_district !== undefined) {
writer.uint32(970).string(message.geo_target_district);
}
if (message.geo_target_metro !== undefined) {
writer.uint32(978).string(message.geo_target_metro);
}
if (message.geo_target_most_specific_location !== undefined) {
writer.uint32(986).string(message.geo_target_most_specific_location);
}
if (message.geo_target_postal_code !== undefined) {
writer.uint32(994).string(message.geo_target_postal_code);
}
if (message.geo_target_province !== undefined) {
writer.uint32(1002).string(message.geo_target_province);
}
if (message.geo_target_region !== undefined) {
writer.uint32(1010).string(message.geo_target_region);
}
if (message.geo_target_state !== undefined) {
writer.uint32(1018).string(message.geo_target_state);
}
if (message.hotel_booking_window_days !== undefined) {
writer.uint32(1080).int64(message.hotel_booking_window_days);
}
if (message.hotel_center_id !== undefined) {
writer.uint32(640).int64(message.hotel_center_id);
}
if (message.hotel_check_in_date !== undefined) {
writer.uint32(650).string(message.hotel_check_in_date);
}
if (message.hotel_check_in_day_of_week !== undefined && message.hotel_check_in_day_of_week !== 0) {
writer.uint32(72).int32(message.hotel_check_in_day_of_week);
}
if (message.hotel_city !== undefined) {
writer.uint32(658).string(message.hotel_city);
}
if (message.hotel_class !== undefined) {
writer.uint32(664).int32(message.hotel_class);
}
if (message.hotel_country !== undefined) {
writer.uint32(674).string(message.hotel_country);
}
if (message.hotel_date_selection_type !== undefined && message.hotel_date_selection_type !== 0) {
writer.uint32(104).int32(message.hotel_date_selection_type);
}
if (message.hotel_length_of_stay !== undefined) {
writer.uint32(680).int32(message.hotel_length_of_stay);
}
if (message.hotel_rate_rule_id !== undefined) {
writer.uint32(690).string(message.hotel_rate_rule_id);
}
if (message.hotel_rate_type !== undefined && message.hotel_rate_type !== 0) {
writer.uint32(592).int32(message.hotel_rate_type);
}
if (message.hotel_price_bucket !== undefined && message.hotel_price_bucket !== 0) {
writer.uint32(624).int32(message.hotel_price_bucket);
}
if (message.hotel_state !== undefined) {
writer.uint32(698).string(message.hotel_state);
}
if (message.hour !== undefined) {
writer.uint32(704).int32(message.hour);
}
if (message.interaction_on_this_extension !== undefined) {
writer.uint32(712).bool(message.interaction_on_this_extension);
}
if (message.keyword !== undefined) {
exports.Keyword.encode(message.keyword, writer.uint32(490).fork()).ldelim();
}
if (message.month !== undefined) {
writer.uint32(722).string(message.month);
}
if (message.month_of_year !== undefined && message.month_of_year !== 0) {
writer.uint32(144).int32(message.month_of_year);
}
if (message.partner_hotel_id !== undefined) {
writer.uint32(730).string(message.partner_hotel_id);
}
if (message.product_aggregator_id !== undefined) {
writer.uint32(1056).int64(message.product_aggregator_id);
}
if (message.product_category_level1 !== undefined) {
writer.uint32(1290).string(message.product_category_level1);
}
if (message.product_category_level2 !== undefined) {
writer.uint32(1298).string(message.product_category_level2);
}
if (message.product_category_level3 !== undefined) {
writer.uint32(1306).string(message.product_category_level3);
}
if (message.product_category_level4 !== undefined) {
writer.uint32(1314).string(message.product_category_level4);
}
if (message.product_category_level5 !== undefined) {
writer.uint32(1322).string(message.product_category_level5);
}
if (message.product_brand !== undefined) {
writer.uint32(778).string(message.product_brand);
}
if (message.product_channel !== undefined && message.product_channel !== 0) {
writer.uint32(240).int32(message.product_channel);
}
if (message.product_channel_exclusivity !== undefined && message.product_channel_exclusivity !== 0) {
writer.uint32(248).int32(message.product_channel_exclusivity);
}
if (message.product_condition !== undefined && message.product_condition !== 0) {
writer.uint32(256).int32(message.product_condition);
}
if (message.product_country !== undefined) {
writer.uint32(786).string(message.product_country);
}
if (message.product_custom_attribute0 !== undefined) {
writer.uint32(794).string(message.product_custom_attribute0);
}
if (message.product_custom_attribute1 !== undefined) {
writer.uint32(802).string(message.product_custom_attribute1);
}
if (message.product_custom_attribute2 !== undefined) {
writer.uint32(810).string(message.product_custom_attribute2);
}
if (message.product_custom_attribute3 !== undefined) {
writer.uint32(818).string(message.product_custom_attribute3);
}
if (message.product_custom_attribute4 !== undefined) {
writer.uint32(826).string(message.product_custom_attribute4);
}
if (message.product_feed_label !== undefined) {
writer.uint32(1178).string(message.product_feed_label);
}
if (message.product_item_id !== undefined) {
writer.uint32(834).string(message.product_item_id);
}
if (message.product_language !== undefined) {
writer.uint32(842).string(message.product_language);
}
if (message.product_merchant_id !== undefined) {
writer.uint32(1064).int64(message.product_merchant_id);
}
if (message.product_store_id !== undefined) {
writer.uint32(850).string(message.product_store_id);
}
if (message.product_title !== undefined) {
writer.uint32(858).string(message.product_title);
}
if (message.product_type_l1 !== undefined) {
writer.uint32(866).string(message.product_type_l1);
}
if (message.product_type_l2 !== undefined) {
writer.uint32(874).string(message.product_type_l2);
}
if (message.product_type_l3 !== undefined) {
writer.uint32(882).string(message.product_type_l3);
}
if (message.product_type_l4 !== undefined) {
writer.uint32(890).string(message.product_type_l4);
}
if (message.product_type_l5 !== undefined) {
writer.uint32(898).string(message.product_type_l5);
}
if (message.quarter !== undefined) {
writer.uint32(1026).string(message.quarter);
}
if (message.travel_destination_city !== undefined) {
writer.uint32(1546).string(message.travel_destination_city);
}
if (message.travel_destination_country !== undefined) {
writer.uint32(1554).string(message.travel_destination_country);
}
if (message.travel_destination_region !== undefined) {
writer.uint32(1562).string(message.travel_destination_region);
}
if (message.recommendation_type !== undefined && message.recommendation_type !== 0) {
writer.uint32(1120).int32(message.recommendation_type);
}
if (message.search_engine_results_page_type !== undefined && message.search_engine_results_page_type !== 0) {
writer.uint32(560).int32(message.search_engine_results_page_type);
}
if (message.search_subcategory !== undefined) {
writer.uint32(1242).string(message.search_subcategory);
}
if (message.search_term !== undefined) {
writer.uint32(1250).string(message.search_term);
}
if (message.search_term_match_type !== undefined && message.search_term_match_type !== 0) {
writer.uint32(176).int32(message.search_term_match_type);
}
if (message.slot !== undefined && message.slot !== 0) {
writer.uint32(184).int32(message.slot);
}
if (message.conversion_value_rule_primary_dimension !== undefined &&
message.conversion_value_rule_primary_dimension !== 0) {
writer.uint32(1104).int32(message.conversion_value_rule_primary_dimension);
}
if (message.webpage !== undefined) {
writer.uint32(1034).string(message.webpage);
}
if (message.week !== undefined) {
writer.uint32(1042).string(message.week);
}
if (message.year !== undefined) {
writer.uint32(1048).int32(message.year);
}
if (message.sk_ad_network_fine_conversion_value !== undefined) {
writer.uint32(1096).int64(message.sk_ad_network_fine_conversion_value);
}
if (message.sk_ad_network_redistributed_fine_conversion_value !== undefined) {
writer.uint32(1520).int64(message.sk_ad_network_redistributed_fine_conversion_value);
}
if (message.sk_ad_network_user_type !== undefined && message.sk_ad_network_user_type !== 0) {
writer.uint32(1128).int32(message.sk_ad_network_user_type);
}
if (message.sk_ad_network_ad_event_type !== undefined && message.sk_ad_network_ad_event_type !== 0) {
writer.uint32(1136).int32(message.sk_ad_network_ad_event_type);
}
if (message.sk_ad_network_source_app !== undefined) {
exports.SkAdNetworkSourceApp.encode(message.sk_ad_network_source_app, writer.uint32(1146).fork()).ldelim();
}
if (message.sk_ad_network_attribution_credit !== undefined && message.sk_ad_network_attribution_credit !== 0) {
writer.uint32(1152).int32(message.sk_ad_network_attribution_credit);
}
if (message.sk_ad_network_coarse_conversion_value !== undefined && message.sk_ad_network_coarse_conversion_value !== 0) {
writer.uint32(1208).int32(message.sk_ad_network_coarse_conversion_value);
}
if (message.sk_ad_network_source_domain !== undefined) {
writer.uint32(1218).string(message.sk_ad_network_source_domain);
}
if (message.sk_ad_network_source_type !== undefined && message.sk_ad_network_source_type !== 0) {
writer.uint32(1224).int32(message.sk_ad_network_source_type);
}
if (message.sk_ad_network_postback_sequence_index !== undefined) {
writer.uint32(1232).int64(message.sk_ad_network_postback_sequence_index);
}
if (message.sk_ad_network_version !== undefined) {
writer.uint32(1538).string(message.sk_ad_network_version);
}
if (message.asset_interaction_target !== undefined) {
exports.AssetInteractionTarget.encode(message.asset_interaction_target, writer.uint32(1114).fork()).ldelim();
}
if (message.new_versus_returning_customers !== undefined && message.new_versus_returning_customers !== 0) {
writer.uint32(1280).int32(message.new_versus_returning_customers);
}
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 = createBaseSegments();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 148:
if (tag !== 1184) {
break;
}
message.activity_account_id = longToString(reader.int64());
continue;
case 185:
if (tag !== 1482) {
break;
}
message.activity_city = reader.string();
continue;
case 186:
if (tag !== 1490) {
break;
}
message.activity_country = reader.string();
continue;
case 149:
if (tag !== 1192) {
break;
}
message.activity_rating = longToString(reader.int64());
continue;
case 187:
if (tag !== 1498) {
break;
}
message.activity_state = reader.string();
continue;
case 150:
if (tag !== 1202) {
break;
}
message.external_activity_id = reader.string();
continue;
case 136:
if (tag !== 1088) {
break;
}
message.ad_destination_type = reader.int32();
continue;
case 191:
if (tag !== 1528) {
break;
}
message.ad_format_type = reader.int32();
continue;
case 3:
if (tag !== 24) {
break;
}
message.ad_network_type = reader.int32();
continue;
case 158:
if (tag !== 1266) {
break;
}
message.ad_group = reader.string();
continue;
case 159:
if (tag !== 1274) {
break;
}
message.asset_group = reader.string();
continue;
case 145:
if (tag !== 1162) {
break;
}
message.auction_insight_domain = reader.string();
continue;
case 134:
if (tag !== 1074) {
break;
}
message.budget_campaign_association_status = exports.BudgetCampaignAssociationStatus.decode(reader, reader.uint32());
continue;
case 157:
if (tag !== 1258) {
break;
}
message.campaign = reader.string();
continue;
case 26:
if (tag !== 208) {
break;
}
message.click_type = reader.int32();
continue;
case 113:
if (tag !== 906) {
break;
}
message.conversion_action = reader.string();
continue;
case 53:
if (tag !== 424) {
break;
}
message.conversion_action_category = reader.int32();
continue;
case 114:
if (tag !== 914) {
break;
}
message.conversion_action_name = reader.string();
continue;
case 115:
if (tag !== 920) {
break;
}
message.conversion_adjustment = reader.bool();
continue;
case 2:
if (tag !== 16) {
break;
}
message.conversion_attribution_event_type = reader.int32();
continue;
case 50:
if (tag !== 400) {
break;
}
message.conversion_lag_bucket = reader.int32();
continue;
case 51:
if (tag !== 408) {
break;
}
message.conversion_or_adjustment_lag_bucket = reader.int32();
continue;
case 79:
if (tag !== 634) {
break;
}
message.date = reader.string();
continue;
case 5:
if (tag !== 40) {
break;
}
message.day_of_week = reader.int32();
continue;
case 1:
if (tag !== 8) {
break;
}
message.device = reader.int32();
continue;
case 55:
if (tag !== 440) {
break;
}
message.external_conversion_source = reader.int32();
continue;
case 116:
if (tag !== 930) {
break;
}
message.geo_target_airport = reader.string();
continue;
case 117:
if (tag !== 938) {
break;
}
message.geo_target_canton = reader.string();
continue;
case 118:
if (tag !== 946) {
break;
}
message.geo_target_city = reader.string();
continue;
case 119:
if (tag !== 954) {
break;
}
message.geo_target_country = reader.string();
continue;
case 120:
if (tag !== 962) {
break;
}
message.geo_target_county = reader.string();
continue;
case 121:
if (tag !== 970) {
break;
}
message.geo_target_district = reader.string();
continue;
case 122:
if (tag !== 978) {
break;
}
message.geo_target_metro = reader.string();
continue;
case 123:
if (tag !== 986) {
break;
}
message.geo_target_most_specific_location = reader.string();
continue;
case 124:
if (tag !== 994) {
break;
}
message.geo_target_postal_code = reader.string();
continue;
case 125:
if (tag !== 1002) {
break;
}
message.geo_target_province = reader.string();
continue;
case 126:
if (tag !== 1010) {
break;
}
message.geo_target_region = reader.string();
continue;
case 127:
if (tag !== 1018) {
break;
}
message.geo_target_state = reader.string();
continue;
case 135:
if (tag !== 1080) {
break;
}
message.hotel_booking_window_days = longToString(reader.int64());
continue;
case 80:
if (tag !== 640) {
break;
}
message.hotel_center_id = longToString(reader.int64());
continue;
case 81:
if (tag !== 650) {
break;
}
message.hotel_check_in_date = reader.string();
continue;
case 9:
if (tag !== 72) {
break;
}
message.hotel_check_in_day_of_week = reader.int32();
continue;
case 82:
if (tag !== 658) {
break;
}
message.hotel_city = reader.string();
continue;
case 83:
if (tag !== 664) {
break;
}
message.hotel_class = reader.int32();
continue;
case 84:
if (tag !== 674) {
break;
}
message.hotel_country = reader.string();
continue;
case 13:
if (tag !== 104) {
break;
}
message.hotel_date_selection_type = reader.int32();
continue;
case 85:
if (tag !== 680) {
break;
}
message.hotel_length_of_stay = reader.int32();
continue;
case 86:
if (tag !== 690) {
break;
}
message.hotel_rate_rule_id = reader.string();
continue;
case 74:
if (tag !== 592) {
break;
}
message.hotel_rate_type = reader.int32();
continue;
case 78:
if (tag !== 624) {
break;
}
message.hotel_price_bucket = reader.int32();
continue;
case 87:
if (tag !== 698) {
break;
}
message.hotel_state = reader.string();
continue;
case 88:
if (tag !== 704) {
break;
}
message.hour = reader.int32();
continue;
case 89:
if (tag !== 712) {
break;
}
message.interaction_on_this_extension = reader.bool();
continue;
case 61:
if (tag !== 490) {
break;
}
message.keyword = exports.Keyword.decode(reader, reader.uint32());
continue;
case 90:
if (tag !== 722) {
break;
}
message.month = reader.string();
continue;
case 18:
if (tag !== 144) {
break;
}
message.month_of_year = reader.int32();
continue;
case 91:
if (tag !== 730) {
break;
}
message.partner_hotel_id = reader.string();
continue;
case 132:
if (tag !== 1056) {
break;
}
message.product_aggregator_id = longToString(reader.int64());
continue;
case 161:
if (tag !== 1290) {
break;
}
message.product_category_level1 = reader.string();
continue;
case 162:
if (tag !== 1298) {
break;
}
message.product_category_level2 = reader.string();
continue;
case 163:
if (tag !== 1306) {
break;
}
message.product_category_level3 = reader.string();
continue;
case 164:
if (tag !== 1314) {
break;
}
message.product_category_level4 = reader.string();
continue;
case 165:
if (tag !== 1322) {
break;
}
message.product_category_level5 = reader.string();
continue;
case 97:
if (tag !== 778) {
break;
}
message.product_brand = reader.string();
continue;
case 30:
if (tag !== 240) {
break;
}
message.product_channel = reader.int32();
continue;
case 31:
if (tag !== 248) {
break;
}
message.product_channel_exclusivity = reader.int32();
continue;
case 32:
if (tag !== 256) {
break;
}
message.product_condition = reader.int32();
continue;
case 98:
if (tag !== 786) {
break;
}
message.product_country = reader.string();
continue;
case 99:
if (tag !== 794) {
break;
}
message.product_custom_attribute0 = reader.string();
continue;
case 100:
if (tag !== 802) {
break;
}
message.product_custom_attribute1 = reader.string();
continue;
case 101:
if (tag !== 810) {
break;
}
message.product_custom_attribute2 = reader.string();
continue;
case 102:
if (tag !== 818) {
break;
}
message.product_custom_attribute3 = reader.string();
continue;
case 103:
if (tag !== 826) {
break;
}
message.product_custom_attribute4 = reader.string();
continue;
case 147:
if (tag !== 1178) {
break;
}
message.product_feed_label = reader.string();
continue;
case 104:
if (tag !== 834) {
break;
}
message.product_item_id = reader.string();
continue;
case 105:
if (tag !== 842) {
break;
}
message.product_language = reader.string();
continue;
case 133:
if (tag !== 1064) {
break;
}
message.product_merchant_id = longToString(reader.int64());
continue;
case 106:
if (tag !== 850) {
break;
}
message.product_store_id = reader.string();
continue;
case 107:
if (tag !== 858) {
break;
}
message.product_title = reader.string();
continue;
case 108:
if (tag !== 866) {
break;
}
message.product_type_l1 = reader.string();
continue;
case 109:
if (tag !== 874) {
break;
}
message.product_type_l2 = reader.string();
continue;
case 110:
if (tag !== 882) {
break;
}
message.product_type_l3 = reader.string();
continue;
case 111:
if (tag !== 890) {
break;
}
message.product_type_l4 = reader.string();
continue;
case 112:
if (tag !== 898) {
break;
}
message.product_type_l5 = reader.string();
continue;
case 128:
if (tag !== 1026) {
break;
}
message.quarter = reader.string();
continue;
case 193:
if (tag !== 1546) {
break;
}
message.travel_destination_city = reader.string();
continue;
case 194:
if (tag !== 1554) {
break;
}
message.travel_destination_country = reader.string();
continue;
case 195:
if (tag !== 1562) {
break;
}
message.travel_destination_region = reader.string();
continue;
case 140:
if (tag !== 1120) {
break;
}
message.recommendation_type = reader.int32();
continue;
case 70:
if (tag !== 560) {
break;
}
message.search_engine_results_page_type = reader.int32();
continue;
case 155:
if (tag !== 1242) {
break;
}
message.search_subcategory = reader.string();
continue;
case 156:
if (tag !== 1250) {
break;
}
message.search_term = reader.string();
continue;
case 22:
if (tag !== 176) {
break;
}
message.search_term_match_type = reader.int32();
continue;
case 23:
if (tag !== 184) {
break;
}
message.slot = reader.int32();
continue;
case 138:
if (tag !== 1104) {
break;
}
message.conversion_value_rule_primary_dimension = reader.int32();
continue;
case 129:
if (tag !== 1034) {
break;
}
message.webpage = reader.string();
continue;
case 130:
if (tag !== 1042) {
break;
}
message.week = reader.string();
continue;
case 131:
if (tag !== 1048) {
break;
}
message.year = reader.int32();
continue;
case 137:
if (tag !== 1096) {
break;
}
message.sk_ad_network_fine_conversion_value = longToString(reader.int64());
continue;
case 190:
if (tag !== 1520) {
break;
}
message.sk_ad_network_redistributed_fine_conversion_value = longToString(reader.int64());
continue;
case 141:
if (tag !== 1128) {
break;
}
message.sk_ad_network_user_type = reader.int32();
continue;
case 142:
if (tag !== 1136) {
break;
}
message.sk_ad_network_ad_event_type = reader.int32();
continue;
case 143:
if (tag !== 1146) {
break;
}
message.sk_ad_network_source_app = exports.SkAdNetworkSourceApp.decode(reader, reader.uint32());
continue;
case 144:
if (tag !== 1152) {
break;
}
message.sk_ad_network_attribution_credit = reader.int32();
continue;
case 151:
if (tag !== 1208) {
break;
}
message.sk_ad_network_coarse_conversion_value = reader.int32();
continue;
case 152:
if (tag !== 1218) {
break;
}
message.sk_ad_network_source_domain = reader.string();
continue;
case 153:
if (tag !== 1224) {
break;
}
message.sk_ad_network_source_type = reader.int32();
continue;
case 154:
if (tag !== 1232) {
break;
}
message.sk_ad_network_postback_sequence_index = longToString(reader.int64());
continue;
case 192:
if (tag !== 1538) {
break;
}
message.sk_ad_network_version = reader.string();
continue;
case 139:
if (tag !== 1114) {
break;
}
message.asset_interaction_target = exports.AssetInteractionTarget.decode(reader, reader.uint32());
continue;
case 160:
if (tag !== 1280) {
break;
}
message.new_versus_returning_customers = reader.int32();
continue;
}
if ((tag & 7) === 4 || tag === 0) {
break;
}
reader.skipType(tag & 7);
}
return message;
},
fromJSON(object) {
return {
activity_account_id: isSet(object.activity_account_id)
? globalThis.String(object.activity_account_id)
: undefined,
activity_city: isSet(object.activity_city) ? globalThis.String(object.activity_city) : undefined,
activity_country: isSet(object.activity_country) ? globalThis.String(object.activity_country) : undefined,
activity_rating: isSet(object.activity_rating) ? globalThis.String(object.activity_rating) : undefined,
activity_state: isSet(object.activity_state) ? globalThis.String(object.activity_state) : undefined,
external_activity_id: isSet(object.external_activity_id)
? globalThis.String(object.external_activity_id)
: undefined,
ad_destination_type: isSet(object.ad_destination_type)
? (0, ad_destination_type_js_1.adDestinationTypeEnum_AdDestinationTypeFromJSON)(object.ad_destination_type)
: 0,
ad_format_type: isSet(object.ad_format_type) ? (0, ad_format_type_js_1.adFormatType