#[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
pub fn new() -> Self
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 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more