Skip to content

Commit

Permalink
feat: Support useAdminAccess for managing chat spaces and organizat…
Browse files Browse the repository at this point in the history
…ion memberships (#27325)

feat: Add `last_active_time` and `membership_count` to the `Space` resource.
  • Loading branch information
gcf-owl-bot[bot] committed Sep 18, 2024
1 parent b67dcf3 commit 696a64c
Show file tree
Hide file tree
Showing 15 changed files with 1,327 additions and 105 deletions.
1 change: 1 addition & 0 deletions google-apps-chat-v1/.owlbot-manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@
"snippets/chat_service/list_reactions.rb",
"snippets/chat_service/list_space_events.rb",
"snippets/chat_service/list_spaces.rb",
"snippets/chat_service/search_spaces.rb",
"snippets/chat_service/set_up_space.rb",
"snippets/chat_service/update_membership.rb",
"snippets/chat_service/update_message.rb",
Expand Down
5 changes: 5 additions & 0 deletions google-apps-chat-v1/gapic_metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,11 @@
"list_spaces"
]
},
"SearchSpaces": {
"methods": [
"search_spaces"
]
},
"GetSpace": {
"methods": [
"get_space"
Expand Down
335 changes: 325 additions & 10 deletions google-apps-chat-v1/lib/google/apps/chat/v1/chat_service/client.rb

Large diffs are not rendered by default.

336 changes: 326 additions & 10 deletions google-apps-chat-v1/lib/google/apps/chat/v1/chat_service/rest/client.rb

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -441,6 +441,44 @@ def list_spaces request_pb, options = nil
result
end

##
# Baseline implementation for the search_spaces REST call
#
# @param request_pb [::Google::Apps::Chat::V1::SearchSpacesRequest]
# A request object representing the call parameters. Required.
# @param options [::Gapic::CallOptions]
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
#
# @yield [result, operation] Access the result along with the TransportOperation object
# @yieldparam result [::Google::Apps::Chat::V1::SearchSpacesResponse]
# @yieldparam operation [::Gapic::Rest::TransportOperation]
#
# @return [::Google::Apps::Chat::V1::SearchSpacesResponse]
# A result object deserialized from the server's reply
def search_spaces request_pb, options = nil
raise ::ArgumentError, "request must be provided" if request_pb.nil?

verb, uri, query_string_params, body = ServiceStub.transcode_search_spaces_request request_pb
query_string_params = if query_string_params.any?
query_string_params.to_h { |p| p.split "=", 2 }
else
{}
end

response = @client_stub.make_http_request(
verb,
uri: uri,
body: body || "",
params: query_string_params,
options: options
)
operation = ::Gapic::Rest::TransportOperation.new response
result = ::Google::Apps::Chat::V1::SearchSpacesResponse.decode_json response.body, ignore_unknown_fields: true

yield result, operation if block_given?
result
end

##
# Baseline implementation for the get_space REST call
#
Expand Down Expand Up @@ -1344,6 +1382,25 @@ def self.transcode_list_spaces_request request_pb
transcoder.transcode request_pb
end

##
# @private
#
# GRPC transcoding helper method for the search_spaces REST call
#
# @param request_pb [::Google::Apps::Chat::V1::SearchSpacesRequest]
# A request object representing the call parameters. Required.
# @return [Array(String, [String, nil], Hash{String => String})]
# Uri, Body, Query string parameters
def self.transcode_search_spaces_request request_pb
transcoder = Gapic::Rest::GrpcTranscoder.new
.with_bindings(
uri_method: :get,
uri_template: "/v1/spaces:search",
matches: []
)
transcoder.transcode request_pb
end

##
# @private
#
Expand Down
2 changes: 1 addition & 1 deletion google-apps-chat-v1/lib/google/chat/v1/chat_service_pb.rb

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 696a64c

Please sign in to comment.