google-ads-api-client
Version:
A friendly and exhaustive client to the google-ads-api, code generated directly from google's published protobuf schema.
247 lines (246 loc) • 8.91 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 { MimeTypeEnum_MimeType } from "../enums/mime_type";
import { MediaTypeEnum_MediaType } from "../enums/media_type";
/**
* A media file.
*
* @generated from protobuf message google.ads.googleads.v11.resources.MediaFile
*/
export interface MediaFile {
/**
* Immutable. The resource name of the media file.
* Media file resource names have the form:
*
* `customers/{customer_id}/mediaFiles/{media_file_id}`
*
* @generated from protobuf field: string resource_name = 1;
*/
resourceName: string;
/**
* Output only. The ID of the media file.
*
* @generated from protobuf field: optional int64 id = 12;
*/
id?: bigint;
/**
* Immutable. Type of the media file.
*
* @generated from protobuf field: google.ads.googleads.v11.enums.MediaTypeEnum.MediaType type = 5;
*/
type: MediaTypeEnum_MediaType;
/**
* Output only. The mime type of the media file.
*
* @generated from protobuf field: google.ads.googleads.v11.enums.MimeTypeEnum.MimeType mime_type = 6;
*/
mimeType: MimeTypeEnum_MimeType;
/**
* Immutable. The URL of where the original media file was downloaded from (or a file
* name). Only used for media of type AUDIO and IMAGE.
*
* @generated from protobuf field: optional string source_url = 13;
*/
sourceUrl?: string;
/**
* Immutable. The name of the media file. The name can be used by clients to help
* identify previously uploaded media.
*
* @generated from protobuf field: optional string name = 14;
*/
name?: string;
/**
* Output only. The size of the media file in bytes.
*
* @generated from protobuf field: optional int64 file_size = 15;
*/
fileSize?: bigint;
/**
* @generated from protobuf oneof: mediatype
*/
mediatype: {
oneofKind: "image";
/**
* Immutable. Encapsulates an Image.
*
* @generated from protobuf field: google.ads.googleads.v11.resources.MediaImage image = 3;
*/
image: MediaImage;
} | {
oneofKind: "mediaBundle";
/**
* Immutable. A ZIP archive media the content of which contains HTML5 assets.
*
* @generated from protobuf field: google.ads.googleads.v11.resources.MediaBundle media_bundle = 4;
*/
mediaBundle: MediaBundle;
} | {
oneofKind: "audio";
/**
* Output only. Encapsulates an Audio.
*
* @generated from protobuf field: google.ads.googleads.v11.resources.MediaAudio audio = 10;
*/
audio: MediaAudio;
} | {
oneofKind: "video";
/**
* Immutable. Encapsulates a Video.
*
* @generated from protobuf field: google.ads.googleads.v11.resources.MediaVideo video = 11;
*/
video: MediaVideo;
} | {
oneofKind: undefined;
};
}
/**
* Encapsulates an Image.
*
* @generated from protobuf message google.ads.googleads.v11.resources.MediaImage
*/
export interface MediaImage {
/**
* Immutable. Raw image data.
*
* @generated from protobuf field: optional bytes data = 4;
*/
data?: Uint8Array;
/**
* Output only. The url to the full size version of the image.
*
* @generated from protobuf field: optional string full_size_image_url = 2;
*/
fullSizeImageUrl?: string;
/**
* Output only. The url to the preview size version of the image.
*
* @generated from protobuf field: optional string preview_size_image_url = 3;
*/
previewSizeImageUrl?: string;
}
/**
* Represents a ZIP archive media the content of which contains HTML5 assets.
*
* @generated from protobuf message google.ads.googleads.v11.resources.MediaBundle
*/
export interface MediaBundle {
/**
* Immutable. Raw zipped data.
*
* @generated from protobuf field: optional bytes data = 3;
*/
data?: Uint8Array;
/**
* Output only. The url to access the uploaded zipped data.
* For example, https://tpc.googlesyndication.com/simgad/123
* This field is read-only.
*
* @generated from protobuf field: optional string url = 2;
*/
url?: string;
}
/**
* Encapsulates an Audio.
*
* @generated from protobuf message google.ads.googleads.v11.resources.MediaAudio
*/
export interface MediaAudio {
/**
* Output only. The duration of the Audio in milliseconds.
*
* @generated from protobuf field: optional int64 ad_duration_millis = 2;
*/
adDurationMillis?: bigint;
}
/**
* Encapsulates a Video.
*
* @generated from protobuf message google.ads.googleads.v11.resources.MediaVideo
*/
export interface MediaVideo {
/**
* Output only. The duration of the Video in milliseconds.
*
* @generated from protobuf field: optional int64 ad_duration_millis = 5;
*/
adDurationMillis?: bigint;
/**
* Immutable. The YouTube video ID (as seen in YouTube URLs). Adding prefix
* "https://www.youtube.com/watch?v=" to this ID will get the YouTube
* streaming URL for this video.
*
* @generated from protobuf field: optional string youtube_video_id = 6;
*/
youtubeVideoId?: string;
/**
* Output only. The Advertising Digital Identification code for this video, as defined by
* the American Association of Advertising Agencies, used mainly for
* television commercials.
*
* @generated from protobuf field: optional string advertising_id_code = 7;
*/
advertisingIdCode?: string;
/**
* Output only. The Industry Standard Commercial Identifier code for this video, used
* mainly for television commercials.
*
* @generated from protobuf field: optional string isci_code = 8;
*/
isciCode?: string;
}
declare class MediaFile$Type extends MessageType<MediaFile> {
constructor();
create(value?: PartialMessage<MediaFile>): MediaFile;
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: MediaFile): MediaFile;
internalBinaryWrite(message: MediaFile, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
}
/**
* @generated MessageType for protobuf message google.ads.googleads.v11.resources.MediaFile
*/
export declare const MediaFile: MediaFile$Type;
declare class MediaImage$Type extends MessageType<MediaImage> {
constructor();
create(value?: PartialMessage<MediaImage>): MediaImage;
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: MediaImage): MediaImage;
internalBinaryWrite(message: MediaImage, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
}
/**
* @generated MessageType for protobuf message google.ads.googleads.v11.resources.MediaImage
*/
export declare const MediaImage: MediaImage$Type;
declare class MediaBundle$Type extends MessageType<MediaBundle> {
constructor();
create(value?: PartialMessage<MediaBundle>): MediaBundle;
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: MediaBundle): MediaBundle;
internalBinaryWrite(message: MediaBundle, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
}
/**
* @generated MessageType for protobuf message google.ads.googleads.v11.resources.MediaBundle
*/
export declare const MediaBundle: MediaBundle$Type;
declare class MediaAudio$Type extends MessageType<MediaAudio> {
constructor();
create(value?: PartialMessage<MediaAudio>): MediaAudio;
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: MediaAudio): MediaAudio;
internalBinaryWrite(message: MediaAudio, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
}
/**
* @generated MessageType for protobuf message google.ads.googleads.v11.resources.MediaAudio
*/
export declare const MediaAudio: MediaAudio$Type;
declare class MediaVideo$Type extends MessageType<MediaVideo> {
constructor();
create(value?: PartialMessage<MediaVideo>): MediaVideo;
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: MediaVideo): MediaVideo;
internalBinaryWrite(message: MediaVideo, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
}
/**
* @generated MessageType for protobuf message google.ads.googleads.v11.resources.MediaVideo
*/
export declare const MediaVideo: MediaVideo$Type;
export {};