Version

Struct Version 

Source
#[non_exhaustive]
pub struct Version {
Show 38 fields pub name: String, pub id: String, pub inbound_services: Vec<InboundServiceType>, pub instance_class: String, pub network: Option<Network>, pub zones: Vec<String>, pub resources: Option<Resources>, pub runtime: String, pub runtime_channel: String, pub threadsafe: bool, pub vm: bool, pub app_engine_apis: bool, pub beta_settings: HashMap<String, String>, pub env: String, pub serving_status: ServingStatus, pub created_by: String, pub create_time: Option<Timestamp>, pub disk_usage_bytes: i64, pub runtime_api_version: String, pub runtime_main_executable_path: String, pub service_account: String, pub handlers: Vec<UrlMap>, pub error_handlers: Vec<ErrorHandler>, pub libraries: Vec<Library>, pub api_config: Option<ApiConfigHandler>, pub env_variables: HashMap<String, String>, pub build_env_variables: HashMap<String, String>, pub default_expiration: Option<Duration>, pub health_check: Option<HealthCheck>, pub readiness_check: Option<ReadinessCheck>, pub liveness_check: Option<LivenessCheck>, pub nobuild_files_regex: String, pub deployment: Option<Deployment>, pub version_url: String, pub endpoints_api_service: Option<EndpointsApiService>, pub entrypoint: Option<Entrypoint>, pub vpc_access_connector: Option<VpcAccessConnector>, pub scaling: Option<Scaling>, /* private fields */
}
Expand description

A Version resource is a specific set of source code and configuration files that are deployed into a service.

Fields (Non-exhaustive)§

This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.
§name: String

Full path to the Version resource in the API. Example: apps/myapp/services/default/versions/v1.

@OutputOnly

§id: String

Relative name of the version within the service. Example: v1. Version names can contain only lowercase letters, numbers, or hyphens. Reserved names: “default”, “latest”, and any name with the prefix “ah-”.

§inbound_services: Vec<InboundServiceType>

Before an application can receive email or XMPP messages, the application must be configured to enable the service.

§instance_class: String

Instance class that is used to run this version. Valid values are:

  • AutomaticScaling: F1, F2, F4, F4_1G
  • ManualScaling or BasicScaling: B1, B2, B4, B8, B4_1G

Defaults to F1 for AutomaticScaling and B1 for ManualScaling or BasicScaling.

§network: Option<Network>

Extra network settings. Only applicable in the App Engine flexible environment.

§zones: Vec<String>

The Google Compute Engine zones that are supported by this version in the App Engine flexible environment. Deprecated.

§resources: Option<Resources>

Machine resources for this version. Only applicable in the App Engine flexible environment.

§runtime: String

Desired runtime. Example: python27.

§runtime_channel: String

The channel of the runtime to use. Only available for some runtimes. Defaults to the default channel.

§threadsafe: bool

Whether multiple requests can be dispatched to this version at once.

§vm: bool

Whether to deploy this version in a container on a virtual machine.

§app_engine_apis: bool

Allows App Engine second generation runtimes to access the legacy bundled services.

§beta_settings: HashMap<String, String>

Metadata settings that are supplied to this version to enable beta runtime features.

§env: String

App Engine execution environment for this version.

Defaults to standard.

§serving_status: ServingStatus

Current serving status of this version. Only the versions with a SERVING status create instances and can be billed.

SERVING_STATUS_UNSPECIFIED is an invalid value. Defaults to SERVING.

§created_by: String

Email address of the user who created this version.

@OutputOnly

§create_time: Option<Timestamp>

Time that this version was created.

@OutputOnly

§disk_usage_bytes: i64

Total size in bytes of all the files that are included in this version and currently hosted on the App Engine disk.

@OutputOnly

§runtime_api_version: String

The version of the API in the given runtime environment. Please see the app.yaml reference for valid values at https://cloud.google.com/appengine/docs/standard/<language>/config/appref

