Class v1.SchemaServiceClient (4.3.3)

Service for doing schema-related operations. v1

Package

@google-cloud/pubsub

Constructors

(constructor)(opts, gaxInstance)

constructor(opts?: ClientOptions, gaxInstance?: typeof gax | typeof gax.fallback);

Construct an instance of SchemaServiceClient.

Parameters
Name Description
opts ClientOptions
gaxInstance typeof gax | typeof fallback

: loaded instance of google-gax. Useful if you need to avoid loading the default gRPC version and want to use the fallback HTTP implementation. Load only fallback version and pass it to the constructor: ``` const gax = require('google-gax/build/src/fallback'); // avoids loading google-gax with gRPC const client = new SchemaServiceClient({fallback: true}, gax); ```

Properties

apiEndpoint

get apiEndpoint(): string;

The DNS address for this API service.

apiEndpoint

static get apiEndpoint(): string;

The DNS address for this API service - same as servicePath.

auth

auth: gax.GoogleAuth;

descriptors

descriptors: Descriptors;

iamClient

iamClient: IamClient;

innerApiCalls

innerApiCalls: {
        [name: string]: Function;
    };

pathTemplates

pathTemplates: {
        [name: string]: gax.PathTemplate;
    };

port

static get port(): number;

The port for this API service.

schemaServiceStub

schemaServiceStub?: Promise<{
        [name: string]: Function;
    }>;

scopes

static get scopes(): string[];

The scopes needed to make gRPC calls for every method defined in this service.

servicePath

static get servicePath(): string;

The DNS address for this API service.

universeDomain

get universeDomain(): string;

warn

warn: (code: string, message: string, warnType?: string) => void;

Methods

close()

close(): Promise<void>;

Terminate the gRPC channel and close the client.

The client will no longer be usable and all future behavior is undefined.

Returns
Type Description
Promise<void>

{Promise} A promise that resolves when the client is closed.

commitSchema(request, options)

commitSchema(request?: protos.google.pubsub.v1.ICommitSchemaRequest, options?: CallOptions): Promise<[
        protos.google.pubsub.v1.ISchema,
        protos.google.pubsub.v1.ICommitSchemaRequest | undefined,
        {} | undefined
    ]>;

Commits a new schema revision to an existing schema.

Parameters
Name Description
request ICommitSchemaRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ protos.google.pubsub.v1.ISchema, protos.google.pubsub.v1.ICommitSchemaRequest | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the documentation for more details and examples.

commitSchema(request, options, callback)

