import {z} from 'zod' export type GoogleAdsSearchads360V23CommonAdScheduleInfo = {dayOfWeek?: ('UNSPECIFIED' | 'UNKNOWN' | 'MONDAY' | 'TUESDAY' | 'WEDNESDAY' | 'THURSDAY' | 'FRIDAY' | 'SATURDAY' | 'SUNDAY') | undefined, endHour?: number | undefined, endMinute?: ('UNSPECIFIED' | 'UNKNOWN' | 'ZERO' | 'FIFTEEN' | 'THIRTY' | 'FORTY_FIVE') | undefined, startHour?: number | undefined, startMinute?: ('UNSPECIFIED' | 'UNKNOWN' | 'ZERO' | 'FIFTEEN' | 'THIRTY' | 'FORTY_FIVE') | undefined}; export type GoogleAdsSearchads360V23CommonAgeRangeInfo = {type?: ('UNSPECIFIED' | 'UNKNOWN' | 'AGE_RANGE_18_24' | 'AGE_RANGE_25_34' | 'AGE_RANGE_35_44' | 'AGE_RANGE_45_54' | 'AGE_RANGE_55_64' | 'AGE_RANGE_65_UP' | 'AGE_RANGE_UNDETERMINED') | undefined}; export type GoogleAdsSearchads360V23CommonBrandListInfo = {sharedSet?: string | undefined}; export type GoogleAdsSearchads360V23CommonCarrierInfo = {carrierConstant?: string | undefined}; export type GoogleAdsSearchads360V23CommonCombinedAudienceInfo = {combinedAudience?: string | undefined}; export type GoogleAdsSearchads360V23CommonContentLabelInfo = {type?: ('UNSPECIFIED' | 'UNKNOWN' | 'SEXUALLY_SUGGESTIVE' | 'BELOW_THE_FOLD' | 'PARKED_DOMAIN' | 'JUVENILE' | 'PROFANITY' | 'TRAGEDY' | 'VIDEO' | 'VIDEO_RATING_DV_G' | 'VIDEO_RATING_DV_PG' | 'VIDEO_RATING_DV_T' | 'VIDEO_RATING_DV_MA' | 'VIDEO_NOT_YET_RATED' | 'EMBEDDED_VIDEO' | 'LIVE_STREAMING_VIDEO' | 'SOCIAL_ISSUES' | 'BRAND_SUITABILITY_CONTENT_FOR_FAMILIES' | 'BRAND_SUITABILITY_GAMES_FIGHTING' | 'BRAND_SUITABILITY_GAMES_MATURE' | 'BRAND_SUITABILITY_HEALTH_SENSITIVE' | 'BRAND_SUITABILITY_HEALTH_SOURCE_UNDETERMINED' | 'BRAND_SUITABILITY_NEWS_RECENT' | 'BRAND_SUITABILITY_NEWS_SENSITIVE' | 'BRAND_SUITABILITY_NEWS_SOURCE_NOT_FEATURED' | 'BRAND_SUITABILITY_POLITICS' | 'BRAND_SUITABILITY_RELIGION') | undefined}; export type GoogleAdsSearchads360V23CommonDeviceInfo = {type?: ('UNSPECIFIED' | 'UNKNOWN' | 'MOBILE' | 'TABLET' | 'DESKTOP' | 'CONNECTED_TV' | 'OTHER') | undefined}; export type GoogleAdsSearchads360V23CommonExtendedDemographicInfo = {extendedDemographicId?: unknown | undefined}; export type GoogleAdsSearchads360V23CommonGenderInfo = {type?: ('UNSPECIFIED' | 'UNKNOWN' | 'MALE' | 'FEMALE' | 'UNDETERMINED') | undefined}; export type GoogleAdsSearchads360V23CommonIncomeRangeInfo = {type?: ('UNSPECIFIED' | 'UNKNOWN' | 'INCOME_RANGE_0_50' | 'INCOME_RANGE_50_60' | 'INCOME_RANGE_60_70' | 'INCOME_RANGE_70_80' | 'INCOME_RANGE_80_90' | 'INCOME_RANGE_90_UP' | 'INCOME_RANGE_UNDETERMINED') | undefined}; export type GoogleAdsSearchads360V23CommonIpBlockInfo = {ipAddress?: string | undefined}; export type GoogleAdsSearchads360V23CommonKeywordInfo = {matchType?: ('UNSPECIFIED' | 'UNKNOWN' | 'EXACT' | 'PHRASE' | 'BROAD') | undefined, text?: string | undefined}; export type GoogleAdsSearchads360V23CommonKeywordThemeInfo = {freeFormKeywordTheme?: string | undefined, keywordThemeConstant?: string | undefined}; export type GoogleAdsSearchads360V23CommonLanguageInfo = {languageConstant?: string | undefined}; export type GoogleAdsSearchads360V23CommonLifeEventInfo = {lifeEventId?: unknown | undefined}; export type GoogleAdsSearchads360V23CommonActivityCityInfo = {value?: string | undefined}; export type GoogleAdsSearchads360V23CommonActivityCountryInfo = {value?: string | undefined}; export type GoogleAdsSearchads360V23CommonActivityIdInfo = {value?: string | undefined}; export type GoogleAdsSearchads360V23CommonActivityRatingInfo = {value?: unknown | undefined}; export type GoogleAdsSearchads360V23CommonActivityStateInfo = {value?: string | undefined}; export type GoogleAdsSearchads360V23CommonHotelCityInfo = {cityCriterion?: string | undefined}; export type GoogleAdsSearchads360V23CommonHotelClassInfo = {value?: unknown | undefined}; export type GoogleAdsSearchads360V23CommonHotelCountryRegionInfo = {countryRegionCriterion?: string | undefined}; export type GoogleAdsSearchads360V23CommonHotelIdInfo = {value?: string | undefined}; export type GoogleAdsSearchads360V23CommonHotelStateInfo = {stateCriterion?: string | undefined}; export type GoogleAdsSearchads360V23CommonProductBrandInfo = {value?: string | undefined}; export type GoogleAdsSearchads360V23CommonProductCategoryInfo = {categoryId?: unknown | undefined, level?: ('UNSPECIFIED' | 'UNKNOWN' | 'LEVEL1' | 'LEVEL2' | 'LEVEL3' | 'LEVEL4' | 'LEVEL5') | undefined}; export type GoogleAdsSearchads360V23CommonProductChannelInfo = {channel?: ('UNSPECIFIED' | 'UNKNOWN' | 'ONLINE' | 'LOCAL') | undefined}; export type GoogleAdsSearchads360V23CommonProductChannelExclusivityInfo = {channelExclusivity?: ('UNSPECIFIED' | 'UNKNOWN' | 'SINGLE_CHANNEL' | 'MULTI_CHANNEL') | undefined}; export type GoogleAdsSearchads360V23CommonProductConditionInfo = {condition?: ('UNSPECIFIED' | 'UNKNOWN' | 'NEW' | 'REFURBISHED' | 'USED') | undefined}; export type GoogleAdsSearchads360V23CommonProductCustomAttributeInfo = {index?: ('UNSPECIFIED' | 'UNKNOWN' | 'INDEX0' | 'INDEX1' | 'INDEX2' | 'INDEX3' | 'INDEX4') | undefined, value?: string | undefined}; export type GoogleAdsSearchads360V23CommonProductGroupingInfo = {value?: string | undefined}; export type GoogleAdsSearchads360V23CommonProductItemIdInfo = {value?: string | undefined}; export type GoogleAdsSearchads360V23CommonProductLabelsInfo = {value?: string | undefined}; export type GoogleAdsSearchads360V23CommonProductLegacyConditionInfo = {value?: string | undefined}; export type GoogleAdsSearchads360V23CommonProductTypeInfo = {level?: ('UNSPECIFIED' | 'UNKNOWN' | 'LEVEL1' | 'LEVEL2' | 'LEVEL3' | 'LEVEL4' | 'LEVEL5') | undefined, value?: string | undefined}; export type GoogleAdsSearchads360V23CommonProductTypeFullInfo = {value?: string | undefined}; export type GoogleAdsSearchads360V23CommonUnknownListingDimensionInfo = Record; export type GoogleAdsSearchads360V23CommonListingDimensionInfo = {activityCity?: GoogleAdsSearchads360V23CommonActivityCityInfo | undefined, activityCountry?: GoogleAdsSearchads360V23CommonActivityCountryInfo | undefined, activityId?: GoogleAdsSearchads360V23CommonActivityIdInfo | undefined, activityRating?: GoogleAdsSearchads360V23CommonActivityRatingInfo | undefined, activityState?: GoogleAdsSearchads360V23CommonActivityStateInfo | undefined, hotelCity?: GoogleAdsSearchads360V23CommonHotelCityInfo | undefined, hotelClass?: GoogleAdsSearchads360V23CommonHotelClassInfo | undefined, hotelCountryRegion?: GoogleAdsSearchads360V23CommonHotelCountryRegionInfo | undefined, hotelId?: GoogleAdsSearchads360V23CommonHotelIdInfo | undefined, hotelState?: GoogleAdsSearchads360V23CommonHotelStateInfo | undefined, productBrand?: GoogleAdsSearchads360V23CommonProductBrandInfo | undefined, productCategory?: GoogleAdsSearchads360V23CommonProductCategoryInfo | undefined, productChannel?: GoogleAdsSearchads360V23CommonProductChannelInfo | undefined, productChannelExclusivity?: GoogleAdsSearchads360V23CommonProductChannelExclusivityInfo | undefined, productCondition?: GoogleAdsSearchads360V23CommonProductConditionInfo | undefined, productCustomAttribute?: GoogleAdsSearchads360V23CommonProductCustomAttributeInfo | undefined, productGrouping?: GoogleAdsSearchads360V23CommonProductGroupingInfo | undefined, productItemId?: GoogleAdsSearchads360V23CommonProductItemIdInfo | undefined, productLabels?: GoogleAdsSearchads360V23CommonProductLabelsInfo | undefined, productLegacyCondition?: GoogleAdsSearchads360V23CommonProductLegacyConditionInfo | undefined, productType?: GoogleAdsSearchads360V23CommonProductTypeInfo | undefined, productTypeFull?: GoogleAdsSearchads360V23CommonProductTypeFullInfo | undefined, unknownListingDimension?: GoogleAdsSearchads360V23CommonUnknownListingDimensionInfo | undefined}; export type GoogleAdsSearchads360V23CommonListingScopeInfo = {dimensions?: Array | undefined}; export type GoogleAdsSearchads360V23CommonLocalServiceIdInfo = {serviceId?: string | undefined}; export type GoogleAdsSearchads360V23CommonLocationInfo = {geoTargetConstant?: string | undefined}; export type GoogleAdsSearchads360V23CommonLocationGroupInfo = {enableCustomerLevelLocationAssetSet?: boolean | undefined, feedItemSets?: Array | undefined, geoTargetConstants?: Array | undefined, locationGroupAssetSets?: Array | undefined, radius?: unknown | undefined, radiusUnits?: ('UNSPECIFIED' | 'UNKNOWN' | 'METERS' | 'MILES' | 'MILLI_MILES') | undefined}; export type GoogleAdsSearchads360V23CommonMobileAppCategoryInfo = {mobileAppCategoryConstant?: string | undefined}; export type GoogleAdsSearchads360V23CommonMobileApplicationInfo = {appId?: string | undefined, name?: string | undefined}; export type GoogleAdsSearchads360V23CommonMobileDeviceInfo = {mobileDeviceConstant?: string | undefined}; export type GoogleAdsSearchads360V23CommonOperatingSystemVersionInfo = {operatingSystemVersionConstant?: string | undefined}; export type GoogleAdsSearchads360V23CommonParentalStatusInfo = {type?: ('UNSPECIFIED' | 'UNKNOWN' | 'PARENT' | 'NOT_A_PARENT' | 'UNDETERMINED') | undefined}; export type GoogleAdsSearchads360V23CommonPlacementInfo = {url?: string | undefined}; export type GoogleAdsSearchads360V23CommonAddressInfo = {cityName?: string | undefined, countryCode?: string | undefined, postalCode?: string | undefined, provinceCode?: string | undefined, provinceName?: string | undefined, streetAddress?: string | undefined, streetAddress2?: string | undefined}; export type GoogleAdsSearchads360V23CommonGeoPointInfo = {latitudeInMicroDegrees?: number | undefined, longitudeInMicroDegrees?: number | undefined}; export type GoogleAdsSearchads360V23CommonProximityInfo = {address?: GoogleAdsSearchads360V23CommonAddressInfo | undefined, geoPoint?: GoogleAdsSearchads360V23CommonGeoPointInfo | undefined, radius?: number | undefined, radiusUnits?: ('UNSPECIFIED' | 'UNKNOWN' | 'MILES' | 'KILOMETERS') | undefined}; export type GoogleAdsSearchads360V23CommonTopicInfo = {path?: Array | undefined, topicConstant?: string | undefined}; export type GoogleAdsSearchads360V23CommonUserInterestInfo = {userInterestCategory?: string | undefined}; export type GoogleAdsSearchads360V23CommonUserListInfo = {userList?: string | undefined}; export type GoogleAdsSearchads360V23CommonVideoLineupInfo = {videoLineupId?: unknown | undefined}; export type GoogleAdsSearchads360V23CommonWebpageConditionInfo = {argument?: string | undefined, operand?: ('UNSPECIFIED' | 'UNKNOWN' | 'URL' | 'CATEGORY' | 'PAGE_TITLE' | 'PAGE_CONTENT' | 'CUSTOM_LABEL') | undefined, operator?: ('UNSPECIFIED' | 'UNKNOWN' | 'EQUALS' | 'CONTAINS') | undefined}; export type GoogleAdsSearchads360V23CommonWebpageSampleInfo = {sampleUrls?: Array | undefined}; export type GoogleAdsSearchads360V23CommonWebpageInfo = {conditions?: Array | undefined, coveragePercentage?: number | undefined, criterionName?: string | undefined, sample?: GoogleAdsSearchads360V23CommonWebpageSampleInfo | undefined}; export type GoogleAdsSearchads360V23CommonWebpageListInfo = {sharedSet?: string | undefined}; export type GoogleAdsSearchads360V23CommonYouTubeChannelInfo = {channelId?: string | undefined}; export type GoogleAdsSearchads360V23CommonYouTubeVideoInfo = {videoId?: string | undefined}; export type GoogleAdsSearchads360V23ResourcesCampaignCriterion = {adSchedule?: GoogleAdsSearchads360V23CommonAdScheduleInfo | undefined, ageRange?: GoogleAdsSearchads360V23CommonAgeRangeInfo | undefined, bidModifier?: number | undefined, brandList?: GoogleAdsSearchads360V23CommonBrandListInfo | undefined, campaign?: string | undefined, carrier?: GoogleAdsSearchads360V23CommonCarrierInfo | undefined, combinedAudience?: GoogleAdsSearchads360V23CommonCombinedAudienceInfo | undefined, contentLabel?: GoogleAdsSearchads360V23CommonContentLabelInfo | undefined, criterionId?: unknown | undefined, device?: GoogleAdsSearchads360V23CommonDeviceInfo | undefined, displayName?: string | undefined, extendedDemographic?: GoogleAdsSearchads360V23CommonExtendedDemographicInfo | undefined, gender?: GoogleAdsSearchads360V23CommonGenderInfo | undefined, incomeRange?: GoogleAdsSearchads360V23CommonIncomeRangeInfo | undefined, ipBlock?: GoogleAdsSearchads360V23CommonIpBlockInfo | undefined, keyword?: GoogleAdsSearchads360V23CommonKeywordInfo | undefined, keywordTheme?: GoogleAdsSearchads360V23CommonKeywordThemeInfo | undefined, language?: GoogleAdsSearchads360V23CommonLanguageInfo | undefined, lastModifiedTime?: string | undefined, lifeEvent?: GoogleAdsSearchads360V23CommonLifeEventInfo | undefined, listingScope?: GoogleAdsSearchads360V23CommonListingScopeInfo | undefined, localServiceId?: GoogleAdsSearchads360V23CommonLocalServiceIdInfo | undefined, location?: GoogleAdsSearchads360V23CommonLocationInfo | undefined, locationGroup?: GoogleAdsSearchads360V23CommonLocationGroupInfo | undefined, mobileAppCategory?: GoogleAdsSearchads360V23CommonMobileAppCategoryInfo | undefined, mobileApplication?: GoogleAdsSearchads360V23CommonMobileApplicationInfo | undefined, mobileDevice?: GoogleAdsSearchads360V23CommonMobileDeviceInfo | undefined, negative?: boolean | undefined, operatingSystemVersion?: GoogleAdsSearchads360V23CommonOperatingSystemVersionInfo | undefined, parentalStatus?: GoogleAdsSearchads360V23CommonParentalStatusInfo | undefined, placement?: GoogleAdsSearchads360V23CommonPlacementInfo | undefined, proximity?: GoogleAdsSearchads360V23CommonProximityInfo | undefined, resourceName?: string | undefined, status?: ('UNSPECIFIED' | 'UNKNOWN' | 'ENABLED' | 'PAUSED' | 'REMOVED') | undefined, topic?: GoogleAdsSearchads360V23CommonTopicInfo | undefined, type?: ('UNSPECIFIED' | 'UNKNOWN' | 'KEYWORD' | 'PLACEMENT' | 'MOBILE_APP_CATEGORY' | 'MOBILE_APPLICATION' | 'DEVICE' | 'LOCATION' | 'LISTING_GROUP' | 'AD_SCHEDULE' | 'AGE_RANGE' | 'GENDER' | 'INCOME_RANGE' | 'PARENTAL_STATUS' | 'YOUTUBE_VIDEO' | 'YOUTUBE_CHANNEL' | 'USER_LIST' | 'PROXIMITY' | 'TOPIC' | 'LISTING_SCOPE' | 'LANGUAGE' | 'IP_BLOCK' | 'CONTENT_LABEL' | 'CARRIER' | 'USER_INTEREST' | 'WEBPAGE' | 'OPERATING_SYSTEM_VERSION' | 'APP_PAYMENT_MODEL' | 'MOBILE_DEVICE' | 'CUSTOM_AFFINITY' | 'CUSTOM_INTENT' | 'LOCATION_GROUP' | 'CUSTOM_AUDIENCE' | 'COMBINED_AUDIENCE' | 'KEYWORD_THEME' | 'AUDIENCE' | 'NEGATIVE_KEYWORD_LIST' | 'LOCAL_SERVICE_ID' | 'SEARCH_THEME' | 'BRAND' | 'BRAND_LIST' | 'LIFE_EVENT' | 'WEBPAGE_LIST' | 'VIDEO_LINEUP' | 'PLACEMENT_LIST' | 'VERTICAL_ADS_ITEM_GROUP_RULE_LIST' | 'VERTICAL_ADS_ITEM_GROUP_RULE') | undefined, userInterest?: GoogleAdsSearchads360V23CommonUserInterestInfo | undefined, userList?: GoogleAdsSearchads360V23CommonUserListInfo | undefined, videoLineup?: GoogleAdsSearchads360V23CommonVideoLineupInfo | undefined, webpage?: GoogleAdsSearchads360V23CommonWebpageInfo | undefined, webpageList?: GoogleAdsSearchads360V23CommonWebpageListInfo | undefined, youtubeChannel?: GoogleAdsSearchads360V23CommonYouTubeChannelInfo | undefined, youtubeVideo?: GoogleAdsSearchads360V23CommonYouTubeVideoInfo | undefined}; export type GoogleAdsSearchads360V23ServicesCampaignCriterionOperation = {create?: GoogleAdsSearchads360V23ResourcesCampaignCriterion | undefined, remove?: string | undefined, update?: GoogleAdsSearchads360V23ResourcesCampaignCriterion | undefined, updateMask?: unknown | undefined}; export type GoogleAdsSearchads360V23ServicesMutateCampaignCriteriaRequest = {operations?: Array | undefined, partialFailure?: boolean | undefined, responseContentType?: ('UNSPECIFIED' | 'RESOURCE_NAME_ONLY' | 'MUTABLE_RESOURCE') | undefined, validateOnly?: boolean | undefined}; export type CreateApiV23CustomersCustomersIdCampaignCriteriaMutateArgs = {customersId: string, body: GoogleAdsSearchads360V23ServicesMutateCampaignCriteriaRequest}; export type CreateApiV23CustomersCustomersIdCampaignCriteriaMutateOptions = {baseUrl?: string | undefined, Oauth2?: string | undefined, Oauth2c?: string | undefined, fetch?: typeof fetch | undefined}; export const googleRpcStatus = z.object({code: z.number().int().optional(), details: z.array(z.record(z.string(), z.unknown())).optional(), message: z.string().optional()}); export const googleAdsSearchads360V23CommonAdScheduleInfo = z.object({dayOfWeek: z.enum(["UNSPECIFIED", "UNKNOWN", "MONDAY", "TUESDAY", "WEDNESDAY", "THURSDAY", "FRIDAY", "SATURDAY", "SUNDAY"]).optional(), endHour: z.number().int().optional(), endMinute: z.enum(["UNSPECIFIED", "UNKNOWN", "ZERO", "FIFTEEN", "THIRTY", "FORTY_FIVE"]).optional(), startHour: z.number().int().optional(), startMinute: z.enum(["UNSPECIFIED", "UNKNOWN", "ZERO", "FIFTEEN", "THIRTY", "FORTY_FIVE"]).optional()}); export const googleAdsSearchads360V23CommonAgeRangeInfo = z.object({type: z.enum(["UNSPECIFIED", "UNKNOWN", "AGE_RANGE_18_24", "AGE_RANGE_25_34", "AGE_RANGE_35_44", "AGE_RANGE_45_54", "AGE_RANGE_55_64", "AGE_RANGE_65_UP", "AGE_RANGE_UNDETERMINED"]).optional()}); export const googleAdsSearchads360V23CommonBrandListInfo = z.object({sharedSet: z.string().optional()}); export const googleAdsSearchads360V23CommonCarrierInfo = z.object({carrierConstant: z.string().optional()}); export const googleAdsSearchads360V23CommonCombinedAudienceInfo = z.object({combinedAudience: z.string().optional()}); export const googleAdsSearchads360V23CommonContentLabelInfo = z.object({type: z.enum(["UNSPECIFIED", "UNKNOWN", "SEXUALLY_SUGGESTIVE", "BELOW_THE_FOLD", "PARKED_DOMAIN", "JUVENILE", "PROFANITY", "TRAGEDY", "VIDEO", "VIDEO_RATING_DV_G", "VIDEO_RATING_DV_PG", "VIDEO_RATING_DV_T", "VIDEO_RATING_DV_MA", "VIDEO_NOT_YET_RATED", "EMBEDDED_VIDEO", "LIVE_STREAMING_VIDEO", "SOCIAL_ISSUES", "BRAND_SUITABILITY_CONTENT_FOR_FAMILIES", "BRAND_SUITABILITY_GAMES_FIGHTING", "BRAND_SUITABILITY_GAMES_MATURE", "BRAND_SUITABILITY_HEALTH_SENSITIVE", "BRAND_SUITABILITY_HEALTH_SOURCE_UNDETERMINED", "BRAND_SUITABILITY_NEWS_RECENT", "BRAND_SUITABILITY_NEWS_SENSITIVE", "BRAND_SUITABILITY_NEWS_SOURCE_NOT_FEATURED", "BRAND_SUITABILITY_POLITICS", "BRAND_SUITABILITY_RELIGION"]).optional()}); export const googleAdsSearchads360V23CommonDeviceInfo = z.object({type: z.enum(["UNSPECIFIED", "UNKNOWN", "MOBILE", "TABLET", "DESKTOP", "CONNECTED_TV", "OTHER"]).optional()}); export const googleAdsSearchads360V23CommonExtendedDemographicInfo = z.object({extendedDemographicId: z.string().optional()}); export const googleAdsSearchads360V23CommonGenderInfo = z.object({type: z.enum(["UNSPECIFIED", "UNKNOWN", "MALE", "FEMALE", "UNDETERMINED"]).optional()}); export const googleAdsSearchads360V23CommonIncomeRangeInfo = z.object({type: z.enum(["UNSPECIFIED", "UNKNOWN", "INCOME_RANGE_0_50", "INCOME_RANGE_50_60", "INCOME_RANGE_60_70", "INCOME_RANGE_70_80", "INCOME_RANGE_80_90", "INCOME_RANGE_90_UP", "INCOME_RANGE_UNDETERMINED"]).optional()}); export const googleAdsSearchads360V23CommonIpBlockInfo = z.object({ipAddress: z.string().optional()}); export const googleAdsSearchads360V23CommonKeywordInfo = z.object({matchType: z.enum(["UNSPECIFIED", "UNKNOWN", "EXACT", "PHRASE", "BROAD"]).optional(), text: z.string().optional()}); export const googleAdsSearchads360V23CommonKeywordThemeInfo = z.object({freeFormKeywordTheme: z.string().optional(), keywordThemeConstant: z.string().optional()}); export const googleAdsSearchads360V23CommonLanguageInfo = z.object({languageConstant: z.string().optional()}); export const googleAdsSearchads360V23CommonLifeEventInfo = z.object({lifeEventId: z.string().optional()}); export const googleAdsSearchads360V23CommonActivityCityInfo = z.object({value: z.string().optional()}); export const googleAdsSearchads360V23CommonActivityCountryInfo = z.object({value: z.string().optional()}); export const googleAdsSearchads360V23CommonActivityIdInfo = z.object({value: z.string().optional()}); export const googleAdsSearchads360V23CommonActivityRatingInfo = z.object({value: z.string().optional()}); export const googleAdsSearchads360V23CommonActivityStateInfo = z.object({value: z.string().optional()}); export const googleAdsSearchads360V23CommonHotelCityInfo = z.object({cityCriterion: z.string().optional()}); export const googleAdsSearchads360V23CommonHotelClassInfo = z.object({value: z.string().optional()}); export const googleAdsSearchads360V23CommonHotelCountryRegionInfo = z.object({countryRegionCriterion: z.string().optional()}); export const googleAdsSearchads360V23CommonHotelIdInfo = z.object({value: z.string().optional()}); export const googleAdsSearchads360V23CommonHotelStateInfo = z.object({stateCriterion: z.string().optional()}); export const googleAdsSearchads360V23CommonProductBrandInfo = z.object({value: z.string().optional()}); export const googleAdsSearchads360V23CommonProductCategoryInfo = z.object({categoryId: z.string().optional(), level: z.enum(["UNSPECIFIED", "UNKNOWN", "LEVEL1", "LEVEL2", "LEVEL3", "LEVEL4", "LEVEL5"]).optional()}); export const googleAdsSearchads360V23CommonProductChannelInfo = z.object({channel: z.enum(["UNSPECIFIED", "UNKNOWN", "ONLINE", "LOCAL"]).optional()}); export const googleAdsSearchads360V23CommonProductChannelExclusivityInfo = z.object({channelExclusivity: z.enum(["UNSPECIFIED", "UNKNOWN", "SINGLE_CHANNEL", "MULTI_CHANNEL"]).optional()}); export const googleAdsSearchads360V23CommonProductConditionInfo = z.object({condition: z.enum(["UNSPECIFIED", "UNKNOWN", "NEW", "REFURBISHED", "USED"]).optional()}); export const googleAdsSearchads360V23CommonProductCustomAttributeInfo = z.object({index: z.enum(["UNSPECIFIED", "UNKNOWN", "INDEX0", "INDEX1", "INDEX2", "INDEX3", "INDEX4"]).optional(), value: z.string().optional()}); export const googleAdsSearchads360V23CommonProductGroupingInfo = z.object({value: z.string().optional()}); export const googleAdsSearchads360V23CommonProductItemIdInfo = z.object({value: z.string().optional()}); export const googleAdsSearchads360V23CommonProductLabelsInfo = z.object({value: z.string().optional()}); export const googleAdsSearchads360V23CommonProductLegacyConditionInfo = z.object({value: z.string().optional()}); export const googleAdsSearchads360V23CommonProductTypeInfo = z.object({level: z.enum(["UNSPECIFIED", "UNKNOWN", "LEVEL1", "LEVEL2", "LEVEL3", "LEVEL4", "LEVEL5"]).optional(), value: z.string().optional()}); export const googleAdsSearchads360V23CommonProductTypeFullInfo = z.object({value: z.string().optional()}); export const googleAdsSearchads360V23CommonUnknownListingDimensionInfo = z.object({}); export const googleAdsSearchads360V23CommonListingDimensionInfo = z.object({activityCity: googleAdsSearchads360V23CommonActivityCityInfo.optional(), activityCountry: googleAdsSearchads360V23CommonActivityCountryInfo.optional(), activityId: googleAdsSearchads360V23CommonActivityIdInfo.optional(), activityRating: googleAdsSearchads360V23CommonActivityRatingInfo.optional(), activityState: googleAdsSearchads360V23CommonActivityStateInfo.optional(), hotelCity: googleAdsSearchads360V23CommonHotelCityInfo.optional(), hotelClass: googleAdsSearchads360V23CommonHotelClassInfo.optional(), hotelCountryRegion: googleAdsSearchads360V23CommonHotelCountryRegionInfo.optional(), hotelId: googleAdsSearchads360V23CommonHotelIdInfo.optional(), hotelState: googleAdsSearchads360V23CommonHotelStateInfo.optional(), productBrand: googleAdsSearchads360V23CommonProductBrandInfo.optional(), productCategory: googleAdsSearchads360V23CommonProductCategoryInfo.optional(), productChannel: googleAdsSearchads360V23CommonProductChannelInfo.optional(), productChannelExclusivity: googleAdsSearchads360V23CommonProductChannelExclusivityInfo.optional(), productCondition: googleAdsSearchads360V23CommonProductConditionInfo.optional(), productCustomAttribute: googleAdsSearchads360V23CommonProductCustomAttributeInfo.optional(), productGrouping: googleAdsSearchads360V23CommonProductGroupingInfo.optional(), productItemId: googleAdsSearchads360V23CommonProductItemIdInfo.optional(), productLabels: googleAdsSearchads360V23CommonProductLabelsInfo.optional(), productLegacyCondition: googleAdsSearchads360V23CommonProductLegacyConditionInfo.optional(), productType: googleAdsSearchads360V23CommonProductTypeInfo.optional(), productTypeFull: googleAdsSearchads360V23CommonProductTypeFullInfo.optional(), unknownListingDimension: googleAdsSearchads360V23CommonUnknownListingDimensionInfo.optional()}); export const googleAdsSearchads360V23CommonListingScopeInfo = z.object({dimensions: z.array(googleAdsSearchads360V23CommonListingDimensionInfo).optional()}); export const googleAdsSearchads360V23CommonLocalServiceIdInfo = z.object({serviceId: z.string().optional()}); export const googleAdsSearchads360V23CommonLocationInfo = z.object({geoTargetConstant: z.string().optional()}); export const googleAdsSearchads360V23CommonLocationGroupInfo = z.object({enableCustomerLevelLocationAssetSet: z.boolean().optional(), feedItemSets: z.array(z.string()).optional(), geoTargetConstants: z.array(z.string()).optional(), locationGroupAssetSets: z.array(z.string()).optional(), radius: z.string().optional(), radiusUnits: z.enum(["UNSPECIFIED", "UNKNOWN", "METERS", "MILES", "MILLI_MILES"]).optional()}); export const googleAdsSearchads360V23CommonMobileAppCategoryInfo = z.object({mobileAppCategoryConstant: z.string().optional()}); export const googleAdsSearchads360V23CommonMobileApplicationInfo = z.object({appId: z.string().optional(), name: z.string().optional()}); export const googleAdsSearchads360V23CommonMobileDeviceInfo = z.object({mobileDeviceConstant: z.string().optional()}); export const googleAdsSearchads360V23CommonOperatingSystemVersionInfo = z.object({operatingSystemVersionConstant: z.string().optional()}); export const googleAdsSearchads360V23CommonParentalStatusInfo = z.object({type: z.enum(["UNSPECIFIED", "UNKNOWN", "PARENT", "NOT_A_PARENT", "UNDETERMINED"]).optional()}); export const googleAdsSearchads360V23CommonPlacementInfo = z.object({url: z.string().optional()}); export const googleAdsSearchads360V23CommonAddressInfo = z.object({cityName: z.string().optional(), countryCode: z.string().optional(), postalCode: z.string().optional(), provinceCode: z.string().optional(), provinceName: z.string().optional(), streetAddress: z.string().optional(), streetAddress2: z.string().optional()}); export const googleAdsSearchads360V23CommonGeoPointInfo = z.object({latitudeInMicroDegrees: z.number().int().optional(), longitudeInMicroDegrees: z.number().int().optional()}); export const googleAdsSearchads360V23CommonProximityInfo = z.object({address: googleAdsSearchads360V23CommonAddressInfo.optional(), geoPoint: googleAdsSearchads360V23CommonGeoPointInfo.optional(), radius: z.number().optional(), radiusUnits: z.enum(["UNSPECIFIED", "UNKNOWN", "MILES", "KILOMETERS"]).optional()}); export const googleAdsSearchads360V23CommonTopicInfo = z.object({path: z.array(z.string()).optional(), topicConstant: z.string().optional()}); export const googleAdsSearchads360V23CommonUserInterestInfo = z.object({userInterestCategory: z.string().optional()}); export const googleAdsSearchads360V23CommonUserListInfo = z.object({userList: z.string().optional()}); export const googleAdsSearchads360V23CommonVideoLineupInfo = z.object({videoLineupId: z.string().optional()}); export const googleAdsSearchads360V23CommonWebpageConditionInfo = z.object({argument: z.string().optional(), operand: z.enum(["UNSPECIFIED", "UNKNOWN", "URL", "CATEGORY", "PAGE_TITLE", "PAGE_CONTENT", "CUSTOM_LABEL"]).optional(), operator: z.enum(["UNSPECIFIED", "UNKNOWN", "EQUALS", "CONTAINS"]).optional()}); export const googleAdsSearchads360V23CommonWebpageSampleInfo = z.object({sampleUrls: z.array(z.string()).optional()}); export const googleAdsSearchads360V23CommonWebpageInfo = z.object({conditions: z.array(googleAdsSearchads360V23CommonWebpageConditionInfo).optional(), coveragePercentage: z.number().optional(), criterionName: z.string().optional(), sample: googleAdsSearchads360V23CommonWebpageSampleInfo.optional()}); export const googleAdsSearchads360V23CommonWebpageListInfo = z.object({sharedSet: z.string().optional()}); export const googleAdsSearchads360V23CommonYouTubeChannelInfo = z.object({channelId: z.string().optional()}); export const googleAdsSearchads360V23CommonYouTubeVideoInfo = z.object({videoId: z.string().optional()}); export const googleAdsSearchads360V23ResourcesCampaignCriterion = z.object({adSchedule: googleAdsSearchads360V23CommonAdScheduleInfo.optional(), ageRange: googleAdsSearchads360V23CommonAgeRangeInfo.optional(), bidModifier: z.number().optional(), brandList: googleAdsSearchads360V23CommonBrandListInfo.optional(), campaign: z.string().optional(), carrier: googleAdsSearchads360V23CommonCarrierInfo.optional(), combinedAudience: googleAdsSearchads360V23CommonCombinedAudienceInfo.optional(), contentLabel: googleAdsSearchads360V23CommonContentLabelInfo.optional(), criterionId: z.string().optional(), device: googleAdsSearchads360V23CommonDeviceInfo.optional(), displayName: z.string().optional(), extendedDemographic: googleAdsSearchads360V23CommonExtendedDemographicInfo.optional(), gender: googleAdsSearchads360V23CommonGenderInfo.optional(), incomeRange: googleAdsSearchads360V23CommonIncomeRangeInfo.optional(), ipBlock: googleAdsSearchads360V23CommonIpBlockInfo.optional(), keyword: googleAdsSearchads360V23CommonKeywordInfo.optional(), keywordTheme: googleAdsSearchads360V23CommonKeywordThemeInfo.optional(), language: googleAdsSearchads360V23CommonLanguageInfo.optional(), lastModifiedTime: z.string().optional(), lifeEvent: googleAdsSearchads360V23CommonLifeEventInfo.optional(), listingScope: googleAdsSearchads360V23CommonListingScopeInfo.optional(), localServiceId: googleAdsSearchads360V23CommonLocalServiceIdInfo.optional(), location: googleAdsSearchads360V23CommonLocationInfo.optional(), locationGroup: googleAdsSearchads360V23CommonLocationGroupInfo.optional(), mobileAppCategory: googleAdsSearchads360V23CommonMobileAppCategoryInfo.optional(), mobileApplication: googleAdsSearchads360V23CommonMobileApplicationInfo.optional(), mobileDevice: googleAdsSearchads360V23CommonMobileDeviceInfo.optional(), negative: z.boolean().optional(), operatingSystemVersion: googleAdsSearchads360V23CommonOperatingSystemVersionInfo.optional(), parentalStatus: googleAdsSearchads360V23CommonParentalStatusInfo.optional(), placement: googleAdsSearchads360V23CommonPlacementInfo.optional(), proximity: googleAdsSearchads360V23CommonProximityInfo.optional(), resourceName: z.string().optional(), status: z.enum(["UNSPECIFIED", "UNKNOWN", "ENABLED", "PAUSED", "REMOVED"]).optional(), topic: googleAdsSearchads360V23CommonTopicInfo.optional(), type: z.enum(["UNSPECIFIED", "UNKNOWN", "KEYWORD", "PLACEMENT", "MOBILE_APP_CATEGORY", "MOBILE_APPLICATION", "DEVICE", "LOCATION", "LISTING_GROUP", "AD_SCHEDULE", "AGE_RANGE", "GENDER", "INCOME_RANGE", "PARENTAL_STATUS", "YOUTUBE_VIDEO", "YOUTUBE_CHANNEL", "USER_LIST", "PROXIMITY", "TOPIC", "LISTING_SCOPE", "LANGUAGE", "IP_BLOCK", "CONTENT_LABEL", "CARRIER", "USER_INTEREST", "WEBPAGE", "OPERATING_SYSTEM_VERSION", "APP_PAYMENT_MODEL", "MOBILE_DEVICE", "CUSTOM_AFFINITY", "CUSTOM_INTENT", "LOCATION_GROUP", "CUSTOM_AUDIENCE", "COMBINED_AUDIENCE", "KEYWORD_THEME", "AUDIENCE", "NEGATIVE_KEYWORD_LIST", "LOCAL_SERVICE_ID", "SEARCH_THEME", "BRAND", "BRAND_LIST", "LIFE_EVENT", "WEBPAGE_LIST", "VIDEO_LINEUP", "PLACEMENT_LIST", "VERTICAL_ADS_ITEM_GROUP_RULE_LIST", "VERTICAL_ADS_ITEM_GROUP_RULE"]).optional(), userInterest: googleAdsSearchads360V23CommonUserInterestInfo.optional(), userList: googleAdsSearchads360V23CommonUserListInfo.optional(), videoLineup: googleAdsSearchads360V23CommonVideoLineupInfo.optional(), webpage: googleAdsSearchads360V23CommonWebpageInfo.optional(), webpageList: googleAdsSearchads360V23CommonWebpageListInfo.optional(), youtubeChannel: googleAdsSearchads360V23CommonYouTubeChannelInfo.optional(), youtubeVideo: googleAdsSearchads360V23CommonYouTubeVideoInfo.optional()}); export const googleAdsSearchads360V23ServicesMutateCampaignCriterionResult = z.object({campaignCriterion: googleAdsSearchads360V23ResourcesCampaignCriterion.optional(), resourceName: z.string().optional()}); export const googleAdsSearchads360V23ServicesMutateCampaignCriteriaResponse = z.object({partialFailureError: googleRpcStatus.optional(), results: z.array(googleAdsSearchads360V23ServicesMutateCampaignCriterionResult).optional()}); export const validateResponse = async ( schema: { readonly '~standard': { readonly validate: (value: unknown) => ({ readonly value: Output; readonly issues?: undefined } | { readonly issues: ReadonlyArray<{ readonly message: string; readonly path?: ReadonlyArray | undefined }> }) | Promise<{ readonly value: Output; readonly issues?: undefined } | { readonly issues: ReadonlyArray<{ readonly message: string; readonly path?: ReadonlyArray | undefined }> }> } }, value: unknown ): Promise => { const result = await schema['~standard'].validate(value) if (result.issues !== undefined) { const detail = result.issues .map(({ message, path }) => path?.length ? `${path.map((segment) => String(typeof segment === 'object' ? segment.key : segment)).join('.')}: ${message}` : message ) .join('; ') throw new Error(`Response does not match the schema: ${detail}`, { cause: { issues: result.issues } }) } return result.value }; /** * Creates, updates, or removes criteria. Operation statuses are returned. List of thrown errors: [AdxError]() [AuthenticationError]() [AuthorizationError]() [CampaignCriterionError]() [CollectionSizeError]() [ContextError]() [CriterionError]() [DatabaseError]() [DistinctError]() [FieldError]() [FieldMaskError]() [FunctionError]() [HeaderError]() [IdError]() [InternalError]() [MutateError]() [NewResourceCreationError]() [NotEmptyError]() [NullError]() [OperationAccessDeniedError]() [OperatorError]() [QuotaError]() [RangeError]() [RegionCodeError]() [RequestError]() [ResourceCountLimitExceededError]() [SizeLimitError]() [StringFormatError]() [StringLengthError]() * * POST /v23/customers/{customersId}/campaignCriteria:mutate */ export const createApiV23CustomersCustomersIdCampaignCriteriaMutate = async (args: CreateApiV23CustomersCustomersIdCampaignCriteriaMutateArgs, options?: CreateApiV23CustomersCustomersIdCampaignCriteriaMutateOptions) => { const {baseUrl = "https://searchads360.googleapis.com", fetch: fetchFn = fetch, Oauth2, Oauth2c} = options ?? {} const query = new URLSearchParams() const headers = new Headers() headers.set('content-type', "application/json") headers.set('accept', "application/json") if (Oauth2 !== undefined) headers.set('authorization', `Bearer ${Oauth2}`) if (Oauth2c !== undefined) headers.set('authorization', `Bearer ${Oauth2c}`) const url = `${baseUrl.replace(/\/+$/, '')}/v23/customers/${encodeURIComponent(String(args.customersId))}/campaignCriteria:mutate${query.size > 0 ? `?${query}` : ''}` const res = await fetchFn(url, {method: "POST", headers, body: JSON.stringify(args.body)}) if (!res.ok) throw new Error(`Request failed with status ${res.status}`, {cause: {status: res.status, body: await res.text()}}) return validateResponse(googleAdsSearchads360V23ServicesMutateCampaignCriteriaResponse, await res.json()) };