// Copyright 2026 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.admanager.v1;

import "google/ads/admanager/v1/applied_label.proto";
import "google/ads/admanager/v1/creative_asset.proto";
import "google/ads/admanager/v1/creative_enums.proto";
import "google/ads/admanager/v1/creative_placeholder.proto";
import "google/ads/admanager/v1/creative_third_party_data_declaration_status_enum.proto";
import "google/ads/admanager/v1/custom_creative_asset.proto";
import "google/ads/admanager/v1/custom_field_value.proto";
import "google/ads/admanager/v1/delivery_enums.proto";
import "google/ads/admanager/v1/rich_media_studio_creative_billing_attribute_enum.proto";
import "google/ads/admanager/v1/rich_media_studio_creative_format_enum.proto";
import "google/ads/admanager/v1/rich_media_studio_messages.proto";
import "google/ads/admanager/v1/size.proto";
import "google/ads/admanager/v1/skippable_ad_type_enum.proto";
import "google/ads/admanager/v1/third_party_data_declaration.proto";
import "google/ads/admanager/v1/vast_redirect_type_enum.proto";
import "google/ads/admanager/v1/video_tracking_url.proto";
import "google/api/field_behavior.proto";
import "google/api/resource.proto";
import "google/protobuf/duration.proto";
import "google/protobuf/timestamp.proto";

option csharp_namespace = "Google.Ads.AdManager.V1";
option go_package = "google.golang.org/genproto/googleapis/ads/admanager/v1;admanager";
option java_multiple_files = true;
option java_outer_classname = "CreativeMessagesProto";
option java_package = "com.google.ads.admanager.v1";
option php_namespace = "Google\\Ads\\AdManager\\V1";
option ruby_package = "Google::Ads::AdManager::V1";

