google-apps-chat-v1 0.11.1 → 0.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/google/apps/chat/v1/chat_service/client.rb +461 -2
- data/lib/google/apps/chat/v1/chat_service/credentials.rb +2 -0
- data/lib/google/apps/chat/v1/chat_service/paths.rb +14 -0
- data/lib/google/apps/chat/v1/chat_service/rest/client.rb +449 -2
- data/lib/google/apps/chat/v1/chat_service/rest/service_stub.rb +241 -0
- data/lib/google/apps/chat/v1/version.rb +1 -1
- data/lib/google/chat/v1/chat_service_pb.rb +1 -1
- data/lib/google/chat/v1/chat_service_services_pb.rb +52 -0
- data/lib/google/chat/v1/reaction_pb.rb +7 -1
- data/proto_docs/google/chat/v1/reaction.rb +136 -3
- metadata +6 -12
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bc2af733793c2f912dcd101ddab97320df0407ab4cea230b11ec900b3fa41079
|
4
|
+
data.tar.gz: dff5f7bcab2738cd1bb3784130b7f181a5a3a6dec2b7f08cfce6655e8291dfc6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d4ec70c1dc2aca7b07b1e377f77d351ff91e2d25e102b0925a5a0824a83b0c861d1914e0f5635f409cf43fc2f4ef5e753ff21e1976257ae5bf35e4d88a7ad1df
|
7
|
+
data.tar.gz: 584dfe5877b87cd0a67c8096678347beef44cc7c1e82c9617cd6ca8f67fcce0790cfd033bf6192bf0e7784ab6409994aec16dc0947667eeaa3032207b4b25ab6
|
@@ -191,6 +191,26 @@ module Google
|
|
191
191
|
initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
|
192
192
|
}
|
193
193
|
|
194
|
+
default_config.rpcs.create_custom_emoji.timeout = 30.0
|
195
|
+
default_config.rpcs.create_custom_emoji.retry_policy = {
|
196
|
+
initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
|
197
|
+
}
|
198
|
+
|
199
|
+
default_config.rpcs.get_custom_emoji.timeout = 30.0
|
200
|
+
default_config.rpcs.get_custom_emoji.retry_policy = {
|
201
|
+
initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
|
202
|
+
}
|
203
|
+
|
204
|
+
default_config.rpcs.list_custom_emojis.timeout = 30.0
|
205
|
+
default_config.rpcs.list_custom_emojis.retry_policy = {
|
206
|
+
initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
|
207
|
+
}
|
208
|
+
|
209
|
+
default_config.rpcs.delete_custom_emoji.timeout = 30.0
|
210
|
+
default_config.rpcs.delete_custom_emoji.retry_policy = {
|
211
|
+
initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
|
212
|
+
}
|
213
|
+
|
194
214
|
default_config.rpcs.get_space_read_state.timeout = 30.0
|
195
215
|
default_config.rpcs.get_space_read_state.retry_policy = {
|
196
216
|
initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
|
@@ -3364,8 +3384,7 @@ module Google
|
|
3364
3384
|
# AND user.name = "users/\\{user}"
|
3365
3385
|
# ```
|
3366
3386
|
#
|
3367
|
-
# Invalid queries are rejected
|
3368
|
-
# error.
|
3387
|
+
# Invalid queries are rejected with an `INVALID_ARGUMENT` error.
|
3369
3388
|
#
|
3370
3389
|
# @yield [response, operation] Access the result along with the RPC operation
|
3371
3390
|
# @yieldparam response [::Gapic::PagedEnumerable<::Google::Apps::Chat::V1::Reaction>]
|
@@ -3529,6 +3548,418 @@ module Google
|
|
3529
3548
|
raise ::Google::Cloud::Error.from_error(e)
|
3530
3549
|
end
|
3531
3550
|
|
3551
|
+
##
|
3552
|
+
# Creates a custom emoji.
|
3553
|
+
#
|
3554
|
+
# Custom emojis are only available for Google Workspace accounts, and the
|
3555
|
+
# administrator must turn custom emojis on for the organization. For more
|
3556
|
+
# information, see [Learn about custom emojis in Google
|
3557
|
+
# Chat](https://support.google.com/chat/answer/12800149) and
|
3558
|
+
# [Manage custom emoji
|
3559
|
+
# permissions](https://support.google.com/a/answer/12850085).
|
3560
|
+
#
|
3561
|
+
# Requires [user
|
3562
|
+
# authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).
|
3563
|
+
#
|
3564
|
+
# @overload create_custom_emoji(request, options = nil)
|
3565
|
+
# Pass arguments to `create_custom_emoji` via a request object, either of type
|
3566
|
+
# {::Google::Apps::Chat::V1::CreateCustomEmojiRequest} or an equivalent Hash.
|
3567
|
+
#
|
3568
|
+
# @param request [::Google::Apps::Chat::V1::CreateCustomEmojiRequest, ::Hash]
|
3569
|
+
# A request object representing the call parameters. Required. To specify no
|
3570
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
3571
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
3572
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
3573
|
+
#
|
3574
|
+
# @overload create_custom_emoji(custom_emoji: nil)
|
3575
|
+
# Pass arguments to `create_custom_emoji` via keyword arguments. Note that at
|
3576
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
3577
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
3578
|
+
#
|
3579
|
+
# @param custom_emoji [::Google::Apps::Chat::V1::CustomEmoji, ::Hash]
|
3580
|
+
# Required. The custom emoji to create.
|
3581
|
+
#
|
3582
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
3583
|
+
# @yieldparam response [::Google::Apps::Chat::V1::CustomEmoji]
|
3584
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
3585
|
+
#
|
3586
|
+
# @return [::Google::Apps::Chat::V1::CustomEmoji]
|
3587
|
+
#
|
3588
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
3589
|
+
#
|
3590
|
+
# @example Basic example
|
3591
|
+
# require "google/apps/chat/v1"
|
3592
|
+
#
|
3593
|
+
# # Create a client object. The client can be reused for multiple calls.
|
3594
|
+
# client = Google::Apps::Chat::V1::ChatService::Client.new
|
3595
|
+
#
|
3596
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
3597
|
+
# request = Google::Apps::Chat::V1::CreateCustomEmojiRequest.new
|
3598
|
+
#
|
3599
|
+
# # Call the create_custom_emoji method.
|
3600
|
+
# result = client.create_custom_emoji request
|
3601
|
+
#
|
3602
|
+
# # The returned object is of type Google::Apps::Chat::V1::CustomEmoji.
|
3603
|
+
# p result
|
3604
|
+
#
|
3605
|
+
def create_custom_emoji request, options = nil
|
3606
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
3607
|
+
|
3608
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Apps::Chat::V1::CreateCustomEmojiRequest
|
3609
|
+
|
3610
|
+
# Converts hash and nil to an options object
|
3611
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
3612
|
+
|
3613
|
+
# Customize the options with defaults
|
3614
|
+
metadata = @config.rpcs.create_custom_emoji.metadata.to_h
|
3615
|
+
|
3616
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
3617
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
3618
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
3619
|
+
gapic_version: ::Google::Apps::Chat::V1::VERSION
|
3620
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
3621
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
3622
|
+
|
3623
|
+
options.apply_defaults timeout: @config.rpcs.create_custom_emoji.timeout,
|
3624
|
+
metadata: metadata,
|
3625
|
+
retry_policy: @config.rpcs.create_custom_emoji.retry_policy
|
3626
|
+
|
3627
|
+
options.apply_defaults timeout: @config.timeout,
|
3628
|
+
metadata: @config.metadata,
|
3629
|
+
retry_policy: @config.retry_policy
|
3630
|
+
|
3631
|
+
@chat_service_stub.call_rpc :create_custom_emoji, request, options: options do |response, operation|
|
3632
|
+
yield response, operation if block_given?
|
3633
|
+
end
|
3634
|
+
rescue ::GRPC::BadStatus => e
|
3635
|
+
raise ::Google::Cloud::Error.from_error(e)
|
3636
|
+
end
|
3637
|
+
|
3638
|
+
##
|
3639
|
+
# Returns details about a custom emoji.
|
3640
|
+
#
|
3641
|
+
# Custom emojis are only available for Google Workspace accounts, and the
|
3642
|
+
# administrator must turn custom emojis on for the organization. For more
|
3643
|
+
# information, see [Learn about custom emojis in Google
|
3644
|
+
# Chat](https://support.google.com/chat/answer/12800149) and
|
3645
|
+
# [Manage custom emoji
|
3646
|
+
# permissions](https://support.google.com/a/answer/12850085).
|
3647
|
+
#
|
3648
|
+
# Requires [user
|
3649
|
+
# authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).
|
3650
|
+
#
|
3651
|
+
# @overload get_custom_emoji(request, options = nil)
|
3652
|
+
# Pass arguments to `get_custom_emoji` via a request object, either of type
|
3653
|
+
# {::Google::Apps::Chat::V1::GetCustomEmojiRequest} or an equivalent Hash.
|
3654
|
+
#
|
3655
|
+
# @param request [::Google::Apps::Chat::V1::GetCustomEmojiRequest, ::Hash]
|
3656
|
+
# A request object representing the call parameters. Required. To specify no
|
3657
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
3658
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
3659
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
3660
|
+
#
|
3661
|
+
# @overload get_custom_emoji(name: nil)
|
3662
|
+
# Pass arguments to `get_custom_emoji` via keyword arguments. Note that at
|
3663
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
3664
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
3665
|
+
#
|
3666
|
+
# @param name [::String]
|
3667
|
+
# Required. Resource name of the custom emoji.
|
3668
|
+
#
|
3669
|
+
# Format: `customEmojis/{customEmoji}`
|
3670
|
+
#
|
3671
|
+
# You can use the emoji name as an alias for `{customEmoji}`. For example,
|
3672
|
+
# `customEmojis/:example-emoji:` where `:example-emoji:` is the emoji name
|
3673
|
+
# for a custom emoji.
|
3674
|
+
#
|
3675
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
3676
|
+
# @yieldparam response [::Google::Apps::Chat::V1::CustomEmoji]
|
3677
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
3678
|
+
#
|
3679
|
+
# @return [::Google::Apps::Chat::V1::CustomEmoji]
|
3680
|
+
#
|
3681
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
3682
|
+
#
|
3683
|
+
# @example Basic example
|
3684
|
+
# require "google/apps/chat/v1"
|
3685
|
+
#
|
3686
|
+
# # Create a client object. The client can be reused for multiple calls.
|
3687
|
+
# client = Google::Apps::Chat::V1::ChatService::Client.new
|
3688
|
+
#
|
3689
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
3690
|
+
# request = Google::Apps::Chat::V1::GetCustomEmojiRequest.new
|
3691
|
+
#
|
3692
|
+
# # Call the get_custom_emoji method.
|
3693
|
+
# result = client.get_custom_emoji request
|
3694
|
+
#
|
3695
|
+
# # The returned object is of type Google::Apps::Chat::V1::CustomEmoji.
|
3696
|
+
# p result
|
3697
|
+
#
|
3698
|
+
def get_custom_emoji request, options = nil
|
3699
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
3700
|
+
|
3701
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Apps::Chat::V1::GetCustomEmojiRequest
|
3702
|
+
|
3703
|
+
# Converts hash and nil to an options object
|
3704
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
3705
|
+
|
3706
|
+
# Customize the options with defaults
|
3707
|
+
metadata = @config.rpcs.get_custom_emoji.metadata.to_h
|
3708
|
+
|
3709
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
3710
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
3711
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
3712
|
+
gapic_version: ::Google::Apps::Chat::V1::VERSION
|
3713
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
3714
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
3715
|
+
|
3716
|
+
header_params = {}
|
3717
|
+
if request.name
|
3718
|
+
header_params["name"] = request.name
|
3719
|
+
end
|
3720
|
+
|
3721
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
3722
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
3723
|
+
|
3724
|
+
options.apply_defaults timeout: @config.rpcs.get_custom_emoji.timeout,
|
3725
|
+
metadata: metadata,
|
3726
|
+
retry_policy: @config.rpcs.get_custom_emoji.retry_policy
|
3727
|
+
|
3728
|
+
options.apply_defaults timeout: @config.timeout,
|
3729
|
+
metadata: @config.metadata,
|
3730
|
+
retry_policy: @config.retry_policy
|
3731
|
+
|
3732
|
+
@chat_service_stub.call_rpc :get_custom_emoji, request, options: options do |response, operation|
|
3733
|
+
yield response, operation if block_given?
|
3734
|
+
end
|
3735
|
+
rescue ::GRPC::BadStatus => e
|
3736
|
+
raise ::Google::Cloud::Error.from_error(e)
|
3737
|
+
end
|
3738
|
+
|
3739
|
+
##
|
3740
|
+
# Lists custom emojis visible to the authenticated user.
|
3741
|
+
#
|
3742
|
+
# Custom emojis are only available for Google Workspace accounts, and the
|
3743
|
+
# administrator must turn custom emojis on for the organization. For more
|
3744
|
+
# information, see [Learn about custom emojis in Google
|
3745
|
+
# Chat](https://support.google.com/chat/answer/12800149) and
|
3746
|
+
# [Manage custom emoji
|
3747
|
+
# permissions](https://support.google.com/a/answer/12850085).
|
3748
|
+
#
|
3749
|
+
# Requires [user
|
3750
|
+
# authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).
|
3751
|
+
#
|
3752
|
+
# @overload list_custom_emojis(request, options = nil)
|
3753
|
+
# Pass arguments to `list_custom_emojis` via a request object, either of type
|
3754
|
+
# {::Google::Apps::Chat::V1::ListCustomEmojisRequest} or an equivalent Hash.
|
3755
|
+
#
|
3756
|
+
# @param request [::Google::Apps::Chat::V1::ListCustomEmojisRequest, ::Hash]
|
3757
|
+
# A request object representing the call parameters. Required. To specify no
|
3758
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
3759
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
3760
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
3761
|
+
#
|
3762
|
+
# @overload list_custom_emojis(page_size: nil, page_token: nil, filter: nil)
|
3763
|
+
# Pass arguments to `list_custom_emojis` via keyword arguments. Note that at
|
3764
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
3765
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
3766
|
+
#
|
3767
|
+
# @param page_size [::Integer]
|
3768
|
+
# Optional. The maximum number of custom emojis returned. The service can
|
3769
|
+
# return fewer custom emojis than this value. If unspecified, the default
|
3770
|
+
# value is 25. The maximum value is 200; values above 200 are changed to 200.
|
3771
|
+
# @param page_token [::String]
|
3772
|
+
# Optional. (If resuming from a previous query.)
|
3773
|
+
#
|
3774
|
+
# A page token received from a previous list custom emoji call. Provide this
|
3775
|
+
# to retrieve the subsequent page.
|
3776
|
+
#
|
3777
|
+
# When paginating, the filter value should match the call that provided the
|
3778
|
+
# page token. Passing a different value might lead to unexpected results.
|
3779
|
+
# @param filter [::String]
|
3780
|
+
# Optional. A query filter.
|
3781
|
+
#
|
3782
|
+
# Supports filtering by creator.
|
3783
|
+
#
|
3784
|
+
# To filter by creator, you must specify a valid value. Currently only
|
3785
|
+
# `creator("users/me")` and `NOT creator("users/me")` are accepted to filter
|
3786
|
+
# custom emojis by whether they were created by the calling user or not.
|
3787
|
+
#
|
3788
|
+
# For example, the following query returns custom emojis created by the
|
3789
|
+
# caller:
|
3790
|
+
# ```
|
3791
|
+
# creator("users/me")
|
3792
|
+
# ```
|
3793
|
+
#
|
3794
|
+
# Invalid queries are rejected with an `INVALID_ARGUMENT` error.
|
3795
|
+
#
|
3796
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
3797
|
+
# @yieldparam response [::Gapic::PagedEnumerable<::Google::Apps::Chat::V1::CustomEmoji>]
|
3798
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
3799
|
+
#
|
3800
|
+
# @return [::Gapic::PagedEnumerable<::Google::Apps::Chat::V1::CustomEmoji>]
|
3801
|
+
#
|
3802
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
3803
|
+
#
|
3804
|
+
# @example Basic example
|
3805
|
+
# require "google/apps/chat/v1"
|
3806
|
+
#
|
3807
|
+
# # Create a client object. The client can be reused for multiple calls.
|
3808
|
+
# client = Google::Apps::Chat::V1::ChatService::Client.new
|
3809
|
+
#
|
3810
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
3811
|
+
# request = Google::Apps::Chat::V1::ListCustomEmojisRequest.new
|
3812
|
+
#
|
3813
|
+
# # Call the list_custom_emojis method.
|
3814
|
+
# result = client.list_custom_emojis request
|
3815
|
+
#
|
3816
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
3817
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
3818
|
+
# result.each do |item|
|
3819
|
+
# # Each element is of type ::Google::Apps::Chat::V1::CustomEmoji.
|
3820
|
+
# p item
|
3821
|
+
# end
|
3822
|
+
#
|
3823
|
+
def list_custom_emojis request, options = nil
|
3824
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
3825
|
+
|
3826
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Apps::Chat::V1::ListCustomEmojisRequest
|
3827
|
+
|
3828
|
+
# Converts hash and nil to an options object
|
3829
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
3830
|
+
|
3831
|
+
# Customize the options with defaults
|
3832
|
+
metadata = @config.rpcs.list_custom_emojis.metadata.to_h
|
3833
|
+
|
3834
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
3835
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
3836
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
3837
|
+
gapic_version: ::Google::Apps::Chat::V1::VERSION
|
3838
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
3839
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
3840
|
+
|
3841
|
+
options.apply_defaults timeout: @config.rpcs.list_custom_emojis.timeout,
|
3842
|
+
metadata: metadata,
|
3843
|
+
retry_policy: @config.rpcs.list_custom_emojis.retry_policy
|
3844
|
+
|
3845
|
+
options.apply_defaults timeout: @config.timeout,
|
3846
|
+
metadata: @config.metadata,
|
3847
|
+
retry_policy: @config.retry_policy
|
3848
|
+
|
3849
|
+
@chat_service_stub.call_rpc :list_custom_emojis, request, options: options do |response, operation|
|
3850
|
+
response = ::Gapic::PagedEnumerable.new @chat_service_stub, :list_custom_emojis, request, response, operation, options
|
3851
|
+
yield response, operation if block_given?
|
3852
|
+
throw :response, response
|
3853
|
+
end
|
3854
|
+
rescue ::GRPC::BadStatus => e
|
3855
|
+
raise ::Google::Cloud::Error.from_error(e)
|
3856
|
+
end
|
3857
|
+
|
3858
|
+
##
|
3859
|
+
# Deletes a custom emoji. By default, users can only delete custom emoji they
|
3860
|
+
# created. [Emoji managers](https://support.google.com/a/answer/12850085)
|
3861
|
+
# assigned by the administrator can delete any custom emoji in the
|
3862
|
+
# organization. See [Learn about custom emojis in Google
|
3863
|
+
# Chat](https://support.google.com/chat/answer/12800149).
|
3864
|
+
#
|
3865
|
+
# Custom emojis are only available for Google Workspace accounts, and the
|
3866
|
+
# administrator must turn custom emojis on for the organization. For more
|
3867
|
+
# information, see [Learn about custom emojis in Google
|
3868
|
+
# Chat](https://support.google.com/chat/answer/12800149) and
|
3869
|
+
# [Manage custom emoji
|
3870
|
+
# permissions](https://support.google.com/a/answer/12850085).
|
3871
|
+
#
|
3872
|
+
# Requires [user
|
3873
|
+
# authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).
|
3874
|
+
#
|
3875
|
+
# @overload delete_custom_emoji(request, options = nil)
|
3876
|
+
# Pass arguments to `delete_custom_emoji` via a request object, either of type
|
3877
|
+
# {::Google::Apps::Chat::V1::DeleteCustomEmojiRequest} or an equivalent Hash.
|
3878
|
+
#
|
3879
|
+
# @param request [::Google::Apps::Chat::V1::DeleteCustomEmojiRequest, ::Hash]
|
3880
|
+
# A request object representing the call parameters. Required. To specify no
|
3881
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
3882
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
3883
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
3884
|
+
#
|
3885
|
+
# @overload delete_custom_emoji(name: nil)
|
3886
|
+
# Pass arguments to `delete_custom_emoji` via keyword arguments. Note that at
|
3887
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
3888
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
3889
|
+
#
|
3890
|
+
# @param name [::String]
|
3891
|
+
# Required. Resource name of the custom emoji to delete.
|
3892
|
+
#
|
3893
|
+
# Format: `customEmojis/{customEmoji}`
|
3894
|
+
#
|
3895
|
+
# You can use the emoji name as an alias for `{customEmoji}`. For example,
|
3896
|
+
# `customEmojis/:example-emoji:` where `:example-emoji:` is the emoji name
|
3897
|
+
# for a custom emoji.
|
3898
|
+
#
|
3899
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
3900
|
+
# @yieldparam response [::Google::Protobuf::Empty]
|
3901
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
3902
|
+
#
|
3903
|
+
# @return [::Google::Protobuf::Empty]
|
3904
|
+
#
|
3905
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
3906
|
+
#
|
3907
|
+
# @example Basic example
|
3908
|
+
# require "google/apps/chat/v1"
|
3909
|
+
#
|
3910
|
+
# # Create a client object. The client can be reused for multiple calls.
|
3911
|
+
# client = Google::Apps::Chat::V1::ChatService::Client.new
|
3912
|
+
#
|
3913
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
3914
|
+
# request = Google::Apps::Chat::V1::DeleteCustomEmojiRequest.new
|
3915
|
+
#
|
3916
|
+
# # Call the delete_custom_emoji method.
|
3917
|
+
# result = client.delete_custom_emoji request
|
3918
|
+
#
|
3919
|
+
# # The returned object is of type Google::Protobuf::Empty.
|
3920
|
+
# p result
|
3921
|
+
#
|
3922
|
+
def delete_custom_emoji request, options = nil
|
3923
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
3924
|
+
|
3925
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Apps::Chat::V1::DeleteCustomEmojiRequest
|
3926
|
+
|
3927
|
+
# Converts hash and nil to an options object
|
3928
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
3929
|
+
|
3930
|
+
# Customize the options with defaults
|
3931
|
+
metadata = @config.rpcs.delete_custom_emoji.metadata.to_h
|
3932
|
+
|
3933
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
3934
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
3935
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
3936
|
+
gapic_version: ::Google::Apps::Chat::V1::VERSION
|
3937
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
3938
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
3939
|
+
|
3940
|
+
header_params = {}
|
3941
|
+
if request.name
|
3942
|
+
header_params["name"] = request.name
|
3943
|
+
end
|
3944
|
+
|
3945
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
3946
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
3947
|
+
|
3948
|
+
options.apply_defaults timeout: @config.rpcs.delete_custom_emoji.timeout,
|
3949
|
+
metadata: metadata,
|
3950
|
+
retry_policy: @config.rpcs.delete_custom_emoji.retry_policy
|
3951
|
+
|
3952
|
+
options.apply_defaults timeout: @config.timeout,
|
3953
|
+
metadata: @config.metadata,
|
3954
|
+
retry_policy: @config.retry_policy
|
3955
|
+
|
3956
|
+
@chat_service_stub.call_rpc :delete_custom_emoji, request, options: options do |response, operation|
|
3957
|
+
yield response, operation if block_given?
|
3958
|
+
end
|
3959
|
+
rescue ::GRPC::BadStatus => e
|
3960
|
+
raise ::Google::Cloud::Error.from_error(e)
|
3961
|
+
end
|
3962
|
+
|
3532
3963
|
##
|
3533
3964
|
# Returns details about a user's read state within a space, used to identify
|
3534
3965
|
# read and unread messages. For an example, see [Get details about a user's
|
@@ -4615,6 +5046,26 @@ module Google
|
|
4615
5046
|
#
|
4616
5047
|
attr_reader :delete_reaction
|
4617
5048
|
##
|
5049
|
+
# RPC-specific configuration for `create_custom_emoji`
|
5050
|
+
# @return [::Gapic::Config::Method]
|
5051
|
+
#
|
5052
|
+
attr_reader :create_custom_emoji
|
5053
|
+
##
|
5054
|
+
# RPC-specific configuration for `get_custom_emoji`
|
5055
|
+
# @return [::Gapic::Config::Method]
|
5056
|
+
#
|
5057
|
+
attr_reader :get_custom_emoji
|
5058
|
+
##
|
5059
|
+
# RPC-specific configuration for `list_custom_emojis`
|
5060
|
+
# @return [::Gapic::Config::Method]
|
5061
|
+
#
|
5062
|
+
attr_reader :list_custom_emojis
|
5063
|
+
##
|
5064
|
+
# RPC-specific configuration for `delete_custom_emoji`
|
5065
|
+
# @return [::Gapic::Config::Method]
|
5066
|
+
#
|
5067
|
+
attr_reader :delete_custom_emoji
|
5068
|
+
##
|
4618
5069
|
# RPC-specific configuration for `get_space_read_state`
|
4619
5070
|
# @return [::Gapic::Config::Method]
|
4620
5071
|
#
|
@@ -4700,6 +5151,14 @@ module Google
|
|
4700
5151
|
@list_reactions = ::Gapic::Config::Method.new list_reactions_config
|
4701
5152
|
delete_reaction_config = parent_rpcs.delete_reaction if parent_rpcs.respond_to? :delete_reaction
|
4702
5153
|
@delete_reaction = ::Gapic::Config::Method.new delete_reaction_config
|
5154
|
+
create_custom_emoji_config = parent_rpcs.create_custom_emoji if parent_rpcs.respond_to? :create_custom_emoji
|
5155
|
+
@create_custom_emoji = ::Gapic::Config::Method.new create_custom_emoji_config
|
5156
|
+
get_custom_emoji_config = parent_rpcs.get_custom_emoji if parent_rpcs.respond_to? :get_custom_emoji
|
5157
|
+
@get_custom_emoji = ::Gapic::Config::Method.new get_custom_emoji_config
|
5158
|
+
list_custom_emojis_config = parent_rpcs.list_custom_emojis if parent_rpcs.respond_to? :list_custom_emojis
|
5159
|
+
@list_custom_emojis = ::Gapic::Config::Method.new list_custom_emojis_config
|
5160
|
+
delete_custom_emoji_config = parent_rpcs.delete_custom_emoji if parent_rpcs.respond_to? :delete_custom_emoji
|
5161
|
+
@delete_custom_emoji = ::Gapic::Config::Method.new delete_custom_emoji_config
|
4703
5162
|
get_space_read_state_config = parent_rpcs.get_space_read_state if parent_rpcs.respond_to? :get_space_read_state
|
4704
5163
|
@get_space_read_state = ::Gapic::Config::Method.new get_space_read_state_config
|
4705
5164
|
update_space_read_state_config = parent_rpcs.update_space_read_state if parent_rpcs.respond_to? :update_space_read_state
|
@@ -32,6 +32,8 @@ module Google
|
|
32
32
|
"https://www.googleapis.com/auth/chat.admin.spaces",
|
33
33
|
"https://www.googleapis.com/auth/chat.admin.spaces.readonly",
|
34
34
|
"https://www.googleapis.com/auth/chat.bot",
|
35
|
+
"https://www.googleapis.com/auth/chat.customemojis",
|
36
|
+
"https://www.googleapis.com/auth/chat.customemojis.readonly",
|
35
37
|
"https://www.googleapis.com/auth/chat.delete",
|
36
38
|
"https://www.googleapis.com/auth/chat.import",
|
37
39
|
"https://www.googleapis.com/auth/chat.memberships",
|
@@ -43,6 +43,20 @@ module Google
|
|
43
43
|
"spaces/#{space}/messages/#{message}/attachments/#{attachment}"
|
44
44
|
end
|
45
45
|
|
46
|
+
##
|
47
|
+
# Create a fully-qualified CustomEmoji resource string.
|
48
|
+
#
|
49
|
+
# The resource will be in the following format:
|
50
|
+
#
|
51
|
+
# `customEmojis/{custom_emoji}`
|
52
|
+
#
|
53
|
+
# @param custom_emoji [String]
|
54
|
+
#
|
55
|
+
# @return [::String]
|
56
|
+
def custom_emoji_path custom_emoji:
|
57
|
+
"customEmojis/#{custom_emoji}"
|
58
|
+
end
|
59
|
+
|
46
60
|
##
|
47
61
|
# Create a fully-qualified Membership resource string.
|
48
62
|
#
|