Google Cloud Support V2 API - Class Google::Cloud::Support::V2::CaseAttachmentService::Client (v1.1.0)

Reference documentation and code samples for the Google Cloud Support V2 API class Google::Cloud::Support::V2::CaseAttachmentService::Client.

Client for the CaseAttachmentService service.

A service to manage file attachment for Google Cloud support cases.

Inherits

  • Object

Methods

.configure

def self.configure() { |config| ... } -> Client::Configuration

Configure the CaseAttachmentService Client class.

See Configuration for a description of the configuration fields.

Yields
  • (config) — Configure the Client client.
Yield Parameter
Example
# Modify the configuration for all CaseAttachmentService clients
::Google::Cloud::Support::V2::CaseAttachmentService::Client.configure do |config|
  config.timeout = 10.0
end

#configure

def configure() { |config| ... } -> Client::Configuration

Configure the CaseAttachmentService 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.

Yields
  • (config) — Configure the Client client.
Yield Parameter

#initialize

def initialize() { |config| ... } -> Client

Create a new CaseAttachmentService client object.

Yields
  • (config) — Configure the CaseAttachmentService client.
Yield Parameter
Returns
  • (Client) — a new instance of Client
Example
# Create a client using the default configuration
client = ::Google::Cloud::Support::V2::CaseAttachmentService::Client.new

# Create a client using a custom configuration
client = ::Google::Cloud::Support::V2::CaseAttachmentService::Client.new do |config|
  config.timeout = 10.0
end

#list_attachments

def list_attachments(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Support::V2::Attachment>
def list_attachments(parent: nil, page_size: nil, page_token: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Support::V2::Attachment>

Retrieve all attachments associated with a support case.

Overloads
def list_attachments(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Support::V2::Attachment>
Pass arguments to list_attachments via a request object, either of type ListAttachmentsRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::Support::V2::ListAttachmentsRequest, ::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_attachments(parent: nil, page_size: nil, page_token: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Support::V2::Attachment>
Pass arguments to list_attachments 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).
Parameters
  • parent (::String) — Required. The resource name of Case object for which attachments should be listed.
  • page_size (::Integer) — The maximum number of attachments fetched with each request. If not provided, the default is 10. The maximum page size that will be returned is 100.
  • page_token (::String) — A token identifying the page of results to return. If unspecified, the first page is retrieved.
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Returns
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/support/v2"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Support::V2::CaseAttachmentService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Support::V2::ListAttachmentsRequest.new

# Call the list_attachments method.
result = client.list_attachments 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::Attachment.
  p item
end

#logger

def logger() -> Logger

The logger used for request/response debug logging.

Returns
  • (Logger)

#universe_domain

def universe_domain() -> String

The effective universe domain

Returns
  • (String)