Struct SiteMethods

Source
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>

Source

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
Source

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
Source

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
Source

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
Source

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
Source

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
Source

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
Source

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
Source

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
Source

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.
Source

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.
Source

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
Source

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.
Source

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
Source

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
Source

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
Source

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
Source

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
Source

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
Source

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
Source

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
Source

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
Source

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 call CreateVersion.
Source

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
Source

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
Source

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§

Source§

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> 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.

Source§

impl<T> Instrument for T

Source§

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

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

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> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts 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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts 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
Source§

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

Source§

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>,

Source§

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.
Source§

impl<T> WithSubscriber for T

Source§

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
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

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

impl<T> ErasedDestructor for T
where T: 'static,