Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch Client to positional args #155

Merged
merged 5 commits into from May 30, 2019
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -3,5 +3,12 @@
<%- if method.doc_description -%>
<%= indent method.doc_description, "# " %>
<%- end -%>
# @param options [Google::Gax::ApiCall::Options, Hash]
#
# When using a hash, the following fields are supported:
#
<%- method.arguments.each do |arg| -%>
# * `<%= arg.name %>` (`<%= arg.doc_types %>`)<%- if arg.doc_description -%>:
quartzmo marked this conversation as resolved.
Show resolved Hide resolved
<%= indent arg.doc_description, "# " %>
<%- end -%>
<%- end -%># @param options [Google::Gax::ApiCall::Options, Hash]
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
Expand Up @@ -110,6 +110,13 @@ def initialize
#
# @param request [Google::Showcase::V1alpha3::EchoRequest | Hash]
# This method simply echos the request. This method is showcases unary rpcs.
#
# When using a hash, the following fields are supported:
#
# * `content` (`String`):
# The content to be echoed by the server.
# * `error` (`Google::Rpc::Status | Hash`):
# The error to be thrown by the server.
# @param options [Google::Gax::ApiCall::Options, Hash]
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
#
Expand Down Expand Up @@ -162,6 +169,13 @@ def echo request, options = nil, &block
# @param request [Google::Showcase::V1alpha3::ExpandRequest | Hash]
# This method split the given content into words and will pass each word back
# through the stream. This method showcases server-side streaming rpcs.
#
# When using a hash, the following fields are supported:
#
# * `content` (`String`):
# The content that will be split into words and returned on the stream.
# * `error` (`Google::Rpc::Status | Hash`):
# The error that is thrown after all words are sent on the stream.
# @param options [Google::Gax::ApiCall::Options, Hash]
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
#
Expand Down Expand Up @@ -334,6 +348,15 @@ def chat request, options = nil, &block
# @param request [Google::Showcase::V1alpha3::PagedExpandRequest | Hash]
# This is similar to the Expand method but instead of returning a stream of
# expanded words, this method returns a paged list of expanded words.
#
# When using a hash, the following fields are supported:
#
# * `content` (`String`):
# The string to expand.
# * `page_size` (`Integer`):
# The amount of words to returned in each page.
# * `page_token` (`String`):
# The position of the page to be returned.
# @param options [Google::Gax::ApiCall::Options, Hash]
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
#
Expand Down Expand Up @@ -387,6 +410,18 @@ def paged_expand request, options = nil, &block
# @param request [Google::Showcase::V1alpha3::WaitRequest | Hash]
# This method will wait the requested amount of and then return.
# This method showcases how a client handles a request timing out.
#
# When using a hash, the following fields are supported:
#
# * `end_time` (`Google::Protobuf::Timestamp | Hash`):
# The time that this operation will complete.
# * `ttl` (`Google::Protobuf::Duration | Hash`):
# The duration of this operation.
# * `error` (`Google::Rpc::Status | Hash`):
# The error that will be returned by the server. If this code is specified
# to be the OK rpc code, an empty response will be returned.
# * `success` (`Google::Showcase::V1alpha3::WaitResponse | Hash`):
# The response to be returned on operation completion.
# @param options [Google::Gax::ApiCall::Options, Hash]
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
#
Expand Down
Expand Up @@ -112,6 +112,17 @@ def initialize
#
# NOTE: the `name` binding below allows API services to override the binding
# to use different resource name schemes, such as `users/*/operations`.
#
# When using a hash, the following fields are supported:
#
# * `name` (`String`):
# The name of the operation collection.
# * `filter` (`String`):
# The standard list filter.
# * `page_size` (`Integer`):
# The standard list page size.
# * `page_token` (`String`):
# The standard list page token.
# @param options [Google::Gax::ApiCall::Options, Hash]
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
#
Expand Down Expand Up @@ -174,6 +185,11 @@ def list_operations request, options = nil, &block
# Gets the latest state of a long-running operation. Clients can use this
# method to poll the operation result at intervals as recommended by the API
# service.
#
# When using a hash, the following fields are supported:
#
# * `name` (`String`):
# The name of the operation resource.
# @param options [Google::Gax::ApiCall::Options, Hash]
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
#
Expand Down Expand Up @@ -237,6 +253,11 @@ def get_operation request, options = nil, &block
# no longer interested in the operation result. It does not cancel the
# operation. If the server doesn't support this method, it returns
# `google.rpc.Code.UNIMPLEMENTED`.
#
# When using a hash, the following fields are supported:
#
# * `name` (`String`):
# The name of the operation resource to be deleted.
# @param options [Google::Gax::ApiCall::Options, Hash]
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
#
Expand Down Expand Up @@ -311,6 +332,11 @@ def delete_operation request, options = nil, &block
# the operation is not deleted; instead, it becomes an operation with
# an [Operation.error][google.longrunning.Operation.error] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1,
# corresponding to `Code.CANCELLED`.
#
# When using a hash, the following fields are supported:
#
# * `name` (`String`):
# The name of the operation resource to be cancelled.
# @param options [Google::Gax::ApiCall::Options, Hash]
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
#
Expand Down
Expand Up @@ -109,6 +109,11 @@ def initialize
#
# @param request [Google::Showcase::V1alpha3::CreateUserRequest | Hash]
# Creates a user.
#
# When using a hash, the following fields are supported:
#
# * `user` (`Google::Showcase::V1alpha3::User | Hash`):
# The user to create.
# @param options [Google::Gax::ApiCall::Options, Hash]
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
#
Expand Down Expand Up @@ -159,6 +164,11 @@ def create_user request, options = nil, &block
#
# @param request [Google::Showcase::V1alpha3::GetUserRequest | Hash]
# Retrieves the User with the given uri.
#
# When using a hash, the following fields are supported:
#
# * `name` (`String`):
# The resource name of the requested user.
# @param options [Google::Gax::ApiCall::Options, Hash]
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
#
Expand Down Expand Up @@ -215,6 +225,14 @@ def get_user request, options = nil, &block
#
# @param request [Google::Showcase::V1alpha3::UpdateUserRequest | Hash]
# Updates a user.
#
# When using a hash, the following fields are supported:
#
# * `user` (`Google::Showcase::V1alpha3::User | Hash`):
# The user to update.
# * `update_mask` (`Google::Protobuf::FieldMask | Hash`):
# The field mask to determine wich fields are to be updated. If empty, the
# server will assume all fields are to be updated.
# @param options [Google::Gax::ApiCall::Options, Hash]
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
#
Expand Down Expand Up @@ -271,6 +289,11 @@ def update_user request, options = nil, &block
#
# @param request [Google::Showcase::V1alpha3::DeleteUserRequest | Hash]
# Deletes a user, their profile, and all of their authored messages.
#
# When using a hash, the following fields are supported:
#
# * `name` (`String`):
# The resource name of the user to delete.
# @param options [Google::Gax::ApiCall::Options, Hash]
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
#
Expand Down Expand Up @@ -327,6 +350,16 @@ def delete_user request, options = nil, &block
#
# @param request [Google::Showcase::V1alpha3::ListUsersRequest | Hash]
# Lists all users.
#
# When using a hash, the following fields are supported:
#
# * `page_size` (`Integer`):
# The maximum number of users to return. Server may return fewer users
# than requested. If unspecified, server will pick an appropriate default.
# * `page_token` (`String`):
# The value of google.showcase.v1alpha3.ListUsersResponse.next_page_token
# returned from the previous call to
# `google.showcase.v1alpha3.Identity\ListUsers` method.
# @param options [Google::Gax::ApiCall::Options, Hash]
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
#
Expand Down
Expand Up @@ -113,6 +113,11 @@ def initialize
#
# @param request [Google::Showcase::V1alpha3::CreateRoomRequest | Hash]
# Creates a room.
#
# When using a hash, the following fields are supported:
#
# * `room` (`Google::Showcase::V1alpha3::Room | Hash`):
# The room to create.
# @param options [Google::Gax::ApiCall::Options, Hash]
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
#
Expand Down Expand Up @@ -163,6 +168,11 @@ def create_room request, options = nil, &block
#
# @param request [Google::Showcase::V1alpha3::GetRoomRequest | Hash]
# Retrieves the Room with the given resource name.
#
# When using a hash, the following fields are supported:
#
# * `name` (`String`):
# The resource name of the requested room.
# @param options [Google::Gax::ApiCall::Options, Hash]
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
#
Expand Down Expand Up @@ -219,6 +229,14 @@ def get_room request, options = nil, &block
#
# @param request [Google::Showcase::V1alpha3::UpdateRoomRequest | Hash]
# Updates a room.
#
# When using a hash, the following fields are supported:
#
# * `room` (`Google::Showcase::V1alpha3::Room | Hash`):
# The room to update.
# * `update_mask` (`Google::Protobuf::FieldMask | Hash`):
# The field mask to determine wich fields are to be updated. If empty, the
# server will assume all fields are to be updated.
# @param options [Google::Gax::ApiCall::Options, Hash]
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
#
Expand Down Expand Up @@ -275,6 +293,11 @@ def update_room request, options = nil, &block
#
# @param request [Google::Showcase::V1alpha3::DeleteRoomRequest | Hash]
# Deletes a room and all of its blurbs.
#
# When using a hash, the following fields are supported:
#
# * `name` (`String`):
# The resource name of the requested room.
# @param options [Google::Gax::ApiCall::Options, Hash]
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
#
Expand Down Expand Up @@ -331,6 +354,16 @@ def delete_room request, options = nil, &block
#
# @param request [Google::Showcase::V1alpha3::ListRoomsRequest | Hash]
# Lists all chat rooms.
#
# When using a hash, the following fields are supported:
#
# * `page_size` (`Integer`):
# The maximum number of rooms return. Server may return fewer rooms
# than requested. If unspecified, server will pick an appropriate default.
# * `page_token` (`String`):
# The value of google.showcase.v1alpha3.ListRoomsResponse.next_page_token
# returned from the previous call to
# `google.showcase.v1alpha3.Messaging\ListRooms` method.
# @param options [Google::Gax::ApiCall::Options, Hash]
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
#
Expand Down Expand Up @@ -386,6 +419,14 @@ def list_rooms request, options = nil, &block
# Creates a blurb. If the parent is a room, the blurb is understood to be a
# message in that room. If the parent is a profile, the blurb is understood
# to be a post on the profile.
#
# When using a hash, the following fields are supported:
#
# * `parent` (`String`):
# The resource name of the chat room or user profile that this blurb will
# be tied to.
# * `blurb` (`Google::Showcase::V1alpha3::Blurb | Hash`):
# The blurb to create.
# @param options [Google::Gax::ApiCall::Options, Hash]
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
#
Expand Down Expand Up @@ -442,6 +483,11 @@ def create_blurb request, options = nil, &block
#
# @param request [Google::Showcase::V1alpha3::GetBlurbRequest | Hash]
# Retrieves the Blurb with the given resource name.
#
# When using a hash, the following fields are supported:
#
# * `name` (`String`):
# The resource name of the requested blurb.
# @param options [Google::Gax::ApiCall::Options, Hash]
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
#
Expand Down Expand Up @@ -498,6 +544,14 @@ def get_blurb request, options = nil, &block
#
# @param request [Google::Showcase::V1alpha3::UpdateBlurbRequest | Hash]
# Updates a blurb.
#
# When using a hash, the following fields are supported:
#
# * `blurb` (`Google::Showcase::V1alpha3::Blurb | Hash`):
# The blurb to update.
# * `update_mask` (`Google::Protobuf::FieldMask | Hash`):
# The field mask to determine wich fields are to be updated. If empty, the
# server will assume all fields are to be updated.
# @param options [Google::Gax::ApiCall::Options, Hash]
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
#
Expand Down Expand Up @@ -554,6 +608,11 @@ def update_blurb request, options = nil, &block
#
# @param request [Google::Showcase::V1alpha3::DeleteBlurbRequest | Hash]
# Deletes a blurb.
#
# When using a hash, the following fields are supported:
#
# * `name` (`String`):
# The resource name of the requested blurb.
# @param options [Google::Gax::ApiCall::Options, Hash]
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
#
Expand Down Expand Up @@ -612,6 +671,19 @@ def delete_blurb request, options = nil, &block
# @param request [Google::Showcase::V1alpha3::ListBlurbsRequest | Hash]
# Lists blurbs for a specific chat room or user profile depending on the
# parent resource name.
#
# When using a hash, the following fields are supported:
#
# * `parent` (`String`):
# The resource name of the requested room or profile whos blurbs to list.
# * `page_size` (`Integer`):
# The maximum number of blurbs to return. Server may return fewer
# blurbs than requested. If unspecified, server will pick an appropriate
# default.
# * `page_token` (`String`):
# The value of google.showcase.v1alpha3.ListBlurbsResponse.next_page_token
# returned from the previous call to
# `google.showcase.v1alpha3.Messaging\ListBlurbs` method.
# @param options [Google::Gax::ApiCall::Options, Hash]
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
#
Expand Down Expand Up @@ -673,6 +745,24 @@ def list_blurbs request, options = nil, &block
# This method searches through all blurbs across all rooms and profiles
# for blurbs containing to words found in the query. Only posts that
# contain an exact match of a queried word will be returned.
#
# When using a hash, the following fields are supported:
#
# * `query` (`String`):
# The query used to search for blurbs containing to words of this string.
# Only posts that contain an exact match of a queried word will be returned.
# * `parent` (`String`):
# The rooms or profiles to search. If unset, `SearchBlurbs` will search all
# rooms and all profiles.
# * `page_size` (`Integer`):
# The maximum number of blurbs return. Server may return fewer
# blurbs than requested. If unspecified, server will pick an appropriate
# default.
# * `page_token` (`String`):
# The value of
# google.showcase.v1alpha3.SearchBlurbsResponse.next_page_token
# returned from the previous call to
# `google.showcase.v1alpha3.Messaging\SearchBlurbs` method.
# @param options [Google::Gax::ApiCall::Options, Hash]
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
#
Expand Down Expand Up @@ -732,6 +822,13 @@ def search_blurbs request, options = nil, &block
# @param request [Google::Showcase::V1alpha3::StreamBlurbsRequest | Hash]
# This returns a stream that emits the blurbs that are created for a
# particular chat room or user profile.
#
# When using a hash, the following fields are supported:
#
# * `name` (`String`):
# The resource name of a chat room or user profile whose blurbs to stream.
# * `expire_time` (`Google::Protobuf::Timestamp | Hash`):
# The time at which this stream will close.
# @param options [Google::Gax::ApiCall::Options, Hash]
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
#
Expand Down