google-ads-api-client
Version:
A friendly and exhaustive client to the google-ads-api, code generated directly from google's published protobuf schema.
372 lines (371 loc) • 14.4 kB
TypeScript
import type { BinaryWriteOptions } from "@protobuf-ts/runtime";
import type { IBinaryWriter } from "@protobuf-ts/runtime";
import type { BinaryReadOptions } from "@protobuf-ts/runtime";
import type { IBinaryReader } from "@protobuf-ts/runtime";
import type { PartialMessage } from "@protobuf-ts/runtime";
import { MessageType } from "@protobuf-ts/runtime";
import { PolicyApprovalStatusEnum_PolicyApprovalStatus } from "../enums/policy_approval_status";
import { PolicyReviewStatusEnum_PolicyReviewStatus } from "../enums/policy_review_status";
import { PolicyTopicEntry } from "../common/policy";
import { DynamicJobsAsset } from "../common/asset_types";
import { DynamicLocalAsset } from "../common/asset_types";
import { DynamicTravelAsset } from "../common/asset_types";
import { DiscoveryCarouselCardAsset } from "../common/asset_types";
import { DynamicFlightsAsset } from "../common/asset_types";
import { DynamicHotelsAndRentalsAsset } from "../common/asset_types";
import { DynamicCustomAsset } from "../common/asset_types";
import { DynamicRealEstateAsset } from "../common/asset_types";
import { CallToActionAsset } from "../common/asset_types";
import { PriceAsset } from "../common/asset_types";
import { CallAsset } from "../common/asset_types";
import { HotelCalloutAsset } from "../common/asset_types";
import { MobileAppAsset } from "../common/asset_types";
import { DynamicEducationAsset } from "../common/asset_types";
import { PageFeedAsset } from "../common/asset_types";
import { SitelinkAsset } from "../common/asset_types";
import { StructuredSnippetAsset } from "../common/asset_types";
import { CalloutAsset } from "../common/asset_types";
import { PromotionAsset } from "../common/asset_types";
import { BookOnGoogleAsset } from "../common/asset_types";
import { LeadFormAsset } from "../common/asset_types";
import { TextAsset } from "../common/asset_types";
import { ImageAsset } from "../common/asset_types";
import { MediaBundleAsset } from "../common/asset_types";
import { YoutubeVideoAsset } from "../common/asset_types";
import { AssetSourceEnum_AssetSource } from "../enums/asset_source";
import { CustomParameter } from "../common/custom_parameter";
import { AssetTypeEnum_AssetType } from "../enums/asset_type";
/**
* Asset is a part of an ad which can be shared across multiple ads.
* It can be an image (ImageAsset), a video (YoutubeVideoAsset), etc.
* Assets are immutable and cannot be removed. To stop an asset from serving,
* remove the asset from the entity that is using it.
*
* @generated from protobuf message google.ads.googleads.v11.resources.Asset
*/
export interface Asset {
/**
* Immutable. The resource name of the asset.
* Asset resource names have the form:
*
* `customers/{customer_id}/assets/{asset_id}`
*
* @generated from protobuf field: string resource_name = 1;
*/
resourceName: string;
/**
* Output only. The ID of the asset.
*
* @generated from protobuf field: optional int64 id = 11;
*/
id?: bigint;
/**
* Optional name of the asset.
*
* @generated from protobuf field: optional string name = 12;
*/
name?: string;
/**
* Output only. Type of the asset.
*
* @generated from protobuf field: google.ads.googleads.v11.enums.AssetTypeEnum.AssetType type = 4;
*/
type: AssetTypeEnum_AssetType;
/**
* A list of possible final URLs after all cross domain redirects.
*
* @generated from protobuf field: repeated string final_urls = 14;
*/
finalUrls: string[];
/**
* A list of possible final mobile URLs after all cross domain redirects.
*
* @generated from protobuf field: repeated string final_mobile_urls = 16;
*/
finalMobileUrls: string[];
/**
* URL template for constructing a tracking URL.
*
* @generated from protobuf field: optional string tracking_url_template = 17;
*/
trackingUrlTemplate?: string;
/**
* A list of mappings to be used for substituting URL custom parameter tags in
* the tracking_url_template, final_urls, and/or final_mobile_urls.
*
* @generated from protobuf field: repeated google.ads.googleads.v11.common.CustomParameter url_custom_parameters = 18;
*/
urlCustomParameters: CustomParameter[];
/**
* URL template for appending params to landing page URLs served with parallel
* tracking.
*
* @generated from protobuf field: optional string final_url_suffix = 19;
*/
finalUrlSuffix?: string;
/**
* Output only. Source of the asset.
*
* @generated from protobuf field: google.ads.googleads.v11.enums.AssetSourceEnum.AssetSource source = 38;
*/
source: AssetSourceEnum_AssetSource;
/**
* Output only. Policy information for the asset.
*
* @generated from protobuf field: google.ads.googleads.v11.resources.AssetPolicySummary policy_summary = 13;
*/
policySummary?: AssetPolicySummary;
/**
* @generated from protobuf oneof: asset_data
*/
assetData: {
oneofKind: "youtubeVideoAsset";
/**
* Immutable. A YouTube video asset.
*
* @generated from protobuf field: google.ads.googleads.v11.common.YoutubeVideoAsset youtube_video_asset = 5;
*/
youtubeVideoAsset: YoutubeVideoAsset;
} | {
oneofKind: "mediaBundleAsset";
/**
* Immutable. A media bundle asset.
*
* @generated from protobuf field: google.ads.googleads.v11.common.MediaBundleAsset media_bundle_asset = 6;
*/
mediaBundleAsset: MediaBundleAsset;
} | {
oneofKind: "imageAsset";
/**
* Output only. An image asset.
*
* @generated from protobuf field: google.ads.googleads.v11.common.ImageAsset image_asset = 7;
*/
imageAsset: ImageAsset;
} | {
oneofKind: "textAsset";
/**
* Immutable. A text asset.
*
* @generated from protobuf field: google.ads.googleads.v11.common.TextAsset text_asset = 8;
*/
textAsset: TextAsset;
} | {
oneofKind: "leadFormAsset";
/**
* A lead form asset.
*
* @generated from protobuf field: google.ads.googleads.v11.common.LeadFormAsset lead_form_asset = 9;
*/
leadFormAsset: LeadFormAsset;
} | {
oneofKind: "bookOnGoogleAsset";
/**
* A book on google asset.
*
* @generated from protobuf field: google.ads.googleads.v11.common.BookOnGoogleAsset book_on_google_asset = 10;
*/
bookOnGoogleAsset: BookOnGoogleAsset;
} | {
oneofKind: "promotionAsset";
/**
* A promotion asset.
*
* @generated from protobuf field: google.ads.googleads.v11.common.PromotionAsset promotion_asset = 15;
*/
promotionAsset: PromotionAsset;
} | {
oneofKind: "calloutAsset";
/**
* A callout asset.
*
* @generated from protobuf field: google.ads.googleads.v11.common.CalloutAsset callout_asset = 20;
*/
calloutAsset: CalloutAsset;
} | {
oneofKind: "structuredSnippetAsset";
/**
* A structured snippet asset.
*
* @generated from protobuf field: google.ads.googleads.v11.common.StructuredSnippetAsset structured_snippet_asset = 21;
*/
structuredSnippetAsset: StructuredSnippetAsset;
} | {
oneofKind: "sitelinkAsset";
/**
* A sitelink asset.
*
* @generated from protobuf field: google.ads.googleads.v11.common.SitelinkAsset sitelink_asset = 22;
*/
sitelinkAsset: SitelinkAsset;
} | {
oneofKind: "pageFeedAsset";
/**
* A page feed asset.
*
* @generated from protobuf field: google.ads.googleads.v11.common.PageFeedAsset page_feed_asset = 23;
*/
pageFeedAsset: PageFeedAsset;
} | {
oneofKind: "dynamicEducationAsset";
/**
* A dynamic education asset.
*
* @generated from protobuf field: google.ads.googleads.v11.common.DynamicEducationAsset dynamic_education_asset = 24;
*/
dynamicEducationAsset: DynamicEducationAsset;
} | {
oneofKind: "mobileAppAsset";
/**
* A mobile app asset.
*
* @generated from protobuf field: google.ads.googleads.v11.common.MobileAppAsset mobile_app_asset = 25;
*/
mobileAppAsset: MobileAppAsset;
} | {
oneofKind: "hotelCalloutAsset";
/**
* A hotel callout asset.
*
* @generated from protobuf field: google.ads.googleads.v11.common.HotelCalloutAsset hotel_callout_asset = 26;
*/
hotelCalloutAsset: HotelCalloutAsset;
} | {
oneofKind: "callAsset";
/**
* A call asset.
*
* @generated from protobuf field: google.ads.googleads.v11.common.CallAsset call_asset = 27;
*/
callAsset: CallAsset;
} | {
oneofKind: "priceAsset";
/**
* A price asset.
*
* @generated from protobuf field: google.ads.googleads.v11.common.PriceAsset price_asset = 28;
*/
priceAsset: PriceAsset;
} | {
oneofKind: "callToActionAsset";
/**
* Immutable. A call to action asset.
*
* @generated from protobuf field: google.ads.googleads.v11.common.CallToActionAsset call_to_action_asset = 29;
*/
callToActionAsset: CallToActionAsset;
} | {
oneofKind: "dynamicRealEstateAsset";
/**
* A dynamic real estate asset.
*
* @generated from protobuf field: google.ads.googleads.v11.common.DynamicRealEstateAsset dynamic_real_estate_asset = 30;
*/
dynamicRealEstateAsset: DynamicRealEstateAsset;
} | {
oneofKind: "dynamicCustomAsset";
/**
* A dynamic custom asset.
*
* @generated from protobuf field: google.ads.googleads.v11.common.DynamicCustomAsset dynamic_custom_asset = 31;
*/
dynamicCustomAsset: DynamicCustomAsset;
} | {
oneofKind: "dynamicHotelsAndRentalsAsset";
/**
* A dynamic hotels and rentals asset.
*
* @generated from protobuf field: google.ads.googleads.v11.common.DynamicHotelsAndRentalsAsset dynamic_hotels_and_rentals_asset = 32;
*/
dynamicHotelsAndRentalsAsset: DynamicHotelsAndRentalsAsset;
} | {
oneofKind: "dynamicFlightsAsset";
/**
* A dynamic flights asset.
*
* @generated from protobuf field: google.ads.googleads.v11.common.DynamicFlightsAsset dynamic_flights_asset = 33;
*/
dynamicFlightsAsset: DynamicFlightsAsset;
} | {
oneofKind: "discoveryCarouselCardAsset";
/**
* Immutable. A discovery carousel card asset.
*
* @generated from protobuf field: google.ads.googleads.v11.common.DiscoveryCarouselCardAsset discovery_carousel_card_asset = 34;
*/
discoveryCarouselCardAsset: DiscoveryCarouselCardAsset;
} | {
oneofKind: "dynamicTravelAsset";
/**
* A dynamic travel asset.
*
* @generated from protobuf field: google.ads.googleads.v11.common.DynamicTravelAsset dynamic_travel_asset = 35;
*/
dynamicTravelAsset: DynamicTravelAsset;
} | {
oneofKind: "dynamicLocalAsset";
/**
* A dynamic local asset.
*
* @generated from protobuf field: google.ads.googleads.v11.common.DynamicLocalAsset dynamic_local_asset = 36;
*/
dynamicLocalAsset: DynamicLocalAsset;
} | {
oneofKind: "dynamicJobsAsset";
/**
* A dynamic jobs asset.
*
* @generated from protobuf field: google.ads.googleads.v11.common.DynamicJobsAsset dynamic_jobs_asset = 37;
*/
dynamicJobsAsset: DynamicJobsAsset;
} | {
oneofKind: undefined;
};
}
/**
* Contains policy information for an asset.
*
* @generated from protobuf message google.ads.googleads.v11.resources.AssetPolicySummary
*/
export interface AssetPolicySummary {
/**
* Output only. The list of policy findings for this asset.
*
* @generated from protobuf field: repeated google.ads.googleads.v11.common.PolicyTopicEntry policy_topic_entries = 1;
*/
policyTopicEntries: PolicyTopicEntry[];
/**
* Output only. Where in the review process this asset is.
*
* @generated from protobuf field: google.ads.googleads.v11.enums.PolicyReviewStatusEnum.PolicyReviewStatus review_status = 2;
*/
reviewStatus: PolicyReviewStatusEnum_PolicyReviewStatus;
/**
* Output only. The overall approval status of this asset, calculated based on the status
* of its individual policy topic entries.
*
* @generated from protobuf field: google.ads.googleads.v11.enums.PolicyApprovalStatusEnum.PolicyApprovalStatus approval_status = 3;
*/
approvalStatus: PolicyApprovalStatusEnum_PolicyApprovalStatus;
}
declare class Asset$Type extends MessageType<Asset> {
constructor();
create(value?: PartialMessage<Asset>): Asset;
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Asset): Asset;
internalBinaryWrite(message: Asset, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
}
/**
* @generated MessageType for protobuf message google.ads.googleads.v11.resources.Asset
*/
export declare const Asset: Asset$Type;
declare class AssetPolicySummary$Type extends MessageType<AssetPolicySummary> {
constructor();
create(value?: PartialMessage<AssetPolicySummary>): AssetPolicySummary;
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: AssetPolicySummary): AssetPolicySummary;
internalBinaryWrite(message: AssetPolicySummary, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
}
/**
* @generated MessageType for protobuf message google.ads.googleads.v11.resources.AssetPolicySummary
*/
export declare const AssetPolicySummary: AssetPolicySummary$Type;
export {};