blob: 7e8c4032a386cbda5ea00b470000af3b031bc60a [file] [edit]
// Copyright 2026 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
edition = "2024";
package credentio;
import "cbor/tags.proto";
import "proto/asset_type.proto";
import "proto/hashed_uri.proto";
import "proto/validation_status.proto";
// Represents an assertion about an ingredient used in the asset.
// Based on `ingredient-map-v2` in
// https://spec.c2pa.org/specifications/specifications/2.4/specs/C2PA_Specification.html#ingredient_schema.
message IngredientAssertionV2 {
// The name of the ingredient.
string title = 1 [(cbor.tags) = { is_required: true, name: "dc:title" }];
// The media type of the ingredient.
string media_type = 2
[(cbor.tags) = { is_required: true, name: "dc:format" }];
// The relationship of this ingredient to the asset it is an ingredient of.
string relationship = 3;
// The value of the ingredient's `xmpMM:DocumentID`.
string document_id = 4 [(cbor.tags) = { name: "documentID" }];
// Unique identifier, such as the value of the ingredient's
// `xmpMM:InstanceID`.
string instance_id = 5 [(cbor.tags) = { name: "instanceID" }];
// URI reference to a data box or external data containing the ingredient
// asset itself.
InternalOrExternalHashedUri data = 6;
// Additional information about the data's type.
repeated AssetType data_types = 7;
// URI reference to the C2PA Manifest of the ingredient.
HashedUri c2pa_manifest = 8;
// URI reference to a thumbnail in a data box.
HashedUri thumbnail = 9;
// Validation status of the ingredient (provided by the claim generator).
repeated ValidationStatus validation_status = 14
[(cbor.tags) = { name: "validationStatus" }];
// Additional description of the ingredient.
string description = 11;
// URI to an informational page about the ingredient or its data.
string informational_uri = 12 [(cbor.tags) = { name: "informational_URI" }];
reserved 13;
reserved 10;
}
// Represents an assertion about an ingredient used in the asset.
// Based on `ingredient-map` in
// https://spec.c2pa.org/specifications/specifications/2.4/specs/C2PA_Specification.html#ingredient_schema.
message IngredientAssertionV1 {
// The name of the ingredient.
string title = 1 [(cbor.tags) = { is_required: true, name: "dc:title" }];
// The media type of the ingredient.
string media_type = 2
[(cbor.tags) = { is_required: true, name: "dc:format" }];
// The value of the ingredient's `xmpMM:DocumentID`.
string document_id = 3 [(cbor.tags) = { name: "documentID" }];
// Unique identifier, such as the value of the ingredient's
// `xmpMM:InstanceID`.
string instance_id = 4
[(cbor.tags) = { is_required: true, name: "instanceID" }];
// The relationship of this ingredient to the asset it is an ingredient of.
string relationship = 5;
// URI reference to the C2PA Manifest of the ingredient.
HashedUri c2pa_manifest = 6;
// URI reference to a thumbnail in a data box.
HashedUri thumbnail = 7;
// Validation status of the ingredient (provided by the claim generator).
repeated ValidationStatus validation_status = 10
[(cbor.tags) = { name: "validationStatus" }];
reserved 9;
reserved 8;
}
// Represents an assertion about an ingredient used in the asset.
// Based on `ingredient-map-v3` in
// https://spec.c2pa.org/specifications/specifications/2.4/specs/C2PA_Specification.html#ingredient_schema.
message IngredientAssertionV3 {
string title = 1 [(cbor.tags) = { name: "dc:title" }];
string media_type = 2 [(cbor.tags) = { name: "dc:format" }];
string relationship = 3;
IngredientValidationResults validation_results = 4
[(cbor.tags) = { name: "validationResults" }];
string instance_id = 5 [(cbor.tags) = { name: "instanceID" }];
InternalOrExternalHashedUri data = 6;
repeated AssetType data_types = 7 [(cbor.tags) = { name: "dataTypes" }];
HashedUri active_manifest = 8 [(cbor.tags) = { name: "activeManifest" }];
HashedUri claim_signature = 9 [(cbor.tags) = { name: "claimSignature" }];
HashedUri thumbnail = 10;
string description = 11;
string informational_uri = 12 [(cbor.tags) = { name: "informationalURI" }];
string digital_source_type = 14 [(cbor.tags) = { name: "digitalSourceType" }];
reserved 13;
}
// Changes/deltas between the current and previous validation results for each
// ingredient's manifest.
// See `ingredient-delta-validation-result-map` at
// https://spec.c2pa.org/specifications/specifications/2.4/specs/C2PA_Specification.html#_returning_validation_results.
message IngredientDeltaValidationResult {
string ingredient_assertion_uri = 1
[(cbor.tags) = { name: "ingredientAssertionURI", is_required: true }];
ValidationStatusSet validation_deltas = 2
[(cbor.tags) = { name: "validationDeltas", is_required: true }];
}
// Results from the claim generator performing full validation.
// See `validation-results-map` at
// https://spec.c2pa.org/specifications/specifications/2.4/specs/C2PA_Specification.html#_returning_validation_results.
message IngredientValidationResults {
ValidationStatusSet active_manifest = 1
[(cbor.tags) = { name: "activeManifest" }];
repeated IngredientDeltaValidationResult ingredient_deltas = 2
[(cbor.tags) = { name: "ingredientDeltas" }];
string spec_version = 6 [(cbor.tags) = { name: "specVersion" }];
string trust_list_uri = 7 [(cbor.tags) = { name: "trustListUri" }];
reserved 3, 4, 5;
}