diff --git a/api_names_out.yaml b/api_names_out.yaml index c28feacd7de..bb35587b6f1 100644 --- a/api_names_out.yaml +++ b/api_names_out.yaml @@ -19919,20 +19919,32 @@ "/chat:v1/WidgetMarkup/image": image "/chat:v1/WidgetMarkup/keyValue": key_value "/chat:v1/WidgetMarkup/textParagraph": text_paragraph +"/chat:v1/chat.dms.conversations.messages": messages_dm_conversation "/chat:v1/chat.dms.conversations.messages.create": create_dm_conversation_message "/chat:v1/chat.dms.conversations.messages.create/parent": parent "/chat:v1/chat.dms.conversations.messages.create/threadKey": thread_key +"/chat:v1/chat.dms.conversations.messages/parent": parent +"/chat:v1/chat.dms.conversations.messages/threadKey": thread_key +"/chat:v1/chat.dms.messages": messages_dm "/chat:v1/chat.dms.messages.create": create_dm_message "/chat:v1/chat.dms.messages.create/parent": parent "/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.media.download": download_medium "/chat:v1/chat.media.download/resourceName": resource_name +"/chat:v1/chat.rooms.conversations.messages": messages_room_conversation "/chat:v1/chat.rooms.conversations.messages.create": create_room_conversation_message "/chat:v1/chat.rooms.conversations.messages.create/parent": parent "/chat:v1/chat.rooms.conversations.messages.create/threadKey": thread_key +"/chat:v1/chat.rooms.conversations.messages/parent": parent +"/chat:v1/chat.rooms.conversations.messages/threadKey": thread_key +"/chat:v1/chat.rooms.messages": messages_room "/chat:v1/chat.rooms.messages.create": create_room_message "/chat:v1/chat.rooms.messages.create/parent": parent "/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.spaces.get": get_space "/chat:v1/chat.spaces.get/name": name "/chat:v1/chat.spaces.list": list_spaces diff --git a/generated/google/apis/chat_v1.rb b/generated/google/apis/chat_v1.rb index cac7feec529..fb3b9f60dcc 100644 --- a/generated/google/apis/chat_v1.rb +++ b/generated/google/apis/chat_v1.rb @@ -25,7 +25,7 @@ module Apis # @see https://developers.google.com/hangouts/chat module ChatV1 VERSION = 'V1' - REVISION = '20201028' + REVISION = '20201127' end end end diff --git a/generated/google/apis/chat_v1/service.rb b/generated/google/apis/chat_v1/service.rb index 5fc5c65fc86..784d951d783 100644 --- a/generated/google/apis/chat_v1/service.rb +++ b/generated/google/apis/chat_v1/service.rb @@ -47,6 +47,94 @@ def initialize @batch_path = 'batch' 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 messages_dm(parent, message_object = nil, thread_key: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1/{+parent}/messages', 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 + # 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 messages_dm_conversation(parent, message_object = nil, thread_key: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1/{+parent}/messages', 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 + # Downloads media. Download is supported on the URI `/v1/media/`+name`?alt=media` # . # @param [String] resource_name @@ -85,6 +173,94 @@ def download_medium(resource_name, fields: nil, quota_user: nil, download_dest: 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 messages_room(parent, message_object = nil, thread_key: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1/{+parent}/messages', 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 + # 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 messages_room_conversation(parent, message_object = nil, thread_key: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1/{+parent}/messages', 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 space. # @param [String] name # Required. Resource name of the space, in the form "spaces/*". Example: spaces/ diff --git a/generated/google/apis/chat_v1/synth.metadata b/generated/google/apis/chat_v1/synth.metadata index d167dbf9a40..61b17f293db 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": "21445baae8adc1d75f0cde5c3cd6cebcc971f757" + "sha": "0f920ae5ebe394e34a9ce17dd866bea7a4621f7d" } } ]