#[non_exhaustive]pub struct GenericHTTPEndpointConfig {
pub host_uri: String,
pub service_directory_config: Option<ServiceDirectoryConfig>,
pub ssl_ca_certificate: String,
pub authentication: Option<Authentication>,
/* private fields */
}Expand description
Defines the configuration for connections to an HTTP service provider.
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.host_uri: StringRequired. Immutable. The service provider’s https endpoint.
service_directory_config: Option<ServiceDirectoryConfig>Optional. Configuration for using Service Directory to privately connect to a HTTP service provider. This should only be set if the Http service provider is hosted on-premises and not reachable by public internet. If this field is left empty, calls to the HTTP service provider will be made over the public internet.
ssl_ca_certificate: StringOptional. The SSL certificate to use for requests to the HTTP service provider.
authentication: Option<Authentication>The authentication mechanism to use for requests to the HTTP service provider.
Implementations§
Source§impl GenericHTTPEndpointConfig
impl GenericHTTPEndpointConfig
Sourcepub fn set_host_uri<T: Into<String>>(self, v: T) -> Self
pub fn set_host_uri<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_service_directory_config<T>(self, v: T) -> Selfwhere
T: Into<ServiceDirectoryConfig>,
pub fn set_service_directory_config<T>(self, v: T) -> Selfwhere
T: Into<ServiceDirectoryConfig>,
Sets the value of service_directory_config.
§Example
use google_cloud_developerconnect_v1::model::ServiceDirectoryConfig;
let x = GenericHTTPEndpointConfig::new().set_service_directory_config(ServiceDirectoryConfig::default()/* use setters */);Sourcepub fn set_or_clear_service_directory_config<T>(self, v: Option<T>) -> Selfwhere
T: Into<ServiceDirectoryConfig>,
pub fn set_or_clear_service_directory_config<T>(self, v: Option<T>) -> Selfwhere
T: Into<ServiceDirectoryConfig>,
Sets or clears the value of service_directory_config.
§Example
use google_cloud_developerconnect_v1::model::ServiceDirectoryConfig;
let x = GenericHTTPEndpointConfig::new().set_or_clear_service_directory_config(Some(ServiceDirectoryConfig::default()/* use setters */));
let x = GenericHTTPEndpointConfig::new().set_or_clear_service_directory_config(None::<ServiceDirectoryConfig>);Sourcepub fn set_ssl_ca_certificate<T: Into<String>>(self, v: T) -> Self
pub fn set_ssl_ca_certificate<T: Into<String>>(self, v: T) -> Self
Sets the value of ssl_ca_certificate.
§Example
let x = GenericHTTPEndpointConfig::new().set_ssl_ca_certificate("example");Sourcepub fn set_authentication<T: Into<Option<Authentication>>>(self, v: T) -> Self
pub fn set_authentication<T: Into<Option<Authentication>>>(self, v: T) -> Self
Sets the value of authentication.
Note that all the setters affecting authentication are mutually
exclusive.
§Example
use google_cloud_developerconnect_v1::model::generic_http_endpoint_config::BasicAuthentication;
let x = GenericHTTPEndpointConfig::new().set_authentication(Some(
google_cloud_developerconnect_v1::model::generic_http_endpoint_config::Authentication::BasicAuthentication(BasicAuthentication::default().into())));Sourcepub fn basic_authentication(&self) -> Option<&Box<BasicAuthentication>>
pub fn basic_authentication(&self) -> Option<&Box<BasicAuthentication>>
The value of authentication
if it holds a BasicAuthentication, None if the field is not set or
holds a different branch.
Sourcepub fn set_basic_authentication<T: Into<Box<BasicAuthentication>>>(
self,
v: T,
) -> Self
pub fn set_basic_authentication<T: Into<Box<BasicAuthentication>>>( self, v: T, ) -> Self
Sets the value of authentication
to hold a BasicAuthentication.
Note that all the setters affecting authentication are
mutually exclusive.
§Example
use google_cloud_developerconnect_v1::model::generic_http_endpoint_config::BasicAuthentication;
let x = GenericHTTPEndpointConfig::new().set_basic_authentication(BasicAuthentication::default()/* use setters */);
assert!(x.basic_authentication().is_some());
assert!(x.bearer_token_authentication().is_none());Sourcepub fn bearer_token_authentication(
&self,
) -> Option<&Box<BearerTokenAuthentication>>
pub fn bearer_token_authentication( &self, ) -> Option<&Box<BearerTokenAuthentication>>
The value of authentication
if it holds a BearerTokenAuthentication, None if the field is not set or
holds a different branch.
Sourcepub fn set_bearer_token_authentication<T: Into<Box<BearerTokenAuthentication>>>(
self,
v: T,
) -> Self
pub fn set_bearer_token_authentication<T: Into<Box<BearerTokenAuthentication>>>( self, v: T, ) -> Self
Sets the value of authentication
to hold a BearerTokenAuthentication.
Note that all the setters affecting authentication are
mutually exclusive.
§Example
use google_cloud_developerconnect_v1::model::generic_http_endpoint_config::BearerTokenAuthentication;
let x = GenericHTTPEndpointConfig::new().set_bearer_token_authentication(BearerTokenAuthentication::default()/* use setters */);
assert!(x.bearer_token_authentication().is_some());
assert!(x.basic_authentication().is_none());Trait Implementations§
Source§impl Clone for GenericHTTPEndpointConfig
impl Clone for GenericHTTPEndpointConfig
Source§fn clone(&self) -> GenericHTTPEndpointConfig
fn clone(&self) -> GenericHTTPEndpointConfig
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 GenericHTTPEndpointConfig
impl Debug for GenericHTTPEndpointConfig
Source§impl Default for GenericHTTPEndpointConfig
impl Default for GenericHTTPEndpointConfig
Source§fn default() -> GenericHTTPEndpointConfig
fn default() -> GenericHTTPEndpointConfig
Source§impl Message for GenericHTTPEndpointConfig
impl Message for GenericHTTPEndpointConfig
impl StructuralPartialEq for GenericHTTPEndpointConfig
Auto Trait Implementations§
impl Freeze for GenericHTTPEndpointConfig
impl RefUnwindSafe for GenericHTTPEndpointConfig
impl Send for GenericHTTPEndpointConfig
impl Sync for GenericHTTPEndpointConfig
impl Unpin for GenericHTTPEndpointConfig
impl UnsafeUnpin for GenericHTTPEndpointConfig
impl UnwindSafe for GenericHTTPEndpointConfig
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