version.proto 3.5 KB

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