§runtime_main_executable_path: String

The path or name of the app’s main executable.

§service_account: String

The identity that the deployed version will run as. Admin API will use the App Engine Appspot service account as default if this field is neither provided in app.yaml file nor through CLI flag.

§handlers: Vec<UrlMap>

An ordered list of URL-matching patterns that should be applied to incoming requests. The first matching URL handles the request and other request handlers are not attempted.

Only returned in GET requests if view=FULL is set.

§error_handlers: Vec<ErrorHandler>

Custom static error pages. Limited to 10KB per page.

Only returned in GET requests if view=FULL is set.

§libraries: Vec<Library>

Configuration for third-party Python runtime libraries that are required by the application.

Only returned in GET requests if view=FULL is set.

§api_config: Option<ApiConfigHandler>

Serving configuration for Google Cloud Endpoints.

Only returned in GET requests if view=FULL is set.

§env_variables: HashMap<String, String>

Environment variables available to the application.

Only returned in GET requests if view=FULL is set.

§build_env_variables: HashMap<String, String>

Environment variables available to the build environment.

Only returned in GET requests if view=FULL is set.

§default_expiration: Option<Duration>

Duration that static files should be cached by web proxies and browsers. Only applicable if the corresponding StaticFilesHandler does not specify its own expiration time.

Only returned in GET requests if view=FULL is set.

§health_check: Option<HealthCheck>

Configures health checking for instances. Unhealthy instances are stopped and replaced with new instances. Only applicable in the App Engine flexible environment.

Only returned in GET requests if view=FULL is set.

§readiness_check: Option<ReadinessCheck>

Configures readiness health checking for instances. Unhealthy instances are not put into the backend traffic rotation.

Only returned in GET requests if view=FULL is set.

§liveness_check: Option<LivenessCheck>

Configures liveness health checking for instances. Unhealthy instances are stopped and replaced with new instances

Only returned in GET requests if view=FULL is set.

§nobuild_files_regex: String

Files that match this pattern will not be built into this version. Only applicable for Go runtimes.

Only returned in GET requests if view=FULL is set.

§deployment: Option<Deployment>

Code and application artifacts that make up this version.

Only returned in GET requests if view=FULL is set.

§version_url: String

Serving URL for this version. Example: https://myversion-dot-myservice-dot-myapp.appspot.com

@OutputOnly

§endpoints_api_service: Option<EndpointsApiService>

Cloud Endpoints configuration.

If endpoints_api_service is set, the Cloud Endpoints Extensible Service Proxy will be provided to serve the API implemented by the app.

§entrypoint: Option<Entrypoint>

The entrypoint for the application.

§vpc_access_connector: Option<VpcAccessConnector>

Enables VPC connectivity for standard apps.

§scaling: Option<Scaling>

Controls how instances are created, scaled, and reaped.

Defaults to AutomaticScaling.

Implementations§

Source§

impl Version

Source

pub fn new() -> Self

Source

pub fn set_name<T: Into<String>>(self, v: T) -> Self

Sets the value of name.

Source

pub fn set_id<T: Into<String>>(self, v: T) -> Self

Sets the value of id.

Source

pub fn set_inbound_services<T, V>(self, v: T) -> Self
where T: IntoIterator<Item = V>, V: Into<InboundServiceType>,

Sets the value of inbound_services.

Source

pub fn set_instance_class<T: Into<String>>(self, v: T) -> Self

Sets the value of instance_class.

Source

pub fn set_network<T>(self, v: T) -> Self
where T: Into<Network>,

Sets the value of network.

Source

pub fn set_or_clear_network<T>(self, v: Option<T>) -> Self
where T: Into<Network>,

Sets or clears the value of network.

Source

pub fn set_zones<T, V>(self, v: T) -> Self
where T: IntoIterator<Item = V>, V: Into<String>,

Sets the value of zones.

Source

pub fn set_resources<T>(self, v: T) -> Self
where T: Into<Resources>,

