Class v2.CaseServiceClient (1.0.2)

A service to manage Google Cloud support cases. v2

Package

@google-cloud/support

Constructors

(constructor)(opts, gaxInstance)

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

Construct an instance of CaseServiceClient.

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 CaseServiceClient({fallback: true}, gax); ```

Properties

apiEndpoint

  static 
  
 get 
  
 apiEndpoint 
 () 
 : 
  
 string 
 ; 
 

The DNS address for this API service - same as servicePath(), exists for compatibility reasons.

auth

  auth 
 : 
  
 gax 
 . 
 GoogleAuth 
 ; 
 

caseServiceStub

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

descriptors

  descriptors 
 : 
  
 Descriptors 
 ; 
 

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.

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.

closeCase(request, options)

  closeCase 
 ( 
 request 
 ?: 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 support 
 . 
 v2 
 . 
 ICloseCaseRequest 
 , 
  
 options 
 ?: 
  
 CallOptions 
 ) 
 : 
  
 Promise 
< [ 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 support 
 . 
 v2 
 . 
 ICase 
 , 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 support 
 . 
 v2 
 . 
 ICloseCaseRequest 
  
 | 
  
 undefined 
 , 
  
 {} 
  
 | 
  
 undefined 
  
 ]>; 
 

Close the specified case.

Parameters
Name
Description
request
ICloseCaseRequest

The request object that will be sent.

options
CallOptions

Call options. See CallOptions for more details.

Returns
Type
Description

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

Example
   
 /** 
 * 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 fully qualified name of the case resource to be closed. 
 */ 
  
 // const name = 'abc123' 
  
 // Imports the Support library 
  
 const 
  
 { 
 CaseServiceClient 
 } 
  
 = 
  
 require 
 ( 
 ' @google-cloud/support 
' 
 ). 
 v2 
 ; 
  
 // Instantiates a client 
  
 const 
  
 supportClient 
  
 = 
  
 new 
  
  CaseServiceClient 
 
 (); 
  
 async 
  
 function 
  
 callCloseCase 
 () 
  
 { 
  
 // Construct request 
  
 const 
  
 request 
  
 = 
  
 { 
  
 name 
 , 
  
 }; 
  
 // Run request 
  
 const 
  
 response 
  
 = 
  
 await 
  
 supportClient 
 . 
 closeCase 
 ( 
 request 
 ); 
  
 console 
 . 
 log 
 ( 
 response 
 ); 
  
 } 
  
 callCloseCase 
 (); 
 

closeCase(request, options, callback)

  closeCase 
 ( 
 request 
 : 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 support 
 . 
 v2 
 . 
 ICloseCaseRequest 
 , 
  
 options 
 : 
  
 CallOptions 
 , 
  
 callback 
 : 
  
 Callback<protos 
 . 
 google 
 . 
 cloud 
 . 
 support 
 . 
 v2 
 . 
 ICase 
 , 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 support 
 . 
 v2 
 . 
 ICloseCaseRequest 
  
 | 
  
 null 
  
 | 
  
 undefined 
 , 
  
 {} 
  
 | 
  
 null 
  
 | 
  
 undefined 
> ) 
 : 
  
 void 
 ; 
 
Parameters
Name
Description
options
CallOptions
callback
Callback < protos.google.cloud.support.v2.ICase , protos.google.cloud.support.v2.ICloseCaseRequest | null | undefined, {} | null | undefined>
Returns
Type
Description
void

closeCase(request, callback)

  closeCase 
 ( 
 request 
 : 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 support 
 . 
 v2 
 . 
 ICloseCaseRequest 
 , 
  
 callback 
 : 
  
 Callback<protos 
 . 
 google 
 . 
 cloud 
 . 
 support 
 . 
 v2 
 . 
 ICase 
 , 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 support 
 . 
 v2 
 . 
 ICloseCaseRequest 
  
 | 
  
 null 
  
 | 
  
 undefined 
 , 
  
 {} 
  
 | 
  
 null 
  
 | 
  
 undefined 
> ) 
 : 
  
 void 
 ; 
 
Parameters
Name
Description
callback
Callback < protos.google.cloud.support.v2.ICase , protos.google.cloud.support.v2.ICloseCaseRequest | null | undefined, {} | null | undefined>
Returns
Type
Description
void

createCase(request, options)

  createCase 
 ( 
 request 
 ?: 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 support 
 . 
 v2 
 . 
 ICreateCaseRequest 
 , 
  
 options 
 ?: 
  
 CallOptions 
 ) 
 : 
  
 Promise 
< [ 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 support 
 . 
 v2 
 . 
 ICase 
 , 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 support 
 . 
 v2 
 . 
 ICreateCaseRequest 
  
 | 
  
 undefined 
 , 
  
 {} 
  
 | 
  
 undefined 
  
 ]>; 
 

Create a new case and associate it with the given Google Cloud Resource. The case object must have the following fields set: display_name , description , classification , and priority .

Parameters
Name
Description
request
ICreateCaseRequest

The request object that will be sent.

options
CallOptions

Call options. See CallOptions for more details.

Returns
Type
Description

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

Example
   
 /** 
 * 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 Google Cloud Resource under which the case should 
 *  be created. 
 */ 
  
 // const parent = 'abc123' 
  
 /** 
 *  Required. The case to be created. 
 */ 
  
 // const case = {} 
  
 // Imports the Support library 
  
 const 
  
 { 
 CaseServiceClient 
 } 
  
 = 
  
 require 
 ( 
 ' @google-cloud/support 
' 
 ). 
 v2 
 ; 
  
 // Instantiates a client 
  
 const 
  
 supportClient 
  
 = 
  
 new 
  
  CaseServiceClient 
 
 (); 
  
 async 
  
 function 
  
 callCreateCase 
 () 
  
 { 
  
 // Construct request 
  
 const 
  
 request 
  
 = 
  
 { 
  
 parent 
 , 
  
 case 
 , 
  
 }; 
  
 // Run request 
  
 const 
  
 response 
  
 = 
  
 await 
  
 supportClient 
 . 
 createCase 
 ( 
 request 
 ); 
  
 console 
 . 
 log 
 ( 
 response 
 ); 
  
 } 
  
 callCreateCase 
 (); 
 

createCase(request, options, callback)

  createCase 
 ( 
 request 
 : 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 support 
 . 
 v2 
 . 
 ICreateCaseRequest 
 , 
  
 options 
 : 
  
 CallOptions 
 , 
  
 callback 
 : 
  
 Callback<protos 
 . 
 google 
 . 
 cloud 
 . 
 support 
 . 
 v2 
 . 
 ICase 
 , 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 support 
 . 
 v2 
 . 
 ICreateCaseRequest 
  
 | 
  
 null 
  
 | 
  
 undefined 
 , 
  
 {} 
  
 | 
  
 null 
  
 | 
  
 undefined 
> ) 
 : 
  
 void 
 ; 
 
Parameters
Name
Description
options
CallOptions
callback
Callback < protos.google.cloud.support.v2.ICase , protos.google.cloud.support.v2.ICreateCaseRequest | null | undefined, {} | null | undefined>
Returns
Type
Description
void

createCase(request, callback)

  createCase 
 ( 
 request 
 : 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 support 
 . 
 v2 
 . 
 ICreateCaseRequest 
 , 
  
 callback 
 : 
  
 Callback<protos 
 . 
 google 
 . 
 cloud 
 . 
 support 
 . 
 v2 
 . 
 ICase 
 , 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 support 
 . 
 v2 
 . 
 ICreateCaseRequest 
  
 | 
  
 null 
  
 | 
  
 undefined 
 , 
  
 {} 
  
 | 
  
 null 
  
 | 
  
 undefined 
> ) 
 : 
  
 void 
 ; 
 
Parameters
Name
Description
callback
Callback < protos.google.cloud.support.v2.ICase , protos.google.cloud.support.v2.ICreateCaseRequest | null | undefined, {} | null | undefined>
Returns
Type
Description
void

escalateCase(request, options)

  escalateCase 
 ( 
 request 
 ?: 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 support 
 . 
 v2 
 . 
 IEscalateCaseRequest 
 , 
  
 options 
 ?: 
  
 CallOptions 
 ) 
 : 
  
 Promise 
< [ 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 support 
 . 
 v2 
 . 
 ICase 
 , 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 support 
 . 
 v2 
 . 
 IEscalateCaseRequest 
  
 | 
  
 undefined 
 , 
  
 {} 
  
 | 
  
 undefined 
  
 ]>; 
 

Escalate a case. Escalating a case will initiate the Google Cloud Support escalation management process.

This operation is only available to certain Customer Care tiers. Go to https://cloud.google.com/support and look for 'Technical support escalations' in the feature list to find out which tiers are able to perform escalations.

Parameters
Name
Description
request
IEscalateCaseRequest

The request object that will be sent.

options
CallOptions

Call options. See CallOptions for more details.

Returns
Type
Description

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

Example
   
 /** 
 * 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 fully qualified name of the Case resource to be escalated. 
 */ 
  
 // const name = 'abc123' 
  
 /** 
 *  The escalation object to be sent with the escalation request. 
 */ 
  
 // const escalation = {} 
  
 // Imports the Support library 
  
 const 
  
 { 
 CaseServiceClient 
 } 
  
 = 
  
 require 
 ( 
 ' @google-cloud/support 
' 
 ). 
 v2 
 ; 
  
 // Instantiates a client 
  
 const 
  
 supportClient 
  
 = 
  
 new 
  
  CaseServiceClient 
 
 (); 
  
 async 
  
 function 
  
 callEscalateCase 
 () 
  
 { 
  
 // Construct request 
  
 const 
  
 request 
  
 = 
  
 { 
  
 name 
 , 
  
 }; 
  
 // Run request 
  
 const 
  
 response 
  
 = 
  
 await 
  
 supportClient 
 . 
 escalateCase 
 ( 
 request 
 ); 
  
 console 
 . 
 log 
 ( 
 response 
 ); 
  
 } 
  
 callEscalateCase 
 (); 
 

escalateCase(request, options, callback)

  escalateCase 
 ( 
 request 
 : 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 support 
 . 
 v2 
 . 
 IEscalateCaseRequest 
 , 
  
 options 
 : 
  
 CallOptions 
 , 
  
 callback 
 : 
  
 Callback<protos 
 . 
 google 
 . 
 cloud 
 . 
 support 
 . 
 v2 
 . 
 ICase 
 , 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 support 
 . 
 v2 
 . 
 IEscalateCaseRequest 
  
 | 
  
 null 
  
 | 
  
 undefined 
 , 
  
 {} 
  
 | 
  
 null 
  
 | 
  
 undefined 
> ) 
 : 
  
 void 
 ; 
 
Parameters
Name
Description
options
CallOptions
callback
Callback < protos.google.cloud.support.v2.ICase , protos.google.cloud.support.v2.IEscalateCaseRequest | null | undefined, {} | null | undefined>
Returns
Type
Description
void

escalateCase(request, callback)

  escalateCase 
 ( 
 request 
 : 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 support 
 . 
 v2 
 . 
 IEscalateCaseRequest 
 , 
  
 callback 
 : 
  
 Callback<protos 
 . 
 google 
 . 
 cloud 
 . 
 support 
 . 
 v2 
 . 
 ICase 
 , 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 support 
 . 
 v2 
 . 
 IEscalateCaseRequest 
  
 | 
  
 null 
  
 | 
  
 undefined 
 , 
  
 {} 
  
 | 
  
 null 
  
 | 
  
 undefined 
> ) 
 : 
  
 void 
 ; 
 
Parameters
Name
Description
callback
Callback < protos.google.cloud.support.v2.ICase , protos.google.cloud.support.v2.IEscalateCaseRequest | null | undefined, {} | null | undefined>
Returns
Type
Description
void

getCase(request, options)

  getCase 
 ( 
 request 
 ?: 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 support 
 . 
 v2 
 . 
 IGetCaseRequest 
 , 
  
 options 
 ?: 
  
 CallOptions 
 ) 
 : 
  
 Promise 
< [ 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 support 
 . 
 v2 
 . 
 ICase 
 , 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 support 
 . 
 v2 
 . 
 IGetCaseRequest 
  
 | 
  
 undefined 
 , 
  
 {} 
  
 | 
  
 undefined 
  
 ]>; 
 

Retrieve the specified case.

Parameters
Name
Description
request
IGetCaseRequest

The request object that will be sent.

options
CallOptions

Call options. See CallOptions for more details.

Returns
Type
Description

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

Example
   
 /** 
 * 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 fully qualified name of a case to be retrieved. 
 */ 
  
 // const name = 'abc123' 
  
 // Imports the Support library 
  
 const 
  
 { 
 CaseServiceClient 
 } 
  
 = 
  
 require 
 ( 
 ' @google-cloud/support 
' 
 ). 
 v2 
 ; 
  
 // Instantiates a client 
  
 const 
  
 supportClient 
  
 = 
  
 new 
  
  CaseServiceClient 
 
 (); 
  
 async 
  
 function 
  
 callGetCase 
 () 
  
 { 
  
 // Construct request 
  
 const 
  
 request 
  
 = 
  
 { 
  
 name 
 , 
  
 }; 
  
 // Run request 
  
 const 
  
 response 
  
 = 
  
 await 
  
 supportClient 
 . 
 getCase 
 ( 
 request 
 ); 
  
 console 
 . 
 log 
 ( 
 response 
 ); 
  
 } 
  
 callGetCase 
 (); 
 

getCase(request, options, callback)

  getCase 
 ( 
 request 
 : 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 support 
 . 
 v2 
 . 
 IGetCaseRequest 
 , 
  
 options 
 : 
  
 CallOptions 
 , 
  
 callback 
 : 
  
 Callback<protos 
 . 
 google 
 . 
 cloud 
 . 
 support 
 . 
 v2 
 . 
 ICase 
 , 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 support 
 . 
 v2 
 . 
 IGetCaseRequest 
  
 | 
  
 null 
  
 | 
  
 undefined 
 , 
  
 {} 
  
 | 
  
 null 
  
 | 
  
 undefined 
> ) 
 : 
  
 void 
 ; 
 
Parameters
Name
Description
request
options
CallOptions
callback
Callback < protos.google.cloud.support.v2.ICase , protos.google.cloud.support.v2.IGetCaseRequest | null | undefined, {} | null | undefined>
Returns
Type
Description
void

getCase(request, callback)

  getCase 
 ( 
 request 
 : 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 support 
 . 
 v2 
 . 
 IGetCaseRequest 
 , 
  
 callback 
 : 
  
 Callback<protos 
 . 
 google 
 . 
 cloud 
 . 
 support 
 . 
 v2 
 . 
 ICase 
 , 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 support 
 . 
 v2 
 . 
 IGetCaseRequest 
  
 | 
  
 null 
  
 | 
  
 undefined 
 , 
  
 {} 
  
 | 
  
 null 
  
 | 
  
 undefined 
> ) 
 : 
  
 void 
 ; 
 
Parameters
Name
Description
request
callback
Callback < protos.google.cloud.support.v2.ICase , protos.google.cloud.support.v2.IGetCaseRequest | 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.

listCases(request, options)

  listCases 
 ( 
 request 
 ?: 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 support 
 . 
 v2 
 . 
 IListCasesRequest 
 , 
  
 options 
 ?: 
  
 CallOptions 
 ) 
 : 
  
 Promise 
< [ 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 support 
 . 
 v2 
 . 
 ICase 
 [], 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 support 
 . 
 v2 
 . 
 IListCasesRequest 
  
 | 
  
 null 
 , 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 support 
 . 
 v2 
 . 
 IListCasesResponse 
  
 ]>; 
 

Retrieve all cases under the specified parent.

Note: Listing cases under an Organization returns only the cases directly parented by that organization. To retrieve all cases under an organization, including cases parented by projects under that organization, use cases.search .

Parameters
Name
Description
request
IListCasesRequest

The request object that will be sent.

options
CallOptions

Call options. See CallOptions for more details.

Returns
Type
Description

{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 listCasesAsync() method described below for async iteration which you can stop as needed. Please see the documentation for more details and examples.

listCases(request, options, callback)

  listCases 
 ( 
 request 
 : 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 support 
 . 
 v2 
 . 
 IListCasesRequest 
 , 
  
 options 
 : 
  
 CallOptions 
 , 
  
 callback 
 : 
  
 PaginationCallback<protos 
 . 
 google 
 . 
 cloud 
 . 
 support 
 . 
 v2 
 . 
 IListCasesRequest 
 , 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 support 
 . 
 v2 
 . 
 IListCasesResponse 
  
 | 
  
 null 
  
 | 
  
 undefined 
 , 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 support 
 . 
 v2 
 . 
 ICase 
> ) 
 : 
  
 void 
 ; 
 
Parameters
Name
Description
options
CallOptions
Returns
Type
Description
void

listCases(request, callback)

  listCases 
 ( 
 request 
 : 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 support 
 . 
 v2 
 . 
 IListCasesRequest 
 , 
  
 callback 
 : 
  
 PaginationCallback<protos 
 . 
 google 
 . 
 cloud 
 . 
 support 
 . 
 v2 
 . 
 IListCasesRequest 
 , 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 support 
 . 
 v2 
 . 
 IListCasesResponse 
  
 | 
  
 null 
  
 | 
  
 undefined 
 , 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 support 
 . 
 v2 
 . 
 ICase 
> ) 
 : 
  
 void 
 ; 
 
Returns
Type
Description
void

listCasesAsync(request, options)

  listCasesAsync 
 ( 
 request 
 ?: 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 support 
 . 
 v2 
 . 
 IListCasesRequest 
 , 
  
 options 
 ?: 
  
 CallOptions 
 ) 
 : 
  
 AsyncIterable<protos 
 . 
 google 
 . 
 cloud 
 . 
 support 
 . 
 v2 
 . 
 ICase 
> ; 
 

Equivalent to listCases , but returns an iterable object.

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

Parameters
Name
Description
request
IListCasesRequest

The request object that will be sent.

options
CallOptions

Call options. See CallOptions for more details.

Returns
Type
Description

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

Example
   
 /** 
 * 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 fully qualified name of parent resource to list cases under. 
 */ 
  
 // const parent = 'abc123' 
  
 /** 
 *  An expression written in filter language. If non-empty, the query returns 
 *  the cases that match the filter. Else, the query doesn't filter the cases. 
 *  Filter expressions use the following fields with the operators equals (`=`) 
 *  and `AND`: 
 *  - `state`: The accepted values are `OPEN` or `CLOSED`. 
 *  - `priority`: The accepted values are `P0`, `P1`, `P2`, `P3`, or `P4`. You 
 *  can specify multiple values for priority using the `OR` operator. For 
 *  example, `priority=P1 OR priority=P2`. 
 *  - `creator.email`: The email address of the case creator. 
 *  Examples: 
 *  - `state=CLOSED` 
 *  - `state=OPEN AND creator.email="tester@example.com"` 
 *  - `state=OPEN AND (priority=P0 OR priority=P1)` 
 */ 
  
 // const filter = 'abc123' 
  
 /** 
 *  The maximum number of cases fetched with each request. Defaults to 10. 
 */ 
  
 // const pageSize = 1234 
  
 /** 
 *  A token identifying the page of results to return. If unspecified, the 
 *  first page is retrieved. 
 */ 
  
 // const pageToken = 'abc123' 
  
 // Imports the Support library 
  
 const 
  
 { 
 CaseServiceClient 
 } 
  
 = 
  
 require 
 ( 
 ' @google-cloud/support 
' 
 ). 
 v2 
 ; 
  
 // Instantiates a client 
  
 const 
  
 supportClient 
  
 = 
  
 new 
  
  CaseServiceClient 
 
 (); 
  
 async 
  
 function 
  
 callListCases 
 () 
  
 { 
  
 // Construct request 
  
 const 
  
 request 
  
 = 
  
 { 
  
 parent 
 , 
  
 }; 
  
 // Run request 
  
 const 
  
 iterable 
  
 = 
  
 await 
  
 supportClient 
 . 
  listCasesAsync 
 
 ( 
 request 
 ); 
  
 for 
  
 await 
  
 ( 
 const 
  
 response 
  
 of 
  
 iterable 
 ) 
  
 { 
  
 console 
 . 
 log 
 ( 
 response 
 ); 
  
 } 
  
 } 
  
 callListCases 
 (); 
 

listCasesStream(request, options)

  listCasesStream 
 ( 
 request 
 ?: 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 support 
 . 
 v2 
 . 
 IListCasesRequest 
 , 
  
 options 
 ?: 
  
 CallOptions 
 ) 
 : 
  
 Transform 
 ; 
 

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

Parameters
Name
Description
request
IListCasesRequest

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 listCasesAsync() method described below for async iteration which you can stop as needed. Please see the documentation for more details and examples.

matchAttachmentIdFromOrganizationCaseAttachmentIdName(organizationCaseAttachmentIdName)

  matchAttachmentIdFromOrganizationCaseAttachmentIdName 
 ( 
 organizationCaseAttachmentIdName 
 : 
  
 string 
 ) 
 : 
  
 string 
  
 | 
  
 number 
 ; 
 

Parse the attachment_id from OrganizationCaseAttachmentId resource.

Parameter
Name
Description
organizationCaseAttachmentIdName
string

A fully-qualified path representing organization_case_attachment_id resource.

Returns
Type
Description
string | number

{string} A string representing the attachment_id.

matchAttachmentIdFromProjectCaseAttachmentIdName(projectCaseAttachmentIdName)

  matchAttachmentIdFromProjectCaseAttachmentIdName 
 ( 
 projectCaseAttachmentIdName 
 : 
  
 string 
 ) 
 : 
  
 string 
  
 | 
  
 number 
 ; 
 

Parse the attachment_id from ProjectCaseAttachmentId resource.

Parameter
Name
Description
projectCaseAttachmentIdName
string

A fully-qualified path representing project_case_attachment_id resource.

Returns
Type
Description
string | number

{string} A string representing the attachment_id.

matchCaseFromOrganizationCaseAttachmentIdName(organizationCaseAttachmentIdName)

  matchCaseFromOrganizationCaseAttachmentIdName 
 ( 
 organizationCaseAttachmentIdName 
 : 
  
 string 
 ) 
 : 
  
 string 
  
 | 
  
 number 
 ; 
 

Parse the case from OrganizationCaseAttachmentId resource.

Parameter
Name
Description
organizationCaseAttachmentIdName
string

A fully-qualified path representing organization_case_attachment_id resource.

Returns
Type
Description
string | number

{string} A string representing the case.

matchCaseFromOrganizationCaseCommentName(organizationCaseCommentName)

  matchCaseFromOrganizationCaseCommentName 
 ( 
 organizationCaseCommentName 
 : 
  
 string 
 ) 
 : 
  
 string 
  
 | 
  
 number 
 ; 
 

Parse the case from OrganizationCaseComment resource.

Parameter
Name
Description
organizationCaseCommentName
string

A fully-qualified path representing organization_case_comment resource.

Returns
Type
Description
string | number

{string} A string representing the case.

matchCaseFromOrganizationCaseName(organizationCaseName)

  matchCaseFromOrganizationCaseName 
 ( 
 organizationCaseName 
 : 
  
 string 
 ) 
 : 
  
 string 
  
 | 
  
 number 
 ; 
 

Parse the case from OrganizationCase resource.

Parameter
Name
Description
organizationCaseName
string

A fully-qualified path representing organization_case resource.

Returns
Type
Description
string | number

{string} A string representing the case.

matchCaseFromProjectCaseAttachmentIdName(projectCaseAttachmentIdName)

  matchCaseFromProjectCaseAttachmentIdName 
 ( 
 projectCaseAttachmentIdName 
 : 
  
 string 
 ) 
 : 
  
 string 
  
 | 
  
 number 
 ; 
 

Parse the case from ProjectCaseAttachmentId resource.

Parameter
Name
Description
projectCaseAttachmentIdName
string

A fully-qualified path representing project_case_attachment_id resource.

Returns
Type
Description
string | number

{string} A string representing the case.

matchCaseFromProjectCaseCommentName(projectCaseCommentName)

  matchCaseFromProjectCaseCommentName 
 ( 
 projectCaseCommentName 
 : 
  
 string 
 ) 
 : 
  
 string 
  
 | 
  
 number 
 ; 
 

Parse the case from ProjectCaseComment resource.

Parameter
Name
Description
projectCaseCommentName
string

A fully-qualified path representing project_case_comment resource.

Returns
Type
Description
string | number

{string} A string representing the case.

matchCaseFromProjectCaseName(projectCaseName)

  matchCaseFromProjectCaseName 
 ( 
 projectCaseName 
 : 
  
 string 
 ) 
 : 
  
 string 
  
 | 
  
 number 
 ; 
 

Parse the case from ProjectCase resource.

Parameter
Name
Description
projectCaseName
string

A fully-qualified path representing project_case resource.

Returns
Type
Description
string | number

{string} A string representing the case.

matchCommentFromOrganizationCaseCommentName(organizationCaseCommentName)

  matchCommentFromOrganizationCaseCommentName 
 ( 
 organizationCaseCommentName 
 : 
  
 string 
 ) 
 : 
  
 string 
  
 | 
  
 number 
 ; 
 

Parse the comment from OrganizationCaseComment resource.

Parameter
Name
Description
organizationCaseCommentName
string

A fully-qualified path representing organization_case_comment resource.

Returns
Type
Description
string | number

{string} A string representing the comment.

matchCommentFromProjectCaseCommentName(projectCaseCommentName)

  matchCommentFromProjectCaseCommentName 
 ( 
 projectCaseCommentName 
 : 
  
 string 
 ) 
 : 
  
 string 
  
 | 
  
 number 
 ; 
 

Parse the comment from ProjectCaseComment resource.

Parameter
Name
Description
projectCaseCommentName
string

A fully-qualified path representing project_case_comment resource.

Returns
Type
Description
string | number

{string} A string representing the comment.

matchOrganizationFromOrganizationCaseAttachmentIdName(organizationCaseAttachmentIdName)

  matchOrganizationFromOrganizationCaseAttachmentIdName 
 ( 
 organizationCaseAttachmentIdName 
 : 
  
 string 
 ) 
 : 
  
 string 
  
 | 
  
 number 
 ; 
 

Parse the organization from OrganizationCaseAttachmentId resource.

Parameter
Name
Description
organizationCaseAttachmentIdName
string

A fully-qualified path representing organization_case_attachment_id resource.

Returns
Type
Description
string | number

{string} A string representing the organization.

matchOrganizationFromOrganizationCaseCommentName(organizationCaseCommentName)

  matchOrganizationFromOrganizationCaseCommentName 
 ( 
 organizationCaseCommentName 
 : 
  
 string 
 ) 
 : 
  
 string 
  
 | 
  
 number 
 ; 
 

Parse the organization from OrganizationCaseComment resource.

Parameter
Name
Description
organizationCaseCommentName
string

A fully-qualified path representing organization_case_comment resource.

Returns
Type
Description
string | number

{string} A string representing the organization.

matchOrganizationFromOrganizationCaseName(organizationCaseName)

  matchOrganizationFromOrganizationCaseName 
 ( 
 organizationCaseName 
 : 
  
 string 
 ) 
 : 
  
 string 
  
 | 
  
 number 
 ; 
 

Parse the organization from OrganizationCase resource.

Parameter
Name
Description
organizationCaseName
string

A fully-qualified path representing organization_case resource.

Returns
Type
Description
string | number

{string} A string representing the organization.

matchOrganizationFromOrganizationName(organizationName)

  matchOrganizationFromOrganizationName 
 ( 
 organizationName 
 : 
  
 string 
 ) 
 : 
  
 string 
  
 | 
  
 number 
 ; 
 

Parse the organization from Organization resource.

Parameter
Name
Description
organizationName
string

A fully-qualified path representing Organization resource.

Returns
Type
Description
string | number

{string} A string representing the organization.

matchProjectFromProjectCaseAttachmentIdName(projectCaseAttachmentIdName)

  matchProjectFromProjectCaseAttachmentIdName 
 ( 
 projectCaseAttachmentIdName 
 : 
  
 string 
 ) 
 : 
  
 string 
  
 | 
  
 number 
 ; 
 

Parse the project from ProjectCaseAttachmentId resource.

Parameter
Name
Description
projectCaseAttachmentIdName
string

A fully-qualified path representing project_case_attachment_id resource.

Returns
Type
Description
string | number

{string} A string representing the project.

matchProjectFromProjectCaseCommentName(projectCaseCommentName)

  matchProjectFromProjectCaseCommentName 
 ( 
 projectCaseCommentName 
 : 
  
 string 
 ) 
 : 
  
 string 
  
 | 
  
 number 
 ; 
 

Parse the project from ProjectCaseComment resource.

Parameter
Name
Description
projectCaseCommentName
string

A fully-qualified path representing project_case_comment resource.

Returns
Type
Description
string | number

{string} A string representing the project.

matchProjectFromProjectCaseName(projectCaseName)

  matchProjectFromProjectCaseName 
 ( 
 projectCaseName 
 : 
  
 string 
 ) 
 : 
  
 string 
  
 | 
  
 number 
 ; 
 

Parse the project from ProjectCase resource.

Parameter
Name
Description
projectCaseName
string

A fully-qualified path representing project_case resource.

Returns
Type
Description
string | number

{string} A string representing the project.

organizationCaseAttachmentIdPath(organization, caseParam, attachmentId)

  organizationCaseAttachmentIdPath 
 ( 
 organization 
 : 
  
 string 
 , 
  
 caseParam 
 : 
  
 string 
 , 
  
 attachmentId 
 : 
  
 string 
 ) 
 : 
  
 string 
 ; 
 

Return a fully-qualified organizationCaseAttachmentId resource name string.

Parameters
Name
Description
organization
string
caseParam
string
attachmentId
string
Returns
Type
Description
string

{string} Resource name string.

organizationCaseCommentPath(organization, caseParam, comment)

  organizationCaseCommentPath 
 ( 
 organization 
 : 
  
 string 
 , 
  
 caseParam 
 : 
  
 string 
 , 
  
 comment 
 : 
  
 string 
 ) 
 : 
  
 string 
 ; 
 

Return a fully-qualified organizationCaseComment resource name string.

Parameters
Name
Description
organization
string
caseParam
string
comment
string
Returns
Type
Description
string

{string} Resource name string.

organizationCasePath(organization, caseParam)

  organizationCasePath 
 ( 
 organization 
 : 
  
 string 
 , 
  
 caseParam 
 : 
  
 string 
 ) 
 : 
  
 string 
 ; 
 

Return a fully-qualified organizationCase resource name string.

Parameters
Name
Description
organization
string
caseParam
string
Returns
Type
Description
string

{string} Resource name string.

organizationPath(organization)

  organizationPath 
 ( 
 organization 
 : 
  
 string 
 ) 
 : 
  
 string 
 ; 
 

Return a fully-qualified organization resource name string.

Parameter
Name
Description
organization
string
Returns
Type
Description
string

{string} Resource name string.

projectCaseAttachmentIdPath(project, caseParam, attachmentId)

  projectCaseAttachmentIdPath 
 ( 
 project 
 : 
  
 string 
 , 
  
 caseParam 
 : 
  
 string 
 , 
  
 attachmentId 
 : 
  
 string 
 ) 
 : 
  
 string 
 ; 
 

Return a fully-qualified projectCaseAttachmentId resource name string.

Parameters
Name
Description
project
string
caseParam
string
attachmentId
string
Returns
Type
Description
string

{string} Resource name string.

projectCaseCommentPath(project, caseParam, comment)

  projectCaseCommentPath 
 ( 
 project 
 : 
  
 string 
 , 
  
 caseParam 
 : 
  
 string 
 , 
  
 comment 
 : 
  
 string 
 ) 
 : 
  
 string 
 ; 
 

Return a fully-qualified projectCaseComment resource name string.

Parameters
Name
Description
project
string
caseParam
string
comment
string
Returns
Type
Description
string

{string} Resource name string.

projectCasePath(project, caseParam)

  projectCasePath 
 ( 
 project 
 : 
  
 string 
 , 
  
 caseParam 
 : 
  
 string 
 ) 
 : 
  
 string 
 ; 
 

Return a fully-qualified projectCase resource name string.

Parameters
Name
Description
project
string
caseParam
string
Returns
Type
Description
string

{string} Resource name string.

searchCaseClassifications(request, options)

  searchCaseClassifications 
 ( 
 request 
 ?: 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 support 
 . 
 v2 
 . 
 ISearchCaseClassificationsRequest 
 , 
  
 options 
 ?: 
  
 CallOptions 
 ) 
 : 
  
 Promise 
< [ 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 support 
 . 
 v2 
 . 
 ICaseClassification 
 [], 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 support 
 . 
 v2 
 . 
 ISearchCaseClassificationsRequest 
  
 | 
  
 null 
 , 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 support 
 . 
 v2 
 . 
 ISearchCaseClassificationsResponse 
  
 ]>; 
 

Retrieve valid classifications to be used when creating a support case. The classications are hierarchical, with each classification containing all levels of the hierarchy, separated by " > ". For example "Technical Issue > Compute > Compute Engine".

Parameters
Name
Description
request
ISearchCaseClassificationsRequest

The request object that will be sent.

options
CallOptions

Call options. See CallOptions for more details.

Returns
Type
Description

{Promise} - The promise which resolves to an array. The first element of the array is Array of CaseClassification . 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 searchCaseClassificationsAsync() method described below for async iteration which you can stop as needed. Please see the documentation for more details and examples.

searchCaseClassifications(request, options, callback)

  searchCaseClassifications 
 ( 
 request 
 : 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 support 
 . 
 v2 
 . 
 ISearchCaseClassificationsRequest 
 , 
  
 options 
 : 
  
 CallOptions 
 , 
  
 callback 
 : 
  
 PaginationCallback<protos 
 . 
 google 
 . 
 cloud 
 . 
 support 
 . 
 v2 
 . 
 ISearchCaseClassificationsRequest 
 , 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 support 
 . 
 v2 
 . 
 ISearchCaseClassificationsResponse 
  
 | 
  
 null 
  
 | 
  
 undefined 
 , 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 support 
 . 
 v2 
 . 
 ICaseClassification 
> ) 
 : 
  
 void 
 ; 
 
Returns
Type
Description
void

searchCaseClassifications(request, callback)

  searchCaseClassifications 
 ( 
 request 
 : 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 support 
 . 
 v2 
 . 
 ISearchCaseClassificationsRequest 
 , 
  
 callback 
 : 
  
 PaginationCallback<protos 
 . 
 google 
 . 
 cloud 
 . 
 support 
 . 
 v2 
 . 
 ISearchCaseClassificationsRequest 
 , 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 support 
 . 
 v2 
 . 
 ISearchCaseClassificationsResponse 
  
 | 
  
 null 
  
 | 
  
 undefined 
 , 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 support 
 . 
 v2 
 . 
 ICaseClassification 
> ) 
 : 
  
 void 
 ; 
 
Returns
Type
Description
void

searchCaseClassificationsAsync(request, options)

  searchCaseClassificationsAsync 
 ( 
 request 
 ?: 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 support 
 . 
 v2 
 . 
 ISearchCaseClassificationsRequest 
 , 
  
 options 
 ?: 
  
 CallOptions 
 ) 
 : 
  
 AsyncIterable<protos 
 . 
 google 
 . 
 cloud 
 . 
 support 
 . 
 v2 
 . 
 ICaseClassification 
> ; 
 

Equivalent to searchCaseClassifications , but returns an iterable object.

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

Parameters
Name
Description
request
ISearchCaseClassificationsRequest

The request object that will be sent.

options
CallOptions

Call options. See CallOptions for more details.

Returns
Type
Description

{Object} An iterable Object that allows async iteration . When you iterate the returned iterable, each element will be an object representing CaseClassification . 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.

Example
   
 /** 
 * 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. 
 */ 
  
 /** 
 *  An expression written in the Google Cloud filter language. If non-empty, 
 *  then only cases whose fields match the filter are returned. If empty, then 
 *  no messages are filtered out. 
 */ 
  
 // const query = 'abc123' 
  
 /** 
 *  The maximum number of cases fetched with each request. 
 */ 
  
 // const pageSize = 1234 
  
 /** 
 *  A token identifying the page of results to return. If unspecified, the 
 *  first page is retrieved. 
 */ 
  
 // const pageToken = 'abc123' 
  
 // Imports the Support library 
  
 const 
  
 { 
 CaseServiceClient 
 } 
  
 = 
  
 require 
 ( 
 ' @google-cloud/support 
' 
 ). 
 v2 
 ; 
  
 // Instantiates a client 
  
 const 
  
 supportClient 
  
 = 
  
 new 
  
  CaseServiceClient 
 
 (); 
  
 async 
  
 function 
  
 callSearchCaseClassifications 
 () 
  
 { 
  
 // Construct request 
  
 const 
  
 request 
  
 = 
  
 { 
  
 }; 
  
 // Run request 
  
 const 
  
 iterable 
  
 = 
  
 await 
  
 supportClient 
 . 
  searchCaseClassificationsAsync 
 
 ( 
 request 
 ); 
  
 for 
  
 await 
  
 ( 
 const 
  
 response 
  
 of 
  
 iterable 
 ) 
  
 { 
  
 console 
 . 
 log 
 ( 
 response 
 ); 
  
 } 
  
 } 
  
 callSearchCaseClassifications 
 (); 
 

searchCaseClassificationsStream(request, options)

  searchCaseClassificationsStream 
 ( 
 request 
 ?: 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 support 
 . 
 v2 
 . 
 ISearchCaseClassificationsRequest 
 , 
  
 options 
 ?: 
  
 CallOptions 
 ) 
 : 
  
 Transform 
 ; 
 

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

Parameters
Name
Description
request
ISearchCaseClassificationsRequest

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 CaseClassification 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 searchCaseClassificationsAsync() method described below for async iteration which you can stop as needed. Please see the documentation for more details and examples.

searchCases(request, options)

  searchCases 
 ( 
 request 
 ?: 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 support 
 . 
 v2 
 . 
 ISearchCasesRequest 
 , 
  
 options 
 ?: 
  
 CallOptions 
 ) 
 : 
  
 Promise 
< [ 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 support 
 . 
 v2 
 . 
 ICase 
 [], 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 support 
 . 
 v2 
 . 
 ISearchCasesRequest 
  
 | 
  
 null 
 , 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 support 
 . 
 v2 
 . 
 ISearchCasesResponse 
  
 ]>; 
 

Search cases using the specified query.

Parameters
Name
Description
request
ISearchCasesRequest

The request object that will be sent.

options
CallOptions

Call options. See CallOptions for more details.

Returns
Type
Description

{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 searchCasesAsync() method described below for async iteration which you can stop as needed. Please see the documentation for more details and examples.

searchCases(request, options, callback)

  searchCases 
 ( 
 request 
 : 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 support 
 . 
 v2 
 . 
 ISearchCasesRequest 
 , 
  
 options 
 : 
  
 CallOptions 
 , 
  
 callback 
 : 
  
 PaginationCallback<protos 
 . 
 google 
 . 
 cloud 
 . 
 support 
 . 
 v2 
 . 
 ISearchCasesRequest 
 , 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 support 
 . 
 v2 
 . 
 ISearchCasesResponse 
  
 | 
  
 null 
  
 | 
  
 undefined 
 , 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 support 
 . 
 v2 
 . 
 ICase 
> ) 
 : 
  
 void 
 ; 
 
Parameters
Name
Description
options
CallOptions
Returns
Type
Description
void

searchCases(request, callback)

  searchCases 
 ( 
 request 
 : 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 support 
 . 
 v2 
 . 
 ISearchCasesRequest 
 , 
  
 callback 
 : 
  
 PaginationCallback<protos 
 . 
 google 
 . 
 cloud 
 . 
 support 
 . 
 v2 
 . 
 ISearchCasesRequest 
 , 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 support 
 . 
 v2 
 . 
 ISearchCasesResponse 
  
 | 
  
 null 
  
 | 
  
 undefined 
 , 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 support 
 . 
 v2 
 . 
 ICase 
> ) 
 : 
  
 void 
 ; 
 
Returns
Type
Description
void

searchCasesAsync(request, options)

  searchCasesAsync 
 ( 
 request 
 ?: 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 support 
 . 
 v2 
 . 
 ISearchCasesRequest 
 , 
  
 options 
 ?: 
  
 CallOptions 
 ) 
 : 
  
 AsyncIterable<protos 
 . 
 google 
 . 
 cloud 
 . 
 support 
 . 
 v2 
 . 
 ICase 
> ; 
 

Equivalent to searchCases , but returns an iterable object.

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

Parameters
Name
Description
request
ISearchCasesRequest

The request object that will be sent.

options
CallOptions

Call options. See CallOptions for more details.

Returns
Type
Description

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

Example
   
 /** 
 * 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. 
 */ 
  
 /** 
 *  The fully qualified name of parent resource to search cases under. 
 */ 
  
 // const parent = 'abc123' 
  
 /** 
  
 * 
  
 An 
  
 expression 
  
 written 
  
 in 
  
 filter 
  
 language 
 . 
  
 * 
  
 A 
  
 query 
  
 uses 
  
 the 
  
 following 
  
 fields 
  
 with 
  
 the 
  
 operators 
  
 equals 
  
 ( 
 `=` 
 ) 
  
 and 
  
 * 
  
 `AND` 
 : 
  
 * 
  
 - 
  
 `organization` 
 : 
  
 An 
  
 organization 
  
 name 
  
 in 
  
 the 
  
 form 
  
 * 
  
 `organizations/ 
 

