diff --git a/api_names_out.yaml b/api_names_out.yaml index e59cc5610..0a1a3b2ef 100644 --- a/api_names_out.yaml +++ b/api_names_out.yaml @@ -20255,6 +20255,9 @@ "/chat:v1/chat.dms.messages.create/threadKey": thread_key "/chat:v1/chat.dms.messages/parent": parent "/chat:v1/chat.dms.messages/threadKey": thread_key +"/chat:v1/chat.dms.webhooks": webhooks_dm +"/chat:v1/chat.dms.webhooks/parent": parent +"/chat:v1/chat.dms.webhooks/threadKey": thread_key "/chat:v1/chat.media.download": download_medium "/chat:v1/chat.media.download/resourceName": resource_name "/chat:v1/chat.rooms.conversations.messages": messages_room_conversation @@ -20269,6 +20272,9 @@ "/chat:v1/chat.rooms.messages.create/threadKey": thread_key "/chat:v1/chat.rooms.messages/parent": parent "/chat:v1/chat.rooms.messages/threadKey": thread_key +"/chat:v1/chat.rooms.webhooks": webhooks_room +"/chat:v1/chat.rooms.webhooks/parent": parent +"/chat:v1/chat.rooms.webhooks/threadKey": thread_key "/chat:v1/chat.spaces.get": get_space "/chat:v1/chat.spaces.get/name": name "/chat:v1/chat.spaces.list": list_spaces @@ -20292,6 +20298,9 @@ "/chat:v1/chat.spaces.messages.update": update_space_message "/chat:v1/chat.spaces.messages.update/name": name "/chat:v1/chat.spaces.messages.update/updateMask": update_mask +"/chat:v1/chat.spaces.webhooks": webhooks_space +"/chat:v1/chat.spaces.webhooks/parent": parent +"/chat:v1/chat.spaces.webhooks/threadKey": thread_key "/chat:v1/fields": fields "/chat:v1/key": key "/chat:v1/quotaUser": quota_user diff --git a/generated/google/apis/chat_v1.rb b/generated/google/apis/chat_v1.rb index fb3b9f60d..2e4782f6d 100644 --- a/generated/google/apis/chat_v1.rb +++ b/generated/google/apis/chat_v1.rb @@ -25,7 +25,7 @@ module Google # @see https://developers.google.com/hangouts/chat module ChatV1 VERSION = 'V1' - REVISION = '20201127' + REVISION = '20201211' end end end diff --git a/generated/google/apis/chat_v1/service.rb b/generated/google/apis/chat_v1/service.rb index 784d951d7..54acd302f 100644 --- a/generated/google/apis/chat_v1/service.rb +++ b/generated/google/apis/chat_v1/service.rb @@ -91,6 +91,50 @@ module Google execute_or_queue_command(command, &block) end + # Legacy path for creating message. Calling these will result in a BadRequest + # response. + # @param [String] parent + # Required. Space resource name, in the form "spaces/*". Example: spaces/ + # AAAAMpdlehY + # @param [Google::Apis::ChatV1::Message] message_object + # @param [String] thread_key + # Opaque thread identifier string that can be specified to group messages into a + # single thread. If this is the first message with a given thread identifier, a + # new thread is created. Subsequent messages with the same thread identifier + # will be posted into the same thread. This relieves bots and webhooks from + # having to store the Hangouts Chat thread ID of a thread (created earlier by + # them) to post further updates to it. Has no effect if thread field, + # corresponding to an existing thread, is set in message. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::ChatV1::Message] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::ChatV1::Message] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def webhooks_dm(parent, message_object = nil, thread_key: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1/{+parent}/webhooks', options) + command.request_representation = Google::Apis::ChatV1::Message::Representation + command.request_object = message_object + command.response_representation = Google::Apis::ChatV1::Message::Representation + command.response_class = Google::Apis::ChatV1::Message + command.params['parent'] = parent unless parent.nil? + command.query['threadKey'] = thread_key unless thread_key.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + # Legacy path for creating message. Calling these will result in a BadRequest # response. # @param [String] parent @@ -217,6 +261,50 @@ module Google execute_or_queue_command(command, &block) end + # Legacy path for creating message. Calling these will result in a BadRequest + # response. + # @param [String] parent + # Required. Space resource name, in the form "spaces/*". Example: spaces/ + # AAAAMpdlehY + # @param [Google::Apis::ChatV1::Message] message_object + # @param [String] thread_key + # Opaque thread identifier string that can be specified to group messages into a + # single thread. If this is the first message with a given thread identifier, a + # new thread is created. Subsequent messages with the same thread identifier + # will be posted into the same thread. This relieves bots and webhooks from + # having to store the Hangouts Chat thread ID of a thread (created earlier by + # them) to post further updates to it. Has no effect if thread field, + # corresponding to an existing thread, is set in message. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::ChatV1::Message] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::ChatV1::Message] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def webhooks_room(parent, message_object = nil, thread_key: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1/{+parent}/webhooks', options) + command.request_representation = Google::Apis::ChatV1::Message::Representation + command.request_object = message_object + command.response_representation = Google::Apis::ChatV1::Message::Representation + command.response_class = Google::Apis::ChatV1::Message + command.params['parent'] = parent unless parent.nil? + command.query['threadKey'] = thread_key unless thread_key.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + # Legacy path for creating message. Calling these will result in a BadRequest # response. # @param [String] parent @@ -326,6 +414,50 @@ module Google execute_or_queue_command(command, &block) end + # Legacy path for creating message. Calling these will result in a BadRequest + # response. + # @param [String] parent + # Required. Space resource name, in the form "spaces/*". Example: spaces/ + # AAAAMpdlehY + # @param [Google::Apis::ChatV1::Message] message_object + # @param [String] thread_key + # Opaque thread identifier string that can be specified to group messages into a + # single thread. If this is the first message with a given thread identifier, a + # new thread is created. Subsequent messages with the same thread identifier + # will be posted into the same thread. This relieves bots and webhooks from + # having to store the Hangouts Chat thread ID of a thread (created earlier by + # them) to post further updates to it. Has no effect if thread field, + # corresponding to an existing thread, is set in message. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::ChatV1::Message] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::ChatV1::Message] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def webhooks_space(parent, message_object = nil, thread_key: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1/{+parent}/webhooks', options) + command.request_representation = Google::Apis::ChatV1::Message::Representation + command.request_object = message_object + command.response_representation = Google::Apis::ChatV1::Message::Representation + command.response_class = Google::Apis::ChatV1::Message + command.params['parent'] = parent unless parent.nil? + command.query['threadKey'] = thread_key unless thread_key.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + # Returns a membership. # @param [String] name # Required. Resource name of the membership to be retrieved, in the form "spaces/ diff --git a/generated/google/apis/chat_v1/synth.metadata b/generated/google/apis/chat_v1/synth.metadata index 61b17f293..0ae274581 100644 --- a/generated/google/apis/chat_v1/synth.metadata +++ b/generated/google/apis/chat_v1/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/google-api-ruby-client.git", - "sha": "0f920ae5ebe394e34a9ce17dd866bea7a4621f7d" + "sha": "e75dab4e9e21c74f7a9982fff79881ab5319586e" } } ]