// The Creative resource.
message Creative {
  option (google.api.resource) = {
    type: "admanager.googleapis.com/Creative"
    pattern: "networks/{network_code}/creatives/{creative}"
    plural: "creatives"
    singular: "creative"
  };

  // The details of the creative specific to its type.
  oneof details {
    // Optional. An Ad Exchange dynamic allocation creative.
    AdExchangeCreativeDetails ad_exchange_creative = 20
        [(google.api.field_behavior) = OPTIONAL];

    // Optional. An AdSense dynamic allocation creative.
    AdSenseCreativeDetails ad_sense_creative = 22
        [(google.api.field_behavior) = OPTIONAL];

    // Optional. A Creative intended for mobile platforms that displays an
    // image, whose size is defined as an aspect ratio. It can have multiple
    // images whose dimensions conform to that aspect ratio.
    AspectRatioImageCreativeDetails aspect_ratio_image_creative = 23
        [(google.api.field_behavior) = OPTIONAL];

    // Optional. A Creative that contains Ad Manager hosted audio ads and is
    // served via VAST XML.
    AudioCreativeDetails audio_creative = 24
        [(google.api.field_behavior) = OPTIONAL];

    // Optional. A Creative that contains externally hosted audio ads and is
    // served via VAST XML.
    AudioRedirectCreativeDetails audio_redirect_creative = 25
        [(google.api.field_behavior) = OPTIONAL];

    // Optional. A creative that is used for tracking clicks on ads that are
    // served directly from the customers' web servers or media servers. NOTE:
    // The size attribute is not used for click tracking creative and it will
    // not be persisted upon save.
    ClickTrackingCreativeDetails click_tracking_creative = 26
        [(google.api.field_behavior) = OPTIONAL];

    // Optional. A Creative that contains a custom HTML snippet and file assets.
    CustomCreativeDetails custom_creative = 18
        [(google.api.field_behavior) = OPTIONAL];

    // Optional. A Creative that contains a zipped HTML5 bundle asset, a list of
    // third party impression trackers, and a third party click tracker.
    Html5CreativeDetails html5_creative = 33
        [(google.api.field_behavior) = OPTIONAL];

    // Optional. A Creative that displays an image.
    ImageCreativeDetails image_creative = 19
        [(google.api.field_behavior) = OPTIONAL];

    // Optional. An overlay Creative that displays an image and is served via
    // VAST 2.0 XML. Overlays cover part of the video content they are displayed
    // on top of.
    ImageOverlayCreativeDetails image_overlay_creative = 35
        [(google.api.field_behavior) = OPTIONAL];

    // Optional. A Creative that loads an image asset from a specified URL.
    ImageRedirectCreativeDetails image_redirect_creative = 36
        [(google.api.field_behavior) = OPTIONAL];

    // Optional. An overlay Creative that loads an image asset from a specified
    // URL and is served via VAST XML. Overlays cover part of the video content
    // they are displayed on top of. This creative is read only.
    ImageRedirectOverlayCreativeDetails image_redirect_overlay_creative = 37
        [(google.api.field_behavior) = OPTIONAL];

    // Optional. A Creative hosted by Campaign Manager 360.
    //
    // Similar to third-party creatives, a Campaign Manager 360 tag is used to
    // retrieve a creative asset. However, Campaign Manager 360 tags are not
    // sent to the user's browser. Instead, they are processed internally within
    // the Google Marketing Platform system.
    InternalRedirectCreativeDetails internal_redirect_creative = 38
        [(google.api.field_behavior) = OPTIONAL];

    // Optional. A Creative that isn't supported by Google DFP, but was migrated
    // from DART. Creatives of this type cannot be created or modified.
    LegacyDfpCreativeDetails legacy_dfp_creative = 39
        [(google.api.field_behavior) = OPTIONAL];

    // Optional. A Creative used for programmatic trafficking. This creative
    // will be auto-created with the right approval from the buyer. This
    // creative cannot be created through the API. This creative can be updated.
    ProgrammaticCreativeDetails programmatic_creative = 42
        [(google.api.field_behavior) = OPTIONAL];

    // Optional. A Creative that is created by a Rich Media Studio. You cannot
    // create this creative, but you can update some fields of this creative.
    RichMediaStudioCreativeDetails rich_media_studio_creative = 43
        [(google.api.field_behavior) = OPTIONAL];

    // Optional. A Creative that will be served into cable set-top boxes. There
    // are no assets for this creative type, as they are hosted by external
    // cable systems.
    SetTopBoxCreativeDetails set_top_box_creative = 46
        [(google.api.field_behavior) = OPTIONAL];

    // Optional. A Creative that is created by the specified creative template.
    TemplateCreativeDetails template_creative = 47
        [(google.api.field_behavior) = OPTIONAL];

    // Optional. A Creative that is served by a 3rd-party vendor.
    ThirdPartyCreativeDetails third_party_creative = 48
        [(google.api.field_behavior) = OPTIONAL];

    // Optional. A Creative that points to an externally hosted VAST ad and is
    // served via VAST XML as a VAST Wrapper.
    VastRedirectCreativeDetails vast_redirect_creative = 49
        [(google.api.field_behavior) = OPTIONAL];

    // Optional. A Creative that contains Ad Manager hosted video ads and is
    // served via VAST XML.
    VideoCreativeDetails video_creative = 51
        [(google.api.field_behavior) = OPTIONAL];

    // Optional. A Creative that contains externally hosted video ads and is
    // served via VAST XML.
    VideoRedirectCreativeDetails video_redirect_creative = 53
        [(google.api.field_behavior) = OPTIONAL];
  }

  // Identifier. The resource name of the Creative.
  // Format: `networks/{network_code}/creatives/{creative_id}`
  string name = 1 [(google.api.field_behavior) = IDENTIFIER];

  // Required. Display name of the `Creative`. This attribute has a maximum
  // length of 255 characters.
  optional string display_name = 8 [(google.api.field_behavior) = REQUIRED];

  // Required. The resource name of the Company, which is of type
  // Company.Type.ADVERTISER, to which this Creative belongs. Format:
  // "networks/{network_code}/companies/{company_id}"
  optional string advertiser = 2 [
    (google.api.field_behavior) = REQUIRED,
    (google.api.resource_reference) = {
      type: "admanager.googleapis.com/Company"
    }
  ];

  // Output only. The instant this Creative was last modified.
  google.protobuf.Timestamp update_time = 3
      [(google.api.field_behavior) = OUTPUT_ONLY];

  // Optional. The values of the custom fields associated with this creative.
  repeated CustomFieldValue custom_field_values = 76
      [(google.api.field_behavior) = OPTIONAL];

  // Output only. The URL of the creative for previewing the media.
  optional string preview_url = 4 [(google.api.field_behavior) = OUTPUT_ONLY];

  // Required. Immutable. The Size of the creative.
  Size size = 5 [
    (google.api.field_behavior) = REQUIRED,
    (google.api.field_behavior) = IMMUTABLE
  ];

  // Optional. The third party companies associated with this creative.
  // This is distinct from any associated companies that Google may detect
  // programmatically.
  ThirdPartyDataDeclaration third_party_data_declaration = 59
      [(google.api.field_behavior) = OPTIONAL];

  // Output only. The status of the publisher's `ThirdPartyDataDeclaration`,
  // when compared with the set of third party companies detected via automated
  // scanning.
  //
  // For example, if automated scanning detects more companies than have been
  // declared, this status will be
  // [CreativeThirdPartyDataDeclarationStatus.INCOMPLETE][google.ads.admanager.v1.CreativeThirdPartyDataDeclarationStatusEnum.CreativeThirdPartyDataDeclarationStatus.INCOMPLETE].
  optional CreativeThirdPartyDataDeclarationStatusEnum
      .CreativeThirdPartyDataDeclarationStatus
          third_party_data_declaration_status = 60
      [(google.api.field_behavior) = OUTPUT_ONLY];

  // Optional. Whether this creative contains self-declared European Union
  // political content.
  optional bool self_declared_european_union_political_content = 13
      [(google.api.field_behavior) = OPTIONAL];

  // Optional. Non-empty default. Whether the creative has ad badging enabled.
  //
  // Defaults to false for VastRedirectCreative, ThirdPartyCreative,
  // AudioRedirectCreative, ProgrammaticCreative, LegacyDfpMobileCreative,
  // FlashOverlayCreative, GraphicalInterstitialCreative,
  // LegacyDfpCreative, MobileAdNetworkCreative,
  // MobileVideoInterstitialCreative, SdkMediationCreative, and
  // FlashCreative types.
  //
  // Defaults to true for all other creative types.
  optional bool ad_badging_enabled = 17 [
    (google.api.field_behavior) = OPTIONAL,
    (google.api.field_behavior) = NON_EMPTY_DEFAULT
  ];

  // Optional. The set of labels applied directly to this creative.
  repeated AppliedLabel applied_labels = 56
      [(google.api.field_behavior) = OPTIONAL];

  // Optional. The buyer placement configuration for this creative.
  BuyerPlacementConfig buyer_placement_config = 81
      [(google.api.field_behavior) = OPTIONAL];
}

