# Modify the configuration for all CaseAttachmentService clients::Google::Cloud::Support::V2beta::CaseAttachmentService::Client.configuredo|config|config.timeout=10.0end
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.
Pass arguments to get_attachment via a request object, either of type
GetAttachmentRequest or an equivalent Hash.
Parameters
request (::Google::Cloud::Support::V2beta::GetAttachmentRequest, ::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.
Pass arguments to get_attachment 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).
Parameter
name (::String) — Required. The name of the attachment to get.
Yields
(response, operation) — Access the result along with the RPC operation
require"google/cloud/support/v2beta"# Create a client object. The client can be reused for multiple calls.client=Google::Cloud::Support::V2beta::CaseAttachmentService::Client.new# Create a request. To set request fields, pass in keyword arguments.request=Google::Cloud::Support::V2beta::GetAttachmentRequest.new# Call the get_attachment method.result=client.get_attachmentrequest# The returned object is of type Google::Cloud::Support::V2beta::Attachment.presult
#initialize
definitialize(){|config|...}->Client
Create a new CaseAttachmentService client object.
Yields
(config) — Configure the CaseAttachmentService client.
# Create a client using the default configurationclient=::Google::Cloud::Support::V2beta::CaseAttachmentService::Client.new# Create a client using a custom configurationclient=::Google::Cloud::Support::V2beta::CaseAttachmentService::Client.newdo|config|config.timeout=10.0end
Pass arguments to list_attachments via a request object, either of type
ListAttachmentsRequest or an equivalent Hash.
Parameters
request (::Google::Cloud::Support::V2beta::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.
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 name of the case 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.
The size of each page can be smaller than the requested page size and can
include zero. For example, you could request 100 attachments on one page,
receive 0, and then on the next page, receive 90.
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
require"google/cloud/support/v2beta"# Create a client object. The client can be reused for multiple calls.client=Google::Cloud::Support::V2beta::CaseAttachmentService::Client.new# Create a request. To set request fields, pass in keyword arguments.request=Google::Cloud::Support::V2beta::ListAttachmentsRequest.new# Call the list_attachments method.result=client.list_attachmentsrequest# 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.eachdo|item|# Each element is of type ::Google::Cloud::Support::V2beta::Attachment.pitemend
#logger
deflogger()->Logger
The logger used for request/response debug logging.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-28 UTC."],[],[],null,["# Google Cloud Support V2BETA API - Class Google::Cloud::Support::V2beta::CaseAttachmentService::Client (v0.2.0)\n\nVersion latestkeyboard_arrow_down\n\n- [0.2.0 (latest)](/ruby/docs/reference/google-cloud-support-v2beta/latest/Google-Cloud-Support-V2beta-CaseAttachmentService-Client)\n- [0.1.1](/ruby/docs/reference/google-cloud-support-v2beta/0.1.1/Google-Cloud-Support-V2beta-CaseAttachmentService-Client) \nReference documentation and code samples for the Google Cloud Support V2BETA API class Google::Cloud::Support::V2beta::CaseAttachmentService::Client.\n\nClient for the CaseAttachmentService service.\n\n\n\u003cbr /\u003e\n\nA service to manage file attachments for Google Cloud support cases. \n\nInherits\n--------\n\n- Object \n\nIncludes\n--------\n\n- [Google::Cloud::Support::V2beta::CaseAttachmentService::Paths](./Google-Cloud-Support-V2beta-CaseAttachmentService-Paths)\n\nMethods\n-------\n\n### .configure\n\n def self.configure() { |config| ... } -\u003e Client::Configuration\n\nConfigure the CaseAttachmentService Client class.\n\n\n\u003cbr /\u003e\n\nSee [Configuration](/ruby/docs/reference/google-cloud-support-v2beta/latest/Google-Cloud-Support-V2beta-CaseAttachmentService-Client-Configuration \"Google::Cloud::Support::V2beta::CaseAttachmentService::Client::Configuration (class)\")\nfor a description of the configuration fields. \n**Yields**\n\n- (config) --- Configure the Client client. \n**Yield Parameter**\n\n- **config** ([Client::Configuration](./Google-Cloud-Support-V2beta-CaseAttachmentService-Client-Configuration)) \n**Returns**\n\n- ([Client::Configuration](./Google-Cloud-Support-V2beta-CaseAttachmentService-Client-Configuration))\n**Example** \n\n```ruby\n# Modify the configuration for all CaseAttachmentService clients\n::Google::Cloud::Support::V2beta::CaseAttachmentService::Client.configure do |config|\n config.timeout = 10.0\nend\n```\n\n### #configure\n\n def configure() { |config| ... } -\u003e Client::Configuration\n\nConfigure the CaseAttachmentService Client instance.\n\n\nThe configuration is set to the derived mode, meaning that values can be changed,\nbut structural changes (adding new fields, etc.) are not allowed. Structural changes\nshould be made on [Client.configure](/ruby/docs/reference/google-cloud-support-v2beta/latest/Google-Cloud-Support-V2beta-CaseAttachmentService-Client#Google__Cloud__Support__V2beta__CaseAttachmentService__Client_configure_class_ \"Google::Cloud::Support::V2beta::CaseAttachmentService::Client.configure (method)\").\n\n\u003cbr /\u003e\n\nSee [Configuration](/ruby/docs/reference/google-cloud-support-v2beta/latest/Google-Cloud-Support-V2beta-CaseAttachmentService-Client-Configuration \"Google::Cloud::Support::V2beta::CaseAttachmentService::Client::Configuration (class)\")\nfor a description of the configuration fields. \n**Yields**\n\n- (config) --- Configure the Client client. \n**Yield Parameter**\n\n- **config** ([Client::Configuration](./Google-Cloud-Support-V2beta-CaseAttachmentService-Client-Configuration)) \n**Returns**\n\n- ([Client::Configuration](./Google-Cloud-Support-V2beta-CaseAttachmentService-Client-Configuration))\n\n### #get_attachment\n\n def get_attachment(request, options = nil) -\u003e ::Google::Cloud::Support::V2beta::Attachment\n def get_attachment(name: nil) -\u003e ::Google::Cloud::Support::V2beta::Attachment\n\nRetrieve an attachment. \n**Overloads** \n\n def get_attachment(request, options = nil) -\u003e ::Google::Cloud::Support::V2beta::Attachment\n\nPass arguments to `get_attachment` via a request object, either of type [GetAttachmentRequest](/ruby/docs/reference/google-cloud-support-v2beta/latest/Google-Cloud-Support-V2beta-GetAttachmentRequest \"Google::Cloud::Support::V2beta::GetAttachmentRequest (class)\") or an equivalent Hash. \n**Parameters**\n\n- **request** ([::Google::Cloud::Support::V2beta::GetAttachmentRequest](./Google-Cloud-Support-V2beta-GetAttachmentRequest), ::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.\n- **options** (::Gapic::CallOptions, ::Hash) --- Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. \n\n def get_attachment(name: nil) -\u003e ::Google::Cloud::Support::V2beta::Attachment\n\nPass arguments to `get_attachment` 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). \n**Parameter**\n\n- **name** (::String) --- Required. The name of the attachment to get. \n**Yields**\n\n- (response, operation) --- Access the result along with the RPC operation \n**Yield Parameters**\n\n- **response** ([::Google::Cloud::Support::V2beta::Attachment](./Google-Cloud-Support-V2beta-Attachment))\n- **operation** (::GRPC::ActiveCall::Operation) \n**Returns**\n\n- ([::Google::Cloud::Support::V2beta::Attachment](./Google-Cloud-Support-V2beta-Attachment)) \n**Raises**\n\n- (::Google::Cloud::Error) --- if the RPC is aborted.\n**Example**\n\nBasic example \n\n```ruby\nrequire \"google/cloud/support/v2beta\"\n\n# Create a client object. The client can be reused for multiple calls.\nclient = Google::Cloud::Support::V2beta::CaseAttachmentService::Client.new\n\n# Create a request. To set request fields, pass in keyword arguments.\nrequest = Google::Cloud::Support::V2beta::GetAttachmentRequest.new\n\n# Call the get_attachment method.\nresult = client.get_attachment request\n\n# The returned object is of type Google::Cloud::Support::V2beta::Attachment.\np result\n```\n\n### #initialize\n\n def initialize() { |config| ... } -\u003e Client\n\nCreate a new CaseAttachmentService client object. \n**Yields**\n\n- (config) --- Configure the CaseAttachmentService client. \n**Yield Parameter**\n\n- **config** ([Client::Configuration](./Google-Cloud-Support-V2beta-CaseAttachmentService-Client-Configuration)) \n**Returns**\n\n- ([Client](./Google-Cloud-Support-V2beta-CaseAttachmentService-Client)) --- a new instance of Client\n**Example** \n\n```ruby\n# Create a client using the default configuration\nclient = ::Google::Cloud::Support::V2beta::CaseAttachmentService::Client.new\n\n# Create a client using a custom configuration\nclient = ::Google::Cloud::Support::V2beta::CaseAttachmentService::Client.new do |config|\n config.timeout = 10.0\nend\n```\n\n### #list_attachments\n\n def list_attachments(request, options = nil) -\u003e ::Gapic::PagedEnumerable\u003c::Google::Cloud::Support::V2beta::Attachment\u003e\n def list_attachments(parent: nil, page_size: nil, page_token: nil) -\u003e ::Gapic::PagedEnumerable\u003c::Google::Cloud::Support::V2beta::Attachment\u003e\n\nList all the attachments associated with a support case. \n**Overloads** \n\n def list_attachments(request, options = nil) -\u003e ::Gapic::PagedEnumerable\u003c::Google::Cloud::Support::V2beta::Attachment\u003e\n\nPass arguments to `list_attachments` via a request object, either of type [ListAttachmentsRequest](/ruby/docs/reference/google-cloud-support-v2beta/latest/Google-Cloud-Support-V2beta-ListAttachmentsRequest \"Google::Cloud::Support::V2beta::ListAttachmentsRequest (class)\") or an equivalent Hash. \n**Parameters**\n\n- **request** ([::Google::Cloud::Support::V2beta::ListAttachmentsRequest](./Google-Cloud-Support-V2beta-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.\n- **options** (::Gapic::CallOptions, ::Hash) --- Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. \n\n def list_attachments(parent: nil, page_size: nil, page_token: nil) -\u003e ::Gapic::PagedEnumerable\u003c::Google::Cloud::Support::V2beta::Attachment\u003e\n\nPass 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). \n**Parameters**\n\n- **parent** (::String) --- Required. The name of the case for which attachments should be listed.\n- **page_size** (::Integer) --- The maximum number of attachments fetched with each request.\n\n\n If not provided, the default is 10. The maximum page size that will be\n returned is 100.\n\n The size of each page can be smaller than the requested page size and can\n include zero. For example, you could request 100 attachments on one page,\n receive 0, and then on the next page, receive 90.\n- **page_token** (::String) --- A token identifying the page of results to return. If unspecified, the first page is retrieved. \n**Yields**\n\n- (response, operation) --- Access the result along with the RPC operation \n**Yield Parameters**\n\n- **response** (::Gapic::PagedEnumerable\\\u003c[::Google::Cloud::Support::V2beta::Attachment](./Google-Cloud-Support-V2beta-Attachment)\\\u003e)\n- **operation** (::GRPC::ActiveCall::Operation) \n**Returns**\n\n- (::Gapic::PagedEnumerable\\\u003c[::Google::Cloud::Support::V2beta::Attachment](./Google-Cloud-Support-V2beta-Attachment)\\\u003e) \n**Raises**\n\n- (::Google::Cloud::Error) --- if the RPC is aborted.\n**Example**\n\nBasic example \n\n```ruby\nrequire \"google/cloud/support/v2beta\"\n\n# Create a client object. The client can be reused for multiple calls.\nclient = Google::Cloud::Support::V2beta::CaseAttachmentService::Client.new\n\n# Create a request. To set request fields, pass in keyword arguments.\nrequest = Google::Cloud::Support::V2beta::ListAttachmentsRequest.new\n\n# Call the list_attachments method.\nresult = client.list_attachments request\n\n# The returned object is of type Gapic::PagedEnumerable. You can iterate\n# over elements, and API calls will be issued to fetch pages as needed.\nresult.each do |item|\n # Each element is of type ::Google::Cloud::Support::V2beta::Attachment.\n p item\nend\n```\n\n### #logger\n\n def logger() -\u003e Logger\n\nThe logger used for request/response debug logging. \n**Returns**\n\n- (Logger)\n\n### #universe_domain\n\n def universe_domain() -\u003e String\n\nThe effective universe domain \n**Returns**\n\n- (String)"]]