Close httplib2 connections.
create(parent, body=None, x__xgafv=None)
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()) ```
list(parent, pageSize=None, pageToken=None, x__xgafv=None)
List all the comments associated with a case. EXAMPLES: cURL: ```shell case="projects/some-project/cases/43595344" curl \ --header "Authorization: Bearer $(gcloud auth print-access-token)" \ "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() .list(parent="projects/some-project/cases/43595344") ) print(request.execute()) ```
Retrieves the next page of results.
close()
Close httplib2 connections.
create(parent, body=None, x__xgafv=None)
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()) ``` Args: parent: string, Required. The name of the case to which the comment should be added. (required) body: object, The request body. The object takes the form of: { # A comment associated with a support case. "body": "A String", # The full comment body. Maximum of 12800 characters. This can contain rich text syntax. "createTime": "A String", # Output only. The time when this comment was created. "creator": { # An object containing information about the effective user and authenticated principal responsible for an action. # Output only. The user or Google Support agent created this comment. "displayName": "A String", # The name to display for the actor. If not provided, it is inferred from credentials supplied during case creation. When an email is provided, a display name must also be provided. This will be obfuscated if the user is a Google Support agent. "email": "A String", # The email address of the actor. If not provided, it is inferred from credentials supplied during case creation. If the authenticated principal does not have an email address, one must be provided. When a name is provided, an email must also be provided. This will be obfuscated if the user is a Google Support agent. "googleSupport": True or False, # Output only. Whether the actor is a Google support actor. }, "name": "A String", # Output only. The resource name for the comment. "plainTextBody": "A String", # Output only. DEPRECATED. An automatically generated plain text version of body with all rich text syntax stripped. } x__xgafv: string, V1 error format. Allowed values 1 - v1 error format 2 - v2 error format Returns: An object of the form: { # A comment associated with a support case. "body": "A String", # The full comment body. Maximum of 12800 characters. This can contain rich text syntax. "createTime": "A String", # Output only. The time when this comment was created. "creator": { # An object containing information about the effective user and authenticated principal responsible for an action. # Output only. The user or Google Support agent created this comment. "displayName": "A String", # The name to display for the actor. If not provided, it is inferred from credentials supplied during case creation. When an email is provided, a display name must also be provided. This will be obfuscated if the user is a Google Support agent. "email": "A String", # The email address of the actor. If not provided, it is inferred from credentials supplied during case creation. If the authenticated principal does not have an email address, one must be provided. When a name is provided, an email must also be provided. This will be obfuscated if the user is a Google Support agent. "googleSupport": True or False, # Output only. Whether the actor is a Google support actor. }, "name": "A String", # Output only. The resource name for the comment. "plainTextBody": "A String", # Output only. DEPRECATED. An automatically generated plain text version of body with all rich text syntax stripped. }
list(parent, pageSize=None, pageToken=None, x__xgafv=None)
List all the comments associated with a case. EXAMPLES: cURL: ```shell case="projects/some-project/cases/43595344" curl \ --header "Authorization: Bearer $(gcloud auth print-access-token)" \ "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() .list(parent="projects/some-project/cases/43595344") ) print(request.execute()) ``` Args: parent: string, Required. The name of the case for which to list comments. (required) pageSize: integer, The maximum number of comments to fetch. Defaults to 10. pageToken: string, A token identifying the page of results to return. If unspecified, the first page is returned. x__xgafv: string, V1 error format. Allowed values 1 - v1 error format 2 - v2 error format Returns: An object of the form: { # The response message for the ListComments endpoint. "comments": [ # List of the comments associated with the case. { # A comment associated with a support case. "body": "A String", # The full comment body. Maximum of 12800 characters. This can contain rich text syntax. "createTime": "A String", # Output only. The time when this comment was created. "creator": { # An object containing information about the effective user and authenticated principal responsible for an action. # Output only. The user or Google Support agent created this comment. "displayName": "A String", # The name to display for the actor. If not provided, it is inferred from credentials supplied during case creation. When an email is provided, a display name must also be provided. This will be obfuscated if the user is a Google Support agent. "email": "A String", # The email address of the actor. If not provided, it is inferred from credentials supplied during case creation. If the authenticated principal does not have an email address, one must be provided. When a name is provided, an email must also be provided. This will be obfuscated if the user is a Google Support agent. "googleSupport": True or False, # Output only. Whether the actor is a Google support actor. }, "name": "A String", # Output only. The resource name for the comment. "plainTextBody": "A String", # Output only. DEPRECATED. An automatically generated plain text version of body with all rich text syntax stripped. }, ], "nextPageToken": "A String", # A token to retrieve the next page of results. Set this in the `page_token` field of subsequent `cases.comments.list` requests. If unspecified, there are no more results to retrieve. }
list_next()
Retrieves the next page of results. Args: previous_request: The request for the previous page. (required) previous_response: The response from the request for the previous page. (required) Returns: A request object that you can call 'execute()' on to request the next page. Returns None if there are no more items in the collection.