• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// Copyright 2023 Google LLC
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7//     http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15syntax = "proto3";
16
17package google.ads.googleads.v14.resources;
18
19import "google/ads/googleads/v14/enums/media_type.proto";
20import "google/ads/googleads/v14/enums/mime_type.proto";
21import "google/api/field_behavior.proto";
22import "google/api/resource.proto";
23
24option csharp_namespace = "Google.Ads.GoogleAds.V14.Resources";
25option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v14/resources;resources";
26option java_multiple_files = true;
27option java_outer_classname = "MediaFileProto";
28option java_package = "com.google.ads.googleads.v14.resources";
29option objc_class_prefix = "GAA";
30option php_namespace = "Google\\Ads\\GoogleAds\\V14\\Resources";
31option ruby_package = "Google::Ads::GoogleAds::V14::Resources";
32
33// Proto file describing the media file resource.
34
35// A media file.
36message MediaFile {
37  option (google.api.resource) = {
38    type: "googleads.googleapis.com/MediaFile"
39    pattern: "customers/{customer_id}/mediaFiles/{media_file_id}"
40  };
41
42  // Immutable. The resource name of the media file.
43  // Media file resource names have the form:
44  //
45  // `customers/{customer_id}/mediaFiles/{media_file_id}`
46  string resource_name = 1 [
47    (google.api.field_behavior) = IMMUTABLE,
48    (google.api.resource_reference) = {
49      type: "googleads.googleapis.com/MediaFile"
50    }
51  ];
52
53  // Output only. The ID of the media file.
54  optional int64 id = 12 [(google.api.field_behavior) = OUTPUT_ONLY];
55
56  // Immutable. Type of the media file.
57  google.ads.googleads.v14.enums.MediaTypeEnum.MediaType type = 5
58      [(google.api.field_behavior) = IMMUTABLE];
59
60  // Output only. The mime type of the media file.
61  google.ads.googleads.v14.enums.MimeTypeEnum.MimeType mime_type = 6
62      [(google.api.field_behavior) = OUTPUT_ONLY];
63
64  // Immutable. The URL of where the original media file was downloaded from (or
65  // a file name). Only used for media of type AUDIO and IMAGE.
66  optional string source_url = 13 [(google.api.field_behavior) = IMMUTABLE];
67
68  // Immutable. The name of the media file. The name can be used by clients to
69  // help identify previously uploaded media.
70  optional string name = 14 [(google.api.field_behavior) = IMMUTABLE];
71
72  // Output only. The size of the media file in bytes.
73  optional int64 file_size = 15 [(google.api.field_behavior) = OUTPUT_ONLY];
74
75  // The specific type of the media file.
76  oneof mediatype {
77    // Immutable. Encapsulates an Image.
78    MediaImage image = 3 [(google.api.field_behavior) = IMMUTABLE];
79
80    // Immutable. A ZIP archive media the content of which contains HTML5
81    // assets.
82    MediaBundle media_bundle = 4 [(google.api.field_behavior) = IMMUTABLE];
83
84    // Output only. Encapsulates an Audio.
85    MediaAudio audio = 10 [(google.api.field_behavior) = OUTPUT_ONLY];
86
87    // Immutable. Encapsulates a Video.
88    MediaVideo video = 11 [(google.api.field_behavior) = IMMUTABLE];
89  }
90}
91
92// Encapsulates an Image.
93message MediaImage {
94  // Immutable. Raw image data.
95  optional bytes data = 4 [(google.api.field_behavior) = IMMUTABLE];
96
97  // Output only. The url to the full size version of the image.
98  optional string full_size_image_url = 2
99      [(google.api.field_behavior) = OUTPUT_ONLY];
100
101  // Output only. The url to the preview size version of the image.
102  optional string preview_size_image_url = 3
103      [(google.api.field_behavior) = OUTPUT_ONLY];
104}
105
106// Represents a ZIP archive media the content of which contains HTML5 assets.
107message MediaBundle {
108  // Immutable. Raw zipped data.
109  optional bytes data = 3 [(google.api.field_behavior) = IMMUTABLE];
110
111  // Output only. The url to access the uploaded zipped data.
112  // For example, https://tpc.googlesyndication.com/simgad/123
113  // This field is read-only.
114  optional string url = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
115}
116
117// Encapsulates an Audio.
118message MediaAudio {
119  // Output only. The duration of the Audio in milliseconds.
120  optional int64 ad_duration_millis = 2
121      [(google.api.field_behavior) = OUTPUT_ONLY];
122}
123
124// Encapsulates a Video.
125message MediaVideo {
126  // Output only. The duration of the Video in milliseconds.
127  optional int64 ad_duration_millis = 5
128      [(google.api.field_behavior) = OUTPUT_ONLY];
129
130  // Immutable. The YouTube video ID (as seen in YouTube URLs). Adding prefix
131  // "https://www.youtube.com/watch?v=" to this ID will get the YouTube
132  // streaming URL for this video.
133  optional string youtube_video_id = 6
134      [(google.api.field_behavior) = IMMUTABLE];
135
136  // Output only. The Advertising Digital Identification code for this video, as
137  // defined by the American Association of Advertising Agencies, used mainly
138  // for television commercials.
139  optional string advertising_id_code = 7
140      [(google.api.field_behavior) = OUTPUT_ONLY];
141
142  // Output only. The Industry Standard Commercial Identifier code for this
143  // video, used mainly for television commercials.
144  optional string isci_code = 8 [(google.api.field_behavior) = OUTPUT_ONLY];
145}
146