// An Ad Exchange dynamic allocation creative.
message AdExchangeCreativeDetails {
  // Optional. Whether this creative is eligible for native ad-serving. This
  // value is optional and defaults to false.
  optional bool native_eligible = 1 [(google.api.field_behavior) = OPTIONAL];

  // Optional. True if this creative is interstitial. An interstitial creative
  // will not consider an impression served until it is fully rendered in the
  // browser.
  optional bool interstitial = 2 [(google.api.field_behavior) = OPTIONAL];

  // Optional. True if this creative is eligible for all requested sizes.
  optional bool allows_all_requested_sizes = 3
      [(google.api.field_behavior) = OPTIONAL];

  // Output only. The ID of ad slot (inventory) that an advertiser might want to
  // target.
  optional string slot_id = 4 [(google.api.field_behavior) = OUTPUT_ONLY];

  // Optional. The code snippet (ad tag) from Ad Exchange or AdSense to traffic
  // the dynamic allocation creative. Only valid Ad Exchange or AdSense
  // parameters will be considered. Any extraneous HTML or JavaScript will be
  // ignored.
  optional string backfill_snippet = 5 [(google.api.field_behavior) = OPTIONAL];
}

// An AdSense dynamic allocation creative.
message AdSenseCreativeDetails {
  // Output only. The ID of ad slot (inventory) that an advertiser might want to
  // target.
  optional string slot_id = 1 [(google.api.field_behavior) = OUTPUT_ONLY];

  // Optional. The code snippet (ad tag) from Ad Exchange or AdSense to traffic
  // the dynamic allocation creative. Only valid Ad Exchange or AdSense
  // parameters will be considered. Any extraneous HTML or JavaScript will be
  // ignored.
  optional string backfill_snippet = 2 [(google.api.field_behavior) = OPTIONAL];
}

// A Creative intended for mobile platforms that displays an image, whose size
// is defined as an aspect ratio. It can have multiple images whose dimensions
// conform to that aspect ratio.
message AspectRatioImageCreativeDetails {
  // Optional. The text that is served along with the image creative, primarily
  // for accessibility. If no suitable image size is available for the device,
  // this text replaces the image completely. This field is optional and has a
  // maximum length of 500 characters.
  optional string alt_text = 1 [(google.api.field_behavior) = OPTIONAL];

  // Optional. The URL that the user is directed to if they click on the
  // creative. This attribute is required unless the `destinationUrlType` is
  // `NONE`, and has a maximum length of 1024 characters.
  optional string destination_url = 2 [(google.api.field_behavior) = OPTIONAL];

  // Optional. The action that should be performed if the user clicks on the
  // creative. This attribute defaults to `CLICK_TO_WEB`.
  optional CreativeDestinationUrlTypeEnum.CreativeDestinationUrlType
      destination_url_type = 3 [(google.api.field_behavior) = OPTIONAL];

  // Required. The images associated with this creative. The ad server will
  // choose one based on the capabilities of the device. Each asset should have
  // a size which is of the same aspect ratio as the Creative.size. This
  // attribute is required and must have at least one asset.
  repeated CreativeAsset image_assets = 4
      [(google.api.field_behavior) = REQUIRED];

  // Optional. Third party impression tracking URLs to ping when this creative
  // is displayed.
  repeated string third_party_impression_tracking_urls = 5
      [(google.api.field_behavior) = OPTIONAL];
}

// A Creative that contains Ad Manager hosted audio ads and is served via VAST
// XML.
message AudioCreativeDetails {
  // Optional. Fields common to Video Ad Serving Template (VAST) creatives
  VastInfo vast_info = 1 [(google.api.field_behavior) = OPTIONAL];
}

// A Creative that contains externally hosted audio ads and is served via VAST
// XML.
message AudioRedirectCreativeDetails {
  // Optional. Fields common to Video Ad Serving Template (VAST) creatives
  VastInfo vast_info = 1 [(google.api.field_behavior) = OPTIONAL];
}

// A creative that is used for tracking clicks on ads that are served directly
// from the customers' web servers or media servers. NOTE: The size attribute
// is not used for click tracking creative and it will not be persisted upon
// save.
message ClickTrackingCreativeDetails {
  // Optional. The click tracking URL.
  optional string click_tracking_url = 1
      [(google.api.field_behavior) = OPTIONAL];
}

// A Creative that contains a custom HTML snippet and file assets.
message CustomCreativeDetails {
  // Required. The HTML snippet that this creative delivers.
  optional string html_snippet = 1 [(google.api.field_behavior) = REQUIRED];

  // The AMP HTML snippet that this creative delivers.
  optional string amp_html_snippet = 2;

  // Whether this custom creative is an interstitial. An interstitial creative
  // will not consider an impression served until it is fully rendered in the
  // browser.
  optional bool interstitial = 3;

  // Optional. The URL that the user is directed to if they click on the
  // creative. This attribute is required unless the `destinationUrlType` is
  // `NONE`, and has a maximum length of 1024 characters.
  optional string destination_url = 12 [(google.api.field_behavior) = OPTIONAL];

  // Optional. The action that should be performed if the user clicks on the
  // creative. This attribute defaults to `CLICK_TO_WEB`.
  optional CreativeDestinationUrlTypeEnum.CreativeDestinationUrlType
      destination_url_type = 13 [(google.api.field_behavior) = OPTIONAL];

  // Input only. Whether the creative is compatible for SafeFrame rendering.
  optional bool safe_frame_compatible = 5
      [(google.api.field_behavior) = INPUT_ONLY];

  // Output only. The effective value of whether the creative is compatible for
  // SafeFrame rendering, as decided by the service.
  optional bool effective_safe_frame_compatible = 6
      [(google.api.field_behavior) = OUTPUT_ONLY];

  // Optional. Impression tracking URLs to ping when this creative is displayed.
  repeated string third_party_impression_tracking_urls = 7
      [(google.api.field_behavior) = OPTIONAL];

  // Optional. A locked orientation for this creative to be displayed in.
  optional CreativeLockedOrientationEnum.CreativeLockedOrientation
      locked_orientation = 8 [(google.api.field_behavior) = OPTIONAL];

  // Optional. File assets that are associated with this creative, and can be
  // referenced in the snippet.
  repeated CustomCreativeAsset custom_creative_assets = 14
      [(google.api.field_behavior) = OPTIONAL];
}

