google-ads-api-client
Version:
A friendly and exhaustive client to the google-ads-api, code generated directly from google's published protobuf schema.
909 lines • 64.6 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.SkAdNetworkSourceApp = exports.AssetInteractionTarget = exports.BudgetCampaignAssociationStatus = exports.Keyword = exports.Segments = void 0;
const runtime_1 = require("@protobuf-ts/runtime");
const runtime_2 = require("@protobuf-ts/runtime");
const runtime_3 = require("@protobuf-ts/runtime");
const runtime_4 = require("@protobuf-ts/runtime");
const runtime_5 = require("@protobuf-ts/runtime");
const budget_campaign_association_status_1 = require("../enums/budget_campaign_association_status");
const criteria_1 = require("./criteria");
const sk_ad_network_attribution_credit_1 = require("../enums/sk_ad_network_attribution_credit");
const sk_ad_network_ad_event_type_1 = require("../enums/sk_ad_network_ad_event_type");
const sk_ad_network_user_type_1 = require("../enums/sk_ad_network_user_type");
const conversion_value_rule_primary_dimension_1 = require("../enums/conversion_value_rule_primary_dimension");
const slot_1 = require("../enums/slot");
const search_term_match_type_1 = require("../enums/search_term_match_type");
const search_engine_results_page_type_1 = require("../enums/search_engine_results_page_type");
const recommendation_type_1 = require("../enums/recommendation_type");
const product_condition_1 = require("../enums/product_condition");
const product_channel_exclusivity_1 = require("../enums/product_channel_exclusivity");
const product_channel_1 = require("../enums/product_channel");
const placeholder_type_1 = require("../enums/placeholder_type");
const month_of_year_1 = require("../enums/month_of_year");
const hotel_price_bucket_1 = require("../enums/hotel_price_bucket");
const hotel_rate_type_1 = require("../enums/hotel_rate_type");
const hotel_date_selection_type_1 = require("../enums/hotel_date_selection_type");
const external_conversion_source_1 = require("../enums/external_conversion_source");
const device_1 = require("../enums/device");
const day_of_week_1 = require("../enums/day_of_week");
const conversion_or_adjustment_lag_bucket_1 = require("../enums/conversion_or_adjustment_lag_bucket");
const conversion_lag_bucket_1 = require("../enums/conversion_lag_bucket");
const conversion_attribution_event_type_1 = require("../enums/conversion_attribution_event_type");
const conversion_action_category_1 = require("../enums/conversion_action_category");
const click_type_1 = require("../enums/click_type");
const ad_network_type_1 = require("../enums/ad_network_type");
const ad_destination_type_1 = require("../enums/ad_destination_type");
// @generated message type with reflection information, may provide speed optimized methods
class Segments$Type extends runtime_5.MessageType {
constructor() {
super("google.ads.googleads.v11.common.Segments", [
{ no: 136, name: "ad_destination_type", kind: "enum", T: () => ["google.ads.googleads.v11.enums.AdDestinationTypeEnum.AdDestinationType", ad_destination_type_1.AdDestinationTypeEnum_AdDestinationType] },
{ no: 3, name: "ad_network_type", kind: "enum", T: () => ["google.ads.googleads.v11.enums.AdNetworkTypeEnum.AdNetworkType", ad_network_type_1.AdNetworkTypeEnum_AdNetworkType] },
{ no: 145, name: "auction_insight_domain", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ },
{ no: 134, name: "budget_campaign_association_status", kind: "message", T: () => exports.BudgetCampaignAssociationStatus },
{ no: 26, name: "click_type", kind: "enum", T: () => ["google.ads.googleads.v11.enums.ClickTypeEnum.ClickType", click_type_1.ClickTypeEnum_ClickType] },
{ no: 113, name: "conversion_action", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "google.api.resource_reference": { type: "googleads.googleapis.com/ConversionAction" } } },
{ no: 53, name: "conversion_action_category", kind: "enum", T: () => ["google.ads.googleads.v11.enums.ConversionActionCategoryEnum.ConversionActionCategory", conversion_action_category_1.ConversionActionCategoryEnum_ConversionActionCategory] },
{ no: 114, name: "conversion_action_name", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ },
{ no: 115, name: "conversion_adjustment", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/ },
{ no: 2, name: "conversion_attribution_event_type", kind: "enum", T: () => ["google.ads.googleads.v11.enums.ConversionAttributionEventTypeEnum.ConversionAttributionEventType", conversion_attribution_event_type_1.ConversionAttributionEventTypeEnum_ConversionAttributionEventType] },
{ no: 50, name: "conversion_lag_bucket", kind: "enum", T: () => ["google.ads.googleads.v11.enums.ConversionLagBucketEnum.ConversionLagBucket", conversion_lag_bucket_1.ConversionLagBucketEnum_ConversionLagBucket] },
{ no: 51, name: "conversion_or_adjustment_lag_bucket", kind: "enum", T: () => ["google.ads.googleads.v11.enums.ConversionOrAdjustmentLagBucketEnum.ConversionOrAdjustmentLagBucket", conversion_or_adjustment_lag_bucket_1.ConversionOrAdjustmentLagBucketEnum_ConversionOrAdjustmentLagBucket] },
{ no: 79, name: "date", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ },
{ no: 5, name: "day_of_week", kind: "enum", T: () => ["google.ads.googleads.v11.enums.DayOfWeekEnum.DayOfWeek", day_of_week_1.DayOfWeekEnum_DayOfWeek] },
{ no: 1, name: "device", kind: "enum", T: () => ["google.ads.googleads.v11.enums.DeviceEnum.Device", device_1.DeviceEnum_Device] },
{ no: 55, name: "external_conversion_source", kind: "enum", T: () => ["google.ads.googleads.v11.enums.ExternalConversionSourceEnum.ExternalConversionSource", external_conversion_source_1.ExternalConversionSourceEnum_ExternalConversionSource] },
{ no: 116, name: "geo_target_airport", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ },
{ no: 117, name: "geo_target_canton", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ },
{ no: 118, name: "geo_target_city", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ },
{ no: 119, name: "geo_target_country", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ },
{ no: 120, name: "geo_target_county", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ },
{ no: 121, name: "geo_target_district", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ },
{ no: 122, name: "geo_target_metro", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ },
{ no: 123, name: "geo_target_most_specific_location", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ },
{ no: 124, name: "geo_target_postal_code", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ },
{ no: 125, name: "geo_target_province", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ },
{ no: 126, name: "geo_target_region", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ },
{ no: 127, name: "geo_target_state", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ },
{ no: 135, name: "hotel_booking_window_days", kind: "scalar", opt: true, T: 3 /*ScalarType.INT64*/, L: 0 /*LongType.BIGINT*/ },
{ no: 80, name: "hotel_center_id", kind: "scalar", opt: true, T: 3 /*ScalarType.INT64*/, L: 0 /*LongType.BIGINT*/ },
{ no: 81, name: "hotel_check_in_date", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ },
{ no: 9, name: "hotel_check_in_day_of_week", kind: "enum", T: () => ["google.ads.googleads.v11.enums.DayOfWeekEnum.DayOfWeek", day_of_week_1.DayOfWeekEnum_DayOfWeek] },
{ no: 82, name: "hotel_city", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ },
{ no: 83, name: "hotel_class", kind: "scalar", opt: true, T: 5 /*ScalarType.INT32*/ },
{ no: 84, name: "hotel_country", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ },
{ no: 13, name: "hotel_date_selection_type", kind: "enum", T: () => ["google.ads.googleads.v11.enums.HotelDateSelectionTypeEnum.HotelDateSelectionType", hotel_date_selection_type_1.HotelDateSelectionTypeEnum_HotelDateSelectionType] },
{ no: 85, name: "hotel_length_of_stay", kind: "scalar", opt: true, T: 5 /*ScalarType.INT32*/ },
{ no: 86, name: "hotel_rate_rule_id", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ },
{ no: 74, name: "hotel_rate_type", kind: "enum", T: () => ["google.ads.googleads.v11.enums.HotelRateTypeEnum.HotelRateType", hotel_rate_type_1.HotelRateTypeEnum_HotelRateType] },
{ no: 78, name: "hotel_price_bucket", kind: "enum", T: () => ["google.ads.googleads.v11.enums.HotelPriceBucketEnum.HotelPriceBucket", hotel_price_bucket_1.HotelPriceBucketEnum_HotelPriceBucket] },
{ no: 87, name: "hotel_state", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ },
{ no: 88, name: "hour", kind: "scalar", opt: true, T: 5 /*ScalarType.INT32*/ },
{ no: 89, name: "interaction_on_this_extension", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/ },
{ no: 61, name: "keyword", kind: "message", T: () => exports.Keyword },
{ no: 90, name: "month", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ },
{ no: 18, name: "month_of_year", kind: "enum", T: () => ["google.ads.googleads.v11.enums.MonthOfYearEnum.MonthOfYear", month_of_year_1.MonthOfYearEnum_MonthOfYear] },
{ no: 91, name: "partner_hotel_id", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ },
{ no: 20, name: "placeholder_type", kind: "enum", T: () => ["google.ads.googleads.v11.enums.PlaceholderTypeEnum.PlaceholderType", placeholder_type_1.PlaceholderTypeEnum_PlaceholderType] },
{ no: 132, name: "product_aggregator_id", kind: "scalar", opt: true, T: 3 /*ScalarType.INT64*/, L: 0 /*LongType.BIGINT*/ },
{ no: 92, name: "product_bidding_category_level1", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ },
{ no: 93, name: "product_bidding_category_level2", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ },
{ no: 94, name: "product_bidding_category_level3", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ },
{ no: 95, name: "product_bidding_category_level4", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ },
{ no: 96, name: "product_bidding_category_level5", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ },
{ no: 97, name: "product_brand", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ },
{ no: 30, name: "product_channel", kind: "enum", T: () => ["google.ads.googleads.v11.enums.ProductChannelEnum.ProductChannel", product_channel_1.ProductChannelEnum_ProductChannel] },
{ no: 31, name: "product_channel_exclusivity", kind: "enum", T: () => ["google.ads.googleads.v11.enums.ProductChannelExclusivityEnum.ProductChannelExclusivity", product_channel_exclusivity_1.ProductChannelExclusivityEnum_ProductChannelExclusivity] },
{ no: 32, name: "product_condition", kind: "enum", T: () => ["google.ads.googleads.v11.enums.ProductConditionEnum.ProductCondition", product_condition_1.ProductConditionEnum_ProductCondition] },
{ no: 98, name: "product_country", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ },
{ no: 99, name: "product_custom_attribute0", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ },
{ no: 100, name: "product_custom_attribute1", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ },
{ no: 101, name: "product_custom_attribute2", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ },
{ no: 102, name: "product_custom_attribute3", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ },
{ no: 103, name: "product_custom_attribute4", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ },
{ no: 104, name: "product_item_id", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ },
{ no: 105, name: "product_language", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ },
{ no: 133, name: "product_merchant_id", kind: "scalar", opt: true, T: 3 /*ScalarType.INT64*/, L: 0 /*LongType.BIGINT*/ },
{ no: 106, name: "product_store_id", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ },
{ no: 107, name: "product_title", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ },
{ no: 108, name: "product_type_l1", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ },
{ no: 109, name: "product_type_l2", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ },
{ no: 110, name: "product_type_l3", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ },
{ no: 111, name: "product_type_l4", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ },
{ no: 112, name: "product_type_l5", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ },
{ no: 128, name: "quarter", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ },
{ no: 140, name: "recommendation_type", kind: "enum", T: () => ["google.ads.googleads.v11.enums.RecommendationTypeEnum.RecommendationType", recommendation_type_1.RecommendationTypeEnum_RecommendationType] },
{ no: 70, name: "search_engine_results_page_type", kind: "enum", T: () => ["google.ads.googleads.v11.enums.SearchEngineResultsPageTypeEnum.SearchEngineResultsPageType", search_engine_results_page_type_1.SearchEngineResultsPageTypeEnum_SearchEngineResultsPageType] },
{ no: 22, name: "search_term_match_type", kind: "enum", T: () => ["google.ads.googleads.v11.enums.SearchTermMatchTypeEnum.SearchTermMatchType", search_term_match_type_1.SearchTermMatchTypeEnum_SearchTermMatchType] },
{ no: 23, name: "slot", kind: "enum", T: () => ["google.ads.googleads.v11.enums.SlotEnum.Slot", slot_1.SlotEnum_Slot] },
{ no: 138, name: "conversion_value_rule_primary_dimension", kind: "enum", T: () => ["google.ads.googleads.v11.enums.ConversionValueRulePrimaryDimensionEnum.ConversionValueRulePrimaryDimension", conversion_value_rule_primary_dimension_1.ConversionValueRulePrimaryDimensionEnum_ConversionValueRulePrimaryDimension] },
{ no: 129, name: "webpage", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ },
{ no: 130, name: "week", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ },
{ no: 131, name: "year", kind: "scalar", opt: true, T: 5 /*ScalarType.INT32*/ },
{ no: 137, name: "sk_ad_network_conversion_value", kind: "scalar", opt: true, T: 3 /*ScalarType.INT64*/, L: 0 /*LongType.BIGINT*/ },
{ no: 141, name: "sk_ad_network_user_type", kind: "enum", T: () => ["google.ads.googleads.v11.enums.SkAdNetworkUserTypeEnum.SkAdNetworkUserType", sk_ad_network_user_type_1.SkAdNetworkUserTypeEnum_SkAdNetworkUserType] },
{ no: 142, name: "sk_ad_network_ad_event_type", kind: "enum", T: () => ["google.ads.googleads.v11.enums.SkAdNetworkAdEventTypeEnum.SkAdNetworkAdEventType", sk_ad_network_ad_event_type_1.SkAdNetworkAdEventTypeEnum_SkAdNetworkAdEventType] },
{ no: 143, name: "sk_ad_network_source_app", kind: "message", T: () => exports.SkAdNetworkSourceApp },
{ no: 144, name: "sk_ad_network_attribution_credit", kind: "enum", T: () => ["google.ads.googleads.v11.enums.SkAdNetworkAttributionCreditEnum.SkAdNetworkAttributionCredit", sk_ad_network_attribution_credit_1.SkAdNetworkAttributionCreditEnum_SkAdNetworkAttributionCredit] },
{ no: 139, name: "asset_interaction_target", kind: "message", T: () => exports.AssetInteractionTarget }
]);
}
create(value) {
const message = { adDestinationType: 0, adNetworkType: 0, clickType: 0, conversionActionCategory: 0, conversionAttributionEventType: 0, conversionLagBucket: 0, conversionOrAdjustmentLagBucket: 0, dayOfWeek: 0, device: 0, externalConversionSource: 0, hotelCheckInDayOfWeek: 0, hotelDateSelectionType: 0, hotelRateType: 0, hotelPriceBucket: 0, monthOfYear: 0, placeholderType: 0, productChannel: 0, productChannelExclusivity: 0, productCondition: 0, recommendationType: 0, searchEngineResultsPageType: 0, searchTermMatchType: 0, slot: 0, conversionValueRulePrimaryDimension: 0, skAdNetworkUserType: 0, skAdNetworkAdEventType: 0, skAdNetworkAttributionCredit: 0 };
globalThis.Object.defineProperty(message, runtime_4.MESSAGE_TYPE, { enumerable: false, value: this });
if (value !== undefined)
(0, runtime_3.reflectionMergePartial)(this, message, value);
return message;
}
internalBinaryRead(reader, length, options, target) {
let message = target ?? this.create(), end = reader.pos + length;
while (reader.pos < end) {
let [fieldNo, wireType] = reader.tag();
switch (fieldNo) {
case /* google.ads.googleads.v11.enums.AdDestinationTypeEnum.AdDestinationType ad_destination_type */ 136:
message.adDestinationType = reader.int32();
break;
case /* google.ads.googleads.v11.enums.AdNetworkTypeEnum.AdNetworkType ad_network_type */ 3:
message.adNetworkType = reader.int32();
break;
case /* optional string auction_insight_domain */ 145:
message.auctionInsightDomain = reader.string();
break;
case /* google.ads.googleads.v11.common.BudgetCampaignAssociationStatus budget_campaign_association_status */ 134:
message.budgetCampaignAssociationStatus = exports.BudgetCampaignAssociationStatus.internalBinaryRead(reader, reader.uint32(), options, message.budgetCampaignAssociationStatus);
break;
case /* google.ads.googleads.v11.enums.ClickTypeEnum.ClickType click_type */ 26:
message.clickType = reader.int32();
break;
case /* optional string conversion_action */ 113:
message.conversionAction = reader.string();
break;
case /* google.ads.googleads.v11.enums.ConversionActionCategoryEnum.ConversionActionCategory conversion_action_category */ 53:
message.conversionActionCategory = reader.int32();
break;
case /* optional string conversion_action_name */ 114:
message.conversionActionName = reader.string();
break;
case /* optional bool conversion_adjustment */ 115:
message.conversionAdjustment = reader.bool();
break;
case /* google.ads.googleads.v11.enums.ConversionAttributionEventTypeEnum.ConversionAttributionEventType conversion_attribution_event_type */ 2:
message.conversionAttributionEventType = reader.int32();
break;
case /* google.ads.googleads.v11.enums.ConversionLagBucketEnum.ConversionLagBucket conversion_lag_bucket */ 50:
message.conversionLagBucket = reader.int32();
break;
case /* google.ads.googleads.v11.enums.ConversionOrAdjustmentLagBucketEnum.ConversionOrAdjustmentLagBucket conversion_or_adjustment_lag_bucket */ 51:
message.conversionOrAdjustmentLagBucket = reader.int32();
break;
case /* optional string date */ 79:
message.date = reader.string();
break;
case /* google.ads.googleads.v11.enums.DayOfWeekEnum.DayOfWeek day_of_week */ 5:
message.dayOfWeek = reader.int32();
break;
case /* google.ads.googleads.v11.enums.DeviceEnum.Device device */ 1:
message.device = reader.int32();
break;
case /* google.ads.googleads.v11.enums.ExternalConversionSourceEnum.ExternalConversionSource external_conversion_source */ 55:
message.externalConversionSource = reader.int32();
break;
case /* optional string geo_target_airport */ 116:
message.geoTargetAirport = reader.string();
break;
case /* optional string geo_target_canton */ 117:
message.geoTargetCanton = reader.string();
break;
case /* optional string geo_target_city */ 118:
message.geoTargetCity = reader.string();
break;
case /* optional string geo_target_country */ 119:
message.geoTargetCountry = reader.string();
break;
case /* optional string geo_target_county */ 120:
message.geoTargetCounty = reader.string();
break;
case /* optional string geo_target_district */ 121:
message.geoTargetDistrict = reader.string();
break;
case /* optional string geo_target_metro */ 122:
message.geoTargetMetro = reader.string();
break;
case /* optional string geo_target_most_specific_location */ 123:
message.geoTargetMostSpecificLocation = reader.string();
break;
case /* optional string geo_target_postal_code */ 124:
message.geoTargetPostalCode = reader.string();
break;
case /* optional string geo_target_province */ 125:
message.geoTargetProvince = reader.string();
break;
case /* optional string geo_target_region */ 126:
message.geoTargetRegion = reader.string();
break;
case /* optional string geo_target_state */ 127:
message.geoTargetState = reader.string();
break;
case /* optional int64 hotel_booking_window_days */ 135:
message.hotelBookingWindowDays = reader.int64().toBigInt();
break;
case /* optional int64 hotel_center_id */ 80:
message.hotelCenterId = reader.int64().toBigInt();
break;
case /* optional string hotel_check_in_date */ 81:
message.hotelCheckInDate = reader.string();
break;
case /* google.ads.googleads.v11.enums.DayOfWeekEnum.DayOfWeek hotel_check_in_day_of_week */ 9:
message.hotelCheckInDayOfWeek = reader.int32();
break;
case /* optional string hotel_city */ 82:
message.hotelCity = reader.string();
break;
case /* optional int32 hotel_class */ 83:
message.hotelClass = reader.int32();
break;
case /* optional string hotel_country */ 84:
message.hotelCountry = reader.string();
break;
case /* google.ads.googleads.v11.enums.HotelDateSelectionTypeEnum.HotelDateSelectionType hotel_date_selection_type */ 13:
message.hotelDateSelectionType = reader.int32();
break;
case /* optional int32 hotel_length_of_stay */ 85:
message.hotelLengthOfStay = reader.int32();
break;
case /* optional string hotel_rate_rule_id */ 86:
message.hotelRateRuleId = reader.string();
break;
case /* google.ads.googleads.v11.enums.HotelRateTypeEnum.HotelRateType hotel_rate_type */ 74:
message.hotelRateType = reader.int32();
break;
case /* google.ads.googleads.v11.enums.HotelPriceBucketEnum.HotelPriceBucket hotel_price_bucket */ 78:
message.hotelPriceBucket = reader.int32();
break;
case /* optional string hotel_state */ 87:
message.hotelState = reader.string();
break;
case /* optional int32 hour */ 88:
message.hour = reader.int32();
break;
case /* optional bool interaction_on_this_extension */ 89:
message.interactionOnThisExtension = reader.bool();
break;
case /* google.ads.googleads.v11.common.Keyword keyword */ 61:
message.keyword = exports.Keyword.internalBinaryRead(reader, reader.uint32(), options, message.keyword);
break;
case /* optional string month */ 90:
message.month = reader.string();
break;
case /* google.ads.googleads.v11.enums.MonthOfYearEnum.MonthOfYear month_of_year */ 18:
message.monthOfYear = reader.int32();
break;
case /* optional string partner_hotel_id */ 91:
message.partnerHotelId = reader.string();
break;
case /* google.ads.googleads.v11.enums.PlaceholderTypeEnum.PlaceholderType placeholder_type */ 20:
message.placeholderType = reader.int32();
break;
case /* optional int64 product_aggregator_id */ 132:
message.productAggregatorId = reader.int64().toBigInt();
break;
case /* optional string product_bidding_category_level1 */ 92:
message.productBiddingCategoryLevel1 = reader.string();
break;
case /* optional string product_bidding_category_level2 */ 93:
message.productBiddingCategoryLevel2 = reader.string();
break;
case /* optional string product_bidding_category_level3 */ 94:
message.productBiddingCategoryLevel3 = reader.string();
break;
case /* optional string product_bidding_category_level4 */ 95:
message.productBiddingCategoryLevel4 = reader.string();
break;
case /* optional string product_bidding_category_level5 */ 96:
message.productBiddingCategoryLevel5 = reader.string();
break;
case /* optional string product_brand */ 97:
message.productBrand = reader.string();
break;
case /* google.ads.googleads.v11.enums.ProductChannelEnum.ProductChannel product_channel */ 30:
message.productChannel = reader.int32();
break;
case /* google.ads.googleads.v11.enums.ProductChannelExclusivityEnum.ProductChannelExclusivity product_channel_exclusivity */ 31:
message.productChannelExclusivity = reader.int32();
break;
case /* google.ads.googleads.v11.enums.ProductConditionEnum.ProductCondition product_condition */ 32:
message.productCondition = reader.int32();
break;
case /* optional string product_country */ 98:
message.productCountry = reader.string();
break;
case /* optional string product_custom_attribute0 */ 99:
message.productCustomAttribute0 = reader.string();
break;
case /* optional string product_custom_attribute1 */ 100:
message.productCustomAttribute1 = reader.string();
break;
case /* optional string product_custom_attribute2 */ 101:
message.productCustomAttribute2 = reader.string();
break;
case /* optional string product_custom_attribute3 */ 102:
message.productCustomAttribute3 = reader.string();
break;
case /* optional string product_custom_attribute4 */ 103:
message.productCustomAttribute4 = reader.string();
break;
case /* optional string product_item_id */ 104:
message.productItemId = reader.string();
break;
case /* optional string product_language */ 105:
message.productLanguage = reader.string();
break;
case /* optional int64 product_merchant_id */ 133:
message.productMerchantId = reader.int64().toBigInt();
break;
case /* optional string product_store_id */ 106:
message.productStoreId = reader.string();
break;
case /* optional string product_title */ 107:
message.productTitle = reader.string();
break;
case /* optional string product_type_l1 */ 108:
message.productTypeL1 = reader.string();
break;
case /* optional string product_type_l2 */ 109:
message.productTypeL2 = reader.string();
break;
case /* optional string product_type_l3 */ 110:
message.productTypeL3 = reader.string();
break;
case /* optional string product_type_l4 */ 111:
message.productTypeL4 = reader.string();
break;
case /* optional string product_type_l5 */ 112:
message.productTypeL5 = reader.string();
break;
case /* optional string quarter */ 128:
message.quarter = reader.string();
break;
case /* google.ads.googleads.v11.enums.RecommendationTypeEnum.RecommendationType recommendation_type */ 140:
message.recommendationType = reader.int32();
break;
case /* google.ads.googleads.v11.enums.SearchEngineResultsPageTypeEnum.SearchEngineResultsPageType search_engine_results_page_type */ 70:
message.searchEngineResultsPageType = reader.int32();
break;
case /* google.ads.googleads.v11.enums.SearchTermMatchTypeEnum.SearchTermMatchType search_term_match_type */ 22:
message.searchTermMatchType = reader.int32();
break;
case /* google.ads.googleads.v11.enums.SlotEnum.Slot slot */ 23:
message.slot = reader.int32();
break;
case /* google.ads.googleads.v11.enums.ConversionValueRulePrimaryDimensionEnum.ConversionValueRulePrimaryDimension conversion_value_rule_primary_dimension */ 138:
message.conversionValueRulePrimaryDimension = reader.int32();
break;
case /* optional string webpage */ 129:
message.webpage = reader.string();
break;
case /* optional string week */ 130:
message.week = reader.string();
break;
case /* optional int32 year */ 131:
message.year = reader.int32();
break;
case /* optional int64 sk_ad_network_conversion_value */ 137:
message.skAdNetworkConversionValue = reader.int64().toBigInt();
break;
case /* google.ads.googleads.v11.enums.SkAdNetworkUserTypeEnum.SkAdNetworkUserType sk_ad_network_user_type */ 141:
message.skAdNetworkUserType = reader.int32();
break;
case /* google.ads.googleads.v11.enums.SkAdNetworkAdEventTypeEnum.SkAdNetworkAdEventType sk_ad_network_ad_event_type */ 142:
message.skAdNetworkAdEventType = reader.int32();
break;
case /* optional google.ads.googleads.v11.common.SkAdNetworkSourceApp sk_ad_network_source_app */ 143:
message.skAdNetworkSourceApp = exports.SkAdNetworkSourceApp.internalBinaryRead(reader, reader.uint32(), options, message.skAdNetworkSourceApp);
break;
case /* google.ads.googleads.v11.enums.SkAdNetworkAttributionCreditEnum.SkAdNetworkAttributionCredit sk_ad_network_attribution_credit */ 144:
message.skAdNetworkAttributionCredit = reader.int32();
break;
case /* optional google.ads.googleads.v11.common.AssetInteractionTarget asset_interaction_target */ 139:
message.assetInteractionTarget = exports.AssetInteractionTarget.internalBinaryRead(reader, reader.uint32(), options, message.assetInteractionTarget);
break;
default:
let u = options.readUnknownField;
if (u === "throw")
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
let d = reader.skip(wireType);
if (u !== false)
(u === true ? runtime_2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
}
}
return message;
}
internalBinaryWrite(message, writer, options) {
/* google.ads.googleads.v11.enums.AdDestinationTypeEnum.AdDestinationType ad_destination_type = 136; */
if (message.adDestinationType !== 0)
writer.tag(136, runtime_1.WireType.Varint).int32(message.adDestinationType);
/* google.ads.googleads.v11.enums.AdNetworkTypeEnum.AdNetworkType ad_network_type = 3; */
if (message.adNetworkType !== 0)
writer.tag(3, runtime_1.WireType.Varint).int32(message.adNetworkType);
/* optional string auction_insight_domain = 145; */
if (message.auctionInsightDomain !== undefined)
writer.tag(145, runtime_1.WireType.LengthDelimited).string(message.auctionInsightDomain);
/* google.ads.googleads.v11.common.BudgetCampaignAssociationStatus budget_campaign_association_status = 134; */
if (message.budgetCampaignAssociationStatus)
exports.BudgetCampaignAssociationStatus.internalBinaryWrite(message.budgetCampaignAssociationStatus, writer.tag(134, runtime_1.WireType.LengthDelimited).fork(), options).join();
/* google.ads.googleads.v11.enums.ClickTypeEnum.ClickType click_type = 26; */
if (message.clickType !== 0)
writer.tag(26, runtime_1.WireType.Varint).int32(message.clickType);
/* optional string conversion_action = 113; */
if (message.conversionAction !== undefined)
writer.tag(113, runtime_1.WireType.LengthDelimited).string(message.conversionAction);
/* google.ads.googleads.v11.enums.ConversionActionCategoryEnum.ConversionActionCategory conversion_action_category = 53; */
if (message.conversionActionCategory !== 0)
writer.tag(53, runtime_1.WireType.Varint).int32(message.conversionActionCategory);
/* optional string conversion_action_name = 114; */
if (message.conversionActionName !== undefined)
writer.tag(114, runtime_1.WireType.LengthDelimited).string(message.conversionActionName);
/* optional bool conversion_adjustment = 115; */
if (message.conversionAdjustment !== undefined)
writer.tag(115, runtime_1.WireType.Varint).bool(message.conversionAdjustment);
/* google.ads.googleads.v11.enums.ConversionAttributionEventTypeEnum.ConversionAttributionEventType conversion_attribution_event_type = 2; */
if (message.conversionAttributionEventType !== 0)
writer.tag(2, runtime_1.WireType.Varint).int32(message.conversionAttributionEventType);
/* google.ads.googleads.v11.enums.ConversionLagBucketEnum.ConversionLagBucket conversion_lag_bucket = 50; */
if (message.conversionLagBucket !== 0)
writer.tag(50, runtime_1.WireType.Varint).int32(message.conversionLagBucket);
/* google.ads.googleads.v11.enums.ConversionOrAdjustmentLagBucketEnum.ConversionOrAdjustmentLagBucket conversion_or_adjustment_lag_bucket = 51; */
if (message.conversionOrAdjustmentLagBucket !== 0)
writer.tag(51, runtime_1.WireType.Varint).int32(message.conversionOrAdjustmentLagBucket);
/* optional string date = 79; */
if (message.date !== undefined)
writer.tag(79, runtime_1.WireType.LengthDelimited).string(message.date);
/* google.ads.googleads.v11.enums.DayOfWeekEnum.DayOfWeek day_of_week = 5; */
if (message.dayOfWeek !== 0)
writer.tag(5, runtime_1.WireType.Varint).int32(message.dayOfWeek);
/* google.ads.googleads.v11.enums.DeviceEnum.Device device = 1; */
if (message.device !== 0)
writer.tag(1, runtime_1.WireType.Varint).int32(message.device);
/* google.ads.googleads.v11.enums.ExternalConversionSourceEnum.ExternalConversionSource external_conversion_source = 55; */
if (message.externalConversionSource !== 0)
writer.tag(55, runtime_1.WireType.Varint).int32(message.externalConversionSource);
/* optional string geo_target_airport = 116; */
if (message.geoTargetAirport !== undefined)
writer.tag(116, runtime_1.WireType.LengthDelimited).string(message.geoTargetAirport);
/* optional string geo_target_canton = 117; */
if (message.geoTargetCanton !== undefined)
writer.tag(117, runtime_1.WireType.LengthDelimited).string(message.geoTargetCanton);
/* optional string geo_target_city = 118; */
if (message.geoTargetCity !== undefined)
writer.tag(118, runtime_1.WireType.LengthDelimited).string(message.geoTargetCity);
/* optional string geo_target_country = 119; */
if (message.geoTargetCountry !== undefined)
writer.tag(119, runtime_1.WireType.LengthDelimited).string(message.geoTargetCountry);
/* optional string geo_target_county = 120; */
if (message.geoTargetCounty !== undefined)
writer.tag(120, runtime_1.WireType.LengthDelimited).string(message.geoTargetCounty);
/* optional string geo_target_district = 121; */
if (message.geoTargetDistrict !== undefined)
writer.tag(121, runtime_1.WireType.LengthDelimited).string(message.geoTargetDistrict);
/* optional string geo_target_metro = 122; */
if (message.geoTargetMetro !== undefined)
writer.tag(122, runtime_1.WireType.LengthDelimited).string(message.geoTargetMetro);
/* optional string geo_target_most_specific_location = 123; */
if (message.geoTargetMostSpecificLocation !== undefined)
writer.tag(123, runtime_1.WireType.LengthDelimited).string(message.geoTargetMostSpecificLocation);
/* optional string geo_target_postal_code = 124; */
if (message.geoTargetPostalCode !== undefined)
writer.tag(124, runtime_1.WireType.LengthDelimited).string(message.geoTargetPostalCode);
/* optional string geo_target_province = 125; */
if (message.geoTargetProvince !== undefined)
writer.tag(125, runtime_1.WireType.LengthDelimited).string(message.geoTargetProvince);
/* optional string geo_target_region = 126; */
if (message.geoTargetRegion !== undefined)
writer.tag(126, runtime_1.WireType.LengthDelimited).string(message.geoTargetRegion);
/* optional string geo_target_state = 127; */
if (message.geoTargetState !== undefined)
writer.tag(127, runtime_1.WireType.LengthDelimited).string(message.geoTargetState);
/* optional int64 hotel_booking_window_days = 135; */
if (message.hotelBookingWindowDays !== undefined)
writer.tag(135, runtime_1.WireType.Varint).int64(message.hotelBookingWindowDays);
/* optional int64 hotel_center_id = 80; */
if (message.hotelCenterId !== undefined)
writer.tag(80, runtime_1.WireType.Varint).int64(message.hotelCenterId);
/* optional string hotel_check_in_date = 81; */
if (message.hotelCheckInDate !== undefined)
writer.tag(81, runtime_1.WireType.LengthDelimited).string(message.hotelCheckInDate);
/* google.ads.googleads.v11.enums.DayOfWeekEnum.DayOfWeek hotel_check_in_day_of_week = 9; */
if (message.hotelCheckInDayOfWeek !== 0)
writer.tag(9, runtime_1.WireType.Varint).int32(message.hotelCheckInDayOfWeek);
/* optional string hotel_city = 82; */
if (message.hotelCity !== undefined)
writer.tag(82, runtime_1.WireType.LengthDelimited).string(message.hotelCity);
/* optional int32 hotel_class = 83; */
if (message.hotelClass !== undefined)
writer.tag(83, runtime_1.WireType.Varint).int32(message.hotelClass);
/* optional string hotel_country = 84; */
if (message.hotelCountry !== undefined)
writer.tag(84, runtime_1.WireType.LengthDelimited).string(message.hotelCountry);
/* google.ads.googleads.v11.enums.HotelDateSelectionTypeEnum.HotelDateSelectionType hotel_date_selection_type = 13; */
if (message.hotelDateSelectionType !== 0)
writer.tag(13, runtime_1.WireType.Varint).int32(message.hotelDateSelectionType);
/* optional int32 hotel_length_of_stay = 85; */
if (message.hotelLengthOfStay !== undefined)
writer.tag(85, runtime_1.WireType.Varint).int32(message.hotelLengthOfStay);
/* optional string hotel_rate_rule_id = 86; */
if (message.hotelRateRuleId !== undefined)
writer.tag(86, runtime_1.WireType.LengthDelimited).string(message.hotelRateRuleId);
/* google.ads.googleads.v11.enums.HotelRateTypeEnum.HotelRateType hotel_rate_type = 74; */
if (message.hotelRateType !== 0)
writer.tag(74, runtime_1.WireType.Varint).int32(message.hotelRateType);
/* google.ads.googleads.v11.enums.HotelPriceBucketEnum.HotelPriceBucket hotel_price_bucket = 78; */
if (message.hotelPriceBucket !== 0)
writer.tag(78, runtime_1.WireType.Varint).int32(message.hotelPriceBucket);
/* optional string hotel_state = 87; */
if (message.hotelState !== undefined)
writer.tag(87, runtime_1.WireType.LengthDelimited).string(message.hotelState);
/* optional int32 hour = 88; */
if (message.hour !== undefined)
writer.tag(88, runtime_1.WireType.Varint).int32(message.hour);
/* optional bool interaction_on_this_extension = 89; */
if (message.interactionOnThisExtension !== undefined)
writer.tag(89, runtime_1.WireType.Varint).bool(message.interactionOnThisExtension);
/* google.ads.googleads.v11.common.Keyword keyword = 61; */
if (message.keyword)
exports.Keyword.internalBinaryWrite(message.keyword, writer.tag(61, runtime_1.WireType.LengthDelimited).fork(), options).join();
/* optional string month = 90; */
if (message.month !== undefined)
writer.tag(90, runtime_1.WireType.LengthDelimited).string(message.month);
/* google.ads.googleads.v11.enums.MonthOfYearEnum.MonthOfYear month_of_year = 18; */
if (message.monthOfYear !== 0)
writer.tag(18, runtime_1.WireType.Varint).int32(message.monthOfYear);
/* optional string partner_hotel_id = 91; */
if (message.partnerHotelId !== undefined)
writer.tag(91, runtime_1.WireType.LengthDelimited).string(message.partnerHotelId);
/* google.ads.googleads.v11.enums.PlaceholderTypeEnum.PlaceholderType placeholder_type = 20; */
if (message.placeholderType !== 0)
writer.tag(20, runtime_1.WireType.Varint).int32(message.placeholderType);
/* optional int64 product_aggregator_id = 132; */
if (message.productAggregatorId !== undefined)
writer.tag(132, runtime_1.WireType.Varint).int64(message.productAggregatorId);
/* optional string product_bidding_category_level1 = 92; */
if (message.productBiddingCategoryLevel1 !== undefined)
writer.tag(92, runtime_1.WireType.LengthDelimited).string(message.productBiddingCategoryLevel1);
/* optional string product_bidding_category_level2 = 93; */
if (message.productBiddingCategoryLevel2 !== undefined)
writer.tag(93, runtime_1.WireType.LengthDelimited).string(message.productBiddingCategoryLevel2);
/* optional string product_bidding_category_level3 = 94; */
if (message.productBiddingCategoryLevel3 !== undefined)
writer.tag(94, runtime_1.WireType.LengthDelimited).string(message.productBiddingCategoryLevel3);
/* optional string product_bidding_category_level4 = 95; */
if (message.productBiddingCategoryLevel4 !== undefined)
writer.tag(95, runtime_1.WireType.LengthDelimited).string(message.productBiddingCategoryLevel4);
/* optional string product_bidding_category_level5 = 96; */
if (message.productBiddingCategoryLevel5 !== undefined)
writer.tag(96, runtime_1.WireType.LengthDelimited).string(message.productBiddingCategoryLevel5);
/* optional string product_brand = 97; */
if (message.productBrand !== undefined)
writer.tag(97, runtime_1.WireType.LengthDelimited).string(message.productBrand);
/* google.ads.googleads.v11.enums.ProductChannelEnum.ProductChannel product_channel = 30; */
if (message.productChannel !== 0)
writer.tag(30, runtime_1.WireType.Varint).int32(message.productChannel);
/* google.ads.googleads.v11.enums.ProductChannelExclusivityEnum.ProductChannelExclusivity product_channel_exclusivity = 31; */
if (message.productChannelExclusivity !== 0)
writer.tag(31, runtime_1.WireType.Varint).int32(message.productChannelExclusivity);
/* google.ads.googleads.v11.enums.ProductConditionEnum.ProductCondition product_condition = 32; */
if (message.productCondition !== 0)
writer.tag(32, runtime_1.WireType.Varint).int32(message.productCondition);
/* optional string product_country = 98; */
if (message.productCountry !== undefined)
writer.tag(98, runtime_1.WireType.LengthDelimited).string(message.productCountry);
/* optional string product_custom_attribute0 = 99; */
if (message.productCustomAttribute0 !== undefined)
writer.tag(99, runtime_1.WireType.LengthDelimited).string(message.productCustomAttribute0);
/* optional string product_custom_attribute1 = 100; */
if (message.productCustomAttribute1 !== undefined)
writer.tag(100, runtime_1.WireType.LengthDelimited).string(message.productCustomAttribute1);
/* optional string product_custom_attribute2 = 101; */
if (message.productCustomAttribute2 !== undefined)
writer.tag(101, runtime_1.WireType.LengthDelimited).string(message.productCustomAttribute2);
/* optional string product_custom_attribute3 = 102; */
if (message.productCustomAttribute3 !== undefined)
writer.tag(102, runtime_1.WireType.LengthDelimited).string(message.productCustomAttribute3);
/* optional string product_custom_attribute4 = 103; */
if (message.productCustomAttribute4 !== undefined)
writer.tag(103, runtime_1.WireType.LengthDelimited).string(message.productCustomAttribute4);
/* optional string product_item_id = 104; */
if (message.productItemId !== undefined)
writer.tag(104, runtime_1.WireType.LengthDelimited).string(message.productItemId);
/* optional string product_language = 105; */
if (message.productLanguage !== undefined)
writer.tag(105, runtime_1.WireType.LengthDelimited).string(message.productLanguage);
/* optional int64 product_merchant_id = 133; */
if (message.productMerchantId !== undefined)
writer.tag(133, runtime_1.WireType.Varint).int64(message.productMerchantId);
/* optional string product_store_id = 106; */
if (message.productStoreId !== undefined)
writer.tag(106, runtime_1.WireType.LengthDelimited).string(message.productStoreId);
/* optional string product_title = 107; */
if (message.productTitle !== undefined)
writer.tag(107, runtime_1.WireType.LengthDelimited).string(message.productTitle);
/* optional string product_type_l1 = 108; */
if (message.productTypeL1 !== undefined)
writer.tag(108, runtime_1.WireType.LengthDelimited).string(message.productTypeL1);
/* optional string product_type_l2 = 109; */
if (message.productTypeL2 !== undefined)
writer.tag(109, runtime_1.WireType.LengthDelimited).string(message.productTypeL2);
/* optional string product_type_l3 = 110; */
if (message.productTypeL3 !== undefined)
writer.tag(110, runtime_1.WireType.LengthDelimited).string(message.productTypeL3);
/* optional string product_type_l4 = 111; */
if (message.productTypeL4 !== undefined)
writer.tag(111, runtime_1.WireType.LengthDelimited).string(message.productTypeL4);
/* optional string product_type_l5 = 112; */
if (message.productTypeL5 !== undefined)
writer.tag(112, runtime_1.WireType.LengthDelimited).string(message.productTypeL5);
/* optional string quarter = 128; */
if (message.quarter !== undefined)
writer.tag(128, runtime_1.WireType.LengthDelimited).string(message.quarter);
/* google.ads.googleads.v11.enums.RecommendationTypeEnum.RecommendationType recommendation_type = 140; */
if (message.recommendationType !== 0)
writer.tag(140, runtime_1.WireType.Varint).int32(message.recommendationType);
/* google.ads.googleads.v11.enums.SearchEngineResultsPageTypeEnum.SearchEngineResultsPageType search_engine_results_page_type = 70; */
if (message.searchEngineResultsPageType !== 0)
writer.tag(70, runtime_1.WireType.Varint).int32(message.searchEngineResultsPageType);
/* google.ads.googleads.v11.enums.SearchTermMatchTypeEnum.SearchTermMatchType search_term_match_type = 22; */
if (message.searchTermMatchType !== 0)
writer.tag(22, runtime_1.WireType.Varint).int32(message.searchTermMatchType);
/* google.ads.googleads.v11.enums.SlotEnum.Slot slot = 23; */
if (message.slot !== 0)
writer.tag(23, runtime_1.WireType.Varint).int32(message.slot);
/* google.ads.googleads.v11.enums.ConversionValueRulePrimaryDimensionEnum.ConversionValueRulePrimaryDimension conversion_value_rule_primary_dimension = 138; */
if (message.conversionValueRulePrimaryDimension !== 0)
writer.tag(138, runtime_1.WireType.Varint).int32(message.conversionValueRulePrimaryDimension);
/* optional string webpage = 129; */
if (message.webpage !== undefined)
writer.tag(129, runtime_1.WireType.LengthDelimited).string(message.webpage);
/* optional string week = 130; */
if (message.week !== undefined)
writer.tag(130, runtime_1.WireType.LengthDelimited).string(message.week);
/* optional int32 year = 131; */
if (message.year !== undefined)
writer.tag(131, runtime_1.WireType.Varint).int32(message.year);
/* optional int64 sk_ad_network_conversion_value = 137; */
if (message.skAdNetworkConversionValue !== undefined)
writer.tag(137, runtime_1.WireType.Varint).int64(message.skAdNetworkConversionValue);
/* google.ads.googleads.v11.enums.SkAdNetworkUserTypeEnum.SkAdNetworkUserType sk_ad_network_user_type = 141; */
if (message.skAdNetworkUserType !== 0)
writer.tag(141, runtime_1.WireType.Varint).int32(message.skAdNetworkUserType);
/* google.ads.googleads.v11.enums.SkAdNetworkAdEventTypeEnum.SkAdNetworkAdEventType sk_ad_network_ad_event_type = 142; */
if (message.skAdNetworkAdEventType !== 0)
writer.tag(142, runtime_1.WireType.Varint).int32(message.skAdNetworkAdEventType);
/* optional google.ads.googleads.v11.common.SkAdNetworkSourceApp sk_ad_network_source_app = 143; */
if (message.skAdNetworkSourceApp)
exports.SkAdNetworkSourceApp.internalBinaryWrite(message.skAdNetworkSourceApp, writer.tag(143, runtime_1.WireType.LengthDelimited).fork(), options).join();
/* google.ads.googleads.v11.enums.SkAdNetworkAttributionCreditEnum.SkAdNetworkAttributionCredit sk_ad_network_attribution_credit = 144; */
if (message.skAdNetworkAttributionCredit !== 0)
writer.tag(144, runtime_1.WireType.Varint).int32(message.skAdNetworkAttributionCredit);
/* optional google.ads.googleads.v11.common.AssetInteractionTarget asset_interaction_target = 139; */
if (message.assetInteractionTarget)
exports.AssetInteractionTarget.internalBinaryWrite(message.assetInteractionTarget, writer.tag(139, runtime_1.WireType.LengthDelimited).fork(), options).join();
let u = options.writeUnknownFields;
if (u !== false)
(u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
return writer;
}
}
/**
* @generated MessageType for protobuf message google.ads.googleads.v11.common.Segments
*/
exports.Segments = new Segments$Type();
// @generated message type with reflection information, may provide speed optimized methods
class Keyword$Type extends runtime_5.MessageType {
constructor() {
super("google.ads.googleads.v11.common.Keyword", [
{ no: 3, name: "ad_group_criterion", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ },
{ no: 2, name: "info", kind: "message", T: () => criteria_1.KeywordInfo }
]);
}
create(value) {
const message = {};
globalThis.Object.defineProperty(message, runtime_4.MESSAGE_TYPE, { enumerable: false, value: this });
if (value !== undefined)
(0, runtime_3.reflectionMergePartial)(this, message, value);
return message;
}
internalBinaryRead(reader, length, options, target) {
let message = target ?? this.create(), end = reader.pos + length;
while (reader.pos < end) {
let [fieldNo, wireType] = reader.tag();
switch (fieldNo) {
case /* optional string ad_group_criterion */ 3:
message.adGroupCriterion = reader.string();
break;
case /* google.ads.googleads.v11.common.KeywordInfo info */ 2:
message.info = criteria_1.KeywordInfo.internalBinaryRead(reader, reader.uint32(), options, message.info);
break;
default:
let u = options.readUnknownField;
if (u === "throw")
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
let d = reader.skip(wireType);
if (u !== false)
(u === true ? runtime_2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
}
}
return message;
}
internalBinaryWrite(message, writer, options) {
/* optional string ad_group_criterion = 3; */
if (message.adGroupCriterion !== undefined)
writer.tag(3, runtime_1.WireType.LengthDelimited).string(message.adGroupCriterion);
/* google.ads.googleads.v11.common.KeywordInfo info = 2; */
if (message.info)
criteria_1.KeywordInfo.internalBinaryWrite(message.info, writer.tag(2, runtime_1.WireType.LengthDelimited).fork(), options).join();
let u = options.writeUnknownFields;
if (u !== false)
(u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
return writer;
}
}
/**
* @generated MessageType for protobuf message google.ads.googleads.v11.common.Keyword
*/
exports.Keyword = new Keyword$Type();
// @generated message type with reflection information, may provide speed optimized methods
class BudgetCampaignAssociationStatus$Type extends runtime_5.MessageType {
constructor() {
super("google.ads.googleads.v11.common.BudgetCampaignAssociationStatus", [
{ no: 1, name: "campaign", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ },
{ no: 2, name: "status", kind: "enum", T: () => ["google.ads.googleads.v11.enums.BudgetCampaignAssociationStatusEnum.BudgetCampaignAssociationStatus", budget_campaign_association_status_1.BudgetCampaignAssociationStatusEnum_BudgetCampaignAssociationStatus] }
]);
}
create(value) {
const message = { status: 0 };
globalThis.Object.defineProperty(message, runtime_4.MESSAGE_TYPE, { enumerable: false, value: this });
if (value !== undefined)
(0, runtime_3.reflectionMergePartial)(this, message, value);
return message;
}
internalBinaryRead(reader, length, options, target) {
let message = target ?? this.create(), end = reader.pos + length;
while (reader.pos < end) {
let [fieldNo, wireType] = reader.tag();
switch (fieldNo) {
case /* optional string campaign */ 1:
message.campaign = reader.string();
break;
case /* google.ads.googleads.v11.enums.BudgetCampaignAssociationStatusEnum.BudgetCampaignAssociationStatus status */ 2:
message.status = reader.int32();
break;
default:
let u = options.readUnknownField;
if (u === "throw")
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
let d = reader.skip(wireType);
if (u !== false)
(u === true ? runtime_2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
}
}
return message;
}
internalBinaryWrite(message, writer, options) {
/* optional string campaign = 1; */
if (message.campaign !== undefined)
writer.tag(1, runtime_1.WireType.LengthDelimited).string(message.campaign);
/* google.ads.googleads.v11.enums.BudgetCampaignAssociationStatusEnum.BudgetCampaignAssociationStatus status = 2; */
if (message.status !== 0)
writer.tag(2, runtime_1.WireType.Varint).int32(message.status);
let u = options.writeUnknownFields;
if (u !== false)
(u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
return writer;
}
}
/**
* @generated MessageType for protobuf message google.ads.googleads.v11.common.BudgetCampaignAssociationStatus
*/
exports.BudgetCampaignAssociationStatus = new BudgetCampaignAssociationStatus$Type();
// @generated message type with reflection information, may provide speed optimized methods
class AssetInteractionTarget$Type extends runtime_5.MessageType {
constructor() {
super("google.ads.googleads.v11.common.AssetInteractionTarget", [
{ no: 1, name: "asset", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
{ no: 2, name: "interaction_on_this_asset", kind: "scalar", T: 8 /*ScalarType.BOOL*/ }
]);
}
create(value) {
const message = { asset: "", interactionOnThisAsset: false };
globalThis.Object.defineProperty(message, runtime_4.MESSAGE_TYPE, { enumerable: false, value: this });
if (value !== undefined)
(0, runtime_3.reflectionMergePartial)(this, message, value);
return message;
}
internalBinaryRead(reader, length, options, target) {
let message = target ?? this.create(), end = reader.pos + length;
while (reader.pos < end) {
let [fieldNo, wireType] = reader.tag();
switch (fieldNo) {
case /* string asset */ 1:
message.asset = reader.string();
break;
case /* bool interaction_on_this_asset */ 2:
message.interactionOnThisAsset = reader.bool();
break;
default:
let u = options.readUnknownField;
if (u === "throw")
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
let d = reader.skip(wireType);
if (u !== false)
(u === true ? runtime_2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
}
}
return message;
}
internalBinaryWrite(message, writer, options) {
/* string asset = 1; */
if (message.asset !== "")
writer.tag(1, runtime_1.WireType.LengthDelimited).string(message.asset);
/* bool interaction_on_this_asset = 2; */
if (message.interactionOnThisAsset !== false)
writer.tag(2, runtime_1.WireType.Varint).bool(message.interactionOnThisAsset);
let u = options.writeUnknownFields;
if (u !== false)
(u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
return writer;
}
}
/**
* @generated MessageType for protobuf message google.ads.googleads.v11.common.AssetInteractionTarget
*/
exports.AssetInteractionTarget = new AssetInteractionTarget$Type();
// @generated message type with reflection information, may provide speed optimized methods
class SkAdNetworkSourceApp$Type extends runtime_5.MessageType {
constructor() {
super("google.ads.googleads.v11.common.SkAdNetworkSourceApp", [
{ no: 1, name: "sk_ad_network_source_app_id", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ }
]);
}
create(value) {
const message = {};
globalThis.Object.defineProperty(message, runtime_4.MESSAGE_TYPE, { enumerable: false, value: this });
if (value !== undefined)
(0, runtime_3.reflectionMergePartial)(this, message, value);
return message;
}
internalBinaryRead(reader, length, options, target) {
let message = target ?? this.create(), end = reader.pos + length;
while (reader.pos < end) {
let [fieldNo, wireType] = reader.tag();
switch (fieldNo) {
case /* optional string sk_ad_network_source_app_id */ 1:
message.skAdNetworkSourceAppId = reader.string();
break;
default:
let u = options.readUnknownField;
if (u === "throw")
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
let d = reader.skip(wireType);
if (u !== false)
(u === true ? runtime_2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
}
}
return message;
}
internalBinaryWrite(message, writer, options) {
/* optional string sk_ad_network_source_app_id = 1; */
if (message.skAdNetworkSourceAppId !== undefined)
writer.tag(1, runtime_1.WireType.LengthDelimited).string(message.skAdNetworkSourceAppId);
let u = options.writeUnknownFields;
if (u !== false)
(u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
return writer;
}
}
/**
* @generated MessageType for protobuf message google.ads.googleads.v11.common.SkAdNetworkSourceApp
*/
exports.SkAdNetworkSourceApp = new SkAdNetworkSourceApp$Type();
//# sourceMappingURL=segments.js.map