#[non_exhaustive]pub struct ClientTlsPolicy {
pub name: String,
pub description: String,
pub create_time: Option<Timestamp>,
pub update_time: Option<Timestamp>,
pub labels: HashMap<String, String>,
pub sni: String,
pub client_certificate: Option<CertificateProvider>,
pub server_validation_ca: Vec<ValidationCA>,
/* private fields */
}Expand description
ClientTlsPolicy is a resource that specifies how a client should authenticate connections to backends of a service. This resource itself does not affect configuration unless it is attached to a backend service resource.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.name: StringRequired. Name of the ClientTlsPolicy resource. It matches the pattern
projects/{project}/locations/{location}/clientTlsPolicies/{client_tls_policy}
description: StringOptional. Free-text description of the resource.
create_time: Option<Timestamp>Output only. The timestamp when the resource was created.
update_time: Option<Timestamp>Output only. The timestamp when the resource was updated.
labels: HashMap<String, String>Optional. Set of label tags associated with the resource.
sni: StringOptional. Server Name Indication string to present to the server during TLS handshake. E.g: “secure.example.com”.
client_certificate: Option<CertificateProvider>Optional. Defines a mechanism to provision client identity (public and private keys) for peer to peer authentication. The presence of this dictates mTLS.
server_validation_ca: Vec<ValidationCA>Optional. Defines the mechanism to obtain the Certificate Authority certificate to validate the server certificate. If empty, client does not validate the server certificate.
Implementations§
Source§impl ClientTlsPolicy
impl ClientTlsPolicy
Sourcepub fn set_description<T: Into<String>>(self, v: T) -> Self
pub fn set_description<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_create_time<T>(self, v: T) -> Self
pub fn set_create_time<T>(self, v: T) -> Self
Sets the value of create_time.
§Example
use wkt::Timestamp;
let x = ClientTlsPolicy::new().set_create_time(Timestamp::default()/* use setters */);Sourcepub fn set_or_clear_create_time<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_create_time<T>(self, v: Option<T>) -> Self
Sets or clears the value of create_time.
§Example
use wkt::Timestamp;
let x = ClientTlsPolicy::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
let x = ClientTlsPolicy::new().set_or_clear_create_time(None::<Timestamp>);Sourcepub fn set_update_time<T>(self, v: T) -> Self
pub fn set_update_time<T>(self, v: T) -> Self
Sets the value of update_time.
§Example
use wkt::Timestamp;
let x = ClientTlsPolicy::new().set_update_time(Timestamp::default()/* use setters */);Sourcepub fn set_or_clear_update_time<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_update_time<T>(self, v: Option<T>) -> Self
Sets or clears the value of update_time.
§Example
use wkt::Timestamp;
let x = ClientTlsPolicy::new().set_or_clear_update_time(Some(Timestamp::default()/* use setters */));
let x = ClientTlsPolicy::new().set_or_clear_update_time(None::<Timestamp>);Sourcepub fn set_labels<T, K, V>(self, v: T) -> Self
pub fn set_labels<T, K, V>(self, v: T) -> Self
Sourcepub fn set_client_certificate<T>(self, v: T) -> Selfwhere
T: Into<CertificateProvider>,
pub fn set_client_certificate<T>(self, v: T) -> Selfwhere
T: Into<CertificateProvider>,
Sets the value of client_certificate.
§Example
use google_cloud_networksecurity_v1::model::CertificateProvider;
let x = ClientTlsPolicy::new().set_client_certificate(CertificateProvider::default()/* use setters */);Sourcepub fn set_or_clear_client_certificate<T>(self, v: Option<T>) -> Selfwhere
T: Into<CertificateProvider>,
pub fn set_or_clear_client_certificate<T>(self, v: Option<T>) -> Selfwhere
T: Into<CertificateProvider>,
Sets or clears the value of client_certificate.
§Example
use google_cloud_networksecurity_v1::model::CertificateProvider;
let x = ClientTlsPolicy::new().set_or_clear_client_certificate(Some(CertificateProvider::default()/* use setters */));
let x = ClientTlsPolicy::new().set_or_clear_client_certificate(None::<CertificateProvider>);Sourcepub fn set_server_validation_ca<T, V>(self, v: T) -> Self
pub fn set_server_validation_ca<T, V>(self, v: T) -> Self
Sets the value of server_validation_ca.
§Example
use google_cloud_networksecurity_v1::model::ValidationCA;
let x = ClientTlsPolicy::new()
.set_server_validation_ca([
ValidationCA::default()/* use setters */,
ValidationCA::default()/* use (different) setters */,
]);Trait Implementations§
Source§impl Clone for ClientTlsPolicy
impl Clone for ClientTlsPolicy
Source§fn clone(&self) -> ClientTlsPolicy
fn clone(&self) -> ClientTlsPolicy
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ClientTlsPolicy
impl Debug for ClientTlsPolicy
Source§impl Default for ClientTlsPolicy
impl Default for ClientTlsPolicy
Source§fn default() -> ClientTlsPolicy
fn default() -> ClientTlsPolicy
Source§impl Message for ClientTlsPolicy
impl Message for ClientTlsPolicy
Source§impl PartialEq for ClientTlsPolicy
impl PartialEq for ClientTlsPolicy
impl StructuralPartialEq for ClientTlsPolicy
Auto Trait Implementations§
impl Freeze for ClientTlsPolicy
impl RefUnwindSafe for ClientTlsPolicy
impl Send for ClientTlsPolicy
impl Sync for ClientTlsPolicy
impl Unpin for ClientTlsPolicy
impl UnsafeUnpin for ClientTlsPolicy
impl UnwindSafe for ClientTlsPolicy
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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§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