lib/grafeas/v1/intoto_provenance_pb.rb in grafeas-v1-0.11.0 vs lib/grafeas/v1/intoto_provenance_pb.rb in grafeas-v1-0.12.0
- old
+ new
@@ -1,43 +1,40 @@
+# frozen_string_literal: true
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: grafeas/v1/intoto_provenance.proto
require 'google/protobuf'
require 'google/protobuf/any_pb'
require 'google/protobuf/timestamp_pb'
-Google::Protobuf::DescriptorPool.generated_pool.build do
- add_file("grafeas/v1/intoto_provenance.proto", :syntax => :proto3) do
- add_message "grafeas.v1.Recipe" do
- optional :type, :string, 1
- optional :defined_in_material, :int64, 2
- optional :entry_point, :string, 3
- repeated :arguments, :message, 4, "google.protobuf.Any"
- repeated :environment, :message, 5, "google.protobuf.Any"
+
+descriptor_data = "\n\"grafeas/v1/intoto_provenance.proto\x12\ngrafeas.v1\x1a\x19google/protobuf/any.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x9c\x01\n\x06Recipe\x12\x0c\n\x04type\x18\x01 \x01(\t\x12\x1b\n\x13\x64\x65\x66ined_in_material\x18\x02 \x01(\x03\x12\x13\n\x0b\x65ntry_point\x18\x03 \x01(\t\x12\'\n\targuments\x18\x04 \x03(\x0b\x32\x14.google.protobuf.Any\x12)\n\x0b\x65nvironment\x18\x05 \x03(\x0b\x32\x14.google.protobuf.Any\"I\n\x0c\x43ompleteness\x12\x11\n\targuments\x18\x01 \x01(\x08\x12\x13\n\x0b\x65nvironment\x18\x02 \x01(\x08\x12\x11\n\tmaterials\x18\x03 \x01(\x08\"\xda\x01\n\x08Metadata\x12\x1b\n\x13\x62uild_invocation_id\x18\x01 \x01(\t\x12\x34\n\x10\x62uild_started_on\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x35\n\x11\x62uild_finished_on\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12.\n\x0c\x63ompleteness\x18\x04 \x01(\x0b\x32\x18.grafeas.v1.Completeness\x12\x14\n\x0creproducible\x18\x05 \x01(\x08\"\x1b\n\rBuilderConfig\x12\n\n\x02id\x18\x01 \x01(\t\"\xa4\x01\n\x10InTotoProvenance\x12\x31\n\x0e\x62uilder_config\x18\x01 \x01(\x0b\x32\x19.grafeas.v1.BuilderConfig\x12\"\n\x06recipe\x18\x02 \x01(\x0b\x32\x12.grafeas.v1.Recipe\x12&\n\x08metadata\x18\x03 \x01(\x0b\x32\x14.grafeas.v1.Metadata\x12\x11\n\tmaterials\x18\x04 \x03(\tBh\n\rio.grafeas.v1B\x15InTotoProvenanceProtoP\x01Z8google.golang.org/genproto/googleapis/grafeas/v1;grafeas\xa2\x02\x03GRAb\x06proto3"
+
+pool = Google::Protobuf::DescriptorPool.generated_pool
+
+begin
+ pool.add_serialized_file(descriptor_data)
+rescue TypeError => e
+ # Compatibility code: will be removed in the next major version.
+ require 'google/protobuf/descriptor_pb'
+ parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data)
+ parsed.clear_dependency
+ serialized = parsed.class.encode(parsed)
+ file = pool.add_serialized_file(serialized)
+ warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}"
+ imports = [
+ ["google.protobuf.Any", "google/protobuf/any.proto"],
+ ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"],
+ ]
+ imports.each do |type_name, expected_filename|
+ import_file = pool.lookup(type_name).file_descriptor
+ if import_file.name != expected_filename
+ warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}"
end
- add_message "grafeas.v1.Completeness" do
- optional :arguments, :bool, 1
- optional :environment, :bool, 2
- optional :materials, :bool, 3
- end
- add_message "grafeas.v1.Metadata" do
- optional :build_invocation_id, :string, 1
- optional :build_started_on, :message, 2, "google.protobuf.Timestamp"
- optional :build_finished_on, :message, 3, "google.protobuf.Timestamp"
- optional :completeness, :message, 4, "grafeas.v1.Completeness"
- optional :reproducible, :bool, 5
- end
- add_message "grafeas.v1.BuilderConfig" do
- optional :id, :string, 1
- end
- add_message "grafeas.v1.InTotoProvenance" do
- optional :builder_config, :message, 1, "grafeas.v1.BuilderConfig"
- optional :recipe, :message, 2, "grafeas.v1.Recipe"
- optional :metadata, :message, 3, "grafeas.v1.Metadata"
- repeated :materials, :string, 4
- end
end
+ warn "Each proto file must use a consistent fully-qualified name."
+ warn "This will become an error in the next major version."
end
module Grafeas
module V1
Recipe = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.Recipe").msgclass