google-cloud-metastore-v1 0.3.0 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,69 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2022 Google LLC
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # https://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
+
19
+
20
+ module Google
21
+ module Cloud
22
+ module Metastore
23
+ module V1
24
+ module DataprocMetastoreFederation
25
+ # Path helper methods for the DataprocMetastoreFederation API.
26
+ module Paths
27
+ ##
28
+ # Create a fully-qualified Federation resource string.
29
+ #
30
+ # The resource will be in the following format:
31
+ #
32
+ # `projects/{project}/locations/{location}/federations/{federation}`
33
+ #
34
+ # @param project [String]
35
+ # @param location [String]
36
+ # @param federation [String]
37
+ #
38
+ # @return [::String]
39
+ def federation_path project:, location:, federation:
40
+ raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
41
+ raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
42
+
43
+ "projects/#{project}/locations/#{location}/federations/#{federation}"
44
+ end
45
+
46
+ ##
47
+ # Create a fully-qualified Location resource string.
48
+ #
49
+ # The resource will be in the following format:
50
+ #
51
+ # `projects/{project}/locations/{location}`
52
+ #
53
+ # @param project [String]
54
+ # @param location [String]
55
+ #
56
+ # @return [::String]
57
+ def location_path project:, location:
58
+ raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
59
+
60
+ "projects/#{project}/locations/#{location}"
61
+ end
62
+
63
+ extend self
64
+ end
65
+ end
66
+ end
67
+ end
68
+ end
69
+ end
@@ -0,0 +1,62 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2022 Google LLC
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # https://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
+
19
+ require "gapic/common"
20
+ require "gapic/config"
21
+ require "gapic/config/method"
22
+
23
+ require "google/cloud/metastore/v1/version"
24
+
25
+ require "google/cloud/metastore/v1/dataproc_metastore_federation/credentials"
26
+ require "google/cloud/metastore/v1/dataproc_metastore_federation/paths"
27
+ require "google/cloud/metastore/v1/dataproc_metastore_federation/operations"
28
+ require "google/cloud/metastore/v1/dataproc_metastore_federation/client"
29
+
30
+ module Google
31
+ module Cloud
32
+ module Metastore
33
+ module V1
34
+ ##
35
+ # Configures and manages metastore federation services.
36
+ # Dataproc Metastore Federation Service allows federating a collection of
37
+ # backend metastores like BigQuery, Dataplex Lakes, and other Dataproc
38
+ # Metastores. The Federation Service exposes a gRPC URL through which metadata
39
+ # from the backend metastores are served at query time.
40
+ #
41
+ # The Dataproc Metastore Federation API defines the following resource model:
42
+ # * The service works with a collection of Google Cloud projects.
43
+ # * Each project has a collection of available locations.
44
+ # * Each location has a collection of federations.
45
+ # * Dataproc Metastore Federations are resources with names of the
46
+ # form:
47
+ # `projects/{project_number}/locations/{location_id}/federations/{federation_id}`.
48
+ #
49
+ # @example Load this service and instantiate a gRPC client
50
+ #
51
+ # require "google/cloud/metastore/v1/dataproc_metastore_federation"
52
+ # client = ::Google::Cloud::Metastore::V1::DataprocMetastoreFederation::Client.new
53
+ #
54
+ module DataprocMetastoreFederation
55
+ end
56
+ end
57
+ end
58
+ end
59
+ end
60
+
61
+ helper_path = ::File.join __dir__, "dataproc_metastore_federation", "helpers.rb"
62
+ require "google/cloud/metastore/v1/dataproc_metastore_federation/helpers" if ::File.file? helper_path
@@ -0,0 +1,94 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # source: google/cloud/metastore/v1/metastore_federation.proto
3
+
4
+ require 'google/protobuf'
5
+
6
+ require 'google/api/annotations_pb'
7
+ require 'google/api/client_pb'
8
+ require 'google/api/field_behavior_pb'
9
+ require 'google/api/resource_pb'
10
+ require 'google/longrunning/operations_pb'
11
+ require 'google/protobuf/field_mask_pb'
12
+ require 'google/protobuf/timestamp_pb'
13
+
14
+ Google::Protobuf::DescriptorPool.generated_pool.build do
15
+ add_file("google/cloud/metastore/v1/metastore_federation.proto", :syntax => :proto3) do
16
+ add_message "google.cloud.metastore.v1.Federation" do
17
+ optional :name, :string, 1
18
+ optional :create_time, :message, 2, "google.protobuf.Timestamp"
19
+ optional :update_time, :message, 3, "google.protobuf.Timestamp"
20
+ map :labels, :string, :string, 4
21
+ optional :version, :string, 5
22
+ map :backend_metastores, :int32, :message, 6, "google.cloud.metastore.v1.BackendMetastore"
23
+ optional :endpoint_uri, :string, 7
24
+ optional :state, :enum, 8, "google.cloud.metastore.v1.Federation.State"
25
+ optional :state_message, :string, 9
26
+ optional :uid, :string, 10
27
+ end
28
+ add_enum "google.cloud.metastore.v1.Federation.State" do
29
+ value :STATE_UNSPECIFIED, 0
30
+ value :CREATING, 1
31
+ value :ACTIVE, 2
32
+ value :UPDATING, 3
33
+ value :DELETING, 4
34
+ value :ERROR, 5
35
+ end
36
+ add_message "google.cloud.metastore.v1.BackendMetastore" do
37
+ optional :name, :string, 1
38
+ optional :metastore_type, :enum, 2, "google.cloud.metastore.v1.BackendMetastore.MetastoreType"
39
+ end
40
+ add_enum "google.cloud.metastore.v1.BackendMetastore.MetastoreType" do
41
+ value :METASTORE_TYPE_UNSPECIFIED, 0
42
+ value :DATAPROC_METASTORE, 3
43
+ end
44
+ add_message "google.cloud.metastore.v1.ListFederationsRequest" do
45
+ optional :parent, :string, 1
46
+ optional :page_size, :int32, 2
47
+ optional :page_token, :string, 3
48
+ optional :filter, :string, 4
49
+ optional :order_by, :string, 5
50
+ end
51
+ add_message "google.cloud.metastore.v1.ListFederationsResponse" do
52
+ repeated :federations, :message, 1, "google.cloud.metastore.v1.Federation"
53
+ optional :next_page_token, :string, 2
54
+ repeated :unreachable, :string, 3
55
+ end
56
+ add_message "google.cloud.metastore.v1.GetFederationRequest" do
57
+ optional :name, :string, 1
58
+ end
59
+ add_message "google.cloud.metastore.v1.CreateFederationRequest" do
60
+ optional :parent, :string, 1
61
+ optional :federation_id, :string, 2
62
+ optional :federation, :message, 3, "google.cloud.metastore.v1.Federation"
63
+ optional :request_id, :string, 4
64
+ end
65
+ add_message "google.cloud.metastore.v1.UpdateFederationRequest" do
66
+ optional :update_mask, :message, 1, "google.protobuf.FieldMask"
67
+ optional :federation, :message, 2, "google.cloud.metastore.v1.Federation"
68
+ optional :request_id, :string, 3
69
+ end
70
+ add_message "google.cloud.metastore.v1.DeleteFederationRequest" do
71
+ optional :name, :string, 1
72
+ optional :request_id, :string, 2
73
+ end
74
+ end
75
+ end
76
+
77
+ module Google
78
+ module Cloud
79
+ module Metastore
80
+ module V1
81
+ Federation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.metastore.v1.Federation").msgclass
82
+ Federation::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.metastore.v1.Federation.State").enummodule
83
+ BackendMetastore = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.metastore.v1.BackendMetastore").msgclass
84
+ BackendMetastore::MetastoreType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.metastore.v1.BackendMetastore.MetastoreType").enummodule
85
+ ListFederationsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.metastore.v1.ListFederationsRequest").msgclass
86
+ ListFederationsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.metastore.v1.ListFederationsResponse").msgclass
87
+ GetFederationRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.metastore.v1.GetFederationRequest").msgclass
88
+ CreateFederationRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.metastore.v1.CreateFederationRequest").msgclass
89
+ UpdateFederationRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.metastore.v1.UpdateFederationRequest").msgclass
90
+ DeleteFederationRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.metastore.v1.DeleteFederationRequest").msgclass
91
+ end
92
+ end
93
+ end
94
+ end
@@ -0,0 +1,65 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # Source: google/cloud/metastore/v1/metastore_federation.proto for package 'google.cloud.metastore.v1'
3
+ # Original file comments:
4
+ # Copyright 2022 Google LLC
5
+ #
6
+ # Licensed under the Apache License, Version 2.0 (the "License");
7
+ # you may not use this file except in compliance with the License.
8
+ # You may obtain a copy of the License at
9
+ #
10
+ # http://www.apache.org/licenses/LICENSE-2.0
11
+ #
12
+ # Unless required by applicable law or agreed to in writing, software
13
+ # distributed under the License is distributed on an "AS IS" BASIS,
14
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+ # See the License for the specific language governing permissions and
16
+ # limitations under the License.
17
+ #
18
+
19
+ require 'grpc'
20
+ require 'google/cloud/metastore/v1/metastore_federation_pb'
21
+
22
+ module Google
23
+ module Cloud
24
+ module Metastore
25
+ module V1
26
+ module DataprocMetastoreFederation
27
+ # Configures and manages metastore federation services.
28
+ # Dataproc Metastore Federation Service allows federating a collection of
29
+ # backend metastores like BigQuery, Dataplex Lakes, and other Dataproc
30
+ # Metastores. The Federation Service exposes a gRPC URL through which metadata
31
+ # from the backend metastores are served at query time.
32
+ #
33
+ # The Dataproc Metastore Federation API defines the following resource model:
34
+ # * The service works with a collection of Google Cloud projects.
35
+ # * Each project has a collection of available locations.
36
+ # * Each location has a collection of federations.
37
+ # * Dataproc Metastore Federations are resources with names of the
38
+ # form:
39
+ # `projects/{project_number}/locations/{location_id}/federations/{federation_id}`.
40
+ class Service
41
+
42
+ include ::GRPC::GenericService
43
+
44
+ self.marshal_class_method = :encode
45
+ self.unmarshal_class_method = :decode
46
+ self.service_name = 'google.cloud.metastore.v1.DataprocMetastoreFederation'
47
+
48
+ # Lists federations in a project and location.
49
+ rpc :ListFederations, ::Google::Cloud::Metastore::V1::ListFederationsRequest, ::Google::Cloud::Metastore::V1::ListFederationsResponse
50
+ # Gets the details of a single federation.
51
+ rpc :GetFederation, ::Google::Cloud::Metastore::V1::GetFederationRequest, ::Google::Cloud::Metastore::V1::Federation
52
+ # Creates a metastore federation in a project and location.
53
+ rpc :CreateFederation, ::Google::Cloud::Metastore::V1::CreateFederationRequest, ::Google::Longrunning::Operation
54
+ # Updates the fields of a federation.
55
+ rpc :UpdateFederation, ::Google::Cloud::Metastore::V1::UpdateFederationRequest, ::Google::Longrunning::Operation
56
+ # Deletes a single federation.
57
+ rpc :DeleteFederation, ::Google::Cloud::Metastore::V1::DeleteFederationRequest, ::Google::Longrunning::Operation
58
+ end
59
+
60
+ Stub = Service.rpc_stub_class
61
+ end
62
+ end
63
+ end
64
+ end
65
+ end
@@ -31,6 +31,10 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
31
31
  optional :uid, :string, 16
