UNPKG

@htdangkhoa/google-ads

Version:
1,082 lines 204 kB
"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/v21/common/criteria.proto var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); exports.GeoPointInfo = exports.ProximityInfo = exports.UserListInfo = exports.YouTubeChannelInfo = exports.YouTubeVideoInfo = exports.ParentalStatusInfo = exports.IncomeRangeInfo = exports.GenderInfo = exports.AgeRangeInfo = exports.AdScheduleInfo = exports.InteractionTypeInfo = exports.ActivityCityInfo = exports.ActivityStateInfo = exports.ActivityCountryInfo = exports.ActivityRatingInfo = exports.ActivityIdInfo = exports.HotelCheckInDayInfo = exports.HotelCheckInDateRangeInfo = exports.HotelLengthOfStayInfo = exports.HotelAdvanceBookingWindowInfo = exports.HotelDateSelectionTypeInfo = exports.UnknownListingDimensionInfo = exports.ProductTypeFullInfo = exports.ProductLegacyConditionInfo = exports.ProductLabelsInfo = exports.ProductGroupingInfo = exports.ProductTypeInfo = exports.ProductItemIdInfo = exports.ProductCustomAttributeInfo = exports.ProductConditionInfo = exports.ProductChannelExclusivityInfo = exports.ProductChannelInfo = exports.ProductBrandInfo = exports.ProductCategoryInfo = exports.HotelCityInfo = exports.HotelStateInfo = exports.HotelCountryRegionInfo = exports.HotelClassInfo = exports.HotelIdInfo = exports.ListingDimensionInfo = exports.ListingScopeInfo = exports.ListingDimensionPath = exports.ListingGroupInfo = exports.DeviceInfo = exports.LocationInfo = exports.MobileApplicationInfo = exports.MobileAppCategoryInfo = exports.NegativeKeywordListInfo = exports.PlacementInfo = exports.KeywordInfo = void 0; exports.PlacementListInfo = exports.VideoLineupInfo = exports.ExtendedDemographicInfo = exports.LifeEventInfo = exports.BrandListInfo = exports.BrandInfo = exports.SearchThemeInfo = exports.LocalServiceIdInfo = exports.KeywordThemeInfo = exports.AudienceInfo = exports.CombinedAudienceInfo = exports.CustomAudienceInfo = exports.LocationGroupInfo = exports.CustomIntentInfo = exports.CustomAffinityInfo = exports.MobileDeviceInfo = exports.AppPaymentModelInfo = exports.OperatingSystemVersionInfo = exports.WebpageSampleInfo = exports.WebpageListInfo = exports.WebpageConditionInfo = exports.WebpageInfo = exports.UserInterestInfo = exports.CarrierInfo = exports.ContentLabelInfo = exports.IpBlockInfo = exports.LanguageInfo = exports.TopicInfo = exports.AddressInfo = void 0; /* eslint-disable */ const long_1 = __importDefault(require("long")); const minimal_js_1 = __importDefault(require("protobufjs/minimal.js")); const age_range_type_js_1 = require("../enums/age_range_type.js"); const app_payment_model_type_js_1 = require("../enums/app_payment_model_type.js"); const brand_request_rejection_reason_js_1 = require("../enums/brand_request_rejection_reason.js"); const brand_state_js_1 = require("../enums/brand_state.js"); const content_label_type_js_1 = require("../enums/content_label_type.js"); const day_of_week_js_1 = require("../enums/day_of_week.js"); const device_js_1 = require("../enums/device.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 income_range_type_js_1 = require("../enums/income_range_type.js"); const interaction_type_js_1 = require("../enums/interaction_type.js"); const keyword_match_type_js_1 = require("../enums/keyword_match_type.js"); const listing_group_type_js_1 = require("../enums/listing_group_type.js"); const location_group_radius_units_js_1 = require("../enums/location_group_radius_units.js"); const minute_of_hour_js_1 = require("../enums/minute_of_hour.js"); const parental_status_type_js_1 = require("../enums/parental_status_type.js"); const product_category_level_js_1 = require("../enums/product_category_level.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 product_custom_attribute_index_js_1 = require("../enums/product_custom_attribute_index.js"); const product_type_level_js_1 = require("../enums/product_type_level.js"); const proximity_radius_units_js_1 = require("../enums/proximity_radius_units.js"); const webpage_condition_operand_js_1 = require("../enums/webpage_condition_operand.js"); const webpage_condition_operator_js_1 = require("../enums/webpage_condition_operator.js"); function createBaseKeywordInfo() { return { text: undefined, match_type: 0 }; } exports.KeywordInfo = { encode(message, writer = minimal_js_1.default.Writer.create()) { if (message.text !== undefined) { writer.uint32(26).string(message.text); } if (message.match_type !== undefined && message.match_type !== 0) { writer.uint32(16).int32(message.match_type); } 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 = createBaseKeywordInfo(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { case 3: if (tag !== 26) { break; } message.text = reader.string(); continue; case 2: if (tag !== 16) { break; } message.match_type = reader.int32(); continue; } if ((tag & 7) === 4 || tag === 0) { break; } reader.skipType(tag & 7); } return message; }, fromJSON(object) { return { text: isSet(object.text) ? globalThis.String(object.text) : undefined, match_type: isSet(object.match_type) ? (0, keyword_match_type_js_1.keywordMatchTypeEnum_KeywordMatchTypeFromJSON)(object.match_type) : 0, }; }, toJSON(message) { const obj = {}; if (message.text !== undefined) { obj.text = message.text; } if (message.match_type !== undefined && message.match_type !== 0) { obj.match_type = (0, keyword_match_type_js_1.keywordMatchTypeEnum_KeywordMatchTypeToJSON)(message.match_type); } return obj; }, create(base) { return exports.KeywordInfo.fromPartial(base !== null && base !== void 0 ? base : {}); }, fromPartial(object) { var _a, _b; const message = createBaseKeywordInfo(); message.text = (_a = object.text) !== null && _a !== void 0 ? _a : undefined; message.match_type = (_b = object.match_type) !== null && _b !== void 0 ? _b : 0; return message; }, }; function createBasePlacementInfo() { return { url: undefined }; } exports.PlacementInfo = { encode(message, writer = minimal_js_1.default.Writer.create()) { if (message.url !== undefined) { writer.uint32(18).string(message.url); } 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 = createBasePlacementInfo(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { case 2: if (tag !== 18) { break; } message.url = reader.string(); continue; } if ((tag & 7) === 4 || tag === 0) { break; } reader.skipType(tag & 7); } return message; }, fromJSON(object) { return { url: isSet(object.url) ? globalThis.String(object.url) : undefined }; }, toJSON(message) { const obj = {}; if (message.url !== undefined) { obj.url = message.url; } return obj; }, create(base) { return exports.PlacementInfo.fromPartial(base !== null && base !== void 0 ? base : {}); }, fromPartial(object) { var _a; const message = createBasePlacementInfo(); message.url = (_a = object.url) !== null && _a !== void 0 ? _a : undefined; return message; }, }; function createBaseNegativeKeywordListInfo() { return { shared_set: undefined }; } exports.NegativeKeywordListInfo = { encode(message, writer = minimal_js_1.default.Writer.create()) { if (message.shared_set !== undefined) { writer.uint32(10).string(message.shared_set); } 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 = createBaseNegativeKeywordListInfo(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { case 1: if (tag !== 10) { break; } message.shared_set = reader.string(); continue; } if ((tag & 7) === 4 || tag === 0) { break; } reader.skipType(tag & 7); } return message; }, fromJSON(object) { return { shared_set: isSet(object.shared_set) ? globalThis.String(object.shared_set) : undefined }; }, toJSON(message) { const obj = {}; if (message.shared_set !== undefined) { obj.shared_set = message.shared_set; } return obj; }, create(base) { return exports.NegativeKeywordListInfo.fromPartial(base !== null && base !== void 0 ? base : {}); }, fromPartial(object) { var _a; const message = createBaseNegativeKeywordListInfo(); message.shared_set = (_a = object.shared_set) !== null && _a !== void 0 ? _a : undefined; return message; }, }; function createBaseMobileAppCategoryInfo() { return { mobile_app_category_constant: undefined }; } exports.MobileAppCategoryInfo = { encode(message, writer = minimal_js_1.default.Writer.create()) { if (message.mobile_app_category_constant !== undefined) { writer.uint32(18).string(message.mobile_app_category_constant); } 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 = createBaseMobileAppCategoryInfo(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { case 2: if (tag !== 18) { break; } message.mobile_app_category_constant = reader.string(); continue; } if ((tag & 7) === 4 || tag === 0) { break; } reader.skipType(tag & 7); } return message; }, fromJSON(object) { return { mobile_app_category_constant: isSet(object.mobile_app_category_constant) ? globalThis.String(object.mobile_app_category_constant) : undefined, }; }, toJSON(message) { const obj = {}; if (message.mobile_app_category_constant !== undefined) { obj.mobile_app_category_constant = message.mobile_app_category_constant; } return obj; }, create(base) { return exports.MobileAppCategoryInfo.fromPartial(base !== null && base !== void 0 ? base : {}); }, fromPartial(object) { var _a; const message = createBaseMobileAppCategoryInfo(); message.mobile_app_category_constant = (_a = object.mobile_app_category_constant) !== null && _a !== void 0 ? _a : undefined; return message; }, }; function createBaseMobileApplicationInfo() { return { app_id: undefined, name: undefined }; } exports.MobileApplicationInfo = { encode(message, writer = minimal_js_1.default.Writer.create()) { if (message.app_id !== undefined) { writer.uint32(34).string(message.app_id); } if (message.name !== undefined) { writer.uint32(42).string(message.name); } 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 = createBaseMobileApplicationInfo(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { case 4: if (tag !== 34) { break; } message.app_id = reader.string(); continue; case 5: if (tag !== 42) { break; } message.name = reader.string(); continue; } if ((tag & 7) === 4 || tag === 0) { break; } reader.skipType(tag & 7); } return message; }, fromJSON(object) { return { app_id: isSet(object.app_id) ? globalThis.String(object.app_id) : undefined, name: isSet(object.name) ? globalThis.String(object.name) : undefined, }; }, toJSON(message) { const obj = {}; if (message.app_id !== undefined) { obj.app_id = message.app_id; } if (message.name !== undefined) { obj.name = message.name; } return obj; }, create(base) { return exports.MobileApplicationInfo.fromPartial(base !== null && base !== void 0 ? base : {}); }, fromPartial(object) { var _a, _b; const message = createBaseMobileApplicationInfo(); message.app_id = (_a = object.app_id) !== null && _a !== void 0 ? _a : undefined; message.name = (_b = object.name) !== null && _b !== void 0 ? _b : undefined; return message; }, }; function createBaseLocationInfo() { return { geo_target_constant: undefined }; } exports.LocationInfo = { encode(message, writer = minimal_js_1.default.Writer.create()) { if (message.geo_target_constant !== undefined) { writer.uint32(18).string(message.geo_target_constant); } 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 = createBaseLocationInfo(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { case 2: if (tag !== 18) { break; } message.geo_target_constant = reader.string(); continue; } if ((tag & 7) === 4 || tag === 0) { break; } reader.skipType(tag & 7); } return message; }, fromJSON(object) { return { geo_target_constant: isSet(object.geo_target_constant) ? globalThis.String(object.geo_target_constant) : undefined, }; }, toJSON(message) { const obj = {}; if (message.geo_target_constant !== undefined) { obj.geo_target_constant = message.geo_target_constant; } return obj; }, create(base) { return exports.LocationInfo.fromPartial(base !== null && base !== void 0 ? base : {}); }, fromPartial(object) { var _a; const message = createBaseLocationInfo(); message.geo_target_constant = (_a = object.geo_target_constant) !== null && _a !== void 0 ? _a : undefined; return message; }, }; function createBaseDeviceInfo() { return { type: 0 }; } exports.DeviceInfo = { encode(message, writer = minimal_js_1.default.Writer.create()) { if (message.type !== undefined && message.type !== 0) { writer.uint32(8).int32(message.type); } 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 = createBaseDeviceInfo(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { case 1: if (tag !== 8) { break; } message.type = reader.int32(); continue; } if ((tag & 7) === 4 || tag === 0) { break; } reader.skipType(tag & 7); } return message; }, fromJSON(object) { return { type: isSet(object.type) ? (0, device_js_1.deviceEnum_DeviceFromJSON)(object.type) : 0 }; }, toJSON(message) { const obj = {}; if (message.type !== undefined && message.type !== 0) { obj.type = (0, device_js_1.deviceEnum_DeviceToJSON)(message.type); } return obj; }, create(base) { return exports.DeviceInfo.fromPartial(base !== null && base !== void 0 ? base : {}); }, fromPartial(object) { var _a; const message = createBaseDeviceInfo(); message.type = (_a = object.type) !== null && _a !== void 0 ? _a : 0; return message; }, }; function createBaseListingGroupInfo() { return { type: 0, case_value: undefined, parent_ad_group_criterion: undefined, path: undefined }; } exports.ListingGroupInfo = { encode(message, writer = minimal_js_1.default.Writer.create()) { if (message.type !== undefined && message.type !== 0) { writer.uint32(8).int32(message.type); } if (message.case_value !== undefined) { exports.ListingDimensionInfo.encode(message.case_value, writer.uint32(18).fork()).ldelim(); } if (message.parent_ad_group_criterion !== undefined) { writer.uint32(34).string(message.parent_ad_group_criterion); } if (message.path !== undefined) { exports.ListingDimensionPath.encode(message.path, writer.uint32(42).fork()).ldelim(); } return writer; }, decode(input, length) { const reader = input instanceof minimal_js_1.default.Reader ? input : minimal_js_1.default.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseListingGroupInfo(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { case 1: if (tag !== 8) { break; } message.type = reader.int32(); continue; case 2: if (tag !== 18) { break; } message.case_value = exports.ListingDimensionInfo.decode(reader, reader.uint32()); continue; case 4: if (tag !== 34) { break; } message.parent_ad_group_criterion = reader.string(); continue; case 5: if (tag !== 42) { break; } message.path = exports.ListingDimensionPath.decode(reader, reader.uint32()); continue; } if ((tag & 7) === 4 || tag === 0) { break; } reader.skipType(tag & 7); } return message; }, fromJSON(object) { return { type: isSet(object.type) ? (0, listing_group_type_js_1.listingGroupTypeEnum_ListingGroupTypeFromJSON)(object.type) : 0, case_value: isSet(object.case_value) ? exports.ListingDimensionInfo.fromJSON(object.case_value) : undefined, parent_ad_group_criterion: isSet(object.parent_ad_group_criterion) ? globalThis.String(object.parent_ad_group_criterion) : undefined, path: isSet(object.path) ? exports.ListingDimensionPath.fromJSON(object.path) : undefined, }; }, toJSON(message) { const obj = {}; if (message.type !== undefined && message.type !== 0) { obj.type = (0, listing_group_type_js_1.listingGroupTypeEnum_ListingGroupTypeToJSON)(message.type); } if (message.case_value !== undefined) { obj.case_value = exports.ListingDimensionInfo.toJSON(message.case_value); } if (message.parent_ad_group_criterion !== undefined) { obj.parent_ad_group_criterion = message.parent_ad_group_criterion; } if (message.path !== undefined) { obj.path = exports.ListingDimensionPath.toJSON(message.path); } return obj; }, create(base) { return exports.ListingGroupInfo.fromPartial(base !== null && base !== void 0 ? base : {}); }, fromPartial(object) { var _a, _b; const message = createBaseListingGroupInfo(); message.type = (_a = object.type) !== null && _a !== void 0 ? _a : 0; message.case_value = (object.case_value !== undefined && object.case_value !== null) ? exports.ListingDimensionInfo.fromPartial(object.case_value) : undefined; message.parent_ad_group_criterion = (_b = object.parent_ad_group_criterion) !== null && _b !== void 0 ? _b : undefined; message.path = (object.path !== undefined && object.path !== null) ? exports.ListingDimensionPath.fromPartial(object.path) : undefined; return message; }, }; function createBaseListingDimensionPath() { return { dimensions: [] }; } exports.ListingDimensionPath = { encode(message, writer = minimal_js_1.default.Writer.create()) { if (message.dimensions !== undefined && message.dimensions.length !== 0) { for (const v of message.dimensions) { exports.ListingDimensionInfo.encode(v, writer.uint32(10).fork()).ldelim(); } } return writer; }, decode(input, length) { const reader = input instanceof minimal_js_1.default.Reader ? input : minimal_js_1.default.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseListingDimensionPath(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { case 1: if (tag !== 10) { break; } message.dimensions.push(exports.ListingDimensionInfo.decode(reader, reader.uint32())); continue; } if ((tag & 7) === 4 || tag === 0) { break; } reader.skipType(tag & 7); } return message; }, fromJSON(object) { return { dimensions: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.dimensions) ? object.dimensions.map((e) => exports.ListingDimensionInfo.fromJSON(e)) : [], }; }, toJSON(message) { var _a; const obj = {}; if ((_a = message.dimensions) === null || _a === void 0 ? void 0 : _a.length) { obj.dimensions = message.dimensions.map((e) => exports.ListingDimensionInfo.toJSON(e)); } return obj; }, create(base) { return exports.ListingDimensionPath.fromPartial(base !== null && base !== void 0 ? base : {}); }, fromPartial(object) { var _a; const message = createBaseListingDimensionPath(); message.dimensions = ((_a = object.dimensions) === null || _a === void 0 ? void 0 : _a.map((e) => exports.ListingDimensionInfo.fromPartial(e))) || []; return message; }, }; function createBaseListingScopeInfo() { return { dimensions: [] }; } exports.ListingScopeInfo = { encode(message, writer = minimal_js_1.default.Writer.create()) { if (message.dimensions !== undefined && message.dimensions.length !== 0) { for (const v of message.dimensions) { exports.ListingDimensionInfo.encode(v, writer.uint32(18).fork()).ldelim(); } } return writer; }, decode(input, length) { const reader = input instanceof minimal_js_1.default.Reader ? input : minimal_js_1.default.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseListingScopeInfo(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { case 2: if (tag !== 18) { break; } message.dimensions.push(exports.ListingDimensionInfo.decode(reader, reader.uint32())); continue; } if ((tag & 7) === 4 || tag === 0) { break; } reader.skipType(tag & 7); } return message; }, fromJSON(object) { return { dimensions: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.dimensions) ? object.dimensions.map((e) => exports.ListingDimensionInfo.fromJSON(e)) : [], }; }, toJSON(message) { var _a; const obj = {}; if ((_a = message.dimensions) === null || _a === void 0 ? void 0 : _a.length) { obj.dimensions = message.dimensions.map((e) => exports.ListingDimensionInfo.toJSON(e)); } return obj; }, create(base) { return exports.ListingScopeInfo.fromPartial(base !== null && base !== void 0 ? base : {}); }, fromPartial(object) { var _a; const message = createBaseListingScopeInfo(); message.dimensions = ((_a = object.dimensions) === null || _a === void 0 ? void 0 : _a.map((e) => exports.ListingDimensionInfo.fromPartial(e))) || []; return message; }, }; function createBaseListingDimensionInfo() { return { hotel_id: undefined, hotel_class: undefined, hotel_country_region: undefined, hotel_state: undefined, hotel_city: undefined, product_category: undefined, product_brand: undefined, product_channel: undefined, product_channel_exclusivity: undefined, product_condition: undefined, product_custom_attribute: undefined, product_item_id: undefined, product_type: undefined, product_grouping: undefined, product_labels: undefined, product_legacy_condition: undefined, product_type_full: undefined, activity_id: undefined, activity_rating: undefined, activity_country: undefined, activity_state: undefined, activity_city: undefined, unknown_listing_dimension: undefined, }; } exports.ListingDimensionInfo = { encode(message, writer = minimal_js_1.default.Writer.create()) { if (message.hotel_id !== undefined) { exports.HotelIdInfo.encode(message.hotel_id, writer.uint32(18).fork()).ldelim(); } if (message.hotel_class !== undefined) { exports.HotelClassInfo.encode(message.hotel_class, writer.uint32(26).fork()).ldelim(); } if (message.hotel_country_region !== undefined) { exports.HotelCountryRegionInfo.encode(message.hotel_country_region, writer.uint32(34).fork()).ldelim(); } if (message.hotel_state !== undefined) { exports.HotelStateInfo.encode(message.hotel_state, writer.uint32(42).fork()).ldelim(); } if (message.hotel_city !== undefined) { exports.HotelCityInfo.encode(message.hotel_city, writer.uint32(50).fork()).ldelim(); } if (message.product_category !== undefined) { exports.ProductCategoryInfo.encode(message.product_category, writer.uint32(194).fork()).ldelim(); } if (message.product_brand !== undefined) { exports.ProductBrandInfo.encode(message.product_brand, writer.uint32(122).fork()).ldelim(); } if (message.product_channel !== undefined) { exports.ProductChannelInfo.encode(message.product_channel, writer.uint32(66).fork()).ldelim(); } if (message.product_channel_exclusivity !== undefined) { exports.ProductChannelExclusivityInfo.encode(message.product_channel_exclusivity, writer.uint32(74).fork()).ldelim(); } if (message.product_condition !== undefined) { exports.ProductConditionInfo.encode(message.product_condition, writer.uint32(82).fork()).ldelim(); } if (message.product_custom_attribute !== undefined) { exports.ProductCustomAttributeInfo.encode(message.product_custom_attribute, writer.uint32(130).fork()).ldelim(); } if (message.product_item_id !== undefined) { exports.ProductItemIdInfo.encode(message.product_item_id, writer.uint32(90).fork()).ldelim(); } if (message.product_type !== undefined) { exports.ProductTypeInfo.encode(message.product_type, writer.uint32(98).fork()).ldelim(); } if (message.product_grouping !== undefined) { exports.ProductGroupingInfo.encode(message.product_grouping, writer.uint32(138).fork()).ldelim(); } if (message.product_labels !== undefined) { exports.ProductLabelsInfo.encode(message.product_labels, writer.uint32(146).fork()).ldelim(); } if (message.product_legacy_condition !== undefined) { exports.ProductLegacyConditionInfo.encode(message.product_legacy_condition, writer.uint32(154).fork()).ldelim(); } if (message.product_type_full !== undefined) { exports.ProductTypeFullInfo.encode(message.product_type_full, writer.uint32(162).fork()).ldelim(); } if (message.activity_id !== undefined) { exports.ActivityIdInfo.encode(message.activity_id, writer.uint32(170).fork()).ldelim(); } if (message.activity_rating !== undefined) { exports.ActivityRatingInfo.encode(message.activity_rating, writer.uint32(178).fork()).ldelim(); } if (message.activity_country !== undefined) { exports.ActivityCountryInfo.encode(message.activity_country, writer.uint32(186).fork()).ldelim(); } if (message.activity_state !== undefined) { exports.ActivityStateInfo.encode(message.activity_state, writer.uint32(202).fork()).ldelim(); } if (message.activity_city !== undefined) { exports.ActivityCityInfo.encode(message.activity_city, writer.uint32(210).fork()).ldelim(); } if (message.unknown_listing_dimension !== undefined) { exports.UnknownListingDimensionInfo.encode(message.unknown_listing_dimension, writer.uint32(114).fork()).ldelim(); } return writer; }, decode(input, length) { const reader = input instanceof minimal_js_1.default.Reader ? input : minimal_js_1.default.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseListingDimensionInfo(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { case 2: if (tag !== 18) { break; } message.hotel_id = exports.HotelIdInfo.decode(reader, reader.uint32()); continue; case 3: if (tag !== 26) { break; } message.hotel_class = exports.HotelClassInfo.decode(reader, reader.uint32()); continue; case 4: if (tag !== 34) { break; } message.hotel_country_region = exports.HotelCountryRegionInfo.decode(reader, reader.uint32()); continue; case 5: if (tag !== 42) { break; } message.hotel_state = exports.HotelStateInfo.decode(reader, reader.uint32()); continue; case 6: if (tag !== 50) { break; } message.hotel_city = exports.HotelCityInfo.decode(reader, reader.uint32()); continue; case 24: if (tag !== 194) { break; } message.product_category = exports.ProductCategoryInfo.decode(reader, reader.uint32()); continue; case 15: if (tag !== 122) { break; } message.product_brand = exports.ProductBrandInfo.decode(reader, reader.uint32()); continue; case 8: if (tag !== 66) { break; } message.product_channel = exports.ProductChannelInfo.decode(reader, reader.uint32()); continue; case 9: if (tag !== 74) { break; } message.product_channel_exclusivity = exports.ProductChannelExclusivityInfo.decode(reader, reader.uint32()); continue; case 10: if (tag !== 82) { break; } message.product_condition = exports.ProductConditionInfo.decode(reader, reader.uint32()); continue; case 16: if (tag !== 130) { break; } message.product_custom_attribute = exports.ProductCustomAttributeInfo.decode(reader, reader.uint32()); continue; case 11: if (tag !== 90) { break; } message.product_item_id = exports.ProductItemIdInfo.decode(reader, reader.uint32()); continue; case 12: if (tag !== 98) { break; } message.product_type = exports.ProductTypeInfo.decode(reader, reader.uint32()); continue; case 17: if (tag !== 138) { break; } message.product_grouping = exports.ProductGroupingInfo.decode(reader, reader.uint32()); continue; case 18: if (tag !== 146) { break; } message.product_labels = exports.ProductLabelsInfo.decode(reader, reader.uint32()); continue; case 19: if (tag !== 154) { break; } message.product_legacy_condition = exports.ProductLegacyConditionInfo.decode(reader, reader.uint32()); continue; case 20: if (tag !== 162) { break; } message.product_type_full = exports.ProductTypeFullInfo.decode(reader, reader.uint32()); continue; case 21: if (tag !== 170) { break; } message.activity_id = exports.ActivityIdInfo.decode(reader, reader.uint32()); continue; case 22: if (tag !== 178) { break; } message.activity_rating = exports.ActivityRatingInfo.decode(reader, reader.uint32()); continue; case 23: if (tag !== 186) { break; } message.activity_country = exports.ActivityCountryInfo.decode(reader, reader.uint32()); continue; case 25: if (tag !== 202) { break; } message.activity_state = exports.ActivityStateInfo.decode(reader, reader.uint32()); continue; case 26: if (tag !== 210) { break; } message.activity_city = exports.ActivityCityInfo.decode(reader, reader.uint32()); continue; case 14: if (tag !== 114) { break; } message.unknown_listing_dimension = exports.UnknownListingDimensionInfo.decode(reader, reader.uint32()); continue; } if ((tag & 7) === 4 || tag === 0) { break; } reader.skipType(tag & 7); } return message; }, fromJSON(object) { return { hotel_id: isSet(object.hotel_id) ? exports.HotelIdInfo.fromJSON(object.hotel_id) : undefined, hotel_class: isSet(object.hotel_class) ? exports.HotelClassInfo.fromJSON(object.hotel_class) : undefined, hotel_country_region: isSet(object.hotel_country_region) ? exports.HotelCountryRegionInfo.fromJSON(object.hotel_country_region) : undefined, hotel_state: isSet(object.hotel_state) ? exports.HotelStateInfo.fromJSON(object.hotel_state) : undefined, hotel_city: isSet(object.hotel_city) ? exports.HotelCityInfo.fromJSON(object.hotel_city) : undefined, product_category: isSet(object.product_category) ? exports.ProductCategoryInfo.fromJSON(object.product_category) : undefined, product_brand: isSet(object.product_brand) ? exports.ProductBrandInfo.fromJSON(object.product_brand) : undefined, product_channel: isSet(object.product_channel) ? exports.ProductChannelInfo.fromJSON(object.product_channel) : undefined, product_channel_exclusivity: isSet(object.product_channel_exclusivity) ? exports.ProductChannelExclusivityInfo.fromJSON(object.product_channel_exclusivity) : undefined, product_condition: isSet(object.product_condition) ? exports.ProductConditionInfo.fromJSON(object.product_condition) : undefined, product_custom_attribute: isSet(object.product_custom_attribute) ? exports.ProductCustomAttributeInfo.fromJSON(object.product_custom_attribute) : undefined, product_item_id: isSet(object.product_item_id) ? exports.ProductItemIdInfo.fromJSON(object.product_item_id) : undefined, product_type: isSet(object.product_type) ? exports.ProductTypeInfo.fromJSON(object.product_type) : undefined, product_grouping: isSet(object.product_grouping) ? exports.ProductGroupingInfo.fromJSON(object.product_grouping) : undefined, product_labels: isSet(object.product_labels) ? exports.ProductLabelsInfo.fromJSON(object.product_labels) : undefined, product_legacy_condition: isSet(object.product_legacy_condition) ? exports.ProductLegacyConditionInfo.fromJSON(object.product_legacy_condition) : undefined, product_type_full: isSet(object.product_type_full) ? exports.ProductTypeFullInfo.fromJSON(object.product_type_full) : undefined, activity_id: isSet(object.activity_id) ? exports.ActivityIdInfo.fromJSON(object.activity_id) : undefined, activity_rating: isSet(object.activity_rating) ? exports.ActivityRatingInfo.fromJSON(object.activity_rating) : undefined, activity_country: isSet(object.activity_country) ? exports.ActivityCountryInfo.fromJSON(object.activity_country) : undefined, activity_state: isSet(object.activity_state) ? exports.ActivityStateInfo.fromJSON(object.activity_state) : undefined, activity_city: isSet(object.activity_city) ? exports.ActivityCityInfo.fromJSON(object.activity_city) : undefined, unknown_listing_dimension: isSet(object.unknown_listing_dimension) ? exports.UnknownListingDimensionInfo.fromJSON(object.unknown_listing_dimension) : undefined, }; }, toJSON(message) { const obj = {}; if (message.hotel_id !== undefined) { obj.hotel_id = exports.HotelIdInfo.toJSON(message.hotel_id); } if (message.hotel_class !== undefined) { obj.hotel_class = exports.HotelClassInfo.toJSON(message.hotel_class); } if (message.hotel_country_region !== undefined) { obj.hotel_country_region = exports.HotelCountryRegionInfo.toJSON(message.hotel_country_region); } if (message.hotel_state !== undefined) { obj.hotel_state = exports.HotelStateInfo.toJSON(message.hotel_state); } if (message.hotel_city !== undefined) { obj.hotel_city = exports.HotelCityInfo.toJSON(message.hotel_city); } if (message.product_category !== undefined) { obj.product_category = exports.ProductCategoryInfo.toJSON(message.product_category); } if (message.product_brand !== undefined) { obj.product_brand = exports.ProductBrandInfo.toJSON(message.product_brand); } if (message.product_channel !== undefined) { obj.product_channel = exports.ProductChannelInfo.toJSON(message.product_channel); } if (message.product_channel_exclusivity !== undefined) { obj.product_channel_exclusivity = exports.ProductChannelExclusivityInfo.toJSON(message.product_channel_exclusivity); } if (message.product_condition !== undefined) { obj.product_condition = exports.ProductConditionInfo.toJSON(message.product_condition); } if (message.product_custom_attribute !== undefined) { obj.product_custom_attribute = exports.ProductCustomAttributeInfo.toJSON(message.product_custom_attribute); } if (message.product_item_id !== undefined) { obj.product_item_id = exports.ProductItemIdInfo.toJSON(message.product_item_id); } if (message.product_type !== undefined) { obj.product_type = exports.ProductTypeInfo.toJSON(message.product_type); } if (message.product_grouping !== undefined) { obj.product_grouping = exports.ProductGroupingInfo.toJSON(message.product_grouping); } if (message.product_labels !== undefined) { obj.product_labels = exports.ProductLabelsInfo.toJSON(message.product_labels); } if (message.product_legacy_condition !== undefined) { obj.product_legacy_condition = exports.ProductLegacyConditionInfo.toJSON(message.product_legacy_condition); } if (message.product_type_full !== undefined) { obj.product_type_full = exports.ProductTypeFullInfo.toJSON(message.product_type_full); } if (message.activity_id !== undefined) { obj.activity_id = exports.ActivityIdInfo.toJSON(message.activity_id); } if (message.activity_rating !== undefined) { obj.activity_rating = exports.ActivityRatingInfo.toJSON(message.activity_rating); } if (message.activity_country !== undefined) { obj.activity_country = exports.ActivityCountryInfo.toJSON(message.activity_country); } if (message.activity_state !== undefined) { obj.activity_state = exports.ActivityStateInfo.toJSON(message.activity_state); } if (message.activity_city !== undefined) { obj.activity_city = exports.ActivityCityInfo.toJSON(message.activity_city); } if (message.unknown_listing_dimension !== undefined) { obj.unknown_listing_dimension = exports.UnknownListingDimensionInfo.toJSON(message.unknown_listing_dimension); } return obj; }, create(base) { return exports.ListingDimensionInfo.fromPartial(base !== null && base !== void 0 ? base : {}); }, fromPartial(object) { const message = createBaseListingDimensionInfo(); message.hotel_id = (object.hotel_id !== undefined && object.hotel_id !== null) ? exports.HotelIdInfo.fromPartial(object.hotel_id) : undefined; message.hotel_class = (object.hotel_class !== undefined && object.hotel_class !== null) ? exports.HotelClassInfo.fromPartial(object.hotel_class) : undefined; message.hotel_country_region = (object.hotel_country_region !== undefined && object.hotel_country_region !== null) ? exports.HotelCountryRegionInfo.fromPartial(object.hotel_country_region) : undefined; message.hotel_state = (object.hotel_state !== undefined && object.hotel_state !== null) ? exports.HotelStateInfo.fromPartial(object.hotel_state) : undefined; message.hotel_city = (object.hotel_city !== undefined && object.hotel_city !== null) ? exports.HotelCityInfo.fromPartial(object.hotel_city) : undefined; message.product_category = (object.product_category !== undefined && object.product_category !== null) ? exports.ProductCategoryInfo.fromPartial(object.product_category) : undefined; message.product_brand = (object.product_brand !== undefined && object.product_brand !== null) ? exports.ProductBrandInfo.fromPartial(object.product_brand) : undefined; message.product_channel = (object.product_channel !== undefined && object.product_channel !== null) ? exports.ProductChannelInfo.fromPartial(object.product_channel) : undefined; message.product_channel_exclusivity = (object.product_channel_exclusivity !== undefined && object.product_channel_exclusivity !== null) ? exports.ProductChannelExclusivityInfo.fromPartial(object.product_channel_exclusivity) : undefined; message.product_condition = (object.product_condition !== undefined && object.product_condition !== null) ? exports.ProductConditionInfo.fromPartial(object.product_condition) : undefined; message.product_custom_attribute = (object.product_custom_attribute !== undefined && object.product_custom_attribute !== null) ? exports.ProductCustomAttributeInfo.fromPartial(object.product_custom_attribute) : undefined; message.product_item_id = (object.product_item_id !== undefined && object.product_item_id !== null) ? exports.ProductItemIdInfo.fromPartial(object.product_item_id) : undefined; message.product_type = (object.product_type !== undefined && object.product_type !== null) ? exports.ProductTypeInfo.fromPartial(object.product_type) : undefined; message.product_grouping = (object.product_grouping !== undefined && object.product_grouping !== null) ? exports.ProductGroupingInfo.fromPartial(object.product_grouping) : undefined; message.product_labels = (object.product_labels !== undefined && object.product_labels !== null) ? exports.ProductLabelsInfo.fromPartial(object.product_labels) : undefined; message.product_legacy_condition = (object.product_legacy_condition !== undefined && object.product_legacy_condition !== null) ? exports.ProductLegacyConditionInfo.fromPartial(obje