A service to manage Google Cloud support cases. v2
Package
@google-cloud/supportConstructors
(constructor)(opts, gaxInstance)
constructor
(
opts
?:
ClientOptions
,
gaxInstance
?:
typeof
gax
|
typeof
gax
.
fallback
);
Construct an instance of CaseServiceClient.
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.
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.
request
options
Promise
<[ protos.google.cloud.support.v2.ICase
, protos.google.cloud.support.v2.ICloseCaseRequest
| 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.
/**
* 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
;
request
options
CallOptions
callback
Callback
< protos.google.cloud.support.v2.ICase
, protos.google.cloud.support.v2.ICloseCaseRequest
| null | undefined, {} | null | undefined>
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
;
request
callback
Callback
< protos.google.cloud.support.v2.ICase
, protos.google.cloud.support.v2.ICloseCaseRequest
| null | undefined, {} | null | undefined>
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
.
request
options
Promise
<[ protos.google.cloud.support.v2.ICase
, protos.google.cloud.support.v2.ICreateCaseRequest
| 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.
/**
* 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
;
request
options
CallOptions
callback
Callback
< protos.google.cloud.support.v2.ICase
, protos.google.cloud.support.v2.ICreateCaseRequest
| null | undefined, {} | null | undefined>
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
;
request
callback
Callback
< protos.google.cloud.support.v2.ICase
, protos.google.cloud.support.v2.ICreateCaseRequest
| null | undefined, {} | null | undefined>
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.
request
options
Promise
<[ protos.google.cloud.support.v2.ICase
, protos.google.cloud.support.v2.IEscalateCaseRequest
| 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.
/**
* 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
;
request
options
CallOptions
callback
Callback
< protos.google.cloud.support.v2.ICase
, protos.google.cloud.support.v2.IEscalateCaseRequest
| null | undefined, {} | null | undefined>
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
;
request
callback
Callback
< protos.google.cloud.support.v2.ICase
, protos.google.cloud.support.v2.IEscalateCaseRequest
| null | undefined, {} | null | undefined>
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.
request
options
Promise
<[ protos.google.cloud.support.v2.ICase
, protos.google.cloud.support.v2.IGetCaseRequest
| 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.
/**
* 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
;
request
options
CallOptions
callback
Callback
< protos.google.cloud.support.v2.ICase
, protos.google.cloud.support.v2.IGetCaseRequest
| null | undefined, {} | null | undefined>
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
;
request
callback
Callback
< protos.google.cloud.support.v2.ICase
, protos.google.cloud.support.v2.IGetCaseRequest
| null | undefined, {} | null | undefined>
void
getProjectId()
getProjectId
()
:
Promise<string>
;
Promise
<string>
getProjectId(callback)
getProjectId
(
callback
:
Callback<string
,
undefined
,
undefined
> )
:
void
;
callback
Callback
<string, undefined, undefined>
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.
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
.
request
options
Promise
<[ protos.google.cloud.support.v2.ICase
[], protos.google.cloud.support.v2.IListCasesRequest
| null, protos.google.cloud.support.v2.IListCasesResponse
]>
{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
;
request
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
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
;
request
callback
PaginationCallback
< protos.google.cloud.support.v2.IListCasesRequest
, protos.google.cloud.support.v2.IListCasesResponse
| null | undefined, protos.google.cloud.support.v2.ICase
>
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.
request
options
AsyncIterable
< protos.google.cloud.support.v2.ICase
>
{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.
/**
* 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.
request
options
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.
organizationCaseAttachmentIdName
string
A fully-qualified path representing organization_case_attachment_id resource.
string | number
{string} A string representing the attachment_id.
matchAttachmentIdFromProjectCaseAttachmentIdName(projectCaseAttachmentIdName)
matchAttachmentIdFromProjectCaseAttachmentIdName
(
projectCaseAttachmentIdName
:
string
)
:
string
|
number
;
Parse the attachment_id from ProjectCaseAttachmentId resource.
projectCaseAttachmentIdName
string
A fully-qualified path representing project_case_attachment_id resource.
string | number
{string} A string representing the attachment_id.
matchCaseFromOrganizationCaseAttachmentIdName(organizationCaseAttachmentIdName)
matchCaseFromOrganizationCaseAttachmentIdName
(
organizationCaseAttachmentIdName
:
string
)
:
string
|
number
;
Parse the case from OrganizationCaseAttachmentId resource.
organizationCaseAttachmentIdName
string
A fully-qualified path representing organization_case_attachment_id resource.
string | number
{string} A string representing the case.
matchCaseFromOrganizationCaseCommentName(organizationCaseCommentName)
matchCaseFromOrganizationCaseCommentName
(
organizationCaseCommentName
:
string
)
:
string
|
number
;
Parse the case from OrganizationCaseComment resource.
organizationCaseCommentName
string
A fully-qualified path representing organization_case_comment resource.
string | number
{string} A string representing the case.
matchCaseFromOrganizationCaseName(organizationCaseName)
matchCaseFromOrganizationCaseName
(
organizationCaseName
:
string
)
:
string
|
number
;
Parse the case from OrganizationCase resource.
organizationCaseName
string
A fully-qualified path representing organization_case resource.
string | number
{string} A string representing the case.
matchCaseFromProjectCaseAttachmentIdName(projectCaseAttachmentIdName)
matchCaseFromProjectCaseAttachmentIdName
(
projectCaseAttachmentIdName
:
string
)
:
string
|
number
;
Parse the case from ProjectCaseAttachmentId resource.
projectCaseAttachmentIdName
string
A fully-qualified path representing project_case_attachment_id resource.
string | number
{string} A string representing the case.
matchCaseFromProjectCaseCommentName(projectCaseCommentName)
matchCaseFromProjectCaseCommentName
(
projectCaseCommentName
:
string
)
:
string
|
number
;
Parse the case from ProjectCaseComment resource.
projectCaseCommentName
string
A fully-qualified path representing project_case_comment resource.
string | number
{string} A string representing the case.
matchCaseFromProjectCaseName(projectCaseName)
matchCaseFromProjectCaseName
(
projectCaseName
:
string
)
:
string
|
number
;
Parse the case from ProjectCase resource.
projectCaseName
string
A fully-qualified path representing project_case resource.
string | number
{string} A string representing the case.
matchCommentFromOrganizationCaseCommentName(organizationCaseCommentName)
matchCommentFromOrganizationCaseCommentName
(
organizationCaseCommentName
:
string
)
:
string
|
number
;
Parse the comment from OrganizationCaseComment resource.
organizationCaseCommentName
string
A fully-qualified path representing organization_case_comment resource.
string | number
{string} A string representing the comment.
matchCommentFromProjectCaseCommentName(projectCaseCommentName)
matchCommentFromProjectCaseCommentName
(
projectCaseCommentName
:
string
)
:
string
|
number
;
Parse the comment from ProjectCaseComment resource.
projectCaseCommentName
string
A fully-qualified path representing project_case_comment resource.
string | number
{string} A string representing the comment.
matchOrganizationFromOrganizationCaseAttachmentIdName(organizationCaseAttachmentIdName)
matchOrganizationFromOrganizationCaseAttachmentIdName
(
organizationCaseAttachmentIdName
:
string
)
:
string
|
number
;
Parse the organization from OrganizationCaseAttachmentId resource.
organizationCaseAttachmentIdName
string
A fully-qualified path representing organization_case_attachment_id resource.
string | number
{string} A string representing the organization.
matchOrganizationFromOrganizationCaseCommentName(organizationCaseCommentName)
matchOrganizationFromOrganizationCaseCommentName
(
organizationCaseCommentName
:
string
)
:
string
|
number
;
Parse the organization from OrganizationCaseComment resource.
organizationCaseCommentName
string
A fully-qualified path representing organization_case_comment resource.
string | number
{string} A string representing the organization.
matchOrganizationFromOrganizationCaseName(organizationCaseName)
matchOrganizationFromOrganizationCaseName
(
organizationCaseName
:
string
)
:
string
|
number
;
Parse the organization from OrganizationCase resource.
organizationCaseName
string
A fully-qualified path representing organization_case resource.
string | number
{string} A string representing the organization.
matchOrganizationFromOrganizationName(organizationName)
matchOrganizationFromOrganizationName
(
organizationName
:
string
)
:
string
|
number
;
Parse the organization from Organization resource.
organizationName
string
A fully-qualified path representing Organization resource.
string | number
{string} A string representing the organization.
matchProjectFromProjectCaseAttachmentIdName(projectCaseAttachmentIdName)
matchProjectFromProjectCaseAttachmentIdName
(
projectCaseAttachmentIdName
:
string
)
:
string
|
number
;
Parse the project from ProjectCaseAttachmentId resource.
projectCaseAttachmentIdName
string
A fully-qualified path representing project_case_attachment_id resource.
string | number
{string} A string representing the project.
matchProjectFromProjectCaseCommentName(projectCaseCommentName)
matchProjectFromProjectCaseCommentName
(
projectCaseCommentName
:
string
)
:
string
|
number
;
Parse the project from ProjectCaseComment resource.
projectCaseCommentName
string
A fully-qualified path representing project_case_comment resource.
string | number
{string} A string representing the project.
matchProjectFromProjectCaseName(projectCaseName)
matchProjectFromProjectCaseName
(
projectCaseName
:
string
)
:
string
|
number
;
Parse the project from ProjectCase resource.
projectCaseName
string
A fully-qualified path representing project_case resource.
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.
organization
string
caseParam
string
attachmentId
string
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.
organization
string
caseParam
string
comment
string
string
{string} Resource name string.
organizationCasePath(organization, caseParam)
organizationCasePath
(
organization
:
string
,
caseParam
:
string
)
:
string
;
Return a fully-qualified organizationCase resource name string.
organization
string
caseParam
string
string
{string} Resource name string.
organizationPath(organization)
organizationPath
(
organization
:
string
)
:
string
;
Return a fully-qualified organization resource name string.
organization
string
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.
project
string
caseParam
string
attachmentId
string
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.
project
string
caseParam
string
comment
string
string
{string} Resource name string.
projectCasePath(project, caseParam)
projectCasePath
(
project
:
string
,
caseParam
:
string
)
:
string
;
Return a fully-qualified projectCase resource name string.
project
string
caseParam
string
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".
request
options
Promise
<[ protos.google.cloud.support.v2.ICaseClassification
[], protos.google.cloud.support.v2.ISearchCaseClassificationsRequest
| null, protos.google.cloud.support.v2.ISearchCaseClassificationsResponse
]>
{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
;
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
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
;
callback
PaginationCallback
< protos.google.cloud.support.v2.ISearchCaseClassificationsRequest
, protos.google.cloud.support.v2.ISearchCaseClassificationsResponse
| null | undefined, protos.google.cloud.support.v2.ICaseClassification
>
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.
request
options
AsyncIterable
< protos.google.cloud.support.v2.ICaseClassification
>
{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.
/**
* 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.
request
options
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.
request
options
Promise
<[ protos.google.cloud.support.v2.ICase
[], protos.google.cloud.support.v2.ISearchCasesRequest
| null, protos.google.cloud.support.v2.ISearchCasesResponse
]>
{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
;
request
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
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
;
request
callback
PaginationCallback
< protos.google.cloud.support.v2.ISearchCasesRequest
, protos.google.cloud.support.v2.ISearchCasesResponse
| null | undefined, protos.google.cloud.support.v2.ICase
>
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.
request
options
AsyncIterable
< protos.google.cloud.support.v2.ICase
>
{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.
/**
* 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.
request
options
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.
request
options
Promise
<[ protos.google.cloud.support.v2.ICase
, protos.google.cloud.support.v2.IUpdateCaseRequest
| 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.
/**
* 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
;
request
options
CallOptions
callback
Callback
< protos.google.cloud.support.v2.ICase
, protos.google.cloud.support.v2.IUpdateCaseRequest
| null | undefined, {} | null | undefined>
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
;
request
callback
Callback
< protos.google.cloud.support.v2.ICase
, protos.google.cloud.support.v2.IUpdateCaseRequest
| null | undefined, {} | null | undefined>
void