use conjure_http::endpoint;
/// Internal service for managing per-workspace usage tracking dataset metadata.
#[conjure_http::conjure_endpoints(
    name = "InternalUsageMetadataService",
    use_legacy_error_serialization
)]
pub trait InternalUsageMetadataService {
    /// Sets the usage tracking dataset RID for the specified workspace. Creates or updates the mapping.
    #[endpoint(
        method = PUT,
        path = "/internal/scout/v2/usage-metadata/workspaces/{workspaceRid}/usage-dataset",
        name = "setUsageDatasetForWorkspace"
    )]
    fn set_usage_dataset_for_workspace(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[path(
            name = "workspaceRid",
            decoder = conjure_http::server::conjure::FromPlainDecoder,
            log_as = "workspaceRid"
        )]
        workspace_rid: conjure_object::ResourceIdentifier,
        #[body(
            deserializer = conjure_http::server::StdRequestDeserializer,
            log_as = "datasetRid"
        )]
        dataset_rid: conjure_object::ResourceIdentifier,
    ) -> Result<(), conjure_http::private::Error>;
}
/// Internal service for managing per-workspace usage tracking dataset metadata.
#[conjure_http::conjure_endpoints(
    name = "InternalUsageMetadataService",
    use_legacy_error_serialization
)]
pub trait AsyncInternalUsageMetadataService {
    /// Sets the usage tracking dataset RID for the specified workspace. Creates or updates the mapping.
    #[endpoint(
        method = PUT,
        path = "/internal/scout/v2/usage-metadata/workspaces/{workspaceRid}/usage-dataset",
        name = "setUsageDatasetForWorkspace"
    )]
    async fn set_usage_dataset_for_workspace(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[path(
            name = "workspaceRid",
            decoder = conjure_http::server::conjure::FromPlainDecoder,
            log_as = "workspaceRid"
        )]
        workspace_rid: conjure_object::ResourceIdentifier,
        #[body(
            deserializer = conjure_http::server::StdRequestDeserializer,
            log_as = "datasetRid"
        )]
        dataset_rid: conjure_object::ResourceIdentifier,
    ) -> Result<(), conjure_http::private::Error>;
}
/// Internal service for managing per-workspace usage tracking dataset metadata.
#[conjure_http::conjure_endpoints(
    name = "InternalUsageMetadataService",
    use_legacy_error_serialization,
    local
)]
pub trait LocalAsyncInternalUsageMetadataService {
    /// Sets the usage tracking dataset RID for the specified workspace. Creates or updates the mapping.
    #[endpoint(
        method = PUT,
        path = "/internal/scout/v2/usage-metadata/workspaces/{workspaceRid}/usage-dataset",
        name = "setUsageDatasetForWorkspace"
    )]
    async fn set_usage_dataset_for_workspace(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[path(
            name = "workspaceRid",
            decoder = conjure_http::server::conjure::FromPlainDecoder,
            log_as = "workspaceRid"
        )]
        workspace_rid: conjure_object::ResourceIdentifier,
        #[body(
            deserializer = conjure_http::server::StdRequestDeserializer,
            log_as = "datasetRid"
        )]
        dataset_rid: conjure_object::ResourceIdentifier,
    ) -> Result<(), conjure_http::private::Error>;
}
