From 406e760dee7a1656fb48af58ac14defa752d120c Mon Sep 17 00:00:00 2001 From: Google APIs Date: Thu, 1 Mar 2018 00:36:09 +0000 Subject: [PATCH] Autogenerated update (2018-03-01) Update: - androidenterprise_v1 - appengine_v1 - appengine_v1alpha - appengine_v1beta - appengine_v1beta4 - appengine_v1beta5 - cloudiot_v1 - serviceconsumermanagement_v1 - speech_v1 - testing_v1 --- api_names_out.yaml | 149 +++ generated/google/apis/androidenterprise_v1.rb | 2 +- .../apis/androidenterprise_v1/classes.rb | 9 + .../androidenterprise_v1/representations.rb | 1 + generated/google/apis/appengine_v1.rb | 4 +- generated/google/apis/appengine_v1/service.rb | 2 +- generated/google/apis/appengine_v1alpha.rb | 4 +- .../google/apis/appengine_v1alpha/service.rb | 2 +- generated/google/apis/appengine_v1beta.rb | 4 +- .../google/apis/appengine_v1beta/service.rb | 2 +- generated/google/apis/appengine_v1beta4.rb | 4 +- .../google/apis/appengine_v1beta4/service.rb | 2 +- generated/google/apis/appengine_v1beta5.rb | 4 +- .../google/apis/appengine_v1beta5/service.rb | 2 +- generated/google/apis/chat_v1.rb | 31 + generated/google/apis/chat_v1/classes.rb | 890 ++++++++++++++++++ .../google/apis/chat_v1/representations.rb | 445 +++++++++ generated/google/apis/chat_v1/service.rb | 524 +++++++++++ generated/google/apis/cloudiot_v1.rb | 4 +- generated/google/apis/cloudiot_v1/classes.rb | 140 +-- .../apis/cloudiot_v1/representations.rb | 32 - generated/google/apis/cloudiot_v1/service.rb | 2 +- .../apis/serviceconsumermanagement_v1.rb | 2 +- .../serviceconsumermanagement_v1/classes.rb | 4 +- generated/google/apis/speech_v1.rb | 2 +- generated/google/apis/speech_v1/classes.rb | 8 +- generated/google/apis/testing_v1.rb | 2 +- generated/google/apis/testing_v1/classes.rb | 4 +- 28 files changed, 2086 insertions(+), 195 deletions(-) create mode 100644 generated/google/apis/chat_v1.rb create mode 100644 generated/google/apis/chat_v1/classes.rb create mode 100644 generated/google/apis/chat_v1/representations.rb create mode 100644 generated/google/apis/chat_v1/service.rb diff --git a/api_names_out.yaml b/api_names_out.yaml index 04950cc2f..6cbb6e203 100644 --- a/api_names_out.yaml +++ b/api_names_out.yaml @@ -5650,6 +5650,7 @@ "/androidenterprise:v1/Permission/name": name "/androidenterprise:v1/Permission/permissionId": permission_id "/androidenterprise:v1/Policy": policy +"/androidenterprise:v1/Policy/autoUpdatePolicy": auto_update_policy "/androidenterprise:v1/Policy/productAvailabilityPolicy": product_availability_policy "/androidenterprise:v1/Policy/productPolicy": product_policy "/androidenterprise:v1/Policy/productPolicy/product_policy": product_policy @@ -11832,6 +11833,154 @@ "/calendar:v3/key": key "/calendar:v3/quotaUser": quota_user "/calendar:v3/userIp": user_ip +"/chat:v1/ActionParameter": action_parameter +"/chat:v1/ActionParameter/key": key +"/chat:v1/ActionParameter/value": value +"/chat:v1/ActionResponse": action_response +"/chat:v1/ActionResponse/type": type +"/chat:v1/ActionResponse/url": url +"/chat:v1/Annotation": annotation +"/chat:v1/Annotation/length": length +"/chat:v1/Annotation/startIndex": start_index +"/chat:v1/Annotation/type": type +"/chat:v1/Annotation/userMention": user_mention +"/chat:v1/Button": button +"/chat:v1/Button/imageButton": image_button +"/chat:v1/Button/textButton": text_button +"/chat:v1/Card": card +"/chat:v1/Card/cardActions": card_actions +"/chat:v1/Card/cardActions/card_action": card_action +"/chat:v1/Card/header": header +"/chat:v1/Card/name": name +"/chat:v1/Card/sections": sections +"/chat:v1/Card/sections/section": section +"/chat:v1/CardAction": card_action +"/chat:v1/CardAction/actionLabel": action_label +"/chat:v1/CardAction/onClick": on_click +"/chat:v1/CardHeader": card_header +"/chat:v1/CardHeader/imageStyle": image_style +"/chat:v1/CardHeader/imageUrl": image_url +"/chat:v1/CardHeader/subtitle": subtitle +"/chat:v1/CardHeader/title": title +"/chat:v1/Empty": empty +"/chat:v1/FormAction": form_action +"/chat:v1/FormAction/actionMethodName": action_method_name +"/chat:v1/FormAction/parameters": parameters +"/chat:v1/FormAction/parameters/parameter": parameter +"/chat:v1/Image": image +"/chat:v1/Image/aspectRatio": aspect_ratio +"/chat:v1/Image/imageUrl": image_url +"/chat:v1/Image/onClick": on_click +"/chat:v1/ImageButton": image_button +"/chat:v1/ImageButton/icon": icon +"/chat:v1/ImageButton/iconUrl": icon_url +"/chat:v1/ImageButton/name": name +"/chat:v1/ImageButton/onClick": on_click +"/chat:v1/KeyValue": key_value +"/chat:v1/KeyValue/bottomLabel": bottom_label +"/chat:v1/KeyValue/button": button +"/chat:v1/KeyValue/content": content +"/chat:v1/KeyValue/contentMultiline": content_multiline +"/chat:v1/KeyValue/icon": icon +"/chat:v1/KeyValue/iconUrl": icon_url +"/chat:v1/KeyValue/onClick": on_click +"/chat:v1/KeyValue/topLabel": top_label +"/chat:v1/ListMembershipsResponse": list_memberships_response +"/chat:v1/ListMembershipsResponse/memberships": memberships +"/chat:v1/ListMembershipsResponse/memberships/membership": membership +"/chat:v1/ListMembershipsResponse/nextPageToken": next_page_token +"/chat:v1/ListSpacesResponse": list_spaces_response +"/chat:v1/ListSpacesResponse/nextPageToken": next_page_token +"/chat:v1/ListSpacesResponse/spaces": spaces +"/chat:v1/ListSpacesResponse/spaces/space": space +"/chat:v1/Membership": membership +"/chat:v1/Membership/createTime": create_time +"/chat:v1/Membership/member": member +"/chat:v1/Membership/name": name +"/chat:v1/Membership/state": state +"/chat:v1/Message": message +"/chat:v1/Message/actionResponse": action_response +"/chat:v1/Message/annotations": annotations +"/chat:v1/Message/annotations/annotation": annotation +"/chat:v1/Message/cards": cards +"/chat:v1/Message/cards/card": card +"/chat:v1/Message/createTime": create_time +"/chat:v1/Message/fallbackText": fallback_text +"/chat:v1/Message/name": name +"/chat:v1/Message/previewText": preview_text +"/chat:v1/Message/sender": sender +"/chat:v1/Message/space": space +"/chat:v1/Message/text": text +"/chat:v1/Message/thread": thread +"/chat:v1/OnClick": on_click +"/chat:v1/OnClick/action": action +"/chat:v1/OnClick/openLink": open_link +"/chat:v1/OpenLink": open_link +"/chat:v1/OpenLink/url": url +"/chat:v1/Section": section +"/chat:v1/Section/header": header +"/chat:v1/Section/widgets": widgets +"/chat:v1/Section/widgets/widget": widget +"/chat:v1/Space": space +"/chat:v1/Space/displayName": display_name +"/chat:v1/Space/name": name +"/chat:v1/Space/type": type +"/chat:v1/TextButton": text_button +"/chat:v1/TextButton/onClick": on_click +"/chat:v1/TextButton/text": text +"/chat:v1/TextParagraph": text_paragraph +"/chat:v1/TextParagraph/text": text +"/chat:v1/Thread": thread +"/chat:v1/Thread/name": name +"/chat:v1/User": user +"/chat:v1/User/displayName": display_name +"/chat:v1/User/name": name +"/chat:v1/User/type": type +"/chat:v1/UserMentionMetadata": user_mention_metadata +"/chat:v1/UserMentionMetadata/type": type +"/chat:v1/UserMentionMetadata/user": user +"/chat:v1/WidgetMarkup": widget_markup +"/chat:v1/WidgetMarkup/buttons": buttons +"/chat:v1/WidgetMarkup/buttons/button": button +"/chat:v1/WidgetMarkup/image": image +"/chat:v1/WidgetMarkup/keyValue": key_value +"/chat:v1/WidgetMarkup/textParagraph": text_paragraph +"/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.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.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.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.spaces.get": get_space +"/chat:v1/chat.spaces.get/name": name +"/chat:v1/chat.spaces.list": list_spaces +"/chat:v1/chat.spaces.list/pageSize": page_size +"/chat:v1/chat.spaces.list/pageToken": page_token +"/chat:v1/chat.spaces.members.get": get_space_member +"/chat:v1/chat.spaces.members.get/name": name +"/chat:v1/chat.spaces.members.list": list_space_members +"/chat:v1/chat.spaces.members.list/pageSize": page_size +"/chat:v1/chat.spaces.members.list/pageToken": page_token +"/chat:v1/chat.spaces.members.list/parent": parent +"/chat:v1/chat.spaces.messages.create": create_space_message +"/chat:v1/chat.spaces.messages.create/parent": parent +"/chat:v1/chat.spaces.messages.create/threadKey": thread_key +"/chat:v1/chat.spaces.messages.delete": delete_space_message +"/chat:v1/chat.spaces.messages.delete/name": name +"/chat:v1/chat.spaces.messages.get": get_space_message +"/chat:v1/chat.spaces.messages.get/name": name +"/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/fields": fields +"/chat:v1/key": key +"/chat:v1/quotaUser": quota_user "/civicinfo:v2/AdministrationRegion": administration_region "/civicinfo:v2/AdministrationRegion/electionAdministrationBody": election_administration_body "/civicinfo:v2/AdministrationRegion/id": id diff --git a/generated/google/apis/androidenterprise_v1.rb b/generated/google/apis/androidenterprise_v1.rb index 62bb1dc34..99d2dd7fb 100644 --- a/generated/google/apis/androidenterprise_v1.rb +++ b/generated/google/apis/androidenterprise_v1.rb @@ -25,7 +25,7 @@ module Google # @see https://developers.google.com/android/work/play/emm-api module AndroidenterpriseV1 VERSION = 'V1' - REVISION = '20180131' + REVISION = '20180221' # Manage corporate Android devices AUTH_ANDROIDENTERPRISE = 'https://www.googleapis.com/auth/androidenterprise' diff --git a/generated/google/apis/androidenterprise_v1/classes.rb b/generated/google/apis/androidenterprise_v1/classes.rb index 17deb326c..66a944a5d 100644 --- a/generated/google/apis/androidenterprise_v1/classes.rb +++ b/generated/google/apis/androidenterprise_v1/classes.rb @@ -1591,6 +1591,14 @@ module Google class Policy include Google::Apis::Core::Hashable + # The auto-update policy for apps installed on the device. "choiceToTheUser" + # allows the device's user to configure the app update policy. "always" enables + # auto updates. "never" disables auto updates. "wifiOnly" enables auto updates + # only when the device is connected to wifi. + # Corresponds to the JSON property `autoUpdatePolicy` + # @return [String] + attr_accessor :auto_update_policy + # The availability granted to the device for the specified products. "all" gives # the device access to all products, regardless of approval status. "allApproved" # entitles the device to access all products that are approved for the @@ -1615,6 +1623,7 @@ module Google # Update properties of this object def update!(**args) + @auto_update_policy = args[:auto_update_policy] if args.key?(:auto_update_policy) @product_availability_policy = args[:product_availability_policy] if args.key?(:product_availability_policy) @product_policy = args[:product_policy] if args.key?(:product_policy) end diff --git a/generated/google/apis/androidenterprise_v1/representations.rb b/generated/google/apis/androidenterprise_v1/representations.rb index 8a7c6ba1c..695f7fbf5 100644 --- a/generated/google/apis/androidenterprise_v1/representations.rb +++ b/generated/google/apis/androidenterprise_v1/representations.rb @@ -853,6 +853,7 @@ module Google class Policy # @private class Representation < Google::Apis::Core::JsonRepresentation + property :auto_update_policy, as: 'autoUpdatePolicy' property :product_availability_policy, as: 'productAvailabilityPolicy' collection :product_policy, as: 'productPolicy', class: Google::Apis::AndroidenterpriseV1::ProductPolicy, decorator: Google::Apis::AndroidenterpriseV1::ProductPolicy::Representation diff --git a/generated/google/apis/appengine_v1.rb b/generated/google/apis/appengine_v1.rb index a857a2a1a..241b9a980 100644 --- a/generated/google/apis/appengine_v1.rb +++ b/generated/google/apis/appengine_v1.rb @@ -18,7 +18,7 @@ require 'google/apis/appengine_v1/representations.rb' module Google module Apis - # Google App Engine Admin API + # App Engine Admin API # # The App Engine Admin API enables developers to provision and manage their App # Engine applications. @@ -26,7 +26,7 @@ module Google # @see https://cloud.google.com/appengine/docs/admin-api/ module AppengineV1 VERSION = 'V1' - REVISION = '20180209' + REVISION = '20180222' # View and manage your applications deployed on Google App Engine AUTH_APPENGINE_ADMIN = 'https://www.googleapis.com/auth/appengine.admin' diff --git a/generated/google/apis/appengine_v1/service.rb b/generated/google/apis/appengine_v1/service.rb index 0d133b41e..ee7e07f8e 100644 --- a/generated/google/apis/appengine_v1/service.rb +++ b/generated/google/apis/appengine_v1/service.rb @@ -20,7 +20,7 @@ require 'google/apis/errors' module Google module Apis module AppengineV1 - # Google App Engine Admin API + # App Engine Admin API # # The App Engine Admin API enables developers to provision and manage their App # Engine applications. diff --git a/generated/google/apis/appengine_v1alpha.rb b/generated/google/apis/appengine_v1alpha.rb index 49a2e9e5e..76f2ffd51 100644 --- a/generated/google/apis/appengine_v1alpha.rb +++ b/generated/google/apis/appengine_v1alpha.rb @@ -18,7 +18,7 @@ require 'google/apis/appengine_v1alpha/representations.rb' module Google module Apis - # Google App Engine Admin API + # App Engine Admin API # # The App Engine Admin API enables developers to provision and manage their App # Engine applications. @@ -26,7 +26,7 @@ module Google # @see https://cloud.google.com/appengine/docs/admin-api/ module AppengineV1alpha VERSION = 'V1alpha' - REVISION = '20180209' + REVISION = '20180222' # View and manage your applications deployed on Google App Engine AUTH_APPENGINE_ADMIN = 'https://www.googleapis.com/auth/appengine.admin' diff --git a/generated/google/apis/appengine_v1alpha/service.rb b/generated/google/apis/appengine_v1alpha/service.rb index 4d8d8a16a..6291f10d5 100644 --- a/generated/google/apis/appengine_v1alpha/service.rb +++ b/generated/google/apis/appengine_v1alpha/service.rb @@ -20,7 +20,7 @@ require 'google/apis/errors' module Google module Apis module AppengineV1alpha - # Google App Engine Admin API + # App Engine Admin API # # The App Engine Admin API enables developers to provision and manage their App # Engine applications. diff --git a/generated/google/apis/appengine_v1beta.rb b/generated/google/apis/appengine_v1beta.rb index 08fd08f2f..349e38aea 100644 --- a/generated/google/apis/appengine_v1beta.rb +++ b/generated/google/apis/appengine_v1beta.rb @@ -18,7 +18,7 @@ require 'google/apis/appengine_v1beta/representations.rb' module Google module Apis - # Google App Engine Admin API + # App Engine Admin API # # The App Engine Admin API enables developers to provision and manage their App # Engine applications. @@ -26,7 +26,7 @@ module Google # @see https://cloud.google.com/appengine/docs/admin-api/ module AppengineV1beta VERSION = 'V1beta' - REVISION = '20180209' + REVISION = '20180222' # View and manage your applications deployed on Google App Engine AUTH_APPENGINE_ADMIN = 'https://www.googleapis.com/auth/appengine.admin' diff --git a/generated/google/apis/appengine_v1beta/service.rb b/generated/google/apis/appengine_v1beta/service.rb index 6d6e99581..f751095b7 100644 --- a/generated/google/apis/appengine_v1beta/service.rb +++ b/generated/google/apis/appengine_v1beta/service.rb @@ -20,7 +20,7 @@ require 'google/apis/errors' module Google module Apis module AppengineV1beta - # Google App Engine Admin API + # App Engine Admin API # # The App Engine Admin API enables developers to provision and manage their App # Engine applications. diff --git a/generated/google/apis/appengine_v1beta4.rb b/generated/google/apis/appengine_v1beta4.rb index 050963878..666106bda 100644 --- a/generated/google/apis/appengine_v1beta4.rb +++ b/generated/google/apis/appengine_v1beta4.rb @@ -18,7 +18,7 @@ require 'google/apis/appengine_v1beta4/representations.rb' module Google module Apis - # Google App Engine Admin API + # App Engine Admin API # # The App Engine Admin API enables developers to provision and manage their App # Engine applications. @@ -26,7 +26,7 @@ module Google # @see https://cloud.google.com/appengine/docs/admin-api/ module AppengineV1beta4 VERSION = 'V1beta4' - REVISION = '20180209' + REVISION = '20180222' # View and manage your applications deployed on Google App Engine AUTH_APPENGINE_ADMIN = 'https://www.googleapis.com/auth/appengine.admin' diff --git a/generated/google/apis/appengine_v1beta4/service.rb b/generated/google/apis/appengine_v1beta4/service.rb index 9705238a1..72a5673b6 100644 --- a/generated/google/apis/appengine_v1beta4/service.rb +++ b/generated/google/apis/appengine_v1beta4/service.rb @@ -20,7 +20,7 @@ require 'google/apis/errors' module Google module Apis module AppengineV1beta4 - # Google App Engine Admin API + # App Engine Admin API # # The App Engine Admin API enables developers to provision and manage their App # Engine applications. diff --git a/generated/google/apis/appengine_v1beta5.rb b/generated/google/apis/appengine_v1beta5.rb index ffdf640cb..f32f97668 100644 --- a/generated/google/apis/appengine_v1beta5.rb +++ b/generated/google/apis/appengine_v1beta5.rb @@ -18,7 +18,7 @@ require 'google/apis/appengine_v1beta5/representations.rb' module Google module Apis - # Google App Engine Admin API + # App Engine Admin API # # The App Engine Admin API enables developers to provision and manage their App # Engine applications. @@ -26,7 +26,7 @@ module Google # @see https://cloud.google.com/appengine/docs/admin-api/ module AppengineV1beta5 VERSION = 'V1beta5' - REVISION = '20180209' + REVISION = '20180222' # View and manage your applications deployed on Google App Engine AUTH_APPENGINE_ADMIN = 'https://www.googleapis.com/auth/appengine.admin' diff --git a/generated/google/apis/appengine_v1beta5/service.rb b/generated/google/apis/appengine_v1beta5/service.rb index 3ab4b9fbf..052fb65cb 100644 --- a/generated/google/apis/appengine_v1beta5/service.rb +++ b/generated/google/apis/appengine_v1beta5/service.rb @@ -20,7 +20,7 @@ require 'google/apis/errors' module Google module Apis module AppengineV1beta5 - # Google App Engine Admin API + # App Engine Admin API # # The App Engine Admin API enables developers to provision and manage their App # Engine applications. diff --git a/generated/google/apis/chat_v1.rb b/generated/google/apis/chat_v1.rb new file mode 100644 index 000000000..b8eb45fb9 --- /dev/null +++ b/generated/google/apis/chat_v1.rb @@ -0,0 +1,31 @@ +# Copyright 2015 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +require 'google/apis/chat_v1/service.rb' +require 'google/apis/chat_v1/classes.rb' +require 'google/apis/chat_v1/representations.rb' + +module Google + module Apis + # Hangouts Chat API + # + # + # + # @see https://developers.google.com/hangouts/chat + module ChatV1 + VERSION = 'V1' + REVISION = '20180227' + end + end +end diff --git a/generated/google/apis/chat_v1/classes.rb b/generated/google/apis/chat_v1/classes.rb new file mode 100644 index 000000000..488595226 --- /dev/null +++ b/generated/google/apis/chat_v1/classes.rb @@ -0,0 +1,890 @@ +# Copyright 2015 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +require 'date' +require 'google/apis/core/base_service' +require 'google/apis/core/json_representation' +require 'google/apis/core/hashable' +require 'google/apis/errors' + +module Google + module Apis + module ChatV1 + + # List of string parameters to supply when the action method is invoked. + # For example, consider three snooze buttons: snooze now, snooze 1 day, + # snooze next week. You might use action method = snooze(), passing the + # snooze type and snooze time in the list of string parameters. + class ActionParameter + include Google::Apis::Core::Hashable + + # The name of the parameter for the action script. + # Corresponds to the JSON property `key` + # @return [String] + attr_accessor :key + + # The value of the parameter. + # Corresponds to the JSON property `value` + # @return [String] + attr_accessor :value + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @key = args[:key] if args.key?(:key) + @value = args[:value] if args.key?(:value) + end + end + + # Parameters that a bot can use to configure how it's response is posted. + class ActionResponse + include Google::Apis::Core::Hashable + + # The type of bot response. + # Corresponds to the JSON property `type` + # @return [String] + attr_accessor :type + + # URL for users to auth or config. (Only for REQUEST_CONFIG response types.) + # Corresponds to the JSON property `url` + # @return [String] + attr_accessor :url + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @type = args[:type] if args.key?(:type) + @url = args[:url] if args.key?(:url) + end + end + + # Annotations associated with the plain-text body of the message. + # Example plain-text message body: + # ``` + # Hello @FooBot how are you!" + # ``` + # The corresponding annotations metadata: + # ``` + # "annotations":[` + # "type":"USER_MENTION", + # "startIndex":6, + # "length":7, + # "userMention": ` + # "user": ` + # "name":"users/107946847022116401880", + # "displayName":"FooBot", + # "avatarUrl":"https://goo.gl/aeDtrS", + # "type":"BOT" + # `, + # "type":"MENTION" + # ` + # `] + # ``` + class Annotation + include Google::Apis::Core::Hashable + + # Length of the substring in the plain-text message body this annotation + # corresponds to. + # Corresponds to the JSON property `length` + # @return [Fixnum] + attr_accessor :length + + # Start index (0-based, inclusive) in the plain-text message body this + # annotation corresponds to. + # Corresponds to the JSON property `startIndex` + # @return [Fixnum] + attr_accessor :start_index + + # The type of this annotation. + # Corresponds to the JSON property `type` + # @return [String] + attr_accessor :type + + # Annotation metadata for user mentions (@). + # Corresponds to the JSON property `userMention` + # @return [Google::Apis::ChatV1::UserMentionMetadata] + attr_accessor :user_mention + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @length = args[:length] if args.key?(:length) + @start_index = args[:start_index] if args.key?(:start_index) + @type = args[:type] if args.key?(:type) + @user_mention = args[:user_mention] if args.key?(:user_mention) + end + end + + # A button. Can be a text button or an image button. + class Button + include Google::Apis::Core::Hashable + + # An image button with an onclick action. + # Corresponds to the JSON property `imageButton` + # @return [Google::Apis::ChatV1::ImageButton] + attr_accessor :image_button + + # A button with text and onclick action. + # Corresponds to the JSON property `textButton` + # @return [Google::Apis::ChatV1::TextButton] + attr_accessor :text_button + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @image_button = args[:image_button] if args.key?(:image_button) + @text_button = args[:text_button] if args.key?(:text_button) + end + end + + # A card is a UI element that can contain UI widgets such as texts, images. + class Card + include Google::Apis::Core::Hashable + + # The actions of this card. + # Corresponds to the JSON property `cardActions` + # @return [Array] + attr_accessor :card_actions + + # The header of the card. A header usually contains a title and an image. + # Corresponds to the JSON property `header` + # @return [Google::Apis::ChatV1::CardHeader] + attr_accessor :header + + # Name of the card. + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + # Sections are separated by a line divider. + # Corresponds to the JSON property `sections` + # @return [Array] + attr_accessor :sections + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @card_actions = args[:card_actions] if args.key?(:card_actions) + @header = args[:header] if args.key?(:header) + @name = args[:name] if args.key?(:name) + @sections = args[:sections] if args.key?(:sections) + end + end + + # A card action is + # the action associated with the card. For an invoice card, a + # typical action would be: delete invoice, email invoice or open the + # invoice in browser. + class CardAction + include Google::Apis::Core::Hashable + + # The label used to be displayed in the action menu item. + # Corresponds to the JSON property `actionLabel` + # @return [String] + attr_accessor :action_label + + # An onclick action (e.g. open a link). + # Corresponds to the JSON property `onClick` + # @return [Google::Apis::ChatV1::OnClick] + attr_accessor :on_click + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @action_label = args[:action_label] if args.key?(:action_label) + @on_click = args[:on_click] if args.key?(:on_click) + end + end + + # + class CardHeader + include Google::Apis::Core::Hashable + + # The image's type (e.g. square border or circular border). + # Corresponds to the JSON property `imageStyle` + # @return [String] + attr_accessor :image_style + + # The URL of the image in the card header. + # Corresponds to the JSON property `imageUrl` + # @return [String] + attr_accessor :image_url + + # The subtitle of the card header. + # Corresponds to the JSON property `subtitle` + # @return [String] + attr_accessor :subtitle + + # The title must be specified. The header has a fixed height: if both a + # title and subtitle is specified, each will take up 1 line. If only the + # title is specified, it will take up both lines. + # Corresponds to the JSON property `title` + # @return [String] + attr_accessor :title + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @image_style = args[:image_style] if args.key?(:image_style) + @image_url = args[:image_url] if args.key?(:image_url) + @subtitle = args[:subtitle] if args.key?(:subtitle) + @title = args[:title] if args.key?(:title) + end + end + + # A generic empty message that you can re-use to avoid defining duplicated + # empty messages in your APIs. A typical example is to use it as the request + # or the response type of an API method. For instance: + # service Foo ` + # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); + # ` + # The JSON representation for `Empty` is empty JSON object ````. + class Empty + include Google::Apis::Core::Hashable + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + end + end + + # A form action describes the behavior when the form is submitted. + # For example, an Apps Script can be invoked to handle the form. + class FormAction + include Google::Apis::Core::Hashable + + # Apps Script function to invoke when the containing element is + # clicked/activated. + # Corresponds to the JSON property `actionMethodName` + # @return [String] + attr_accessor :action_method_name + + # List of action parameters. + # Corresponds to the JSON property `parameters` + # @return [Array] + attr_accessor :parameters + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @action_method_name = args[:action_method_name] if args.key?(:action_method_name) + @parameters = args[:parameters] if args.key?(:parameters) + end + end + + # An image that is specified by a URL and can have an onclick action. + class Image + include Google::Apis::Core::Hashable + + # The aspect ratio of this image (width/height). + # Corresponds to the JSON property `aspectRatio` + # @return [Float] + attr_accessor :aspect_ratio + + # The URL of the image. + # Corresponds to the JSON property `imageUrl` + # @return [String] + attr_accessor :image_url + + # An onclick action (e.g. open a link). + # Corresponds to the JSON property `onClick` + # @return [Google::Apis::ChatV1::OnClick] + attr_accessor :on_click + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @aspect_ratio = args[:aspect_ratio] if args.key?(:aspect_ratio) + @image_url = args[:image_url] if args.key?(:image_url) + @on_click = args[:on_click] if args.key?(:on_click) + end + end + + # An image button with an onclick action. + class ImageButton + include Google::Apis::Core::Hashable + + # The icon specified by an enum that indices to an icon provided by Chat + # API. + # Corresponds to the JSON property `icon` + # @return [String] + attr_accessor :icon + + # The icon specified by a URL. + # Corresponds to the JSON property `iconUrl` + # @return [String] + attr_accessor :icon_url + + # The name of this image_button which will be used for accessibility. + # Default value will be provided if developers don't specify. + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + # An onclick action (e.g. open a link). + # Corresponds to the JSON property `onClick` + # @return [Google::Apis::ChatV1::OnClick] + attr_accessor :on_click + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @icon = args[:icon] if args.key?(:icon) + @icon_url = args[:icon_url] if args.key?(:icon_url) + @name = args[:name] if args.key?(:name) + @on_click = args[:on_click] if args.key?(:on_click) + end + end + + # A UI element contains a key (label) and a value (content). And this + # element may also contain some actions such as onclick button. + class KeyValue + include Google::Apis::Core::Hashable + + # The text of the bottom label. Formatted text supported. + # Corresponds to the JSON property `bottomLabel` + # @return [String] + attr_accessor :bottom_label + + # A button. Can be a text button or an image button. + # Corresponds to the JSON property `button` + # @return [Google::Apis::ChatV1::Button] + attr_accessor :button + + # The text of the content. Formatted text supported and always required. + # Corresponds to the JSON property `content` + # @return [String] + attr_accessor :content + + # If the content should be multiline. + # Corresponds to the JSON property `contentMultiline` + # @return [Boolean] + attr_accessor :content_multiline + alias_method :content_multiline?, :content_multiline + + # An enum value that will be replaced by the Chat API with the + # corresponding icon image. + # Corresponds to the JSON property `icon` + # @return [String] + attr_accessor :icon + + # The icon specified by a URL. + # Corresponds to the JSON property `iconUrl` + # @return [String] + attr_accessor :icon_url + + # An onclick action (e.g. open a link). + # Corresponds to the JSON property `onClick` + # @return [Google::Apis::ChatV1::OnClick] + attr_accessor :on_click + + # The text of the top label. Formatted text supported. + # Corresponds to the JSON property `topLabel` + # @return [String] + attr_accessor :top_label + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @bottom_label = args[:bottom_label] if args.key?(:bottom_label) + @button = args[:button] if args.key?(:button) + @content = args[:content] if args.key?(:content) + @content_multiline = args[:content_multiline] if args.key?(:content_multiline) + @icon = args[:icon] if args.key?(:icon) + @icon_url = args[:icon_url] if args.key?(:icon_url) + @on_click = args[:on_click] if args.key?(:on_click) + @top_label = args[:top_label] if args.key?(:top_label) + end + end + + # + class ListMembershipsResponse + include Google::Apis::Core::Hashable + + # List of memberships in the requested (or first) page. + # Corresponds to the JSON property `memberships` + # @return [Array] + attr_accessor :memberships + + # Continuation token to retrieve the next page of results. It will be empty + # for the last page of results. + # Corresponds to the JSON property `nextPageToken` + # @return [String] + attr_accessor :next_page_token + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @memberships = args[:memberships] if args.key?(:memberships) + @next_page_token = args[:next_page_token] if args.key?(:next_page_token) + end + end + + # + class ListSpacesResponse + include Google::Apis::Core::Hashable + + # Continuation token to retrieve the next page of results. It will be empty + # for the last page of results. Tokens expire in an hour. An error is thrown + # if an expired token is passed. + # Corresponds to the JSON property `nextPageToken` + # @return [String] + attr_accessor :next_page_token + + # List of spaces in the requested (or first) page. + # Corresponds to the JSON property `spaces` + # @return [Array] + attr_accessor :spaces + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @next_page_token = args[:next_page_token] if args.key?(:next_page_token) + @spaces = args[:spaces] if args.key?(:spaces) + end + end + + # Represents a membership relation in Hangouts Chat. + class Membership + include Google::Apis::Core::Hashable + + # The creation time of the membership a.k.a the time at which the member + # joined the space, if applicable. + # Corresponds to the JSON property `createTime` + # @return [String] + attr_accessor :create_time + + # A user in Hangouts Chat. + # Corresponds to the JSON property `member` + # @return [Google::Apis::ChatV1::User] + attr_accessor :member + + # Resource name of the membership, in the form "spaces/*/members/*". + # Example: spaces/AAAAMpdlehY/members/105115627578887013105 + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + # State of the membership. + # Corresponds to the JSON property `state` + # @return [String] + attr_accessor :state + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @create_time = args[:create_time] if args.key?(:create_time) + @member = args[:member] if args.key?(:member) + @name = args[:name] if args.key?(:name) + @state = args[:state] if args.key?(:state) + end + end + + # A message in Hangouts Chat. + class Message + include Google::Apis::Core::Hashable + + # Parameters that a bot can use to configure how it's response is posted. + # Corresponds to the JSON property `actionResponse` + # @return [Google::Apis::ChatV1::ActionResponse] + attr_accessor :action_response + + # Output only. Annotations associated with the text in this message. + # Corresponds to the JSON property `annotations` + # @return [Array] + attr_accessor :annotations + + # Rich, formatted and interactive cards that can be used to display UI + # elements such as: formatted texts, buttons, clickable images. Cards are + # normally displayed below the plain-text body of the message. + # Corresponds to the JSON property `cards` + # @return [Array] + attr_accessor :cards + + # Output only. The time at which the message was created in Hangouts Chat + # server. + # Corresponds to the JSON property `createTime` + # @return [String] + attr_accessor :create_time + + # A plain-text description of the message's cards, used when the actual cards + # cannot be displayed (e.g. mobile notifications). + # Corresponds to the JSON property `fallbackText` + # @return [String] + attr_accessor :fallback_text + + # Resource name, in the form "spaces/*/messages/*". + # Example: spaces/AAAAMpdlehY/messages/UMxbHmzDlr4.UMxbHmzDlr4 + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + # Text for generating preview chips. This text will not be displayed to the + # user, but any links to images, web pages, videos, etc. included here will + # generate preview chips. + # Corresponds to the JSON property `previewText` + # @return [String] + attr_accessor :preview_text + + # A user in Hangouts Chat. + # Corresponds to the JSON property `sender` + # @return [Google::Apis::ChatV1::User] + attr_accessor :sender + + # A room or DM in Hangouts Chat. + # Corresponds to the JSON property `space` + # @return [Google::Apis::ChatV1::Space] + attr_accessor :space + + # Plain-text body of the message. + # Corresponds to the JSON property `text` + # @return [String] + attr_accessor :text + + # A thread in Hangouts Chat. + # Corresponds to the JSON property `thread` + # @return [Google::Apis::ChatV1::Thread] + attr_accessor :thread + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @action_response = args[:action_response] if args.key?(:action_response) + @annotations = args[:annotations] if args.key?(:annotations) + @cards = args[:cards] if args.key?(:cards) + @create_time = args[:create_time] if args.key?(:create_time) + @fallback_text = args[:fallback_text] if args.key?(:fallback_text) + @name = args[:name] if args.key?(:name) + @preview_text = args[:preview_text] if args.key?(:preview_text) + @sender = args[:sender] if args.key?(:sender) + @space = args[:space] if args.key?(:space) + @text = args[:text] if args.key?(:text) + @thread = args[:thread] if args.key?(:thread) + end + end + + # An onclick action (e.g. open a link). + class OnClick + include Google::Apis::Core::Hashable + + # A form action describes the behavior when the form is submitted. + # For example, an Apps Script can be invoked to handle the form. + # Corresponds to the JSON property `action` + # @return [Google::Apis::ChatV1::FormAction] + attr_accessor :action + + # A link that opens a new window. + # Corresponds to the JSON property `openLink` + # @return [Google::Apis::ChatV1::OpenLink] + attr_accessor :open_link + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @action = args[:action] if args.key?(:action) + @open_link = args[:open_link] if args.key?(:open_link) + end + end + + # A link that opens a new window. + class OpenLink + include Google::Apis::Core::Hashable + + # The URL to open. + # Corresponds to the JSON property `url` + # @return [String] + attr_accessor :url + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @url = args[:url] if args.key?(:url) + end + end + + # A section contains a collection of widgets that are rendered + # (vertically) in the order that they are specified. Across all platforms, + # cards have a narrow fixed width, so + # there is currently no need for layout properties (e.g. float). + class Section + include Google::Apis::Core::Hashable + + # The header of the section, text formatted supported. + # Corresponds to the JSON property `header` + # @return [String] + attr_accessor :header + + # A section must contain at least 1 widget. + # Corresponds to the JSON property `widgets` + # @return [Array] + attr_accessor :widgets + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @header = args[:header] if args.key?(:header) + @widgets = args[:widgets] if args.key?(:widgets) + end + end + + # A room or DM in Hangouts Chat. + class Space + include Google::Apis::Core::Hashable + + # Output only. The display name (only if the space is a room). + # Corresponds to the JSON property `displayName` + # @return [String] + attr_accessor :display_name + + # Resource name of the space, in the form "spaces/*". + # Example: spaces/AAAAMpdlehYs + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + # Output only. The type of a space. + # Corresponds to the JSON property `type` + # @return [String] + attr_accessor :type + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @display_name = args[:display_name] if args.key?(:display_name) + @name = args[:name] if args.key?(:name) + @type = args[:type] if args.key?(:type) + end + end + + # A button with text and onclick action. + class TextButton + include Google::Apis::Core::Hashable + + # An onclick action (e.g. open a link). + # Corresponds to the JSON property `onClick` + # @return [Google::Apis::ChatV1::OnClick] + attr_accessor :on_click + + # The text of the button. + # Corresponds to the JSON property `text` + # @return [String] + attr_accessor :text + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @on_click = args[:on_click] if args.key?(:on_click) + @text = args[:text] if args.key?(:text) + end + end + + # A paragraph of text. Formatted text supported. + class TextParagraph + include Google::Apis::Core::Hashable + + # + # Corresponds to the JSON property `text` + # @return [String] + attr_accessor :text + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @text = args[:text] if args.key?(:text) + end + end + + # A thread in Hangouts Chat. + class Thread + include Google::Apis::Core::Hashable + + # Resource name, in the form "spaces/*/threads/*". + # Example: spaces/AAAAMpdlehY/threads/UMxbHmzDlr4 + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @name = args[:name] if args.key?(:name) + end + end + + # A user in Hangouts Chat. + class User + include Google::Apis::Core::Hashable + + # The user's display name. + # Corresponds to the JSON property `displayName` + # @return [String] + attr_accessor :display_name + + # Resource name, in the format "users/*". + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + # User type. + # Corresponds to the JSON property `type` + # @return [String] + attr_accessor :type + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @display_name = args[:display_name] if args.key?(:display_name) + @name = args[:name] if args.key?(:name) + @type = args[:type] if args.key?(:type) + end + end + + # Annotation metadata for user mentions (@). + class UserMentionMetadata + include Google::Apis::Core::Hashable + + # The type of user mention. + # Corresponds to the JSON property `type` + # @return [String] + attr_accessor :type + + # A user in Hangouts Chat. + # Corresponds to the JSON property `user` + # @return [Google::Apis::ChatV1::User] + attr_accessor :user + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @type = args[:type] if args.key?(:type) + @user = args[:user] if args.key?(:user) + end + end + + # A widget is a UI element that presents texts, images, etc. + class WidgetMarkup + include Google::Apis::Core::Hashable + + # A list of buttons. Buttons is also oneof data and only one of these + # fields should be set. + # Corresponds to the JSON property `buttons` + # @return [Array] + attr_accessor :buttons + + # An image that is specified by a URL and can have an onclick action. + # Corresponds to the JSON property `image` + # @return [Google::Apis::ChatV1::Image] + attr_accessor :image + + # A UI element contains a key (label) and a value (content). And this + # element may also contain some actions such as onclick button. + # Corresponds to the JSON property `keyValue` + # @return [Google::Apis::ChatV1::KeyValue] + attr_accessor :key_value + + # A paragraph of text. Formatted text supported. + # Corresponds to the JSON property `textParagraph` + # @return [Google::Apis::ChatV1::TextParagraph] + attr_accessor :text_paragraph + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @buttons = args[:buttons] if args.key?(:buttons) + @image = args[:image] if args.key?(:image) + @key_value = args[:key_value] if args.key?(:key_value) + @text_paragraph = args[:text_paragraph] if args.key?(:text_paragraph) + end + end + end + end +end diff --git a/generated/google/apis/chat_v1/representations.rb b/generated/google/apis/chat_v1/representations.rb new file mode 100644 index 000000000..cf6c7ba68 --- /dev/null +++ b/generated/google/apis/chat_v1/representations.rb @@ -0,0 +1,445 @@ +# Copyright 2015 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +require 'date' +require 'google/apis/core/base_service' +require 'google/apis/core/json_representation' +require 'google/apis/core/hashable' +require 'google/apis/errors' + +module Google + module Apis + module ChatV1 + + class ActionParameter + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ActionResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Annotation + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Button + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Card + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class CardAction + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class CardHeader + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Empty + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class FormAction + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Image + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ImageButton + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class KeyValue + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ListMembershipsResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ListSpacesResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Membership + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Message + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class OnClick + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class OpenLink + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Section + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Space + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class TextButton + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class TextParagraph + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Thread + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class User + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class UserMentionMetadata + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class WidgetMarkup + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ActionParameter + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :key, as: 'key' + property :value, as: 'value' + end + end + + class ActionResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :type, as: 'type' + property :url, as: 'url' + end + end + + class Annotation + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :length, as: 'length' + property :start_index, as: 'startIndex' + property :type, as: 'type' + property :user_mention, as: 'userMention', class: Google::Apis::ChatV1::UserMentionMetadata, decorator: Google::Apis::ChatV1::UserMentionMetadata::Representation + + end + end + + class Button + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :image_button, as: 'imageButton', class: Google::Apis::ChatV1::ImageButton, decorator: Google::Apis::ChatV1::ImageButton::Representation + + property :text_button, as: 'textButton', class: Google::Apis::ChatV1::TextButton, decorator: Google::Apis::ChatV1::TextButton::Representation + + end + end + + class Card + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :card_actions, as: 'cardActions', class: Google::Apis::ChatV1::CardAction, decorator: Google::Apis::ChatV1::CardAction::Representation + + property :header, as: 'header', class: Google::Apis::ChatV1::CardHeader, decorator: Google::Apis::ChatV1::CardHeader::Representation + + property :name, as: 'name' + collection :sections, as: 'sections', class: Google::Apis::ChatV1::Section, decorator: Google::Apis::ChatV1::Section::Representation + + end + end + + class CardAction + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :action_label, as: 'actionLabel' + property :on_click, as: 'onClick', class: Google::Apis::ChatV1::OnClick, decorator: Google::Apis::ChatV1::OnClick::Representation + + end + end + + class CardHeader + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :image_style, as: 'imageStyle' + property :image_url, as: 'imageUrl' + property :subtitle, as: 'subtitle' + property :title, as: 'title' + end + end + + class Empty + # @private + class Representation < Google::Apis::Core::JsonRepresentation + end + end + + class FormAction + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :action_method_name, as: 'actionMethodName' + collection :parameters, as: 'parameters', class: Google::Apis::ChatV1::ActionParameter, decorator: Google::Apis::ChatV1::ActionParameter::Representation + + end + end + + class Image + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :aspect_ratio, as: 'aspectRatio' + property :image_url, as: 'imageUrl' + property :on_click, as: 'onClick', class: Google::Apis::ChatV1::OnClick, decorator: Google::Apis::ChatV1::OnClick::Representation + + end + end + + class ImageButton + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :icon, as: 'icon' + property :icon_url, as: 'iconUrl' + property :name, as: 'name' + property :on_click, as: 'onClick', class: Google::Apis::ChatV1::OnClick, decorator: Google::Apis::ChatV1::OnClick::Representation + + end + end + + class KeyValue + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :bottom_label, as: 'bottomLabel' + property :button, as: 'button', class: Google::Apis::ChatV1::Button, decorator: Google::Apis::ChatV1::Button::Representation + + property :content, as: 'content' + property :content_multiline, as: 'contentMultiline' + property :icon, as: 'icon' + property :icon_url, as: 'iconUrl' + property :on_click, as: 'onClick', class: Google::Apis::ChatV1::OnClick, decorator: Google::Apis::ChatV1::OnClick::Representation + + property :top_label, as: 'topLabel' + end + end + + class ListMembershipsResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :memberships, as: 'memberships', class: Google::Apis::ChatV1::Membership, decorator: Google::Apis::ChatV1::Membership::Representation + + property :next_page_token, as: 'nextPageToken' + end + end + + class ListSpacesResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :next_page_token, as: 'nextPageToken' + collection :spaces, as: 'spaces', class: Google::Apis::ChatV1::Space, decorator: Google::Apis::ChatV1::Space::Representation + + end + end + + class Membership + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :create_time, as: 'createTime' + property :member, as: 'member', class: Google::Apis::ChatV1::User, decorator: Google::Apis::ChatV1::User::Representation + + property :name, as: 'name' + property :state, as: 'state' + end + end + + class Message + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :action_response, as: 'actionResponse', class: Google::Apis::ChatV1::ActionResponse, decorator: Google::Apis::ChatV1::ActionResponse::Representation + + collection :annotations, as: 'annotations', class: Google::Apis::ChatV1::Annotation, decorator: Google::Apis::ChatV1::Annotation::Representation + + collection :cards, as: 'cards', class: Google::Apis::ChatV1::Card, decorator: Google::Apis::ChatV1::Card::Representation + + property :create_time, as: 'createTime' + property :fallback_text, as: 'fallbackText' + property :name, as: 'name' + property :preview_text, as: 'previewText' + property :sender, as: 'sender', class: Google::Apis::ChatV1::User, decorator: Google::Apis::ChatV1::User::Representation + + property :space, as: 'space', class: Google::Apis::ChatV1::Space, decorator: Google::Apis::ChatV1::Space::Representation + + property :text, as: 'text' + property :thread, as: 'thread', class: Google::Apis::ChatV1::Thread, decorator: Google::Apis::ChatV1::Thread::Representation + + end + end + + class OnClick + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :action, as: 'action', class: Google::Apis::ChatV1::FormAction, decorator: Google::Apis::ChatV1::FormAction::Representation + + property :open_link, as: 'openLink', class: Google::Apis::ChatV1::OpenLink, decorator: Google::Apis::ChatV1::OpenLink::Representation + + end + end + + class OpenLink + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :url, as: 'url' + end + end + + class Section + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :header, as: 'header' + collection :widgets, as: 'widgets', class: Google::Apis::ChatV1::WidgetMarkup, decorator: Google::Apis::ChatV1::WidgetMarkup::Representation + + end + end + + class Space + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :display_name, as: 'displayName' + property :name, as: 'name' + property :type, as: 'type' + end + end + + class TextButton + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :on_click, as: 'onClick', class: Google::Apis::ChatV1::OnClick, decorator: Google::Apis::ChatV1::OnClick::Representation + + property :text, as: 'text' + end + end + + class TextParagraph + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :text, as: 'text' + end + end + + class Thread + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :name, as: 'name' + end + end + + class User + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :display_name, as: 'displayName' + property :name, as: 'name' + property :type, as: 'type' + end + end + + class UserMentionMetadata + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :type, as: 'type' + property :user, as: 'user', class: Google::Apis::ChatV1::User, decorator: Google::Apis::ChatV1::User::Representation + + end + end + + class WidgetMarkup + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :buttons, as: 'buttons', class: Google::Apis::ChatV1::Button, decorator: Google::Apis::ChatV1::Button::Representation + + property :image, as: 'image', class: Google::Apis::ChatV1::Image, decorator: Google::Apis::ChatV1::Image::Representation + + property :key_value, as: 'keyValue', class: Google::Apis::ChatV1::KeyValue, decorator: Google::Apis::ChatV1::KeyValue::Representation + + property :text_paragraph, as: 'textParagraph', class: Google::Apis::ChatV1::TextParagraph, decorator: Google::Apis::ChatV1::TextParagraph::Representation + + end + end + end + end +end diff --git a/generated/google/apis/chat_v1/service.rb b/generated/google/apis/chat_v1/service.rb new file mode 100644 index 000000000..b5f1c93f4 --- /dev/null +++ b/generated/google/apis/chat_v1/service.rb @@ -0,0 +1,524 @@ +# Copyright 2015 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +require 'google/apis/core/base_service' +require 'google/apis/core/json_representation' +require 'google/apis/core/hashable' +require 'google/apis/errors' + +module Google + module Apis + module ChatV1 + # Hangouts Chat API + # + # + # + # @example + # require 'google/apis/chat_v1' + # + # Chat = Google::Apis::ChatV1 # Alias the module + # service = Chat::HangoutsChatService.new + # + # @see https://developers.google.com/hangouts/chat + class HangoutsChatService < Google::Apis::Core::BaseService + # @return [String] + # API key. Your API key identifies your project and provides you with API access, + # quota, and reports. Required unless you provide an OAuth 2.0 token. + attr_accessor :key + + # @return [String] + # 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. + attr_accessor :quota_user + + def initialize + super('https://chat.googleapis.com/', '') + @batch_path = 'batch' + end + + # Creates a message. + # @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 create_dm_conversation_message(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 + + # Creates a message. + # @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 create_dm_message(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 + + # Creates a message. + # @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 create_room_conversation_message(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 + + # Creates a message. + # @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 create_room_message(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/AAAAMpdlehY + # @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::Space] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::ChatV1::Space] + # + # @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 get_space(name, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v1/{+name}', options) + command.response_representation = Google::Apis::ChatV1::Space::Representation + command.response_class = Google::Apis::ChatV1::Space + command.params['name'] = name unless name.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Lists spaces the caller is a member of. + # @param [Fixnum] page_size + # Requested page size. The value is capped at 1000. + # Server may return fewer results than requested. + # If unspecified, server will default to 100. + # @param [String] page_token + # A token identifying a page of results the server should return. + # @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::ListSpacesResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::ChatV1::ListSpacesResponse] + # + # @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 list_spaces(page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v1/spaces', options) + command.response_representation = Google::Apis::ChatV1::ListSpacesResponse::Representation + command.response_class = Google::Apis::ChatV1::ListSpacesResponse + command.query['pageSize'] = page_size unless page_size.nil? + command.query['pageToken'] = page_token unless page_token.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/*/members/*". + # Example: spaces/AAAAMpdlehY/members/105115627578887013105 + # @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::Membership] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::ChatV1::Membership] + # + # @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 get_space_member(name, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v1/{+name}', options) + command.response_representation = Google::Apis::ChatV1::Membership::Representation + command.response_class = Google::Apis::ChatV1::Membership + command.params['name'] = name unless name.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Lists human memberships in a space. + # @param [String] parent + # Required. The resource name of the space for which membership list is to be + # fetched, in the form "spaces/*". + # Example: spaces/AAAAMpdlehY + # @param [Fixnum] page_size + # Requested page size. The value is capped at 1000. + # Server may return fewer results than requested. + # If unspecified, server will default to 100. + # @param [String] page_token + # A token identifying a page of results the server should return. + # @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::ListMembershipsResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::ChatV1::ListMembershipsResponse] + # + # @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 list_space_members(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v1/{+parent}/members', options) + command.response_representation = Google::Apis::ChatV1::ListMembershipsResponse::Representation + command.response_class = Google::Apis::ChatV1::ListMembershipsResponse + command.params['parent'] = parent unless parent.nil? + command.query['pageSize'] = page_size unless page_size.nil? + command.query['pageToken'] = page_token unless page_token.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Creates a message. + # @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 create_space_message(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 + + # Deletes a message. + # @param [String] name + # Required. Resource name of the message to be deleted, in the form + # "spaces/*/messages/*" + # Example: spaces/AAAAMpdlehY/messages/UMxbHmzDlr4.UMxbHmzDlr4 + # @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::Empty] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::ChatV1::Empty] + # + # @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 delete_space_message(name, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:delete, 'v1/{+name}', options) + command.response_representation = Google::Apis::ChatV1::Empty::Representation + command.response_class = Google::Apis::ChatV1::Empty + command.params['name'] = name unless name.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 message. + # @param [String] name + # Required. Resource name of the message to be retrieved, in the form + # "spaces/*/messages/*". + # Example: spaces/AAAAMpdlehY/messages/UMxbHmzDlr4.UMxbHmzDlr4 + # @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 get_space_message(name, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v1/{+name}', options) + command.response_representation = Google::Apis::ChatV1::Message::Representation + command.response_class = Google::Apis::ChatV1::Message + command.params['name'] = name unless name.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Updates a message. + # @param [String] name + # Resource name, in the form "spaces/*/messages/*". + # Example: spaces/AAAAMpdlehY/messages/UMxbHmzDlr4.UMxbHmzDlr4 + # @param [Google::Apis::ChatV1::Message] message_object + # @param [String] update_mask + # Required. The field paths to be updated. + # Currently supported field paths: "text", "cards". + # @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 update_space_message(name, message_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:put, 'v1/{+name}', 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['name'] = name unless name.nil? + command.query['updateMask'] = update_mask unless update_mask.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + protected + + def apply_command_defaults(command) + command.query['key'] = key unless key.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + end + end + end + end +end diff --git a/generated/google/apis/cloudiot_v1.rb b/generated/google/apis/cloudiot_v1.rb index 100579053..226c86446 100644 --- a/generated/google/apis/cloudiot_v1.rb +++ b/generated/google/apis/cloudiot_v1.rb @@ -18,7 +18,7 @@ require 'google/apis/cloudiot_v1/representations.rb' module Google module Apis - # Google Cloud IoT API + # Cloud IoT API # # Registers and manages IoT (Internet of Things) devices that connect to the # Google Cloud Platform. @@ -26,7 +26,7 @@ module Google # @see https://cloud.google.com/iot module CloudiotV1 VERSION = 'V1' - REVISION = '20180215' + REVISION = '20180222' # View and manage your data across Google Cloud Platform services AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform' diff --git a/generated/google/apis/cloudiot_v1/classes.rb b/generated/google/apis/cloudiot_v1/classes.rb index eae08ab31..a418d9a16 100644 --- a/generated/google/apis/cloudiot_v1/classes.rb +++ b/generated/google/apis/cloudiot_v1/classes.rb @@ -22,123 +22,6 @@ module Google module Apis module CloudiotV1 - # Specifies the audit configuration for a service. - # The configuration determines which permission types are logged, and what - # identities, if any, are exempted from logging. - # An AuditConfig must have one or more AuditLogConfigs. - # If there are AuditConfigs for both `allServices` and a specific service, - # the union of the two AuditConfigs is used for that service: the log_types - # specified in each AuditConfig are enabled, and the exempted_members in each - # AuditLogConfig are exempted. - # Example Policy with multiple AuditConfigs: - # ` - # "audit_configs": [ - # ` - # "service": "allServices" - # "audit_log_configs": [ - # ` - # "log_type": "DATA_READ", - # "exempted_members": [ - # "user:foo@gmail.com" - # ] - # `, - # ` - # "log_type": "DATA_WRITE", - # `, - # ` - # "log_type": "ADMIN_READ", - # ` - # ] - # `, - # ` - # "service": "fooservice.googleapis.com" - # "audit_log_configs": [ - # ` - # "log_type": "DATA_READ", - # `, - # ` - # "log_type": "DATA_WRITE", - # "exempted_members": [ - # "user:bar@gmail.com" - # ] - # ` - # ] - # ` - # ] - # ` - # For fooservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ - # logging. It also exempts foo@gmail.com from DATA_READ logging, and - # bar@gmail.com from DATA_WRITE logging. - class AuditConfig - include Google::Apis::Core::Hashable - - # The configuration for logging of each type of permission. - # Next ID: 4 - # Corresponds to the JSON property `auditLogConfigs` - # @return [Array] - attr_accessor :audit_log_configs - - # Specifies a service that will be enabled for audit logging. - # For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. - # `allServices` is a special value that covers all services. - # Corresponds to the JSON property `service` - # @return [String] - attr_accessor :service - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @audit_log_configs = args[:audit_log_configs] if args.key?(:audit_log_configs) - @service = args[:service] if args.key?(:service) - end - end - - # Provides the configuration for logging a type of permissions. - # Example: - # ` - # "audit_log_configs": [ - # ` - # "log_type": "DATA_READ", - # "exempted_members": [ - # "user:foo@gmail.com" - # ] - # `, - # ` - # "log_type": "DATA_WRITE", - # ` - # ] - # ` - # This enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting - # foo@gmail.com from DATA_READ logging. - class AuditLogConfig - include Google::Apis::Core::Hashable - - # Specifies the identities that do not cause logging for this type of - # permission. - # Follows the same format of Binding.members. - # Corresponds to the JSON property `exemptedMembers` - # @return [Array] - attr_accessor :exempted_members - - # The log type that this config enables. - # Corresponds to the JSON property `logType` - # @return [String] - attr_accessor :log_type - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @exempted_members = args[:exempted_members] if args.key?(:exempted_members) - @log_type = args[:log_type] if args.key?(:log_type) - end - end - # Associates `members` with a `role`. class Binding include Google::Apis::Core::Hashable @@ -550,7 +433,7 @@ module Google end end - # The configuration to forward telemetry events. + # The configuration for forwarding telemetry events. class EventNotificationConfig include Google::Apis::Core::Hashable @@ -560,7 +443,10 @@ module Google # @return [String] attr_accessor :pubsub_topic_name - # + # If the subfolder name matches this string exactly, this configuration will + # be used. The string must not include the leading '/' character. If empty, + # all strings are matched. This field is used only for telemetry events; + # subfolders are not supported for state changes. # Corresponds to the JSON property `subfolderMatches` # @return [String] attr_accessor :subfolder_matches @@ -781,11 +667,6 @@ module Google class Policy include Google::Apis::Core::Hashable - # Specifies cloud audit logging configuration for this policy. - # Corresponds to the JSON property `auditConfigs` - # @return [Array] - attr_accessor :audit_configs - # Associates a list of `members` to a `role`. # `bindings` with no members will result in an error. # Corresponds to the JSON property `bindings` @@ -817,7 +698,6 @@ module Google # Update properties of this object def update!(**args) - @audit_configs = args[:audit_configs] if args.key?(:audit_configs) @bindings = args[:bindings] if args.key?(:bindings) @etag = args[:etag] if args.key?(:etag) @version = args[:version] if args.key?(:version) @@ -933,15 +813,6 @@ module Google # @return [Google::Apis::CloudiotV1::Policy] attr_accessor :policy - # OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only - # the fields in the mask will be modified. If no mask is provided, the - # following default mask is used: - # paths: "bindings, etag" - # This field is only used by Cloud IAM. - # Corresponds to the JSON property `updateMask` - # @return [String] - attr_accessor :update_mask - def initialize(**args) update!(**args) end @@ -949,7 +820,6 @@ module Google # Update properties of this object def update!(**args) @policy = args[:policy] if args.key?(:policy) - @update_mask = args[:update_mask] if args.key?(:update_mask) end end diff --git a/generated/google/apis/cloudiot_v1/representations.rb b/generated/google/apis/cloudiot_v1/representations.rb index d68b5992d..6568df4d6 100644 --- a/generated/google/apis/cloudiot_v1/representations.rb +++ b/generated/google/apis/cloudiot_v1/representations.rb @@ -22,18 +22,6 @@ module Google module Apis module CloudiotV1 - class AuditConfig - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class AuditLogConfig - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - class Binding class Representation < Google::Apis::Core::JsonRepresentation; end @@ -190,23 +178,6 @@ module Google include Google::Apis::Core::JsonObjectSupport end - class AuditConfig - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :audit_log_configs, as: 'auditLogConfigs', class: Google::Apis::CloudiotV1::AuditLogConfig, decorator: Google::Apis::CloudiotV1::AuditLogConfig::Representation - - property :service, as: 'service' - end - end - - class AuditLogConfig - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :exempted_members, as: 'exemptedMembers' - property :log_type, as: 'logType' - end - end - class Binding # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -364,8 +335,6 @@ module Google class Policy # @private class Representation < Google::Apis::Core::JsonRepresentation - collection :audit_configs, as: 'auditConfigs', class: Google::Apis::CloudiotV1::AuditConfig, decorator: Google::Apis::CloudiotV1::AuditConfig::Representation - collection :bindings, as: 'bindings', class: Google::Apis::CloudiotV1::Binding, decorator: Google::Apis::CloudiotV1::Binding::Representation property :etag, :base64 => true, as: 'etag' @@ -404,7 +373,6 @@ module Google class Representation < Google::Apis::Core::JsonRepresentation property :policy, as: 'policy', class: Google::Apis::CloudiotV1::Policy, decorator: Google::Apis::CloudiotV1::Policy::Representation - property :update_mask, as: 'updateMask' end end diff --git a/generated/google/apis/cloudiot_v1/service.rb b/generated/google/apis/cloudiot_v1/service.rb index 0de4c5e14..1486f485c 100644 --- a/generated/google/apis/cloudiot_v1/service.rb +++ b/generated/google/apis/cloudiot_v1/service.rb @@ -20,7 +20,7 @@ require 'google/apis/errors' module Google module Apis module CloudiotV1 - # Google Cloud IoT API + # Cloud IoT API # # Registers and manages IoT (Internet of Things) devices that connect to the # Google Cloud Platform. diff --git a/generated/google/apis/serviceconsumermanagement_v1.rb b/generated/google/apis/serviceconsumermanagement_v1.rb index 68877c23b..513aaaaf2 100644 --- a/generated/google/apis/serviceconsumermanagement_v1.rb +++ b/generated/google/apis/serviceconsumermanagement_v1.rb @@ -26,7 +26,7 @@ module Google # @see https://cloud.google.com/service-consumer-management/docs/overview module ServiceconsumermanagementV1 VERSION = 'V1' - REVISION = '20180208' + REVISION = '20180227' # View and manage your data across Google Cloud Platform services AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform' diff --git a/generated/google/apis/serviceconsumermanagement_v1/classes.rb b/generated/google/apis/serviceconsumermanagement_v1/classes.rb index 42f56a7fb..b8592d122 100644 --- a/generated/google/apis/serviceconsumermanagement_v1/classes.rb +++ b/generated/google/apis/serviceconsumermanagement_v1/classes.rb @@ -524,7 +524,7 @@ module Google end end - # Describes billing configuration for new a Tenant Project + # Describes billing configuration for a new Tenant Project class BillingConfig include Google::Apis::Core::Hashable @@ -3651,7 +3651,7 @@ module Google class TenantProjectConfig include Google::Apis::Core::Hashable - # Describes billing configuration for new a Tenant Project + # Describes billing configuration for a new Tenant Project # Corresponds to the JSON property `billingConfig` # @return [Google::Apis::ServiceconsumermanagementV1::BillingConfig] attr_accessor :billing_config diff --git a/generated/google/apis/speech_v1.rb b/generated/google/apis/speech_v1.rb index 4063a20c2..18c6aa79e 100644 --- a/generated/google/apis/speech_v1.rb +++ b/generated/google/apis/speech_v1.rb @@ -25,7 +25,7 @@ module Google # @see https://cloud.google.com/speech/ module SpeechV1 VERSION = 'V1' - REVISION = '20180220' + REVISION = '20180227' # View and manage your data across Google Cloud Platform services AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform' diff --git a/generated/google/apis/speech_v1/classes.rb b/generated/google/apis/speech_v1/classes.rb index cd778cfd3..67fc0aec2 100644 --- a/generated/google/apis/speech_v1/classes.rb +++ b/generated/google/apis/speech_v1/classes.rb @@ -199,7 +199,9 @@ module Google attr_accessor :enable_word_time_offsets alias_method :enable_word_time_offsets?, :enable_word_time_offsets - # *Required* Encoding of audio data sent in all `RecognitionAudio` messages. + # Encoding of audio data sent in all `RecognitionAudio` messages. + # This field is optional for `FLAC` and `WAV` audio files and required + # for all other audio formats. For details, see AudioEncoding. # Corresponds to the JSON property `encoding` # @return [String] attr_accessor :encoding @@ -232,11 +234,13 @@ module Google attr_accessor :profanity_filter alias_method :profanity_filter?, :profanity_filter - # *Required* Sample rate in Hertz of the audio data sent in all + # Sample rate in Hertz of the audio data sent in all # `RecognitionAudio` messages. Valid values are: 8000-48000. # 16000 is optimal. For best results, set the sampling rate of the audio # source to 16000 Hz. If that's not possible, use the native sample rate of # the audio source (instead of re-sampling). + # This field is optional for `FLAC` and `WAV` audio files and required + # for all other audio formats. For details, see AudioEncoding. # Corresponds to the JSON property `sampleRateHertz` # @return [Fixnum] attr_accessor :sample_rate_hertz diff --git a/generated/google/apis/testing_v1.rb b/generated/google/apis/testing_v1.rb index 41283ddea..42a8dd89d 100644 --- a/generated/google/apis/testing_v1.rb +++ b/generated/google/apis/testing_v1.rb @@ -26,7 +26,7 @@ module Google # @see https://developers.google.com/cloud-test-lab/ module TestingV1 VERSION = 'V1' - REVISION = '20180208' + REVISION = '20180227' # View and manage your data across Google Cloud Platform services AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform' diff --git a/generated/google/apis/testing_v1/classes.rb b/generated/google/apis/testing_v1/classes.rb index 6e2dfc98b..be47a98a6 100644 --- a/generated/google/apis/testing_v1/classes.rb +++ b/generated/google/apis/testing_v1/classes.rb @@ -1532,7 +1532,7 @@ module Google end end - # A description of how to set up the device prior to running the test + # A description of how to set up the Android device prior to running the test. class TestSetup include Google::Apis::Core::Hashable @@ -1640,7 +1640,7 @@ module Google attr_accessor :disable_video_recording alias_method :disable_video_recording?, :disable_video_recording - # A description of how to set up the device prior to running the test + # A description of how to set up the Android device prior to running the test. # Corresponds to the JSON property `testSetup` # @return [Google::Apis::TestingV1::TestSetup] attr_accessor :test_setup