google-cloud-gsuite_add_ons-v1 1.8.0 → 1.10.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7cbad69dece53b916a2bf0c523622977d45b8ec6eac28e70da2a5e8ff4950dd4
4
- data.tar.gz: f1ab8841ef707e3688b1752c7be924b38f0ac2b586a4badd086eeb4cd8f51dee
3
+ metadata.gz: b62562464bf0e8dc37277b59c61ada2a44c8bd71416ae54e7dc46ec7580d99c6
4
+ data.tar.gz: 76cf98f84475b06de320684b9b47bbcf9f6f4cf6fd583fb9df64c567a0b395e3
5
5
  SHA512:
6
- metadata.gz: f649a42800ffd12118f8dff180671b91d7b5e853fcabce9d1e4dac42b0c292002512f262c07569b5a482400d61447c86de18b4c2653232ff92b4dd78e8ce9426
7
- data.tar.gz: 0ce2012ec0e54579bc8218ca8cc74117edf491282cc5453c8cab4d763547f05ec5370ae02222ae023e4373e37619122f7bdae12ff26b667ec53cd97c51ed3d36
6
+ metadata.gz: 6ada86b981501cc302ef6fcaaa3fc998f53cdd0ca451d8b8e4a169dea98a2941cc4161e28a1db3e91b50d488678d4b65c787ae946d4b4430390212cfd02ac963
7
+ data.tar.gz: 5885c831825ffe829762684a10731f740feed7183937c92393a6a2481bfe9f0ee70fda42483a30f862309dc794a76776d4812c983c42ef090e10ee18a2a4eead
data/README.md CHANGED
@@ -84,12 +84,10 @@ To browse ready to use code samples check [Google Cloud Samples](https://cloud.g
84
84
 
85
85
  This library is supported on Ruby 3.2+.
86
86
 
87
- Google provides official support for Ruby versions that are actively supported
88
- by Ruby Core—that is, Ruby versions that are either in normal maintenance or
89
- in security maintenance, and not end of life. Older versions of Ruby _may_
90
- still work, but are unsupported and not recommended. See
91
- https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby
92
- support schedule.
87
+ Google provides official support for Ruby versions as described in the
88
+ [Supported Ruby versions](https://docs.cloud.google.com/ruby/getting-started/supported-ruby-versions)
89
+ policy. Older versions of Ruby _may_ still work, but are unsupported and not
90
+ recommended.
93
91
 
94
92
  ## Which client should I use?
95
93
 
@@ -27,34 +27,7 @@ module Google
27
27
  ##
28
28
  # Client for the GSuiteAddOns service.
29
29
  #
30
- # A service for managing Google Workspace add-ons deployments.
31
- #
32
- # A Google Workspace add-on is a third-party embedded component that can be
33
- # installed in Google Workspace Applications like Gmail, Calendar, Drive, and
34
- # the Google Docs, Sheets, and Slides editors. Google Workspace add-ons can
35
- # display UI cards, receive contextual information from the host application,
36
- # and perform actions in the host application (See:
37
- # https://developers.google.com/gsuite/add-ons/overview for more information).
38
- #
39
- # A Google Workspace add-on deployment resource specifies metadata about the
40
- # add-on, including a specification of the entry points in the host application
41
- # that trigger add-on executions (see:
42
- # https://developers.google.com/gsuite/add-ons/concepts/gsuite-manifests).
43
- # Add-on deployments defined via the Google Workspace add-ons API define their
44
- # entrypoints using HTTPS URLs (See:
45
- # https://developers.google.com/gsuite/add-ons/guides/alternate-runtimes),
46
- #
47
- # A Google Workspace add-on deployment can be installed in developer mode,
48
- # which allows an add-on developer to test the experience an end-user would see
49
- # when installing and running the add-on in their G Suite applications. When
50
- # running in developer mode, more detailed error messages are exposed in the
51
- # add-on UI to aid in debugging.
52
- #
53
- # A Google Workspace add-on deployment can be published to Google Workspace
54
- # Marketplace, which allows other Google Workspace users to discover and
55
- # install the add-on. See:
56
- # https://developers.google.com/gsuite/add-ons/how-tos/publish-add-on-overview
57
- # for details.
30
+ # A service for managing Google Workspace add-ons.
58
31
  #
59
32
  class Client
60
33
  # @private
@@ -1032,6 +1005,199 @@ module Google
1032
1005
  raise ::Google::Cloud::Error.from_error(e)
1033
1006
  end
1034
1007
 
1008
+ ##
1009
+ # Gets the Chat app configuration of a project. Only Chat apps built as
1010
+ # Google Workspace add-ons are supported. Each Google Cloud project has
1011
+ # exactly one Chat app configuration.
1012
+ #
1013
+ # Requires authenticating and authorizing with user credentials and the
1014
+ # `gsuiteaddons.chatAppConfigs.get` and `chat.bots.get` IAM permissions on
1015
+ # the project.
1016
+ #
1017
+ # @overload get_chat_app_config(request, options = nil)
1018
+ # Pass arguments to `get_chat_app_config` via a request object, either of type
1019
+ # {::Google::Cloud::GSuiteAddOns::V1::GetChatAppConfigRequest} or an equivalent Hash.
1020
+ #
1021
+ # @param request [::Google::Cloud::GSuiteAddOns::V1::GetChatAppConfigRequest, ::Hash]
1022
+ # A request object representing the call parameters. Required. To specify no
1023
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1024
+ # @param options [::Gapic::CallOptions, ::Hash]
1025
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1026
+ #
1027
+ # @overload get_chat_app_config(name: nil, view: nil)
1028
+ # Pass arguments to `get_chat_app_config` via keyword arguments. Note that at
1029
+ # least one keyword argument is required. To specify no parameters, or to keep all
1030
+ # the default parameter values, pass an empty Hash as a request object (see above).
1031
+ #
1032
+ # @param name [::String]
1033
+ # Required. Resource name of the Chat app configuration.
1034
+ #
1035
+ # Format: `projects/{project}/chatAppConfig`, where `{project}` is the Google
1036
+ # Cloud project number.
1037
+ # @param view [::Google::Cloud::GSuiteAddOns::V1::GetChatAppConfigRequest::ChatAppConfigView]
1038
+ # Optional. The view of the ChatAppConfig to return. If unspecified, defaults
1039
+ # to `BASIC`.
1040
+ #
1041
+ # @yield [response, operation] Access the result along with the RPC operation
1042
+ # @yieldparam response [::Google::Cloud::GSuiteAddOns::V1::ChatAppConfig]
1043
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1044
+ #
1045
+ # @return [::Google::Cloud::GSuiteAddOns::V1::ChatAppConfig]
1046
+ #
1047
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1048
+ #
1049
+ # @example Basic example
1050
+ # require "google/cloud/gsuite_add_ons/v1"
1051
+ #
1052
+ # # Create a client object. The client can be reused for multiple calls.
1053
+ # client = Google::Cloud::GSuiteAddOns::V1::GSuiteAddOns::Client.new
1054
+ #
1055
+ # # Create a request. To set request fields, pass in keyword arguments.
1056
+ # request = Google::Cloud::GSuiteAddOns::V1::GetChatAppConfigRequest.new
1057
+ #
1058
+ # # Call the get_chat_app_config method.
1059
+ # result = client.get_chat_app_config request
1060
+ #
1061
+ # # The returned object is of type Google::Cloud::GSuiteAddOns::V1::ChatAppConfig.
1062
+ # p result
1063
+ #
1064
+ def get_chat_app_config request, options = nil
1065
+ raise ::ArgumentError, "request must be provided" if request.nil?
1066
+
1067
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GSuiteAddOns::V1::GetChatAppConfigRequest
1068
+
1069
+ # Converts hash and nil to an options object
1070
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1071
+
1072
+ # Customize the options with defaults
1073
+ metadata = @config.rpcs.get_chat_app_config.metadata.to_h
1074
+
1075
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1076
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1077
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1078
+ gapic_version: ::Google::Cloud::GSuiteAddOns::V1::VERSION
1079
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1080
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1081
+
1082
+ header_params = {}
1083
+ if request.name
1084
+ header_params["name"] = request.name
1085
+ end
1086
+
1087
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1088
+ metadata[:"x-goog-request-params"] ||= request_params_header
1089
+
1090
+ options.apply_defaults timeout: @config.rpcs.get_chat_app_config.timeout,
1091
+ metadata: metadata,
1092
+ retry_policy: @config.rpcs.get_chat_app_config.retry_policy
1093
+
1094
+ options.apply_defaults timeout: @config.timeout,
1095
+ metadata: @config.metadata,
1096
+ retry_policy: @config.retry_policy
1097
+
1098
+ @g_suite_add_ons_stub.call_rpc :get_chat_app_config, request, options: options do |response, operation|
1099
+ yield response, operation if block_given?
1100
+ end
1101
+ rescue ::GRPC::BadStatus => e
1102
+ raise ::Google::Cloud::Error.from_error(e)
1103
+ end
1104
+
1105
+ ##
1106
+ # Updates the Chat app configuration of a project. Only Chat apps built as
1107
+ # Google Workspace add-ons are supported. Each Google Cloud project has
1108
+ # exactly one Chat app configuration.
1109
+ #
1110
+ # Requires authenticating and authorizing with user credentials and the
1111
+ # `gsuiteaddons.chatAppConfigs.update`, `chat.bots.update` and
1112
+ # `chat.bots.get` IAM permissions on the project.
1113
+ #
1114
+ # @overload update_chat_app_config(request, options = nil)
1115
+ # Pass arguments to `update_chat_app_config` via a request object, either of type
1116
+ # {::Google::Cloud::GSuiteAddOns::V1::UpdateChatAppConfigRequest} or an equivalent Hash.
1117
+ #
1118
+ # @param request [::Google::Cloud::GSuiteAddOns::V1::UpdateChatAppConfigRequest, ::Hash]
1119
+ # A request object representing the call parameters. Required. To specify no
1120
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1121
+ # @param options [::Gapic::CallOptions, ::Hash]
1122
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1123
+ #
1124
+ # @overload update_chat_app_config(chat_app_config: nil, update_mask: nil)
1125
+ # Pass arguments to `update_chat_app_config` via keyword arguments. Note that at
1126
+ # least one keyword argument is required. To specify no parameters, or to keep all
1127
+ # the default parameter values, pass an empty Hash as a request object (see above).
1128
+ #
1129
+ # @param chat_app_config [::Google::Cloud::GSuiteAddOns::V1::ChatAppConfig, ::Hash]
1130
+ # Required. The app configuration to update.
1131
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
1132
+ # Optional. The list of fields to update.
1133
+ #
1134
+ # If omitted, only the fields with non-empty values in the provided Chat app
1135
+ # configuration are updated.
1136
+ #
1137
+ # @yield [response, operation] Access the result along with the RPC operation
1138
+ # @yieldparam response [::Google::Cloud::GSuiteAddOns::V1::ChatAppConfig]
1139
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1140
+ #
1141
+ # @return [::Google::Cloud::GSuiteAddOns::V1::ChatAppConfig]
1142
+ #
1143
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1144
+ #
1145
+ # @example Basic example
1146
+ # require "google/cloud/gsuite_add_ons/v1"
1147
+ #
1148
+ # # Create a client object. The client can be reused for multiple calls.
1149
+ # client = Google::Cloud::GSuiteAddOns::V1::GSuiteAddOns::Client.new
1150
+ #
1151
+ # # Create a request. To set request fields, pass in keyword arguments.
1152
+ # request = Google::Cloud::GSuiteAddOns::V1::UpdateChatAppConfigRequest.new
1153
+ #
1154
+ # # Call the update_chat_app_config method.
1155
+ # result = client.update_chat_app_config request
1156
+ #
1157
+ # # The returned object is of type Google::Cloud::GSuiteAddOns::V1::ChatAppConfig.
1158
+ # p result
1159
+ #
1160
+ def update_chat_app_config request, options = nil
1161
+ raise ::ArgumentError, "request must be provided" if request.nil?
1162
+
1163
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GSuiteAddOns::V1::UpdateChatAppConfigRequest
1164
+
1165
+ # Converts hash and nil to an options object
1166
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1167
+
1168
+ # Customize the options with defaults
1169
+ metadata = @config.rpcs.update_chat_app_config.metadata.to_h
1170
+
1171
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1172
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1173
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1174
+ gapic_version: ::Google::Cloud::GSuiteAddOns::V1::VERSION
1175
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1176
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1177
+
1178
+ header_params = {}
1179
+ if request.chat_app_config&.name
1180
+ header_params["chat_app_config.name"] = request.chat_app_config.name
1181
+ end
1182
+
1183
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1184
+ metadata[:"x-goog-request-params"] ||= request_params_header
1185
+
1186
+ options.apply_defaults timeout: @config.rpcs.update_chat_app_config.timeout,
1187
+ metadata: metadata,
1188
+ retry_policy: @config.rpcs.update_chat_app_config.retry_policy
1189
+
1190
+ options.apply_defaults timeout: @config.timeout,
1191
+ metadata: @config.metadata,
1192
+ retry_policy: @config.retry_policy
1193
+
1194
+ @g_suite_add_ons_stub.call_rpc :update_chat_app_config, request, options: options do |response, operation|
1195
+ yield response, operation if block_given?
1196
+ end
1197
+ rescue ::GRPC::BadStatus => e
1198
+ raise ::Google::Cloud::Error.from_error(e)
1199
+ end
1200
+
1035
1201
  ##
1036
1202
  # Configuration class for the GSuiteAddOns API.
1037
1203
  #
@@ -1262,6 +1428,16 @@ module Google
1262
1428
  # @return [::Gapic::Config::Method]
1263
1429
  #
1264
1430
  attr_reader :get_install_status
1431
+ ##
1432
+ # RPC-specific configuration for `get_chat_app_config`
1433
+ # @return [::Gapic::Config::Method]
1434
+ #
1435
+ attr_reader :get_chat_app_config
1436
+ ##
1437
+ # RPC-specific configuration for `update_chat_app_config`
1438
+ # @return [::Gapic::Config::Method]
1439
+ #
1440
+ attr_reader :update_chat_app_config
1265
1441
 
1266
1442
  # @private
1267
1443
  def initialize parent_rpcs = nil
@@ -1283,6 +1459,10 @@ module Google
1283
1459
  @uninstall_deployment = ::Gapic::Config::Method.new uninstall_deployment_config
1284
1460
  get_install_status_config = parent_rpcs.get_install_status if parent_rpcs.respond_to? :get_install_status
1285
1461
  @get_install_status = ::Gapic::Config::Method.new get_install_status_config
1462
+ get_chat_app_config_config = parent_rpcs.get_chat_app_config if parent_rpcs.respond_to? :get_chat_app_config
1463
+ @get_chat_app_config = ::Gapic::Config::Method.new get_chat_app_config_config
1464
+ update_chat_app_config_config = parent_rpcs.update_chat_app_config if parent_rpcs.respond_to? :update_chat_app_config
1465
+ @update_chat_app_config = ::Gapic::Config::Method.new update_chat_app_config_config
1286
1466
 
1287
1467
  yield self if block_given?
1288
1468
  end
@@ -26,7 +26,8 @@ module Google
26
26
  # Credentials for the GSuiteAddOns API.
27
27
  class Credentials < ::Google::Auth::Credentials
28
28
  self.scope = [
29
- "https://www.googleapis.com/auth/cloud-platform"
29
+ "https://www.googleapis.com/auth/cloud-platform",
30
+ "https://www.googleapis.com/auth/cloud-platform.read-only"
30
31
  ]
31
32
  self.env_vars = [
32
33
  "GOOGLE_CLOUD_CREDENTIALS",
@@ -38,6 +38,20 @@ module Google
38
38
  "projects/#{project}/authorization"
39
39
  end
40
40
 
41
+ ##
42
+ # Create a fully-qualified ChatAppConfig resource string.
43
+ #
44
+ # The resource will be in the following format:
45
+ #
46
+ # `projects/{project}/chatAppConfig`
47
+ #
48
+ # @param project [String]
49
+ #
50
+ # @return [::String]
51
+ def chat_app_config_path project:
52
+ "projects/#{project}/chatAppConfig"
53
+ end
54
+
41
55
  ##
42
56
  # Create a fully-qualified Deployment resource string.
43
57
  #
@@ -86,6 +100,23 @@ module Google
86
100
  "projects/#{project}"
87
101
  end
88
102
 
103
+ ##
104
+ # Create a fully-qualified Topic resource string.
105
+ #
106
+ # The resource will be in the following format:
107
+ #
108
+ # `projects/{project}/topics/{topic}`
109
+ #
110
+ # @param project [String]
111
+ # @param topic [String]
112
+ #
113
+ # @return [::String]
114
+ def topic_path project:, topic:
115
+ raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
116
+
117
+ "projects/#{project}/topics/#{topic}"
118
+ end
119
+
89
120
  extend self
90
121
  end
91
122
  end
@@ -29,34 +29,7 @@ module Google
29
29
  ##
30
30
  # REST client for the GSuiteAddOns service.
31
31
  #
32
- # A service for managing Google Workspace add-ons deployments.
33
- #
34
- # A Google Workspace add-on is a third-party embedded component that can be
35
- # installed in Google Workspace Applications like Gmail, Calendar, Drive, and
36
- # the Google Docs, Sheets, and Slides editors. Google Workspace add-ons can
37
- # display UI cards, receive contextual information from the host application,
38
- # and perform actions in the host application (See:
39
- # https://developers.google.com/gsuite/add-ons/overview for more information).
40
- #
41
- # A Google Workspace add-on deployment resource specifies metadata about the
42
- # add-on, including a specification of the entry points in the host application
43
- # that trigger add-on executions (see:
44
- # https://developers.google.com/gsuite/add-ons/concepts/gsuite-manifests).
45
- # Add-on deployments defined via the Google Workspace add-ons API define their
46
- # entrypoints using HTTPS URLs (See:
47
- # https://developers.google.com/gsuite/add-ons/guides/alternate-runtimes),
48
- #
49
- # A Google Workspace add-on deployment can be installed in developer mode,
50
- # which allows an add-on developer to test the experience an end-user would see
51
- # when installing and running the add-on in their G Suite applications. When
52
- # running in developer mode, more detailed error messages are exposed in the
53
- # add-on UI to aid in debugging.
54
- #
55
- # A Google Workspace add-on deployment can be published to Google Workspace
56
- # Marketplace, which allows other Google Workspace users to discover and
57
- # install the add-on. See:
58
- # https://developers.google.com/gsuite/add-ons/how-tos/publish-add-on-overview
59
- # for details.
32
+ # A service for managing Google Workspace add-ons.
60
33
  #
61
34
  class Client
62
35
  # @private
@@ -962,6 +935,185 @@ module Google
962
935
  raise ::Google::Cloud::Error.from_error(e)
963
936
  end
964
937
 
938
+ ##
939
+ # Gets the Chat app configuration of a project. Only Chat apps built as
940
+ # Google Workspace add-ons are supported. Each Google Cloud project has
941
+ # exactly one Chat app configuration.
942
+ #
943
+ # Requires authenticating and authorizing with user credentials and the
944
+ # `gsuiteaddons.chatAppConfigs.get` and `chat.bots.get` IAM permissions on
945
+ # the project.
946
+ #
947
+ # @overload get_chat_app_config(request, options = nil)
948
+ # Pass arguments to `get_chat_app_config` via a request object, either of type
949
+ # {::Google::Cloud::GSuiteAddOns::V1::GetChatAppConfigRequest} or an equivalent Hash.
950
+ #
951
+ # @param request [::Google::Cloud::GSuiteAddOns::V1::GetChatAppConfigRequest, ::Hash]
952
+ # A request object representing the call parameters. Required. To specify no
953
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
954
+ # @param options [::Gapic::CallOptions, ::Hash]
955
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
956
+ #
957
+ # @overload get_chat_app_config(name: nil, view: nil)
958
+ # Pass arguments to `get_chat_app_config` via keyword arguments. Note that at
959
+ # least one keyword argument is required. To specify no parameters, or to keep all
960
+ # the default parameter values, pass an empty Hash as a request object (see above).
961
+ #
962
+ # @param name [::String]
963
+ # Required. Resource name of the Chat app configuration.
964
+ #
965
+ # Format: `projects/{project}/chatAppConfig`, where `{project}` is the Google
966
+ # Cloud project number.
967
+ # @param view [::Google::Cloud::GSuiteAddOns::V1::GetChatAppConfigRequest::ChatAppConfigView]
968
+ # Optional. The view of the ChatAppConfig to return. If unspecified, defaults
969
+ # to `BASIC`.
970
+ # @yield [result, operation] Access the result along with the TransportOperation object
971
+ # @yieldparam result [::Google::Cloud::GSuiteAddOns::V1::ChatAppConfig]
972
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
973
+ #
974
+ # @return [::Google::Cloud::GSuiteAddOns::V1::ChatAppConfig]
975
+ #
976
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
977
+ #
978
+ # @example Basic example
979
+ # require "google/cloud/gsuite_add_ons/v1"
980
+ #
981
+ # # Create a client object. The client can be reused for multiple calls.
982
+ # client = Google::Cloud::GSuiteAddOns::V1::GSuiteAddOns::Rest::Client.new
983
+ #
984
+ # # Create a request. To set request fields, pass in keyword arguments.
985
+ # request = Google::Cloud::GSuiteAddOns::V1::GetChatAppConfigRequest.new
986
+ #
987
+ # # Call the get_chat_app_config method.
988
+ # result = client.get_chat_app_config request
989
+ #
990
+ # # The returned object is of type Google::Cloud::GSuiteAddOns::V1::ChatAppConfig.
991
+ # p result
992
+ #
993
+ def get_chat_app_config request, options = nil
994
+ raise ::ArgumentError, "request must be provided" if request.nil?
995
+
996
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GSuiteAddOns::V1::GetChatAppConfigRequest
997
+
998
+ # Converts hash and nil to an options object
999
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1000
+
1001
+ # Customize the options with defaults
1002
+ call_metadata = @config.rpcs.get_chat_app_config.metadata.to_h
1003
+
1004
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1005
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1006
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1007
+ gapic_version: ::Google::Cloud::GSuiteAddOns::V1::VERSION,
1008
+ transports_version_send: [:rest]
1009
+
1010
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1011
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1012
+
1013
+ options.apply_defaults timeout: @config.rpcs.get_chat_app_config.timeout,
1014
+ metadata: call_metadata,
1015
+ retry_policy: @config.rpcs.get_chat_app_config.retry_policy
1016
+
1017
+ options.apply_defaults timeout: @config.timeout,
1018
+ metadata: @config.metadata,
1019
+ retry_policy: @config.retry_policy
1020
+
1021
+ @g_suite_add_ons_stub.get_chat_app_config request, options do |result, operation|
1022
+ yield result, operation if block_given?
1023
+ end
1024
+ rescue ::Gapic::Rest::Error => e
1025
+ raise ::Google::Cloud::Error.from_error(e)
1026
+ end
1027
+
1028
+ ##
1029
+ # Updates the Chat app configuration of a project. Only Chat apps built as
1030
+ # Google Workspace add-ons are supported. Each Google Cloud project has
1031
+ # exactly one Chat app configuration.
1032
+ #
1033
+ # Requires authenticating and authorizing with user credentials and the
1034
+ # `gsuiteaddons.chatAppConfigs.update`, `chat.bots.update` and
1035
+ # `chat.bots.get` IAM permissions on the project.
1036
+ #
1037
+ # @overload update_chat_app_config(request, options = nil)
1038
+ # Pass arguments to `update_chat_app_config` via a request object, either of type
1039
+ # {::Google::Cloud::GSuiteAddOns::V1::UpdateChatAppConfigRequest} or an equivalent Hash.
1040
+ #
1041
+ # @param request [::Google::Cloud::GSuiteAddOns::V1::UpdateChatAppConfigRequest, ::Hash]
1042
+ # A request object representing the call parameters. Required. To specify no
1043
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1044
+ # @param options [::Gapic::CallOptions, ::Hash]
1045
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1046
+ #
1047
+ # @overload update_chat_app_config(chat_app_config: nil, update_mask: nil)
1048
+ # Pass arguments to `update_chat_app_config` via keyword arguments. Note that at
1049
+ # least one keyword argument is required. To specify no parameters, or to keep all
1050
+ # the default parameter values, pass an empty Hash as a request object (see above).
1051
+ #
1052
+ # @param chat_app_config [::Google::Cloud::GSuiteAddOns::V1::ChatAppConfig, ::Hash]
1053
+ # Required. The app configuration to update.
1054
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
1055
+ # Optional. The list of fields to update.
1056
+ #
1057
+ # If omitted, only the fields with non-empty values in the provided Chat app
1058
+ # configuration are updated.
1059
+ # @yield [result, operation] Access the result along with the TransportOperation object
1060
+ # @yieldparam result [::Google::Cloud::GSuiteAddOns::V1::ChatAppConfig]
1061
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1062
+ #
1063
+ # @return [::Google::Cloud::GSuiteAddOns::V1::ChatAppConfig]
1064
+ #
1065
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1066
+ #
1067
+ # @example Basic example
1068
+ # require "google/cloud/gsuite_add_ons/v1"
1069
+ #
1070
+ # # Create a client object. The client can be reused for multiple calls.
1071
+ # client = Google::Cloud::GSuiteAddOns::V1::GSuiteAddOns::Rest::Client.new
1072
+ #
1073
+ # # Create a request. To set request fields, pass in keyword arguments.
1074
+ # request = Google::Cloud::GSuiteAddOns::V1::UpdateChatAppConfigRequest.new
1075
+ #
1076
+ # # Call the update_chat_app_config method.
1077
+ # result = client.update_chat_app_config request
1078
+ #
1079
+ # # The returned object is of type Google::Cloud::GSuiteAddOns::V1::ChatAppConfig.
1080
+ # p result
1081
+ #
1082
+ def update_chat_app_config request, options = nil
1083
+ raise ::ArgumentError, "request must be provided" if request.nil?
1084
+
1085
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GSuiteAddOns::V1::UpdateChatAppConfigRequest
1086
+
1087
+ # Converts hash and nil to an options object
1088
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1089
+
1090
+ # Customize the options with defaults
1091
+ call_metadata = @config.rpcs.update_chat_app_config.metadata.to_h
1092
+
1093
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1094
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1095
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1096
+ gapic_version: ::Google::Cloud::GSuiteAddOns::V1::VERSION,
1097
+ transports_version_send: [:rest]
1098
+
1099
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1100
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1101
+
1102
+ options.apply_defaults timeout: @config.rpcs.update_chat_app_config.timeout,
1103
+ metadata: call_metadata,
1104
+ retry_policy: @config.rpcs.update_chat_app_config.retry_policy
1105
+
1106
+ options.apply_defaults timeout: @config.timeout,
1107
+ metadata: @config.metadata,
1108
+ retry_policy: @config.retry_policy
1109
+
1110
+ @g_suite_add_ons_stub.update_chat_app_config request, options do |result, operation|
1111
+ yield result, operation if block_given?
1112
+ end
1113
+ rescue ::Gapic::Rest::Error => e
1114
+ raise ::Google::Cloud::Error.from_error(e)
1115
+ end
1116
+
965
1117
  ##
966
1118
  # Configuration class for the GSuiteAddOns REST API.
967
1119
  #
@@ -1155,6 +1307,16 @@ module Google
1155
1307
  # @return [::Gapic::Config::Method]
1156
1308
  #
1157
1309
  attr_reader :get_install_status
1310
+ ##
1311
+ # RPC-specific configuration for `get_chat_app_config`
1312
+ # @return [::Gapic::Config::Method]
1313
+ #
1314
+ attr_reader :get_chat_app_config
1315
+ ##
1316
+ # RPC-specific configuration for `update_chat_app_config`
1317
+ # @return [::Gapic::Config::Method]
1318
+ #
1319
+ attr_reader :update_chat_app_config
1158
1320
 
1159
1321
  # @private
1160
1322
  def initialize parent_rpcs = nil
@@ -1176,6 +1338,10 @@ module Google
1176
1338
  @uninstall_deployment = ::Gapic::Config::Method.new uninstall_deployment_config
1177
1339
  get_install_status_config = parent_rpcs.get_install_status if parent_rpcs.respond_to? :get_install_status
1178
1340
  @get_install_status = ::Gapic::Config::Method.new get_install_status_config
1341
+ get_chat_app_config_config = parent_rpcs.get_chat_app_config if parent_rpcs.respond_to? :get_chat_app_config
1342
+ @get_chat_app_config = ::Gapic::Config::Method.new get_chat_app_config_config
1343
+ update_chat_app_config_config = parent_rpcs.update_chat_app_config if parent_rpcs.respond_to? :update_chat_app_config
1344
+ @update_chat_app_config = ::Gapic::Config::Method.new update_chat_app_config_config
1179
1345
 
1180
1346
  yield self if block_given?
1181
1347
  end