google-cloud-ai_platform 2.1.1 → 2.2.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.
- checksums.yaml +4 -4
- data/lib/google/cloud/ai_platform/version.rb +1 -1
- data/lib/google/cloud/ai_platform.rb +70 -0
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 1ea7b07cbcfc3b228609c9128e215ab61cb718b4bc93939572769d78915ce027
|
|
4
|
+
data.tar.gz: 7c645bde1c67fdaf8d06f0f7848862c4695178cf725a8a87aa461aa40f508633
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 690cfdfaee10207774ab6a65e6c15983811ae1194a5512748ede0701ea5b87517878e645ea9f3920ebbd1ef1e79d0322dcbda444adcc8ef890b33da953eda6cb
|
|
7
|
+
data.tar.gz: 441891560c50ed9c07910066cd8f73b6440cc22dde66a5dabcf08f509b25f95b4d771a2ee70aa4a2b164a945022ec46962a58efbc7a7ecdc4968242b691b79af
|
|
@@ -2012,6 +2012,76 @@ module Google
|
|
|
2012
2012
|
false
|
|
2013
2013
|
end
|
|
2014
2014
|
|
|
2015
|
+
##
|
|
2016
|
+
# Create a new client object for SessionService.
|
|
2017
|
+
#
|
|
2018
|
+
# By default, this returns an instance of
|
|
2019
|
+
# [Google::Cloud::AIPlatform::V1::SessionService::Client](https://cloud.google.com/ruby/docs/reference/google-cloud-ai_platform-v1/latest/Google-Cloud-AIPlatform-V1-SessionService-Client)
|
|
2020
|
+
# for a gRPC client for version V1 of the API.
|
|
2021
|
+
# However, you can specify a different API version by passing it in the
|
|
2022
|
+
# `version` parameter. If the SessionService service is
|
|
2023
|
+
# supported by that API version, and the corresponding gem is available, the
|
|
2024
|
+
# appropriate versioned client will be returned.
|
|
2025
|
+
# You can also specify a different transport by passing `:rest` or `:grpc` in
|
|
2026
|
+
# the `transport` parameter.
|
|
2027
|
+
#
|
|
2028
|
+
# Raises an exception if the currently installed versioned client gem for the
|
|
2029
|
+
# given API version does not support the given transport of the SessionService service.
|
|
2030
|
+
# You can determine whether the method will succeed by calling
|
|
2031
|
+
# {Google::Cloud::AIPlatform.session_service_available?}.
|
|
2032
|
+
#
|
|
2033
|
+
# ## About SessionService
|
|
2034
|
+
#
|
|
2035
|
+
# The service that manages Vertex Session related resources.
|
|
2036
|
+
#
|
|
2037
|
+
# @param version [::String, ::Symbol] The API version to connect to. Optional.
|
|
2038
|
+
# Defaults to `:v1`.
|
|
2039
|
+
# @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
|
|
2040
|
+
# @return [::Object] A client object for the specified version.
|
|
2041
|
+
#
|
|
2042
|
+
def self.session_service version: :v1, transport: :grpc, &block
|
|
2043
|
+
require "google/cloud/ai_platform/#{version.to_s.downcase}"
|
|
2044
|
+
|
|
2045
|
+
package_name = Google::Cloud::AIPlatform
|
|
2046
|
+
.constants
|
|
2047
|
+
.select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
|
|
2048
|
+
.first
|
|
2049
|
+
service_module = Google::Cloud::AIPlatform.const_get(package_name).const_get(:SessionService)
|
|
2050
|
+
service_module = service_module.const_get(:Rest) if transport == :rest
|
|
2051
|
+
service_module.const_get(:Client).new(&block)
|
|
2052
|
+
end
|
|
2053
|
+
|
|
2054
|
+
##
|
|
2055
|
+
# Determines whether the SessionService service is supported by the current client.
|
|
2056
|
+
# If true, you can retrieve a client object by calling {Google::Cloud::AIPlatform.session_service}.
|
|
2057
|
+
# If false, that method will raise an exception. This could happen if the given
|
|
2058
|
+
# API version does not exist or does not support the SessionService service,
|
|
2059
|
+
# or if the versioned client gem needs an update to support the SessionService service.
|
|
2060
|
+
#
|
|
2061
|
+
# @param version [::String, ::Symbol] The API version to connect to. Optional.
|
|
2062
|
+
# Defaults to `:v1`.
|
|
2063
|
+
# @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
|
|
2064
|
+
# @return [boolean] Whether the service is available.
|
|
2065
|
+
#
|
|
2066
|
+
def self.session_service_available? version: :v1, transport: :grpc
|
|
2067
|
+
require "google/cloud/ai_platform/#{version.to_s.downcase}"
|
|
2068
|
+
package_name = Google::Cloud::AIPlatform
|
|
2069
|
+
.constants
|
|
2070
|
+
.select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
|
|
2071
|
+
.first
|
|
2072
|
+
return false unless package_name
|
|
2073
|
+
service_module = Google::Cloud::AIPlatform.const_get package_name
|
|
2074
|
+
return false unless service_module.const_defined? :SessionService
|
|
2075
|
+
service_module = service_module.const_get :SessionService
|
|
2076
|
+
if transport == :rest
|
|
2077
|
+
return false unless service_module.const_defined? :Rest
|
|
2078
|
+
service_module = service_module.const_get :Rest
|
|
2079
|
+
end
|
|
2080
|
+
service_module.const_defined? :Client
|
|
2081
|
+
rescue ::LoadError
|
|
2082
|
+
false
|
|
2083
|
+
end
|
|
2084
|
+
|
|
2015
2085
|
##
|
|
2016
2086
|
# Create a new client object for SpecialistPoolService.
|
|
2017
2087
|
#
|