Sets the value of resources.

Source

pub fn set_or_clear_resources<T>(self, v: Option<T>) -> Self
where T: Into<Resources>,

Sets or clears the value of resources.

Source

pub fn set_runtime<T: Into<String>>(self, v: T) -> Self

Sets the value of runtime.

Source

pub fn set_runtime_channel<T: Into<String>>(self, v: T) -> Self

Sets the value of runtime_channel.

Source

pub fn set_threadsafe<T: Into<bool>>(self, v: T) -> Self

Sets the value of threadsafe.

Source

pub fn set_vm<T: Into<bool>>(self, v: T) -> Self

Sets the value of vm.

Source

pub fn set_app_engine_apis<T: Into<bool>>(self, v: T) -> Self

Sets the value of app_engine_apis.

Source

pub fn set_beta_settings<T, K, V>(self, v: T) -> Self
where T: IntoIterator<Item = (K, V)>, K: Into<String>, V: Into<String>,

Sets the value of beta_settings.

Source

pub fn set_env<T: Into<String>>(self, v: T) -> Self

Sets the value of env.

Source

pub fn set_serving_status<T: Into<ServingStatus>>(self, v: T) -> Self

Sets the value of serving_status.

Source

pub fn set_created_by<T: Into<String>>(self, v: T) -> Self

Sets the value of created_by.

Source

pub fn set_create_time<T>(self, v: T) -> Self
where T: Into<Timestamp>,

Sets the value of create_time.

Source

pub fn set_or_clear_create_time<T>(self, v: Option<T>) -> Self
where T: Into<Timestamp>,

Sets or clears the value of create_time.

Source

pub fn set_disk_usage_bytes<T: Into<i64>>(self, v: T) -> Self

Sets the value of disk_usage_bytes.

Source

pub fn set_runtime_api_version<T: Into<String>>(self, v: T) -> Self

Sets the value of runtime_api_version.

Source

pub fn set_runtime_main_executable_path<T: Into<String>>(self, v: T) -> Self

Sets the value of runtime_main_executable_path.

Source

pub fn set_service_account<T: Into<String>>(self, v: T) -> Self

Sets the value of service_account.

Source

pub fn set_handlers<T, V>(self, v: T) -> Self
where T: IntoIterator<Item = V>, V: Into<UrlMap>,

Sets the value of handlers.

Source

pub fn set_error_handlers<T, V>(self, v: T) -> Self
where T: IntoIterator<Item = V>, V: Into<ErrorHandler>,

Sets the value of error_handlers.

Source

pub fn set_libraries<T, V>(self, v: T) -> Self
where T: IntoIterator<Item = V>, V: Into<Library>,

Sets the value of libraries.

Source

pub fn set_api_config<T>(self, v: T) -> Self

Sets the value of api_config.

Source

pub fn set_or_clear_api_config<T>(self, v: Option<T>) -> Self

Sets or clears the value of api_config.

Source

pub fn set_env_variables<T, K, V>(self, v: T) -> Self
where T: IntoIterator<Item = (K, V)>, K: Into<String>, V: Into<String>,

Sets the value of env_variables.

Source

pub fn set_build_env_variables<T, K, V>(self, v: T) -> Self
where T: IntoIterator<Item = (K, V)>, K: Into<String>, V: Into<String>,

Sets the value of build_env_variables.

Source

pub fn set_default_expiration<T>(self, v: T) -> Self
where T: Into<Duration>,

Sets the value of default_expiration.

Source

pub fn set_or_clear_default_expiration<T>(self, v: Option<T>) -> Self
where T: Into<Duration>,

Sets or clears the value of default_expiration.

Source

pub fn set_health_check<T>(self, v: T) -> Self
where T: Into<HealthCheck>,

Sets the value of health_check.

Source

pub fn set_or_clear_health_check<T>(self, v: Option<T>) -> Self
where T: Into<HealthCheck>,

Sets or clears the value of health_check.

