public abstract class SchemaServiceClient
SchemaService client wrapper, for convenient use.
Namespace
Google.Cloud.PubSub.V1Assembly
Google.Cloud.PubSub.V1.dll
Properties
DefaultEndpoint
public static string DefaultEndpoint { get; }
The default endpoint for the SchemaService service, which is a host of "pubsub.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 |
IReadOnlyList<String> |
The default SchemaService scopes are:
GrpcClient
public virtual SchemaService.SchemaServiceClient GrpcClient { get; }
The underlying gRPC SchemaService client
Property Value | |
---|---|
Type | Description |
SchemaService.SchemaServiceClient |
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(CancellationToken))
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 |
Task<SchemaServiceClient> | The task representing the created SchemaServiceClient. |
CreateSchema(ProjectName, Schema, String, CallSettings)
public virtual Schema CreateSchema(ProjectName parent, Schema schema, string schemaId, CallSettings callSettings = null)
Creates a schema.
Parameters | |
---|---|
Name | Description |
parent | ProjectName Required. The name of the project in which to create the schema.
Format is |
schema | Schema Required. The schema object to create. This schema's |
schemaId | String The ID to use for the schema, which will become the final component of the schema's resource name. See https://cloud.google.com/pubsub/docs/admin#resource_names for resource name constraints. |
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)
ProjectName parent = ProjectName.FromProject("[PROJECT]");
Schema schema = new Schema();
string schemaId = "";
// Make the request
Schema response = schemaServiceClient.CreateSchema(parent, schema, schemaId);
CreateSchema(CreateSchemaRequest, CallSettings)
public virtual Schema CreateSchema(CreateSchemaRequest request, CallSettings callSettings = null)
Creates a 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 |
Schema | The RPC response. |
// Create client
SchemaServiceClient schemaServiceClient = SchemaServiceClient.Create();
// Initialize request argument(s)
CreateSchemaRequest request = new CreateSchemaRequest
{
ParentAsProjectName = ProjectName.FromProject("[PROJECT]"),
Schema = new Schema(),
SchemaId = "",
};
// Make the request
Schema response = schemaServiceClient.CreateSchema(request);
CreateSchema(String, Schema, String, CallSettings)
public virtual Schema CreateSchema(string parent, Schema schema, string schemaId, CallSettings callSettings = null)
Creates a schema.
Parameters | |
---|---|
Name | Description |
parent | String Required. The name of the project in which to create the schema.
Format is |
schema | Schema Required. The schema object to create. This schema's |
schemaId | String The ID to use for the schema, which will become the final component of the schema's resource name. See https://cloud.google.com/pubsub/docs/admin#resource_names for resource name constraints. |
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 parent = "projects/[PROJECT]";
Schema schema = new Schema();
string schemaId = "";
// Make the request
Schema response = schemaServiceClient.CreateSchema(parent, schema, schemaId);
CreateSchemaAsync(ProjectName, Schema, String, CallSettings)
public virtual Task<Schema> CreateSchemaAsync(ProjectName parent, Schema schema, string schemaId, CallSettings callSettings = null)
Creates a schema.
Parameters | |
---|---|
Name | Description |
parent | ProjectName Required. The name of the project in which to create the schema.
Format is |
schema | Schema Required. The schema object to create. This schema's |
schemaId | String The ID to use for the schema, which will become the final component of the schema's resource name. See https://cloud.google.com/pubsub/docs/admin#resource_names for resource name constraints. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<Schema> | A Task containing the RPC response. |
// Create client
SchemaServiceClient schemaServiceClient = await SchemaServiceClient.CreateAsync();
// Initialize request argument(s)
ProjectName parent = ProjectName.FromProject("[PROJECT]");
Schema schema = new Schema();
string schemaId = "";
// Make the request
Schema response = await schemaServiceClient.CreateSchemaAsync(parent, schema, schemaId);
CreateSchemaAsync(ProjectName, Schema, String, CancellationToken)
public virtual Task<Schema> CreateSchemaAsync(ProjectName parent, Schema schema, string schemaId, CancellationToken cancellationToken)
Creates a schema.
Parameters | |
---|---|
Name | Description |
parent | ProjectName Required. The name of the project in which to create the schema.
Format is |
schema | Schema Required. The schema object to create. This schema's |
schemaId | String The ID to use for the schema, which will become the final component of the schema's resource name. See https://cloud.google.com/pubsub/docs/admin#resource_names for resource name constraints. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<Schema> | A Task containing the RPC response. |
// Create client
SchemaServiceClient schemaServiceClient = await SchemaServiceClient.CreateAsync();
// Initialize request argument(s)
ProjectName parent = ProjectName.FromProject("[PROJECT]");
Schema schema = new Schema();
string schemaId = "";
// Make the request
Schema response = await schemaServiceClient.CreateSchemaAsync(parent, schema, schemaId);
CreateSchemaAsync(CreateSchemaRequest, CallSettings)
public virtual Task<Schema> CreateSchemaAsync(CreateSchemaRequest request, CallSettings callSettings = null)
Creates a 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 |
Task<Schema> | A Task containing the RPC response. |
// Create client
SchemaServiceClient schemaServiceClient = await SchemaServiceClient.CreateAsync();
// Initialize request argument(s)
CreateSchemaRequest request = new CreateSchemaRequest
{
ParentAsProjectName = ProjectName.FromProject("[PROJECT]"),
Schema = new Schema(),
SchemaId = "",
};
// Make the request
Schema response = await schemaServiceClient.CreateSchemaAsync(request);
CreateSchemaAsync(CreateSchemaRequest, CancellationToken)
public virtual Task<Schema> CreateSchemaAsync(CreateSchemaRequest request, CancellationToken cancellationToken)
Creates a 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 |
Task<Schema> | A Task containing the RPC response. |
// Create client
SchemaServiceClient schemaServiceClient = await SchemaServiceClient.CreateAsync();
// Initialize request argument(s)
CreateSchemaRequest request = new CreateSchemaRequest
{
ParentAsProjectName = ProjectName.FromProject("[PROJECT]"),
Schema = new Schema(),
SchemaId = "",
};
// Make the request
Schema response = await schemaServiceClient.CreateSchemaAsync(request);
CreateSchemaAsync(String, Schema, String, CallSettings)
public virtual Task<Schema> CreateSchemaAsync(string parent, Schema schema, string schemaId, CallSettings callSettings = null)
Creates a schema.
Parameters | |
---|---|
Name | Description |
parent | String Required. The name of the project in which to create the schema.
Format is |
schema | Schema Required. The schema object to create. This schema's |
schemaId | String The ID to use for the schema, which will become the final component of the schema's resource name. See https://cloud.google.com/pubsub/docs/admin#resource_names for resource name constraints. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<Schema> | A Task containing the RPC response. |
// Create client
SchemaServiceClient schemaServiceClient = await SchemaServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]";
Schema schema = new Schema();
string schemaId = "";
// Make the request
Schema response = await schemaServiceClient.CreateSchemaAsync(parent, schema, schemaId);
CreateSchemaAsync(String, Schema, String, CancellationToken)
public virtual Task<Schema> CreateSchemaAsync(string parent, Schema schema, string schemaId, CancellationToken cancellationToken)
Creates a schema.
Parameters | |
---|---|
Name | Description |
parent | String Required. The name of the project in which to create the schema.
Format is |
schema | Schema Required. The schema object to create. This schema's |
schemaId | String The ID to use for the schema, which will become the final component of the schema's resource name. See https://cloud.google.com/pubsub/docs/admin#resource_names for resource name constraints. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<Schema> | A Task containing the RPC response. |
// Create client
SchemaServiceClient schemaServiceClient = await SchemaServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]";
Schema schema = new Schema();
string schemaId = "";
// Make the request
Schema response = await schemaServiceClient.CreateSchemaAsync(parent, schema, schemaId);
DeleteSchema(DeleteSchemaRequest, CallSettings)
public virtual void DeleteSchema(DeleteSchemaRequest request, CallSettings callSettings = null)
Deletes a 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. |
// Create client
SchemaServiceClient schemaServiceClient = SchemaServiceClient.Create();
// Initialize request argument(s)
DeleteSchemaRequest request = new DeleteSchemaRequest
{
SchemaName = SchemaName.FromProjectSchema("[PROJECT]", "[SCHEMA]"),
};
// Make the request
schemaServiceClient.DeleteSchema(request);
DeleteSchema(SchemaName, CallSettings)
public virtual void DeleteSchema(SchemaName name, CallSettings callSettings = null)
Deletes a schema.
Parameters | |
---|---|
Name | Description |
name | SchemaName Required. Name of the schema to delete.
Format is |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
// Create client
SchemaServiceClient schemaServiceClient = SchemaServiceClient.Create();
// Initialize request argument(s)
SchemaName name = SchemaName.FromProjectSchema("[PROJECT]", "[SCHEMA]");
// Make the request
schemaServiceClient.DeleteSchema(name);
DeleteSchema(String, CallSettings)
public virtual void DeleteSchema(string name, CallSettings callSettings = null)
Deletes a schema.
Parameters | |
---|---|
Name | Description |
name | String Required. Name of the schema to delete.
Format is |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
// Create client
SchemaServiceClient schemaServiceClient = SchemaServiceClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/schemas/[SCHEMA]";
// Make the request
schemaServiceClient.DeleteSchema(name);
DeleteSchemaAsync(DeleteSchemaRequest, CallSettings)
public virtual Task DeleteSchemaAsync(DeleteSchemaRequest request, CallSettings callSettings = null)
Deletes a 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 |
Task | A Task containing the RPC response. |
// Create client
SchemaServiceClient schemaServiceClient = await SchemaServiceClient.CreateAsync();
// Initialize request argument(s)
DeleteSchemaRequest request = new DeleteSchemaRequest
{
SchemaName = SchemaName.FromProjectSchema("[PROJECT]", "[SCHEMA]"),
};
// Make the request
await schemaServiceClient.DeleteSchemaAsync(request);
DeleteSchemaAsync(DeleteSchemaRequest, CancellationToken)
public virtual Task DeleteSchemaAsync(DeleteSchemaRequest request, CancellationToken cancellationToken)
Deletes a 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 |
Task | A Task containing the RPC response. |
// Create client
SchemaServiceClient schemaServiceClient = await SchemaServiceClient.CreateAsync();
// Initialize request argument(s)
DeleteSchemaRequest request = new DeleteSchemaRequest
{
SchemaName = SchemaName.FromProjectSchema("[PROJECT]", "[SCHEMA]"),
};
// Make the request
await schemaServiceClient.DeleteSchemaAsync(request);
DeleteSchemaAsync(SchemaName, CallSettings)
public virtual Task DeleteSchemaAsync(SchemaName name, CallSettings callSettings = null)
Deletes a schema.
Parameters | |
---|---|
Name | Description |
name | SchemaName Required. Name of the schema to delete.
Format is |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task | A Task containing the RPC response. |
// Create client
SchemaServiceClient schemaServiceClient = await SchemaServiceClient.CreateAsync();
// Initialize request argument(s)
SchemaName name = SchemaName.FromProjectSchema("[PROJECT]", "[SCHEMA]");
// Make the request
await schemaServiceClient.DeleteSchemaAsync(name);
DeleteSchemaAsync(SchemaName, CancellationToken)
public virtual Task DeleteSchemaAsync(SchemaName name, CancellationToken cancellationToken)
Deletes a schema.
Parameters | |
---|---|
Name | Description |
name | SchemaName Required. Name of the schema to delete.
Format is |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task | A Task containing the RPC response. |
// Create client
SchemaServiceClient schemaServiceClient = await SchemaServiceClient.CreateAsync();
// Initialize request argument(s)
SchemaName name = SchemaName.FromProjectSchema("[PROJECT]", "[SCHEMA]");
// Make the request
await schemaServiceClient.DeleteSchemaAsync(name);
DeleteSchemaAsync(String, CallSettings)
public virtual Task DeleteSchemaAsync(string name, CallSettings callSettings = null)
Deletes a schema.
Parameters | |
---|---|
Name | Description |
name | String Required. Name of the schema to delete.
Format is |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task | A Task containing the RPC response. |
// Create client
SchemaServiceClient schemaServiceClient = await SchemaServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/schemas/[SCHEMA]";
// Make the request
await schemaServiceClient.DeleteSchemaAsync(name);
DeleteSchemaAsync(String, CancellationToken)
public virtual Task DeleteSchemaAsync(string name, CancellationToken cancellationToken)
Deletes a schema.
Parameters | |
---|---|
Name | Description |
name | String Required. Name of the schema to delete.
Format is |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task | A Task containing the RPC response. |
// Create client
SchemaServiceClient schemaServiceClient = await SchemaServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/schemas/[SCHEMA]";
// Make the request
await schemaServiceClient.DeleteSchemaAsync(name);
GetSchema(GetSchemaRequest, CallSettings)
public virtual Schema GetSchema(GetSchemaRequest request, CallSettings callSettings = null)
Gets a 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.FromProjectSchema("[PROJECT]", "[SCHEMA]"),
View = SchemaView.Unspecified,
};
// Make the request
Schema response = schemaServiceClient.GetSchema(request);
GetSchema(SchemaName, CallSettings)
public virtual Schema GetSchema(SchemaName name, CallSettings callSettings = null)
Gets a schema.
Parameters | |
---|---|
Name | Description |
name | SchemaName Required. The name of the schema to get.
Format is |
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.FromProjectSchema("[PROJECT]", "[SCHEMA]");
// Make the request
Schema response = schemaServiceClient.GetSchema(name);
GetSchema(String, CallSettings)
public virtual Schema GetSchema(string name, CallSettings callSettings = null)
Gets a schema.
Parameters | |
---|---|
Name | Description |
name | String Required. The name of the schema to get.
Format is |
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]/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.
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 |
Task<Schema> | A Task containing the RPC response. |
// Create client
SchemaServiceClient schemaServiceClient = await SchemaServiceClient.CreateAsync();
// Initialize request argument(s)
GetSchemaRequest request = new GetSchemaRequest
{
SchemaName = SchemaName.FromProjectSchema("[PROJECT]", "[SCHEMA]"),
View = SchemaView.Unspecified,
};
// Make the request
Schema response = await schemaServiceClient.GetSchemaAsync(request);
GetSchemaAsync(GetSchemaRequest, CancellationToken)
public virtual Task<Schema> GetSchemaAsync(GetSchemaRequest request, CancellationToken cancellationToken)
Gets a 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 |
Task<Schema> | A Task containing the RPC response. |
// Create client
SchemaServiceClient schemaServiceClient = await SchemaServiceClient.CreateAsync();
// Initialize request argument(s)
GetSchemaRequest request = new GetSchemaRequest
{
SchemaName = SchemaName.FromProjectSchema("[PROJECT]", "[SCHEMA]"),
View = SchemaView.Unspecified,
};
// 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.
Parameters | |
---|---|
Name | Description |
name | SchemaName Required. The name of the schema to get.
Format is |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<Schema> | A Task containing the RPC response. |
// Create client
SchemaServiceClient schemaServiceClient = await SchemaServiceClient.CreateAsync();
// Initialize request argument(s)
SchemaName name = SchemaName.FromProjectSchema("[PROJECT]", "[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.
Parameters | |
---|---|
Name | Description |
name | SchemaName Required. The name of the schema to get.
Format is |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<Schema> | A Task containing the RPC response. |
// Create client
SchemaServiceClient schemaServiceClient = await SchemaServiceClient.CreateAsync();
// Initialize request argument(s)
SchemaName name = SchemaName.FromProjectSchema("[PROJECT]", "[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.
Parameters | |
---|---|
Name | Description |
name | String Required. The name of the schema to get.
Format is |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<Schema> | A Task containing the RPC response. |
// Create client
SchemaServiceClient schemaServiceClient = await SchemaServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/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.
Parameters | |
---|---|
Name | Description |
name | String Required. The name of the schema to get.
Format is |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<Schema> | A Task containing the RPC response. |
// Create client
SchemaServiceClient schemaServiceClient = await SchemaServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/schemas/[SCHEMA]";
// Make the request
Schema response = await schemaServiceClient.GetSchemaAsync(name);
ListSchemas(ProjectName, String, Nullable<Int32>, CallSettings)
public virtual PagedEnumerable<ListSchemasResponse, Schema> ListSchemas(ProjectName parent, string pageToken = null, int? pageSize = default(int? ), CallSettings callSettings = null)
Lists schemas in a project.
Parameters | |
---|---|
Name | Description |
parent | ProjectName Required. The name of the project in which to list schemas.
Format is |
pageToken | String The token returned from the previous request. A value of |
pageSize | Nullable<Int32> 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 |
PagedEnumerable<ListSchemasResponse, Schema> | A pageable sequence of Schema resources. |
// Create client
SchemaServiceClient schemaServiceClient = SchemaServiceClient.Create();
// Initialize request argument(s)
ProjectName parent = ProjectName.FromProject("[PROJECT]");
// 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)
Lists schemas in a project.
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 |
PagedEnumerable<ListSchemasResponse, Schema> | A pageable sequence of Schema resources. |
// Create client
SchemaServiceClient schemaServiceClient = SchemaServiceClient.Create();
// Initialize request argument(s)
ListSchemasRequest request = new ListSchemasRequest
{
ParentAsProjectName = ProjectName.FromProject("[PROJECT]"),
View = SchemaView.Unspecified,
};
// 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, Nullable<Int32>, CallSettings)
public virtual PagedEnumerable<ListSchemasResponse, Schema> ListSchemas(string parent, string pageToken = null, int? pageSize = default(int? ), CallSettings callSettings = null)
Lists schemas in a project.
Parameters | |
---|---|
Name | Description |
parent | String Required. The name of the project in which to list schemas.
Format is |
pageToken | String The token returned from the previous request. A value of |
pageSize | Nullable<Int32> 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 |
PagedEnumerable<ListSchemasResponse, Schema> | A pageable sequence of Schema resources. |
// Create client
SchemaServiceClient schemaServiceClient = SchemaServiceClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]";
// 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(ProjectName, String, Nullable<Int32>, CallSettings)
public virtual PagedAsyncEnumerable<ListSchemasResponse, Schema> ListSchemasAsync(ProjectName parent, string pageToken = null, int? pageSize = default(int? ), CallSettings callSettings = null)
Lists schemas in a project.
Parameters | |
---|---|
Name | Description |
parent | ProjectName Required. The name of the project in which to list schemas.
Format is |
pageToken | String The token returned from the previous request. A value of |
pageSize | Nullable<Int32> 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 |
PagedAsyncEnumerable<ListSchemasResponse, Schema> | A pageable asynchronous sequence of Schema resources. |
// Create client
SchemaServiceClient schemaServiceClient = await SchemaServiceClient.CreateAsync();
// Initialize request argument(s)
ProjectName parent = ProjectName.FromProject("[PROJECT]");
// 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)
Lists schemas in a project.
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 |
PagedAsyncEnumerable<ListSchemasResponse, Schema> | A pageable asynchronous sequence of Schema resources. |
// Create client
SchemaServiceClient schemaServiceClient = await SchemaServiceClient.CreateAsync();
// Initialize request argument(s)
ListSchemasRequest request = new ListSchemasRequest
{
ParentAsProjectName = ProjectName.FromProject("[PROJECT]"),
View = SchemaView.Unspecified,
};
// 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, Nullable<Int32>, CallSettings)
public virtual PagedAsyncEnumerable<ListSchemasResponse, Schema> ListSchemasAsync(string parent, string pageToken = null, int? pageSize = default(int? ), CallSettings callSettings = null)
Lists schemas in a project.
Parameters | |
---|---|
Name | Description |
parent | String Required. The name of the project in which to list schemas.
Format is |
pageToken | String The token returned from the previous request. A value of |
pageSize | Nullable<Int32> 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 |
PagedAsyncEnumerable<ListSchemasResponse, Schema> | A pageable asynchronous sequence of Schema resources. |
// Create client
SchemaServiceClient schemaServiceClient = await SchemaServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]";
// 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;
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.
ValidateMessage(ValidateMessageRequest, CallSettings)
public virtual ValidateMessageResponse ValidateMessage(ValidateMessageRequest request, CallSettings callSettings = null)
Validates a message against a schema.
Parameters | |
---|---|
Name | Description |
request | ValidateMessageRequest 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 |
ValidateMessageResponse | The RPC response. |
// Create client
SchemaServiceClient schemaServiceClient = SchemaServiceClient.Create();
// Initialize request argument(s)
ValidateMessageRequest request = new ValidateMessageRequest
{
ParentAsProjectName = ProjectName.FromProject("[PROJECT]"),
SchemaName = SchemaName.FromProjectSchema("[PROJECT]", "[SCHEMA]"),
Schema = new Schema(),
Message = ByteString.Empty,
Encoding = Encoding.Unspecified,
};
// Make the request
ValidateMessageResponse response = schemaServiceClient.ValidateMessage(request);
ValidateMessageAsync(ValidateMessageRequest, CallSettings)
public virtual Task<ValidateMessageResponse> ValidateMessageAsync(ValidateMessageRequest request, CallSettings callSettings = null)
Validates a message against a schema.
Parameters | |
---|---|
Name | Description |
request | ValidateMessageRequest 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 |
Task<ValidateMessageResponse> | A Task containing the RPC response. |
// Create client
SchemaServiceClient schemaServiceClient = await SchemaServiceClient.CreateAsync();
// Initialize request argument(s)
ValidateMessageRequest request = new ValidateMessageRequest
{
ParentAsProjectName = ProjectName.FromProject("[PROJECT]"),
SchemaName = SchemaName.FromProjectSchema("[PROJECT]", "[SCHEMA]"),
Schema = new Schema(),
Message = ByteString.Empty,
Encoding = Encoding.Unspecified,
};
// Make the request
ValidateMessageResponse response = await schemaServiceClient.ValidateMessageAsync(request);
ValidateMessageAsync(ValidateMessageRequest, CancellationToken)
public virtual Task<ValidateMessageResponse> ValidateMessageAsync(ValidateMessageRequest request, CancellationToken cancellationToken)
Validates a message against a schema.
Parameters | |
---|---|
Name | Description |
request | ValidateMessageRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<ValidateMessageResponse> | A Task containing the RPC response. |
// Create client
SchemaServiceClient schemaServiceClient = await SchemaServiceClient.CreateAsync();
// Initialize request argument(s)
ValidateMessageRequest request = new ValidateMessageRequest
{
ParentAsProjectName = ProjectName.FromProject("[PROJECT]"),
SchemaName = SchemaName.FromProjectSchema("[PROJECT]", "[SCHEMA]"),
Schema = new Schema(),
Message = ByteString.Empty,
Encoding = Encoding.Unspecified,
};
// Make the request
ValidateMessageResponse response = await schemaServiceClient.ValidateMessageAsync(request);
ValidateSchema(ProjectName, Schema, CallSettings)
public virtual ValidateSchemaResponse ValidateSchema(ProjectName parent, Schema schema, CallSettings callSettings = null)
Validates a schema.
Parameters | |
---|---|
Name | Description |
parent | ProjectName Required. The name of the project in which to validate schemas.
Format is |
schema | Schema Required. The schema object to validate. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
ValidateSchemaResponse | The RPC response. |
// Create client
SchemaServiceClient schemaServiceClient = SchemaServiceClient.Create();
// Initialize request argument(s)
ProjectName parent = ProjectName.FromProject("[PROJECT]");
Schema schema = new Schema();
// Make the request
ValidateSchemaResponse response = schemaServiceClient.ValidateSchema(parent, schema);
ValidateSchema(ValidateSchemaRequest, CallSettings)
public virtual ValidateSchemaResponse ValidateSchema(ValidateSchemaRequest request, CallSettings callSettings = null)
Validates a schema.
Parameters | |
---|---|
Name | Description |
request | ValidateSchemaRequest 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 |
ValidateSchemaResponse | The RPC response. |
// Create client
SchemaServiceClient schemaServiceClient = SchemaServiceClient.Create();
// Initialize request argument(s)
ValidateSchemaRequest request = new ValidateSchemaRequest
{
ParentAsProjectName = ProjectName.FromProject("[PROJECT]"),
Schema = new Schema(),
};
// Make the request
ValidateSchemaResponse response = schemaServiceClient.ValidateSchema(request);
ValidateSchema(String, Schema, CallSettings)
public virtual ValidateSchemaResponse ValidateSchema(string parent, Schema schema, CallSettings callSettings = null)
Validates a schema.
Parameters | |
---|---|
Name | Description |
parent | String Required. The name of the project in which to validate schemas.
Format is |
schema | Schema Required. The schema object to validate. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
ValidateSchemaResponse | The RPC response. |
// Create client
SchemaServiceClient schemaServiceClient = SchemaServiceClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]";
Schema schema = new Schema();
// Make the request
ValidateSchemaResponse response = schemaServiceClient.ValidateSchema(parent, schema);
ValidateSchemaAsync(ProjectName, Schema, CallSettings)
public virtual Task<ValidateSchemaResponse> ValidateSchemaAsync(ProjectName parent, Schema schema, CallSettings callSettings = null)
Validates a schema.
Parameters | |
---|---|
Name | Description |
parent | ProjectName Required. The name of the project in which to validate schemas.
Format is |
schema | Schema Required. The schema object to validate. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<ValidateSchemaResponse> | A Task containing the RPC response. |
// Create client
SchemaServiceClient schemaServiceClient = await SchemaServiceClient.CreateAsync();
// Initialize request argument(s)
ProjectName parent = ProjectName.FromProject("[PROJECT]");
Schema schema = new Schema();
// Make the request
ValidateSchemaResponse response = await schemaServiceClient.ValidateSchemaAsync(parent, schema);
ValidateSchemaAsync(ProjectName, Schema, CancellationToken)
public virtual Task<ValidateSchemaResponse> ValidateSchemaAsync(ProjectName parent, Schema schema, CancellationToken cancellationToken)
Validates a schema.
Parameters | |
---|---|
Name | Description |
parent | ProjectName Required. The name of the project in which to validate schemas.
Format is |
schema | Schema Required. The schema object to validate. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<ValidateSchemaResponse> | A Task containing the RPC response. |
// Create client
SchemaServiceClient schemaServiceClient = await SchemaServiceClient.CreateAsync();
// Initialize request argument(s)
ProjectName parent = ProjectName.FromProject("[PROJECT]");
Schema schema = new Schema();
// Make the request
ValidateSchemaResponse response = await schemaServiceClient.ValidateSchemaAsync(parent, schema);
ValidateSchemaAsync(ValidateSchemaRequest, CallSettings)
public virtual Task<ValidateSchemaResponse> ValidateSchemaAsync(ValidateSchemaRequest request, CallSettings callSettings = null)
Validates a schema.
Parameters | |
---|---|
Name | Description |
request | ValidateSchemaRequest 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 |
Task<ValidateSchemaResponse> | A Task containing the RPC response. |
// Create client
SchemaServiceClient schemaServiceClient = await SchemaServiceClient.CreateAsync();
// Initialize request argument(s)
ValidateSchemaRequest request = new ValidateSchemaRequest
{
ParentAsProjectName = ProjectName.FromProject("[PROJECT]"),
Schema = new Schema(),
};
// Make the request
ValidateSchemaResponse response = await schemaServiceClient.ValidateSchemaAsync(request);
ValidateSchemaAsync(ValidateSchemaRequest, CancellationToken)
public virtual Task<ValidateSchemaResponse> ValidateSchemaAsync(ValidateSchemaRequest request, CancellationToken cancellationToken)
Validates a schema.
Parameters | |
---|---|
Name | Description |
request | ValidateSchemaRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<ValidateSchemaResponse> | A Task containing the RPC response. |
// Create client
SchemaServiceClient schemaServiceClient = await SchemaServiceClient.CreateAsync();
// Initialize request argument(s)
ValidateSchemaRequest request = new ValidateSchemaRequest
{
ParentAsProjectName = ProjectName.FromProject("[PROJECT]"),
Schema = new Schema(),
};
// Make the request
ValidateSchemaResponse response = await schemaServiceClient.ValidateSchemaAsync(request);
ValidateSchemaAsync(String, Schema, CallSettings)
public virtual Task<ValidateSchemaResponse> ValidateSchemaAsync(string parent, Schema schema, CallSettings callSettings = null)
Validates a schema.
Parameters | |
---|---|
Name | Description |
parent | String Required. The name of the project in which to validate schemas.
Format is |
schema | Schema Required. The schema object to validate. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<ValidateSchemaResponse> | A Task containing the RPC response. |
// Create client
SchemaServiceClient schemaServiceClient = await SchemaServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]";
Schema schema = new Schema();
// Make the request
ValidateSchemaResponse response = await schemaServiceClient.ValidateSchemaAsync(parent, schema);
ValidateSchemaAsync(String, Schema, CancellationToken)
public virtual Task<ValidateSchemaResponse> ValidateSchemaAsync(string parent, Schema schema, CancellationToken cancellationToken)
Validates a schema.
Parameters | |
---|---|
Name | Description |
parent | String Required. The name of the project in which to validate schemas.
Format is |
schema | Schema Required. The schema object to validate. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<ValidateSchemaResponse> | A Task containing the RPC response. |
// Create client
SchemaServiceClient schemaServiceClient = await SchemaServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]";
Schema schema = new Schema();
// Make the request
ValidateSchemaResponse response = await schemaServiceClient.ValidateSchemaAsync(parent, schema);