#[if_struct_macro::serde_default]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Policy {
#[prost(string, tag = "1")]
pub api_version: ::prost::alloc::string::String,
#[prost(bool, tag = "2")]
pub disabled: bool,
#[prost(string, tag = "3")]
pub description: ::prost::alloc::string::String,
#[prost(message, optional, tag = "4")]
pub metadata: ::core::option::Option<Metadata>,
#[prost(map = "string, string", tag = "8")]
pub variables: ::std::collections::HashMap<
::prost::alloc::string::String,
::prost::alloc::string::String,
>,
#[prost(string, tag = "9")]
pub json_schema: ::prost::alloc::string::String,
#[prost(oneof = "policy::PolicyType", tags = "5, 6, 7, 10, 11, 12")]
pub policy_type: ::core::option::Option<policy::PolicyType>,
}
pub mod policy {
#[if_struct_macro::serde_default]
#[cfg_attr(
feature = "serde",
derive(serde::Deserialize),
serde(rename_all = "camelCase")
)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum PolicyType {
#[prost(message, tag = "5")]
ResourcePolicy(super::ResourcePolicy),
#[prost(message, tag = "6")]
PrincipalPolicy(super::PrincipalPolicy),
#[prost(message, tag = "7")]
DerivedRoles(super::DerivedRoles),
#[prost(message, tag = "10")]
ExportVariables(super::ExportVariables),
#[prost(message, tag = "11")]
RolePolicy(super::RolePolicy),
#[prost(message, tag = "12")]
ExportConstants(super::ExportConstants),
}
}
#[if_struct_macro::serde_default]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SourceAttributes {
#[prost(map = "string, message", tag = "1")]
pub attributes: ::std::collections::HashMap<
::prost::alloc::string::String,
super::super::super::google::protobuf::Value,
>,
}
#[if_struct_macro::serde_default]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Metadata {
#[prost(string, tag = "1")]
pub source_file: ::prost::alloc::string::String,
#[prost(map = "string, string", tag = "2")]
pub annotations: ::std::collections::HashMap<
::prost::alloc::string::String,
::prost::alloc::string::String,
>,
#[prost(message, optional, tag = "3")]
pub hash: ::core::option::Option<super::super::super::google::protobuf::UInt64Value>,
#[deprecated]
#[prost(string, tag = "4")]
pub store_identifer: ::prost::alloc::string::String,
#[prost(string, tag = "5")]
pub store_identifier: ::prost::alloc::string::String,
#[prost(message, optional, tag = "6")]
pub source_attributes: ::core::option::Option<SourceAttributes>,
}
#[if_struct_macro::serde_default]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ResourcePolicy {
#[prost(string, tag = "1")]
pub resource: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub version: ::prost::alloc::string::String,
#[prost(string, repeated, tag = "3")]
pub import_derived_roles: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(message, repeated, tag = "4")]
pub rules: ::prost::alloc::vec::Vec<ResourceRule>,
#[prost(string, tag = "5")]
pub scope: ::prost::alloc::string::String,
#[prost(message, optional, tag = "6")]
pub schemas: ::core::option::Option<Schemas>,
#[prost(message, optional, tag = "7")]
pub variables: ::core::option::Option<Variables>,
#[prost(enumeration = "ScopePermissions", tag = "8")]
pub scope_permissions: i32,
#[prost(message, optional, tag = "9")]
pub constants: ::core::option::Option<Constants>,
}
#[if_struct_macro::serde_default]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ResourceRule {
#[prost(string, repeated, tag = "1")]
pub actions: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(string, repeated, tag = "2")]
pub derived_roles: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(string, repeated, tag = "3")]
pub roles: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(message, optional, tag = "4")]
pub condition: ::core::option::Option<Condition>,
#[prost(enumeration = "super::super::effect::v1::Effect", tag = "5")]
#[cfg_attr(
feature = "serde",
serde(deserialize_with = "crate::sdk::deser::deserialize_effect")
)]
pub effect: i32,
#[prost(string, tag = "6")]
pub name: ::prost::alloc::string::String,
#[prost(message, optional, tag = "7")]
pub output: ::core::option::Option<Output>,
}
#[if_struct_macro::serde_default]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RolePolicy {
#[prost(string, repeated, tag = "5")]
pub parent_roles: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(string, tag = "2")]
pub scope: ::prost::alloc::string::String,
#[prost(message, repeated, tag = "3")]
pub rules: ::prost::alloc::vec::Vec<RoleRule>,
#[deprecated]
#[prost(enumeration = "ScopePermissions", tag = "4")]
pub scope_permissions: i32,
#[prost(oneof = "role_policy::PolicyType", tags = "1")]
pub policy_type: ::core::option::Option<role_policy::PolicyType>,
}
pub mod role_policy {
#[if_struct_macro::serde_default]
#[cfg_attr(
feature = "serde",
derive(serde::Deserialize),
serde(rename_all = "camelCase")
)]
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
pub enum PolicyType {
#[prost(string, tag = "1")]
Role(::prost::alloc::string::String),
}
}
#[if_struct_macro::serde_default]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RoleRule {
#[prost(string, tag = "1")]
pub resource: ::prost::alloc::string::String,
#[prost(string, repeated, tag = "2")]
pub allow_actions: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(message, optional, tag = "3")]
pub condition: ::core::option::Option<Condition>,
}
#[if_struct_macro::serde_default]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PrincipalPolicy {
#[prost(string, tag = "1")]
pub principal: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub version: ::prost::alloc::string::String,
#[prost(message, repeated, tag = "3")]
pub rules: ::prost::alloc::vec::Vec<PrincipalRule>,
#[prost(string, tag = "4")]
pub scope: ::prost::alloc::string::String,
#[prost(message, optional, tag = "5")]
pub variables: ::core::option::Option<Variables>,
#[prost(enumeration = "ScopePermissions", tag = "6")]
pub scope_permissions: i32,
#[prost(message, optional, tag = "7")]
pub constants: ::core::option::Option<Constants>,
}
#[if_struct_macro::serde_default]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PrincipalRule {
#[prost(string, tag = "1")]
pub resource: ::prost::alloc::string::String,
#[prost(message, repeated, tag = "2")]
pub actions: ::prost::alloc::vec::Vec<principal_rule::Action>,
}
pub mod principal_rule {
#[if_struct_macro::serde_default]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Action {
#[prost(string, tag = "1")]
pub action: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub condition: ::core::option::Option<super::Condition>,
#[prost(enumeration = "super::super::super::effect::v1::Effect", tag = "3")]
#[cfg_attr(
feature = "serde",
serde(deserialize_with = "crate::sdk::deser::deserialize_effect")
)]
pub effect: i32,
#[prost(string, tag = "4")]
pub name: ::prost::alloc::string::String,
#[prost(message, optional, tag = "5")]
pub output: ::core::option::Option<super::Output>,
}
}
#[if_struct_macro::serde_default]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DerivedRoles {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
#[prost(message, repeated, tag = "2")]
pub definitions: ::prost::alloc::vec::Vec<RoleDef>,
#[prost(message, optional, tag = "3")]
pub variables: ::core::option::Option<Variables>,
#[prost(message, optional, tag = "4")]
pub constants: ::core::option::Option<Constants>,
}
#[if_struct_macro::serde_default]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RoleDef {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
#[prost(string, repeated, tag = "2")]
pub parent_roles: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(message, optional, tag = "3")]
pub condition: ::core::option::Option<Condition>,
}
#[if_struct_macro::serde_default]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ExportConstants {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
#[prost(map = "string, message", tag = "2")]
pub definitions: ::std::collections::HashMap<
::prost::alloc::string::String,
super::super::super::google::protobuf::Value,
>,
}
#[if_struct_macro::serde_default]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Constants {
#[prost(string, repeated, tag = "1")]
pub import: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(map = "string, message", tag = "2")]
pub local: ::std::collections::HashMap<
::prost::alloc::string::String,
super::super::super::google::protobuf::Value,
>,
}
#[if_struct_macro::serde_default]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ExportVariables {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
#[prost(map = "string, string", tag = "2")]
pub definitions: ::std::collections::HashMap<
::prost::alloc::string::String,
::prost::alloc::string::String,
>,
}
#[if_struct_macro::serde_default]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Variables {
#[prost(string, repeated, tag = "1")]
pub import: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(map = "string, string", tag = "2")]
pub local: ::std::collections::HashMap<
::prost::alloc::string::String,
::prost::alloc::string::String,
>,
}
#[if_struct_macro::serde_default]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Condition {
#[prost(oneof = "condition::Condition", tags = "1, 2")]
#[cfg_attr(feature = "serde", serde(flatten))]
pub condition: ::core::option::Option<condition::Condition>,
}
pub mod condition {
#[if_struct_macro::serde_default]
#[cfg_attr(
feature = "serde",
derive(serde::Deserialize),
serde(rename_all = "camelCase")
)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Condition {
#[prost(message, tag = "1")]
Match(super::Match),
#[prost(string, tag = "2")]
Script(::prost::alloc::string::String),
}
}
#[if_struct_macro::serde_default]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Match {
#[prost(oneof = "r#match::Op", tags = "1, 2, 3, 4")]
#[cfg_attr(feature = "serde", serde(flatten))]
pub op: ::core::option::Option<r#match::Op>,
}
pub mod r#match {
#[if_struct_macro::serde_default]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ExprList {
#[prost(message, repeated, tag = "1")]
pub of: ::prost::alloc::vec::Vec<super::Match>,
}
#[if_struct_macro::serde_default]
#[cfg_attr(
feature = "serde",
derive(serde::Deserialize),
serde(rename_all = "camelCase")
)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Op {
#[prost(message, tag = "1")]
All(ExprList),
#[prost(message, tag = "2")]
Any(ExprList),
#[prost(message, tag = "3")]
None(ExprList),
#[prost(string, tag = "4")]
Expr(::prost::alloc::string::String),
}
}
#[if_struct_macro::serde_default]
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct Output {
#[deprecated]
#[prost(string, tag = "1")]
pub expr: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub when: ::core::option::Option<output::When>,
}
pub mod output {
#[if_struct_macro::serde_default]
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct When {
#[prost(string, tag = "1")]
pub rule_activated: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub condition_not_met: ::prost::alloc::string::String,
}
}
#[if_struct_macro::serde_default]
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct Schemas {
#[prost(message, optional, tag = "1")]
pub principal_schema: ::core::option::Option<schemas::Schema>,
#[prost(message, optional, tag = "2")]
pub resource_schema: ::core::option::Option<schemas::Schema>,
}
pub mod schemas {
#[if_struct_macro::serde_default]
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct IgnoreWhen {
#[prost(string, repeated, tag = "1")]
pub actions: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[if_struct_macro::serde_default]
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct Schema {
#[prost(string, tag = "1")]
pub r#ref: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub ignore_when: ::core::option::Option<IgnoreWhen>,
}
}
#[if_struct_macro::serde_default]
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct TestFixture {}
pub mod test_fixture {
#[if_struct_macro::serde_default]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Principals {
#[prost(map = "string, message", tag = "1")]
pub principals: ::std::collections::HashMap<
::prost::alloc::string::String,
super::super::super::engine::v1::Principal,
>,
#[prost(string, tag = "2")]
pub json_schema: ::prost::alloc::string::String,
#[prost(map = "string, message", tag = "3")]
pub principal_groups: ::std::collections::HashMap<
::prost::alloc::string::String,
super::test_fixture_group::Principals,
>,
}
#[if_struct_macro::serde_default]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Resources {
#[prost(map = "string, message", tag = "1")]
pub resources: ::std::collections::HashMap<
::prost::alloc::string::String,
super::super::super::engine::v1::Resource,
>,
#[prost(string, tag = "2")]
pub json_schema: ::prost::alloc::string::String,
#[prost(map = "string, message", tag = "3")]
pub resource_groups: ::std::collections::HashMap<
::prost::alloc::string::String,
super::test_fixture_group::Resources,
>,
}
#[if_struct_macro::serde_default]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AuxData {
#[prost(map = "string, message", tag = "1")]
pub aux_data: ::std::collections::HashMap<
::prost::alloc::string::String,
super::super::super::engine::v1::AuxData,
>,
#[prost(string, tag = "2")]
pub json_schema: ::prost::alloc::string::String,
}
}
#[if_struct_macro::serde_default]
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct TestFixtureGroup {}
pub mod test_fixture_group {
#[if_struct_macro::serde_default]
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct Principals {
#[prost(string, repeated, tag = "1")]
pub principals: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[if_struct_macro::serde_default]
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct Resources {
#[prost(string, repeated, tag = "1")]
pub resources: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
}
#[if_struct_macro::serde_default]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TestOptions {
#[prost(message, optional, tag = "1")]
pub now: ::core::option::Option<super::super::super::google::protobuf::Timestamp>,
#[prost(bool, tag = "2")]
pub lenient_scope_search: bool,
#[prost(map = "string, message", tag = "3")]
pub globals: ::std::collections::HashMap<
::prost::alloc::string::String,
super::super::super::google::protobuf::Value,
>,
#[prost(string, tag = "4")]
pub default_policy_version: ::prost::alloc::string::String,
}
#[if_struct_macro::serde_default]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TestSuite {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub description: ::prost::alloc::string::String,
#[prost(bool, tag = "3")]
pub skip: bool,
#[prost(string, tag = "4")]
pub skip_reason: ::prost::alloc::string::String,
#[prost(message, repeated, tag = "5")]
pub tests: ::prost::alloc::vec::Vec<TestTable>,
#[prost(map = "string, message", tag = "6")]
pub principals: ::std::collections::HashMap<
::prost::alloc::string::String,
super::super::engine::v1::Principal,
>,
#[prost(map = "string, message", tag = "7")]
pub resources: ::std::collections::HashMap<
::prost::alloc::string::String,
super::super::engine::v1::Resource,
>,
#[prost(map = "string, message", tag = "8")]
pub aux_data: ::std::collections::HashMap<
::prost::alloc::string::String,
super::super::engine::v1::AuxData,
>,
#[prost(message, optional, tag = "9")]
pub options: ::core::option::Option<TestOptions>,
#[prost(string, tag = "10")]
pub json_schema: ::prost::alloc::string::String,
#[prost(map = "string, message", tag = "11")]
pub principal_groups: ::std::collections::HashMap<
::prost::alloc::string::String,
test_fixture_group::Principals,
>,
#[prost(map = "string, message", tag = "12")]
pub resource_groups: ::std::collections::HashMap<
::prost::alloc::string::String,
test_fixture_group::Resources,
>,
}
#[if_struct_macro::serde_default]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TestTable {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub description: ::prost::alloc::string::String,
#[prost(bool, tag = "3")]
pub skip: bool,
#[prost(string, tag = "4")]
pub skip_reason: ::prost::alloc::string::String,
#[prost(message, optional, tag = "5")]
pub input: ::core::option::Option<test_table::Input>,
#[prost(message, repeated, tag = "6")]
pub expected: ::prost::alloc::vec::Vec<test_table::Expectation>,
#[prost(message, optional, tag = "7")]
pub options: ::core::option::Option<TestOptions>,
}
pub mod test_table {
#[if_struct_macro::serde_default]
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct Input {
#[prost(string, repeated, tag = "1")]
pub principals: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(string, repeated, tag = "2")]
pub resources: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(string, repeated, tag = "3")]
pub actions: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(string, tag = "4")]
pub aux_data: ::prost::alloc::string::String,
#[prost(string, repeated, tag = "5")]
pub principal_groups: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(string, repeated, tag = "6")]
pub resource_groups: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[if_struct_macro::serde_default]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct OutputExpectations {
#[prost(string, tag = "1")]
pub action: ::prost::alloc::string::String,
#[prost(message, repeated, tag = "2")]
pub expected: ::prost::alloc::vec::Vec<
super::super::super::engine::v1::OutputEntry,
>,
}
#[if_struct_macro::serde_default]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Expectation {
#[prost(string, tag = "1")]
pub principal: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub resource: ::prost::alloc::string::String,
#[prost(
map = "string, enumeration(super::super::super::effect::v1::Effect)",
tag = "3"
)]
pub actions: ::std::collections::HashMap<::prost::alloc::string::String, i32>,
#[prost(message, repeated, tag = "4")]
pub outputs: ::prost::alloc::vec::Vec<OutputExpectations>,
#[prost(string, repeated, tag = "5")]
pub principals: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(string, repeated, tag = "6")]
pub resources: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(string, repeated, tag = "7")]
pub principal_groups: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(string, repeated, tag = "8")]
pub resource_groups: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
}
#[if_struct_macro::serde_default]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Test {
#[prost(message, optional, tag = "1")]
pub name: ::core::option::Option<test::TestName>,
#[prost(string, tag = "2")]
pub description: ::prost::alloc::string::String,
#[prost(bool, tag = "3")]
pub skip: bool,
#[prost(string, tag = "4")]
pub skip_reason: ::prost::alloc::string::String,
#[prost(message, optional, tag = "5")]
pub input: ::core::option::Option<super::super::engine::v1::CheckInput>,
#[prost(map = "string, enumeration(super::super::effect::v1::Effect)", tag = "6")]
pub expected: ::std::collections::HashMap<::prost::alloc::string::String, i32>,
#[prost(message, optional, tag = "7")]
pub options: ::core::option::Option<TestOptions>,
#[prost(map = "string, message", tag = "8")]
pub expected_outputs: ::std::collections::HashMap<
::prost::alloc::string::String,
test::OutputEntries,
>,
}
pub mod test {
#[if_struct_macro::serde_default]
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct TestName {
#[prost(string, tag = "1")]
pub test_table_name: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub principal_key: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub resource_key: ::prost::alloc::string::String,
}
#[if_struct_macro::serde_default]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct OutputEntries {
#[prost(map = "string, message", tag = "1")]
pub entries: ::std::collections::HashMap<
::prost::alloc::string::String,
super::super::super::super::google::protobuf::Value,
>,
}
}
#[if_struct_macro::serde_default]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TestResults {
#[prost(message, repeated, tag = "1")]
pub suites: ::prost::alloc::vec::Vec<test_results::Suite>,
#[prost(message, optional, tag = "2")]
pub summary: ::core::option::Option<test_results::Summary>,
}
pub mod test_results {
#[if_struct_macro::serde_default]
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct Tally {
#[prost(enumeration = "Result", tag = "1")]
pub result: i32,
#[prost(uint32, tag = "2")]
pub count: u32,
}
#[if_struct_macro::serde_default]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Summary {
#[prost(enumeration = "Result", tag = "1")]
pub overall_result: i32,
#[prost(uint32, tag = "2")]
pub tests_count: u32,
#[prost(message, repeated, tag = "3")]
pub result_counts: ::prost::alloc::vec::Vec<Tally>,
}
#[if_struct_macro::serde_default]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Suite {
#[prost(string, tag = "1")]
pub file: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub name: ::prost::alloc::string::String,
#[deprecated]
#[prost(message, repeated, tag = "3")]
pub principals: ::prost::alloc::vec::Vec<Principal>,
#[prost(message, optional, tag = "4")]
pub summary: ::core::option::Option<Summary>,
#[prost(string, tag = "5")]
pub error: ::prost::alloc::string::String,
#[prost(message, repeated, tag = "6")]
pub test_cases: ::prost::alloc::vec::Vec<TestCase>,
#[prost(string, tag = "7")]
pub description: ::prost::alloc::string::String,
#[prost(string, tag = "8")]
pub skip_reason: ::prost::alloc::string::String,
}
#[if_struct_macro::serde_default]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TestCase {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
#[prost(message, repeated, tag = "2")]
pub principals: ::prost::alloc::vec::Vec<Principal>,
}
#[if_struct_macro::serde_default]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Principal {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
#[prost(message, repeated, tag = "2")]
pub resources: ::prost::alloc::vec::Vec<Resource>,
}
#[if_struct_macro::serde_default]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Resource {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
#[prost(message, repeated, tag = "2")]
pub actions: ::prost::alloc::vec::Vec<Action>,
}
#[if_struct_macro::serde_default]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Action {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub details: ::core::option::Option<Details>,
}
#[if_struct_macro::serde_default]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Details {
#[prost(enumeration = "Result", tag = "1")]
pub result: i32,
#[prost(message, repeated, tag = "4")]
pub engine_trace: ::prost::alloc::vec::Vec<
super::super::super::engine::v1::Trace,
>,
#[prost(oneof = "details::Outcome", tags = "2, 3, 5, 6")]
pub outcome: ::core::option::Option<details::Outcome>,
}
pub mod details {
#[if_struct_macro::serde_default]
#[cfg_attr(
feature = "serde",
derive(serde::Deserialize),
serde(rename_all = "camelCase")
)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Outcome {
#[prost(message, tag = "2")]
Failure(super::Failure),
#[prost(string, tag = "3")]
Error(::prost::alloc::string::String),
#[prost(message, tag = "5")]
Success(super::Success),
#[prost(string, tag = "6")]
SkipReason(::prost::alloc::string::String),
}
}
#[if_struct_macro::serde_default]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct OutputFailure {
#[prost(string, tag = "1")]
pub src: ::prost::alloc::string::String,
#[prost(oneof = "output_failure::Outcome", tags = "2, 3")]
pub outcome: ::core::option::Option<output_failure::Outcome>,
}
pub mod output_failure {
#[if_struct_macro::serde_default]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MismatchedValue {
#[prost(message, optional, tag = "1")]
pub expected: ::core::option::Option<
super::super::super::super::super::google::protobuf::Value,
>,
#[prost(message, optional, tag = "2")]
pub actual: ::core::option::Option<
super::super::super::super::super::google::protobuf::Value,
>,
}
#[if_struct_macro::serde_default]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MissingValue {
#[prost(message, optional, tag = "1")]
pub expected: ::core::option::Option<
super::super::super::super::super::google::protobuf::Value,
>,
}
#[if_struct_macro::serde_default]
#[cfg_attr(
feature = "serde",
derive(serde::Deserialize),
serde(rename_all = "camelCase")
)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Outcome {
#[prost(message, tag = "2")]
Mismatched(MismatchedValue),
#[prost(message, tag = "3")]
Missing(MissingValue),
}
}
#[if_struct_macro::serde_default]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Failure {
#[prost(enumeration = "super::super::super::effect::v1::Effect", tag = "1")]
pub expected: i32,
#[prost(enumeration = "super::super::super::effect::v1::Effect", tag = "2")]
pub actual: i32,
#[prost(message, repeated, tag = "3")]
pub outputs: ::prost::alloc::vec::Vec<OutputFailure>,
}
#[if_struct_macro::serde_default]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Success {
#[prost(enumeration = "super::super::super::effect::v1::Effect", tag = "1")]
pub effect: i32,
#[prost(message, repeated, tag = "2")]
pub outputs: ::prost::alloc::vec::Vec<
super::super::super::engine::v1::OutputEntry,
>,
}
#[if_struct_macro::serde_default]
#[cfg_attr(
feature = "serde",
derive(serde::Deserialize),
serde(rename_all = "camelCase")
)]
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum Result {
Unspecified = 0,
Skipped = 1,
Passed = 2,
Failed = 3,
Errored = 4,
}
impl Result {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Unspecified => "RESULT_UNSPECIFIED",
Self::Skipped => "RESULT_SKIPPED",
Self::Passed => "RESULT_PASSED",
Self::Failed => "RESULT_FAILED",
Self::Errored => "RESULT_ERRORED",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"RESULT_UNSPECIFIED" => Some(Self::Unspecified),
"RESULT_SKIPPED" => Some(Self::Skipped),
"RESULT_PASSED" => Some(Self::Passed),
"RESULT_FAILED" => Some(Self::Failed),
"RESULT_ERRORED" => Some(Self::Errored),
_ => None,
}
}
}
}
#[if_struct_macro::serde_default]
#[cfg_attr(
feature = "serde",
derive(serde::Deserialize),
serde(rename_all = "camelCase")
)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum Kind {
Unspecified = 0,
DerivedRoles = 1,
ExportVariables = 2,
Principal = 3,
Resource = 4,
RolePolicy = 5,
ExportConstants = 6,
}
impl Kind {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Unspecified => "KIND_UNSPECIFIED",
Self::DerivedRoles => "KIND_DERIVED_ROLES",
Self::ExportVariables => "KIND_EXPORT_VARIABLES",
Self::Principal => "KIND_PRINCIPAL",
Self::Resource => "KIND_RESOURCE",
Self::RolePolicy => "KIND_ROLE_POLICY",
Self::ExportConstants => "KIND_EXPORT_CONSTANTS",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"KIND_UNSPECIFIED" => Some(Self::Unspecified),
"KIND_DERIVED_ROLES" => Some(Self::DerivedRoles),
"KIND_EXPORT_VARIABLES" => Some(Self::ExportVariables),
"KIND_PRINCIPAL" => Some(Self::Principal),
"KIND_RESOURCE" => Some(Self::Resource),
"KIND_ROLE_POLICY" => Some(Self::RolePolicy),
"KIND_EXPORT_CONSTANTS" => Some(Self::ExportConstants),
_ => None,
}
}
}
#[if_struct_macro::serde_default]
#[cfg_attr(
feature = "serde",
derive(serde::Deserialize),
serde(rename_all = "camelCase")
)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum ScopePermissions {
Unspecified = 0,
OverrideParent = 1,
RequireParentalConsentForAllows = 2,
}
impl ScopePermissions {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Unspecified => "SCOPE_PERMISSIONS_UNSPECIFIED",
Self::OverrideParent => "SCOPE_PERMISSIONS_OVERRIDE_PARENT",
Self::RequireParentalConsentForAllows => {
"SCOPE_PERMISSIONS_REQUIRE_PARENTAL_CONSENT_FOR_ALLOWS"
}
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"SCOPE_PERMISSIONS_UNSPECIFIED" => Some(Self::Unspecified),
"SCOPE_PERMISSIONS_OVERRIDE_PARENT" => Some(Self::OverrideParent),
"SCOPE_PERMISSIONS_REQUIRE_PARENTAL_CONSENT_FOR_ALLOWS" => {
Some(Self::RequireParentalConsentForAllows)
}
_ => None,
}
}
}