mirror of
https://github.com/OMGeeky/google-apis-rs.git
synced 2026-02-23 15:49:49 +01:00
29 lines
784 B
Rust
29 lines
784 B
Rust
use super::*;
|
|
/// Identifies the an OAuth2 authorization scope.
|
|
/// A scope is needed when requesting an
|
|
/// [authorization token](https://developers.google.com/youtube/v3/guides/authentication).
|
|
#[derive(PartialEq, Eq, Hash, Debug, Clone)]
|
|
pub enum Scope {
|
|
/// View and manage your data across Google Cloud Platform services
|
|
CloudPlatform,
|
|
|
|
/// Manage your Google SQL Service instances
|
|
ServiceAdmin,
|
|
}
|
|
|
|
impl AsRef<str> for Scope {
|
|
fn as_ref(&self) -> &str {
|
|
match *self {
|
|
Scope::CloudPlatform => "https://www.googleapis.com/auth/cloud-platform",
|
|
Scope::ServiceAdmin => "https://www.googleapis.com/auth/sqlservice.admin",
|
|
}
|
|
}
|
|
}
|
|
|
|
impl Default for Scope {
|
|
fn default() -> Scope {
|
|
Scope::CloudPlatform
|
|
}
|
|
}
|
|
|