// A Creative that contains a zipped HTML5 bundle asset, a list of third party
// impression trackers, and a third party click tracker.
message Html5CreativeDetails {
  // Optional. A locked orientation for this creative to be displayed in.
  optional CreativeLockedOrientationEnum.CreativeLockedOrientation
      locked_orientation = 1 [(google.api.field_behavior) = OPTIONAL];

  // Optional. Allows the creative size to differ from the actual HTML5 asset
  // size.
  optional bool override_size = 2 [(google.api.field_behavior) = OPTIONAL];

  // Optional. Impression tracking URLs to ping when this creative is displayed.
  repeated string third_party_impression_tracking_urls = 3
      [(google.api.field_behavior) = OPTIONAL];

  // Optional. A click tracking URL to ping when this creative is clicked.
  optional string third_party_click_tracking_url = 4
      [(google.api.field_behavior) = OPTIONAL];

  // Optional. Whether the creative is compatible for SafeFrame rendering.
  optional bool safe_frame_compatible = 7
      [(google.api.field_behavior) = OPTIONAL];

  // Required. The HTML5 asset. To preview the HTML5 asset, use the
  // `CreativeAsset.asset_url`. In this field, the
  // `CreativeAsset.asset_byte_array` must be a zip bundle and the
  // `CreativeAsset.file_name` must have a zip extension.
  optional CreativeAsset html5_asset = 8
      [(google.api.field_behavior) = REQUIRED];
}

// A Creative that displays an image.
message ImageCreativeDetails {
  // Alternative text to be rendered along with the creative used mainly for
  // accessibility. This field has a maximum length of 500
  // characters.
  optional string alt_text = 1;

  // Optional. The URL that the user is directed to if they click on the
  // creative. This attribute is required unless the `destinationUrlType` is
  // `NONE`, and has a maximum length of 1024 characters.
  optional string destination_url = 8 [(google.api.field_behavior) = OPTIONAL];

  // Optional. The action that should be performed if the user clicks on the
  // creative. This attribute defaults to `CLICK_TO_WEB`.
  optional CreativeDestinationUrlTypeEnum.CreativeDestinationUrlType
      destination_url_type = 9 [(google.api.field_behavior) = OPTIONAL];

  // Optional. Impression tracking URLs to ping when this creative is displayed.
  repeated string third_party_impression_tracking_urls = 3
      [(google.api.field_behavior) = OPTIONAL];

  // Optional. The AMP destination URL for this creative. This must be a valid
  // URL, including the `http://` or `https://` scheme.
  optional string amp_destination_url = 4
      [(google.api.field_behavior) = OPTIONAL];

  // Optional. A locked orientation for this creative to be displayed in.
  optional CreativeLockedOrientationEnum.CreativeLockedOrientation
      locked_orientation = 5 [(google.api.field_behavior) = OPTIONAL];

  // The primary image asset associated with this creative. This attribute is
  // required.
  CreativeAsset primary_image_asset = 6;

  // Secondary image assets associated with this creative. This
  // attribute is optional.
  //
  // Secondary image assets can be used to store different resolution versions
  // of the primary asset for use on non-standard density screens.
  repeated CreativeAsset secondary_image_assets = 7;

  // Optional. Allows the creative size to differ from the actual image asset
  // size.
  optional bool override_size = 10 [(google.api.field_behavior) = OPTIONAL];
}

