Class ContentServiceClient (2.0.0)

public abstract class ContentServiceClient

ContentService client wrapper, for convenient use.

Inheritance

Object > ContentServiceClient

Derived Types

Namespace

Google.Cloud.Dataplex.V1

Assembly

Google.Cloud.Dataplex.V1.dll

Remarks

ContentService manages Notebook and SQL Scripts for Dataplex.

Properties

DefaultEndpoint

public static string DefaultEndpoint { get; }

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

Property Value
TypeDescription
String

DefaultScopes

public static IReadOnlyList<string> DefaultScopes { get; }

The default ContentService scopes.

Property Value
TypeDescription
IReadOnlyList<String>
Remarks

The default ContentService scopes are:

GrpcClient

public virtual ContentService.ContentServiceClient GrpcClient { get; }

The underlying gRPC ContentService client

Property Value
TypeDescription
ContentService.ContentServiceClient

ServiceMetadata

public static ServiceMetadata ServiceMetadata { get; }

The service metadata associated with this client type.

Property Value
TypeDescription
ServiceMetadata

Methods

Create()

public static ContentServiceClient Create()

Synchronously creates a ContentServiceClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use ContentServiceClientBuilder.

Returns
TypeDescription
ContentServiceClient

The created ContentServiceClient.

CreateAsync(CancellationToken)

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

Asynchronously creates a ContentServiceClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use ContentServiceClientBuilder.

Parameter
NameDescription
cancellationTokenCancellationToken

The CancellationToken to use while creating the client.

Returns
TypeDescription
Task<ContentServiceClient>

The task representing the created ContentServiceClient.

CreateContent(CreateContentRequest, CallSettings)

public virtual Content CreateContent(CreateContentRequest request, CallSettings callSettings = null)

Create a content.

Parameters
NameDescription
requestCreateContentRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Content

The RPC response.

Example
// Create client
ContentServiceClient contentServiceClient = ContentServiceClient.Create();
// Initialize request argument(s)
CreateContentRequest request = new CreateContentRequest
{
    ParentAsLakeName = LakeName.FromProjectLocationLake("[PROJECT]", "[LOCATION]", "[LAKE]"),
    Content = new Content(),
    ValidateOnly = false,
};
// Make the request
Content response = contentServiceClient.CreateContent(request);

CreateContent(LakeName, Content, CallSettings)

public virtual Content CreateContent(LakeName parent, Content content, CallSettings callSettings = null)

Create a content.

Parameters
NameDescription
parentLakeName

Required. The resource name of the parent lake: projects/{project_id}/locations/{location_id}/lakes/{lake_id}

contentContent

Required. Content resource.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Content

The RPC response.

Example
// Create client
ContentServiceClient contentServiceClient = ContentServiceClient.Create();
// Initialize request argument(s)
LakeName parent = LakeName.FromProjectLocationLake("[PROJECT]", "[LOCATION]", "[LAKE]");
Content content = new Content();
// Make the request
Content response = contentServiceClient.CreateContent(parent, content);

CreateContent(String, Content, CallSettings)

public virtual Content CreateContent(string parent, Content content, CallSettings callSettings = null)

Create a content.

Parameters
NameDescription
parentString

Required. The resource name of the parent lake: projects/{project_id}/locations/{location_id}/lakes/{lake_id}

contentContent

Required. Content resource.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Content

The RPC response.

Example
// Create client
ContentServiceClient contentServiceClient = ContentServiceClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]/lakes/[LAKE]";
Content content = new Content();
// Make the request
Content response = contentServiceClient.CreateContent(parent, content);

CreateContentAsync(CreateContentRequest, CallSettings)

public virtual Task<Content> CreateContentAsync(CreateContentRequest request, CallSettings callSettings = null)

Create a content.

Parameters
NameDescription
requestCreateContentRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Content>

A Task containing the RPC response.

Example
// Create client
ContentServiceClient contentServiceClient = await ContentServiceClient.CreateAsync();
// Initialize request argument(s)
CreateContentRequest request = new CreateContentRequest
{
    ParentAsLakeName = LakeName.FromProjectLocationLake("[PROJECT]", "[LOCATION]", "[LAKE]"),
    Content = new Content(),
    ValidateOnly = false,
};
// Make the request
Content response = await contentServiceClient.CreateContentAsync(request);

