pub struct TemplateServiceClient<T>(/* private fields */);
Expand description
TemplateService manages templates, which are workbooks that can be re-used across runs. Templates are versioned.
Implementations§
Source§impl<T> TemplateServiceClient<T>where
T: Client,
impl<T> TemplateServiceClient<T>where
T: Client,
Sourcepub fn create(
&self,
auth_: &BearerToken,
request: &CreateTemplateRequest,
) -> Result<Template, Error>
pub fn create( &self, auth_: &BearerToken, request: &CreateTemplateRequest, ) -> Result<Template, Error>
Creates a new template.
Sourcepub fn get(
&self,
auth_: &BearerToken,
template_rid: &TemplateRid,
branch: Option<&BranchName>,
commit: Option<&CommitId>,
) -> Result<Template, Error>
pub fn get( &self, auth_: &BearerToken, template_rid: &TemplateRid, branch: Option<&BranchName>, commit: Option<&CommitId>, ) -> Result<Template, Error>
Must only pass one of (branch, commit). If neither are passed, the latest commit on the “main” branch is returned. Throws if the template, branch, or commit doesn’t exist.
pub fn batch_get_metadata( &self, auth_: &BearerToken, rids: &BTreeSet<TemplateRid>, ) -> Result<BTreeSet<TemplateSummary>, Error>
Sourcepub fn save_working_state(
&self,
auth_: &BearerToken,
template_rid: &TemplateRid,
branch: Option<&BranchName>,
request: &SaveTemplateRequest,
) -> Result<Template, Error>
pub fn save_working_state( &self, auth_: &BearerToken, template_rid: &TemplateRid, branch: Option<&BranchName>, request: &SaveTemplateRequest, ) -> Result<Template, Error>
Creates a commit that may be compacted, e.g cleaned up and not exist anymore. Throws if the template or branch doesn’t exist. Throws if the latest commit doesn’t match the provided id. Throws if you save to an archived template.
Sourcepub fn commit(
&self,
auth_: &BearerToken,
template_rid: &TemplateRid,
branch: Option<&BranchName>,
request: &CommitTemplateRequest,
) -> Result<Template, Error>
pub fn commit( &self, auth_: &BearerToken, template_rid: &TemplateRid, branch: Option<&BranchName>, request: &CommitTemplateRequest, ) -> Result<Template, Error>
Creates a commit with a commit message. Throws if the template or branch doesn’t exist. Throws if the latest commit doesn’t match the provided id. Throws if you commit to an archived template.
Sourcepub fn update_metadata(
&self,
auth_: &BearerToken,
template_rid: &TemplateRid,
request: &UpdateMetadataRequest,
) -> Result<TemplateMetadata, Error>
pub fn update_metadata( &self, auth_: &BearerToken, template_rid: &TemplateRid, request: &UpdateMetadataRequest, ) -> Result<TemplateMetadata, Error>
Throws if the template doesn’t exist.
pub fn search_templates( &self, auth_: &BearerToken, request: &SearchTemplatesRequest, ) -> Result<SearchTemplatesResponse, Error>
pub fn get_all_labels_and_properties( &self, auth_: &BearerToken, workspaces: &BTreeSet<WorkspaceRid>, ) -> Result<GetAllLabelsAndPropertiesResponse, Error>
Sourcepub fn merge_to_main(
&self,
auth_: &BearerToken,
template_rid: &TemplateRid,
request: &MergeToMainRequest,
) -> Result<Template, Error>
pub fn merge_to_main( &self, auth_: &BearerToken, template_rid: &TemplateRid, request: &MergeToMainRequest, ) -> Result<Template, Error>
Merges the given branch to the “main” branch. Throws if the template or branch doesn’t exist. Throws if the latest commit doesn’t match the provided id. Throws if you merge on an archived template.
Trait Implementations§
Source§impl<T: Clone> Clone for TemplateServiceClient<T>
impl<T: Clone> Clone for TemplateServiceClient<T>
Source§fn clone(&self) -> TemplateServiceClient<T>
fn clone(&self) -> TemplateServiceClient<T>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more