cloud_support.proto 7.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222
  1. // Copyright 2017 Google Inc.
  2. //
  3. // Licensed under the Apache License, Version 2.0 (the "License");
  4. // you may not use this file except in compliance with the License.
  5. // You may obtain a copy of the License at
  6. //
  7. // http://www.apache.org/licenses/LICENSE-2.0
  8. //
  9. // Unless required by applicable law or agreed to in writing, software
  10. // distributed under the License is distributed on an "AS IS" BASIS,
  11. // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. // See the License for the specific language governing permissions and
  13. // limitations under the License.
  14. syntax = "proto3";
  15. package google.cloud.support.v1alpha1;
  16. import "google/api/annotations.proto";
  17. import "google/cloud/support/common.proto";
  18. import "google/protobuf/empty.proto";
  19. import "google/protobuf/field_mask.proto";
  20. option go_package = "google.golang.org/genproto/googleapis/cloud/support/v1alpha1;support";
  21. option java_outer_classname = "CloudSupportProto";
  22. option java_package = "com.google.cloud.support.v1alpha1";
  23. // Retrieves the list of Google Cloud Platform Support accounts and manages
  24. // support cases associated with them.
  25. service CloudSupport {
  26. // Retrieves the support account details given an account identifier.
  27. // The authenticated user calling this method must be the account owner.
  28. rpc GetSupportAccount(GetSupportAccountRequest)
  29. returns (google.cloud.support.common.SupportAccount) {
  30. option (google.api.http) = {
  31. get: "/v1alpha1/{name=supportAccounts/*}"
  32. };
  33. }
  34. // Retrieves the list of accounts the current authenticated user has access
  35. // to.
  36. rpc ListSupportAccounts(ListSupportAccountsRequest)
  37. returns (ListSupportAccountsResponse) {
  38. option (google.api.http) = {
  39. get: "/v1alpha1/supportAccounts"
  40. };
  41. }
  42. // Retrieves the details for a support case. The current authenticated user
  43. // calling this method must have permissions to view this case.
  44. rpc GetCase(GetCaseRequest) returns (google.cloud.support.common.Case) {
  45. option (google.api.http) = {
  46. get: "/v1alpha1/{name=supportAccounts/*/cases/*}"
  47. };
  48. }
  49. // Retrieves the list of support cases associated with an account. The current
  50. // authenticated user must have the permission to list and view these cases.
  51. rpc ListCases(ListCasesRequest) returns (ListCasesResponse) {
  52. option (google.api.http) = {
  53. get: "/v1alpha1/{name=supportAccounts/*}/cases"
  54. };
  55. }
  56. // Lists all comments from a case.
  57. rpc ListComments(ListCommentsRequest) returns (ListCommentsResponse) {
  58. option (google.api.http) = {
  59. get: "/v1alpha1/{name=supportAccounts/*/cases/*}/comments"
  60. };
  61. }
  62. // Creates a case and associates it with a
  63. // [SupportAccount][google.cloud.support.v1alpha2.SupportAcccount]. The
  64. // authenticated user attempting this action must have permissions to create a
  65. // `Case` under that [SupportAccount].
  66. rpc CreateCase(CreateCaseRequest) returns (google.cloud.support.common.Case) {
  67. option (google.api.http) = {
  68. post: "/v1alpha1/{parent=supportAccounts/*}/cases"
  69. body: "case"
  70. };
  71. }
  72. // Updates a support case. Only a small set of details (priority, subject and
  73. // cc_address) can be update after a case is created.
  74. rpc UpdateCase(UpdateCaseRequest) returns (google.cloud.support.common.Case) {
  75. option (google.api.http) = {
  76. patch: "/v1alpha1/{case.name=supportAccounts/*/cases/*}"
  77. body: "case"
  78. };
  79. }
  80. // Adds a new comment to a case.
  81. rpc CreateComment(CreateCommentRequest)
  82. returns (google.cloud.support.common.Comment) {
  83. option (google.api.http) = {
  84. post: "/v1alpha1/{name=supportAccounts/*/cases/*}/comments"
  85. body: "comment"
  86. };
  87. }
  88. // Retrieves the taxonomy of product categories and components to be used
  89. // while creating a support case.
  90. rpc GetIssueTaxonomy(GetIssueTaxonomyRequest)
  91. returns (google.cloud.support.common.IssueTaxonomy) {
  92. option (google.api.http) = {
  93. get: "/v1alpha1:getIssueTaxonomy"
  94. };
  95. }
  96. }
  97. // The request message for `GetSupportAccount`.
  98. message GetSupportAccountRequest {
  99. // The resource name of the support accounts. For example:
  100. // `supportAccounts/accountA`.
  101. string name = 1;
  102. }
  103. // The request message for `ListSupportAccount`.
  104. message ListSupportAccountsRequest {
  105. // The filter applied to search results. It only supports filtering a support
  106. // account list by a cloud_resource. For example, to filter results by support
  107. // accounts associated with an Organization, its value should be:
  108. // "cloud_resource:organizations/<organization_id>"
  109. string filter = 1;
  110. // Maximum number of accounts fetched with each request.
  111. int64 page_size = 2;
  112. // A token identifying the page of results to return. If unspecified, the
  113. // first page is retrieved.
  114. string page_token = 3;
  115. }
  116. // The response message for `ListSupportAccount`.
  117. message ListSupportAccountsResponse {
  118. // A list of support accounts.
  119. repeated google.cloud.support.common.SupportAccount accounts = 1;
  120. // A token to retrieve the next page of results. This should be passed on in
  121. // `page_token` field of `ListSupportAccountRequest` for next request. If
  122. // unspecified, there are no more results to retrieve.
  123. string next_page_token = 2;
  124. }
  125. // The request message for `GetCase` method.
  126. message GetCaseRequest {
  127. // Name of case resource requested.
  128. // For example: "supportAccounts/accountA/cases/123"
  129. string name = 1;
  130. }
  131. // The request message for `ListCase` method.
  132. message ListCasesRequest {
  133. // Name of the account resource for which cases are requested. For example:
  134. // "supportAccounts/accountA"
  135. string name = 1;
  136. // The filter applied to the search results. Currently it only accepts "OPEN"
  137. // or "CLOSED" strings, filtering out cases that are open or resolved.
  138. string filter = 2;
  139. // Maximum number of cases fetched with each request.
  140. int64 page_size = 3;
  141. // A token identifying the page of results to return. If unspecified, the
  142. // first page is retrieved.
  143. string page_token = 4;
  144. }
  145. // The response message for `ListCase` method.
  146. message ListCasesResponse {
  147. // A list of cases.
  148. repeated google.cloud.support.common.Case cases = 1;
  149. // A token to retrieve the next page of results. This should be passed on in
  150. // `page_token` field of `ListCaseRequest` for next request. If unspecified,
  151. // there are no more results to retrieve.
  152. string next_page_token = 2;
  153. }
  154. // The request message for `ListComments` method.
  155. message ListCommentsRequest {
  156. // The resource name of case for which comments should be listed.
  157. string name = 1;
  158. }
  159. // The response message for `ListComments` method.
  160. message ListCommentsResponse {
  161. // A list of comments.
  162. repeated google.cloud.support.common.Comment comments = 1;
  163. }
  164. // The request message for `CreateCase` method.
  165. message CreateCaseRequest {
  166. // The resource name for `SupportAccount` under which this case is created.
  167. string parent = 1;
  168. // The case resource to create.
  169. google.cloud.support.common.Case case = 2;
  170. }
  171. // The request message for `UpdateCase` method.
  172. message UpdateCaseRequest {
  173. // The case resource to update.
  174. google.cloud.support.common.Case case = 1;
  175. // A field that represents attributes of a Case object that should be updated
  176. // as part of this request.
  177. google.protobuf.FieldMask update_mask = 2;
  178. }
  179. // The request message for `CreateComment` method.
  180. message CreateCommentRequest {
  181. // The resource name of case to which this comment should be added.
  182. string name = 1;
  183. // The `Comment` to be added to this case.
  184. google.cloud.support.common.Comment comment = 2;
  185. }
  186. // The request message for `GetIssueTaxonomy` method.
  187. message GetIssueTaxonomyRequest {}