#![allow(rustdoc::redundant_explicit_links)]
#![allow(rustdoc::broken_intra_doc_links)]
#![no_implicit_prelude]
extern crate async_trait;
extern crate bytes;
extern crate gaxi;
extern crate google_cloud_gax;
extern crate google_cloud_longrunning;
extern crate google_cloud_lro;
extern crate serde;
extern crate serde_json;
extern crate serde_with;
extern crate std;
extern crate tracing;
extern crate wkt;
mod debug;
mod deserialize;
mod serialize;
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct ApiConfigHandler {
pub auth_fail_action: crate::model::AuthFailAction,
pub login: crate::model::LoginRequirement,
pub script: std::string::String,
pub security_level: crate::model::SecurityLevel,
pub url: std::string::String,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl ApiConfigHandler {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_auth_fail_action<T: std::convert::Into<crate::model::AuthFailAction>>(
mut self,
v: T,
) -> Self {
self.auth_fail_action = v.into();
self
}
pub fn set_login<T: std::convert::Into<crate::model::LoginRequirement>>(
mut self,
v: T,
) -> Self {
self.login = v.into();
self
}
pub fn set_script<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.script = v.into();
self
}
pub fn set_security_level<T: std::convert::Into<crate::model::SecurityLevel>>(
mut self,
v: T,
) -> Self {
self.security_level = v.into();
self
}
pub fn set_url<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.url = v.into();
self
}
}
impl wkt::message::Message for ApiConfigHandler {
fn typename() -> &'static str {
"type.googleapis.com/google.appengine.v1.ApiConfigHandler"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct ErrorHandler {
pub error_code: crate::model::error_handler::ErrorCode,
pub static_file: std::string::String,
pub mime_type: std::string::String,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl ErrorHandler {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_error_code<T: std::convert::Into<crate::model::error_handler::ErrorCode>>(
mut self,
v: T,
) -> Self {
self.error_code = v.into();
self
}
pub fn set_static_file<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.static_file = v.into();
self
}
pub fn set_mime_type<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.mime_type = v.into();
self
}
}
impl wkt::message::Message for ErrorHandler {
fn typename() -> &'static str {
"type.googleapis.com/google.appengine.v1.ErrorHandler"
}
}
pub mod error_handler {
#[allow(unused_imports)]
use super::*;
#[derive(Clone, Debug, PartialEq)]
#[non_exhaustive]
pub enum ErrorCode {
Unspecified,
Default,
OverQuota,
DosApiDenial,
Timeout,
UnknownValue(error_code::UnknownValue),
}
#[doc(hidden)]
pub mod error_code {
#[allow(unused_imports)]
use super::*;
#[derive(Clone, Debug, PartialEq)]
pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
}
impl ErrorCode {
pub fn value(&self) -> std::option::Option<i32> {
match self {
Self::Unspecified => std::option::Option::Some(0),
Self::Default => std::option::Option::Some(0),
Self::OverQuota => std::option::Option::Some(1),
Self::DosApiDenial => std::option::Option::Some(2),
Self::Timeout => std::option::Option::Some(3),
Self::UnknownValue(u) => u.0.value(),
}
}
pub fn name(&self) -> std::option::Option<&str> {
match self {
Self::Unspecified => std::option::Option::Some("ERROR_CODE_UNSPECIFIED"),
Self::Default => std::option::Option::Some("ERROR_CODE_DEFAULT"),
Self::OverQuota => std::option::Option::Some("ERROR_CODE_OVER_QUOTA"),
Self::DosApiDenial => std::option::Option::Some("ERROR_CODE_DOS_API_DENIAL"),
Self::Timeout => std::option::Option::Some("ERROR_CODE_TIMEOUT"),
Self::UnknownValue(u) => u.0.name(),
}
}
}
impl std::default::Default for ErrorCode {
fn default() -> Self {
use std::convert::From;
Self::from(0)
}
}
impl std::fmt::Display for ErrorCode {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
wkt::internal::display_enum(f, self.name(), self.value())
}
}
impl std::convert::From<i32> for ErrorCode {
fn from(value: i32) -> Self {
match value {
0 => Self::Default,
1 => Self::OverQuota,
2 => Self::DosApiDenial,
3 => Self::Timeout,
_ => Self::UnknownValue(error_code::UnknownValue(
wkt::internal::UnknownEnumValue::Integer(value),
)),
}
}
}
impl std::convert::From<&str> for ErrorCode {
fn from(value: &str) -> Self {
use std::string::ToString;
match value {
"ERROR_CODE_UNSPECIFIED" => Self::Unspecified,
"ERROR_CODE_DEFAULT" => Self::Default,
"ERROR_CODE_OVER_QUOTA" => Self::OverQuota,
"ERROR_CODE_DOS_API_DENIAL" => Self::DosApiDenial,
"ERROR_CODE_TIMEOUT" => Self::Timeout,
_ => Self::UnknownValue(error_code::UnknownValue(
wkt::internal::UnknownEnumValue::String(value.to_string()),
)),
}
}
}
impl serde::ser::Serialize for ErrorCode {
fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
where
S: serde::Serializer,
{
match self {
Self::Unspecified => serializer.serialize_i32(0),
Self::Default => serializer.serialize_i32(0),
Self::OverQuota => serializer.serialize_i32(1),
Self::DosApiDenial => serializer.serialize_i32(2),
Self::Timeout => serializer.serialize_i32(3),
Self::UnknownValue(u) => u.0.serialize(serializer),
}
}
}
impl<'de> serde::de::Deserialize<'de> for ErrorCode {
fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
where
D: serde::Deserializer<'de>,
{
deserializer.deserialize_any(wkt::internal::EnumVisitor::<ErrorCode>::new(
".google.appengine.v1.ErrorHandler.ErrorCode",
))
}
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct UrlMap {
pub url_regex: std::string::String,
pub security_level: crate::model::SecurityLevel,
pub login: crate::model::LoginRequirement,
pub auth_fail_action: crate::model::AuthFailAction,
pub redirect_http_response_code: crate::model::url_map::RedirectHttpResponseCode,
pub handler_type: std::option::Option<crate::model::url_map::HandlerType>,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl UrlMap {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_url_regex<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.url_regex = v.into();
self
}
pub fn set_security_level<T: std::convert::Into<crate::model::SecurityLevel>>(
mut self,
v: T,
) -> Self {
self.security_level = v.into();
self
}
pub fn set_login<T: std::convert::Into<crate::model::LoginRequirement>>(
mut self,
v: T,
) -> Self {
self.login = v.into();
self
}
pub fn set_auth_fail_action<T: std::convert::Into<crate::model::AuthFailAction>>(
mut self,
v: T,
) -> Self {
self.auth_fail_action = v.into();
self
}
pub fn set_redirect_http_response_code<
T: std::convert::Into<crate::model::url_map::RedirectHttpResponseCode>,
>(
mut self,
v: T,
) -> Self {
self.redirect_http_response_code = v.into();
self
}
pub fn set_handler_type<
T: std::convert::Into<std::option::Option<crate::model::url_map::HandlerType>>,
>(
mut self,
v: T,
) -> Self {
self.handler_type = v.into();
self
}
pub fn static_files(
&self,
) -> std::option::Option<&std::boxed::Box<crate::model::StaticFilesHandler>> {
#[allow(unreachable_patterns)]
self.handler_type.as_ref().and_then(|v| match v {
crate::model::url_map::HandlerType::StaticFiles(v) => std::option::Option::Some(v),
_ => std::option::Option::None,
})
}
pub fn set_static_files<
T: std::convert::Into<std::boxed::Box<crate::model::StaticFilesHandler>>,
>(
mut self,
v: T,
) -> Self {
self.handler_type =
std::option::Option::Some(crate::model::url_map::HandlerType::StaticFiles(v.into()));
self
}
pub fn script(&self) -> std::option::Option<&std::boxed::Box<crate::model::ScriptHandler>> {
#[allow(unreachable_patterns)]
self.handler_type.as_ref().and_then(|v| match v {
crate::model::url_map::HandlerType::Script(v) => std::option::Option::Some(v),
_ => std::option::Option::None,
})
}
pub fn set_script<T: std::convert::Into<std::boxed::Box<crate::model::ScriptHandler>>>(
mut self,
v: T,
) -> Self {
self.handler_type =
std::option::Option::Some(crate::model::url_map::HandlerType::Script(v.into()));
self
}
pub fn api_endpoint(
&self,
) -> std::option::Option<&std::boxed::Box<crate::model::ApiEndpointHandler>> {
#[allow(unreachable_patterns)]
self.handler_type.as_ref().and_then(|v| match v {
crate::model::url_map::HandlerType::ApiEndpoint(v) => std::option::Option::Some(v),
_ => std::option::Option::None,
})
}
pub fn set_api_endpoint<
T: std::convert::Into<std::boxed::Box<crate::model::ApiEndpointHandler>>,
>(
mut self,
v: T,
) -> Self {
self.handler_type =
std::option::Option::Some(crate::model::url_map::HandlerType::ApiEndpoint(v.into()));
self
}
}
impl wkt::message::Message for UrlMap {
fn typename() -> &'static str {
"type.googleapis.com/google.appengine.v1.UrlMap"
}
}
pub mod url_map {
#[allow(unused_imports)]
use super::*;
#[derive(Clone, Debug, PartialEq)]
#[non_exhaustive]
pub enum RedirectHttpResponseCode {
Unspecified,
RedirectHttpResponseCode301,
RedirectHttpResponseCode302,
RedirectHttpResponseCode303,
RedirectHttpResponseCode307,
UnknownValue(redirect_http_response_code::UnknownValue),
}
#[doc(hidden)]
pub mod redirect_http_response_code {
#[allow(unused_imports)]
use super::*;
#[derive(Clone, Debug, PartialEq)]
pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
}
impl RedirectHttpResponseCode {
pub fn value(&self) -> std::option::Option<i32> {
match self {
Self::Unspecified => std::option::Option::Some(0),
Self::RedirectHttpResponseCode301 => std::option::Option::Some(1),
Self::RedirectHttpResponseCode302 => std::option::Option::Some(2),
Self::RedirectHttpResponseCode303 => std::option::Option::Some(3),
Self::RedirectHttpResponseCode307 => std::option::Option::Some(4),
Self::UnknownValue(u) => u.0.value(),
}
}
pub fn name(&self) -> std::option::Option<&str> {
match self {
Self::Unspecified => {
std::option::Option::Some("REDIRECT_HTTP_RESPONSE_CODE_UNSPECIFIED")
}
Self::RedirectHttpResponseCode301 => {
std::option::Option::Some("REDIRECT_HTTP_RESPONSE_CODE_301")
}
Self::RedirectHttpResponseCode302 => {
std::option::Option::Some("REDIRECT_HTTP_RESPONSE_CODE_302")
}
Self::RedirectHttpResponseCode303 => {
std::option::Option::Some("REDIRECT_HTTP_RESPONSE_CODE_303")
}
Self::RedirectHttpResponseCode307 => {
std::option::Option::Some("REDIRECT_HTTP_RESPONSE_CODE_307")
}
Self::UnknownValue(u) => u.0.name(),
}
}
}
impl std::default::Default for RedirectHttpResponseCode {
fn default() -> Self {
use std::convert::From;
Self::from(0)
}
}
impl std::fmt::Display for RedirectHttpResponseCode {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
wkt::internal::display_enum(f, self.name(), self.value())
}
}
impl std::convert::From<i32> for RedirectHttpResponseCode {
fn from(value: i32) -> Self {
match value {
0 => Self::Unspecified,
1 => Self::RedirectHttpResponseCode301,
2 => Self::RedirectHttpResponseCode302,
3 => Self::RedirectHttpResponseCode303,
4 => Self::RedirectHttpResponseCode307,
_ => Self::UnknownValue(redirect_http_response_code::UnknownValue(
wkt::internal::UnknownEnumValue::Integer(value),
)),
}
}
}
impl std::convert::From<&str> for RedirectHttpResponseCode {
fn from(value: &str) -> Self {
use std::string::ToString;
match value {
"REDIRECT_HTTP_RESPONSE_CODE_UNSPECIFIED" => Self::Unspecified,
"REDIRECT_HTTP_RESPONSE_CODE_301" => Self::RedirectHttpResponseCode301,
"REDIRECT_HTTP_RESPONSE_CODE_302" => Self::RedirectHttpResponseCode302,
"REDIRECT_HTTP_RESPONSE_CODE_303" => Self::RedirectHttpResponseCode303,
"REDIRECT_HTTP_RESPONSE_CODE_307" => Self::RedirectHttpResponseCode307,
_ => Self::UnknownValue(redirect_http_response_code::UnknownValue(
wkt::internal::UnknownEnumValue::String(value.to_string()),
)),
}
}
}
impl serde::ser::Serialize for RedirectHttpResponseCode {
fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
where
S: serde::Serializer,
{
match self {
Self::Unspecified => serializer.serialize_i32(0),
Self::RedirectHttpResponseCode301 => serializer.serialize_i32(1),
Self::RedirectHttpResponseCode302 => serializer.serialize_i32(2),
Self::RedirectHttpResponseCode303 => serializer.serialize_i32(3),
Self::RedirectHttpResponseCode307 => serializer.serialize_i32(4),
Self::UnknownValue(u) => u.0.serialize(serializer),
}
}
}
impl<'de> serde::de::Deserialize<'de> for RedirectHttpResponseCode {
fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
where
D: serde::Deserializer<'de>,
{
deserializer.deserialize_any(
wkt::internal::EnumVisitor::<RedirectHttpResponseCode>::new(
".google.appengine.v1.UrlMap.RedirectHttpResponseCode",
),
)
}
}
#[derive(Clone, Debug, PartialEq)]
#[non_exhaustive]
pub enum HandlerType {
StaticFiles(std::boxed::Box<crate::model::StaticFilesHandler>),
Script(std::boxed::Box<crate::model::ScriptHandler>),
ApiEndpoint(std::boxed::Box<crate::model::ApiEndpointHandler>),
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct StaticFilesHandler {
pub path: std::string::String,
pub upload_path_regex: std::string::String,
pub http_headers: std::collections::HashMap<std::string::String, std::string::String>,
pub mime_type: std::string::String,
pub expiration: std::option::Option<wkt::Duration>,
pub require_matching_file: bool,
pub application_readable: bool,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl StaticFilesHandler {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_path<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.path = v.into();
self
}
pub fn set_upload_path_regex<T: std::convert::Into<std::string::String>>(
mut self,
v: T,
) -> Self {
self.upload_path_regex = v.into();
self
}
pub fn set_http_headers<T, K, V>(mut self, v: T) -> Self
where
T: std::iter::IntoIterator<Item = (K, V)>,
K: std::convert::Into<std::string::String>,
V: std::convert::Into<std::string::String>,
{
use std::iter::Iterator;
self.http_headers = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
self
}
pub fn set_mime_type<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.mime_type = v.into();
self
}
pub fn set_expiration<T>(mut self, v: T) -> Self
where
T: std::convert::Into<wkt::Duration>,
{
self.expiration = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_expiration<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<wkt::Duration>,
{
self.expiration = v.map(|x| x.into());
self
}
pub fn set_require_matching_file<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
self.require_matching_file = v.into();
self
}
pub fn set_application_readable<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
self.application_readable = v.into();
self
}
}
impl wkt::message::Message for StaticFilesHandler {
fn typename() -> &'static str {
"type.googleapis.com/google.appengine.v1.StaticFilesHandler"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct ScriptHandler {
pub script_path: std::string::String,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl ScriptHandler {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_script_path<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.script_path = v.into();
self
}
}
impl wkt::message::Message for ScriptHandler {
fn typename() -> &'static str {
"type.googleapis.com/google.appengine.v1.ScriptHandler"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct ApiEndpointHandler {
pub script_path: std::string::String,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl ApiEndpointHandler {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_script_path<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.script_path = v.into();
self
}
}
impl wkt::message::Message for ApiEndpointHandler {
fn typename() -> &'static str {
"type.googleapis.com/google.appengine.v1.ApiEndpointHandler"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct HealthCheck {
pub disable_health_check: bool,
pub host: std::string::String,
pub healthy_threshold: u32,
pub unhealthy_threshold: u32,
pub restart_threshold: u32,
pub check_interval: std::option::Option<wkt::Duration>,
pub timeout: std::option::Option<wkt::Duration>,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl HealthCheck {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_disable_health_check<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
self.disable_health_check = v.into();
self
}
pub fn set_host<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.host = v.into();
self
}
pub fn set_healthy_threshold<T: std::convert::Into<u32>>(mut self, v: T) -> Self {
self.healthy_threshold = v.into();
self
}
pub fn set_unhealthy_threshold<T: std::convert::Into<u32>>(mut self, v: T) -> Self {
self.unhealthy_threshold = v.into();
self
}
pub fn set_restart_threshold<T: std::convert::Into<u32>>(mut self, v: T) -> Self {
self.restart_threshold = v.into();
self
}
pub fn set_check_interval<T>(mut self, v: T) -> Self
where
T: std::convert::Into<wkt::Duration>,
{
self.check_interval = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_check_interval<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<wkt::Duration>,
{
self.check_interval = v.map(|x| x.into());
self
}
pub fn set_timeout<T>(mut self, v: T) -> Self
where
T: std::convert::Into<wkt::Duration>,
{
self.timeout = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_timeout<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<wkt::Duration>,
{
self.timeout = v.map(|x| x.into());
self
}
}
impl wkt::message::Message for HealthCheck {
fn typename() -> &'static str {
"type.googleapis.com/google.appengine.v1.HealthCheck"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct ReadinessCheck {
pub path: std::string::String,
pub host: std::string::String,
pub failure_threshold: u32,
pub success_threshold: u32,
pub check_interval: std::option::Option<wkt::Duration>,
pub timeout: std::option::Option<wkt::Duration>,
pub app_start_timeout: std::option::Option<wkt::Duration>,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl ReadinessCheck {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_path<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.path = v.into();
self
}
pub fn set_host<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.host = v.into();
self
}
pub fn set_failure_threshold<T: std::convert::Into<u32>>(mut self, v: T) -> Self {
self.failure_threshold = v.into();
self
}
pub fn set_success_threshold<T: std::convert::Into<u32>>(mut self, v: T) -> Self {
self.success_threshold = v.into();
self
}
pub fn set_check_interval<T>(mut self, v: T) -> Self
where
T: std::convert::Into<wkt::Duration>,
{
self.check_interval = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_check_interval<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<wkt::Duration>,
{
self.check_interval = v.map(|x| x.into());
self
}
pub fn set_timeout<T>(mut self, v: T) -> Self
where
T: std::convert::Into<wkt::Duration>,
{
self.timeout = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_timeout<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<wkt::Duration>,
{
self.timeout = v.map(|x| x.into());
self
}
pub fn set_app_start_timeout<T>(mut self, v: T) -> Self
where
T: std::convert::Into<wkt::Duration>,
{
self.app_start_timeout = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_app_start_timeout<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<wkt::Duration>,
{
self.app_start_timeout = v.map(|x| x.into());
self
}
}
impl wkt::message::Message for ReadinessCheck {
fn typename() -> &'static str {
"type.googleapis.com/google.appengine.v1.ReadinessCheck"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct LivenessCheck {
pub path: std::string::String,
pub host: std::string::String,
pub failure_threshold: u32,
pub success_threshold: u32,
pub check_interval: std::option::Option<wkt::Duration>,
pub timeout: std::option::Option<wkt::Duration>,
pub initial_delay: std::option::Option<wkt::Duration>,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl LivenessCheck {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_path<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.path = v.into();
self
}
pub fn set_host<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.host = v.into();
self
}
pub fn set_failure_threshold<T: std::convert::Into<u32>>(mut self, v: T) -> Self {
self.failure_threshold = v.into();
self
}
pub fn set_success_threshold<T: std::convert::Into<u32>>(mut self, v: T) -> Self {
self.success_threshold = v.into();
self
}
pub fn set_check_interval<T>(mut self, v: T) -> Self
where
T: std::convert::Into<wkt::Duration>,
{
self.check_interval = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_check_interval<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<wkt::Duration>,
{
self.check_interval = v.map(|x| x.into());
self
}
pub fn set_timeout<T>(mut self, v: T) -> Self
where
T: std::convert::Into<wkt::Duration>,
{
self.timeout = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_timeout<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<wkt::Duration>,
{
self.timeout = v.map(|x| x.into());
self
}
pub fn set_initial_delay<T>(mut self, v: T) -> Self
where
T: std::convert::Into<wkt::Duration>,
{
self.initial_delay = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_initial_delay<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<wkt::Duration>,
{
self.initial_delay = v.map(|x| x.into());
self
}
}
impl wkt::message::Message for LivenessCheck {
fn typename() -> &'static str {
"type.googleapis.com/google.appengine.v1.LivenessCheck"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct Library {
pub name: std::string::String,
pub version: std::string::String,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl Library {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.name = v.into();
self
}
pub fn set_version<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.version = v.into();
self
}
}
impl wkt::message::Message for Library {
fn typename() -> &'static str {
"type.googleapis.com/google.appengine.v1.Library"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct GetApplicationRequest {
pub name: std::string::String,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl GetApplicationRequest {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.name = v.into();
self
}
}
impl wkt::message::Message for GetApplicationRequest {
fn typename() -> &'static str {
"type.googleapis.com/google.appengine.v1.GetApplicationRequest"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct CreateApplicationRequest {
pub application: std::option::Option<crate::model::Application>,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl CreateApplicationRequest {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_application<T>(mut self, v: T) -> Self
where
T: std::convert::Into<crate::model::Application>,
{
self.application = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_application<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<crate::model::Application>,
{
self.application = v.map(|x| x.into());
self
}
}
impl wkt::message::Message for CreateApplicationRequest {
fn typename() -> &'static str {
"type.googleapis.com/google.appengine.v1.CreateApplicationRequest"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct UpdateApplicationRequest {
pub name: std::string::String,
pub application: std::option::Option<crate::model::Application>,
pub update_mask: std::option::Option<wkt::FieldMask>,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl UpdateApplicationRequest {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.name = v.into();
self
}
pub fn set_application<T>(mut self, v: T) -> Self
where
T: std::convert::Into<crate::model::Application>,
{
self.application = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_application<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<crate::model::Application>,
{
self.application = v.map(|x| x.into());
self
}
pub fn set_update_mask<T>(mut self, v: T) -> Self
where
T: std::convert::Into<wkt::FieldMask>,
{
self.update_mask = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<wkt::FieldMask>,
{
self.update_mask = v.map(|x| x.into());
self
}
}
impl wkt::message::Message for UpdateApplicationRequest {
fn typename() -> &'static str {
"type.googleapis.com/google.appengine.v1.UpdateApplicationRequest"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct RepairApplicationRequest {
pub name: std::string::String,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl RepairApplicationRequest {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.name = v.into();
self
}
}
impl wkt::message::Message for RepairApplicationRequest {
fn typename() -> &'static str {
"type.googleapis.com/google.appengine.v1.RepairApplicationRequest"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct ListServicesRequest {
pub parent: std::string::String,
pub page_size: i32,
pub page_token: std::string::String,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl ListServicesRequest {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.parent = v.into();
self
}
pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
self.page_size = v.into();
self
}
pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.page_token = v.into();
self
}
}
impl wkt::message::Message for ListServicesRequest {
fn typename() -> &'static str {
"type.googleapis.com/google.appengine.v1.ListServicesRequest"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct ListServicesResponse {
pub services: std::vec::Vec<crate::model::Service>,
pub next_page_token: std::string::String,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl ListServicesResponse {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_services<T, V>(mut self, v: T) -> Self
where
T: std::iter::IntoIterator<Item = V>,
V: std::convert::Into<crate::model::Service>,
{
use std::iter::Iterator;
self.services = v.into_iter().map(|i| i.into()).collect();
self
}
pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.next_page_token = v.into();
self
}
}
impl wkt::message::Message for ListServicesResponse {
fn typename() -> &'static str {
"type.googleapis.com/google.appengine.v1.ListServicesResponse"
}
}
#[doc(hidden)]
impl google_cloud_gax::paginator::internal::PageableResponse for ListServicesResponse {
type PageItem = crate::model::Service;
fn items(self) -> std::vec::Vec<Self::PageItem> {
self.services
}
fn next_page_token(&self) -> std::string::String {
use std::clone::Clone;
self.next_page_token.clone()
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct GetServiceRequest {
pub name: std::string::String,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl GetServiceRequest {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.name = v.into();
self
}
}
impl wkt::message::Message for GetServiceRequest {
fn typename() -> &'static str {
"type.googleapis.com/google.appengine.v1.GetServiceRequest"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct UpdateServiceRequest {
pub name: std::string::String,
pub service: std::option::Option<crate::model::Service>,
pub update_mask: std::option::Option<wkt::FieldMask>,
pub migrate_traffic: bool,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl UpdateServiceRequest {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.name = v.into();
self
}
pub fn set_service<T>(mut self, v: T) -> Self
where
T: std::convert::Into<crate::model::Service>,
{
self.service = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_service<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<crate::model::Service>,
{
self.service = v.map(|x| x.into());
self
}
pub fn set_update_mask<T>(mut self, v: T) -> Self
where
T: std::convert::Into<wkt::FieldMask>,
{
self.update_mask = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<wkt::FieldMask>,
{
self.update_mask = v.map(|x| x.into());
self
}
pub fn set_migrate_traffic<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
self.migrate_traffic = v.into();
self
}
}
impl wkt::message::Message for UpdateServiceRequest {
fn typename() -> &'static str {
"type.googleapis.com/google.appengine.v1.UpdateServiceRequest"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct DeleteServiceRequest {
pub name: std::string::String,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl DeleteServiceRequest {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.name = v.into();
self
}
}
impl wkt::message::Message for DeleteServiceRequest {
fn typename() -> &'static str {
"type.googleapis.com/google.appengine.v1.DeleteServiceRequest"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct ListVersionsRequest {
pub parent: std::string::String,
pub view: crate::model::VersionView,
pub page_size: i32,
pub page_token: std::string::String,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl ListVersionsRequest {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.parent = v.into();
self
}
pub fn set_view<T: std::convert::Into<crate::model::VersionView>>(mut self, v: T) -> Self {
self.view = v.into();
self
}
pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
self.page_size = v.into();
self
}
pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.page_token = v.into();
self
}
}
impl wkt::message::Message for ListVersionsRequest {
fn typename() -> &'static str {
"type.googleapis.com/google.appengine.v1.ListVersionsRequest"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct ListVersionsResponse {
pub versions: std::vec::Vec<crate::model::Version>,
pub next_page_token: std::string::String,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl ListVersionsResponse {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_versions<T, V>(mut self, v: T) -> Self
where
T: std::iter::IntoIterator<Item = V>,
V: std::convert::Into<crate::model::Version>,
{
use std::iter::Iterator;
self.versions = v.into_iter().map(|i| i.into()).collect();
self
}
pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.next_page_token = v.into();
self
}
}
impl wkt::message::Message for ListVersionsResponse {
fn typename() -> &'static str {
"type.googleapis.com/google.appengine.v1.ListVersionsResponse"
}
}
#[doc(hidden)]
impl google_cloud_gax::paginator::internal::PageableResponse for ListVersionsResponse {
type PageItem = crate::model::Version;
fn items(self) -> std::vec::Vec<Self::PageItem> {
self.versions
}
fn next_page_token(&self) -> std::string::String {
use std::clone::Clone;
self.next_page_token.clone()
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct GetVersionRequest {
pub name: std::string::String,
pub view: crate::model::VersionView,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl GetVersionRequest {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.name = v.into();
self
}
pub fn set_view<T: std::convert::Into<crate::model::VersionView>>(mut self, v: T) -> Self {
self.view = v.into();
self
}
}
impl wkt::message::Message for GetVersionRequest {
fn typename() -> &'static str {
"type.googleapis.com/google.appengine.v1.GetVersionRequest"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct CreateVersionRequest {
pub parent: std::string::String,
pub version: std::option::Option<crate::model::Version>,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl CreateVersionRequest {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.parent = v.into();
self
}
pub fn set_version<T>(mut self, v: T) -> Self
where
T: std::convert::Into<crate::model::Version>,
{
self.version = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_version<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<crate::model::Version>,
{
self.version = v.map(|x| x.into());
self
}
}
impl wkt::message::Message for CreateVersionRequest {
fn typename() -> &'static str {
"type.googleapis.com/google.appengine.v1.CreateVersionRequest"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct UpdateVersionRequest {
pub name: std::string::String,
pub version: std::option::Option<crate::model::Version>,
pub update_mask: std::option::Option<wkt::FieldMask>,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl UpdateVersionRequest {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.name = v.into();
self
}
pub fn set_version<T>(mut self, v: T) -> Self
where
T: std::convert::Into<crate::model::Version>,
{
self.version = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_version<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<crate::model::Version>,
{
self.version = v.map(|x| x.into());
self
}
pub fn set_update_mask<T>(mut self, v: T) -> Self
where
T: std::convert::Into<wkt::FieldMask>,
{
self.update_mask = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<wkt::FieldMask>,
{
self.update_mask = v.map(|x| x.into());
self
}
}
impl wkt::message::Message for UpdateVersionRequest {
fn typename() -> &'static str {
"type.googleapis.com/google.appengine.v1.UpdateVersionRequest"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct DeleteVersionRequest {
pub name: std::string::String,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl DeleteVersionRequest {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.name = v.into();
self
}
}
impl wkt::message::Message for DeleteVersionRequest {
fn typename() -> &'static str {
"type.googleapis.com/google.appengine.v1.DeleteVersionRequest"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct ListInstancesRequest {
pub parent: std::string::String,
pub page_size: i32,
pub page_token: std::string::String,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl ListInstancesRequest {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.parent = v.into();
self
}
pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
self.page_size = v.into();
self
}
pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.page_token = v.into();
self
}
}
impl wkt::message::Message for ListInstancesRequest {
fn typename() -> &'static str {
"type.googleapis.com/google.appengine.v1.ListInstancesRequest"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct ListInstancesResponse {
pub instances: std::vec::Vec<crate::model::Instance>,
pub next_page_token: std::string::String,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl ListInstancesResponse {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_instances<T, V>(mut self, v: T) -> Self
where
T: std::iter::IntoIterator<Item = V>,
V: std::convert::Into<crate::model::Instance>,
{
use std::iter::Iterator;
self.instances = v.into_iter().map(|i| i.into()).collect();
self
}
pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.next_page_token = v.into();
self
}
}
impl wkt::message::Message for ListInstancesResponse {
fn typename() -> &'static str {
"type.googleapis.com/google.appengine.v1.ListInstancesResponse"
}
}
#[doc(hidden)]
impl google_cloud_gax::paginator::internal::PageableResponse for ListInstancesResponse {
type PageItem = crate::model::Instance;
fn items(self) -> std::vec::Vec<Self::PageItem> {
self.instances
}
fn next_page_token(&self) -> std::string::String {
use std::clone::Clone;
self.next_page_token.clone()
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct GetInstanceRequest {
pub name: std::string::String,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl GetInstanceRequest {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.name = v.into();
self
}
}
impl wkt::message::Message for GetInstanceRequest {
fn typename() -> &'static str {
"type.googleapis.com/google.appengine.v1.GetInstanceRequest"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct DeleteInstanceRequest {
pub name: std::string::String,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl DeleteInstanceRequest {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.name = v.into();
self
}
}
impl wkt::message::Message for DeleteInstanceRequest {
fn typename() -> &'static str {
"type.googleapis.com/google.appengine.v1.DeleteInstanceRequest"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct DebugInstanceRequest {
pub name: std::string::String,
pub ssh_key: std::string::String,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl DebugInstanceRequest {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.name = v.into();
self
}
pub fn set_ssh_key<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.ssh_key = v.into();
self
}
}
impl wkt::message::Message for DebugInstanceRequest {
fn typename() -> &'static str {
"type.googleapis.com/google.appengine.v1.DebugInstanceRequest"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct ListIngressRulesRequest {
pub parent: std::string::String,
pub page_size: i32,
pub page_token: std::string::String,
pub matching_address: std::string::String,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl ListIngressRulesRequest {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.parent = v.into();
self
}
pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
self.page_size = v.into();
self
}
pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.page_token = v.into();
self
}
pub fn set_matching_address<T: std::convert::Into<std::string::String>>(
mut self,
v: T,
) -> Self {
self.matching_address = v.into();
self
}
}
impl wkt::message::Message for ListIngressRulesRequest {
fn typename() -> &'static str {
"type.googleapis.com/google.appengine.v1.ListIngressRulesRequest"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct ListIngressRulesResponse {
pub ingress_rules: std::vec::Vec<crate::model::FirewallRule>,
pub next_page_token: std::string::String,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl ListIngressRulesResponse {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_ingress_rules<T, V>(mut self, v: T) -> Self
where
T: std::iter::IntoIterator<Item = V>,
V: std::convert::Into<crate::model::FirewallRule>,
{
use std::iter::Iterator;
self.ingress_rules = v.into_iter().map(|i| i.into()).collect();
self
}
pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.next_page_token = v.into();
self
}
}
impl wkt::message::Message for ListIngressRulesResponse {
fn typename() -> &'static str {
"type.googleapis.com/google.appengine.v1.ListIngressRulesResponse"
}
}
#[doc(hidden)]
impl google_cloud_gax::paginator::internal::PageableResponse for ListIngressRulesResponse {
type PageItem = crate::model::FirewallRule;
fn items(self) -> std::vec::Vec<Self::PageItem> {
self.ingress_rules
}
fn next_page_token(&self) -> std::string::String {
use std::clone::Clone;
self.next_page_token.clone()
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct BatchUpdateIngressRulesRequest {
pub name: std::string::String,
pub ingress_rules: std::vec::Vec<crate::model::FirewallRule>,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl BatchUpdateIngressRulesRequest {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.name = v.into();
self
}
pub fn set_ingress_rules<T, V>(mut self, v: T) -> Self
where
T: std::iter::IntoIterator<Item = V>,
V: std::convert::Into<crate::model::FirewallRule>,
{
use std::iter::Iterator;
self.ingress_rules = v.into_iter().map(|i| i.into()).collect();
self
}
}
impl wkt::message::Message for BatchUpdateIngressRulesRequest {
fn typename() -> &'static str {
"type.googleapis.com/google.appengine.v1.BatchUpdateIngressRulesRequest"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct BatchUpdateIngressRulesResponse {
pub ingress_rules: std::vec::Vec<crate::model::FirewallRule>,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl BatchUpdateIngressRulesResponse {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_ingress_rules<T, V>(mut self, v: T) -> Self
where
T: std::iter::IntoIterator<Item = V>,
V: std::convert::Into<crate::model::FirewallRule>,
{
use std::iter::Iterator;
self.ingress_rules = v.into_iter().map(|i| i.into()).collect();
self
}
}
impl wkt::message::Message for BatchUpdateIngressRulesResponse {
fn typename() -> &'static str {
"type.googleapis.com/google.appengine.v1.BatchUpdateIngressRulesResponse"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct CreateIngressRuleRequest {
pub parent: std::string::String,
pub rule: std::option::Option<crate::model::FirewallRule>,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl CreateIngressRuleRequest {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.parent = v.into();
self
}
pub fn set_rule<T>(mut self, v: T) -> Self
where
T: std::convert::Into<crate::model::FirewallRule>,
{
self.rule = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_rule<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<crate::model::FirewallRule>,
{
self.rule = v.map(|x| x.into());
self
}
}
impl wkt::message::Message for CreateIngressRuleRequest {
fn typename() -> &'static str {
"type.googleapis.com/google.appengine.v1.CreateIngressRuleRequest"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct GetIngressRuleRequest {
pub name: std::string::String,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl GetIngressRuleRequest {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.name = v.into();
self
}
}
impl wkt::message::Message for GetIngressRuleRequest {
fn typename() -> &'static str {
"type.googleapis.com/google.appengine.v1.GetIngressRuleRequest"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct UpdateIngressRuleRequest {
pub name: std::string::String,
pub rule: std::option::Option<crate::model::FirewallRule>,
pub update_mask: std::option::Option<wkt::FieldMask>,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl UpdateIngressRuleRequest {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.name = v.into();
self
}
pub fn set_rule<T>(mut self, v: T) -> Self
where
T: std::convert::Into<crate::model::FirewallRule>,
{
self.rule = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_rule<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<crate::model::FirewallRule>,
{
self.rule = v.map(|x| x.into());
self
}
pub fn set_update_mask<T>(mut self, v: T) -> Self
where
T: std::convert::Into<wkt::FieldMask>,
{
self.update_mask = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<wkt::FieldMask>,
{
self.update_mask = v.map(|x| x.into());
self
}
}
impl wkt::message::Message for UpdateIngressRuleRequest {
fn typename() -> &'static str {
"type.googleapis.com/google.appengine.v1.UpdateIngressRuleRequest"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct DeleteIngressRuleRequest {
pub name: std::string::String,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl DeleteIngressRuleRequest {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.name = v.into();
self
}
}
impl wkt::message::Message for DeleteIngressRuleRequest {
fn typename() -> &'static str {
"type.googleapis.com/google.appengine.v1.DeleteIngressRuleRequest"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct ListAuthorizedDomainsRequest {
pub parent: std::string::String,
pub page_size: i32,
pub page_token: std::string::String,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl ListAuthorizedDomainsRequest {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.parent = v.into();
self
}
pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
self.page_size = v.into();
self
}
pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.page_token = v.into();
self
}
}
impl wkt::message::Message for ListAuthorizedDomainsRequest {
fn typename() -> &'static str {
"type.googleapis.com/google.appengine.v1.ListAuthorizedDomainsRequest"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct ListAuthorizedDomainsResponse {
pub domains: std::vec::Vec<crate::model::AuthorizedDomain>,
pub next_page_token: std::string::String,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl ListAuthorizedDomainsResponse {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_domains<T, V>(mut self, v: T) -> Self
where
T: std::iter::IntoIterator<Item = V>,
V: std::convert::Into<crate::model::AuthorizedDomain>,
{
use std::iter::Iterator;
self.domains = v.into_iter().map(|i| i.into()).collect();
self
}
pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.next_page_token = v.into();
self
}
}
impl wkt::message::Message for ListAuthorizedDomainsResponse {
fn typename() -> &'static str {
"type.googleapis.com/google.appengine.v1.ListAuthorizedDomainsResponse"
}
}
#[doc(hidden)]
impl google_cloud_gax::paginator::internal::PageableResponse for ListAuthorizedDomainsResponse {
type PageItem = crate::model::AuthorizedDomain;
fn items(self) -> std::vec::Vec<Self::PageItem> {
self.domains
}
fn next_page_token(&self) -> std::string::String {
use std::clone::Clone;
self.next_page_token.clone()
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct ListAuthorizedCertificatesRequest {
pub parent: std::string::String,
pub view: crate::model::AuthorizedCertificateView,
pub page_size: i32,
pub page_token: std::string::String,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl ListAuthorizedCertificatesRequest {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.parent = v.into();
self
}
pub fn set_view<T: std::convert::Into<crate::model::AuthorizedCertificateView>>(
mut self,
v: T,
) -> Self {
self.view = v.into();
self
}
pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
self.page_size = v.into();
self
}
pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.page_token = v.into();
self
}
}
impl wkt::message::Message for ListAuthorizedCertificatesRequest {
fn typename() -> &'static str {
"type.googleapis.com/google.appengine.v1.ListAuthorizedCertificatesRequest"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct ListAuthorizedCertificatesResponse {
pub certificates: std::vec::Vec<crate::model::AuthorizedCertificate>,
pub next_page_token: std::string::String,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl ListAuthorizedCertificatesResponse {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_certificates<T, V>(mut self, v: T) -> Self
where
T: std::iter::IntoIterator<Item = V>,
V: std::convert::Into<crate::model::AuthorizedCertificate>,
{
use std::iter::Iterator;
self.certificates = v.into_iter().map(|i| i.into()).collect();
self
}
pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.next_page_token = v.into();
self
}
}
impl wkt::message::Message for ListAuthorizedCertificatesResponse {
fn typename() -> &'static str {
"type.googleapis.com/google.appengine.v1.ListAuthorizedCertificatesResponse"
}
}
#[doc(hidden)]
impl google_cloud_gax::paginator::internal::PageableResponse
for ListAuthorizedCertificatesResponse
{
type PageItem = crate::model::AuthorizedCertificate;
fn items(self) -> std::vec::Vec<Self::PageItem> {
self.certificates
}
fn next_page_token(&self) -> std::string::String {
use std::clone::Clone;
self.next_page_token.clone()
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct GetAuthorizedCertificateRequest {
pub name: std::string::String,
pub view: crate::model::AuthorizedCertificateView,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl GetAuthorizedCertificateRequest {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.name = v.into();
self
}
pub fn set_view<T: std::convert::Into<crate::model::AuthorizedCertificateView>>(
mut self,
v: T,
) -> Self {
self.view = v.into();
self
}
}
impl wkt::message::Message for GetAuthorizedCertificateRequest {
fn typename() -> &'static str {
"type.googleapis.com/google.appengine.v1.GetAuthorizedCertificateRequest"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct CreateAuthorizedCertificateRequest {
pub parent: std::string::String,
pub certificate: std::option::Option<crate::model::AuthorizedCertificate>,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl CreateAuthorizedCertificateRequest {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.parent = v.into();
self
}
pub fn set_certificate<T>(mut self, v: T) -> Self
where
T: std::convert::Into<crate::model::AuthorizedCertificate>,
{
self.certificate = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_certificate<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<crate::model::AuthorizedCertificate>,
{
self.certificate = v.map(|x| x.into());
self
}
}
impl wkt::message::Message for CreateAuthorizedCertificateRequest {
fn typename() -> &'static str {
"type.googleapis.com/google.appengine.v1.CreateAuthorizedCertificateRequest"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct UpdateAuthorizedCertificateRequest {
pub name: std::string::String,
pub certificate: std::option::Option<crate::model::AuthorizedCertificate>,
pub update_mask: std::option::Option<wkt::FieldMask>,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl UpdateAuthorizedCertificateRequest {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.name = v.into();
self
}
pub fn set_certificate<T>(mut self, v: T) -> Self
where
T: std::convert::Into<crate::model::AuthorizedCertificate>,
{
self.certificate = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_certificate<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<crate::model::AuthorizedCertificate>,
{
self.certificate = v.map(|x| x.into());
self
}
pub fn set_update_mask<T>(mut self, v: T) -> Self
where
T: std::convert::Into<wkt::FieldMask>,
{
self.update_mask = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<wkt::FieldMask>,
{
self.update_mask = v.map(|x| x.into());
self
}
}
impl wkt::message::Message for UpdateAuthorizedCertificateRequest {
fn typename() -> &'static str {
"type.googleapis.com/google.appengine.v1.UpdateAuthorizedCertificateRequest"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct DeleteAuthorizedCertificateRequest {
pub name: std::string::String,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl DeleteAuthorizedCertificateRequest {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.name = v.into();
self
}
}
impl wkt::message::Message for DeleteAuthorizedCertificateRequest {
fn typename() -> &'static str {
"type.googleapis.com/google.appengine.v1.DeleteAuthorizedCertificateRequest"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct ListDomainMappingsRequest {
pub parent: std::string::String,
pub page_size: i32,
pub page_token: std::string::String,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl ListDomainMappingsRequest {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.parent = v.into();
self
}
pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
self.page_size = v.into();
self
}
pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.page_token = v.into();
self
}
}
impl wkt::message::Message for ListDomainMappingsRequest {
fn typename() -> &'static str {
"type.googleapis.com/google.appengine.v1.ListDomainMappingsRequest"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct ListDomainMappingsResponse {
pub domain_mappings: std::vec::Vec<crate::model::DomainMapping>,
pub next_page_token: std::string::String,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl ListDomainMappingsResponse {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_domain_mappings<T, V>(mut self, v: T) -> Self
where
T: std::iter::IntoIterator<Item = V>,
V: std::convert::Into<crate::model::DomainMapping>,
{
use std::iter::Iterator;
self.domain_mappings = v.into_iter().map(|i| i.into()).collect();
self
}
pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.next_page_token = v.into();
self
}
}
impl wkt::message::Message for ListDomainMappingsResponse {
fn typename() -> &'static str {
"type.googleapis.com/google.appengine.v1.ListDomainMappingsResponse"
}
}
#[doc(hidden)]
impl google_cloud_gax::paginator::internal::PageableResponse for ListDomainMappingsResponse {
type PageItem = crate::model::DomainMapping;
fn items(self) -> std::vec::Vec<Self::PageItem> {
self.domain_mappings
}
fn next_page_token(&self) -> std::string::String {
use std::clone::Clone;
self.next_page_token.clone()
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct GetDomainMappingRequest {
pub name: std::string::String,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl GetDomainMappingRequest {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.name = v.into();
self
}
}
impl wkt::message::Message for GetDomainMappingRequest {
fn typename() -> &'static str {
"type.googleapis.com/google.appengine.v1.GetDomainMappingRequest"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct CreateDomainMappingRequest {
pub parent: std::string::String,
pub domain_mapping: std::option::Option<crate::model::DomainMapping>,
pub override_strategy: crate::model::DomainOverrideStrategy,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl CreateDomainMappingRequest {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.parent = v.into();
self
}
pub fn set_domain_mapping<T>(mut self, v: T) -> Self
where
T: std::convert::Into<crate::model::DomainMapping>,
{
self.domain_mapping = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_domain_mapping<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<crate::model::DomainMapping>,
{
self.domain_mapping = v.map(|x| x.into());
self
}
pub fn set_override_strategy<T: std::convert::Into<crate::model::DomainOverrideStrategy>>(
mut self,
v: T,
) -> Self {
self.override_strategy = v.into();
self
}
}
impl wkt::message::Message for CreateDomainMappingRequest {
fn typename() -> &'static str {
"type.googleapis.com/google.appengine.v1.CreateDomainMappingRequest"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct UpdateDomainMappingRequest {
pub name: std::string::String,
pub domain_mapping: std::option::Option<crate::model::DomainMapping>,
pub update_mask: std::option::Option<wkt::FieldMask>,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl UpdateDomainMappingRequest {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.name = v.into();
self
}
pub fn set_domain_mapping<T>(mut self, v: T) -> Self
where
T: std::convert::Into<crate::model::DomainMapping>,
{
self.domain_mapping = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_domain_mapping<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<crate::model::DomainMapping>,
{
self.domain_mapping = v.map(|x| x.into());
self
}
pub fn set_update_mask<T>(mut self, v: T) -> Self
where
T: std::convert::Into<wkt::FieldMask>,
{
self.update_mask = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<wkt::FieldMask>,
{
self.update_mask = v.map(|x| x.into());
self
}
}
impl wkt::message::Message for UpdateDomainMappingRequest {
fn typename() -> &'static str {
"type.googleapis.com/google.appengine.v1.UpdateDomainMappingRequest"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct DeleteDomainMappingRequest {
pub name: std::string::String,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl DeleteDomainMappingRequest {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.name = v.into();
self
}
}
impl wkt::message::Message for DeleteDomainMappingRequest {
fn typename() -> &'static str {
"type.googleapis.com/google.appengine.v1.DeleteDomainMappingRequest"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct Application {
pub name: std::string::String,
pub id: std::string::String,
pub dispatch_rules: std::vec::Vec<crate::model::UrlDispatchRule>,
pub auth_domain: std::string::String,
pub location_id: std::string::String,
pub code_bucket: std::string::String,
pub default_cookie_expiration: std::option::Option<wkt::Duration>,
pub serving_status: crate::model::application::ServingStatus,
pub default_hostname: std::string::String,
pub default_bucket: std::string::String,
pub service_account: std::string::String,
pub iap: std::option::Option<crate::model::application::IdentityAwareProxy>,
pub gcr_domain: std::string::String,
pub database_type: crate::model::application::DatabaseType,
pub feature_settings: std::option::Option<crate::model::application::FeatureSettings>,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl Application {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.name = v.into();
self
}
pub fn set_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.id = v.into();
self
}
pub fn set_dispatch_rules<T, V>(mut self, v: T) -> Self
where
T: std::iter::IntoIterator<Item = V>,
V: std::convert::Into<crate::model::UrlDispatchRule>,
{
use std::iter::Iterator;
self.dispatch_rules = v.into_iter().map(|i| i.into()).collect();
self
}
pub fn set_auth_domain<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.auth_domain = v.into();
self
}
pub fn set_location_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.location_id = v.into();
self
}
pub fn set_code_bucket<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.code_bucket = v.into();
self
}
pub fn set_default_cookie_expiration<T>(mut self, v: T) -> Self
where
T: std::convert::Into<wkt::Duration>,
{
self.default_cookie_expiration = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_default_cookie_expiration<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<wkt::Duration>,
{
self.default_cookie_expiration = v.map(|x| x.into());
self
}
pub fn set_serving_status<T: std::convert::Into<crate::model::application::ServingStatus>>(
mut self,
v: T,
) -> Self {
self.serving_status = v.into();
self
}
pub fn set_default_hostname<T: std::convert::Into<std::string::String>>(
mut self,
v: T,
) -> Self {
self.default_hostname = v.into();
self
}
pub fn set_default_bucket<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.default_bucket = v.into();
self
}
pub fn set_service_account<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.service_account = v.into();
self
}
pub fn set_iap<T>(mut self, v: T) -> Self
where
T: std::convert::Into<crate::model::application::IdentityAwareProxy>,
{
self.iap = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_iap<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<crate::model::application::IdentityAwareProxy>,
{
self.iap = v.map(|x| x.into());
self
}
pub fn set_gcr_domain<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.gcr_domain = v.into();
self
}
pub fn set_database_type<T: std::convert::Into<crate::model::application::DatabaseType>>(
mut self,
v: T,
) -> Self {
self.database_type = v.into();
self
}
pub fn set_feature_settings<T>(mut self, v: T) -> Self
where
T: std::convert::Into<crate::model::application::FeatureSettings>,
{
self.feature_settings = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_feature_settings<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<crate::model::application::FeatureSettings>,
{
self.feature_settings = v.map(|x| x.into());
self
}
}
impl wkt::message::Message for Application {
fn typename() -> &'static str {
"type.googleapis.com/google.appengine.v1.Application"
}
}
pub mod application {
#[allow(unused_imports)]
use super::*;
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct IdentityAwareProxy {
pub enabled: bool,
pub oauth2_client_id: std::string::String,
pub oauth2_client_secret: std::string::String,
pub oauth2_client_secret_sha256: std::string::String,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl IdentityAwareProxy {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
self.enabled = v.into();
self
}
pub fn set_oauth2_client_id<T: std::convert::Into<std::string::String>>(
mut self,
v: T,
) -> Self {
self.oauth2_client_id = v.into();
self
}
pub fn set_oauth2_client_secret<T: std::convert::Into<std::string::String>>(
mut self,
v: T,
) -> Self {
self.oauth2_client_secret = v.into();
self
}
pub fn set_oauth2_client_secret_sha256<T: std::convert::Into<std::string::String>>(
mut self,
v: T,
) -> Self {
self.oauth2_client_secret_sha256 = v.into();
self
}
}
impl wkt::message::Message for IdentityAwareProxy {
fn typename() -> &'static str {
"type.googleapis.com/google.appengine.v1.Application.IdentityAwareProxy"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct FeatureSettings {
pub split_health_checks: bool,
pub use_container_optimized_os: bool,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl FeatureSettings {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_split_health_checks<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
self.split_health_checks = v.into();
self
}
pub fn set_use_container_optimized_os<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
self.use_container_optimized_os = v.into();
self
}
}
impl wkt::message::Message for FeatureSettings {
fn typename() -> &'static str {
"type.googleapis.com/google.appengine.v1.Application.FeatureSettings"
}
}
#[derive(Clone, Debug, PartialEq)]
#[non_exhaustive]
pub enum ServingStatus {
Unspecified,
Serving,
UserDisabled,
SystemDisabled,
UnknownValue(serving_status::UnknownValue),
}
#[doc(hidden)]
pub mod serving_status {
#[allow(unused_imports)]
use super::*;
#[derive(Clone, Debug, PartialEq)]
pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
}
impl ServingStatus {
pub fn value(&self) -> std::option::Option<i32> {
match self {
Self::Unspecified => std::option::Option::Some(0),
Self::Serving => std::option::Option::Some(1),
Self::UserDisabled => std::option::Option::Some(2),
Self::SystemDisabled => std::option::Option::Some(3),
Self::UnknownValue(u) => u.0.value(),
}
}
pub fn name(&self) -> std::option::Option<&str> {
match self {
Self::Unspecified => std::option::Option::Some("UNSPECIFIED"),
Self::Serving => std::option::Option::Some("SERVING"),
Self::UserDisabled => std::option::Option::Some("USER_DISABLED"),
Self::SystemDisabled => std::option::Option::Some("SYSTEM_DISABLED"),
Self::UnknownValue(u) => u.0.name(),
}
}
}
impl std::default::Default for ServingStatus {
fn default() -> Self {
use std::convert::From;
Self::from(0)
}
}
impl std::fmt::Display for ServingStatus {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
wkt::internal::display_enum(f, self.name(), self.value())
}
}
impl std::convert::From<i32> for ServingStatus {
fn from(value: i32) -> Self {
match value {
0 => Self::Unspecified,
1 => Self::Serving,
2 => Self::UserDisabled,
3 => Self::SystemDisabled,
_ => Self::UnknownValue(serving_status::UnknownValue(
wkt::internal::UnknownEnumValue::Integer(value),
)),
}
}
}
impl std::convert::From<&str> for ServingStatus {
fn from(value: &str) -> Self {
use std::string::ToString;
match value {
"UNSPECIFIED" => Self::Unspecified,
"SERVING" => Self::Serving,
"USER_DISABLED" => Self::UserDisabled,
"SYSTEM_DISABLED" => Self::SystemDisabled,
_ => Self::UnknownValue(serving_status::UnknownValue(
wkt::internal::UnknownEnumValue::String(value.to_string()),
)),
}
}
}
impl serde::ser::Serialize for ServingStatus {
fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
where
S: serde::Serializer,
{
match self {
Self::Unspecified => serializer.serialize_i32(0),
Self::Serving => serializer.serialize_i32(1),
Self::UserDisabled => serializer.serialize_i32(2),
Self::SystemDisabled => serializer.serialize_i32(3),
Self::UnknownValue(u) => u.0.serialize(serializer),
}
}
}
impl<'de> serde::de::Deserialize<'de> for ServingStatus {
fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
where
D: serde::Deserializer<'de>,
{
deserializer.deserialize_any(wkt::internal::EnumVisitor::<ServingStatus>::new(
".google.appengine.v1.Application.ServingStatus",
))
}
}
#[derive(Clone, Debug, PartialEq)]
#[non_exhaustive]
pub enum DatabaseType {
Unspecified,
CloudDatastore,
CloudFirestore,
CloudDatastoreCompatibility,
UnknownValue(database_type::UnknownValue),
}
#[doc(hidden)]
pub mod database_type {
#[allow(unused_imports)]
use super::*;
#[derive(Clone, Debug, PartialEq)]
pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
}
impl DatabaseType {
pub fn value(&self) -> std::option::Option<i32> {
match self {
Self::Unspecified => std::option::Option::Some(0),
Self::CloudDatastore => std::option::Option::Some(1),
Self::CloudFirestore => std::option::Option::Some(2),
Self::CloudDatastoreCompatibility => std::option::Option::Some(3),
Self::UnknownValue(u) => u.0.value(),
}
}
pub fn name(&self) -> std::option::Option<&str> {
match self {
Self::Unspecified => std::option::Option::Some("DATABASE_TYPE_UNSPECIFIED"),
Self::CloudDatastore => std::option::Option::Some("CLOUD_DATASTORE"),
Self::CloudFirestore => std::option::Option::Some("CLOUD_FIRESTORE"),
Self::CloudDatastoreCompatibility => {
std::option::Option::Some("CLOUD_DATASTORE_COMPATIBILITY")
}
Self::UnknownValue(u) => u.0.name(),
}
}
}
impl std::default::Default for DatabaseType {
fn default() -> Self {
use std::convert::From;
Self::from(0)
}
}
impl std::fmt::Display for DatabaseType {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
wkt::internal::display_enum(f, self.name(), self.value())
}
}
impl std::convert::From<i32> for DatabaseType {
fn from(value: i32) -> Self {
match value {
0 => Self::Unspecified,
1 => Self::CloudDatastore,
2 => Self::CloudFirestore,
3 => Self::CloudDatastoreCompatibility,
_ => Self::UnknownValue(database_type::UnknownValue(
wkt::internal::UnknownEnumValue::Integer(value),
)),
}
}
}
impl std::convert::From<&str> for DatabaseType {
fn from(value: &str) -> Self {
use std::string::ToString;
match value {
"DATABASE_TYPE_UNSPECIFIED" => Self::Unspecified,
"CLOUD_DATASTORE" => Self::CloudDatastore,
"CLOUD_FIRESTORE" => Self::CloudFirestore,
"CLOUD_DATASTORE_COMPATIBILITY" => Self::CloudDatastoreCompatibility,
_ => Self::UnknownValue(database_type::UnknownValue(
wkt::internal::UnknownEnumValue::String(value.to_string()),
)),
}
}
}
impl serde::ser::Serialize for DatabaseType {
fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
where
S: serde::Serializer,
{
match self {
Self::Unspecified => serializer.serialize_i32(0),
Self::CloudDatastore => serializer.serialize_i32(1),
Self::CloudFirestore => serializer.serialize_i32(2),
Self::CloudDatastoreCompatibility => serializer.serialize_i32(3),
Self::UnknownValue(u) => u.0.serialize(serializer),
}
}
}
impl<'de> serde::de::Deserialize<'de> for DatabaseType {
fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
where
D: serde::Deserializer<'de>,
{
deserializer.deserialize_any(wkt::internal::EnumVisitor::<DatabaseType>::new(
".google.appengine.v1.Application.DatabaseType",
))
}
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct UrlDispatchRule {
pub domain: std::string::String,
pub path: std::string::String,
pub service: std::string::String,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl UrlDispatchRule {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_domain<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.domain = v.into();
self
}
pub fn set_path<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.path = v.into();
self
}
pub fn set_service<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.service = v.into();
self
}
}
impl wkt::message::Message for UrlDispatchRule {
fn typename() -> &'static str {
"type.googleapis.com/google.appengine.v1.UrlDispatchRule"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct AuditData {
pub method: std::option::Option<crate::model::audit_data::Method>,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl AuditData {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_method<
T: std::convert::Into<std::option::Option<crate::model::audit_data::Method>>,
>(
mut self,
v: T,
) -> Self {
self.method = v.into();
self
}
pub fn update_service(
&self,
) -> std::option::Option<&std::boxed::Box<crate::model::UpdateServiceMethod>> {
#[allow(unreachable_patterns)]
self.method.as_ref().and_then(|v| match v {
crate::model::audit_data::Method::UpdateService(v) => std::option::Option::Some(v),
_ => std::option::Option::None,
})
}
pub fn set_update_service<
T: std::convert::Into<std::boxed::Box<crate::model::UpdateServiceMethod>>,
>(
mut self,
v: T,
) -> Self {
self.method =
std::option::Option::Some(crate::model::audit_data::Method::UpdateService(v.into()));
self
}
pub fn create_version(
&self,
) -> std::option::Option<&std::boxed::Box<crate::model::CreateVersionMethod>> {
#[allow(unreachable_patterns)]
self.method.as_ref().and_then(|v| match v {
crate::model::audit_data::Method::CreateVersion(v) => std::option::Option::Some(v),
_ => std::option::Option::None,
})
}
pub fn set_create_version<
T: std::convert::Into<std::boxed::Box<crate::model::CreateVersionMethod>>,
>(
mut self,
v: T,
) -> Self {
self.method =
std::option::Option::Some(crate::model::audit_data::Method::CreateVersion(v.into()));
self
}
}
impl wkt::message::Message for AuditData {
fn typename() -> &'static str {
"type.googleapis.com/google.appengine.v1.AuditData"
}
}
pub mod audit_data {
#[allow(unused_imports)]
use super::*;
#[derive(Clone, Debug, PartialEq)]
#[non_exhaustive]
pub enum Method {
UpdateService(std::boxed::Box<crate::model::UpdateServiceMethod>),
CreateVersion(std::boxed::Box<crate::model::CreateVersionMethod>),
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct UpdateServiceMethod {
pub request: std::option::Option<crate::model::UpdateServiceRequest>,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl UpdateServiceMethod {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_request<T>(mut self, v: T) -> Self
where
T: std::convert::Into<crate::model::UpdateServiceRequest>,
{
self.request = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_request<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<crate::model::UpdateServiceRequest>,
{
self.request = v.map(|x| x.into());
self
}
}
impl wkt::message::Message for UpdateServiceMethod {
fn typename() -> &'static str {
"type.googleapis.com/google.appengine.v1.UpdateServiceMethod"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct CreateVersionMethod {
pub request: std::option::Option<crate::model::CreateVersionRequest>,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl CreateVersionMethod {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_request<T>(mut self, v: T) -> Self
where
T: std::convert::Into<crate::model::CreateVersionRequest>,
{
self.request = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_request<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<crate::model::CreateVersionRequest>,
{
self.request = v.map(|x| x.into());
self
}
}
impl wkt::message::Message for CreateVersionMethod {
fn typename() -> &'static str {
"type.googleapis.com/google.appengine.v1.CreateVersionMethod"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct AuthorizedCertificate {
pub name: std::string::String,
pub id: std::string::String,
pub display_name: std::string::String,
pub domain_names: std::vec::Vec<std::string::String>,
pub expire_time: std::option::Option<wkt::Timestamp>,
pub certificate_raw_data: std::option::Option<crate::model::CertificateRawData>,
pub managed_certificate: std::option::Option<crate::model::ManagedCertificate>,
pub visible_domain_mappings: std::vec::Vec<std::string::String>,
pub domain_mappings_count: i32,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl AuthorizedCertificate {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.name = v.into();
self
}
pub fn set_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.id = v.into();
self
}
pub fn set_display_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.display_name = v.into();
self
}
pub fn set_domain_names<T, V>(mut self, v: T) -> Self
where
T: std::iter::IntoIterator<Item = V>,
V: std::convert::Into<std::string::String>,
{
use std::iter::Iterator;
self.domain_names = v.into_iter().map(|i| i.into()).collect();
self
}
pub fn set_expire_time<T>(mut self, v: T) -> Self
where
T: std::convert::Into<wkt::Timestamp>,
{
self.expire_time = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_expire_time<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<wkt::Timestamp>,
{
self.expire_time = v.map(|x| x.into());
self
}
pub fn set_certificate_raw_data<T>(mut self, v: T) -> Self
where
T: std::convert::Into<crate::model::CertificateRawData>,
{
self.certificate_raw_data = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_certificate_raw_data<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<crate::model::CertificateRawData>,
{
self.certificate_raw_data = v.map(|x| x.into());
self
}
pub fn set_managed_certificate<T>(mut self, v: T) -> Self
where
T: std::convert::Into<crate::model::ManagedCertificate>,
{
self.managed_certificate = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_managed_certificate<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<crate::model::ManagedCertificate>,
{
self.managed_certificate = v.map(|x| x.into());
self
}
pub fn set_visible_domain_mappings<T, V>(mut self, v: T) -> Self
where
T: std::iter::IntoIterator<Item = V>,
V: std::convert::Into<std::string::String>,
{
use std::iter::Iterator;
self.visible_domain_mappings = v.into_iter().map(|i| i.into()).collect();
self
}
pub fn set_domain_mappings_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
self.domain_mappings_count = v.into();
self
}
}
impl wkt::message::Message for AuthorizedCertificate {
fn typename() -> &'static str {
"type.googleapis.com/google.appengine.v1.AuthorizedCertificate"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct CertificateRawData {
pub public_certificate: std::string::String,
pub private_key: std::string::String,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl CertificateRawData {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_public_certificate<T: std::convert::Into<std::string::String>>(
mut self,
v: T,
) -> Self {
self.public_certificate = v.into();
self
}
pub fn set_private_key<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.private_key = v.into();
self
}
}
impl wkt::message::Message for CertificateRawData {
fn typename() -> &'static str {
"type.googleapis.com/google.appengine.v1.CertificateRawData"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct ManagedCertificate {
pub last_renewal_time: std::option::Option<wkt::Timestamp>,
pub status: crate::model::ManagementStatus,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl ManagedCertificate {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_last_renewal_time<T>(mut self, v: T) -> Self
where
T: std::convert::Into<wkt::Timestamp>,
{
self.last_renewal_time = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_last_renewal_time<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<wkt::Timestamp>,
{
self.last_renewal_time = v.map(|x| x.into());
self
}
pub fn set_status<T: std::convert::Into<crate::model::ManagementStatus>>(
mut self,
v: T,
) -> Self {
self.status = v.into();
self
}
}
impl wkt::message::Message for ManagedCertificate {
fn typename() -> &'static str {
"type.googleapis.com/google.appengine.v1.ManagedCertificate"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct Deployment {
pub files: std::collections::HashMap<std::string::String, crate::model::FileInfo>,
pub container: std::option::Option<crate::model::ContainerInfo>,
pub zip: std::option::Option<crate::model::ZipInfo>,
pub cloud_build_options: std::option::Option<crate::model::CloudBuildOptions>,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl Deployment {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_files<T, K, V>(mut self, v: T) -> Self
where
T: std::iter::IntoIterator<Item = (K, V)>,
K: std::convert::Into<std::string::String>,
V: std::convert::Into<crate::model::FileInfo>,
{
use std::iter::Iterator;
self.files = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
self
}
pub fn set_container<T>(mut self, v: T) -> Self
where
T: std::convert::Into<crate::model::ContainerInfo>,
{
self.container = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_container<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<crate::model::ContainerInfo>,
{
self.container = v.map(|x| x.into());
self
}
pub fn set_zip<T>(mut self, v: T) -> Self
where
T: std::convert::Into<crate::model::ZipInfo>,
{
self.zip = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_zip<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<crate::model::ZipInfo>,
{
self.zip = v.map(|x| x.into());
self
}
pub fn set_cloud_build_options<T>(mut self, v: T) -> Self
where
T: std::convert::Into<crate::model::CloudBuildOptions>,
{
self.cloud_build_options = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_cloud_build_options<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<crate::model::CloudBuildOptions>,
{
self.cloud_build_options = v.map(|x| x.into());
self
}
}
impl wkt::message::Message for Deployment {
fn typename() -> &'static str {
"type.googleapis.com/google.appengine.v1.Deployment"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct FileInfo {
pub source_url: std::string::String,
pub sha1_sum: std::string::String,
pub mime_type: std::string::String,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl FileInfo {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_source_url<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.source_url = v.into();
self
}
pub fn set_sha1_sum<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.sha1_sum = v.into();
self
}
pub fn set_mime_type<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.mime_type = v.into();
self
}
}
impl wkt::message::Message for FileInfo {
fn typename() -> &'static str {
"type.googleapis.com/google.appengine.v1.FileInfo"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct ContainerInfo {
pub image: std::string::String,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl ContainerInfo {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_image<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.image = v.into();
self
}
}
impl wkt::message::Message for ContainerInfo {
fn typename() -> &'static str {
"type.googleapis.com/google.appengine.v1.ContainerInfo"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct CloudBuildOptions {
pub app_yaml_path: std::string::String,
pub cloud_build_timeout: std::option::Option<wkt::Duration>,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl CloudBuildOptions {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_app_yaml_path<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.app_yaml_path = v.into();
self
}
pub fn set_cloud_build_timeout<T>(mut self, v: T) -> Self
where
T: std::convert::Into<wkt::Duration>,
{
self.cloud_build_timeout = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_cloud_build_timeout<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<wkt::Duration>,
{
self.cloud_build_timeout = v.map(|x| x.into());
self
}
}
impl wkt::message::Message for CloudBuildOptions {
fn typename() -> &'static str {
"type.googleapis.com/google.appengine.v1.CloudBuildOptions"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct ZipInfo {
pub source_url: std::string::String,
pub files_count: i32,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl ZipInfo {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_source_url<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.source_url = v.into();
self
}
pub fn set_files_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
self.files_count = v.into();
self
}
}
impl wkt::message::Message for ZipInfo {
fn typename() -> &'static str {
"type.googleapis.com/google.appengine.v1.ZipInfo"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct AuthorizedDomain {
pub name: std::string::String,
pub id: std::string::String,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl AuthorizedDomain {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.name = v.into();
self
}
pub fn set_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.id = v.into();
self
}
}
impl wkt::message::Message for AuthorizedDomain {
fn typename() -> &'static str {
"type.googleapis.com/google.appengine.v1.AuthorizedDomain"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct DomainMapping {
pub name: std::string::String,
pub id: std::string::String,
pub ssl_settings: std::option::Option<crate::model::SslSettings>,
pub resource_records: std::vec::Vec<crate::model::ResourceRecord>,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl DomainMapping {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.name = v.into();
self
}
pub fn set_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.id = v.into();
self
}
pub fn set_ssl_settings<T>(mut self, v: T) -> Self
where
T: std::convert::Into<crate::model::SslSettings>,
{
self.ssl_settings = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_ssl_settings<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<crate::model::SslSettings>,
{
self.ssl_settings = v.map(|x| x.into());
self
}
pub fn set_resource_records<T, V>(mut self, v: T) -> Self
where
T: std::iter::IntoIterator<Item = V>,
V: std::convert::Into<crate::model::ResourceRecord>,
{
use std::iter::Iterator;
self.resource_records = v.into_iter().map(|i| i.into()).collect();
self
}
}
impl wkt::message::Message for DomainMapping {
fn typename() -> &'static str {
"type.googleapis.com/google.appengine.v1.DomainMapping"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct SslSettings {
pub certificate_id: std::string::String,
pub ssl_management_type: crate::model::ssl_settings::SslManagementType,
pub pending_managed_certificate_id: std::string::String,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl SslSettings {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_certificate_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.certificate_id = v.into();
self
}
pub fn set_ssl_management_type<
T: std::convert::Into<crate::model::ssl_settings::SslManagementType>,
>(
mut self,
v: T,
) -> Self {
self.ssl_management_type = v.into();
self
}
pub fn set_pending_managed_certificate_id<T: std::convert::Into<std::string::String>>(
mut self,
v: T,
) -> Self {
self.pending_managed_certificate_id = v.into();
self
}
}
impl wkt::message::Message for SslSettings {
fn typename() -> &'static str {
"type.googleapis.com/google.appengine.v1.SslSettings"
}
}
pub mod ssl_settings {
#[allow(unused_imports)]
use super::*;
#[derive(Clone, Debug, PartialEq)]
#[non_exhaustive]
pub enum SslManagementType {
Unspecified,
Automatic,
Manual,
UnknownValue(ssl_management_type::UnknownValue),
}
#[doc(hidden)]
pub mod ssl_management_type {
#[allow(unused_imports)]
use super::*;
#[derive(Clone, Debug, PartialEq)]
pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
}
impl SslManagementType {
pub fn value(&self) -> std::option::Option<i32> {
match self {
Self::Unspecified => std::option::Option::Some(0),
Self::Automatic => std::option::Option::Some(1),
Self::Manual => std::option::Option::Some(2),
Self::UnknownValue(u) => u.0.value(),
}
}
pub fn name(&self) -> std::option::Option<&str> {
match self {
Self::Unspecified => std::option::Option::Some("SSL_MANAGEMENT_TYPE_UNSPECIFIED"),
Self::Automatic => std::option::Option::Some("AUTOMATIC"),
Self::Manual => std::option::Option::Some("MANUAL"),
Self::UnknownValue(u) => u.0.name(),
}
}
}
impl std::default::Default for SslManagementType {
fn default() -> Self {
use std::convert::From;
Self::from(0)
}
}
impl std::fmt::Display for SslManagementType {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
wkt::internal::display_enum(f, self.name(), self.value())
}
}
impl std::convert::From<i32> for SslManagementType {
fn from(value: i32) -> Self {
match value {
0 => Self::Unspecified,
1 => Self::Automatic,
2 => Self::Manual,
_ => Self::UnknownValue(ssl_management_type::UnknownValue(
wkt::internal::UnknownEnumValue::Integer(value),
)),
}
}
}
impl std::convert::From<&str> for SslManagementType {
fn from(value: &str) -> Self {
use std::string::ToString;
match value {
"SSL_MANAGEMENT_TYPE_UNSPECIFIED" => Self::Unspecified,
"AUTOMATIC" => Self::Automatic,
"MANUAL" => Self::Manual,
_ => Self::UnknownValue(ssl_management_type::UnknownValue(
wkt::internal::UnknownEnumValue::String(value.to_string()),
)),
}
}
}
impl serde::ser::Serialize for SslManagementType {
fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
where
S: serde::Serializer,
{
match self {
Self::Unspecified => serializer.serialize_i32(0),
Self::Automatic => serializer.serialize_i32(1),
Self::Manual => serializer.serialize_i32(2),
Self::UnknownValue(u) => u.0.serialize(serializer),
}
}
}
impl<'de> serde::de::Deserialize<'de> for SslManagementType {
fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
where
D: serde::Deserializer<'de>,
{
deserializer.deserialize_any(wkt::internal::EnumVisitor::<SslManagementType>::new(
".google.appengine.v1.SslSettings.SslManagementType",
))
}
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct ResourceRecord {
pub name: std::string::String,
pub rrdata: std::string::String,
pub r#type: crate::model::resource_record::RecordType,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl ResourceRecord {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.name = v.into();
self
}
pub fn set_rrdata<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.rrdata = v.into();
self
}
pub fn set_type<T: std::convert::Into<crate::model::resource_record::RecordType>>(
mut self,
v: T,
) -> Self {
self.r#type = v.into();
self
}
}
impl wkt::message::Message for ResourceRecord {
fn typename() -> &'static str {
"type.googleapis.com/google.appengine.v1.ResourceRecord"
}
}
pub mod resource_record {
#[allow(unused_imports)]
use super::*;
#[derive(Clone, Debug, PartialEq)]
#[non_exhaustive]
pub enum RecordType {
Unspecified,
A,
Aaaa,
Cname,
UnknownValue(record_type::UnknownValue),
}
#[doc(hidden)]
pub mod record_type {
#[allow(unused_imports)]
use super::*;
#[derive(Clone, Debug, PartialEq)]
pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
}
impl RecordType {
pub fn value(&self) -> std::option::Option<i32> {
match self {
Self::Unspecified => std::option::Option::Some(0),
Self::A => std::option::Option::Some(1),
Self::Aaaa => std::option::Option::Some(2),
Self::Cname => std::option::Option::Some(3),
Self::UnknownValue(u) => u.0.value(),
}
}
pub fn name(&self) -> std::option::Option<&str> {
match self {
Self::Unspecified => std::option::Option::Some("RECORD_TYPE_UNSPECIFIED"),
Self::A => std::option::Option::Some("A"),
Self::Aaaa => std::option::Option::Some("AAAA"),
Self::Cname => std::option::Option::Some("CNAME"),
Self::UnknownValue(u) => u.0.name(),
}
}
}
impl std::default::Default for RecordType {
fn default() -> Self {
use std::convert::From;
Self::from(0)
}
}
impl std::fmt::Display for RecordType {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
wkt::internal::display_enum(f, self.name(), self.value())
}
}
impl std::convert::From<i32> for RecordType {
fn from(value: i32) -> Self {
match value {
0 => Self::Unspecified,
1 => Self::A,
2 => Self::Aaaa,
3 => Self::Cname,
_ => Self::UnknownValue(record_type::UnknownValue(
wkt::internal::UnknownEnumValue::Integer(value),
)),
}
}
}
impl std::convert::From<&str> for RecordType {
fn from(value: &str) -> Self {
use std::string::ToString;
match value {
"RECORD_TYPE_UNSPECIFIED" => Self::Unspecified,
"A" => Self::A,
"AAAA" => Self::Aaaa,
"CNAME" => Self::Cname,
_ => Self::UnknownValue(record_type::UnknownValue(
wkt::internal::UnknownEnumValue::String(value.to_string()),
)),
}
}
}
impl serde::ser::Serialize for RecordType {
fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
where
S: serde::Serializer,
{
match self {
Self::Unspecified => serializer.serialize_i32(0),
Self::A => serializer.serialize_i32(1),
Self::Aaaa => serializer.serialize_i32(2),
Self::Cname => serializer.serialize_i32(3),
Self::UnknownValue(u) => u.0.serialize(serializer),
}
}
}
impl<'de> serde::de::Deserialize<'de> for RecordType {
fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
where
D: serde::Deserializer<'de>,
{
deserializer.deserialize_any(wkt::internal::EnumVisitor::<RecordType>::new(
".google.appengine.v1.ResourceRecord.RecordType",
))
}
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct FirewallRule {
pub priority: i32,
pub action: crate::model::firewall_rule::Action,
pub source_range: std::string::String,
pub description: std::string::String,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl FirewallRule {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_priority<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
self.priority = v.into();
self
}
pub fn set_action<T: std::convert::Into<crate::model::firewall_rule::Action>>(
mut self,
v: T,
) -> Self {
self.action = v.into();
self
}
pub fn set_source_range<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.source_range = v.into();
self
}
pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.description = v.into();
self
}
}
impl wkt::message::Message for FirewallRule {
fn typename() -> &'static str {
"type.googleapis.com/google.appengine.v1.FirewallRule"
}
}
pub mod firewall_rule {
#[allow(unused_imports)]
use super::*;
#[derive(Clone, Debug, PartialEq)]
#[non_exhaustive]
pub enum Action {
UnspecifiedAction,
Allow,
Deny,
UnknownValue(action::UnknownValue),
}
#[doc(hidden)]
pub mod action {
#[allow(unused_imports)]
use super::*;
#[derive(Clone, Debug, PartialEq)]
pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
}
impl Action {
pub fn value(&self) -> std::option::Option<i32> {
match self {
Self::UnspecifiedAction => std::option::Option::Some(0),
Self::Allow => std::option::Option::Some(1),
Self::Deny => std::option::Option::Some(2),
Self::UnknownValue(u) => u.0.value(),
}
}
pub fn name(&self) -> std::option::Option<&str> {
match self {
Self::UnspecifiedAction => std::option::Option::Some("UNSPECIFIED_ACTION"),
Self::Allow => std::option::Option::Some("ALLOW"),
Self::Deny => std::option::Option::Some("DENY"),
Self::UnknownValue(u) => u.0.name(),
}
}
}
impl std::default::Default for Action {
fn default() -> Self {
use std::convert::From;
Self::from(0)
}
}
impl std::fmt::Display for Action {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
wkt::internal::display_enum(f, self.name(), self.value())
}
}
impl std::convert::From<i32> for Action {
fn from(value: i32) -> Self {
match value {
0 => Self::UnspecifiedAction,
1 => Self::Allow,
2 => Self::Deny,
_ => Self::UnknownValue(action::UnknownValue(
wkt::internal::UnknownEnumValue::Integer(value),
)),
}
}
}
impl std::convert::From<&str> for Action {
fn from(value: &str) -> Self {
use std::string::ToString;
match value {
"UNSPECIFIED_ACTION" => Self::UnspecifiedAction,
"ALLOW" => Self::Allow,
"DENY" => Self::Deny,
_ => Self::UnknownValue(action::UnknownValue(
wkt::internal::UnknownEnumValue::String(value.to_string()),
)),
}
}
}
impl serde::ser::Serialize for Action {
fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
where
S: serde::Serializer,
{
match self {
Self::UnspecifiedAction => serializer.serialize_i32(0),
Self::Allow => serializer.serialize_i32(1),
Self::Deny => serializer.serialize_i32(2),
Self::UnknownValue(u) => u.0.serialize(serializer),
}
}
}
impl<'de> serde::de::Deserialize<'de> for Action {
fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
where
D: serde::Deserializer<'de>,
{
deserializer.deserialize_any(wkt::internal::EnumVisitor::<Action>::new(
".google.appengine.v1.FirewallRule.Action",
))
}
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct Instance {
pub name: std::string::String,
pub id: std::string::String,
pub app_engine_release: std::string::String,
pub availability: crate::model::instance::Availability,
pub vm_name: std::string::String,
pub vm_zone_name: std::string::String,
pub vm_id: std::string::String,
pub start_time: std::option::Option<wkt::Timestamp>,
pub requests: i32,
pub errors: i32,
pub qps: f32,
pub average_latency: i32,
pub memory_usage: i64,
pub vm_status: std::string::String,
pub vm_debug_enabled: bool,
pub vm_ip: std::string::String,
pub vm_liveness: crate::model::instance::liveness::LivenessState,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl Instance {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.name = v.into();
self
}
pub fn set_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.id = v.into();
self
}
pub fn set_app_engine_release<T: std::convert::Into<std::string::String>>(
mut self,
v: T,
) -> Self {
self.app_engine_release = v.into();
self
}
pub fn set_availability<T: std::convert::Into<crate::model::instance::Availability>>(
mut self,
v: T,
) -> Self {
self.availability = v.into();
self
}
pub fn set_vm_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.vm_name = v.into();
self
}
pub fn set_vm_zone_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.vm_zone_name = v.into();
self
}
pub fn set_vm_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.vm_id = v.into();
self
}
pub fn set_start_time<T>(mut self, v: T) -> Self
where
T: std::convert::Into<wkt::Timestamp>,
{
self.start_time = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_start_time<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<wkt::Timestamp>,
{
self.start_time = v.map(|x| x.into());
self
}
pub fn set_requests<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
self.requests = v.into();
self
}
pub fn set_errors<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
self.errors = v.into();
self
}
pub fn set_qps<T: std::convert::Into<f32>>(mut self, v: T) -> Self {
self.qps = v.into();
self
}
pub fn set_average_latency<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
self.average_latency = v.into();
self
}
pub fn set_memory_usage<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
self.memory_usage = v.into();
self
}
pub fn set_vm_status<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.vm_status = v.into();
self
}
pub fn set_vm_debug_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
self.vm_debug_enabled = v.into();
self
}
pub fn set_vm_ip<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.vm_ip = v.into();
self
}
pub fn set_vm_liveness<
T: std::convert::Into<crate::model::instance::liveness::LivenessState>,
>(
mut self,
v: T,
) -> Self {
self.vm_liveness = v.into();
self
}
}
impl wkt::message::Message for Instance {
fn typename() -> &'static str {
"type.googleapis.com/google.appengine.v1.Instance"
}
}
pub mod instance {
#[allow(unused_imports)]
use super::*;
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct Liveness {
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl Liveness {
pub fn new() -> Self {
std::default::Default::default()
}
}
impl wkt::message::Message for Liveness {
fn typename() -> &'static str {
"type.googleapis.com/google.appengine.v1.Instance.Liveness"
}
}
pub mod liveness {
#[allow(unused_imports)]
use super::*;
#[derive(Clone, Debug, PartialEq)]
#[non_exhaustive]
pub enum LivenessState {
Unspecified,
Unknown,
Healthy,
Unhealthy,
Draining,
Timeout,
UnknownValue(liveness_state::UnknownValue),
}
#[doc(hidden)]
pub mod liveness_state {
#[allow(unused_imports)]
use super::*;
#[derive(Clone, Debug, PartialEq)]
pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
}
impl LivenessState {
pub fn value(&self) -> std::option::Option<i32> {
match self {
Self::Unspecified => std::option::Option::Some(0),
Self::Unknown => std::option::Option::Some(1),
Self::Healthy => std::option::Option::Some(2),
Self::Unhealthy => std::option::Option::Some(3),
Self::Draining => std::option::Option::Some(4),
Self::Timeout => std::option::Option::Some(5),
Self::UnknownValue(u) => u.0.value(),
}
}
pub fn name(&self) -> std::option::Option<&str> {
match self {
Self::Unspecified => std::option::Option::Some("LIVENESS_STATE_UNSPECIFIED"),
Self::Unknown => std::option::Option::Some("UNKNOWN"),
Self::Healthy => std::option::Option::Some("HEALTHY"),
Self::Unhealthy => std::option::Option::Some("UNHEALTHY"),
Self::Draining => std::option::Option::Some("DRAINING"),
Self::Timeout => std::option::Option::Some("TIMEOUT"),
Self::UnknownValue(u) => u.0.name(),
}
}
}
impl std::default::Default for LivenessState {
fn default() -> Self {
use std::convert::From;
Self::from(0)
}
}
impl std::fmt::Display for LivenessState {
fn fmt(
&self,
f: &mut std::fmt::Formatter<'_>,
) -> std::result::Result<(), std::fmt::Error> {
wkt::internal::display_enum(f, self.name(), self.value())
}
}
impl std::convert::From<i32> for LivenessState {
fn from(value: i32) -> Self {
match value {
0 => Self::Unspecified,
1 => Self::Unknown,
2 => Self::Healthy,
3 => Self::Unhealthy,
4 => Self::Draining,
5 => Self::Timeout,
_ => Self::UnknownValue(liveness_state::UnknownValue(
wkt::internal::UnknownEnumValue::Integer(value),
)),
}
}
}
impl std::convert::From<&str> for LivenessState {
fn from(value: &str) -> Self {
use std::string::ToString;
match value {
"LIVENESS_STATE_UNSPECIFIED" => Self::Unspecified,
"UNKNOWN" => Self::Unknown,
"HEALTHY" => Self::Healthy,
"UNHEALTHY" => Self::Unhealthy,
"DRAINING" => Self::Draining,
"TIMEOUT" => Self::Timeout,
_ => Self::UnknownValue(liveness_state::UnknownValue(
wkt::internal::UnknownEnumValue::String(value.to_string()),
)),
}
}
}
impl serde::ser::Serialize for LivenessState {
fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
where
S: serde::Serializer,
{
match self {
Self::Unspecified => serializer.serialize_i32(0),
Self::Unknown => serializer.serialize_i32(1),
Self::Healthy => serializer.serialize_i32(2),
Self::Unhealthy => serializer.serialize_i32(3),
Self::Draining => serializer.serialize_i32(4),
Self::Timeout => serializer.serialize_i32(5),
Self::UnknownValue(u) => u.0.serialize(serializer),
}
}
}
impl<'de> serde::de::Deserialize<'de> for LivenessState {
fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
where
D: serde::Deserializer<'de>,
{
deserializer.deserialize_any(wkt::internal::EnumVisitor::<LivenessState>::new(
".google.appengine.v1.Instance.Liveness.LivenessState",
))
}
}
}
#[derive(Clone, Debug, PartialEq)]
#[non_exhaustive]
pub enum Availability {
Unspecified,
Resident,
Dynamic,
UnknownValue(availability::UnknownValue),
}
#[doc(hidden)]
pub mod availability {
#[allow(unused_imports)]
use super::*;
#[derive(Clone, Debug, PartialEq)]
pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
}
impl Availability {
pub fn value(&self) -> std::option::Option<i32> {
match self {
Self::Unspecified => std::option::Option::Some(0),
Self::Resident => std::option::Option::Some(1),
Self::Dynamic => std::option::Option::Some(2),
Self::UnknownValue(u) => u.0.value(),
}
}
pub fn name(&self) -> std::option::Option<&str> {
match self {
Self::Unspecified => std::option::Option::Some("UNSPECIFIED"),
Self::Resident => std::option::Option::Some("RESIDENT"),
Self::Dynamic => std::option::Option::Some("DYNAMIC"),
Self::UnknownValue(u) => u.0.name(),
}
}
}
impl std::default::Default for Availability {
fn default() -> Self {
use std::convert::From;
Self::from(0)
}
}
impl std::fmt::Display for Availability {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
wkt::internal::display_enum(f, self.name(), self.value())
}
}
impl std::convert::From<i32> for Availability {
fn from(value: i32) -> Self {
match value {
0 => Self::Unspecified,
1 => Self::Resident,
2 => Self::Dynamic,
_ => Self::UnknownValue(availability::UnknownValue(
wkt::internal::UnknownEnumValue::Integer(value),
)),
}
}
}
impl std::convert::From<&str> for Availability {
fn from(value: &str) -> Self {
use std::string::ToString;
match value {
"UNSPECIFIED" => Self::Unspecified,
"RESIDENT" => Self::Resident,
"DYNAMIC" => Self::Dynamic,
_ => Self::UnknownValue(availability::UnknownValue(
wkt::internal::UnknownEnumValue::String(value.to_string()),
)),
}
}
}
impl serde::ser::Serialize for Availability {
fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
where
S: serde::Serializer,
{
match self {
Self::Unspecified => serializer.serialize_i32(0),
Self::Resident => serializer.serialize_i32(1),
Self::Dynamic => serializer.serialize_i32(2),
Self::UnknownValue(u) => u.0.serialize(serializer),
}
}
}
impl<'de> serde::de::Deserialize<'de> for Availability {
fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
where
D: serde::Deserializer<'de>,
{
deserializer.deserialize_any(wkt::internal::EnumVisitor::<Availability>::new(
".google.appengine.v1.Instance.Availability",
))
}
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct LocationMetadata {
pub standard_environment_available: bool,
pub flexible_environment_available: bool,
pub search_api_available: bool,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl LocationMetadata {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_standard_environment_available<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
self.standard_environment_available = v.into();
self
}
pub fn set_flexible_environment_available<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
self.flexible_environment_available = v.into();
self
}
pub fn set_search_api_available<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
self.search_api_available = v.into();
self
}
}
impl wkt::message::Message for LocationMetadata {
fn typename() -> &'static str {
"type.googleapis.com/google.appengine.v1.LocationMetadata"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct NetworkSettings {
pub ingress_traffic_allowed: crate::model::network_settings::IngressTrafficAllowed,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl NetworkSettings {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_ingress_traffic_allowed<
T: std::convert::Into<crate::model::network_settings::IngressTrafficAllowed>,
>(
mut self,
v: T,
) -> Self {
self.ingress_traffic_allowed = v.into();
self
}
}
impl wkt::message::Message for NetworkSettings {
fn typename() -> &'static str {
"type.googleapis.com/google.appengine.v1.NetworkSettings"
}
}
pub mod network_settings {
#[allow(unused_imports)]
use super::*;
#[derive(Clone, Debug, PartialEq)]
#[non_exhaustive]
pub enum IngressTrafficAllowed {
Unspecified,
All,
InternalOnly,
InternalAndLb,
UnknownValue(ingress_traffic_allowed::UnknownValue),
}
#[doc(hidden)]
pub mod ingress_traffic_allowed {
#[allow(unused_imports)]
use super::*;
#[derive(Clone, Debug, PartialEq)]
pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
}
impl IngressTrafficAllowed {
pub fn value(&self) -> std::option::Option<i32> {
match self {
Self::Unspecified => std::option::Option::Some(0),
Self::All => std::option::Option::Some(1),
Self::InternalOnly => std::option::Option::Some(2),
Self::InternalAndLb => std::option::Option::Some(3),
Self::UnknownValue(u) => u.0.value(),
}
}
pub fn name(&self) -> std::option::Option<&str> {
match self {
Self::Unspecified => {
std::option::Option::Some("INGRESS_TRAFFIC_ALLOWED_UNSPECIFIED")
}
Self::All => std::option::Option::Some("INGRESS_TRAFFIC_ALLOWED_ALL"),
Self::InternalOnly => {
std::option::Option::Some("INGRESS_TRAFFIC_ALLOWED_INTERNAL_ONLY")
}
Self::InternalAndLb => {
std::option::Option::Some("INGRESS_TRAFFIC_ALLOWED_INTERNAL_AND_LB")
}
Self::UnknownValue(u) => u.0.name(),
}
}
}
impl std::default::Default for IngressTrafficAllowed {
fn default() -> Self {
use std::convert::From;
Self::from(0)
}
}
impl std::fmt::Display for IngressTrafficAllowed {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
wkt::internal::display_enum(f, self.name(), self.value())
}
}
impl std::convert::From<i32> for IngressTrafficAllowed {
fn from(value: i32) -> Self {
match value {
0 => Self::Unspecified,
1 => Self::All,
2 => Self::InternalOnly,
3 => Self::InternalAndLb,
_ => Self::UnknownValue(ingress_traffic_allowed::UnknownValue(
wkt::internal::UnknownEnumValue::Integer(value),
)),
}
}
}
impl std::convert::From<&str> for IngressTrafficAllowed {
fn from(value: &str) -> Self {
use std::string::ToString;
match value {
"INGRESS_TRAFFIC_ALLOWED_UNSPECIFIED" => Self::Unspecified,
"INGRESS_TRAFFIC_ALLOWED_ALL" => Self::All,
"INGRESS_TRAFFIC_ALLOWED_INTERNAL_ONLY" => Self::InternalOnly,
"INGRESS_TRAFFIC_ALLOWED_INTERNAL_AND_LB" => Self::InternalAndLb,
_ => Self::UnknownValue(ingress_traffic_allowed::UnknownValue(
wkt::internal::UnknownEnumValue::String(value.to_string()),
)),
}
}
}
impl serde::ser::Serialize for IngressTrafficAllowed {
fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
where
S: serde::Serializer,
{
match self {
Self::Unspecified => serializer.serialize_i32(0),
Self::All => serializer.serialize_i32(1),
Self::InternalOnly => serializer.serialize_i32(2),
Self::InternalAndLb => serializer.serialize_i32(3),
Self::UnknownValue(u) => u.0.serialize(serializer),
}
}
}
impl<'de> serde::de::Deserialize<'de> for IngressTrafficAllowed {
fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
where
D: serde::Deserializer<'de>,
{
deserializer.deserialize_any(wkt::internal::EnumVisitor::<IngressTrafficAllowed>::new(
".google.appengine.v1.NetworkSettings.IngressTrafficAllowed",
))
}
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct OperationMetadataV1 {
pub method: std::string::String,
pub insert_time: std::option::Option<wkt::Timestamp>,
pub end_time: std::option::Option<wkt::Timestamp>,
pub user: std::string::String,
pub target: std::string::String,
pub ephemeral_message: std::string::String,
pub warning: std::vec::Vec<std::string::String>,
pub method_metadata: std::option::Option<crate::model::operation_metadata_v_1::MethodMetadata>,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl OperationMetadataV1 {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_method<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.method = v.into();
self
}
pub fn set_insert_time<T>(mut self, v: T) -> Self
where
T: std::convert::Into<wkt::Timestamp>,
{
self.insert_time = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_insert_time<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<wkt::Timestamp>,
{
self.insert_time = v.map(|x| x.into());
self
}
pub fn set_end_time<T>(mut self, v: T) -> Self
where
T: std::convert::Into<wkt::Timestamp>,
{
self.end_time = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_end_time<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<wkt::Timestamp>,
{
self.end_time = v.map(|x| x.into());
self
}
pub fn set_user<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.user = v.into();
self
}
pub fn set_target<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.target = v.into();
self
}
pub fn set_ephemeral_message<T: std::convert::Into<std::string::String>>(
mut self,
v: T,
) -> Self {
self.ephemeral_message = v.into();
self
}
pub fn set_warning<T, V>(mut self, v: T) -> Self
where
T: std::iter::IntoIterator<Item = V>,
V: std::convert::Into<std::string::String>,
{
use std::iter::Iterator;
self.warning = v.into_iter().map(|i| i.into()).collect();
self
}
pub fn set_method_metadata<
T: std::convert::Into<
std::option::Option<crate::model::operation_metadata_v_1::MethodMetadata>,
>,
>(
mut self,
v: T,
) -> Self {
self.method_metadata = v.into();
self
}
pub fn create_version_metadata(
&self,
) -> std::option::Option<&std::boxed::Box<crate::model::CreateVersionMetadataV1>> {
#[allow(unreachable_patterns)]
self.method_metadata.as_ref().and_then(|v| match v {
crate::model::operation_metadata_v_1::MethodMetadata::CreateVersionMetadata(v) => {
std::option::Option::Some(v)
}
_ => std::option::Option::None,
})
}
pub fn set_create_version_metadata<
T: std::convert::Into<std::boxed::Box<crate::model::CreateVersionMetadataV1>>,
>(
mut self,
v: T,
) -> Self {
self.method_metadata = std::option::Option::Some(
crate::model::operation_metadata_v_1::MethodMetadata::CreateVersionMetadata(v.into()),
);
self
}
}
impl wkt::message::Message for OperationMetadataV1 {
fn typename() -> &'static str {
"type.googleapis.com/google.appengine.v1.OperationMetadataV1"
}
}
pub mod operation_metadata_v_1 {
#[allow(unused_imports)]
use super::*;
#[derive(Clone, Debug, PartialEq)]
#[non_exhaustive]
pub enum MethodMetadata {
CreateVersionMetadata(std::boxed::Box<crate::model::CreateVersionMetadataV1>),
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct CreateVersionMetadataV1 {
pub cloud_build_id: std::string::String,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl CreateVersionMetadataV1 {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_cloud_build_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.cloud_build_id = v.into();
self
}
}
impl wkt::message::Message for CreateVersionMetadataV1 {
fn typename() -> &'static str {
"type.googleapis.com/google.appengine.v1.CreateVersionMetadataV1"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct Service {
pub name: std::string::String,
pub id: std::string::String,
pub split: std::option::Option<crate::model::TrafficSplit>,
pub labels: std::collections::HashMap<std::string::String, std::string::String>,
pub network_settings: std::option::Option<crate::model::NetworkSettings>,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl Service {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.name = v.into();
self
}
pub fn set_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.id = v.into();
self
}
pub fn set_split<T>(mut self, v: T) -> Self
where
T: std::convert::Into<crate::model::TrafficSplit>,
{
self.split = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_split<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<crate::model::TrafficSplit>,
{
self.split = v.map(|x| x.into());
self
}
pub fn set_labels<T, K, V>(mut self, v: T) -> Self
where
T: std::iter::IntoIterator<Item = (K, V)>,
K: std::convert::Into<std::string::String>,
V: std::convert::Into<std::string::String>,
{
use std::iter::Iterator;
self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
self
}
pub fn set_network_settings<T>(mut self, v: T) -> Self
where
T: std::convert::Into<crate::model::NetworkSettings>,
{
self.network_settings = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_network_settings<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<crate::model::NetworkSettings>,
{
self.network_settings = v.map(|x| x.into());
self
}
}
impl wkt::message::Message for Service {
fn typename() -> &'static str {
"type.googleapis.com/google.appengine.v1.Service"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct TrafficSplit {
pub shard_by: crate::model::traffic_split::ShardBy,
pub allocations: std::collections::HashMap<std::string::String, f64>,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl TrafficSplit {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_shard_by<T: std::convert::Into<crate::model::traffic_split::ShardBy>>(
mut self,
v: T,
) -> Self {
self.shard_by = v.into();
self
}
pub fn set_allocations<T, K, V>(mut self, v: T) -> Self
where
T: std::iter::IntoIterator<Item = (K, V)>,
K: std::convert::Into<std::string::String>,
V: std::convert::Into<f64>,
{
use std::iter::Iterator;
self.allocations = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
self
}
}
impl wkt::message::Message for TrafficSplit {
fn typename() -> &'static str {
"type.googleapis.com/google.appengine.v1.TrafficSplit"
}
}
pub mod traffic_split {
#[allow(unused_imports)]
use super::*;
#[derive(Clone, Debug, PartialEq)]
#[non_exhaustive]
pub enum ShardBy {
Unspecified,
Cookie,
Ip,
Random,
UnknownValue(shard_by::UnknownValue),
}
#[doc(hidden)]
pub mod shard_by {
#[allow(unused_imports)]
use super::*;
#[derive(Clone, Debug, PartialEq)]
pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
}
impl ShardBy {
pub fn value(&self) -> std::option::Option<i32> {
match self {
Self::Unspecified => std::option::Option::Some(0),
Self::Cookie => std::option::Option::Some(1),
Self::Ip => std::option::Option::Some(2),
Self::Random => std::option::Option::Some(3),
Self::UnknownValue(u) => u.0.value(),
}
}
pub fn name(&self) -> std::option::Option<&str> {
match self {
Self::Unspecified => std::option::Option::Some("UNSPECIFIED"),
Self::Cookie => std::option::Option::Some("COOKIE"),
Self::Ip => std::option::Option::Some("IP"),
Self::Random => std::option::Option::Some("RANDOM"),
Self::UnknownValue(u) => u.0.name(),
}
}
}
impl std::default::Default for ShardBy {
fn default() -> Self {
use std::convert::From;
Self::from(0)
}
}
impl std::fmt::Display for ShardBy {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
wkt::internal::display_enum(f, self.name(), self.value())
}
}
impl std::convert::From<i32> for ShardBy {
fn from(value: i32) -> Self {
match value {
0 => Self::Unspecified,
1 => Self::Cookie,
2 => Self::Ip,
3 => Self::Random,
_ => Self::UnknownValue(shard_by::UnknownValue(
wkt::internal::UnknownEnumValue::Integer(value),
)),
}
}
}
impl std::convert::From<&str> for ShardBy {
fn from(value: &str) -> Self {
use std::string::ToString;
match value {
"UNSPECIFIED" => Self::Unspecified,
"COOKIE" => Self::Cookie,
"IP" => Self::Ip,
"RANDOM" => Self::Random,
_ => Self::UnknownValue(shard_by::UnknownValue(
wkt::internal::UnknownEnumValue::String(value.to_string()),
)),
}
}
}
impl serde::ser::Serialize for ShardBy {
fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
where
S: serde::Serializer,
{
match self {
Self::Unspecified => serializer.serialize_i32(0),
Self::Cookie => serializer.serialize_i32(1),
Self::Ip => serializer.serialize_i32(2),
Self::Random => serializer.serialize_i32(3),
Self::UnknownValue(u) => u.0.serialize(serializer),
}
}
}
impl<'de> serde::de::Deserialize<'de> for ShardBy {
fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
where
D: serde::Deserializer<'de>,
{
deserializer.deserialize_any(wkt::internal::EnumVisitor::<ShardBy>::new(
".google.appengine.v1.TrafficSplit.ShardBy",
))
}
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct Version {
pub name: std::string::String,
pub id: std::string::String,
pub inbound_services: std::vec::Vec<crate::model::InboundServiceType>,
pub instance_class: std::string::String,
pub network: std::option::Option<crate::model::Network>,
pub zones: std::vec::Vec<std::string::String>,
pub resources: std::option::Option<crate::model::Resources>,
pub runtime: std::string::String,
pub runtime_channel: std::string::String,
pub threadsafe: bool,
pub vm: bool,
pub app_engine_apis: bool,
pub beta_settings: std::collections::HashMap<std::string::String, std::string::String>,
pub env: std::string::String,
pub serving_status: crate::model::ServingStatus,
pub created_by: std::string::String,
pub create_time: std::option::Option<wkt::Timestamp>,
pub disk_usage_bytes: i64,
pub runtime_api_version: std::string::String,
pub runtime_main_executable_path: std::string::String,
pub service_account: std::string::String,
pub handlers: std::vec::Vec<crate::model::UrlMap>,
pub error_handlers: std::vec::Vec<crate::model::ErrorHandler>,
pub libraries: std::vec::Vec<crate::model::Library>,
pub api_config: std::option::Option<crate::model::ApiConfigHandler>,
pub env_variables: std::collections::HashMap<std::string::String, std::string::String>,
pub build_env_variables: std::collections::HashMap<std::string::String, std::string::String>,
pub default_expiration: std::option::Option<wkt::Duration>,
pub health_check: std::option::Option<crate::model::HealthCheck>,
pub readiness_check: std::option::Option<crate::model::ReadinessCheck>,
pub liveness_check: std::option::Option<crate::model::LivenessCheck>,
pub nobuild_files_regex: std::string::String,
pub deployment: std::option::Option<crate::model::Deployment>,
pub version_url: std::string::String,
pub endpoints_api_service: std::option::Option<crate::model::EndpointsApiService>,
pub entrypoint: std::option::Option<crate::model::Entrypoint>,
pub vpc_access_connector: std::option::Option<crate::model::VpcAccessConnector>,
pub scaling: std::option::Option<crate::model::version::Scaling>,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl Version {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.name = v.into();
self
}
pub fn set_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.id = v.into();
self
}
pub fn set_inbound_services<T, V>(mut self, v: T) -> Self
where
T: std::iter::IntoIterator<Item = V>,
V: std::convert::Into<crate::model::InboundServiceType>,
{
use std::iter::Iterator;
self.inbound_services = v.into_iter().map(|i| i.into()).collect();
self
}
pub fn set_instance_class<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.instance_class = v.into();
self
}
pub fn set_network<T>(mut self, v: T) -> Self
where
T: std::convert::Into<crate::model::Network>,
{
self.network = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_network<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<crate::model::Network>,
{
self.network = v.map(|x| x.into());
self
}
pub fn set_zones<T, V>(mut self, v: T) -> Self
where
T: std::iter::IntoIterator<Item = V>,
V: std::convert::Into<std::string::String>,
{
use std::iter::Iterator;
self.zones = v.into_iter().map(|i| i.into()).collect();
self
}
pub fn set_resources<T>(mut self, v: T) -> Self
where
T: std::convert::Into<crate::model::Resources>,
{
self.resources = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_resources<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<crate::model::Resources>,
{
self.resources = v.map(|x| x.into());
self
}
pub fn set_runtime<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.runtime = v.into();
self
}
pub fn set_runtime_channel<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.runtime_channel = v.into();
self
}
pub fn set_threadsafe<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
self.threadsafe = v.into();
self
}
pub fn set_vm<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
self.vm = v.into();
self
}
pub fn set_app_engine_apis<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
self.app_engine_apis = v.into();
self
}
pub fn set_beta_settings<T, K, V>(mut self, v: T) -> Self
where
T: std::iter::IntoIterator<Item = (K, V)>,
K: std::convert::Into<std::string::String>,
V: std::convert::Into<std::string::String>,
{
use std::iter::Iterator;
self.beta_settings = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
self
}
pub fn set_env<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.env = v.into();
self
}
pub fn set_serving_status<T: std::convert::Into<crate::model::ServingStatus>>(
mut self,
v: T,
) -> Self {
self.serving_status = v.into();
self
}
pub fn set_created_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.created_by = v.into();
self
}
pub fn set_create_time<T>(mut self, v: T) -> Self
where
T: std::convert::Into<wkt::Timestamp>,
{
self.create_time = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<wkt::Timestamp>,
{
self.create_time = v.map(|x| x.into());
self
}
pub fn set_disk_usage_bytes<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
self.disk_usage_bytes = v.into();
self
}
pub fn set_runtime_api_version<T: std::convert::Into<std::string::String>>(
mut self,
v: T,
) -> Self {
self.runtime_api_version = v.into();
self
}
pub fn set_runtime_main_executable_path<T: std::convert::Into<std::string::String>>(
mut self,
v: T,
) -> Self {
self.runtime_main_executable_path = v.into();
self
}
pub fn set_service_account<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.service_account = v.into();
self
}
pub fn set_handlers<T, V>(mut self, v: T) -> Self
where
T: std::iter::IntoIterator<Item = V>,
V: std::convert::Into<crate::model::UrlMap>,
{
use std::iter::Iterator;
self.handlers = v.into_iter().map(|i| i.into()).collect();
self
}
pub fn set_error_handlers<T, V>(mut self, v: T) -> Self
where
T: std::iter::IntoIterator<Item = V>,
V: std::convert::Into<crate::model::ErrorHandler>,
{
use std::iter::Iterator;
self.error_handlers = v.into_iter().map(|i| i.into()).collect();
self
}
pub fn set_libraries<T, V>(mut self, v: T) -> Self
where
T: std::iter::IntoIterator<Item = V>,
V: std::convert::Into<crate::model::Library>,
{
use std::iter::Iterator;
self.libraries = v.into_iter().map(|i| i.into()).collect();
self
}
pub fn set_api_config<T>(mut self, v: T) -> Self
where
T: std::convert::Into<crate::model::ApiConfigHandler>,
{
self.api_config = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_api_config<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<crate::model::ApiConfigHandler>,
{
self.api_config = v.map(|x| x.into());
self
}
pub fn set_env_variables<T, K, V>(mut self, v: T) -> Self
where
T: std::iter::IntoIterator<Item = (K, V)>,
K: std::convert::Into<std::string::String>,
V: std::convert::Into<std::string::String>,
{
use std::iter::Iterator;
self.env_variables = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
self
}
pub fn set_build_env_variables<T, K, V>(mut self, v: T) -> Self
where
T: std::iter::IntoIterator<Item = (K, V)>,
K: std::convert::Into<std::string::String>,
V: std::convert::Into<std::string::String>,
{
use std::iter::Iterator;
self.build_env_variables = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
self
}
pub fn set_default_expiration<T>(mut self, v: T) -> Self
where
T: std::convert::Into<wkt::Duration>,
{
self.default_expiration = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_default_expiration<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<wkt::Duration>,
{
self.default_expiration = v.map(|x| x.into());
self
}
pub fn set_health_check<T>(mut self, v: T) -> Self
where
T: std::convert::Into<crate::model::HealthCheck>,
{
self.health_check = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_health_check<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<crate::model::HealthCheck>,
{
self.health_check = v.map(|x| x.into());
self
}
pub fn set_readiness_check<T>(mut self, v: T) -> Self
where
T: std::convert::Into<crate::model::ReadinessCheck>,
{
self.readiness_check = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_readiness_check<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<crate::model::ReadinessCheck>,
{
self.readiness_check = v.map(|x| x.into());
self
}
pub fn set_liveness_check<T>(mut self, v: T) -> Self
where
T: std::convert::Into<crate::model::LivenessCheck>,
{
self.liveness_check = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_liveness_check<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<crate::model::LivenessCheck>,
{
self.liveness_check = v.map(|x| x.into());
self
}
pub fn set_nobuild_files_regex<T: std::convert::Into<std::string::String>>(
mut self,
v: T,
) -> Self {
self.nobuild_files_regex = v.into();
self
}
pub fn set_deployment<T>(mut self, v: T) -> Self
where
T: std::convert::Into<crate::model::Deployment>,
{
self.deployment = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_deployment<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<crate::model::Deployment>,
{
self.deployment = v.map(|x| x.into());
self
}
pub fn set_version_url<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.version_url = v.into();
self
}
pub fn set_endpoints_api_service<T>(mut self, v: T) -> Self
where
T: std::convert::Into<crate::model::EndpointsApiService>,
{
self.endpoints_api_service = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_endpoints_api_service<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<crate::model::EndpointsApiService>,
{
self.endpoints_api_service = v.map(|x| x.into());
self
}
pub fn set_entrypoint<T>(mut self, v: T) -> Self
where
T: std::convert::Into<crate::model::Entrypoint>,
{
self.entrypoint = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_entrypoint<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<crate::model::Entrypoint>,
{
self.entrypoint = v.map(|x| x.into());
self
}
pub fn set_vpc_access_connector<T>(mut self, v: T) -> Self
where
T: std::convert::Into<crate::model::VpcAccessConnector>,
{
self.vpc_access_connector = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_vpc_access_connector<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<crate::model::VpcAccessConnector>,
{
self.vpc_access_connector = v.map(|x| x.into());
self
}
pub fn set_scaling<
T: std::convert::Into<std::option::Option<crate::model::version::Scaling>>,
>(
mut self,
v: T,
) -> Self {
self.scaling = v.into();
self
}
pub fn automatic_scaling(
&self,
) -> std::option::Option<&std::boxed::Box<crate::model::AutomaticScaling>> {
#[allow(unreachable_patterns)]
self.scaling.as_ref().and_then(|v| match v {
crate::model::version::Scaling::AutomaticScaling(v) => std::option::Option::Some(v),
_ => std::option::Option::None,
})
}
pub fn set_automatic_scaling<
T: std::convert::Into<std::boxed::Box<crate::model::AutomaticScaling>>,
>(
mut self,
v: T,
) -> Self {
self.scaling =
std::option::Option::Some(crate::model::version::Scaling::AutomaticScaling(v.into()));
self
}
pub fn basic_scaling(
&self,
) -> std::option::Option<&std::boxed::Box<crate::model::BasicScaling>> {
#[allow(unreachable_patterns)]
self.scaling.as_ref().and_then(|v| match v {
crate::model::version::Scaling::BasicScaling(v) => std::option::Option::Some(v),
_ => std::option::Option::None,
})
}
pub fn set_basic_scaling<T: std::convert::Into<std::boxed::Box<crate::model::BasicScaling>>>(
mut self,
v: T,
) -> Self {
self.scaling =
std::option::Option::Some(crate::model::version::Scaling::BasicScaling(v.into()));
self
}
pub fn manual_scaling(
&self,
) -> std::option::Option<&std::boxed::Box<crate::model::ManualScaling>> {
#[allow(unreachable_patterns)]
self.scaling.as_ref().and_then(|v| match v {
crate::model::version::Scaling::ManualScaling(v) => std::option::Option::Some(v),
_ => std::option::Option::None,
})
}
pub fn set_manual_scaling<
T: std::convert::Into<std::boxed::Box<crate::model::ManualScaling>>,
>(
mut self,
v: T,
) -> Self {
self.scaling =
std::option::Option::Some(crate::model::version::Scaling::ManualScaling(v.into()));
self
}
}
impl wkt::message::Message for Version {
fn typename() -> &'static str {
"type.googleapis.com/google.appengine.v1.Version"
}
}
pub mod version {
#[allow(unused_imports)]
use super::*;
#[derive(Clone, Debug, PartialEq)]
#[non_exhaustive]
pub enum Scaling {
AutomaticScaling(std::boxed::Box<crate::model::AutomaticScaling>),
BasicScaling(std::boxed::Box<crate::model::BasicScaling>),
ManualScaling(std::boxed::Box<crate::model::ManualScaling>),
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct EndpointsApiService {
pub name: std::string::String,
pub config_id: std::string::String,
pub rollout_strategy: crate::model::endpoints_api_service::RolloutStrategy,
pub disable_trace_sampling: bool,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl EndpointsApiService {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.name = v.into();
self
}
pub fn set_config_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.config_id = v.into();
self
}
pub fn set_rollout_strategy<
T: std::convert::Into<crate::model::endpoints_api_service::RolloutStrategy>,
>(
mut self,
v: T,
) -> Self {
self.rollout_strategy = v.into();
self
}
pub fn set_disable_trace_sampling<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
self.disable_trace_sampling = v.into();
self
}
}
impl wkt::message::Message for EndpointsApiService {
fn typename() -> &'static str {
"type.googleapis.com/google.appengine.v1.EndpointsApiService"
}
}
pub mod endpoints_api_service {
#[allow(unused_imports)]
use super::*;
#[derive(Clone, Debug, PartialEq)]
#[non_exhaustive]
pub enum RolloutStrategy {
UnspecifiedRolloutStrategy,
Fixed,
Managed,
UnknownValue(rollout_strategy::UnknownValue),
}
#[doc(hidden)]
pub mod rollout_strategy {
#[allow(unused_imports)]
use super::*;
#[derive(Clone, Debug, PartialEq)]
pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
}
impl RolloutStrategy {
pub fn value(&self) -> std::option::Option<i32> {
match self {
Self::UnspecifiedRolloutStrategy => std::option::Option::Some(0),
Self::Fixed => std::option::Option::Some(1),
Self::Managed => std::option::Option::Some(2),
Self::UnknownValue(u) => u.0.value(),
}
}
pub fn name(&self) -> std::option::Option<&str> {
match self {
Self::UnspecifiedRolloutStrategy => {
std::option::Option::Some("UNSPECIFIED_ROLLOUT_STRATEGY")
}
Self::Fixed => std::option::Option::Some("FIXED"),
Self::Managed => std::option::Option::Some("MANAGED"),
Self::UnknownValue(u) => u.0.name(),
}
}
}
impl std::default::Default for RolloutStrategy {
fn default() -> Self {
use std::convert::From;
Self::from(0)
}
}
impl std::fmt::Display for RolloutStrategy {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
wkt::internal::display_enum(f, self.name(), self.value())
}
}
impl std::convert::From<i32> for RolloutStrategy {
fn from(value: i32) -> Self {
match value {
0 => Self::UnspecifiedRolloutStrategy,
1 => Self::Fixed,
2 => Self::Managed,
_ => Self::UnknownValue(rollout_strategy::UnknownValue(
wkt::internal::UnknownEnumValue::Integer(value),
)),
}
}
}
impl std::convert::From<&str> for RolloutStrategy {
fn from(value: &str) -> Self {
use std::string::ToString;
match value {
"UNSPECIFIED_ROLLOUT_STRATEGY" => Self::UnspecifiedRolloutStrategy,
"FIXED" => Self::Fixed,
"MANAGED" => Self::Managed,
_ => Self::UnknownValue(rollout_strategy::UnknownValue(
wkt::internal::UnknownEnumValue::String(value.to_string()),
)),
}
}
}
impl serde::ser::Serialize for RolloutStrategy {
fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
where
S: serde::Serializer,
{
match self {
Self::UnspecifiedRolloutStrategy => serializer.serialize_i32(0),
Self::Fixed => serializer.serialize_i32(1),
Self::Managed => serializer.serialize_i32(2),
Self::UnknownValue(u) => u.0.serialize(serializer),
}
}
}
impl<'de> serde::de::Deserialize<'de> for RolloutStrategy {
fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
where
D: serde::Deserializer<'de>,
{
deserializer.deserialize_any(wkt::internal::EnumVisitor::<RolloutStrategy>::new(
".google.appengine.v1.EndpointsApiService.RolloutStrategy",
))
}
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct AutomaticScaling {
pub cool_down_period: std::option::Option<wkt::Duration>,
pub cpu_utilization: std::option::Option<crate::model::CpuUtilization>,
pub max_concurrent_requests: i32,
pub max_idle_instances: i32,
pub max_total_instances: i32,
pub max_pending_latency: std::option::Option<wkt::Duration>,
pub min_idle_instances: i32,
pub min_total_instances: i32,
pub min_pending_latency: std::option::Option<wkt::Duration>,
pub request_utilization: std::option::Option<crate::model::RequestUtilization>,
pub disk_utilization: std::option::Option<crate::model::DiskUtilization>,
pub network_utilization: std::option::Option<crate::model::NetworkUtilization>,
pub standard_scheduler_settings: std::option::Option<crate::model::StandardSchedulerSettings>,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl AutomaticScaling {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_cool_down_period<T>(mut self, v: T) -> Self
where
T: std::convert::Into<wkt::Duration>,
{
self.cool_down_period = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_cool_down_period<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<wkt::Duration>,
{
self.cool_down_period = v.map(|x| x.into());
self
}
pub fn set_cpu_utilization<T>(mut self, v: T) -> Self
where
T: std::convert::Into<crate::model::CpuUtilization>,
{
self.cpu_utilization = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_cpu_utilization<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<crate::model::CpuUtilization>,
{
self.cpu_utilization = v.map(|x| x.into());
self
}
pub fn set_max_concurrent_requests<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
self.max_concurrent_requests = v.into();
self
}
pub fn set_max_idle_instances<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
self.max_idle_instances = v.into();
self
}
pub fn set_max_total_instances<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
self.max_total_instances = v.into();
self
}
pub fn set_max_pending_latency<T>(mut self, v: T) -> Self
where
T: std::convert::Into<wkt::Duration>,
{
self.max_pending_latency = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_max_pending_latency<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<wkt::Duration>,
{
self.max_pending_latency = v.map(|x| x.into());
self
}
pub fn set_min_idle_instances<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
self.min_idle_instances = v.into();
self
}
pub fn set_min_total_instances<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
self.min_total_instances = v.into();
self
}
pub fn set_min_pending_latency<T>(mut self, v: T) -> Self
where
T: std::convert::Into<wkt::Duration>,
{
self.min_pending_latency = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_min_pending_latency<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<wkt::Duration>,
{
self.min_pending_latency = v.map(|x| x.into());
self
}
pub fn set_request_utilization<T>(mut self, v: T) -> Self
where
T: std::convert::Into<crate::model::RequestUtilization>,
{
self.request_utilization = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_request_utilization<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<crate::model::RequestUtilization>,
{
self.request_utilization = v.map(|x| x.into());
self
}
pub fn set_disk_utilization<T>(mut self, v: T) -> Self
where
T: std::convert::Into<crate::model::DiskUtilization>,
{
self.disk_utilization = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_disk_utilization<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<crate::model::DiskUtilization>,
{
self.disk_utilization = v.map(|x| x.into());
self
}
pub fn set_network_utilization<T>(mut self, v: T) -> Self
where
T: std::convert::Into<crate::model::NetworkUtilization>,
{
self.network_utilization = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_network_utilization<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<crate::model::NetworkUtilization>,
{
self.network_utilization = v.map(|x| x.into());
self
}
pub fn set_standard_scheduler_settings<T>(mut self, v: T) -> Self
where
T: std::convert::Into<crate::model::StandardSchedulerSettings>,
{
self.standard_scheduler_settings = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_standard_scheduler_settings<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<crate::model::StandardSchedulerSettings>,
{
self.standard_scheduler_settings = v.map(|x| x.into());
self
}
}
impl wkt::message::Message for AutomaticScaling {
fn typename() -> &'static str {
"type.googleapis.com/google.appengine.v1.AutomaticScaling"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct BasicScaling {
pub idle_timeout: std::option::Option<wkt::Duration>,
pub max_instances: i32,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl BasicScaling {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_idle_timeout<T>(mut self, v: T) -> Self
where
T: std::convert::Into<wkt::Duration>,
{
self.idle_timeout = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_idle_timeout<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<wkt::Duration>,
{
self.idle_timeout = v.map(|x| x.into());
self
}
pub fn set_max_instances<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
self.max_instances = v.into();
self
}
}
impl wkt::message::Message for BasicScaling {
fn typename() -> &'static str {
"type.googleapis.com/google.appengine.v1.BasicScaling"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct ManualScaling {
pub instances: i32,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl ManualScaling {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_instances<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
self.instances = v.into();
self
}
}
impl wkt::message::Message for ManualScaling {
fn typename() -> &'static str {
"type.googleapis.com/google.appengine.v1.ManualScaling"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct CpuUtilization {
pub aggregation_window_length: std::option::Option<wkt::Duration>,
pub target_utilization: f64,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl CpuUtilization {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_aggregation_window_length<T>(mut self, v: T) -> Self
where
T: std::convert::Into<wkt::Duration>,
{
self.aggregation_window_length = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_aggregation_window_length<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<wkt::Duration>,
{
self.aggregation_window_length = v.map(|x| x.into());
self
}
pub fn set_target_utilization<T: std::convert::Into<f64>>(mut self, v: T) -> Self {
self.target_utilization = v.into();
self
}
}
impl wkt::message::Message for CpuUtilization {
fn typename() -> &'static str {
"type.googleapis.com/google.appengine.v1.CpuUtilization"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct RequestUtilization {
pub target_request_count_per_second: i32,
pub target_concurrent_requests: i32,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl RequestUtilization {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_target_request_count_per_second<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
self.target_request_count_per_second = v.into();
self
}
pub fn set_target_concurrent_requests<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
self.target_concurrent_requests = v.into();
self
}
}
impl wkt::message::Message for RequestUtilization {
fn typename() -> &'static str {
"type.googleapis.com/google.appengine.v1.RequestUtilization"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct DiskUtilization {
pub target_write_bytes_per_second: i32,
pub target_write_ops_per_second: i32,
pub target_read_bytes_per_second: i32,
pub target_read_ops_per_second: i32,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl DiskUtilization {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_target_write_bytes_per_second<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
self.target_write_bytes_per_second = v.into();
self
}
pub fn set_target_write_ops_per_second<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
self.target_write_ops_per_second = v.into();
self
}
pub fn set_target_read_bytes_per_second<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
self.target_read_bytes_per_second = v.into();
self
}
pub fn set_target_read_ops_per_second<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
self.target_read_ops_per_second = v.into();
self
}
}
impl wkt::message::Message for DiskUtilization {
fn typename() -> &'static str {
"type.googleapis.com/google.appengine.v1.DiskUtilization"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct NetworkUtilization {
pub target_sent_bytes_per_second: i32,
pub target_sent_packets_per_second: i32,
pub target_received_bytes_per_second: i32,
pub target_received_packets_per_second: i32,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl NetworkUtilization {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_target_sent_bytes_per_second<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
self.target_sent_bytes_per_second = v.into();
self
}
pub fn set_target_sent_packets_per_second<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
self.target_sent_packets_per_second = v.into();
self
}
pub fn set_target_received_bytes_per_second<T: std::convert::Into<i32>>(
mut self,
v: T,
) -> Self {
self.target_received_bytes_per_second = v.into();
self
}
pub fn set_target_received_packets_per_second<T: std::convert::Into<i32>>(
mut self,
v: T,
) -> Self {
self.target_received_packets_per_second = v.into();
self
}
}
impl wkt::message::Message for NetworkUtilization {
fn typename() -> &'static str {
"type.googleapis.com/google.appengine.v1.NetworkUtilization"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct StandardSchedulerSettings {
pub target_cpu_utilization: f64,
pub target_throughput_utilization: f64,
pub min_instances: i32,
pub max_instances: i32,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl StandardSchedulerSettings {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_target_cpu_utilization<T: std::convert::Into<f64>>(mut self, v: T) -> Self {
self.target_cpu_utilization = v.into();
self
}
pub fn set_target_throughput_utilization<T: std::convert::Into<f64>>(mut self, v: T) -> Self {
self.target_throughput_utilization = v.into();
self
}
pub fn set_min_instances<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
self.min_instances = v.into();
self
}
pub fn set_max_instances<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
self.max_instances = v.into();
self
}
}
impl wkt::message::Message for StandardSchedulerSettings {
fn typename() -> &'static str {
"type.googleapis.com/google.appengine.v1.StandardSchedulerSettings"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct Network {
pub forwarded_ports: std::vec::Vec<std::string::String>,
pub instance_tag: std::string::String,
pub name: std::string::String,
pub subnetwork_name: std::string::String,
pub session_affinity: bool,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl Network {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_forwarded_ports<T, V>(mut self, v: T) -> Self
where
T: std::iter::IntoIterator<Item = V>,
V: std::convert::Into<std::string::String>,
{
use std::iter::Iterator;
self.forwarded_ports = v.into_iter().map(|i| i.into()).collect();
self
}
pub fn set_instance_tag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.instance_tag = v.into();
self
}
pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.name = v.into();
self
}
pub fn set_subnetwork_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.subnetwork_name = v.into();
self
}
pub fn set_session_affinity<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
self.session_affinity = v.into();
self
}
}
impl wkt::message::Message for Network {
fn typename() -> &'static str {
"type.googleapis.com/google.appengine.v1.Network"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct Volume {
pub name: std::string::String,
pub volume_type: std::string::String,
pub size_gb: f64,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl Volume {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.name = v.into();
self
}
pub fn set_volume_type<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.volume_type = v.into();
self
}
pub fn set_size_gb<T: std::convert::Into<f64>>(mut self, v: T) -> Self {
self.size_gb = v.into();
self
}
}
impl wkt::message::Message for Volume {
fn typename() -> &'static str {
"type.googleapis.com/google.appengine.v1.Volume"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct Resources {
pub cpu: f64,
pub disk_gb: f64,
pub memory_gb: f64,
pub volumes: std::vec::Vec<crate::model::Volume>,
pub kms_key_reference: std::string::String,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl Resources {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_cpu<T: std::convert::Into<f64>>(mut self, v: T) -> Self {
self.cpu = v.into();
self
}
pub fn set_disk_gb<T: std::convert::Into<f64>>(mut self, v: T) -> Self {
self.disk_gb = v.into();
self
}
pub fn set_memory_gb<T: std::convert::Into<f64>>(mut self, v: T) -> Self {
self.memory_gb = v.into();
self
}
pub fn set_volumes<T, V>(mut self, v: T) -> Self
where
T: std::iter::IntoIterator<Item = V>,
V: std::convert::Into<crate::model::Volume>,
{
use std::iter::Iterator;
self.volumes = v.into_iter().map(|i| i.into()).collect();
self
}
pub fn set_kms_key_reference<T: std::convert::Into<std::string::String>>(
mut self,
v: T,
) -> Self {
self.kms_key_reference = v.into();
self
}
}
impl wkt::message::Message for Resources {
fn typename() -> &'static str {
"type.googleapis.com/google.appengine.v1.Resources"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct VpcAccessConnector {
pub name: std::string::String,
pub egress_setting: crate::model::vpc_access_connector::EgressSetting,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl VpcAccessConnector {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.name = v.into();
self
}
pub fn set_egress_setting<
T: std::convert::Into<crate::model::vpc_access_connector::EgressSetting>,
>(
mut self,
v: T,
) -> Self {
self.egress_setting = v.into();
self
}
}
impl wkt::message::Message for VpcAccessConnector {
fn typename() -> &'static str {
"type.googleapis.com/google.appengine.v1.VpcAccessConnector"
}
}
pub mod vpc_access_connector {
#[allow(unused_imports)]
use super::*;
#[derive(Clone, Debug, PartialEq)]
#[non_exhaustive]
pub enum EgressSetting {
Unspecified,
AllTraffic,
PrivateIpRanges,
UnknownValue(egress_setting::UnknownValue),
}
#[doc(hidden)]
pub mod egress_setting {
#[allow(unused_imports)]
use super::*;
#[derive(Clone, Debug, PartialEq)]
pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
}
impl EgressSetting {
pub fn value(&self) -> std::option::Option<i32> {
match self {
Self::Unspecified => std::option::Option::Some(0),
Self::AllTraffic => std::option::Option::Some(1),
Self::PrivateIpRanges => std::option::Option::Some(2),
Self::UnknownValue(u) => u.0.value(),
}
}
pub fn name(&self) -> std::option::Option<&str> {
match self {
Self::Unspecified => std::option::Option::Some("EGRESS_SETTING_UNSPECIFIED"),
Self::AllTraffic => std::option::Option::Some("ALL_TRAFFIC"),
Self::PrivateIpRanges => std::option::Option::Some("PRIVATE_IP_RANGES"),
Self::UnknownValue(u) => u.0.name(),
}
}
}
impl std::default::Default for EgressSetting {
fn default() -> Self {
use std::convert::From;
Self::from(0)
}
}
impl std::fmt::Display for EgressSetting {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
wkt::internal::display_enum(f, self.name(), self.value())
}
}
impl std::convert::From<i32> for EgressSetting {
fn from(value: i32) -> Self {
match value {
0 => Self::Unspecified,
1 => Self::AllTraffic,
2 => Self::PrivateIpRanges,
_ => Self::UnknownValue(egress_setting::UnknownValue(
wkt::internal::UnknownEnumValue::Integer(value),
)),
}
}
}
impl std::convert::From<&str> for EgressSetting {
fn from(value: &str) -> Self {
use std::string::ToString;
match value {
"EGRESS_SETTING_UNSPECIFIED" => Self::Unspecified,
"ALL_TRAFFIC" => Self::AllTraffic,
"PRIVATE_IP_RANGES" => Self::PrivateIpRanges,
_ => Self::UnknownValue(egress_setting::UnknownValue(
wkt::internal::UnknownEnumValue::String(value.to_string()),
)),
}
}
}
impl serde::ser::Serialize for EgressSetting {
fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
where
S: serde::Serializer,
{
match self {
Self::Unspecified => serializer.serialize_i32(0),
Self::AllTraffic => serializer.serialize_i32(1),
Self::PrivateIpRanges => serializer.serialize_i32(2),
Self::UnknownValue(u) => u.0.serialize(serializer),
}
}
}
impl<'de> serde::de::Deserialize<'de> for EgressSetting {
fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
where
D: serde::Deserializer<'de>,
{
deserializer.deserialize_any(wkt::internal::EnumVisitor::<EgressSetting>::new(
".google.appengine.v1.VpcAccessConnector.EgressSetting",
))
}
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct Entrypoint {
pub command: std::option::Option<crate::model::entrypoint::Command>,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl Entrypoint {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_command<
T: std::convert::Into<std::option::Option<crate::model::entrypoint::Command>>,
>(
mut self,
v: T,
) -> Self {
self.command = v.into();
self
}
pub fn shell(&self) -> std::option::Option<&std::string::String> {
#[allow(unreachable_patterns)]
self.command.as_ref().and_then(|v| match v {
crate::model::entrypoint::Command::Shell(v) => std::option::Option::Some(v),
_ => std::option::Option::None,
})
}
pub fn set_shell<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.command =
std::option::Option::Some(crate::model::entrypoint::Command::Shell(v.into()));
self
}
}
impl wkt::message::Message for Entrypoint {
fn typename() -> &'static str {
"type.googleapis.com/google.appengine.v1.Entrypoint"
}
}
pub mod entrypoint {
#[allow(unused_imports)]
use super::*;
#[derive(Clone, Debug, PartialEq)]
#[non_exhaustive]
pub enum Command {
Shell(std::string::String),
}
}
#[derive(Clone, Debug, PartialEq)]
#[non_exhaustive]
pub enum AuthFailAction {
Unspecified,
Redirect,
Unauthorized,
UnknownValue(auth_fail_action::UnknownValue),
}
#[doc(hidden)]
pub mod auth_fail_action {
#[allow(unused_imports)]
use super::*;
#[derive(Clone, Debug, PartialEq)]
pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
}
impl AuthFailAction {
pub fn value(&self) -> std::option::Option<i32> {
match self {
Self::Unspecified => std::option::Option::Some(0),
Self::Redirect => std::option::Option::Some(1),
Self::Unauthorized => std::option::Option::Some(2),
Self::UnknownValue(u) => u.0.value(),
}
}
pub fn name(&self) -> std::option::Option<&str> {
match self {
Self::Unspecified => std::option::Option::Some("AUTH_FAIL_ACTION_UNSPECIFIED"),
Self::Redirect => std::option::Option::Some("AUTH_FAIL_ACTION_REDIRECT"),
Self::Unauthorized => std::option::Option::Some("AUTH_FAIL_ACTION_UNAUTHORIZED"),
Self::UnknownValue(u) => u.0.name(),
}
}
}
impl std::default::Default for AuthFailAction {
fn default() -> Self {
use std::convert::From;
Self::from(0)
}
}
impl std::fmt::Display for AuthFailAction {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
wkt::internal::display_enum(f, self.name(), self.value())
}
}
impl std::convert::From<i32> for AuthFailAction {
fn from(value: i32) -> Self {
match value {
0 => Self::Unspecified,
1 => Self::Redirect,
2 => Self::Unauthorized,
_ => Self::UnknownValue(auth_fail_action::UnknownValue(
wkt::internal::UnknownEnumValue::Integer(value),
)),
}
}
}
impl std::convert::From<&str> for AuthFailAction {
fn from(value: &str) -> Self {
use std::string::ToString;
match value {
"AUTH_FAIL_ACTION_UNSPECIFIED" => Self::Unspecified,
"AUTH_FAIL_ACTION_REDIRECT" => Self::Redirect,
"AUTH_FAIL_ACTION_UNAUTHORIZED" => Self::Unauthorized,
_ => Self::UnknownValue(auth_fail_action::UnknownValue(
wkt::internal::UnknownEnumValue::String(value.to_string()),
)),
}
}
}
impl serde::ser::Serialize for AuthFailAction {
fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
where
S: serde::Serializer,
{
match self {
Self::Unspecified => serializer.serialize_i32(0),
Self::Redirect => serializer.serialize_i32(1),
Self::Unauthorized => serializer.serialize_i32(2),
Self::UnknownValue(u) => u.0.serialize(serializer),
}
}
}
impl<'de> serde::de::Deserialize<'de> for AuthFailAction {
fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
where
D: serde::Deserializer<'de>,
{
deserializer.deserialize_any(wkt::internal::EnumVisitor::<AuthFailAction>::new(
".google.appengine.v1.AuthFailAction",
))
}
}
#[derive(Clone, Debug, PartialEq)]
#[non_exhaustive]
pub enum LoginRequirement {
LoginUnspecified,
LoginOptional,
LoginAdmin,
LoginRequired,
UnknownValue(login_requirement::UnknownValue),
}
#[doc(hidden)]
pub mod login_requirement {
#[allow(unused_imports)]
use super::*;
#[derive(Clone, Debug, PartialEq)]
pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
}
impl LoginRequirement {
pub fn value(&self) -> std::option::Option<i32> {
match self {
Self::LoginUnspecified => std::option::Option::Some(0),
Self::LoginOptional => std::option::Option::Some(1),
Self::LoginAdmin => std::option::Option::Some(2),
Self::LoginRequired => std::option::Option::Some(3),
Self::UnknownValue(u) => u.0.value(),
}
}
pub fn name(&self) -> std::option::Option<&str> {
match self {
Self::LoginUnspecified => std::option::Option::Some("LOGIN_UNSPECIFIED"),
Self::LoginOptional => std::option::Option::Some("LOGIN_OPTIONAL"),
Self::LoginAdmin => std::option::Option::Some("LOGIN_ADMIN"),
Self::LoginRequired => std::option::Option::Some("LOGIN_REQUIRED"),
Self::UnknownValue(u) => u.0.name(),
}
}
}
impl std::default::Default for LoginRequirement {
fn default() -> Self {
use std::convert::From;
Self::from(0)
}
}
impl std::fmt::Display for LoginRequirement {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
wkt::internal::display_enum(f, self.name(), self.value())
}
}
impl std::convert::From<i32> for LoginRequirement {
fn from(value: i32) -> Self {
match value {
0 => Self::LoginUnspecified,
1 => Self::LoginOptional,
2 => Self::LoginAdmin,
3 => Self::LoginRequired,
_ => Self::UnknownValue(login_requirement::UnknownValue(
wkt::internal::UnknownEnumValue::Integer(value),
)),
}
}
}
impl std::convert::From<&str> for LoginRequirement {
fn from(value: &str) -> Self {
use std::string::ToString;
match value {
"LOGIN_UNSPECIFIED" => Self::LoginUnspecified,
"LOGIN_OPTIONAL" => Self::LoginOptional,
"LOGIN_ADMIN" => Self::LoginAdmin,
"LOGIN_REQUIRED" => Self::LoginRequired,
_ => Self::UnknownValue(login_requirement::UnknownValue(
wkt::internal::UnknownEnumValue::String(value.to_string()),
)),
}
}
}
impl serde::ser::Serialize for LoginRequirement {
fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
where
S: serde::Serializer,
{
match self {
Self::LoginUnspecified => serializer.serialize_i32(0),
Self::LoginOptional => serializer.serialize_i32(1),
Self::LoginAdmin => serializer.serialize_i32(2),
Self::LoginRequired => serializer.serialize_i32(3),
Self::UnknownValue(u) => u.0.serialize(serializer),
}
}
}
impl<'de> serde::de::Deserialize<'de> for LoginRequirement {
fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
where
D: serde::Deserializer<'de>,
{
deserializer.deserialize_any(wkt::internal::EnumVisitor::<LoginRequirement>::new(
".google.appengine.v1.LoginRequirement",
))
}
}
#[derive(Clone, Debug, PartialEq)]
#[non_exhaustive]
pub enum SecurityLevel {
SecureUnspecified,
SecureDefault,
SecureNever,
SecureOptional,
SecureAlways,
UnknownValue(security_level::UnknownValue),
}
#[doc(hidden)]
pub mod security_level {
#[allow(unused_imports)]
use super::*;
#[derive(Clone, Debug, PartialEq)]
pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
}
impl SecurityLevel {
pub fn value(&self) -> std::option::Option<i32> {
match self {
Self::SecureUnspecified => std::option::Option::Some(0),
Self::SecureDefault => std::option::Option::Some(0),
Self::SecureNever => std::option::Option::Some(1),
Self::SecureOptional => std::option::Option::Some(2),
Self::SecureAlways => std::option::Option::Some(3),
Self::UnknownValue(u) => u.0.value(),
}
}
pub fn name(&self) -> std::option::Option<&str> {
match self {
Self::SecureUnspecified => std::option::Option::Some("SECURE_UNSPECIFIED"),
Self::SecureDefault => std::option::Option::Some("SECURE_DEFAULT"),
Self::SecureNever => std::option::Option::Some("SECURE_NEVER"),
Self::SecureOptional => std::option::Option::Some("SECURE_OPTIONAL"),
Self::SecureAlways => std::option::Option::Some("SECURE_ALWAYS"),
Self::UnknownValue(u) => u.0.name(),
}
}
}
impl std::default::Default for SecurityLevel {
fn default() -> Self {
use std::convert::From;
Self::from(0)
}
}
impl std::fmt::Display for SecurityLevel {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
wkt::internal::display_enum(f, self.name(), self.value())
}
}
impl std::convert::From<i32> for SecurityLevel {
fn from(value: i32) -> Self {
match value {
0 => Self::SecureDefault,
1 => Self::SecureNever,
2 => Self::SecureOptional,
3 => Self::SecureAlways,
_ => Self::UnknownValue(security_level::UnknownValue(
wkt::internal::UnknownEnumValue::Integer(value),
)),
}
}
}
impl std::convert::From<&str> for SecurityLevel {
fn from(value: &str) -> Self {
use std::string::ToString;
match value {
"SECURE_UNSPECIFIED" => Self::SecureUnspecified,
"SECURE_DEFAULT" => Self::SecureDefault,
"SECURE_NEVER" => Self::SecureNever,
"SECURE_OPTIONAL" => Self::SecureOptional,
"SECURE_ALWAYS" => Self::SecureAlways,
_ => Self::UnknownValue(security_level::UnknownValue(
wkt::internal::UnknownEnumValue::String(value.to_string()),
)),
}
}
}
impl serde::ser::Serialize for SecurityLevel {
fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
where
S: serde::Serializer,
{
match self {
Self::SecureUnspecified => serializer.serialize_i32(0),
Self::SecureDefault => serializer.serialize_i32(0),
Self::SecureNever => serializer.serialize_i32(1),
Self::SecureOptional => serializer.serialize_i32(2),
Self::SecureAlways => serializer.serialize_i32(3),
Self::UnknownValue(u) => u.0.serialize(serializer),
}
}
}
impl<'de> serde::de::Deserialize<'de> for SecurityLevel {
fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
where
D: serde::Deserializer<'de>,
{
deserializer.deserialize_any(wkt::internal::EnumVisitor::<SecurityLevel>::new(
".google.appengine.v1.SecurityLevel",
))
}
}
#[derive(Clone, Debug, PartialEq)]
#[non_exhaustive]
pub enum VersionView {
Basic,
Full,
UnknownValue(version_view::UnknownValue),
}
#[doc(hidden)]
pub mod version_view {
#[allow(unused_imports)]
use super::*;
#[derive(Clone, Debug, PartialEq)]
pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
}
impl VersionView {
pub fn value(&self) -> std::option::Option<i32> {
match self {
Self::Basic => std::option::Option::Some(0),
Self::Full => std::option::Option::Some(1),
Self::UnknownValue(u) => u.0.value(),
}
}
pub fn name(&self) -> std::option::Option<&str> {
match self {
Self::Basic => std::option::Option::Some("BASIC"),
Self::Full => std::option::Option::Some("FULL"),
Self::UnknownValue(u) => u.0.name(),
}
}
}
impl std::default::Default for VersionView {
fn default() -> Self {
use std::convert::From;
Self::from(0)
}
}
impl std::fmt::Display for VersionView {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
wkt::internal::display_enum(f, self.name(), self.value())
}
}
impl std::convert::From<i32> for VersionView {
fn from(value: i32) -> Self {
match value {
0 => Self::Basic,
1 => Self::Full,
_ => Self::UnknownValue(version_view::UnknownValue(
wkt::internal::UnknownEnumValue::Integer(value),
)),
}
}
}
impl std::convert::From<&str> for VersionView {
fn from(value: &str) -> Self {
use std::string::ToString;
match value {
"BASIC" => Self::Basic,
"FULL" => Self::Full,
_ => Self::UnknownValue(version_view::UnknownValue(
wkt::internal::UnknownEnumValue::String(value.to_string()),
)),
}
}
}
impl serde::ser::Serialize for VersionView {
fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
where
S: serde::Serializer,
{
match self {
Self::Basic => serializer.serialize_i32(0),
Self::Full => serializer.serialize_i32(1),
Self::UnknownValue(u) => u.0.serialize(serializer),
}
}
}
impl<'de> serde::de::Deserialize<'de> for VersionView {
fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
where
D: serde::Deserializer<'de>,
{
deserializer.deserialize_any(wkt::internal::EnumVisitor::<VersionView>::new(
".google.appengine.v1.VersionView",
))
}
}
#[derive(Clone, Debug, PartialEq)]
#[non_exhaustive]
pub enum AuthorizedCertificateView {
BasicCertificate,
FullCertificate,
UnknownValue(authorized_certificate_view::UnknownValue),
}
#[doc(hidden)]
pub mod authorized_certificate_view {
#[allow(unused_imports)]
use super::*;
#[derive(Clone, Debug, PartialEq)]
pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
}
impl AuthorizedCertificateView {
pub fn value(&self) -> std::option::Option<i32> {
match self {
Self::BasicCertificate => std::option::Option::Some(0),
Self::FullCertificate => std::option::Option::Some(1),
Self::UnknownValue(u) => u.0.value(),
}
}
pub fn name(&self) -> std::option::Option<&str> {
match self {
Self::BasicCertificate => std::option::Option::Some("BASIC_CERTIFICATE"),
Self::FullCertificate => std::option::Option::Some("FULL_CERTIFICATE"),
Self::UnknownValue(u) => u.0.name(),
}
}
}
impl std::default::Default for AuthorizedCertificateView {
fn default() -> Self {
use std::convert::From;
Self::from(0)
}
}
impl std::fmt::Display for AuthorizedCertificateView {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
wkt::internal::display_enum(f, self.name(), self.value())
}
}
impl std::convert::From<i32> for AuthorizedCertificateView {
fn from(value: i32) -> Self {
match value {
0 => Self::BasicCertificate,
1 => Self::FullCertificate,
_ => Self::UnknownValue(authorized_certificate_view::UnknownValue(
wkt::internal::UnknownEnumValue::Integer(value),
)),
}
}
}
impl std::convert::From<&str> for AuthorizedCertificateView {
fn from(value: &str) -> Self {
use std::string::ToString;
match value {
"BASIC_CERTIFICATE" => Self::BasicCertificate,
"FULL_CERTIFICATE" => Self::FullCertificate,
_ => Self::UnknownValue(authorized_certificate_view::UnknownValue(
wkt::internal::UnknownEnumValue::String(value.to_string()),
)),
}
}
}
impl serde::ser::Serialize for AuthorizedCertificateView {
fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
where
S: serde::Serializer,
{
match self {
Self::BasicCertificate => serializer.serialize_i32(0),
Self::FullCertificate => serializer.serialize_i32(1),
Self::UnknownValue(u) => u.0.serialize(serializer),
}
}
}
impl<'de> serde::de::Deserialize<'de> for AuthorizedCertificateView {
fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
where
D: serde::Deserializer<'de>,
{
deserializer.deserialize_any(
wkt::internal::EnumVisitor::<AuthorizedCertificateView>::new(
".google.appengine.v1.AuthorizedCertificateView",
),
)
}
}
#[derive(Clone, Debug, PartialEq)]
#[non_exhaustive]
pub enum DomainOverrideStrategy {
UnspecifiedDomainOverrideStrategy,
Strict,
Override,
UnknownValue(domain_override_strategy::UnknownValue),
}
#[doc(hidden)]
pub mod domain_override_strategy {
#[allow(unused_imports)]
use super::*;
#[derive(Clone, Debug, PartialEq)]
pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
}
impl DomainOverrideStrategy {
pub fn value(&self) -> std::option::Option<i32> {
match self {
Self::UnspecifiedDomainOverrideStrategy => std::option::Option::Some(0),
Self::Strict => std::option::Option::Some(1),
Self::Override => std::option::Option::Some(2),
Self::UnknownValue(u) => u.0.value(),
}
}
pub fn name(&self) -> std::option::Option<&str> {
match self {
Self::UnspecifiedDomainOverrideStrategy => {
std::option::Option::Some("UNSPECIFIED_DOMAIN_OVERRIDE_STRATEGY")
}
Self::Strict => std::option::Option::Some("STRICT"),
Self::Override => std::option::Option::Some("OVERRIDE"),
Self::UnknownValue(u) => u.0.name(),
}
}
}
impl std::default::Default for DomainOverrideStrategy {
fn default() -> Self {
use std::convert::From;
Self::from(0)
}
}
impl std::fmt::Display for DomainOverrideStrategy {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
wkt::internal::display_enum(f, self.name(), self.value())
}
}
impl std::convert::From<i32> for DomainOverrideStrategy {
fn from(value: i32) -> Self {
match value {
0 => Self::UnspecifiedDomainOverrideStrategy,
1 => Self::Strict,
2 => Self::Override,
_ => Self::UnknownValue(domain_override_strategy::UnknownValue(
wkt::internal::UnknownEnumValue::Integer(value),
)),
}
}
}
impl std::convert::From<&str> for DomainOverrideStrategy {
fn from(value: &str) -> Self {
use std::string::ToString;
match value {
"UNSPECIFIED_DOMAIN_OVERRIDE_STRATEGY" => Self::UnspecifiedDomainOverrideStrategy,
"STRICT" => Self::Strict,
"OVERRIDE" => Self::Override,
_ => Self::UnknownValue(domain_override_strategy::UnknownValue(
wkt::internal::UnknownEnumValue::String(value.to_string()),
)),
}
}
}
impl serde::ser::Serialize for DomainOverrideStrategy {
fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
where
S: serde::Serializer,
{
match self {
Self::UnspecifiedDomainOverrideStrategy => serializer.serialize_i32(0),
Self::Strict => serializer.serialize_i32(1),
Self::Override => serializer.serialize_i32(2),
Self::UnknownValue(u) => u.0.serialize(serializer),
}
}
}
impl<'de> serde::de::Deserialize<'de> for DomainOverrideStrategy {
fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
where
D: serde::Deserializer<'de>,
{
deserializer.deserialize_any(wkt::internal::EnumVisitor::<DomainOverrideStrategy>::new(
".google.appengine.v1.DomainOverrideStrategy",
))
}
}
#[derive(Clone, Debug, PartialEq)]
#[non_exhaustive]
pub enum ManagementStatus {
Unspecified,
Ok,
Pending,
FailedRetryingNotVisible,
FailedPermanent,
FailedRetryingCaaForbidden,
FailedRetryingCaaChecking,
UnknownValue(management_status::UnknownValue),
}
#[doc(hidden)]
pub mod management_status {
#[allow(unused_imports)]
use super::*;
#[derive(Clone, Debug, PartialEq)]
pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
}
impl ManagementStatus {
pub fn value(&self) -> std::option::Option<i32> {
match self {
Self::Unspecified => std::option::Option::Some(0),
Self::Ok => std::option::Option::Some(1),
Self::Pending => std::option::Option::Some(2),
Self::FailedRetryingNotVisible => std::option::Option::Some(4),
Self::FailedPermanent => std::option::Option::Some(6),
Self::FailedRetryingCaaForbidden => std::option::Option::Some(7),
Self::FailedRetryingCaaChecking => std::option::Option::Some(8),
Self::UnknownValue(u) => u.0.value(),
}
}
pub fn name(&self) -> std::option::Option<&str> {
match self {
Self::Unspecified => std::option::Option::Some("MANAGEMENT_STATUS_UNSPECIFIED"),
Self::Ok => std::option::Option::Some("OK"),
Self::Pending => std::option::Option::Some("PENDING"),
Self::FailedRetryingNotVisible => {
std::option::Option::Some("FAILED_RETRYING_NOT_VISIBLE")
}
Self::FailedPermanent => std::option::Option::Some("FAILED_PERMANENT"),
Self::FailedRetryingCaaForbidden => {
std::option::Option::Some("FAILED_RETRYING_CAA_FORBIDDEN")
}
Self::FailedRetryingCaaChecking => {
std::option::Option::Some("FAILED_RETRYING_CAA_CHECKING")
}
Self::UnknownValue(u) => u.0.name(),
}
}
}
impl std::default::Default for ManagementStatus {
fn default() -> Self {
use std::convert::From;
Self::from(0)
}
}
impl std::fmt::Display for ManagementStatus {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
wkt::internal::display_enum(f, self.name(), self.value())
}
}
impl std::convert::From<i32> for ManagementStatus {
fn from(value: i32) -> Self {
match value {
0 => Self::Unspecified,
1 => Self::Ok,
2 => Self::Pending,
4 => Self::FailedRetryingNotVisible,
6 => Self::FailedPermanent,
7 => Self::FailedRetryingCaaForbidden,
8 => Self::FailedRetryingCaaChecking,
_ => Self::UnknownValue(management_status::UnknownValue(
wkt::internal::UnknownEnumValue::Integer(value),
)),
}
}
}
impl std::convert::From<&str> for ManagementStatus {
fn from(value: &str) -> Self {
use std::string::ToString;
match value {
"MANAGEMENT_STATUS_UNSPECIFIED" => Self::Unspecified,
"OK" => Self::Ok,
"PENDING" => Self::Pending,
"FAILED_RETRYING_NOT_VISIBLE" => Self::FailedRetryingNotVisible,
"FAILED_PERMANENT" => Self::FailedPermanent,
"FAILED_RETRYING_CAA_FORBIDDEN" => Self::FailedRetryingCaaForbidden,
"FAILED_RETRYING_CAA_CHECKING" => Self::FailedRetryingCaaChecking,
_ => Self::UnknownValue(management_status::UnknownValue(
wkt::internal::UnknownEnumValue::String(value.to_string()),
)),
}
}
}
impl serde::ser::Serialize for ManagementStatus {
fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
where
S: serde::Serializer,
{
match self {
Self::Unspecified => serializer.serialize_i32(0),
Self::Ok => serializer.serialize_i32(1),
Self::Pending => serializer.serialize_i32(2),
Self::FailedRetryingNotVisible => serializer.serialize_i32(4),
Self::FailedPermanent => serializer.serialize_i32(6),
Self::FailedRetryingCaaForbidden => serializer.serialize_i32(7),
Self::FailedRetryingCaaChecking => serializer.serialize_i32(8),
Self::UnknownValue(u) => u.0.serialize(serializer),
}
}
}
impl<'de> serde::de::Deserialize<'de> for ManagementStatus {
fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
where
D: serde::Deserializer<'de>,
{
deserializer.deserialize_any(wkt::internal::EnumVisitor::<ManagementStatus>::new(
".google.appengine.v1.ManagementStatus",
))
}
}
#[derive(Clone, Debug, PartialEq)]
#[non_exhaustive]
pub enum InboundServiceType {
InboundServiceUnspecified,
InboundServiceMail,
InboundServiceMailBounce,
InboundServiceXmppError,
InboundServiceXmppMessage,
InboundServiceXmppSubscribe,
InboundServiceXmppPresence,
InboundServiceChannelPresence,
InboundServiceWarmup,
UnknownValue(inbound_service_type::UnknownValue),
}
#[doc(hidden)]
pub mod inbound_service_type {
#[allow(unused_imports)]
use super::*;
#[derive(Clone, Debug, PartialEq)]
pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
}
impl InboundServiceType {
pub fn value(&self) -> std::option::Option<i32> {
match self {
Self::InboundServiceUnspecified => std::option::Option::Some(0),
Self::InboundServiceMail => std::option::Option::Some(1),
Self::InboundServiceMailBounce => std::option::Option::Some(2),
Self::InboundServiceXmppError => std::option::Option::Some(3),
Self::InboundServiceXmppMessage => std::option::Option::Some(4),
Self::InboundServiceXmppSubscribe => std::option::Option::Some(5),
Self::InboundServiceXmppPresence => std::option::Option::Some(6),
Self::InboundServiceChannelPresence => std::option::Option::Some(7),
Self::InboundServiceWarmup => std::option::Option::Some(9),
Self::UnknownValue(u) => u.0.value(),
}
}
pub fn name(&self) -> std::option::Option<&str> {
match self {
Self::InboundServiceUnspecified => {
std::option::Option::Some("INBOUND_SERVICE_UNSPECIFIED")
}
Self::InboundServiceMail => std::option::Option::Some("INBOUND_SERVICE_MAIL"),
Self::InboundServiceMailBounce => {
std::option::Option::Some("INBOUND_SERVICE_MAIL_BOUNCE")
}
Self::InboundServiceXmppError => {
std::option::Option::Some("INBOUND_SERVICE_XMPP_ERROR")
}
Self::InboundServiceXmppMessage => {
std::option::Option::Some("INBOUND_SERVICE_XMPP_MESSAGE")
}
Self::InboundServiceXmppSubscribe => {
std::option::Option::Some("INBOUND_SERVICE_XMPP_SUBSCRIBE")
}
Self::InboundServiceXmppPresence => {
std::option::Option::Some("INBOUND_SERVICE_XMPP_PRESENCE")
}
Self::InboundServiceChannelPresence => {
std::option::Option::Some("INBOUND_SERVICE_CHANNEL_PRESENCE")
}
Self::InboundServiceWarmup => std::option::Option::Some("INBOUND_SERVICE_WARMUP"),
Self::UnknownValue(u) => u.0.name(),
}
}
}
impl std::default::Default for InboundServiceType {
fn default() -> Self {
use std::convert::From;
Self::from(0)
}
}
impl std::fmt::Display for InboundServiceType {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
wkt::internal::display_enum(f, self.name(), self.value())
}
}
impl std::convert::From<i32> for InboundServiceType {
fn from(value: i32) -> Self {
match value {
0 => Self::InboundServiceUnspecified,
1 => Self::InboundServiceMail,
2 => Self::InboundServiceMailBounce,
3 => Self::InboundServiceXmppError,
4 => Self::InboundServiceXmppMessage,
5 => Self::InboundServiceXmppSubscribe,
6 => Self::InboundServiceXmppPresence,
7 => Self::InboundServiceChannelPresence,
9 => Self::InboundServiceWarmup,
_ => Self::UnknownValue(inbound_service_type::UnknownValue(
wkt::internal::UnknownEnumValue::Integer(value),
)),
}
}
}
impl std::convert::From<&str> for InboundServiceType {
fn from(value: &str) -> Self {
use std::string::ToString;
match value {
"INBOUND_SERVICE_UNSPECIFIED" => Self::InboundServiceUnspecified,
"INBOUND_SERVICE_MAIL" => Self::InboundServiceMail,
"INBOUND_SERVICE_MAIL_BOUNCE" => Self::InboundServiceMailBounce,
"INBOUND_SERVICE_XMPP_ERROR" => Self::InboundServiceXmppError,
"INBOUND_SERVICE_XMPP_MESSAGE" => Self::InboundServiceXmppMessage,
"INBOUND_SERVICE_XMPP_SUBSCRIBE" => Self::InboundServiceXmppSubscribe,
"INBOUND_SERVICE_XMPP_PRESENCE" => Self::InboundServiceXmppPresence,
"INBOUND_SERVICE_CHANNEL_PRESENCE" => Self::InboundServiceChannelPresence,
"INBOUND_SERVICE_WARMUP" => Self::InboundServiceWarmup,
_ => Self::UnknownValue(inbound_service_type::UnknownValue(
wkt::internal::UnknownEnumValue::String(value.to_string()),
)),
}
}
}
impl serde::ser::Serialize for InboundServiceType {
fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
where
S: serde::Serializer,
{
match self {
Self::InboundServiceUnspecified => serializer.serialize_i32(0),
Self::InboundServiceMail => serializer.serialize_i32(1),
Self::InboundServiceMailBounce => serializer.serialize_i32(2),
Self::InboundServiceXmppError => serializer.serialize_i32(3),
Self::InboundServiceXmppMessage => serializer.serialize_i32(4),
Self::InboundServiceXmppSubscribe => serializer.serialize_i32(5),
Self::InboundServiceXmppPresence => serializer.serialize_i32(6),
Self::InboundServiceChannelPresence => serializer.serialize_i32(7),
Self::InboundServiceWarmup => serializer.serialize_i32(9),
Self::UnknownValue(u) => u.0.serialize(serializer),
}
}
}
impl<'de> serde::de::Deserialize<'de> for InboundServiceType {
fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
where
D: serde::Deserializer<'de>,
{
deserializer.deserialize_any(wkt::internal::EnumVisitor::<InboundServiceType>::new(
".google.appengine.v1.InboundServiceType",
))
}
}
#[derive(Clone, Debug, PartialEq)]
#[non_exhaustive]
pub enum ServingStatus {
Unspecified,
Serving,
Stopped,
UnknownValue(serving_status::UnknownValue),
}
#[doc(hidden)]
pub mod serving_status {
#[allow(unused_imports)]
use super::*;
#[derive(Clone, Debug, PartialEq)]
pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
}
impl ServingStatus {
pub fn value(&self) -> std::option::Option<i32> {
match self {
Self::Unspecified => std::option::Option::Some(0),
Self::Serving => std::option::Option::Some(1),
Self::Stopped => std::option::Option::Some(2),
Self::UnknownValue(u) => u.0.value(),
}
}
pub fn name(&self) -> std::option::Option<&str> {
match self {
Self::Unspecified => std::option::Option::Some("SERVING_STATUS_UNSPECIFIED"),
Self::Serving => std::option::Option::Some("SERVING"),
Self::Stopped => std::option::Option::Some("STOPPED"),
Self::UnknownValue(u) => u.0.name(),
}
}
}
impl std::default::Default for ServingStatus {
fn default() -> Self {
use std::convert::From;
Self::from(0)
}
}
impl std::fmt::Display for ServingStatus {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
wkt::internal::display_enum(f, self.name(), self.value())
}
}
impl std::convert::From<i32> for ServingStatus {
fn from(value: i32) -> Self {
match value {
0 => Self::Unspecified,
1 => Self::Serving,
2 => Self::Stopped,
_ => Self::UnknownValue(serving_status::UnknownValue(
wkt::internal::UnknownEnumValue::Integer(value),
)),
}
}
}
impl std::convert::From<&str> for ServingStatus {
fn from(value: &str) -> Self {
use std::string::ToString;
match value {
"SERVING_STATUS_UNSPECIFIED" => Self::Unspecified,
"SERVING" => Self::Serving,
"STOPPED" => Self::Stopped,
_ => Self::UnknownValue(serving_status::UnknownValue(
wkt::internal::UnknownEnumValue::String(value.to_string()),
)),
}
}
}
impl serde::ser::Serialize for ServingStatus {
fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
where
S: serde::Serializer,
{
match self {
Self::Unspecified => serializer.serialize_i32(0),
Self::Serving => serializer.serialize_i32(1),
Self::Stopped => serializer.serialize_i32(2),
Self::UnknownValue(u) => u.0.serialize(serializer),
}
}
}
impl<'de> serde::de::Deserialize<'de> for ServingStatus {
fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
where
D: serde::Deserializer<'de>,
{
deserializer.deserialize_any(wkt::internal::EnumVisitor::<ServingStatus>::new(
".google.appengine.v1.ServingStatus",
))
}
}