Show / Hide Table of Contents

Class CasesResource.CreateRequest

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. EXAMPLES: cURL:

shell parent="projects/some-project" curl \
--request POST \ --header "Authorization: Bearer $(gcloud auth print-access-token)" \ --header
'Content-Type: application/json' \ --data '{ "display_name": "Test case created by me.", "description": "a
random test case, feel free to close", "classification": { "id":
"100IK2AKCLHMGRJ9CDGMOCGP8DM6UTB4BT262T31BT1M2T31DHNMENPO6KS36CPJ786L2TBFEHGN6NPI64R3CDHN8880G08I1H3MURR7DHII0GRCDTQM8"
}, "time_zone": "-07:00", "subscriber_email_addresses": [ "foo@domain.com", "bar@domain.com" ], "testCase":
true, "priority": "P3" }' \ "https://cloudsupport.googleapis.com/v2/$parent/cases"

Python:

python
import googleapiclient.discovery api_version = "v2" supportApiService = googleapiclient.discovery.build(
serviceName="cloudsupport", version=api_version,
discoveryServiceUrl=f"https://cloudsupport.googleapis.com/$discovery/rest?version={api_version}", ) request
= supportApiService.cases().create( parent="projects/some-project", body={ "displayName": "A Test Case",
"description": "This is a test case.", "testCase": True, "priority": "P2", "classification": { "id":
"100IK2AKCLHMGRJ9CDGMOCGP8DM6UTB4BT262T31BT1M2T31DHNMENPO6KS36CPJ786L2TBFEHGN6NPI64R3CDHN8880G08I1H3MURR7DHII0GRCDTQM8"
}, }, ) print(request.execute())
Inheritance
object
ClientServiceRequest
ClientServiceRequest<Case>
CloudSupportBaseServiceRequest<Case>
CasesResource.CreateRequest
Implements
IClientServiceRequest<Case>
IClientServiceRequest
Inherited Members
CloudSupportBaseServiceRequest<Case>.Xgafv
CloudSupportBaseServiceRequest<Case>.AccessToken
CloudSupportBaseServiceRequest<Case>.Alt
CloudSupportBaseServiceRequest<Case>.Callback
CloudSupportBaseServiceRequest<Case>.Fields
CloudSupportBaseServiceRequest<Case>.Key
CloudSupportBaseServiceRequest<Case>.OauthToken
CloudSupportBaseServiceRequest<Case>.PrettyPrint
CloudSupportBaseServiceRequest<Case>.QuotaUser
CloudSupportBaseServiceRequest<Case>.UploadType
CloudSupportBaseServiceRequest<Case>.UploadProtocol
ClientServiceRequest<Case>.Execute()
ClientServiceRequest<Case>.ExecuteAsStream()
ClientServiceRequest<Case>.ExecuteAsync()
ClientServiceRequest<Case>.ExecuteAsync(CancellationToken)
ClientServiceRequest<Case>.ExecuteAsStreamAsync()
ClientServiceRequest<Case>.ExecuteAsStreamAsync(CancellationToken)
ClientServiceRequest<Case>.CreateRequest(bool?)
ClientServiceRequest<Case>.GenerateRequestUri()
ClientServiceRequest<Case>.GetDefaultETagAction(string)
ClientServiceRequest<Case>.ETagAction
ClientServiceRequest<Case>.ModifyRequest
ClientServiceRequest<Case>.ValidateParameters
ClientServiceRequest<Case>.ApiVersion
ClientServiceRequest<Case>.RequestParameters
ClientServiceRequest<Case>.Service
ClientServiceRequest._unsuccessfulResponseHandlers
ClientServiceRequest._exceptionHandlers
ClientServiceRequest._executeInterceptors
ClientServiceRequest.AddUnsuccessfulResponseHandler(IHttpUnsuccessfulResponseHandler)
ClientServiceRequest.AddExceptionHandler(IHttpExceptionHandler)
ClientServiceRequest.AddExecuteInterceptor(IHttpExecuteInterceptor)
ClientServiceRequest.Credential
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: Google.Apis.CloudSupport.v2beta
Assembly: Google.Apis.CloudSupport.v2beta.dll
Syntax
public class CasesResource.CreateRequest : CloudSupportBaseServiceRequest<Case>, IClientServiceRequest<Case>, IClientServiceRequest

Constructors

CreateRequest(IClientService, Case, string)

Constructs a new Create request.

Declaration
public CreateRequest(IClientService service, Case body, string parent)
Parameters
Type Name Description
IClientService service
Case body
string parent

Properties

HttpMethod

Gets the HTTP method.

Declaration
public override string HttpMethod { get; }
Property Value
Type Description
string
Overrides
ClientServiceRequest<Case>.HttpMethod

MethodName

Gets the method name.

Declaration
public override string MethodName { get; }
Property Value
Type Description
string
Overrides
ClientServiceRequest<Case>.MethodName

Parent

Required. The name of the parent under which the case should be created.

Declaration
[RequestParameter("parent", RequestParameterType.Path)]
public virtual string Parent { get; }
Property Value
Type Description
string

RestPath

Gets the REST path.

Declaration
public override string RestPath { get; }
Property Value
Type Description
string
Overrides
ClientServiceRequest<Case>.RestPath

Methods

GetBody()

Returns the body of the request.

Declaration
protected override object GetBody()
Returns
Type Description
object
Overrides
ClientServiceRequest<Case>.GetBody()

InitParameters()

Initializes Create parameter list.

Declaration
protected override void InitParameters()
Overrides
CloudSupportBaseServiceRequest<Case>.InitParameters()

Implements

IClientServiceRequest<TResponse>
IClientServiceRequest
In this article
Back to top Generated by DocFX