// An overlay Creative that displays an image and is served via VAST 2.0 XML.
// Overlays cover part of the video content they are displayed on top of.
message ImageOverlayCreativeDetails {
  // Optional. A locked orientation for this creative to be displayed in.
  optional CreativeLockedOrientationEnum.CreativeLockedOrientation
      locked_orientation = 1 [(google.api.field_behavior) = OPTIONAL];

  // Optional. The URL that the user is directed to if they click on the
  // creative. This attribute is required unless the `destinationUrlType` is
  // `NONE`, and has a maximum length of 1024 characters.
  optional string destination_url = 3 [(google.api.field_behavior) = OPTIONAL];

  // Optional. The action that should be performed if the user clicks on the
  // creative. This attribute defaults to `CLICK_TO_WEB`.
  optional CreativeDestinationUrlTypeEnum.CreativeDestinationUrlType
      destination_url_type = 4 [(google.api.field_behavior) = OPTIONAL];

  // Optional. Allows the creative size to differ from the actual image asset
  // size.
  optional bool override_size = 5 [(google.api.field_behavior) = OPTIONAL];

  // Required. The primary image asset associated with this creative.
  CreativeAsset primary_image_asset = 6
      [(google.api.field_behavior) = REQUIRED];

  // Output only. The display name of the creative set.
  optional string creative_set_display_name = 7
      [(google.api.field_behavior) = OUTPUT_ONLY];

  // Output only. The resource name of the creative set.
  // Format: "networks/{network_code}/creativeSets/{creative_set_id}"
  optional string creative_set = 8 [
    (google.api.field_behavior) = OUTPUT_ONLY,
    (google.api.resource_reference) = {
      type: "admanager.googleapis.com/CreativeSet"
    }
  ];

  // Output only. The resource names of the companion creatives that are
  // associated with this creative. Format:
  // "networks/{network_code}/creatives/{creative_id}"
  repeated string companion_creatives = 9 [
    (google.api.field_behavior) = OUTPUT_ONLY,
    (google.api.resource_reference) = {
      type: "admanager.googleapis.com/Creative"
    }
  ];

  // Optional. URLs that will be pinged when conversion events happen.
  repeated VideoTrackingUrl tracking_urls = 10
      [(google.api.field_behavior) = OPTIONAL];

  // Optional. A comma separated key=value list of parameters that will be
  // supplied to the creative, written into the VAST `AdParameters` node.
  optional string custom_parameters = 11
      [(google.api.field_behavior) = OPTIONAL];

  // Optional. Minimum suggested duration.
  google.protobuf.Duration duration = 12
      [(google.api.field_behavior) = OPTIONAL];

  // Optional. `CreativePlaceholder` objects a creative set should fulfill.
  repeated CreativePlaceholder expected_companions = 13
      [(google.api.field_behavior) = OPTIONAL];

  // Output only. The companion delivery option this set will be served with.
  optional CompanionDeliveryOptionEnum.CompanionDeliveryOption
      expected_companion_delivery_option = 14
      [(google.api.field_behavior) = OUTPUT_ONLY];

  // Output only. An ad tag URL that will return a preview of the VAST XML
  // response specific to this creative.
  optional string vast_preview_url = 16
      [(google.api.field_behavior) = OUTPUT_ONLY];
}

// A Creative that loads an image asset from a specified URL.
message ImageRedirectCreativeDetails {
  // Optional. The URL that the user is directed to if they click on the
  // creative. This attribute is required unless the `destinationUrlType` is
  // `NONE`, and has a maximum length of 1024 characters.
  optional string destination_url = 5 [(google.api.field_behavior) = OPTIONAL];

  // Optional. The action that should be performed if the user clicks on the
  // creative. This attribute defaults to `CLICK_TO_WEB`.
  optional CreativeDestinationUrlTypeEnum.CreativeDestinationUrlType
      destination_url_type = 6 [(google.api.field_behavior) = OPTIONAL];

  // Optional. Alternative text to be rendered along with the creative used
  // mainly for accessibility. This field has a maximum length of 500
  // characters.
  optional string alt_text = 2 [(google.api.field_behavior) = OPTIONAL];

  // Required. The URL where the actual asset resides. This field has a maximum
  // length of 1024 characters.
  optional string image_url = 3 [(google.api.field_behavior) = REQUIRED];

  // Optional. Impression tracking URLs to ping when this creative is displayed.
  // Each string has a maximum length of 1024 characters.
  repeated string third_party_impression_tracking_urls = 4
      [(google.api.field_behavior) = OPTIONAL];
}

// An overlay Creative that loads an image asset from a specified URL and is
// served via VAST XML. Overlays cover part of the video content they are
// displayed on top of. This creative is read only.
message ImageRedirectOverlayCreativeDetails {
  // Optional. The URL that the user is directed to if they click on the
  // creative. This attribute is required unless the `destinationUrlType` is
  // `NONE`, and has a maximum length of 1024 characters.
  optional string destination_url = 2 [(google.api.field_behavior) = OPTIONAL];

  // Optional. The action that should be performed if the user clicks on the
  // creative. This attribute defaults to `CLICK_TO_WEB`.
  optional CreativeDestinationUrlTypeEnum.CreativeDestinationUrlType
      destination_url_type = 3 [(google.api.field_behavior) = OPTIONAL];

  // Required. The URL where the actual image asset resides. This attribute is
  // required and has a maximum length of 1024 characters.
  optional string image_url = 1 [(google.api.field_behavior) = REQUIRED];

  // Optional. The size of the image asset. Note that this may differ from the
  // creative size if the asset is not expected to fill the entire video player.
  optional Size asset_size = 7 [(google.api.field_behavior) = OPTIONAL];

  // Optional. Minimum suggested duration.
  optional google.protobuf.Duration duration = 8
      [(google.api.field_behavior) = OPTIONAL];

  // Optional. URLs that will be pinged when conversion events happen.
  repeated VideoTrackingUrl tracking_urls = 9
      [(google.api.field_behavior) = OPTIONAL];

  // Optional. A comma separated key=value list of parameters that will be
  // supplied to the creative, written into the VAST `AdParameters` node.
  optional string custom_parameters = 10
      [(google.api.field_behavior) = OPTIONAL];

  // Optional. `CreativePlaceholder` objects a creative set should fulfill.
  repeated CreativePlaceholder expected_companions = 11
      [(google.api.field_behavior) = OPTIONAL];

  // Output only. The companion delivery option this set will be served with.
  optional CompanionDeliveryOptionEnum.CompanionDeliveryOption
      expected_companion_delivery_option = 12
      [(google.api.field_behavior) = OUTPUT_ONLY];

  // Output only. An ad tag URL that will return a preview of the VAST XML
  // response specific to this creative.
  optional string vast_preview_url = 14
      [(google.api.field_behavior) = OUTPUT_ONLY];

  // Output only. The display name of the creative set.
  optional string creative_set_display_name = 4
      [(google.api.field_behavior) = OUTPUT_ONLY];

  // Output only. The resource name of the creative set.
  // Format: "networks/{network_code}/creativeSets/{creative_set_id}"
  optional string creative_set = 5 [
    (google.api.field_behavior) = OUTPUT_ONLY,
    (google.api.resource_reference) = {
      type: "admanager.googleapis.com/CreativeSet"
    }
  ];

  // Optional. The companion creatives that are associated with this creative.
  // Format: "networks/{network_code}/creatives/{creative_id}"
  repeated string companion_creatives = 6 [
    (google.api.field_behavior) = OPTIONAL,
    (google.api.resource_reference) = {
      type: "admanager.googleapis.com/Creative"
    }
  ];
}