Source

pub fn set_readiness_check<T>(self, v: T) -> Self
where T: Into<ReadinessCheck>,

Sets the value of readiness_check.

Source

pub fn set_or_clear_readiness_check<T>(self, v: Option<T>) -> Self
where T: Into<ReadinessCheck>,

Sets or clears the value of readiness_check.

Source

pub fn set_liveness_check<T>(self, v: T) -> Self
where T: Into<LivenessCheck>,

Sets the value of liveness_check.

Source

pub fn set_or_clear_liveness_check<T>(self, v: Option<T>) -> Self
where T: Into<LivenessCheck>,

Sets or clears the value of liveness_check.

Source

pub fn set_nobuild_files_regex<T: Into<String>>(self, v: T) -> Self

Sets the value of nobuild_files_regex.

Source

pub fn set_deployment<T>(self, v: T) -> Self
where T: Into<Deployment>,

Sets the value of deployment.

Source

pub fn set_or_clear_deployment<T>(self, v: Option<T>) -> Self
where T: Into<Deployment>,

Sets or clears the value of deployment.

Source

pub fn set_version_url<T: Into<String>>(self, v: T) -> Self

Sets the value of version_url.

Source

pub fn set_endpoints_api_service<T>(self, v: T) -> Self

Sets the value of endpoints_api_service.

Source

pub fn set_or_clear_endpoints_api_service<T>(self, v: Option<T>) -> Self

Sets or clears the value of endpoints_api_service.

Source

pub fn set_entrypoint<T>(self, v: T) -> Self
where T: Into<Entrypoint>,

Sets the value of entrypoint.

Source

pub fn set_or_clear_entrypoint<T>(self, v: Option<T>) -> Self
where T: Into<Entrypoint>,

Sets or clears the value of entrypoint.

Source

pub fn set_vpc_access_connector<T>(self, v: T) -> Self

Sets the value of vpc_access_connector.

Source

pub fn set_or_clear_vpc_access_connector<T>(self, v: Option<T>) -> Self

Sets or clears the value of vpc_access_connector.

Source

pub fn set_scaling<T: Into<Option<Scaling>>>(self, v: T) -> Self

Sets the value of scaling.

Note that all the setters affecting scaling are mutually exclusive.

Source

pub fn automatic_scaling(&self) -> Option<&Box<AutomaticScaling>>

The value of scaling if it holds a AutomaticScaling, None if the field is not set or holds a different branch.

Source

pub fn set_automatic_scaling<T: Into<Box<AutomaticScaling>>>(self, v: T) -> Self

Sets the value of scaling to hold a AutomaticScaling.

Note that all the setters affecting scaling are mutually exclusive.

Source

pub fn basic_scaling(&self) -> Option<&Box<BasicScaling>>

The value of scaling if it holds a BasicScaling, None if the field is not set or holds a different branch.

Source

pub fn set_basic_scaling<T: Into<Box<BasicScaling>>>(self, v: T) -> Self

Sets the value of scaling to hold a BasicScaling.

Note that all the setters affecting scaling are mutually exclusive.

Source

pub fn manual_scaling(&self) -> Option<&Box<ManualScaling>>

The value of scaling if it holds a ManualScaling, None if the field is not set or holds a different branch.

Source

pub fn set_manual_scaling<T: Into<Box<ManualScaling>>>(self, v: T) -> Self

Sets the value of scaling to hold a ManualScaling.

Note that all the setters affecting scaling are mutually exclusive.

Trait Implementations§

Source§

impl Clone for Version

Source§

fn clone(&self) -> Version

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Version

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for Version

Source§

fn default() -> Version

Returns the “default value” for a type. Read more
Source§

impl Message for Version

Source§

fn typename() -> &'static str

The typename of this message.
Source§

impl PartialEq for Version

Source§

fn eq(&self, other: &Version) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl StructuralPartialEq for Version

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> ErasedDestructor for T
where T: 'static,