CreateContentAsync(CreateContentRequest, CancellationToken)

public virtual Task<Content> CreateContentAsync(CreateContentRequest request, CancellationToken cancellationToken)

Create a content.

Parameters
NameDescription
requestCreateContentRequest

The request object containing all of the parameters for the API call.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Content>

A Task containing the RPC response.

Example
// Create client
ContentServiceClient contentServiceClient = await ContentServiceClient.CreateAsync();
// Initialize request argument(s)
CreateContentRequest request = new CreateContentRequest
{
    ParentAsLakeName = LakeName.FromProjectLocationLake("[PROJECT]", "[LOCATION]", "[LAKE]"),
    Content = new Content(),
    ValidateOnly = false,
};
// Make the request
Content response = await contentServiceClient.CreateContentAsync(request);

CreateContentAsync(LakeName, Content, CallSettings)

public virtual Task<Content> CreateContentAsync(LakeName parent, Content content, CallSettings callSettings = null)

Create a content.

Parameters
NameDescription
parentLakeName

Required. The resource name of the parent lake: projects/{project_id}/locations/{location_id}/lakes/{lake_id}

contentContent

Required. Content resource.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Content>

A Task containing the RPC response.

Example
// Create client
ContentServiceClient contentServiceClient = await ContentServiceClient.CreateAsync();
// Initialize request argument(s)
LakeName parent = LakeName.FromProjectLocationLake("[PROJECT]", "[LOCATION]", "[LAKE]");
Content content = new Content();
// Make the request
Content response = await contentServiceClient.CreateContentAsync(parent, content);

CreateContentAsync(LakeName, Content, CancellationToken)

public virtual Task<Content> CreateContentAsync(LakeName parent, Content content, CancellationToken cancellationToken)

Create a content.

Parameters
NameDescription
parentLakeName

Required. The resource name of the parent lake: projects/{project_id}/locations/{location_id}/lakes/{lake_id}

contentContent

Required. Content resource.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Content>

A Task containing the RPC response.

Example
// Create client
ContentServiceClient contentServiceClient = await ContentServiceClient.CreateAsync();
// Initialize request argument(s)
LakeName parent = LakeName.FromProjectLocationLake("[PROJECT]", "[LOCATION]", "[LAKE]");
Content content = new Content();
// Make the request
Content response = await contentServiceClient.CreateContentAsync(parent, content);

CreateContentAsync(String, Content, CallSettings)

public virtual Task<Content> CreateContentAsync(string parent, Content content, CallSettings callSettings = null)

Create a content.

Parameters
NameDescription
parentString

Required. The resource name of the parent lake: projects/{project_id}/locations/{location_id}/lakes/{lake_id}

contentContent

Required. Content resource.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Content>

A Task containing the RPC response.

Example
// Create client
ContentServiceClient contentServiceClient = await ContentServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]/lakes/[LAKE]";
Content content = new Content();
// Make the request
Content response = await contentServiceClient.CreateContentAsync(parent, content);

CreateContentAsync(String, Content, CancellationToken)

public virtual Task<Content> CreateContentAsync(string parent, Content content, CancellationToken cancellationToken)

Create a content.

Parameters
NameDescription
parentString

Required. The resource name of the parent lake: projects/{project_id}/locations/{location_id}/lakes/{lake_id}

contentContent

Required. Content resource.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Content>

A Task containing the RPC response.

Example
// Create client
ContentServiceClient contentServiceClient = await ContentServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]/lakes/[LAKE]";
Content content = new Content();
// Make the request
Content response = await contentServiceClient.CreateContentAsync(parent, content);

DeleteContent(ContentName, CallSettings)

public virtual void DeleteContent(ContentName name, CallSettings callSettings = null)

Delete a content.

Parameters
NameDescription
nameContentName

Required. The resource name of the content: projects/{project_id}/locations/{location_id}/lakes/{lake_id}/content/{content_id}

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Example
// Create client
ContentServiceClient contentServiceClient = ContentServiceClient.Create();
// Initialize request argument(s)
ContentName name = ContentName.FromProjectLocationLakeContent("[PROJECT]", "[LOCATION]", "[LAKE]", "[CONTENT]");
// Make the request
contentServiceClient.DeleteContent(name);