32
32
  optional :metadata_management_activity, :message, 17, "google.cloud.metastore.v1.MetadataManagementActivity"
33
33
  optional :release_channel, :enum, 19, "google.cloud.metastore.v1.Service.ReleaseChannel"
34
+ optional :encryption_config, :message, 20, "google.cloud.metastore.v1.EncryptionConfig"
35
+ optional :network_config, :message, 21, "google.cloud.metastore.v1.NetworkConfig"
36
+ optional :database_type, :enum, 22, "google.cloud.metastore.v1.Service.DatabaseType"
37
+ optional :telemetry_config, :message, 23, "google.cloud.metastore.v1.TelemetryConfig"
34
38
  oneof :metastore_config do
35
39
  optional :hive_metastore_config, :message, 5, "google.cloud.metastore.v1.HiveMetastoreConfig"
36
40
  end
@@ -55,6 +59,11 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
55
59
  value :CANARY, 1
56
60
  value :STABLE, 2
57
61
  end
62
+ add_enum "google.cloud.metastore.v1.Service.DatabaseType" do
63
+ value :DATABASE_TYPE_UNSPECIFIED, 0
64
+ value :MYSQL, 1
65
+ value :SPANNER, 2
66
+ end
58
67
  add_message "google.cloud.metastore.v1.MaintenanceWindow" do
