This service lets you manage document schema. v1
Package
@google-cloud/contentwarehouseConstructors
(constructor)(opts, gaxInstance)
constructor(opts?: ClientOptions, gaxInstance?: typeof gax | typeof gax.fallback);
Construct an instance of DocumentSchemaServiceClient.
Parameters | |
---|---|
Name | Description |
opts |
ClientOptions
|
gaxInstance |
typeof gax | typeof fallback
: loaded instance of |
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;
documentSchemaServiceStub
documentSchemaServiceStub?: Promise<{
[name: string]: Function;
}>;
innerApiCalls
innerApiCalls: {
[name: string]: Function;
};
pathTemplates
pathTemplates: {
[name: string]: gax.PathTemplate;
};
port
static get port(): number;
The port for this API service.
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. |
createDocumentSchema(request, options)
createDocumentSchema(request?: protos.google.cloud.contentwarehouse.v1.ICreateDocumentSchemaRequest, options?: CallOptions): Promise<[
protos.google.cloud.contentwarehouse.v1.IDocumentSchema,
(protos.google.cloud.contentwarehouse.v1.ICreateDocumentSchemaRequest | undefined),
{} | undefined
]>;
Creates a document schema.
Parameters | |
---|---|
Name | Description |
request |
ICreateDocumentSchemaRequest
The request object that will be sent. |
options |
gax.CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
Type | Description |
Promise<[
protos.google.cloud.contentwarehouse.v1.IDocumentSchema,
(protos.google.cloud.contentwarehouse.v1.ICreateDocumentSchemaRequest | undefined),
{} | undefined
]> | {Promise} - The promise which resolves to an array. The first element of the array is an object representing DocumentSchema. Please see the documentation for more details and examples. |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The parent name.
*/
// const parent = 'abc123'
/**
* Required. The document schema to create.
*/
// const documentSchema = {}
// Imports the Contentwarehouse library
const {DocumentSchemaServiceClient} = require('@google-cloud/contentwarehouse').v1;
// Instantiates a client
const contentwarehouseClient = new DocumentSchemaServiceClient();
async function callCreateDocumentSchema() {
// Construct request
const request = {
parent,
documentSchema,
};
// Run request
const response = await contentwarehouseClient.createDocumentSchema(request);
console.log(response);
}
callCreateDocumentSchema();
createDocumentSchema(request, options, callback)
createDocumentSchema(request: protos.google.cloud.contentwarehouse.v1.ICreateDocumentSchemaRequest, options: CallOptions, callback: Callback<protos.google.cloud.contentwarehouse.v1.IDocumentSchema, protos.google.cloud.contentwarehouse.v1.ICreateDocumentSchemaRequest | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
ICreateDocumentSchemaRequest
|
options |
gax.CallOptions
|
callback |
Callback<protos.google.cloud.contentwarehouse.v1.IDocumentSchema, protos.google.cloud.contentwarehouse.v1.ICreateDocumentSchemaRequest | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
void |
createDocumentSchema(request, callback)
createDocumentSchema(request: protos.google.cloud.contentwarehouse.v1.ICreateDocumentSchemaRequest, callback: Callback<protos.google.cloud.contentwarehouse.v1.IDocumentSchema, protos.google.cloud.contentwarehouse.v1.ICreateDocumentSchemaRequest | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
ICreateDocumentSchemaRequest
|
callback |
Callback<protos.google.cloud.contentwarehouse.v1.IDocumentSchema, protos.google.cloud.contentwarehouse.v1.ICreateDocumentSchemaRequest | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
void |
deleteDocumentSchema(request, options)
deleteDocumentSchema(request?: protos.google.cloud.contentwarehouse.v1.IDeleteDocumentSchemaRequest, options?: CallOptions): Promise<[
protos.google.protobuf.IEmpty,
(protos.google.cloud.contentwarehouse.v1.IDeleteDocumentSchemaRequest | undefined),
{} | undefined
]>;
Deletes a document schema. Returns NOT_FOUND if the document schema does not exist. Returns BAD_REQUEST if the document schema has documents depending on it.
Parameters | |
---|---|
Name | Description |
request |
IDeleteDocumentSchemaRequest
The request object that will be sent. |
options |
gax.CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
Type | Description |
Promise<[
protos.google.protobuf.IEmpty,
(protos.google.cloud.contentwarehouse.v1.IDeleteDocumentSchemaRequest | 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. |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The name of the document schema to delete.
*/
// const name = 'abc123'
// Imports the Contentwarehouse library
const {DocumentSchemaServiceClient} = require('@google-cloud/contentwarehouse').v1;
// Instantiates a client
const contentwarehouseClient = new DocumentSchemaServiceClient();
async function callDeleteDocumentSchema() {
// Construct request
const request = {
name,
};
// Run request
const response = await contentwarehouseClient.deleteDocumentSchema(request);
console.log(response);
}
callDeleteDocumentSchema();
deleteDocumentSchema(request, options, callback)
deleteDocumentSchema(request: protos.google.cloud.contentwarehouse.v1.IDeleteDocumentSchemaRequest, options: CallOptions, callback: Callback<protos.google.protobuf.IEmpty, protos.google.cloud.contentwarehouse.v1.IDeleteDocumentSchemaRequest | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
IDeleteDocumentSchemaRequest
|
options |
gax.CallOptions
|
callback |
Callback<protos.google.protobuf.IEmpty, protos.google.cloud.contentwarehouse.v1.IDeleteDocumentSchemaRequest | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
void |
deleteDocumentSchema(request, callback)
deleteDocumentSchema(request: protos.google.cloud.contentwarehouse.v1.IDeleteDocumentSchemaRequest, callback: Callback<protos.google.protobuf.IEmpty, protos.google.cloud.contentwarehouse.v1.IDeleteDocumentSchemaRequest | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
IDeleteDocumentSchemaRequest
|
callback |
Callback<protos.google.protobuf.IEmpty, protos.google.cloud.contentwarehouse.v1.IDeleteDocumentSchemaRequest | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
void |
documentLinkPath(project, location, document, documentLink)
documentLinkPath(project: string, location: string, document: string, documentLink: string): string;
Return a fully-qualified documentLink resource name string.
Parameters | |
---|---|
Name | Description |
project |
string
|
location |
string
|
document |
string
|
documentLink |
string
|
Returns | |
---|---|
Type | Description |
string | {string} Resource name string. |
documentSchemaPath(project, location, documentSchema)
documentSchemaPath(project: string, location: string, documentSchema: string): string;
Return a fully-qualified documentSchema resource name string.
Parameters | |
---|---|
Name | Description |
project |
string
|
location |
string
|
documentSchema |
string
|
Returns | |
---|---|
Type | Description |
string | {string} Resource name string. |
getDocumentSchema(request, options)
getDocumentSchema(request?: protos.google.cloud.contentwarehouse.v1.IGetDocumentSchemaRequest, options?: CallOptions): Promise<[
protos.google.cloud.contentwarehouse.v1.IDocumentSchema,
(protos.google.cloud.contentwarehouse.v1.IGetDocumentSchemaRequest | undefined),
{} | undefined
]>;
Gets a document schema. Returns NOT_FOUND if the document schema does not exist.
Parameters | |
---|---|
Name | Description |
request |
IGetDocumentSchemaRequest
The request object that will be sent. |
options |
gax.CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
Type | Description |
Promise<[
protos.google.cloud.contentwarehouse.v1.IDocumentSchema,
(protos.google.cloud.contentwarehouse.v1.IGetDocumentSchemaRequest | undefined),
{} | undefined
]> | {Promise} - The promise which resolves to an array. The first element of the array is an object representing DocumentSchema. Please see the documentation for more details and examples. |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The name of the document schema to retrieve.
*/
// const name = 'abc123'
// Imports the Contentwarehouse library
const {DocumentSchemaServiceClient} = require('@google-cloud/contentwarehouse').v1;
// Instantiates a client
const contentwarehouseClient = new DocumentSchemaServiceClient();
async function callGetDocumentSchema() {
// Construct request
const request = {
name,
};
// Run request
const response = await contentwarehouseClient.getDocumentSchema(request);
console.log(response);
}
callGetDocumentSchema();
getDocumentSchema(request, options, callback)
getDocumentSchema(request: protos.google.cloud.contentwarehouse.v1.IGetDocumentSchemaRequest, options: CallOptions, callback: Callback<protos.google.cloud.contentwarehouse.v1.IDocumentSchema, protos.google.cloud.contentwarehouse.v1.IGetDocumentSchemaRequest | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
IGetDocumentSchemaRequest
|
options |
gax.CallOptions
|
callback |
Callback<protos.google.cloud.contentwarehouse.v1.IDocumentSchema, protos.google.cloud.contentwarehouse.v1.IGetDocumentSchemaRequest | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
void |
getDocumentSchema(request, callback)
getDocumentSchema(request: protos.google.cloud.contentwarehouse.v1.IGetDocumentSchemaRequest, callback: Callback<protos.google.cloud.contentwarehouse.v1.IDocumentSchema, protos.google.cloud.contentwarehouse.v1.IGetDocumentSchemaRequest | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
IGetDocumentSchemaRequest
|
callback |
Callback<protos.google.cloud.contentwarehouse.v1.IDocumentSchema, protos.google.cloud.contentwarehouse.v1.IGetDocumentSchemaRequest | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
void |
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 |
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. |
listDocumentSchemas(request, options)
listDocumentSchemas(request?: protos.google.cloud.contentwarehouse.v1.IListDocumentSchemasRequest, options?: CallOptions): Promise<[
protos.google.cloud.contentwarehouse.v1.IDocumentSchema[],
protos.google.cloud.contentwarehouse.v1.IListDocumentSchemasRequest | null,
protos.google.cloud.contentwarehouse.v1.IListDocumentSchemasResponse
]>;
Lists document schemas.
Parameters | |
---|---|
Name | Description |
request |
IListDocumentSchemasRequest
The request object that will be sent. |
options |
gax.CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
Type | Description |
Promise<[
protos.google.cloud.contentwarehouse.v1.IDocumentSchema[],
protos.google.cloud.contentwarehouse.v1.IListDocumentSchemasRequest | null,
protos.google.cloud.contentwarehouse.v1.IListDocumentSchemasResponse
]> | {Promise} - The promise which resolves to an array. The first element of the array is Array of DocumentSchema. 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 |
listDocumentSchemas(request, options, callback)
listDocumentSchemas(request: protos.google.cloud.contentwarehouse.v1.IListDocumentSchemasRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.contentwarehouse.v1.IListDocumentSchemasRequest, protos.google.cloud.contentwarehouse.v1.IListDocumentSchemasResponse | null | undefined, protos.google.cloud.contentwarehouse.v1.IDocumentSchema>): void;
Parameters | |
---|---|
Name | Description |
request |
IListDocumentSchemasRequest
|
options |
gax.CallOptions
|
callback |
PaginationCallback<protos.google.cloud.contentwarehouse.v1.IListDocumentSchemasRequest, protos.google.cloud.contentwarehouse.v1.IListDocumentSchemasResponse | null | undefined, protos.google.cloud.contentwarehouse.v1.IDocumentSchema>
|
Returns | |
---|---|
Type | Description |
void |
listDocumentSchemas(request, callback)
listDocumentSchemas(request: protos.google.cloud.contentwarehouse.v1.IListDocumentSchemasRequest, callback: PaginationCallback<protos.google.cloud.contentwarehouse.v1.IListDocumentSchemasRequest, protos.google.cloud.contentwarehouse.v1.IListDocumentSchemasResponse | null | undefined, protos.google.cloud.contentwarehouse.v1.IDocumentSchema>): void;
Parameters | |
---|---|
Name | Description |
request |
IListDocumentSchemasRequest
|
callback |
PaginationCallback<protos.google.cloud.contentwarehouse.v1.IListDocumentSchemasRequest, protos.google.cloud.contentwarehouse.v1.IListDocumentSchemasResponse | null | undefined, protos.google.cloud.contentwarehouse.v1.IDocumentSchema>
|
Returns | |
---|---|
Type | Description |
void |
listDocumentSchemasAsync(request, options)
listDocumentSchemasAsync(request?: protos.google.cloud.contentwarehouse.v1.IListDocumentSchemasRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.contentwarehouse.v1.IDocumentSchema>;
Equivalent to listDocumentSchemas
, but returns an iterable object.
for
-await
-of
syntax is used with the iterable to get response elements on-demand.
Parameters | |
---|---|
Name | Description |
request |
IListDocumentSchemasRequest
The request object that will be sent. |
options |
gax.CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
Type | Description |
AsyncIterable<protos.google.cloud.contentwarehouse.v1.IDocumentSchema> | {Object} An iterable Object that allows async iteration. When you iterate the returned iterable, each element will be an object representing DocumentSchema. 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. |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The parent, which owns this collection of document schemas.
* Format: projects/{project_number}/locations/{location}.
*/
// const parent = 'abc123'
/**
* The maximum number of document schemas to return. The service may return
* fewer than this value.
* If unspecified, at most 50 document schemas will be returned.
* The maximum value is 1000; values above 1000 will be coerced to 1000.
*/
// const pageSize = 1234
/**
* A page token, received from a previous `ListDocumentSchemas` call.
* Provide this to retrieve the subsequent page.
* When paginating, all other parameters provided to `ListDocumentSchemas`
* must match the call that provided the page token.
*/
// const pageToken = 'abc123'
// Imports the Contentwarehouse library
const {DocumentSchemaServiceClient} = require('@google-cloud/contentwarehouse').v1;
// Instantiates a client
const contentwarehouseClient = new DocumentSchemaServiceClient();
async function callListDocumentSchemas() {
// Construct request
const request = {
parent,
};
// Run request
const iterable = contentwarehouseClient.listDocumentSchemasAsync(request);
for await (const response of iterable) {
console.log(response);
}
}
callListDocumentSchemas();
listDocumentSchemasStream(request, options)
listDocumentSchemasStream(request?: protos.google.cloud.contentwarehouse.v1.IListDocumentSchemasRequest, options?: CallOptions): Transform;
Equivalent to method.name.toCamelCase()
, but returns a NodeJS Stream object.
Parameters | |
---|---|
Name | Description |
request |
IListDocumentSchemasRequest
The request object that will be sent. |
options |
gax.CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
Type | Description |
Transform | {Stream} An object stream which emits an object representing DocumentSchema 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 |
locationPath(project, location)
locationPath(project: string, location: string): string;
Return a fully-qualified location resource name string.
Parameters | |
---|---|
Name | Description |
project |
string
|
location |
string
|
Returns | |
---|---|
Type | Description |
string | {string} Resource name string. |
matchContextFromSynonymSetName(synonymSetName)
matchContextFromSynonymSetName(synonymSetName: string): string | number;
Parse the context from SynonymSet resource.
Parameter | |
---|---|
Name | Description |
synonymSetName |
string
A fully-qualified path representing SynonymSet resource. |
Returns | |
---|---|
Type | Description |
string | number | {string} A string representing the context. |
matchDocumentFromDocumentLinkName(documentLinkName)
matchDocumentFromDocumentLinkName(documentLinkName: string): string | number;
Parse the document from DocumentLink resource.
Parameter | |
---|---|
Name | Description |
documentLinkName |
string
A fully-qualified path representing DocumentLink resource. |
Returns | |
---|---|
Type | Description |
string | number | {string} A string representing the document. |
matchDocumentFromProjectLocationDocumentName(projectLocationDocumentName)
matchDocumentFromProjectLocationDocumentName(projectLocationDocumentName: string): string | number;
Parse the document from ProjectLocationDocument resource.
Parameter | |
---|---|
Name | Description |
projectLocationDocumentName |
string
A fully-qualified path representing project_location_document resource. |
Returns | |
---|---|
Type | Description |
string | number | {string} A string representing the document. |
matchDocumentLinkFromDocumentLinkName(documentLinkName)
matchDocumentLinkFromDocumentLinkName(documentLinkName: string): string | number;
Parse the document_link from DocumentLink resource.
Parameter | |
---|---|
Name | Description |
documentLinkName |
string
A fully-qualified path representing DocumentLink resource. |
Returns | |
---|---|
Type | Description |
string | number | {string} A string representing the document_link. |
matchDocumentSchemaFromDocumentSchemaName(documentSchemaName)
matchDocumentSchemaFromDocumentSchemaName(documentSchemaName: string): string | number;
Parse the document_schema from DocumentSchema resource.
Parameter | |
---|---|
Name | Description |
documentSchemaName |
string
A fully-qualified path representing DocumentSchema resource. |
Returns | |
---|---|
Type | Description |
string | number | {string} A string representing the document_schema. |
matchLocationFromDocumentLinkName(documentLinkName)
matchLocationFromDocumentLinkName(documentLinkName: string): string | number;
Parse the location from DocumentLink resource.
Parameter | |
---|---|
Name | Description |
documentLinkName |
string
A fully-qualified path representing DocumentLink resource. |
Returns | |
---|---|
Type | Description |
string | number | {string} A string representing the location. |
matchLocationFromDocumentSchemaName(documentSchemaName)
matchLocationFromDocumentSchemaName(documentSchemaName: string): string | number;
Parse the location from DocumentSchema resource.
Parameter | |
---|---|
Name | Description |
documentSchemaName |
string
A fully-qualified path representing DocumentSchema resource. |
Returns | |
---|---|
Type | Description |
string | number | {string} A string representing the location. |
matchLocationFromLocationName(locationName)
matchLocationFromLocationName(locationName: string): string | number;
Parse the location from Location resource.
Parameter | |
---|---|
Name | Description |
locationName |
string
A fully-qualified path representing Location resource. |
Returns | |
---|---|
Type | Description |
string | number | {string} A string representing the location. |
matchLocationFromProjectLocationDocumentName(projectLocationDocumentName)
matchLocationFromProjectLocationDocumentName(projectLocationDocumentName: string): string | number;
Parse the location from ProjectLocationDocument resource.
Parameter | |
---|---|
Name | Description |
projectLocationDocumentName |
string
A fully-qualified path representing project_location_document resource. |
Returns | |
---|---|
Type | Description |
string | number | {string} A string representing the location. |
matchLocationFromProjectLocationDocumentsReferenceIdName(projectLocationDocumentsReferenceIdName)
matchLocationFromProjectLocationDocumentsReferenceIdName(projectLocationDocumentsReferenceIdName: string): string | number;
Parse the location from ProjectLocationDocumentsReferenceId resource.
Parameter | |
---|---|
Name | Description |
projectLocationDocumentsReferenceIdName |
string
A fully-qualified path representing project_location_documents_reference_id resource. |
Returns | |
---|---|
Type | Description |
string | number | {string} A string representing the location. |
matchLocationFromRuleSetName(ruleSetName)
matchLocationFromRuleSetName(ruleSetName: string): string | number;
Parse the location from RuleSet resource.
Parameter | |
---|---|
Name | Description |
ruleSetName |
string
A fully-qualified path representing RuleSet resource. |
Returns | |
---|---|
Type | Description |
string | number | {string} A string representing the location. |
matchLocationFromSynonymSetName(synonymSetName)
matchLocationFromSynonymSetName(synonymSetName: string): string | number;
Parse the location from SynonymSet resource.
Parameter | |
---|---|
Name | Description |
synonymSetName |
string
A fully-qualified path representing SynonymSet resource. |
Returns | |
---|---|
Type | Description |
string | number | {string} A string representing the location. |
matchProjectFromDocumentLinkName(documentLinkName)
matchProjectFromDocumentLinkName(documentLinkName: string): string | number;
Parse the project from DocumentLink resource.
Parameter | |
---|---|
Name | Description |
documentLinkName |
string
A fully-qualified path representing DocumentLink resource. |
Returns | |
---|---|
Type | Description |
string | number | {string} A string representing the project. |
matchProjectFromDocumentSchemaName(documentSchemaName)
matchProjectFromDocumentSchemaName(documentSchemaName: string): string | number;
Parse the project from DocumentSchema resource.
Parameter | |
---|---|
Name | Description |
documentSchemaName |
string
A fully-qualified path representing DocumentSchema resource. |
Returns | |
---|---|
Type | Description |
string | number | {string} A string representing the project. |
matchProjectFromLocationName(locationName)
matchProjectFromLocationName(locationName: string): string | number;
Parse the project from Location resource.
Parameter | |
---|---|
Name | Description |
locationName |
string
A fully-qualified path representing Location resource. |
Returns | |
---|---|
Type | Description |
string | number | {string} A string representing the project. |
matchProjectFromProjectLocationDocumentName(projectLocationDocumentName)
matchProjectFromProjectLocationDocumentName(projectLocationDocumentName: string): string | number;
Parse the project from ProjectLocationDocument resource.
Parameter | |
---|---|
Name | Description |
projectLocationDocumentName |
string
A fully-qualified path representing project_location_document resource. |
Returns | |
---|---|
Type | Description |
string | number | {string} A string representing the project. |
matchProjectFromProjectLocationDocumentsReferenceIdName(projectLocationDocumentsReferenceIdName)
matchProjectFromProjectLocationDocumentsReferenceIdName(projectLocationDocumentsReferenceIdName: string): string | number;
Parse the project from ProjectLocationDocumentsReferenceId resource.
Parameter | |
---|---|
Name | Description |
projectLocationDocumentsReferenceIdName |
string
A fully-qualified path representing project_location_documents_reference_id resource. |
Returns | |
---|---|
Type | Description |
string | number | {string} A string representing the project. |
matchProjectFromRuleSetName(ruleSetName)
matchProjectFromRuleSetName(ruleSetName: string): string | number;
Parse the project from RuleSet resource.
Parameter | |
---|---|
Name | Description |
ruleSetName |
string
A fully-qualified path representing RuleSet resource. |
Returns | |
---|---|
Type | Description |
string | number | {string} A string representing the project. |
matchProjectFromSynonymSetName(synonymSetName)
matchProjectFromSynonymSetName(synonymSetName: string): string | number;
Parse the project from SynonymSet resource.
Parameter | |
---|---|
Name | Description |
synonymSetName |
string
A fully-qualified path representing SynonymSet resource. |
Returns | |
---|---|
Type | Description |
string | number | {string} A string representing the project. |
matchReferenceIdFromProjectLocationDocumentsReferenceIdName(projectLocationDocumentsReferenceIdName)
matchReferenceIdFromProjectLocationDocumentsReferenceIdName(projectLocationDocumentsReferenceIdName: string): string | number;
Parse the reference_id from ProjectLocationDocumentsReferenceId resource.
Parameter | |
---|---|
Name | Description |
projectLocationDocumentsReferenceIdName |
string
A fully-qualified path representing project_location_documents_reference_id resource. |
Returns | |
---|---|
Type | Description |
string | number | {string} A string representing the reference_id. |
matchRuleSetFromRuleSetName(ruleSetName)
matchRuleSetFromRuleSetName(ruleSetName: string): string | number;
Parse the rule_set from RuleSet resource.
Parameter | |
---|---|
Name | Description |
ruleSetName |
string
A fully-qualified path representing RuleSet resource. |
Returns | |
---|---|
Type | Description |
string | number | {string} A string representing the rule_set. |
projectLocationDocumentPath(project, location, document)
projectLocationDocumentPath(project: string, location: string, document: string): string;
Return a fully-qualified projectLocationDocument resource name string.
Parameters | |
---|---|
Name | Description |
project |
string
|
location |
string
|
document |
string
|
Returns | |
---|---|
Type | Description |
string | {string} Resource name string. |
projectLocationDocumentsReferenceIdPath(project, location, referenceId)
projectLocationDocumentsReferenceIdPath(project: string, location: string, referenceId: string): string;
Return a fully-qualified projectLocationDocumentsReferenceId resource name string.
Parameters | |
---|---|
Name | Description |
project |
string
|
location |
string
|
referenceId |
string
|
Returns | |
---|---|
Type | Description |
string | {string} Resource name string. |
ruleSetPath(project, location, ruleSet)
ruleSetPath(project: string, location: string, ruleSet: string): string;
Return a fully-qualified ruleSet resource name string.
Parameters | |
---|---|
Name | Description |
project |
string
|
location |
string
|
ruleSet |
string
|
Returns | |
---|---|
Type | Description |
string | {string} Resource name string. |
synonymSetPath(project, location, context)
synonymSetPath(project: string, location: string, context: string): string;
Return a fully-qualified synonymSet resource name string.
Parameters | |
---|---|
Name | Description |
project |
string
|
location |
string
|
context |
string
|
Returns | |
---|---|
Type | Description |
string | {string} Resource name string. |
updateDocumentSchema(request, options)
updateDocumentSchema(request?: protos.google.cloud.contentwarehouse.v1.IUpdateDocumentSchemaRequest, options?: CallOptions): Promise<[
protos.google.cloud.contentwarehouse.v1.IDocumentSchema,
(protos.google.cloud.contentwarehouse.v1.IUpdateDocumentSchemaRequest | undefined),
{} | undefined
]>;
Updates a Document Schema. Returns INVALID_ARGUMENT if the name of the Document Schema is non-empty and does not equal the existing name. Supports only appending new properties, adding new ENUM possible values, and updating the flag for ENUM possible values. Updating existing properties will result into INVALID_ARGUMENT.
Parameters | |
---|---|
Name | Description |
request |
IUpdateDocumentSchemaRequest
The request object that will be sent. |
options |
gax.CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
Type | Description |
Promise<[
protos.google.cloud.contentwarehouse.v1.IDocumentSchema,
(protos.google.cloud.contentwarehouse.v1.IUpdateDocumentSchemaRequest | undefined),
{} | undefined
]> | {Promise} - The promise which resolves to an array. The first element of the array is an object representing DocumentSchema. Please see the documentation for more details and examples. |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The name of the document schema to update.
* Format:
* projects/{project_number}/locations/{location}/documentSchemas/{document_schema_id}.
*/
// const name = 'abc123'
/**
* Required. The document schema to update with.
*/
// const documentSchema = {}
// Imports the Contentwarehouse library
const {DocumentSchemaServiceClient} = require('@google-cloud/contentwarehouse').v1;
// Instantiates a client
const contentwarehouseClient = new DocumentSchemaServiceClient();
async function callUpdateDocumentSchema() {
// Construct request
const request = {
name,
documentSchema,
};
// Run request
const response = await contentwarehouseClient.updateDocumentSchema(request);
console.log(response);
}
callUpdateDocumentSchema();
updateDocumentSchema(request, options, callback)
updateDocumentSchema(request: protos.google.cloud.contentwarehouse.v1.IUpdateDocumentSchemaRequest, options: CallOptions, callback: Callback<protos.google.cloud.contentwarehouse.v1.IDocumentSchema, protos.google.cloud.contentwarehouse.v1.IUpdateDocumentSchemaRequest | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
IUpdateDocumentSchemaRequest
|
options |
gax.CallOptions
|
callback |
Callback<protos.google.cloud.contentwarehouse.v1.IDocumentSchema, protos.google.cloud.contentwarehouse.v1.IUpdateDocumentSchemaRequest | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
void |
updateDocumentSchema(request, callback)
updateDocumentSchema(request: protos.google.cloud.contentwarehouse.v1.IUpdateDocumentSchemaRequest, callback: Callback<protos.google.cloud.contentwarehouse.v1.IDocumentSchema, protos.google.cloud.contentwarehouse.v1.IUpdateDocumentSchemaRequest | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
IUpdateDocumentSchemaRequest
|
callback |
Callback<protos.google.cloud.contentwarehouse.v1.IDocumentSchema, protos.google.cloud.contentwarehouse.v1.IUpdateDocumentSchemaRequest | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
void |