DeleteContent(DeleteContentRequest, CallSettings)

public virtual void DeleteContent(DeleteContentRequest request, CallSettings callSettings = null)

Delete a content.

Parameters
NameDescription
requestDeleteContentRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Example
// Create client
ContentServiceClient contentServiceClient = ContentServiceClient.Create();
// Initialize request argument(s)
DeleteContentRequest request = new DeleteContentRequest
{
    ContentName = ContentName.FromProjectLocationLakeContent("[PROJECT]", "[LOCATION]", "[LAKE]", "[CONTENT]"),
};
// Make the request
contentServiceClient.DeleteContent(request);

DeleteContent(String, CallSettings)

public virtual void DeleteContent(string name, CallSettings callSettings = null)

Delete a content.

Parameters
NameDescription
nameString

Required. The resource name of the content: projects/{project_id}/locations/{location_id}/lakes/{lake_id}/content/{content_id}

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Example
// Create client
ContentServiceClient contentServiceClient = ContentServiceClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/lakes/[LAKE]/content/[CONTENT]";
// Make the request
contentServiceClient.DeleteContent(name);

DeleteContentAsync(ContentName, CallSettings)

public virtual Task DeleteContentAsync(ContentName name, CallSettings callSettings = null)

Delete a content.

Parameters
NameDescription
nameContentName

Required. The resource name of the content: projects/{project_id}/locations/{location_id}/lakes/{lake_id}/content/{content_id}

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task

A Task containing the RPC response.

Example
// Create client
ContentServiceClient contentServiceClient = await ContentServiceClient.CreateAsync();
// Initialize request argument(s)
ContentName name = ContentName.FromProjectLocationLakeContent("[PROJECT]", "[LOCATION]", "[LAKE]", "[CONTENT]");
// Make the request
await contentServiceClient.DeleteContentAsync(name);

DeleteContentAsync(ContentName, CancellationToken)

public virtual Task DeleteContentAsync(ContentName name, CancellationToken cancellationToken)

Delete a content.

Parameters
NameDescription
nameContentName

Required. The resource name of the content: projects/{project_id}/locations/{location_id}/lakes/{lake_id}/content/{content_id}

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task

A Task containing the RPC response.

Example
// Create client
ContentServiceClient contentServiceClient = await ContentServiceClient.CreateAsync();
// Initialize request argument(s)
ContentName name = ContentName.FromProjectLocationLakeContent("[PROJECT]", "[LOCATION]", "[LAKE]", "[CONTENT]");
// Make the request
await contentServiceClient.DeleteContentAsync(name);

DeleteContentAsync(DeleteContentRequest, CallSettings)

public virtual Task DeleteContentAsync(DeleteContentRequest request, CallSettings callSettings = null)

Delete a content.

Parameters
NameDescription
requestDeleteContentRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task

A Task containing the RPC response.

Example
// Create client
ContentServiceClient contentServiceClient = await ContentServiceClient.CreateAsync();
// Initialize request argument(s)
DeleteContentRequest request = new DeleteContentRequest
{
    ContentName = ContentName.FromProjectLocationLakeContent("[PROJECT]", "[LOCATION]", "[LAKE]", "[CONTENT]"),
};
// Make the request
await contentServiceClient.DeleteContentAsync(request);

DeleteContentAsync(DeleteContentRequest, CancellationToken)

public virtual Task DeleteContentAsync(DeleteContentRequest request, CancellationToken cancellationToken)

Delete a content.

Parameters
NameDescription
requestDeleteContentRequest

The request object containing all of the parameters for the API call.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task

A Task containing the RPC response.

Example
// Create client
ContentServiceClient contentServiceClient = await ContentServiceClient.CreateAsync();
// Initialize request argument(s)
DeleteContentRequest request = new DeleteContentRequest
{
    ContentName = ContentName.FromProjectLocationLakeContent("[PROJECT]", "[LOCATION]", "[LAKE]", "[CONTENT]"),
};
// Make the request
await contentServiceClient.DeleteContentAsync(request);

DeleteContentAsync(String, CallSettings)

public virtual Task DeleteContentAsync(string name, CallSettings callSettings = null)

Delete a content.

