pub struct AddRelationship {
pub external_id: String,
pub source_external_id: String,
pub source_type: RelationshipVertexType,
pub target_external_id: String,
pub target_type: RelationshipVertexType,
pub start_time: Option<i64>,
pub end_time: Option<i64>,
pub confidence: Option<f32>,
pub data_set_id: Option<i64>,
pub labels: Option<Vec<CogniteExternalId>>,
}Expand description
Create a new relationship.
Fields§
§external_id: StringRelationship external ID, must be unique within the project.
source_external_id: StringExternal ID of the source resource.
source_type: RelationshipVertexTypeType of the source resource.
target_external_id: StringExternal ID of the target resource.
target_type: RelationshipVertexTypeType of the target resource.
start_time: Option<i64>Timestamp in milliseconds since epoch when this relationship becomes valid.
end_time: Option<i64>Timestamp in milliseconds since epoch when this relationship stops being valid.
confidence: Option<f32>Confidence value of the existence of the relationship, between 0.0 and 1.0. Generated relationships provide a score of the likelihood of the relationship existing. Relationships without a confidence value can be interpreted at the discretion of each project.
data_set_id: Option<i64>Data set this relationship belongs to.
labels: Option<Vec<CogniteExternalId>>List of labels on this relationship.
Trait Implementations§
Source§impl Create<AddRelationship, Relationship> for RelationshipsResource
impl Create<AddRelationship, Relationship> for RelationshipsResource
Source§impl Default for AddRelationship
impl Default for AddRelationship
Source§fn default() -> AddRelationship
fn default() -> AddRelationship
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for AddRelationship
impl<'de> Deserialize<'de> for AddRelationship
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 From<Relationship> for AddRelationship
impl From<Relationship> for AddRelationship
Source§fn from(rel: Relationship) -> Self
fn from(rel: Relationship) -> Self
Converts to this type from the input type.
Source§impl IntoPatch<PatchRelationship> for AddRelationship
impl IntoPatch<PatchRelationship> for AddRelationship
Source§fn patch(self, options: &UpsertOptions) -> PatchRelationship
fn patch(self, options: &UpsertOptions) -> PatchRelationship
Convert self into a patch, optionally ignoring null values.
Auto Trait Implementations§
impl Freeze for AddRelationship
impl RefUnwindSafe for AddRelationship
impl Send for AddRelationship
impl Sync for AddRelationship
impl Unpin for AddRelationship
impl UnwindSafe for AddRelationship
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