diff --git a/storage/clouddms/logging/v1/BUILD.bazel b/storage/clouddms/logging/v1/BUILD.bazel new file mode 100644 index 00000000..d4468411 --- /dev/null +++ b/storage/clouddms/logging/v1/BUILD.bazel @@ -0,0 +1,166 @@ +# This file was automatically generated by BuildFileGenerator + +# This is an API workspace, having public visibility by default makes perfect sense. +package(default_visibility = ["//visibility:public"]) + +############################################################################## +# Common +############################################################################## +load("@rules_proto//proto:defs.bzl", "proto_library") + +proto_library( + name = "logging_proto", + srcs = [ + "clouddms_stackdriver_logs.proto", + ], + deps = [ + "//google/rpc:status_proto", + "@com_google_protobuf//:duration_proto", + "@com_google_protobuf//:timestamp_proto", + ], +) + +############################################################################## +# Java +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "java_grpc_library", + "java_proto_library", +) + +java_proto_library( + name = "logging_java_proto", + deps = [":logging_proto"], +) + +java_grpc_library( + name = "logging_java_grpc", + srcs = [":logging_proto"], + deps = [":logging_java_proto"], +) + +############################################################################## +# Go +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "go_proto_library", +) + +go_proto_library( + name = "logging_go_proto", + compilers = ["@io_bazel_rules_go//proto:go_grpc"], + importpath = "google.golang.org/genproto/googleapis/storage/clouddms/logging/v1", + protos = [":logging_proto"], + deps = [ + "//google/rpc:status_go_proto", + ], +) + +############################################################################## +# Python +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "moved_proto_library", + "py_grpc_library", + "py_proto_library", +) + +moved_proto_library( + name = "logging_moved_proto", + srcs = [":logging_proto"], + deps = [ + "//google/rpc:status_proto", + "@com_google_protobuf//:duration_proto", + "@com_google_protobuf//:timestamp_proto", + ], +) + +py_proto_library( + name = "logging_py_proto", + plugin = "@protoc_docs_plugin//:docs_plugin", + deps = [":logging_moved_proto"], +) + +py_grpc_library( + name = "logging_py_grpc", + srcs = [":logging_moved_proto"], + deps = [":logging_py_proto"], +) + +############################################################################## +# PHP +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "php_grpc_library", + "php_proto_library", +) + +php_proto_library( + name = "logging_php_proto", + deps = [":logging_proto"], +) + +php_grpc_library( + name = "logging_php_grpc", + srcs = [":logging_proto"], + deps = [":logging_php_proto"], +) + +############################################################################## +# Node.js +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "nodejs_gapic_assembly_pkg", + "nodejs_gapic_library", +) + + +############################################################################## +# Ruby +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "ruby_grpc_library", + "ruby_proto_library", +) + +ruby_proto_library( + name = "logging_ruby_proto", + deps = [":logging_proto"], +) + +ruby_grpc_library( + name = "logging_ruby_grpc", + srcs = [":logging_proto"], + deps = [":logging_ruby_proto"], +) + +############################################################################## +# C# +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "csharp_grpc_library", + "csharp_proto_library", +) + +csharp_proto_library( + name = "logging_csharp_proto", + deps = [":logging_proto"], +) + +csharp_grpc_library( + name = "logging_csharp_grpc", + srcs = [":logging_proto"], + deps = [":logging_csharp_proto"], +) + +############################################################################## +# C++ +############################################################################## +# Put your C++ code here diff --git a/storage/clouddms/logging/v1/clouddms_stackdriver_logs.proto b/storage/clouddms/logging/v1/clouddms_stackdriver_logs.proto new file mode 100644 index 00000000..e7ad1f06 --- /dev/null +++ b/storage/clouddms/logging/v1/clouddms_stackdriver_logs.proto @@ -0,0 +1,371 @@ +// Copyright 2020 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 storage.clouddms.logging.v1; + +import "google/protobuf/duration.proto"; +import "google/protobuf/timestamp.proto"; +import "google/rpc/status.proto"; + +option java_multiple_files = true; +option java_outer_classname = "DataMigrationStackDriverLogs"; +option java_package = "com.google.storage.clouddms.logging.v1"; +option go_package = "google.golang.org/genproto/googleapis/storage/clouddms/logging/v1;logging"; + +// The database engines. +enum DatabaseEngine { + // The source database engine of the migration job is unknown. + DATABASE_ENGINE_UNSPECIFIED = 0; + + // The source engine is MySQL. + MYSQL = 1; + + // The source engine is PostgreSQL. + POSTGRESQL = 2; +} + +// The database providers. +enum DatabaseProvider { + // The database provider is unknown. + DATABASE_PROVIDER_UNSPECIFIED = 0; + + // CloudSQL runs the database. + CLOUDSQL = 1; + + // RDS runs the database. + RDS = 2; +} + +// A message defining the database engine and provider. +message DatabaseType { + // The database provider. + DatabaseProvider provider = 1; + + // The database engine. + DatabaseEngine engine = 2; +} + +// Migration job as stored in Stackdriver logs. +// NEXT_TAG = 36. +message LoggedMigrationJob { + // The migration job states enum. + enum State { + // The state of the migration job is unknown. + STATE_UNSPECIFIED = 0; + + // The migration job is down for maintenance. + MAINTENANCE = 1; + + // The migration job is in draft mode and fully editable. + DRAFT = 2; + + // The migration job is being created. + CREATING = 3; + + // The migration job is created, not started and is fully editable. + NOT_STARTED = 4; + + // The migration job is running + RUNNING = 5; + + // The migration job failed. + FAILED = 6; + + // The migration job has been completed. + COMPLETED = 7; + + // The migration job is being deleted. + DELETING = 8; + + // The migration job is being stopped. + STOPPING = 9; + + // The migration job is currently stopped. + STOPPED = 10; + + // The migration job has been deleted. + DELETED = 11; + + // The migration job is being updated. + UPDATING = 12; + + // The migration job is starting. + STARTING = 13; + + // The migration job is restarting. + RESTARTING = 14; + + // The migration job is resuming. + RESUMING = 15; + } + + // The migration job phases enum. + enum Phase { + // The phase of the migration job is unknown. + PHASE_UNSPECIFIED = 0; + + // The migration job is in the full dump phase. + FULL_DUMP = 1; + + // The migration job is CDC phase. + CDC = 2; + + // The migration job is running the promote phase. + PROMOTE_IN_PROGRESS = 3; + + // Only RDS flow - waiting for source writes to stop + WAITING_FOR_SOURCE_WRITES_TO_STOP = 4; + + // Only RDS flow - the sources writes stopped, waiting for dump to begin + PREPARING_THE_DUMP = 5; + } + + // The migration job types. + enum Type { + // The type of the migration job is unknown. + TYPE_UNSPECIFIED = 0; + + // The migration job is a one time migration. + ONE_TIME = 1; + + // The migration job is a continuous migration. + CONTINUOUS = 2; + } + + // Type of connectivity to source database. + enum ConnectivityType { + // No data defined. + CONNECTIVITY_TYPE_UNSPECIFIED = 0; + + // Connect using static IO + STATIC_IP = 1; + + // Use reverse SSH connectivity. + REVERSE_SSH = 2; + + // Use VPC Peering connectivity. + VPC_PEERING = 3; + } + + // The unique identifier for a migration job. + string name = 1; + + // Labels. + map labels = 2; + + // The display name. + string display_name = 3; + + // The current migration job state. + State state = 4; + + // The current migration job phase. + Phase phase = 5; + + // The migration job type. + Type type = 6; + + // An optional dump path (gs://[BUCKET_NAME]/[OBJECT_NAME]). + string dump_path = 7; + + // The migration job source connection profile name. + string source = 8; + + // The migration job destination connection profile name. + string destination = 9; + + // the migration job duration in seconds. + google.protobuf.Duration duration = 10; + + // Type of connectivity to source database. + ConnectivityType connectivity_type = 11; + + // The error details in case of state FAILED. + google.rpc.Status error = 12; + + // The time when this migration job was completed. Should only be set when the + // phase of the migration job is COMPLETED. + google.protobuf.Timestamp end_time = 13; + + // The indicative source database. + DatabaseType source_database = 14; + + // The indicative destination database. + DatabaseType destination_database = 15; +} + +// An MySQL database connection profile. +message MySqlConnectionProfile { + // The MySQL database version. + enum Version { + // Unspecified version. + VERSION_UNSPECIFIED = 0; + + // MySQL 5.5. + V5_5 = 1; + + // MySQL 5.6. + V5_6 = 2; + + // MySQL 5.7. + V5_7 = 3; + + // MySQL 8.0. + V8_0 = 4; + } + + // The database version. + Version version = 1; + + // The Cloud SQL id for a Cloud SQL instance. + string cloud_sql_id = 2; +} + +// An PostgreSQL connection profile. +message PostgreSqlConnectionProfile { + // The PostgreSQL database version. + enum Version { + // Unspecified version. + VERSION_UNSPECIFIED = 0; + + // PostgreSQL 9.6. + V9_6 = 1; + + // PostgreSQL 11. + V11 = 2; + } + + // The database version. + Version version = 1; + + // The Cloud SQL id for a Cloud SQL instance. + string cloud_sql_id = 2; +} + +// A CloudSQL connection profile. +message CloudSqlConnectionProfile { + // The Cloud SQL id. + string cloud_sql_id = 1; +} + +// An producer connection profile definition. +// NEXT_TAG = 18. +message LoggedConnectionProfile { + // The connection profile states enum. + enum State { + // The state of the connection profile is unknown. + STATE_UNSPECIFIED = 0; + + // The connection profile is in draft mode and fully editable. + DRAFT = 1; + + // The connection profile is being created. + CREATING = 2; + + // The connection profile is ready. + READY = 3; + + // The connection profile is being updated. + UPDATING = 4; + + // The connection profile is being deleted. + DELETING = 5; + + // The connection profile has been deleted. + DELETED = 6; + + // The last action on the connection profile failed. + FAILED = 7; + } + + // The unique identifier for a connection profile. + string name = 1; + + // Labels. + map labels = 2; + + // The current connection profile state. + State state = 3; + + // The display name. + string display_name = 4; + + // The connection profile definition + oneof connection_profile { + // A MySQL database connection profile. + MySqlConnectionProfile mysql = 100; + + // A PostgreSQL database connection profile. + PostgreSqlConnectionProfile postgresql = 101; + + // A CloudSQL database connection profile. + CloudSqlConnectionProfile cloudsql = 102; + } + + // The error details in case of state FAILED. + google.rpc.Status error = 5; + + // The database provider. + DatabaseProvider provider = 6; +} + +// Log definition for Migration Job event +message MigrationJobEventLog { + // The migration job resource + LoggedMigrationJob migration_job = 1; + + // Timestamp of the event + google.protobuf.Timestamp occurrence_timestamp = 2; + + // Event code + int32 code = 3; + + // Event message + string text_message = 4; + + // Original event data + oneof original_cause { + // Original event code + int32 original_code = 200; + + // Original event message + string original_message = 201; + } +} + +// Log definition for Connection Profile event +message ConnectionProfileEventLog { + // The connection profilr resource + LoggedConnectionProfile connection_profile = 1; + + // Timestamp of the event + google.protobuf.Timestamp occurrence_timestamp = 2; + + // Event code + int32 code = 3; + + // Event message + string text_message = 4; + + // Original event data + oneof original_cause { + // Original event code + int32 original_code = 200; + + // Original event message + string original_message = 201; + } +}