Interface IResource
Represents a resource in the Okta API.
Namespace: Okta.Sdk
Assembly: Okta.Sdk.dll
Syntax
public interface IResource
Properties
Item[String]
Gets or sets a resource property by name.
Declaration
object this[string name] { get; set; }
Parameters
Type | Name | Description |
---|---|---|
System.String | name | The property name. |
Property Value
Type | Description |
---|---|
System.Object | The property value, or |
Methods
GetArrayProperty<T>(String)
Gets a list or array property from the resource by name.
Declaration
IList<T> GetArrayProperty<T>(string name)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | The property name. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IList<T> | A System.Collections.Generic.IList<T> that can be enumerated to obtain the property items. |
Type Parameters
Name | Description |
---|---|
T | The type of items contained in the list or array. |
GetData()
Gets the underlying data backing this resource.
Declaration
IDictionary<string, object> GetData()
Returns
Type | Description |
---|---|
System.Collections.Generic.IDictionary<System.String, System.Object> | The data backing this resource. |
GetProperty<T>(String)
Gets a resource property by name.
Declaration
T GetProperty<T>(string name)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | The property name. |
Returns
Type | Description |
---|---|
T | The strongly-typed property value, or |
Type Parameters
Name | Description |
---|---|
T | The property type. |
Remarks
In derived classes, use the more specific methods such as GetStringProperty(String) and GetIntegerProperty(String) instead.
SetProperty(String, Object)
Sets a resource property by name
Declaration
void SetProperty(string name, object value)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | The property name |
System.Object | value | The property value |