Struct google_api_proto::google::cloud::compute::v1::UrlMapTest
source · pub struct UrlMapTest {
pub description: Option<String>,
pub expected_output_url: Option<String>,
pub expected_redirect_response_code: Option<i32>,
pub headers: Vec<UrlMapTestHeader>,
pub host: Option<String>,
pub path: Option<String>,
pub service: Option<String>,
}
Expand description
Message for the expected URL mappings.
Fields§
§description: Option<String>
Description of this test case.
expected_output_url: Option<String>
The expected output URL evaluated by the load balancer containing the scheme, host, path and query parameters. For rules that forward requests to backends, the test passes only when expectedOutputUrl matches the request forwarded by the load balancer to backends. For rules with urlRewrite, the test verifies that the forwarded request matches hostRewrite and pathPrefixRewrite in the urlRewrite action. When service is specified, expectedOutputUrl`s scheme is ignored. For rules with urlRedirect, the test passes only if expectedOutputUrl matches the URL in the load balancer’s redirect response. If urlRedirect specifies https_redirect, the test passes only if the scheme in expectedOutputUrl is also set to HTTPS. If urlRedirect specifies strip_query, the test passes only if expectedOutputUrl does not contain any query parameters. expectedOutputUrl is optional when service is specified.
expected_redirect_response_code: Option<i32>
For rules with urlRedirect, the test passes only if expectedRedirectResponseCode matches the HTTP status code in load balancer’s redirect response. expectedRedirectResponseCode cannot be set when service is set.
headers: Vec<UrlMapTestHeader>
HTTP headers for this request. If headers contains a host header, then host must also match the header value.
host: Option<String>
Host portion of the URL. If headers contains a host header, then host must also match the header value.
path: Option<String>
Path portion of the URL.
service: Option<String>
Expected BackendService or BackendBucket resource the given URL should be mapped to. The service field cannot be set if expectedRedirectResponseCode is set.
Implementations§
source§impl UrlMapTest
impl UrlMapTest
sourcepub fn expected_redirect_response_code(&self) -> i32
pub fn expected_redirect_response_code(&self) -> i32
Returns the value of expected_redirect_response_code
, or the default value if expected_redirect_response_code
is unset.
sourcepub fn service(&self) -> &str
pub fn service(&self) -> &str
Returns the value of service
, or the default value if service
is unset.
sourcepub fn description(&self) -> &str
pub fn description(&self) -> &str
Returns the value of description
, or the default value if description
is unset.
sourcepub fn expected_output_url(&self) -> &str
pub fn expected_output_url(&self) -> &str
Returns the value of expected_output_url
, or the default value if expected_output_url
is unset.
Trait Implementations§
source§impl Clone for UrlMapTest
impl Clone for UrlMapTest
source§fn clone(&self) -> UrlMapTest
fn clone(&self) -> UrlMapTest
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for UrlMapTest
impl Debug for UrlMapTest
source§impl Default for UrlMapTest
impl Default for UrlMapTest
source§impl Message for UrlMapTest
impl Message for UrlMapTest
source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
source§fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
source§fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
. Read moresource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
.source§impl PartialEq for UrlMapTest
impl PartialEq for UrlMapTest
source§fn eq(&self, other: &UrlMapTest) -> bool
fn eq(&self, other: &UrlMapTest) -> bool
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for UrlMapTest
Auto Trait Implementations§
impl Freeze for UrlMapTest
impl RefUnwindSafe for UrlMapTest
impl Send for UrlMapTest
impl Sync for UrlMapTest
impl Unpin for UrlMapTest
impl UnwindSafe for UrlMapTest
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T
in a tonic::Request