// A Creative hosted by Campaign Manager 360.
//
// Similar to third-party creatives, a Campaign Manager 360 tag is used to
// retrieve a creative asset. However, Campaign Manager 360 tags are not sent
// to the user's browser. Instead, they are processed internally within the
// Google Marketing Platform system.
message InternalRedirectCreativeDetails {
  // Optional. A locked orientation for this creative to be displayed in.
  optional CreativeLockedOrientationEnum.CreativeLockedOrientation
      locked_orientation = 1 [(google.api.field_behavior) = OPTIONAL];

  // Output only. The asset size of an internal redirect creative. Note that
  // this may differ from `size` if users set `override_size` to true.
  optional Size asset_size = 5 [(google.api.field_behavior) = OUTPUT_ONLY];

  // Required. The internal redirect URL of the Campaign Manager 360 hosted
  // creative. This attribute has a maximum length of 1024 characters.
  optional string internal_redirect_url = 6
      [(google.api.field_behavior) = REQUIRED];

  // Optional. Allows the creative size to differ from the actual size specified
  // in the internal redirect's url.
  optional bool override_size = 7 [(google.api.field_behavior) = OPTIONAL];

  // Optional. Whether this creative is interstitial.
  optional bool interstitial = 2 [(google.api.field_behavior) = OPTIONAL];

  // Output only. The SSL compatibility scan result of this creative.
  optional CreativeSslScanResultEnum.CreativeSslScanResult ssl_scan_result = 3
      [(google.api.field_behavior) = OUTPUT_ONLY];

  // Optional. The manual override for the SSL compatibility of this creative.
  optional CreativeSslOverrideEnum.CreativeSslOverride ssl_manual_override = 4
      [(google.api.field_behavior) = OPTIONAL];

  // Optional. Impression tracking URLs to ping when this creative is displayed.
  repeated string third_party_impression_tracking_urls = 8
      [(google.api.field_behavior) = OPTIONAL];
}

// A Creative that isn't supported by Google DFP, but was migrated from DART.
// Creatives of this type cannot be created or modified.
message LegacyDfpCreativeDetails {}

// A Creative used for programmatic trafficking. This creative will be
// auto-created with the right approval from the buyer. This creative cannot be
// created through the API. This creative can be updated.
message ProgrammaticCreativeDetails {}

// A Creative that is created by a Rich Media Studio. You cannot create this
// creative, but you can update some fields of this creative.
message RichMediaStudioCreativeDetails {
  // Optional. A locked orientation for this creative to be displayed in.
  optional CreativeLockedOrientationEnum.CreativeLockedOrientation
      locked_orientation = 1 [(google.api.field_behavior) = OPTIONAL];

  // Output only. The creative ID as known by Rich Media Studio creative.
  optional int64 studio_creative_id = 3
      [(google.api.field_behavior) = OUTPUT_ONLY];

  // Optional. The creative format of the Rich Media Studio creative.
  optional RichMediaStudioCreativeFormatEnum.RichMediaStudioCreativeFormat
      creative_format = 4 [(google.api.field_behavior) = OPTIONAL];

  // Output only. The total size of all assets in bytes.
  optional int64 total_file_size = 6
      [(google.api.field_behavior) = OUTPUT_ONLY];

  // Optional. Ad tag keys.
  repeated string ad_tag_keys = 7 [(google.api.field_behavior) = OPTIONAL];

  // Optional. Custom key values.
  repeated string custom_key_values = 8
      [(google.api.field_behavior) = OPTIONAL];

  // Optional. The survey URL for this creative.
  optional string survey_url = 9 [(google.api.field_behavior) = OPTIONAL];

  // Optional. The tracking URL to be triggered when an ad starts to play,
  // whether Rich Media or backup content is displayed. Behaves like the /imp
  // URL that DART used to track impressions. This URL can't exceed 1024
  // characters and must start with http:// or https://.
  optional string all_impressions_url = 10
      [(google.api.field_behavior) = OPTIONAL];

  // Optional. The tracking URL to be triggered when any rich media artwork is
  // displayed in an ad. Behaves like the /imp URL that DART used to track
  // impressions. This URL can't exceed 1024 characters and must start with
  // http:// or https://.
  optional string rich_media_impressions_url = 11
      [(google.api.field_behavior) = OPTIONAL];

  // Optional. The tracking URL to be triggered when the Rich Media backup image
  // is served.
  optional string backup_image_impressions_url = 12
      [(google.api.field_behavior) = OPTIONAL];

  // Optional. The override CSS. You can put custom CSS code here to repair
  // creative styling; e.g. `tr td { background-color:#FBB; }`.
  optional string override_css = 13 [(google.api.field_behavior) = OPTIONAL];

  // Output only. The Flash plugin version required to view this creative; e.g.
  // `Flash 10.2/AS 3`.
  optional string required_flash_plugin_version = 14
      [(google.api.field_behavior) = OUTPUT_ONLY];

  // Optional. The duration of the creative.
  optional google.protobuf.Duration duration = 15
      [(google.api.field_behavior) = OPTIONAL];

  // Optional. The billing attribute associated with this creative.
  optional RichMediaStudioCreativeBillingAttributeEnum
      .RichMediaStudioCreativeBillingAttribute billing_attribute = 16
      [(google.api.field_behavior) = OPTIONAL];

  // Output only. Child assets associated with this creative.
  repeated RichMediaStudioChildAssetProperty
      rich_media_studio_child_asset_properties = 17
      [(google.api.field_behavior) = OUTPUT_ONLY];

  // Output only. The SSL compatibility scan result of this creative.
  optional CreativeSslScanResultEnum.CreativeSslScanResult ssl_scan_result = 18
      [(google.api.field_behavior) = OUTPUT_ONLY];

  // Optional. The manual override for the SSL compatibility of this creative.
  optional CreativeSslOverrideEnum.CreativeSslOverride ssl_manual_override = 19
      [(google.api.field_behavior) = OPTIONAL];
}

