pub struct Organization {
pub id: Option<String>,
pub href: Option<String>,
pub name: Option<String>,
pub name_type: Option<String>,
pub organization_type: Option<String>,
pub trading_name: Option<String>,
pub exists_during: Option<TimePeriod>,
pub status: Option<OrganizationStateType>,
pub contact_medium: Option<Vec<ContactMedium>>,
pub related_party: Option<Vec<RelatedParty>>,
pub party_characteristic: Option<Vec<Characteristic>>,
/* private fields */
}
Expand description
Organisation record (sic)
Fields§
§id: Option<String>
Unique id of this organization record
href: Option<String>
HTML reference to this organization record
name: Option<String>
Name of this Organization
name_type: Option<String>
Type of name of this Organization
organization_type: Option<String>
Type of Organization
trading_name: Option<String>
Trading Name of this Organization
exists_during: Option<TimePeriod>
Existence Period
status: Option<OrganizationStateType>
Status
contact_medium: Option<Vec<ContactMedium>>
Contact medium for organization
Related Party
party_characteristic: Option<Vec<Characteristic>>
Party Characteristics
Implementations§
Source§impl Organization
impl Organization
Sourcepub fn new(name: impl Into<String>) -> Organization
pub fn new(name: impl Into<String>) -> Organization
Create a new organization record with a name
Examples found in repository?
More examples
examples/create_resource.rs (line 19)
15fn main() {
16 #[cfg(all(feature = "tmf639", feature = "build-V4"))]
17 {
18 // Create an organisation
19 let organisation = Organization::new("An Organisation");
20 let customer = Customer::from(&organisation);
21 let mut resource = Resource::new("VLAN");
22 resource.add_party(RelatedParty::from(&customer));
23
24 dbg!(resource);
25 }
26}
examples/create_poq.rs (line 22)
19fn main() {
20 #[cfg(all(feature = "tmf679", feature = "build-V4"))]
21 {
22 let org = Organization::new("ACustomer");
23 let customer = Customer::new(org);
24 let offering = ProductOffering::new("MyOffer");
25 let mut poq = ProductOfferingQualification::new(Some(ProductOfferingRef::from(offering)));
26 poq.add_party(RelatedParty::from(&customer));
27
28 dbg!(poq);
29 }
30}
Additional examples can be found in:
Sourcepub fn generate_code(&mut self, offset: Option<u32>)
pub fn generate_code(&mut self, offset: Option<u32>)
Generate a new site code based on available fields
Sourcepub fn replace_characteristic(
&mut self,
characteristic: Characteristic,
) -> Option<Characteristic>
pub fn replace_characteristic( &mut self, characteristic: Characteristic, ) -> Option<Characteristic>
Replace a characteristic returning the old value if found
Trait Implementations§
Source§impl Clone for Organization
impl Clone for Organization
Source§fn clone(&self) -> Organization
fn clone(&self) -> Organization
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for Organization
impl Debug for Organization
Source§impl Default for Organization
impl Default for Organization
Source§fn default() -> Organization
fn default() -> Organization
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for Organization
impl<'de> Deserialize<'de> for Organization
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl EventPayload<OrganizationEvent> for Organization
impl EventPayload<OrganizationEvent> for Organization
Source§type Subject = Organization
type Subject = Organization
Object the event pertains to
Source§type EventType = OrganizationEventType
type EventType = OrganizationEventType
Type of event generated
Source§impl From<&Organization> for Customer
impl From<&Organization> for Customer
Source§fn from(value: &Organization) -> Self
fn from(value: &Organization) -> Self
Converts to this type from the input type.
Source§impl From<&Organization> for RelatedParty
impl From<&Organization> for RelatedParty
Source§fn from(org: &Organization) -> Self
fn from(org: &Organization) -> Self
Converts to this type from the input type.
Source§impl From<Organization> for OrganizationRef
impl From<Organization> for OrganizationRef
Source§fn from(value: Organization) -> Self
fn from(value: Organization) -> Self
Converts to this type from the input type.
Source§impl From<Organization> for RelatedParty
impl From<Organization> for RelatedParty
Source§fn from(org: Organization) -> Self
fn from(org: Organization) -> Self
Converts to this type from the input type.
Source§impl From<String> for Organization
impl From<String> for Organization
Source§impl HasId for Organization
impl HasId for Organization
Source§fn generate_id(&mut self)
fn generate_id(&mut self)
Generate and store a new ID. This will also regenerated the HREF field via generate_href()
Source§fn generate_href(&mut self)
fn generate_href(&mut self)
Generate a new HTML reference. Read more
Source§fn get_class() -> String
fn get_class() -> String
Get the class of this object. This is also used to form part of the URL via generate_href()
Source§fn get_class_href() -> String
fn get_class_href() -> String
Get Class HREF, this represents the generate path to the class.
Source§fn get_mod_path() -> String
fn get_mod_path() -> String
Get the module path
Source§fn set_id(&mut self, id: impl Into<String>)
fn set_id(&mut self, id: impl Into<String>)
Set the id on the object, also triggers generate_href().
Source§fn id(self, id: impl Into<String>) -> Self
fn id(self, id: impl Into<String>) -> Self
Builder pattern to set id on create()
NB: This can be used to set an explicit id on create instead of auto-generate via
[create
]Source§impl HasName for Organization
impl HasName for Organization
Source§impl HasReference for Organization
impl HasReference for Organization
Source§type RefType = RelatedParty
type RefType = RelatedParty
Reference type assocaited with Self.
Source§fn as_ref(&self) -> Option<Self::RefType>
fn as_ref(&self) -> Option<Self::RefType>
Return a reference version of an object, if none exists, return None.
Source§fn as_entity_ref(&self) -> RelatedEntity
fn as_entity_ref(&self) -> RelatedEntity
Get object as an EntityRef
Source§impl Serialize for Organization
impl Serialize for Organization
Source§impl TMFEvent<OrganizationEvent> for Organization
impl TMFEvent<OrganizationEvent> for Organization
Source§fn event(&self) -> OrganizationEvent
fn event(&self) -> OrganizationEvent
Geneate container for an TMF payload to be used in an event
Auto Trait Implementations§
impl Freeze for Organization
impl RefUnwindSafe for Organization
impl Send for Organization
impl Sync for Organization
impl Unpin for Organization
impl UnwindSafe for Organization
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more