// 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/multi_party_auth_operation_type.proto";
import "google/ads/googleads/v23/enums/multi_party_auth_review_status.proto";
import "google/ads/googleads/v23/enums/multi_party_auth_review_target_resource.proto";
import "google/ads/googleads/v23/resources/customer_user_access.proto";
import "google/ads/googleads/v23/resources/customer_user_access_invitation.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 = "MultiPartyAuthReviewProto";
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";

// Resource representing a Multi-Party Authentication review.
message MultiPartyAuthReview {
  option (google.api.resource) = {
    type: "googleads.googleapis.com/MultiPartyAuthReview"
    pattern: "customers/{customer_id}/multiPartyAuthReviews/{customer_invitation_id}"
  };

  // Immutable. The resource name of the Multi-Party Authentication review.
  // Resource names have the form:
  // `customers/{customer_id}/multiPartyAuthReviews/{multi_party_auth_review_id}`
  string resource_name = 1 [
    (google.api.field_behavior) = IMMUTABLE,
    (google.api.resource_reference) = {
      type: "googleads.googleapis.com/MultiPartyAuthReview"
    }
  ];

  // Output only. The ID of the Multi-Party Authorization review.
  int64 multi_party_auth_review_id = 4
      [(google.api.field_behavior) = OUTPUT_ONLY];

  // Output only. The creation date and time of the Multi-Party Authorization
  // review.
  string creation_date_time = 5 [(google.api.field_behavior) = OUTPUT_ONLY];

  // Output only. The status of the Multi-Party Authorization review.
  google.ads.googleads.v23.enums.MultiPartyAuthReviewStatusEnum
      .MultiPartyAuthReviewStatus review_status = 6
      [(google.api.field_behavior) = OUTPUT_ONLY];

  // Output only. The approval date and time of the Multi-Party Authorization
  // review.
  string approval_date_time = 7 [(google.api.field_behavior) = OUTPUT_ONLY];

  // Output only. The justification for the Multi-Party Authorization review
  // request given by the requester.
  string justification = 9 [(google.api.field_behavior) = OUTPUT_ONLY];

  // Output only. The email of the user who requested the Multi-Party
  // Authorization review
  string request_user_email = 10 [(google.api.field_behavior) = OUTPUT_ONLY];

  // Output only. The operation type of the Multi-Party Authorization review.
  google.ads.googleads.v23.enums.MultiPartyAuthOperationTypeEnum
      .MultiPartyAuthOperationType operation_type = 11
      [(google.api.field_behavior) = OUTPUT_ONLY];

  // Output only. The target resource for which Multi-Party Authorization is
  // requested.
  google.ads.googleads.v23.enums.MultiPartyAuthReviewTargetResourceEnum
      .MultiPartyAuthReviewTargetResource target_resource = 12
      [(google.api.field_behavior) = OUTPUT_ONLY];

  // The details under review, based on the type of target resource.
  oneof multi_party_review_detail {
    // Output only. The CustomerUserAccess details.
    CustomerUserAccessReview customer_user_access_review = 2
        [(google.api.field_behavior) = OUTPUT_ONLY];

    // Output only. The CustomerUserAccessInvitation details.
    CustomerUserAccessInvitationReview customer_user_access_invitation_review =
        3 [(google.api.field_behavior) = OUTPUT_ONLY];
  }
}

// Details for CustomerUserAccess.
message CustomerUserAccessReview {
  // Output only. The resource name of the CustomerUserAccess being changed.
  string old_customer_user_access = 1 [
    (google.api.field_behavior) = OUTPUT_ONLY,
    (google.api.resource_reference) = {
      type: "googleads.googleapis.com/CustomerUserAccess"
    }
  ];

  // Output only. The new CustomerUserAccess details. Only fields that need to
  // be reviewed are populated.
  CustomerUserAccess new_customer_user_access = 2
      [(google.api.field_behavior) = OUTPUT_ONLY];
}

// Details for CustomerUserAccessInvitation.
message CustomerUserAccessInvitationReview {
  // Output only. The new CustomerUserAccessInvitation details. Only fields that
  // need to be reviewed are populated.
  CustomerUserAccessInvitation new_customer_user_access_invitation = 2
      [(google.api.field_behavior) = OUTPUT_ONLY];
}
