media_file.proto 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136
  1. // Copyright 2022 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. syntax = "proto3";
  15. package google.ads.googleads.v11.resources;
  16. import "google/ads/googleads/v11/enums/media_type.proto";
  17. import "google/ads/googleads/v11/enums/mime_type.proto";
  18. import "google/api/field_behavior.proto";
  19. import "google/api/resource.proto";
  20. option csharp_namespace = "Google.Ads.GoogleAds.V11.Resources";
  21. option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v11/resources;resources";
  22. option java_multiple_files = true;
  23. option java_outer_classname = "MediaFileProto";
  24. option java_package = "com.google.ads.googleads.v11.resources";
  25. option objc_class_prefix = "GAA";
  26. option php_namespace = "Google\\Ads\\GoogleAds\\V11\\Resources";
  27. option ruby_package = "Google::Ads::GoogleAds::V11::Resources";
  28. // Proto file describing the media file resource.
  29. // A media file.
  30. message MediaFile {
  31. option (google.api.resource) = {
  32. type: "googleads.googleapis.com/MediaFile"
  33. pattern: "customers/{customer_id}/mediaFiles/{media_file_id}"
  34. };
  35. // Immutable. The resource name of the media file.
  36. // Media file resource names have the form:
  37. //
  38. // `customers/{customer_id}/mediaFiles/{media_file_id}`
  39. string resource_name = 1 [
  40. (google.api.field_behavior) = IMMUTABLE,
  41. (google.api.resource_reference) = {
  42. type: "googleads.googleapis.com/MediaFile"
  43. }
  44. ];
  45. // Output only. The ID of the media file.
  46. optional int64 id = 12 [(google.api.field_behavior) = OUTPUT_ONLY];
  47. // Immutable. Type of the media file.
  48. google.ads.googleads.v11.enums.MediaTypeEnum.MediaType type = 5 [(google.api.field_behavior) = IMMUTABLE];
  49. // Output only. The mime type of the media file.
  50. google.ads.googleads.v11.enums.MimeTypeEnum.MimeType mime_type = 6 [(google.api.field_behavior) = OUTPUT_ONLY];
  51. // Immutable. The URL of where the original media file was downloaded from (or a file
  52. // name). Only used for media of type AUDIO and IMAGE.
  53. optional string source_url = 13 [(google.api.field_behavior) = IMMUTABLE];
  54. // Immutable. The name of the media file. The name can be used by clients to help
  55. // identify previously uploaded media.
  56. optional string name = 14 [(google.api.field_behavior) = IMMUTABLE];
  57. // Output only. The size of the media file in bytes.
  58. optional int64 file_size = 15 [(google.api.field_behavior) = OUTPUT_ONLY];
  59. // The specific type of the media file.
  60. oneof mediatype {
  61. // Immutable. Encapsulates an Image.
  62. MediaImage image = 3 [(google.api.field_behavior) = IMMUTABLE];
  63. // Immutable. A ZIP archive media the content of which contains HTML5 assets.
  64. MediaBundle media_bundle = 4 [(google.api.field_behavior) = IMMUTABLE];
  65. // Output only. Encapsulates an Audio.
  66. MediaAudio audio = 10 [(google.api.field_behavior) = OUTPUT_ONLY];
  67. // Immutable. Encapsulates a Video.
  68. MediaVideo video = 11 [(google.api.field_behavior) = IMMUTABLE];
  69. }
  70. }
  71. // Encapsulates an Image.
  72. message MediaImage {
  73. // Immutable. Raw image data.
  74. optional bytes data = 4 [(google.api.field_behavior) = IMMUTABLE];
  75. // Output only. The url to the full size version of the image.
  76. optional string full_size_image_url = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
  77. // Output only. The url to the preview size version of the image.
  78. optional string preview_size_image_url = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
  79. }
  80. // Represents a ZIP archive media the content of which contains HTML5 assets.
  81. message MediaBundle {
  82. // Immutable. Raw zipped data.
  83. optional bytes data = 3 [(google.api.field_behavior) = IMMUTABLE];
  84. // Output only. The url to access the uploaded zipped data.
  85. // For example, https://tpc.googlesyndication.com/simgad/123
  86. // This field is read-only.
  87. optional string url = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
  88. }
  89. // Encapsulates an Audio.
  90. message MediaAudio {
  91. // Output only. The duration of the Audio in milliseconds.
  92. optional int64 ad_duration_millis = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
  93. }
  94. // Encapsulates a Video.
  95. message MediaVideo {
  96. // Output only. The duration of the Video in milliseconds.
  97. optional int64 ad_duration_millis = 5 [(google.api.field_behavior) = OUTPUT_ONLY];
  98. // Immutable. The YouTube video ID (as seen in YouTube URLs). Adding prefix
  99. // "https://www.youtube.com/watch?v=" to this ID will get the YouTube
  100. // streaming URL for this video.
  101. optional string youtube_video_id = 6 [(google.api.field_behavior) = IMMUTABLE];
  102. // Output only. The Advertising Digital Identification code for this video, as defined by
  103. // the American Association of Advertising Agencies, used mainly for
  104. // television commercials.
  105. optional string advertising_id_code = 7 [(google.api.field_behavior) = OUTPUT_ONLY];
  106. // Output only. The Industry Standard Commercial Identifier code for this video, used
  107. // mainly for television commercials.
  108. optional string isci_code = 8 [(google.api.field_behavior) = OUTPUT_ONLY];
  109. }