use std::time::Duration;
use chrono::prelude::*;
use derive_builder::Builder;
use getset::Getters;
use getset::Setters;
use getset::MutGetters;
#[cfg(feature = "with_serde")]use serde_derive::{Serialize, Deserialize};
use url::Url;
pub mod dfc {
use super::*;
mod product_batch {
use super::*;
#[derive(Debug, Clone, PartialEq, Builder, Getters)]
#[cfg_attr(feature = "with_serde", derive(Serialize, Deserialize))]
#[derive(Setters)]
#[derive(MutGetters)]
#[builder(pattern = "owned", setter(into))]
#[getset(get = "pub", set = "pub", get_mut = "pub")]
pub struct ProductBatch {
batch_number: String,
#[cfg_attr(feature = "with_serde", serde(default = "Default::default", skip_serializing_if = "Option::is_none"))]
#[builder(default)]
expiry_date: Option<DateTime<Utc>>,
#[cfg_attr(feature = "with_serde", serde(default = "Default::default", skip_serializing_if = "Option::is_none"))]
#[builder(default)]
production_date: Option<DateTime<Utc>>,
}
impl ProductBatch {
#[allow(dead_code)]
pub fn builder() -> ProductBatchBuilder {
ProductBatchBuilder {
batch_number: None,
expiry_date: None,
production_date: None,
}
}
#[allow(dead_code)]
pub fn into_builder(self) -> ProductBatchBuilder {
let ProductBatch { batch_number, expiry_date, production_date } = self;
let mut builder = Self::builder();
builder = builder.batch_number(batch_number);
builder = match expiry_date { Some(x) => builder.expiry_date(x), None => builder };
builder = match production_date { Some(x) => builder.production_date(x), None => builder };
builder
}
}
}
pub use product_batch::ProductBatch;
pub mod builders {
pub use super::product_batch::ProductBatchBuilder;
}
}
pub mod geo {
use super::*;
mod spatial_thing {
use super::*;
#[derive(Debug, Clone, PartialEq, Builder, Getters)]
#[cfg_attr(feature = "with_serde", derive(Serialize, Deserialize))]
#[derive(Setters)]
#[derive(MutGetters)]
#[builder(pattern = "owned", setter(into))]
#[getset(get = "pub", set = "pub", get_mut = "pub")]
pub struct SpatialThing {
#[cfg_attr(feature = "with_serde", serde(default = "Default::default", skip_serializing_if = "Option::is_none"))]
#[builder(default)]
alt: Option<f64>,
#[cfg_attr(feature = "with_serde", serde(default = "Default::default", skip_serializing_if = "Option::is_none"))]
#[builder(default)]
lat: Option<f64>,
#[cfg_attr(feature = "with_serde", serde(default = "Default::default", skip_serializing_if = "Option::is_none"))]
#[builder(default)]
long: Option<f64>,
#[cfg_attr(feature = "with_serde", serde(default = "Default::default", skip_serializing_if = "Option::is_none"))]
#[builder(default)]
mappable_address: Option<String>,
#[cfg_attr(feature = "with_serde", serde(default = "Default::default", skip_serializing_if = "Option::is_none"))]
#[builder(default)]
name: Option<String>,
#[cfg_attr(feature = "with_serde", serde(default = "Default::default", skip_serializing_if = "Option::is_none"))]
#[builder(default)]
note: Option<String>,
}
impl SpatialThing {
#[allow(dead_code)]
pub fn builder() -> SpatialThingBuilder {
SpatialThingBuilder {
alt: None,
lat: None,
long: None,
mappable_address: None,
name: None,
note: None,
}
}
#[allow(dead_code)]
pub fn into_builder(self) -> SpatialThingBuilder {
let SpatialThing { alt, lat, long, mappable_address, name, note } = self;
let mut builder = Self::builder();
builder = match alt { Some(x) => builder.alt(x), None => builder };
builder = match lat { Some(x) => builder.lat(x), None => builder };
builder = match long { Some(x) => builder.long(x), None => builder };
builder = match mappable_address { Some(x) => builder.mappable_address(x), None => builder };
builder = match name { Some(x) => builder.name(x), None => builder };
builder = match note { Some(x) => builder.note(x), None => builder };
builder
}
}
}
pub use spatial_thing::SpatialThing;
pub mod builders {
pub use super::spatial_thing::SpatialThingBuilder;
}
}
pub mod vf {
use super::*;
#[derive(Debug, PartialEq, Clone)]
#[cfg_attr(feature = "with_serde", derive(Serialize, Deserialize))]
pub enum CommitmentEconomicEventIntentUnion<COMMITMENT, ECONOMICEVENT, INTENT> {
Commitment(COMMITMENT),
EconomicEvent(ECONOMICEVENT),
Intent(INTENT),
}
#[derive(Debug, PartialEq, Clone)]
#[cfg_attr(feature = "with_serde", derive(Serialize, Deserialize))]
pub enum CommitmentIntentProcessUnion<COMMITMENT, INTENT, PROCESS> {
Commitment(COMMITMENT),
Intent(INTENT),
Process(PROCESS),
}
#[derive(Debug, PartialEq, Clone)]
#[cfg_attr(feature = "with_serde", derive(Serialize, Deserialize))]
pub enum AccountableEffect {
#[cfg_attr(feature = "with_serde", serde(rename = "remove"))]
New,
#[cfg_attr(feature = "with_serde", serde(rename = "update"))]
UpdateTo,
}
#[derive(Debug, PartialEq, Clone)]
#[cfg_attr(feature = "with_serde", derive(Serialize, Deserialize))]
pub enum AccountingEffect {
#[cfg_attr(feature = "with_serde", serde(rename = "decrement"))]
Decrement,
#[cfg_attr(feature = "with_serde", serde(rename = "decrement-increment"))]
DecrementIncrement,
#[cfg_attr(feature = "with_serde", serde(rename = "increment"))]
Increment,
#[cfg_attr(feature = "with_serde", serde(rename = "increment-to"))]
IncrementTo,
}
#[derive(Debug, PartialEq, Clone)]
#[cfg_attr(feature = "with_serde", derive(Serialize, Deserialize))]
pub enum Action {
#[cfg_attr(feature = "with_serde", serde(rename = "accept"))]
Accept,
#[cfg_attr(feature = "with_serde", serde(rename = "cite"))]
Cite,
#[cfg_attr(feature = "with_serde", serde(rename = "combine"))]
Combine,
#[cfg_attr(feature = "with_serde", serde(rename = "consume"))]
Consume,
#[cfg_attr(feature = "with_serde", serde(rename = "copy"))]
Copy,
#[cfg_attr(feature = "with_serde", serde(rename = "deliver-service"))]
DeliverService,
#[cfg_attr(feature = "with_serde", serde(rename = "dropoff"))]
Dropoff,
#[cfg_attr(feature = "with_serde", serde(rename = "lower"))]
Lower,
#[cfg_attr(feature = "with_serde", serde(rename = "modify"))]
Modify,
#[cfg_attr(feature = "with_serde", serde(rename = "move"))]
Move,
#[cfg_attr(feature = "with_serde", serde(rename = "pickup"))]
Pickup,
#[cfg_attr(feature = "with_serde", serde(rename = "produce"))]
Produce,
#[cfg_attr(feature = "with_serde", serde(rename = "raise"))]
Raise,
#[cfg_attr(feature = "with_serde", serde(rename = "unpack"))]
Separate,
#[cfg_attr(feature = "with_serde", serde(rename = "transfer"))]
Transfer,
#[cfg_attr(feature = "with_serde", serde(rename = "transfer-all-rights"))]
TransferAllRights,
#[cfg_attr(feature = "with_serde", serde(rename = "transfer-custody"))]
TransferCustody,
#[cfg_attr(feature = "with_serde", serde(rename = "use"))]
Use,
#[cfg_attr(feature = "with_serde", serde(rename = "work"))]
Work,
}
impl Action {
#[allow(dead_code)]
pub fn accountable_effect(&self) -> Option<AccountableEffect> {
match self {
Self::Copy => Some(AccountableEffect::New),
Self::Lower => Some(AccountableEffect::New),
Self::Produce => Some(AccountableEffect::New),
Self::Raise => Some(AccountableEffect::New),
Self::Transfer => Some(AccountableEffect::UpdateTo),
Self::TransferAllRights => Some(AccountableEffect::UpdateTo),
_ => None,
}
}
#[allow(dead_code)]
pub fn accounting_effect(&self) -> Option<AccountingEffect> {
match self {
Self::Consume => Some(AccountingEffect::Decrement),
Self::Copy => Some(AccountingEffect::IncrementTo),
Self::Lower => Some(AccountingEffect::Decrement),
Self::Move => Some(AccountingEffect::DecrementIncrement),
Self::Produce => Some(AccountingEffect::Increment),
Self::Raise => Some(AccountingEffect::Increment),
Self::Transfer => Some(AccountingEffect::DecrementIncrement),
Self::TransferAllRights => Some(AccountingEffect::DecrementIncrement),
_ => None,
}
}
#[allow(dead_code)]
pub fn can_create_resource(&self) -> Option<CreateResource> {
match self {
_ => None,
}
}
#[allow(dead_code)]
pub fn contained_effect(&self) -> Option<ContainedEffect> {
match self {
Self::Combine => Some(ContainedEffect::Update),
Self::Separate => Some(ContainedEffect::Remove),
_ => None,
}
}
#[allow(dead_code)]
pub fn event_quantity(&self) -> EventQuantity {
match self {
Self::Accept => EventQuantity::Resource,
Self::Cite => EventQuantity::Resource,
Self::Combine => EventQuantity::Resource,
Self::Consume => EventQuantity::Resource,
Self::Copy => EventQuantity::Resource,
Self::DeliverService => EventQuantity::Resource,
Self::Dropoff => EventQuantity::Resource,
Self::Lower => EventQuantity::Resource,
Self::Modify => EventQuantity::Resource,
Self::Move => EventQuantity::Resource,
Self::Pickup => EventQuantity::Resource,
Self::Produce => EventQuantity::Resource,
Self::Raise => EventQuantity::Resource,
Self::Separate => EventQuantity::Resource,
Self::Transfer => EventQuantity::Resource,
Self::TransferAllRights => EventQuantity::Resource,
Self::TransferCustody => EventQuantity::Resource,
Self::Use => EventQuantity::Both,
Self::Work => EventQuantity::Effort,
}
}
#[allow(dead_code)]
pub fn input_output(&self) -> Option<InputOutput> {
match self {
Self::Accept => Some(InputOutput::Input),
Self::Cite => Some(InputOutput::Input),
Self::Combine => Some(InputOutput::Input),
Self::Consume => Some(InputOutput::Input),
Self::DeliverService => Some(InputOutput::OutputInput),
Self::Dropoff => Some(InputOutput::Output),
Self::Modify => Some(InputOutput::Output),
Self::Pickup => Some(InputOutput::Input),
Self::Produce => Some(InputOutput::Output),
Self::Separate => Some(InputOutput::Output),
Self::Use => Some(InputOutput::Input),
Self::Work => Some(InputOutput::Input),
_ => None,
}
}
#[allow(dead_code)]
pub fn location_effect(&self) -> Option<LocationEffect> {
match self {
Self::Accept => Some(LocationEffect::Update),
Self::Copy => Some(LocationEffect::New),
Self::Dropoff => Some(LocationEffect::Update),
Self::Modify => Some(LocationEffect::Update),
Self::Move => Some(LocationEffect::UpdateTo),
Self::Pickup => Some(LocationEffect::Update),
Self::Produce => Some(LocationEffect::New),
Self::Transfer => Some(LocationEffect::UpdateTo),
Self::TransferCustody => Some(LocationEffect::UpdateTo),
_ => None,
}
}
#[allow(dead_code)]
pub fn onhand_effect(&self) -> Option<OnhandEffect> {
match self {
Self::Accept => Some(OnhandEffect::Decrement),
Self::Combine => Some(OnhandEffect::Decrement),
Self::Consume => Some(OnhandEffect::Decrement),
Self::Copy => Some(OnhandEffect::IncrementTo),
Self::Lower => Some(OnhandEffect::Decrement),
Self::Modify => Some(OnhandEffect::Increment),
Self::Move => Some(OnhandEffect::DecrementIncrement),
Self::Produce => Some(OnhandEffect::Increment),
Self::Raise => Some(OnhandEffect::Increment),
Self::Separate => Some(OnhandEffect::Increment),
Self::Transfer => Some(OnhandEffect::DecrementIncrement),
Self::TransferCustody => Some(OnhandEffect::DecrementIncrement),
_ => None,
}
}
#[allow(dead_code)]
pub fn pairs_with(&self) -> Option<Action> {
match self {
Self::Accept => Some(Action::Modify),
Self::Dropoff => Some(Action::Pickup),
Self::Modify => Some(Action::Accept),
Self::Pickup => Some(Action::Dropoff),
_ => None,
}
}
#[allow(dead_code)]
pub fn stage_effect(&self) -> Option<StageEffect> {
match self {
Self::Dropoff => Some(StageEffect::Update),
Self::Modify => Some(StageEffect::Update),
Self::Produce => Some(StageEffect::Update),
Self::Separate => Some(StageEffect::Update),
_ => None,
}
}
#[allow(dead_code)]
pub fn state_effect(&self) -> Option<StateEffect> {
match self {
Self::Accept => Some(StateEffect::Update),
Self::Cite => Some(StateEffect::Update),
Self::Combine => Some(StateEffect::Update),
Self::Consume => Some(StateEffect::Update),
Self::Copy => Some(StateEffect::UpdateTo),
Self::Dropoff => Some(StateEffect::Update),
Self::Lower => Some(StateEffect::Update),
Self::Modify => Some(StateEffect::Update),
Self::Move => Some(StateEffect::UpdateTo),
Self::Pickup => Some(StateEffect::Update),
Self::Produce => Some(StateEffect::Update),
Self::Raise => Some(StateEffect::Update),
Self::Separate => Some(StateEffect::Update),
Self::Transfer => Some(StateEffect::UpdateTo),
Self::TransferAllRights => Some(StateEffect::UpdateTo),
Self::TransferCustody => Some(StateEffect::UpdateTo),
Self::Use => Some(StateEffect::Update),
_ => None,
}
}
}
mod agent {
use super::*;
#[derive(Debug, Clone, PartialEq, Builder, Getters)]
#[cfg_attr(feature = "with_serde", derive(Serialize, Deserialize))]
#[derive(Setters)]
#[derive(MutGetters)]
#[builder(pattern = "owned", setter(into))]
#[getset(get = "pub", set = "pub", get_mut = "pub")]
pub struct Agent {
#[cfg_attr(feature = "with_serde", serde(default = "Default::default", skip_serializing_if = "Option::is_none"))]
#[builder(default)]
image: Option<Url>,
name: String,
#[cfg_attr(feature = "with_serde", serde(default = "Default::default", skip_serializing_if = "Option::is_none"))]
#[builder(default)]
note: Option<String>,
#[cfg_attr(feature = "with_serde", serde(default = "Default::default", skip_serializing_if = "Option::is_none"))]
#[builder(default)]
primary_location: Option<geo::SpatialThing>,
}
impl Agent {
#[allow(dead_code)]
pub fn builder() -> AgentBuilder {
AgentBuilder {
image: None,
name: None,
note: None,
primary_location: None,
}
}
#[allow(dead_code)]
pub fn into_builder(self) -> AgentBuilder {
let Agent { image, name, note, primary_location } = self;
let mut builder = Self::builder();
builder = match image { Some(x) => builder.image(x), None => builder };
builder = builder.name(name);
builder = match note { Some(x) => builder.note(x), None => builder };
builder = match primary_location { Some(x) => builder.primary_location(x), None => builder };
builder
}
}
}
pub use agent::Agent;
mod agent_relationship {
use super::*;
#[derive(Debug, Clone, PartialEq, Builder, Getters)]
#[cfg_attr(feature = "with_serde", derive(Serialize, Deserialize))]
#[derive(Setters)]
#[derive(MutGetters)]
#[builder(pattern = "owned", setter(into))]
#[getset(get = "pub", set = "pub", get_mut = "pub")]
pub struct AgentRelationship<AGENT, AGENTRELATIONSHIPROLE> {
#[cfg_attr(feature = "with_serde", serde(default = "Default::default", skip_serializing_if = "Vec::is_empty"))]
#[builder(default)]
in_scope_of: Vec<AGENT>,
#[cfg_attr(feature = "with_serde", serde(default = "Default::default", skip_serializing_if = "Option::is_none"))]
#[builder(default)]
note: Option<String>,
object: AGENT,
relationship: AGENTRELATIONSHIPROLE,
subject: AGENT,
}
impl<AGENT, AGENTRELATIONSHIPROLE> AgentRelationship<AGENT, AGENTRELATIONSHIPROLE> {
#[allow(dead_code)]
pub fn builder() -> AgentRelationshipBuilder<AGENT, AGENTRELATIONSHIPROLE> {
AgentRelationshipBuilder {
in_scope_of: None,
note: None,
object: None,
relationship: None,
subject: None,
}
}
#[allow(dead_code)]
pub fn into_builder(self) -> AgentRelationshipBuilder<AGENT, AGENTRELATIONSHIPROLE> {
let AgentRelationship { in_scope_of, note, object, relationship, subject } = self;
let mut builder = Self::builder();
builder = builder.in_scope_of(in_scope_of);
builder = match note { Some(x) => builder.note(x), None => builder };
builder = builder.object(object);
builder = builder.relationship(relationship);
builder = builder.subject(subject);
builder
}
}
}
pub use agent_relationship::AgentRelationship;
mod agent_relationship_role {
use super::*;
#[derive(Debug, Clone, PartialEq, Builder, Getters)]
#[cfg_attr(feature = "with_serde", derive(Serialize, Deserialize))]
#[derive(Setters)]
#[derive(MutGetters)]
#[builder(pattern = "owned", setter(into))]
#[getset(get = "pub", set = "pub", get_mut = "pub")]
pub struct AgentRelationshipRole {
#[cfg_attr(feature = "with_serde", serde(default = "Default::default", skip_serializing_if = "Option::is_none"))]
#[builder(default)]
inverse_role_label: Option<String>,
#[cfg_attr(feature = "with_serde", serde(default = "Default::default", skip_serializing_if = "Option::is_none"))]
#[builder(default)]
note: Option<String>,
#[cfg_attr(feature = "with_serde", serde(default = "Default::default", skip_serializing_if = "Option::is_none"))]
#[builder(default)]
role_behavior: Option<RoleBehavior>,
role_label: String,
}
impl AgentRelationshipRole {
#[allow(dead_code)]
pub fn builder() -> AgentRelationshipRoleBuilder {
AgentRelationshipRoleBuilder {
inverse_role_label: None,
note: None,
role_behavior: None,
role_label: None,
}
}
#[allow(dead_code)]
pub fn into_builder(self) -> AgentRelationshipRoleBuilder {
let AgentRelationshipRole { inverse_role_label, note, role_behavior, role_label } = self;
let mut builder = Self::builder();
builder = match inverse_role_label { Some(x) => builder.inverse_role_label(x), None => builder };
builder = match note { Some(x) => builder.note(x), None => builder };
builder = match role_behavior { Some(x) => builder.role_behavior(x), None => builder };
builder = builder.role_label(role_label);
builder
}
}
}
pub use agent_relationship_role::AgentRelationshipRole;
mod agreement {
use super::*;
#[derive(Debug, Clone, PartialEq, Builder, Getters)]
#[cfg_attr(feature = "with_serde", derive(Serialize, Deserialize))]
#[derive(Setters)]
#[derive(MutGetters)]
#[builder(pattern = "owned", setter(into))]
#[getset(get = "pub", set = "pub", get_mut = "pub")]
pub struct Agreement<AGREEMENTBUNDLE, ECONOMICEVENT, COMMITMENT> {
#[cfg_attr(feature = "with_serde", serde(default = "Default::default", skip_serializing_if = "Option::is_none"))]
#[builder(default)]
bundled_in: Option<AGREEMENTBUNDLE>,
#[cfg_attr(feature = "with_serde", serde(default = "Default::default", skip_serializing_if = "Option::is_none"))]
#[builder(default)]
created: Option<DateTime<Utc>>,
#[cfg_attr(feature = "with_serde", serde(default = "Default::default", skip_serializing_if = "Option::is_none"))]
#[builder(default)]
name: Option<String>,
#[cfg_attr(feature = "with_serde", serde(default = "Default::default", skip_serializing_if = "Option::is_none"))]
#[builder(default)]
note: Option<String>,
#[cfg_attr(feature = "with_serde", serde(default = "Default::default", skip_serializing_if = "Option::is_none"))]
#[builder(default)]
realizes: Option<ECONOMICEVENT>,
#[cfg_attr(feature = "with_serde", serde(default = "Default::default", skip_serializing_if = "Option::is_none"))]
#[builder(default)]
realizes_reciprocal: Option<ECONOMICEVENT>,
#[cfg_attr(feature = "with_serde", serde(default = "Default::default", skip_serializing_if = "Option::is_none"))]
#[builder(default)]
stipulates: Option<COMMITMENT>,
#[cfg_attr(feature = "with_serde", serde(default = "Default::default", skip_serializing_if = "Option::is_none"))]
#[builder(default)]
stipulates_reciprocal: Option<COMMITMENT>,
}
impl<AGREEMENTBUNDLE, ECONOMICEVENT, COMMITMENT> Agreement<AGREEMENTBUNDLE, ECONOMICEVENT, COMMITMENT> {
#[allow(dead_code)]
pub fn builder() -> AgreementBuilder<AGREEMENTBUNDLE, ECONOMICEVENT, COMMITMENT> {
AgreementBuilder {
bundled_in: None,
created: None,
name: None,
note: None,
realizes: None,
realizes_reciprocal: None,
stipulates: None,
stipulates_reciprocal: None,
}
}
#[allow(dead_code)]
pub fn into_builder(self) -> AgreementBuilder<AGREEMENTBUNDLE, ECONOMICEVENT, COMMITMENT> {
let Agreement { bundled_in, created, name, note, realizes, realizes_reciprocal, stipulates, stipulates_reciprocal } = self;
let mut builder = Self::builder();
builder = match bundled_in { Some(x) => builder.bundled_in(x), None => builder };
builder = match created { Some(x) => builder.created(x), None => builder };
builder = match name { Some(x) => builder.name(x), None => builder };
builder = match note { Some(x) => builder.note(x), None => builder };
builder = match realizes { Some(x) => builder.realizes(x), None => builder };
builder = match realizes_reciprocal { Some(x) => builder.realizes_reciprocal(x), None => builder };
builder = match stipulates { Some(x) => builder.stipulates(x), None => builder };
builder = match stipulates_reciprocal { Some(x) => builder.stipulates_reciprocal(x), None => builder };
builder
}
}
}
pub use agreement::Agreement;
mod agreement_bundle {
use super::*;
#[derive(Debug, Clone, PartialEq, Builder, Getters)]
#[cfg_attr(feature = "with_serde", derive(Serialize, Deserialize))]
#[derive(Setters)]
#[derive(MutGetters)]
#[builder(pattern = "owned", setter(into))]
#[getset(get = "pub", set = "pub", get_mut = "pub")]
pub struct AgreementBundle<AGREEMENT> {
#[cfg_attr(feature = "with_serde", serde(default = "Default::default", skip_serializing_if = "Option::is_none"))]
#[builder(default)]
bundles: Option<AGREEMENT>,
}
impl<AGREEMENT> AgreementBundle<AGREEMENT> {
#[allow(dead_code)]
pub fn builder() -> AgreementBundleBuilder<AGREEMENT> {
AgreementBundleBuilder {
bundles: None,
}
}
#[allow(dead_code)]
pub fn into_builder(self) -> AgreementBundleBuilder<AGREEMENT> {
let AgreementBundle { bundles } = self;
let mut builder = Self::builder();
builder = match bundles { Some(x) => builder.bundles(x), None => builder };
builder
}
}
}
pub use agreement_bundle::AgreementBundle;
mod appreciation {
use super::*;
#[derive(Debug, Clone, PartialEq, Builder, Getters)]
#[cfg_attr(feature = "with_serde", derive(Serialize, Deserialize))]
#[derive(Setters)]
#[derive(MutGetters)]
#[builder(pattern = "owned", setter(into))]
#[getset(get = "pub", set = "pub", get_mut = "pub")]
pub struct Appreciation<ECONOMICEVENT> {
appreciation_of: ECONOMICEVENT,
appreciation_with: ECONOMICEVENT,
#[cfg_attr(feature = "with_serde", serde(default = "Default::default", skip_serializing_if = "Option::is_none"))]
#[builder(default)]
note: Option<String>,
}
impl<ECONOMICEVENT> Appreciation<ECONOMICEVENT> {
#[allow(dead_code)]
pub fn builder() -> AppreciationBuilder<ECONOMICEVENT> {
AppreciationBuilder {
appreciation_of: None,
appreciation_with: None,
note: None,
}
}
#[allow(dead_code)]
pub fn into_builder(self) -> AppreciationBuilder<ECONOMICEVENT> {
let Appreciation { appreciation_of, appreciation_with, note } = self;
let mut builder = Self::builder();
builder = builder.appreciation_of(appreciation_of);
builder = builder.appreciation_with(appreciation_with);
builder = match note { Some(x) => builder.note(x), None => builder };
builder
}
}
}
pub use appreciation::Appreciation;
mod claim {
use super::*;
#[derive(Debug, Clone, PartialEq, Builder, Getters)]
#[cfg_attr(feature = "with_serde", derive(Serialize, Deserialize))]
#[derive(Setters)]
#[derive(MutGetters)]
#[builder(pattern = "owned", setter(into))]
#[getset(get = "pub", set = "pub", get_mut = "pub")]
pub struct Claim<AGENT, RESOURCECLASSIFIEDAS, RESOURCESPECIFICATION, ECONOMICEVENT> {
action: Action,
#[cfg_attr(feature = "with_serde", serde(default = "Default::default", skip_serializing_if = "Option::is_none"))]
#[builder(default)]
created: Option<DateTime<Utc>>,
#[cfg_attr(feature = "with_serde", serde(default = "Default::default", skip_serializing_if = "Option::is_none"))]
#[builder(default)]
due: Option<DateTime<Utc>>,
#[cfg_attr(feature = "with_serde", serde(default = "Default::default", skip_serializing_if = "Option::is_none"))]
#[builder(default)]
effort_quantity: Option<om2::Measure>,
#[cfg_attr(feature = "with_serde", serde(default = "Default::default", skip_serializing_if = "Option::is_none"))]
#[builder(default)]
finished: Option<bool>,
#[cfg_attr(feature = "with_serde", serde(default = "Default::default", skip_serializing_if = "Vec::is_empty"))]
#[builder(default)]
in_scope_of: Vec<AGENT>,
#[cfg_attr(feature = "with_serde", serde(default = "Default::default", skip_serializing_if = "Option::is_none"))]
#[builder(default)]
note: Option<String>,
provider: AGENT,
receiver: AGENT,
#[cfg_attr(feature = "with_serde", serde(default = "Default::default", skip_serializing_if = "Vec::is_empty"))]
#[builder(default)]
resource_classified_as: Vec<RESOURCECLASSIFIEDAS>,
#[cfg_attr(feature = "with_serde", serde(default = "Default::default", skip_serializing_if = "Option::is_none"))]
#[builder(default)]
resource_conforms_to: Option<RESOURCESPECIFICATION>,
#[cfg_attr(feature = "with_serde", serde(default = "Default::default", skip_serializing_if = "Option::is_none"))]
#[builder(default)]
resource_quantity: Option<om2::Measure>,
triggered_by: ECONOMICEVENT,
}
impl<AGENT, RESOURCECLASSIFIEDAS, RESOURCESPECIFICATION, ECONOMICEVENT> Claim<AGENT, RESOURCECLASSIFIEDAS, RESOURCESPECIFICATION, ECONOMICEVENT> {
#[allow(dead_code)]
pub fn builder() -> ClaimBuilder<AGENT, RESOURCECLASSIFIEDAS, RESOURCESPECIFICATION, ECONOMICEVENT> {
ClaimBuilder {
action: None,
created: None,
due: None,
effort_quantity: None,
finished: None,
in_scope_of: None,
note: None,
provider: None,
receiver: None,
resource_classified_as: None,
resource_conforms_to: None,
resource_quantity: None,
triggered_by: None,
}
}
#[allow(dead_code)]
pub fn into_builder(self) -> ClaimBuilder<AGENT, RESOURCECLASSIFIEDAS, RESOURCESPECIFICATION, ECONOMICEVENT> {
let Claim { action, created, due, effort_quantity, finished, in_scope_of, note, provider, receiver, resource_classified_as, resource_conforms_to, resource_quantity, triggered_by } = self;
let mut builder = Self::builder();
builder = builder.action(action);
builder = match created { Some(x) => builder.created(x), None => builder };
builder = match due { Some(x) => builder.due(x), None => builder };
builder = match effort_quantity { Some(x) => builder.effort_quantity(x), None => builder };
builder = match finished { Some(x) => builder.finished(x), None => builder };
builder = builder.in_scope_of(in_scope_of);
builder = match note { Some(x) => builder.note(x), None => builder };
builder = builder.provider(provider);
builder = builder.receiver(receiver);
builder = builder.resource_classified_as(resource_classified_as);
builder = match resource_conforms_to { Some(x) => builder.resource_conforms_to(x), None => builder };
builder = match resource_quantity { Some(x) => builder.resource_quantity(x), None => builder };
builder = builder.triggered_by(triggered_by);
builder
}
}
}
pub use claim::Claim;
mod commitment {
use super::*;
#[derive(Debug, Clone, PartialEq, Builder, Getters)]
#[cfg_attr(feature = "with_serde", derive(Serialize, Deserialize))]
#[derive(Setters)]
#[derive(MutGetters)]
#[builder(pattern = "owned", setter(into))]
#[getset(get = "pub", set = "pub", get_mut = "pub")]
pub struct Commitment<AGREEMENT, AGENT, PLAN, PROCESS, RESOURCECLASSIFIEDAS, RESOURCESPECIFICATION, ECONOMICRESOURCE, INTENT, PROCESSSPECIFICATION> {
action: Action,
#[cfg_attr(feature = "with_serde", serde(default = "Default::default", skip_serializing_if = "Option::is_none"))]
#[builder(default)]
at_location: Option<geo::SpatialThing>,
#[cfg_attr(feature = "with_serde", serde(default = "Default::default", skip_serializing_if = "Option::is_none"))]
#[builder(default)]
clause_of: Option<AGREEMENT>,
#[cfg_attr(feature = "with_serde", serde(default = "Default::default", skip_serializing_if = "Option::is_none"))]
#[builder(default)]
created: Option<DateTime<Utc>>,
#[cfg_attr(feature = "with_serde", serde(default = "Default::default", skip_serializing_if = "Option::is_none"))]
#[builder(default)]
due: Option<DateTime<Utc>>,
#[cfg_attr(feature = "with_serde", serde(default = "Default::default", skip_serializing_if = "Option::is_none"))]
#[builder(default)]
effort_quantity: Option<om2::Measure>,
#[cfg_attr(feature = "with_serde", serde(default = "Default::default", skip_serializing_if = "Option::is_none"))]
#[builder(default)]
finished: Option<bool>,
#[cfg_attr(feature = "with_serde", serde(default = "Default::default", skip_serializing_if = "Option::is_none"))]
#[builder(default)]
has_beginning: Option<DateTime<Utc>>,
#[cfg_attr(feature = "with_serde", serde(default = "Default::default", skip_serializing_if = "Option::is_none"))]
#[builder(default)]
has_end: Option<DateTime<Utc>>,
#[cfg_attr(feature = "with_serde", serde(default = "Default::default", skip_serializing_if = "Option::is_none"))]
#[builder(default)]
has_point_in_time: Option<DateTime<Utc>>,
#[cfg_attr(feature = "with_serde", serde(default = "Default::default", skip_serializing_if = "Vec::is_empty"))]
#[builder(default)]
in_scope_of: Vec<AGENT>,
#[cfg_attr(feature = "with_serde", serde(default = "Default::default", skip_serializing_if = "Option::is_none"))]
#[builder(default)]
independent_demand_of: Option<PLAN>,
#[cfg_attr(feature = "with_serde", serde(default = "Default::default", skip_serializing_if = "Option::is_none"))]
#[builder(default)]
input_of: Option<PROCESS>,
#[cfg_attr(feature = "with_serde", serde(default = "Default::default", skip_serializing_if = "Option::is_none"))]
#[builder(default)]
note: Option<String>,
#[cfg_attr(feature = "with_serde", serde(default = "Default::default", skip_serializing_if = "Option::is_none"))]
#[builder(default)]
output_of: Option<PROCESS>,
#[cfg_attr(feature = "with_serde", serde(default = "Default::default", skip_serializing_if = "Option::is_none"))]
#[builder(default)]
planned_within: Option<PLAN>,
provider: AGENT,
receiver: AGENT,
#[cfg_attr(feature = "with_serde", serde(default = "Default::default", skip_serializing_if = "Option::is_none"))]
#[builder(default)]
reciprocal_clause_of: Option<AGREEMENT>,
#[cfg_attr(feature = "with_serde", serde(default = "Default::default", skip_serializing_if = "Vec::is_empty"))]
#[builder(default)]
resource_classified_as: Vec<RESOURCECLASSIFIEDAS>,
#[cfg_attr(feature = "with_serde", serde(default = "Default::default", skip_serializing_if = "Option::is_none"))]
#[builder(default)]
resource_conforms_to: Option<RESOURCESPECIFICATION>,
#[cfg_attr(feature = "with_serde", serde(default = "Default::default", skip_serializing_if = "Option::is_none"))]
#[builder(default)]
resource_inventoried_as: Option<ECONOMICRESOURCE>,
#[cfg_attr(feature = "with_serde", serde(default = "Default::default", skip_serializing_if = "Option::is_none"))]
#[builder(default)]
resource_quantity: Option<om2::Measure>,
#[cfg_attr(feature = "with_serde", serde(default = "Default::default", skip_serializing_if = "Option::is_none"))]
#[builder(default)]
satisfies: Option<INTENT>,
#[cfg_attr(feature = "with_serde", serde(default = "Default::default", skip_serializing_if = "Option::is_none"))]
#[builder(default)]
stage: Option<PROCESSSPECIFICATION>,
#[cfg_attr(feature = "with_serde", serde(default = "Default::default", skip_serializing_if = "Option::is_none"))]
#[builder(default)]
state: Option<String>,
}
impl<AGREEMENT, AGENT, PLAN, PROCESS, RESOURCECLASSIFIEDAS, RESOURCESPECIFICATION, ECONOMICRESOURCE, INTENT, PROCESSSPECIFICATION> Commitment<AGREEMENT, AGENT, PLAN, PROCESS, RESOURCECLASSIFIEDAS, RESOURCESPECIFICATION, ECONOMICRESOURCE, INTENT, PROCESSSPECIFICATION> {
#[allow(dead_code)]
pub fn builder() -> CommitmentBuilder<AGREEMENT, AGENT, PLAN, PROCESS, RESOURCECLASSIFIEDAS, RESOURCESPECIFICATION, ECONOMICRESOURCE, INTENT, PROCESSSPECIFICATION> {
CommitmentBuilder {
action: None,
at_location: None,
clause_of: None,
created: None,
due: None,
effort_quantity: None,
finished: None,
has_beginning: None,
has_end: None,
has_point_in_time: None,
in_scope_of: None,
independent_demand_of: None,
input_of: None,
note: None,
output_of: None,
planned_within: None,
provider: None,
receiver: None,
reciprocal_clause_of: None,
resource_classified_as: None,
resource_conforms_to: None,
resource_inventoried_as: None,
resource_quantity: None,
satisfies: None,
stage: None,
state: None,
}
}
#[allow(dead_code)]
pub fn into_builder(self) -> CommitmentBuilder<AGREEMENT, AGENT, PLAN, PROCESS, RESOURCECLASSIFIEDAS, RESOURCESPECIFICATION, ECONOMICRESOURCE, INTENT, PROCESSSPECIFICATION> {
let Commitment { action, at_location, clause_of, created, due, effort_quantity, finished, has_beginning, has_end, has_point_in_time, in_scope_of, independent_demand_of, input_of, note, output_of, planned_within, provider, receiver, reciprocal_clause_of, resource_classified_as, resource_conforms_to, resource_inventoried_as, resource_quantity, satisfies, stage, state } = self;
let mut builder = Self::builder();
builder = builder.action(action);
builder = match at_location { Some(x) => builder.at_location(x), None => builder };
builder = match clause_of { Some(x) => builder.clause_of(x), None => builder };
builder = match created { Some(x) => builder.created(x), None => builder };
builder = match due { Some(x) => builder.due(x), None => builder };
builder = match effort_quantity { Some(x) => builder.effort_quantity(x), None => builder };
builder = match finished { Some(x) => builder.finished(x), None => builder };
builder = match has_beginning { Some(x) => builder.has_beginning(x), None => builder };
builder = match has_end { Some(x) => builder.has_end(x), None => builder };
builder = match has_point_in_time { Some(x) => builder.has_point_in_time(x), None => builder };
builder = builder.in_scope_of(in_scope_of);
builder = match independent_demand_of { Some(x) => builder.independent_demand_of(x), None => builder };
builder = match input_of { Some(x) => builder.input_of(x), None => builder };
builder = match note { Some(x) => builder.note(x), None => builder };
builder = match output_of { Some(x) => builder.output_of(x), None => builder };
builder = match planned_within { Some(x) => builder.planned_within(x), None => builder };
builder = builder.provider(provider);
builder = builder.receiver(receiver);
builder = match reciprocal_clause_of { Some(x) => builder.reciprocal_clause_of(x), None => builder };
builder = builder.resource_classified_as(resource_classified_as);
builder = match resource_conforms_to { Some(x) => builder.resource_conforms_to(x), None => builder };
builder = match resource_inventoried_as { Some(x) => builder.resource_inventoried_as(x), None => builder };
builder = match resource_quantity { Some(x) => builder.resource_quantity(x), None => builder };
builder = match satisfies { Some(x) => builder.satisfies(x), None => builder };
builder = match stage { Some(x) => builder.stage(x), None => builder };
builder = match state { Some(x) => builder.state(x), None => builder };
builder
}
}
}
pub use commitment::Commitment;
#[derive(Debug, PartialEq, Clone)]
#[cfg_attr(feature = "with_serde", derive(Serialize, Deserialize))]
pub enum ContainedEffect {
#[cfg_attr(feature = "with_serde", serde(rename = "remove"))]
Remove,
#[cfg_attr(feature = "with_serde", serde(rename = "update"))]
Update,
#[cfg_attr(feature = "with_serde", serde(rename = "update"))]
UpdateTo,
}
#[derive(Debug, PartialEq, Clone)]
#[cfg_attr(feature = "with_serde", derive(Serialize, Deserialize))]
pub enum CreateResource {
#[cfg_attr(feature = "with_serde", serde(rename = "optional"))]
Optional,
#[cfg_attr(feature = "with_serde", serde(rename = "optional-to"))]
OptionalTo,
}
mod ecological_agent {
use super::*;
#[derive(Debug, Clone, PartialEq, Builder, Getters)]
#[cfg_attr(feature = "with_serde", derive(Serialize, Deserialize))]
#[derive(Setters)]
#[derive(MutGetters)]
#[builder(pattern = "owned", setter(into))]
#[getset(get = "pub", set = "pub", get_mut = "pub")]
pub struct EcologicalAgent<CLASSIFIEDAS> {
#[cfg_attr(feature = "with_serde", serde(default = "Default::default", skip_serializing_if = "Option::is_none"))]
#[builder(default)]
classified_as: Option<CLASSIFIEDAS>,
}
impl<CLASSIFIEDAS> EcologicalAgent<CLASSIFIEDAS> {
#[allow(dead_code)]
pub fn builder() -> EcologicalAgentBuilder<CLASSIFIEDAS> {
EcologicalAgentBuilder {
classified_as: None,
}
}
#[allow(dead_code)]
pub fn into_builder(self) -> EcologicalAgentBuilder<CLASSIFIEDAS> {
let EcologicalAgent { classified_as } = self;
let mut builder = Self::builder();
builder = match classified_as { Some(x) => builder.classified_as(x), None => builder };
builder
}
}
}
pub use ecological_agent::EcologicalAgent;
mod economic_event {
use super::*;
#[derive(Debug, Clone, PartialEq, Builder, Getters)]
#[cfg_attr(feature = "with_serde", derive(Serialize, Deserialize))]
#[derive(Setters)]
#[derive(MutGetters)]
#[builder(pattern = "owned", setter(into))]
#[getset(get = "pub", set = "pub", get_mut = "pub")]
pub struct EconomicEvent<ECONOMICEVENT, COMMITMENT, AGENT, PROCESS, AGREEMENT, RESOURCECLASSIFIEDAS, RESOURCESPECIFICATION, ECONOMICRESOURCE, INTENT, CLAIM> {
action: Action,
#[cfg_attr(feature = "with_serde", serde(default = "Default::default", skip_serializing_if = "Option::is_none"))]
#[builder(default)]
at_location: Option<geo::SpatialThing>,
#[cfg_attr(feature = "with_serde", serde(default = "Default::default", skip_serializing_if = "Option::is_none"))]
#[builder(default)]
corrects: Option<ECONOMICEVENT>,
#[cfg_attr(feature = "with_serde", serde(default = "Default::default", skip_serializing_if = "Option::is_none"))]
#[builder(default)]
created: Option<DateTime<Utc>>,
#[cfg_attr(feature = "with_serde", serde(default = "Default::default", skip_serializing_if = "Option::is_none"))]
#[builder(default)]
effort_quantity: Option<om2::Measure>,
#[cfg_attr(feature = "with_serde", serde(default = "Default::default", skip_serializing_if = "Option::is_none"))]
#[builder(default)]
fulfills: Option<COMMITMENT>,
#[cfg_attr(feature = "with_serde", serde(default = "Default::default", skip_serializing_if = "Option::is_none"))]
#[builder(default)]
has_beginning: Option<DateTime<Utc>>,
#[cfg_attr(feature = "with_serde", serde(default = "Default::default", skip_serializing_if = "Option::is_none"))]
#[builder(default)]
has_end: Option<DateTime<Utc>>,
#[cfg_attr(feature = "with_serde", serde(default = "Default::default", skip_serializing_if = "Option::is_none"))]
#[builder(default)]
has_point_in_time: Option<DateTime<Utc>>,
#[cfg_attr(feature = "with_serde", serde(default = "Default::default", skip_serializing_if = "Option::is_none"))]
#[builder(default)]
image: Option<Url>,
#[cfg_attr(feature = "with_serde", serde(default = "Default::default", skip_serializing_if = "Vec::is_empty"))]
#[builder(default)]
in_scope_of: Vec<AGENT>,
#[cfg_attr(feature = "with_serde", serde(default = "Default::default", skip_serializing_if = "Option::is_none"))]
#[builder(default)]
input_of: Option<PROCESS>,
#[cfg_attr(feature = "with_serde", serde(default = "Default::default", skip_serializing_if = "Option::is_none"))]
#[builder(default)]
note: Option<String>,
#[cfg_attr(feature = "with_serde", serde(default = "Default::default", skip_serializing_if = "Option::is_none"))]
#[builder(default)]
output_of: Option<PROCESS>,
provider: AGENT,
#[cfg_attr(feature = "with_serde", serde(default = "Default::default", skip_serializing_if = "Option::is_none"))]
#[builder(default)]
realization_of: Option<AGREEMENT>,
receiver: AGENT,
#[cfg_attr(feature = "with_serde", serde(default = "Default::default", skip_serializing_if = "Option::is_none"))]
#[builder(default)]
reciprocal_realization_of: Option<AGREEMENT>,
#[cfg_attr(feature = "with_serde", serde(default = "Default::default", skip_serializing_if = "Vec::is_empty"))]
#[builder(default)]
resource_classified_as: Vec<RESOURCECLASSIFIEDAS>,
#[cfg_attr(feature = "with_serde", serde(default = "Default::default", skip_serializing_if = "Option::is_none"))]
#[builder(default)]
resource_conforms_to: Option<RESOURCESPECIFICATION>,
#[cfg_attr(feature = "with_serde", serde(default = "Default::default", skip_serializing_if = "Option::is_none"))]
#[builder(default)]
resource_inventoried_as: Option<ECONOMICRESOURCE>,
#[cfg_attr(feature = "with_serde", serde(default = "Default::default", skip_serializing_if = "Option::is_none"))]
#[builder(default)]
resource_quantity: Option<om2::Measure>,
#[cfg_attr(feature = "with_serde", serde(default = "Default::default", skip_serializing_if = "Option::is_none"))]
#[builder(default)]
satisfies: Option<INTENT>,
#[cfg_attr(feature = "with_serde", serde(default = "Default::default", skip_serializing_if = "Option::is_none"))]
#[builder(default)]
settles: Option<CLAIM>,
#[cfg_attr(feature = "with_serde", serde(default = "Default::default", skip_serializing_if = "Option::is_none"))]
#[builder(default)]
state: Option<String>,
#[cfg_attr(feature = "with_serde", serde(default = "Default::default", skip_serializing_if = "Option::is_none"))]
#[builder(default)]
to_location: Option<geo::SpatialThing>,
#[cfg_attr(feature = "with_serde", serde(default = "Default::default", skip_serializing_if = "Option::is_none"))]
#[builder(default)]
to_resource_inventoried_as: Option<ECONOMICRESOURCE>,
#[cfg_attr(feature = "with_serde", serde(default = "Default::default", skip_serializing_if = "Option::is_none"))]
#[builder(default)]
triggered_by: Option<ECONOMICEVENT>,
}
impl<ECONOMICEVENT, COMMITMENT, AGENT, PROCESS, AGREEMENT, RESOURCECLASSIFIEDAS, RESOURCESPECIFICATION, ECONOMICRESOURCE, INTENT, CLAIM> EconomicEvent<ECONOMICEVENT, COMMITMENT, AGENT, PROCESS, AGREEMENT, RESOURCECLASSIFIEDAS, RESOURCESPECIFICATION, ECONOMICRESOURCE, INTENT, CLAIM> {
#[allow(dead_code)]
pub fn builder() -> EconomicEventBuilder<ECONOMICEVENT, COMMITMENT, AGENT, PROCESS, AGREEMENT, RESOURCECLASSIFIEDAS, RESOURCESPECIFICATION, ECONOMICRESOURCE, INTENT, CLAIM> {
EconomicEventBuilder {
action: None,
at_location: None,
corrects: None,
created: None,
effort_quantity: None,
fulfills: None,
has_beginning: None,
has_end: None,
has_point_in_time: None,
image: None,
in_scope_of: None,
input_of: None,
note: None,
output_of: None,
provider: None,
realization_of: None,
receiver: None,
reciprocal_realization_of: None,
resource_classified_as: None,
resource_conforms_to: None,
resource_inventoried_as: None,
resource_quantity: None,
satisfies: None,
settles: None,
state: None,
to_location: None,
to_resource_inventoried_as: None,
triggered_by: None,
}
}
#[allow(dead_code)]
pub fn into_builder(self) -> EconomicEventBuilder<ECONOMICEVENT, COMMITMENT, AGENT, PROCESS, AGREEMENT, RESOURCECLASSIFIEDAS, RESOURCESPECIFICATION, ECONOMICRESOURCE, INTENT, CLAIM> {
let EconomicEvent { action, at_location, corrects, created, effort_quantity, fulfills, has_beginning, has_end, has_point_in_time, image, in_scope_of, input_of, note, output_of, provider, realization_of, receiver, reciprocal_realization_of, resource_classified_as, resource_conforms_to, resource_inventoried_as, resource_quantity, satisfies, settles, state, to_location, to_resource_inventoried_as, triggered_by } = self;
let mut builder = Self::builder();
builder = builder.action(action);
builder = match at_location { Some(x) => builder.at_location(x), None => builder };
builder = match corrects { Some(x) => builder.corrects(x), None => builder };
builder = match created { Some(x) => builder.created(x), None => builder };
builder = match effort_quantity { Some(x) => builder.effort_quantity(x), None => builder };
builder = match fulfills { Some(x) => builder.fulfills(x), None => builder };
builder = match has_beginning { Some(x) => builder.has_beginning(x), None => builder };
builder = match has_end { Some(x) => builder.has_end(x), None => builder };
builder = match has_point_in_time { Some(x) => builder.has_point_in_time(x), None => builder };
builder = match image { Some(x) => builder.image(x), None => builder };
builder = builder.in_scope_of(in_scope_of);
builder = match input_of { Some(x) => builder.input_of(x), None => builder };
builder = match note { Some(x) => builder.note(x), None => builder };
builder = match output_of { Some(x) => builder.output_of(x), None => builder };
builder = builder.provider(provider);
builder = match realization_of { Some(x) => builder.realization_of(x), None => builder };
builder = builder.receiver(receiver);
builder = match reciprocal_realization_of { Some(x) => builder.reciprocal_realization_of(x), None => builder };
builder = builder.resource_classified_as(resource_classified_as);
builder = match resource_conforms_to { Some(x) => builder.resource_conforms_to(x), None => builder };
builder = match resource_inventoried_as { Some(x) => builder.resource_inventoried_as(x), None => builder };
builder = match resource_quantity { Some(x) => builder.resource_quantity(x), None => builder };
builder = match satisfies { Some(x) => builder.satisfies(x), None => builder };
builder = match settles { Some(x) => builder.settles(x), None => builder };
builder = match state { Some(x) => builder.state(x), None => builder };
builder = match to_location { Some(x) => builder.to_location(x), None => builder };
builder = match to_resource_inventoried_as { Some(x) => builder.to_resource_inventoried_as(x), None => builder };
builder = match triggered_by { Some(x) => builder.triggered_by(x), None => builder };
builder
}
}
}
pub use economic_event::EconomicEvent;
mod economic_resource {
use super::*;
#[derive(Debug, Clone, PartialEq, Builder, Getters)]
#[cfg_attr(feature = "with_serde", derive(Serialize, Deserialize))]
#[derive(Setters)]
#[derive(MutGetters)]
#[builder(pattern = "owned", setter(into))]
#[getset(get = "pub", set = "pub", get_mut = "pub")]
pub struct EconomicResource<CLASSIFIEDAS, RESOURCESPECIFICATION, ECONOMICRESOURCE, AGENT, PROCESSSPECIFICATION> {
#[cfg_attr(feature = "with_serde", serde(default = "Default::default", skip_serializing_if = "Option::is_none"))]
#[builder(default)]
accounting_quantity: Option<om2::Measure>,
#[cfg_attr(feature = "with_serde", serde(default = "Default::default", skip_serializing_if = "Vec::is_empty"))]
#[builder(default)]
classified_as: Vec<CLASSIFIEDAS>,
conforms_to: RESOURCESPECIFICATION,
#[cfg_attr(feature = "with_serde", serde(default = "Default::default", skip_serializing_if = "Option::is_none"))]
#[builder(default)]
contained_in: Option<ECONOMICRESOURCE>,
#[cfg_attr(feature = "with_serde", serde(default = "Default::default", skip_serializing_if = "Option::is_none"))]
#[builder(default)]
current_location: Option<geo::SpatialThing>,
#[cfg_attr(feature = "with_serde", serde(default = "Default::default", skip_serializing_if = "Option::is_none"))]
#[builder(default)]
current_virtual_location: Option<Url>,
#[cfg_attr(feature = "with_serde", serde(default = "Default::default", skip_serializing_if = "Option::is_none"))]
#[builder(default)]
expires_on: Option<DateTime<Utc>>,
#[cfg_attr(feature = "with_serde", serde(default = "Default::default", skip_serializing_if = "Option::is_none"))]
#[builder(default)]
image: Option<Url>,
#[cfg_attr(feature = "with_serde", serde(default = "Default::default", skip_serializing_if = "Option::is_none"))]
#[builder(default)]
image_list: Option<Url>,
#[cfg_attr(feature = "with_serde", serde(default = "Default::default", skip_serializing_if = "Option::is_none"))]
#[builder(default)]
name: Option<String>,
#[cfg_attr(feature = "with_serde", serde(default = "Default::default", skip_serializing_if = "Option::is_none"))]
#[builder(default)]
note: Option<String>,
#[cfg_attr(feature = "with_serde", serde(default = "Default::default", skip_serializing_if = "Option::is_none"))]
#[builder(default)]
onhand_quantity: Option<om2::Measure>,
#[cfg_attr(feature = "with_serde", serde(default = "Default::default", skip_serializing_if = "Option::is_none"))]
#[builder(default)]
primary_accountable: Option<AGENT>,
#[cfg_attr(feature = "with_serde", serde(default = "Default::default", skip_serializing_if = "Option::is_none"))]
#[builder(default)]
stage: Option<PROCESSSPECIFICATION>,
#[cfg_attr(feature = "with_serde", serde(default = "Default::default", skip_serializing_if = "Option::is_none"))]
#[builder(default)]
state: Option<String>,
#[cfg_attr(feature = "with_serde", serde(default = "Default::default", skip_serializing_if = "Option::is_none"))]
#[builder(default)]
tracking_identifier: Option<String>,
#[cfg_attr(feature = "with_serde", serde(default = "Default::default", skip_serializing_if = "Option::is_none"))]
#[builder(default)]
unit_of_effort: Option<om2::Unit>,
}
impl<CLASSIFIEDAS, RESOURCESPECIFICATION, ECONOMICRESOURCE, AGENT, PROCESSSPECIFICATION> EconomicResource<CLASSIFIEDAS, RESOURCESPECIFICATION, ECONOMICRESOURCE, AGENT, PROCESSSPECIFICATION> {
#[allow(dead_code)]
pub fn builder() -> EconomicResourceBuilder<CLASSIFIEDAS, RESOURCESPECIFICATION, ECONOMICRESOURCE, AGENT, PROCESSSPECIFICATION> {
EconomicResourceBuilder {
accounting_quantity: None,
classified_as: None,
conforms_to: None,
contained_in: None,
current_location: None,
current_virtual_location: None,
expires_on: None,
image: None,
image_list: None,
name: None,
note: None,
onhand_quantity: None,
primary_accountable: None,
stage: None,
state: None,
tracking_identifier: None,
unit_of_effort: None,
}
}
#[allow(dead_code)]
pub fn into_builder(self) -> EconomicResourceBuilder<CLASSIFIEDAS, RESOURCESPECIFICATION, ECONOMICRESOURCE, AGENT, PROCESSSPECIFICATION> {
let EconomicResource { accounting_quantity, classified_as, conforms_to, contained_in, current_location, current_virtual_location, expires_on, image, image_list, name, note, onhand_quantity, primary_accountable, stage, state, tracking_identifier, unit_of_effort } = self;
let mut builder = Self::builder();
builder = match accounting_quantity { Some(x) => builder.accounting_quantity(x), None => builder };
builder = builder.classified_as(classified_as);
builder = builder.conforms_to(conforms_to);
builder = match contained_in { Some(x) => builder.contained_in(x), None => builder };
builder = match current_location { Some(x) => builder.current_location(x), None => builder };
builder = match current_virtual_location { Some(x) => builder.current_virtual_location(x), None => builder };
builder = match expires_on { Some(x) => builder.expires_on(x), None => builder };
builder = match image { Some(x) => builder.image(x), None => builder };
builder = match image_list { Some(x) => builder.image_list(x), None => builder };
builder = match name { Some(x) => builder.name(x), None => builder };
builder = match note { Some(x) => builder.note(x), None => builder };
builder = match onhand_quantity { Some(x) => builder.onhand_quantity(x), None => builder };
builder = match primary_accountable { Some(x) => builder.primary_accountable(x), None => builder };
builder = match stage { Some(x) => builder.stage(x), None => builder };
builder = match state { Some(x) => builder.state(x), None => builder };
builder = match tracking_identifier { Some(x) => builder.tracking_identifier(x), None => builder };
builder = match unit_of_effort { Some(x) => builder.unit_of_effort(x), None => builder };
builder
}
}
}
pub use economic_resource::EconomicResource;
#[derive(Debug, PartialEq, Clone)]
#[cfg_attr(feature = "with_serde", derive(Serialize, Deserialize))]
pub enum EventQuantity {
#[cfg_attr(feature = "with_serde", serde(rename = "both"))]
Both,
#[cfg_attr(feature = "with_serde", serde(rename = "effort"))]
Effort,
#[cfg_attr(feature = "with_serde", serde(rename = "resource"))]
Resource,
}
#[derive(Debug, PartialEq, Clone)]
#[cfg_attr(feature = "with_serde", derive(Serialize, Deserialize))]
pub enum InputOutput {
#[cfg_attr(feature = "with_serde", serde(rename = "input"))]
Input,
#[cfg_attr(feature = "with_serde", serde(rename = "output"))]
Output,
#[cfg_attr(feature = "with_serde", serde(rename = "output-input"))]
OutputInput,
}
mod intent {
use super::*;
#[derive(Debug, Clone, PartialEq, Builder, Getters)]
#[cfg_attr(feature = "with_serde", derive(Serialize, Deserialize))]
#[derive(Setters)]
#[derive(MutGetters)]
#[builder(pattern = "owned", setter(into))]
#[getset(get = "pub", set = "pub", get_mut = "pub")]
pub struct Intent<AGENT, PROCESS, PLAN, RESOURCECLASSIFIEDAS, RESOURCESPECIFICATION, ECONOMICRESOURCE> {
action: Action,
#[cfg_attr(feature = "with_serde", serde(default = "Default::default", skip_serializing_if = "Option::is_none"))]
#[builder(default)]
at_location: Option<geo::SpatialThing>,
#[cfg_attr(feature = "with_serde", serde(default = "Default::default", skip_serializing_if = "Option::is_none"))]
#[builder(default)]
available_quantity: Option<om2::Measure>,
#[cfg_attr(feature = "with_serde", serde(default = "Default::default", skip_serializing_if = "Option::is_none"))]
#[builder(default)]
due: Option<DateTime<Utc>>,
#[cfg_attr(feature = "with_serde", serde(default = "Default::default", skip_serializing_if = "Option::is_none"))]
#[builder(default)]
effort_quantity: Option<om2::Measure>,
#[cfg_attr(feature = "with_serde", serde(default = "Default::default", skip_serializing_if = "Option::is_none"))]
#[builder(default)]
finished: Option<bool>,
#[cfg_attr(feature = "with_serde", serde(default = "Default::default", skip_serializing_if = "Option::is_none"))]
#[builder(default)]
has_beginning: Option<DateTime<Utc>>,
#[cfg_attr(feature = "with_serde", serde(default = "Default::default", skip_serializing_if = "Option::is_none"))]
#[builder(default)]
has_end: Option<DateTime<Utc>>,
#[cfg_attr(feature = "with_serde", serde(default = "Default::default", skip_serializing_if = "Option::is_none"))]
#[builder(default)]
has_point_in_time: Option<DateTime<Utc>>,
#[cfg_attr(feature = "with_serde", serde(default = "Default::default", skip_serializing_if = "Option::is_none"))]
#[builder(default)]
image: Option<Url>,
#[cfg_attr(feature = "with_serde", serde(default = "Default::default", skip_serializing_if = "Option::is_none"))]
#[builder(default)]
image_list: Option<Url>,
#[cfg_attr(feature = "with_serde", serde(default = "Default::default", skip_serializing_if = "Vec::is_empty"))]
#[builder(default)]
in_scope_of: Vec<AGENT>,
#[cfg_attr(feature = "with_serde", serde(default = "Default::default", skip_serializing_if = "Option::is_none"))]
#[builder(default)]
input_of: Option<PROCESS>,
#[cfg_attr(feature = "with_serde", serde(default = "Default::default", skip_serializing_if = "Option::is_none"))]
#[builder(default)]
minimum_quantity: Option<om2::Measure>,
#[cfg_attr(feature = "with_serde", serde(default = "Default::default", skip_serializing_if = "Option::is_none"))]
#[builder(default)]
note: Option<String>,
#[cfg_attr(feature = "with_serde", serde(default = "Default::default", skip_serializing_if = "Option::is_none"))]
#[builder(default)]
output_of: Option<PROCESS>,
#[cfg_attr(feature = "with_serde", serde(default = "Default::default", skip_serializing_if = "Option::is_none"))]
#[builder(default)]
planned_within: Option<PLAN>,
#[cfg_attr(feature = "with_serde", serde(default = "Default::default", skip_serializing_if = "Option::is_none"))]
#[builder(default)]
provider: Option<AGENT>,
#[cfg_attr(feature = "with_serde", serde(default = "Default::default", skip_serializing_if = "Option::is_none"))]
#[builder(default)]
receiver: Option<AGENT>,
#[cfg_attr(feature = "with_serde", serde(default = "Default::default", skip_serializing_if = "Vec::is_empty"))]
#[builder(default)]
resource_classified_as: Vec<RESOURCECLASSIFIEDAS>,
#[cfg_attr(feature = "with_serde", serde(default = "Default::default", skip_serializing_if = "Option::is_none"))]
#[builder(default)]
resource_conforms_to: Option<RESOURCESPECIFICATION>,
#[cfg_attr(feature = "with_serde", serde(default = "Default::default", skip_serializing_if = "Option::is_none"))]
#[builder(default)]
resource_inventoried_as: Option<ECONOMICRESOURCE>,
#[cfg_attr(feature = "with_serde", serde(default = "Default::default", skip_serializing_if = "Option::is_none"))]
#[builder(default)]
resource_quantity: Option<om2::Measure>,
}
impl<AGENT, PROCESS, PLAN, RESOURCECLASSIFIEDAS, RESOURCESPECIFICATION, ECONOMICRESOURCE> Intent<AGENT, PROCESS, PLAN, RESOURCECLASSIFIEDAS, RESOURCESPECIFICATION, ECONOMICRESOURCE> {
#[allow(dead_code)]
pub fn builder() -> IntentBuilder<AGENT, PROCESS, PLAN, RESOURCECLASSIFIEDAS, RESOURCESPECIFICATION, ECONOMICRESOURCE> {
IntentBuilder {
action: None,
at_location: None,
available_quantity: None,
due: None,
effort_quantity: None,
finished: None,
has_beginning: None,
has_end: None,
has_point_in_time: None,
image: None,
image_list: None,
in_scope_of: None,
input_of: None,
minimum_quantity: None,
note: None,
output_of: None,
planned_within: None,
provider: None,
receiver: None,
resource_classified_as: None,
resource_conforms_to: None,
resource_inventoried_as: None,
resource_quantity: None,
}
}
#[allow(dead_code)]
pub fn into_builder(self) -> IntentBuilder<AGENT, PROCESS, PLAN, RESOURCECLASSIFIEDAS, RESOURCESPECIFICATION, ECONOMICRESOURCE> {
let Intent { action, at_location, available_quantity, due, effort_quantity, finished, has_beginning, has_end, has_point_in_time, image, image_list, in_scope_of, input_of, minimum_quantity, note, output_of, planned_within, provider, receiver, resource_classified_as, resource_conforms_to, resource_inventoried_as, resource_quantity } = self;
let mut builder = Self::builder();
builder = builder.action(action);
builder = match at_location { Some(x) => builder.at_location(x), None => builder };
builder = match available_quantity { Some(x) => builder.available_quantity(x), None => builder };
builder = match due { Some(x) => builder.due(x), None => builder };
builder = match effort_quantity { Some(x) => builder.effort_quantity(x), None => builder };
builder = match finished { Some(x) => builder.finished(x), None => builder };
builder = match has_beginning { Some(x) => builder.has_beginning(x), None => builder };
builder = match has_end { Some(x) => builder.has_end(x), None => builder };
builder = match has_point_in_time { Some(x) => builder.has_point_in_time(x), None => builder };
builder = match image { Some(x) => builder.image(x), None => builder };
builder = match image_list { Some(x) => builder.image_list(x), None => builder };
builder = builder.in_scope_of(in_scope_of);
builder = match input_of { Some(x) => builder.input_of(x), None => builder };
builder = match minimum_quantity { Some(x) => builder.minimum_quantity(x), None => builder };
builder = match note { Some(x) => builder.note(x), None => builder };
builder = match output_of { Some(x) => builder.output_of(x), None => builder };
builder = match planned_within { Some(x) => builder.planned_within(x), None => builder };
builder = match provider { Some(x) => builder.provider(x), None => builder };
builder = match receiver { Some(x) => builder.receiver(x), None => builder };
builder = builder.resource_classified_as(resource_classified_as);
builder = match resource_conforms_to { Some(x) => builder.resource_conforms_to(x), None => builder };
builder = match resource_inventoried_as { Some(x) => builder.resource_inventoried_as(x), None => builder };
builder = match resource_quantity { Some(x) => builder.resource_quantity(x), None => builder };
builder
}
}
}
pub use intent::Intent;
#[derive(Debug, PartialEq, Clone)]
#[cfg_attr(feature = "with_serde", derive(Serialize, Deserialize))]
pub enum LocationEffect {
#[cfg_attr(feature = "with_serde", serde(rename = "remove"))]
New,
#[cfg_attr(feature = "with_serde", serde(rename = "update"))]
Update,
#[cfg_attr(feature = "with_serde", serde(rename = "update"))]
UpdateTo,
}
#[derive(Debug, PartialEq, Clone)]
#[cfg_attr(feature = "with_serde", derive(Serialize, Deserialize))]
pub enum OnhandEffect {
#[cfg_attr(feature = "with_serde", serde(rename = "decrement"))]
Decrement,
#[cfg_attr(feature = "with_serde", serde(rename = "decrement-increment"))]
DecrementIncrement,
#[cfg_attr(feature = "with_serde", serde(rename = "increment"))]
Increment,
#[cfg_attr(feature = "with_serde", serde(rename = "increment-to"))]
IncrementTo,
}
mod organization {
use super::*;
#[derive(Debug, Clone, PartialEq, Builder, Getters)]
#[cfg_attr(feature = "with_serde", derive(Serialize, Deserialize))]
#[derive(Setters)]
#[derive(MutGetters)]
#[builder(pattern = "owned", setter(into))]
#[getset(get = "pub", set = "pub", get_mut = "pub")]
pub struct Organization<CLASSIFIEDAS> {
#[cfg_attr(feature = "with_serde", serde(default = "Default::default", skip_serializing_if = "Option::is_none"))]
#[builder(default)]
classified_as: Option<CLASSIFIEDAS>,
}
impl<CLASSIFIEDAS> Organization<CLASSIFIEDAS> {
#[allow(dead_code)]
pub fn builder() -> OrganizationBuilder<CLASSIFIEDAS> {
OrganizationBuilder {
classified_as: None,
}
}
#[allow(dead_code)]
pub fn into_builder(self) -> OrganizationBuilder<CLASSIFIEDAS> {
let Organization { classified_as } = self;
let mut builder = Self::builder();
builder = match classified_as { Some(x) => builder.classified_as(x), None => builder };
builder
}
}
}
pub use organization::Organization;
mod person {
use super::*;
#[derive(Debug, Clone, PartialEq, Builder, Getters)]
#[cfg_attr(feature = "with_serde", derive(Serialize, Deserialize))]
#[derive(Setters)]
#[derive(MutGetters)]
#[builder(pattern = "owned", setter(into))]
#[getset(get = "pub", set = "pub", get_mut = "pub")]
pub struct Person {
}
impl Person {
#[allow(dead_code)]
pub fn builder() -> PersonBuilder {
PersonBuilder {
}
}
#[allow(dead_code)]
pub fn into_builder(self) -> PersonBuilder {
let Person { } = self;
let builder = Self::builder();
builder
}
}
}
pub use person::Person;
mod plan {
use super::*;
#[derive(Debug, Clone, PartialEq, Builder, Getters)]
#[cfg_attr(feature = "with_serde", derive(Serialize, Deserialize))]
#[derive(Setters)]
#[derive(MutGetters)]
#[builder(pattern = "owned", setter(into))]
#[getset(get = "pub", set = "pub", get_mut = "pub")]
pub struct Plan<COMMITMENT, INTENT, PROCESS, SCENARIO> {
#[cfg_attr(feature = "with_serde", serde(default = "Default::default", skip_serializing_if = "Option::is_none"))]
#[builder(default)]
created: Option<DateTime<Utc>>,
#[cfg_attr(feature = "with_serde", serde(default = "Default::default", skip_serializing_if = "Option::is_none"))]
#[builder(default)]
due: Option<DateTime<Utc>>,
#[cfg_attr(feature = "with_serde", serde(default = "Default::default", skip_serializing_if = "Option::is_none"))]
#[builder(default)]
has_independent_demand: Option<COMMITMENT>,
#[cfg_attr(feature = "with_serde", serde(default = "Default::default", skip_serializing_if = "Option::is_none"))]
#[builder(default)]
name: Option<String>,
#[cfg_attr(feature = "with_serde", serde(default = "Default::default", skip_serializing_if = "Option::is_none"))]
#[builder(default)]
note: Option<String>,
#[cfg_attr(feature = "with_serde", serde(default = "Default::default", skip_serializing_if = "Option::is_none"))]
#[builder(default)]
plan_includes: Option<CommitmentIntentProcessUnion<COMMITMENT, INTENT, PROCESS>>,
#[cfg_attr(feature = "with_serde", serde(default = "Default::default", skip_serializing_if = "Option::is_none"))]
#[builder(default)]
refinement_of: Option<SCENARIO>,
}
impl<COMMITMENT, INTENT, PROCESS, SCENARIO> Plan<COMMITMENT, INTENT, PROCESS, SCENARIO> {
#[allow(dead_code)]
pub fn builder() -> PlanBuilder<COMMITMENT, INTENT, PROCESS, SCENARIO> {
PlanBuilder {
created: None,
due: None,
has_independent_demand: None,
name: None,
note: None,
plan_includes: None,
refinement_of: None,
}
}
#[allow(dead_code)]
pub fn into_builder(self) -> PlanBuilder<COMMITMENT, INTENT, PROCESS, SCENARIO> {
let Plan { created, due, has_independent_demand, name, note, plan_includes, refinement_of } = self;
let mut builder = Self::builder();
builder = match created { Some(x) => builder.created(x), None => builder };
builder = match due { Some(x) => builder.due(x), None => builder };
builder = match has_independent_demand { Some(x) => builder.has_independent_demand(x), None => builder };
builder = match name { Some(x) => builder.name(x), None => builder };
builder = match note { Some(x) => builder.note(x), None => builder };
builder = match plan_includes { Some(x) => builder.plan_includes(x), None => builder };
builder = match refinement_of { Some(x) => builder.refinement_of(x), None => builder };
builder
}
}
}
pub use plan::Plan;
mod process {
use super::*;
#[derive(Debug, Clone, PartialEq, Builder, Getters)]
#[cfg_attr(feature = "with_serde", derive(Serialize, Deserialize))]
#[derive(Setters)]
#[derive(MutGetters)]
#[builder(pattern = "owned", setter(into))]
#[getset(get = "pub", set = "pub", get_mut = "pub")]
pub struct Process<PROCESSSPECIFICATION, CLASSIFIEDAS, COMMITMENT, ECONOMICEVENT, INTENT, AGENT, SCENARIO, PLAN> {
#[cfg_attr(feature = "with_serde", serde(default = "Default::default", skip_serializing_if = "Option::is_none"))]
#[builder(default)]
based_on: Option<PROCESSSPECIFICATION>,
#[cfg_attr(feature = "with_serde", serde(default = "Default::default", skip_serializing_if = "Vec::is_empty"))]
#[builder(default)]
classified_as: Vec<CLASSIFIEDAS>,
#[cfg_attr(feature = "with_serde", serde(default = "Default::default", skip_serializing_if = "Option::is_none"))]
#[builder(default)]
finished: Option<bool>,
#[cfg_attr(feature = "with_serde", serde(default = "Default::default", skip_serializing_if = "Option::is_none"))]
#[builder(default)]
has_beginning: Option<DateTime<Utc>>,
#[cfg_attr(feature = "with_serde", serde(default = "Default::default", skip_serializing_if = "Option::is_none"))]
#[builder(default)]
has_end: Option<DateTime<Utc>>,
#[cfg_attr(feature = "with_serde", serde(default = "Default::default", skip_serializing_if = "Option::is_none"))]
#[builder(default)]
has_input: Option<CommitmentEconomicEventIntentUnion<COMMITMENT, ECONOMICEVENT, INTENT>>,
#[cfg_attr(feature = "with_serde", serde(default = "Default::default", skip_serializing_if = "Option::is_none"))]
#[builder(default)]
has_output: Option<CommitmentEconomicEventIntentUnion<COMMITMENT, ECONOMICEVENT, INTENT>>,
#[cfg_attr(feature = "with_serde", serde(default = "Default::default", skip_serializing_if = "Vec::is_empty"))]
#[builder(default)]
in_scope_of: Vec<AGENT>,
name: String,
#[cfg_attr(feature = "with_serde", serde(default = "Default::default", skip_serializing_if = "Option::is_none"))]
#[builder(default)]
nested_in: Option<SCENARIO>,
#[cfg_attr(feature = "with_serde", serde(default = "Default::default", skip_serializing_if = "Option::is_none"))]
#[builder(default)]
note: Option<String>,
#[cfg_attr(feature = "with_serde", serde(default = "Default::default", skip_serializing_if = "Option::is_none"))]
#[builder(default)]
planned_within: Option<PLAN>,
}
impl<PROCESSSPECIFICATION, CLASSIFIEDAS, COMMITMENT, ECONOMICEVENT, INTENT, AGENT, SCENARIO, PLAN> Process<PROCESSSPECIFICATION, CLASSIFIEDAS, COMMITMENT, ECONOMICEVENT, INTENT, AGENT, SCENARIO, PLAN> {
#[allow(dead_code)]
pub fn builder() -> ProcessBuilder<PROCESSSPECIFICATION, CLASSIFIEDAS, COMMITMENT, ECONOMICEVENT, INTENT, AGENT, SCENARIO, PLAN> {
ProcessBuilder {
based_on: None,
classified_as: None,
finished: None,
has_beginning: None,
has_end: None,
has_input: None,
has_output: None,
in_scope_of: None,
name: None,
nested_in: None,
note: None,
planned_within: None,
}
}
#[allow(dead_code)]
pub fn into_builder(self) -> ProcessBuilder<PROCESSSPECIFICATION, CLASSIFIEDAS, COMMITMENT, ECONOMICEVENT, INTENT, AGENT, SCENARIO, PLAN> {
let Process { based_on, classified_as, finished, has_beginning, has_end, has_input, has_output, in_scope_of, name, nested_in, note, planned_within } = self;
let mut builder = Self::builder();
builder = match based_on { Some(x) => builder.based_on(x), None => builder };
builder = builder.classified_as(classified_as);
builder = match finished { Some(x) => builder.finished(x), None => builder };
builder = match has_beginning { Some(x) => builder.has_beginning(x), None => builder };
builder = match has_end { Some(x) => builder.has_end(x), None => builder };
builder = match has_input { Some(x) => builder.has_input(x), None => builder };
builder = match has_output { Some(x) => builder.has_output(x), None => builder };
builder = builder.in_scope_of(in_scope_of);
builder = builder.name(name);
builder = match nested_in { Some(x) => builder.nested_in(x), None => builder };
builder = match note { Some(x) => builder.note(x), None => builder };
builder = match planned_within { Some(x) => builder.planned_within(x), None => builder };
builder
}
}
}
pub use process::Process;
mod process_specification {
use super::*;
#[derive(Debug, Clone, PartialEq, Builder, Getters)]
#[cfg_attr(feature = "with_serde", derive(Serialize, Deserialize))]
#[derive(Setters)]
#[derive(MutGetters)]
#[builder(pattern = "owned", setter(into))]
#[getset(get = "pub", set = "pub", get_mut = "pub")]
pub struct ProcessSpecification {
#[cfg_attr(feature = "with_serde", serde(default = "Default::default", skip_serializing_if = "Option::is_none"))]
#[builder(default)]
image: Option<Url>,
name: String,
#[cfg_attr(feature = "with_serde", serde(default = "Default::default", skip_serializing_if = "Option::is_none"))]
#[builder(default)]
note: Option<String>,
}
impl ProcessSpecification {
#[allow(dead_code)]
pub fn builder() -> ProcessSpecificationBuilder {
ProcessSpecificationBuilder {
image: None,
name: None,
note: None,
}
}
#[allow(dead_code)]
pub fn into_builder(self) -> ProcessSpecificationBuilder {
let ProcessSpecification { image, name, note } = self;
let mut builder = Self::builder();
builder = match image { Some(x) => builder.image(x), None => builder };
builder = builder.name(name);
builder = match note { Some(x) => builder.note(x), None => builder };
builder
}
}
}
pub use process_specification::ProcessSpecification;
mod proposal {
use super::*;
#[derive(Debug, Clone, PartialEq, Builder, Getters)]
#[cfg_attr(feature = "with_serde", derive(Serialize, Deserialize))]
#[derive(Setters)]
#[derive(MutGetters)]
#[builder(pattern = "owned", setter(into))]
#[getset(get = "pub", set = "pub", get_mut = "pub")]
pub struct Proposal<AGENT, PROPOSALLIST, INTENT> {
#[cfg_attr(feature = "with_serde", serde(default = "Default::default", skip_serializing_if = "Option::is_none"))]
#[builder(default)]
created: Option<DateTime<Utc>>,
#[cfg_attr(feature = "with_serde", serde(default = "Default::default", skip_serializing_if = "Option::is_none"))]
#[builder(default)]
eligible_location: Option<geo::SpatialThing>,
#[cfg_attr(feature = "with_serde", serde(default = "Default::default", skip_serializing_if = "Option::is_none"))]
#[builder(default)]
has_beginning: Option<DateTime<Utc>>,
#[cfg_attr(feature = "with_serde", serde(default = "Default::default", skip_serializing_if = "Option::is_none"))]
#[builder(default)]
has_end: Option<DateTime<Utc>>,
#[cfg_attr(feature = "with_serde", serde(default = "Default::default", skip_serializing_if = "Vec::is_empty"))]
#[builder(default)]
in_scope_of: Vec<AGENT>,
#[cfg_attr(feature = "with_serde", serde(default = "Default::default", skip_serializing_if = "Option::is_none"))]
#[builder(default)]
listed_in: Option<PROPOSALLIST>,
#[cfg_attr(feature = "with_serde", serde(default = "Default::default", skip_serializing_if = "Option::is_none"))]
#[builder(default)]
name: Option<String>,
#[cfg_attr(feature = "with_serde", serde(default = "Default::default", skip_serializing_if = "Option::is_none"))]
#[builder(default)]
note: Option<String>,
#[cfg_attr(feature = "with_serde", serde(default = "Default::default", skip_serializing_if = "Option::is_none"))]
#[builder(default)]
proposed_to: Option<AGENT>,
#[cfg_attr(feature = "with_serde", serde(default = "Default::default", skip_serializing_if = "Option::is_none"))]
#[builder(default)]
publishes: Option<INTENT>,
#[cfg_attr(feature = "with_serde", serde(default = "Default::default", skip_serializing_if = "Option::is_none"))]
#[builder(default)]
purpose: Option<ProposalPurpose>,
#[cfg_attr(feature = "with_serde", serde(default = "Default::default", skip_serializing_if = "Option::is_none"))]
#[builder(default)]
reciprocal: Option<INTENT>,
#[cfg_attr(feature = "with_serde", serde(default = "Default::default", skip_serializing_if = "Option::is_none"))]
#[builder(default)]
unit_based: Option<bool>,
}
impl<AGENT, PROPOSALLIST, INTENT> Proposal<AGENT, PROPOSALLIST, INTENT> {
#[allow(dead_code)]
pub fn builder() -> ProposalBuilder<AGENT, PROPOSALLIST, INTENT> {
ProposalBuilder {
created: None,
eligible_location: None,
has_beginning: None,
has_end: None,
in_scope_of: None,
listed_in: None,
name: None,
note: None,
proposed_to: None,
publishes: None,
purpose: None,
reciprocal: None,
unit_based: None,
}
}
#[allow(dead_code)]
pub fn into_builder(self) -> ProposalBuilder<AGENT, PROPOSALLIST, INTENT> {
let Proposal { created, eligible_location, has_beginning, has_end, in_scope_of, listed_in, name, note, proposed_to, publishes, purpose, reciprocal, unit_based } = self;
let mut builder = Self::builder();
builder = match created { Some(x) => builder.created(x), None => builder };
builder = match eligible_location { Some(x) => builder.eligible_location(x), None => builder };
builder = match has_beginning { Some(x) => builder.has_beginning(x), None => builder };
builder = match has_end { Some(x) => builder.has_end(x), None => builder };
builder = builder.in_scope_of(in_scope_of);
builder = match listed_in { Some(x) => builder.listed_in(x), None => builder };
builder = match name { Some(x) => builder.name(x), None => builder };
builder = match note { Some(x) => builder.note(x), None => builder };
builder = match proposed_to { Some(x) => builder.proposed_to(x), None => builder };
builder = match publishes { Some(x) => builder.publishes(x), None => builder };
builder = match purpose { Some(x) => builder.purpose(x), None => builder };
builder = match reciprocal { Some(x) => builder.reciprocal(x), None => builder };
builder = match unit_based { Some(x) => builder.unit_based(x), None => builder };
builder
}
}
}
pub use proposal::Proposal;
mod proposal_list {
use super::*;
#[derive(Debug, Clone, PartialEq, Builder, Getters)]
#[cfg_attr(feature = "with_serde", derive(Serialize, Deserialize))]
#[derive(Setters)]
#[derive(MutGetters)]
#[builder(pattern = "owned", setter(into))]
#[getset(get = "pub", set = "pub", get_mut = "pub")]
pub struct ProposalList<PROPOSAL> {
#[cfg_attr(feature = "with_serde", serde(default = "Default::default", skip_serializing_if = "Vec::is_empty"))]
#[builder(default)]
lists: Vec<PROPOSAL>,
}
impl<PROPOSAL> ProposalList<PROPOSAL> {
#[allow(dead_code)]
pub fn builder() -> ProposalListBuilder<PROPOSAL> {
ProposalListBuilder {
lists: None,
}
}
#[allow(dead_code)]
pub fn into_builder(self) -> ProposalListBuilder<PROPOSAL> {
let ProposalList { lists } = self;
let mut builder = Self::builder();
builder = builder.lists(lists);
builder
}
}
}
pub use proposal_list::ProposalList;
#[derive(Debug, PartialEq, Clone)]
#[cfg_attr(feature = "with_serde", derive(Serialize, Deserialize))]
pub enum ProposalPurpose {
#[cfg_attr(feature = "with_serde", serde(rename = "offer"))]
Offer,
#[cfg_attr(feature = "with_serde", serde(rename = "request"))]
Request,
}
mod recipe_exchange {
use super::*;
#[derive(Debug, Clone, PartialEq, Builder, Getters)]
#[cfg_attr(feature = "with_serde", derive(Serialize, Deserialize))]
#[derive(Setters)]
#[derive(MutGetters)]
#[builder(pattern = "owned", setter(into))]
#[getset(get = "pub", set = "pub", get_mut = "pub")]
pub struct RecipeExchange<RECIPEFLOW> {
#[cfg_attr(feature = "with_serde", serde(default = "Default::default", skip_serializing_if = "Option::is_none"))]
#[builder(default)]
recipe_stipulates: Option<RECIPEFLOW>,
#[cfg_attr(feature = "with_serde", serde(default = "Default::default", skip_serializing_if = "Option::is_none"))]
#[builder(default)]
recipe_stipulates_reciprocal: Option<RECIPEFLOW>,
}
impl<RECIPEFLOW> RecipeExchange<RECIPEFLOW> {
#[allow(dead_code)]
pub fn builder() -> RecipeExchangeBuilder<RECIPEFLOW> {
RecipeExchangeBuilder {
recipe_stipulates: None,
recipe_stipulates_reciprocal: None,
}
}
#[allow(dead_code)]
pub fn into_builder(self) -> RecipeExchangeBuilder<RECIPEFLOW> {
let RecipeExchange { recipe_stipulates, recipe_stipulates_reciprocal } = self;
let mut builder = Self::builder();
builder = match recipe_stipulates { Some(x) => builder.recipe_stipulates(x), None => builder };
builder = match recipe_stipulates_reciprocal { Some(x) => builder.recipe_stipulates_reciprocal(x), None => builder };
builder
}
}
}
pub use recipe_exchange::RecipeExchange;
mod recipe_flow {
use super::*;
#[derive(Debug, Clone, PartialEq, Builder, Getters)]
#[cfg_attr(feature = "with_serde", derive(Serialize, Deserialize))]
#[derive(Setters)]
#[derive(MutGetters)]
#[builder(pattern = "owned", setter(into))]
#[getset(get = "pub", set = "pub", get_mut = "pub")]
pub struct RecipeFlow<RECIPEEXCHANGE, RECIPEPROCESS, RESOURCECLASSIFIEDAS, RESOURCESPECIFICATION, PROCESSSPECIFICATION> {
action: Action,
#[cfg_attr(feature = "with_serde", serde(default = "Default::default", skip_serializing_if = "Option::is_none"))]
#[builder(default)]
effort_quantity: Option<om2::Measure>,
#[cfg_attr(feature = "with_serde", serde(default = "Default::default", skip_serializing_if = "Option::is_none"))]
#[builder(default)]
note: Option<String>,
#[cfg_attr(feature = "with_serde", serde(default = "Default::default", skip_serializing_if = "Option::is_none"))]
#[builder(default)]
recipe_clause_of: Option<RECIPEEXCHANGE>,
#[cfg_attr(feature = "with_serde", serde(default = "Default::default", skip_serializing_if = "Option::is_none"))]
#[builder(default)]
recipe_input_of: Option<RECIPEPROCESS>,
#[cfg_attr(feature = "with_serde", serde(default = "Default::default", skip_serializing_if = "Option::is_none"))]
#[builder(default)]
recipe_output_of: Option<RECIPEPROCESS>,
#[cfg_attr(feature = "with_serde", serde(default = "Default::default", skip_serializing_if = "Option::is_none"))]
#[builder(default)]
recipe_reciprocal_clause_of: Option<RECIPEEXCHANGE>,
#[cfg_attr(feature = "with_serde", serde(default = "Default::default", skip_serializing_if = "Option::is_none"))]
#[builder(default)]
resource_classified_as: Option<RESOURCECLASSIFIEDAS>,
#[cfg_attr(feature = "with_serde", serde(default = "Default::default", skip_serializing_if = "Option::is_none"))]
#[builder(default)]
resource_conforms_to: Option<RESOURCESPECIFICATION>,
#[cfg_attr(feature = "with_serde", serde(default = "Default::default", skip_serializing_if = "Option::is_none"))]
#[builder(default)]
resource_quantity: Option<om2::Measure>,
#[cfg_attr(feature = "with_serde", serde(default = "Default::default", skip_serializing_if = "Option::is_none"))]
#[builder(default)]
stage: Option<PROCESSSPECIFICATION>,
#[cfg_attr(feature = "with_serde", serde(default = "Default::default", skip_serializing_if = "Option::is_none"))]
#[builder(default)]
state: Option<String>,
}
impl<RECIPEEXCHANGE, RECIPEPROCESS, RESOURCECLASSIFIEDAS, RESOURCESPECIFICATION, PROCESSSPECIFICATION> RecipeFlow<RECIPEEXCHANGE, RECIPEPROCESS, RESOURCECLASSIFIEDAS, RESOURCESPECIFICATION, PROCESSSPECIFICATION> {
#[allow(dead_code)]
pub fn builder() -> RecipeFlowBuilder<RECIPEEXCHANGE, RECIPEPROCESS, RESOURCECLASSIFIEDAS, RESOURCESPECIFICATION, PROCESSSPECIFICATION> {
RecipeFlowBuilder {
action: None,
effort_quantity: None,
note: None,
recipe_clause_of: None,
recipe_input_of: None,
recipe_output_of: None,
recipe_reciprocal_clause_of: None,
resource_classified_as: None,
resource_conforms_to: None,
resource_quantity: None,
stage: None,
state: None,
}
}
#[allow(dead_code)]
pub fn into_builder(self) -> RecipeFlowBuilder<RECIPEEXCHANGE, RECIPEPROCESS, RESOURCECLASSIFIEDAS, RESOURCESPECIFICATION, PROCESSSPECIFICATION> {
let RecipeFlow { action, effort_quantity, note, recipe_clause_of, recipe_input_of, recipe_output_of, recipe_reciprocal_clause_of, resource_classified_as, resource_conforms_to, resource_quantity, stage, state } = self;
let mut builder = Self::builder();
builder = builder.action(action);
builder = match effort_quantity { Some(x) => builder.effort_quantity(x), None => builder };
builder = match note { Some(x) => builder.note(x), None => builder };
builder = match recipe_clause_of { Some(x) => builder.recipe_clause_of(x), None => builder };
builder = match recipe_input_of { Some(x) => builder.recipe_input_of(x), None => builder };
builder = match recipe_output_of { Some(x) => builder.recipe_output_of(x), None => builder };
builder = match recipe_reciprocal_clause_of { Some(x) => builder.recipe_reciprocal_clause_of(x), None => builder };
builder = match resource_classified_as { Some(x) => builder.resource_classified_as(x), None => builder };
builder = match resource_conforms_to { Some(x) => builder.resource_conforms_to(x), None => builder };
builder = match resource_quantity { Some(x) => builder.resource_quantity(x), None => builder };
builder = match stage { Some(x) => builder.stage(x), None => builder };
builder = match state { Some(x) => builder.state(x), None => builder };
builder
}
}
}
pub use recipe_flow::RecipeFlow;
mod recipe_process {
use super::*;
#[derive(Debug, Clone, PartialEq, Builder, Getters)]
#[cfg_attr(feature = "with_serde", derive(Serialize, Deserialize))]
#[derive(Setters)]
#[derive(MutGetters)]
#[builder(pattern = "owned", setter(into))]
#[getset(get = "pub", set = "pub", get_mut = "pub")]
pub struct RecipeProcess<RECIPEFLOW, PROCESSCLASSIFIEDAS, PROCESSSPECIFICATION> {
#[cfg_attr(feature = "with_serde", serde(default = "Default::default", skip_serializing_if = "Option::is_none"))]
#[builder(default)]
has_duration: Option<Duration>,
#[cfg_attr(feature = "with_serde", serde(default = "Default::default", skip_serializing_if = "Option::is_none"))]
#[builder(default)]
has_recipe_input: Option<RECIPEFLOW>,
#[cfg_attr(feature = "with_serde", serde(default = "Default::default", skip_serializing_if = "Option::is_none"))]
#[builder(default)]
has_recipe_output: Option<RECIPEFLOW>,
#[cfg_attr(feature = "with_serde", serde(default = "Default::default", skip_serializing_if = "Option::is_none"))]
#[builder(default)]
image: Option<Url>,
name: String,
#[cfg_attr(feature = "with_serde", serde(default = "Default::default", skip_serializing_if = "Option::is_none"))]
#[builder(default)]
note: Option<String>,
#[cfg_attr(feature = "with_serde", serde(default = "Default::default", skip_serializing_if = "Vec::is_empty"))]
#[builder(default)]
process_classified_as: Vec<PROCESSCLASSIFIEDAS>,
process_conforms_to: PROCESSSPECIFICATION,
}
impl<RECIPEFLOW, PROCESSCLASSIFIEDAS, PROCESSSPECIFICATION> RecipeProcess<RECIPEFLOW, PROCESSCLASSIFIEDAS, PROCESSSPECIFICATION> {
#[allow(dead_code)]
pub fn builder() -> RecipeProcessBuilder<RECIPEFLOW, PROCESSCLASSIFIEDAS, PROCESSSPECIFICATION> {
RecipeProcessBuilder {
has_duration: None,
has_recipe_input: None,
has_recipe_output: None,
image: None,
name: None,
note: None,
process_classified_as: None,
process_conforms_to: None,
}
}
#[allow(dead_code)]
pub fn into_builder(self) -> RecipeProcessBuilder<RECIPEFLOW, PROCESSCLASSIFIEDAS, PROCESSSPECIFICATION> {
let RecipeProcess { has_duration, has_recipe_input, has_recipe_output, image, name, note, process_classified_as, process_conforms_to } = self;
let mut builder = Self::builder();
builder = match has_duration { Some(x) => builder.has_duration(x), None => builder };
builder = match has_recipe_input { Some(x) => builder.has_recipe_input(x), None => builder };
builder = match has_recipe_output { Some(x) => builder.has_recipe_output(x), None => builder };
builder = match image { Some(x) => builder.image(x), None => builder };
builder = builder.name(name);
builder = match note { Some(x) => builder.note(x), None => builder };
builder = builder.process_classified_as(process_classified_as);
builder = builder.process_conforms_to(process_conforms_to);
builder
}
}
}
pub use recipe_process::RecipeProcess;
mod resource_specification {
use super::*;
#[derive(Debug, Clone, PartialEq, Builder, Getters)]
#[cfg_attr(feature = "with_serde", derive(Serialize, Deserialize))]
#[derive(Setters)]
#[derive(MutGetters)]
#[builder(pattern = "owned", setter(into))]
#[getset(get = "pub", set = "pub", get_mut = "pub")]
pub struct ResourceSpecification<RESOURCECLASSIFIEDAS> {
#[cfg_attr(feature = "with_serde", serde(default = "Default::default", skip_serializing_if = "Option::is_none"))]
#[builder(default)]
default_unit_of_effort: Option<om2::Unit>,
#[cfg_attr(feature = "with_serde", serde(default = "Default::default", skip_serializing_if = "Option::is_none"))]
#[builder(default)]
default_unit_of_resource: Option<om2::Unit>,
#[cfg_attr(feature = "with_serde", serde(default = "Default::default", skip_serializing_if = "Option::is_none"))]
#[builder(default)]
image: Option<Url>,
#[cfg_attr(feature = "with_serde", serde(default = "Default::default", skip_serializing_if = "Option::is_none"))]
#[builder(default)]
image_list: Option<Url>,
name: String,
#[cfg_attr(feature = "with_serde", serde(default = "Default::default", skip_serializing_if = "Option::is_none"))]
#[builder(default)]
note: Option<String>,
#[cfg_attr(feature = "with_serde", serde(default = "Default::default", skip_serializing_if = "Vec::is_empty"))]
#[builder(default)]
resource_classified_as: Vec<RESOURCECLASSIFIEDAS>,
#[cfg_attr(feature = "with_serde", serde(default = "Default::default", skip_serializing_if = "Option::is_none"))]
#[builder(default)]
substitutable: Option<bool>,
}
impl<RESOURCECLASSIFIEDAS> ResourceSpecification<RESOURCECLASSIFIEDAS> {
#[allow(dead_code)]
pub fn builder() -> ResourceSpecificationBuilder<RESOURCECLASSIFIEDAS> {
ResourceSpecificationBuilder {
default_unit_of_effort: None,
default_unit_of_resource: None,
image: None,
image_list: None,
name: None,
note: None,
resource_classified_as: None,
substitutable: None,
}
}
#[allow(dead_code)]
pub fn into_builder(self) -> ResourceSpecificationBuilder<RESOURCECLASSIFIEDAS> {
let ResourceSpecification { default_unit_of_effort, default_unit_of_resource, image, image_list, name, note, resource_classified_as, substitutable } = self;
let mut builder = Self::builder();
builder = match default_unit_of_effort { Some(x) => builder.default_unit_of_effort(x), None => builder };
builder = match default_unit_of_resource { Some(x) => builder.default_unit_of_resource(x), None => builder };
builder = match image { Some(x) => builder.image(x), None => builder };
builder = match image_list { Some(x) => builder.image_list(x), None => builder };
builder = builder.name(name);
builder = match note { Some(x) => builder.note(x), None => builder };
builder = builder.resource_classified_as(resource_classified_as);
builder = match substitutable { Some(x) => builder.substitutable(x), None => builder };
builder
}
}
}
pub use resource_specification::ResourceSpecification;
#[derive(Debug, PartialEq, Clone)]
#[cfg_attr(feature = "with_serde", derive(Serialize, Deserialize))]
pub enum RoleBehavior {
#[cfg_attr(feature = "with_serde", serde(rename = "member"))]
Member,
#[cfg_attr(feature = "with_serde", serde(rename = "peer"))]
Peer,
#[cfg_attr(feature = "with_serde", serde(rename = "sub-organization"))]
SubOrganization,
}
impl RoleBehavior {
#[allow(dead_code)]
pub fn name(&self) -> Option<String> {
match self {
_ => None,
}
}
#[allow(dead_code)]
pub fn note(&self) -> Option<String> {
match self {
_ => None,
}
}
}
mod scenario {
use super::*;
#[derive(Debug, Clone, PartialEq, Builder, Getters)]
#[cfg_attr(feature = "with_serde", derive(Serialize, Deserialize))]
#[derive(Setters)]
#[derive(MutGetters)]
#[builder(pattern = "owned", setter(into))]
#[getset(get = "pub", set = "pub", get_mut = "pub")]
pub struct Scenario<SCENARIODEFINITION, AGENT, SCENARIO> {
#[cfg_attr(feature = "with_serde", serde(default = "Default::default", skip_serializing_if = "Option::is_none"))]
#[builder(default)]
defined_as: Option<SCENARIODEFINITION>,
#[cfg_attr(feature = "with_serde", serde(default = "Default::default", skip_serializing_if = "Option::is_none"))]
#[builder(default)]
has_beginning: Option<DateTime<Utc>>,
#[cfg_attr(feature = "with_serde", serde(default = "Default::default", skip_serializing_if = "Option::is_none"))]
#[builder(default)]
has_end: Option<DateTime<Utc>>,
#[cfg_attr(feature = "with_serde", serde(default = "Default::default", skip_serializing_if = "Vec::is_empty"))]
#[builder(default)]
in_scope_of: Vec<AGENT>,
name: String,
#[cfg_attr(feature = "with_serde", serde(default = "Default::default", skip_serializing_if = "Option::is_none"))]
#[builder(default)]
note: Option<String>,
#[cfg_attr(feature = "with_serde", serde(default = "Default::default", skip_serializing_if = "Option::is_none"))]
#[builder(default)]
refinement_of: Option<SCENARIO>,
}
impl<SCENARIODEFINITION, AGENT, SCENARIO> Scenario<SCENARIODEFINITION, AGENT, SCENARIO> {
#[allow(dead_code)]
pub fn builder() -> ScenarioBuilder<SCENARIODEFINITION, AGENT, SCENARIO> {
ScenarioBuilder {
defined_as: None,
has_beginning: None,
has_end: None,
in_scope_of: None,
name: None,
note: None,
refinement_of: None,
}
}
#[allow(dead_code)]
pub fn into_builder(self) -> ScenarioBuilder<SCENARIODEFINITION, AGENT, SCENARIO> {
let Scenario { defined_as, has_beginning, has_end, in_scope_of, name, note, refinement_of } = self;
let mut builder = Self::builder();
builder = match defined_as { Some(x) => builder.defined_as(x), None => builder };
builder = match has_beginning { Some(x) => builder.has_beginning(x), None => builder };
builder = match has_end { Some(x) => builder.has_end(x), None => builder };
builder = builder.in_scope_of(in_scope_of);
builder = builder.name(name);
builder = match note { Some(x) => builder.note(x), None => builder };
builder = match refinement_of { Some(x) => builder.refinement_of(x), None => builder };
builder
}
}
}
pub use scenario::Scenario;
mod scenario_definition {
use super::*;
#[derive(Debug, Clone, PartialEq, Builder, Getters)]
#[cfg_attr(feature = "with_serde", derive(Serialize, Deserialize))]
#[derive(Setters)]
#[derive(MutGetters)]
#[builder(pattern = "owned", setter(into))]
#[getset(get = "pub", set = "pub", get_mut = "pub")]
pub struct ScenarioDefinition {
#[cfg_attr(feature = "with_serde", serde(default = "Default::default", skip_serializing_if = "Option::is_none"))]
#[builder(default)]
has_duration: Option<Duration>,
name: String,
#[cfg_attr(feature = "with_serde", serde(default = "Default::default", skip_serializing_if = "Option::is_none"))]
#[builder(default)]
note: Option<String>,
}
impl ScenarioDefinition {
#[allow(dead_code)]
pub fn builder() -> ScenarioDefinitionBuilder {
ScenarioDefinitionBuilder {
has_duration: None,
name: None,
note: None,
}
}
#[allow(dead_code)]
pub fn into_builder(self) -> ScenarioDefinitionBuilder {
let ScenarioDefinition { has_duration, name, note } = self;
let mut builder = Self::builder();
builder = match has_duration { Some(x) => builder.has_duration(x), None => builder };
builder = builder.name(name);
builder = match note { Some(x) => builder.note(x), None => builder };
builder
}
}
}
pub use scenario_definition::ScenarioDefinition;
#[derive(Debug, PartialEq, Clone)]
#[cfg_attr(feature = "with_serde", derive(Serialize, Deserialize))]
pub enum StageEffect {
#[cfg_attr(feature = "with_serde", serde(rename = "update"))]
Update,
}
#[derive(Debug, PartialEq, Clone)]
#[cfg_attr(feature = "with_serde", derive(Serialize, Deserialize))]
pub enum StateEffect {
#[cfg_attr(feature = "with_serde", serde(rename = "update"))]
Update,
#[cfg_attr(feature = "with_serde", serde(rename = "update"))]
UpdateTo,
}
pub mod builders {
pub use super::agent::AgentBuilder;
pub use super::agent_relationship::AgentRelationshipBuilder;
pub use super::agent_relationship_role::AgentRelationshipRoleBuilder;
pub use super::agreement::AgreementBuilder;
pub use super::agreement_bundle::AgreementBundleBuilder;
pub use super::appreciation::AppreciationBuilder;
pub use super::claim::ClaimBuilder;
pub use super::commitment::CommitmentBuilder;
pub use super::ecological_agent::EcologicalAgentBuilder;
pub use super::economic_event::EconomicEventBuilder;
pub use super::economic_resource::EconomicResourceBuilder;
pub use super::intent::IntentBuilder;
pub use super::organization::OrganizationBuilder;
pub use super::person::PersonBuilder;
pub use super::plan::PlanBuilder;
pub use super::process::ProcessBuilder;
pub use super::process_specification::ProcessSpecificationBuilder;
pub use super::proposal::ProposalBuilder;
pub use super::proposal_list::ProposalListBuilder;
pub use super::recipe_exchange::RecipeExchangeBuilder;
pub use super::recipe_flow::RecipeFlowBuilder;
pub use super::recipe_process::RecipeProcessBuilder;
pub use super::resource_specification::ResourceSpecificationBuilder;
pub use super::scenario::ScenarioBuilder;
pub use super::scenario_definition::ScenarioDefinitionBuilder;
}
}