pub struct WarehouseClient<T> { /* private fields */ }
Expand description

Service that manages media content + metadata for streaming.

Implementations§

source§

impl<T> WarehouseClient<T>
where T: GrpcService<BoxBody>, T::Error: Into<StdError>, T::ResponseBody: Body<Data = Bytes> + Send + 'static, <T::ResponseBody as Body>::Error: Into<StdError> + Send,

source

pub fn new(inner: T) -> Self

source

pub fn with_origin(inner: T, origin: Uri) -> Self

source

pub fn with_interceptor<F>( inner: T, interceptor: F ) -> WarehouseClient<InterceptedService<T, F>>
where F: Interceptor, T::ResponseBody: Default, T: Service<Request<BoxBody>, Response = Response<<T as GrpcService<BoxBody>>::ResponseBody>>, <T as Service<Request<BoxBody>>>::Error: Into<StdError> + Send + Sync,

source

pub fn send_compressed(self, encoding: CompressionEncoding) -> Self

Compress requests with the given encoding.

This requires the server to support it otherwise it might respond with an error.

source

pub fn accept_compressed(self, encoding: CompressionEncoding) -> Self

Enable decompressing responses.

source

pub fn max_decoding_message_size(self, limit: usize) -> Self

Limits the maximum size of a decoded message.

Default: 4MB

source

pub fn max_encoding_message_size(self, limit: usize) -> Self

Limits the maximum size of an encoded message.

Default: usize::MAX

source

pub async fn create_asset( &mut self, request: impl IntoRequest<CreateAssetRequest> ) -> Result<Response<Asset>, Status>

Creates an asset inside corpus.

source

pub async fn update_asset( &mut self, request: impl IntoRequest<UpdateAssetRequest> ) -> Result<Response<Asset>, Status>

Updates an asset inside corpus.

source

pub async fn get_asset( &mut self, request: impl IntoRequest<GetAssetRequest> ) -> Result<Response<Asset>, Status>

Reads an asset inside corpus.

source

pub async fn list_assets( &mut self, request: impl IntoRequest<ListAssetsRequest> ) -> Result<Response<ListAssetsResponse>, Status>

Lists an list of assets inside corpus.

source

pub async fn delete_asset( &mut self, request: impl IntoRequest<DeleteAssetRequest> ) -> Result<Response<Operation>, Status>

Deletes asset inside corpus.

source

pub async fn create_corpus( &mut self, request: impl IntoRequest<CreateCorpusRequest> ) -> Result<Response<Operation>, Status>

Creates a corpus inside a project.

source

pub async fn get_corpus( &mut self, request: impl IntoRequest<GetCorpusRequest> ) -> Result<Response<Corpus>, Status>

Gets corpus details inside a project.

source

pub async fn update_corpus( &mut self, request: impl IntoRequest<UpdateCorpusRequest> ) -> Result<Response<Corpus>, Status>

Updates a corpus in a project.

source

pub async fn list_corpora( &mut self, request: impl IntoRequest<ListCorporaRequest> ) -> Result<Response<ListCorporaResponse>, Status>

Lists all corpora in a project.

source

pub async fn delete_corpus( &mut self, request: impl IntoRequest<DeleteCorpusRequest> ) -> Result<Response<()>, Status>

Deletes a corpus only if its empty. Returns empty response.

source

pub async fn create_data_schema( &mut self, request: impl IntoRequest<CreateDataSchemaRequest> ) -> Result<Response<DataSchema>, Status>

Creates data schema inside corpus.

source

pub async fn update_data_schema( &mut self, request: impl IntoRequest<UpdateDataSchemaRequest> ) -> Result<Response<DataSchema>, Status>

Updates data schema inside corpus.

source

pub async fn get_data_schema( &mut self, request: impl IntoRequest<GetDataSchemaRequest> ) -> Result<Response<DataSchema>, Status>

Gets data schema inside corpus.

source

pub async fn delete_data_schema( &mut self, request: impl IntoRequest<DeleteDataSchemaRequest> ) -> Result<Response<()>, Status>

Deletes data schema inside corpus.

source

pub async fn list_data_schemas( &mut self, request: impl IntoRequest<ListDataSchemasRequest> ) -> Result<Response<ListDataSchemasResponse>, Status>

Lists a list of data schemas inside corpus.

source

pub async fn create_annotation( &mut self, request: impl IntoRequest<CreateAnnotationRequest> ) -> Result<Response<Annotation>, Status>

Creates annotation inside asset.

source

pub async fn get_annotation( &mut self, request: impl IntoRequest<GetAnnotationRequest> ) -> Result<Response<Annotation>, Status>

Reads annotation inside asset.

source

pub async fn list_annotations( &mut self, request: impl IntoRequest<ListAnnotationsRequest> ) -> Result<Response<ListAnnotationsResponse>, Status>

