// 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.datamanager.v1;

import "google/ads/datamanager/v1/user_list_license_client_account_type.proto";
import "google/ads/datamanager/v1/user_list_license_metrics.proto";
import "google/ads/datamanager/v1/user_list_license_pricing.proto";
import "google/ads/datamanager/v1/user_list_license_status.proto";
import "google/api/field_behavior.proto";
import "google/api/resource.proto";

option csharp_namespace = "Google.Ads.DataManager.V1";
option go_package = "cloud.google.com/go/datamanager/apiv1/datamanagerpb;datamanagerpb";
option java_multiple_files = true;
option java_outer_classname = "UserListDirectLicenseProto";
option java_package = "com.google.ads.datamanager.v1";
option php_namespace = "Google\\Ads\\DataManager\\V1";
option ruby_package = "Google::Ads::DataManager::V1";

// A user list direct license.
//
// This feature is only available to data partners.
message UserListDirectLicense {
  option (google.api.resource) = {
    type: "datamanager.googleapis.com/UserListDirectLicense"
    pattern: "accountTypes/{account_type}/accounts/{account}/userListDirectLicenses/{user_list_direct_license}"
    plural: "userListDirectLicenses"
    singular: "userListDirectLicense"
  };

  // Identifier. The resource name of the user list direct license.
  string name = 1 [(google.api.field_behavior) = IDENTIFIER];

  // Immutable. ID of the user list being licensed.
  optional int64 user_list_id = 2 [(google.api.field_behavior) = IMMUTABLE];

  // Output only. Name of the user list being licensed.
  //
  // This field is read-only.
  string user_list_display_name = 3 [(google.api.field_behavior) = OUTPUT_ONLY];

  // Immutable. Account type of client customer which the user list is being
  // licensed to.
  optional UserListLicenseClientAccountType client_account_type = 4
      [(google.api.field_behavior) = IMMUTABLE];

  // Immutable. ID of client customer which the user list is being licensed to.
  optional int64 client_account_id = 5
      [(google.api.field_behavior) = IMMUTABLE];

  // Output only. Name of client customer which the user list is being licensed
  // to.
  //
  // This field is read-only.
  string client_account_display_name = 6
      [(google.api.field_behavior) = OUTPUT_ONLY];

  // Optional. Status of UserListDirectLicense - ENABLED or DISABLED.
  optional UserListLicenseStatus status = 7
      [(google.api.field_behavior) = OPTIONAL];

  // Optional. UserListDirectLicense pricing.
  UserListLicensePricing pricing = 8 [(google.api.field_behavior) = OPTIONAL];

  // Output only. Pricing history of this user list license.
  //
  // This field is read-only.
  repeated UserListLicensePricing historical_pricings = 9
      [(google.api.field_behavior) = OUTPUT_ONLY];

  // Output only. Metrics related to this license
  //
  // This field is read-only and only populated if the start and end dates are
  // set in the ListUserListDirectLicenses call
  UserListLicenseMetrics metrics = 10
      [(google.api.field_behavior) = OUTPUT_ONLY];
}