searchCasesStream(request, options)

  searchCasesStream 
 ( 
 request 
 ?: 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 support 
 . 
 v2 
 . 
 ISearchCasesRequest 
 , 
  
 options 
 ?: 
  
 CallOptions 
 ) 
 : 
  
 Transform 
 ; 
 

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

Parameters
Name
Description
request
ISearchCasesRequest

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 searchCasesAsync() method described below for async iteration which you can stop as needed. Please see the documentation for more details and examples.

updateCase(request, options)

  updateCase 
 ( 
 request 
 ?: 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 support 
 . 
 v2 
 . 
 IUpdateCaseRequest 
 , 
  
 options 
 ?: 
  
 CallOptions 
 ) 
 : 
  
 Promise 
< [ 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 support 
 . 
 v2 
 . 
 ICase 
 , 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 support 
 . 
 v2 
 . 
 IUpdateCaseRequest 
  
 | 
  
 undefined 
 , 
  
 {} 
  
 | 
  
 undefined 
  
 ]>; 
 

Update the specified case. Only a subset of fields can be updated.

Parameters
Name
Description
request
IUpdateCaseRequest

The request object that will be sent.

options
CallOptions

Call options. See CallOptions for more details.

Returns
Type
Description

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

Example
   
 /** 
 * 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 case object to update. 
 */ 
  
 // const case = {} 
  
 /** 
 *  A list of attributes of the case object that should be updated 
 *  as part of this request. Supported values are `priority`, `display_name`, 
 *  and `subscriber_email_addresses`. If no fields are specified, all supported 
 *  fields are updated. 
 *  WARNING: If you do not provide a field mask, then you might accidentally 
 *  clear some fields. For example, if you leave the field mask empty and do 
 *  not provide a value for `subscriber_email_addresses`, then 
 *  `subscriber_email_addresses` is updated to empty. 
 */ 
  
 // const updateMask = {} 
  
 // Imports the Support library 
  
 const 
  
 { 
 CaseServiceClient 
 } 
  
 = 
  
 require 
 ( 
 ' @google-cloud/support 
' 
 ). 
 v2 
 ; 
  
 // Instantiates a client 
  
 const 
  
 supportClient 
  
 = 
  
 new 
  
  CaseServiceClient 
 
 (); 
  
 async 
  
 function 
  
 callUpdateCase 
 () 
  
 { 
  
 // Construct request 
  
 const 
  
 request 
  
 = 
  
 { 
  
 case 
 , 
  
 }; 
  
 // Run request 
  
 const 
  
 response 
  
 = 
  
 await 
  
 supportClient 
 . 
 updateCase 
 ( 
 request 
 ); 
  
 console 
 . 
 log 
 ( 
 response 
 ); 
  
 } 
  
 callUpdateCase 
 (); 
 