commitSchema(request: protos.google.pubsub.v1.ICommitSchemaRequest, options: CallOptions, callback: Callback<protos.google.pubsub.v1.ISchema, protos.google.pubsub.v1.ICommitSchemaRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request ICommitSchemaRequest
options CallOptions
callback Callback<protos.google.pubsub.v1.ISchema, protos.google.pubsub.v1.ICommitSchemaRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

commitSchema(request, callback)

commitSchema(request: protos.google.pubsub.v1.ICommitSchemaRequest, callback: Callback<protos.google.pubsub.v1.ISchema, protos.google.pubsub.v1.ICommitSchemaRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request ICommitSchemaRequest
callback Callback<protos.google.pubsub.v1.ISchema, protos.google.pubsub.v1.ICommitSchemaRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

createSchema(request, options)

createSchema(request?: protos.google.pubsub.v1.ICreateSchemaRequest, options?: CallOptions): Promise<[
        protos.google.pubsub.v1.ISchema,
        protos.google.pubsub.v1.ICreateSchemaRequest | undefined,
        {} | undefined
    ]>;

Creates a schema.

Parameters
Name Description
request ICreateSchemaRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ protos.google.pubsub.v1.ISchema, protos.google.pubsub.v1.ICreateSchemaRequest | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the documentation for more details and examples.

createSchema(request, options, callback)

createSchema(request: protos.google.pubsub.v1.ICreateSchemaRequest, options: CallOptions, callback: Callback<protos.google.pubsub.v1.ISchema, protos.google.pubsub.v1.ICreateSchemaRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request ICreateSchemaRequest
options CallOptions
callback Callback<protos.google.pubsub.v1.ISchema, protos.google.pubsub.v1.ICreateSchemaRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

createSchema(request, callback)

createSchema(request: protos.google.pubsub.v1.ICreateSchemaRequest, callback: Callback<protos.google.pubsub.v1.ISchema, protos.google.pubsub.v1.ICreateSchemaRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request ICreateSchemaRequest
callback Callback<protos.google.pubsub.v1.ISchema, protos.google.pubsub.v1.ICreateSchemaRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

deleteSchema(request, options)

deleteSchema(request?: protos.google.pubsub.v1.IDeleteSchemaRequest, options?: CallOptions): Promise<[
        protos.google.protobuf.IEmpty,
        protos.google.pubsub.v1.IDeleteSchemaRequest | undefined,
        {} | undefined
    ]>;

Deletes a schema.

Parameters
Name Description
request IDeleteSchemaRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ protos.google.protobuf.IEmpty, protos.google.pubsub.v1.IDeleteSchemaRequest | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing Empty. Please see the documentation for more details and examples.

deleteSchema(request, options, callback)

deleteSchema(request: protos.google.pubsub.v1.IDeleteSchemaRequest, options: CallOptions, callback: Callback<protos.google.protobuf.IEmpty, protos.google.pubsub.v1.IDeleteSchemaRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IDeleteSchemaRequest
options CallOptions
callback Callback<protos.google.protobuf.IEmpty, protos.google.pubsub.v1.IDeleteSchemaRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

deleteSchema(request, callback)

deleteSchema(request: protos.google.pubsub.v1.IDeleteSchemaRequest, callback: Callback<protos.google.protobuf.IEmpty, protos.google.pubsub.v1.IDeleteSchemaRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IDeleteSchemaRequest
callback Callback<protos.google.protobuf.IEmpty, protos.google.pubsub.v1.IDeleteSchemaRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

deleteSchemaRevision(request, options)

deleteSchemaRevision(request?: protos.google.pubsub.v1.IDeleteSchemaRevisionRequest, options?: CallOptions): Promise<[
        protos.google.pubsub.v1.ISchema,
        protos.google.pubsub.v1.IDeleteSchemaRevisionRequest | undefined,
        {} | undefined
    ]>;

Deletes a specific schema revision.

Parameters
Name Description
request IDeleteSchemaRevisionRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ protos.google.pubsub.v1.ISchema, protos.google.pubsub.v1.IDeleteSchemaRevisionRequest | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the documentation for more details and examples.

deleteSchemaRevision(request, options, callback)

deleteSchemaRevision(request: protos.google.pubsub.v1.IDeleteSchemaRevisionRequest, options: CallOptions, callback: Callback<protos.google.pubsub.v1.ISchema, protos.google.pubsub.v1.IDeleteSchemaRevisionRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IDeleteSchemaRevisionRequest
options CallOptions
callback Callback<protos.google.pubsub.v1.ISchema, protos.google.pubsub.v1.IDeleteSchemaRevisionRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

deleteSchemaRevision(request, callback)

deleteSchemaRevision(request: protos.google.pubsub.v1.IDeleteSchemaRevisionRequest, callback: Callback<protos.google.pubsub.v1.ISchema, protos.google.pubsub.v1.IDeleteSchemaRevisionRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IDeleteSchemaRevisionRequest
callback Callback<protos.google.pubsub.v1.ISchema, protos.google.pubsub.v1.IDeleteSchemaRevisionRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

getIamPolicy(request, options, callback)

getIamPolicy(request: IamProtos.google.iam.v1.GetIamPolicyRequest, options?: gax.CallOptions | Callback<IamProtos.google.iam.v1.Policy, IamProtos.google.iam.v1.GetIamPolicyRequest | null | undefined, {} | null | undefined>, callback?: Callback<IamProtos.google.iam.v1.Policy, IamProtos.google.iam.v1.GetIamPolicyRequest | null | undefined, {} | null | undefined>): Promise<[IamProtos.google.iam.v1.Policy]>;

Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.

Parameters
Name Description
request IamProtos.google.iam.v1.GetIamPolicyRequest

The request object that will be sent.

options CallOptions | Callback<google.iam.v1.Policy, google.iam.v1.GetIamPolicyRequest | null | undefined, {} | null | undefined>

Optional parameters. You can override the default settings for this call, e.g, timeout, retries, paginations, etc. See gax.CallOptions for the details.

callback Callback<google.iam.v1.Policy, google.iam.v1.GetIamPolicyRequest | null | undefined, {} | null | undefined>

The function which will be called with the result of the API call.

The second parameter to the callback is an object representing .

Returns
Type Description
Promise<[google.iam.v1.Policy]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing . The promise has a method named "cancel" which cancels the ongoing API call.

getProjectId()

getProjectId(): Promise<string>;
Returns
Type Description
Promise<string>

getProjectId(callback)

getProjectId(callback: Callback<string, undefined, undefined>): void;
Parameter
Name Description
callback Callback<string, undefined, undefined>
Returns
Type Description
void

getSchema(request, options)

getSchema(request?: protos.google.pubsub.v1.IGetSchemaRequest, options?: CallOptions): Promise<[
        protos.google.pubsub.v1.ISchema,
        protos.google.pubsub.v1.IGetSchemaRequest | undefined,
        {} | undefined
    ]>;

Gets a schema.

Parameters
Name Description
request IGetSchemaRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ protos.google.pubsub.v1.ISchema, protos.google.pubsub.v1.IGetSchemaRequest | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the documentation for more details and examples.

getSchema(request, options, callback)

getSchema(request: protos.google.pubsub.v1.IGetSchemaRequest, options: CallOptions, callback: Callback<protos.google.pubsub.v1.ISchema, protos.google.pubsub.v1.IGetSchemaRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IGetSchemaRequest
options CallOptions
callback Callback<protos.google.pubsub.v1.ISchema, protos.google.pubsub.v1.IGetSchemaRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

getSchema(request, callback)

getSchema(request: protos.google.pubsub.v1.IGetSchemaRequest, callback: Callback<protos.google.pubsub.v1.ISchema, protos.google.pubsub.v1.IGetSchemaRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IGetSchemaRequest
callback Callback<protos.google.pubsub.v1.ISchema, protos.google.pubsub.v1.IGetSchemaRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

initialize()

initialize(): Promise<{
        [name: string]: Function;
    }>;

Initialize the client. Performs asynchronous operations (such as authentication) and prepares the client. This function will be called automatically when any class method is called for the first time, but if you need to initialize it before calling an actual method, feel free to call initialize() directly.

You can await on this method if you want to make sure the client is initialized.

Returns
Type Description
Promise<{ [name: string]: Function; }>

{Promise} A promise that resolves to an authenticated service stub.

listSchemaRevisions(request, options)

listSchemaRevisions(request?: protos.google.pubsub.v1.IListSchemaRevisionsRequest, options?: CallOptions): Promise<[
        protos.google.pubsub.v1.ISchema[],
        protos.google.pubsub.v1.IListSchemaRevisionsRequest | null,
        protos.google.pubsub.v1.IListSchemaRevisionsResponse
    ]>;

Lists all schema revisions for the named schema.

Parameters
Name Description
request IListSchemaRevisionsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ protos.google.pubsub.v1.ISchema[], protos.google.pubsub.v1.IListSchemaRevisionsRequest | null, protos.google.pubsub.v1.IListSchemaRevisionsResponse ]>

{Promise} - The promise which resolves to an array. The first element of the array is Array of . The client library will perform auto-pagination by default: it will call the API as many times as needed and will merge results from all the pages into this array. Note that it can affect your quota. We recommend using listSchemaRevisionsAsync() method described below for async iteration which you can stop as needed. Please see the documentation for more details and examples.

listSchemaRevisions(request, options, callback)

listSchemaRevisions(request: protos.google.pubsub.v1.IListSchemaRevisionsRequest, options: CallOptions, callback: PaginationCallback<protos.google.pubsub.v1.IListSchemaRevisionsRequest, protos.google.pubsub.v1.IListSchemaRevisionsResponse | null | undefined, protos.google.pubsub.v1.ISchema>): void;
Parameters
Name Description
request IListSchemaRevisionsRequest
options CallOptions
callback PaginationCallback<protos.google.pubsub.v1.IListSchemaRevisionsRequest, protos.google.pubsub.v1.IListSchemaRevisionsResponse | null | undefined, protos.google.pubsub.v1.ISchema>
Returns
Type Description
void

listSchemaRevisions(request, callback)

listSchemaRevisions(request: protos.google.pubsub.v1.IListSchemaRevisionsRequest, callback: PaginationCallback<protos.google.pubsub.v1.IListSchemaRevisionsRequest, protos.google.pubsub.v1.IListSchemaRevisionsResponse | null | undefined, protos.google.pubsub.v1.ISchema>): void;
Parameters
Name Description
request IListSchemaRevisionsRequest
callback PaginationCallback<protos.google.pubsub.v1.IListSchemaRevisionsRequest, protos.google.pubsub.v1.IListSchemaRevisionsResponse | null | undefined, protos.google.pubsub.v1.ISchema>
Returns
Type Description
void

listSchemaRevisionsAsync(request, options)

listSchemaRevisionsAsync(request?: protos.google.pubsub.v1.IListSchemaRevisionsRequest, options?: CallOptions): AsyncIterable<protos.google.pubsub.v1.ISchema>;

Equivalent to listSchemaRevisions, but returns an iterable object.

for-await-of syntax is used with the iterable to get response elements on-demand.

Parameters
Name Description
request IListSchemaRevisionsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
AsyncIterable<protos.google.pubsub.v1.ISchema>

{Object} An iterable Object that allows async iteration. When you iterate the returned iterable, each element will be an object representing . The API will be called under the hood as needed, once per the page, so you can stop the iteration when you don't need more results. Please see the documentation for more details and examples.

listSchemaRevisionsStream(request, options)

listSchemaRevisionsStream(request?: protos.google.pubsub.v1.IListSchemaRevisionsRequest, options?: CallOptions): Transform;

Equivalent to method.name.toCamelCase(), but returns a NodeJS Stream object.

Parameters
Name Description
request IListSchemaRevisionsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Transform

{Stream} An object stream which emits an object representing on 'data' event. The client library will perform auto-pagination by default: it will call the API as many times as needed. Note that it can affect your quota. We recommend using listSchemaRevisionsAsync() method described below for async iteration which you can stop as needed. Please see the documentation for more details and examples.

listSchemas(request, options)

listSchemas(request?: protos.google.pubsub.v1.IListSchemasRequest, options?: CallOptions): Promise<[
        protos.google.pubsub.v1.ISchema[],
        protos.google.pubsub.v1.IListSchemasRequest | null,
        protos.google.pubsub.v1.IListSchemasResponse
    ]>;

Lists schemas in a project.

Parameters
Name Description
request IListSchemasRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ protos.google.pubsub.v1.ISchema[], protos.google.pubsub.v1.IListSchemasRequest | null, protos.google.pubsub.v1.IListSchemasResponse ]>

{Promise} - The promise which resolves to an array. The first element of the array is Array of . The client library will perform auto-pagination by default: it will call the API as many times as needed and will merge results from all the pages into this array. Note that it can affect your quota. We recommend using listSchemasAsync() method described below for async iteration which you can stop as needed. Please see the documentation for more details and examples.

listSchemas(request, options, callback)

listSchemas(request: protos.google.pubsub.v1.IListSchemasRequest, options: CallOptions, callback: PaginationCallback<protos.google.pubsub.v1.IListSchemasRequest, protos.google.pubsub.v1.IListSchemasResponse | null | undefined, protos.google.pubsub.v1.ISchema>): void;
Parameters
Name Description
request IListSchemasRequest
options CallOptions
callback PaginationCallback<protos.google.pubsub.v1.IListSchemasRequest, protos.google.pubsub.v1.IListSchemasResponse | null | undefined, protos.google.pubsub.v1.ISchema>
Returns
Type Description
void

listSchemas(request, callback)

listSchemas(request: protos.google.pubsub.v1.IListSchemasRequest, callback: PaginationCallback<protos.google.pubsub.v1.IListSchemasRequest, protos.google.pubsub.v1.IListSchemasResponse | null | undefined, protos.google.pubsub.v1.ISchema>): void;
Parameters
Name Description
request IListSchemasRequest
callback PaginationCallback<protos.google.pubsub.v1.IListSchemasRequest, protos.google.pubsub.v1.IListSchemasResponse | null | undefined, protos.google.pubsub.v1.ISchema>
Returns
Type Description
void

listSchemasAsync(request, options)

listSchemasAsync(request?: protos.google.pubsub.v1.IListSchemasRequest, options?: CallOptions): AsyncIterable<protos.google.pubsub.v1.ISchema>;

Equivalent to listSchemas, but returns an iterable object.

for-await-of syntax is used with the iterable to get response elements on-demand.

Parameters
Name Description
request IListSchemasRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
AsyncIterable<protos.google.pubsub.v1.ISchema>

{Object} An iterable Object that allows async iteration. When you iterate the returned iterable, each element will be an object representing . The API will be called under the hood as needed, once per the page, so you can stop the iteration when you don't need more results. Please see the documentation for more details and examples.

listSchemasStream(request, options)

listSchemasStream(request?: protos.google.pubsub.v1.IListSchemasRequest, options?: CallOptions): Transform;

Equivalent to method.name.toCamelCase(), but returns a NodeJS Stream object.

Parameters
Name Description
request IListSchemasRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Transform

{Stream} An object stream which emits an object representing on 'data' event. The client library will perform auto-pagination by default: it will call the API as many times as needed. Note that it can affect your quota. We recommend using listSchemasAsync() method described below for async iteration which you can stop as needed. Please see the documentation for more details and examples.

matchProjectFromProjectName(projectName)

matchProjectFromProjectName(projectName: string): string | number;

Parse the project from Project resource.

Parameter
Name Description
projectName string

A fully-qualified path representing Project resource.

Returns
Type Description
string | number

{string} A string representing the project.

matchProjectFromProjectTopicName(projectTopicName)

matchProjectFromProjectTopicName(projectTopicName: string): string | number;

Parse the project from ProjectTopic resource.

Parameter
Name Description
projectTopicName string

A fully-qualified path representing project_topic resource.

Returns
Type Description
string | number

{string} A string representing the project.

matchProjectFromSchemaName(schemaName)

matchProjectFromSchemaName(schemaName: string): string | number;

Parse the project from Schema resource.

Parameter
Name Description
schemaName string

A fully-qualified path representing Schema resource.

Returns
Type Description
string | number

{string} A string representing the project.

matchProjectFromSnapshotName(snapshotName)

matchProjectFromSnapshotName(snapshotName: string): string | number;

Parse the project from Snapshot resource.

Parameter
Name Description
snapshotName string

A fully-qualified path representing Snapshot resource.

Returns
Type Description
string | number

{string} A string representing the project.

matchProjectFromSubscriptionName(subscriptionName)

matchProjectFromSubscriptionName(subscriptionName: string): string | number;

Parse the project from Subscription resource.

Parameter
Name Description
subscriptionName string

A fully-qualified path representing Subscription resource.

Returns
Type Description
string | number

{string} A string representing the project.

matchSchemaFromSchemaName(schemaName)

matchSchemaFromSchemaName(schemaName: string): string | number;

Parse the schema from Schema resource.

Parameter
Name Description
schemaName string

A fully-qualified path representing Schema resource.

Returns
Type Description
string | number

{string} A string representing the schema.

matchSnapshotFromSnapshotName(snapshotName)

matchSnapshotFromSnapshotName(snapshotName: string): string | number;

Parse the snapshot from Snapshot resource.

Parameter
Name Description
snapshotName string

A fully-qualified path representing Snapshot resource.

Returns
Type Description
string | number

{string} A string representing the snapshot.

matchSubscriptionFromSubscriptionName(subscriptionName)

matchSubscriptionFromSubscriptionName(subscriptionName: string): string | number;

Parse the subscription from Subscription resource.

Parameter
Name Description
subscriptionName string

A fully-qualified path representing Subscription resource.

Returns
Type Description
string | number

{string} A string representing the subscription.

matchTopicFromProjectTopicName(projectTopicName)

matchTopicFromProjectTopicName(projectTopicName: string): string | number;

Parse the topic from ProjectTopic resource.

Parameter
Name Description
projectTopicName string

A fully-qualified path representing project_topic resource.

Returns
Type Description
string | number

{string} A string representing the topic.

projectPath(project)

projectPath(project: string): string;

Return a fully-qualified project resource name string.

Parameter
Name Description
project string
Returns
Type Description
string

{string} Resource name string.

projectTopicPath(project, topic)

projectTopicPath(project: string, topic: string): string;

Return a fully-qualified projectTopic resource name string.

Parameters
Name Description
project string
topic string
Returns
Type Description
string

{string} Resource name string.

rollbackSchema(request, options)

rollbackSchema(request?: protos.google.pubsub.v1.IRollbackSchemaRequest, options?: CallOptions): Promise<[
        protos.google.pubsub.v1.ISchema,
        protos.google.pubsub.v1.IRollbackSchemaRequest | undefined,
        {} | undefined
    ]>;

Creates a new schema revision that is a copy of the provided revision_id.

Parameters
Name Description
request IRollbackSchemaRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ protos.google.pubsub.v1.ISchema, protos.google.pubsub.v1.IRollbackSchemaRequest | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the documentation for more details and examples.

rollbackSchema(request, options, callback)

rollbackSchema(request: protos.google.pubsub.v1.IRollbackSchemaRequest, options: CallOptions, callback: Callback<protos.google.pubsub.v1.ISchema, protos.google.pubsub.v1.IRollbackSchemaRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IRollbackSchemaRequest
options CallOptions
callback Callback<protos.google.pubsub.v1.ISchema, protos.google.pubsub.v1.IRollbackSchemaRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

rollbackSchema(request, callback)

rollbackSchema(request: protos.google.pubsub.v1.IRollbackSchemaRequest, callback: Callback<protos.google.pubsub.v1.ISchema, protos.google.pubsub.v1.IRollbackSchemaRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IRollbackSchemaRequest
callback Callback<protos.google.pubsub.v1.ISchema, protos.google.pubsub.v1.IRollbackSchemaRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

schemaPath(project, schema)

schemaPath(project: string, schema: string): string;

Return a fully-qualified schema resource name string.

Parameters
Name Description
project string
schema string
Returns
Type Description
string

{string} Resource name string.

setIamPolicy(request, options, callback)

setIamPolicy(request: IamProtos.google.iam.v1.SetIamPolicyRequest, options?: gax.CallOptions | Callback<IamProtos.google.iam.v1.Policy, IamProtos.google.iam.v1.SetIamPolicyRequest | null | undefined, {} | null | undefined>, callback?: Callback<IamProtos.google.iam.v1.Policy, IamProtos.google.iam.v1.SetIamPolicyRequest | null | undefined, {} | null | undefined>): Promise<[IamProtos.google.iam.v1.Policy]>;

Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a NOT_FOUND error.

Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may "fail open" without warning.

Parameters
Name Description
request IamProtos.google.iam.v1.SetIamPolicyRequest

The request object that will be sent.

options CallOptions | Callback<google.iam.v1.Policy, google.iam.v1.SetIamPolicyRequest | null | undefined, {} | null | undefined>

Optional parameters. You can override the default settings for this call, e.g, timeout, retries, paginations, etc. See gax.CallOptions for the details.

callback Callback<google.iam.v1.Policy, google.iam.v1.SetIamPolicyRequest | null | undefined, {} | null | undefined>

The function which will be called with the result of the API call.

The second parameter to the callback is an object representing .

Returns
Type Description
Promise<[google.iam.v1.Policy]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing . The promise has a method named "cancel" which cancels the ongoing API call.

snapshotPath(project, snapshot)

snapshotPath(project: string, snapshot: string): string;

Return a fully-qualified snapshot resource name string.

Parameters
Name Description
project string
snapshot string
Returns
Type Description
string

{string} Resource name string.

subscriptionPath(project, subscription)

subscriptionPath(project: string, subscription: string): string;

Return a fully-qualified subscription resource name string.

Parameters
Name Description
project string
subscription string
Returns
Type Description
string

{string} Resource name string.

testIamPermissions(request, options, callback)

testIamPermissions(request: IamProtos.google.iam.v1.TestIamPermissionsRequest, options?: gax.CallOptions | Callback<IamProtos.google.iam.v1.TestIamPermissionsResponse, IamProtos.google.iam.v1.TestIamPermissionsRequest | null | undefined, {} | null | undefined>, callback?: Callback<IamProtos.google.iam.v1.TestIamPermissionsResponse, IamProtos.google.iam.v1.TestIamPermissionsRequest | null | undefined, {} | null | undefined>): Promise<[IamProtos.google.iam.v1.TestIamPermissionsResponse]>;

Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a NOT_FOUND error.

Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may "fail open" without warning.

Parameters
Name Description
request IamProtos.google.iam.v1.TestIamPermissionsRequest

The request object that will be sent.

options CallOptions | Callback<google.iam.v1.TestIamPermissionsResponse, google.iam.v1.TestIamPermissionsRequest | null | undefined, {} | null | undefined>

Optional parameters. You can override the default settings for this call, e.g, timeout, retries, paginations, etc. See gax.CallOptions for the details.

callback Callback<google.iam.v1.TestIamPermissionsResponse, google.iam.v1.TestIamPermissionsRequest | null | undefined, {} | null | undefined>

The function which will be called with the result of the API call.

The second parameter to the callback is an object representing .

Returns
Type Description
Promise<[google.iam.v1.TestIamPermissionsResponse]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing . The promise has a method named "cancel" which cancels the ongoing API call.

validateMessage(request, options)

validateMessage(request?: protos.google.pubsub.v1.IValidateMessageRequest, options?: CallOptions): Promise<[
        protos.google.pubsub.v1.IValidateMessageResponse,
        protos.google.pubsub.v1.IValidateMessageRequest | undefined,
        {} | undefined
    ]>;

Validates a message against a schema.

Parameters
Name Description
request IValidateMessageRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ protos.google.pubsub.v1.IValidateMessageResponse, protos.google.pubsub.v1.IValidateMessageRequest | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing ValidateMessageResponse. Please see the documentation for more details and examples.

validateMessage(request, options, callback)

validateMessage(request: protos.google.pubsub.v1.IValidateMessageRequest, options: CallOptions, callback: Callback<protos.google.pubsub.v1.IValidateMessageResponse, protos.google.pubsub.v1.IValidateMessageRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IValidateMessageRequest
options CallOptions
callback Callback<protos.google.pubsub.v1.IValidateMessageResponse, protos.google.pubsub.v1.IValidateMessageRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

validateMessage(request, callback)

validateMessage(request: protos.google.pubsub.v1.IValidateMessageRequest, callback: Callback<protos.google.pubsub.v1.IValidateMessageResponse, protos.google.pubsub.v1.IValidateMessageRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IValidateMessageRequest
callback Callback<protos.google.pubsub.v1.IValidateMessageResponse, protos.google.pubsub.v1.IValidateMessageRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

validateSchema(request, options)

validateSchema(request?: protos.google.pubsub.v1.IValidateSchemaRequest, options?: CallOptions): Promise<[
        protos.google.pubsub.v1.IValidateSchemaResponse,
        protos.google.pubsub.v1.IValidateSchemaRequest | undefined,
        {} | undefined
    ]>;

Validates a schema.

Parameters
Name Description
request IValidateSchemaRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ protos.google.pubsub.v1.IValidateSchemaResponse, protos.google.pubsub.v1.IValidateSchemaRequest | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing ValidateSchemaResponse. Please see the documentation for more details and examples.

validateSchema(request, options, callback)

validateSchema(request: protos.google.pubsub.v1.IValidateSchemaRequest, options: CallOptions, callback: Callback<protos.google.pubsub.v1.IValidateSchemaResponse, protos.google.pubsub.v1.IValidateSchemaRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IValidateSchemaRequest
options CallOptions
callback Callback<protos.google.pubsub.v1.IValidateSchemaResponse, protos.google.pubsub.v1.IValidateSchemaRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

validateSchema(request, callback)

validateSchema(request: protos.google.pubsub.v1.IValidateSchemaRequest, callback: Callback<protos.google.pubsub.v1.IValidateSchemaResponse, protos.google.pubsub.v1.IValidateSchemaRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IValidateSchemaRequest
callback Callback<protos.google.pubsub.v1.IValidateSchemaResponse, protos.google.pubsub.v1.IValidateSchemaRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void