1*d5c09012SAndroid Build Coastguard Worker// Copyright 2019 The Grafeas Authors. All rights reserved. 2*d5c09012SAndroid Build Coastguard Worker// 3*d5c09012SAndroid Build Coastguard Worker// Licensed under the Apache License, Version 2.0 (the "License"); 4*d5c09012SAndroid Build Coastguard Worker// you may not use this file except in compliance with the License. 5*d5c09012SAndroid Build Coastguard Worker// You may obtain a copy of the License at 6*d5c09012SAndroid Build Coastguard Worker// 7*d5c09012SAndroid Build Coastguard Worker// http://www.apache.org/licenses/LICENSE-2.0 8*d5c09012SAndroid Build Coastguard Worker// 9*d5c09012SAndroid Build Coastguard Worker// Unless required by applicable law or agreed to in writing, software 10*d5c09012SAndroid Build Coastguard Worker// distributed under the License is distributed on an "AS IS" BASIS, 11*d5c09012SAndroid Build Coastguard Worker// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12*d5c09012SAndroid Build Coastguard Worker// See the License for the specific language governing permissions and 13*d5c09012SAndroid Build Coastguard Worker// limitations under the License. 14*d5c09012SAndroid Build Coastguard Worker 15*d5c09012SAndroid Build Coastguard Workersyntax = "proto3"; 16*d5c09012SAndroid Build Coastguard Worker 17*d5c09012SAndroid Build Coastguard Workerpackage grafeas.v1; 18*d5c09012SAndroid Build Coastguard Worker 19*d5c09012SAndroid Build Coastguard Workeroption go_package = "google.golang.org/genproto/googleapis/grafeas/v1;grafeas"; 20*d5c09012SAndroid Build Coastguard Workeroption java_multiple_files = true; 21*d5c09012SAndroid Build Coastguard Workeroption java_package = "io.grafeas.v1"; 22*d5c09012SAndroid Build Coastguard Workeroption objc_class_prefix = "GRA"; 23*d5c09012SAndroid Build Coastguard Worker 24*d5c09012SAndroid Build Coastguard Worker// Layer holds metadata specific to a layer of a Docker image. 25*d5c09012SAndroid Build Coastguard Workermessage Layer { 26*d5c09012SAndroid Build Coastguard Worker // Required. The recovered Dockerfile directive used to construct this layer. 27*d5c09012SAndroid Build Coastguard Worker // See https://docs.docker.com/engine/reference/builder/ for more information. 28*d5c09012SAndroid Build Coastguard Worker string directive = 1; 29*d5c09012SAndroid Build Coastguard Worker 30*d5c09012SAndroid Build Coastguard Worker // The recovered arguments to the Dockerfile directive. 31*d5c09012SAndroid Build Coastguard Worker string arguments = 2; 32*d5c09012SAndroid Build Coastguard Worker} 33*d5c09012SAndroid Build Coastguard Worker 34*d5c09012SAndroid Build Coastguard Worker// A set of properties that uniquely identify a given Docker image. 35*d5c09012SAndroid Build Coastguard Workermessage Fingerprint { 36*d5c09012SAndroid Build Coastguard Worker // Required. The layer ID of the final layer in the Docker image's v1 37*d5c09012SAndroid Build Coastguard Worker // representation. 38*d5c09012SAndroid Build Coastguard Worker string v1_name = 1; 39*d5c09012SAndroid Build Coastguard Worker 40*d5c09012SAndroid Build Coastguard Worker // Required. The ordered list of v2 blobs that represent a given image. 41*d5c09012SAndroid Build Coastguard Worker repeated string v2_blob = 2; 42*d5c09012SAndroid Build Coastguard Worker 43*d5c09012SAndroid Build Coastguard Worker // Output only. The name of the image's v2 blobs computed via: 44*d5c09012SAndroid Build Coastguard Worker // [bottom] := v2_blob[bottom] 45*d5c09012SAndroid Build Coastguard Worker // [N] := sha256(v2_blob[N] + " " + v2_name[N+1]) 46*d5c09012SAndroid Build Coastguard Worker // Only the name of the final blob is kept. 47*d5c09012SAndroid Build Coastguard Worker string v2_name = 3; 48*d5c09012SAndroid Build Coastguard Worker} 49*d5c09012SAndroid Build Coastguard Worker 50*d5c09012SAndroid Build Coastguard Worker// Basis describes the base image portion (Note) of the DockerImage 51*d5c09012SAndroid Build Coastguard Worker// relationship. Linked occurrences are derived from this or an equivalent image 52*d5c09012SAndroid Build Coastguard Worker// via: 53*d5c09012SAndroid Build Coastguard Worker// FROM <Basis.resource_url> 54*d5c09012SAndroid Build Coastguard Worker// Or an equivalent reference, e.g., a tag of the resource_url. 55*d5c09012SAndroid Build Coastguard Workermessage ImageNote { 56*d5c09012SAndroid Build Coastguard Worker // Required. Immutable. The resource_url for the resource representing the 57*d5c09012SAndroid Build Coastguard Worker // basis of associated occurrence images. 58*d5c09012SAndroid Build Coastguard Worker string resource_url = 1; 59*d5c09012SAndroid Build Coastguard Worker 60*d5c09012SAndroid Build Coastguard Worker // Required. Immutable. The fingerprint of the base image. 61*d5c09012SAndroid Build Coastguard Worker Fingerprint fingerprint = 2; 62*d5c09012SAndroid Build Coastguard Worker} 63*d5c09012SAndroid Build Coastguard Worker 64*d5c09012SAndroid Build Coastguard Worker// Details of the derived image portion of the DockerImage relationship. This 65*d5c09012SAndroid Build Coastguard Worker// image would be produced from a Dockerfile with FROM <DockerImage.Basis in 66*d5c09012SAndroid Build Coastguard Worker// attached Note>. 67*d5c09012SAndroid Build Coastguard Workermessage ImageOccurrence { 68*d5c09012SAndroid Build Coastguard Worker // Required. The fingerprint of the derived image. 69*d5c09012SAndroid Build Coastguard Worker Fingerprint fingerprint = 1; 70*d5c09012SAndroid Build Coastguard Worker 71*d5c09012SAndroid Build Coastguard Worker // Output only. The number of layers by which this image differs from the 72*d5c09012SAndroid Build Coastguard Worker // associated image basis. 73*d5c09012SAndroid Build Coastguard Worker int32 distance = 2; 74*d5c09012SAndroid Build Coastguard Worker 75*d5c09012SAndroid Build Coastguard Worker // This contains layer-specific metadata, if populated it has length 76*d5c09012SAndroid Build Coastguard Worker // "distance" and is ordered with [distance] being the layer immediately 77*d5c09012SAndroid Build Coastguard Worker // following the base image and [1] being the final layer. 78*d5c09012SAndroid Build Coastguard Worker repeated Layer layer_info = 3; 79*d5c09012SAndroid Build Coastguard Worker 80*d5c09012SAndroid Build Coastguard Worker // Output only. This contains the base image URL for the derived image 81*d5c09012SAndroid Build Coastguard Worker // occurrence. 82*d5c09012SAndroid Build Coastguard Worker string base_resource_url = 4; 83*d5c09012SAndroid Build Coastguard Worker} 84