Class: Google::Cloud::AIPlatform::V1::DatasetService::Rest::Client
- Inherits:
-
Object
- Object
- Google::Cloud::AIPlatform::V1::DatasetService::Rest::Client
- Includes:
- Paths
- Defined in:
- lib/google/cloud/ai_platform/v1/dataset_service/rest/client.rb
Overview
REST client for the DatasetService service.
The service that manages Vertex AI Dataset and its child resources.
Defined Under Namespace
Classes: Configuration
Instance Attribute Summary collapse
-
#iam_policy_client ⇒ Google::Iam::V1::IAMPolicy::Rest::Client
readonly
Get the associated client for mix-in of the IAMPolicy.
-
#location_client ⇒ Google::Cloud::Location::Locations::Rest::Client
readonly
Get the associated client for mix-in of the Locations.
-
#operations_client ⇒ ::Google::Cloud::AIPlatform::V1::DatasetService::Rest::Operations
readonly
Get the associated client for long-running operations.
Class Method Summary collapse
-
.configure {|config| ... } ⇒ Client::Configuration
Configure the DatasetService Client class.
Instance Method Summary collapse
-
#configure {|config| ... } ⇒ Client::Configuration
Configure the DatasetService Client instance.
-
#create_dataset(request, options = nil) {|result, operation| ... } ⇒ ::Gapic::Operation
Creates a Dataset.
-
#create_dataset_version(request, options = nil) {|result, operation| ... } ⇒ ::Gapic::Operation
Create a version from a Dataset.
-
#delete_dataset(request, options = nil) {|result, operation| ... } ⇒ ::Gapic::Operation
Deletes a Dataset.
-
#delete_dataset_version(request, options = nil) {|result, operation| ... } ⇒ ::Gapic::Operation
Deletes a Dataset version.
-
#delete_saved_query(request, options = nil) {|result, operation| ... } ⇒ ::Gapic::Operation
Deletes a SavedQuery.
-
#export_data(request, options = nil) {|result, operation| ... } ⇒ ::Gapic::Operation
Exports data from a Dataset.
-
#get_annotation_spec(request, options = nil) {|result, operation| ... } ⇒ ::Google::Cloud::AIPlatform::V1::AnnotationSpec
Gets an AnnotationSpec.
-
#get_dataset(request, options = nil) {|result, operation| ... } ⇒ ::Google::Cloud::AIPlatform::V1::Dataset
Gets a Dataset.
-
#get_dataset_version(request, options = nil) {|result, operation| ... } ⇒ ::Google::Cloud::AIPlatform::V1::DatasetVersion
Gets a Dataset version.
-
#import_data(request, options = nil) {|result, operation| ... } ⇒ ::Gapic::Operation
Imports data into a Dataset.
-
#initialize {|config| ... } ⇒ Client
constructor
Create a new DatasetService REST client object.
-
#list_annotations(request, options = nil) {|result, operation| ... } ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::AIPlatform::V1::Annotation>
Lists Annotations belongs to a dataitem.
-
#list_data_items(request, options = nil) {|result, operation| ... } ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::AIPlatform::V1::DataItem>
Lists DataItems in a Dataset.
-
#list_dataset_versions(request, options = nil) {|result, operation| ... } ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::AIPlatform::V1::DatasetVersion>
Lists DatasetVersions in a Dataset.
-
#list_datasets(request, options = nil) {|result, operation| ... } ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::AIPlatform::V1::Dataset>
Lists Datasets in a Location.
-
#list_saved_queries(request, options = nil) {|result, operation| ... } ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::AIPlatform::V1::SavedQuery>
Lists SavedQueries in a Dataset.
-
#restore_dataset_version(request, options = nil) {|result, operation| ... } ⇒ ::Gapic::Operation
Restores a dataset version.
-
#search_data_items(request, options = nil) {|result, operation| ... } ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::AIPlatform::V1::DataItemView>
Searches DataItems in a Dataset.
-
#universe_domain ⇒ String
The effective universe domain.
-
#update_dataset(request, options = nil) {|result, operation| ... } ⇒ ::Google::Cloud::AIPlatform::V1::Dataset
Updates a Dataset.
-
#update_dataset_version(request, options = nil) {|result, operation| ... } ⇒ ::Google::Cloud::AIPlatform::V1::DatasetVersion
Updates a DatasetVersion.
Methods included from Paths
#annotation_spec_path, #data_item_path, #dataset_path, #dataset_version_path, #location_path, #saved_query_path
Constructor Details
#initialize {|config| ... } ⇒ Client
Create a new DatasetService REST client object.
128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 |
# File 'lib/google/cloud/ai_platform/v1/dataset_service/rest/client.rb', line 128 def initialize # Create the configuration object @config = Configuration.new Client.configure # Yield the configuration if needed yield @config if block_given? # Create credentials credentials = @config.credentials # Use self-signed JWT if the endpoint is unchanged from default, # but only if the default endpoint does not have a region prefix. enable_self_signed_jwt = @config.endpoint.nil? || (@config.endpoint == Configuration::DEFAULT_ENDPOINT && !@config.endpoint.split(".").first.include?("-")) credentials ||= Credentials.default scope: @config.scope, enable_self_signed_jwt: enable_self_signed_jwt if credentials.is_a?(::String) || credentials.is_a?(::Hash) credentials = Credentials.new credentials, scope: @config.scope end @quota_project_id = @config.quota_project @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id @operations_client = ::Google::Cloud::AIPlatform::V1::DatasetService::Rest::Operations.new do |config| config.credentials = credentials config.quota_project = @quota_project_id config.endpoint = @config.endpoint config.universe_domain = @config.universe_domain end @dataset_service_stub = ::Google::Cloud::AIPlatform::V1::DatasetService::Rest::ServiceStub.new( endpoint: @config.endpoint, endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, universe_domain: @config.universe_domain, credentials: credentials ) @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config| config.credentials = credentials config.quota_project = @quota_project_id config.endpoint = @dataset_service_stub.endpoint config.universe_domain = @dataset_service_stub.universe_domain config.bindings_override = @config.bindings_override end @iam_policy_client = Google::Iam::V1::IAMPolicy::Rest::Client.new do |config| config.credentials = credentials config.quota_project = @quota_project_id config.endpoint = @dataset_service_stub.endpoint config.universe_domain = @dataset_service_stub.universe_domain config.bindings_override = @config.bindings_override end end |
Instance Attribute Details
#iam_policy_client ⇒ Google::Iam::V1::IAMPolicy::Rest::Client (readonly)
Get the associated client for mix-in of the IAMPolicy.
201 202 203 |
# File 'lib/google/cloud/ai_platform/v1/dataset_service/rest/client.rb', line 201 def iam_policy_client @iam_policy_client end |
#location_client ⇒ Google::Cloud::Location::Locations::Rest::Client (readonly)
Get the associated client for mix-in of the Locations.
194 195 196 |
# File 'lib/google/cloud/ai_platform/v1/dataset_service/rest/client.rb', line 194 def location_client @location_client end |
#operations_client ⇒ ::Google::Cloud::AIPlatform::V1::DatasetService::Rest::Operations (readonly)
Get the associated client for long-running operations.
187 188 189 |
# File 'lib/google/cloud/ai_platform/v1/dataset_service/rest/client.rb', line 187 def operations_client @operations_client end |
Class Method Details
.configure {|config| ... } ⇒ Client::Configuration
Configure the DatasetService Client class.
See Configuration for a description of the configuration fields.
66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 |
# File 'lib/google/cloud/ai_platform/v1/dataset_service/rest/client.rb', line 66 def self.configure @configure ||= begin namespace = ["Google", "Cloud", "AIPlatform", "V1"] parent_config = while namespace.any? parent_name = namespace.join "::" parent_const = const_get parent_name break parent_const.configure if parent_const.respond_to? :configure namespace.pop end default_config = Client::Configuration.new parent_config default_config end yield @configure if block_given? @configure end |
Instance Method Details
#configure {|config| ... } ⇒ Client::Configuration
Configure the DatasetService Client instance.
The configuration is set to the derived mode, meaning that values can be changed, but structural changes (adding new fields, etc.) are not allowed. Structural changes should be made on configure.
See Configuration for a description of the configuration fields.
98 99 100 101 |
# File 'lib/google/cloud/ai_platform/v1/dataset_service/rest/client.rb', line 98 def configure yield @config if block_given? @config end |
#create_dataset(request, options = nil) ⇒ ::Gapic::Operation #create_dataset(parent: nil, dataset: nil) ⇒ ::Gapic::Operation
Creates a Dataset.
258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 |
# File 'lib/google/cloud/ai_platform/v1/dataset_service/rest/client.rb', line 258 def create_dataset request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::CreateDatasetRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.create_dataset..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.create_dataset.timeout, metadata: , retry_policy: @config.rpcs.create_dataset.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @dataset_service_stub.create_dataset request, do |result, operation| result = ::Gapic::Operation.new result, @operations_client, options: yield result, operation if block_given? return result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#create_dataset_version(request, options = nil) ⇒ ::Gapic::Operation #create_dataset_version(parent: nil, dataset_version: nil) ⇒ ::Gapic::Operation
Create a version from a Dataset.
905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 |
# File 'lib/google/cloud/ai_platform/v1/dataset_service/rest/client.rb', line 905 def create_dataset_version request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::CreateDatasetVersionRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.create_dataset_version..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.create_dataset_version.timeout, metadata: , retry_policy: @config.rpcs.create_dataset_version.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @dataset_service_stub.create_dataset_version request, do |result, operation| result = ::Gapic::Operation.new result, @operations_client, options: yield result, operation if block_given? return result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#delete_dataset(request, options = nil) ⇒ ::Gapic::Operation #delete_dataset(name: nil) ⇒ ::Gapic::Operation
Deletes a Dataset.
629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 |
# File 'lib/google/cloud/ai_platform/v1/dataset_service/rest/client.rb', line 629 def delete_dataset request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::DeleteDatasetRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.delete_dataset..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.delete_dataset.timeout, metadata: , retry_policy: @config.rpcs.delete_dataset.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @dataset_service_stub.delete_dataset request, do |result, operation| result = ::Gapic::Operation.new result, @operations_client, options: yield result, operation if block_given? return result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#delete_dataset_version(request, options = nil) ⇒ ::Gapic::Operation #delete_dataset_version(name: nil) ⇒ ::Gapic::Operation
Deletes a Dataset version.
1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 |
# File 'lib/google/cloud/ai_platform/v1/dataset_service/rest/client.rb', line 1079 def delete_dataset_version request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::DeleteDatasetVersionRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.delete_dataset_version..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.delete_dataset_version.timeout, metadata: , retry_policy: @config.rpcs.delete_dataset_version.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @dataset_service_stub.delete_dataset_version request, do |result, operation| result = ::Gapic::Operation.new result, @operations_client, options: yield result, operation if block_given? return result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#delete_saved_query(request, options = nil) ⇒ ::Gapic::Operation #delete_saved_query(name: nil) ⇒ ::Gapic::Operation
Deletes a SavedQuery.
1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 |
# File 'lib/google/cloud/ai_platform/v1/dataset_service/rest/client.rb', line 1776 def delete_saved_query request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::DeleteSavedQueryRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.delete_saved_query..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.delete_saved_query.timeout, metadata: , retry_policy: @config.rpcs.delete_saved_query.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @dataset_service_stub.delete_saved_query request, do |result, operation| result = ::Gapic::Operation.new result, @operations_client, options: yield result, operation if block_given? return result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#export_data(request, options = nil) ⇒ ::Gapic::Operation #export_data(name: nil, export_config: nil) ⇒ ::Gapic::Operation
Exports data from a Dataset.
812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 |
# File 'lib/google/cloud/ai_platform/v1/dataset_service/rest/client.rb', line 812 def export_data request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::ExportDataRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.export_data..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.export_data.timeout, metadata: , retry_policy: @config.rpcs.export_data.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @dataset_service_stub.export_data request, do |result, operation| result = ::Gapic::Operation.new result, @operations_client, options: yield result, operation if block_given? return result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#get_annotation_spec(request, options = nil) ⇒ ::Google::Cloud::AIPlatform::V1::AnnotationSpec #get_annotation_spec(name: nil, read_mask: nil) ⇒ ::Google::Cloud::AIPlatform::V1::AnnotationSpec
Gets an AnnotationSpec.
1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 |
# File 'lib/google/cloud/ai_platform/v1/dataset_service/rest/client.rb', line 1860 def get_annotation_spec request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::GetAnnotationSpecRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.get_annotation_spec..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.get_annotation_spec.timeout, metadata: , retry_policy: @config.rpcs.get_annotation_spec.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @dataset_service_stub.get_annotation_spec request, do |result, operation| yield result, operation if block_given? return result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#get_dataset(request, options = nil) ⇒ ::Google::Cloud::AIPlatform::V1::Dataset #get_dataset(name: nil, read_mask: nil) ⇒ ::Google::Cloud::AIPlatform::V1::Dataset
Gets a Dataset.
340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 |
# File 'lib/google/cloud/ai_platform/v1/dataset_service/rest/client.rb', line 340 def get_dataset request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::GetDatasetRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.get_dataset..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.get_dataset.timeout, metadata: , retry_policy: @config.rpcs.get_dataset.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @dataset_service_stub.get_dataset request, do |result, operation| yield result, operation if block_given? return result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#get_dataset_version(request, options = nil) ⇒ ::Google::Cloud::AIPlatform::V1::DatasetVersion #get_dataset_version(name: nil, read_mask: nil) ⇒ ::Google::Cloud::AIPlatform::V1::DatasetVersion
Gets a Dataset version.
1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 |
# File 'lib/google/cloud/ai_platform/v1/dataset_service/rest/client.rb', line 1163 def get_dataset_version request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::GetDatasetVersionRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.get_dataset_version..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.get_dataset_version.timeout, metadata: , retry_policy: @config.rpcs.get_dataset_version.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @dataset_service_stub.get_dataset_version request, do |result, operation| yield result, operation if block_given? return result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#import_data(request, options = nil) ⇒ ::Gapic::Operation #import_data(name: nil, import_configs: nil) ⇒ ::Gapic::Operation
Imports data into a Dataset.
721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 |
# File 'lib/google/cloud/ai_platform/v1/dataset_service/rest/client.rb', line 721 def import_data request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::ImportDataRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.import_data..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.import_data.timeout, metadata: , retry_policy: @config.rpcs.import_data.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @dataset_service_stub.import_data request, do |result, operation| result = ::Gapic::Operation.new result, @operations_client, options: yield result, operation if block_given? return result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#list_annotations(request, options = nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::AIPlatform::V1::Annotation> #list_annotations(parent: nil, filter: nil, page_size: nil, page_token: nil, read_mask: nil, order_by: nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::AIPlatform::V1::Annotation>
Lists Annotations belongs to a dataitem
1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 |
# File 'lib/google/cloud/ai_platform/v1/dataset_service/rest/client.rb', line 1956 def list_annotations request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::ListAnnotationsRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.list_annotations..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.list_annotations.timeout, metadata: , retry_policy: @config.rpcs.list_annotations.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @dataset_service_stub.list_annotations request, do |result, operation| result = ::Gapic::Rest::PagedEnumerable.new @dataset_service_stub, :list_annotations, "annotations", request, result, yield result, operation if block_given? return result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#list_data_items(request, options = nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::AIPlatform::V1::DataItem> #list_data_items(parent: nil, filter: nil, page_size: nil, page_token: nil, read_mask: nil, order_by: nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::AIPlatform::V1::DataItem>
Lists DataItems in a Dataset.
1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 |
# File 'lib/google/cloud/ai_platform/v1/dataset_service/rest/client.rb', line 1445 def list_data_items request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::ListDataItemsRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.list_data_items..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.list_data_items.timeout, metadata: , retry_policy: @config.rpcs.list_data_items.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @dataset_service_stub.list_data_items request, do |result, operation| result = ::Gapic::Rest::PagedEnumerable.new @dataset_service_stub, :list_data_items, "data_items", request, result, yield result, operation if block_given? return result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#list_dataset_versions(request, options = nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::AIPlatform::V1::DatasetVersion> #list_dataset_versions(parent: nil, filter: nil, page_size: nil, page_token: nil, read_mask: nil, order_by: nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::AIPlatform::V1::DatasetVersion>
Lists DatasetVersions in a Dataset.
1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 |
# File 'lib/google/cloud/ai_platform/v1/dataset_service/rest/client.rb', line 1259 def list_dataset_versions request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::ListDatasetVersionsRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.list_dataset_versions..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.list_dataset_versions.timeout, metadata: , retry_policy: @config.rpcs.list_dataset_versions.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @dataset_service_stub.list_dataset_versions request, do |result, operation| result = ::Gapic::Rest::PagedEnumerable.new @dataset_service_stub, :list_dataset_versions, "dataset_versions", request, result, yield result, operation if block_given? return result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#list_datasets(request, options = nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::AIPlatform::V1::Dataset> #list_datasets(parent: nil, filter: nil, page_size: nil, page_token: nil, read_mask: nil, order_by: nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::AIPlatform::V1::Dataset>
Lists Datasets in a Location.
540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 |
# File 'lib/google/cloud/ai_platform/v1/dataset_service/rest/client.rb', line 540 def list_datasets request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::ListDatasetsRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.list_datasets..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.list_datasets.timeout, metadata: , retry_policy: @config.rpcs.list_datasets.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @dataset_service_stub.list_datasets request, do |result, operation| result = ::Gapic::Rest::PagedEnumerable.new @dataset_service_stub, :list_datasets, "datasets", request, result, yield result, operation if block_given? return result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#list_saved_queries(request, options = nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::AIPlatform::V1::SavedQuery> #list_saved_queries(parent: nil, filter: nil, page_size: nil, page_token: nil, read_mask: nil, order_by: nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::AIPlatform::V1::SavedQuery>
Lists SavedQueries in a Dataset.
1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 |
# File 'lib/google/cloud/ai_platform/v1/dataset_service/rest/client.rb', line 1687 def list_saved_queries request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::ListSavedQueriesRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.list_saved_queries..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.list_saved_queries.timeout, metadata: , retry_policy: @config.rpcs.list_saved_queries.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @dataset_service_stub.list_saved_queries request, do |result, operation| result = ::Gapic::Rest::PagedEnumerable.new @dataset_service_stub, :list_saved_queries, "saved_queries", request, result, yield result, operation if block_given? return result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#restore_dataset_version(request, options = nil) ⇒ ::Gapic::Operation #restore_dataset_version(name: nil) ⇒ ::Gapic::Operation
Restores a dataset version.
1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 |
# File 'lib/google/cloud/ai_platform/v1/dataset_service/rest/client.rb', line 1348 def restore_dataset_version request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::RestoreDatasetVersionRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.restore_dataset_version..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.restore_dataset_version.timeout, metadata: , retry_policy: @config.rpcs.restore_dataset_version.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @dataset_service_stub.restore_dataset_version request, do |result, operation| result = ::Gapic::Operation.new result, @operations_client, options: yield result, operation if block_given? return result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#search_data_items(request, options = nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::AIPlatform::V1::DataItemView> #search_data_items(order_by_data_item: nil, order_by_annotation: nil, dataset: nil, saved_query: nil, data_labeling_job: nil, data_item_filter: nil, annotations_filter: nil, annotation_filters: nil, field_mask: nil, annotations_limit: nil, page_size: nil, order_by: nil, page_token: nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::AIPlatform::V1::DataItemView>
Searches DataItems in a Dataset.
1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 |
# File 'lib/google/cloud/ai_platform/v1/dataset_service/rest/client.rb', line 1590 def search_data_items request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::SearchDataItemsRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.search_data_items..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.search_data_items.timeout, metadata: , retry_policy: @config.rpcs.search_data_items.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @dataset_service_stub.search_data_items request, do |result, operation| result = ::Gapic::Rest::PagedEnumerable.new @dataset_service_stub, :search_data_items, "data_item_views", request, result, yield result, operation if block_given? return result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#universe_domain ⇒ String
The effective universe domain
108 109 110 |
# File 'lib/google/cloud/ai_platform/v1/dataset_service/rest/client.rb', line 108 def universe_domain @dataset_service_stub.universe_domain end |
#update_dataset(request, options = nil) ⇒ ::Google::Cloud::AIPlatform::V1::Dataset #update_dataset(dataset: nil, update_mask: nil) ⇒ ::Google::Cloud::AIPlatform::V1::Dataset
Updates a Dataset.
427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 |
# File 'lib/google/cloud/ai_platform/v1/dataset_service/rest/client.rb', line 427 def update_dataset request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::UpdateDatasetRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.update_dataset..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.update_dataset.timeout, metadata: , retry_policy: @config.rpcs.update_dataset.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @dataset_service_stub.update_dataset request, do |result, operation| yield result, operation if block_given? return result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#update_dataset_version(request, options = nil) ⇒ ::Google::Cloud::AIPlatform::V1::DatasetVersion #update_dataset_version(dataset_version: nil, update_mask: nil) ⇒ ::Google::Cloud::AIPlatform::V1::DatasetVersion
Updates a DatasetVersion.
991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 |
# File 'lib/google/cloud/ai_platform/v1/dataset_service/rest/client.rb', line 991 def update_dataset_version request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::UpdateDatasetVersionRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.update_dataset_version..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.update_dataset_version.timeout, metadata: , retry_policy: @config.rpcs.update_dataset_version.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @dataset_service_stub.update_dataset_version request, do |result, operation| yield result, operation if block_given? return result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |