version.proto 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  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/devtools/artifactregistry/v1beta2/tag.proto";
  19. import "google/protobuf/struct.proto";
  20. import "google/protobuf/timestamp.proto";
  21. option csharp_namespace = "Google.Cloud.ArtifactRegistry.V1Beta2";
  22. option go_package = "google.golang.org/genproto/googleapis/devtools/artifactregistry/v1beta2;artifactregistry";
  23. option java_multiple_files = true;
  24. option java_outer_classname = "VersionProto";
  25. option java_package = "com.google.devtools.artifactregistry.v1beta2";
  26. option php_namespace = "Google\\Cloud\\ArtifactRegistry\\V1beta2";
  27. option ruby_package = "Google::Cloud::ArtifactRegistry::V1beta2";
  28. // The view, which determines what version information is returned in a
  29. // response.
  30. enum VersionView {
  31. // The default / unset value.
  32. // The API will default to the BASIC view.
  33. VERSION_VIEW_UNSPECIFIED = 0;
  34. // Includes basic information about the version, but not any related tags.
  35. BASIC = 1;
  36. // Include everything.
  37. FULL = 2;
  38. }
  39. // The body of a version resource. A version resource represents a
  40. // collection of components, such as files and other data. This may correspond
  41. // to a version in many package management schemes.
  42. message Version {
  43. option (google.api.resource) = {
  44. type: "artifactregistry.googleapis.com/Version"
  45. pattern: "projects/{project}/locations/{location}/repositories/{repository}/packages/{package}/versions/{version}"
  46. };
  47. // The name of the version, for example:
  48. // "projects/p1/locations/us-central1/repositories/repo1/packages/pkg1/versions/art1".
  49. // If the package or version ID parts contain slashes, the slashes are
  50. // escaped.
  51. string name = 1;
  52. // Optional. Description of the version, as specified in its metadata.
  53. string description = 3;
  54. // The time when the version was created.
  55. google.protobuf.Timestamp create_time = 5;
  56. // The time when the version was last updated.
  57. google.protobuf.Timestamp update_time = 6;
  58. // Output only. A list of related tags. Will contain up to 100 tags that
  59. // reference this version.
  60. repeated Tag related_tags = 7;
  61. // Output only. Repository-specific Metadata stored against this version.
  62. // The fields returned are defined by the underlying repository-specific
  63. // resource. Currently, the only resource in use is
  64. // [DockerImage][google.devtools.artifactregistry.v1.DockerImage]
  65. google.protobuf.Struct metadata = 8 [(google.api.field_behavior) = OUTPUT_ONLY];
  66. }
  67. // The request to list versions.
  68. message ListVersionsRequest {
  69. // The name of the parent resource whose versions will be listed.
  70. string parent = 1;
  71. // The maximum number of versions to return. Maximum page size is 1,000.
  72. int32 page_size = 2;
  73. // The next_page_token value returned from a previous list request, if any.
  74. string page_token = 3;
  75. // The view that should be returned in the response.
  76. VersionView view = 4;
  77. // Optional. The field to order the results by.
  78. string order_by = 5 [(google.api.field_behavior) = OPTIONAL];
  79. }
  80. // The response from listing versions.
  81. message ListVersionsResponse {
  82. // The versions returned.
  83. repeated Version versions = 1;
  84. // The token to retrieve the next page of versions, or empty if there are no
  85. // more versions to return.
  86. string next_page_token = 2;
  87. }
  88. // The request to retrieve a version.
  89. message GetVersionRequest {
  90. // The name of the version to retrieve.
  91. string name = 1;
  92. // The view that should be returned in the response.
  93. VersionView view = 2;
  94. }
  95. // The request to delete a version.
  96. message DeleteVersionRequest {
  97. // The name of the version to delete.
  98. string name = 1;
  99. // By default, a version that is tagged may not be deleted. If force=true, the
  100. // version and any tags pointing to the version are deleted.
  101. bool force = 2;
  102. }