mirror of
https://github.com/OMGeeky/google-apis-rs.git
synced 2026-02-23 15:49:49 +01:00
make regen-apis
This commit is contained in:
File diff suppressed because it is too large
Load Diff
956
gen/appengine1_beta5/src/api/enums.rs
Normal file
956
gen/appengine1_beta5/src/api/enums.rs
Normal file
@@ -0,0 +1,956 @@
|
||||
use super::*;
|
||||
|
||||
|
||||
|
||||
// region ApiConfigHandlerAuthFailActionEnum
|
||||
#[derive(Clone, Copy, Eq, Hash, Debug, PartialEq, Serialize, Deserialize)]
|
||||
/// Action to take when users access resources that require authentication. Defaults to redirect.
|
||||
pub enum ApiConfigHandlerAuthFailActionEnum {
|
||||
|
||||
|
||||
/// Not specified. AUTH_FAIL_ACTION_REDIRECT is assumed.
|
||||
///
|
||||
/// "AUTH_FAIL_ACTION_UNSPECIFIED"
|
||||
#[serde(rename="AUTH_FAIL_ACTION_UNSPECIFIED")]
|
||||
AUTHFAILACTIONUNSPECIFIED,
|
||||
|
||||
|
||||
/// Redirects user to "accounts.google.com". The user is redirected back to the application URL after signing in or creating an account.
|
||||
///
|
||||
/// "AUTH_FAIL_ACTION_REDIRECT"
|
||||
#[serde(rename="AUTH_FAIL_ACTION_REDIRECT")]
|
||||
AUTHFAILACTIONREDIRECT,
|
||||
|
||||
|
||||
/// Rejects request with an401 HTTP status code and an error message.
|
||||
///
|
||||
/// "AUTH_FAIL_ACTION_UNAUTHORIZED"
|
||||
#[serde(rename="AUTH_FAIL_ACTION_UNAUTHORIZED")]
|
||||
AUTHFAILACTIONUNAUTHORIZED,
|
||||
}
|
||||
|
||||
impl AsRef<str> for ApiConfigHandlerAuthFailActionEnum {
|
||||
fn as_ref(&self) -> &str {
|
||||
match *self {
|
||||
ApiConfigHandlerAuthFailActionEnum::AUTHFAILACTIONUNSPECIFIED => "AUTH_FAIL_ACTION_UNSPECIFIED",
|
||||
ApiConfigHandlerAuthFailActionEnum::AUTHFAILACTIONREDIRECT => "AUTH_FAIL_ACTION_REDIRECT",
|
||||
ApiConfigHandlerAuthFailActionEnum::AUTHFAILACTIONUNAUTHORIZED => "AUTH_FAIL_ACTION_UNAUTHORIZED",
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl std::convert::TryFrom< &str> for ApiConfigHandlerAuthFailActionEnum {
|
||||
type Error = ();
|
||||
fn try_from(value: &str) -> Result<Self, Self::Error> {
|
||||
match value {
|
||||
"AUTH_FAIL_ACTION_UNSPECIFIED" => Ok(ApiConfigHandlerAuthFailActionEnum::AUTHFAILACTIONUNSPECIFIED),
|
||||
"AUTH_FAIL_ACTION_REDIRECT" => Ok(ApiConfigHandlerAuthFailActionEnum::AUTHFAILACTIONREDIRECT),
|
||||
"AUTH_FAIL_ACTION_UNAUTHORIZED" => Ok(ApiConfigHandlerAuthFailActionEnum::AUTHFAILACTIONUNAUTHORIZED),
|
||||
_=> Err(()),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl<'a> Into<std::borrow::Cow<'a, str>> for &'a ApiConfigHandlerAuthFailActionEnum {
|
||||
fn into(self) -> std::borrow::Cow<'a, str> {
|
||||
self.as_ref().into()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// endregion
|
||||
|
||||
|
||||
// region ApiConfigHandlerLoginEnum
|
||||
#[derive(Clone, Copy, Eq, Hash, Debug, PartialEq, Serialize, Deserialize)]
|
||||
/// Level of login required to access this resource. Defaults to optional.
|
||||
pub enum ApiConfigHandlerLoginEnum {
|
||||
|
||||
|
||||
/// Not specified. LOGIN_OPTIONAL is assumed.
|
||||
///
|
||||
/// "LOGIN_UNSPECIFIED"
|
||||
#[serde(rename="LOGIN_UNSPECIFIED")]
|
||||
LOGINUNSPECIFIED,
|
||||
|
||||
|
||||
/// Does not require that the user is signed in.
|
||||
///
|
||||
/// "LOGIN_OPTIONAL"
|
||||
#[serde(rename="LOGIN_OPTIONAL")]
|
||||
LOGINOPTIONAL,
|
||||
|
||||
|
||||
/// If the user is not signed in, the auth_fail_action is taken. In addition, if the user is not an administrator for the application, they are given an error message regardless of auth_fail_action. If the user is an administrator, the handler proceeds.
|
||||
///
|
||||
/// "LOGIN_ADMIN"
|
||||
#[serde(rename="LOGIN_ADMIN")]
|
||||
LOGINADMIN,
|
||||
|
||||
|
||||
/// If the user has signed in, the handler proceeds normally. Otherwise, the action given in auth_fail_action is taken.
|
||||
///
|
||||
/// "LOGIN_REQUIRED"
|
||||
#[serde(rename="LOGIN_REQUIRED")]
|
||||
LOGINREQUIRED,
|
||||
}
|
||||
|
||||
impl AsRef<str> for ApiConfigHandlerLoginEnum {
|
||||
fn as_ref(&self) -> &str {
|
||||
match *self {
|
||||
ApiConfigHandlerLoginEnum::LOGINUNSPECIFIED => "LOGIN_UNSPECIFIED",
|
||||
ApiConfigHandlerLoginEnum::LOGINOPTIONAL => "LOGIN_OPTIONAL",
|
||||
ApiConfigHandlerLoginEnum::LOGINADMIN => "LOGIN_ADMIN",
|
||||
ApiConfigHandlerLoginEnum::LOGINREQUIRED => "LOGIN_REQUIRED",
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl std::convert::TryFrom< &str> for ApiConfigHandlerLoginEnum {
|
||||
type Error = ();
|
||||
fn try_from(value: &str) -> Result<Self, Self::Error> {
|
||||
match value {
|
||||
"LOGIN_UNSPECIFIED" => Ok(ApiConfigHandlerLoginEnum::LOGINUNSPECIFIED),
|
||||
"LOGIN_OPTIONAL" => Ok(ApiConfigHandlerLoginEnum::LOGINOPTIONAL),
|
||||
"LOGIN_ADMIN" => Ok(ApiConfigHandlerLoginEnum::LOGINADMIN),
|
||||
"LOGIN_REQUIRED" => Ok(ApiConfigHandlerLoginEnum::LOGINREQUIRED),
|
||||
_=> Err(()),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl<'a> Into<std::borrow::Cow<'a, str>> for &'a ApiConfigHandlerLoginEnum {
|
||||
fn into(self) -> std::borrow::Cow<'a, str> {
|
||||
self.as_ref().into()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// endregion
|
||||
|
||||
|
||||
// region ApiConfigHandlerSecurityLevelEnum
|
||||
#[derive(Clone, Copy, Eq, Hash, Debug, PartialEq, Serialize, Deserialize)]
|
||||
/// Security (HTTPS) enforcement for this URL.
|
||||
pub enum ApiConfigHandlerSecurityLevelEnum {
|
||||
|
||||
|
||||
/// Not specified.
|
||||
///
|
||||
/// "SECURE_UNSPECIFIED"
|
||||
#[serde(rename="SECURE_UNSPECIFIED")]
|
||||
SECUREUNSPECIFIED,
|
||||
|
||||
|
||||
/// Both HTTP and HTTPS requests with URLs that match the handler succeed without redirects. The application can examine the request to determine which protocol was used, and respond accordingly.
|
||||
///
|
||||
/// "SECURE_DEFAULT"
|
||||
#[serde(rename="SECURE_DEFAULT")]
|
||||
SECUREDEFAULT,
|
||||
|
||||
|
||||
/// Requests for a URL that match this handler that use HTTPS are automatically redirected to the HTTP equivalent URL.
|
||||
///
|
||||
/// "SECURE_NEVER"
|
||||
#[serde(rename="SECURE_NEVER")]
|
||||
SECURENEVER,
|
||||
|
||||
|
||||
/// Both HTTP and HTTPS requests with URLs that match the handler succeed without redirects. The application can examine the request to determine which protocol was used and respond accordingly.
|
||||
///
|
||||
/// "SECURE_OPTIONAL"
|
||||
#[serde(rename="SECURE_OPTIONAL")]
|
||||
SECUREOPTIONAL,
|
||||
|
||||
|
||||
/// Requests for a URL that match this handler that do not use HTTPS are automatically redirected to the HTTPS URL with the same path. Query parameters are reserved for the redirect.
|
||||
///
|
||||
/// "SECURE_ALWAYS"
|
||||
#[serde(rename="SECURE_ALWAYS")]
|
||||
SECUREALWAYS,
|
||||
}
|
||||
|
||||
impl AsRef<str> for ApiConfigHandlerSecurityLevelEnum {
|
||||
fn as_ref(&self) -> &str {
|
||||
match *self {
|
||||
ApiConfigHandlerSecurityLevelEnum::SECUREUNSPECIFIED => "SECURE_UNSPECIFIED",
|
||||
ApiConfigHandlerSecurityLevelEnum::SECUREDEFAULT => "SECURE_DEFAULT",
|
||||
ApiConfigHandlerSecurityLevelEnum::SECURENEVER => "SECURE_NEVER",
|
||||
ApiConfigHandlerSecurityLevelEnum::SECUREOPTIONAL => "SECURE_OPTIONAL",
|
||||
ApiConfigHandlerSecurityLevelEnum::SECUREALWAYS => "SECURE_ALWAYS",
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl std::convert::TryFrom< &str> for ApiConfigHandlerSecurityLevelEnum {
|
||||
type Error = ();
|
||||
fn try_from(value: &str) -> Result<Self, Self::Error> {
|
||||
match value {
|
||||
"SECURE_UNSPECIFIED" => Ok(ApiConfigHandlerSecurityLevelEnum::SECUREUNSPECIFIED),
|
||||
"SECURE_DEFAULT" => Ok(ApiConfigHandlerSecurityLevelEnum::SECUREDEFAULT),
|
||||
"SECURE_NEVER" => Ok(ApiConfigHandlerSecurityLevelEnum::SECURENEVER),
|
||||
"SECURE_OPTIONAL" => Ok(ApiConfigHandlerSecurityLevelEnum::SECUREOPTIONAL),
|
||||
"SECURE_ALWAYS" => Ok(ApiConfigHandlerSecurityLevelEnum::SECUREALWAYS),
|
||||
_=> Err(()),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl<'a> Into<std::borrow::Cow<'a, str>> for &'a ApiConfigHandlerSecurityLevelEnum {
|
||||
fn into(self) -> std::borrow::Cow<'a, str> {
|
||||
self.as_ref().into()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// endregion
|
||||
|
||||
|
||||
// region EndpointsApiServiceRolloutStrategyEnum
|
||||
#[derive(Clone, Copy, Eq, Hash, Debug, PartialEq, Serialize, Deserialize)]
|
||||
/// Endpoints rollout strategy. If FIXED, config_id must be specified. If MANAGED, config_id must be omitted.
|
||||
pub enum EndpointsApiServiceRolloutStrategyEnum {
|
||||
|
||||
|
||||
/// Not specified. Defaults to FIXED.
|
||||
///
|
||||
/// "UNSPECIFIED_ROLLOUT_STRATEGY"
|
||||
#[serde(rename="UNSPECIFIED_ROLLOUT_STRATEGY")]
|
||||
UNSPECIFIEDROLLOUTSTRATEGY,
|
||||
|
||||
|
||||
/// Endpoints service configuration id will be fixed to the configuration id specified by config_id.
|
||||
///
|
||||
/// "FIXED"
|
||||
#[serde(rename="FIXED")]
|
||||
FIXED,
|
||||
|
||||
|
||||
/// Endpoints service configuration id will be updated with each rollout.
|
||||
///
|
||||
/// "MANAGED"
|
||||
#[serde(rename="MANAGED")]
|
||||
MANAGED,
|
||||
}
|
||||
|
||||
impl AsRef<str> for EndpointsApiServiceRolloutStrategyEnum {
|
||||
fn as_ref(&self) -> &str {
|
||||
match *self {
|
||||
EndpointsApiServiceRolloutStrategyEnum::UNSPECIFIEDROLLOUTSTRATEGY => "UNSPECIFIED_ROLLOUT_STRATEGY",
|
||||
EndpointsApiServiceRolloutStrategyEnum::FIXED => "FIXED",
|
||||
EndpointsApiServiceRolloutStrategyEnum::MANAGED => "MANAGED",
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl std::convert::TryFrom< &str> for EndpointsApiServiceRolloutStrategyEnum {
|
||||
type Error = ();
|
||||
fn try_from(value: &str) -> Result<Self, Self::Error> {
|
||||
match value {
|
||||
"UNSPECIFIED_ROLLOUT_STRATEGY" => Ok(EndpointsApiServiceRolloutStrategyEnum::UNSPECIFIEDROLLOUTSTRATEGY),
|
||||
"FIXED" => Ok(EndpointsApiServiceRolloutStrategyEnum::FIXED),
|
||||
"MANAGED" => Ok(EndpointsApiServiceRolloutStrategyEnum::MANAGED),
|
||||
_=> Err(()),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl<'a> Into<std::borrow::Cow<'a, str>> for &'a EndpointsApiServiceRolloutStrategyEnum {
|
||||
fn into(self) -> std::borrow::Cow<'a, str> {
|
||||
self.as_ref().into()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// endregion
|
||||
|
||||
|
||||
// region ErrorHandlerErrorCodeEnum
|
||||
#[derive(Clone, Copy, Eq, Hash, Debug, PartialEq, Serialize, Deserialize)]
|
||||
/// Error condition this handler applies to.
|
||||
pub enum ErrorHandlerErrorCodeEnum {
|
||||
|
||||
|
||||
/// Not specified. ERROR_CODE_DEFAULT is assumed.
|
||||
///
|
||||
/// "ERROR_CODE_UNSPECIFIED"
|
||||
#[serde(rename="ERROR_CODE_UNSPECIFIED")]
|
||||
ERRORCODEUNSPECIFIED,
|
||||
|
||||
|
||||
/// All other error types.
|
||||
///
|
||||
/// "ERROR_CODE_DEFAULT"
|
||||
#[serde(rename="ERROR_CODE_DEFAULT")]
|
||||
ERRORCODEDEFAULT,
|
||||
|
||||
|
||||
/// Application has exceeded a resource quota.
|
||||
///
|
||||
/// "ERROR_CODE_OVER_QUOTA"
|
||||
#[serde(rename="ERROR_CODE_OVER_QUOTA")]
|
||||
ERRORCODEOVERQUOTA,
|
||||
|
||||
|
||||
/// Client blocked by the application's Denial of Service protection configuration.
|
||||
///
|
||||
/// "ERROR_CODE_DOS_API_DENIAL"
|
||||
#[serde(rename="ERROR_CODE_DOS_API_DENIAL")]
|
||||
ERRORCODEDOSAPIDENIAL,
|
||||
|
||||
|
||||
/// Deadline reached before the application responds.
|
||||
///
|
||||
/// "ERROR_CODE_TIMEOUT"
|
||||
#[serde(rename="ERROR_CODE_TIMEOUT")]
|
||||
ERRORCODETIMEOUT,
|
||||
}
|
||||
|
||||
impl AsRef<str> for ErrorHandlerErrorCodeEnum {
|
||||
fn as_ref(&self) -> &str {
|
||||
match *self {
|
||||
ErrorHandlerErrorCodeEnum::ERRORCODEUNSPECIFIED => "ERROR_CODE_UNSPECIFIED",
|
||||
ErrorHandlerErrorCodeEnum::ERRORCODEDEFAULT => "ERROR_CODE_DEFAULT",
|
||||
ErrorHandlerErrorCodeEnum::ERRORCODEOVERQUOTA => "ERROR_CODE_OVER_QUOTA",
|
||||
ErrorHandlerErrorCodeEnum::ERRORCODEDOSAPIDENIAL => "ERROR_CODE_DOS_API_DENIAL",
|
||||
ErrorHandlerErrorCodeEnum::ERRORCODETIMEOUT => "ERROR_CODE_TIMEOUT",
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl std::convert::TryFrom< &str> for ErrorHandlerErrorCodeEnum {
|
||||
type Error = ();
|
||||
fn try_from(value: &str) -> Result<Self, Self::Error> {
|
||||
match value {
|
||||
"ERROR_CODE_UNSPECIFIED" => Ok(ErrorHandlerErrorCodeEnum::ERRORCODEUNSPECIFIED),
|
||||
"ERROR_CODE_DEFAULT" => Ok(ErrorHandlerErrorCodeEnum::ERRORCODEDEFAULT),
|
||||
"ERROR_CODE_OVER_QUOTA" => Ok(ErrorHandlerErrorCodeEnum::ERRORCODEOVERQUOTA),
|
||||
"ERROR_CODE_DOS_API_DENIAL" => Ok(ErrorHandlerErrorCodeEnum::ERRORCODEDOSAPIDENIAL),
|
||||
"ERROR_CODE_TIMEOUT" => Ok(ErrorHandlerErrorCodeEnum::ERRORCODETIMEOUT),
|
||||
_=> Err(()),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl<'a> Into<std::borrow::Cow<'a, str>> for &'a ErrorHandlerErrorCodeEnum {
|
||||
fn into(self) -> std::borrow::Cow<'a, str> {
|
||||
self.as_ref().into()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// endregion
|
||||
|
||||
|
||||
// region InstanceAvailabilityEnum
|
||||
#[derive(Clone, Copy, Eq, Hash, Debug, PartialEq, Serialize, Deserialize)]
|
||||
/// Availability of the instance.@OutputOnly
|
||||
pub enum InstanceAvailabilityEnum {
|
||||
|
||||
/// "UNSPECIFIED"
|
||||
#[serde(rename="UNSPECIFIED")]
|
||||
UNSPECIFIED,
|
||||
|
||||
/// "RESIDENT"
|
||||
#[serde(rename="RESIDENT")]
|
||||
RESIDENT,
|
||||
|
||||
/// "DYNAMIC"
|
||||
#[serde(rename="DYNAMIC")]
|
||||
DYNAMIC,
|
||||
}
|
||||
|
||||
impl AsRef<str> for InstanceAvailabilityEnum {
|
||||
fn as_ref(&self) -> &str {
|
||||
match *self {
|
||||
InstanceAvailabilityEnum::UNSPECIFIED => "UNSPECIFIED",
|
||||
InstanceAvailabilityEnum::RESIDENT => "RESIDENT",
|
||||
InstanceAvailabilityEnum::DYNAMIC => "DYNAMIC",
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl std::convert::TryFrom< &str> for InstanceAvailabilityEnum {
|
||||
type Error = ();
|
||||
fn try_from(value: &str) -> Result<Self, Self::Error> {
|
||||
match value {
|
||||
"UNSPECIFIED" => Ok(InstanceAvailabilityEnum::UNSPECIFIED),
|
||||
"RESIDENT" => Ok(InstanceAvailabilityEnum::RESIDENT),
|
||||
"DYNAMIC" => Ok(InstanceAvailabilityEnum::DYNAMIC),
|
||||
_=> Err(()),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl<'a> Into<std::borrow::Cow<'a, str>> for &'a InstanceAvailabilityEnum {
|
||||
fn into(self) -> std::borrow::Cow<'a, str> {
|
||||
self.as_ref().into()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// endregion
|
||||
|
||||
|
||||
// region TrafficSplitShardByEnum
|
||||
#[derive(Clone, Copy, Eq, Hash, Debug, PartialEq, Serialize, Deserialize)]
|
||||
/// Mechanism used to determine which version a request is sent to. The traffic selection algorithm will be stable for either type until allocations are changed.
|
||||
pub enum TrafficSplitShardByEnum {
|
||||
|
||||
|
||||
/// Diversion method unspecified.
|
||||
///
|
||||
/// "UNSPECIFIED"
|
||||
#[serde(rename="UNSPECIFIED")]
|
||||
UNSPECIFIED,
|
||||
|
||||
|
||||
/// Diversion based on a specially named cookie, "GOOGAPPUID." The cookie must be set by the application itself or else no diversion will occur.
|
||||
///
|
||||
/// "COOKIE"
|
||||
#[serde(rename="COOKIE")]
|
||||
COOKIE,
|
||||
|
||||
|
||||
/// Diversion based on applying the modulus operation to a fingerprint of the IP address.
|
||||
///
|
||||
/// "IP"
|
||||
#[serde(rename="IP")]
|
||||
IP,
|
||||
}
|
||||
|
||||
impl AsRef<str> for TrafficSplitShardByEnum {
|
||||
fn as_ref(&self) -> &str {
|
||||
match *self {
|
||||
TrafficSplitShardByEnum::UNSPECIFIED => "UNSPECIFIED",
|
||||
TrafficSplitShardByEnum::COOKIE => "COOKIE",
|
||||
TrafficSplitShardByEnum::IP => "IP",
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl std::convert::TryFrom< &str> for TrafficSplitShardByEnum {
|
||||
type Error = ();
|
||||
fn try_from(value: &str) -> Result<Self, Self::Error> {
|
||||
match value {
|
||||
"UNSPECIFIED" => Ok(TrafficSplitShardByEnum::UNSPECIFIED),
|
||||
"COOKIE" => Ok(TrafficSplitShardByEnum::COOKIE),
|
||||
"IP" => Ok(TrafficSplitShardByEnum::IP),
|
||||
_=> Err(()),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl<'a> Into<std::borrow::Cow<'a, str>> for &'a TrafficSplitShardByEnum {
|
||||
fn into(self) -> std::borrow::Cow<'a, str> {
|
||||
self.as_ref().into()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// endregion
|
||||
|
||||
|
||||
// region UrlMapAuthFailActionEnum
|
||||
#[derive(Clone, Copy, Eq, Hash, Debug, PartialEq, Serialize, Deserialize)]
|
||||
/// Action to take when users access resources that require authentication. Defaults to redirect.
|
||||
pub enum UrlMapAuthFailActionEnum {
|
||||
|
||||
|
||||
/// Not specified. AUTH_FAIL_ACTION_REDIRECT is assumed.
|
||||
///
|
||||
/// "AUTH_FAIL_ACTION_UNSPECIFIED"
|
||||
#[serde(rename="AUTH_FAIL_ACTION_UNSPECIFIED")]
|
||||
AUTHFAILACTIONUNSPECIFIED,
|
||||
|
||||
|
||||
/// Redirects user to "accounts.google.com". The user is redirected back to the application URL after signing in or creating an account.
|
||||
///
|
||||
/// "AUTH_FAIL_ACTION_REDIRECT"
|
||||
#[serde(rename="AUTH_FAIL_ACTION_REDIRECT")]
|
||||
AUTHFAILACTIONREDIRECT,
|
||||
|
||||
|
||||
/// Rejects request with an401 HTTP status code and an error message.
|
||||
///
|
||||
/// "AUTH_FAIL_ACTION_UNAUTHORIZED"
|
||||
#[serde(rename="AUTH_FAIL_ACTION_UNAUTHORIZED")]
|
||||
AUTHFAILACTIONUNAUTHORIZED,
|
||||
}
|
||||
|
||||
impl AsRef<str> for UrlMapAuthFailActionEnum {
|
||||
fn as_ref(&self) -> &str {
|
||||
match *self {
|
||||
UrlMapAuthFailActionEnum::AUTHFAILACTIONUNSPECIFIED => "AUTH_FAIL_ACTION_UNSPECIFIED",
|
||||
UrlMapAuthFailActionEnum::AUTHFAILACTIONREDIRECT => "AUTH_FAIL_ACTION_REDIRECT",
|
||||
UrlMapAuthFailActionEnum::AUTHFAILACTIONUNAUTHORIZED => "AUTH_FAIL_ACTION_UNAUTHORIZED",
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl std::convert::TryFrom< &str> for UrlMapAuthFailActionEnum {
|
||||
type Error = ();
|
||||
fn try_from(value: &str) -> Result<Self, Self::Error> {
|
||||
match value {
|
||||
"AUTH_FAIL_ACTION_UNSPECIFIED" => Ok(UrlMapAuthFailActionEnum::AUTHFAILACTIONUNSPECIFIED),
|
||||
"AUTH_FAIL_ACTION_REDIRECT" => Ok(UrlMapAuthFailActionEnum::AUTHFAILACTIONREDIRECT),
|
||||
"AUTH_FAIL_ACTION_UNAUTHORIZED" => Ok(UrlMapAuthFailActionEnum::AUTHFAILACTIONUNAUTHORIZED),
|
||||
_=> Err(()),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl<'a> Into<std::borrow::Cow<'a, str>> for &'a UrlMapAuthFailActionEnum {
|
||||
fn into(self) -> std::borrow::Cow<'a, str> {
|
||||
self.as_ref().into()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// endregion
|
||||
|
||||
|
||||
// region UrlMapLoginEnum
|
||||
#[derive(Clone, Copy, Eq, Hash, Debug, PartialEq, Serialize, Deserialize)]
|
||||
/// Level of login required to access this resource.
|
||||
pub enum UrlMapLoginEnum {
|
||||
|
||||
|
||||
/// Not specified. LOGIN_OPTIONAL is assumed.
|
||||
///
|
||||
/// "LOGIN_UNSPECIFIED"
|
||||
#[serde(rename="LOGIN_UNSPECIFIED")]
|
||||
LOGINUNSPECIFIED,
|
||||
|
||||
|
||||
/// Does not require that the user is signed in.
|
||||
///
|
||||
/// "LOGIN_OPTIONAL"
|
||||
#[serde(rename="LOGIN_OPTIONAL")]
|
||||
LOGINOPTIONAL,
|
||||
|
||||
|
||||
/// If the user is not signed in, the auth_fail_action is taken. In addition, if the user is not an administrator for the application, they are given an error message regardless of auth_fail_action. If the user is an administrator, the handler proceeds.
|
||||
///
|
||||
/// "LOGIN_ADMIN"
|
||||
#[serde(rename="LOGIN_ADMIN")]
|
||||
LOGINADMIN,
|
||||
|
||||
|
||||
/// If the user has signed in, the handler proceeds normally. Otherwise, the action given in auth_fail_action is taken.
|
||||
///
|
||||
/// "LOGIN_REQUIRED"
|
||||
#[serde(rename="LOGIN_REQUIRED")]
|
||||
LOGINREQUIRED,
|
||||
}
|
||||
|
||||
impl AsRef<str> for UrlMapLoginEnum {
|
||||
fn as_ref(&self) -> &str {
|
||||
match *self {
|
||||
UrlMapLoginEnum::LOGINUNSPECIFIED => "LOGIN_UNSPECIFIED",
|
||||
UrlMapLoginEnum::LOGINOPTIONAL => "LOGIN_OPTIONAL",
|
||||
UrlMapLoginEnum::LOGINADMIN => "LOGIN_ADMIN",
|
||||
UrlMapLoginEnum::LOGINREQUIRED => "LOGIN_REQUIRED",
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl std::convert::TryFrom< &str> for UrlMapLoginEnum {
|
||||
type Error = ();
|
||||
fn try_from(value: &str) -> Result<Self, Self::Error> {
|
||||
match value {
|
||||
"LOGIN_UNSPECIFIED" => Ok(UrlMapLoginEnum::LOGINUNSPECIFIED),
|
||||
"LOGIN_OPTIONAL" => Ok(UrlMapLoginEnum::LOGINOPTIONAL),
|
||||
"LOGIN_ADMIN" => Ok(UrlMapLoginEnum::LOGINADMIN),
|
||||
"LOGIN_REQUIRED" => Ok(UrlMapLoginEnum::LOGINREQUIRED),
|
||||
_=> Err(()),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl<'a> Into<std::borrow::Cow<'a, str>> for &'a UrlMapLoginEnum {
|
||||
fn into(self) -> std::borrow::Cow<'a, str> {
|
||||
self.as_ref().into()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// endregion
|
||||
|
||||
|
||||
// region UrlMapRedirectHttpResponseCodeEnum
|
||||
#[derive(Clone, Copy, Eq, Hash, Debug, PartialEq, Serialize, Deserialize)]
|
||||
/// 30x code to use when performing redirects for the secure field. Defaults to 302.
|
||||
pub enum UrlMapRedirectHttpResponseCodeEnum {
|
||||
|
||||
|
||||
/// Not specified. 302 is assumed.
|
||||
///
|
||||
/// "REDIRECT_HTTP_RESPONSE_CODE_UNSPECIFIED"
|
||||
#[serde(rename="REDIRECT_HTTP_RESPONSE_CODE_UNSPECIFIED")]
|
||||
REDIRECTHTTPRESPONSECODEUNSPECIFIED,
|
||||
|
||||
|
||||
/// 301 Moved Permanently code.
|
||||
///
|
||||
/// "REDIRECT_HTTP_RESPONSE_CODE_301"
|
||||
#[serde(rename="REDIRECT_HTTP_RESPONSE_CODE_301")]
|
||||
REDIRECTHTTPRESPONSECODE301,
|
||||
|
||||
|
||||
/// 302 Moved Temporarily code.
|
||||
///
|
||||
/// "REDIRECT_HTTP_RESPONSE_CODE_302"
|
||||
#[serde(rename="REDIRECT_HTTP_RESPONSE_CODE_302")]
|
||||
REDIRECTHTTPRESPONSECODE302,
|
||||
|
||||
|
||||
/// 303 See Other code.
|
||||
///
|
||||
/// "REDIRECT_HTTP_RESPONSE_CODE_303"
|
||||
#[serde(rename="REDIRECT_HTTP_RESPONSE_CODE_303")]
|
||||
REDIRECTHTTPRESPONSECODE303,
|
||||
|
||||
|
||||
/// 307 Temporary Redirect code.
|
||||
///
|
||||
/// "REDIRECT_HTTP_RESPONSE_CODE_307"
|
||||
#[serde(rename="REDIRECT_HTTP_RESPONSE_CODE_307")]
|
||||
REDIRECTHTTPRESPONSECODE307,
|
||||
}
|
||||
|
||||
impl AsRef<str> for UrlMapRedirectHttpResponseCodeEnum {
|
||||
fn as_ref(&self) -> &str {
|
||||
match *self {
|
||||
UrlMapRedirectHttpResponseCodeEnum::REDIRECTHTTPRESPONSECODEUNSPECIFIED => "REDIRECT_HTTP_RESPONSE_CODE_UNSPECIFIED",
|
||||
UrlMapRedirectHttpResponseCodeEnum::REDIRECTHTTPRESPONSECODE301 => "REDIRECT_HTTP_RESPONSE_CODE_301",
|
||||
UrlMapRedirectHttpResponseCodeEnum::REDIRECTHTTPRESPONSECODE302 => "REDIRECT_HTTP_RESPONSE_CODE_302",
|
||||
UrlMapRedirectHttpResponseCodeEnum::REDIRECTHTTPRESPONSECODE303 => "REDIRECT_HTTP_RESPONSE_CODE_303",
|
||||
UrlMapRedirectHttpResponseCodeEnum::REDIRECTHTTPRESPONSECODE307 => "REDIRECT_HTTP_RESPONSE_CODE_307",
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl std::convert::TryFrom< &str> for UrlMapRedirectHttpResponseCodeEnum {
|
||||
type Error = ();
|
||||
fn try_from(value: &str) -> Result<Self, Self::Error> {
|
||||
match value {
|
||||
"REDIRECT_HTTP_RESPONSE_CODE_UNSPECIFIED" => Ok(UrlMapRedirectHttpResponseCodeEnum::REDIRECTHTTPRESPONSECODEUNSPECIFIED),
|
||||
"REDIRECT_HTTP_RESPONSE_CODE_301" => Ok(UrlMapRedirectHttpResponseCodeEnum::REDIRECTHTTPRESPONSECODE301),
|
||||
"REDIRECT_HTTP_RESPONSE_CODE_302" => Ok(UrlMapRedirectHttpResponseCodeEnum::REDIRECTHTTPRESPONSECODE302),
|
||||
"REDIRECT_HTTP_RESPONSE_CODE_303" => Ok(UrlMapRedirectHttpResponseCodeEnum::REDIRECTHTTPRESPONSECODE303),
|
||||
"REDIRECT_HTTP_RESPONSE_CODE_307" => Ok(UrlMapRedirectHttpResponseCodeEnum::REDIRECTHTTPRESPONSECODE307),
|
||||
_=> Err(()),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl<'a> Into<std::borrow::Cow<'a, str>> for &'a UrlMapRedirectHttpResponseCodeEnum {
|
||||
fn into(self) -> std::borrow::Cow<'a, str> {
|
||||
self.as_ref().into()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// endregion
|
||||
|
||||
|
||||
// region UrlMapSecurityLevelEnum
|
||||
#[derive(Clone, Copy, Eq, Hash, Debug, PartialEq, Serialize, Deserialize)]
|
||||
/// Security (HTTPS) enforcement for this URL.
|
||||
pub enum UrlMapSecurityLevelEnum {
|
||||
|
||||
|
||||
/// Not specified.
|
||||
///
|
||||
/// "SECURE_UNSPECIFIED"
|
||||
#[serde(rename="SECURE_UNSPECIFIED")]
|
||||
SECUREUNSPECIFIED,
|
||||
|
||||
|
||||
/// Both HTTP and HTTPS requests with URLs that match the handler succeed without redirects. The application can examine the request to determine which protocol was used, and respond accordingly.
|
||||
///
|
||||
/// "SECURE_DEFAULT"
|
||||
#[serde(rename="SECURE_DEFAULT")]
|
||||
SECUREDEFAULT,
|
||||
|
||||
|
||||
/// Requests for a URL that match this handler that use HTTPS are automatically redirected to the HTTP equivalent URL.
|
||||
///
|
||||
/// "SECURE_NEVER"
|
||||
#[serde(rename="SECURE_NEVER")]
|
||||
SECURENEVER,
|
||||
|
||||
|
||||
/// Both HTTP and HTTPS requests with URLs that match the handler succeed without redirects. The application can examine the request to determine which protocol was used and respond accordingly.
|
||||
///
|
||||
/// "SECURE_OPTIONAL"
|
||||
#[serde(rename="SECURE_OPTIONAL")]
|
||||
SECUREOPTIONAL,
|
||||
|
||||
|
||||
/// Requests for a URL that match this handler that do not use HTTPS are automatically redirected to the HTTPS URL with the same path. Query parameters are reserved for the redirect.
|
||||
///
|
||||
/// "SECURE_ALWAYS"
|
||||
#[serde(rename="SECURE_ALWAYS")]
|
||||
SECUREALWAYS,
|
||||
}
|
||||
|
||||
impl AsRef<str> for UrlMapSecurityLevelEnum {
|
||||
fn as_ref(&self) -> &str {
|
||||
match *self {
|
||||
UrlMapSecurityLevelEnum::SECUREUNSPECIFIED => "SECURE_UNSPECIFIED",
|
||||
UrlMapSecurityLevelEnum::SECUREDEFAULT => "SECURE_DEFAULT",
|
||||
UrlMapSecurityLevelEnum::SECURENEVER => "SECURE_NEVER",
|
||||
UrlMapSecurityLevelEnum::SECUREOPTIONAL => "SECURE_OPTIONAL",
|
||||
UrlMapSecurityLevelEnum::SECUREALWAYS => "SECURE_ALWAYS",
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl std::convert::TryFrom< &str> for UrlMapSecurityLevelEnum {
|
||||
type Error = ();
|
||||
fn try_from(value: &str) -> Result<Self, Self::Error> {
|
||||
match value {
|
||||
"SECURE_UNSPECIFIED" => Ok(UrlMapSecurityLevelEnum::SECUREUNSPECIFIED),
|
||||
"SECURE_DEFAULT" => Ok(UrlMapSecurityLevelEnum::SECUREDEFAULT),
|
||||
"SECURE_NEVER" => Ok(UrlMapSecurityLevelEnum::SECURENEVER),
|
||||
"SECURE_OPTIONAL" => Ok(UrlMapSecurityLevelEnum::SECUREOPTIONAL),
|
||||
"SECURE_ALWAYS" => Ok(UrlMapSecurityLevelEnum::SECUREALWAYS),
|
||||
_=> Err(()),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl<'a> Into<std::borrow::Cow<'a, str>> for &'a UrlMapSecurityLevelEnum {
|
||||
fn into(self) -> std::borrow::Cow<'a, str> {
|
||||
self.as_ref().into()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// endregion
|
||||
|
||||
|
||||
// region VersionInboundServicesEnum
|
||||
#[derive(Clone, Copy, Eq, Hash, Debug, PartialEq, Serialize, Deserialize)]
|
||||
/// Before an application can receive email or XMPP messages, the application must be configured to enable the service.
|
||||
pub enum VersionInboundServicesEnum {
|
||||
|
||||
|
||||
/// Not specified.
|
||||
///
|
||||
/// "INBOUND_SERVICE_UNSPECIFIED"
|
||||
#[serde(rename="INBOUND_SERVICE_UNSPECIFIED")]
|
||||
INBOUNDSERVICEUNSPECIFIED,
|
||||
|
||||
|
||||
/// Allows an application to receive mail.
|
||||
///
|
||||
/// "INBOUND_SERVICE_MAIL"
|
||||
#[serde(rename="INBOUND_SERVICE_MAIL")]
|
||||
INBOUNDSERVICEMAIL,
|
||||
|
||||
|
||||
/// Allows an application to receive email-bound notifications.
|
||||
///
|
||||
/// "INBOUND_SERVICE_MAIL_BOUNCE"
|
||||
#[serde(rename="INBOUND_SERVICE_MAIL_BOUNCE")]
|
||||
INBOUNDSERVICEMAILBOUNCE,
|
||||
|
||||
|
||||
/// Allows an application to receive error stanzas.
|
||||
///
|
||||
/// "INBOUND_SERVICE_XMPP_ERROR"
|
||||
#[serde(rename="INBOUND_SERVICE_XMPP_ERROR")]
|
||||
INBOUNDSERVICEXMPPERROR,
|
||||
|
||||
|
||||
/// Allows an application to receive instant messages.
|
||||
///
|
||||
/// "INBOUND_SERVICE_XMPP_MESSAGE"
|
||||
#[serde(rename="INBOUND_SERVICE_XMPP_MESSAGE")]
|
||||
INBOUNDSERVICEXMPPMESSAGE,
|
||||
|
||||
|
||||
/// Allows an application to receive user subscription POSTs.
|
||||
///
|
||||
/// "INBOUND_SERVICE_XMPP_SUBSCRIBE"
|
||||
#[serde(rename="INBOUND_SERVICE_XMPP_SUBSCRIBE")]
|
||||
INBOUNDSERVICEXMPPSUBSCRIBE,
|
||||
|
||||
|
||||
/// Allows an application to receive a user's chat presence.
|
||||
///
|
||||
/// "INBOUND_SERVICE_XMPP_PRESENCE"
|
||||
#[serde(rename="INBOUND_SERVICE_XMPP_PRESENCE")]
|
||||
INBOUNDSERVICEXMPPPRESENCE,
|
||||
|
||||
|
||||
/// Registers an application for notifications when a client connects or disconnects from a channel.
|
||||
///
|
||||
/// "INBOUND_SERVICE_CHANNEL_PRESENCE"
|
||||
#[serde(rename="INBOUND_SERVICE_CHANNEL_PRESENCE")]
|
||||
INBOUNDSERVICECHANNELPRESENCE,
|
||||
|
||||
|
||||
/// Enables warmup requests.
|
||||
///
|
||||
/// "INBOUND_SERVICE_WARMUP"
|
||||
#[serde(rename="INBOUND_SERVICE_WARMUP")]
|
||||
INBOUNDSERVICEWARMUP,
|
||||
}
|
||||
|
||||
impl AsRef<str> for VersionInboundServicesEnum {
|
||||
fn as_ref(&self) -> &str {
|
||||
match *self {
|
||||
VersionInboundServicesEnum::INBOUNDSERVICEUNSPECIFIED => "INBOUND_SERVICE_UNSPECIFIED",
|
||||
VersionInboundServicesEnum::INBOUNDSERVICEMAIL => "INBOUND_SERVICE_MAIL",
|
||||
VersionInboundServicesEnum::INBOUNDSERVICEMAILBOUNCE => "INBOUND_SERVICE_MAIL_BOUNCE",
|
||||
VersionInboundServicesEnum::INBOUNDSERVICEXMPPERROR => "INBOUND_SERVICE_XMPP_ERROR",
|
||||
VersionInboundServicesEnum::INBOUNDSERVICEXMPPMESSAGE => "INBOUND_SERVICE_XMPP_MESSAGE",
|
||||
VersionInboundServicesEnum::INBOUNDSERVICEXMPPSUBSCRIBE => "INBOUND_SERVICE_XMPP_SUBSCRIBE",
|
||||
VersionInboundServicesEnum::INBOUNDSERVICEXMPPPRESENCE => "INBOUND_SERVICE_XMPP_PRESENCE",
|
||||
VersionInboundServicesEnum::INBOUNDSERVICECHANNELPRESENCE => "INBOUND_SERVICE_CHANNEL_PRESENCE",
|
||||
VersionInboundServicesEnum::INBOUNDSERVICEWARMUP => "INBOUND_SERVICE_WARMUP",
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl std::convert::TryFrom< &str> for VersionInboundServicesEnum {
|
||||
type Error = ();
|
||||
fn try_from(value: &str) -> Result<Self, Self::Error> {
|
||||
match value {
|
||||
"INBOUND_SERVICE_UNSPECIFIED" => Ok(VersionInboundServicesEnum::INBOUNDSERVICEUNSPECIFIED),
|
||||
"INBOUND_SERVICE_MAIL" => Ok(VersionInboundServicesEnum::INBOUNDSERVICEMAIL),
|
||||
"INBOUND_SERVICE_MAIL_BOUNCE" => Ok(VersionInboundServicesEnum::INBOUNDSERVICEMAILBOUNCE),
|
||||
"INBOUND_SERVICE_XMPP_ERROR" => Ok(VersionInboundServicesEnum::INBOUNDSERVICEXMPPERROR),
|
||||
"INBOUND_SERVICE_XMPP_MESSAGE" => Ok(VersionInboundServicesEnum::INBOUNDSERVICEXMPPMESSAGE),
|
||||
"INBOUND_SERVICE_XMPP_SUBSCRIBE" => Ok(VersionInboundServicesEnum::INBOUNDSERVICEXMPPSUBSCRIBE),
|
||||
"INBOUND_SERVICE_XMPP_PRESENCE" => Ok(VersionInboundServicesEnum::INBOUNDSERVICEXMPPPRESENCE),
|
||||
"INBOUND_SERVICE_CHANNEL_PRESENCE" => Ok(VersionInboundServicesEnum::INBOUNDSERVICECHANNELPRESENCE),
|
||||
"INBOUND_SERVICE_WARMUP" => Ok(VersionInboundServicesEnum::INBOUNDSERVICEWARMUP),
|
||||
_=> Err(()),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl<'a> Into<std::borrow::Cow<'a, str>> for &'a VersionInboundServicesEnum {
|
||||
fn into(self) -> std::borrow::Cow<'a, str> {
|
||||
self.as_ref().into()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// endregion
|
||||
|
||||
|
||||
// region VersionServingStatusEnum
|
||||
#[derive(Clone, Copy, Eq, Hash, Debug, PartialEq, Serialize, Deserialize)]
|
||||
/// Current serving status of this version. Only the versions with a SERVING status create instances and can be billed.SERVING_STATUS_UNSPECIFIED is an invalid value. Defaults to SERVING.
|
||||
pub enum VersionServingStatusEnum {
|
||||
|
||||
|
||||
/// Not specified.
|
||||
///
|
||||
/// "SERVING_STATUS_UNSPECIFIED"
|
||||
#[serde(rename="SERVING_STATUS_UNSPECIFIED")]
|
||||
SERVINGSTATUSUNSPECIFIED,
|
||||
|
||||
|
||||
/// Currently serving. Instances are created according to the scaling settings of the version.
|
||||
///
|
||||
/// "SERVING"
|
||||
#[serde(rename="SERVING")]
|
||||
SERVING,
|
||||
|
||||
|
||||
/// Disabled from serving. No instances will be created and the scaling settings are ignored until the state of the version changes to SERVING.
|
||||
///
|
||||
/// "STOPPED"
|
||||
#[serde(rename="STOPPED")]
|
||||
STOPPED,
|
||||
}
|
||||
|
||||
impl AsRef<str> for VersionServingStatusEnum {
|
||||
fn as_ref(&self) -> &str {
|
||||
match *self {
|
||||
VersionServingStatusEnum::SERVINGSTATUSUNSPECIFIED => "SERVING_STATUS_UNSPECIFIED",
|
||||
VersionServingStatusEnum::SERVING => "SERVING",
|
||||
VersionServingStatusEnum::STOPPED => "STOPPED",
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl std::convert::TryFrom< &str> for VersionServingStatusEnum {
|
||||
type Error = ();
|
||||
fn try_from(value: &str) -> Result<Self, Self::Error> {
|
||||
match value {
|
||||
"SERVING_STATUS_UNSPECIFIED" => Ok(VersionServingStatusEnum::SERVINGSTATUSUNSPECIFIED),
|
||||
"SERVING" => Ok(VersionServingStatusEnum::SERVING),
|
||||
"STOPPED" => Ok(VersionServingStatusEnum::STOPPED),
|
||||
_=> Err(()),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl<'a> Into<std::borrow::Cow<'a, str>> for &'a VersionServingStatusEnum {
|
||||
fn into(self) -> std::borrow::Cow<'a, str> {
|
||||
self.as_ref().into()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// endregion
|
||||
|
||||
|
||||
// region AppViewEnum
|
||||
#[derive(Clone, Copy, Eq, Hash, Debug, PartialEq, Serialize, Deserialize)]
|
||||
/// Controls the set of fields returned in the List response.
|
||||
pub enum AppViewEnum {
|
||||
|
||||
|
||||
/// no description found
|
||||
///
|
||||
/// "BASIC"
|
||||
#[serde(rename="BASIC")]
|
||||
BASIC,
|
||||
|
||||
|
||||
/// no description found
|
||||
///
|
||||
/// "FULL"
|
||||
#[serde(rename="FULL")]
|
||||
FULL,
|
||||
}
|
||||
|
||||
impl AsRef<str> for AppViewEnum {
|
||||
fn as_ref(&self) -> &str {
|
||||
match *self {
|
||||
AppViewEnum::BASIC => "BASIC",
|
||||
AppViewEnum::FULL => "FULL",
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl std::convert::TryFrom< &str> for AppViewEnum {
|
||||
type Error = ();
|
||||
fn try_from(value: &str) -> Result<Self, Self::Error> {
|
||||
match value {
|
||||
"BASIC" => Ok(AppViewEnum::BASIC),
|
||||
"FULL" => Ok(AppViewEnum::FULL),
|
||||
_=> Err(()),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl<'a> Into<std::borrow::Cow<'a, str>> for &'a AppViewEnum {
|
||||
fn into(self) -> std::borrow::Cow<'a, str> {
|
||||
self.as_ref().into()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// endregion
|
||||
|
||||
|
||||
113
gen/appengine1_beta5/src/api/hub.rs
Normal file
113
gen/appengine1_beta5/src/api/hub.rs
Normal file
@@ -0,0 +1,113 @@
|
||||
use super::*;
|
||||
|
||||
/// Central instance to access all Appengine related resource activities
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
/// Instantiate a new hub
|
||||
///
|
||||
/// ```test_harness,no_run
|
||||
/// extern crate hyper;
|
||||
/// extern crate hyper_rustls;
|
||||
/// extern crate google_appengine1_beta5 as appengine1_beta5;
|
||||
/// use appengine1_beta5::api::DebugInstanceRequest;
|
||||
/// use appengine1_beta5::{Result, Error};
|
||||
/// use appengine1_beta5::api::enums::*;
|
||||
/// # async fn dox() {
|
||||
/// use std::default::Default;
|
||||
/// use appengine1_beta5::{Appengine, oauth2, hyper, hyper_rustls, chrono, FieldMask};
|
||||
///
|
||||
/// // Get an ApplicationSecret instance by some means. It contains the `client_id` and
|
||||
/// // `client_secret`, among other things.
|
||||
/// let secret: oauth2::ApplicationSecret = Default::default();
|
||||
/// // Instantiate the authenticator. It will choose a suitable authentication flow for you,
|
||||
/// // unless you replace `None` with the desired Flow.
|
||||
/// // Provide your own `AuthenticatorDelegate` to adjust the way it operates and get feedback about
|
||||
/// // what's going on. You probably want to bring in your own `TokenStorage` to persist tokens and
|
||||
/// // retrieve them from storage.
|
||||
/// let auth = oauth2::InstalledFlowAuthenticator::builder(
|
||||
/// secret,
|
||||
/// oauth2::InstalledFlowReturnMethod::HTTPRedirect,
|
||||
/// ).build().await.unwrap();
|
||||
/// let mut hub = Appengine::new(hyper::Client::builder().build(hyper_rustls::HttpsConnectorBuilder::new().with_native_roots().unwrap().https_or_http().enable_http1().build()), auth);
|
||||
/// // As the method needs a request, you would usually fill it with the desired information
|
||||
/// // into the respective structure. Some of the parts shown here might not be applicable !
|
||||
/// // Values shown here are possibly random and not representative !
|
||||
/// let mut req = DebugInstanceRequest::default();
|
||||
///
|
||||
/// // You can configure optional parameters by calling the respective setters at will, and
|
||||
/// // execute the final call using `doit()`.
|
||||
/// // Values shown here are possibly random and not representative !
|
||||
/// let result = hub.apps().services_versions_instances_debug(req, "appsId", "servicesId", "versionsId", "instancesId")
|
||||
/// .doit().await;
|
||||
///
|
||||
/// match result {
|
||||
/// Err(e) => match e {
|
||||
/// // The Error enum provides details about what exactly happened.
|
||||
/// // You can also just use its `Debug`, `Display` or `Error` traits
|
||||
/// Error::HttpError(_)
|
||||
/// |Error::Io(_)
|
||||
/// |Error::MissingAPIKey
|
||||
/// |Error::MissingToken(_)
|
||||
/// |Error::Cancelled
|
||||
/// |Error::UploadSizeLimitExceeded(_, _)
|
||||
/// |Error::Failure(_)
|
||||
/// |Error::BadRequest(_)
|
||||
/// |Error::FieldClash(_)
|
||||
/// |Error::JsonDecodeError(_, _) => println!("{}", e),
|
||||
/// },
|
||||
/// Ok(res) => println!("Success: {:?}", res),
|
||||
/// }
|
||||
/// # }
|
||||
/// ```
|
||||
#[derive(Clone)]
|
||||
pub struct Appengine<S> {
|
||||
pub client: hyper::Client<S, hyper::body::Body>,
|
||||
pub auth: Box<dyn client::GetToken>,
|
||||
pub(super) _user_agent: String,
|
||||
pub(super) _base_url: String,
|
||||
pub(super) _root_url: String,
|
||||
}
|
||||
|
||||
impl<'a, S> client::Hub for Appengine<S> {}
|
||||
|
||||
impl<'a, S> Appengine<S> {
|
||||
|
||||
pub fn new<A: 'static + client::GetToken>(client: hyper::Client<S, hyper::body::Body>, auth: A) -> Appengine<S> {
|
||||
Appengine {
|
||||
client,
|
||||
auth: Box::new(auth),
|
||||
_user_agent: "google-api-rust-client/5.0.5".to_string(),
|
||||
_base_url: "https://appengine.googleapis.com/".to_string(),
|
||||
_root_url: "https://appengine.googleapis.com/".to_string(),
|
||||
}
|
||||
}
|
||||
|
||||
pub fn apps(&'a self) -> AppMethods<'a, S> {
|
||||
AppMethods { hub: &self }
|
||||
}
|
||||
|
||||
/// Set the user-agent header field to use in all requests to the server.
|
||||
/// It defaults to `google-api-rust-client/5.0.5`.
|
||||
///
|
||||
/// Returns the previously set user-agent.
|
||||
pub fn user_agent(&mut self, agent_name: String) -> String {
|
||||
mem::replace(&mut self._user_agent, agent_name)
|
||||
}
|
||||
|
||||
/// Set the base url to use in all requests to the server.
|
||||
/// It defaults to `https://appengine.googleapis.com/`.
|
||||
///
|
||||
/// Returns the previously set base url.
|
||||
pub fn base_url(&mut self, new_base_url: String) -> String {
|
||||
mem::replace(&mut self._base_url, new_base_url)
|
||||
}
|
||||
|
||||
/// Set the root url to use in all requests to the server.
|
||||
/// It defaults to `https://appengine.googleapis.com/`.
|
||||
///
|
||||
/// Returns the previously set root url.
|
||||
pub fn root_url(&mut self, new_root_url: String) -> String {
|
||||
mem::replace(&mut self._root_url, new_root_url)
|
||||
}
|
||||
}
|
||||
467
gen/appengine1_beta5/src/api/method_builders.rs
Normal file
467
gen/appengine1_beta5/src/api/method_builders.rs
Normal file
@@ -0,0 +1,467 @@
|
||||
use super::*;
|
||||
/// A builder providing access to all methods supported on *app* resources.
|
||||
/// It is not used directly, but through the [`Appengine`] hub.
|
||||
///
|
||||
/// # Example
|
||||
///
|
||||
/// Instantiate a resource builder
|
||||
///
|
||||
/// ```test_harness,no_run
|
||||
/// extern crate hyper;
|
||||
/// extern crate hyper_rustls;
|
||||
/// extern crate google_appengine1_beta5 as appengine1_beta5;
|
||||
///
|
||||
/// # async fn dox() {
|
||||
/// use std::default::Default;
|
||||
/// use appengine1_beta5::{Appengine, oauth2, hyper, hyper_rustls, chrono, FieldMask};
|
||||
///
|
||||
/// let secret: oauth2::ApplicationSecret = Default::default();
|
||||
/// let auth = oauth2::InstalledFlowAuthenticator::builder(
|
||||
/// secret,
|
||||
/// oauth2::InstalledFlowReturnMethod::HTTPRedirect,
|
||||
/// ).build().await.unwrap();
|
||||
/// let mut hub = Appengine::new(hyper::Client::builder().build(hyper_rustls::HttpsConnectorBuilder::new().with_native_roots().unwrap().https_or_http().enable_http1().build()), auth);
|
||||
/// // Usually you wouldn't bind this to a variable, but keep calling *CallBuilders*
|
||||
/// // like `create(...)`, `get(...)`, `locations_get(...)`, `locations_list(...)`, `operations_get(...)`, `operations_list(...)`, `patch(...)`, `services_delete(...)`, `services_get(...)`, `services_list(...)`, `services_patch(...)`, `services_versions_create(...)`, `services_versions_delete(...)`, `services_versions_get(...)`, `services_versions_instances_debug(...)`, `services_versions_instances_delete(...)`, `services_versions_instances_get(...)`, `services_versions_instances_list(...)`, `services_versions_list(...)` and `services_versions_patch(...)`
|
||||
/// // to build up your call.
|
||||
/// let rb = hub.apps();
|
||||
/// # }
|
||||
/// ```
|
||||
pub struct AppMethods<'a, S>
|
||||
where S: 'a {
|
||||
|
||||
pub(super) hub: &'a Appengine<S>,
|
||||
}
|
||||
|
||||
impl<'a, S> client::MethodsBuilder for AppMethods<'a, S> {}
|
||||
|
||||
impl<'a, S> AppMethods<'a, S> {
|
||||
|
||||
/// Create a builder to help you perform the following task:
|
||||
///
|
||||
/// Gets information about a location.
|
||||
///
|
||||
/// # Arguments
|
||||
///
|
||||
/// * `appsId` - Part of `name`. Resource name for the location.
|
||||
/// * `locationsId` - Part of `name`. See documentation of `appsId`.
|
||||
pub fn locations_get(&self, apps_id: &str, locations_id: &str) -> AppLocationGetCall<'a, S> {
|
||||
AppLocationGetCall {
|
||||
hub: self.hub,
|
||||
_apps_id: apps_id.to_string(),
|
||||
_locations_id: locations_id.to_string(),
|
||||
_delegate: Default::default(),
|
||||
_additional_params: Default::default(),
|
||||
_scopes: Default::default(),
|
||||
}
|
||||
}
|
||||
|
||||
/// Create a builder to help you perform the following task:
|
||||
///
|
||||
/// Lists information about the supported locations for this service.
|
||||
///
|
||||
/// # Arguments
|
||||
///
|
||||
/// * `appsId` - Part of `name`. The resource that owns the locations collection, if applicable.
|
||||
pub fn locations_list(&self, apps_id: &str) -> AppLocationListCall<'a, S> {
|
||||
AppLocationListCall {
|
||||
hub: self.hub,
|
||||
_apps_id: apps_id.to_string(),
|
||||
_page_token: Default::default(),
|
||||
_page_size: Default::default(),
|
||||
_filter: Default::default(),
|
||||
_delegate: Default::default(),
|
||||
_additional_params: Default::default(),
|
||||
_scopes: Default::default(),
|
||||
}
|
||||
}
|
||||
|
||||
/// Create a builder to help you perform the following task:
|
||||
///
|
||||
/// Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.
|
||||
///
|
||||
/// # Arguments
|
||||
///
|
||||
/// * `appsId` - Part of `name`. The name of the operation resource.
|
||||
/// * `operationsId` - Part of `name`. See documentation of `appsId`.
|
||||
pub fn operations_get(&self, apps_id: &str, operations_id: &str) -> AppOperationGetCall<'a, S> {
|
||||
AppOperationGetCall {
|
||||
hub: self.hub,
|
||||
_apps_id: apps_id.to_string(),
|
||||
_operations_id: operations_id.to_string(),
|
||||
_delegate: Default::default(),
|
||||
_additional_params: Default::default(),
|
||||
_scopes: Default::default(),
|
||||
}
|
||||
}
|
||||
|
||||
/// Create a builder to help you perform the following task:
|
||||
///
|
||||
/// Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns UNIMPLEMENTED.NOTE: the name binding allows API services to override the binding to use different resource name schemes, such as users/*/operations. To override the binding, API services can add a binding such as "/v1/{name=users/*}/operations" to their service configuration. For backwards compatibility, the default name includes the operations collection id, however overriding users must ensure the name binding is the parent resource, without the operations collection id.
|
||||
///
|
||||
/// # Arguments
|
||||
///
|
||||
/// * `appsId` - Part of `name`. The name of the operation's parent resource.
|
||||
pub fn operations_list(&self, apps_id: &str) -> AppOperationListCall<'a, S> {
|
||||
AppOperationListCall {
|
||||
hub: self.hub,
|
||||
_apps_id: apps_id.to_string(),
|
||||
_page_token: Default::default(),
|
||||
_page_size: Default::default(),
|
||||
_filter: Default::default(),
|
||||
_delegate: Default::default(),
|
||||
_additional_params: Default::default(),
|
||||
_scopes: Default::default(),
|
||||
}
|
||||
}
|
||||
|
||||
/// Create a builder to help you perform the following task:
|
||||
///
|
||||
/// Enables debugging on a VM instance. This allows you to use the SSH command to connect to the virtual machine where the instance lives. While in "debug mode", the instance continues to serve live traffic. You should delete the instance when you are done debugging and then allow the system to take over and determine if another instance should be started.Only applicable for instances in App Engine flexible environment.
|
||||
///
|
||||
/// # Arguments
|
||||
///
|
||||
/// * `request` - No description provided.
|
||||
/// * `appsId` - Part of `name`. Name of the resource requested. Example: apps/myapp/services/default/versions/v1/instances/instance-1.
|
||||
/// * `servicesId` - Part of `name`. See documentation of `appsId`.
|
||||
/// * `versionsId` - Part of `name`. See documentation of `appsId`.
|
||||
/// * `instancesId` - Part of `name`. See documentation of `appsId`.
|
||||
pub fn services_versions_instances_debug(&self, request: DebugInstanceRequest, apps_id: &str, services_id: &str, versions_id: &str, instances_id: &str) -> AppServiceVersionInstanceDebugCall<'a, S> {
|
||||
AppServiceVersionInstanceDebugCall {
|
||||
hub: self.hub,
|
||||
_request: request,
|
||||
_apps_id: apps_id.to_string(),
|
||||
_services_id: services_id.to_string(),
|
||||
_versions_id: versions_id.to_string(),
|
||||
_instances_id: instances_id.to_string(),
|
||||
_delegate: Default::default(),
|
||||
_additional_params: Default::default(),
|
||||
_scopes: Default::default(),
|
||||
}
|
||||
}
|
||||
|
||||
/// Create a builder to help you perform the following task:
|
||||
///
|
||||
/// Stops a running instance.
|
||||
///
|
||||
/// # Arguments
|
||||
///
|
||||
/// * `appsId` - Part of `name`. Name of the resource requested. For example: "apps/myapp/services/default/versions/v1/instances/instance-1".
|
||||
/// * `servicesId` - Part of `name`. See documentation of `appsId`.
|
||||
/// * `versionsId` - Part of `name`. See documentation of `appsId`.
|
||||
/// * `instancesId` - Part of `name`. See documentation of `appsId`.
|
||||
pub fn services_versions_instances_delete(&self, apps_id: &str, services_id: &str, versions_id: &str, instances_id: &str) -> AppServiceVersionInstanceDeleteCall<'a, S> {
|
||||
AppServiceVersionInstanceDeleteCall {
|
||||
hub: self.hub,
|
||||
_apps_id: apps_id.to_string(),
|
||||
_services_id: services_id.to_string(),
|
||||
_versions_id: versions_id.to_string(),
|
||||
_instances_id: instances_id.to_string(),
|
||||
_delegate: Default::default(),
|
||||
_additional_params: Default::default(),
|
||||
_scopes: Default::default(),
|
||||
}
|
||||
}
|
||||
|
||||
/// Create a builder to help you perform the following task:
|
||||
///
|
||||
/// Gets instance information.
|
||||
///
|
||||
/// # Arguments
|
||||
///
|
||||
/// * `appsId` - Part of `name`. Name of the resource requested. Example: apps/myapp/services/default/versions/v1/instances/instance-1.
|
||||
/// * `servicesId` - Part of `name`. See documentation of `appsId`.
|
||||
/// * `versionsId` - Part of `name`. See documentation of `appsId`.
|
||||
/// * `instancesId` - Part of `name`. See documentation of `appsId`.
|
||||
pub fn services_versions_instances_get(&self, apps_id: &str, services_id: &str, versions_id: &str, instances_id: &str) -> AppServiceVersionInstanceGetCall<'a, S> {
|
||||
AppServiceVersionInstanceGetCall {
|
||||
hub: self.hub,
|
||||
_apps_id: apps_id.to_string(),
|
||||
_services_id: services_id.to_string(),
|
||||
_versions_id: versions_id.to_string(),
|
||||
_instances_id: instances_id.to_string(),
|
||||
_delegate: Default::default(),
|
||||
_additional_params: Default::default(),
|
||||
_scopes: Default::default(),
|
||||
}
|
||||
}
|
||||
|
||||
/// Create a builder to help you perform the following task:
|
||||
///
|
||||
/// Lists the instances of a version.Tip: To aggregate details about instances over time, see the Stackdriver Monitoring API (https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list).
|
||||
///
|
||||
/// # Arguments
|
||||
///
|
||||
/// * `appsId` - Part of `name`. Name of the resource requested. Example: apps/myapp/services/default/versions/v1.
|
||||
/// * `servicesId` - Part of `name`. See documentation of `appsId`.
|
||||
/// * `versionsId` - Part of `name`. See documentation of `appsId`.
|
||||
pub fn services_versions_instances_list(&self, apps_id: &str, services_id: &str, versions_id: &str) -> AppServiceVersionInstanceListCall<'a, S> {
|
||||
AppServiceVersionInstanceListCall {
|
||||
hub: self.hub,
|
||||
_apps_id: apps_id.to_string(),
|
||||
_services_id: services_id.to_string(),
|
||||
_versions_id: versions_id.to_string(),
|
||||
_page_token: Default::default(),
|
||||
_page_size: Default::default(),
|
||||
_delegate: Default::default(),
|
||||
_additional_params: Default::default(),
|
||||
_scopes: Default::default(),
|
||||
}
|
||||
}
|
||||
|
||||
/// Create a builder to help you perform the following task:
|
||||
///
|
||||
/// Deploys new code and resource files to a new version.
|
||||
///
|
||||
/// # Arguments
|
||||
///
|
||||
/// * `request` - No description provided.
|
||||
/// * `appsId` - Part of `name`. Name of the resource to update. For example: "apps/myapp/services/default".
|
||||
/// * `servicesId` - Part of `name`. See documentation of `appsId`.
|
||||
pub fn services_versions_create(&self, request: Version, apps_id: &str, services_id: &str) -> AppServiceVersionCreateCall<'a, S> {
|
||||
AppServiceVersionCreateCall {
|
||||
hub: self.hub,
|
||||
_request: request,
|
||||
_apps_id: apps_id.to_string(),
|
||||
_services_id: services_id.to_string(),
|
||||
_delegate: Default::default(),
|
||||
_additional_params: Default::default(),
|
||||
_scopes: Default::default(),
|
||||
}
|
||||
}
|
||||
|
||||
/// Create a builder to help you perform the following task:
|
||||
///
|
||||
/// Deletes an existing version.
|
||||
///
|
||||
/// # Arguments
|
||||
///
|
||||
/// * `appsId` - Part of `name`. Name of the resource requested. Example: apps/myapp/services/default/versions/v1.
|
||||
/// * `servicesId` - Part of `name`. See documentation of `appsId`.
|
||||
/// * `versionsId` - Part of `name`. See documentation of `appsId`.
|
||||
pub fn services_versions_delete(&self, apps_id: &str, services_id: &str, versions_id: &str) -> AppServiceVersionDeleteCall<'a, S> {
|
||||
AppServiceVersionDeleteCall {
|
||||
hub: self.hub,
|
||||
_apps_id: apps_id.to_string(),
|
||||
_services_id: services_id.to_string(),
|
||||
_versions_id: versions_id.to_string(),
|
||||
_delegate: Default::default(),
|
||||
_additional_params: Default::default(),
|
||||
_scopes: Default::default(),
|
||||
}
|
||||
}
|
||||
|
||||
/// Create a builder to help you perform the following task:
|
||||
///
|
||||
/// Gets the specified Version resource. By default, only a BASIC_VIEW will be returned. Specify the FULL_VIEW parameter to get the full resource.
|
||||
///
|
||||
/// # Arguments
|
||||
///
|
||||
/// * `appsId` - Part of `name`. Name of the resource requested. Example: apps/myapp/services/default/versions/v1.
|
||||
/// * `servicesId` - Part of `name`. See documentation of `appsId`.
|
||||
/// * `versionsId` - Part of `name`. See documentation of `appsId`.
|
||||
pub fn services_versions_get(&self, apps_id: &str, services_id: &str, versions_id: &str) -> AppServiceVersionGetCall<'a, S> {
|
||||
AppServiceVersionGetCall {
|
||||
hub: self.hub,
|
||||
_apps_id: apps_id.to_string(),
|
||||
_services_id: services_id.to_string(),
|
||||
_versions_id: versions_id.to_string(),
|
||||
_view: Default::default(),
|
||||
_delegate: Default::default(),
|
||||
_additional_params: Default::default(),
|
||||
_scopes: Default::default(),
|
||||
}
|
||||
}
|
||||
|
||||
/// Create a builder to help you perform the following task:
|
||||
///
|
||||
/// Lists the versions of a service.
|
||||
///
|
||||
/// # Arguments
|
||||
///
|
||||
/// * `appsId` - Part of `name`. Name of the resource requested. Example: apps/myapp/services/default.
|
||||
/// * `servicesId` - Part of `name`. See documentation of `appsId`.
|
||||
pub fn services_versions_list(&self, apps_id: &str, services_id: &str) -> AppServiceVersionListCall<'a, S> {
|
||||
AppServiceVersionListCall {
|
||||
hub: self.hub,
|
||||
_apps_id: apps_id.to_string(),
|
||||
_services_id: services_id.to_string(),
|
||||
_view: Default::default(),
|
||||
_page_token: Default::default(),
|
||||
_page_size: Default::default(),
|
||||
_delegate: Default::default(),
|
||||
_additional_params: Default::default(),
|
||||
_scopes: Default::default(),
|
||||
}
|
||||
}
|
||||
|
||||
/// Create a builder to help you perform the following task:
|
||||
///
|
||||
/// Updates the specified Version resource. You can specify the following fields depending on the App Engine environment and type of scaling that the version resource uses:
|
||||
/// serving_status (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta5/apps.services.versions#Version.FIELDS.serving_status): For Version resources that use basic scaling, manual scaling, or run in the App Engine flexible environment.
|
||||
/// instance_class (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta5/apps.services.versions#Version.FIELDS.instance_class): For Version resources that run in the App Engine standard environment.
|
||||
/// automatic_scaling.min_idle_instances (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta5/apps.services.versions#Version.FIELDS.automatic_scaling): For Version resources that use automatic scaling and run in the App Engine standard environment.
|
||||
/// automatic_scaling.max_idle_instances (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta5/apps.services.versions#Version.FIELDS.automatic_scaling): For Version resources that use automatic scaling and run in the App Engine standard environment.
|
||||
///
|
||||
/// # Arguments
|
||||
///
|
||||
/// * `request` - No description provided.
|
||||
/// * `appsId` - Part of `name`. Name of the resource to update. Example: apps/myapp/services/default/versions/1.
|
||||
/// * `servicesId` - Part of `name`. See documentation of `appsId`.
|
||||
/// * `versionsId` - Part of `name`. See documentation of `appsId`.
|
||||
pub fn services_versions_patch(&self, request: Version, apps_id: &str, services_id: &str, versions_id: &str) -> AppServiceVersionPatchCall<'a, S> {
|
||||
AppServiceVersionPatchCall {
|
||||
hub: self.hub,
|
||||
_request: request,
|
||||
_apps_id: apps_id.to_string(),
|
||||
_services_id: services_id.to_string(),
|
||||
_versions_id: versions_id.to_string(),
|
||||
_mask: Default::default(),
|
||||
_delegate: Default::default(),
|
||||
_additional_params: Default::default(),
|
||||
_scopes: Default::default(),
|
||||
}
|
||||
}
|
||||
|
||||
/// Create a builder to help you perform the following task:
|
||||
///
|
||||
/// Deletes the specified service and all enclosed versions.
|
||||
///
|
||||
/// # Arguments
|
||||
///
|
||||
/// * `appsId` - Part of `name`. Name of the resource requested. Example: apps/myapp/services/default.
|
||||
/// * `servicesId` - Part of `name`. See documentation of `appsId`.
|
||||
pub fn services_delete(&self, apps_id: &str, services_id: &str) -> AppServiceDeleteCall<'a, S> {
|
||||
AppServiceDeleteCall {
|
||||
hub: self.hub,
|
||||
_apps_id: apps_id.to_string(),
|
||||
_services_id: services_id.to_string(),
|
||||
_delegate: Default::default(),
|
||||
_additional_params: Default::default(),
|
||||
_scopes: Default::default(),
|
||||
}
|
||||
}
|
||||
|
||||
/// Create a builder to help you perform the following task:
|
||||
///
|
||||
/// Gets the current configuration of the specified service.
|
||||
///
|
||||
/// # Arguments
|
||||
///
|
||||
/// * `appsId` - Part of `name`. Name of the resource requested. Example: apps/myapp/services/default.
|
||||
/// * `servicesId` - Part of `name`. See documentation of `appsId`.
|
||||
pub fn services_get(&self, apps_id: &str, services_id: &str) -> AppServiceGetCall<'a, S> {
|
||||
AppServiceGetCall {
|
||||
hub: self.hub,
|
||||
_apps_id: apps_id.to_string(),
|
||||
_services_id: services_id.to_string(),
|
||||
_delegate: Default::default(),
|
||||
_additional_params: Default::default(),
|
||||
_scopes: Default::default(),
|
||||
}
|
||||
}
|
||||
|
||||
/// Create a builder to help you perform the following task:
|
||||
///
|
||||
/// Lists all the services in the application.
|
||||
///
|
||||
/// # Arguments
|
||||
///
|
||||
/// * `appsId` - Part of `name`. Name of the resource requested. Example: apps/myapp.
|
||||
pub fn services_list(&self, apps_id: &str) -> AppServiceListCall<'a, S> {
|
||||
AppServiceListCall {
|
||||
hub: self.hub,
|
||||
_apps_id: apps_id.to_string(),
|
||||
_page_token: Default::default(),
|
||||
_page_size: Default::default(),
|
||||
_delegate: Default::default(),
|
||||
_additional_params: Default::default(),
|
||||
_scopes: Default::default(),
|
||||
}
|
||||
}
|
||||
|
||||
/// Create a builder to help you perform the following task:
|
||||
///
|
||||
/// Updates the configuration of the specified service.
|
||||
///
|
||||
/// # Arguments
|
||||
///
|
||||
/// * `request` - No description provided.
|
||||
/// * `appsId` - Part of `name`. Name of the resource to update. Example: apps/myapp/services/default.
|
||||
/// * `servicesId` - Part of `name`. See documentation of `appsId`.
|
||||
pub fn services_patch(&self, request: Service, apps_id: &str, services_id: &str) -> AppServicePatchCall<'a, S> {
|
||||
AppServicePatchCall {
|
||||
hub: self.hub,
|
||||
_request: request,
|
||||
_apps_id: apps_id.to_string(),
|
||||
_services_id: services_id.to_string(),
|
||||
_migrate_traffic: Default::default(),
|
||||
_mask: Default::default(),
|
||||
_delegate: Default::default(),
|
||||
_additional_params: Default::default(),
|
||||
_scopes: Default::default(),
|
||||
}
|
||||
}
|
||||
|
||||
/// Create a builder to help you perform the following task:
|
||||
///
|
||||
/// Creates an App Engine application for a Google Cloud Platform project. Required fields:
|
||||
/// id - The ID of the target Cloud Platform project.
|
||||
/// location - The region (https://cloud.google.com/appengine/docs/locations) where you want the App Engine application located.For more information about App Engine applications, see Managing Projects, Applications, and Billing (https://cloud.google.com/appengine/docs/python/console/).
|
||||
///
|
||||
/// # Arguments
|
||||
///
|
||||
/// * `request` - No description provided.
|
||||
pub fn create(&self, request: Application) -> AppCreateCall<'a, S> {
|
||||
AppCreateCall {
|
||||
hub: self.hub,
|
||||
_request: request,
|
||||
_delegate: Default::default(),
|
||||
_additional_params: Default::default(),
|
||||
_scopes: Default::default(),
|
||||
}
|
||||
}
|
||||
|
||||
/// Create a builder to help you perform the following task:
|
||||
///
|
||||
/// Gets information about an application.
|
||||
///
|
||||
/// # Arguments
|
||||
///
|
||||
/// * `appsId` - Part of `name`. Name of the application to get. Example: apps/myapp.
|
||||
pub fn get(&self, apps_id: &str) -> AppGetCall<'a, S> {
|
||||
AppGetCall {
|
||||
hub: self.hub,
|
||||
_apps_id: apps_id.to_string(),
|
||||
_ensure_resources_exist: Default::default(),
|
||||
_delegate: Default::default(),
|
||||
_additional_params: Default::default(),
|
||||
_scopes: Default::default(),
|
||||
}
|
||||
}
|
||||
|
||||
/// Create a builder to help you perform the following task:
|
||||
///
|
||||
/// Updates the specified Application resource. You can update the following fields:
|
||||
/// auth_domain (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta5/apps#Application.FIELDS.auth_domain)
|
||||
/// default_cookie_expiration (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta5/apps#Application.FIELDS.default_cookie_expiration)
|
||||
///
|
||||
/// # Arguments
|
||||
///
|
||||
/// * `request` - No description provided.
|
||||
/// * `appsId` - Part of `name`. Name of the Application resource to update. Example: apps/myapp.
|
||||
pub fn patch(&self, request: Application, apps_id: &str) -> AppPatchCall<'a, S> {
|
||||
AppPatchCall {
|
||||
hub: self.hub,
|
||||
_request: request,
|
||||
_apps_id: apps_id.to_string(),
|
||||
_mask: Default::default(),
|
||||
_delegate: Default::default(),
|
||||
_additional_params: Default::default(),
|
||||
_scopes: Default::default(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
35
gen/appengine1_beta5/src/api/mod.rs
Normal file
35
gen/appengine1_beta5/src/api/mod.rs
Normal file
@@ -0,0 +1,35 @@
|
||||
use std::collections::HashMap;
|
||||
use std::cell::RefCell;
|
||||
use std::default::Default;
|
||||
use std::collections::BTreeSet;
|
||||
use std::error::Error as StdError;
|
||||
use serde_json as json;
|
||||
use std::io;
|
||||
use std::fs;
|
||||
use std::mem;
|
||||
|
||||
use hyper::client::connect;
|
||||
use tokio::io::{AsyncRead, AsyncWrite};
|
||||
use tokio::time::sleep;
|
||||
use tower_service;
|
||||
use serde::{Serialize, Deserialize};
|
||||
|
||||
use crate::{client, client::GetToken, client::serde_with};
|
||||
|
||||
mod utilities;
|
||||
pub use utilities::*;
|
||||
|
||||
mod hub;
|
||||
pub use hub::*;
|
||||
|
||||
mod schemas;
|
||||
pub use schemas::*;
|
||||
|
||||
mod method_builders;
|
||||
pub use method_builders::*;
|
||||
|
||||
mod call_builders;
|
||||
pub use call_builders::*;
|
||||
|
||||
pub mod enums;
|
||||
pub(crate) use enums::*;
|
||||
1199
gen/appengine1_beta5/src/api/schemas.rs
Normal file
1199
gen/appengine1_beta5/src/api/schemas.rs
Normal file
File diff suppressed because it is too large
Load Diff
32
gen/appengine1_beta5/src/api/utilities.rs
Normal file
32
gen/appengine1_beta5/src/api/utilities.rs
Normal file
@@ -0,0 +1,32 @@
|
||||
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 applications deployed on Google App Engine
|
||||
Admin,
|
||||
|
||||
/// View and manage your data across Google Cloud Platform services
|
||||
CloudPlatform,
|
||||
|
||||
/// View your data across Google Cloud Platform services
|
||||
CloudPlatformReadOnly,
|
||||
}
|
||||
|
||||
impl AsRef<str> for Scope {
|
||||
fn as_ref(&self) -> &str {
|
||||
match *self {
|
||||
Scope::Admin => "https://www.googleapis.com/auth/appengine.admin",
|
||||
Scope::CloudPlatform => "https://www.googleapis.com/auth/cloud-platform",
|
||||
Scope::CloudPlatformReadOnly => "https://www.googleapis.com/auth/cloud-platform.read-only",
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl Default for Scope {
|
||||
fn default() -> Scope {
|
||||
Scope::CloudPlatform
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,14 +2,14 @@
|
||||
// This file was generated automatically from 'src/generator/templates/api/lib.rs.mako'
|
||||
// DO NOT EDIT !
|
||||
|
||||
//! This documentation was generated from *appengine* crate version *5.0.4+20181005*, where *20181005* is the exact revision of the *appengine:v1beta5* schema built by the [mako](http://www.makotemplates.org/) code generator *v5.0.4*.
|
||||
//! This documentation was generated from *appengine* crate version *5.0.5+20181005*, where *20181005* is the exact revision of the *appengine:v1beta5* schema built by the [mako](http://www.makotemplates.org/) code generator *v5.0.5*.
|
||||
//!
|
||||
//! Everything else about the *appengine* *v1_beta5* API can be found at the
|
||||
//! [official documentation site](https://cloud.google.com/appengine/docs/admin-api/).
|
||||
//! The original source code is [on github](https://github.com/Byron/google-apis-rs/tree/main/gen/appengine1_beta5).
|
||||
//! # Features
|
||||
//!
|
||||
//! Handle the following *Resources* with ease from the central [hub](Appengine) ...
|
||||
//! Handle the following *Resources* with ease from the central [hub](Appengine) ...
|
||||
//!
|
||||
//! * apps
|
||||
//! * [*create*](api::AppCreateCall), [*get*](api::AppGetCall), [*locations get*](api::AppLocationGetCall), [*locations list*](api::AppLocationListCall), [*operations get*](api::AppOperationGetCall), [*operations list*](api::AppOperationListCall), [*patch*](api::AppPatchCall), [*services delete*](api::AppServiceDeleteCall), [*services get*](api::AppServiceGetCall), [*services list*](api::AppServiceListCall), [*services patch*](api::AppServicePatchCall), [*services versions create*](api::AppServiceVersionCreateCall), [*services versions delete*](api::AppServiceVersionDeleteCall), [*services versions get*](api::AppServiceVersionGetCall), [*services versions instances debug*](api::AppServiceVersionInstanceDebugCall), [*services versions instances delete*](api::AppServiceVersionInstanceDeleteCall), [*services versions instances get*](api::AppServiceVersionInstanceGetCall), [*services versions instances list*](api::AppServiceVersionInstanceListCall), [*services versions list*](api::AppServiceVersionListCall) and [*services versions patch*](api::AppServiceVersionPatchCall)
|
||||
@@ -59,8 +59,8 @@
|
||||
//! let r = hub.apps().patch(...).doit().await
|
||||
//! ```
|
||||
//!
|
||||
//! The `resource()` and `activity(...)` calls create [builders][builder-pattern]. The second one dealing with `Activities`
|
||||
//! supports various methods to configure the impending operation (not shown here). It is made such that all required arguments have to be
|
||||
//! The `resource()` and `activity(...)` calls create [builders][builder-pattern]. The second one dealing with `Activities`
|
||||
//! supports various methods to configure the impending operation (not shown here). It is made such that all required arguments have to be
|
||||
//! specified right away (i.e. `(...)`), whereas all optional ones can be [build up][builder-pattern] as desired.
|
||||
//! The `doit()` method performs the actual communication with the server and returns the respective result.
|
||||
//!
|
||||
@@ -85,23 +85,24 @@
|
||||
//! extern crate google_appengine1_beta5 as appengine1_beta5;
|
||||
//! use appengine1_beta5::api::DebugInstanceRequest;
|
||||
//! use appengine1_beta5::{Result, Error};
|
||||
//! use appengine1_beta5::api::enums::*;
|
||||
//! # async fn dox() {
|
||||
//! use std::default::Default;
|
||||
//! use appengine1_beta5::{Appengine, oauth2, hyper, hyper_rustls, chrono, FieldMask};
|
||||
//!
|
||||
//! // Get an ApplicationSecret instance by some means. It contains the `client_id` and
|
||||
//! // Get an ApplicationSecret instance by some means. It contains the `client_id` and
|
||||
//! // `client_secret`, among other things.
|
||||
//! let secret: oauth2::ApplicationSecret = Default::default();
|
||||
//! // Instantiate the authenticator. It will choose a suitable authentication flow for you,
|
||||
//! // Instantiate the authenticator. It will choose a suitable authentication flow for you,
|
||||
//! // unless you replace `None` with the desired Flow.
|
||||
//! // Provide your own `AuthenticatorDelegate` to adjust the way it operates and get feedback about
|
||||
//! // Provide your own `AuthenticatorDelegate` to adjust the way it operates and get feedback about
|
||||
//! // what's going on. You probably want to bring in your own `TokenStorage` to persist tokens and
|
||||
//! // retrieve them from storage.
|
||||
//! let auth = oauth2::InstalledFlowAuthenticator::builder(
|
||||
//! secret,
|
||||
//! oauth2::InstalledFlowReturnMethod::HTTPRedirect,
|
||||
//! ).build().await.unwrap();
|
||||
//! let mut hub = Appengine::new(hyper::Client::builder().build(hyper_rustls::HttpsConnectorBuilder::new().with_native_roots().https_or_http().enable_http1().build()), auth);
|
||||
//! let mut hub = Appengine::new(hyper::Client::builder().build(hyper_rustls::HttpsConnectorBuilder::new().with_native_roots().unwrap().https_or_http().enable_http1().build()), auth);
|
||||
//! // As the method needs a request, you would usually fill it with the desired information
|
||||
//! // into the respective structure. Some of the parts shown here might not be applicable !
|
||||
//! // Values shown here are possibly random and not representative !
|
||||
@@ -135,10 +136,10 @@
|
||||
//! ## Handling Errors
|
||||
//!
|
||||
//! All errors produced by the system are provided either as [Result](client::Result) enumeration as return value of
|
||||
//! the doit() methods, or handed as possibly intermediate results to either the
|
||||
//! the doit() methods, or handed as possibly intermediate results to either the
|
||||
//! [Hub Delegate](client::Delegate), or the [Authenticator Delegate](https://docs.rs/yup-oauth2/*/yup_oauth2/trait.AuthenticatorDelegate.html).
|
||||
//!
|
||||
//! When delegates handle errors or intermediate values, they may have a chance to instruct the system to retry. This
|
||||
//! When delegates handle errors or intermediate values, they may have a chance to instruct the system to retry. This
|
||||
//! makes the system potentially resilient to all kinds of errors.
|
||||
//!
|
||||
//! ## Uploads and Downloads
|
||||
@@ -148,25 +149,25 @@
|
||||
//! You can see it as meta-data for the actual media. To trigger a media download, you will have to set up the builder by making
|
||||
//! this call: `.param("alt", "media")`.
|
||||
//!
|
||||
//! Methods supporting uploads can do so using up to 2 different protocols:
|
||||
//! *simple* and *resumable*. The distinctiveness of each is represented by customized
|
||||
//! Methods supporting uploads can do so using up to 2 different protocols:
|
||||
//! *simple* and *resumable*. The distinctiveness of each is represented by customized
|
||||
//! `doit(...)` methods, which are then named `upload(...)` and `upload_resumable(...)` respectively.
|
||||
//!
|
||||
//! ## Customization and Callbacks
|
||||
//!
|
||||
//! You may alter the way an `doit()` method is called by providing a [delegate](client::Delegate) to the
|
||||
//! [Method Builder](client::CallBuilder) before making the final `doit()` call.
|
||||
//! Respective methods will be called to provide progress information, as well as determine whether the system should
|
||||
//! You may alter the way an `doit()` method is called by providing a [delegate](client::Delegate) to the
|
||||
//! [Method Builder](client::CallBuilder) before making the final `doit()` call.
|
||||
//! Respective methods will be called to provide progress information, as well as determine whether the system should
|
||||
//! retry on failure.
|
||||
//!
|
||||
//! The [delegate trait](client::Delegate) is default-implemented, allowing you to customize it with minimal effort.
|
||||
//!
|
||||
//! ## Optional Parts in Server-Requests
|
||||
//!
|
||||
//! All structures provided by this library are made to be [encodable](client::RequestValue) and
|
||||
//! [decodable](client::ResponseResult) via *json*. Optionals are used to indicate that partial requests are responses
|
||||
//! All structures provided by this library are made to be [encodable](client::RequestValue) and
|
||||
//! [decodable](client::ResponseResult) via *json*. Optionals are used to indicate that partial requests are responses
|
||||
//! are valid.
|
||||
//! Most optionals are are considered [Parts](client::Part) which are identifiable by name, which will be sent to
|
||||
//! Most optionals are are considered [Parts](client::Part) which are identifiable by name, which will be sent to
|
||||
//! the server to indicate either the set parts of the request or the desired parts in the response.
|
||||
//!
|
||||
//! ## Builder Arguments
|
||||
|
||||
Reference in New Issue
Block a user