59
68
  optional :hour_of_day, :message, 1, "google.protobuf.Int32Value"
60
69
  optional :day_of_week, :enum, 2, "google.type.DayOfWeek"
@@ -74,6 +83,26 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
74
83
  optional :cloud_secret, :string, 2
75
84
  end
76
85
  end
86
+ add_message "google.cloud.metastore.v1.EncryptionConfig" do
87
+ optional :kms_key, :string, 1
88
+ end
89
+ add_message "google.cloud.metastore.v1.NetworkConfig" do
90
+ repeated :consumers, :message, 1, "google.cloud.metastore.v1.NetworkConfig.Consumer"
91
+ end
92
+ add_message "google.cloud.metastore.v1.NetworkConfig.Consumer" do
93
+ optional :endpoint_uri, :string, 3
94
+ oneof :vpc_resource do
95
+ optional :subnetwork, :string, 1
96
+ end
97
+ end
98
+ add_message "google.cloud.metastore.v1.TelemetryConfig" do
99
+ optional :log_format, :enum, 1, "google.cloud.metastore.v1.TelemetryConfig.LogFormat"
100
+ end
101
+ add_enum "google.cloud.metastore.v1.TelemetryConfig.LogFormat" do
102
+ value :LOG_FORMAT_UNSPECIFIED, 0
103
+ value :LEGACY, 1
104
+ value :JSON, 2
105
+ end
77
106
  add_message "google.cloud.metastore.v1.MetadataManagementActivity" do
