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

import "google/ads/googleads/v23/enums/incentive_state.proto";
import "google/api/field_behavior.proto";
import "google/api/resource.proto";

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

// Represents an applied incentive.
message AppliedIncentive {
  option (google.api.resource) = {
    type: "googleads.googleapis.com/AppliedIncentive"
    pattern: "customers/{customer_id}/appliedIncentives/{coupon_code}"
  };

  // Output only. The resource name of the incentive.
  // Incentive resource names have the form:
  //
  // `customers/{customer_id}/appliedIncentives/{coupon_code}`
  string resource_name = 1 [
    (google.api.field_behavior) = OUTPUT_ONLY,
    (google.api.resource_reference) = {
      type: "googleads.googleapis.com/AppliedIncentive"
    }
  ];

  // Output only. The coupon code of the incentive.
  optional string coupon_code = 2 [(google.api.field_behavior) = OUTPUT_ONLY];

  // Output only. The current state of the incentive.
  optional google.ads.googleads.v23.enums.IncentiveStateEnum.IncentiveState
      incentive_state = 3 [(google.api.field_behavior) = OUTPUT_ONLY];

  // Output only. The redemption time of the incentive in "YYYY-MM-DD HH:MM:SS"
  // format in UTC.
  optional string redemption_date_time = 4
      [(google.api.field_behavior) = OUTPUT_ONLY];

  // Output only. The time by which the incentive's fulfillment requirements
  // must be met, in "YYYY-MM-DD HH:MM:SS" format in UTC.
  optional string fulfillment_expiration_date_time = 5
      [(google.api.field_behavior) = OUTPUT_ONLY];

  // Output only. The time when the reward was granted in "YYYY-MM-DD HH:MM:SS"
  // format in UTC. This field is not set if the reward has not been granted.
  optional string reward_grant_date_time = 6
      [(google.api.field_behavior) = OUTPUT_ONLY];

  // Output only. The time when the granted reward expires in "YYYY-MM-DD
  // HH:MM:SS" format in UTC. This field is not set if the reward has not been
  // granted.
  optional string reward_expiration_date_time = 7
      [(google.api.field_behavior) = OUTPUT_ONLY];

  // Output only. The currency code for all monetary amounts (for example,
  // "USD").
  optional string currency_code = 8 [(google.api.field_behavior) = OUTPUT_ONLY];

  // Output only. The maximum potential reward amount in micros for the
  // incentive.
  optional int64 reward_amount_micros = 9
      [(google.api.field_behavior) = OUTPUT_ONLY];

  // Output only. The amount of the reward granted in micros.
  // This field is not set if the reward has not been granted.
  optional int64 granted_amount_micros = 10
      [(google.api.field_behavior) = OUTPUT_ONLY];

  // Output only. The minimum amount that must be spent to fulfill the coupon
  // requirements, in micros.
  optional int64 required_min_spend_micros = 11
      [(google.api.field_behavior) = OUTPUT_ONLY];

  // Output only. The current amount spent towards the fulfillment requirements,
  // in micros.
  optional int64 current_spend_towards_fulfillment_micros = 12
      [(google.api.field_behavior) = OUTPUT_ONLY];

  // Output only. The remaining balance of the granted reward in micros.
  // This field is not set if the reward has not been granted.
  optional int64 reward_balance_remaining_micros = 13
      [(google.api.field_behavior) = OUTPUT_ONLY];
}
