Reference documentation and code samples for the Google Cloud Support V2 API class Google::Cloud::Support::V2::CommentService::Client.
Client for the CommentService service.
A service to manage comments on cases.
Inherits
- Object
Methods
.configure
def self.configure() { |config| ... } -> Client::Configuration
Configure the CommentService Client class.
See Configuration for a description of the configuration fields.
- (config) — Configure the Client client.
- config (Client::Configuration)
# Modify the configuration for all CommentService clients ::Google::Cloud::Support::V2::CommentService::Client.configure do |config| config.timeout = 10.0 end
#configure
def configure() { |config| ... } -> Client::Configuration
Configure the CommentService Client instance.
The configuration is set to the derived mode, meaning that values can be changed, but structural changes (adding new fields, etc.) are not allowed. Structural changes should be made on Client.configure.
See Configuration for a description of the configuration fields.
- (config) — Configure the Client client.
- config (Client::Configuration)
#create_comment
def create_comment(request, options = nil) -> ::Google::Cloud::Support::V2::Comment
def create_comment(parent: nil, comment: nil) -> ::Google::Cloud::Support::V2::Comment
Add a new comment to the specified Case. The comment object must have the following fields set: body.
def create_comment(request, options = nil) -> ::Google::Cloud::Support::V2::Comment
create_comment
via a request object, either of type
Google::Cloud::Support::V2::CreateCommentRequest or an equivalent Hash.
- request (::Google::Cloud::Support::V2::CreateCommentRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def create_comment(parent: nil, comment: nil) -> ::Google::Cloud::Support::V2::Comment
create_comment
via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
- parent (::String) — Required. The resource name of Case to which this comment should be added.
- comment (::Google::Cloud::Support::V2::Comment, ::Hash) — Required. The Comment object to be added to this Case.
- (response, operation) — Access the result along with the RPC operation
- response (::Google::Cloud::Support::V2::Comment)
- operation (::GRPC::ActiveCall::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/support/v2" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Support::V2::CommentService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Support::V2::CreateCommentRequest.new # Call the create_comment method. result = client.create_comment request # The returned object is of type Google::Cloud::Support::V2::Comment. p result
#initialize
def initialize() { |config| ... } -> Client
Create a new CommentService client object.
- (config) — Configure the CommentService client.
- config (Client::Configuration)
- (Client) — a new instance of Client
# Create a client using the default configuration client = ::Google::Cloud::Support::V2::CommentService::Client.new # Create a client using a custom configuration client = ::Google::Cloud::Support::V2::CommentService::Client.new do |config| config.timeout = 10.0 end
#list_comments
def list_comments(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Support::V2::Comment>
def list_comments(parent: nil, page_size: nil, page_token: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Support::V2::Comment>
Retrieve all Comments associated with the Case object.
def list_comments(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Support::V2::Comment>
list_comments
via a request object, either of type
ListCommentsRequest or an equivalent Hash.
- request (::Google::Cloud::Support::V2::ListCommentsRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def list_comments(parent: nil, page_size: nil, page_token: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Support::V2::Comment>
list_comments
via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
- parent (::String) — Required. The resource name of Case object for which comments should be listed.
- page_size (::Integer) — The maximum number of comments fetched with each request. Defaults to 10.
- page_token (::String) — A token identifying the page of results to return. If unspecified, the first page is retrieved.
- (response, operation) — Access the result along with the RPC operation
- response (::Gapic::PagedEnumerable<::Google::Cloud::Support::V2::Comment>)
- operation (::GRPC::ActiveCall::Operation)
- (::Gapic::PagedEnumerable<::Google::Cloud::Support::V2::Comment>)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/support/v2" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Support::V2::CommentService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Support::V2::ListCommentsRequest.new # Call the list_comments method. result = client.list_comments request # The returned object is of type Gapic::PagedEnumerable. You can iterate # over elements, and API calls will be issued to fetch pages as needed. result.each do |item| # Each element is of type ::Google::Cloud::Support::V2::Comment. p item end
#universe_domain
def universe_domain() -> String
The effective universe domain
- (String)