diff --git a/google/cloud/datastream/v1/BUILD.bazel b/google/cloud/datastream/v1/BUILD.bazel new file mode 100644 index 0000000000..00ccdd48a7 --- /dev/null +++ b/google/cloud/datastream/v1/BUILD.bazel @@ -0,0 +1,365 @@ +# This file was automatically generated by BuildFileGenerator +# https://github.com/googleapis/rules_gapic/tree/master/bazel + +# Most of the manual changes to this file will be overwritten. +# It's **only** allowed to change the following rule attribute values: +# - names of *_gapic_assembly_* rules +# - certain parameters of *_gapic_library rules, including but not limited to: +# * extra_protoc_parameters +# * extra_protoc_file_parameters +# The complete list of preserved parameters can be found in the source code. + +# 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") +load("@com_google_googleapis_imports//:imports.bzl", "proto_library_with_info") + +proto_library( + name = "datastream_proto", + srcs = [ + "datastream.proto", + "datastream_resources.proto", + ], + deps = [ + "//google/api:annotations_proto", + "//google/api:client_proto", + "//google/api:field_behavior_proto", + "//google/api:resource_proto", + "//google/longrunning:operations_proto", + "@com_google_protobuf//:duration_proto", + "@com_google_protobuf//:field_mask_proto", + "@com_google_protobuf//:timestamp_proto", + ], +) + +proto_library_with_info( + name = "datastream_proto_with_info", + deps = [ + ":datastream_proto", + "//google/cloud:common_resources_proto", + "//google/cloud/location:location_proto", + ], +) + +############################################################################## +# Java +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "java_gapic_assembly_gradle_pkg", + "java_gapic_library", + "java_gapic_test", + "java_grpc_library", + "java_proto_library", +) + +java_proto_library( + name = "datastream_java_proto", + deps = [":datastream_proto"], +) + +java_grpc_library( + name = "datastream_java_grpc", + srcs = [":datastream_proto"], + deps = [":datastream_java_proto"], +) + +java_gapic_library( + name = "datastream_java_gapic", + srcs = [":datastream_proto_with_info"], + gapic_yaml = None, + grpc_service_config = "datastream_grpc_service_config.json", + service_yaml = "datastream_v1.yaml", + test_deps = [ + ":datastream_java_grpc", + "//google/cloud/location:location_java_grpc", + ], + deps = [ + ":datastream_java_proto", + "//google/api:api_java_proto", + "//google/cloud/location:location_java_proto", + ], +) + +java_gapic_test( + name = "datastream_java_gapic_test_suite", + test_classes = [ + "com.google.cloud.datastream.v1.DatastreamClientTest", + ], + runtime_deps = [":datastream_java_gapic_test"], +) + +# Open Source Packages +java_gapic_assembly_gradle_pkg( + name = "google-cloud-datastream-v1-java", + deps = [ + ":datastream_java_gapic", + ":datastream_java_grpc", + ":datastream_java_proto", + ":datastream_proto", + ], +) + +############################################################################## +# Go +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "go_gapic_assembly_pkg", + "go_gapic_library", + "go_proto_library", + "go_test", +) + +go_proto_library( + name = "datastream_go_proto", + compilers = ["@io_bazel_rules_go//proto:go_grpc"], + importpath = "google.golang.org/genproto/googleapis/cloud/datastream/v1", + protos = [":datastream_proto"], + deps = [ + "//google/api:annotations_go_proto", + "//google/longrunning:longrunning_go_proto", + ], +) + +go_gapic_library( + name = "datastream_go_gapic", + srcs = [":datastream_proto_with_info"], + grpc_service_config = "datastream_grpc_service_config.json", + importpath = "cloud.google.com/go/datastream/apiv1;datastream", + metadata = True, + service_yaml = "datastream_v1.yaml", + deps = [ + ":datastream_go_proto", + "//google/cloud/location:location_go_proto", + "//google/longrunning:longrunning_go_proto", + "@com_google_cloud_go//longrunning:go_default_library", + "@com_google_cloud_go//longrunning/autogen:go_default_library", + "@io_bazel_rules_go//proto/wkt:duration_go_proto", + ], +) + +go_test( + name = "datastream_go_gapic_test", + srcs = [":datastream_go_gapic_srcjar_test"], + embed = [":datastream_go_gapic"], + importpath = "cloud.google.com/go/datastream/apiv1", +) + +# Open Source Packages +go_gapic_assembly_pkg( + name = "gapi-cloud-datastream-v1-go", + deps = [ + ":datastream_go_gapic", + ":datastream_go_gapic_srcjar-metadata.srcjar", + ":datastream_go_gapic_srcjar-test.srcjar", + ":datastream_go_proto", + ], +) + +############################################################################## +# Python +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "py_gapic_assembly_pkg", + "py_gapic_library", +) + +py_gapic_library( + name = "datastream_py_gapic", + srcs = [":datastream_proto"], + grpc_service_config = "datastream_grpc_service_config.json", +) + +# Open Source Packages +py_gapic_assembly_pkg( + name = "datastream-v1-py", + deps = [ + ":datastream_py_gapic", + ], +) + +############################################################################## +# PHP +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "php_gapic_assembly_pkg", + "php_gapic_library", + "php_grpc_library", + "php_proto_library", +) + +php_proto_library( + name = "datastream_php_proto", + deps = [":datastream_proto"], +) + +php_grpc_library( + name = "datastream_php_grpc", + srcs = [":datastream_proto"], + deps = [":datastream_php_proto"], +) + +php_gapic_library( + name = "datastream_php_gapic", + srcs = [":datastream_proto_with_info"], + grpc_service_config = "datastream_grpc_service_config.json", + service_yaml = "datastream_v1.yaml", + deps = [ + ":datastream_php_grpc", + ":datastream_php_proto", + ], +) + +# Open Source Packages +php_gapic_assembly_pkg( + name = "google-cloud-datastream-v1-php", + deps = [ + ":datastream_php_gapic", + ":datastream_php_grpc", + ":datastream_php_proto", + ], +) + +############################################################################## +# Node.js +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "nodejs_gapic_assembly_pkg", + "nodejs_gapic_library", +) + +nodejs_gapic_library( + name = "datastream_nodejs_gapic", + package_name = "@google-cloud/datastream", + src = ":datastream_proto_with_info", + extra_protoc_parameters = ["metadata"], + grpc_service_config = "datastream_grpc_service_config.json", + package = "google.cloud.datastream.v1", + service_yaml = "datastream_v1.yaml", + deps = [], +) + +nodejs_gapic_assembly_pkg( + name = "datastream-v1-nodejs", + deps = [ + ":datastream_nodejs_gapic", + ":datastream_proto", + ], +) + +############################################################################## +# Ruby +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "ruby_cloud_gapic_library", + "ruby_gapic_assembly_pkg", + "ruby_grpc_library", + "ruby_proto_library", +) + +ruby_proto_library( + name = "datastream_ruby_proto", + deps = [":datastream_proto"], +) + +ruby_grpc_library( + name = "datastream_ruby_grpc", + srcs = [":datastream_proto"], + deps = [":datastream_ruby_proto"], +) + +ruby_cloud_gapic_library( + name = "datastream_ruby_gapic", + srcs = [":datastream_proto_with_info"], + extra_protoc_parameters = [ + "ruby-cloud-gem-name=google-cloud-datastream-v1", + ], + grpc_service_config = "datastream_grpc_service_config.json", + deps = [ + ":datastream_ruby_grpc", + ":datastream_ruby_proto", + ], +) + +# Open Source Packages +ruby_gapic_assembly_pkg( + name = "google-cloud-datastream-v1-ruby", + deps = [ + ":datastream_ruby_gapic", + ":datastream_ruby_grpc", + ":datastream_ruby_proto", + ], +) + +############################################################################## +# C# +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "csharp_gapic_assembly_pkg", + "csharp_gapic_library", + "csharp_grpc_library", + "csharp_proto_library", +) + +csharp_proto_library( + name = "datastream_csharp_proto", + deps = [":datastream_proto"], +) + +csharp_grpc_library( + name = "datastream_csharp_grpc", + srcs = [":datastream_proto"], + deps = [":datastream_csharp_proto"], +) + +csharp_gapic_library( + name = "datastream_csharp_gapic", + srcs = [":datastream_proto_with_info"], + common_resources_config = "@gax_dotnet//:Google.Api.Gax/ResourceNames/CommonResourcesConfig.json", + grpc_service_config = "datastream_grpc_service_config.json", + deps = [ + ":datastream_csharp_grpc", + ":datastream_csharp_proto", + ], +) + +# Open Source Packages +csharp_gapic_assembly_pkg( + name = "google-cloud-datastream-v1-csharp", + deps = [ + ":datastream_csharp_gapic", + ":datastream_csharp_grpc", + ":datastream_csharp_proto", + ], +) + +############################################################################## +# C++ +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "cc_grpc_library", + "cc_proto_library", +) + +cc_proto_library( + name = "datastream_cc_proto", + deps = [":datastream_proto"], +) + +cc_grpc_library( + name = "datastream_cc_grpc", + srcs = [":datastream_proto"], + grpc_only = True, + deps = [":datastream_cc_proto"], +) diff --git a/google/cloud/datastream/v1/datastream.proto b/google/cloud/datastream/v1/datastream.proto new file mode 100644 index 0000000000..0c11a1eb02 --- /dev/null +++ b/google/cloud/datastream/v1/datastream.proto @@ -0,0 +1,1036 @@ +// Copyright 2022 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.datastream.v1; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/datastream/v1/datastream_resources.proto"; +import "google/longrunning/operations.proto"; +import "google/protobuf/field_mask.proto"; +import "google/protobuf/timestamp.proto"; + +option csharp_namespace = "Google.Cloud.Datastream.V1"; +option go_package = "google.golang.org/genproto/googleapis/cloud/datastream/v1;datastream"; +option java_multiple_files = true; +option java_outer_classname = "DatastreamProto"; +option java_package = "com.google.cloud.datastream.v1"; +option php_namespace = "Google\\Cloud\\Datastream\\V1"; +option ruby_package = "Google::Cloud::Datastream::V1"; + +// Datastream service +service Datastream { + option (google.api.default_host) = "datastream.googleapis.com"; + option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; + + // Use this method to list connection profiles created in a project and + // location. + rpc ListConnectionProfiles(ListConnectionProfilesRequest) returns (ListConnectionProfilesResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*}/connectionProfiles" + }; + option (google.api.method_signature) = "parent"; + } + + // Use this method to get details about a connection profile. + rpc GetConnectionProfile(GetConnectionProfileRequest) returns (ConnectionProfile) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/connectionProfiles/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Use this method to create a connection profile in a project and location. + rpc CreateConnectionProfile(CreateConnectionProfileRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*}/connectionProfiles" + body: "connection_profile" + }; + option (google.api.method_signature) = "parent,connection_profile,connection_profile_id"; + option (google.longrunning.operation_info) = { + response_type: "ConnectionProfile" + metadata_type: "OperationMetadata" + }; + } + + // Use this method to update the parameters of a connection profile. + rpc UpdateConnectionProfile(UpdateConnectionProfileRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v1/{connection_profile.name=projects/*/locations/*/connectionProfiles/*}" + body: "connection_profile" + }; + option (google.api.method_signature) = "connection_profile,update_mask"; + option (google.longrunning.operation_info) = { + response_type: "ConnectionProfile" + metadata_type: "OperationMetadata" + }; + } + + // Use this method to delete a connection profile. + rpc DeleteConnectionProfile(DeleteConnectionProfileRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/connectionProfiles/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "OperationMetadata" + }; + } + + // Use this method to discover a connection profile. + // The discover API call exposes the data objects and metadata belonging to + // the profile. Typically, a request returns children data objects of a + // parent data object that's optionally supplied in the request. + rpc DiscoverConnectionProfile(DiscoverConnectionProfileRequest) returns (DiscoverConnectionProfileResponse) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*}/connectionProfiles:discover" + body: "*" + }; + } + + // Use this method to list streams in a project and location. + rpc ListStreams(ListStreamsRequest) returns (ListStreamsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*}/streams" + }; + option (google.api.method_signature) = "parent"; + } + + // Use this method to get details about a stream. + rpc GetStream(GetStreamRequest) returns (Stream) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/streams/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Use this method to create a stream. + rpc CreateStream(CreateStreamRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*}/streams" + body: "stream" + }; + option (google.api.method_signature) = "parent,stream,stream_id"; + option (google.longrunning.operation_info) = { + response_type: "Stream" + metadata_type: "OperationMetadata" + }; + } + + // Use this method to update the configuration of a stream. + rpc UpdateStream(UpdateStreamRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v1/{stream.name=projects/*/locations/*/streams/*}" + body: "stream" + }; + option (google.api.method_signature) = "stream,update_mask"; + option (google.longrunning.operation_info) = { + response_type: "Stream" + metadata_type: "OperationMetadata" + }; + } + + // Use this method to delete a stream. + rpc DeleteStream(DeleteStreamRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/streams/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "OperationMetadata" + }; + } + + // Use this method to get details about a stream object. + rpc GetStreamObject(GetStreamObjectRequest) returns (StreamObject) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/streams/*/objects/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Use this method to look up a stream object by its source object identifier. + rpc LookupStreamObject(LookupStreamObjectRequest) returns (StreamObject) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*/streams/*}/objects:lookup" + body: "*" + }; + } + + // Use this method to list the objects of a specific stream. + rpc ListStreamObjects(ListStreamObjectsRequest) returns (ListStreamObjectsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*/streams/*}/objects" + }; + option (google.api.method_signature) = "parent"; + } + + // Use this method to start a backfill job for the specified stream object. + rpc StartBackfillJob(StartBackfillJobRequest) returns (StartBackfillJobResponse) { + option (google.api.http) = { + post: "/v1/{object=projects/*/locations/*/streams/*/objects/*}:startBackfillJob" + body: "*" + }; + option (google.api.method_signature) = "object"; + } + + // Use this method to stop a backfill job for the specified stream object. + rpc StopBackfillJob(StopBackfillJobRequest) returns (StopBackfillJobResponse) { + option (google.api.http) = { + post: "/v1/{object=projects/*/locations/*/streams/*/objects/*}:stopBackfillJob" + body: "*" + }; + option (google.api.method_signature) = "object"; + } + + // The FetchStaticIps API call exposes the static IP addresses used by + // Datastream. + rpc FetchStaticIps(FetchStaticIpsRequest) returns (FetchStaticIpsResponse) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*}:fetchStaticIps" + }; + option (google.api.method_signature) = "name"; + } + + // Use this method to create a private connectivity configuration. + rpc CreatePrivateConnection(CreatePrivateConnectionRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*}/privateConnections" + body: "private_connection" + }; + option (google.api.method_signature) = "parent,private_connection,private_connection_id"; + option (google.longrunning.operation_info) = { + response_type: "PrivateConnection" + metadata_type: "OperationMetadata" + }; + } + + // Use this method to get details about a private connectivity configuration. + rpc GetPrivateConnection(GetPrivateConnectionRequest) returns (PrivateConnection) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/privateConnections/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Use this method to list private connectivity configurations in a project + // and location. + rpc ListPrivateConnections(ListPrivateConnectionsRequest) returns (ListPrivateConnectionsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*}/privateConnections" + }; + option (google.api.method_signature) = "parent"; + } + + // Use this method to delete a private connectivity configuration. + rpc DeletePrivateConnection(DeletePrivateConnectionRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/privateConnections/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "OperationMetadata" + }; + } + + // Use this method to create a route for a private connectivity configuration + // in a project and location. + rpc CreateRoute(CreateRouteRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*/privateConnections/*}/routes" + body: "route" + }; + option (google.api.method_signature) = "parent,route,route_id"; + option (google.longrunning.operation_info) = { + response_type: "Route" + metadata_type: "OperationMetadata" + }; + } + + // Use this method to get details about a route. + rpc GetRoute(GetRouteRequest) returns (Route) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/privateConnections/*/routes/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Use this method to list routes created for a private connectivity + // configuration in a project and location. + rpc ListRoutes(ListRoutesRequest) returns (ListRoutesResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*/privateConnections/*}/routes" + }; + option (google.api.method_signature) = "parent"; + } + + // Use this method to delete a route. + rpc DeleteRoute(DeleteRouteRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/privateConnections/*/routes/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "OperationMetadata" + }; + } +} + +// Request message for 'discover' ConnectionProfile request. +message DiscoverConnectionProfileRequest { + // Required. The parent resource of the connection profile type. Must be in the + // format `projects/*/locations/*`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "datastream.googleapis.com/ConnectionProfile" + } + ]; + + // The connection profile on which to run discover. + oneof target { + // An ad-hoc connection profile configuration. + ConnectionProfile connection_profile = 200; + + // A reference to an existing connection profile. + string connection_profile_name = 201; + } + + // The depth of the retrieved hierarchy of data objects. + oneof hierarchy { + // Whether to retrieve the full hierarchy of data objects (TRUE) or only the + // current level (FALSE). + bool full_hierarchy = 3; + + // The number of hierarchy levels below the current level to be retrieved. + int32 hierarchy_depth = 4; + } + + // The data object to populate with child data objects and metadata. + oneof data_object { + // Oracle RDBMS to enrich with child data objects and metadata. + OracleRdbms oracle_rdbms = 100; + + // MySQL RDBMS to enrich with child data objects and metadata. + MysqlRdbms mysql_rdbms = 101; + } +} + +// Response from a discover request. +message DiscoverConnectionProfileResponse { + // The data object that has been enriched by the discover API call. + oneof data_object { + // Enriched Oracle RDBMS object. + OracleRdbms oracle_rdbms = 100; + + // Enriched MySQL RDBMS object. + MysqlRdbms mysql_rdbms = 101; + } +} + +// Request message for 'FetchStaticIps' request. +message FetchStaticIpsRequest { + // Required. The resource name for the location for which static IPs should be returned. + // Must be in the format `projects/*/locations/*`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // Maximum number of Ips to return, will likely not be specified. + int32 page_size = 2; + + // A page token, received from a previous `ListStaticIps` call. + // will likely not be specified. + string page_token = 3; +} + +// Response message for a 'FetchStaticIps' response. +message FetchStaticIpsResponse { + // list of static ips by account + repeated string static_ips = 1; + + // A token that 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; +} + +// Request message for listing connection profiles. +message ListConnectionProfilesRequest { + // Required. The parent that owns the collection of connection profiles. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "datastream.googleapis.com/ConnectionProfile" + } + ]; + + // Maximum number of connection profiles to return. + // If unspecified, at most 50 connection profiles will be returned. + // The maximum value is 1000; values above 1000 will be coerced to 1000. + int32 page_size = 2; + + // Page token received from a previous `ListConnectionProfiles` call. + // Provide this to retrieve the subsequent page. + // + // When paginating, all other parameters provided to `ListConnectionProfiles` + // must match the call that provided the page token. + string page_token = 3; + + // Filter request. + string filter = 4; + + // Order by fields for the result. + string order_by = 5; +} + +// Response message for listing connection profiles. +message ListConnectionProfilesResponse { + // List of connection profiles. + repeated ConnectionProfile connection_profiles = 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; + + // Locations that could not be reached. + repeated string unreachable = 3; +} + +// Request message for getting a connection profile. +message GetConnectionProfileRequest { + // Required. The name of the connection profile resource to get. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "datastream.googleapis.com/ConnectionProfile" + } + ]; +} + +// Request message for creating a connection profile. +message CreateConnectionProfileRequest { + // Required. The parent that owns the collection of ConnectionProfiles. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "datastream.googleapis.com/ConnectionProfile" + } + ]; + + // Required. The connection profile identifier. + string connection_profile_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The connection profile resource to create. + ConnectionProfile connection_profile = 3 [(google.api.field_behavior) = REQUIRED]; + + // Optional. A request ID to identify requests. Specify a unique request ID + // so that if you must retry your request, the server will know to ignore + // the request if it has already been completed. The server will guarantee + // that for at least 60 minutes since the first request. + // + // For example, consider a situation where you make an initial request and the + // request times out. If you make the request again with the same request ID, + // the server can check if original operation with the same request ID was + // received, and if so, will ignore the second request. This prevents clients + // from accidentally creating duplicate commitments. + // + // The request ID must be a valid UUID with the exception that zero UUID is + // not supported (00000000-0000-0000-0000-000000000000). + string request_id = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Only validate the connection profile, but don't create any resources. + // The default is false. + bool validate_only = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Create the connection profile without validating it. + bool force = 6 [(google.api.field_behavior) = OPTIONAL]; +} + +// Connection profile update message. +message UpdateConnectionProfileRequest { + // Optional. Field mask is used to specify the fields to be overwritten in the + // ConnectionProfile resource by the update. + // The fields specified in the update_mask are relative to the resource, not + // the full request. A field will be overwritten if it is in the mask. If the + // user does not provide a mask then all fields will be overwritten. + google.protobuf.FieldMask update_mask = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Required. The connection profile to update. + ConnectionProfile connection_profile = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. A request ID to identify requests. Specify a unique request ID + // so that if you must retry your request, the server will know to ignore + // the request if it has already been completed. The server will guarantee + // that for at least 60 minutes since the first request. + // + // For example, consider a situation where you make an initial request and the + // request times out. If you make the request again with the same request ID, + // the server can check if original operation with the same request ID was + // received, and if so, will ignore the second request. This prevents clients + // from accidentally creating duplicate commitments. + // + // The request ID must be a valid UUID with the exception that zero UUID is + // not supported (00000000-0000-0000-0000-000000000000). + string request_id = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Only validate the connection profile, but don't update any resources. + // The default is false. + bool validate_only = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Update the connection profile without validating it. + bool force = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// Request message for deleting a connection profile. +message DeleteConnectionProfileRequest { + // Required. The name of the connection profile resource to delete. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "datastream.googleapis.com/ConnectionProfile" + } + ]; + + // Optional. A request ID to identify requests. Specify a unique request ID + // so that if you must retry your request, the server will know to ignore + // the request if it has already been completed. The server will guarantee + // that for at least 60 minutes after the first request. + // + // For example, consider a situation where you make an initial request and the + // request times out. If you make the request again with the same request ID, + // the server can check if original operation with the same request ID was + // received, and if so, will ignore the second request. This prevents clients + // from accidentally creating duplicate commitments. + // + // The request ID must be a valid UUID with the exception that zero UUID is + // not supported (00000000-0000-0000-0000-000000000000). + string request_id = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// Request message for listing streams. +message ListStreamsRequest { + // Required. The parent that owns the collection of streams. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "datastream.googleapis.com/Stream" + } + ]; + + // Maximum number of streams to return. + // If unspecified, at most 50 streams will be returned. The maximum + // value is 1000; values above 1000 will be coerced to 1000. + int32 page_size = 2; + + // Page token received from a previous `ListStreams` call. + // Provide this to retrieve the subsequent page. + // + // When paginating, all other parameters provided to `ListStreams` + // must match the call that provided the page token. + string page_token = 3; + + // Filter request. + string filter = 4; + + // Order by fields for the result. + string order_by = 5; +} + +// Response message for listing streams. +message ListStreamsResponse { + // List of streams + repeated Stream streams = 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; + + // Locations that could not be reached. + repeated string unreachable = 3; +} + +// Request message for getting a stream. +message GetStreamRequest { + // Required. The name of the stream resource to get. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "datastream.googleapis.com/Stream" + } + ]; +} + +// Request message for creating a stream. +message CreateStreamRequest { + // Required. The parent that owns the collection of streams. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "datastream.googleapis.com/Stream" + } + ]; + + // Required. The stream identifier. + string stream_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The stream resource to create. + Stream stream = 3 [(google.api.field_behavior) = REQUIRED]; + + // Optional. A request ID to identify requests. Specify a unique request ID + // so that if you must retry your request, the server will know to ignore + // the request if it has already been completed. The server will guarantee + // that for at least 60 minutes since the first request. + // + // For example, consider a situation where you make an initial request and the + // request times out. If you make the request again with the same request ID, + // the server can check if original operation with the same request ID was + // received, and if so, will ignore the second request. This prevents clients + // from accidentally creating duplicate commitments. + // + // The request ID must be a valid UUID with the exception that zero UUID is + // not supported (00000000-0000-0000-0000-000000000000). + string request_id = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Only validate the stream, but don't create any resources. + // The default is false. + bool validate_only = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Create the stream without validating it. + bool force = 6 [(google.api.field_behavior) = OPTIONAL]; +} + +// Request message for updating a stream. +message UpdateStreamRequest { + // Optional. Field mask is used to specify the fields to be overwritten in the + // stream resource by the update. + // The fields specified in the update_mask are relative to the resource, not + // the full request. A field will be overwritten if it is in the mask. If the + // user does not provide a mask then all fields will be overwritten. + google.protobuf.FieldMask update_mask = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Required. The stream resource to update. + Stream stream = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. A request ID to identify requests. Specify a unique request ID + // so that if you must retry your request, the server will know to ignore + // the request if it has already been completed. The server will guarantee + // that for at least 60 minutes since the first request. + // + // For example, consider a situation where you make an initial request and the + // request times out. If you make the request again with the same request ID, + // the server can check if original operation with the same request ID was + // received, and if so, will ignore the second request. This prevents clients + // from accidentally creating duplicate commitments. + // + // The request ID must be a valid UUID with the exception that zero UUID is + // not supported (00000000-0000-0000-0000-000000000000). + string request_id = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Only validate the stream with the changes, without actually updating it. + // The default is false. + bool validate_only = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Update the stream without validating it. + bool force = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// Request message for deleting a stream. +message DeleteStreamRequest { + // Required. The name of the stream resource to delete. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "datastream.googleapis.com/Stream" + } + ]; + + // Optional. A request ID to identify requests. Specify a unique request ID + // so that if you must retry your request, the server will know to ignore + // the request if it has already been completed. The server will guarantee + // that for at least 60 minutes after the first request. + // + // For example, consider a situation where you make an initial request and the + // request times out. If you make the request again with the same request ID, + // the server can check if original operation with the same request ID was + // received, and if so, will ignore the second request. This prevents clients + // from accidentally creating duplicate commitments. + // + // The request ID must be a valid UUID with the exception that zero UUID is + // not supported (00000000-0000-0000-0000-000000000000). + string request_id = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// Request for fetching a specific stream object. +message GetStreamObjectRequest { + // Required. The name of the stream object resource to get. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "datastream.googleapis.com/StreamObject" + } + ]; +} + +// Request for looking up a specific stream object by its source object +// identifier. +message LookupStreamObjectRequest { + // Required. The parent stream that owns the collection of objects. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "datastream.googleapis.com/Stream" + } + ]; + + // Required. The source object identifier which maps to the stream object. + SourceObjectIdentifier source_object_identifier = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Request for manually initiating a backfill job for a specific stream object. +message StartBackfillJobRequest { + // Required. The name of the stream object resource to start a backfill job for. + string object = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "datastream.googleapis.com/StreamObject" + } + ]; +} + +// Response for manually initiating a backfill job for a specific stream object. +message StartBackfillJobResponse { + // The stream object resource a backfill job was started for. + StreamObject object = 1; +} + +// Request for manually stopping a running backfill job for a specific stream +// object. +message StopBackfillJobRequest { + // Required. The name of the stream object resource to stop the backfill job for. + string object = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "datastream.googleapis.com/StreamObject" + } + ]; +} + +// Response for manually stop a backfill job for a specific stream object. +message StopBackfillJobResponse { + // The stream object resource the backfill job was stopped for. + StreamObject object = 1; +} + +// Request for listing all objects for a specific stream. +message ListStreamObjectsRequest { + // Required. The parent stream that owns the collection of objects. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "datastream.googleapis.com/StreamObject" + } + ]; + + // Maximum number of objects to return. Default is 50. + // The maximum value is 1000; values above 1000 will be coerced to 1000. + int32 page_size = 2; + + // Page token received from a previous `ListStreamObjectsRequest` call. + // Provide this to retrieve the subsequent page. + // + // When paginating, all other parameters provided to + // `ListStreamObjectsRequest` must match the call that provided the page + // token. + string page_token = 3; +} + +// Response containing the objects for a stream. +message ListStreamObjectsResponse { + // List of stream objects. + repeated StreamObject stream_objects = 1; + + // A token, which can be sent as `page_token` to retrieve the next page. + string next_page_token = 2; +} + +// Represents the metadata of the long-running operation. +message OperationMetadata { + // Output only. The time the operation was created. + google.protobuf.Timestamp create_time = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time the operation finished running. + google.protobuf.Timestamp end_time = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Server-defined resource path for the target of the operation. + string target = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Name of the verb executed by the operation. + string verb = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Human-readable status of the operation, if any. + string status_message = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Identifies whether the user has requested cancellation + // of the operation. Operations that have successfully been cancelled + // have [Operation.error][] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1, + // corresponding to `Code.CANCELLED`. + bool requested_cancellation = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. API version used to start the operation. + string api_version = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Results of executed validations if there are any. + ValidationResult validation_result = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Request for creating a private connection. +message CreatePrivateConnectionRequest { + // Required. The parent that owns the collection of PrivateConnections. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "datastream.googleapis.com/PrivateConnection" + } + ]; + + // Required. The private connectivity identifier. + string private_connection_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The Private Connectivity resource to create. + PrivateConnection private_connection = 3 [(google.api.field_behavior) = REQUIRED]; + + // Optional. A request ID to identify requests. Specify a unique request ID + // so that if you must retry your request, the server will know to ignore + // the request if it has already been completed. The server will guarantee + // that for at least 60 minutes since the first request. + // + // For example, consider a situation where you make an initial request and the + // request times out. If you make the request again with the same request ID, + // the server can check if original operation with the same request ID was + // received, and if so, will ignore the second request. This prevents clients + // from accidentally creating duplicate commitments. + // + // The request ID must be a valid UUID with the exception that zero UUID is + // not supported (00000000-0000-0000-0000-000000000000). + string request_id = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// Request for listing private connections. +message ListPrivateConnectionsRequest { + // Required. The parent that owns the collection of private connectivity configurations. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "datastream.googleapis.com/PrivateConnection" + } + ]; + + // Maximum number of private connectivity configurations to return. + // If unspecified, at most 50 private connectivity configurations that will be + // returned. The maximum value is 1000; values above 1000 will be coerced to + // 1000. + int32 page_size = 2; + + // Page token received from a previous `ListPrivateConnections` call. + // Provide this to retrieve the subsequent page. + // + // When paginating, all other parameters provided to + // `ListPrivateConnections` must match the call that provided the page + // token. + string page_token = 3; + + // Filter request. + string filter = 4; + + // Order by fields for the result. + string order_by = 5; +} + +// Response containing a list of private connection configurations. +message ListPrivateConnectionsResponse { + // List of private connectivity configurations. + repeated PrivateConnection private_connections = 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; + + // Locations that could not be reached. + repeated string unreachable = 3; +} + +// Request to delete a private connection. +message DeletePrivateConnectionRequest { + // Required. The name of the private connectivity configuration to delete. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "datastream.googleapis.com/PrivateConnection" + } + ]; + + // Optional. A request ID to identify requests. Specify a unique request ID + // so that if you must retry your request, the server will know to ignore + // the request if it has already been completed. The server will guarantee + // that for at least 60 minutes after the first request. + // + // For example, consider a situation where you make an initial request and the + // request times out. If you make the request again with the same request ID, + // the server can check if original operation with the same request ID was + // received, and if so, will ignore the second request. This prevents clients + // from accidentally creating duplicate commitments. + // + // The request ID must be a valid UUID with the exception that zero UUID is + // not supported (00000000-0000-0000-0000-000000000000). + string request_id = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If set to true, any child routes that belong to this PrivateConnection will + // also be deleted. + bool force = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// Request to get a private connection configuration. +message GetPrivateConnectionRequest { + // Required. The name of the private connectivity configuration to get. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "datastream.googleapis.com/PrivateConnection" + } + ]; +} + +// Route creation request. +message CreateRouteRequest { + // Required. The parent that owns the collection of Routes. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "datastream.googleapis.com/Route" + } + ]; + + // Required. The Route identifier. + string route_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The Route resource to create. + Route route = 3 [(google.api.field_behavior) = REQUIRED]; + + // Optional. A request ID to identify requests. Specify a unique request ID + // so that if you must retry your request, the server will know to ignore + // the request if it has already been completed. The server will guarantee + // that for at least 60 minutes since the first request. + // + // For example, consider a situation where you make an initial request and the + // request times out. If you make the request again with the same request ID, + // the server can check if original operation with the same request ID was + // received, and if so, will ignore the second request. This prevents clients + // from accidentally creating duplicate commitments. + // + // The request ID must be a valid UUID with the exception that zero UUID is + // not supported (00000000-0000-0000-0000-000000000000). + string request_id = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// Route list request. +message ListRoutesRequest { + // Required. The parent that owns the collection of Routess. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "datastream.googleapis.com/Route" + } + ]; + + // Maximum number of Routes to return. The service may return + // fewer than this value. If unspecified, at most 50 Routes + // will be returned. The maximum value is 1000; values above 1000 will be + // coerced to 1000. + int32 page_size = 2; + + // Page token received from a previous `ListRoutes` call. + // Provide this to retrieve the subsequent page. + // + // When paginating, all other parameters provided to + // `ListRoutes` must match the call that provided the page + // token. + string page_token = 3; + + // Filter request. + string filter = 4; + + // Order by fields for the result. + string order_by = 5; +} + +// Route list response. +message ListRoutesResponse { + // List of Routes. + repeated Route routes = 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; + + // Locations that could not be reached. + repeated string unreachable = 3; +} + +// Route deletion request. +message DeleteRouteRequest { + // Required. The name of the Route resource to delete. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "datastream.googleapis.com/Route" + } + ]; + + // Optional. A request ID to identify requests. Specify a unique request ID + // so that if you must retry your request, the server will know to ignore + // the request if it has already been completed. The server will guarantee + // that for at least 60 minutes after the first request. + // + // For example, consider a situation where you make an initial request and the + // request times out. If you make the request again with the same request ID, + // the server can check if original operation with the same request ID was + // received, and if so, will ignore the second request. This prevents clients + // from accidentally creating duplicate commitments. + // + // The request ID must be a valid UUID with the exception that zero UUID is + // not supported (00000000-0000-0000-0000-000000000000). + string request_id = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// Route get request. +message GetRouteRequest { + // Required. The name of the Route resource to get. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "datastream.googleapis.com/Route" + } + ]; +} diff --git a/google/cloud/datastream/v1/datastream_grpc_service_config.json b/google/cloud/datastream/v1/datastream_grpc_service_config.json new file mode 100644 index 0000000000..e0ea93ed3c --- /dev/null +++ b/google/cloud/datastream/v1/datastream_grpc_service_config.json @@ -0,0 +1,29 @@ +{ + "methodConfig": [{ + "name": [{ "service": "google.cloud.datastream.v1.Datastream" }], + "timeout": "60s", + "retryPolicy": { + "maxAttempts": 5, + "initialBackoff": "1s", + "maxBackoff": "10s", + "backoffMultiplier": 1.3, + "retryableStatusCodes": ["UNAVAILABLE"] + } + }, + { + "name": [ + { "service": "google.cloud.datastream.v1.Datastream", "method": "CreateConnectionProfile" }, + { "service": "google.cloud.datastream.v1.Datastream", "method": "UpdateConnectionProfile" }, + { "service": "google.cloud.datastream.v1.Datastream", "method": "GenerateConnectionProfileReport" }, + { "service": "google.cloud.datastream.v1.Datastream", "method": "DeleteConnectionProfile" }, + { "service": "google.cloud.datastream.v1.Datastream", "method": "CreateStream" }, + { "service": "google.cloud.datastream.v1.Datastream", "method": "UpdateStream" }, + { "service": "google.cloud.datastream.v1.Datastream", "method": "DeleteStream" }, + { "service": "google.cloud.datastream.v1.Datastream", "method": "CreatePrivateConnection" }, + { "service": "google.cloud.datastream.v1.Datastream", "method": "DeletePrivateConnection" }, + { "service": "google.cloud.datastream.v1.Datastream", "method": "CreateRoute" }, + { "service": "google.cloud.datastream.v1.Datastream", "method": "DeleteRoute" } + ], + "timeout": "60s" + }] +} diff --git a/google/cloud/datastream/v1/datastream_resources.proto b/google/cloud/datastream/v1/datastream_resources.proto new file mode 100644 index 0000000000..efcd863249 --- /dev/null +++ b/google/cloud/datastream/v1/datastream_resources.proto @@ -0,0 +1,836 @@ +// Copyright 2022 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.datastream.v1; + +import "google/api/annotations.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/duration.proto"; +import "google/protobuf/timestamp.proto"; + +option csharp_namespace = "Google.Cloud.Datastream.V1"; +option go_package = "google.golang.org/genproto/googleapis/cloud/datastream/v1;datastream"; +option java_multiple_files = true; +option java_outer_classname = "DatastreamResourcesProto"; +option java_package = "com.google.cloud.datastream.v1"; +option php_namespace = "Google\\Cloud\\Datastream\\V1"; +option ruby_package = "Google::Cloud::Datastream::V1"; +option (google.api.resource_definition) = { + type: "compute.googleapis.com/Networks" + pattern: "projects/{project}/global/networks/{network}" +}; + +// Oracle database profile. +message OracleProfile { + // Required. Hostname for the Oracle connection. + string hostname = 1 [(google.api.field_behavior) = REQUIRED]; + + // Port for the Oracle connection, default value is 1521. + int32 port = 2; + + // Required. Username for the Oracle connection. + string username = 3 [(google.api.field_behavior) = REQUIRED]; + + // Required. Password for the Oracle connection. + string password = 4 [(google.api.field_behavior) = REQUIRED]; + + // Required. Database for the Oracle connection. + string database_service = 5 [(google.api.field_behavior) = REQUIRED]; + + // Connection string attributes + map connection_attributes = 6; +} + +// MySQL database profile. +message MysqlProfile { + // Required. Hostname for the MySQL connection. + string hostname = 1 [(google.api.field_behavior) = REQUIRED]; + + // Port for the MySQL connection, default value is 3306. + int32 port = 2; + + // Required. Username for the MySQL connection. + string username = 3 [(google.api.field_behavior) = REQUIRED]; + + // Required. Input only. Password for the MySQL connection. + string password = 4 [ + (google.api.field_behavior) = REQUIRED, + (google.api.field_behavior) = INPUT_ONLY + ]; + + // SSL configuration for the MySQL connection. + MysqlSslConfig ssl_config = 5; +} + +// Cloud Storage bucket profile. +message GcsProfile { + // Required. The Cloud Storage bucket name. + string bucket = 1 [(google.api.field_behavior) = REQUIRED]; + + // The root path inside the Cloud Storage bucket. + string root_path = 2; +} + +// Static IP address connectivity. +message StaticServiceIpConnectivity {} + +// Forward SSH Tunnel connectivity. +message ForwardSshTunnelConnectivity { + // Required. Hostname for the SSH tunnel. + string hostname = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. Username for the SSH tunnel. + string username = 2 [(google.api.field_behavior) = REQUIRED]; + + // Port for the SSH tunnel, default value is 22. + int32 port = 3; + + oneof authentication_method { + // Input only. SSH password. + string password = 100 [(google.api.field_behavior) = INPUT_ONLY]; + + // Input only. SSH private key. + string private_key = 101 [(google.api.field_behavior) = INPUT_ONLY]; + } +} + +// The VPC Peering configuration is used to create VPC peering between +// Datastream and the consumer's VPC. +message VpcPeeringConfig { + // Required. Fully qualified name of the VPC that Datastream will peer to. + // Format: `projects/{project}/global/{networks}/{name}` + string vpc = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "compute.googleapis.com/Networks" + } + ]; + + // Required. A free subnet for peering. (CIDR of /29) + string subnet = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// The PrivateConnection resource is used to establish private connectivity +// between Datastream and a customer's network. +message PrivateConnection { + option (google.api.resource) = { + type: "datastream.googleapis.com/PrivateConnection" + pattern: "projects/{project}/locations/{location}/privateConnections/{private_connection}" + }; + + // Private Connection state. + enum State { + // Unspecified state. + STATE_UNSPECIFIED = 0; + + // The private connection is in creation state - creating resources. + CREATING = 1; + + // The private connection has been created with all of its resources. + CREATED = 2; + + // The private connection creation has failed. + FAILED = 3; + + // The private connection is being deleted. + DELETING = 4; + + // Delete request has failed, resource is in invalid state. + FAILED_TO_DELETE = 5; + } + + // Output only. The resource's name. + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The create time of the resource. + google.protobuf.Timestamp create_time = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The update time of the resource. + google.protobuf.Timestamp update_time = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Labels. + map labels = 4; + + // Required. Display name. + string display_name = 5 [(google.api.field_behavior) = REQUIRED]; + + // Output only. The state of the Private Connection. + State state = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. In case of error, the details of the error in a user-friendly + // format. + Error error = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // VPC Peering Config. + VpcPeeringConfig vpc_peering_config = 100; +} + +// Private Connectivity +message PrivateConnectivity { + // Required. A reference to a private connection resource. + // Format: `projects/{project}/locations/{location}/privateConnections/{name}` + string private_connection = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "datastream.googleapis.com/PrivateConnection" + } + ]; +} + +// The route resource is the child of the private connection resource, +// used for defining a route for a private connection. +message Route { + option (google.api.resource) = { + type: "datastream.googleapis.com/Route" + pattern: "projects/{project}/locations/{location}/privateConnections/{private_connection}/routes/{route}" + }; + + // Output only. The resource's name. + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The create time of the resource. + google.protobuf.Timestamp create_time = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The update time of the resource. + google.protobuf.Timestamp update_time = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Labels. + map labels = 4; + + // Required. Display name. + string display_name = 5 [(google.api.field_behavior) = REQUIRED]; + + // Required. Destination address for connection + string destination_address = 6 [(google.api.field_behavior) = REQUIRED]; + + // Destination port for connection + int32 destination_port = 7; +} + +// MySQL SSL configuration information. +message MysqlSslConfig { + // Input only. PEM-encoded private key associated with the Client Certificate. + // If this field is used then the 'client_certificate' and the + // 'ca_certificate' fields are mandatory. + string client_key = 1 [(google.api.field_behavior) = INPUT_ONLY]; + + // Output only. Indicates whether the client_key field is set. + bool client_key_set = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Input only. PEM-encoded certificate that will be used by the replica to + // authenticate against the source database server. If this field is used + // then the 'client_key' and the 'ca_certificate' fields are mandatory. + string client_certificate = 3 [(google.api.field_behavior) = INPUT_ONLY]; + + // Output only. Indicates whether the client_certificate field is set. + bool client_certificate_set = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Input only. PEM-encoded certificate of the CA that signed the source + // database server's certificate. + string ca_certificate = 5 [(google.api.field_behavior) = INPUT_ONLY]; + + // Output only. Indicates whether the ca_certificate field is set. + bool ca_certificate_set = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// A set of reusable connection configurations to be used as a source or +// destination for a stream. +message ConnectionProfile { + option (google.api.resource) = { + type: "datastream.googleapis.com/ConnectionProfile" + pattern: "projects/{project}/locations/{location}/connectionProfiles/{connection_profile}" + }; + + // Output only. The resource's name. + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The create time of the resource. + google.protobuf.Timestamp create_time = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The update time of the resource. + google.protobuf.Timestamp update_time = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Labels. + map labels = 4; + + // Required. Display name. + string display_name = 5 [(google.api.field_behavior) = REQUIRED]; + + // Connection configuration for the ConnectionProfile. + oneof profile { + // Oracle ConnectionProfile configuration. + OracleProfile oracle_profile = 100; + + // Cloud Storage ConnectionProfile configuration. + GcsProfile gcs_profile = 101; + + // MySQL ConnectionProfile configuration. + MysqlProfile mysql_profile = 102; + } + + // Connectivity options used to establish a connection to the profile. + oneof connectivity { + // Static Service IP connectivity. + StaticServiceIpConnectivity static_service_ip_connectivity = 200; + + // Forward SSH tunnel connectivity. + ForwardSshTunnelConnectivity forward_ssh_connectivity = 201; + + // Private connectivity. + PrivateConnectivity private_connectivity = 202; + } +} + +// Oracle Column. +message OracleColumn { + // Column name. + string column = 1; + + // The Oracle data type. + string data_type = 2; + + // Column length. + int32 length = 3; + + // Column precision. + int32 precision = 4; + + // Column scale. + int32 scale = 5; + + // Column encoding. + string encoding = 6; + + // Whether or not the column represents a primary key. + bool primary_key = 7; + + // Whether or not the column can accept a null value. + bool nullable = 8; + + // The ordinal position of the column in the table. + int32 ordinal_position = 9; +} + +// Oracle table. +message OracleTable { + // Table name. + string table = 1; + + // Oracle columns in the schema. + // When unspecified as part of inclue/exclude lists, includes/excludes + // everything. + repeated OracleColumn oracle_columns = 2; +} + +// Oracle schema. +message OracleSchema { + // Schema name. + string schema = 1; + + // Tables in the schema. + repeated OracleTable oracle_tables = 2; +} + +// Oracle database structure. +message OracleRdbms { + // Oracle schemas/databases in the database server. + repeated OracleSchema oracle_schemas = 1; +} + +// Oracle data source configuration +message OracleSourceConfig { + // Oracle objects to include in the stream. + OracleRdbms include_objects = 1; + + // Oracle objects to exclude from the stream. + OracleRdbms exclude_objects = 2; +} + +// MySQL Column. +message MysqlColumn { + // Column name. + string column = 1; + + // The MySQL data type. Full data types list can be found here: + // https://dev.mysql.com/doc/refman/8.0/en/data-types.html + string data_type = 2; + + // Column length. + int32 length = 3; + + // Column collation. + string collation = 4; + + // Whether or not the column represents a primary key. + bool primary_key = 5; + + // Whether or not the column can accept a null value. + bool nullable = 6; + + // The ordinal position of the column in the table. + int32 ordinal_position = 7; +} + +// MySQL table. +message MysqlTable { + // Table name. + string table = 1; + + // MySQL columns in the database. + // When unspecified as part of include/exclude lists, includes/excludes + // everything. + repeated MysqlColumn mysql_columns = 2; +} + +// MySQL database. +message MysqlDatabase { + // Database name. + string database = 1; + + // Tables in the database. + repeated MysqlTable mysql_tables = 2; +} + +// MySQL database structure +message MysqlRdbms { + // Mysql databases on the server + repeated MysqlDatabase mysql_databases = 1; +} + +// MySQL source configuration +message MysqlSourceConfig { + // MySQL objects to retrieve from the source. + MysqlRdbms include_objects = 1; + + // MySQL objects to exclude from the stream. + MysqlRdbms exclude_objects = 2; +} + +// The configuration of the stream source. +message SourceConfig { + // Required. Source connection profile resoource. + // Format: `projects/{project}/locations/{location}/connectionProfiles/{name}` + string source_connection_profile = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "datastream.googleapis.com/ConnectionProfile" + } + ]; + + // Stream configuration that is specific to the data source type. + oneof source_stream_config { + // Oracle data source configuration + OracleSourceConfig oracle_source_config = 100; + + // MySQL data source configuration + MysqlSourceConfig mysql_source_config = 101; + } +} + +// AVRO file format configuration. +message AvroFileFormat {} + +// JSON file format configuration. +message JsonFileFormat { + // Schema file format. + enum SchemaFileFormat { + // Unspecified schema file format. + SCHEMA_FILE_FORMAT_UNSPECIFIED = 0; + + // Do not attach schema file. + NO_SCHEMA_FILE = 1; + + // Avro schema format. + AVRO_SCHEMA_FILE = 2; + } + + // Json file compression. + enum JsonCompression { + // Unspecified json file compression. + JSON_COMPRESSION_UNSPECIFIED = 0; + + // Do not compress JSON file. + NO_COMPRESSION = 1; + + // Gzip compression. + GZIP = 2; + } + + // The schema file format along JSON data files. + SchemaFileFormat schema_file_format = 1; + + // Compression of the loaded JSON file. + JsonCompression compression = 2; +} + +// Google Cloud Storage destination configuration +message GcsDestinationConfig { + // Path inside the Cloud Storage bucket to write data to. + string path = 1; + + // The maximum file size to be saved in the bucket. + int32 file_rotation_mb = 2; + + // The maximum duration for which new events are added before a file is + // closed and a new file is created. + google.protobuf.Duration file_rotation_interval = 3; + + // File Format that the data should be written in. + oneof file_format { + // AVRO file format configuration. + AvroFileFormat avro_file_format = 100; + + // JSON file format configuration. + JsonFileFormat json_file_format = 101; + } +} + +// The configuration of the stream destination. +message DestinationConfig { + // Required. Destination connection profile resource. + // Format: `projects/{project}/locations/{location}/connectionProfiles/{name}` + string destination_connection_profile = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "datastream.googleapis.com/ConnectionProfile" + } + ]; + + // Stream configuration that is specific to the data destination type. + oneof destination_stream_config { + // A configuration for how data should be loaded to Cloud Storage. + GcsDestinationConfig gcs_destination_config = 100; + } +} + +// A resource representing streaming data from a source to a destination. +message Stream { + option (google.api.resource) = { + type: "datastream.googleapis.com/Stream" + pattern: "projects/{project}/locations/{location}/streams/{stream}" + }; + + // Stream state. + enum State { + // Unspecified stream state. + STATE_UNSPECIFIED = 0; + + // The stream has been created but has not yet started streaming data. + NOT_STARTED = 1; + + // The stream is running. + RUNNING = 2; + + // The stream is paused. + PAUSED = 3; + + // The stream is in maintenance mode. + // + // Updates are rejected on the resource in this state. + MAINTENANCE = 4; + + // The stream is experiencing an error that is preventing data from being + // streamed. + FAILED = 5; + + // The stream has experienced a terminal failure. + FAILED_PERMANENTLY = 6; + + // The stream is starting, but not yet running. + STARTING = 7; + + // The Stream is no longer reading new events, but still writing events in + // the buffer. + DRAINING = 8; + } + + // Backfill strategy to automatically backfill the Stream's objects. + // Specific objects can be excluded. + message BackfillAllStrategy { + // List of objects to exclude. + oneof excluded_objects { + // Oracle data source objects to avoid backfilling. + OracleRdbms oracle_excluded_objects = 1; + + // MySQL data source objects to avoid backfilling. + MysqlRdbms mysql_excluded_objects = 2; + } + } + + // Backfill strategy to disable automatic backfill for the Stream's objects. + message BackfillNoneStrategy {} + + // Output only. The stream's name. + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The creation time of the stream. + google.protobuf.Timestamp create_time = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The last update time of the stream. + google.protobuf.Timestamp update_time = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Labels. + map labels = 4; + + // Required. Display name. + string display_name = 5 [(google.api.field_behavior) = REQUIRED]; + + // Required. Source connection profile configuration. + SourceConfig source_config = 6 [(google.api.field_behavior) = REQUIRED]; + + // Required. Destination connection profile configuration. + DestinationConfig destination_config = 7 + [(google.api.field_behavior) = REQUIRED]; + + // The state of the stream. + State state = 8; + + // Stream backfill strategy. + oneof backfill_strategy { + // Automatically backfill objects included in the stream source + // configuration. Specific objects can be excluded. + BackfillAllStrategy backfill_all = 101; + + // Do not automatically backfill any objects. + BackfillNoneStrategy backfill_none = 102; + } + + // Output only. Errors on the Stream. + repeated Error errors = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Immutable. A reference to a KMS encryption key. + // If provided, it will be used to encrypt the data. + // If left blank, data will be encrypted using an internal Stream-specific + // encryption key provisioned through KMS. + optional string customer_managed_encryption_key = 10 + [(google.api.field_behavior) = IMMUTABLE]; +} + +// A specific stream object (e.g a specific DB table). +message StreamObject { + option (google.api.resource) = { + type: "datastream.googleapis.com/StreamObject" + pattern: "projects/{project}/locations/{location}/streams/{stream}/objects/{object}" + }; + + // Output only. The object resource's name. + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The creation time of the object. + google.protobuf.Timestamp create_time = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The last update time of the object. + google.protobuf.Timestamp update_time = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Required. Display name. + string display_name = 5 [(google.api.field_behavior) = REQUIRED]; + + // Output only. Active errors on the object. + repeated Error errors = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // The latest backfill job that was initiated for the stream object. + BackfillJob backfill_job = 7; + + // The object identifier in the data source. + SourceObjectIdentifier source_object = 8; +} + +// Represents an identifier of an object in the data source. +message SourceObjectIdentifier { + // Oracle data source object identifier. + message OracleObjectIdentifier { + // Required. The schema name. + string schema = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The table name. + string table = 2 [(google.api.field_behavior) = REQUIRED]; + } + + // Mysql data source object identifier. + message MysqlObjectIdentifier { + // Required. The database name. + string database = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The table name. + string table = 2 [(google.api.field_behavior) = REQUIRED]; + } + + // The identifier for an object in the data source. + oneof source_identifier { + // Oracle data source object identifier. + OracleObjectIdentifier oracle_identifier = 1; + + // Mysql data source object identifier. + MysqlObjectIdentifier mysql_identifier = 2; + } +} + +// Represents a backfill job on a specific stream object. +message BackfillJob { + // State of the stream object's backfill job. + enum State { + // Default value. + STATE_UNSPECIFIED = 0; + + // Backfill job was never started for the stream object (stream has backfill + // strategy defined as manual or object was explicitly excluded from + // automatic backfill). + NOT_STARTED = 1; + + // Backfill job will start pending available resources. + PENDING = 2; + + // Backfill job is running. + ACTIVE = 3; + + // Backfill job stopped (next job run will start from beginning). + STOPPED = 4; + + // Backfill job failed (due to an error). + FAILED = 5; + + // Backfill completed successfully. + COMPLETED = 6; + + // Backfill job failed since the table structure is currently unsupported + // for backfill. + UNSUPPORTED = 7; + } + + // Triggering reason for a backfill job. + enum Trigger { + // Default value. + TRIGGER_UNSPECIFIED = 0; + + // Object backfill job was triggered automatically according to the stream's + // backfill strategy. + AUTOMATIC = 1; + + // Object backfill job was triggered manually using the dedicated API. + MANUAL = 2; + } + + // Backfill job state. + State state = 1; + + // Backfill job's triggering reason. + Trigger trigger = 2; + + // Output only. Backfill job's start time. + google.protobuf.Timestamp last_start_time = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Backfill job's end time. + google.protobuf.Timestamp last_end_time = 4 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Errors which caused the backfill job to fail. + repeated Error errors = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Represent a user-facing Error. +message Error { + // A title that explains the reason for the error. + string reason = 1; + + // A unique identifier for this specific error, + // allowing it to be traced throughout the system in logs and API responses. + string error_uuid = 2; + + // A message containing more information about the error that occurred. + string message = 3; + + // The time when the error occurred. + google.protobuf.Timestamp error_time = 4; + + // Additional information about the error. + map details = 5; +} + +// Contains the current validation results. +message ValidationResult { + // A list of validations (includes both executed as well as not executed + // validations). + repeated Validation validations = 1; +} + +// A validation to perform on a stream. +message Validation { + // Validation execution state. + enum State { + // Unspecified state. + STATE_UNSPECIFIED = 0; + + // Validation did not execute. + NOT_EXECUTED = 1; + + // Validation failed. + FAILED = 2; + + // Validation passed. + PASSED = 3; + } + + // A short description of the validation. + string description = 1; + + // Validation execution status. + State state = 2; + + // Messages reflecting the validation results. + repeated ValidationMessage message = 3; + + // A custom code identifying this validation. + string code = 4; +} + +// Represent user-facing validation result message. +message ValidationMessage { + // Validation message level. + enum Level { + // Unspecified level. + LEVEL_UNSPECIFIED = 0; + + // Potentially cause issues with the Stream. + WARNING = 1; + + // Definitely cause issues with the Stream. + ERROR = 2; + } + + // The result of the validation. + string message = 1; + + // Message severity level (warning or error). + Level level = 2; + + // Additional metadata related to the result. + map metadata = 3; + + // A custom code identifying this specific message. + string code = 4; +} diff --git a/google/cloud/datastream/v1/datastream_v1.yaml b/google/cloud/datastream/v1/datastream_v1.yaml new file mode 100644 index 0000000000..f604544068 --- /dev/null +++ b/google/cloud/datastream/v1/datastream_v1.yaml @@ -0,0 +1,71 @@ +type: google.api.Service +config_version: 3 +name: datastream.googleapis.com +title: Datastream API + +apis: +- name: google.cloud.datastream.v1.Datastream +- name: google.cloud.location.Locations + +types: +- name: google.cloud.datastream.v1.Error +- name: google.cloud.datastream.v1.OperationMetadata +- name: google.cloud.datastream.v1.ValidationResult + +documentation: + rules: + - selector: google.cloud.location.Locations.GetLocation + description: Gets information about a location. + + - selector: google.cloud.location.Locations.ListLocations + description: Lists information about the supported locations for this service. + +backend: + rules: + - selector: 'google.cloud.datastream.v1.Datastream.*' + deadline: 60.0 + - selector: google.cloud.datastream.v1.Datastream.DiscoverConnectionProfile + deadline: 120.0 + - selector: google.cloud.datastream.v1.Datastream.StartBackfillJob + deadline: 120.0 + - selector: google.cloud.location.Locations.GetLocation + deadline: 60.0 + - selector: google.cloud.location.Locations.ListLocations + deadline: 60.0 + - selector: 'google.longrunning.Operations.*' + deadline: 60.0 + +http: + rules: + - selector: google.cloud.location.Locations.GetLocation + get: '/v1/{name=projects/*/locations/*}' + - selector: google.cloud.location.Locations.ListLocations + get: '/v1/{name=projects/*}/locations' + - selector: google.longrunning.Operations.CancelOperation + post: '/v1/{name=projects/*/locations/*/operations/*}:cancel' + body: '*' + - selector: google.longrunning.Operations.DeleteOperation + delete: '/v1/{name=projects/*/locations/*/operations/*}' + - selector: google.longrunning.Operations.GetOperation + get: '/v1/{name=projects/*/locations/*/operations/*}' + - selector: google.longrunning.Operations.ListOperations + get: '/v1/{name=projects/*/locations/*}/operations' + +authentication: + rules: + - selector: 'google.cloud.datastream.v1.Datastream.*' + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform + - selector: google.cloud.location.Locations.GetLocation + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform + - selector: google.cloud.location.Locations.ListLocations + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform + - selector: 'google.longrunning.Operations.*' + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform