| // 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/generator_info.proto"; |
| import "proto/hashed_uri.proto"; |
| |
| // An assertion that provides information on edits and other actions taken that |
| // affect the asset’s content. |
| // |
| // See |
| // https://spec.c2pa.org/specifications/specifications/2.4/specs/C2PA_Specification.html#_actions |
| // for more details. |
| message ActionsAssertion { |
| // A list of actions on the asset. |
| repeated ActionItem actions = 1 |
| [(cbor.tags) = { is_required: true, disallow_empty: true }]; |
| // A list of templates for the actions. |
| // See template behavior in |
| // https://spec.c2pa.org/specifications/specifications/2.4/specs/C2PA_Specification.html#_action_templates |
| repeated ActionTemplate templates = 2; |
| repeated GeneratorInfo software_agents = 4 |
| [(cbor.tags) = { name: "softwareAgents" }]; |
| |
| // If true, indicates that all actions performed are included in an actions |
| // assertion. This must be set to a value to be considered conformant. |
| bool all_actions_included = 5 [(cbor.tags) = { name: "allActionsIncluded" }]; |
| reserved 3; |
| } |
| |
| message ActionsAssertionV1 { |
| // A list of actions on the asset. |
| repeated ActionItemV1 actions = 1 |
| [(cbor.tags) = { is_required: true, disallow_empty: true }]; |
| reserved 2; |
| } |
| |
| message ActionItem { |
| string action = 1 [(cbor.tags) = { is_required: true }]; |
| string description = 2; |
| string digital_source_type = 3 [(cbor.tags) = { name: "digitalSourceType" }]; |
| GeneratorInfo software_agent = 4 [(cbor.tags) = { name: "softwareAgent" }]; |
| int64 software_agent_index = 10 |
| [(cbor.tags) = { name: "softwareAgentIndex" }]; |
| // List of related actions. |
| repeated ActionItem related_actions = 6 [(cbor.tags) = { name: "related" }]; |
| // The reason why this action was performed, required when the action is |
| // `c2pa.redacted` |
| string reason = 7; |
| // Additional parameters of the action. |
| ActionParameters parameters = 9; |
| |
| reserved 5, 8; |
| } |
| |
| message ActionItemV1 { |
| string action = 1 [(cbor.tags) = { is_required: true }]; |
| string digital_source_type = 2 [(cbor.tags) = { name: "digitalSourceType" }]; |
| // Additional parameters of the action. |
| ActionParameters parameters = 3; |
| } |
| |
| message ActionTemplate { |
| string action = 1 [(cbor.tags) = { is_required: true }]; |
| string description = 2; |
| string digital_source_type = 3 [(cbor.tags) = { name: "digitalSourceType" }]; |
| GeneratorInfo software_agent = 4 [(cbor.tags) = { name: "softwareAgent" }]; |
| // Either an internal URI (representing an icon embedded in the manifest |
| // store) or an external URI. |
| InternalOrExternalHashedUri icon = 5; |
| // Additional parameters of the template. |
| repeated ActionParameters.Data parameters = 6 |
| [(cbor.tags) = { name: "templateParameters" }]; |
| } |
| |
| // Parameters for actions. |
| // |
| // See `parameters-map-v2` in |
| // https://spec.c2pa.org/specifications/specifications/2.4/specs/C2PA_Specification.html#_schema_and_example_9 |
| // for more details. |
| message ActionParameters { |
| // UUID of the modified (output) resource. |
| string instance_id = 1 [(cbor.tags) = { name: "instanceID" }]; |
| // JUMBF URI to the redacted assertion (required for `c2pa.redacted` action). |
| string redacted_uri = 2 [(cbor.tags) = { name: "redacted" }]; |
| // List of JUMBF URIs to ingredient assertions. |
| repeated HashedUri ingredients = 3; |
| // For v1 action assertions. When parsing CBOR, the contents of this field |
| // will be moved to the `ingredients` field, so it should always be empty. |
| HashedUri ingredient = 7; |
| // See `parameters-common-map-v2` in |
| // https://spec.c2pa.org/specifications/specifications/2.4/specs/C2PA_Specification.html#_schema_and_example_9 |
| // for more details. |
| message Data { |
| string key = 1; |
| bytes value = 2; |
| } |
| // A list of arbitrary string-to-value data. |
| repeated Data data = 4; |
| // BCP-47 code of the source language of a `c2pa.translated` action. |
| string source_language = 5 [(cbor.tags) = { name: "sourceLanguage" }]; |
| // BCP-47 code of the target language of a `c2pa.translated` action. |
| string target_language = 6 [(cbor.tags) = { name: "targetLanguage" }]; |
| // Was this action performed multiple times? |
| bool multiple_instances = 8 [(cbor.tags) = { name: "multipleInstances" }]; |
| // JUMBF URIs to related assertions. |
| repeated HashedUri related_assertions = 9 |
| [(cbor.tags) = { name: "relatedAssertions", disallow_empty: true }]; |
| } |