public abstract class SchemaServiceClient
Reference documentation and code samples for the Discovery Engine v1beta API class SchemaServiceClient.
SchemaService client wrapper, for convenient use.
Derived Types
Namespace
Google.Cloud.DiscoveryEngine.V1BetaAssembly
Google.Cloud.DiscoveryEngine.V1Beta.dll
Remarks
Service for managing [Schema][google.cloud.discoveryengine.v1beta.Schema]s.
Properties
CreateSchemaOperationsClient
public virtual OperationsClient CreateSchemaOperationsClient { get; }
The long-running operations client for CreateSchema
.
Property Value | |
---|---|
Type | Description |
OperationsClient |
DefaultEndpoint
public static string DefaultEndpoint { get; }
The default endpoint for the SchemaService service, which is a host of "discoveryengine.googleapis.com" and a port of 443.
Property Value | |
---|---|
Type | Description |
string |
DefaultScopes
public static IReadOnlyList<string> DefaultScopes { get; }
The default SchemaService scopes.
Property Value | |
---|---|
Type | Description |
IReadOnlyListstring |
The default SchemaService scopes are:
DeleteSchemaOperationsClient
public virtual OperationsClient DeleteSchemaOperationsClient { get; }
The long-running operations client for DeleteSchema
.
Property Value | |
---|---|
Type | Description |
OperationsClient |
GrpcClient
public virtual SchemaService.SchemaServiceClient GrpcClient { get; }
The underlying gRPC SchemaService client
Property Value | |
---|---|
Type | Description |
SchemaServiceSchemaServiceClient |
LocationsClient
public virtual LocationsClient LocationsClient { get; }
The LocationsClient associated with this client.
Property Value | |
---|---|
Type | Description |
LocationsClient |
ServiceMetadata
public static ServiceMetadata ServiceMetadata { get; }
The service metadata associated with this client type.
Property Value | |
---|---|
Type | Description |
ServiceMetadata |
UpdateSchemaOperationsClient
public virtual OperationsClient UpdateSchemaOperationsClient { get; }
The long-running operations client for UpdateSchema
.
Property Value | |
---|---|
Type | Description |
OperationsClient |
Methods
Create()
public static SchemaServiceClient Create()
Synchronously creates a SchemaServiceClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use SchemaServiceClientBuilder.
Returns | |
---|---|
Type | Description |
SchemaServiceClient |
The created SchemaServiceClient. |
CreateAsync(CancellationToken)
public static Task<SchemaServiceClient> CreateAsync(CancellationToken cancellationToken = default)
Asynchronously creates a SchemaServiceClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use SchemaServiceClientBuilder.
Parameter | |
---|---|
Name | Description |
cancellationToken |
CancellationToken The CancellationToken to use while creating the client. |
Returns | |
---|---|
Type | Description |
TaskSchemaServiceClient |
The task representing the created SchemaServiceClient. |
CreateSchema(CreateSchemaRequest, CallSettings)
public virtual Operation<Schema, CreateSchemaMetadata> CreateSchema(CreateSchemaRequest request, CallSettings callSettings = null)
Creates a [Schema][google.cloud.discoveryengine.v1beta.Schema].
Parameters | |
---|---|
Name | Description |
request |
CreateSchemaRequest The request object containing all of the parameters for the API call. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationSchemaCreateSchemaMetadata |
The RPC response. |
// Create client
SchemaServiceClient schemaServiceClient = SchemaServiceClient.Create();
// Initialize request argument(s)
CreateSchemaRequest request = new CreateSchemaRequest
{
ParentAsDataStoreName = DataStoreName.FromProjectLocationDataStore("[PROJECT]", "[LOCATION]", "[DATA_STORE]"),
Schema = new Schema(),
SchemaId = "",
};
// Make the request
Operation<Schema, CreateSchemaMetadata> response = schemaServiceClient.CreateSchema(request);
// Poll until the returned long-running operation is complete
Operation<Schema, CreateSchemaMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Schema result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Schema, CreateSchemaMetadata> retrievedResponse = schemaServiceClient.PollOnceCreateSchema(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Schema retrievedResult = retrievedResponse.Result;
}
CreateSchema(DataStoreName, Schema, string, CallSettings)
public virtual Operation<Schema, CreateSchemaMetadata> CreateSchema(DataStoreName parent, Schema schema, string schemaId, CallSettings callSettings = null)
Creates a [Schema][google.cloud.discoveryengine.v1beta.Schema].
Parameters | |
---|---|
Name | Description |
parent |
DataStoreName Required. The parent data store resource name, in the format of
|
schema |
Schema Required. The [Schema][google.cloud.discoveryengine.v1beta.Schema] to create. |
schemaId |
string Required. The ID to use for the [Schema][google.cloud.discoveryengine.v1beta.Schema], which becomes the final component of the [Schema.name][google.cloud.discoveryengine.v1beta.Schema.name]. This field should conform to RFC-1034 standard with a length limit of 63 characters. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationSchemaCreateSchemaMetadata |
The RPC response. |
// Create client
SchemaServiceClient schemaServiceClient = SchemaServiceClient.Create();
// Initialize request argument(s)
DataStoreName parent = DataStoreName.FromProjectLocationDataStore("[PROJECT]", "[LOCATION]", "[DATA_STORE]");
Schema schema = new Schema();
string schemaId = "";
// Make the request
Operation<Schema, CreateSchemaMetadata> response = schemaServiceClient.CreateSchema(parent, schema, schemaId);
// Poll until the returned long-running operation is complete
Operation<Schema, CreateSchemaMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Schema result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Schema, CreateSchemaMetadata> retrievedResponse = schemaServiceClient.PollOnceCreateSchema(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Schema retrievedResult = retrievedResponse.Result;
}
CreateSchema(string, Schema, string, CallSettings)
public virtual Operation<Schema, CreateSchemaMetadata> CreateSchema(string parent, Schema schema, string schemaId, CallSettings callSettings = null)
Creates a [Schema][google.cloud.discoveryengine.v1beta.Schema].
Parameters | |
---|---|
Name | Description |
parent |
string Required. The parent data store resource name, in the format of
|
schema |
Schema Required. The [Schema][google.cloud.discoveryengine.v1beta.Schema] to create. |
schemaId |
string Required. The ID to use for the [Schema][google.cloud.discoveryengine.v1beta.Schema], which becomes the final component of the [Schema.name][google.cloud.discoveryengine.v1beta.Schema.name]. This field should conform to RFC-1034 standard with a length limit of 63 characters. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationSchemaCreateSchemaMetadata |
The RPC response. |
// Create client
SchemaServiceClient schemaServiceClient = SchemaServiceClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]/dataStores/[DATA_STORE]";
Schema schema = new Schema();
string schemaId = "";
// Make the request
Operation<Schema, CreateSchemaMetadata> response = schemaServiceClient.CreateSchema(parent, schema, schemaId);
// Poll until the returned long-running operation is complete
Operation<Schema, CreateSchemaMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Schema result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Schema, CreateSchemaMetadata> retrievedResponse = schemaServiceClient.PollOnceCreateSchema(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Schema retrievedResult = retrievedResponse.Result;
}
CreateSchemaAsync(CreateSchemaRequest, CallSettings)
public virtual Task<Operation<Schema, CreateSchemaMetadata>> CreateSchemaAsync(CreateSchemaRequest request, CallSettings callSettings = null)
Creates a [Schema][google.cloud.discoveryengine.v1beta.Schema].
Parameters | |
---|---|
Name | Description |
request |
CreateSchemaRequest The request object containing all of the parameters for the API call. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationSchemaCreateSchemaMetadata |
A Task containing the RPC response. |
// Create client
SchemaServiceClient schemaServiceClient = await SchemaServiceClient.CreateAsync();
// Initialize request argument(s)
CreateSchemaRequest request = new CreateSchemaRequest
{
ParentAsDataStoreName = DataStoreName.FromProjectLocationDataStore("[PROJECT]", "[LOCATION]", "[DATA_STORE]"),
Schema = new Schema(),
SchemaId = "",
};
// Make the request
Operation<Schema, CreateSchemaMetadata> response = await schemaServiceClient.CreateSchemaAsync(request);
// Poll until the returned long-running operation is complete
Operation<Schema, CreateSchemaMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Schema result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Schema, CreateSchemaMetadata> retrievedResponse = await schemaServiceClient.PollOnceCreateSchemaAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Schema retrievedResult = retrievedResponse.Result;
}
CreateSchemaAsync(CreateSchemaRequest, CancellationToken)
public virtual Task<Operation<Schema, CreateSchemaMetadata>> CreateSchemaAsync(CreateSchemaRequest request, CancellationToken cancellationToken)
Creates a [Schema][google.cloud.discoveryengine.v1beta.Schema].
Parameters | |
---|---|
Name | Description |
request |
CreateSchemaRequest The request object containing all of the parameters for the API call. |
cancellationToken |
CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskOperationSchemaCreateSchemaMetadata |
A Task containing the RPC response. |
// Create client
SchemaServiceClient schemaServiceClient = await SchemaServiceClient.CreateAsync();
// Initialize request argument(s)
CreateSchemaRequest request = new CreateSchemaRequest
{
ParentAsDataStoreName = DataStoreName.FromProjectLocationDataStore("[PROJECT]", "[LOCATION]", "[DATA_STORE]"),
Schema = new Schema(),
SchemaId = "",
};
// Make the request
Operation<Schema, CreateSchemaMetadata> response = await schemaServiceClient.CreateSchemaAsync(request);
// Poll until the returned long-running operation is complete
Operation<Schema, CreateSchemaMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Schema result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Schema, CreateSchemaMetadata> retrievedResponse = await schemaServiceClient.PollOnceCreateSchemaAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Schema retrievedResult = retrievedResponse.Result;
}
CreateSchemaAsync(DataStoreName, Schema, string, CallSettings)
public virtual Task<Operation<Schema, CreateSchemaMetadata>> CreateSchemaAsync(DataStoreName parent, Schema schema, string schemaId, CallSettings callSettings = null)
Creates a [Schema][google.cloud.discoveryengine.v1beta.Schema].
Parameters | |
---|---|
Name | Description |
parent |
DataStoreName Required. The parent data store resource name, in the format of
|
schema |
Schema Required. The [Schema][google.cloud.discoveryengine.v1beta.Schema] to create. |
schemaId |
string Required. The ID to use for the [Schema][google.cloud.discoveryengine.v1beta.Schema], which becomes the final component of the [Schema.name][google.cloud.discoveryengine.v1beta.Schema.name]. This field should conform to RFC-1034 standard with a length limit of 63 characters. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationSchemaCreateSchemaMetadata |
A Task containing the RPC response. |
// Create client
SchemaServiceClient schemaServiceClient = await SchemaServiceClient.CreateAsync();
// Initialize request argument(s)
DataStoreName parent = DataStoreName.FromProjectLocationDataStore("[PROJECT]", "[LOCATION]", "[DATA_STORE]");
Schema schema = new Schema();
string schemaId = "";
// Make the request
Operation<Schema, CreateSchemaMetadata> response = await schemaServiceClient.CreateSchemaAsync(parent, schema, schemaId);
// Poll until the returned long-running operation is complete
Operation<Schema, CreateSchemaMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Schema result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Schema, CreateSchemaMetadata> retrievedResponse = await schemaServiceClient.PollOnceCreateSchemaAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Schema retrievedResult = retrievedResponse.Result;
}
CreateSchemaAsync(DataStoreName, Schema, string, CancellationToken)
public virtual Task<Operation<Schema, CreateSchemaMetadata>> CreateSchemaAsync(DataStoreName parent, Schema schema, string schemaId, CancellationToken cancellationToken)
Creates a [Schema][google.cloud.discoveryengine.v1beta.Schema].
Parameters | |
---|---|
Name | Description |
parent |
DataStoreName Required. The parent data store resource name, in the format of
|
schema |
Schema Required. The [Schema][google.cloud.discoveryengine.v1beta.Schema] to create. |
schemaId |
string Required. The ID to use for the [Schema][google.cloud.discoveryengine.v1beta.Schema], which becomes the final component of the [Schema.name][google.cloud.discoveryengine.v1beta.Schema.name]. This field should conform to RFC-1034 standard with a length limit of 63 characters. |
cancellationToken |
CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskOperationSchemaCreateSchemaMetadata |
A Task containing the RPC response. |
// Create client
SchemaServiceClient schemaServiceClient = await SchemaServiceClient.CreateAsync();
// Initialize request argument(s)
DataStoreName parent = DataStoreName.FromProjectLocationDataStore("[PROJECT]", "[LOCATION]", "[DATA_STORE]");
Schema schema = new Schema();
string schemaId = "";
// Make the request
Operation<Schema, CreateSchemaMetadata> response = await schemaServiceClient.CreateSchemaAsync(parent, schema, schemaId);
// Poll until the returned long-running operation is complete
Operation<Schema, CreateSchemaMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Schema result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Schema, CreateSchemaMetadata> retrievedResponse = await schemaServiceClient.PollOnceCreateSchemaAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Schema retrievedResult = retrievedResponse.Result;
}
CreateSchemaAsync(string, Schema, string, CallSettings)
public virtual Task<Operation<Schema, CreateSchemaMetadata>> CreateSchemaAsync(string parent, Schema schema, string schemaId, CallSettings callSettings = null)
Creates a [Schema][google.cloud.discoveryengine.v1beta.Schema].
Parameters | |
---|---|
Name | Description |
parent |
string Required. The parent data store resource name, in the format of
|
schema |
Schema Required. The [Schema][google.cloud.discoveryengine.v1beta.Schema] to create. |
schemaId |
string Required. The ID to use for the [Schema][google.cloud.discoveryengine.v1beta.Schema], which becomes the final component of the [Schema.name][google.cloud.discoveryengine.v1beta.Schema.name]. This field should conform to RFC-1034 standard with a length limit of 63 characters. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationSchemaCreateSchemaMetadata |
A Task containing the RPC response. |
// Create client
SchemaServiceClient schemaServiceClient = await SchemaServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]/dataStores/[DATA_STORE]";
Schema schema = new Schema();
string schemaId = "";
// Make the request
Operation<Schema, CreateSchemaMetadata> response = await schemaServiceClient.CreateSchemaAsync(parent, schema, schemaId);
// Poll until the returned long-running operation is complete
Operation<Schema, CreateSchemaMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Schema result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Schema, CreateSchemaMetadata> retrievedResponse = await schemaServiceClient.PollOnceCreateSchemaAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Schema retrievedResult = retrievedResponse.Result;
}
CreateSchemaAsync(string, Schema, string, CancellationToken)
public virtual Task<Operation<Schema, CreateSchemaMetadata>> CreateSchemaAsync(string parent, Schema schema, string schemaId, CancellationToken cancellationToken)
Creates a [Schema][google.cloud.discoveryengine.v1beta.Schema].
Parameters | |
---|---|
Name | Description |
parent |
string Required. The parent data store resource name, in the format of
|
schema |
Schema Required. The [Schema][google.cloud.discoveryengine.v1beta.Schema] to create. |
schemaId |
string Required. The ID to use for the [Schema][google.cloud.discoveryengine.v1beta.Schema], which becomes the final component of the [Schema.name][google.cloud.discoveryengine.v1beta.Schema.name]. This field should conform to RFC-1034 standard with a length limit of 63 characters. |
cancellationToken |
CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskOperationSchemaCreateSchemaMetadata |
A Task containing the RPC response. |
// Create client
SchemaServiceClient schemaServiceClient = await SchemaServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]/dataStores/[DATA_STORE]";
Schema schema = new Schema();
string schemaId = "";
// Make the request
Operation<Schema, CreateSchemaMetadata> response = await schemaServiceClient.CreateSchemaAsync(parent, schema, schemaId);
// Poll until the returned long-running operation is complete
Operation<Schema, CreateSchemaMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Schema result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Schema, CreateSchemaMetadata> retrievedResponse = await schemaServiceClient.PollOnceCreateSchemaAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Schema retrievedResult = retrievedResponse.Result;
}
DeleteSchema(DeleteSchemaRequest, CallSettings)
public virtual Operation<Empty, DeleteSchemaMetadata> DeleteSchema(DeleteSchemaRequest request, CallSettings callSettings = null)
Deletes a [Schema][google.cloud.discoveryengine.v1beta.Schema].
Parameters | |
---|---|
Name | Description |
request |
DeleteSchemaRequest The request object containing all of the parameters for the API call. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationEmptyDeleteSchemaMetadata |
The RPC response. |
// Create client
SchemaServiceClient schemaServiceClient = SchemaServiceClient.Create();
// Initialize request argument(s)
DeleteSchemaRequest request = new DeleteSchemaRequest
{
SchemaName = SchemaName.FromProjectLocationDataStoreSchema("[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[SCHEMA]"),
};
// Make the request
Operation<Empty, DeleteSchemaMetadata> response = schemaServiceClient.DeleteSchema(request);
// Poll until the returned long-running operation is complete
Operation<Empty, DeleteSchemaMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Empty result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, DeleteSchemaMetadata> retrievedResponse = schemaServiceClient.PollOnceDeleteSchema(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Empty retrievedResult = retrievedResponse.Result;
}
DeleteSchema(SchemaName, CallSettings)
public virtual Operation<Empty, DeleteSchemaMetadata> DeleteSchema(SchemaName name, CallSettings callSettings = null)
Deletes a [Schema][google.cloud.discoveryengine.v1beta.Schema].
Parameters | |
---|---|
Name | Description |
name |
SchemaName Required. The full resource name of the schema, in the format of
|
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationEmptyDeleteSchemaMetadata |
The RPC response. |
// Create client
SchemaServiceClient schemaServiceClient = SchemaServiceClient.Create();
// Initialize request argument(s)
SchemaName name = SchemaName.FromProjectLocationDataStoreSchema("[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[SCHEMA]");
// Make the request
Operation<Empty, DeleteSchemaMetadata> response = schemaServiceClient.DeleteSchema(name);
// Poll until the returned long-running operation is complete
Operation<Empty, DeleteSchemaMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Empty result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, DeleteSchemaMetadata> retrievedResponse = schemaServiceClient.PollOnceDeleteSchema(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Empty retrievedResult = retrievedResponse.Result;
}
DeleteSchema(string, CallSettings)
public virtual Operation<Empty, DeleteSchemaMetadata> DeleteSchema(string name, CallSettings callSettings = null)
Deletes a [Schema][google.cloud.discoveryengine.v1beta.Schema].
Parameters | |
---|---|
Name | Description |
name |
string Required. The full resource name of the schema, in the format of
|
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationEmptyDeleteSchemaMetadata |
The RPC response. |
// Create client
SchemaServiceClient schemaServiceClient = SchemaServiceClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/dataStores/[DATA_STORE]/schemas/[SCHEMA]";
// Make the request
Operation<Empty, DeleteSchemaMetadata> response = schemaServiceClient.DeleteSchema(name);
// Poll until the returned long-running operation is complete
Operation<Empty, DeleteSchemaMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Empty result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, DeleteSchemaMetadata> retrievedResponse = schemaServiceClient.PollOnceDeleteSchema(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Empty retrievedResult = retrievedResponse.Result;
}
DeleteSchemaAsync(DeleteSchemaRequest, CallSettings)
public virtual Task<Operation<Empty, DeleteSchemaMetadata>> DeleteSchemaAsync(DeleteSchemaRequest request, CallSettings callSettings = null)
Deletes a [Schema][google.cloud.discoveryengine.v1beta.Schema].
Parameters | |
---|---|
Name | Description |
request |
DeleteSchemaRequest The request object containing all of the parameters for the API call. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationEmptyDeleteSchemaMetadata |
A Task containing the RPC response. |
// Create client
SchemaServiceClient schemaServiceClient = await SchemaServiceClient.CreateAsync();
// Initialize request argument(s)
DeleteSchemaRequest request = new DeleteSchemaRequest
{
SchemaName = SchemaName.FromProjectLocationDataStoreSchema("[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[SCHEMA]"),
};
// Make the request
Operation<Empty, DeleteSchemaMetadata> response = await schemaServiceClient.DeleteSchemaAsync(request);
// Poll until the returned long-running operation is complete
Operation<Empty, DeleteSchemaMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Empty result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, DeleteSchemaMetadata> retrievedResponse = await schemaServiceClient.PollOnceDeleteSchemaAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Empty retrievedResult = retrievedResponse.Result;
}
DeleteSchemaAsync(DeleteSchemaRequest, CancellationToken)
public virtual Task<Operation<Empty, DeleteSchemaMetadata>> DeleteSchemaAsync(DeleteSchemaRequest request, CancellationToken cancellationToken)
Deletes a [Schema][google.cloud.discoveryengine.v1beta.Schema].
Parameters | |
---|---|
Name | Description |
request |
DeleteSchemaRequest The request object containing all of the parameters for the API call. |
cancellationToken |
CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskOperationEmptyDeleteSchemaMetadata |
A Task containing the RPC response. |
// Create client
SchemaServiceClient schemaServiceClient = await SchemaServiceClient.CreateAsync();
// Initialize request argument(s)
DeleteSchemaRequest request = new DeleteSchemaRequest
{
SchemaName = SchemaName.FromProjectLocationDataStoreSchema("[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[SCHEMA]"),
};
// Make the request
Operation<Empty, DeleteSchemaMetadata> response = await schemaServiceClient.DeleteSchemaAsync(request);
// Poll until the returned long-running operation is complete
Operation<Empty, DeleteSchemaMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Empty result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, DeleteSchemaMetadata> retrievedResponse = await schemaServiceClient.PollOnceDeleteSchemaAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Empty retrievedResult = retrievedResponse.Result;
}
DeleteSchemaAsync(SchemaName, CallSettings)
public virtual Task<Operation<Empty, DeleteSchemaMetadata>> DeleteSchemaAsync(SchemaName name, CallSettings callSettings = null)
Deletes a [Schema][google.cloud.discoveryengine.v1beta.Schema].
Parameters | |
---|---|
Name | Description |
name |
SchemaName Required. The full resource name of the schema, in the format of
|
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationEmptyDeleteSchemaMetadata |
A Task containing the RPC response. |
// Create client
SchemaServiceClient schemaServiceClient = await SchemaServiceClient.CreateAsync();
// Initialize request argument(s)
SchemaName name = SchemaName.FromProjectLocationDataStoreSchema("[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[SCHEMA]");
// Make the request
Operation<Empty, DeleteSchemaMetadata> response = await schemaServiceClient.DeleteSchemaAsync(name);
// Poll until the returned long-running operation is complete
Operation<Empty, DeleteSchemaMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Empty result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, DeleteSchemaMetadata> retrievedResponse = await schemaServiceClient.PollOnceDeleteSchemaAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Empty retrievedResult = retrievedResponse.Result;
}
DeleteSchemaAsync(SchemaName, CancellationToken)
public virtual Task<Operation<Empty, DeleteSchemaMetadata>> DeleteSchemaAsync(SchemaName name, CancellationToken cancellationToken)
Deletes a [Schema][google.cloud.discoveryengine.v1beta.Schema].
Parameters | |
---|---|
Name | Description |
name |
SchemaName Required. The full resource name of the schema, in the format of
|
cancellationToken |
CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskOperationEmptyDeleteSchemaMetadata |
A Task containing the RPC response. |
// Create client
SchemaServiceClient schemaServiceClient = await SchemaServiceClient.CreateAsync();
// Initialize request argument(s)
SchemaName name = SchemaName.FromProjectLocationDataStoreSchema("[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[SCHEMA]");
// Make the request
Operation<Empty, DeleteSchemaMetadata> response = await schemaServiceClient.DeleteSchemaAsync(name);
// Poll until the returned long-running operation is complete
Operation<Empty, DeleteSchemaMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Empty result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, DeleteSchemaMetadata> retrievedResponse = await schemaServiceClient.PollOnceDeleteSchemaAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Empty retrievedResult = retrievedResponse.Result;
}
DeleteSchemaAsync(string, CallSettings)
public virtual Task<Operation<Empty, DeleteSchemaMetadata>> DeleteSchemaAsync(string name, CallSettings callSettings = null)
Deletes a [Schema][google.cloud.discoveryengine.v1beta.Schema].
Parameters | |
---|---|
Name | Description |
name |
string Required. The full resource name of the schema, in the format of
|
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationEmptyDeleteSchemaMetadata |
A Task containing the RPC response. |
// Create client
SchemaServiceClient schemaServiceClient = await SchemaServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/dataStores/[DATA_STORE]/schemas/[SCHEMA]";
// Make the request
Operation<Empty, DeleteSchemaMetadata> response = await schemaServiceClient.DeleteSchemaAsync(name);
// Poll until the returned long-running operation is complete
Operation<Empty, DeleteSchemaMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Empty result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, DeleteSchemaMetadata> retrievedResponse = await schemaServiceClient.PollOnceDeleteSchemaAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Empty retrievedResult = retrievedResponse.Result;
}
DeleteSchemaAsync(string, CancellationToken)
public virtual Task<Operation<Empty, DeleteSchemaMetadata>> DeleteSchemaAsync(string name, CancellationToken cancellationToken)
Deletes a [Schema][google.cloud.discoveryengine.v1beta.Schema].
Parameters | |
---|---|
Name | Description |
name |
string Required. The full resource name of the schema, in the format of
|
cancellationToken |
CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskOperationEmptyDeleteSchemaMetadata |
A Task containing the RPC response. |
// Create client
SchemaServiceClient schemaServiceClient = await SchemaServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/dataStores/[DATA_STORE]/schemas/[SCHEMA]";
// Make the request
Operation<Empty, DeleteSchemaMetadata> response = await schemaServiceClient.DeleteSchemaAsync(name);
// Poll until the returned long-running operation is complete
Operation<Empty, DeleteSchemaMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Empty result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, DeleteSchemaMetadata> retrievedResponse = await schemaServiceClient.PollOnceDeleteSchemaAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Empty retrievedResult = retrievedResponse.Result;
}
GetSchema(GetSchemaRequest, CallSettings)
public virtual Schema GetSchema(GetSchemaRequest request, CallSettings callSettings = null)
Gets a [Schema][google.cloud.discoveryengine.v1beta.Schema].
Parameters | |
---|---|
Name | Description |
request |
GetSchemaRequest The request object containing all of the parameters for the API call. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Schema |
The RPC response. |
// Create client
SchemaServiceClient schemaServiceClient = SchemaServiceClient.Create();
// Initialize request argument(s)
GetSchemaRequest request = new GetSchemaRequest
{
SchemaName = SchemaName.FromProjectLocationDataStoreSchema("[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[SCHEMA]"),
};
// Make the request
Schema response = schemaServiceClient.GetSchema(request);
GetSchema(SchemaName, CallSettings)
public virtual Schema GetSchema(SchemaName name, CallSettings callSettings = null)
Gets a [Schema][google.cloud.discoveryengine.v1beta.Schema].
Parameters | |
---|---|
Name | Description |
name |
SchemaName Required. The full resource name of the schema, in the format of
|
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Schema |
The RPC response. |
// Create client
SchemaServiceClient schemaServiceClient = SchemaServiceClient.Create();
// Initialize request argument(s)
SchemaName name = SchemaName.FromProjectLocationDataStoreSchema("[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[SCHEMA]");
// Make the request
Schema response = schemaServiceClient.GetSchema(name);
GetSchema(string, CallSettings)
public virtual Schema GetSchema(string name, CallSettings callSettings = null)
Gets a [Schema][google.cloud.discoveryengine.v1beta.Schema].
Parameters | |
---|---|
Name | Description |
name |
string Required. The full resource name of the schema, in the format of
|
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Schema |
The RPC response. |
// Create client
SchemaServiceClient schemaServiceClient = SchemaServiceClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/dataStores/[DATA_STORE]/schemas/[SCHEMA]";
// Make the request
Schema response = schemaServiceClient.GetSchema(name);
GetSchemaAsync(GetSchemaRequest, CallSettings)
public virtual Task<Schema> GetSchemaAsync(GetSchemaRequest request, CallSettings callSettings = null)
Gets a [Schema][google.cloud.discoveryengine.v1beta.Schema].
Parameters | |
---|---|
Name | Description |
request |
GetSchemaRequest The request object containing all of the parameters for the API call. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskSchema |
A Task containing the RPC response. |
// Create client
SchemaServiceClient schemaServiceClient = await SchemaServiceClient.CreateAsync();
// Initialize request argument(s)
GetSchemaRequest request = new GetSchemaRequest
{
SchemaName = SchemaName.FromProjectLocationDataStoreSchema("[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[SCHEMA]"),
};
// Make the request
Schema response = await schemaServiceClient.GetSchemaAsync(request);
GetSchemaAsync(GetSchemaRequest, CancellationToken)
public virtual Task<Schema> GetSchemaAsync(GetSchemaRequest request, CancellationToken cancellationToken)
Gets a [Schema][google.cloud.discoveryengine.v1beta.Schema].
Parameters | |
---|---|
Name | Description |
request |
GetSchemaRequest The request object containing all of the parameters for the API call. |
cancellationToken |
CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskSchema |
A Task containing the RPC response. |
// Create client
SchemaServiceClient schemaServiceClient = await SchemaServiceClient.CreateAsync();
// Initialize request argument(s)
GetSchemaRequest request = new GetSchemaRequest
{
SchemaName = SchemaName.FromProjectLocationDataStoreSchema("[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[SCHEMA]"),
};
// Make the request
Schema response = await schemaServiceClient.GetSchemaAsync(request);
GetSchemaAsync(SchemaName, CallSettings)
public virtual Task<Schema> GetSchemaAsync(SchemaName name, CallSettings callSettings = null)
Gets a [Schema][google.cloud.discoveryengine.v1beta.Schema].
Parameters | |
---|---|
Name | Description |
name |
SchemaName Required. The full resource name of the schema, in the format of
|
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskSchema |
A Task containing the RPC response. |
// Create client
SchemaServiceClient schemaServiceClient = await SchemaServiceClient.CreateAsync();
// Initialize request argument(s)
SchemaName name = SchemaName.FromProjectLocationDataStoreSchema("[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[SCHEMA]");
// Make the request
Schema response = await schemaServiceClient.GetSchemaAsync(name);
GetSchemaAsync(SchemaName, CancellationToken)
public virtual Task<Schema> GetSchemaAsync(SchemaName name, CancellationToken cancellationToken)
Gets a [Schema][google.cloud.discoveryengine.v1beta.Schema].
Parameters | |
---|---|
Name | Description |
name |
SchemaName Required. The full resource name of the schema, in the format of
|
cancellationToken |
CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskSchema |
A Task containing the RPC response. |
// Create client
SchemaServiceClient schemaServiceClient = await SchemaServiceClient.CreateAsync();
// Initialize request argument(s)
SchemaName name = SchemaName.FromProjectLocationDataStoreSchema("[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[SCHEMA]");
// Make the request
Schema response = await schemaServiceClient.GetSchemaAsync(name);
GetSchemaAsync(string, CallSettings)
public virtual Task<Schema> GetSchemaAsync(string name, CallSettings callSettings = null)
Gets a [Schema][google.cloud.discoveryengine.v1beta.Schema].
Parameters | |
---|---|
Name | Description |
name |
string Required. The full resource name of the schema, in the format of
|
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskSchema |
A Task containing the RPC response. |
// Create client
SchemaServiceClient schemaServiceClient = await SchemaServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/dataStores/[DATA_STORE]/schemas/[SCHEMA]";
// Make the request
Schema response = await schemaServiceClient.GetSchemaAsync(name);
GetSchemaAsync(string, CancellationToken)
public virtual Task<Schema> GetSchemaAsync(string name, CancellationToken cancellationToken)
Gets a [Schema][google.cloud.discoveryengine.v1beta.Schema].
Parameters | |
---|---|
Name | Description |
name |
string Required. The full resource name of the schema, in the format of
|
cancellationToken |
CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskSchema |
A Task containing the RPC response. |
// Create client
SchemaServiceClient schemaServiceClient = await SchemaServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/dataStores/[DATA_STORE]/schemas/[SCHEMA]";
// Make the request
Schema response = await schemaServiceClient.GetSchemaAsync(name);
ListSchemas(DataStoreName, string, int?, CallSettings)
public virtual PagedEnumerable<ListSchemasResponse, Schema> ListSchemas(DataStoreName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
Gets a list of [Schema][google.cloud.discoveryengine.v1beta.Schema]s.
Parameters | |
---|---|
Name | Description |
parent |
DataStoreName Required. The parent data store resource name, in the format of
|
pageToken |
string The token returned from the previous request. A value of |
pageSize |
int The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedEnumerableListSchemasResponseSchema |
A pageable sequence of Schema resources. |
// Create client
SchemaServiceClient schemaServiceClient = SchemaServiceClient.Create();
// Initialize request argument(s)
DataStoreName parent = DataStoreName.FromProjectLocationDataStore("[PROJECT]", "[LOCATION]", "[DATA_STORE]");
// Make the request
PagedEnumerable<ListSchemasResponse, Schema> response = schemaServiceClient.ListSchemas(parent);
// Iterate over all response items, lazily performing RPCs as required
foreach (Schema 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 (ListSchemasResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (Schema 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<Schema> 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 (Schema 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;
ListSchemas(ListSchemasRequest, CallSettings)
public virtual PagedEnumerable<ListSchemasResponse, Schema> ListSchemas(ListSchemasRequest request, CallSettings callSettings = null)
Gets a list of [Schema][google.cloud.discoveryengine.v1beta.Schema]s.
Parameters | |
---|---|
Name | Description |
request |
ListSchemasRequest The request object containing all of the parameters for the API call. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedEnumerableListSchemasResponseSchema |
A pageable sequence of Schema resources. |
// Create client
SchemaServiceClient schemaServiceClient = SchemaServiceClient.Create();
// Initialize request argument(s)
ListSchemasRequest request = new ListSchemasRequest
{
ParentAsDataStoreName = DataStoreName.FromProjectLocationDataStore("[PROJECT]", "[LOCATION]", "[DATA_STORE]"),
};
// Make the request
PagedEnumerable<ListSchemasResponse, Schema> response = schemaServiceClient.ListSchemas(request);
// Iterate over all response items, lazily performing RPCs as required
foreach (Schema 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 (ListSchemasResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (Schema 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<Schema> 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 (Schema 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;
ListSchemas(string, string, int?, CallSettings)
public virtual PagedEnumerable<ListSchemasResponse, Schema> ListSchemas(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
Gets a list of [Schema][google.cloud.discoveryengine.v1beta.Schema]s.
Parameters | |
---|---|
Name | Description |
parent |
string Required. The parent data store resource name, in the format of
|
pageToken |
string The token returned from the previous request. A value of |
pageSize |
int The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedEnumerableListSchemasResponseSchema |
A pageable sequence of Schema resources. |
// Create client
SchemaServiceClient schemaServiceClient = SchemaServiceClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]/dataStores/[DATA_STORE]";
// Make the request
PagedEnumerable<ListSchemasResponse, Schema> response = schemaServiceClient.ListSchemas(parent);
// Iterate over all response items, lazily performing RPCs as required
foreach (Schema 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 (ListSchemasResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (Schema 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<Schema> 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 (Schema 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;
ListSchemasAsync(DataStoreName, string, int?, CallSettings)
public virtual PagedAsyncEnumerable<ListSchemasResponse, Schema> ListSchemasAsync(DataStoreName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
Gets a list of [Schema][google.cloud.discoveryengine.v1beta.Schema]s.
Parameters | |
---|---|
Name | Description |
parent |
DataStoreName Required. The parent data store resource name, in the format of
|
pageToken |
string The token returned from the previous request. A value of |
pageSize |
int The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedAsyncEnumerableListSchemasResponseSchema |
A pageable asynchronous sequence of Schema resources. |
// Create client
SchemaServiceClient schemaServiceClient = await SchemaServiceClient.CreateAsync();
// Initialize request argument(s)
DataStoreName parent = DataStoreName.FromProjectLocationDataStore("[PROJECT]", "[LOCATION]", "[DATA_STORE]");
// Make the request
PagedAsyncEnumerable<ListSchemasResponse, Schema> response = schemaServiceClient.ListSchemasAsync(parent);
// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((Schema 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((ListSchemasResponse page) =>
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (Schema 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<Schema> 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 (Schema 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;
ListSchemasAsync(ListSchemasRequest, CallSettings)
public virtual PagedAsyncEnumerable<ListSchemasResponse, Schema> ListSchemasAsync(ListSchemasRequest request, CallSettings callSettings = null)
Gets a list of [Schema][google.cloud.discoveryengine.v1beta.Schema]s.
Parameters | |
---|---|
Name | Description |
request |
ListSchemasRequest The request object containing all of the parameters for the API call. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedAsyncEnumerableListSchemasResponseSchema |
A pageable asynchronous sequence of Schema resources. |
// Create client
SchemaServiceClient schemaServiceClient = await SchemaServiceClient.CreateAsync();
// Initialize request argument(s)
ListSchemasRequest request = new ListSchemasRequest
{
ParentAsDataStoreName = DataStoreName.FromProjectLocationDataStore("[PROJECT]", "[LOCATION]", "[DATA_STORE]"),
};
// Make the request
PagedAsyncEnumerable<ListSchemasResponse, Schema> response = schemaServiceClient.ListSchemasAsync(request);
// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((Schema 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((ListSchemasResponse page) =>
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (Schema 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<Schema> 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 (Schema 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;
ListSchemasAsync(string, string, int?, CallSettings)
public virtual PagedAsyncEnumerable<ListSchemasResponse, Schema> ListSchemasAsync(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
Gets a list of [Schema][google.cloud.discoveryengine.v1beta.Schema]s.
Parameters | |
---|---|
Name | Description |
parent |
string Required. The parent data store resource name, in the format of
|
pageToken |
string The token returned from the previous request. A value of |
pageSize |
int The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedAsyncEnumerableListSchemasResponseSchema |
A pageable asynchronous sequence of Schema resources. |
// Create client
SchemaServiceClient schemaServiceClient = await SchemaServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]/dataStores/[DATA_STORE]";
// Make the request
PagedAsyncEnumerable<ListSchemasResponse, Schema> response = schemaServiceClient.ListSchemasAsync(parent);
// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((Schema 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((ListSchemasResponse page) =>
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (Schema 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<Schema> 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 (Schema 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;
PollOnceCreateSchema(string, CallSettings)
public virtual Operation<Schema, CreateSchemaMetadata> PollOnceCreateSchema(string operationName, CallSettings callSettings = null)
Poll an operation once, using an operationName
from a previous invocation of CreateSchema
.
Parameters | |
---|---|
Name | Description |
operationName |
string The name of a previously invoked operation. Must not be |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationSchemaCreateSchemaMetadata |
The result of polling the operation. |
PollOnceCreateSchemaAsync(string, CallSettings)
public virtual Task<Operation<Schema, CreateSchemaMetadata>> PollOnceCreateSchemaAsync(string operationName, CallSettings callSettings = null)
Asynchronously poll an operation once, using an operationName
from a previous invocation of
CreateSchema
.
Parameters | |
---|---|
Name | Description |
operationName |
string The name of a previously invoked operation. Must not be |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationSchemaCreateSchemaMetadata |
A task representing the result of polling the operation. |
PollOnceDeleteSchema(string, CallSettings)
public virtual Operation<Empty, DeleteSchemaMetadata> PollOnceDeleteSchema(string operationName, CallSettings callSettings = null)
Poll an operation once, using an operationName
from a previous invocation of DeleteSchema
.
Parameters | |
---|---|
Name | Description |
operationName |
string The name of a previously invoked operation. Must not be |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationEmptyDeleteSchemaMetadata |
The result of polling the operation. |
PollOnceDeleteSchemaAsync(string, CallSettings)
public virtual Task<Operation<Empty, DeleteSchemaMetadata>> PollOnceDeleteSchemaAsync(string operationName, CallSettings callSettings = null)
Asynchronously poll an operation once, using an operationName
from a previous invocation of
DeleteSchema
.
Parameters | |
---|---|
Name | Description |
operationName |
string The name of a previously invoked operation. Must not be |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationEmptyDeleteSchemaMetadata |
A task representing the result of polling the operation. |
PollOnceUpdateSchema(string, CallSettings)
public virtual Operation<Schema, UpdateSchemaMetadata> PollOnceUpdateSchema(string operationName, CallSettings callSettings = null)
Poll an operation once, using an operationName
from a previous invocation of UpdateSchema
.
Parameters | |
---|---|
Name | Description |
operationName |
string The name of a previously invoked operation. Must not be |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationSchemaUpdateSchemaMetadata |
The result of polling the operation. |
PollOnceUpdateSchemaAsync(string, CallSettings)
public virtual Task<Operation<Schema, UpdateSchemaMetadata>> PollOnceUpdateSchemaAsync(string operationName, CallSettings callSettings = null)
Asynchronously poll an operation once, using an operationName
from a previous invocation of
UpdateSchema
.
Parameters | |
---|---|
Name | Description |
operationName |
string The name of a previously invoked operation. Must not be |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationSchemaUpdateSchemaMetadata |
A task representing the result of polling the operation. |
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 | |
---|---|
Type | Description |
Task |
A task representing the asynchronous shutdown operation. |
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.
UpdateSchema(UpdateSchemaRequest, CallSettings)
public virtual Operation<Schema, UpdateSchemaMetadata> UpdateSchema(UpdateSchemaRequest request, CallSettings callSettings = null)
Updates a [Schema][google.cloud.discoveryengine.v1beta.Schema].
Parameters | |
---|---|
Name | Description |
request |
UpdateSchemaRequest The request object containing all of the parameters for the API call. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationSchemaUpdateSchemaMetadata |
The RPC response. |
// Create client
SchemaServiceClient schemaServiceClient = SchemaServiceClient.Create();
// Initialize request argument(s)
UpdateSchemaRequest request = new UpdateSchemaRequest
{
Schema = new Schema(),
AllowMissing = false,
};
// Make the request
Operation<Schema, UpdateSchemaMetadata> response = schemaServiceClient.UpdateSchema(request);
// Poll until the returned long-running operation is complete
Operation<Schema, UpdateSchemaMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Schema result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Schema, UpdateSchemaMetadata> retrievedResponse = schemaServiceClient.PollOnceUpdateSchema(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Schema retrievedResult = retrievedResponse.Result;
}
UpdateSchemaAsync(UpdateSchemaRequest, CallSettings)
public virtual Task<Operation<Schema, UpdateSchemaMetadata>> UpdateSchemaAsync(UpdateSchemaRequest request, CallSettings callSettings = null)
Updates a [Schema][google.cloud.discoveryengine.v1beta.Schema].
Parameters | |
---|---|
Name | Description |
request |
UpdateSchemaRequest The request object containing all of the parameters for the API call. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationSchemaUpdateSchemaMetadata |
A Task containing the RPC response. |
// Create client
SchemaServiceClient schemaServiceClient = await SchemaServiceClient.CreateAsync();
// Initialize request argument(s)
UpdateSchemaRequest request = new UpdateSchemaRequest
{
Schema = new Schema(),
AllowMissing = false,
};
// Make the request
Operation<Schema, UpdateSchemaMetadata> response = await schemaServiceClient.UpdateSchemaAsync(request);
// Poll until the returned long-running operation is complete
Operation<Schema, UpdateSchemaMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Schema result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Schema, UpdateSchemaMetadata> retrievedResponse = await schemaServiceClient.PollOnceUpdateSchemaAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Schema retrievedResult = retrievedResponse.Result;
}
UpdateSchemaAsync(UpdateSchemaRequest, CancellationToken)
public virtual Task<Operation<Schema, UpdateSchemaMetadata>> UpdateSchemaAsync(UpdateSchemaRequest request, CancellationToken cancellationToken)
Updates a [Schema][google.cloud.discoveryengine.v1beta.Schema].
Parameters | |
---|---|
Name | Description |
request |
UpdateSchemaRequest The request object containing all of the parameters for the API call. |
cancellationToken |
CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskOperationSchemaUpdateSchemaMetadata |
A Task containing the RPC response. |
// Create client
SchemaServiceClient schemaServiceClient = await SchemaServiceClient.CreateAsync();
// Initialize request argument(s)
UpdateSchemaRequest request = new UpdateSchemaRequest
{
Schema = new Schema(),
AllowMissing = false,
};
// Make the request
Operation<Schema, UpdateSchemaMetadata> response = await schemaServiceClient.UpdateSchemaAsync(request);
// Poll until the returned long-running operation is complete
Operation<Schema, UpdateSchemaMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Schema result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Schema, UpdateSchemaMetadata> retrievedResponse = await schemaServiceClient.PollOnceUpdateSchemaAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Schema retrievedResult = retrievedResponse.Result;
}