Files
google-apis-rs/gen/sql1_beta4/src/api/utilities.rs
2024-05-16 21:23:40 +02:00

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