repository.proto 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201
  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/field_behavior.proto";
  17. import "google/api/resource.proto";
  18. import "google/protobuf/field_mask.proto";
  19. import "google/protobuf/timestamp.proto";
  20. option csharp_namespace = "Google.Cloud.ArtifactRegistry.V1Beta2";
  21. option go_package = "google.golang.org/genproto/googleapis/devtools/artifactregistry/v1beta2;artifactregistry";
  22. option java_multiple_files = true;
  23. option java_outer_classname = "RepositoryProto";
  24. option java_package = "com.google.devtools.artifactregistry.v1beta2";
  25. option php_namespace = "Google\\Cloud\\ArtifactRegistry\\V1beta2";
  26. option ruby_package = "Google::Cloud::ArtifactRegistry::V1beta2";
  27. // A Repository for storing artifacts with a specific format.
  28. message Repository {
  29. option (google.api.resource) = {
  30. type: "artifactregistry.googleapis.com/Repository"
  31. pattern: "projects/{project}/locations/{location}/repositories/{repository}"
  32. };
  33. // MavenRepositoryConfig is maven related repository details.
  34. // Provides additional configuration details for repositories of the maven
  35. // format type.
  36. message MavenRepositoryConfig {
  37. // VersionPolicy is the version policy for the repository.
  38. enum VersionPolicy {
  39. // VERSION_POLICY_UNSPECIFIED - the version policy is not defined.
  40. // When the version policy is not defined, no validation is performed
  41. // for the versions.
  42. VERSION_POLICY_UNSPECIFIED = 0;
  43. // RELEASE - repository will accept only Release versions.
  44. RELEASE = 1;
  45. // SNAPSHOT - repository will accept only Snapshot versions.
  46. SNAPSHOT = 2;
  47. }
  48. // The repository with this flag will allow publishing
  49. // the same snapshot versions.
  50. bool allow_snapshot_overwrites = 1;
  51. // Version policy defines the versions that the registry will accept.
  52. VersionPolicy version_policy = 2;
  53. }
  54. // A package format.
  55. enum Format {
  56. // Unspecified package format.
  57. FORMAT_UNSPECIFIED = 0;
  58. // Docker package format.
  59. DOCKER = 1;
  60. // Maven package format.
  61. MAVEN = 2;
  62. // NPM package format.
  63. NPM = 3;
  64. // APT package format.
  65. APT = 5;
  66. // YUM package format.
  67. YUM = 6;
  68. // Python package format.
  69. PYTHON = 8;
  70. }
  71. // Repository-specific configurations.
  72. oneof format_config {
  73. // Maven repository config contains repository level configuration
  74. // for the repositories of maven type.
  75. MavenRepositoryConfig maven_config = 9;
  76. }
  77. // The name of the repository, for example:
  78. // "projects/p1/locations/us-central1/repositories/repo1".
  79. string name = 1;
  80. // The format of packages that are stored in the repository.
  81. Format format = 2;
  82. // The user-provided description of the repository.
  83. string description = 3;
  84. // Labels with user-defined metadata.
  85. // This field may contain up to 64 entries. Label keys and values may be no
  86. // longer than 63 characters. Label keys must begin with a lowercase letter
  87. // and may only contain lowercase letters, numeric characters, underscores,
  88. // and dashes.
  89. map<string, string> labels = 4;
  90. // The time when the repository was created.
  91. google.protobuf.Timestamp create_time = 5;
  92. // The time when the repository was last updated.
  93. google.protobuf.Timestamp update_time = 6;
  94. // The Cloud KMS resource name of the customer managed encryption key that’s
  95. // used to encrypt the contents of the Repository. Has the form:
  96. // `projects/my-project/locations/my-region/keyRings/my-kr/cryptoKeys/my-key`.
  97. // This value may not be changed after the Repository has been created.
  98. string kms_key_name = 8;
  99. }
  100. // The request to list repositories.
  101. message ListRepositoriesRequest {
  102. // Required. The name of the parent resource whose repositories will be listed.
  103. string parent = 1 [
  104. (google.api.field_behavior) = REQUIRED,
  105. (google.api.resource_reference) = {
  106. child_type: "artifactregistry.googleapis.com/Repository"
  107. }
  108. ];
  109. // The maximum number of repositories to return. Maximum page size is 1,000.
  110. int32 page_size = 2;
  111. // The next_page_token value returned from a previous list request, if any.
  112. string page_token = 3;
  113. }
  114. // The response from listing repositories.
  115. message ListRepositoriesResponse {
  116. // The repositories returned.
  117. repeated Repository repositories = 1;
  118. // The token to retrieve the next page of repositories, or empty if there are
  119. // no more repositories to return.
  120. string next_page_token = 2;
  121. }
  122. // The request to retrieve a repository.
  123. message GetRepositoryRequest {
  124. // Required. The name of the repository to retrieve.
  125. string name = 1 [
  126. (google.api.field_behavior) = REQUIRED,
  127. (google.api.resource_reference) = {
  128. type: "artifactregistry.googleapis.com/Repository"
  129. }
  130. ];
  131. }
  132. // The request to create a new repository.
  133. message CreateRepositoryRequest {
  134. // Required. The name of the parent resource where the repository will be created.
  135. string parent = 1 [
  136. (google.api.field_behavior) = REQUIRED,
  137. (google.api.resource_reference) = {
  138. child_type: "artifactregistry.googleapis.com/Repository"
  139. }
  140. ];
  141. // The repository id to use for this repository.
  142. string repository_id = 2;
  143. // The repository to be created.
  144. Repository repository = 3;
  145. }
  146. // The request to update a repository.
  147. message UpdateRepositoryRequest {
  148. // The repository that replaces the resource on the server.
  149. Repository repository = 1;
  150. // The update mask applies to the resource. For the `FieldMask` definition,
  151. // see
  152. // https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask
  153. google.protobuf.FieldMask update_mask = 2;
  154. }
  155. // The request to delete a repository.
  156. message DeleteRepositoryRequest {
  157. // Required. The name of the repository to delete.
  158. string name = 1 [
  159. (google.api.field_behavior) = REQUIRED,
  160. (google.api.resource_reference) = {
  161. type: "artifactregistry.googleapis.com/Repository"
  162. }
  163. ];
  164. }