mirror of
https://github.com/OMGeeky/google-apis-rs.git
synced 2026-02-23 15:49:49 +01:00
29 lines
776 B
Rust
29 lines
776 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 {
|
|
/// Manage users on your domain
|
|
AppOrder,
|
|
|
|
/// View usage reports for your G Suite domain
|
|
AppReportUsageReadonly,
|
|
}
|
|
|
|
impl AsRef<str> for Scope {
|
|
fn as_ref(&self) -> &str {
|
|
match *self {
|
|
Scope::AppOrder => "https://www.googleapis.com/auth/apps.order",
|
|
Scope::AppReportUsageReadonly => "https://www.googleapis.com/auth/apps.reports.usage.readonly",
|
|
}
|
|
}
|
|
}
|
|
|
|
impl Default for Scope {
|
|
fn default() -> Scope {
|
|
Scope::AppReportUsageReadonly
|
|
}
|
|
}
|
|
|