Parameters
NameDescription
nameString

Required. The resource name of the content: projects/{project_id}/locations/{location_id}/lakes/{lake_id}/content/{content_id}

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task

A Task containing the RPC response.

Example
// Create client
ContentServiceClient contentServiceClient = await ContentServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/lakes/[LAKE]/content/[CONTENT]";
// Make the request
await contentServiceClient.DeleteContentAsync(name);

DeleteContentAsync(String, CancellationToken)

public virtual Task DeleteContentAsync(string name, CancellationToken cancellationToken)

Delete a content.

Parameters
NameDescription
nameString

Required. The resource name of the content: projects/{project_id}/locations/{location_id}/lakes/{lake_id}/content/{content_id}

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task

A Task containing the RPC response.

Example
// Create client
ContentServiceClient contentServiceClient = await ContentServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/lakes/[LAKE]/content/[CONTENT]";
// Make the request
await contentServiceClient.DeleteContentAsync(name);

GetContent(ContentName, CallSettings)

public virtual Content GetContent(ContentName name, CallSettings callSettings = null)

Get a content resource.

Parameters
NameDescription
nameContentName

Required. The resource name of the content: projects/{project_id}/locations/{location_id}/lakes/{lake_id}/content/{content_id}

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Content

The RPC response.

Example
// Create client
ContentServiceClient contentServiceClient = ContentServiceClient.Create();
// Initialize request argument(s)
ContentName name = ContentName.FromProjectLocationLakeContent("[PROJECT]", "[LOCATION]", "[LAKE]", "[CONTENT]");
// Make the request
Content response = contentServiceClient.GetContent(name);

GetContent(GetContentRequest, CallSettings)

public virtual Content GetContent(GetContentRequest request, CallSettings callSettings = null)

Get a content resource.

Parameters
NameDescription
requestGetContentRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Content

The RPC response.

Example
// Create client
ContentServiceClient contentServiceClient = ContentServiceClient.Create();
// Initialize request argument(s)
GetContentRequest request = new GetContentRequest
{
    ContentName = ContentName.FromProjectLocationLakeContent("[PROJECT]", "[LOCATION]", "[LAKE]", "[CONTENT]"),
    View = GetContentRequest.Types.ContentView.Unspecified,
};
// Make the request
Content response = contentServiceClient.GetContent(request);

GetContent(String, CallSettings)

public virtual Content GetContent(string name, CallSettings callSettings = null)

Get a content resource.

Parameters
NameDescription
nameString

Required. The resource name of the content: projects/{project_id}/locations/{location_id}/lakes/{lake_id}/content/{content_id}

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Content

The RPC response.

Example
// Create client
ContentServiceClient contentServiceClient = ContentServiceClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/lakes/[LAKE]/content/[CONTENT]";
// Make the request
Content response = contentServiceClient.GetContent(name);

GetContentAsync(ContentName, CallSettings)

public virtual Task<Content> GetContentAsync(ContentName name, CallSettings callSettings = null)

Get a content resource.

Parameters
NameDescription
nameContentName

Required. The resource name of the content: projects/{project_id}/locations/{location_id}/lakes/{lake_id}/content/{content_id}

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Content>

A Task containing the RPC response.

Example
// Create client
ContentServiceClient contentServiceClient = await ContentServiceClient.CreateAsync();
// Initialize request argument(s)
ContentName name = ContentName.FromProjectLocationLakeContent("[PROJECT]", "[LOCATION]", "[LAKE]", "[CONTENT]");
// Make the request
Content response = await contentServiceClient.GetContentAsync(name);

GetContentAsync(ContentName, CancellationToken)

public virtual Task<Content> GetContentAsync(ContentName name, CancellationToken cancellationToken)

Get a content resource.

Parameters
NameDescription
nameContentName

Required. The resource name of the content: projects/{project_id}/locations/{location_id}/lakes/{lake_id}/content/{content_id}

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Content>

A Task containing the RPC response.

Example
// Create client
ContentServiceClient contentServiceClient = await ContentServiceClient.CreateAsync();
// Initialize request argument(s)
ContentName name = ContentName.FromProjectLocationLakeContent("[PROJECT]", "[LOCATION]", "[LAKE]", "[CONTENT]");
// Make the request
Content response = await contentServiceClient.GetContentAsync(name);