// A Creative that will be served into cable set-top boxes. There are no assets
// for this creative type, as they are hosted by external cable systems.
message SetTopBoxCreativeDetails {
  // Optional. Fields common to Video Ad Serving Template (VAST) creatives
  VastInfo vast_info = 1 [(google.api.field_behavior) = OPTIONAL];
}

// A Creative that is created by the specified creative template.
message TemplateCreativeDetails {
  // Optional. The AMP destination URL for this creative. This must be a valid
  // URL, including the `http://` or `https://` scheme.
  optional string amp_destination_url = 1
      [(google.api.field_behavior) = OPTIONAL];

  // Optional. A locked orientation for this creative to be displayed in.
  optional CreativeLockedOrientationEnum.CreativeLockedOrientation
      locked_orientation = 2 [(google.api.field_behavior) = OPTIONAL];

  // Optional. The URL that the user is directed to if they click on the
  // creative. This attribute is required unless the `destinationUrlType` is
  // `NONE`, and has a maximum length of 1024 characters.
  optional string destination_url = 18 [(google.api.field_behavior) = OPTIONAL];

  // Optional. The action that should be performed if the user clicks on the
  // creative. This attribute defaults to `CLICK_TO_WEB`.
  optional CreativeDestinationUrlTypeEnum.CreativeDestinationUrlType
      destination_url_type = 19 [(google.api.field_behavior) = OPTIONAL];
}

// A Creative that is served by a 3rd-party vendor.
message ThirdPartyCreativeDetails {
  // The HTML snippet that this creative delivers.
  optional string snippet = 4;

  // Output only. The HTML snippet that this creative delivers with macros
  // expanded.
  optional string expanded_snippet = 5
      [(google.api.field_behavior) = OUTPUT_ONLY];

  // Optional. A locked orientation for this creative to be displayed in.
  optional CreativeLockedOrientationEnum.CreativeLockedOrientation
      locked_orientation = 1 [(google.api.field_behavior) = OPTIONAL];

  // Output only. The SSL compatibility scan result of this creative.
  optional CreativeSslScanResultEnum.CreativeSslScanResult ssl_scan_result = 2
      [(google.api.field_behavior) = OUTPUT_ONLY];

  // Optional. The manual override for the SSL compatibility of this creative.
  optional CreativeSslOverrideEnum.CreativeSslOverride ssl_manual_override = 3
      [(google.api.field_behavior) = OPTIONAL];

  // Optional. Whether the Creative is compatible for SafeFrame rendering.
  optional bool safe_frame_compatible = 6
      [(google.api.field_behavior) = OPTIONAL];

  // Optional. A list of impression tracking URLs to ping when this creative is
  // displayed.
  repeated string third_party_impression_tracking_urls = 7
      [(google.api.field_behavior) = OPTIONAL];

  // Optional. The URL of the AMP creative.
  optional string amp_redirect_url = 8 [(google.api.field_behavior) = OPTIONAL];

  // Optional. The URL that the user is directed to if they click on the
  // creative. This attribute is required unless the `destinationUrlType` is
  // `NONE`, and has a maximum length of 1024 characters.
  optional string destination_url = 10 [(google.api.field_behavior) = OPTIONAL];

  // Optional. The action that should be performed if the user clicks on the
  // creative. This attribute defaults to `CLICK_TO_WEB`.
  optional CreativeDestinationUrlTypeEnum.CreativeDestinationUrlType
      destination_url_type = 11 [(google.api.field_behavior) = OPTIONAL];
}