78
107
  repeated :metadata_exports, :message, 1, "google.cloud.metastore.v1.MetadataExport"
79
108
  repeated :restores, :message, 2, "google.cloud.metastore.v1.Restore"
@@ -287,10 +316,16 @@ module Google
287
316
  Service::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.metastore.v1.Service.State").enummodule
288
317
  Service::Tier = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.metastore.v1.Service.Tier").enummodule
289
318
  Service::ReleaseChannel = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.metastore.v1.Service.ReleaseChannel").enummodule
319
+ Service::DatabaseType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.metastore.v1.Service.DatabaseType").enummodule
290
320
  MaintenanceWindow = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.metastore.v1.MaintenanceWindow").msgclass
291
321
  HiveMetastoreConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.metastore.v1.HiveMetastoreConfig").msgclass
292
322
  KerberosConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.metastore.v1.KerberosConfig").msgclass
293
323
  Secret = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.metastore.v1.Secret").msgclass
324
+ EncryptionConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.metastore.v1.EncryptionConfig").msgclass
325
+ NetworkConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.metastore.v1.NetworkConfig").msgclass
326
+ NetworkConfig::Consumer = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.metastore.v1.NetworkConfig.Consumer").msgclass
327
+ TelemetryConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.metastore.v1.TelemetryConfig").msgclass
328
+ TelemetryConfig::LogFormat = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.metastore.v1.TelemetryConfig.LogFormat").enummodule
294
329
  MetadataManagementActivity = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.metastore.v1.MetadataManagementActivity").msgclass
295
330
  MetadataImport = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.metastore.v1.MetadataImport").msgclass
296
331
  MetadataImport::DatabaseDump = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.metastore.v1.MetadataImport.DatabaseDump").msgclass
@@ -21,7 +21,7 @@ module Google
21
21
  module Cloud
22
22
  module Metastore
23
23
  module V1
24
- VERSION = "0.3.0"
24
+ VERSION = "0.5.0"
25
25
  end
26
26
  end
27
27
  end
@@ -17,15 +17,16 @@
17
17
  # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
18
 
19
19
  require "google/cloud/metastore/v1/dataproc_metastore"
20
+ require "google/cloud/metastore/v1/dataproc_metastore_federation"
20
21
  require "google/cloud/metastore/v1/version"
21
22
 
22
23
  module Google
23
24
  module Cloud
24
25
  module Metastore
25
26
  ##
26
- # To load this package, including all its services, and instantiate a client:
27
+ # API client module.
27
28
  #
28
- # @example
29
+ # @example Load this package, including all its services, and instantiate a gRPC client
29
30
  #
30
31
  # require "google/cloud/metastore/v1"
31
32
  # client = ::Google::Cloud::Metastore::V1::DataprocMetastore::Client.new