Class CasesResource.CommentsResource.CreateRequest
Add a new comment to a case. The comment must have the following fields set: body
. EXAMPLES: cURL:
shell case="projects/some-project/cases/43591344" curl \ --request POST \ --header "Authorization:
Bearer $(gcloud auth print-access-token)" \ --header 'Content-Type: application/json' \ --data '{
"body": "This is a test comment." }' \ "https://cloudsupport.googleapis.com/v2/$case/comments"
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() .comments() .create(
parent="projects/some-project/cases/43595344", body={"body": "This is a test comment."}, ) )
print(request.execute())
Inheritance
CasesResource.CommentsResource.CreateRequest
Inherited Members
Namespace: Google.Apis.CloudSupport.v2beta
Assembly: Google.Apis.CloudSupport.v2beta.dll
Syntax
public class CasesResource.CommentsResource.CreateRequest : CloudSupportBaseServiceRequest<Comment>, IClientServiceRequest<Comment>, IClientServiceRequest
Constructors
CreateRequest(IClientService, Comment, string)
Constructs a new Create request.
Declaration
public CreateRequest(IClientService service, Comment body, string parent)
Parameters
Type | Name | Description |
---|---|---|
IClientService | service | |
Comment | body | |
string | parent |
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.Comment>.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.Comment>.MethodName
Parent
Required. The name of the case to which the comment should be added.
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
Google.Apis.Requests.ClientServiceRequest<Google.Apis.CloudSupport.v2beta.Data.Comment>.RestPath
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.Comment>.GetBody()
InitParameters()
Initializes Create parameter list.
Declaration
protected override void InitParameters()