updateCase(request, options, callback)

  updateCase 
 ( 
 request 
 : 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 support 
 . 
 v2 
 . 
 IUpdateCaseRequest 
 , 
  
 options 
 : 
  
 CallOptions 
 , 
  
 callback 
 : 
  
 Callback<protos 
 . 
 google 
 . 
 cloud 
 . 
 support 
 . 
 v2 
 . 
 ICase 
 , 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 support 
 . 
 v2 
 . 
 IUpdateCaseRequest 
  
 | 
  
 null 
  
 | 
  
 undefined 
 , 
  
 {} 
  
 | 
  
 null 
  
 | 
  
 undefined 
> ) 
 : 
  
 void 
 ; 
 
Parameters
Name
Description
options
CallOptions
callback
Callback < protos.google.cloud.support.v2.ICase , protos.google.cloud.support.v2.IUpdateCaseRequest | null | undefined, {} | null | undefined>
Returns
Type
Description
void

updateCase(request, callback)

  updateCase 
 ( 
 request 
 : 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 support 
 . 
 v2 
 . 
 IUpdateCaseRequest 
 , 
  
 callback 
 : 
  
 Callback<protos 
 . 
 google 
 . 
 cloud 
 . 
 support 
 . 
 v2 
 . 
 ICase 
 , 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 support 
 . 
 v2 
 . 
 IUpdateCaseRequest 
  
 | 
  
 null 
  
 | 
  
 undefined 
 , 
  
 {} 
  
 | 
  
 null 
  
 | 
  
 undefined 
> ) 
 : 
  
 void 
 ; 
 
Parameters
Name
Description
callback
Callback < protos.google.cloud.support.v2.ICase , protos.google.cloud.support.v2.IUpdateCaseRequest | null | undefined, {} | null | undefined>
Returns
Type
Description
void
Design a Mobile Site
View Site in Mobile | Classic
Share by: