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

import "google/api/field_behavior.proto";
import "google/api/resource.proto";
import "google/protobuf/timestamp.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 = "GoldengateDeploymentVersionProto";
option java_package = "com.google.cloud.oracledatabase.v1";
option php_namespace = "Google\\Cloud\\OracleDatabase\\V1";
option ruby_package = "Google::Cloud::OracleDatabase::V1";

// Details of the Goldengate Deployment Version resource.
message GoldengateDeploymentVersion {
  option (google.api.resource) = {
    type: "oracledatabase.googleapis.com/GoldengateDeploymentVersion"
    pattern: "projects/{project}/locations/{location}/goldengateDeploymentVersions/{goldengate_deployment_version}"
    plural: "goldengateDeploymentVersions"
    singular: "goldengateDeploymentVersion"
  };

  // Identifier. The name of the Goldengate Deployment Version resource with the
  // format:
  // projects/{project}/locations/{location}/goldengateDeploymentVersions/{goldengate_deployment_version}
  string name = 1 [(google.api.field_behavior) = IDENTIFIER];

  // Output only. The deployment version ocid of the Goldengate Deployment
  // Version resource.
  string ocid = 2 [(google.api.field_behavior) = OUTPUT_ONLY];

  // Output only. The technology type of the Goldengate Deployment Version
  // resource.
  GoldengateDeploymentVersionProperties properties = 3
      [(google.api.field_behavior) = OUTPUT_ONLY];
}

// Properties of GoldengateDeploymentVersion.
message GoldengateDeploymentVersionProperties {
  // The deployment type of the Goldengate Deployment Version resource.
  enum DeploymentType {
    // Default unspecified value.
    DEPLOYMENT_TYPE_UNSPECIFIED = 0;

    // Goldengate Deployment Type category is OGG.
    OGG = 1;

    // Goldengate Deployment Type category is DATABASE_ORACLE.
    DATABASE_ORACLE = 2;

    // Goldengate Deployment Type category is BIGDATA.
    BIGDATA = 3;

    // Goldengate Deployment Type category is DATABASE_MICROSOFT_SQLSERVER.
    DATABASE_MICROSOFT_SQLSERVER = 4;

    // Goldengate Deployment Type category is DATABASE_MYSQL.
    DATABASE_MYSQL = 5;

    // Goldengate Deployment Type category is DATABASE_POSTGRESQL.
    DATABASE_POSTGRESQL = 6;

    // Goldengate Deployment Type category is DATABASE_DB2ZOS.
    DATABASE_DB2ZOS = 7;

    // Goldengate Deployment Type category is DATABASE_DB2I.
    DATABASE_DB2I = 8;

    // Goldengate Deployment Type category is GGSA.
    GGSA = 9;

    // Goldengate Deployment Type category is DATA_TRANSFORMS.
    DATA_TRANSFORMS = 10;
  }

  // The release type of the Goldengate Deployment Version resource.
  enum DeploymentReleaseType {
    // Default unspecified value.
    DEPLOYMENT_RELEASE_TYPE_UNSPECIFIED = 0;

    // Goldengate Deployment Version release type is MAJOR.
    MAJOR = 1;

    // Goldengate Deployment Version release type is BUNDLE.
    BUNDLE = 2;

    // Goldengate Deployment Version release type is MINOR.
    MINOR = 3;
  }

  // Output only. The deployment type of the Goldengate Deployment Version
  // resource.
  DeploymentType deployment_type = 1
      [(google.api.field_behavior) = OUTPUT_ONLY];

  // Optional. Whether the Goldengate Deployment Version resource is a security
  // fix.
  bool security_fix = 2 [(google.api.field_behavior) = OPTIONAL];

  // Output only. The OGG version of the Goldengate Deployment Version resource.
  string ogg_version = 3 [(google.api.field_behavior) = OUTPUT_ONLY];

  // Output only. The release type of the Goldengate Deployment Version
  // resource.
  DeploymentReleaseType release_type = 4
      [(google.api.field_behavior) = OUTPUT_ONLY];

  // Output only. The release time of the Goldengate Deployment Version
  // resource.
  google.protobuf.Timestamp release_time = 5
      [(google.api.field_behavior) = OUTPUT_ONLY];

  // Output only. The support end time of the Goldengate Deployment Version
  // resource.
  google.protobuf.Timestamp support_end_time = 6
      [(google.api.field_behavior) = OUTPUT_ONLY];
}

// Message for listing GoldengateDeploymentVersions.
message ListGoldengateDeploymentVersionsRequest {
  // Required. Parent value for ListGoldengateDeploymentVersionsRequest
  // Format: projects/{project}/locations/{location}
  string parent = 1 [
    (google.api.field_behavior) = REQUIRED,
    (google.api.resource_reference) = {
      child_type: "oracledatabase.googleapis.com/GoldengateDeploymentVersion"
    }
  ];

  // Optional. Requested page size. Server may return fewer items than
  // requested. If unspecified, server will pick an appropriate default. The
  // maximum value is 1000; values above 1000 will be coerced to 1000.
  int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL];

  // Optional. A token identifying a page of results the server should return.
  string page_token = 3 [(google.api.field_behavior) = OPTIONAL];

  // Optional. An expression for filtering the results of the request. Either
  // the deployment_id and deployment_type fields must be specified in the
  // format: `deployment_id="id"` or `deployment_type="DATABASE_ORACLE"`.
  string filter = 4 [(google.api.field_behavior) = OPTIONAL];
}

// Message for response to listing GoldengateDeploymentVersions
message ListGoldengateDeploymentVersionsResponse {
  // The list of GoldengateDeploymentVersion
  repeated GoldengateDeploymentVersion goldengate_deployment_versions = 1;

  // A token, which can be sent as `page_token` to retrieve the next page.
  // If this field is omitted, there are no subsequent pages.
  string next_page_token = 2;

  // Unordered list. Locations that could not be reached.
  repeated string unreachable = 3
      [(google.api.field_behavior) = UNORDERED_LIST];
}
