google-cloud-cloud_controls_partner-v1beta 0.3.0 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/google/cloud/cloud_controls_partner/v1beta/cloud_controls_partner_core/client.rb +295 -0
- data/lib/google/cloud/cloud_controls_partner/v1beta/cloud_controls_partner_core/rest/client.rb +274 -0
- data/lib/google/cloud/cloud_controls_partner/v1beta/cloud_controls_partner_core/rest/service_stub.rb +185 -0
- data/lib/google/cloud/cloud_controls_partner/v1beta/cloud_controls_partner_monitoring/client.rb +7 -0
- data/lib/google/cloud/cloud_controls_partner/v1beta/cloud_controls_partner_monitoring/rest/client.rb +7 -0
- data/lib/google/cloud/cloud_controls_partner/v1beta/version.rb +1 -1
- data/lib/google/cloud/cloudcontrolspartner/v1beta/core_pb.rb +2 -1
- data/lib/google/cloud/cloudcontrolspartner/v1beta/core_services_pb.rb +6 -0
- data/lib/google/cloud/cloudcontrolspartner/v1beta/customers_pb.rb +6 -1
- data/lib/google/cloud/cloudcontrolspartner/v1beta/partners_pb.rb +1 -1
- data/proto_docs/google/cloud/cloudcontrolspartner/v1beta/core.rb +1 -1
- data/proto_docs/google/cloud/cloudcontrolspartner/v1beta/customers.rb +46 -0
- data/proto_docs/google/cloud/cloudcontrolspartner/v1beta/partners.rb +1 -1
- data/proto_docs/google/protobuf/empty.rb +34 -0
- data/proto_docs/google/protobuf/field_mask.rb +229 -0
- metadata +8 -9
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d81a5677d3306660124bf1c10835833a227072ef90f01e2e3aa8af63844e5abe
|
4
|
+
data.tar.gz: d65fee438acbf5d756b6c7be91e92477673c54cb15149b645d87c1cc0bf92950
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 26ecfe3d416a5bc324f082bca933d3d4164be1e28070cc7ca07249f73854e76e375cbe5b397a8eee054dec93dce20098f93d7bf8377cbd8e5a2d8652740c5aa4
|
7
|
+
data.tar.gz: fe8fe3f5cfef46d66091fd50d5bc295fba4080ad07ec8e4c558459cc364c48c987c0262130ada0602e3eb7d68f8569291e1580718dd7e61efdaea767fd8d0cad
|
data/README.md
CHANGED
@@ -86,7 +86,7 @@ To browse ready to use code samples check [Google Cloud Samples](https://cloud.g
|
|
86
86
|
|
87
87
|
## Supported Ruby Versions
|
88
88
|
|
89
|
-
This library is supported on Ruby
|
89
|
+
This library is supported on Ruby 3.0+.
|
90
90
|
|
91
91
|
Google provides official support for Ruby versions that are actively supported
|
92
92
|
by Ruby Core—that is, Ruby versions that are either in normal maintenance or
|
@@ -961,6 +961,273 @@ module Google
|
|
961
961
|
raise ::Google::Cloud::Error.from_error(e)
|
962
962
|
end
|
963
963
|
|
964
|
+
##
|
965
|
+
# Creates a new customer.
|
966
|
+
#
|
967
|
+
# @overload create_customer(request, options = nil)
|
968
|
+
# Pass arguments to `create_customer` via a request object, either of type
|
969
|
+
# {::Google::Cloud::CloudControlsPartner::V1beta::CreateCustomerRequest} or an equivalent Hash.
|
970
|
+
#
|
971
|
+
# @param request [::Google::Cloud::CloudControlsPartner::V1beta::CreateCustomerRequest, ::Hash]
|
972
|
+
# A request object representing the call parameters. Required. To specify no
|
973
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
974
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
975
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
976
|
+
#
|
977
|
+
# @overload create_customer(parent: nil, customer: nil, customer_id: nil)
|
978
|
+
# Pass arguments to `create_customer` via keyword arguments. Note that at
|
979
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
980
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
981
|
+
#
|
982
|
+
# @param parent [::String]
|
983
|
+
# Required. Parent resource
|
984
|
+
# Format: `organizations/{organization}/locations/{location}`
|
985
|
+
# @param customer [::Google::Cloud::CloudControlsPartner::V1beta::Customer, ::Hash]
|
986
|
+
# Required. The customer to create.
|
987
|
+
# @param customer_id [::String]
|
988
|
+
# Required. The customer id to use for the customer, which will become the
|
989
|
+
# final component of the customer's resource name. The specified value must
|
990
|
+
# be a valid Google cloud organization id.
|
991
|
+
#
|
992
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
993
|
+
# @yieldparam response [::Google::Cloud::CloudControlsPartner::V1beta::Customer]
|
994
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
995
|
+
#
|
996
|
+
# @return [::Google::Cloud::CloudControlsPartner::V1beta::Customer]
|
997
|
+
#
|
998
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
999
|
+
#
|
1000
|
+
# @example Basic example
|
1001
|
+
# require "google/cloud/cloud_controls_partner/v1beta"
|
1002
|
+
#
|
1003
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1004
|
+
# client = Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Client.new
|
1005
|
+
#
|
1006
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1007
|
+
# request = Google::Cloud::CloudControlsPartner::V1beta::CreateCustomerRequest.new
|
1008
|
+
#
|
1009
|
+
# # Call the create_customer method.
|
1010
|
+
# result = client.create_customer request
|
1011
|
+
#
|
1012
|
+
# # The returned object is of type Google::Cloud::CloudControlsPartner::V1beta::Customer.
|
1013
|
+
# p result
|
1014
|
+
#
|
1015
|
+
def create_customer request, options = nil
|
1016
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1017
|
+
|
1018
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudControlsPartner::V1beta::CreateCustomerRequest
|
1019
|
+
|
1020
|
+
# Converts hash and nil to an options object
|
1021
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1022
|
+
|
1023
|
+
# Customize the options with defaults
|
1024
|
+
metadata = @config.rpcs.create_customer.metadata.to_h
|
1025
|
+
|
1026
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
1027
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1028
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1029
|
+
gapic_version: ::Google::Cloud::CloudControlsPartner::V1beta::VERSION
|
1030
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
1031
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1032
|
+
|
1033
|
+
header_params = {}
|
1034
|
+
if request.parent
|
1035
|
+
header_params["parent"] = request.parent
|
1036
|
+
end
|
1037
|
+
|
1038
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1039
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
1040
|
+
|
1041
|
+
options.apply_defaults timeout: @config.rpcs.create_customer.timeout,
|
1042
|
+
metadata: metadata,
|
1043
|
+
retry_policy: @config.rpcs.create_customer.retry_policy
|
1044
|
+
|
1045
|
+
options.apply_defaults timeout: @config.timeout,
|
1046
|
+
metadata: @config.metadata,
|
1047
|
+
retry_policy: @config.retry_policy
|
1048
|
+
|
1049
|
+
@cloud_controls_partner_core_stub.call_rpc :create_customer, request, options: options do |response, operation|
|
1050
|
+
yield response, operation if block_given?
|
1051
|
+
end
|
1052
|
+
rescue ::GRPC::BadStatus => e
|
1053
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1054
|
+
end
|
1055
|
+
|
1056
|
+
##
|
1057
|
+
# Update details of a single customer
|
1058
|
+
#
|
1059
|
+
# @overload update_customer(request, options = nil)
|
1060
|
+
# Pass arguments to `update_customer` via a request object, either of type
|
1061
|
+
# {::Google::Cloud::CloudControlsPartner::V1beta::UpdateCustomerRequest} or an equivalent Hash.
|
1062
|
+
#
|
1063
|
+
# @param request [::Google::Cloud::CloudControlsPartner::V1beta::UpdateCustomerRequest, ::Hash]
|
1064
|
+
# A request object representing the call parameters. Required. To specify no
|
1065
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1066
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1067
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
1068
|
+
#
|
1069
|
+
# @overload update_customer(customer: nil, update_mask: nil)
|
1070
|
+
# Pass arguments to `update_customer` via keyword arguments. Note that at
|
1071
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1072
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1073
|
+
#
|
1074
|
+
# @param customer [::Google::Cloud::CloudControlsPartner::V1beta::Customer, ::Hash]
|
1075
|
+
# Required. The customer to update
|
1076
|
+
# Format:
|
1077
|
+
# `organizations/{organization}/locations/{location}/customers/{customer}`
|
1078
|
+
# @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
|
1079
|
+
# Optional. The list of fields to update
|
1080
|
+
#
|
1081
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
1082
|
+
# @yieldparam response [::Google::Cloud::CloudControlsPartner::V1beta::Customer]
|
1083
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
1084
|
+
#
|
1085
|
+
# @return [::Google::Cloud::CloudControlsPartner::V1beta::Customer]
|
1086
|
+
#
|
1087
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1088
|
+
#
|
1089
|
+
# @example Basic example
|
1090
|
+
# require "google/cloud/cloud_controls_partner/v1beta"
|
1091
|
+
#
|
1092
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1093
|
+
# client = Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Client.new
|
1094
|
+
#
|
1095
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1096
|
+
# request = Google::Cloud::CloudControlsPartner::V1beta::UpdateCustomerRequest.new
|
1097
|
+
#
|
1098
|
+
# # Call the update_customer method.
|
1099
|
+
# result = client.update_customer request
|
1100
|
+
#
|
1101
|
+
# # The returned object is of type Google::Cloud::CloudControlsPartner::V1beta::Customer.
|
1102
|
+
# p result
|
1103
|
+
#
|
1104
|
+
def update_customer request, options = nil
|
1105
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1106
|
+
|
1107
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudControlsPartner::V1beta::UpdateCustomerRequest
|
1108
|
+
|
1109
|
+
# Converts hash and nil to an options object
|
1110
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1111
|
+
|
1112
|
+
# Customize the options with defaults
|
1113
|
+
metadata = @config.rpcs.update_customer.metadata.to_h
|
1114
|
+
|
1115
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
1116
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1117
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1118
|
+
gapic_version: ::Google::Cloud::CloudControlsPartner::V1beta::VERSION
|
1119
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
1120
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1121
|
+
|
1122
|
+
header_params = {}
|
1123
|
+
if request.customer&.name
|
1124
|
+
header_params["customer.name"] = request.customer.name
|
1125
|
+
end
|
1126
|
+
|
1127
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1128
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
1129
|
+
|
1130
|
+
options.apply_defaults timeout: @config.rpcs.update_customer.timeout,
|
1131
|
+
metadata: metadata,
|
1132
|
+
retry_policy: @config.rpcs.update_customer.retry_policy
|
1133
|
+
|
1134
|
+
options.apply_defaults timeout: @config.timeout,
|
1135
|
+
metadata: @config.metadata,
|
1136
|
+
retry_policy: @config.retry_policy
|
1137
|
+
|
1138
|
+
@cloud_controls_partner_core_stub.call_rpc :update_customer, request, options: options do |response, operation|
|
1139
|
+
yield response, operation if block_given?
|
1140
|
+
end
|
1141
|
+
rescue ::GRPC::BadStatus => e
|
1142
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1143
|
+
end
|
1144
|
+
|
1145
|
+
##
|
1146
|
+
# Delete details of a single customer
|
1147
|
+
#
|
1148
|
+
# @overload delete_customer(request, options = nil)
|
1149
|
+
# Pass arguments to `delete_customer` via a request object, either of type
|
1150
|
+
# {::Google::Cloud::CloudControlsPartner::V1beta::DeleteCustomerRequest} or an equivalent Hash.
|
1151
|
+
#
|
1152
|
+
# @param request [::Google::Cloud::CloudControlsPartner::V1beta::DeleteCustomerRequest, ::Hash]
|
1153
|
+
# A request object representing the call parameters. Required. To specify no
|
1154
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1155
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1156
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
1157
|
+
#
|
1158
|
+
# @overload delete_customer(name: nil)
|
1159
|
+
# Pass arguments to `delete_customer` via keyword arguments. Note that at
|
1160
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1161
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1162
|
+
#
|
1163
|
+
# @param name [::String]
|
1164
|
+
# Required. name of the resource to be deleted
|
1165
|
+
# format: name=organizations/*/locations/*/customers/*
|
1166
|
+
#
|
1167
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
1168
|
+
# @yieldparam response [::Google::Protobuf::Empty]
|
1169
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
1170
|
+
#
|
1171
|
+
# @return [::Google::Protobuf::Empty]
|
1172
|
+
#
|
1173
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1174
|
+
#
|
1175
|
+
# @example Basic example
|
1176
|
+
# require "google/cloud/cloud_controls_partner/v1beta"
|
1177
|
+
#
|
1178
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1179
|
+
# client = Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Client.new
|
1180
|
+
#
|
1181
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1182
|
+
# request = Google::Cloud::CloudControlsPartner::V1beta::DeleteCustomerRequest.new
|
1183
|
+
#
|
1184
|
+
# # Call the delete_customer method.
|
1185
|
+
# result = client.delete_customer request
|
1186
|
+
#
|
1187
|
+
# # The returned object is of type Google::Protobuf::Empty.
|
1188
|
+
# p result
|
1189
|
+
#
|
1190
|
+
def delete_customer request, options = nil
|
1191
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1192
|
+
|
1193
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudControlsPartner::V1beta::DeleteCustomerRequest
|
1194
|
+
|
1195
|
+
# Converts hash and nil to an options object
|
1196
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1197
|
+
|
1198
|
+
# Customize the options with defaults
|
1199
|
+
metadata = @config.rpcs.delete_customer.metadata.to_h
|
1200
|
+
|
1201
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
1202
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1203
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1204
|
+
gapic_version: ::Google::Cloud::CloudControlsPartner::V1beta::VERSION
|
1205
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
1206
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1207
|
+
|
1208
|
+
header_params = {}
|
1209
|
+
if request.name
|
1210
|
+
header_params["name"] = request.name
|
1211
|
+
end
|
1212
|
+
|
1213
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1214
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
1215
|
+
|
1216
|
+
options.apply_defaults timeout: @config.rpcs.delete_customer.timeout,
|
1217
|
+
metadata: metadata,
|
1218
|
+
retry_policy: @config.rpcs.delete_customer.retry_policy
|
1219
|
+
|
1220
|
+
options.apply_defaults timeout: @config.timeout,
|
1221
|
+
metadata: @config.metadata,
|
1222
|
+
retry_policy: @config.retry_policy
|
1223
|
+
|
1224
|
+
@cloud_controls_partner_core_stub.call_rpc :delete_customer, request, options: options do |response, operation|
|
1225
|
+
yield response, operation if block_given?
|
1226
|
+
end
|
1227
|
+
rescue ::GRPC::BadStatus => e
|
1228
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1229
|
+
end
|
1230
|
+
|
964
1231
|
##
|
965
1232
|
# Configuration class for the CloudControlsPartnerCore API.
|
966
1233
|
#
|
@@ -1005,6 +1272,13 @@ module Google
|
|
1005
1272
|
# * (`GRPC::Core::Channel`) a gRPC channel with included credentials
|
1006
1273
|
# * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
|
1007
1274
|
# * (`nil`) indicating no credentials
|
1275
|
+
#
|
1276
|
+
# Warning: If you accept a credential configuration (JSON file or Hash) from an
|
1277
|
+
# external source for authentication to Google Cloud, you must validate it before
|
1278
|
+
# providing it to a Google API client library. Providing an unvalidated credential
|
1279
|
+
# configuration to Google APIs can compromise the security of your systems and data.
|
1280
|
+
# For more information, refer to [Validate credential configurations from external
|
1281
|
+
# sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials).
|
1008
1282
|
# @return [::Object]
|
1009
1283
|
# @!attribute [rw] scope
|
1010
1284
|
# The OAuth scopes
|
@@ -1160,6 +1434,21 @@ module Google
|
|
1160
1434
|
# @return [::Gapic::Config::Method]
|
1161
1435
|
#
|
1162
1436
|
attr_reader :get_partner
|
1437
|
+
##
|
1438
|
+
# RPC-specific configuration for `create_customer`
|
1439
|
+
# @return [::Gapic::Config::Method]
|
1440
|
+
#
|
1441
|
+
attr_reader :create_customer
|
1442
|
+
##
|
1443
|
+
# RPC-specific configuration for `update_customer`
|
1444
|
+
# @return [::Gapic::Config::Method]
|
1445
|
+
#
|
1446
|
+
attr_reader :update_customer
|
1447
|
+
##
|
1448
|
+
# RPC-specific configuration for `delete_customer`
|
1449
|
+
# @return [::Gapic::Config::Method]
|
1450
|
+
#
|
1451
|
+
attr_reader :delete_customer
|
1163
1452
|
|
1164
1453
|
# @private
|
1165
1454
|
def initialize parent_rpcs = nil
|
@@ -1179,6 +1468,12 @@ module Google
|
|
1179
1468
|
@list_access_approval_requests = ::Gapic::Config::Method.new list_access_approval_requests_config
|
1180
1469
|
get_partner_config = parent_rpcs.get_partner if parent_rpcs.respond_to? :get_partner
|
1181
1470
|
@get_partner = ::Gapic::Config::Method.new get_partner_config
|
1471
|
+
create_customer_config = parent_rpcs.create_customer if parent_rpcs.respond_to? :create_customer
|
1472
|
+
@create_customer = ::Gapic::Config::Method.new create_customer_config
|
1473
|
+
update_customer_config = parent_rpcs.update_customer if parent_rpcs.respond_to? :update_customer
|
1474
|
+
@update_customer = ::Gapic::Config::Method.new update_customer_config
|
1475
|
+
delete_customer_config = parent_rpcs.delete_customer if parent_rpcs.respond_to? :delete_customer
|
1476
|
+
@delete_customer = ::Gapic::Config::Method.new delete_customer_config
|
1182
1477
|
|
1183
1478
|
yield self if block_given?
|
1184
1479
|
end
|
data/lib/google/cloud/cloud_controls_partner/v1beta/cloud_controls_partner_core/rest/client.rb
CHANGED
@@ -890,6 +890,252 @@ module Google
|
|
890
890
|
raise ::Google::Cloud::Error.from_error(e)
|
891
891
|
end
|
892
892
|
|
893
|
+
##
|
894
|
+
# Creates a new customer.
|
895
|
+
#
|
896
|
+
# @overload create_customer(request, options = nil)
|
897
|
+
# Pass arguments to `create_customer` via a request object, either of type
|
898
|
+
# {::Google::Cloud::CloudControlsPartner::V1beta::CreateCustomerRequest} or an equivalent Hash.
|
899
|
+
#
|
900
|
+
# @param request [::Google::Cloud::CloudControlsPartner::V1beta::CreateCustomerRequest, ::Hash]
|
901
|
+
# A request object representing the call parameters. Required. To specify no
|
902
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
903
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
904
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
905
|
+
#
|
906
|
+
# @overload create_customer(parent: nil, customer: nil, customer_id: nil)
|
907
|
+
# Pass arguments to `create_customer` via keyword arguments. Note that at
|
908
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
909
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
910
|
+
#
|
911
|
+
# @param parent [::String]
|
912
|
+
# Required. Parent resource
|
913
|
+
# Format: `organizations/{organization}/locations/{location}`
|
914
|
+
# @param customer [::Google::Cloud::CloudControlsPartner::V1beta::Customer, ::Hash]
|
915
|
+
# Required. The customer to create.
|
916
|
+
# @param customer_id [::String]
|
917
|
+
# Required. The customer id to use for the customer, which will become the
|
918
|
+
# final component of the customer's resource name. The specified value must
|
919
|
+
# be a valid Google cloud organization id.
|
920
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
921
|
+
# @yieldparam result [::Google::Cloud::CloudControlsPartner::V1beta::Customer]
|
922
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
923
|
+
#
|
924
|
+
# @return [::Google::Cloud::CloudControlsPartner::V1beta::Customer]
|
925
|
+
#
|
926
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
927
|
+
#
|
928
|
+
# @example Basic example
|
929
|
+
# require "google/cloud/cloud_controls_partner/v1beta"
|
930
|
+
#
|
931
|
+
# # Create a client object. The client can be reused for multiple calls.
|
932
|
+
# client = Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Rest::Client.new
|
933
|
+
#
|
934
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
935
|
+
# request = Google::Cloud::CloudControlsPartner::V1beta::CreateCustomerRequest.new
|
936
|
+
#
|
937
|
+
# # Call the create_customer method.
|
938
|
+
# result = client.create_customer request
|
939
|
+
#
|
940
|
+
# # The returned object is of type Google::Cloud::CloudControlsPartner::V1beta::Customer.
|
941
|
+
# p result
|
942
|
+
#
|
943
|
+
def create_customer request, options = nil
|
944
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
945
|
+
|
946
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudControlsPartner::V1beta::CreateCustomerRequest
|
947
|
+
|
948
|
+
# Converts hash and nil to an options object
|
949
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
950
|
+
|
951
|
+
# Customize the options with defaults
|
952
|
+
call_metadata = @config.rpcs.create_customer.metadata.to_h
|
953
|
+
|
954
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
955
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
956
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
957
|
+
gapic_version: ::Google::Cloud::CloudControlsPartner::V1beta::VERSION,
|
958
|
+
transports_version_send: [:rest]
|
959
|
+
|
960
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
961
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
962
|
+
|
963
|
+
options.apply_defaults timeout: @config.rpcs.create_customer.timeout,
|
964
|
+
metadata: call_metadata,
|
965
|
+
retry_policy: @config.rpcs.create_customer.retry_policy
|
966
|
+
|
967
|
+
options.apply_defaults timeout: @config.timeout,
|
968
|
+
metadata: @config.metadata,
|
969
|
+
retry_policy: @config.retry_policy
|
970
|
+
|
971
|
+
@cloud_controls_partner_core_stub.create_customer request, options do |result, operation|
|
972
|
+
yield result, operation if block_given?
|
973
|
+
end
|
974
|
+
rescue ::Gapic::Rest::Error => e
|
975
|
+
raise ::Google::Cloud::Error.from_error(e)
|
976
|
+
end
|
977
|
+
|
978
|
+
##
|
979
|
+
# Update details of a single customer
|
980
|
+
#
|
981
|
+
# @overload update_customer(request, options = nil)
|
982
|
+
# Pass arguments to `update_customer` via a request object, either of type
|
983
|
+
# {::Google::Cloud::CloudControlsPartner::V1beta::UpdateCustomerRequest} or an equivalent Hash.
|
984
|
+
#
|
985
|
+
# @param request [::Google::Cloud::CloudControlsPartner::V1beta::UpdateCustomerRequest, ::Hash]
|
986
|
+
# A request object representing the call parameters. Required. To specify no
|
987
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
988
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
989
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
990
|
+
#
|
991
|
+
# @overload update_customer(customer: nil, update_mask: nil)
|
992
|
+
# Pass arguments to `update_customer` via keyword arguments. Note that at
|
993
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
994
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
995
|
+
#
|
996
|
+
# @param customer [::Google::Cloud::CloudControlsPartner::V1beta::Customer, ::Hash]
|
997
|
+
# Required. The customer to update
|
998
|
+
# Format:
|
999
|
+
# `organizations/{organization}/locations/{location}/customers/{customer}`
|
1000
|
+
# @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
|
1001
|
+
# Optional. The list of fields to update
|
1002
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
1003
|
+
# @yieldparam result [::Google::Cloud::CloudControlsPartner::V1beta::Customer]
|
1004
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
1005
|
+
#
|
1006
|
+
# @return [::Google::Cloud::CloudControlsPartner::V1beta::Customer]
|
1007
|
+
#
|
1008
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1009
|
+
#
|
1010
|
+
# @example Basic example
|
1011
|
+
# require "google/cloud/cloud_controls_partner/v1beta"
|
1012
|
+
#
|
1013
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1014
|
+
# client = Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Rest::Client.new
|
1015
|
+
#
|
1016
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1017
|
+
# request = Google::Cloud::CloudControlsPartner::V1beta::UpdateCustomerRequest.new
|
1018
|
+
#
|
1019
|
+
# # Call the update_customer method.
|
1020
|
+
# result = client.update_customer request
|
1021
|
+
#
|
1022
|
+
# # The returned object is of type Google::Cloud::CloudControlsPartner::V1beta::Customer.
|
1023
|
+
# p result
|
1024
|
+
#
|
1025
|
+
def update_customer request, options = nil
|
1026
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1027
|
+
|
1028
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudControlsPartner::V1beta::UpdateCustomerRequest
|
1029
|
+
|
1030
|
+
# Converts hash and nil to an options object
|
1031
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1032
|
+
|
1033
|
+
# Customize the options with defaults
|
1034
|
+
call_metadata = @config.rpcs.update_customer.metadata.to_h
|
1035
|
+
|
1036
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
1037
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1038
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1039
|
+
gapic_version: ::Google::Cloud::CloudControlsPartner::V1beta::VERSION,
|
1040
|
+
transports_version_send: [:rest]
|
1041
|
+
|
1042
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
1043
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1044
|
+
|
1045
|
+
options.apply_defaults timeout: @config.rpcs.update_customer.timeout,
|
1046
|
+
metadata: call_metadata,
|
1047
|
+
retry_policy: @config.rpcs.update_customer.retry_policy
|
1048
|
+
|
1049
|
+
options.apply_defaults timeout: @config.timeout,
|
1050
|
+
metadata: @config.metadata,
|
1051
|
+
retry_policy: @config.retry_policy
|
1052
|
+
|
1053
|
+
@cloud_controls_partner_core_stub.update_customer request, options do |result, operation|
|
1054
|
+
yield result, operation if block_given?
|
1055
|
+
end
|
1056
|
+
rescue ::Gapic::Rest::Error => e
|
1057
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1058
|
+
end
|
1059
|
+
|
1060
|
+
##
|
1061
|
+
# Delete details of a single customer
|
1062
|
+
#
|
1063
|
+
# @overload delete_customer(request, options = nil)
|
1064
|
+
# Pass arguments to `delete_customer` via a request object, either of type
|
1065
|
+
# {::Google::Cloud::CloudControlsPartner::V1beta::DeleteCustomerRequest} or an equivalent Hash.
|
1066
|
+
#
|
1067
|
+
# @param request [::Google::Cloud::CloudControlsPartner::V1beta::DeleteCustomerRequest, ::Hash]
|
1068
|
+
# A request object representing the call parameters. Required. To specify no
|
1069
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1070
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1071
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
1072
|
+
#
|
1073
|
+
# @overload delete_customer(name: nil)
|
1074
|
+
# Pass arguments to `delete_customer` via keyword arguments. Note that at
|
1075
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1076
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1077
|
+
#
|
1078
|
+
# @param name [::String]
|
1079
|
+
# Required. name of the resource to be deleted
|
1080
|
+
# format: name=organizations/*/locations/*/customers/*
|
1081
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
1082
|
+
# @yieldparam result [::Google::Protobuf::Empty]
|
1083
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
1084
|
+
#
|
1085
|
+
# @return [::Google::Protobuf::Empty]
|
1086
|
+
#
|
1087
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1088
|
+
#
|
1089
|
+
# @example Basic example
|
1090
|
+
# require "google/cloud/cloud_controls_partner/v1beta"
|
1091
|
+
#
|
1092
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1093
|
+
# client = Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Rest::Client.new
|
1094
|
+
#
|
1095
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1096
|
+
# request = Google::Cloud::CloudControlsPartner::V1beta::DeleteCustomerRequest.new
|
1097
|
+
#
|
1098
|
+
# # Call the delete_customer method.
|
1099
|
+
# result = client.delete_customer request
|
1100
|
+
#
|
1101
|
+
# # The returned object is of type Google::Protobuf::Empty.
|
1102
|
+
# p result
|
1103
|
+
#
|
1104
|
+
def delete_customer request, options = nil
|
1105
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1106
|
+
|
1107
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudControlsPartner::V1beta::DeleteCustomerRequest
|
1108
|
+
|
1109
|
+
# Converts hash and nil to an options object
|
1110
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1111
|
+
|
1112
|
+
# Customize the options with defaults
|
1113
|
+
call_metadata = @config.rpcs.delete_customer.metadata.to_h
|
1114
|
+
|
1115
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
1116
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1117
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1118
|
+
gapic_version: ::Google::Cloud::CloudControlsPartner::V1beta::VERSION,
|
1119
|
+
transports_version_send: [:rest]
|
1120
|
+
|
1121
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
1122
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1123
|
+
|
1124
|
+
options.apply_defaults timeout: @config.rpcs.delete_customer.timeout,
|
1125
|
+
metadata: call_metadata,
|
1126
|
+
retry_policy: @config.rpcs.delete_customer.retry_policy
|
1127
|
+
|
1128
|
+
options.apply_defaults timeout: @config.timeout,
|
1129
|
+
metadata: @config.metadata,
|
1130
|
+
retry_policy: @config.retry_policy
|
1131
|
+
|
1132
|
+
@cloud_controls_partner_core_stub.delete_customer request, options do |result, operation|
|
1133
|
+
yield result, operation if block_given?
|
1134
|
+
end
|
1135
|
+
rescue ::Gapic::Rest::Error => e
|
1136
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1137
|
+
end
|
1138
|
+
|
893
1139
|
##
|
894
1140
|
# Configuration class for the CloudControlsPartnerCore REST API.
|
895
1141
|
#
|
@@ -932,6 +1178,13 @@ module Google
|
|
932
1178
|
# * (`Signet::OAuth2::Client`) A signet oauth2 client object
|
933
1179
|
# (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
|
934
1180
|
# * (`nil`) indicating no credentials
|
1181
|
+
#
|
1182
|
+
# Warning: If you accept a credential configuration (JSON file or Hash) from an
|
1183
|
+
# external source for authentication to Google Cloud, you must validate it before
|
1184
|
+
# providing it to a Google API client library. Providing an unvalidated credential
|
1185
|
+
# configuration to Google APIs can compromise the security of your systems and data.
|
1186
|
+
# For more information, refer to [Validate credential configurations from external
|
1187
|
+
# sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials).
|
935
1188
|
# @return [::Object]
|
936
1189
|
# @!attribute [rw] scope
|
937
1190
|
# The OAuth scopes
|
@@ -1069,6 +1322,21 @@ module Google
|
|
1069
1322
|
# @return [::Gapic::Config::Method]
|
1070
1323
|
#
|
1071
1324
|
attr_reader :get_partner
|
1325
|
+
##
|
1326
|
+
# RPC-specific configuration for `create_customer`
|
1327
|
+
# @return [::Gapic::Config::Method]
|
1328
|
+
#
|
1329
|
+
attr_reader :create_customer
|
1330
|
+
##
|
1331
|
+
# RPC-specific configuration for `update_customer`
|
1332
|
+
# @return [::Gapic::Config::Method]
|
1333
|
+
#
|
1334
|
+
attr_reader :update_customer
|
1335
|
+
##
|
1336
|
+
# RPC-specific configuration for `delete_customer`
|
1337
|
+
# @return [::Gapic::Config::Method]
|
1338
|
+
#
|
1339
|
+
attr_reader :delete_customer
|
1072
1340
|
|
1073
1341
|
# @private
|
1074
1342
|
def initialize parent_rpcs = nil
|
@@ -1088,6 +1356,12 @@ module Google
|
|
1088
1356
|
@list_access_approval_requests = ::Gapic::Config::Method.new list_access_approval_requests_config
|
1089
1357
|
get_partner_config = parent_rpcs.get_partner if parent_rpcs.respond_to? :get_partner
|
1090
1358
|
@get_partner = ::Gapic::Config::Method.new get_partner_config
|
1359
|
+
create_customer_config = parent_rpcs.create_customer if parent_rpcs.respond_to? :create_customer
|
1360
|
+
@create_customer = ::Gapic::Config::Method.new create_customer_config
|
1361
|
+
update_customer_config = parent_rpcs.update_customer if parent_rpcs.respond_to? :update_customer
|
1362
|
+
@update_customer = ::Gapic::Config::Method.new update_customer_config
|
1363
|
+
delete_customer_config = parent_rpcs.delete_customer if parent_rpcs.respond_to? :delete_customer
|
1364
|
+
@delete_customer = ::Gapic::Config::Method.new delete_customer_config
|
1091
1365
|
|
1092
1366
|
yield self if block_given?
|
1093
1367
|
end
|