// 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.googleads.v25.resources;

import "google/ads/googleads/v25/enums/brand_lift_measurement_type.proto";
import "google/ads/googleads/v25/enums/survey_intended_action.proto";
import "google/ads/googleads/v25/enums/survey_subject_type.proto";
import "google/api/field_behavior.proto";
import "google/api/resource.proto";

option csharp_namespace = "Google.Ads.GoogleAds.V25.Resources";
option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v25/resources;resources";
option java_multiple_files = true;
option java_outer_classname = "LiftMeasurementConfigProto";
option java_package = "com.google.ads.googleads.v25.resources";
option objc_class_prefix = "GAA";
option php_namespace = "Google\\Ads\\GoogleAds\\V25\\Resources";
option ruby_package = "Google::Ads::GoogleAds::V25::Resources";

// A Lift Measurement Configuration (LMC), which is a lift study. This groups
// all associated Brand Lift, Conversion Lift, and Search Lift measurements.
message LiftMeasurementConfig {
  option (google.api.resource) = {
    type: "googleads.googleapis.com/LiftMeasurementConfig"
    pattern: "customers/{customer_id}/liftMeasurementConfigs/{lift_measurement_configuration_id}"
  };

  // A single measurement question set for a survey.
  message SingleMeasurementQuestionSet {
    // Output only. The intended action for the question text.
    google.ads.googleads.v25.enums.SurveyIntendedActionEnum.SurveyIntendedAction
        question_text_intended_action = 1
        [(google.api.field_behavior) = OUTPUT_ONLY];

    // Output only. The subject type for the question text.
    google.ads.googleads.v25.enums.SurveySubjectTypeEnum.SurveySubjectType
        question_text_subject_type = 2
        [(google.api.field_behavior) = OUTPUT_ONLY];

    // Output only. The brand measurement types for the question.
    repeated google.ads.googleads.v25.enums.BrandLiftMeasurementTypeEnum
        .BrandLiftMeasurementType question_measurements = 3
        [(google.api.field_behavior) = OUTPUT_ONLY];

    // Output only. The advertiser preferred choice.
    string advertiser_preferred_choice = 4
        [(google.api.field_behavior) = OUTPUT_ONLY];

    // Output only. The competitor choices.
    repeated string competitor_choices = 5
        [(google.api.field_behavior) = OUTPUT_ONLY];
  }

  // Immutable. The resource name of the lift measurement config. Lift
  // measurement config resource names have the form:
  //
  // `customers/{customer_id}/liftMeasurementConfigs/{lift_measurement_config_id}`
  string resource_name = 1 [
    (google.api.field_behavior) = IMMUTABLE,
    (google.api.resource_reference) = {
      type: "googleads.googleapis.com/LiftMeasurementConfig"
    }
  ];

  // Output only. The unique identifier for the Lift Measurement Configuration
  // (LMC).
  int64 lift_measurement_config_id = 2
      [(google.api.field_behavior) = OUTPUT_ONLY];

  // Output only. The name of the lift study.
  string name = 3 [(google.api.field_behavior) = OUTPUT_ONLY];

  // Output only. The list of conversion action resource names associated with
  // this lift measurement configuration.
  repeated string conversion_actions = 4 [
    (google.api.field_behavior) = OUTPUT_ONLY,
    (google.api.resource_reference) = {
      type: "googleads.googleapis.com/ConversionAction"
    }
  ];

  // Output only. The resource names of campaigns associated with this lift
  // measurement config. These are the ones currently linked, not historical.
  repeated string campaigns = 5 [
    (google.api.field_behavior) = OUTPUT_ONLY,
    (google.api.resource_reference) = {
      type: "googleads.googleapis.com/Campaign"
    }
  ];

  // Output only. The survey language.
  string survey_language = 7 [(google.api.field_behavior) = OUTPUT_ONLY];

  // Output only. The single measurement question set.
  SingleMeasurementQuestionSet single_measurement_question_set = 9
      [(google.api.field_behavior) = OUTPUT_ONLY];

  // Output only. The holdback ratio for Conversion Lift.
  optional int64 conversion_lift_holdback_ratio_micros = 10
      [(google.api.field_behavior) = OUTPUT_ONLY];
}
