service.proto 9.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251
  1. // Copyright 2020 Google LLC
  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.devtools.artifactregistry.v1beta2;
  16. import "google/api/annotations.proto";
  17. import "google/api/client.proto";
  18. import "google/devtools/artifactregistry/v1beta2/file.proto";
  19. import "google/devtools/artifactregistry/v1beta2/package.proto";
  20. import "google/devtools/artifactregistry/v1beta2/repository.proto";
  21. import "google/devtools/artifactregistry/v1beta2/tag.proto";
  22. import "google/devtools/artifactregistry/v1beta2/version.proto";
  23. import "google/iam/v1/iam_policy.proto";
  24. import "google/iam/v1/policy.proto";
  25. import "google/longrunning/operations.proto";
  26. import "google/protobuf/empty.proto";
  27. option csharp_namespace = "Google.Cloud.ArtifactRegistry.V1Beta2";
  28. option go_package = "google.golang.org/genproto/googleapis/devtools/artifactregistry/v1beta2;artifactregistry";
  29. option java_multiple_files = true;
  30. option java_outer_classname = "ServiceProto";
  31. option java_package = "com.google.devtools.artifactregistry.v1beta2";
  32. option php_namespace = "Google\\Cloud\\ArtifactRegistry\\V1beta2";
  33. option ruby_package = "Google::Cloud::ArtifactRegistry::V1beta2";
  34. // The Artifact Registry API service.
  35. //
  36. // Artifact Registry is an artifact management system for storing artifacts
  37. // from different package management systems.
  38. //
  39. // The resources managed by this API are:
  40. //
  41. // * Repositories, which group packages and their data.
  42. // * Packages, which group versions and their tags.
  43. // * Versions, which are specific forms of a package.
  44. // * Tags, which represent alternative names for versions.
  45. // * Files, which contain content and are optionally associated with a Package
  46. // or Version.
  47. service ArtifactRegistry {
  48. option (google.api.default_host) = "artifactregistry.googleapis.com";
  49. option (google.api.oauth_scopes) =
  50. "https://www.googleapis.com/auth/cloud-platform,"
  51. "https://www.googleapis.com/auth/cloud-platform.read-only";
  52. // Lists repositories.
  53. rpc ListRepositories(ListRepositoriesRequest) returns (ListRepositoriesResponse) {
  54. option (google.api.http) = {
  55. get: "/v1beta2/{parent=projects/*/locations/*}/repositories"
  56. };
  57. option (google.api.method_signature) = "parent";
  58. }
  59. // Gets a repository.
  60. rpc GetRepository(GetRepositoryRequest) returns (Repository) {
  61. option (google.api.http) = {
  62. get: "/v1beta2/{name=projects/*/locations/*/repositories/*}"
  63. };
  64. option (google.api.method_signature) = "name";
  65. }
  66. // Creates a repository. The returned Operation will finish once the
  67. // repository has been created. Its response will be the created Repository.
  68. rpc CreateRepository(CreateRepositoryRequest) returns (google.longrunning.Operation) {
  69. option (google.api.http) = {
  70. post: "/v1beta2/{parent=projects/*/locations/*}/repositories"
  71. body: "repository"
  72. };
  73. option (google.api.method_signature) = "parent,repository,repository_id";
  74. option (google.longrunning.operation_info) = {
  75. response_type: "Repository"
  76. metadata_type: "OperationMetadata"
  77. };
  78. }
  79. // Updates a repository.
  80. rpc UpdateRepository(UpdateRepositoryRequest) returns (Repository) {
  81. option (google.api.http) = {
  82. patch: "/v1beta2/{repository.name=projects/*/locations/*/repositories/*}"
  83. body: "repository"
  84. };
  85. option (google.api.method_signature) = "repository,update_mask";
  86. }
  87. // Deletes a repository and all of its contents. The returned Operation will
  88. // finish once the repository has been deleted. It will not have any Operation
  89. // metadata and will return a google.protobuf.Empty response.
  90. rpc DeleteRepository(DeleteRepositoryRequest) returns (google.longrunning.Operation) {
  91. option (google.api.http) = {
  92. delete: "/v1beta2/{name=projects/*/locations/*/repositories/*}"
  93. };
  94. option (google.api.method_signature) = "name";
  95. option (google.longrunning.operation_info) = {
  96. response_type: "google.protobuf.Empty"
  97. metadata_type: "OperationMetadata"
  98. };
  99. }
  100. // Lists packages.
  101. rpc ListPackages(ListPackagesRequest) returns (ListPackagesResponse) {
  102. option (google.api.http) = {
  103. get: "/v1beta2/{parent=projects/*/locations/*/repositories/*}/packages"
  104. };
  105. option (google.api.method_signature) = "parent";
  106. }
  107. // Gets a package.
  108. rpc GetPackage(GetPackageRequest) returns (Package) {
  109. option (google.api.http) = {
  110. get: "/v1beta2/{name=projects/*/locations/*/repositories/*/packages/*}"
  111. };
  112. option (google.api.method_signature) = "name";
  113. }
  114. // Deletes a package and all of its versions and tags. The returned operation
  115. // will complete once the package has been deleted.
  116. rpc DeletePackage(DeletePackageRequest) returns (google.longrunning.Operation) {
  117. option (google.api.http) = {
  118. delete: "/v1beta2/{name=projects/*/locations/*/repositories/*/packages/*}"
  119. };
  120. option (google.api.method_signature) = "name";
  121. option (google.longrunning.operation_info) = {
  122. response_type: "google.protobuf.Empty"
  123. metadata_type: "OperationMetadata"
  124. };
  125. }
  126. // Lists versions.
  127. rpc ListVersions(ListVersionsRequest) returns (ListVersionsResponse) {
  128. option (google.api.http) = {
  129. get: "/v1beta2/{parent=projects/*/locations/*/repositories/*/packages/*}/versions"
  130. };
  131. option (google.api.method_signature) = "parent";
  132. }
  133. // Gets a version
  134. rpc GetVersion(GetVersionRequest) returns (Version) {
  135. option (google.api.http) = {
  136. get: "/v1beta2/{name=projects/*/locations/*/repositories/*/packages/*/versions/*}"
  137. };
  138. option (google.api.method_signature) = "name";
  139. }
  140. // Deletes a version and all of its content. The returned operation will
  141. // complete once the version has been deleted.
  142. rpc DeleteVersion(DeleteVersionRequest) returns (google.longrunning.Operation) {
  143. option (google.api.http) = {
  144. delete: "/v1beta2/{name=projects/*/locations/*/repositories/*/packages/*/versions/*}"
  145. };
  146. option (google.api.method_signature) = "name";
  147. option (google.longrunning.operation_info) = {
  148. response_type: "google.protobuf.Empty"
  149. metadata_type: "OperationMetadata"
  150. };
  151. }
  152. // Lists files.
  153. rpc ListFiles(ListFilesRequest) returns (ListFilesResponse) {
  154. option (google.api.http) = {
  155. get: "/v1beta2/{parent=projects/*/locations/*/repositories/*}/files"
  156. };
  157. option (google.api.method_signature) = "parent";
  158. }
  159. // Gets a file.
  160. rpc GetFile(GetFileRequest) returns (File) {
  161. option (google.api.http) = {
  162. get: "/v1beta2/{name=projects/*/locations/*/repositories/*/files/**}"
  163. };
  164. option (google.api.method_signature) = "name";
  165. }
  166. // Lists tags.
  167. rpc ListTags(ListTagsRequest) returns (ListTagsResponse) {
  168. option (google.api.http) = {
  169. get: "/v1beta2/{parent=projects/*/locations/*/repositories/*/packages/*}/tags"
  170. };
  171. option (google.api.method_signature) = "parent";
  172. }
  173. // Gets a tag.
  174. rpc GetTag(GetTagRequest) returns (Tag) {
  175. option (google.api.http) = {
  176. get: "/v1beta2/{name=projects/*/locations/*/repositories/*/packages/*/tags/*}"
  177. };
  178. option (google.api.method_signature) = "name";
  179. }
  180. // Creates a tag.
  181. rpc CreateTag(CreateTagRequest) returns (Tag) {
  182. option (google.api.http) = {
  183. post: "/v1beta2/{parent=projects/*/locations/*/repositories/*/packages/*}/tags"
  184. body: "tag"
  185. };
  186. option (google.api.method_signature) = "parent,tag,tag_id";
  187. }
  188. // Updates a tag.
  189. rpc UpdateTag(UpdateTagRequest) returns (Tag) {
  190. option (google.api.http) = {
  191. patch: "/v1beta2/{tag.name=projects/*/locations/*/repositories/*/packages/*/tags/*}"
  192. body: "tag"
  193. };
  194. option (google.api.method_signature) = "tag,update_mask";
  195. }
  196. // Deletes a tag.
  197. rpc DeleteTag(DeleteTagRequest) returns (google.protobuf.Empty) {
  198. option (google.api.http) = {
  199. delete: "/v1beta2/{name=projects/*/locations/*/repositories/*/packages/*/tags/*}"
  200. };
  201. option (google.api.method_signature) = "name";
  202. }
  203. // Updates the IAM policy for a given resource.
  204. rpc SetIamPolicy(google.iam.v1.SetIamPolicyRequest) returns (google.iam.v1.Policy) {
  205. option (google.api.http) = {
  206. post: "/v1beta2/{resource=projects/*/locations/*/repositories/*}:setIamPolicy"
  207. body: "*"
  208. };
  209. }
  210. // Gets the IAM policy for a given resource.
  211. rpc GetIamPolicy(google.iam.v1.GetIamPolicyRequest) returns (google.iam.v1.Policy) {
  212. option (google.api.http) = {
  213. get: "/v1beta2/{resource=projects/*/locations/*/repositories/*}:getIamPolicy"
  214. };
  215. }
  216. // Tests if the caller has a list of permissions on a resource.
  217. rpc TestIamPermissions(google.iam.v1.TestIamPermissionsRequest) returns (google.iam.v1.TestIamPermissionsResponse) {
  218. option (google.api.http) = {
  219. post: "/v1beta2/{resource=projects/*/locations/*/repositories/*}:testIamPermissions"
  220. body: "*"
  221. };
  222. }
  223. }
  224. // Metadata type for longrunning-operations, currently empty.
  225. message OperationMetadata {}