repository.proto 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134
  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/resource.proto";
  17. import "google/protobuf/field_mask.proto";
  18. import "google/protobuf/timestamp.proto";
  19. import "google/api/annotations.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. // A package format.
  34. enum Format {
  35. // Unspecified package format.
  36. FORMAT_UNSPECIFIED = 0;
  37. // Docker package format.
  38. DOCKER = 1;
  39. }
  40. // The name of the repository, for example:
  41. // "projects/p1/locations/us-central1/repositories/repo1".
  42. string name = 1;
  43. // The format of packages that are stored in the repository.
  44. Format format = 2;
  45. // The user-provided description of the repository.
  46. string description = 3;
  47. // Labels with user-defined metadata.
  48. // This field may contain up to 64 entries. Label keys and values may be no
  49. // longer than 63 characters. Label keys must begin with a lowercase letter
  50. // and may only contain lowercase letters, numeric characters, underscores,
  51. // and dashes.
  52. map<string, string> labels = 4;
  53. // The time when the repository was created.
  54. google.protobuf.Timestamp create_time = 5;
  55. // The time when the repository was last updated.
  56. google.protobuf.Timestamp update_time = 6;
  57. // The Cloud KMS resource name of the customer managed encryption key that’s
  58. // used to encrypt the contents of the Repository. Has the form:
  59. // `projects/my-project/locations/my-region/keyRings/my-kr/cryptoKeys/my-key`.
  60. // This value may not be changed after the Repository has been created.
  61. string kms_key_name = 8;
  62. }
  63. // The request to list repositories.
  64. message ListRepositoriesRequest {
  65. // The name of the parent resource whose repositories will be listed.
  66. string parent = 1;
  67. // The maximum number of repositories to return.
  68. // Maximum page size is 10,000.
  69. int32 page_size = 2;
  70. // The next_page_token value returned from a previous list request, if any.
  71. string page_token = 3;
  72. }
  73. // The response from listing repositories.
  74. message ListRepositoriesResponse {
  75. // The repositories returned.
  76. repeated Repository repositories = 1;
  77. // The token to retrieve the next page of repositories, or empty if there are
  78. // no more repositories to return.
  79. string next_page_token = 2;
  80. }
  81. // The request to retrieve a repository.
  82. message GetRepositoryRequest {
  83. // The name of the repository to retrieve.
  84. string name = 1;
  85. }
  86. // The request to create a new repository.
  87. message CreateRepositoryRequest {
  88. // The name of the parent resource where the repository will be created.
  89. string parent = 1;
  90. // The repository id to use for this repository.
  91. string repository_id = 2;
  92. // The repository to be created.
  93. Repository repository = 3;
  94. }
  95. // The request to update a repository.
  96. message UpdateRepositoryRequest {
  97. // The repository that replaces the resource on the server.
  98. Repository repository = 1;
  99. // The update mask applies to the resource. For the `FieldMask` definition,
  100. // see
  101. // https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask
  102. google.protobuf.FieldMask update_mask = 2;
  103. }
  104. // The request to delete a repository.
  105. message DeleteRepositoryRequest {
  106. // The name of the repository to delete.
  107. string name = 1;
  108. }