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

// GrpSettings contains information for a line item that will have a target
// demographic when serving. This information will be used to set up tracking
// and enable reporting on the demographic information.
message GrpSettings {
  // Optional. Specifies the minimum target age (in years) of the LineItem. This
  // field is only applicable if
  // [provider][google.ads.admanager.v1.GrpSettings.provider] is not null.
  optional int64 min_target_age = 1 [(google.api.field_behavior) = OPTIONAL];

  // Optional. Specifies the maximum target age (in years) of the LineItem. This
  // field is only applicable if
  // [provider][google.ads.admanager.v1.GrpSettings.provider] is not null.
  optional int64 max_target_age = 2 [(google.api.field_behavior) = OPTIONAL];

  // Optional. Specifies the target gender of the LineItem. This field is only
  // applicable if [provider][google.ads.admanager.v1.GrpSettings.provider] is
  // not null.
  optional GrpTargetGenderEnum.GrpTargetGender target_gender = 3
      [(google.api.field_behavior) = OPTIONAL];

  // Optional. Specifies the GRP provider of the LineItem.
  optional GrpProviderEnum.GrpProvider provider = 4
      [(google.api.field_behavior) = OPTIONAL];

  // Optional. Estimate for the in-target ratio given the line item's audience
  // targeting. This field is only applicable if
  // [provider][google.ads.admanager.v1.GrpSettings.provider] is Nielsen,
  // [LineItem.primary_goal.unit_type][] is in-target impressions, and
  // [LineItemCostType] is in-target CPM. This field determines the in-target
  // ratio to use for pacing Nielsen line items before Nielsen reporting data is
  // available. Represented as a milli percent, so 55.7% becomes 55700.
  optional int64 in_target_ratio_estimate_milli_percent = 6
      [(google.api.field_behavior) = OPTIONAL];

  // Optional. Specifies which pacing computation to apply in pacing to
  // impressions from connected devices.
  optional NielsenCtvPacingEnum.NielsenCtvPacing nielsen_ctv_pacing_type = 8
      [(google.api.field_behavior) = OPTIONAL];

  // Optional. Specifies whether to use Google or Nielsen device breakdown in
  // Nielsen Line Item auto pacing.
  optional PacingDeviceCategorizationEnum.PacingDeviceCategorization
      pacing_device_categorization_type = 9
      [(google.api.field_behavior) = OPTIONAL];

  // Optional. Specifies whether to apply true coviewing in Nielsen Line Item
  // auto pacing. This field can only be true if
  // [nielsen_ctv_pacing_type][google.ads.admanager.v1.GrpSettings.nielsen_ctv_pacing_type]
  // is not NONE.
  optional bool apply_true_coview = 10 [(google.api.field_behavior) = OPTIONAL];
}
