Class CasesResource.PatchRequest
Update a case. Only some fields can be updated. EXAMPLES: cURL:
shell
case="projects/some-project/cases/43595344" curl \ --request PATCH \ --header "Authorization: Bearer
$(gcloud auth print-access-token)" \ --header "Content-Type: application/json" \ --data '{ "priority": "P1"
}' \ "https://cloudsupport.googleapis.com/v2/$case?updateMask=priority"
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().patch( name="projects/some-project/cases/43112854", body={ "displayName": "This
is Now a New Title", "priority": "P2", }, ) print(request.execute())
Inheritance
CasesResource.PatchRequest
Inherited Members
Namespace: Google.Apis.CloudSupport.v2beta
Assembly: Google.Apis.CloudSupport.v2beta.dll
Syntax
public class CasesResource.PatchRequest : CloudSupportBaseServiceRequest<Case>, IClientServiceRequest<Case>, IClientServiceRequest
Constructors
PatchRequest(IClientService, Case, string)
Constructs a new Patch request.
Declaration
public PatchRequest(IClientService service, Case body, string name)
Parameters
Type | Name | Description |
---|---|---|
IClientService | service | |
Case | body | |
string | name |
Properties
HttpMethod
Gets the HTTP method.
Declaration
public override string HttpMethod { get; }
Property Value
Type | Description |
---|---|
string |
Overrides
Google.Apis.Requests.ClientServiceRequest<Google.Apis.CloudSupport.v2beta.Data.Case>.HttpMethod
MethodName
Gets the method name.
Declaration
public override string MethodName { get; }
Property Value
Type | Description |
---|---|
string |
Overrides
Google.Apis.Requests.ClientServiceRequest<Google.Apis.CloudSupport.v2beta.Data.Case>.MethodName
Name
The resource name for the case.
Declaration
[RequestParameter("name", RequestParameterType.Path)]
public virtual string Name { get; }
Property Value
Type | Description |
---|---|
string |
RestPath
Gets the REST path.
Declaration
public override string RestPath { get; }
Property Value
Type | Description |
---|---|
string |
Overrides
Google.Apis.Requests.ClientServiceRequest<Google.Apis.CloudSupport.v2beta.Data.Case>.RestPath
UpdateMask
A list of attributes of the case that should be updated. Supported values are priority
,
display_name
, and subscriber_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
, then subscriber_email_addresses
is updated to empty.
Declaration
[RequestParameter("updateMask", RequestParameterType.Query)]
public virtual object UpdateMask { get; set; }
Property Value
Type | Description |
---|---|
object |
Methods
GetBody()
Returns the body of the request.
Declaration
protected override object GetBody()
Returns
Type | Description |
---|---|
object |
Overrides
Google.Apis.Requests.ClientServiceRequest<Google.Apis.CloudSupport.v2beta.Data.Case>.GetBody()
InitParameters()
Initializes Patch parameter list.
Declaration
protected override void InitParameters()