GetContentAsync(GetContentRequest, CallSettings)

public virtual Task<Content> GetContentAsync(GetContentRequest request, CallSettings callSettings = null)

Get a content resource.

Parameters
NameDescription
requestGetContentRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Content>

A Task containing the RPC response.

Example
// Create client
ContentServiceClient contentServiceClient = await ContentServiceClient.CreateAsync();
// Initialize request argument(s)
GetContentRequest request = new GetContentRequest
{
    ContentName = ContentName.FromProjectLocationLakeContent("[PROJECT]", "[LOCATION]", "[LAKE]", "[CONTENT]"),
    View = GetContentRequest.Types.ContentView.Unspecified,
};
// Make the request
Content response = await contentServiceClient.GetContentAsync(request);

GetContentAsync(GetContentRequest, CancellationToken)

public virtual Task<Content> GetContentAsync(GetContentRequest request, CancellationToken cancellationToken)

Get a content resource.

Parameters
NameDescription
requestGetContentRequest

The request object containing all of the parameters for the API call.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Content>

A Task containing the RPC response.

Example
// Create client
ContentServiceClient contentServiceClient = await ContentServiceClient.CreateAsync();
// Initialize request argument(s)
GetContentRequest request = new GetContentRequest
{
    ContentName = ContentName.FromProjectLocationLakeContent("[PROJECT]", "[LOCATION]", "[LAKE]", "[CONTENT]"),
    View = GetContentRequest.Types.ContentView.Unspecified,
};
// Make the request
Content response = await contentServiceClient.GetContentAsync(request);

GetContentAsync(String, CallSettings)

public virtual Task<Content> GetContentAsync(string name, CallSettings callSettings = null)

Get a content resource.

Parameters
NameDescription
nameString

Required. The resource name of the content: projects/{project_id}/locations/{location_id}/lakes/{lake_id}/content/{content_id}

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Content>

A Task containing the RPC response.

Example
// Create client
ContentServiceClient contentServiceClient = await ContentServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/lakes/[LAKE]/content/[CONTENT]";
// Make the request
Content response = await contentServiceClient.GetContentAsync(name);

GetContentAsync(String, CancellationToken)

public virtual Task<Content> GetContentAsync(string name, CancellationToken cancellationToken)

Get a content resource.

Parameters
NameDescription
nameString

Required. The resource name of the content: projects/{project_id}/locations/{location_id}/lakes/{lake_id}/content/{content_id}

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Content>

A Task containing the RPC response.

Example
// Create client
ContentServiceClient contentServiceClient = await ContentServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/lakes/[LAKE]/content/[CONTENT]";
// Make the request
Content response = await contentServiceClient.GetContentAsync(name);

ListContent(LakeName, String, Nullable<Int32>, CallSettings)

