1.0.0-beta04 (latest) 1.0.0-beta03

    public abstract class CaseAttachmentServiceClient

Reference documentation and code samples for the Google Cloud Support v2beta API class CaseAttachmentServiceClient.

CaseAttachmentService client wrapper, for convenient use.

## Inheritance

[object](https://learn.microsoft.com/dotnet/api/system.object) \> CaseAttachmentServiceClient

## Inherited Members

[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode) [object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) [object.MemberwiseClone()](https://learn.microsoft.com/dotnet/api/system.object.memberwiseclone) [object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)

## Derived Types

[CaseAttachmentServiceClientImpl](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Support.V2Beta/latest/Google.Cloud.Support.V2Beta.CaseAttachmentServiceClientImpl)

## Namespace

[Google.Cloud.Support.V2Beta](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Support.V2Beta/latest/Google.Cloud.Support.V2Beta)

## Assembly

Google.Cloud.Support.V2Beta.dll

## Remarks

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

## Properties

### DefaultEndpoint

    public static string DefaultEndpoint { get; }

The default endpoint for the CaseAttachmentService service, which is a host of "cloudsupport.googleapis.com"
and a port of 443.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.string` |   |

### DefaultScopes

    public static IReadOnlyList<string> DefaultScopes { get; }

The default CaseAttachmentService scopes.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.collections.generic.ireadonlylist-1https://learn.microsoft.com/dotnet/api/system.string` |   |

**Remarks** The default CaseAttachmentService scopes are:

- <https://www.googleapis.com/auth/cloud-platform>

### GrpcClient

    public virtual CaseAttachmentService.CaseAttachmentServiceClient GrpcClient { get; }

The underlying gRPC CaseAttachmentService client

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Support.V2Beta/latest/Google.Cloud.Support.V2Beta.CaseAttachmentServicehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Support.V2Beta/latest/Google.Cloud.Support.V2Beta.CaseAttachmentService.CaseAttachmentServiceClient` |   |

### ServiceMetadata

    public static ServiceMetadata ServiceMetadata { get; }

The service metadata associated with this client type.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.ServiceMetadata.html` |   |

## Methods

### Create()

    public static CaseAttachmentServiceClient Create()

Synchronously creates a [CaseAttachmentServiceClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Support.V2Beta/latest/Google.Cloud.Support.V2Beta.CaseAttachmentServiceClient) using the default credentials, endpoint
and settings. To specify custom credentials or other settings, use
[CaseAttachmentServiceClientBuilder](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Support.V2Beta/latest/Google.Cloud.Support.V2Beta.CaseAttachmentServiceClientBuilder).

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Support.V2Beta/latest/Google.Cloud.Support.V2Beta.CaseAttachmentServiceClient` | The created [CaseAttachmentServiceClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Support.V2Beta/latest/Google.Cloud.Support.V2Beta.CaseAttachmentServiceClient). |

### CreateAsync(CancellationToken)

    public static Task<CaseAttachmentServiceClient> CreateAsync(CancellationToken cancellationToken = default)

Asynchronously creates a [CaseAttachmentServiceClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Support.V2Beta/latest/Google.Cloud.Support.V2Beta.CaseAttachmentServiceClient) using the default credentials, endpoint
and settings. To specify custom credentials or other settings, use
[CaseAttachmentServiceClientBuilder](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Support.V2Beta/latest/Google.Cloud.Support.V2Beta.CaseAttachmentServiceClientBuilder).

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` The [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use while creating the client. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Support.V2Beta/latest/Google.Cloud.Support.V2Beta.CaseAttachmentServiceClient` | The task representing the created [CaseAttachmentServiceClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Support.V2Beta/latest/Google.Cloud.Support.V2Beta.CaseAttachmentServiceClient). |

### GetAttachment(AttachmentName, CallSettings)

    public virtual Attachment GetAttachment(AttachmentName name, CallSettings callSettings = null)

Retrieve an attachment.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Support.V2Beta/latest/Google.Cloud.Support.V2Beta.AttachmentName` Required. The name of the attachment to get. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Support.V2Beta/latest/Google.Cloud.Support.V2Beta.Attachment` | The RPC response. |

**Example**

    // Create client
    CaseAttachmentServiceClient caseAttachmentServiceClient = CaseAttachmentServiceClient.Create();
    // Initialize request argument(s)
    AttachmentName name = AttachmentName.FromOrganizationCaseAttachment("[ORGANIZATION]", "[CASE]", "[ATTACHMENT_ID]");
    // Make the request
    Attachment response = caseAttachmentServiceClient.GetAttachment(name);

### GetAttachment(GetAttachmentRequest, CallSettings)

    public virtual Attachment GetAttachment(GetAttachmentRequest request, CallSettings callSettings = null)

Retrieve an attachment.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Support.V2Beta/latest/Google.Cloud.Support.V2Beta.GetAttachmentRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Support.V2Beta/latest/Google.Cloud.Support.V2Beta.Attachment` | The RPC response. |

**Example**

    // Create client
    CaseAttachmentServiceClient caseAttachmentServiceClient = CaseAttachmentServiceClient.Create();
    // Initialize request argument(s)
    GetAttachmentRequest request = new GetAttachmentRequest
    {
        AttachmentName = AttachmentName.FromOrganizationCaseAttachment("[ORGANIZATION]", "[CASE]", "[ATTACHMENT_ID]"),
    };
    // Make the request
    Attachment response = caseAttachmentServiceClient.GetAttachment(request);

### GetAttachment(string, CallSettings)

    public virtual Attachment GetAttachment(string name, CallSettings callSettings = null)

Retrieve an attachment.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The name of the attachment to get. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Support.V2Beta/latest/Google.Cloud.Support.V2Beta.Attachment` | The RPC response. |

**Example**

    // Create client
    CaseAttachmentServiceClient caseAttachmentServiceClient = CaseAttachmentServiceClient.Create();
    // Initialize request argument(s)
    string name = "organizations/[ORGANIZATION]/cases/[CASE]/attachments/[ATTACHMENT_ID]";
    // Make the request
    Attachment response = caseAttachmentServiceClient.GetAttachment(name);

### GetAttachmentAsync(AttachmentName, CallSettings)

    public virtual Task<Attachment> GetAttachmentAsync(AttachmentName name, CallSettings callSettings = null)

Retrieve an attachment.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Support.V2Beta/latest/Google.Cloud.Support.V2Beta.AttachmentName` Required. The name of the attachment to get. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Support.V2Beta/latest/Google.Cloud.Support.V2Beta.Attachment` | A Task containing the RPC response. |

**Example**

    // Create client
    CaseAttachmentServiceClient caseAttachmentServiceClient = await CaseAttachmentServiceClient.CreateAsync();
    // Initialize request argument(s)
    AttachmentName name = AttachmentName.FromOrganizationCaseAttachment("[ORGANIZATION]", "[CASE]", "[ATTACHMENT_ID]");
    // Make the request
    Attachment response = await caseAttachmentServiceClient.GetAttachmentAsync(name);

### GetAttachmentAsync(AttachmentName, CancellationToken)

    public virtual Task<Attachment> GetAttachmentAsync(AttachmentName name, CancellationToken cancellationToken)

Retrieve an attachment.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Support.V2Beta/latest/Google.Cloud.Support.V2Beta.AttachmentName` Required. The name of the attachment to get. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Support.V2Beta/latest/Google.Cloud.Support.V2Beta.Attachment` | A Task containing the RPC response. |

**Example**

    // Create client
    CaseAttachmentServiceClient caseAttachmentServiceClient = await CaseAttachmentServiceClient.CreateAsync();
    // Initialize request argument(s)
    AttachmentName name = AttachmentName.FromOrganizationCaseAttachment("[ORGANIZATION]", "[CASE]", "[ATTACHMENT_ID]");
    // Make the request
    Attachment response = await caseAttachmentServiceClient.GetAttachmentAsync(name);

### GetAttachmentAsync(GetAttachmentRequest, CallSettings)

    public virtual Task<Attachment> GetAttachmentAsync(GetAttachmentRequest request, CallSettings callSettings = null)

Retrieve an attachment.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Support.V2Beta/latest/Google.Cloud.Support.V2Beta.GetAttachmentRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Support.V2Beta/latest/Google.Cloud.Support.V2Beta.Attachment` | A Task containing the RPC response. |

**Example**

    // Create client
    CaseAttachmentServiceClient caseAttachmentServiceClient = await CaseAttachmentServiceClient.CreateAsync();
    // Initialize request argument(s)
    GetAttachmentRequest request = new GetAttachmentRequest
    {
        AttachmentName = AttachmentName.FromOrganizationCaseAttachment("[ORGANIZATION]", "[CASE]", "[ATTACHMENT_ID]"),
    };
    // Make the request
    Attachment response = await caseAttachmentServiceClient.GetAttachmentAsync(request);

### GetAttachmentAsync(GetAttachmentRequest, CancellationToken)

    public virtual Task<Attachment> GetAttachmentAsync(GetAttachmentRequest request, CancellationToken cancellationToken)

Retrieve an attachment.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Support.V2Beta/latest/Google.Cloud.Support.V2Beta.GetAttachmentRequest` The request object containing all of the parameters for the API call. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Support.V2Beta/latest/Google.Cloud.Support.V2Beta.Attachment` | A Task containing the RPC response. |

**Example**

    // Create client
    CaseAttachmentServiceClient caseAttachmentServiceClient = await CaseAttachmentServiceClient.CreateAsync();
    // Initialize request argument(s)
    GetAttachmentRequest request = new GetAttachmentRequest
    {
        AttachmentName = AttachmentName.FromOrganizationCaseAttachment("[ORGANIZATION]", "[CASE]", "[ATTACHMENT_ID]"),
    };
    // Make the request
    Attachment response = await caseAttachmentServiceClient.GetAttachmentAsync(request);

### GetAttachmentAsync(string, CallSettings)

    public virtual Task<Attachment> GetAttachmentAsync(string name, CallSettings callSettings = null)

Retrieve an attachment.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The name of the attachment to get. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Support.V2Beta/latest/Google.Cloud.Support.V2Beta.Attachment` | A Task containing the RPC response. |

**Example**

    // Create client
    CaseAttachmentServiceClient caseAttachmentServiceClient = await CaseAttachmentServiceClient.CreateAsync();
    // Initialize request argument(s)
    string name = "organizations/[ORGANIZATION]/cases/[CASE]/attachments/[ATTACHMENT_ID]";
    // Make the request
    Attachment response = await caseAttachmentServiceClient.GetAttachmentAsync(name);

### GetAttachmentAsync(string, CancellationToken)

    public virtual Task<Attachment> GetAttachmentAsync(string name, CancellationToken cancellationToken)

Retrieve an attachment.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The name of the attachment to get. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Support.V2Beta/latest/Google.Cloud.Support.V2Beta.Attachment` | A Task containing the RPC response. |

**Example**

    // Create client
    CaseAttachmentServiceClient caseAttachmentServiceClient = await CaseAttachmentServiceClient.CreateAsync();
    // Initialize request argument(s)
    string name = "organizations/[ORGANIZATION]/cases/[CASE]/attachments/[ATTACHMENT_ID]";
    // Make the request
    Attachment response = await caseAttachmentServiceClient.GetAttachmentAsync(name);

### ListAttachments(CaseName, string, int?, CallSettings)

    public virtual PagedEnumerable<ListAttachmentsResponse, Attachment> ListAttachments(CaseName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

List all the attachments associated with a support case.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Support.V2Beta/latest/Google.Cloud.Support.V2Beta.CaseName` Required. The name of the case for which attachments should be listed. |
| `pageToken` | `https://learn.microsoft.com/dotnet/api/system.string` The token returned from the previous request. A value of `null` or an empty string retrieves the first page. |
| `pageSize` | `https://learn.microsoft.com/dotnet/api/system.int32` The size of page to request. The response will not be larger than this, but may be smaller. A value of `null` or `0` uses a server-defined page size. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.PagedEnumerable-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Support.V2Beta/latest/Google.Cloud.Support.V2Beta.ListAttachmentsResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Support.V2Beta/latest/Google.Cloud.Support.V2Beta.Attachment` | A pageable sequence of [Attachment](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Support.V2Beta/latest/Google.Cloud.Support.V2Beta.Attachment) resources. |

**Example**

    // Create client
    CaseAttachmentServiceClient caseAttachmentServiceClient = CaseAttachmentServiceClient.Create();
    // Initialize request argument(s)
    CaseName parent = CaseName.FromOrganizationCase("[ORGANIZATION]", "[CASE]");
    // Make the request
    PagedEnumerable<ListAttachmentsResponse, Attachment> response = caseAttachmentServiceClient.ListAttachments(parent);

    // Iterate over all response items, lazily performing RPCs as required
    foreach (Attachment item in response)
    {
        // Do something with each item
        Console.WriteLine(item);
    }

    // Or iterate over pages (of server-defined size), performing one RPC per page
    foreach (ListAttachmentsResponse page in response.AsRawResponses())
    {
        // Do something with each page of items
        Console.WriteLine("A page of results:");
        foreach (Attachment item in page)
        {
            // Do something with each item
            Console.WriteLine(item);
        }
    }

    // Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
    int pageSize = 10;
    Page<Attachment> singlePage = response.ReadPage(pageSize);
    // Do something with the page of items
    Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
    foreach (Attachment item in singlePage)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
    // Store the pageToken, for when the next page is required.
    string nextPageToken = singlePage.NextPageToken;

### ListAttachments(ListAttachmentsRequest, CallSettings)

    public virtual PagedEnumerable<ListAttachmentsResponse, Attachment> ListAttachments(ListAttachmentsRequest request, CallSettings callSettings = null)

List all the attachments associated with a support case.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Support.V2Beta/latest/Google.Cloud.Support.V2Beta.ListAttachmentsRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.PagedEnumerable-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Support.V2Beta/latest/Google.Cloud.Support.V2Beta.ListAttachmentsResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Support.V2Beta/latest/Google.Cloud.Support.V2Beta.Attachment` | A pageable sequence of [Attachment](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Support.V2Beta/latest/Google.Cloud.Support.V2Beta.Attachment) resources. |

**Example**

    // Create client
    CaseAttachmentServiceClient caseAttachmentServiceClient = CaseAttachmentServiceClient.Create();
    // Initialize request argument(s)
    ListAttachmentsRequest request = new ListAttachmentsRequest
    {
        ParentAsCaseName = CaseName.FromOrganizationCase("[ORGANIZATION]", "[CASE]"),
    };
    // Make the request
    PagedEnumerable<ListAttachmentsResponse, Attachment> response = caseAttachmentServiceClient.ListAttachments(request);

    // Iterate over all response items, lazily performing RPCs as required
    foreach (Attachment item in response)
    {
        // Do something with each item
        Console.WriteLine(item);
    }

    // Or iterate over pages (of server-defined size), performing one RPC per page
    foreach (ListAttachmentsResponse page in response.AsRawResponses())
    {
        // Do something with each page of items
        Console.WriteLine("A page of results:");
        foreach (Attachment item in page)
        {
            // Do something with each item
            Console.WriteLine(item);
        }
    }

    // Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
    int pageSize = 10;
    Page<Attachment> singlePage = response.ReadPage(pageSize);
    // Do something with the page of items
    Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
    foreach (Attachment item in singlePage)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
    // Store the pageToken, for when the next page is required.
    string nextPageToken = singlePage.NextPageToken;

### ListAttachments(string, string, int?, CallSettings)

    public virtual PagedEnumerable<ListAttachmentsResponse, Attachment> ListAttachments(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

List all the attachments associated with a support case.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The name of the case for which attachments should be listed. |
| `pageToken` | `https://learn.microsoft.com/dotnet/api/system.string` The token returned from the previous request. A value of `null` or an empty string retrieves the first page. |
| `pageSize` | `https://learn.microsoft.com/dotnet/api/system.int32` The size of page to request. The response will not be larger than this, but may be smaller. A value of `null` or `0` uses a server-defined page size. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.PagedEnumerable-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Support.V2Beta/latest/Google.Cloud.Support.V2Beta.ListAttachmentsResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Support.V2Beta/latest/Google.Cloud.Support.V2Beta.Attachment` | A pageable sequence of [Attachment](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Support.V2Beta/latest/Google.Cloud.Support.V2Beta.Attachment) resources. |

**Example**

    // Create client
    CaseAttachmentServiceClient caseAttachmentServiceClient = CaseAttachmentServiceClient.Create();
    // Initialize request argument(s)
    string parent = "organizations/[ORGANIZATION]/cases/[CASE]";
    // Make the request
    PagedEnumerable<ListAttachmentsResponse, Attachment> response = caseAttachmentServiceClient.ListAttachments(parent);

    // Iterate over all response items, lazily performing RPCs as required
    foreach (Attachment item in response)
    {
        // Do something with each item
        Console.WriteLine(item);
    }

    // Or iterate over pages (of server-defined size), performing one RPC per page
    foreach (ListAttachmentsResponse page in response.AsRawResponses())
    {
        // Do something with each page of items
        Console.WriteLine("A page of results:");
        foreach (Attachment item in page)
        {
            // Do something with each item
            Console.WriteLine(item);
        }
    }

    // Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
    int pageSize = 10;
    Page<Attachment> singlePage = response.ReadPage(pageSize);
    // Do something with the page of items
    Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
    foreach (Attachment item in singlePage)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
    // Store the pageToken, for when the next page is required.
    string nextPageToken = singlePage.NextPageToken;

### ListAttachmentsAsync(CaseName, string, int?, CallSettings)

    public virtual PagedAsyncEnumerable<ListAttachmentsResponse, Attachment> ListAttachmentsAsync(CaseName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

List all the attachments associated with a support case.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Support.V2Beta/latest/Google.Cloud.Support.V2Beta.CaseName` Required. The name of the case for which attachments should be listed. |
| `pageToken` | `https://learn.microsoft.com/dotnet/api/system.string` The token returned from the previous request. A value of `null` or an empty string retrieves the first page. |
| `pageSize` | `https://learn.microsoft.com/dotnet/api/system.int32` The size of page to request. The response will not be larger than this, but may be smaller. A value of `null` or `0` uses a server-defined page size. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.PagedAsyncEnumerable-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Support.V2Beta/latest/Google.Cloud.Support.V2Beta.ListAttachmentsResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Support.V2Beta/latest/Google.Cloud.Support.V2Beta.Attachment` | A pageable asynchronous sequence of [Attachment](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Support.V2Beta/latest/Google.Cloud.Support.V2Beta.Attachment) resources. |

**Example**

    // Create client
    CaseAttachmentServiceClient caseAttachmentServiceClient = await CaseAttachmentServiceClient.CreateAsync();
    // Initialize request argument(s)
    CaseName parent = CaseName.FromOrganizationCase("[ORGANIZATION]", "[CASE]");
    // Make the request
    PagedAsyncEnumerable<ListAttachmentsResponse, Attachment> response = caseAttachmentServiceClient.ListAttachmentsAsync(parent);

    // Iterate over all response items, lazily performing RPCs as required
    await foreach (Attachment item in response)
    {
        // Do something with each item
        Console.WriteLine(item);
    }

    // Or iterate over pages (of server-defined size), performing one RPC per page
    await foreach (ListAttachmentsResponse page in response.AsRawResponses())
    {
        // Do something with each page of items
        Console.WriteLine("A page of results:");
        foreach (Attachment item in page)
        {
            // Do something with each item
            Console.WriteLine(item);
        }
    }

    // Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
    int pageSize = 10;
    Page<Attachment> singlePage = await response.ReadPageAsync(pageSize);
    // Do something with the page of items
    Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
    foreach (Attachment item in singlePage)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
    // Store the pageToken, for when the next page is required.
    string nextPageToken = singlePage.NextPageToken;

### ListAttachmentsAsync(ListAttachmentsRequest, CallSettings)

    public virtual PagedAsyncEnumerable<ListAttachmentsResponse, Attachment> ListAttachmentsAsync(ListAttachmentsRequest request, CallSettings callSettings = null)

List all the attachments associated with a support case.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Support.V2Beta/latest/Google.Cloud.Support.V2Beta.ListAttachmentsRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.PagedAsyncEnumerable-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Support.V2Beta/latest/Google.Cloud.Support.V2Beta.ListAttachmentsResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Support.V2Beta/latest/Google.Cloud.Support.V2Beta.Attachment` | A pageable asynchronous sequence of [Attachment](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Support.V2Beta/latest/Google.Cloud.Support.V2Beta.Attachment) resources. |

**Example**

    // Create client
    CaseAttachmentServiceClient caseAttachmentServiceClient = await CaseAttachmentServiceClient.CreateAsync();
    // Initialize request argument(s)
    ListAttachmentsRequest request = new ListAttachmentsRequest
    {
        ParentAsCaseName = CaseName.FromOrganizationCase("[ORGANIZATION]", "[CASE]"),
    };
    // Make the request
    PagedAsyncEnumerable<ListAttachmentsResponse, Attachment> response = caseAttachmentServiceClient.ListAttachmentsAsync(request);

    // Iterate over all response items, lazily performing RPCs as required
    await foreach (Attachment item in response)
    {
        // Do something with each item
        Console.WriteLine(item);
    }

    // Or iterate over pages (of server-defined size), performing one RPC per page
    await foreach (ListAttachmentsResponse page in response.AsRawResponses())
    {
        // Do something with each page of items
        Console.WriteLine("A page of results:");
        foreach (Attachment item in page)
        {
            // Do something with each item
            Console.WriteLine(item);
        }
    }

    // Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
    int pageSize = 10;
    Page<Attachment> singlePage = await response.ReadPageAsync(pageSize);
    // Do something with the page of items
    Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
    foreach (Attachment item in singlePage)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
    // Store the pageToken, for when the next page is required.
    string nextPageToken = singlePage.NextPageToken;

### ListAttachmentsAsync(string, string, int?, CallSettings)

    public virtual PagedAsyncEnumerable<ListAttachmentsResponse, Attachment> ListAttachmentsAsync(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

List all the attachments associated with a support case.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The name of the case for which attachments should be listed. |
| `pageToken` | `https://learn.microsoft.com/dotnet/api/system.string` The token returned from the previous request. A value of `null` or an empty string retrieves the first page. |
| `pageSize` | `https://learn.microsoft.com/dotnet/api/system.int32` The size of page to request. The response will not be larger than this, but may be smaller. A value of `null` or `0` uses a server-defined page size. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.PagedAsyncEnumerable-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Support.V2Beta/latest/Google.Cloud.Support.V2Beta.ListAttachmentsResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Support.V2Beta/latest/Google.Cloud.Support.V2Beta.Attachment` | A pageable asynchronous sequence of [Attachment](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Support.V2Beta/latest/Google.Cloud.Support.V2Beta.Attachment) resources. |

**Example**

    // Create client
    CaseAttachmentServiceClient caseAttachmentServiceClient = await CaseAttachmentServiceClient.CreateAsync();
    // Initialize request argument(s)
    string parent = "organizations/[ORGANIZATION]/cases/[CASE]";
    // Make the request
    PagedAsyncEnumerable<ListAttachmentsResponse, Attachment> response = caseAttachmentServiceClient.ListAttachmentsAsync(parent);

    // Iterate over all response items, lazily performing RPCs as required
    await foreach (Attachment item in response)
    {
        // Do something with each item
        Console.WriteLine(item);
    }

    // Or iterate over pages (of server-defined size), performing one RPC per page
    await foreach (ListAttachmentsResponse page in response.AsRawResponses())
    {
        // Do something with each page of items
        Console.WriteLine("A page of results:");
        foreach (Attachment item in page)
        {
            // Do something with each item
            Console.WriteLine(item);
        }
    }

    // Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
    int pageSize = 10;
    Page<Attachment> singlePage = await response.ReadPageAsync(pageSize);
    // Do something with the page of items
    Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
    foreach (Attachment item in singlePage)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
    // Store the pageToken, for when the next page is required.
    string nextPageToken = singlePage.NextPageToken;

### ShutdownDefaultChannelsAsync()

    public static Task ShutdownDefaultChannelsAsync()

Shuts down any channels automatically created by [Create()](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Support.V2Beta/latest/Google.Cloud.Support.V2Beta.CaseAttachmentServiceClient#Google_Cloud_Support_V2Beta_CaseAttachmentServiceClient_Create) and
[CreateAsync(CancellationToken)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Support.V2Beta/latest/Google.Cloud.Support.V2Beta.CaseAttachmentServiceClient#Google_Cloud_Support_V2Beta_CaseAttachmentServiceClient_CreateAsync_System_Threading_CancellationToken_). Channels which weren't automatically created are not
affected.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task` | A task representing the asynchronous shutdown operation. |

**Remarks** After calling this method, further calls to [Create()](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Support.V2Beta/latest/Google.Cloud.Support.V2Beta.CaseAttachmentServiceClient#Google_Cloud_Support_V2Beta_CaseAttachmentServiceClient_Create) and
[CreateAsync(CancellationToken)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Support.V2Beta/latest/Google.Cloud.Support.V2Beta.CaseAttachmentServiceClient#Google_Cloud_Support_V2Beta_CaseAttachmentServiceClient_CreateAsync_System_Threading_CancellationToken_) will create new channels, which could in turn be shut down
by another call to this method.