// Copyright 2020 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

syntax = "proto3";

package google.ads.googleads.v3.common;

import "google/ads/googleads/v3/enums/mime_type.proto";
import "google/protobuf/wrappers.proto";
import "google/api/annotations.proto";

option csharp_namespace = "Google.Ads.GoogleAds.V3.Common";
option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/common;common";
option java_multiple_files = true;
option java_outer_classname = "AssetTypesProto";
option java_package = "com.google.ads.googleads.v3.common";
option objc_class_prefix = "GAA";
option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Common";
option ruby_package = "Google::Ads::GoogleAds::V3::Common";

// Proto file containing info messages for specific asset types.

// A YouTube asset.
message YoutubeVideoAsset {
  // YouTube video id. This is the 11 character string value used in the
  // YouTube video URL.
  google.protobuf.StringValue youtube_video_id = 1;
}

// A MediaBundle asset.
message MediaBundleAsset {
  // Media bundle (ZIP file) asset data. The format of the uploaded ZIP file
  // depends on the ad field where it will be used. For more information on the
  // format, see the documentation of the ad field where you plan on using the
  // MediaBundleAsset. This field is mutate only.
  google.protobuf.BytesValue data = 1;
}

// An Image asset.
message ImageAsset {
  // The raw bytes data of an image. This field is mutate only.
  google.protobuf.BytesValue data = 1;

  // File size of the image asset in bytes.
  google.protobuf.Int64Value file_size = 2;

  // MIME type of the image asset.
  google.ads.googleads.v3.enums.MimeTypeEnum.MimeType mime_type = 3;

  // Metadata for this image at its original size.
  ImageDimension full_size = 4;
}

// Metadata for an image at a certain size, either original or resized.
message ImageDimension {
  // Height of the image.
  google.protobuf.Int64Value height_pixels = 1;

  // Width of the image.
  google.protobuf.Int64Value width_pixels = 2;

  // A URL that returns the image with this height and width.
  google.protobuf.StringValue url = 3;
}

// A Text asset.
message TextAsset {
  // Text content of the text asset.
  google.protobuf.StringValue text = 1;
}
