pub struct CogniteClient {Show 15 fields
pub api_client: Arc<ApiClient>,
pub assets: AssetsResource,
pub events: EventsResource,
pub files: Files,
pub time_series: TimeSeriesResource,
pub groups: GroupsResource,
pub raw: RawResource,
pub data_sets: DataSetsResource,
pub labels: LabelsResource,
pub relationships: RelationshipsResource,
pub ext_pipes: ExtPipesResource,
pub ext_pipe_runs: ExtPipeRunsResource,
pub sequences: SequencesResource,
pub sessions: SessionsResource,
pub models: Models,
}Expand description
Client object for the CDF API.
Fields§
§api_client: Arc<ApiClient>Reference to an API client, which can let you make your own requests to the CDF API.
assets: AssetsResourceCDF assets resource.
events: EventsResourceCDF events resource.
files: FilesCDF files resource.
time_series: TimeSeriesResourceCDF time series resource.
groups: GroupsResourceCDF groups resource.
raw: RawResourceCDF raw resource.
data_sets: DataSetsResourceCDF data sets resource.
labels: LabelsResourceCDF labels resource.
relationships: RelationshipsResourceCDF relationships resource.
ext_pipes: ExtPipesResourceCDF extraction pipelines resource.
ext_pipe_runs: ExtPipeRunsResourceCDF extraction pipeline runs resource.
sequences: SequencesResourceCDF sequences resource.
sessions: SessionsResourceCDF sessions resource.
models: ModelsCDF data modeling resource.
Implementations§
Source§impl CogniteClient
impl CogniteClient
Sourcepub fn new_oidc(app_name: &str, config: Option<ClientConfig>) -> Result<Self>
pub fn new_oidc(app_name: &str, config: Option<ClientConfig>) -> Result<Self>
Create a new cogntite client, taking OIDC credentials from the environment.
§Arguments
app_name- The value used for thex-cdp-appheader.config- Optional configuration for retries.
This uses the environment variables
COGNITE_BASE_URLCOGNITE_PROJECTCOGNITE_CLIENT_IDCOGNITE_CLIENT_SECRETCOGNITE_TOKEN_URLCOGNITE_RESOURCECOGNITE_AUDIENCECOGNITE_SCOPES
Sourcepub fn new_custom_auth(
api_base_url: &str,
project_name: &str,
auth: AuthHeaderManager,
app_name: &str,
config: Option<ClientConfig>,
) -> Result<Self>
pub fn new_custom_auth( api_base_url: &str, project_name: &str, auth: AuthHeaderManager, app_name: &str, config: Option<ClientConfig>, ) -> Result<Self>
Create a new cognite client, using a user-provided authentication manager.
§Arguments
api_base_url- Base URL for the API. For examplehttps://api.cognitedata.comproject_name- Name of the CDF project to use.auth- Authentication provider.app_name- Value used for thex-cdp-appheader.config- Optional configuration for retries.
Sourcepub fn new_from_oidc(
api_base_url: &str,
auth_config: AuthenticatorConfig,
project_name: &str,
app_name: &str,
config: Option<ClientConfig>,
) -> Result<Self>
pub fn new_from_oidc( api_base_url: &str, auth_config: AuthenticatorConfig, project_name: &str, app_name: &str, config: Option<ClientConfig>, ) -> Result<Self>
Create a new cognite client using provided OIDC credentials.
§Arguments
api_base_url- Base URL for the API. For examplehttps://api.cognitedata.comproject_name- Name of the CDF project to use.auth_config- Configuration for creating an OIDC authenticator.app_name- Value used for thex-cdp-appheader.config- Optional configuration for retries.
Trait Implementations§
Source§impl Clone for CogniteClient
impl Clone for CogniteClient
Source§fn clone(&self) -> CogniteClient
fn clone(&self) -> CogniteClient
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 moreAuto Trait Implementations§
impl Freeze for CogniteClient
impl !RefUnwindSafe for CogniteClient
impl Send for CogniteClient
impl Sync for CogniteClient
impl Unpin for CogniteClient
impl !UnwindSafe for CogniteClient
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