Class CreateRelation
Provides all the properties required to create a new relationship using the endpoint api/v1/relations
Inheritance
Implements
Namespace: HuduAPI.Endpoints.Parameters
Assembly: HuduAPI.dll
Syntax
public class CreateRelation : IParameters
Constructors
CreateRelation(String, Int32, String, Int32)
Initializes a new instance of the CreateRelation class with all required properties supplied. The remaining properties are optional.
Declaration
public CreateRelation(string toableType, int toableId, string fromableType, int fromableId)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | toableType | The type of the TO relation. |
| System.Int32 | toableId | The ID of the TO relation. |
| System.String | fromableType | The type of the FROM relation. |
| System.Int32 | fromableId | The ID of the FROM relation. |
Properties
Description
Give a description to the relation so you know why two things are related
Declaration
[JsonProperty("description")]
public string Description { get; set; }
Property Value
| Type | Description |
|---|---|
| System.String |
FromableId
The ID of the FROM relation
Declaration
[JsonProperty("fromable_id")]
public int FromableId { get; }
Property Value
| Type | Description |
|---|---|
| System.Int32 |
FromableType
The type of the FROM relation (Asset, Website, Procedure, AssetPassword, Company, Article)
Declaration
[JsonProperty("fromable_type")]
public string FromableType { get; }
Property Value
| Type | Description |
|---|---|
| System.String |
IsInverse
When a relation is created, it will also create another relation that is the inverse. When this is true, this relation is the inverse.
Declaration
[JsonProperty("is_inverse")]
public bool IsInverse { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
PayloadType
Declaration
public string PayloadType { get; }
Property Value
| Type | Description |
|---|---|
| System.String |
ToableId
The ID of the TO relation
Declaration
[JsonProperty("toable_id")]
public int ToableId { get; }
Property Value
| Type | Description |
|---|---|
| System.Int32 |
ToableType
The type of the TO relation (Asset, Website, Procedure, AssetPassword, Company, Article)
Declaration
[JsonProperty("toable_type")]
public string ToableType { get; }
Property Value
| Type | Description |
|---|---|
| System.String |