// A Creative that points to an externally hosted VAST ad and is served via
// VAST XML as a VAST Wrapper.
message VastRedirectCreativeDetails {
  // Required. The URL where the 3rd party VAST XML is hosted.
  optional string vast_xml_url = 22 [(google.api.field_behavior) = REQUIRED];

  // Required. The type of VAST ad that this redirects to.
  optional VastRedirectTypeEnum.VastRedirectType vast_redirect_type = 4
      [(google.api.field_behavior) = REQUIRED];

  // Required. The duration of the VAST ad.
  google.protobuf.Duration duration = 5
      [(google.api.field_behavior) = REQUIRED];

  // Optional. Whether pricing information from the VAST response will be used
  // during ad selection.
  optional bool vast_pricing_enabled = 8
      [(google.api.field_behavior) = OPTIONAL];

  // Optional. Whether this is a redirect to a programmatic demand source.
  optional bool programmatic_demand_source = 9
      [(google.api.field_behavior) = OPTIONAL];

  // Optional. Whether server-side unwrapping is disabled.
  optional bool server_side_unwrapping_disabled = 10
      [(google.api.field_behavior) = OPTIONAL];

  // Optional. URLs that will be pinged when conversion events happen.
  repeated VideoTrackingUrl tracking_urls = 12
      [(google.api.field_behavior) = OPTIONAL];

  // Output only. An ad tag URL that will return a preview of the VAST XML
  // response specific to this creative.
  optional string vast_preview_url = 16
      [(google.api.field_behavior) = OUTPUT_ONLY];

  // Optional. Whether the 3rd party VAST XML points to an audio ad. When true,
  // `size` will always be 1x1.
  optional bool audio = 21 [(google.api.field_behavior) = OPTIONAL];

  // Optional. The URL that the user is directed to if they click on the
  // creative. This attribute is required unless the `destinationUrlType` is
  // `NONE`, and has a maximum length of 1024 characters.
  optional string destination_url = 2 [(google.api.field_behavior) = OPTIONAL];

  // Optional. The action that should be performed if the user clicks on the
  // creative. This attribute defaults to `CLICK_TO_WEB`.
  optional CreativeDestinationUrlTypeEnum.CreativeDestinationUrlType
      destination_url_type = 3 [(google.api.field_behavior) = OPTIONAL];
}

// A Creative that contains Ad Manager hosted video ads and is served via VAST
// XML.
message VideoCreativeDetails {
  // Optional. Fields common to Video Ad Serving Template (VAST) creatives
  VastInfo vast_info = 1 [(google.api.field_behavior) = OPTIONAL];
}

// A Creative that contains externally hosted video ads and is served via VAST
// XML.
message VideoRedirectCreativeDetails {
  // Optional. Fields common to Video Ad Serving Template (VAST) creatives
  VastInfo vast_info = 1 [(google.api.field_behavior) = OPTIONAL];
}

// Fields common to Video Ad Serving Template (VAST) creatives.
message VastInfo {
  // Optional. The expected duration of this creative.
  google.protobuf.Duration duration = 1
      [(google.api.field_behavior) = OPTIONAL];

  // Optional. Allows the creative duration to differ from the actual asset
  // durations.
  optional bool allow_duration_override = 2
      [(google.api.field_behavior) = OPTIONAL];

  // Optional. URLs that will be pinged when conversion events happen.
  repeated VideoTrackingUrl tracking_urls = 3
      [(google.api.field_behavior) = OPTIONAL];

  // Optional. A comma separated key=value list of parameters that will be
  // supplied to the creative, written into the VAST `AdParameters` node.
  optional string custom_parameters = 4
      [(google.api.field_behavior) = OPTIONAL];

  // Optional. The ad id associated with the video as defined by the `adIdType`
  // registry. This field is required if `adIdType` is not `NONE`.
  optional string ad_id = 5 [(google.api.field_behavior) = OPTIONAL];

  // Optional. The registry which the ad id of this creative belongs to. This
  // field defaults to `NONE`.
  optional VastAdIdTypeEnum.VastAdIdType ad_id_type = 6
      [(google.api.field_behavior) = OPTIONAL];

  // Optional. The type of skippable ad.
  optional SkippableAdTypeEnum.SkippableAdType skippable_ad_type = 7
      [(google.api.field_behavior) = OPTIONAL];

  // Output only. An ad tag URL that will return a preview of the VAST XML
  // response specific to this creative.
  optional string vast_preview_url = 8
      [(google.api.field_behavior) = OUTPUT_ONLY];

  // Output only. The display name of the creative set.
  optional string creative_set_display_name = 14
      [(google.api.field_behavior) = OUTPUT_ONLY];

  // Output only. The resource name of the creative set.
  // Format: "networks/{network_code}/creativeSets/{creative_set_id}"
  optional string creative_set = 15 [
    (google.api.field_behavior) = OUTPUT_ONLY,
    (google.api.resource_reference) = {
      type: "admanager.googleapis.com/CreativeSet"
    }
  ];

  // Optional. The URL that the user is directed to if they click on the
  // creative. This attribute is required unless the `destinationUrlType` is
  // `NONE`, and has a maximum length of 1024 characters.
  optional string destination_url = 16 [(google.api.field_behavior) = OPTIONAL];

  // Optional. The action that should be performed if the user clicks on the
  // creative. This attribute defaults to `CLICK_TO_WEB`.
  optional CreativeDestinationUrlTypeEnum.CreativeDestinationUrlType
      destination_url_type = 17 [(google.api.field_behavior) = OPTIONAL];

  // Optional. The companion creatives that are associated with this creative.
  // Format: "networks/{network_code}/creatives/{creative_id}"
  repeated string companion_creatives = 18 [
    (google.api.field_behavior) = OPTIONAL,
    (google.api.resource_reference) = {
      type: "admanager.googleapis.com/Creative"
    }
  ];
}

// Represents the buyer placement configuration for a creative.
message BuyerPlacementConfig {
  // Optional. The ID of the buyer placement.
  optional string placement_id = 1 [(google.api.field_behavior) = OPTIONAL];

  // Optional. The name of the buyer placement.
  optional string placement_display_name = 2
      [(google.api.field_behavior) = OPTIONAL];
}
