artifact.proto 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  1. // Copyright 2022 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.v1;
  16. import "google/api/field_behavior.proto";
  17. import "google/api/resource.proto";
  18. import "google/protobuf/timestamp.proto";
  19. option csharp_namespace = "Google.Cloud.ArtifactRegistry.V1";
  20. option go_package = "google.golang.org/genproto/googleapis/devtools/artifactregistry/v1;artifactregistry";
  21. option java_multiple_files = true;
  22. option java_outer_classname = "ArtifactProto";
  23. option java_package = "com.google.devtools.artifactregistry.v1";
  24. option php_namespace = "Google\\Cloud\\ArtifactRegistry\\V1";
  25. option ruby_package = "Google::Cloud::ArtifactRegistry::V1";
  26. // DockerImage represents a docker artifact.
  27. // The following fields are returned as untyped metadata in the Version
  28. // resource, using camelcase keys (i.e. metadata.imageSizeBytes):
  29. // * imageSizeBytes
  30. // * mediaType
  31. // * buildTime
  32. message DockerImage {
  33. option (google.api.resource) = {
  34. type: "artifactregistry.googleapis.com/DockerImage"
  35. pattern: "projects/{project}/locations/{location}/repositories/{repository}/dockerImages/{docker_image}"
  36. };
  37. // Required. registry_location, project_id, repository_name and image id forms a unique
  38. // image
  39. // name:`projects/<project_id>/locations/<location>/repository/<repository_name>/dockerImages/<docker_image>`.
  40. // For example,
  41. // "projects/test-project/locations/us-west4/repositories/test-repo/dockerImages/
  42. // nginx@sha256:e9954c1fc875017be1c3e36eca16be2d9e9bccc4bf072163515467d6a823c7cf",
  43. // where "us-west4" is the registry_location, "test-project" is the
  44. // project_id, "test-repo" is the repository_name and
  45. // "nginx@sha256:e9954c1fc875017be1c3e36eca16be2d9e9bccc4bf072163515467d6a823c7cf"
  46. // is the image's digest.
  47. string name = 1 [(google.api.field_behavior) = REQUIRED];
  48. // Required. URL to access the image.
  49. // Example:
  50. // us-west4-docker.pkg.dev/test-project/test-repo/nginx@sha256:e9954c1fc875017be1c3e36eca16be2d9e9bccc4bf072163515467d6a823c7cf
  51. string uri = 2 [(google.api.field_behavior) = REQUIRED];
  52. // Tags attached to this image.
  53. repeated string tags = 3;
  54. // Calculated size of the image.
  55. // This field is returned as the 'metadata.imageSizeBytes' field in the
  56. // Version resource.
  57. int64 image_size_bytes = 4;
  58. // Time the image was uploaded.
  59. google.protobuf.Timestamp upload_time = 5;
  60. // Media type of this image, e.g.
  61. // "application/vnd.docker.distribution.manifest.v2+json".
  62. // This field is returned as the 'metadata.mediaType' field in the
  63. // Version resource.
  64. string media_type = 6;
  65. // The time this image was built.
  66. // This field is returned as the 'metadata.buildTime' field in the
  67. // Version resource.
  68. // The build time is returned to the client as an RFC 3339 string, which can
  69. // be easily used with the JavaScript Date constructor.
  70. google.protobuf.Timestamp build_time = 7;
  71. }
  72. // The request to list docker images.
  73. message ListDockerImagesRequest {
  74. // Required. The name of the parent resource whose docker images will be listed.
  75. string parent = 1 [(google.api.field_behavior) = REQUIRED];
  76. // The maximum number of artifacts to return.
  77. int32 page_size = 2;
  78. // The next_page_token value returned from a previous list request, if any.
  79. string page_token = 3;
  80. }
  81. // The response from listing docker images.
  82. message ListDockerImagesResponse {
  83. // The docker images returned.
  84. repeated DockerImage docker_images = 1;
  85. // The token to retrieve the next page of artifacts, or empty if there are no
  86. // more artifacts to return.
  87. string next_page_token = 2;
  88. }
  89. // The request to get docker images.
  90. message GetDockerImageRequest {
  91. // Required. The name of the docker images.
  92. string name = 1 [
  93. (google.api.field_behavior) = REQUIRED,
  94. (google.api.resource_reference) = {
  95. type: "artifactregistry.googleapis.com/DockerImage"
  96. }
  97. ];
  98. }