// 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/size.proto";
import "google/api/field_behavior.proto";
import "google/api/resource.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 = "CreativePlaceholderProto";
option java_package = "com.google.ads.admanager.v1";
option php_namespace = "Google\\Ads\\AdManager\\V1";
option ruby_package = "Google::Ads::AdManager::V1";

// Describes a slot that a creative is expected to fill. This is used in
// forecasting and to validate that the correct creatives are associated with
// the line item.
message CreativePlaceholder {
  // Required. The size that the creative is expected to have.
  Size size = 1 [(google.api.field_behavior) = REQUIRED];

  // Optional. The companions that the creative is expected to have. This
  // attribute can only be set if the line item it belongs to has an
  // [EnvironmentType][google.ads.admanager.v1.EnvironmentTypeEnum.EnvironmentType]
  // of VIDEO_PLAYER or
  // [roadblocking_type][google.ads.admanager.v1.LineItem.roadblocking_type] of
  // CREATIVE_SET.
  repeated CreativePlaceholderCompanion companions = 10
      [(google.api.field_behavior) = OPTIONAL];

  // Optional. Non-empty default. Expected number of creatives that will be
  // uploaded corresponding to this creative placeholder.  This estimate is used
  // to improve the accuracy of forecasting; for example, if label frequency
  // capping limits the number of times a creative may be served. By default,
  // the expected creative count is set to 1.
  optional int32 expected_creative_count = 3 [
    (google.api.field_behavior) = OPTIONAL,
    (google.api.field_behavior) = NON_EMPTY_DEFAULT
  ];

  // Optional. Set of labels applied directly to this CreativePlaceholder.
  repeated AppliedLabel applied_labels = 4
      [(google.api.field_behavior) = OPTIONAL];

  // Optional. Non-empty default. Indicates if the expected creative of this
  // placeholder has an AMP only variant. This is used to improve the accuracy
  // of forecasting and has no effect on serving. By default, the value is
  // false.
  optional bool amp_only = 5 [
    (google.api.field_behavior) = OPTIONAL,
    (google.api.field_behavior) = NON_EMPTY_DEFAULT
  ];

  // Optional. The display name of the creative targeting that this
  // CreativePlaceholder represents.
  optional string creative_targeting_display_name = 6
      [(google.api.field_behavior) = OPTIONAL];
}

// An individual companion to a
// [CreativePlaceholder][google.ads.admanager.v1.CreativePlaceholder].
message CreativePlaceholderCompanion {
  // Required. The size of the companion to a
  // [CreativePlaceholder][google.ads.admanager.v1.CreativePlaceholder].
  optional Size size = 1 [(google.api.field_behavior) = REQUIRED];
}