public virtual PagedEnumerable<ListContentResponse, Content> ListContent(LakeName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

List content.

Parameters
NameDescription
parentLakeName

Required. The resource name of the parent lake: projects/{project_id}/locations/{location_id}/lakes/{lake_id}

pageTokenString

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSizeNullable<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.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerable<ListContentResponse, Content>

A pageable sequence of Content resources.

Example
// Create client
ContentServiceClient contentServiceClient = ContentServiceClient.Create();
// Initialize request argument(s)
LakeName parent = LakeName.FromProjectLocationLake("[PROJECT]", "[LOCATION]", "[LAKE]");
// Make the request
PagedEnumerable<ListContentResponse, Content> response = contentServiceClient.ListContent(parent);

// Iterate over all response items, lazily performing RPCs as required
foreach (Content 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 (ListContentResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Content 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<Content> 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 (Content 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;

ListContent(ListContentRequest, CallSettings)

public virtual PagedEnumerable<ListContentResponse, Content> ListContent(ListContentRequest request, CallSettings callSettings = null)

List content.

Parameters
NameDescription
requestListContentRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerable<ListContentResponse, Content>

A pageable sequence of Content resources.

Example
// Create client
ContentServiceClient contentServiceClient = ContentServiceClient.Create();
// Initialize request argument(s)
ListContentRequest request = new ListContentRequest
{
    ParentAsLakeName = LakeName.FromProjectLocationLake("[PROJECT]", "[LOCATION]", "[LAKE]"),
    Filter = "",
};
// Make the request
PagedEnumerable<ListContentResponse, Content> response = contentServiceClient.ListContent(request);

// Iterate over all response items, lazily performing RPCs as required
foreach (Content 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 (ListContentResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Content 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<Content> 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 (Content 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;

ListContent(String, String, Nullable<Int32>, CallSettings)

public virtual PagedEnumerable<ListContentResponse, Content> ListContent(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

List content.

Parameters
NameDescription
parentString

Required. The resource name of the parent lake: projects/{project_id}/locations/{location_id}/lakes/{lake_id}

pageTokenString

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSizeNullable<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.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerable<ListContentResponse, Content>

A pageable sequence of Content resources.

Example
// Create client
ContentServiceClient contentServiceClient = ContentServiceClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]/lakes/[LAKE]";
// Make the request
PagedEnumerable<ListContentResponse, Content> response = contentServiceClient.ListContent(parent);

// Iterate over all response items, lazily performing RPCs as required
foreach (Content 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 (ListContentResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Content 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<Content> 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 (Content 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;

ListContentAsync(LakeName, String, Nullable<Int32>, CallSettings)

public virtual PagedAsyncEnumerable<ListContentResponse, Content> ListContentAsync(LakeName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

List content.

Parameters
NameDescription
parentLakeName

Required. The resource name of the parent lake: projects/{project_id}/locations/{location_id}/lakes/{lake_id}

pageTokenString

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSizeNullable<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.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerable<ListContentResponse, Content>

A pageable asynchronous sequence of Content resources.

Example
// Create client
ContentServiceClient contentServiceClient = await ContentServiceClient.CreateAsync();
// Initialize request argument(s)
LakeName parent = LakeName.FromProjectLocationLake("[PROJECT]", "[LOCATION]", "[LAKE]");
// Make the request
PagedAsyncEnumerable<ListContentResponse, Content> response = contentServiceClient.ListContentAsync(parent);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((Content item) =>
{
    // Do something with each item
    Console.WriteLine(item);
});

// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListContentResponse page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Content 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<Content> 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 (Content 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;

ListContentAsync(ListContentRequest, CallSettings)

public virtual PagedAsyncEnumerable<ListContentResponse, Content> ListContentAsync(ListContentRequest request, CallSettings callSettings = null)

List content.

Parameters
NameDescription
requestListContentRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerable<ListContentResponse, Content>

A pageable asynchronous sequence of Content resources.

Example
// Create client
ContentServiceClient contentServiceClient = await ContentServiceClient.CreateAsync();
// Initialize request argument(s)
ListContentRequest request = new ListContentRequest
{
    ParentAsLakeName = LakeName.FromProjectLocationLake("[PROJECT]", "[LOCATION]", "[LAKE]"),
    Filter = "",
};
// Make the request
PagedAsyncEnumerable<ListContentResponse, Content> response = contentServiceClient.ListContentAsync(request);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((Content item) =>
{
    // Do something with each item
    Console.WriteLine(item);
});

// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListContentResponse page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Content 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<Content> 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 (Content 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;

ListContentAsync(String, String, Nullable<Int32>, CallSettings)

public virtual PagedAsyncEnumerable<ListContentResponse, Content> ListContentAsync(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

List content.

Parameters
NameDescription
parentString

Required. The resource name of the parent lake: projects/{project_id}/locations/{location_id}/lakes/{lake_id}

pageTokenString

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSizeNullable<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.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerable<ListContentResponse, Content>

A pageable asynchronous sequence of Content resources.

Example
// Create client
ContentServiceClient contentServiceClient = await ContentServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]/lakes/[LAKE]";
// Make the request
PagedAsyncEnumerable<ListContentResponse, Content> response = contentServiceClient.ListContentAsync(parent);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((Content item) =>
{
    // Do something with each item
    Console.WriteLine(item);
});

// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListContentResponse page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Content 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<Content> 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 (Content 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() and CreateAsync(CancellationToken). Channels which weren't automatically created are not affected.

Returns
TypeDescription
Task

A task representing the asynchronous shutdown operation.

Remarks

After calling this method, further calls to Create() and CreateAsync(CancellationToken) will create new channels, which could in turn be shut down by another call to this method.

UpdateContent(Content, FieldMask, CallSettings)

public virtual Content UpdateContent(Content content, FieldMask updateMask, CallSettings callSettings = null)

Update a content. Only supports full resource update.

Parameters
NameDescription
contentContent

Required. Update description. Only fields specified in update_mask are updated.

updateMaskFieldMask

Required. Mask of fields to update.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Content

The RPC response.

Example
// Create client
ContentServiceClient contentServiceClient = ContentServiceClient.Create();
// Initialize request argument(s)
Content content = new Content();
FieldMask updateMask = new FieldMask();
// Make the request
Content response = contentServiceClient.UpdateContent(content, updateMask);

UpdateContent(UpdateContentRequest, CallSettings)

public virtual Content UpdateContent(UpdateContentRequest request, CallSettings callSettings = null)

Update a content. Only supports full resource update.

Parameters
NameDescription
requestUpdateContentRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Content

The RPC response.

Example
// Create client
ContentServiceClient contentServiceClient = ContentServiceClient.Create();
// Initialize request argument(s)
UpdateContentRequest request = new UpdateContentRequest
{
    UpdateMask = new FieldMask(),
    Content = new Content(),
    ValidateOnly = false,
};
// Make the request
Content response = contentServiceClient.UpdateContent(request);

UpdateContentAsync(Content, FieldMask, CallSettings)

public virtual Task<Content> UpdateContentAsync(Content content, FieldMask updateMask, CallSettings callSettings = null)

Update a content. Only supports full resource update.

Parameters
NameDescription
contentContent

Required. Update description. Only fields specified in update_mask are updated.

updateMaskFieldMask

Required. Mask of fields to update.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Content>

A Task containing the RPC response.

Example
// Create client
ContentServiceClient contentServiceClient = await ContentServiceClient.CreateAsync();
// Initialize request argument(s)
Content content = new Content();
FieldMask updateMask = new FieldMask();
// Make the request
Content response = await contentServiceClient.UpdateContentAsync(content, updateMask);

UpdateContentAsync(Content, FieldMask, CancellationToken)

public virtual Task<Content> UpdateContentAsync(Content content, FieldMask updateMask, CancellationToken cancellationToken)

Update a content. Only supports full resource update.

Parameters
NameDescription
contentContent

Required. Update description. Only fields specified in update_mask are updated.

updateMaskFieldMask

Required. Mask of fields to update.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Content>

A Task containing the RPC response.

Example
// Create client
ContentServiceClient contentServiceClient = await ContentServiceClient.CreateAsync();
// Initialize request argument(s)
Content content = new Content();
FieldMask updateMask = new FieldMask();
// Make the request
Content response = await contentServiceClient.UpdateContentAsync(content, updateMask);

UpdateContentAsync(UpdateContentRequest, CallSettings)

public virtual Task<Content> UpdateContentAsync(UpdateContentRequest request, CallSettings callSettings = null)

Update a content. Only supports full resource update.

Parameters
NameDescription
requestUpdateContentRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Content>

A Task containing the RPC response.

Example
// Create client
ContentServiceClient contentServiceClient = await ContentServiceClient.CreateAsync();
// Initialize request argument(s)
UpdateContentRequest request = new UpdateContentRequest
{
    UpdateMask = new FieldMask(),
    Content = new Content(),
    ValidateOnly = false,
};
// Make the request
Content response = await contentServiceClient.UpdateContentAsync(request);

UpdateContentAsync(UpdateContentRequest, CancellationToken)

public virtual Task<Content> UpdateContentAsync(UpdateContentRequest request, CancellationToken cancellationToken)

Update a content. Only supports full resource update.

Parameters
NameDescription
requestUpdateContentRequest

The request object containing all of the parameters for the API call.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Content>

A Task containing the RPC response.

Example
// Create client
ContentServiceClient contentServiceClient = await ContentServiceClient.CreateAsync();
// Initialize request argument(s)
UpdateContentRequest request = new UpdateContentRequest
{
    UpdateMask = new FieldMask(),
    Content = new Content(),
    ValidateOnly = false,
};
// Make the request
Content response = await contentServiceClient.UpdateContentAsync(request);