apt_artifact.proto 3.9 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/rpc/status.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 = "AptArtifactProto";
  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. // A detailed representation of an Apt artifact. Information in the record
  27. // is derived from the archive's control file.
  28. // See https://www.debian.org/doc/debian-policy/ch-controlfields.html
  29. message AptArtifact {
  30. option (google.api.resource) = {
  31. type: "artifactregistry.googleapis.com/AptArtifact"
  32. pattern: "projects/{project}/locations/{location}/repositories/{repository}/aptArtifacts/{apt_artifact}"
  33. };
  34. // Package type is either binary or source.
  35. enum PackageType {
  36. // Package type is not specified.
  37. PACKAGE_TYPE_UNSPECIFIED = 0;
  38. // Binary package.
  39. BINARY = 1;
  40. // Source package.
  41. SOURCE = 2;
  42. }
  43. // Output only. The Artifact Registry resource name of the artifact.
  44. string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
  45. // Output only. The Apt package name of the artifact.
  46. string package_name = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
  47. // Output only. An artifact is a binary or source package.
  48. PackageType package_type = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
  49. // Output only. Operating system architecture of the artifact.
  50. string architecture = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
  51. // Output only. Repository component of the artifact.
  52. string component = 5 [(google.api.field_behavior) = OUTPUT_ONLY];
  53. // Output only. Contents of the artifact's control metadata file.
  54. bytes control_file = 6 [(google.api.field_behavior) = OUTPUT_ONLY];
  55. }
  56. // Google Cloud Storage location where the artifacts currently reside.
  57. message ImportAptArtifactsGcsSource {
  58. // Cloud Storage paths URI (e.g., gs://my_bucket//my_object).
  59. repeated string uris = 1;
  60. // Supports URI wildcards for matching multiple objects from a single URI.
  61. bool use_wildcards = 2;
  62. }
  63. // The request to import new apt artifacts.
  64. message ImportAptArtifactsRequest {
  65. // The source location of the package binaries.
  66. oneof source {
  67. // Google Cloud Storage location where input content is located.
  68. ImportAptArtifactsGcsSource gcs_source = 2;
  69. }
  70. // The name of the parent resource where the artifacts will be imported.
  71. string parent = 1;
  72. }
  73. // Error information explaining why a package was not imported.
  74. message ImportAptArtifactsErrorInfo {
  75. // The source that was not imported.
  76. oneof source {
  77. // Google Cloud Storage location requested.
  78. ImportAptArtifactsGcsSource gcs_source = 1;
  79. }
  80. // The detailed error status.
  81. google.rpc.Status error = 2;
  82. }
  83. // The response message from importing APT artifacts.
  84. message ImportAptArtifactsResponse {
  85. // The Apt artifacts imported.
  86. repeated AptArtifact apt_artifacts = 1;
  87. // Detailed error info for packages that were not imported.
  88. repeated ImportAptArtifactsErrorInfo errors = 2;
  89. }
  90. // The operation metadata for importing artifacts.
  91. message ImportAptArtifactsMetadata {
  92. }