// Copyright 2025 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.cloud.geminidataanalytics.v1alpha;

import "google/api/field_behavior.proto";

option csharp_namespace = "Google.Cloud.GeminiDataAnalytics.V1Alpha";
option go_package = "cloud.google.com/go/geminidataanalytics/apiv1alpha/geminidataanalyticspb;geminidataanalyticspb";
option java_multiple_files = true;
option java_outer_classname = "CredentialsProto";
option java_package = "com.google.cloud.geminidataanalytics.v1alpha";
option php_namespace = "Google\\Cloud\\GeminiDataAnalytics\\V1alpha";
option ruby_package = "Google::Cloud::GeminiDataAnalytics::V1alpha";

// Represents different forms of credential specification.
message Credentials {
  // The kind of credentials.
  // }
  oneof kind {
    // OAuth credentials.
    OAuthCredentials oauth = 1;
  }
}

// Represents OAuth credentials.
message OAuthCredentials {
  // The name of the secret containing the access token.
  // Represents secret-based OAuth credentials.
  message SecretBased {
    // Required. An OAuth client ID.
    string client_id = 2 [(google.api.field_behavior) = REQUIRED];

    // Required. An OAuth client secret.
    string client_secret = 3 [(google.api.field_behavior) = REQUIRED];
  }

  // Read more about Looker access tokens here:
  // https://developers.looker.com/api/advanced-usage/looker-api-oauth
  message TokenBased {
    // Required. The name of the secret containing the access token.
    string access_token = 1 [(google.api.field_behavior) = REQUIRED];
  }

  // The kind of OAuth credentials.
  oneof kind {
    // Secret-based OAuth credentials.
    SecretBased secret = 2;

    // Token-based OAuth credentials.
    TokenBased token = 3;
  }
}