Lists a list of annotations inside asset.

source

pub async fn update_annotation( &mut self, request: impl IntoRequest<UpdateAnnotationRequest> ) -> Result<Response<Annotation>, Status>

Updates annotation inside asset.

source

pub async fn delete_annotation( &mut self, request: impl IntoRequest<DeleteAnnotationRequest> ) -> Result<Response<()>, Status>

Deletes annotation inside asset.

source

pub async fn ingest_asset( &mut self, request: impl IntoStreamingRequest<Message = IngestAssetRequest> ) -> Result<Response<Streaming<IngestAssetResponse>>, Status>

Ingests data for the asset. It is not allowed to ingest a data chunk which is already expired according to TTL. This method is only available via the gRPC API (not HTTP since bi-directional streaming is not supported via HTTP).

source

pub async fn clip_asset( &mut self, request: impl IntoRequest<ClipAssetRequest> ) -> Result<Response<ClipAssetResponse>, Status>

Generates clips for downloading. The api takes in a time range, and generates a clip of the first content available after start_time and before end_time, which may overflow beyond these bounds. Returned clips are truncated if the total size of the clips are larger than 100MB.

source

pub async fn generate_hls_uri( &mut self, request: impl IntoRequest<GenerateHlsUriRequest> ) -> Result<Response<GenerateHlsUriResponse>, Status>

Generates a uri for an HLS manifest. The api takes in a collection of time ranges, and generates a URI for an HLS manifest that covers all the requested time ranges.

source

pub async fn create_search_config( &mut self, request: impl IntoRequest<CreateSearchConfigRequest> ) -> Result<Response<SearchConfig>, Status>

Creates a search configuration inside a corpus.

Please follow the rules below to create a valid CreateSearchConfigRequest. — General Rules —

  1. Request.search_config_id must not be associated with an existing SearchConfig.
  2. Request must contain at least one non-empty search_criteria_property or facet_property.
  3. mapped_fields must not be empty, and must map to existing UGA keys.
  4. All mapped_fields must be of the same type.
  5. All mapped_fields must share the same granularity.
  6. All mapped_fields must share the same semantic SearchConfig match options. For property-specific rules, please reference the comments for FacetProperty and SearchCriteriaProperty.
source

pub async fn update_search_config( &mut self, request: impl IntoRequest<UpdateSearchConfigRequest> ) -> Result<Response<SearchConfig>, Status>

Updates a search configuration inside a corpus.

Please follow the rules below to create a valid UpdateSearchConfigRequest. — General Rules —

  1. Request.search_configuration.name must already exist.
  2. Request must contain at least one non-empty search_criteria_property or facet_property.
  3. mapped_fields must not be empty, and must map to existing UGA keys.
  4. All mapped_fields must be of the same type.
  5. All mapped_fields must share the same granularity.
  6. All mapped_fields must share the same semantic SearchConfig match options. For property-specific rules, please reference the comments for FacetProperty and SearchCriteriaProperty.
source

pub async fn get_search_config( &mut self, request: impl IntoRequest<GetSearchConfigRequest> ) -> Result<Response<SearchConfig>, Status>

Gets a search configuration inside a corpus.

source

pub async fn delete_search_config( &mut self, request: impl IntoRequest<DeleteSearchConfigRequest> ) -> Result<Response<()>, Status>

Deletes a search configuration inside a corpus.

For a DeleteSearchConfigRequest to be valid, Request.search_configuration.name must already exist.

source

pub async fn list_search_configs( &mut self, request: impl IntoRequest<ListSearchConfigsRequest> ) -> Result<Response<ListSearchConfigsResponse>, Status>

Lists all search configurations inside a corpus.

source

pub async fn search_assets( &mut self, request: impl IntoRequest<SearchAssetsRequest> ) -> Result<Response<SearchAssetsResponse>, Status>

Search media asset.

Trait Implementations§

source§

impl<T: Clone> Clone for WarehouseClient<T>

source§

fn clone(&self) -> WarehouseClient<T>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<T: Debug> Debug for WarehouseClient<T>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<T> !Freeze for WarehouseClient<T>

§

impl<T> RefUnwindSafe for WarehouseClient<T>
where T: RefUnwindSafe,

§

impl<T> Send for WarehouseClient<T>
where T: Send,

§

impl<T> Sync for WarehouseClient<T>
where T: Sync,

§

impl<T> Unpin for WarehouseClient<T>
where T: Unpin,

§

impl<T> UnwindSafe for WarehouseClient<T>
where T: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> FromRef<T> for T
where T: Clone,

§

fn from_ref(input: &T) -> T

Converts to this type from a reference to the input type.
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> IntoRequest<T> for T

source§

fn into_request(self) -> Request<T>

Wrap the input message T in a tonic::Request
source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more