pub struct SiteMethods<'a, C>where
C: 'a,{ /* private fields */ }Expand description
A builder providing access to all methods supported on site resources.
It is not used directly, but through the FirebaseHosting hub.
§Example
Instantiate a resource builder
extern crate hyper;
extern crate hyper_rustls;
extern crate google_firebasehosting1_beta1 as firebasehosting1_beta1;
use firebasehosting1_beta1::{FirebaseHosting, FieldMask, hyper_rustls, hyper_util, yup_oauth2};
let secret: yup_oauth2::ApplicationSecret = Default::default();
let auth = yup_oauth2::InstalledFlowAuthenticator::builder(
secret,
yup_oauth2::InstalledFlowReturnMethod::HTTPRedirect,
).build().await.unwrap();
let client = hyper_util::client::legacy::Client::builder(
hyper_util::rt::TokioExecutor::new()
)
.build(
hyper_rustls::HttpsConnectorBuilder::new()
.with_native_roots()
.unwrap()
.https_or_http()
.enable_http1()
.build()
);
let mut hub = FirebaseHosting::new(client, auth);
// Usually you wouldn't bind this to a variable, but keep calling *CallBuilders*
// like `channels_create(...)`, `channels_delete(...)`, `channels_get(...)`, `channels_list(...)`, `channels_patch(...)`, `channels_releases_create(...)`, `channels_releases_get(...)`, `channels_releases_list(...)`, `domains_create(...)`, `domains_delete(...)`, `domains_get(...)`, `domains_list(...)`, `domains_update(...)`, `get_config(...)`, `releases_create(...)`, `releases_get(...)`, `releases_list(...)`, `update_config(...)`, `versions_clone(...)`, `versions_create(...)`, `versions_delete(...)`, `versions_files_list(...)`, `versions_get(...)`, `versions_list(...)`, `versions_patch(...)` and `versions_populate_files(...)`
// to build up your call.
let rb = hub.sites();Implementations§
Source§impl<'a, C> SiteMethods<'a, C>
impl<'a, C> SiteMethods<'a, C>
Sourcepub fn channels_releases_create(
&self,
request: Release,
parent: &str,
) -> SiteChannelReleaseCreateCall<'a, C>
pub fn channels_releases_create( &self, request: Release, parent: &str, ) -> SiteChannelReleaseCreateCall<'a, C>
Create a builder to help you perform the following task:
Creates a new release, which makes the content of the specified version actively display on the appropriate URL(s).
§Arguments
request- No description provided.parent- Required. The site or channel to which the release belongs, in either of the following formats: - sites/SITE_ID - sites/SITE_ID/channels/CHANNEL_ID
Sourcepub fn channels_releases_get(
&self,
name: &str,
) -> SiteChannelReleaseGetCall<'a, C>
pub fn channels_releases_get( &self, name: &str, ) -> SiteChannelReleaseGetCall<'a, C>
Create a builder to help you perform the following task:
Gets the specified release for a site or channel. When used to get a release for a site, this can get releases for both the default live channel and any active preview channels for the specified site.
§Arguments
name- Required. The fully-qualified resource name for the Hosting release, in either of the following formats: - sites/SITE_ID/channels/CHANNEL_ID/releases/RELEASE_ID - sites/SITE_ID/releases/RELEASE_ID
Sourcepub fn channels_releases_list(
&self,
parent: &str,
) -> SiteChannelReleaseListCall<'a, C>
pub fn channels_releases_list( &self, parent: &str, ) -> SiteChannelReleaseListCall<'a, C>
Create a builder to help you perform the following task:
Lists the releases that have been created for the specified site or channel. When used to list releases for a site, this list includes releases for both the default live channel and any active preview channels for the specified site.
§Arguments
parent- Required. The site or channel for which to list releases, in either of the following formats: - sites/SITE_ID - sites/SITE_ID/channels/CHANNEL_ID
Sourcepub fn channels_create(
&self,
request: Channel,
parent: &str,
) -> SiteChannelCreateCall<'a, C>
pub fn channels_create( &self, request: Channel, parent: &str, ) -> SiteChannelCreateCall<'a, C>
Create a builder to help you perform the following task:
Creates a new channel in the specified site.
§Arguments
request- No description provided.parent- Required. The site in which to create this channel, in the format: sites/ SITE_ID
Sourcepub fn channels_delete(&self, name: &str) -> SiteChannelDeleteCall<'a, C>
pub fn channels_delete(&self, name: &str) -> SiteChannelDeleteCall<'a, C>
Create a builder to help you perform the following task:
Deletes the specified channel of the specified site. The live channel cannot be deleted.
§Arguments
name- Required. The fully-qualified resource name for the channel, in the format: sites/SITE_ID/channels/CHANNEL_ID
Sourcepub fn channels_get(&self, name: &str) -> SiteChannelGetCall<'a, C>
pub fn channels_get(&self, name: &str) -> SiteChannelGetCall<'a, C>
Create a builder to help you perform the following task:
Retrieves information for the specified channel of the specified site.
§Arguments
name- Required. The fully-qualified resource name for the channel, in the format: sites/SITE_ID/channels/CHANNEL_ID
Sourcepub fn channels_list(&self, parent: &str) -> SiteChannelListCall<'a, C>
pub fn channels_list(&self, parent: &str) -> SiteChannelListCall<'a, C>
Create a builder to help you perform the following task:
Lists the channels for the specified site. All sites have a default live channel.
§Arguments
parent- Required. The site for which to list channels, in the format: sites/SITE_ID
Sourcepub fn channels_patch(
&self,
request: Channel,
name: &str,
) -> SiteChannelPatchCall<'a, C>
pub fn channels_patch( &self, request: Channel, name: &str, ) -> SiteChannelPatchCall<'a, C>
Create a builder to help you perform the following task:
Updates information for the specified channel of the specified site. Implicitly creates the channel if it doesn’t already exist.
§Arguments
request- No description provided.name- The fully-qualified resource name for the channel, in the format: sites/ SITE_ID/channels/CHANNEL_ID
Sourcepub fn domains_create(
&self,
request: Domain,
parent: &str,
) -> SiteDomainCreateCall<'a, C>
pub fn domains_create( &self, request: Domain, parent: &str, ) -> SiteDomainCreateCall<'a, C>
Create a builder to help you perform the following task:
Creates a domain mapping on the specified site.
§Arguments
request- No description provided.parent- Required. The parent to create the domain association for, in the format: sites/site-name
Sourcepub fn domains_delete(&self, name: &str) -> SiteDomainDeleteCall<'a, C>
pub fn domains_delete(&self, name: &str) -> SiteDomainDeleteCall<'a, C>
Create a builder to help you perform the following task:
Deletes the existing domain mapping on the specified site.
§Arguments
name- Required. The name of the domain association to delete.
Sourcepub fn domains_get(&self, name: &str) -> SiteDomainGetCall<'a, C>
pub fn domains_get(&self, name: &str) -> SiteDomainGetCall<'a, C>
Create a builder to help you perform the following task:
Gets a domain mapping on the specified site.
§Arguments
name- Required. The name of the domain configuration to get.
Sourcepub fn domains_list(&self, parent: &str) -> SiteDomainListCall<'a, C>
pub fn domains_list(&self, parent: &str) -> SiteDomainListCall<'a, C>
Create a builder to help you perform the following task:
Lists the domains for the specified site.
§Arguments
parent- Required. The parent for which to list domains, in the format: sites/ site-name
Sourcepub fn domains_update(
&self,
request: Domain,
name: &str,
) -> SiteDomainUpdateCall<'a, C>
pub fn domains_update( &self, request: Domain, name: &str, ) -> SiteDomainUpdateCall<'a, C>
Create a builder to help you perform the following task:
Updates the specified domain mapping, creating the mapping as if it does not exist.
§Arguments
request- No description provided.name- Required. The name of the domain association to update or create, if an association doesn’t already exist.
Sourcepub fn releases_create(
&self,
request: Release,
parent: &str,
) -> SiteReleaseCreateCall<'a, C>
pub fn releases_create( &self, request: Release, parent: &str, ) -> SiteReleaseCreateCall<'a, C>
Create a builder to help you perform the following task:
Creates a new release, which makes the content of the specified version actively display on the appropriate URL(s).
§Arguments
request- No description provided.parent- Required. The site or channel to which the release belongs, in either of the following formats: - sites/SITE_ID - sites/SITE_ID/channels/CHANNEL_ID
Sourcepub fn releases_get(&self, name: &str) -> SiteReleaseGetCall<'a, C>
pub fn releases_get(&self, name: &str) -> SiteReleaseGetCall<'a, C>
Create a builder to help you perform the following task:
Gets the specified release for a site or channel. When used to get a release for a site, this can get releases for both the default live channel and any active preview channels for the specified site.
§Arguments
name- Required. The fully-qualified resource name for the Hosting release, in either of the following formats: - sites/SITE_ID/channels/CHANNEL_ID/releases/RELEASE_ID - sites/SITE_ID/releases/RELEASE_ID
Sourcepub fn releases_list(&self, parent: &str) -> SiteReleaseListCall<'a, C>
pub fn releases_list(&self, parent: &str) -> SiteReleaseListCall<'a, C>
Create a builder to help you perform the following task:
Lists the releases that have been created for the specified site or channel. When used to list releases for a site, this list includes releases for both the default live channel and any active preview channels for the specified site.
§Arguments
parent- Required. The site or channel for which to list releases, in either of the following formats: - sites/SITE_ID - sites/SITE_ID/channels/CHANNEL_ID
Sourcepub fn versions_files_list(
&self,
parent: &str,
) -> SiteVersionFileListCall<'a, C>
pub fn versions_files_list( &self, parent: &str, ) -> SiteVersionFileListCall<'a, C>
Create a builder to help you perform the following task:
Lists the remaining files to be uploaded for the specified version.
§Arguments
parent- Required. The version for which to list files, in the format: sites/SITE_ID /versions/VERSION_ID
Sourcepub fn versions_clone(
&self,
request: CloneVersionRequest,
parent: &str,
) -> SiteVersionCloneCall<'a, C>
pub fn versions_clone( &self, request: CloneVersionRequest, parent: &str, ) -> SiteVersionCloneCall<'a, C>
Create a builder to help you perform the following task:
Creates a new version on the specified target site using the content of the specified version.
§Arguments
request- No description provided.parent- Required. The target site for the cloned version, in the format: sites/ SITE_ID
Sourcepub fn versions_create(
&self,
request: Version,
parent: &str,
) -> SiteVersionCreateCall<'a, C>
pub fn versions_create( &self, request: Version, parent: &str, ) -> SiteVersionCreateCall<'a, C>
Create a builder to help you perform the following task:
Creates a new version for the specified site.
§Arguments
request- No description provided.parent- Required. The site in which to create the version, in the format: sites/ SITE_ID
Sourcepub fn versions_delete(&self, name: &str) -> SiteVersionDeleteCall<'a, C>
pub fn versions_delete(&self, name: &str) -> SiteVersionDeleteCall<'a, C>
Create a builder to help you perform the following task:
Deletes the specified version.
§Arguments
name- Required. The fully-qualified resource name for the version, in the format: sites/SITE_ID/versions/VERSION_ID
Sourcepub fn versions_get(&self, name: &str) -> SiteVersionGetCall<'a, C>
pub fn versions_get(&self, name: &str) -> SiteVersionGetCall<'a, C>
Create a builder to help you perform the following task:
Get the specified version that has been created for the specified site. This can include versions that were created for the default live channel or for any active preview channels for the specified site.
§Arguments
name- Required. The fully-qualified resource name for the version, in the format: sites/SITE_ID/versions/VERSION_ID
Sourcepub fn versions_list(&self, parent: &str) -> SiteVersionListCall<'a, C>
pub fn versions_list(&self, parent: &str) -> SiteVersionListCall<'a, C>
Create a builder to help you perform the following task:
Lists the versions that have been created for the specified site. This list includes versions for both the default live channel and any active preview channels for the specified site.
§Arguments
parent- Required. The site or channel for which to list versions, in either of the following formats: - sites/SITE_ID - sites/SITE_ID/channels/CHANNEL_ID
Sourcepub fn versions_patch(
&self,
request: Version,
name: &str,
) -> SiteVersionPatchCall<'a, C>
pub fn versions_patch( &self, request: Version, name: &str, ) -> SiteVersionPatchCall<'a, C>
Create a builder to help you perform the following task:
Updates the specified metadata for the specified version. This method will fail with FAILED_PRECONDITION in the event of an invalid state transition. The supported state transitions for a version are from CREATED to FINALIZED. Use DeleteVersion to set the status of a version to DELETED.
§Arguments
request- No description provided.name- The fully-qualified resource name for the version, in the format: sites/ SITE_ID/versions/VERSION_ID This name is provided in the response body when you callCreateVersion.
Sourcepub fn versions_populate_files(
&self,
request: PopulateVersionFilesRequest,
parent: &str,
) -> SiteVersionPopulateFileCall<'a, C>
pub fn versions_populate_files( &self, request: PopulateVersionFilesRequest, parent: &str, ) -> SiteVersionPopulateFileCall<'a, C>
Create a builder to help you perform the following task:
Adds content files to the specified version. Each file must be under 2 GB.
§Arguments
request- No description provided.parent- Required. The version to which to add files, in the format: sites/SITE_ID /versions/VERSION_ID
Sourcepub fn get_config(&self, name: &str) -> SiteGetConfigCall<'a, C>
pub fn get_config(&self, name: &str) -> SiteGetConfigCall<'a, C>
Create a builder to help you perform the following task:
Gets the Hosting metadata for a specific site.
§Arguments
name- Required. The site for which to get the SiteConfig, in the format: sites/ site-name/config
Sourcepub fn update_config(
&self,
request: SiteConfig,
name: &str,
) -> SiteUpdateConfigCall<'a, C>
pub fn update_config( &self, request: SiteConfig, name: &str, ) -> SiteUpdateConfigCall<'a, C>
Create a builder to help you perform the following task:
Sets the Hosting metadata for a specific site.
§Arguments
request- No description provided.name- Required. The site for which to update the SiteConfig, in the format: sites/ site-name/config
Trait Implementations§
impl<'a, C> MethodsBuilder for SiteMethods<'a, C>
Auto Trait Implementations§
impl<'a, C> Freeze for SiteMethods<'a, C>
impl<'a, C> !RefUnwindSafe for SiteMethods<'a, C>
impl<'a, C> Send for SiteMethods<'a, C>where
C: Sync,
impl<'a, C> Sync for SiteMethods<'a, C>where
C: Sync,
impl<'a, C> Unpin for SiteMethods<'a, C>
impl<'a, C> !UnwindSafe for SiteMethods<'a, C>
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more