gapirs-drive-v3 0.0.1

Rust library for Google API drive v0.0.1
Documentation
// This file was generated by code-gen. DO NOT EDIT MANUALLY! 

///The scopes that are available for the OAuth2 authentication and their descriptions.
#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
#[allow(non_camel_case_types, deprecated)]
pub enum Scopes {
    ///See, edit, create, and delete all of your Google Drive files
    Drive,
    ///See, create, and delete its own configuration data in your Google Drive
    DriveAppdata,
    ///View your Google Drive apps
    DriveAppsReadonly,
    ///See, edit, create, and delete only the specific Google Drive files you use with this app
    DriveFile,
    ///See and download your Google Drive files that were created or edited by Google Meet.
    DriveMeetReadonly,
    ///View and manage metadata of files in your Google Drive
    DriveMetadata,
    ///See information about your Google Drive files
    DriveMetadataReadonly,
    ///View the photos, videos and albums in your Google Photos
    DrivePhotosReadonly,
    ///See and download all your Google Drive files
    DriveReadonly,
    ///Modify your Google Apps Script scripts' behavior
    DriveScripts,
}
impl ::core::fmt::Display for Scopes {
    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
        ::std::write!(f, "{:?}", self)
    }
}
impl ::core::str::FromStr for Scopes {
    type Err = ::alloc::string::String;
    fn from_str(s: &::core::primitive::str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "https://www.googleapis.com/auth/drive" => {
                crate::StdResult::Ok(Scopes::Drive)
            }
            "https://www.googleapis.com/auth/drive.appdata" => {
                crate::StdResult::Ok(Scopes::DriveAppdata)
            }
            "https://www.googleapis.com/auth/drive.apps.readonly" => {
                crate::StdResult::Ok(Scopes::DriveAppsReadonly)
            }
            "https://www.googleapis.com/auth/drive.file" => {
                crate::StdResult::Ok(Scopes::DriveFile)
            }
            "https://www.googleapis.com/auth/drive.meet.readonly" => {
                crate::StdResult::Ok(Scopes::DriveMeetReadonly)
            }
            "https://www.googleapis.com/auth/drive.metadata" => {
                crate::StdResult::Ok(Scopes::DriveMetadata)
            }
            "https://www.googleapis.com/auth/drive.metadata.readonly" => {
                crate::StdResult::Ok(Scopes::DriveMetadataReadonly)
            }
            "https://www.googleapis.com/auth/drive.photos.readonly" => {
                crate::StdResult::Ok(Scopes::DrivePhotosReadonly)
            }
            "https://www.googleapis.com/auth/drive.readonly" => {
                crate::StdResult::Ok(Scopes::DriveReadonly)
            }
            "https://www.googleapis.com/auth/drive.scripts" => {
                crate::StdResult::Ok(Scopes::DriveScripts)
            }
            _ => {
                ::core::result::Result::Err(
                    ::alloc::format!("{s} is not a valid variant of {}", "Scopes"),
                )
            }
        }
    }
}
impl ::core::convert::AsRef<::core::primitive::str> for Scopes {
    fn as_ref(&self) -> &::core::primitive::str {
        match self {
            Scopes::Drive => "https://www.googleapis.com/auth/drive",
            Scopes::DriveAppdata => "https://www.googleapis.com/auth/drive.appdata",
            Scopes::DriveAppsReadonly => {
                "https://www.googleapis.com/auth/drive.apps.readonly"
            }
            Scopes::DriveFile => "https://www.googleapis.com/auth/drive.file",
            Scopes::DriveMeetReadonly => {
                "https://www.googleapis.com/auth/drive.meet.readonly"
            }
            Scopes::DriveMetadata => "https://www.googleapis.com/auth/drive.metadata",
            Scopes::DriveMetadataReadonly => {
                "https://www.googleapis.com/auth/drive.metadata.readonly"
            }
            Scopes::DrivePhotosReadonly => {
                "https://www.googleapis.com/auth/drive.photos.readonly"
            }
            Scopes::DriveReadonly => "https://www.googleapis.com/auth/drive.readonly",
            Scopes::DriveScripts => "https://www.googleapis.com/auth/drive.scripts",
        }
    }
}