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

import "google/api/field_behavior.proto";

option csharp_namespace = "Google.Cloud.OracleDatabase.V1";
option go_package = "cloud.google.com/go/oracledatabase/apiv1/oracledatabasepb;oracledatabasepb";
option java_multiple_files = true;
option java_outer_classname = "CommonProto";
option java_package = "com.google.cloud.oracledatabase.v1";
option php_namespace = "Google\\Cloud\\OracleDatabase\\V1";
option ruby_package = "Google::Cloud::OracleDatabase::V1";

// The compute model of the Exadata Infrastructure, VM Cluster and Autonomous
// Database.
enum ComputeModel {
  // Unspecified compute model.
  COMPUTE_MODEL_UNSPECIFIED = 0;

  // Abstract measure of compute resources. ECPUs are based on the number of
  // cores elastically allocated from a pool of compute and storage servers.
  COMPUTE_MODEL_ECPU = 1;

  // Physical measure of compute resources. OCPUs are based on the physical
  // core of a processor.
  COMPUTE_MODEL_OCPU = 2;
}

// The CustomerContact reference as defined by Oracle.
// https://docs.oracle.com/en-us/iaas/api/#/en/database/20160918/datatypes/CustomerContact
message CustomerContact {
  // Required. The email address used by Oracle to send notifications regarding
  // databases and infrastructure.
  string email = 1 [(google.api.field_behavior) = REQUIRED];
}

// The identity connector details which will allow OCI to securely access
// the resources in the customer project.
message IdentityConnector {
  // The various connection states of the WorkloadIdentityPoolConnection.
  enum ConnectionState {
    // Default unspecified value.
    CONNECTION_STATE_UNSPECIFIED = 0;

    // The identity pool connection is connected.
    CONNECTED = 1;

    // The identity pool connection is partially connected.
    PARTIALLY_CONNECTED = 2;

    // The identity pool connection is disconnected.
    DISCONNECTED = 3;

    // The identity pool connection is in an unknown state.
    UNKNOWN = 4;
  }

  // Output only. A google managed service account on which customers can grant
  // roles to access resources in the customer project. Example:
  // `p176944527254-55-75119d87fd8f@gcp-sa-oci.iam.gserviceaccount.com`
  string service_agent_email = 1 [(google.api.field_behavior) = OUTPUT_ONLY];

  // Output only. The connection state of the identity connector.
  ConnectionState connection_state = 2
      [(google.api.field_behavior) = OUTPUT_ONLY];
}

// Data collection options for diagnostics.
// https://docs.oracle.com/en-us/iaas/api/#/en/database/20160918/datatypes/DataCollectionOptions
message DataCollectionOptionsCommon {
  // Optional. Indicates whether to enable data collection for diagnostics.
  bool is_diagnostics_events_enabled = 1
      [(google.api.field_behavior) = OPTIONAL];

  // Optional. Indicates whether to enable health monitoring.
  bool is_health_monitoring_enabled = 2
      [(google.api.field_behavior) = OPTIONAL];

  // Optional. Indicates whether to enable incident logs and trace collection.
  bool is_incident_logs_enabled = 3 [(google.api.field_behavior) = OPTIONAL];
}
