Reference documentation and code samples for the Google Cloud Support V2 API class Google::Cloud::Support::V2::CaseService::Client.
Client for the CaseService service.
A service to manage Google Cloud support cases.
Inherits
- Object
Methods
.configure
def self.configure() { |config| ... } -> Client::Configuration
Configure the CaseService Client class.
See Configuration for a description of the configuration fields.
- (config) — Configure the Client client.
- config (Client::Configuration)
# Modify the configuration for all CaseService clients ::Google::Cloud::Support::V2::CaseService::Client.configure do |config| config.timeout = 10.0 end
#close_case
def close_case(request, options = nil) -> ::Google::Cloud::Support::V2::Case
def close_case(name: nil) -> ::Google::Cloud::Support::V2::Case
Close a case.
def close_case(request, options = nil) -> ::Google::Cloud::Support::V2::Case
close_case
via a request object, either of type
Google::Cloud::Support::V2::CloseCaseRequest or an equivalent Hash.
- request (::Google::Cloud::Support::V2::CloseCaseRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def close_case(name: nil) -> ::Google::Cloud::Support::V2::Case
close_case
via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
- name (::String) — Required. The name of the case to close.
- (response, operation) — Access the result along with the RPC operation
- response (::Google::Cloud::Support::V2::Case)
- operation (::GRPC::ActiveCall::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/support/v2" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Support::V2::CaseService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Support::V2::CloseCaseRequest.new # Call the close_case method. result = client.close_case request # The returned object is of type Google::Cloud::Support::V2::Case. p result
#configure
def configure() { |config| ... } -> Client::Configuration
Configure the CaseService Client instance.
The configuration is set to the derived mode, meaning that values can be changed, but structural changes (adding new fields, etc.) are not allowed. Structural changes should be made on Client.configure.
See Configuration for a description of the configuration fields.
- (config) — Configure the Client client.
- config (Client::Configuration)
#create_case
def create_case(request, options = nil) -> ::Google::Cloud::Support::V2::Case
def create_case(parent: nil, case: nil) -> ::Google::Cloud::Support::V2::Case
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
.
def create_case(request, options = nil) -> ::Google::Cloud::Support::V2::Case
create_case
via a request object, either of type
Google::Cloud::Support::V2::CreateCaseRequest or an equivalent Hash.
- request (::Google::Cloud::Support::V2::CreateCaseRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def create_case(parent: nil, case: nil) -> ::Google::Cloud::Support::V2::Case
create_case
via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
- parent (::String) — Required. The name of the parent under which the case should be created.
- case (::Google::Cloud::Support::V2::Case, ::Hash) — Required. The case to be created.
- (response, operation) — Access the result along with the RPC operation
- response (::Google::Cloud::Support::V2::Case)
- operation (::GRPC::ActiveCall::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/support/v2" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Support::V2::CaseService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Support::V2::CreateCaseRequest.new # Call the create_case method. result = client.create_case request # The returned object is of type Google::Cloud::Support::V2::Case. p result
#escalate_case
def escalate_case(request, options = nil) -> ::Google::Cloud::Support::V2::Case
def escalate_case(name: nil, escalation: nil) -> ::Google::Cloud::Support::V2::Case
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.
def escalate_case(request, options = nil) -> ::Google::Cloud::Support::V2::Case
escalate_case
via a request object, either of type
EscalateCaseRequest or an equivalent Hash.
- request (::Google::Cloud::Support::V2::EscalateCaseRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def escalate_case(name: nil, escalation: nil) -> ::Google::Cloud::Support::V2::Case
escalate_case
via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
- name (::String) — Required. The name of the case to be escalated.
- escalation (::Google::Cloud::Support::V2::Escalation, ::Hash) — The escalation information to be sent with the escalation request.
- (response, operation) — Access the result along with the RPC operation
- response (::Google::Cloud::Support::V2::Case)
- operation (::GRPC::ActiveCall::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/support/v2" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Support::V2::CaseService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Support::V2::EscalateCaseRequest.new # Call the escalate_case method. result = client.escalate_case request # The returned object is of type Google::Cloud::Support::V2::Case. p result
#get_case
def get_case(request, options = nil) -> ::Google::Cloud::Support::V2::Case
def get_case(name: nil) -> ::Google::Cloud::Support::V2::Case
Retrieve a case.
def get_case(request, options = nil) -> ::Google::Cloud::Support::V2::Case
get_case
via a request object, either of type
GetCaseRequest or an equivalent Hash.
- request (::Google::Cloud::Support::V2::GetCaseRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def get_case(name: nil) -> ::Google::Cloud::Support::V2::Case
get_case
via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
- name (::String) — Required. The full name of a case to be retrieved.
- (response, operation) — Access the result along with the RPC operation
- response (::Google::Cloud::Support::V2::Case)
- operation (::GRPC::ActiveCall::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/support/v2" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Support::V2::CaseService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Support::V2::GetCaseRequest.new # Call the get_case method. result = client.get_case request # The returned object is of type Google::Cloud::Support::V2::Case. p result
#initialize
def initialize() { |config| ... } -> Client
Create a new CaseService client object.
- (config) — Configure the CaseService client.
- config (Client::Configuration)
- (Client) — a new instance of Client
# Create a client using the default configuration client = ::Google::Cloud::Support::V2::CaseService::Client.new # Create a client using a custom configuration client = ::Google::Cloud::Support::V2::CaseService::Client.new do |config| config.timeout = 10.0 end
#list_cases
def list_cases(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Support::V2::Case>
def list_cases(parent: nil, filter: nil, page_size: nil, page_token: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Support::V2::Case>
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
.
def list_cases(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Support::V2::Case>
list_cases
via a request object, either of type
ListCasesRequest or an equivalent Hash.
- request (::Google::Cloud::Support::V2::ListCasesRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def list_cases(parent: nil, filter: nil, page_size: nil, page_token: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Support::V2::Case>
list_cases
via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
- parent (::String) — Required. The name of a parent to list cases under.
-
filter (::String) —
An expression used to filter cases.
If it's an empty string, then no filtering happens. Otherwise, the endpoint returns the cases that match the filter.
Expressions use the following fields separated by
AND
and specified with=
:state
: Can beOPEN
orCLOSED
.priority
: Can beP0
,P1
,P2
,P3
, orP4
. You can specify multiple values for priority using theOR
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)
- page_size (::Integer) — The maximum number of cases fetched with each request. Defaults to 10.
- page_token (::String) — A token identifying the page of results to return. If unspecified, the first page is retrieved.
- (response, operation) — Access the result along with the RPC operation
- response (::Gapic::PagedEnumerable<::Google::Cloud::Support::V2::Case>)
- operation (::GRPC::ActiveCall::Operation)
- (::Gapic::PagedEnumerable<::Google::Cloud::Support::V2::Case>)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/support/v2" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Support::V2::CaseService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Support::V2::ListCasesRequest.new # Call the list_cases method. result = client.list_cases request # The returned object is of type Gapic::PagedEnumerable. You can iterate # over elements, and API calls will be issued to fetch pages as needed. result.each do |item| # Each element is of type ::Google::Cloud::Support::V2::Case. p item end
#logger
def logger() -> Logger
The logger used for request/response debug logging.
- (Logger)
#search_case_classifications
def search_case_classifications(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Support::V2::CaseClassification>
def search_case_classifications(query: nil, page_size: nil, page_token: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Support::V2::CaseClassification>
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.
def search_case_classifications(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Support::V2::CaseClassification>
search_case_classifications
via a request object, either of type
SearchCaseClassificationsRequest or an equivalent Hash.
- request (::Google::Cloud::Support::V2::SearchCaseClassificationsRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def search_case_classifications(query: nil, page_size: nil, page_token: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Support::V2::CaseClassification>
search_case_classifications
via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
-
query (::String) — An expression used to filter case classifications.
If it's an empty string, then no filtering happens. Otherwise, case classifications will be returned that match the filter.
- page_size (::Integer) — The maximum number of classifications fetched with each request.
- page_token (::String) — A token identifying the page of results to return. If unspecified, the first page is retrieved.
- (response, operation) — Access the result along with the RPC operation
- response (::Gapic::PagedEnumerable<::Google::Cloud::Support::V2::CaseClassification>)
- operation (::GRPC::ActiveCall::Operation)
- (::Gapic::PagedEnumerable<::Google::Cloud::Support::V2::CaseClassification>)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/support/v2" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Support::V2::CaseService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Support::V2::SearchCaseClassificationsRequest.new # Call the search_case_classifications method. result = client.search_case_classifications request # The returned object is of type Gapic::PagedEnumerable. You can iterate # over elements, and API calls will be issued to fetch pages as needed. result.each do |item| # Each element is of type ::Google::Cloud::Support::V2::CaseClassification. p item end
#search_cases
def search_cases(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Support::V2::Case>
def search_cases(parent: nil, query: nil, page_size: nil, page_token: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Support::V2::Case>
Search for cases using a query.
def search_cases(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Support::V2::Case>
search_cases
via a request object, either of type
SearchCasesRequest or an equivalent Hash.
- request (::Google::Cloud::Support::V2::SearchCasesRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def search_cases(parent: nil, query: nil, page_size: nil, page_token: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Support::V2::Case>
search_cases
via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
- parent (::String) — The name of the parent resource to search for cases under.
-
query (::String) —
An expression used to filter cases.
Expressions use the following fields separated by
AND
and specified with=
:organization
: An organization name in the formorganizations/<organization_id>
.project
: A project name in the formprojects/<project_id>
.state
: Can beOPEN
orCLOSED
.priority
: Can beP0
,P1
,P2
,P3
, orP4
. You can specify multiple values for priority using theOR
operator. For example,priority=P1 OR priority=P2
.creator.email
: The email address of the case creator.
You must specify either
organization
orproject
.To search across
displayName
,description
, and comments, use a global restriction with no keyword or operator. For example,"my search"
.To search only cases updated after a certain date, use
update_time
restricted with that particular date, time, and timezone in ISO datetime format. For example,update_time>"2020-01-01T00:00:00-05:00"
.update_time
only supports the greater than operator (>
).Examples:
organization="organizations/123456789"
project="projects/my-project-id"
project="projects/123456789"
organization="organizations/123456789" AND state=CLOSED
project="projects/my-project-id" AND creator.email="tester@example.com"
project="projects/my-project-id" AND (priority=P0 OR priority=P1)
- page_size (::Integer) — The maximum number of cases fetched with each request. The default page size is 10.
- page_token (::String) — A token identifying the page of results to return. If unspecified, the first page is retrieved.
- (response, operation) — Access the result along with the RPC operation
- response (::Gapic::PagedEnumerable<::Google::Cloud::Support::V2::Case>)
- operation (::GRPC::ActiveCall::Operation)
- (::Gapic::PagedEnumerable<::Google::Cloud::Support::V2::Case>)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/support/v2" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Support::V2::CaseService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Support::V2::SearchCasesRequest.new # Call the search_cases method. result = client.search_cases request # The returned object is of type Gapic::PagedEnumerable. You can iterate # over elements, and API calls will be issued to fetch pages as needed. result.each do |item| # Each element is of type ::Google::Cloud::Support::V2::Case. p item end
#universe_domain
def universe_domain() -> String
The effective universe domain
- (String)
#update_case
def update_case(request, options = nil) -> ::Google::Cloud::Support::V2::Case
def update_case(case: nil, update_mask: nil) -> ::Google::Cloud::Support::V2::Case
Update a case. Only some fields can be updated.
def update_case(request, options = nil) -> ::Google::Cloud::Support::V2::Case
update_case
via a request object, either of type
UpdateCaseRequest or an equivalent Hash.
- request (::Google::Cloud::Support::V2::UpdateCaseRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def update_case(case: nil, update_mask: nil) -> ::Google::Cloud::Support::V2::Case
update_case
via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
- case (::Google::Cloud::Support::V2::Case, ::Hash) — Required. The case to update.
-
update_mask (::Google::Protobuf::FieldMask, ::Hash) — A list of attributes of the case that should be updated. Supported values
are
priority
,display_name
, andsubscriber_email_addresses
. If no fields are specified, all supported fields are updated.Be careful - 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
, thensubscriber_email_addresses
is updated to empty.
- (response, operation) — Access the result along with the RPC operation
- response (::Google::Cloud::Support::V2::Case)
- operation (::GRPC::ActiveCall::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/support/v2" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Support::V2::CaseService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Support::V2::UpdateCaseRequest.new # Call the update_case method. result = client.update_case request # The returned object is of type Google::Cloud::Support::V2::Case. p result