google-cloud-storage-control-v2 1.3.0 → 1.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.
- checksums.yaml +4 -4
- data/lib/google/cloud/storage/control/v2/rest.rb +39 -0
- data/lib/google/cloud/storage/control/v2/storage_control/client.rb +612 -0
- data/lib/google/cloud/storage/control/v2/storage_control/paths.rb +52 -0
- data/lib/google/cloud/storage/control/v2/storage_control/rest/client.rb +913 -0
- data/lib/google/cloud/storage/control/v2/storage_control/rest/service_stub.rb +452 -0
- data/lib/google/cloud/storage/control/v2/storage_control/rest.rb +54 -0
- data/lib/google/cloud/storage/control/v2/storage_control.rb +6 -0
- data/lib/google/cloud/storage/control/v2/version.rb +1 -1
- data/lib/google/cloud/storage/control/v2.rb +5 -0
- data/lib/google/storage/control/v2/storage_control_pb.rb +16 -1
- data/lib/google/storage/control/v2/storage_control_services_pb.rb +12 -0
- data/proto_docs/google/storage/control/v2/storage_control.rb +287 -0
- metadata +6 -2
@@ -143,6 +143,36 @@ module Google
|
|
143
143
|
initial_delay: 1.0, max_delay: 60.0, multiplier: 2, retry_codes: [8, 14, 4, 13, 2]
|
144
144
|
}
|
145
145
|
|
146
|
+
default_config.rpcs.get_project_intelligence_config.timeout = 60.0
|
147
|
+
default_config.rpcs.get_project_intelligence_config.retry_policy = {
|
148
|
+
initial_delay: 1.0, max_delay: 60.0, multiplier: 2, retry_codes: [8, 14, 4, 13, 2]
|
149
|
+
}
|
150
|
+
|
151
|
+
default_config.rpcs.update_project_intelligence_config.timeout = 60.0
|
152
|
+
default_config.rpcs.update_project_intelligence_config.retry_policy = {
|
153
|
+
initial_delay: 1.0, max_delay: 60.0, multiplier: 2, retry_codes: [8, 14, 4, 13, 2]
|
154
|
+
}
|
155
|
+
|
156
|
+
default_config.rpcs.get_folder_intelligence_config.timeout = 60.0
|
157
|
+
default_config.rpcs.get_folder_intelligence_config.retry_policy = {
|
158
|
+
initial_delay: 1.0, max_delay: 60.0, multiplier: 2, retry_codes: [8, 14, 4, 13, 2]
|
159
|
+
}
|
160
|
+
|
161
|
+
default_config.rpcs.update_folder_intelligence_config.timeout = 60.0
|
162
|
+
default_config.rpcs.update_folder_intelligence_config.retry_policy = {
|
163
|
+
initial_delay: 1.0, max_delay: 60.0, multiplier: 2, retry_codes: [8, 14, 4, 13, 2]
|
164
|
+
}
|
165
|
+
|
166
|
+
default_config.rpcs.get_organization_intelligence_config.timeout = 60.0
|
167
|
+
default_config.rpcs.get_organization_intelligence_config.retry_policy = {
|
168
|
+
initial_delay: 1.0, max_delay: 60.0, multiplier: 2, retry_codes: [8, 14, 4, 13, 2]
|
169
|
+
}
|
170
|
+
|
171
|
+
default_config.rpcs.update_organization_intelligence_config.timeout = 60.0
|
172
|
+
default_config.rpcs.update_organization_intelligence_config.retry_policy = {
|
173
|
+
initial_delay: 1.0, max_delay: 60.0, multiplier: 2, retry_codes: [8, 14, 4, 13, 2]
|
174
|
+
}
|
175
|
+
|
146
176
|
default_config
|
147
177
|
end
|
148
178
|
yield @configure if block_given?
|
@@ -1991,6 +2021,546 @@ module Google
|
|
1991
2021
|
raise ::Google::Cloud::Error.from_error(e)
|
1992
2022
|
end
|
1993
2023
|
|
2024
|
+
##
|
2025
|
+
# Returns the Project scoped singleton IntelligenceConfig resource.
|
2026
|
+
#
|
2027
|
+
# @overload get_project_intelligence_config(request, options = nil)
|
2028
|
+
# Pass arguments to `get_project_intelligence_config` via a request object, either of type
|
2029
|
+
# {::Google::Cloud::Storage::Control::V2::GetProjectIntelligenceConfigRequest} or an equivalent Hash.
|
2030
|
+
#
|
2031
|
+
# @param request [::Google::Cloud::Storage::Control::V2::GetProjectIntelligenceConfigRequest, ::Hash]
|
2032
|
+
# A request object representing the call parameters. Required. To specify no
|
2033
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
2034
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
2035
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
2036
|
+
#
|
2037
|
+
# @overload get_project_intelligence_config(name: nil)
|
2038
|
+
# Pass arguments to `get_project_intelligence_config` via keyword arguments. Note that at
|
2039
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
2040
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
2041
|
+
#
|
2042
|
+
# @param name [::String]
|
2043
|
+
# Required. The name of the `IntelligenceConfig` resource associated with
|
2044
|
+
# your project.
|
2045
|
+
#
|
2046
|
+
# Format: `projects/{id}/locations/global/intelligenceConfig`
|
2047
|
+
#
|
2048
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
2049
|
+
# @yieldparam response [::Google::Cloud::Storage::Control::V2::IntelligenceConfig]
|
2050
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
2051
|
+
#
|
2052
|
+
# @return [::Google::Cloud::Storage::Control::V2::IntelligenceConfig]
|
2053
|
+
#
|
2054
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
2055
|
+
#
|
2056
|
+
# @example Basic example
|
2057
|
+
# require "google/cloud/storage/control/v2"
|
2058
|
+
#
|
2059
|
+
# # Create a client object. The client can be reused for multiple calls.
|
2060
|
+
# client = Google::Cloud::Storage::Control::V2::StorageControl::Client.new
|
2061
|
+
#
|
2062
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
2063
|
+
# request = Google::Cloud::Storage::Control::V2::GetProjectIntelligenceConfigRequest.new
|
2064
|
+
#
|
2065
|
+
# # Call the get_project_intelligence_config method.
|
2066
|
+
# result = client.get_project_intelligence_config request
|
2067
|
+
#
|
2068
|
+
# # The returned object is of type Google::Cloud::Storage::Control::V2::IntelligenceConfig.
|
2069
|
+
# p result
|
2070
|
+
#
|
2071
|
+
def get_project_intelligence_config request, options = nil
|
2072
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
2073
|
+
|
2074
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Storage::Control::V2::GetProjectIntelligenceConfigRequest
|
2075
|
+
|
2076
|
+
# Converts hash and nil to an options object
|
2077
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
2078
|
+
|
2079
|
+
# Customize the options with defaults
|
2080
|
+
metadata = @config.rpcs.get_project_intelligence_config.metadata.to_h
|
2081
|
+
|
2082
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
2083
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
2084
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
2085
|
+
gapic_version: ::Google::Cloud::Storage::Control::V2::VERSION
|
2086
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
2087
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2088
|
+
|
2089
|
+
header_params = {}
|
2090
|
+
if request.name
|
2091
|
+
header_params["name"] = request.name
|
2092
|
+
end
|
2093
|
+
|
2094
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
2095
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
2096
|
+
|
2097
|
+
options.apply_defaults timeout: @config.rpcs.get_project_intelligence_config.timeout,
|
2098
|
+
metadata: metadata,
|
2099
|
+
retry_policy: @config.rpcs.get_project_intelligence_config.retry_policy
|
2100
|
+
|
2101
|
+
options.apply_defaults timeout: @config.timeout,
|
2102
|
+
metadata: @config.metadata,
|
2103
|
+
retry_policy: @config.retry_policy
|
2104
|
+
|
2105
|
+
@storage_control_stub.call_rpc :get_project_intelligence_config, request, options: options do |response, operation|
|
2106
|
+
yield response, operation if block_given?
|
2107
|
+
end
|
2108
|
+
rescue ::GRPC::BadStatus => e
|
2109
|
+
raise ::Google::Cloud::Error.from_error(e)
|
2110
|
+
end
|
2111
|
+
|
2112
|
+
##
|
2113
|
+
# Updates the Project scoped singleton IntelligenceConfig resource.
|
2114
|
+
#
|
2115
|
+
# @overload update_project_intelligence_config(request, options = nil)
|
2116
|
+
# Pass arguments to `update_project_intelligence_config` via a request object, either of type
|
2117
|
+
# {::Google::Cloud::Storage::Control::V2::UpdateProjectIntelligenceConfigRequest} or an equivalent Hash.
|
2118
|
+
#
|
2119
|
+
# @param request [::Google::Cloud::Storage::Control::V2::UpdateProjectIntelligenceConfigRequest, ::Hash]
|
2120
|
+
# A request object representing the call parameters. Required. To specify no
|
2121
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
2122
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
2123
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
2124
|
+
#
|
2125
|
+
# @overload update_project_intelligence_config(intelligence_config: nil, update_mask: nil, request_id: nil)
|
2126
|
+
# Pass arguments to `update_project_intelligence_config` via keyword arguments. Note that at
|
2127
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
2128
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
2129
|
+
#
|
2130
|
+
# @param intelligence_config [::Google::Cloud::Storage::Control::V2::IntelligenceConfig, ::Hash]
|
2131
|
+
# Required. The `IntelligenceConfig` resource to be updated.
|
2132
|
+
# @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
|
2133
|
+
# Required. The `update_mask` that specifies the fields within the
|
2134
|
+
# `IntelligenceConfig` resource that should be modified by this update. Only
|
2135
|
+
# the listed fields are updated.
|
2136
|
+
# @param request_id [::String]
|
2137
|
+
# Optional. The ID that uniquely identifies the request, preventing duplicate
|
2138
|
+
# processing.
|
2139
|
+
#
|
2140
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
2141
|
+
# @yieldparam response [::Google::Cloud::Storage::Control::V2::IntelligenceConfig]
|
2142
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
2143
|
+
#
|
2144
|
+
# @return [::Google::Cloud::Storage::Control::V2::IntelligenceConfig]
|
2145
|
+
#
|
2146
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
2147
|
+
#
|
2148
|
+
# @example Basic example
|
2149
|
+
# require "google/cloud/storage/control/v2"
|
2150
|
+
#
|
2151
|
+
# # Create a client object. The client can be reused for multiple calls.
|
2152
|
+
# client = Google::Cloud::Storage::Control::V2::StorageControl::Client.new
|
2153
|
+
#
|
2154
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
2155
|
+
# request = Google::Cloud::Storage::Control::V2::UpdateProjectIntelligenceConfigRequest.new
|
2156
|
+
#
|
2157
|
+
# # Call the update_project_intelligence_config method.
|
2158
|
+
# result = client.update_project_intelligence_config request
|
2159
|
+
#
|
2160
|
+
# # The returned object is of type Google::Cloud::Storage::Control::V2::IntelligenceConfig.
|
2161
|
+
# p result
|
2162
|
+
#
|
2163
|
+
def update_project_intelligence_config request, options = nil
|
2164
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
2165
|
+
|
2166
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Storage::Control::V2::UpdateProjectIntelligenceConfigRequest
|
2167
|
+
|
2168
|
+
# Converts hash and nil to an options object
|
2169
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
2170
|
+
|
2171
|
+
# Customize the options with defaults
|
2172
|
+
metadata = @config.rpcs.update_project_intelligence_config.metadata.to_h
|
2173
|
+
|
2174
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
2175
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
2176
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
2177
|
+
gapic_version: ::Google::Cloud::Storage::Control::V2::VERSION
|
2178
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
2179
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2180
|
+
|
2181
|
+
header_params = {}
|
2182
|
+
if request.intelligence_config&.name
|
2183
|
+
header_params["intelligence_config.name"] = request.intelligence_config.name
|
2184
|
+
end
|
2185
|
+
|
2186
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
2187
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
2188
|
+
|
2189
|
+
options.apply_defaults timeout: @config.rpcs.update_project_intelligence_config.timeout,
|
2190
|
+
metadata: metadata,
|
2191
|
+
retry_policy: @config.rpcs.update_project_intelligence_config.retry_policy
|
2192
|
+
|
2193
|
+
options.apply_defaults timeout: @config.timeout,
|
2194
|
+
metadata: @config.metadata,
|
2195
|
+
retry_policy: @config.retry_policy
|
2196
|
+
|
2197
|
+
@storage_control_stub.call_rpc :update_project_intelligence_config, request, options: options do |response, operation|
|
2198
|
+
yield response, operation if block_given?
|
2199
|
+
end
|
2200
|
+
rescue ::GRPC::BadStatus => e
|
2201
|
+
raise ::Google::Cloud::Error.from_error(e)
|
2202
|
+
end
|
2203
|
+
|
2204
|
+
##
|
2205
|
+
# Returns the Folder scoped singleton IntelligenceConfig resource.
|
2206
|
+
#
|
2207
|
+
# @overload get_folder_intelligence_config(request, options = nil)
|
2208
|
+
# Pass arguments to `get_folder_intelligence_config` via a request object, either of type
|
2209
|
+
# {::Google::Cloud::Storage::Control::V2::GetFolderIntelligenceConfigRequest} or an equivalent Hash.
|
2210
|
+
#
|
2211
|
+
# @param request [::Google::Cloud::Storage::Control::V2::GetFolderIntelligenceConfigRequest, ::Hash]
|
2212
|
+
# A request object representing the call parameters. Required. To specify no
|
2213
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
2214
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
2215
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
2216
|
+
#
|
2217
|
+
# @overload get_folder_intelligence_config(name: nil)
|
2218
|
+
# Pass arguments to `get_folder_intelligence_config` via keyword arguments. Note that at
|
2219
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
2220
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
2221
|
+
#
|
2222
|
+
# @param name [::String]
|
2223
|
+
# Required. The name of the `IntelligenceConfig` resource associated with
|
2224
|
+
# your folder.
|
2225
|
+
#
|
2226
|
+
# Format: `folders/{id}/locations/global/intelligenceConfig`
|
2227
|
+
#
|
2228
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
2229
|
+
# @yieldparam response [::Google::Cloud::Storage::Control::V2::IntelligenceConfig]
|
2230
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
2231
|
+
#
|
2232
|
+
# @return [::Google::Cloud::Storage::Control::V2::IntelligenceConfig]
|
2233
|
+
#
|
2234
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
2235
|
+
#
|
2236
|
+
# @example Basic example
|
2237
|
+
# require "google/cloud/storage/control/v2"
|
2238
|
+
#
|
2239
|
+
# # Create a client object. The client can be reused for multiple calls.
|
2240
|
+
# client = Google::Cloud::Storage::Control::V2::StorageControl::Client.new
|
2241
|
+
#
|
2242
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
2243
|
+
# request = Google::Cloud::Storage::Control::V2::GetFolderIntelligenceConfigRequest.new
|
2244
|
+
#
|
2245
|
+
# # Call the get_folder_intelligence_config method.
|
2246
|
+
# result = client.get_folder_intelligence_config request
|
2247
|
+
#
|
2248
|
+
# # The returned object is of type Google::Cloud::Storage::Control::V2::IntelligenceConfig.
|
2249
|
+
# p result
|
2250
|
+
#
|
2251
|
+
def get_folder_intelligence_config request, options = nil
|
2252
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
2253
|
+
|
2254
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Storage::Control::V2::GetFolderIntelligenceConfigRequest
|
2255
|
+
|
2256
|
+
# Converts hash and nil to an options object
|
2257
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
2258
|
+
|
2259
|
+
# Customize the options with defaults
|
2260
|
+
metadata = @config.rpcs.get_folder_intelligence_config.metadata.to_h
|
2261
|
+
|
2262
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
2263
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
2264
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
2265
|
+
gapic_version: ::Google::Cloud::Storage::Control::V2::VERSION
|
2266
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
2267
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2268
|
+
|
2269
|
+
header_params = {}
|
2270
|
+
if request.name
|
2271
|
+
header_params["name"] = request.name
|
2272
|
+
end
|
2273
|
+
|
2274
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
2275
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
2276
|
+
|
2277
|
+
options.apply_defaults timeout: @config.rpcs.get_folder_intelligence_config.timeout,
|
2278
|
+
metadata: metadata,
|
2279
|
+
retry_policy: @config.rpcs.get_folder_intelligence_config.retry_policy
|
2280
|
+
|
2281
|
+
options.apply_defaults timeout: @config.timeout,
|
2282
|
+
metadata: @config.metadata,
|
2283
|
+
retry_policy: @config.retry_policy
|
2284
|
+
|
2285
|
+
@storage_control_stub.call_rpc :get_folder_intelligence_config, request, options: options do |response, operation|
|
2286
|
+
yield response, operation if block_given?
|
2287
|
+
end
|
2288
|
+
rescue ::GRPC::BadStatus => e
|
2289
|
+
raise ::Google::Cloud::Error.from_error(e)
|
2290
|
+
end
|
2291
|
+
|
2292
|
+
##
|
2293
|
+
# Updates the Folder scoped singleton IntelligenceConfig resource.
|
2294
|
+
#
|
2295
|
+
# @overload update_folder_intelligence_config(request, options = nil)
|
2296
|
+
# Pass arguments to `update_folder_intelligence_config` via a request object, either of type
|
2297
|
+
# {::Google::Cloud::Storage::Control::V2::UpdateFolderIntelligenceConfigRequest} or an equivalent Hash.
|
2298
|
+
#
|
2299
|
+
# @param request [::Google::Cloud::Storage::Control::V2::UpdateFolderIntelligenceConfigRequest, ::Hash]
|
2300
|
+
# A request object representing the call parameters. Required. To specify no
|
2301
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
2302
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
2303
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
2304
|
+
#
|
2305
|
+
# @overload update_folder_intelligence_config(intelligence_config: nil, update_mask: nil, request_id: nil)
|
2306
|
+
# Pass arguments to `update_folder_intelligence_config` via keyword arguments. Note that at
|
2307
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
2308
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
2309
|
+
#
|
2310
|
+
# @param intelligence_config [::Google::Cloud::Storage::Control::V2::IntelligenceConfig, ::Hash]
|
2311
|
+
# Required. The `IntelligenceConfig` resource to be updated.
|
2312
|
+
# @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
|
2313
|
+
# Required. The `update_mask` that specifies the fields within the
|
2314
|
+
# `IntelligenceConfig` resource that should be modified by this update. Only
|
2315
|
+
# the listed fields are updated.
|
2316
|
+
# @param request_id [::String]
|
2317
|
+
# Optional. The ID that uniquely identifies the request, preventing duplicate
|
2318
|
+
# processing.
|
2319
|
+
#
|
2320
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
2321
|
+
# @yieldparam response [::Google::Cloud::Storage::Control::V2::IntelligenceConfig]
|
2322
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
2323
|
+
#
|
2324
|
+
# @return [::Google::Cloud::Storage::Control::V2::IntelligenceConfig]
|
2325
|
+
#
|
2326
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
2327
|
+
#
|
2328
|
+
# @example Basic example
|
2329
|
+
# require "google/cloud/storage/control/v2"
|
2330
|
+
#
|
2331
|
+
# # Create a client object. The client can be reused for multiple calls.
|
2332
|
+
# client = Google::Cloud::Storage::Control::V2::StorageControl::Client.new
|
2333
|
+
#
|
2334
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
2335
|
+
# request = Google::Cloud::Storage::Control::V2::UpdateFolderIntelligenceConfigRequest.new
|
2336
|
+
#
|
2337
|
+
# # Call the update_folder_intelligence_config method.
|
2338
|
+
# result = client.update_folder_intelligence_config request
|
2339
|
+
#
|
2340
|
+
# # The returned object is of type Google::Cloud::Storage::Control::V2::IntelligenceConfig.
|
2341
|
+
# p result
|
2342
|
+
#
|
2343
|
+
def update_folder_intelligence_config request, options = nil
|
2344
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
2345
|
+
|
2346
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Storage::Control::V2::UpdateFolderIntelligenceConfigRequest
|
2347
|
+
|
2348
|
+
# Converts hash and nil to an options object
|
2349
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
2350
|
+
|
2351
|
+
# Customize the options with defaults
|
2352
|
+
metadata = @config.rpcs.update_folder_intelligence_config.metadata.to_h
|
2353
|
+
|
2354
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
2355
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
2356
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
2357
|
+
gapic_version: ::Google::Cloud::Storage::Control::V2::VERSION
|
2358
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
2359
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2360
|
+
|
2361
|
+
header_params = {}
|
2362
|
+
if request.intelligence_config&.name
|
2363
|
+
header_params["intelligence_config.name"] = request.intelligence_config.name
|
2364
|
+
end
|
2365
|
+
|
2366
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
2367
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
2368
|
+
|
2369
|
+
options.apply_defaults timeout: @config.rpcs.update_folder_intelligence_config.timeout,
|
2370
|
+
metadata: metadata,
|
2371
|
+
retry_policy: @config.rpcs.update_folder_intelligence_config.retry_policy
|
2372
|
+
|
2373
|
+
options.apply_defaults timeout: @config.timeout,
|
2374
|
+
metadata: @config.metadata,
|
2375
|
+
retry_policy: @config.retry_policy
|
2376
|
+
|
2377
|
+
@storage_control_stub.call_rpc :update_folder_intelligence_config, request, options: options do |response, operation|
|
2378
|
+
yield response, operation if block_given?
|
2379
|
+
end
|
2380
|
+
rescue ::GRPC::BadStatus => e
|
2381
|
+
raise ::Google::Cloud::Error.from_error(e)
|
2382
|
+
end
|
2383
|
+
|
2384
|
+
##
|
2385
|
+
# Returns the Organization scoped singleton IntelligenceConfig resource.
|
2386
|
+
#
|
2387
|
+
# @overload get_organization_intelligence_config(request, options = nil)
|
2388
|
+
# Pass arguments to `get_organization_intelligence_config` via a request object, either of type
|
2389
|
+
# {::Google::Cloud::Storage::Control::V2::GetOrganizationIntelligenceConfigRequest} or an equivalent Hash.
|
2390
|
+
#
|
2391
|
+
# @param request [::Google::Cloud::Storage::Control::V2::GetOrganizationIntelligenceConfigRequest, ::Hash]
|
2392
|
+
# A request object representing the call parameters. Required. To specify no
|
2393
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
2394
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
2395
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
2396
|
+
#
|
2397
|
+
# @overload get_organization_intelligence_config(name: nil)
|
2398
|
+
# Pass arguments to `get_organization_intelligence_config` via keyword arguments. Note that at
|
2399
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
2400
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
2401
|
+
#
|
2402
|
+
# @param name [::String]
|
2403
|
+
# Required. The name of the `IntelligenceConfig` resource associated with
|
2404
|
+
# your organization.
|
2405
|
+
#
|
2406
|
+
# Format: `organizations/{org_id}/locations/global/intelligenceConfig`
|
2407
|
+
#
|
2408
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
2409
|
+
# @yieldparam response [::Google::Cloud::Storage::Control::V2::IntelligenceConfig]
|
2410
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
2411
|
+
#
|
2412
|
+
# @return [::Google::Cloud::Storage::Control::V2::IntelligenceConfig]
|
2413
|
+
#
|
2414
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
2415
|
+
#
|
2416
|
+
# @example Basic example
|
2417
|
+
# require "google/cloud/storage/control/v2"
|
2418
|
+
#
|
2419
|
+
# # Create a client object. The client can be reused for multiple calls.
|
2420
|
+
# client = Google::Cloud::Storage::Control::V2::StorageControl::Client.new
|
2421
|
+
#
|
2422
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
2423
|
+
# request = Google::Cloud::Storage::Control::V2::GetOrganizationIntelligenceConfigRequest.new
|
2424
|
+
#
|
2425
|
+
# # Call the get_organization_intelligence_config method.
|
2426
|
+
# result = client.get_organization_intelligence_config request
|
2427
|
+
#
|
2428
|
+
# # The returned object is of type Google::Cloud::Storage::Control::V2::IntelligenceConfig.
|
2429
|
+
# p result
|
2430
|
+
#
|
2431
|
+
def get_organization_intelligence_config request, options = nil
|
2432
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
2433
|
+
|
2434
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Storage::Control::V2::GetOrganizationIntelligenceConfigRequest
|
2435
|
+
|
2436
|
+
# Converts hash and nil to an options object
|
2437
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
2438
|
+
|
2439
|
+
# Customize the options with defaults
|
2440
|
+
metadata = @config.rpcs.get_organization_intelligence_config.metadata.to_h
|
2441
|
+
|
2442
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
2443
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
2444
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
2445
|
+
gapic_version: ::Google::Cloud::Storage::Control::V2::VERSION
|
2446
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
2447
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2448
|
+
|
2449
|
+
header_params = {}
|
2450
|
+
if request.name
|
2451
|
+
header_params["name"] = request.name
|
2452
|
+
end
|
2453
|
+
|
2454
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
2455
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
2456
|
+
|
2457
|
+
options.apply_defaults timeout: @config.rpcs.get_organization_intelligence_config.timeout,
|
2458
|
+
metadata: metadata,
|
2459
|
+
retry_policy: @config.rpcs.get_organization_intelligence_config.retry_policy
|
2460
|
+
|
2461
|
+
options.apply_defaults timeout: @config.timeout,
|
2462
|
+
metadata: @config.metadata,
|
2463
|
+
retry_policy: @config.retry_policy
|
2464
|
+
|
2465
|
+
@storage_control_stub.call_rpc :get_organization_intelligence_config, request, options: options do |response, operation|
|
2466
|
+
yield response, operation if block_given?
|
2467
|
+
end
|
2468
|
+
rescue ::GRPC::BadStatus => e
|
2469
|
+
raise ::Google::Cloud::Error.from_error(e)
|
2470
|
+
end
|
2471
|
+
|
2472
|
+
##
|
2473
|
+
# Updates the Organization scoped singleton IntelligenceConfig resource.
|
2474
|
+
#
|
2475
|
+
# @overload update_organization_intelligence_config(request, options = nil)
|
2476
|
+
# Pass arguments to `update_organization_intelligence_config` via a request object, either of type
|
2477
|
+
# {::Google::Cloud::Storage::Control::V2::UpdateOrganizationIntelligenceConfigRequest} or an equivalent Hash.
|
2478
|
+
#
|
2479
|
+
# @param request [::Google::Cloud::Storage::Control::V2::UpdateOrganizationIntelligenceConfigRequest, ::Hash]
|
2480
|
+
# A request object representing the call parameters. Required. To specify no
|
2481
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
2482
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
2483
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
2484
|
+
#
|
2485
|
+
# @overload update_organization_intelligence_config(intelligence_config: nil, update_mask: nil, request_id: nil)
|
2486
|
+
# Pass arguments to `update_organization_intelligence_config` via keyword arguments. Note that at
|
2487
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
2488
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
2489
|
+
#
|
2490
|
+
# @param intelligence_config [::Google::Cloud::Storage::Control::V2::IntelligenceConfig, ::Hash]
|
2491
|
+
# Required. The `IntelligenceConfig` resource to be updated.
|
2492
|
+
# @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
|
2493
|
+
# Required. The `update_mask` that specifies the fields within the
|
2494
|
+
# `IntelligenceConfig` resource that should be modified by this update. Only
|
2495
|
+
# the listed fields are updated.
|
2496
|
+
# @param request_id [::String]
|
2497
|
+
# Optional. The ID that uniquely identifies the request, preventing duplicate
|
2498
|
+
# processing.
|
2499
|
+
#
|
2500
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
2501
|
+
# @yieldparam response [::Google::Cloud::Storage::Control::V2::IntelligenceConfig]
|
2502
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
2503
|
+
#
|
2504
|
+
# @return [::Google::Cloud::Storage::Control::V2::IntelligenceConfig]
|
2505
|
+
#
|
2506
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
2507
|
+
#
|
2508
|
+
# @example Basic example
|
2509
|
+
# require "google/cloud/storage/control/v2"
|
2510
|
+
#
|
2511
|
+
# # Create a client object. The client can be reused for multiple calls.
|
2512
|
+
# client = Google::Cloud::Storage::Control::V2::StorageControl::Client.new
|
2513
|
+
#
|
2514
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
2515
|
+
# request = Google::Cloud::Storage::Control::V2::UpdateOrganizationIntelligenceConfigRequest.new
|
2516
|
+
#
|
2517
|
+
# # Call the update_organization_intelligence_config method.
|
2518
|
+
# result = client.update_organization_intelligence_config request
|
2519
|
+
#
|
2520
|
+
# # The returned object is of type Google::Cloud::Storage::Control::V2::IntelligenceConfig.
|
2521
|
+
# p result
|
2522
|
+
#
|
2523
|
+
def update_organization_intelligence_config request, options = nil
|
2524
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
2525
|
+
|
2526
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Storage::Control::V2::UpdateOrganizationIntelligenceConfigRequest
|
2527
|
+
|
2528
|
+
# Converts hash and nil to an options object
|
2529
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
2530
|
+
|
2531
|
+
# Customize the options with defaults
|
2532
|
+
metadata = @config.rpcs.update_organization_intelligence_config.metadata.to_h
|
2533
|
+
|
2534
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
2535
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
2536
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
2537
|
+
gapic_version: ::Google::Cloud::Storage::Control::V2::VERSION
|
2538
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
2539
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2540
|
+
|
2541
|
+
header_params = {}
|
2542
|
+
if request.intelligence_config&.name
|
2543
|
+
header_params["intelligence_config.name"] = request.intelligence_config.name
|
2544
|
+
end
|
2545
|
+
|
2546
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
2547
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
2548
|
+
|
2549
|
+
options.apply_defaults timeout: @config.rpcs.update_organization_intelligence_config.timeout,
|
2550
|
+
metadata: metadata,
|
2551
|
+
retry_policy: @config.rpcs.update_organization_intelligence_config.retry_policy
|
2552
|
+
|
2553
|
+
options.apply_defaults timeout: @config.timeout,
|
2554
|
+
metadata: @config.metadata,
|
2555
|
+
retry_policy: @config.retry_policy
|
2556
|
+
|
2557
|
+
@storage_control_stub.call_rpc :update_organization_intelligence_config, request, options: options do |response, operation|
|
2558
|
+
yield response, operation if block_given?
|
2559
|
+
end
|
2560
|
+
rescue ::GRPC::BadStatus => e
|
2561
|
+
raise ::Google::Cloud::Error.from_error(e)
|
2562
|
+
end
|
2563
|
+
|
1994
2564
|
##
|
1995
2565
|
# Configuration class for the StorageControl API.
|
1996
2566
|
#
|
@@ -2242,6 +2812,36 @@ module Google
|
|
2242
2812
|
# @return [::Gapic::Config::Method]
|
2243
2813
|
#
|
2244
2814
|
attr_reader :list_anywhere_caches
|
2815
|
+
##
|
2816
|
+
# RPC-specific configuration for `get_project_intelligence_config`
|
2817
|
+
# @return [::Gapic::Config::Method]
|
2818
|
+
#
|
2819
|
+
attr_reader :get_project_intelligence_config
|
2820
|
+
##
|
2821
|
+
# RPC-specific configuration for `update_project_intelligence_config`
|
2822
|
+
# @return [::Gapic::Config::Method]
|
2823
|
+
#
|
2824
|
+
attr_reader :update_project_intelligence_config
|
2825
|
+
##
|
2826
|
+
# RPC-specific configuration for `get_folder_intelligence_config`
|
2827
|
+
# @return [::Gapic::Config::Method]
|
2828
|
+
#
|
2829
|
+
attr_reader :get_folder_intelligence_config
|
2830
|
+
##
|
2831
|
+
# RPC-specific configuration for `update_folder_intelligence_config`
|
2832
|
+
# @return [::Gapic::Config::Method]
|
2833
|
+
#
|
2834
|
+
attr_reader :update_folder_intelligence_config
|
2835
|
+
##
|
2836
|
+
# RPC-specific configuration for `get_organization_intelligence_config`
|
2837
|
+
# @return [::Gapic::Config::Method]
|
2838
|
+
#
|
2839
|
+
attr_reader :get_organization_intelligence_config
|
2840
|
+
##
|
2841
|
+
# RPC-specific configuration for `update_organization_intelligence_config`
|
2842
|
+
# @return [::Gapic::Config::Method]
|
2843
|
+
#
|
2844
|
+
attr_reader :update_organization_intelligence_config
|
2245
2845
|
|
2246
2846
|
# @private
|
2247
2847
|
def initialize parent_rpcs = nil
|
@@ -2279,6 +2879,18 @@ module Google
|
|
2279
2879
|
@get_anywhere_cache = ::Gapic::Config::Method.new get_anywhere_cache_config
|
2280
2880
|
list_anywhere_caches_config = parent_rpcs.list_anywhere_caches if parent_rpcs.respond_to? :list_anywhere_caches
|
2281
2881
|
@list_anywhere_caches = ::Gapic::Config::Method.new list_anywhere_caches_config
|
2882
|
+
get_project_intelligence_config_config = parent_rpcs.get_project_intelligence_config if parent_rpcs.respond_to? :get_project_intelligence_config
|
2883
|
+
@get_project_intelligence_config = ::Gapic::Config::Method.new get_project_intelligence_config_config
|
2884
|
+
update_project_intelligence_config_config = parent_rpcs.update_project_intelligence_config if parent_rpcs.respond_to? :update_project_intelligence_config
|
2885
|
+
@update_project_intelligence_config = ::Gapic::Config::Method.new update_project_intelligence_config_config
|
2886
|
+
get_folder_intelligence_config_config = parent_rpcs.get_folder_intelligence_config if parent_rpcs.respond_to? :get_folder_intelligence_config
|
2887
|
+
@get_folder_intelligence_config = ::Gapic::Config::Method.new get_folder_intelligence_config_config
|
2888
|
+
update_folder_intelligence_config_config = parent_rpcs.update_folder_intelligence_config if parent_rpcs.respond_to? :update_folder_intelligence_config
|
2889
|
+
@update_folder_intelligence_config = ::Gapic::Config::Method.new update_folder_intelligence_config_config
|
2890
|
+
get_organization_intelligence_config_config = parent_rpcs.get_organization_intelligence_config if parent_rpcs.respond_to? :get_organization_intelligence_config
|
2891
|
+
@get_organization_intelligence_config = ::Gapic::Config::Method.new get_organization_intelligence_config_config
|
2892
|
+
update_organization_intelligence_config_config = parent_rpcs.update_organization_intelligence_config if parent_rpcs.respond_to? :update_organization_intelligence_config
|
2893
|
+
@update_organization_intelligence_config = ::Gapic::Config::Method.new update_organization_intelligence_config_config
|
2282
2894
|
|
2283
2895
|
yield self if block_given?
|
2284
2896
|
end
|