media_file.proto 5.3 KB

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