pub struct CaseService { /* private fields */ }Expand description
Implements a client for the Google Cloud Support API.
§Example
let client = CaseService::builder().build().await?;
// use `client` to make requests to the Google Cloud Support API.§Service Description
A service to manage Google Cloud support cases.
§Configuration
To configure CaseService use the with_* methods in the type returned
by builder(). The default configuration should
work for most applications. Common configuration changes include
- with_endpoint(): by default this client uses the global default endpoint
(
https://cloudsupport.googleapis.com). Applications using regional endpoints or running in restricted networks (e.g. a network configured override this default. - with_credentials(): by default this client uses Application Default Credentials. Applications using custom authentication may need to override this default.
§Pooling and Cloning
CaseService holds a connection pool internally, it is advised to
create one and the reuse it. You do not need to wrap CaseService in
an Rc or Arc to reuse it, because it
already uses an Arc internally.
Implementations§
Source§impl CaseService
impl CaseService
Sourcepub fn builder() -> ClientBuilder
pub fn builder() -> ClientBuilder
Returns a builder for CaseService.
let client = CaseService::builder().build().await?;Sourcepub fn from_stub<T>(stub: T) -> Selfwhere
T: CaseService + 'static,
pub fn from_stub<T>(stub: T) -> Selfwhere
T: CaseService + 'static,
Creates a new client from the provided stub.
The most common case for calling this function is in tests mocking the client’s behavior.
Sourcepub fn list_cases(&self) -> ListCases
pub fn list_cases(&self) -> ListCases
Retrieve all cases under a parent, but not its children.
For example, listing cases under an organization only returns the cases
that are directly parented by that organization. To retrieve cases
under an organization and its projects, use cases.search.
Sourcepub fn search_cases(&self) -> SearchCases
pub fn search_cases(&self) -> SearchCases
Search for cases using a query.
Sourcepub fn create_case(&self) -> CreateCase
pub fn create_case(&self) -> CreateCase
Create a new case and associate it with a parent.
It must have the following fields set: display_name, description,
classification, and priority. If you’re just testing the API and don’t
want to route your case to an agent, set testCase=true.
Sourcepub fn update_case(&self) -> UpdateCase
pub fn update_case(&self) -> UpdateCase
Update a case. Only some fields can be updated.
Sourcepub fn escalate_case(&self) -> EscalateCase
pub fn escalate_case(&self) -> EscalateCase
Escalate a case, starting the Google Cloud Support escalation management process.
This operation is only available for some support services. Go to https://cloud.google.com/support and look for ‘Technical support escalations’ in the feature list to find out which ones let you do that.
Sourcepub fn close_case(&self) -> CloseCase
pub fn close_case(&self) -> CloseCase
Close a case.
Sourcepub fn search_case_classifications(&self) -> SearchCaseClassifications
pub fn search_case_classifications(&self) -> SearchCaseClassifications
Retrieve valid classifications to use when creating a support case.
Classifications are hierarchical. Each classification is a string
containing all levels of the hierarchy separated by " > ". For example,
"Technical Issue > Compute > Compute Engine".
Classification IDs returned by this endpoint are valid for at least six
months. When a classification is deactivated, this endpoint immediately
stops returning it. After six months, case.create requests using the
classification will fail.
Trait Implementations§
Source§impl Clone for CaseService
impl Clone for CaseService
Source§fn clone(&self) -> CaseService
fn clone(&self) -> CaseService
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more