@htdangkhoa/google-ads
Version:
Google Ads API client for Node.js
1,145 lines (1,144 loc) • 148 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/v24/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 ad_sub_network_type_js_1 = require("../enums/ad_sub_network_type.js");
const age_range_type_js_1 = require("../enums/age_range_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 gender_type_js_1 = require("../enums/gender_type.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 landing_page_source_js_1 = require("../enums/landing_page_source.js");
const match_type_js_1 = require("../enums/match_type.js");
const mobile_device_platform_js_1 = require("../enums/mobile_device_platform.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_source_js_1 = require("../enums/search_term_match_source.js");
const search_term_match_type_js_1 = require("../enums/search_term_match_type.js");
const search_term_targeting_status_js_1 = require("../enums/search_term_targeting_status.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 vertical_ads_item_vertical_type_js_1 = require("../enums/vertical_ads_item_vertical_type.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,
ad_sub_network_type: 0,
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,
mobile_device_platform: 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,
landing_page_source: 0,
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_sold_category_level1: undefined,
product_sold_category_level2: undefined,
product_sold_category_level3: undefined,
product_sold_category_level4: undefined,
product_sold_category_level5: undefined,
product_sold_brand: undefined,
product_sold_condition: 0,
product_sold_custom_attribute0: undefined,
product_sold_custom_attribute1: undefined,
product_sold_custom_attribute2: undefined,
product_sold_custom_attribute3: undefined,
product_sold_custom_attribute4: undefined,
product_sold_item_id: undefined,
product_sold_title: undefined,
product_sold_type_l1: undefined,
product_sold_type_l2: undefined,
product_sold_type_l3: undefined,
product_sold_type_l4: undefined,
product_sold_type_l5: 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,
vertical_ads_event_participant_display_names: undefined,
vertical_ads_hotel_class: undefined,
vertical_ads_listing: undefined,
vertical_ads_listing_brand: undefined,
vertical_ads_listing_city: undefined,
vertical_ads_listing_country: undefined,
vertical_ads_listing_region: undefined,
vertical_ads_listing_user_rating: undefined,
vertical_ads_listing_venue: undefined,
vertical_ads_partner_account: undefined,
vertical_ads_vertical: undefined,
recommendation_type: 0,
search_engine_results_page_type: 0,
search_subcategory: undefined,
search_term: undefined,
search_term_match_type: 0,
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,
adjusted_age_range: 0,
adjusted_gender: 0,
search_term_match_source: 0,
search_term_targeting_status: 0,
ad_using_product_data: undefined,
ad_using_video: undefined,
};
}
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.ad_sub_network_type !== undefined && message.ad_sub_network_type !== 0) {
writer.uint32(1632).int32(message.ad_sub_network_type);
}
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.mobile_device_platform !== undefined && message.mobile_device_platform !== 0) {
writer.uint32(1752).int32(message.mobile_device_platform);
}
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.landing_page_source !== undefined && message.landing_page_source !== 0) {
writer.uint32(1600).int32(message.landing_page_source);
}
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_sold_category_level1 !== undefined) {
writer.uint32(1714).string(message.product_sold_category_level1);
}
if (message.product_sold_category_level2 !== undefined) {
writer.uint32(1722).string(message.product_sold_category_level2);
}
if (message.product_sold_category_level3 !== undefined) {
writer.uint32(1730).string(message.product_sold_category_level3);
}
if (message.product_sold_category_level4 !== undefined) {
writer.uint32(1738).string(message.product_sold_category_level4);
}
if (message.product_sold_category_level5 !== undefined) {
writer.uint32(1746).string(message.product_sold_category_level5);
}
if (message.product_sold_brand !== undefined) {
writer.uint32(1370).string(message.product_sold_brand);
}
if (message.product_sold_condition !== undefined && message.product_sold_condition !== 0) {
writer.uint32(1376).int32(message.product_sold_condition);
}
if (message.product_sold_custom_attribute0 !== undefined) {
writer.uint32(1386).string(message.product_sold_custom_attribute0);
}
if (message.product_sold_custom_attribute1 !== undefined) {
writer.uint32(1394).string(message.product_sold_custom_attribute1);
}
if (message.product_sold_custom_attribute2 !== undefined) {
writer.uint32(1402).string(message.product_sold_custom_attribute2);
}
if (message.product_sold_custom_attribute3 !== undefined) {
writer.uint32(1410).string(message.product_sold_custom_attribute3);
}
if (message.product_sold_custom_attribute4 !== undefined) {
writer.uint32(1418).string(message.product_sold_custom_attribute4);
}
if (message.product_sold_item_id !== undefined) {
writer.uint32(1426).string(message.product_sold_item_id);
}
if (message.product_sold_title !== undefined) {
writer.uint32(1434).string(message.product_sold_title);
}
if (message.product_sold_type_l1 !== undefined) {
writer.uint32(1442).string(message.product_sold_type_l1);
}
if (message.product_sold_type_l2 !== undefined) {
writer.uint32(1450).string(message.product_sold_type_l2);
}
if (message.product_sold_type_l3 !== undefined) {
writer.uint32(1458).string(message.product_sold_type_l3);
}
if (message.product_sold_type_l4 !== undefined) {
writer.uint32(1466).string(message.product_sold_type_l4);
}
if (message.product_sold_type_l5 !== undefined) {
writer.uint32(1474).string(message.product_sold_type_l5);
}
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.vertical_ads_event_participant_display_names !== undefined) {
writer.uint32(1642).string(message.vertical_ads_event_participant_display_names);
}
if (message.vertical_ads_hotel_class !== undefined) {
writer.uint32(1648).int64(message.vertical_ads_hotel_class);
}
if (message.vertical_ads_listing !== undefined) {
writer.uint32(1658).string(message.vertical_ads_listing);
}
if (message.vertical_ads_listing_brand !== undefined) {
writer.uint32(1666).string(message.vertical_ads_listing_brand);
}
if (message.vertical_ads_listing_city !== undefined) {
writer.uint32(1674).string(message.vertical_ads_listing_city);
}
if (message.vertical_ads_listing_country !== undefined) {
writer.uint32(1682).string(message.vertical_ads_listing_country);
}
if (message.vertical_ads_listing_region !== undefined) {
writer.uint32(1690).string(message.vertical_ads_listing_region);
}
if (message.vertical_ads_listing_user_rating !== undefined) {
writer.uint32(1760).int64(message.vertical_ads_listing_user_rating);
}
if (message.vertical_ads_listing_venue !== undefined) {
writer.uint32(1770).string(message.vertical_ads_listing_venue);
}
if (message.vertical_ads_partner_account !== undefined) {
writer.uint32(1696).int64(message.vertical_ads_partner_account);
}
if (message.vertical_ads_vertical !== undefined) {
writer.uint32(1704).int32(message.vertical_ads_vertical);
}
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.match_type !== undefined && message.match_type !== 0) {
writer.uint32(1592).int32(message.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);
}
if (message.adjusted_age_range !== undefined && message.adjusted_age_range !== 0) {
writer.uint32(1568).int32(message.adjusted_age_range);
}
if (message.adjusted_gender !== undefined && message.adjusted_gender !== 0) {
writer.uint32(1576).int32(message.adjusted_gender);
}
if (message.search_term_match_source !== undefined && message.search_term_match_source !== 0) {
writer.uint32(1584).int32(message.search_term_match_source);
}
if (message.search_term_targeting_status !== undefined && message.search_term_targeting_status !== 0) {
writer.uint32(1608).int32(message.search_term_targeting_status);
}
if (message.ad_using_product_data !== undefined) {
writer.uint32(1616).bool(message.ad_using_product_data);
}
if (message.ad_using_video !== undefined) {
writer.uint32(1624).bool(message.ad_using_video);
}
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 204:
if (tag !== 1632) {
break;
}
message.ad_sub_network_type = reader.int32();
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 219:
if (tag !== 1752) {
break;
}
message.mobile_device_platform = 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 200:
if (tag !== 1600) {
break;
}
message.landing_page_source = reader.int32();
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: